Bug #62358 [Asn->Fbk]: Segfault when using traits a lot

2012-08-23 Thread laruence
Edit report at https://bugs.php.net/bug.php?id=62358&edit=1

 ID: 62358
 Updated by: larue...@php.net
 Reported by:maciej dot sz at gmail dot com
 Summary:Segfault when using traits a lot
-Status: Assigned
+Status: Feedback
 Type:   Bug
 Package:Reproducible crash
 Operating System:   Linux 3.2.0-25-generic Ubuntu
 PHP Version:5.4.4
 Assigned To:laruence
 Block user comment: N
 Private report: N

 New Comment:

Please try using this snapshot:

  http://snaps.php.net/php-trunk-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

thanks very much for your help, I finally find the reason, please try with the 
latest snapshot


Previous Comments:

[2012-08-23 07:41:04] larue...@php.net

Automatic comment on behalf of laruence
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=6d1bebfcb0ad746cd0410d403a3812853a2cd457
Log: Fixed bug #62358 (Segfault when using traits a lot)


[2012-08-22 15:28:40] maciej dot sz at gmail dot com

Any luck reproducing the bug? If no please try this one:

http://oxio.pl/php54crash/oxio-framework-snap02.tar.gz

I was able to reproduce it with this code on 3 different machines (2 Ubuntu and 
1 FreeBSD). Also the set-up of the script should be easier than in the previous 
one.

And btw sorry about that last comment regarding null-value array item, just 
ignore it. My mind was off trying to find some kind of connection.


[2012-08-21 03:54:00] larue...@php.net

thanks very much. I will try to reproduce it locally


[2012-08-20 16:37:44] maciej dot sz at gmail dot com

The code is here:

http://oxio.pl/php54crash/oxio-framework-snap01.tar.gz

It's quite large, and requires PHPUnit (I'm using 3.6.12).
First run
unit-tests/prepare-data.sh
and then
unit-tests/run.sh

Please let me know if the segfault occurred on your machine.

Also notice the printed fragment in file
core/oxio/struct/config/Cfg.php:493-498
It was at time when I was playing with this fragment when it crashed. There is 
also something wrong there, as you can see the dump of the array shows that 
element 'max' is present (NULL value, but present), but when checking the array 
with isset($_elements['max']) it returns FALSE. It might be related as it seems 
to be a problem with adressing the memory.

The code:
var_dump($this->_elements);
var_dump($this->_elements['max']);
var_dump(isset($this->_elements['max']));

Outputs:
array(4) {
  ["min"]=>
  int(3)
  ["max"]=>
  NULL
  ["min_or_equal"]=>
  bool(true)
  ["max_or_equal"]=>
  bool(true)
}
NULL
bool(false)   <-- 


[2012-08-20 16:36:55] maciej dot sz at gmail dot com

Program received signal SIGSEGV, Segmentation fault.
0x0094e37d in zend_get_function_declaration (fptr=0x1a6f7a0)
at /home/maciek/Downloads/php-5.4.6RC1/Zend/zend_compile.c:3052
3052memcpy(offset, fptr->common.scope->name, 
fptr->common.scope->name_length);
(gdb) bt
#0  0x0094e37d in zend_get_function_declaration (fptr=0x1a6f7a0)
at /home/maciek/Downloads/php-5.4.6RC1/Zend/zend_compile.c:3052
#1  0x0094f37b in do_inheritance_check_on_method (child=0x1ab5d00, 
parent=0x1a7edb0)
at /home/maciek/Downloads/php-5.4.6RC1/Zend/zend_compile.c:3263
(...)

(gdb) frame 1
#1  0x0094f37b in do_inheritance_check_on_method (child=0x1ab5d00, 
parent=0x1a7edb0)
at /home/maciek/Downloads/php-5.4.6RC1/Zend/zend_compile.c:3263
3263zend_error(E_COMPILE_ERROR, "Declaration of 
%s::%s() must be compatible with %s", ZEND_FN_SCOPE_NAME(child), 
child->common.function_name, 
zend_get_function_declaration(child->common.prototype? child->common.prototype 
: parent TSRMLS_CC)); 
(gdb) p *child
$1 = {type = 2 '\002', common = {type = 2 '\002', function_name = 0x1ab5af0 
"addTlItem", 
scope = 0x1ab5760, fn_flags = 134283520, prototype = 0x1a6f7a0, num_args = 
1, required_num_args = 1, 
arg_info = 0x1ab6100}, op_array = {type = 2 '\002', function_name = 
0x1ab5af0 "addTlItem", 
scope = 0x1ab5760, fn_flags = 134283520, prototype = 0x1a6f7a0, num_args = 
1, required_num_args = 1, 
arg_info = 0x1ab6100, refcount = 0x1a7c650, opcodes = 0x1ad5ad8, last = 35, 
vars = 0x1ab5ea8, 
last_var = 7, T = 22, brk_cont_array = 0x19ffa18, last_brk_cont = 1, 
try_catch_array = 0x0, 
last_try_catch = 0, static_variables = 0x0, this_var = 6, 
filename = 0x701935c0 
"/usr/share/php/PHPUnit/Framework/MockObject/Generator.php(218) : eval()'d 
code", line_start = 11, line_end = 31, doc_comment = 0x0, doc_comment_len = 0, 
early_binding = 4294967295, l

Bug #61272 [Com]: ob_start callback get passed empty string

2012-08-23 Thread a dot vi at laposte dot net
Edit report at https://bugs.php.net/bug.php?id=61272&edit=1

 ID: 61272
 Comment by: a dot vi at laposte dot net
 Reported by:peacech at gmail dot com
 Summary:ob_start callback get passed empty string
 Status: Re-Opened
 Type:   Bug
 Package:Output Control
 Operating System:   Arch 32 bit
 PHP Version:5.4.0
 Block user comment: N
 Private report: N

 New Comment:

Hi again,

I have used casper's patch. Compilation worked fine and it's all cool now. 
Thanks Casper

Regards


Previous Comments:

[2012-08-21 11:17:32] a dot vi at laposte dot net

Same problem here with PHP5.4.6. I've had to patch my application and use:
ob_end_flush();
ob_clean();
instead of:
ob_end_clean();

I really agree with Casper: if this is not a change of behavior, this is a bug. 
My application was working really fine with PHP5.3.8 but was broken with 
PHP5.4.6. So something has changed 

Kind regards


[2012-07-10 08:59:04] dragon829 at gmail dot com

We have the same problem in 5.4.4,and it hasn't reproduced in 5.3.14 .


[2012-06-08 08:03:50] casper at langemeijer dot eu

Mike, I've dug a bit deeper into this problem, and must conclude that this 
really is a bug, or at least a change of behaviour.

I think test tests/output/ob_017.phpt is faulty too. I corrected bot output.c 
and the test in the patch I supplied.

In PHP 5.3 the callback function is called with the contents of the output 
buffer when ob_clean or ob_end_clean is called. The output will be fed to the 
callback function, but is erased right after that call.

After your output buffering rewrite the output buffer is cleaned before the 
callback is called.

I see no valid reason for a functional change. You're supplying the callback 
with a flag so that if needed the callback function could do this itself if 
needed.


[2012-05-18 10:04:18] patrick at procurios dot nl

We are having the same problem and it keeps us from migrating to 5.4. Could you 
please fix it?


[2012-03-05 14:43:25] peacech at gmail dot com

Unless ob_start callback specification has changed that for 
ob_clean/ob_end_clean, the output is discarded before calling the callback, 
then this is a bug. And I have scan the PHP 5.4 changelog and couldn't find 
anything mentioning this change.

So let me help by showing where the problem is

In line 1226 of output.c in the distributed PHP 5.4.0 source,

if (flags & PHP_OUTPUT_POP_DISCARD) {
context.op |= PHP_OUTPUT_HANDLER_CLEAN;
orphan->buffer.used = 0;
}
php_output_handler_op(orphan, &context);

orphan->buffer.used should not be set to 0 before calling the callback, 
otherwise the callback will be called with empty buffer.

And likewise in line 300 in php_output_clean

So, no, it isn't about appending $output to $buffer.




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

https://bugs.php.net/bug.php?id=61272


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=61272&edit=1


Bug #62715 [Com]: ReflectionParameter::isDefaultValueAvailable() wrong result

2012-08-23 Thread phpnet at bastian-frank dot de
Edit report at https://bugs.php.net/bug.php?id=62715&edit=1

 ID: 62715
 Comment by: phpnet at bastian-frank dot de
 Reported by:benjamin dot morel at strictcoding dot co dot uk
 Summary:ReflectionParameter::isDefaultValueAvailable() wrong
 result
 Status: Closed
 Type:   Bug
 Package:Reflection related
 Operating System:   CentOS 6.3, Windows 7
 PHP Version:5.4.5
 Assigned To:laruence
 Block user comment: N
 Private report: N

 New Comment:

It seems that 5.3.16 fixes the bug in isDefaultValueAvailable() but does NOT 
fix 
getDefaultValue, so the situation in 5.3.16 is even worse than before.

This breaks Twig and Doctrine in current versions, so 5.3.16 is not useable for 
Symfony 2 at the moment.

Is there a chance to get a new 5.3 release soon?


Previous Comments:

[2012-08-02 22:53:09] benjamin dot morel at strictcoding dot co dot uk

I can now confirm this works as expected. Thanks for your time!


[2012-08-02 14:26:09] larue...@php.net

Hi, fixed :)


[2012-08-02 10:19:20] benjamin dot morel at strictcoding dot co dot uk

Thanks for the quick fix, isDefaultValueAvailable() works indeed, but 
getDefaultValue() still throws an exception:

getParameters() as $p) {
if ($p->isDefaultValueAvailable()) {
var_export($p->getDefaultValue());
}
}

Fatal error: Uncaught exception 'ReflectionException' with message 'Parameter 
is 
not optional'


[2012-08-01 12:24:24] larue...@php.net

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.




[2012-08-01 12:23:51] larue...@php.net

Automatic comment on behalf of laruence
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=10642aa9e4f1eb694a8f7b514cc234cb24545744
Log: Fixed bug #62715 (ReflectionParameter::isDefaultValueAvailable() wrong 
result)




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

https://bugs.php.net/bug.php?id=62715


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62715&edit=1


Bug #60891 [Com]: FPM status serving should be moved to the master process

2012-08-23 Thread jasper at nerdsweide dot nl
Edit report at https://bugs.php.net/bug.php?id=60891&edit=1

 ID: 60891
 Comment by: jasper at nerdsweide dot nl
 Reported by:erno dot kovacs at freemail dot hu
 Summary:FPM status serving should be moved to the master
 process
 Status: Feedback
 Type:   Bug
 Package:FPM related
 Operating System:   Any
 PHP Version:5.3.9
 Assigned To:fat
 Block user comment: N
 Private report: N

 New Comment:

Sounds good! I'm looking forward to these features.

> ... and there should be some missing free()
This means there is a memory-leak right?


Previous Comments:

[2012-05-28 23:27:47] f...@php.net

Here is the first revision of the patch (it needs some verifications and there 
should be some missing free(), but it works 
on my side). It can be applied on the last 5.3 snapshot (not sure it will 
applies correctly on older version/revision).

Here's what's new:
- new FPM configuration item for pool: pm.status_allow which is unset by 
default. Add the names of the other pool you want 
to access from this pool (use a comma (,) as a separator). If one of the 
element is the char '*', then all pool are 
available from this pool status page

- call the status page of this pool adding a pool=xxx in the query string and 
there it's supposed to work


Exemple: for having a dedicated pool which only respond to the /status page and 
permit to see all pools status : add the 
following pool to your php-fpm.conf

[status]
listen=/tmp/status.sock
user = nobody ;use a low privilege user, nothing is needed here
group = nogroup
pm = ondemand
pm.max_children = 1 ;set a higher value if you need parallal requesting to the 
status page
pm.status_path = /status
pm.status_allow = * ; allow to see all pool status
chroot = /var/empty ; chroot to un empty directory for security reason
security.limit_extensions = .nonexistantextesionx ; limit to only one 
neverused extension

it'll only respond to the /status page (because of the pseudo random 
security.limit_extensions) and it's possible to see all 
pool status page:

http://xxx/status?pool=pool1
http://xxx/status?pool=pool2&full
http://xxx/status?pool=pool3&json&full

Waiting to here from you on this.

++ fat


[2012-05-28 23:08:16] f...@php.net

The following patch has been added/updated:

Patch Name: bug60891-v1.patch
Revision:   1338246496
URL:
https://bugs.php.net/patch-display.php?bug=60891&patch=bug60891-v1.patch&revision=1338246496


[2012-01-26 14:57:22] ml at fatbsd dot com

for security reason and by design it's not possible to make the master process 
to 
listen to those requests.

The only possibility is to fork another process only to handle this. And this 
is 
quite a a big change. It's on my todo list but no ETA yet.

++ fat


[2012-01-26 13:08:01] erno dot kovacs at freemail dot hu

Description:

When the server is overloaded, you cant query the FPM status page, however it 
should be its primary goal: being able to check whats going on. This way this 
cool feature is pointless.


Test script:
---
fpm conf:
pm = dynamic
pm.max_children = 1
pm.start_servers = 1
pm.min_spare_servers = 1
pm.max_spare_servers = 1

test script:


And while the only worker process is sleeping, send a query to the status page. 
It wont be served.

Expected result:

Status page.

Actual result:
--
Hanging






-- 
Edit this bug report at https://bugs.php.net/bug.php?id=60891&edit=1


[PHP-BUG] Bug #62904 [NEW]: Crash when cloning an object wich inherits SplFixedArray

2012-08-23 Thread fel...@php.net
From: felipe
Operating system: 
PHP version:  Irrelevant
Package:  SPL related
Bug Type: Bug
Bug description:Crash when cloning an object wich inherits SplFixedArray

Description:

See below.

Test script:
---
getMessage());
}


Actual result:
--
Program received signal SIGSEGV, Segmentation fault.
0x082fc564 in spl_fixedarray_object_new_ex (class_type=0xb6a06f74,
obj=0xbfffbf08, orig=0xb6a05964, clone_orig=1, tsrm_ls=0x8942050)
at /home/felipe/dev/php-src/ext/spl/spl_fixedarray.c:228
228 spl_fixedarray_init(intern->array, other->array->size 
TSRMLS_CC);
(gdb) p other->array
$6 = (spl_fixedarray *) 0x0


-- 
Edit bug report at https://bugs.php.net/bug.php?id=62904&edit=1
-- 
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=62904&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=62904&r=trysnapshot53
Try a snapshot (trunk):  
https://bugs.php.net/fix.php?id=62904&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=62904&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=62904&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=62904&r=alreadyfixed
Need backtrace:  
https://bugs.php.net/fix.php?id=62904&r=needtrace
Need Reproduce Script:   
https://bugs.php.net/fix.php?id=62904&r=needscript
Try newer version:   
https://bugs.php.net/fix.php?id=62904&r=oldversion
Not developer issue: 
https://bugs.php.net/fix.php?id=62904&r=support
Expected behavior:   
https://bugs.php.net/fix.php?id=62904&r=notwrong
Not enough info: 
https://bugs.php.net/fix.php?id=62904&r=notenoughinfo
Submitted twice: 
https://bugs.php.net/fix.php?id=62904&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=62904&r=globals
PHP 4 support discontinued:  
https://bugs.php.net/fix.php?id=62904&r=php4
Daylight Savings:https://bugs.php.net/fix.php?id=62904&r=dst
IIS Stability:   
https://bugs.php.net/fix.php?id=62904&r=isapi
Install GNU Sed: 
https://bugs.php.net/fix.php?id=62904&r=gnused
Floating point limitations:  
https://bugs.php.net/fix.php?id=62904&r=float
No Zend Extensions:  
https://bugs.php.net/fix.php?id=62904&r=nozend
MySQL Configuration Error:   
https://bugs.php.net/fix.php?id=62904&r=mysqlcfg



Bug #47096 [Com]: move_uploaded_file not OS encoding aware

2012-08-23 Thread nicolas dot grekas+php at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=47096&edit=1

 ID: 47096
 Comment by: nicolas dot grekas+php at gmail dot com
 Reported by:nuabaranda at web dot de
 Summary:move_uploaded_file not OS encoding aware
 Status: Open
 Type:   Bug
 Package:Filesystem function related
 Operating System:   win32 only - Windows XP
 PHP Version:5.2.8
 Block user comment: N
 Private report: N

 New Comment:

Well, if you really need it, there may be one possibility using a COM object:

$fs = new \COM('Scripting.FileSystemObject', null, CP_UTF8);


Previous Comments:

[2012-04-03 15:12:07] salsi at icosaedro dot it

Just to complete my little survey of the file names encoding issue:

1. Under Windows Vista, in the control panel "Regional and Language Settings" 
also the "Formats" panel must be set accordingly to the language selected in 
the "Advanced" panel in order to set the LC_CTYPE property; the "Advanced" 
panel only selects the translation mapping between Unicode and multi-byte 
encoding but does not set the locale properties.
For example, on a western country LC_CTYPE="english_United States.1252" while 
in Japan it might be LC_CTYPE="Japanese_Japan.1252".

2. Windows applies the "best fit" conversion table 
(http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/) when 
translating from Unicode file names to multi-byte file name 
(http://msdn.microsoft.com/en-us/library/windows/desktop/dd374047%28v=vs.85%29.aspx);
 characters that have not a best fit are replaced by a question mark "?".
So, for example, when the japanese locale is set (code page 932) the Latin 
capital letter A with dieresis ("Ä") might map to the plain capital letter "A" 
and accented vouels like "àèìòù" might be translated to the plain ASCII 
letters "aeiou".
This means that from inside PHP file names retrieved from the file system via 
dir() or getcwd() are only APPROXYMATIONS of the real path and there is no way 
to detect if they really match the actual name.


Conclusions
===

Under Unix and Linux with a properly set locale, PHP program can access and 
retrieve any file name that match the current locale; UTF-8 is the better 
choice here.

Under Windows, PHP programs can generate and can access any file or file path 
that contains only characters included in the current code page table; however, 
PHP programs cannot trust on file names retrieved from the file system because 
these might be arbitrarily mangled and there is no way to detect such artifact.


[2012-03-17 18:19:24] salsi at icosaedro dot it

As PHP operates under Windows as a "non-Unicode aware program", file names are 
bare array of bytes represented under PHP as "string"; these strings are 
converted back and forth to Unicode by Windows according to the currently 
selected "code page table" (see "Control Panel", "Regional and Language 
Options", "Administrative" tab panel, "Language for non-Unicode programs"). 
Unfortunately, UTF-8 encoding is not available there, so whatever locale you 
choose, some Unicode file names may still remain unaccessible to PHP.

For example, if your system locale is any western european encoding (code page 
1252), there is no way to refer to a file whose name is "日本語"; only on 
Windows system with japanese locale set (code page 932) you can access such a 
name, provided that the "string" that represents that name be properly encoded 
as requested by the code page 932, that is "\x93\xfa\x96\x7b\x8c\xea".

So, if you have a generic name of a file (along with its path) as a Unicode 
string $u (for example UTF-8 encoded) and you want to try to save it with that 
name under Windows, you must first check the current locale calling 
setlocale(LC_CTYPE, 0) to retrieve the current code page, then you must convert 
$u to an array of bytes according to the code page; if one or more code points 
have no counterpart in the current code page, the file cannot be saved with 
that name from PHP. Dot.

To complicate the implementation of such an algorithm, neither mbstring nor 
iconv are aware of all the Windows code pages, so you must write these 
conversion routines by yourself. This is just what I have done experimentally 
under PHP, and it appears to work nicely 
(http://www.icosaedro.it/phplint/libraries.cgi?lib=stdlib/it/icosaedro/io/FileName.html).
 Hopefully some day something similar will be available in PHP core lib., or 
some other abstraction layer of classes may provide full access to the Unicode 
realm.

References:

http://en.wikipedia.org/wiki/Windows_code_page

http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/


[2011-09-23 03:02:09] xd-yang at qq dot com

Since basename() is locale aware, why not mo

Bug #62715 [Csd]: ReflectionParameter::isDefaultValueAvailable() wrong result

2012-08-23 Thread laruence
Edit report at https://bugs.php.net/bug.php?id=62715&edit=1

 ID: 62715
 Updated by: larue...@php.net
 Reported by:benjamin dot morel at strictcoding dot co dot uk
 Summary:ReflectionParameter::isDefaultValueAvailable() wrong
 result
 Status: Closed
 Type:   Bug
 Package:Reflection related
 Operating System:   CentOS 6.3, Windows 7
 PHP Version:5.4.5
 Assigned To:laruence
 Block user comment: N
 Private report: N

 New Comment:

the getdefaultvalue fix is : 170ee90bf962d288bdcf6cf0c8c4a2a30c5c1ba2


Previous Comments:

[2012-08-23 09:11:04] phpnet at bastian-frank dot de

It seems that 5.3.16 fixes the bug in isDefaultValueAvailable() but does NOT 
fix 
getDefaultValue, so the situation in 5.3.16 is even worse than before.

This breaks Twig and Doctrine in current versions, so 5.3.16 is not useable for 
Symfony 2 at the moment.

Is there a chance to get a new 5.3 release soon?


[2012-08-02 22:53:09] benjamin dot morel at strictcoding dot co dot uk

I can now confirm this works as expected. Thanks for your time!


[2012-08-02 14:26:09] larue...@php.net

Hi, fixed :)


[2012-08-02 10:19:20] benjamin dot morel at strictcoding dot co dot uk

Thanks for the quick fix, isDefaultValueAvailable() works indeed, but 
getDefaultValue() still throws an exception:

getParameters() as $p) {
if ($p->isDefaultValueAvailable()) {
var_export($p->getDefaultValue());
}
}

Fatal error: Uncaught exception 'ReflectionException' with message 'Parameter 
is 
not optional'


[2012-08-01 12:24:24] larue...@php.net

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.






The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

https://bugs.php.net/bug.php?id=62715


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62715&edit=1


Bug #62904 [Com]: Crash when cloning an object which inherits SplFixedArray

2012-08-23 Thread reeze dot xia at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=62904&edit=1

 ID: 62904
 Comment by: reeze dot xia at gmail dot com
 Reported by:fel...@php.net
 Summary:Crash when cloning an object which inherits
 SplFixedArray
 Status: Open
 Type:   Bug
 Package:SPL related
 PHP Version:Irrelevant
 Block user comment: N
 Private report: N

 New Comment:

when construct a object but didn't call the parent constructor.

this patch makes it construct as default.

We could also throw an exception here too, but other method didn't 
checked the situation of SplFixArray::__construct didn't get called.
so I think we could makes them consist.


Previous Comments:

[2012-08-23 12:30:59] fel...@php.net

Description:

See below.

Test script:
---
getMessage());
}


Actual result:
--
Program received signal SIGSEGV, Segmentation fault.
0x082fc564 in spl_fixedarray_object_new_ex (class_type=0xb6a06f74, 
obj=0xbfffbf08, orig=0xb6a05964, clone_orig=1, tsrm_ls=0x8942050)
at /home/felipe/dev/php-src/ext/spl/spl_fixedarray.c:228
228 spl_fixedarray_init(intern->array, other->array->size 
TSRMLS_CC);
(gdb) p other->array
$6 = (spl_fixedarray *) 0x0







-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62904&edit=1


Bug #62904 [Com]: Crash when cloning an object which inherits SplFixedArray

2012-08-23 Thread reeze dot xia at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=62904&edit=1

 ID: 62904
 Comment by: reeze dot xia at gmail dot com
 Reported by:fel...@php.net
 Summary:Crash when cloning an object which inherits
 SplFixedArray
 Status: Open
 Type:   Bug
 Package:SPL related
 PHP Version:Irrelevant
 Block user comment: N
 Private report: N

 New Comment:

"but other method didn't check"  I mean *did* :)


Previous Comments:

[2012-08-23 14:46:29] reeze dot xia at gmail dot com

when construct a object but didn't call the parent constructor.

this patch makes it construct as default.

We could also throw an exception here too, but other method didn't 
checked the situation of SplFixArray::__construct didn't get called.
so I think we could makes them consist.


[2012-08-23 12:30:59] fel...@php.net

Description:

See below.

Test script:
---
getMessage());
}


Actual result:
--
Program received signal SIGSEGV, Segmentation fault.
0x082fc564 in spl_fixedarray_object_new_ex (class_type=0xb6a06f74, 
obj=0xbfffbf08, orig=0xb6a05964, clone_orig=1, tsrm_ls=0x8942050)
at /home/felipe/dev/php-src/ext/spl/spl_fixedarray.c:228
228 spl_fixedarray_init(intern->array, other->array->size 
TSRMLS_CC);
(gdb) p other->array
$6 = (spl_fixedarray *) 0x0







-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62904&edit=1


[PHP-BUG] Req #62906 [NEW]: [feature request] add support for CURLOPT_*SOCK* options

2012-08-23 Thread niki at gorchilov dot com
From: niki at gorchilov dot com
Operating system: All
PHP version:  Irrelevant
Package:  cURL related
Bug Type: Feature/Change Request
Bug description:[feature request] add support for CURLOPT_*SOCK* options

Description:

libcurl has 6 callback options that are missing in PHP bindings, but give
the user 
great control over the underlying socket:
- CURLOPT_SOCKOPTFUNCTION
- CURLOPT_SOCKOPTDATA
- CURLOPT_OPENSOCKETFUNCTION
- CURLOPT_OPENSOCKETDATA
- CURLOPT_CLOSESOCKETFUNCTION
- CURLOPT_CLOSESOCKETDATA

Without support for these options, developers can't set socket bindings,
options 
and marks on connections done via cURL.

That is a great limitation for serious network applications written in PHP.
Here's 
one real example:
http://stackoverflow.com/questions/12080550/tproxy-with-libcurl-or-http-streams-
under-php

Full description of these options is available at:
http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTSOCKOPTFUNCTION


-- 
Edit bug report at https://bugs.php.net/bug.php?id=62906&edit=1
-- 
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=62906&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=62906&r=trysnapshot53
Try a snapshot (trunk):  
https://bugs.php.net/fix.php?id=62906&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=62906&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=62906&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=62906&r=alreadyfixed
Need backtrace:  
https://bugs.php.net/fix.php?id=62906&r=needtrace
Need Reproduce Script:   
https://bugs.php.net/fix.php?id=62906&r=needscript
Try newer version:   
https://bugs.php.net/fix.php?id=62906&r=oldversion
Not developer issue: 
https://bugs.php.net/fix.php?id=62906&r=support
Expected behavior:   
https://bugs.php.net/fix.php?id=62906&r=notwrong
Not enough info: 
https://bugs.php.net/fix.php?id=62906&r=notenoughinfo
Submitted twice: 
https://bugs.php.net/fix.php?id=62906&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=62906&r=globals
PHP 4 support discontinued:  
https://bugs.php.net/fix.php?id=62906&r=php4
Daylight Savings:https://bugs.php.net/fix.php?id=62906&r=dst
IIS Stability:   
https://bugs.php.net/fix.php?id=62906&r=isapi
Install GNU Sed: 
https://bugs.php.net/fix.php?id=62906&r=gnused
Floating point limitations:  
https://bugs.php.net/fix.php?id=62906&r=float
No Zend Extensions:  
https://bugs.php.net/fix.php?id=62906&r=nozend
MySQL Configuration Error:   
https://bugs.php.net/fix.php?id=62906&r=mysqlcfg



Bug #62904 [Opn->Csd]: Crash when cloning an object which inherits SplFixedArray

2012-08-23 Thread laruence
Edit report at https://bugs.php.net/bug.php?id=62904&edit=1

 ID: 62904
 Updated by: larue...@php.net
 Reported by:fel...@php.net
 Summary:Crash when cloning an object which inherits
 SplFixedArray
-Status: Open
+Status: Closed
 Type:   Bug
 Package:SPL related
 PHP Version:Irrelevant
-Assigned To:
+Assigned To:laruence
 Block user comment: N
 Private report: N

 New Comment:

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:

[2012-08-23 15:18:48] larue...@php.net

Automatic comment on behalf of laruence
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=42f91d6ac6e4c359313ddc90b86067ab9be6a80f
Log: Fixed bug #62904 (Crash when cloning an object which inherits 
SplFixedArray)


[2012-08-23 14:48:04] reeze dot xia at gmail dot com

"but other method didn't check"  I mean *did* :)


[2012-08-23 14:46:29] reeze dot xia at gmail dot com

when construct a object but didn't call the parent constructor.

this patch makes it construct as default.

We could also throw an exception here too, but other method didn't 
checked the situation of SplFixArray::__construct didn't get called.
so I think we could makes them consist.


[2012-08-23 12:30:59] fel...@php.net

Description:

See below.

Test script:
---
getMessage());
}


Actual result:
--
Program received signal SIGSEGV, Segmentation fault.
0x082fc564 in spl_fixedarray_object_new_ex (class_type=0xb6a06f74, 
obj=0xbfffbf08, orig=0xb6a05964, clone_orig=1, tsrm_ls=0x8942050)
at /home/felipe/dev/php-src/ext/spl/spl_fixedarray.c:228
228 spl_fixedarray_init(intern->array, other->array->size 
TSRMLS_CC);
(gdb) p other->array
$6 = (spl_fixedarray *) 0x0







-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62904&edit=1


Bug #62904 [Com]: Crash when cloning an object which inherits SplFixedArray

2012-08-23 Thread reeze dot xia at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=62904&edit=1

 ID: 62904
 Comment by: reeze dot xia at gmail dot com
 Reported by:fel...@php.net
 Summary:Crash when cloning an object which inherits
 SplFixedArray
 Status: Closed
 Type:   Bug
 Package:SPL related
 PHP Version:Irrelevant
 Assigned To:laruence
 Block user comment: N
 Private report: N

 New Comment:

I really don't think throw an exception is a good idea.

Think about this:

setSize(1);
$x[0] = 30;
var_dump($x);
?>

This works.
if you throw an exception when clone.
$x->setSize(0) should throw too. since it was not initialized properly.


Previous Comments:

[2012-08-23 15:24:39] larue...@php.net

Automatic comment on behalf of laruence
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=13bcf685cb0a92e502ebe39f4b22c64304a9f333
Log: Fixed bug #62904 (Crash when cloning an object which inherits 
SplFixedArray)


[2012-08-23 15:19:16] larue...@php.net

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.




[2012-08-23 15:18:48] larue...@php.net

Automatic comment on behalf of laruence
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=42f91d6ac6e4c359313ddc90b86067ab9be6a80f
Log: Fixed bug #62904 (Crash when cloning an object which inherits 
SplFixedArray)


[2012-08-23 14:48:04] reeze dot xia at gmail dot com

"but other method didn't check"  I mean *did* :)


[2012-08-23 14:46:29] reeze dot xia at gmail dot com

when construct a object but didn't call the parent constructor.

this patch makes it construct as default.

We could also throw an exception here too, but other method didn't 
checked the situation of SplFixArray::__construct didn't get called.
so I think we could makes them consist.




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

https://bugs.php.net/bug.php?id=62904


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62904&edit=1


[PHP-BUG] Bug #62907 [NEW]: Double free when use traits

2012-08-23 Thread larue...@php.net
From: laruence
Operating system: 
PHP version:  5.4.6
Package:  Scripting Engine problem
Bug Type: Bug
Bug description:Double free when use traits 

Description:

This bug is related to #61998, but was spotting when I fixing the bug
#62358, PS: 
it really tough to refine this reproduce script :)




Test script:
---
https://bugs.php.net/bug.php?id=62907&edit=1
-- 
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=62907&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=62907&r=trysnapshot53
Try a snapshot (trunk):  
https://bugs.php.net/fix.php?id=62907&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=62907&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=62907&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=62907&r=alreadyfixed
Need backtrace:  
https://bugs.php.net/fix.php?id=62907&r=needtrace
Need Reproduce Script:   
https://bugs.php.net/fix.php?id=62907&r=needscript
Try newer version:   
https://bugs.php.net/fix.php?id=62907&r=oldversion
Not developer issue: 
https://bugs.php.net/fix.php?id=62907&r=support
Expected behavior:   
https://bugs.php.net/fix.php?id=62907&r=notwrong
Not enough info: 
https://bugs.php.net/fix.php?id=62907&r=notenoughinfo
Submitted twice: 
https://bugs.php.net/fix.php?id=62907&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=62907&r=globals
PHP 4 support discontinued:  
https://bugs.php.net/fix.php?id=62907&r=php4
Daylight Savings:https://bugs.php.net/fix.php?id=62907&r=dst
IIS Stability:   
https://bugs.php.net/fix.php?id=62907&r=isapi
Install GNU Sed: 
https://bugs.php.net/fix.php?id=62907&r=gnused
Floating point limitations:  
https://bugs.php.net/fix.php?id=62907&r=float
No Zend Extensions:  
https://bugs.php.net/fix.php?id=62907&r=nozend
MySQL Configuration Error:   
https://bugs.php.net/fix.php?id=62907&r=mysqlcfg



Bug #62907 [Opn]: Double free when use traits

2012-08-23 Thread laruence
Edit report at https://bugs.php.net/bug.php?id=62907&edit=1

 ID: 62907
 Updated by: larue...@php.net
 Reported by:larue...@php.net
 Summary:Double free when use traits
 Status: Open
 Type:   Bug
 Package:Scripting Engine problem
 PHP Version:5.4.6
-Assigned To:
+Assigned To:laruence
 Block user comment: N
 Private report: N

 New Comment:

assign to my self.


Previous Comments:

[2012-08-23 15:31:43] larue...@php.net

Description:

This bug is related to #61998, but was spotting when I fixing the bug #62358, 
PS: 
it really tough to refine this reproduce script :)




Test script:
---
https://bugs.php.net/bug.php?id=62907&edit=1


Bug #62901 [Opn->Nab]: foreach unexpectedly advances the internal array pointer

2012-08-23 Thread laruence
Edit report at https://bugs.php.net/bug.php?id=62901&edit=1

 ID: 62901
 Updated by: larue...@php.net
 Reported by:david at grudl dot com
 Summary:foreach unexpectedly advances the internal array
 pointer
-Status: Open
+Status: Not a bug
 Type:   Bug
 Package:Variables related
 PHP Version:5.4.6
 Block user comment: N
 Private report: N

 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

please see the note at : http://us3.php.net/manual/en/control-
structures.foreach.php


Previous Comments:

[2012-08-23 02:08:58] david at grudl dot com

Description:

Foreach unexpectedly advances the internal array pointer, although array is 
returned by function without reference.

Test script:
---
arr = array('item');
var_dump(key($this->arr)); // dumps 0

// this unexpectedly advances the internal array pointer
foreach ($this->getArr() as $v) {}

var_dump(key($this->arr)); // dumps NULL
}

function getArr()
{
// is NOT returned by reference
return $this->arr;
}

}


$test = new Test;
$test->run();


Expected result:

It dumps "0" in second time too.







-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62901&edit=1


Bug #62886 [Opn]: PHP-FPM may segfault/hang on startup

2012-08-23 Thread laruence
Edit report at https://bugs.php.net/bug.php?id=62886&edit=1

 ID: 62886
 Updated by: larue...@php.net
 Reported by:pierre at archlinux dot de
 Summary:PHP-FPM may segfault/hang on startup
 Status: Open
 Type:   Bug
 Package:FPM related
 Operating System:   Arch Linux
 PHP Version:5.4.6
-Assigned To:
+Assigned To:fat
 Block user comment: N
 Private report: N

 New Comment:

fat, could you please look at this one?


Previous Comments:

[2012-08-22 08:26:25] pierre at archlinux dot de

Description:

Since PHP 5.4.5 starting php-fpm will either result in a segmentation fault or 
it will hang under certain conditions.

It is a little hard to reproduce but it seems it is related to using modules. 
There more modules get loaded via php.ini the more likely this bug will get 
triggered (> 30%); with no modules loaded I was not able to trigger it.

I started from 5.4.6 and reverted patches applied to sapi/fpm. Once I reverted 
commit c2f33fb1293cbcdc94daefb8583ca13e98b5c826, php would no longer crash or 
hang.

See 
http://git.php.net/?p=php-src.git;a=commit;h=c2f33fb1293cbcdc94daefb8583ca13e98b5c826

Test script:
---
Configure php with a bunch of modules and run something like this:

for i in {1..100};do sudo php-fpm;sleep 0.5;sudo killall php-fpm;sleep 0.5;done

watch dmesg for segfaults like

php-fpm[32571]: segfault at 7f4eabe93cf8 ip 7f4eae9b1ed6 sp 
7fff87d69310 error 4 in ld-2.16.so[7f4eae9a3000+21000]

gdb will tell you 0x7fe0412c1ed6 in _dl_fini () from 
/lib/ld-linux-x86-64.so.2

Sometimes php-fpm will hang and has to be killed with kill -9.







-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62886&edit=1


Bug #62841 [Opn->Nab]: ora11g doesn't work

2012-08-23 Thread sixd
Edit report at https://bugs.php.net/bug.php?id=62841&edit=1

 ID: 62841
 Updated by: s...@php.net
 Reported by:altieresdelsent at gmail dot com
 Summary:ora11g doesn't work
-Status: Open
+Status: Not a bug
 Type:   Bug
 Package:OCI8 related
 Operating System:   Windows
 PHP Version:5.4.6
 Block user comment: N
 Private report: N

 New Comment:

Please take this issue to a support forum, e.g. 
https://forums.oracle.com/forums/forum.jspa?forumID=178


Previous Comments:

[2012-08-16 23:00:31] altieresdelsent at gmail dot com

Description:

I was using php 5.3 with oracle client 11g and everything works fine. I have a 
wep app already in production with php5.3. I tried upgrade to php5.4, so I 
install in another folder XAMPP 1.8 who uses php 5.4. I tried everything to 
make oracle works, but I cannot connect in the database. Its really strange 
because in the same machine with the same remote database php 5.3 works just 
fine.
I am using in php 5.3 o php_oci8.dll with oracle client 11g
and with php5.4 I tried use php_oci8.dll. The error is:
ORA-12154: TNS:could not resolve the connect identifier specified
after I tried php_oci8_11g.dll and the the error is:
ORA-24315: illegal attribute type

I on a Windows Vista 64bit Machine,
Both php are 32bis,
oracle client is 32bits
The database is in another machine.

I think that everything that you need to simulate the problem is install XAMPP 
1.8, enable php_oci8.dll and try run the test script.


Test script:
---
print_r(get_loaded_extensions());
print_r(get_extension_funcs('oci8'));
echo system('env');
echo "Client Version: " . oci_client_version(); 
print_r(oci_pconnect(DBUSER, DBPASSWORD, DBTNS));

print_r(oci_error());
die();



Expected result:

I was expecting that the oci_pconnect works, because the same script with php 
5.3, works.

Actual result:
--
Array
(
[0] => Core
[1] => bcmath
[2] => calendar
[3] => com_dotnet
[4] => ctype
[5] => date
[6] => ereg
[7] => filter
[8] => ftp
[9] => hash
[10] => iconv
[11] => json
[12] => mcrypt
[13] => SPL
[14] => odbc
[15] => pcre
[16] => Reflection
[17] => session
[18] => standard
[19] => mysqlnd
[20] => tokenizer
[21] => zip
[22] => zlib
[23] => libxml
[24] => dom
[25] => PDO
[26] => bz2
[27] => SimpleXML
[28] => wddx
[29] => xml
[30] => xmlreader
[31] => xmlwriter
[32] => apache2handler
[33] => Phar
[34] => mbstring
[35] => exif
[36] => gd
[37] => gettext
[38] => mysql
[39] => mysqli
[40] => oci8
[41] => pdo_mysql
[42] => pdo_sqlite
[43] => soap
[44] => sockets
[45] => sqlite3
[46] => xmlrpc
[47] => xsl
[48] => mhash
)
Array
(
[0] => oci_define_by_name
[1] => oci_bind_by_name
[2] => oci_bind_array_by_name
[3] => oci_field_is_null
[4] => oci_field_name
[5] => oci_field_size
[6] => oci_field_scale
[7] => oci_field_precision
[8] => oci_field_type
[9] => oci_field_type_raw
[10] => oci_execute
[11] => oci_cancel
[12] => oci_fetch
[13] => oci_fetch_object
[14] => oci_fetch_row
[15] => oci_fetch_assoc
[16] => oci_fetch_array
[17] => ocifetchinto
[18] => oci_fetch_all
[19] => oci_free_statement
[20] => oci_internal_debug
[21] => oci_num_fields
[22] => oci_parse
[23] => oci_new_cursor
[24] => oci_result
[25] => oci_client_version
[26] => oci_server_version
[27] => oci_statement_type
[28] => oci_num_rows
[29] => oci_close
[30] => oci_connect
[31] => oci_new_connect
[32] => oci_pconnect
[33] => oci_error
[34] => oci_free_descriptor
[35] => oci_lob_save
[36] => oci_lob_import
[37] => oci_lob_size
[38] => oci_lob_load
[39] => oci_lob_read
[40] => oci_lob_eof
[41] => oci_lob_tell
[42] => oci_lob_truncate
[43] => oci_lob_erase
[44] => oci_lob_flush
[45] => ocisetbufferinglob
[46] => ocigetbufferinglob
[47] => oci_lob_is_equal
[48] => oci_lob_rewind
[49] => oci_lob_write
[50] => oci_lob_append
[51] => oci_lob_copy
[52] => oci_lob_export
[53] => oci_lob_seek
[54] => oci_commit
[55] => oci_rollback
[56] => oci_new_descriptor
[57] => oci_set_prefetch
[58] => oci_set_client_identifier
[59] => oci_set_edition
[60] => oci_set_module_name
[61] => oci_set_action
[62] => oci_set_client_info
[63] => oci_password_change
[64] => oci_free_collection
[65] => oci_collection_append
[66] => oci_collection_element_get
[67] => oci_collection_element_assign
[68] => oci_collection_assign
[69] => oci_collectio

Req #26411 [Com]: while {} else {}

2012-08-23 Thread bensor987 at neuf dot fr
Edit report at https://bugs.php.net/bug.php?id=26411&edit=1

 ID: 26411
 Comment by: bensor987 at neuf dot fr
 Reported by:php at bellytime dot com
 Summary:while {} else {}
 Status: Open
 Type:   Feature/Change Request
 Package:Scripting Engine problem
 Operating System:   *
 PHP Version:*
 Block user comment: N
 Private report: N

 New Comment:

I would like to go further in that way : "iterated". "iterated" would be parsed 
if there has been at least 1 iteration in the loop.
id . ' - ' . $array_raw[$i]->label;
}
if ( $cnt_raw > 0 ){
echo some_function( $arr_output );
} else {
echo 'Nothing to display';
}
...
?>

id . ' - ' . $array_raw[$i]->label;
} iterated {
echo some_function( $arr_output );
} none {
echo 'Nothing to display';
}
...
?>


Previous Comments:

[2012-08-22 17:36:01] bensor987 at neuf dot fr

I understand your opinion. You want to make the "else" keyword usable only when 
"false" is encountered, like in "if...else". I didn't think about this.

In that case, let's use another keyword, because this syntax is an excellent 
idea.

Why not this ? 




[2012-08-22 17:05:05] ras...@php.net

It's not that simple. Loops are repeatedly evaluated conditions. It isn't clear 
whether adding an else clause would only apply to the first evaluation or also 
subsequent ones.


[2012-08-22 16:46:52] bensor987 at neuf dot fr

"no such syntax in other languages"what do you mean ? PHP doesn't have the 
right innovate ? 

I see plenty of cases I would use this syntax. The "else"s would be triggered 
if there hasn't been any iteration in the loop. It means : less variables to 
use (so less memory usage), less code lines, etc... 

There are only advantages to this syntax (and it's pretty simple to understand, 
no KISS violation here). It's not because it isn't done by other languages that 
we shouldn't implement it.


[2012-08-22 10:44:30] ni...@php.net

Python has an "else" for loops, but it means something completely different.


[2012-08-22 10:29:25] hawkyhawk14 at gmail dot com

larue...@php.net
no such syntax in other languages.
-

Python has it and some versions of BASIC have it aswell.




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

https://bugs.php.net/bug.php?id=26411


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=26411&edit=1


Bug #62841 [Com]: ora11g doesn't work

2012-08-23 Thread altieresdelsent at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=62841&edit=1

 ID: 62841
 Comment by: altieresdelsent at gmail dot com
 Reported by:altieresdelsent at gmail dot com
 Summary:ora11g doesn't work
 Status: Not a bug
 Type:   Bug
 Package:OCI8 related
 Operating System:   Windows
 PHP Version:5.4.6
 Block user comment: N
 Private report: N

 New Comment:

I don't think that is a problem with oracle, because with php5.3 is working 
just fine. Maybe is a problem with oracle but is related with php5.4, because 
php5.3 works with the client and php5.4 do not work.
anyway thanks for your reply, I followed your advise and register a thread in 
oracle support for php.
the link is: 
https://forums.oracle.com/forums/thread.jspa?threadID=2430965


Previous Comments:

[2012-08-23 16:51:33] s...@php.net

Please take this issue to a support forum, e.g. 
https://forums.oracle.com/forums/forum.jspa?forumID=178


[2012-08-16 23:00:31] altieresdelsent at gmail dot com

Description:

I was using php 5.3 with oracle client 11g and everything works fine. I have a 
wep app already in production with php5.3. I tried upgrade to php5.4, so I 
install in another folder XAMPP 1.8 who uses php 5.4. I tried everything to 
make oracle works, but I cannot connect in the database. Its really strange 
because in the same machine with the same remote database php 5.3 works just 
fine.
I am using in php 5.3 o php_oci8.dll with oracle client 11g
and with php5.4 I tried use php_oci8.dll. The error is:
ORA-12154: TNS:could not resolve the connect identifier specified
after I tried php_oci8_11g.dll and the the error is:
ORA-24315: illegal attribute type

I on a Windows Vista 64bit Machine,
Both php are 32bis,
oracle client is 32bits
The database is in another machine.

I think that everything that you need to simulate the problem is install XAMPP 
1.8, enable php_oci8.dll and try run the test script.


Test script:
---
print_r(get_loaded_extensions());
print_r(get_extension_funcs('oci8'));
echo system('env');
echo "Client Version: " . oci_client_version(); 
print_r(oci_pconnect(DBUSER, DBPASSWORD, DBTNS));

print_r(oci_error());
die();



Expected result:

I was expecting that the oci_pconnect works, because the same script with php 
5.3, works.

Actual result:
--
Array
(
[0] => Core
[1] => bcmath
[2] => calendar
[3] => com_dotnet
[4] => ctype
[5] => date
[6] => ereg
[7] => filter
[8] => ftp
[9] => hash
[10] => iconv
[11] => json
[12] => mcrypt
[13] => SPL
[14] => odbc
[15] => pcre
[16] => Reflection
[17] => session
[18] => standard
[19] => mysqlnd
[20] => tokenizer
[21] => zip
[22] => zlib
[23] => libxml
[24] => dom
[25] => PDO
[26] => bz2
[27] => SimpleXML
[28] => wddx
[29] => xml
[30] => xmlreader
[31] => xmlwriter
[32] => apache2handler
[33] => Phar
[34] => mbstring
[35] => exif
[36] => gd
[37] => gettext
[38] => mysql
[39] => mysqli
[40] => oci8
[41] => pdo_mysql
[42] => pdo_sqlite
[43] => soap
[44] => sockets
[45] => sqlite3
[46] => xmlrpc
[47] => xsl
[48] => mhash
)
Array
(
[0] => oci_define_by_name
[1] => oci_bind_by_name
[2] => oci_bind_array_by_name
[3] => oci_field_is_null
[4] => oci_field_name
[5] => oci_field_size
[6] => oci_field_scale
[7] => oci_field_precision
[8] => oci_field_type
[9] => oci_field_type_raw
[10] => oci_execute
[11] => oci_cancel
[12] => oci_fetch
[13] => oci_fetch_object
[14] => oci_fetch_row
[15] => oci_fetch_assoc
[16] => oci_fetch_array
[17] => ocifetchinto
[18] => oci_fetch_all
[19] => oci_free_statement
[20] => oci_internal_debug
[21] => oci_num_fields
[22] => oci_parse
[23] => oci_new_cursor
[24] => oci_result
[25] => oci_client_version
[26] => oci_server_version
[27] => oci_statement_type
[28] => oci_num_rows
[29] => oci_close
[30] => oci_connect
[31] => oci_new_connect
[32] => oci_pconnect
[33] => oci_error
[34] => oci_free_descriptor
[35] => oci_lob_save
[36] => oci_lob_import
[37] => oci_lob_size
[38] => oci_lob_load
[39] => oci_lob_read
[40] => oci_lob_eof
[41] => oci_lob_tell
[42] => oci_lob_truncate
[43] => oci_lob_erase
[44] => oci_lob_flush
[45] => ocisetbufferinglob
[46] => ocigetbufferinglob
[47] => oci_lob_is_equal
[48] => oci_lob_rewind
[49] => oci_lob_write
[50] => oci_lob_append
[51] => oci_lob_copy
[52] => oci_lob_export
[53] => oci_lob_seek
[54] =>

[PHP-BUG] Req #62911 [NEW]: Add DateTime::__toString()

2012-08-23 Thread bdurand-php at ssji dot net
From: bdurand-php at ssji dot net
Operating system: 
PHP version:  Irrelevant
Package:  Date/time related
Bug Type: Feature/Change Request
Bug description:Add DateTime::__toString()

Description:

Hello,

I want to have a default behavior to convert an instance of the class
DateTime into a string. I mean implement the method __toString() in the
DateTime class.

The default format should be ISO8601 IMHO, but we can add an attribut to
define the default format to use for __toString() and format() method.

Greetings.

Test script:
---
https://bugs.php.net/bug.php?id=62911&edit=1
-- 
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=62911&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=62911&r=trysnapshot53
Try a snapshot (trunk):  
https://bugs.php.net/fix.php?id=62911&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=62911&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=62911&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=62911&r=alreadyfixed
Need backtrace:  
https://bugs.php.net/fix.php?id=62911&r=needtrace
Need Reproduce Script:   
https://bugs.php.net/fix.php?id=62911&r=needscript
Try newer version:   
https://bugs.php.net/fix.php?id=62911&r=oldversion
Not developer issue: 
https://bugs.php.net/fix.php?id=62911&r=support
Expected behavior:   
https://bugs.php.net/fix.php?id=62911&r=notwrong
Not enough info: 
https://bugs.php.net/fix.php?id=62911&r=notenoughinfo
Submitted twice: 
https://bugs.php.net/fix.php?id=62911&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=62911&r=globals
PHP 4 support discontinued:  
https://bugs.php.net/fix.php?id=62911&r=php4
Daylight Savings:https://bugs.php.net/fix.php?id=62911&r=dst
IIS Stability:   
https://bugs.php.net/fix.php?id=62911&r=isapi
Install GNU Sed: 
https://bugs.php.net/fix.php?id=62911&r=gnused
Floating point limitations:  
https://bugs.php.net/fix.php?id=62911&r=float
No Zend Extensions:  
https://bugs.php.net/fix.php?id=62911&r=nozend
MySQL Configuration Error:   
https://bugs.php.net/fix.php?id=62911&r=mysqlcfg



Bug #49859 [Com]: PHP_FCGI_CHILDREN not work

2012-08-23 Thread matheus at gigatron dot com dot br
Edit report at https://bugs.php.net/bug.php?id=49859&edit=1

 ID: 49859
 Comment by: matheus at gigatron dot com dot br
 Reported by:loki5100-nospam at yahoo dot fr
 Summary:PHP_FCGI_CHILDREN not work
 Status: Not a bug
 Type:   Bug
 Package:PHP options/info functions
 Operating System:   Windows Vista
 PHP Version:5.3.0
 Block user comment: N
 Private report: N

 New Comment:

The problem is that the PHP_FCGI_CHILDREN environment variable is ignored under 
windows, therefore php-cgi does not spawn children, and when 
PHP_FCGI_MAX_REQUESTS is reached the process terminates.

Check on PHP's source, file cgi_main.c, around line 1982:

#ifndef PHP_WIN32
  /* Pre-fork, if required */
  if (getenv("PHP_FCGI_CHILDREN")) {
char * children_str = getenv("PHP_FCGI_CHILDREN");
...

So, php with fast-cgi will **never** work on Windows.

The question is, why is forking disabled under windows?


Previous Comments:

[2012-08-03 18:34:24] zyss at mail dot zp dot ua

I have the same problem. We're using PHP with windows embedded.

PHP just ignores this environment variable (PHP_FCGI_CHILDREN).

Please reopen this bug.


[2012-04-04 12:12:29] strayer at olle-orks dot org

I just discovered this while checking out xcache and this really doesn't 
work... 
phpinfo() even shows the env var in its output!

cmd:
# set PHP_FCGI_CHILDREN=5
# set PHP_FCGI_MAX_REQUESTS=3
# php-cgi -b 127.0.0.1:9000

Process Explorer shows only one process with one thread.

Ran phpinfo() via browser:

Environment
PHP_FCGI_CHILDREN   5
PHP_FCGI_MAX_REQUESTS   3

It looks like php-cgi just ignores the PHP_FCGI_CHILDREN, since 
PHP_FCGI_MAX_REQUESTS seems to be working as intended.


[2009-10-19 14:40:16] j...@php.net

You have just set the environment variables in wrong place / wrong way. (no 
idea how you do that in windows, but this works just fine under *nix) 


[2009-10-13 08:00:52] loki5100-nospam at yahoo dot fr

Description:

i found a bug in PHP-cgi.exe

I use Php-cgi as fastCgi

php-cgi.exe -b host:port

i set in environement variables this :

PHP_FCGI_CHILDREN=8
PHP_FCGI_MAX_REQUESTS=1000

in the task manager i see only one  Php-cgi.exe
process (when normaly i must see 9 process no?)
and after i send more than 1000 request the
php-cgi.exe process died ! and i must manually
restart it! that not a normal behavior when 
PHP_FCGI_CHILDREN is > 1

Reproduce code:
---
set in environement variables :
PHP_FCGI_CHILDREN=8
PHP_FCGI_MAX_REQUESTS=1000

exec: php-cgi.exe -b 127.0.0.1:9000

see in task manager only one Php-cgi.exe process

send more than 1000 request to php-cgi.exe, the process will die and you will 
need to manually restart it ! 




Expected result:

process must be restarted automatiquely

Actual result:
--
the main process die and you need to manually restart it ! 







-- 
Edit this bug report at https://bugs.php.net/bug.php?id=49859&edit=1


Bug #62814 [Com]: It is possible to stiffen child class members visibility

2012-08-23 Thread kev dot simpson at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=62814&edit=1

 ID: 62814
 Comment by: kev dot simpson at gmail dot com
 Reported by:resha dot ru at gmail dot com
 Summary:It is possible to stiffen child class members
 visibility
 Status: Open
 Type:   Bug
 Package:Class/Object related
 Operating System:   Linux
 PHP Version:5.3.15
 Block user comment: N
 Private report: N

 New Comment:

I reported this same problem a few years ago here: 
https://bugs.php.net/bug.php?id=48376
I was told this was not a bug (although I haven't a clue as to why its not 
deemed as such).  I believe C# allows you the ability to do this as it would 
resolve up the scope, but as of 5.4.0 I still cannot get why it allows forced 
reduced scopes during declaration, but provides an uncatchable fatal error on 
call.
I'm still most concerned by the allowed reduction from an interface.  There is 
no way to guarantee that an interface will implement the method in question 
regardless of if it is known to be that type which truly is a shame.


Previous Comments:

[2012-08-14 09:50:47] resha dot ru at gmail dot com

Sorry, it should be:

class F extends D
{
private function test() { } // stiffen visibility from public to private 
(unexpected)
}

But nevertheless.


[2012-08-14 09:48:17] resha dot ru at gmail dot com

Description:

It is possible to stiffen visibility (from public to protected, from public to 
private and from protected to private) if any of parent classes has private 
modifier.

Test script:
---
class A
{
private function test() { }
}

class B extends A
{
protected function test() { }  // loosen visibility from private to 
protected (expected)
}

class C extends B
{
private function test() { }  // stiffen visibility from protected to 
private (unexpected)
}

class D extends B
{
public function test() { } // loosen visibility from protected to public 
(expected)
}

class E extends D
{
protected function test() { } // stiffen visibility from public to 
protected (unexpected)
}

class F extends B
{
private function test() { } // stiffen visibility from public to private 
(unexpected)
}


Expected result:

PHP Fatal error:  Access level to C::test() must be protected (as in class B) 
or 
weaker

Actual result:
--
Everything is ok.






-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62814&edit=1


Bug #44458 [Com]: Ampersand sign in SimpleXMLElement->addChild() causes incomplete XML

2012-08-23 Thread phpbug at mailinator dot com
Edit report at https://bugs.php.net/bug.php?id=44458&edit=1

 ID: 44458
 Comment by: phpbug at mailinator dot com
 Reported by:sergej at halogen-dg dot com
 Summary:Ampersand sign in SimpleXMLElement->addChild()
 causes incomplete XML
 Status: Not a bug
 Type:   Bug
 Package:SimpleXML related
 Operating System:   FreeBSD, Linux
 PHP Version:5.2.5
 Block user comment: N
 Private report: N

 New Comment:

That's reply not user friendly :) Absolutely.
It's weired to give link to PHP manual. Why don't you give link to the page 
with description of this "feature"?
http://www.php.net/manual/en/simplexmlelement.addchild.php - this page doesn't 
have any info about ampersand (not counting user comments).
So, till addChild escapes angle brackets, quotes, but doesn't escape ampersand 
- I think every man of good sense will consider this as bug. (SimpleXML is 
Simple? ORLY?)


Previous Comments:

[2008-03-18 12:13:22] rricha...@php.net

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

& must be escaped


[2008-03-17 19:29:53] sergej at halogen-dg dot com

Description:

SimpleXMLElement->addChild() causes warning message and produces 
incomplete XML in case when the second argument contains ampersand  
sign '&'. Text after ampersand is absent in output XML.

In the same time escaping of other XML special symbols in tag body 
works OK. Also all XML special symbols in tag attributes are escaped 
OK.


Reproduce code:
---
');
// Quotes
$sitem=$sxml->addChild('tag',"'");
$sitem->addAttribute('attr',"'");
$sitem=$sxml->addChild('tag','"');
$sitem->addAttribute('attr','"');
// Brackets
$sitem=$sxml->addChild('tag','<');
$sitem->addAttribute('attr','<');
$sitem=$sxml->addChild('tag','>');
$sitem->addAttribute('attr','>');
// Ampersand
$sitem=$sxml->addChild('tag','Smith & Wesson');
$sitem->addAttribute('attr','Smith & Wesson');
// Result XML
print($sxml->asXML());
?>


Expected result:


'"<>Smith & Wesson


Actual result:
--
PHP Warning:  SimpleXMLElement::addChild(): unterminated entity 
reference  Wesson in xml.php on line 14

Warning: SimpleXMLElement::addChild(): unterminated entity reference  
Wesson in xml.php on line 14

'"<>Smith 







-- 
Edit this bug report at https://bugs.php.net/bug.php?id=44458&edit=1


[PHP-BUG] Req #62912 [NEW]: CURLINFO_PRIMARY_IP is not exposed

2012-08-23 Thread mommens at gmail dot com
From: mommens at gmail dot com
Operating system: Linux
PHP version:  5.4.6
Package:  cURL related
Bug Type: Feature/Change Request
Bug description:CURLINFO_PRIMARY_IP is not exposed

Description:

The primary IP of crawled resources is available through curl_getinfo but
the constant CURLINFO_PRIMARY_IP is not defined.

Test script:
---
$ch = curl_init('http://www.php.net');
curl_exec($ch);
var_dump(curl_getinfo($ch, 1048608));

Expected result:

Define CURLINFO_PRIMARY_IP = 1048608 and add this to the curl extension
documentation.


-- 
Edit bug report at https://bugs.php.net/bug.php?id=62912&edit=1
-- 
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=62912&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=62912&r=trysnapshot53
Try a snapshot (trunk):  
https://bugs.php.net/fix.php?id=62912&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=62912&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=62912&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=62912&r=alreadyfixed
Need backtrace:  
https://bugs.php.net/fix.php?id=62912&r=needtrace
Need Reproduce Script:   
https://bugs.php.net/fix.php?id=62912&r=needscript
Try newer version:   
https://bugs.php.net/fix.php?id=62912&r=oldversion
Not developer issue: 
https://bugs.php.net/fix.php?id=62912&r=support
Expected behavior:   
https://bugs.php.net/fix.php?id=62912&r=notwrong
Not enough info: 
https://bugs.php.net/fix.php?id=62912&r=notenoughinfo
Submitted twice: 
https://bugs.php.net/fix.php?id=62912&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=62912&r=globals
PHP 4 support discontinued:  
https://bugs.php.net/fix.php?id=62912&r=php4
Daylight Savings:https://bugs.php.net/fix.php?id=62912&r=dst
IIS Stability:   
https://bugs.php.net/fix.php?id=62912&r=isapi
Install GNU Sed: 
https://bugs.php.net/fix.php?id=62912&r=gnused
Floating point limitations:  
https://bugs.php.net/fix.php?id=62912&r=float
No Zend Extensions:  
https://bugs.php.net/fix.php?id=62912&r=nozend
MySQL Configuration Error:   
https://bugs.php.net/fix.php?id=62912&r=mysqlcfg



Req #54514 [Com]: Get php binary path during script execution

2012-08-23 Thread glen at delfi dot ee
Edit report at https://bugs.php.net/bug.php?id=54514&edit=1

 ID: 54514
 Comment by: glen at delfi dot ee
 Reported by:frederic dot hardy at mageekbox dot net
 Summary:Get php binary path during script execution
 Status: Closed
 Type:   Feature/Change Request
 Package:PHP options/info functions
 PHP Version:Irrelevant
 Assigned To:laruence
 Block user comment: N
 Private report: N

 New Comment:

could the test be improved not to depend that values match exactly? just the 
existence? because when the test is run from build time (from sourcetree 
instead 
of installed tree) the binary name is .libs/something due libtool:


DIFF
001+ string(62) "/home/users/glen/rpm/BUILD/x86_64-linux/php-5.4.6/sapi/cli/php"
001- done
002+ string(71) "/home/users/glen/rpm/BUILD/x86_64-linux/php-
5.4.6/sapi/cli/.libs/lt-php"


Previous Comments:

[2012-01-27 19:58:44] frozenf...@php.net

Documented in http://svn.php.net/viewvc?view=revision&revision=320582


[2011-12-07 10:37:36] larue...@php.net

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

implement in 5.4,  thanks


[2011-12-07 10:32:56] larue...@php.net

Automatic comment from SVN on behalf of laruence
Revision: http://svn.php.net/viewvc/?view=revision&revision=320567
Log: Implemented FR #54514 (Get php binary path during script execution).


[2011-12-07 08:57:46] patrickalla...@php.net

PHP does provide a path to the binary directory:
PHP_BINDIR

However it is true it doesn't contain the executable itself.


[2011-04-12 14:11:00] frederic dot hardy at mageekbox dot net

Description:

Currently, PHP does not provide any solution to retrieve PHP binary path in 
userland.
There is a workaround with some *NIX shells like bash, which provide $_, 
available in $_SERVER['_'] in userland.
However, it's not a reliable solution (cron task, etc.), and this hack is not 
available on Windows.
So, a constant like PHP_BINARY (similar to PHP_VERSION and other PHP_* 
constants) seems to be a good solution.







-- 
Edit this bug report at https://bugs.php.net/bug.php?id=54514&edit=1


Bug #62814 [Opn->Nab]: It is possible to stiffen child class members visibility

2012-08-23 Thread johannes
Edit report at https://bugs.php.net/bug.php?id=62814&edit=1

 ID: 62814
 Updated by: johan...@php.net
 Reported by:resha dot ru at gmail dot com
 Summary:It is possible to stiffen child class members
 visibility
-Status: Open
+Status: Not a bug
 Type:   Bug
 Package:Class/Object related
 Operating System:   Linux
 PHP Version:5.3.15
 Block user comment: N
 Private report: N

 New Comment:

If you'd stiffen visibility you'd be violating the is-a contract given. If an 
object is using a classed derived from A and I can do "instanceof A" I expect 
to be able to call all methods from A and having them do something like A's 
method does. When stiffening that won't be the case anymore.


Previous Comments:

[2012-08-23 19:49:18] kev dot simpson at gmail dot com

I reported this same problem a few years ago here: 
https://bugs.php.net/bug.php?id=48376
I was told this was not a bug (although I haven't a clue as to why its not 
deemed as such).  I believe C# allows you the ability to do this as it would 
resolve up the scope, but as of 5.4.0 I still cannot get why it allows forced 
reduced scopes during declaration, but provides an uncatchable fatal error on 
call.
I'm still most concerned by the allowed reduction from an interface.  There is 
no way to guarantee that an interface will implement the method in question 
regardless of if it is known to be that type which truly is a shame.


[2012-08-14 09:50:47] resha dot ru at gmail dot com

Sorry, it should be:

class F extends D
{
private function test() { } // stiffen visibility from public to private 
(unexpected)
}

But nevertheless.


[2012-08-14 09:48:17] resha dot ru at gmail dot com

Description:

It is possible to stiffen visibility (from public to protected, from public to 
private and from protected to private) if any of parent classes has private 
modifier.

Test script:
---
class A
{
private function test() { }
}

class B extends A
{
protected function test() { }  // loosen visibility from private to 
protected (expected)
}

class C extends B
{
private function test() { }  // stiffen visibility from protected to 
private (unexpected)
}

class D extends B
{
public function test() { } // loosen visibility from protected to public 
(expected)
}

class E extends D
{
protected function test() { } // stiffen visibility from public to 
protected (unexpected)
}

class F extends B
{
private function test() { } // stiffen visibility from public to private 
(unexpected)
}


Expected result:

PHP Fatal error:  Access level to C::test() must be protected (as in class B) 
or 
weaker

Actual result:
--
Everything is ok.






-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62814&edit=1


[PHP-BUG] Req #62913 [NEW]: add environment vars to proc_get_status()

2012-08-23 Thread clarkwise at gmail dot com
From: clarkwise at gmail dot com
Operating system: 
PHP version:  Irrelevant
Package:  Program Execution
Bug Type: Feature/Change Request
Bug description:add environment vars to proc_get_status()

Description:

Would be useful to get an array of environment vars from the process. With

proc_open(), a user-defined $env can be passed, but environment vars cannot
be 
subsequently retrieved if the called command changes them.

The most logical place seems to be returning an 'env' array among the other

elements returned by proc_get_status().


-- 
Edit bug report at https://bugs.php.net/bug.php?id=62913&edit=1
-- 
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=62913&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=62913&r=trysnapshot53
Try a snapshot (trunk):  
https://bugs.php.net/fix.php?id=62913&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=62913&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=62913&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=62913&r=alreadyfixed
Need backtrace:  
https://bugs.php.net/fix.php?id=62913&r=needtrace
Need Reproduce Script:   
https://bugs.php.net/fix.php?id=62913&r=needscript
Try newer version:   
https://bugs.php.net/fix.php?id=62913&r=oldversion
Not developer issue: 
https://bugs.php.net/fix.php?id=62913&r=support
Expected behavior:   
https://bugs.php.net/fix.php?id=62913&r=notwrong
Not enough info: 
https://bugs.php.net/fix.php?id=62913&r=notenoughinfo
Submitted twice: 
https://bugs.php.net/fix.php?id=62913&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=62913&r=globals
PHP 4 support discontinued:  
https://bugs.php.net/fix.php?id=62913&r=php4
Daylight Savings:https://bugs.php.net/fix.php?id=62913&r=dst
IIS Stability:   
https://bugs.php.net/fix.php?id=62913&r=isapi
Install GNU Sed: 
https://bugs.php.net/fix.php?id=62913&r=gnused
Floating point limitations:  
https://bugs.php.net/fix.php?id=62913&r=float
No Zend Extensions:  
https://bugs.php.net/fix.php?id=62913&r=nozend
MySQL Configuration Error:   
https://bugs.php.net/fix.php?id=62913&r=mysqlcfg



Bug #62886 [Asn->Fbk]: PHP-FPM may segfault/hang on startup

2012-08-23 Thread fat
Edit report at https://bugs.php.net/bug.php?id=62886&edit=1

 ID: 62886
 Updated by: f...@php.net
 Reported by:pierre at archlinux dot de
 Summary:PHP-FPM may segfault/hang on startup
-Status: Assigned
+Status: Feedback
 Type:   Bug
 Package:FPM related
 Operating System:   Arch Linux
 PHP Version:5.4.6
 Assigned To:fat
 Block user comment: N
 Private report: N

 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

COuld you please provide the full backtrace please ?

if it's possible, it would be great to enable debug symbols at compilation time

thx


Previous Comments:

[2012-08-23 15:41:13] larue...@php.net

fat, could you please look at this one?


[2012-08-22 08:26:25] pierre at archlinux dot de

Description:

Since PHP 5.4.5 starting php-fpm will either result in a segmentation fault or 
it will hang under certain conditions.

It is a little hard to reproduce but it seems it is related to using modules. 
There more modules get loaded via php.ini the more likely this bug will get 
triggered (> 30%); with no modules loaded I was not able to trigger it.

I started from 5.4.6 and reverted patches applied to sapi/fpm. Once I reverted 
commit c2f33fb1293cbcdc94daefb8583ca13e98b5c826, php would no longer crash or 
hang.

See 
http://git.php.net/?p=php-src.git;a=commit;h=c2f33fb1293cbcdc94daefb8583ca13e98b5c826

Test script:
---
Configure php with a bunch of modules and run something like this:

for i in {1..100};do sudo php-fpm;sleep 0.5;sudo killall php-fpm;sleep 0.5;done

watch dmesg for segfaults like

php-fpm[32571]: segfault at 7f4eabe93cf8 ip 7f4eae9b1ed6 sp 
7fff87d69310 error 4 in ld-2.16.so[7f4eae9a3000+21000]

gdb will tell you 0x7fe0412c1ed6 in _dl_fini () from 
/lib/ld-linux-x86-64.so.2

Sometimes php-fpm will hang and has to be killed with kill -9.







-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62886&edit=1


[PHP-BUG] Bug #62915 [NEW]: Memory leak when cloning unconstructed object

2012-08-23 Thread fel...@php.net
From: felipe
Operating system: 
PHP version:  Irrelevant
Package:  I18N and L10N related
Bug Type: Bug
Bug description:Memory leak when cloning unconstructed object

Description:

See below.

Test script:
---
getMessage());
}


Actual result:
--
/home/felipe/dev/php-src/Zend/zend_API.c(1097) :  Freeing 0x7F4A715F1288
(32 bytes), script=-
[Thu Aug 23 20:13:00 2012]  Script:  '-'
/home/felipe/dev/php-src/Zend/zend_API.c(1098) :  Freeing 0x7F4A715F1DD8 (5
bytes), script=-
/home/felipe/dev/php-src/Zend/zend_variables.c(121) : Actual location
(location was relayed)
=== Total 2 memory leaks detected ===]]>

-- 
Edit bug report at https://bugs.php.net/bug.php?id=62915&edit=1
-- 
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=62915&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=62915&r=trysnapshot53
Try a snapshot (trunk):  
https://bugs.php.net/fix.php?id=62915&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=62915&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=62915&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=62915&r=alreadyfixed
Need backtrace:  
https://bugs.php.net/fix.php?id=62915&r=needtrace
Need Reproduce Script:   
https://bugs.php.net/fix.php?id=62915&r=needscript
Try newer version:   
https://bugs.php.net/fix.php?id=62915&r=oldversion
Not developer issue: 
https://bugs.php.net/fix.php?id=62915&r=support
Expected behavior:   
https://bugs.php.net/fix.php?id=62915&r=notwrong
Not enough info: 
https://bugs.php.net/fix.php?id=62915&r=notenoughinfo
Submitted twice: 
https://bugs.php.net/fix.php?id=62915&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=62915&r=globals
PHP 4 support discontinued:  
https://bugs.php.net/fix.php?id=62915&r=php4
Daylight Savings:https://bugs.php.net/fix.php?id=62915&r=dst
IIS Stability:   
https://bugs.php.net/fix.php?id=62915&r=isapi
Install GNU Sed: 
https://bugs.php.net/fix.php?id=62915&r=gnused
Floating point limitations:  
https://bugs.php.net/fix.php?id=62915&r=float
No Zend Extensions:  
https://bugs.php.net/fix.php?id=62915&r=nozend
MySQL Configuration Error:   
https://bugs.php.net/fix.php?id=62915&r=mysqlcfg



Bug #62915 [Opn]: Memory leak when cloning unconstructed object

2012-08-23 Thread felipe
Edit report at https://bugs.php.net/bug.php?id=62915&edit=1

 ID: 62915
 Updated by: fel...@php.net
 Reported by:fel...@php.net
 Summary:Memory leak when cloning unconstructed object
 Status: Open
 Type:   Bug
 Package:I18N and L10N related
 PHP Version:Irrelevant
 Block user comment: N
 Private report: N

 New Comment:

Same problem is reproducible with:
- NumberFormatter
- MessageFormatter
- IntlDateFormatter


Previous Comments:

[2012-08-23 23:17:07] fel...@php.net

Description:

See below.

Test script:
---
getMessage());
}


Actual result:
--
/home/felipe/dev/php-src/Zend/zend_API.c(1097) :  Freeing 0x7F4A715F1288 (32 
bytes), script=-
[Thu Aug 23 20:13:00 2012]  Script:  '-'
/home/felipe/dev/php-src/Zend/zend_API.c(1098) :  Freeing 0x7F4A715F1DD8 (5 
bytes), script=-
/home/felipe/dev/php-src/Zend/zend_variables.c(121) : Actual location (location 
was relayed)
=== Total 2 memory leaks detected ===]]>






-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62915&edit=1


Bug #62814 [Nab]: It is possible to stiffen child class members visibility

2012-08-23 Thread rasmus
Edit report at https://bugs.php.net/bug.php?id=62814&edit=1

 ID: 62814
 Updated by: ras...@php.net
 Reported by:resha dot ru at gmail dot com
 Summary:It is possible to stiffen child class members
 visibility
 Status: Not a bug
 Type:   Bug
 Package:Class/Object related
 Operating System:   Linux
 PHP Version:5.3.15
 Block user comment: N
 Private report: N

 New Comment:

Johannes, I think you are actually agreeing with him here. As per Liskov you 
can't tighten visibility, you can only loosen it on inheritance. However, in 
this 
case you aren't tightening it because the original was private, so setting it 
back to private is allowed and doesn't violate Liskov.


Previous Comments:

[2012-08-23 21:28:49] johan...@php.net

If you'd stiffen visibility you'd be violating the is-a contract given. If an 
object is using a classed derived from A and I can do "instanceof A" I expect 
to be able to call all methods from A and having them do something like A's 
method does. When stiffening that won't be the case anymore.


[2012-08-23 19:49:18] kev dot simpson at gmail dot com

I reported this same problem a few years ago here: 
https://bugs.php.net/bug.php?id=48376
I was told this was not a bug (although I haven't a clue as to why its not 
deemed as such).  I believe C# allows you the ability to do this as it would 
resolve up the scope, but as of 5.4.0 I still cannot get why it allows forced 
reduced scopes during declaration, but provides an uncatchable fatal error on 
call.
I'm still most concerned by the allowed reduction from an interface.  There is 
no way to guarantee that an interface will implement the method in question 
regardless of if it is known to be that type which truly is a shame.


[2012-08-14 09:50:47] resha dot ru at gmail dot com

Sorry, it should be:

class F extends D
{
private function test() { } // stiffen visibility from public to private 
(unexpected)
}

But nevertheless.


[2012-08-14 09:48:17] resha dot ru at gmail dot com

Description:

It is possible to stiffen visibility (from public to protected, from public to 
private and from protected to private) if any of parent classes has private 
modifier.

Test script:
---
class A
{
private function test() { }
}

class B extends A
{
protected function test() { }  // loosen visibility from private to 
protected (expected)
}

class C extends B
{
private function test() { }  // stiffen visibility from protected to 
private (unexpected)
}

class D extends B
{
public function test() { } // loosen visibility from protected to public 
(expected)
}

class E extends D
{
protected function test() { } // stiffen visibility from public to 
protected (unexpected)
}

class F extends B
{
private function test() { } // stiffen visibility from public to private 
(unexpected)
}


Expected result:

PHP Fatal error:  Access level to C::test() must be protected (as in class B) 
or 
weaker

Actual result:
--
Everything is ok.






-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62814&edit=1


Bug #62901 [Nab]: foreach unexpectedly advances the internal array pointer

2012-08-23 Thread david at grudl dot com
Edit report at https://bugs.php.net/bug.php?id=62901&edit=1

 ID: 62901
 User updated by:david at grudl dot com
 Reported by:david at grudl dot com
 Summary:foreach unexpectedly advances the internal array
 pointer
 Status: Not a bug
 Type:   Bug
 Package:Variables related
 PHP Version:5.4.6
 Block user comment: N
 Private report: N

 New Comment:

Maybe this is not a bug, but i have read documentations carefully and there is 
nothing about this. Could you send a link?

And one question: why function reset() uses reference, if there is no need to 
use reference to advance internal array pointer?


Previous Comments:

[2012-08-23 15:37:32] larue...@php.net

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

please see the note at : http://us3.php.net/manual/en/control-
structures.foreach.php


[2012-08-23 02:08:58] david at grudl dot com

Description:

Foreach unexpectedly advances the internal array pointer, although array is 
returned by function without reference.

Test script:
---
arr = array('item');
var_dump(key($this->arr)); // dumps 0

// this unexpectedly advances the internal array pointer
foreach ($this->getArr() as $v) {}

var_dump(key($this->arr)); // dumps NULL
}

function getArr()
{
// is NOT returned by reference
return $this->arr;
}

}


$test = new Test;
$test->run();


Expected result:

It dumps "0" in second time too.







-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62901&edit=1


Bug #62915 [Opn]: Memory leak when cloning unconstructed object

2012-08-23 Thread laruence
Edit report at https://bugs.php.net/bug.php?id=62915&edit=1

 ID: 62915
 Updated by: larue...@php.net
 Reported by:fel...@php.net
 Summary:Memory leak when cloning unconstructed object
 Status: Open
 Type:   Bug
 Package:I18N and L10N related
 PHP Version:Irrelevant
 Block user comment: N
 Private report: N

 New Comment:

Hmm, wrong usage at first,  I think this should be marked as a low priority 
task. 
:)


Previous Comments:

[2012-08-23 23:39:39] fel...@php.net

Same problem is reproducible with:
- NumberFormatter
- MessageFormatter
- IntlDateFormatter


[2012-08-23 23:17:07] fel...@php.net

Description:

See below.

Test script:
---
getMessage());
}


Actual result:
--
/home/felipe/dev/php-src/Zend/zend_API.c(1097) :  Freeing 0x7F4A715F1288 (32 
bytes), script=-
[Thu Aug 23 20:13:00 2012]  Script:  '-'
/home/felipe/dev/php-src/Zend/zend_API.c(1098) :  Freeing 0x7F4A715F1DD8 (5 
bytes), script=-
/home/felipe/dev/php-src/Zend/zend_variables.c(121) : Actual location (location 
was relayed)
=== Total 2 memory leaks detected ===]]>






-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62915&edit=1


Req #62906 [Opn]: [feature request] add support for CURLOPT_*SOCK* options

2012-08-23 Thread laruence
Edit report at https://bugs.php.net/bug.php?id=62906&edit=1

 ID: 62906
 Updated by: larue...@php.net
 Reported by:niki at gorchilov dot com
 Summary:[feature request] add support for CURLOPT_*SOCK*
 options
 Status: Open
 Type:   Feature/Change Request
 Package:cURL related
 Operating System:   All
 PHP Version:Irrelevant
-Assigned To:
+Assigned To:pierrick
 Block user comment: N
 Private report: N

 New Comment:

what do you think? maybe expose some new constants?


Previous Comments:

[2012-08-23 15:02:25] niki at gorchilov dot com

Description:

libcurl has 6 callback options that are missing in PHP bindings, but give the 
user 
great control over the underlying socket:
- CURLOPT_SOCKOPTFUNCTION
- CURLOPT_SOCKOPTDATA
- CURLOPT_OPENSOCKETFUNCTION
- CURLOPT_OPENSOCKETDATA
- CURLOPT_CLOSESOCKETFUNCTION
- CURLOPT_CLOSESOCKETDATA

Without support for these options, developers can't set socket bindings, 
options 
and marks on connections done via cURL.

That is a great limitation for serious network applications written in PHP. 
Here's 
one real example:
http://stackoverflow.com/questions/12080550/tproxy-with-libcurl-or-http-streams-
under-php

Full description of these options is available at:
http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTSOCKOPTFUNCTION







-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62906&edit=1


Bug #62901 [Nab]: foreach unexpectedly advances the internal array pointer

2012-08-23 Thread laruence
Edit report at https://bugs.php.net/bug.php?id=62901&edit=1

 ID: 62901
 Updated by: larue...@php.net
 Reported by:david at grudl dot com
 Summary:foreach unexpectedly advances the internal array
 pointer
 Status: Not a bug
 Type:   Bug
 Package:Variables related
 PHP Version:5.4.6
 Block user comment: N
 Private report: N

 New Comment:

"When foreach first starts executing, the internal array pointer is 
automatically 
reset to the first element of the array. "  that means foreach change the 
internal 
potinter of an array.

http://us3.php.net/manual/en/control-structures.foreach.php


Previous Comments:

[2012-08-24 01:27:07] david at grudl dot com

Maybe this is not a bug, but i have read documentations carefully and there is 
nothing about this. Could you send a link?

And one question: why function reset() uses reference, if there is no need to 
use reference to advance internal array pointer?


[2012-08-23 15:37:32] larue...@php.net

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

please see the note at : http://us3.php.net/manual/en/control-
structures.foreach.php


[2012-08-23 02:08:58] david at grudl dot com

Description:

Foreach unexpectedly advances the internal array pointer, although array is 
returned by function without reference.

Test script:
---
arr = array('item');
var_dump(key($this->arr)); // dumps 0

// this unexpectedly advances the internal array pointer
foreach ($this->getArr() as $v) {}

var_dump(key($this->arr)); // dumps NULL
}

function getArr()
{
// is NOT returned by reference
return $this->arr;
}

}


$test = new Test;
$test->run();


Expected result:

It dumps "0" in second time too.







-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62901&edit=1


[PHP-BUG] Bug #62917 [NEW]: require() fails depending on PHP filename (includes ASCII 'µ' character)

2012-08-23 Thread matthew at slyman dot org
From: matthew at slyman dot org
Operating system: Windows 7
PHP version:  5.4.6
Package:  Filesystem function related
Bug Type: Bug
Bug description:require() fails depending on PHP filename (includes ASCII 'µ' 
character)

Description:

---
>From manual page: http://www.php.net/function.require-once
---
Where PHP filename includes "µ" character, for example; calling
"require_once" on 
that file results in an error message (require fails). Similar
paths/filenames 
without the special ASCII characters work under the same (Windows/XAMPP) 
installation, and identical paths/filenames including the special
characters work 
under Linux.

Test script:
---
(Create a file called "microtime.php" and another file called "µTIME.php",
and put them in the C:/ drive root folder, or some other place where PHP
files may be included from.)
~~~
require_once('C:/microtime.php');//works
require_once('C:/µTIME.php');//results in error message, but only under
Windows.

Expected result:

PHP file included.

Actual result:
--
ERROR MESSAGE:
~~~
Warning: require_once(C:/htdocs/[path_hidden]/µTIME.php): failed to open
stream: 
No such file or directory in C:\htdocs\[path_hidden]\[filename_hidden].php
on line 
...

-- 
Edit bug report at https://bugs.php.net/bug.php?id=62917&edit=1
-- 
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=62917&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=62917&r=trysnapshot53
Try a snapshot (trunk):  
https://bugs.php.net/fix.php?id=62917&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=62917&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=62917&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=62917&r=alreadyfixed
Need backtrace:  
https://bugs.php.net/fix.php?id=62917&r=needtrace
Need Reproduce Script:   
https://bugs.php.net/fix.php?id=62917&r=needscript
Try newer version:   
https://bugs.php.net/fix.php?id=62917&r=oldversion
Not developer issue: 
https://bugs.php.net/fix.php?id=62917&r=support
Expected behavior:   
https://bugs.php.net/fix.php?id=62917&r=notwrong
Not enough info: 
https://bugs.php.net/fix.php?id=62917&r=notenoughinfo
Submitted twice: 
https://bugs.php.net/fix.php?id=62917&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=62917&r=globals
PHP 4 support discontinued:  
https://bugs.php.net/fix.php?id=62917&r=php4
Daylight Savings:https://bugs.php.net/fix.php?id=62917&r=dst
IIS Stability:   
https://bugs.php.net/fix.php?id=62917&r=isapi
Install GNU Sed: 
https://bugs.php.net/fix.php?id=62917&r=gnused
Floating point limitations:  
https://bugs.php.net/fix.php?id=62917&r=float
No Zend Extensions:  
https://bugs.php.net/fix.php?id=62917&r=nozend
MySQL Configuration Error:   
https://bugs.php.net/fix.php?id=62917&r=mysqlcfg



Bug #62917 [Com]: require() fails depending on PHP filename (includes ASCII 'µ' character)

2012-08-23 Thread matthew at slyman dot org
Edit report at https://bugs.php.net/bug.php?id=62917&edit=1

 ID: 62917
 Comment by: matthew at slyman dot org
 Reported by:matthew at slyman dot org
 Summary:require() fails depending on PHP filename (includes
 ASCII 'µ' character)
 Status: Open
 Type:   Bug
 Package:Filesystem function related
 Operating System:   Windows 7
 PHP Version:5.4.6
 Block user comment: N
 Private report: N

 New Comment:

This is an issue, partly because object/function names are permitted to have 
symbols like "µ", and the object class autoloading system permits files to be 
required automatically (where for example filename is identical to class name 
defined in the PHP file). I haven't tested the autoloading system yet but it 
would 
be nice to be able to include/require this file using traditional methods at 
this 
point, and retain the convenient/logical class/file name "µtime" for 
futureproofing.


Previous Comments:

[2012-08-24 04:04:52] matthew at slyman dot org

Description:

---
>From manual page: http://www.php.net/function.require-once
---
Where PHP filename includes "µ" character, for example; calling "require_once" 
on 
that file results in an error message (require fails). Similar paths/filenames 
without the special ASCII characters work under the same (Windows/XAMPP) 
installation, and identical paths/filenames including the special characters 
work 
under Linux.

Test script:
---
(Create a file called "microtime.php" and another file called "µTIME.php", and 
put them in the C:/ drive root folder, or some other place where PHP files may 
be included from.)
~~~
require_once('C:/microtime.php');//works
require_once('C:/µTIME.php');//results in error message, but only under 
Windows.

Expected result:

PHP file included.

Actual result:
--
ERROR MESSAGE:
~~~
Warning: require_once(C:/htdocs/[path_hidden]/µTIME.php): failed to open 
stream: 
No such file or directory in C:\htdocs\[path_hidden]\[filename_hidden].php on 
line 
...






-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62917&edit=1


Req #62906 [Com]: [feature request] add support for CURLOPT_*SOCK* options

2012-08-23 Thread niki at gorchilov dot com
Edit report at https://bugs.php.net/bug.php?id=62906&edit=1

 ID: 62906
 Comment by: niki at gorchilov dot com
 Reported by:niki at gorchilov dot com
 Summary:[feature request] add support for CURLOPT_*SOCK*
 options
 Status: Assigned
 Type:   Feature/Change Request
 Package:cURL related
 Operating System:   All
 PHP Version:Irrelevant
 Assigned To:pierrick
 Block user comment: N
 Private report: N

 New Comment:

Looked at PHP sources to find how the similar CURLOPT_HEADERFUNCTION has been 
implemented and here's my understanding:
- ext/curl/interface.c is the only file that needs modification
- Seems CURLOPT_SOCKOPTDATA, CURLOPT_OPENSOCKETDATA, CURLOPT_CLOSESOCKETDATA 
cannot be exported to the end user, as PHP will need it internally to pass a 
context to the callback function. No a big deal IMHO.
- remaining three options - CURLOPT_SOCKOPTFUNCTION, 
CURLOPT_OPENSOCKETFUNCTION, 
CURLOPT_CLOSESOCKETFUNCTION shall be added in PHP_MINIT_FUNCTION, 
_php_curl_set_default_options and _php_curl_setopt.
- all the three callbacks shall be implemented using curl_write_header as a 
model.

Hope this helps.


Previous Comments:

[2012-08-24 02:32:41] larue...@php.net

what do you think? maybe expose some new constants?


[2012-08-23 15:02:25] niki at gorchilov dot com

Description:

libcurl has 6 callback options that are missing in PHP bindings, but give the 
user 
great control over the underlying socket:
- CURLOPT_SOCKOPTFUNCTION
- CURLOPT_SOCKOPTDATA
- CURLOPT_OPENSOCKETFUNCTION
- CURLOPT_OPENSOCKETDATA
- CURLOPT_CLOSESOCKETFUNCTION
- CURLOPT_CLOSESOCKETDATA

Without support for these options, developers can't set socket bindings, 
options 
and marks on connections done via cURL.

That is a great limitation for serious network applications written in PHP. 
Here's 
one real example:
http://stackoverflow.com/questions/12080550/tproxy-with-libcurl-or-http-streams-
under-php

Full description of these options is available at:
http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTSOCKOPTFUNCTION







-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62906&edit=1


Bug #54716 [Com]: Internal Server Error when php compiled with oci driver

2012-08-23 Thread debian at linux dot org
Edit report at https://bugs.php.net/bug.php?id=54716&edit=1

 ID: 54716
 Comment by: debian at linux dot org
 Reported by:dominik dot szybowski at bzwbk dot pl
 Summary:Internal Server Error when php compiled with oci
 driver
 Status: Feedback
 Type:   Bug
 Package:OCI8 related
 Operating System:   AIX
 PHP Version:5.2.17
 Block user comment: N
 Private report: N

 New Comment:

My Configuration :
- Debian GNU/Linux 6 64-bit
- Oracle Instantclient 11.2
- PHP 5.3.14
- mod_auth_kerb 5.4 
- Apache 2.2.16
- Kerberos Heimdal

This can be reproduced using Apache graceful command.
Just after the mod_auth_kerb will fail to read the kerberos conf
gss_import_name() failed: Miscellaneous failure (, Can't open/find Kerberos 
configuration file. it will use the same default kerberos configuration as 
Oracle Database !!!
You can force the path using sqlnet.ora but it will fail after when using gss 
acquire credential (unknown error 2 or 21).

We did not find a fix.


Previous Comments:

[2012-01-09 14:01:56] rattlebrain at gmx dot net

I have a similar problem.

mod_auth_kerb works fine as long as I don't use the PHP OCI8 extension. As soon 
as I load the OCI8 extension, mod_auth_kerb starts to behave weird. After an 
Apache (re)start everything is fine, but when I reload Apache I'm getting in a 
browser "Internal Server Error" and in the error log (just like the topic 
starter):

[Mon Jan 09 14:33:00 2012] [error] [client 10.206.33.199] gss_import_name() 
failed: Miscellaneous failure (, Can't open/find Kerberos configuration file)

After stracing the Apache processes it appeared that /krb5/krb.conf is trying 
to be opened, but obviously fails on a Linux system. I could prove that Oracle 
OCI is doing this by setting the SQLNET.KERBEROS5_CONF parameter to a different 
value in sqlnet.ora.

So in some way OCI mixes up the Kerberos stuff that mod_auth_kerb is using, but 
only when Apache is reloaded. Without everything works perfect, including the 
PHP OCI8 stuff.

I'm using:

- Debian GNU/Linux 6 64-bit
- Oracle Instantclient Basic 11.2.0.2.0
- PHP 5.3.3 (Debian package rebuild to include OCI8)
- mod_auth_kerb 5.4
- Apache 2.2.16

To create the OCI8 stuff I added the following parameters to the standard 
Debian PHP build parameters:

--with-oci8=shared,/usr
--with-pdo-oci=shared,/usr

This is the complete configure command:

CFLAGS="-g -O2 -O2 -Wall -fsigned-char -fno-strict-aliasing   -gstabs" 
PROG_SENDMAIL="/usr/sbin/sendmail" ../configure \
--prefix=/usr --with-apxs2=/usr/bin/apxs2 \
--with-config-file-path=/etc/php5/apache2 \
--with-config-file-scan-dir=/etc/php5/apache2/conf.d \
--build=x86_64-linux-gnu --host=x86_64-linux-gnu 
--sysconfdir=/etc --localstatedir=/var --mandir=/usr/share/man --disable-debug 
--with-regex=php --disable-rp
ath --disable-static --with-pic --with-layout=GNU --with-pear=/usr/share/php 
--enable-calendar --enable-sysvsem --enable-sysvshm --enable-sysvmsg 
--enable-bcmath --with-bz2 
--enable-ctype --with-db4 --with-qdbm=/usr --without-gdbm --with-iconv 
--enable-exif --enable-ftp --with-gettext --enable-mbstring --with-onig=/usr 
--with-pcre-regex=/usr --
enable-shmop --enable-sockets --enable-wddx --with-libxml-dir=/usr --with-zlib 
--with-kerberos=/usr --with-openssl=/usr --enable-soap --enable-zip 
--with-mhash=yes --with-ex
ec-dir=/usr/lib/php5/libexec --with-system-tzdata \
--without-mm \
--with-curl=shared,/usr \
--with-enchant=shared,/usr \
--with-zlib-dir=/usr \
--with-gd=shared,/usr --enable-gd-native-ttf \
--with-gmp=shared,/usr \
--with-jpeg-dir=shared,/usr \
--with-xpm-dir=shared,/usr/X11R6 \
--with-png-dir=shared,/usr \
--with-freetype-dir=shared,/usr \
--with-imap=shared,/usr \
--with-imap-ssl \
--with-interbase=shared,/usr --with-pdo-firebird=shared,/usr \
--enable-intl=shared \
--with-ttf=shared,/usr \
--with-t1lib=shared,/usr \
--with-ldap=shared,/usr \
--with-ldap-sasl=/usr \
--with-mcrypt=shared,/usr \
--with-mysql=shared,/usr \
--with-mysqli=shared,/usr/bin/mysql_config \
--with-pspell=shared,/usr \
--with-unixODBC=shared,/usr \
--with-recode=shared,/usr \
--with-xsl=shared,/usr \
--with-snmp=shared,/usr \
--with-sqlite=shared,/usr \
--with-sqlite3=shared,/usr \
--with-mssql=shared,/usr \
--with-tidy=shared,/usr \
--with-xmlrpc=sha