Bug #51857 [Com]: deleteName() for directories returns True on non-success

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

 ID: 51857
 Comment by: maxspeed40k at gmail dot com
 Reported by:nuabaranda at web dot de
 Summary:deleteName() for directories returns True on
 non-success
 Status: Feedback
 Type:   Bug
 Package:Zip Related
 Operating System:   Linux 2.6.27
 PHP Version:5.3.3-dev
 Assigned To:pajoye
 Block user comment: N
 Private report: N

 New Comment:

reproduce the problem
PHP Version: 5.4.3
OS: windows 7


Previous Comments:

[2010-09-14 15:19:48] paj...@php.net

Please try using this snapshot:

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

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

I can't reproduce the problem, can you try again pls?


[2010-05-21 19:41:42] phi...@php.net

And for good measure:

open(FILEPATH_ZIPFILE, ZIPARCHIVE::CREATE) === TRUE) {

$zip->addFromString('foo.txt', 'foo');
$zip->addFromString('bar.txt', 'bar');
$zip->addEmptyDir('EmptyDirectory');
$zip->addEmptyDir('FullDirectory');
$zip->addFromString('FullDirectory/baz.txt', 'baz');
$zip->close();
}

/* Mess with the Zip file */
$zip = new ZipArchive;
if ($zip->open(FILEPATH_ZIPFILE) === TRUE) {

/* Fails to delete */
$r1 = $zip->deleteName('EmptyDirectory');

/* Successful delete (note the appended '/' */
$r2 = $zip->deleteName('EmptyDirectory/');

/* Fails to delete */
$r3 = $zip->deleteName('FullDirectory');

/* Fails to delete, although returns true */
$r4 = $zip->deleteName('FullDirectory/');

$zip->close();
}

/* Display the Zip file contents */
$zip = new ZipArchive;
if ($zip->open(FILEPATH_ZIPFILE) === TRUE) {

echo 'File count: ', $zip->numFiles, PHP_EOL;
echo 'Status: ', $zip->status, PHP_EOL;

for ($i = 0; $i < $zip->numFiles; $i++) {
$stat = $zip->statIndex($i);
echo 'Index: ', $i, ' ', $stat['name'], PHP_EOL;
}

$zip->close();
}

var_dump(
array('r1' => $r1, 'r2' => $r2, 'r3' => $r3, 'r4' => $r4)
);

Returns:

File count: 3
Status: 0
Index: 0 foo.txt
Index: 1 bar.txt
Index: 2 FullDirectory/baz.txt
array(4) {
  ["r1"]=>
  bool(false)
  ["r2"]=>
  bool(true)
  ["r3"]=>
  bool(false)
  ["r4"]=>
  bool(true)
}


[2010-05-19 09:43:27] nuabaranda at web dot de

Description:

When trying to delete a non-empty directory in a ZIP file with deleteName() the 
function will return True and not delete the directory if it is not empty. 
Expectation would be to return False if the directory can not be deleted.

Also the directory handling should be better documentated (usage of trailing 
slashes, examples).

Test script:
---
$zip = new ZipArchive;
if( $zip->open('archive.zip', ZipArchive::CREATE) ) {
  $zip->addEmptyDir('folder');
  $zip->addFile('folder/file.txt');
  if( ! $zip->deleteName('folder/') ) {
echo 'Should end up here if folder not deletable';
  }
}
$zip->close();

Expected result:

Should echo.

Actual result:
--
Will not echo.






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


Req #14640 [Com]: Support "{@$foo}" and "{@$foo['bar']}" syntax

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

 ID: 14640
 Comment by: lijingyan922 at gmail dot com
 Reported by:mfischer at guru dot josefine dot at
 Summary:Support "{@$foo}" and "{@$foo['bar']}" syntax
 Status: Wont fix
 Type:   Feature/Change Request
 Package:Scripting Engine problem
 Operating System:   Any
 PHP Version:4.1.0
 Block user comment: N
 Private report: N

 New Comment:

Your blog is very informative and useful. You have written it very well. I have 
bookmarked your blog. Your blog written in very good, I like it very much, I 
will 
often come to.Thank you to let me see your blog, I love you blog style, very 
cool.Your blog too good, I will soon come back again, to keep at it.Your 
website 
is very beautiful, you do something great!!Your essay is good, I like it very 
much. Excellent Blog! I really admire your thinking and the way you have put 
these 
information in this post.


Previous Comments:

[2010-12-29 11:59:44] j...@php.net

Hell no, rather get rid of @ altogether.


[2003-08-11 16:10:48] destes at ix dot netcom dot com

what sorts of errors aren't being suppressed now?  If the variable doesn't 
exist, nothing is output, and in a function context, FALSE is returned.  I 
don't see the need... perhaps you could explain it?


[2001-12-21 08:21:43] mfischer at guru dot josefine dot at

$ php -q


Parse error:  parse error, expecting `T_STRING' or `T_VARIABLE' or 
`T_NUM_STRING' in - on line 2
-(2) : Parse error - parse error, expecting `T_STRING' or `T_VARIABLE' or 
`T_NUM_STRING'

$ php -q


Warning:  Undefined variable:  foo in - on line 2
-(2) : Warning - Undefined variable:  foo
{@}

Would be nice to support the @ operator in those cases too.





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


Bug #62123 [Opn->Nab]: Foreach changes the internal pointer of the array strangely

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

 ID: 62123
 Updated by: larue...@php.net
 Reported by:a dot protaskin at gmail dot com
 Summary:Foreach changes the internal pointer of the array
 strangely
-Status: Open
+Status: Not a bug
 Type:   Bug
 Package:Arrays related
 Operating System:   Linux
 PHP Version:5.4.3
 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




Previous Comments:

[2012-05-23 23:59:53] a dot protaskin at gmail dot com

Thanks for your answer, nikic. I understood this behaviour, this is not the bug.


[2012-05-23 21:54:57] ni...@php.net

See http://stackoverflow.com/a/8263425/385378 for an explanation.


[2012-05-23 13:23:38] a dot protaskin at gmail dot com

Description:

Traversing the array changes once the internal pointer by 1.
Traversing the array by link changes the internal pointer just as with each().

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


Req #62132 [Opn]: Do not keep last element treated by foreach referenced

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

 ID: 62132
 Updated by: larue...@php.net
 Reported by:chealer at gmail dot com
 Summary:Do not keep last element treated by foreach
 referenced
 Status: Open
 Type:   Feature/Change Request
 Package:Scripting Engine problem
 PHP Version:5.4.3
 Block user comment: N
 Private report: N

 New Comment:

this is more about a wrong usage, fix this will introduce a big bc break.


Previous Comments:

[2012-05-24 01:04:00] chealer at gmail dot com

Description:

As explained on http://ca.php.net/manual/en/control-structures.foreach.php :

Warning

Reference of a $value and the last array element remain even after the foreach 
loop. It is recommended to destroy it by unset().


In my opinion, PHP shouldn't keep the last element referenced by default, but 
at least, please provide a syntax which will not keep it. The current situation 
causes bugs like:
https://bugs.php.net/bug.php?id=29992
https://bugs.php.net/bug.php?id=40654
https://bugs.php.net/bug.php?id=47388
https://bugs.php.net/bug.php?id=49386
https://bugs.php.net/bug.php?id=50485
https://bugs.php.net/bug.php?id=54189

ahar...@php.net pointed out that this problem was already discussed (see 
https://bugs.php.net/bug.php?id=60024 ).







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


Bug #62129 [Opn]: rfc1867 crashes php even though turned off

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

 ID: 62129
 Updated by: larue...@php.net
 Reported by:truth at proposaltech dot com
 Summary:rfc1867 crashes php even though turned off
 Status: Open
 Type:   Bug
 Package:Session related
 Operating System:   CentOS
 PHP Version:5.4.3
 Block user comment: N
 Private report: N

 New Comment:

yes, the codes seems suspicious,  maybe iliaa can look into this :)

diff --git a/ext/session/session.c b/ext/session/session.c
index 7a8199d..851e4ea 100644
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@ -2384,13 +2384,14 @@ static int php_session_rfc1867_callback(unsigned int 
event, void *event_data, vo
php_session_rfc1867_progress *progress;
int retval = SUCCESS;
 
-   if (php_session_rfc1867_orig_callback) {
-   retval = php_session_rfc1867_orig_callback(event, event_data, 
extra TSRMLS_CC);
-   }
if (!PS(rfc1867_enabled)) {
return retval;
}
 
+   if (php_session_rfc1867_orig_callback) {
+   retval = php_session_rfc1867_orig_callback(event, event_data, 
extra TSRMLS_CC);
+   }
+
progress = PS(rfc1867_progress);
 
switch(event) {


Previous Comments:

[2012-05-23 18:16:01] truth at proposaltech dot com

Description:

php_session_rfc1867_callback() tries to call 
php_session_rfc1867_orig_callback() even if the rfc1867 feature is not enabled. 
 Switching the order of the opening "if" blocks fixes the problem.  (The second 
"if" block immediately returns success if the feature isn't enabled and the 
first "if" block tries to call the callback.  This is all around line 2388 of 
session.c.)

I upgraded from 5.3.3 to 5.4.3 and apache was segfaulting.  I produced a core 
and the debugger showed infinite recursion in php_session_rfc1867_callback().  
There are probably deeper problems here, but at the least the feature shouldn't 
cause problems if it is turned off.

In any case, even if something about my configuration is less than ideal, seg 
faults are Bad Thing.

Test script:
---
Apparently, my code wasn't executed.  I tried using Xdebug, but it didn't 
report anything.  dump_bt didn't return anything in the debugger.

Expected result:

I expected my code to be executed normally.

Actual result:
--
apache seg faulted






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


Bug #51557 [Com]: timelib_timezone_lookup has invalid DST entries, breaks strtotime

2012-05-23 Thread kavi at postpro dot net
Edit report at https://bugs.php.net/bug.php?id=51557&edit=1

 ID: 51557
 Comment by: kavi at postpro dot net
 Reported by:a3297627 at owlpic dot com
 Summary:timelib_timezone_lookup has invalid DST entries,
 breaks strtotime
 Status: Assigned
 Type:   Bug
 Package:Date/time related
 Operating System:   Linux
 PHP Version:5.2.13
 Assigned To:derick
 Block user comment: N
 Private report: N

 New Comment:

Is this actually a dupe of https://bugs.php.net/bug.php?id=62130  ???

Anyway, I updated the test a bit for 2012 (the original didn't include the year 
in the second pair of tzconvert calls) and put the date in June to very clearly 
avoid DST boundaries.


setTimeZone (new DateTimeZone ($timezone));
echo "Input: $time\nConverted: " . $dt->format ('l, M d g:ia T') . "\n";
}

tzconvert("Tuesday, June 15 2010 12:00am EDT", "KST");
tzconvert("Tuesday, June 15 2010 12:00am EDT", "KDT");
tzconvert("Tuesday, June 15 2010 1:00pm KST", "EDT");
tzconvert("Tuesday, June 15 2010 1:00pm KDT", "EDT");

setTimeZone (new DateTimeZone ($timezone));
echo "Input: $time\nConverted: " . $dt->format ('l, M d g:ia T') . "\n";
}

tzconvert("Tuesday, June 15 2010 12:00am EDT", "KST");
tzconvert("Tuesday, June 15 2010 12:00am EDT", "KDT");
tzconvert("Tuesday, June 15 2010 1:00pm KST", "EDT");
tzconvert("Tuesday, June 15 2010 1:00pm KDT", "EDT");


Input: Tue, 15 Jun 2010 04:00:00 +
Converted: Tuesday, Jun 15 1:00pm KST
Input: Tue, 15 Jun 2010 04:00:00 +
Converted: Tuesday, Jun 15 1:00pm KST
Input: Tue, 15 Jun 2010 05:00:00 +
Converted: Tuesday, Jun 15 1:00am EDT
Input: Tue, 15 Jun 2010 04:00:00 +
Converted: Tuesday, Jun 15 12:00am EDT


The actual problem really seems like bug #62130, but with an argument provided 
to the DateTime constructor as a DateTimeZone, not in the time string itself.


Previous Comments:

[2010-04-15 06:19:30] a3297627 at owlpic dot com

Copy/paste error, the test output should read:

Expected result:

Input: Thu, 15 Apr 2010 04:00:00 +
Converted: Thursday, Apr 15 1:00pm KST
Input: Thu, 15 Apr 2010 04:00:00 +
Converted: Thursday, Apr 15 1:00pm KST
Input: Thu, 15 Apr 2010 05:00:00 +
Converted: Thursday, Apr 15 12:00am EDT
Input: Thu, 15 Apr 2010 04:00:00 +
Converted: Thursday, Apr 15 12:00am EDT

Actual Result:
Input: Thu, 15 Apr 2010 04:00:00 +
Converted: Thursday, Apr 15 1:00pm KST
Input: Thu, 15 Apr 2010 04:00:00 +
Converted: Thursday, Apr 15 1:00pm KST
Input: Thu, 15 Apr 2010 05:00:00 +
Converted: Thursday, Apr 15 1:00am EDT
Input: Thu, 15 Apr 2010 04:00:00 +
Converted: Thursday, Apr 15 12:00am EDT


[2010-04-15 06:17:07] a3297627 at owlpic dot com

Description:

It seems timezonemap.h was generated by a tzdata parser that unfortunately did 
not include information on the years Daylight Saving Time was in use. In 
particular, in South Korea, there is no DST, yet there exists KST/KDT 
distinction in strtotime that thinks KDT is currently active, with 
inconsistencies with other date/time functions.

Test script:
---
setTimeZone (new DateTimeZone ($timezone));
echo "Input: $time\nConverted: " . $dt->format ('l, M d g:ia T') . "\n";
}

tzconvert ("Thursday, April 15 2010 12:00am EDT", "KST");
tzconvert ("Thursday, April 15 2010 12:00am EDT", "KDT");

tzconvert ("Thursday, Apr 15 1:00pm KST", "EDT");
tzconvert ("Thursday, Apr 15 1:00pm KDT", "EDT");
?>


Expected result:

Input: Thu, 15 Apr 2010 04:00:00 +
Converted: Thursday, Apr 15 1:00pm KST
Input: Thu, 15 Apr 2010 04:00:00 +
Converted: Thursday, Apr 15 1:00pm KST
Input: Thu, 15 Apr 2010 05:00:00 +
Converted: Thursday, Apr 15 1:00am EDT
Input: Thu, 15 Apr 2010 04:00:00 +
Converted: Thursday, Apr 15 12:00am EDT


Actual result:
--
Input: Thu, 15 Apr 2010 04:00:00 +
Converted: Thursday, Apr 15 1:00pm KST
Input: Thu, 15 Apr 2010 04:00:00 +
Converted: Thursday, Apr 15 1:00pm KST
Input: Thu, 15 Apr 2010 05:00:00 +
Converted: Thursday, Apr 15 1:00am EDT
Input: Thu, 15 Apr 2010 04:00:00 +
Converted: Thursday, Apr 15 1:00am EDT







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


[PHP-BUG] Req #62132 [NEW]: Do not keep last element treated by foreach referenced

2012-05-23 Thread chealer at gmail dot com
From: chealer at gmail dot com
Operating system: 
PHP version:  5.4.3
Package:  Scripting Engine problem
Bug Type: Feature/Change Request
Bug description:Do not keep last element treated by foreach referenced

Description:

As explained on http://ca.php.net/manual/en/control-structures.foreach.php
:

Warning

Reference of a $value and the last array element remain even after the
foreach loop. It is recommended to destroy it by unset().


In my opinion, PHP shouldn't keep the last element referenced by default,
but at least, please provide a syntax which will not keep it. The current
situation causes bugs like:
https://bugs.php.net/bug.php?id=29992
https://bugs.php.net/bug.php?id=40654
https://bugs.php.net/bug.php?id=47388
https://bugs.php.net/bug.php?id=49386
https://bugs.php.net/bug.php?id=50485
https://bugs.php.net/bug.php?id=54189

ahar...@php.net pointed out that this problem was already discussed (see
https://bugs.php.net/bug.php?id=60024 ).


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



Bug #62110 [Com]: Foreach creates a copy of the array passed by value in function

2012-05-23 Thread a dot protaskin at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=62110&edit=1

 ID: 62110
 Comment by: a dot protaskin at gmail dot com
 Reported by:a dot protaskin at gmail dot com
 Summary:Foreach creates a copy of the array passed by value
 in function
 Status: Open
 Type:   Bug
 Package:Performance problem
 Operating System:   Arch Linux
 PHP Version:5.4.3
 Block user comment: N
 Private report: N

 New Comment:

Thanks for your answers, nikic. I read your answer in the neighbouring entry 
and your articles too. I understood this behaviour, this is not the bug.

Sorry for my bad english.


Previous Comments:

[2012-05-23 21:59:30] ni...@php.net

The foreach loop changes the internal array pointer. If the array zval wouldn't 
be separated the loop thus would thus affect he array which was passed by 
value, which is obviously not acceptable.


[2012-05-22 19:56:06] a dot protaskin at gmail dot com

Description:

I also tried to execute this code on PHP 5.3.13 and PHP 5.2.17 with same result.

All options are default.

Test script:
---
http://pastebin.com/caczCxuD

Expected result:

Start: 786432
Inner by_reference: 786432
Inner foreach: 786432
After by_reference: 786432
Inner by_value: 786432
Inner foreach: 786432
After by_value: 786432

Actual result:
--
Start: 786432
Inner by_reference: 786432
Inner foreach: 786432
After by_reference: 786432
Inner by_value: 786432
Inner foreach: 1310720
After by_value: 104857






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


Bug #62033 [Fbk->Asn]: php-fpm exits with status 0 on some failures to start

2012-05-23 Thread js at justinsamuel dot com
Edit report at https://bugs.php.net/bug.php?id=62033&edit=1

 ID: 62033
 User updated by:js at justinsamuel dot com
 Reported by:js at justinsamuel dot com
 Summary:php-fpm exits with status 0 on some failures to
 start
-Status: Feedback
+Status: Assigned
 Type:   Bug
 Package:FPM related
 Operating System:   Linux (Ubuntu 12.04)
 PHP Version:5.4.3
 Assigned To:fat
 Block user comment: N
 Private report: N

 New Comment:

I've tested this patch with the current PHP-5.3. The problem still persists. 

A quick look with strace makes it seem that a child process is exiting with the 
status that is expected from the patch (78) but its parent is not.

# rm -f /tmp/php-fpm.strace.*
# strace -o /tmp/php-fpm.strace -ff -f /opt/test/php5.3/sbin/php-fpm 
--fpm-config /root/php-test/fpm.conf 
[23-May-2012 18:54:57] ERROR: [pool example.com] cannot get uid for user 
'fakeuser'
[23-May-2012 18:54:57] ERROR: FPM initialization failed
# echo $?
0
# ll /tmp/php-fpm.strace.*
-rw-r--r-- 1 root root 25282 May 23 18:54 /tmp/php-fpm.strace.996
-rw-r--r-- 1 root root  4125 May 23 18:54 /tmp/php-fpm.strace.997
# grep -B 2 exit /tmp/php-fpm.strace.*
/tmp/php-fpm.strace.996-clone(child_stack=0, 
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, 
child_tidptr=0x7f2e60ff19d0) = 997
/tmp/php-fpm.strace.996-munmap(0x7f2e60f6, 323584)  = 0
/tmp/php-fpm.strace.996:exit_group(0)   = ?
--
/tmp/php-fpm.strace.997-write(3, "[23-May-2012 18:54:57] ERROR: FP"..., 56) = 56
/tmp/php-fpm.strace.997-write(2, "[23-May-2012 18:54:57] ERROR: FP"..., 56) = 56
/tmp/php-fpm.strace.997:exit_group(78)  = ?

Thanks,
Justin


Previous Comments:

[2012-05-23 22:51:57] f...@php.net

I've attached a real patch to this bug report.

Can you please test it ?

thx
++ Jerome


[2012-05-23 22:50:51] f...@php.net

The following patch has been added/updated:

Patch Name: bug62033.patch
Revision:   1337813451
URL:
https://bugs.php.net/patch-display.php?bug=62033&patch=bug62033.patch&revision=1337813451


[2012-05-23 22:10:59] f...@php.net

This is strange ...

can you please test the following patch and see if exit code is 42 on error ?


diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c
index 95a7623..62c1b69 100644
--- a/sapi/fpm/fpm/fpm_main.c
+++ b/sapi/fpm/fpm/fpm_main.c
@@ -1803,7 +1803,8 @@ consult the installation file that came with this 
distribution, or visit \n\
}

if (0 > fpm_init(argc, argv, fpm_config ? fpm_config : 
CGIG(fpm_config), 
fpm_prefix, fpm_pid, test_conf, php_allow_to_run_as_root)) {
-   return FAILURE;
+// return FAILURE;
+   exit(42);
}

fpm_is_running = 1;


thx
++ Jerome


[2012-05-23 20:54:11] js at justinsamuel dot com

For simplicity here I'm going to focus on 5.3 instead of 5.4.

I've tried with the following:
* compiled from source (php.net tarballs) on Ubuntu 12.04
* compiled from source (php.net tarballs) on Debian 6
* Ubuntu 12.04's current php5-fpm package
* CentOS 6 with current php53u-fpm package from IUS

Here's the -tt info:

# /opt/test/php5.3/sbin/php-fpm --fpm-config /etc/php-test/fpm.conf -tt
[23-May-2012 13:07:26] NOTICE: [General]
[23-May-2012 13:07:26] NOTICE:  pid = /var/run/php5.3-test.pid
[23-May-2012 13:07:26] NOTICE:  error_log = /var/log/php5.3-test.log
[23-May-2012 13:07:26] NOTICE:  syslog.ident = php-fpm
[23-May-2012 13:07:26] NOTICE:  syslog.facility = 24
[23-May-2012 13:07:26] NOTICE:  log_level = unknown value
[23-May-2012 13:07:26] NOTICE:  emergency_restart_interval = 0s
[23-May-2012 13:07:26] NOTICE:  emergency_restart_threshold = 0
[23-May-2012 13:07:26] NOTICE:  process_control_timeout = 0s
[23-May-2012 13:07:26] NOTICE:  process.max = 0
[23-May-2012 13:07:26] NOTICE:  daemonize = yes
[23-May-2012 13:07:26] NOTICE:  rlimit_files = 0
[23-May-2012 13:07:26] NOTICE:  rlimit_core = 0
[23-May-2012 13:07:26] NOTICE:  events.mechanism = epoll
[23-May-2012 13:07:26] NOTICE:  
[23-May-2012 13:07:26] NOTICE: [example.com]
[23-May-2012 13:07:26] NOTICE:  prefix = undefined
[23-May-2012 13:07:26] NOTICE:  user = fakeuser
[23-May-2012 13:07:26] NOTICE:  group = fakegroup
[23-May-2012 13:07:26] NOTICE:  listen = /tmp/php5.3-test.sock
[23-May-2012 13:07:26] NOTICE:  listen.backlog = 128
[23-May-2012 13:07:26] NOTICE:  listen.owner = root
[23-May-2012 13:07:26] NOTICE:  listen.group = root
[23-May-2012 13:07:26] NOTICE:  listen.mode = 0700
[23-May-2012 13:07:26] NOTICE:  listen.allowed_clients = undefined
[23-May-2012 13:07:26] NOTICE:  pm = ondemand
[23-May-

Bug #62123 [Com]: Foreach changes the internal pointer of the array strangely

2012-05-23 Thread a dot protaskin at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=62123&edit=1

 ID: 62123
 Comment by: a dot protaskin at gmail dot com
 Reported by:a dot protaskin at gmail dot com
 Summary:Foreach changes the internal pointer of the array
 strangely
 Status: Open
 Type:   Bug
 Package:Arrays related
 Operating System:   Linux
 PHP Version:5.4.3
 Block user comment: N
 Private report: N

 New Comment:

Thanks for your answer, nikic. I understood this behaviour, this is not the bug.


Previous Comments:

[2012-05-23 21:54:57] ni...@php.net

See http://stackoverflow.com/a/8263425/385378 for an explanation.


[2012-05-23 13:23:38] a dot protaskin at gmail dot com

Description:

Traversing the array changes once the internal pointer by 1.
Traversing the array by link changes the internal pointer just as with each().

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


Bug #22488 [Opn->Csd]: Permission denied for unlink() , copy(), rename(), move_uploaded_file() FAT32

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

 ID: 22488
 Updated by: fel...@php.net
 Reported by:ajes2kemais at gmail dot com
 Summary:Permission denied for unlink() , copy(), rename(),
 move_uploaded_file()  FAT32
-Status: Open
+Status: Closed
 Type:   Bug
 Package:*General Issues
 Operating System:   Windows NT 4.0 SP6
 PHP Version:4.2.3
-Assigned To:
+Assigned To:felipe
 Block user comment: N
 Private report: N



Previous Comments:

[2003-03-17 10:19:48] kemal at thelimelight dot nl

*** Still more info:

Microsoft acknowledge this problem (caching of objects requested via FTP/HTTP) 
affecting IIS 4.0. See for example:
http://support.microsoft.com/default.aspx?scid=KB;en-us;q184956
http://support.microsoft.com/default.aspx?scid=kb;en-us;191742
http://support.microsoft.com/default.aspx?scid=kb;EN-US;182626

Suggested workarounds:
a) Disable IIS caching (registry change)
b) Lowers caching time (registry change)
c) Wait ~30 seconds in a loop while overwriting file (script change)
d) Use copy() instead of move_uploaded_file() (script change). It appears that 
copy() has less problem than other methods.


[2003-03-02 05:18:33] w...@php.net

Not a bug in PHP; PHP cannot write to a file that is in use; it is your 
responsibility to work around this problem with IIS in your script.

As a suggestion, you could try adding a 2 second sleep before attempting to 
move the file; this should allow enough time for the OS to decide that the 
access is OK.



[2003-03-02 03:49:28] kemal at thelimelight dot nl

 New Discovery: the 'permission denied' problem outlined above only 
manifests itself when the existing file to be overwriten has just been recently 
accessed by IIS (ie the image file has been very recently requested by a HTML 
page).  

Eliminating the line which contains the  tag in the sample script 
above results in perfect running of the script.

Conclusion: any attempt to overwrite the file was denied by the OS (NT4 in my 
case) because the file was marked "in-use". It should not have been so, because 
the file is only accessed for a short time, and it happened a few minutes 
before. I don't know whether this is an IIS bug or PHP bug.


[2003-03-01 20:06:07] kemal at thelimelight dot nl

 Additional test done with PHP 4.3.2-dev (build date Mar 2 2003 02:16:38): 
same result as with previous versions.


[2003-03-01 11:36:26] w...@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip






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=22488


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


Bug #22488 [Csd->Opn]: Permission denied for unlink() , copy(), rename(), move_uploaded_file() FAT32

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

 ID: 22488
 Updated by: fel...@php.net
 Reported by:ajes2kemais at gmail dot com
 Summary:Permission denied for unlink() , copy(), rename(),
 move_uploaded_file()  FAT32
-Status: Closed
+Status: Open
 Type:   Bug
 Package:*General Issues
 Operating System:   Windows NT 4.0 SP6
 PHP Version:4.2.3
 Block user comment: N
 Private report: N



Previous Comments:

[2012-05-18 14:25:00] ajes2kemais at gmail dot com

wordless telegram freight crossroads mullioned shocking signaler footage 
arrange waterborne allude maltreat aggrandizement forrader web md reverence 
cookout telephotograph tragedy append conference chart classy nimble defoliate 
unification farm cybernetics penmanship housemother marinade field peradventure 
horrify ineligible unquote document northwards lawless sumptuous isinglass 
peerless corny fortify retrogress livestock hack mite confound streamlined  http://www.partydressuk.com>party dresses uk   boardroom toothache 
trader avail embody gazelle naked alkali duds distinction topcoat nonresident 
signatory haberdasher already delta thirtennths inject unserviceable etymology 
tough modification principal medal wheedle floor astigmatic tranquilliser 
wheeze watercolour piffle cube it militarize thrown earring pink ukulele plaque 
cannot pint subjective unaccustomed geranium fidgety bookstall ranch inexact 
tiddley stipulate brown voluntary crosswise antiknock harm describe racket polo 
fad psaltery  
http://www.partydressuk.com>party dress uk   spotted pail goof 
pointer amendment bookkeeping muggy tallyman mezzanine contemporaneous 
petrochemical petrel actuate eightieth politburo underbelly indigo thought 
miscegenation keep lemming disillusioned bloc gay mnemonics meringue 
weathercock woodsman approach palatalize entreat firefox undercut monosyllable 
amidships fugue panache shear point tuneful study spelt antihistamine write 
tack unassuming lamppost incumbent clarion uptown reticence nearsighted welkin 
overthrown saloon scow oblation hush contrived primacy   http://www.partydressuk.com>www.partydressuk.com   women's purple 
dress home party clothing dresses swing checked dress couture wedding gowns 
lori prom dresses wedding dresses for second marriages wedding dress sweet 
sixteen gowns halter bridal gown prom dresses plus ever pretty dresses 
liverpool prom dresses discount designer wedding gown prom dresses 2001 all 
white dress short polka dot prom dresses jackets for dresses boob dress 
maternity shops ireland nylon dresses amber rose prom dresses dress line formal 
petite dresses junior prom gowns jeweled headband prom dresses lavender pink 
wedding gown torent malaya bee darlin prom wedding dresses over 40 cut out 
dress dresses beaded sunflower dresses shimmery dresses ladies dress clothes 
alfred angelo prom dresses dress leather gloves dress code london designer 
dresses oscars aria prom dresses paterns for prom dresses quality dress shirts 
brides maid dress prom gowns and dresses cachet mother of bride bridal hair pin 
jocuri noi barbie dress up anime dress games custom dress shirt plus sizes 
dress dyeables grace pants for weddings purple halter dress canadian profile 
dresses jocuri dress up barbie prom dress online dresses size 0 prom dresses 
monsoon eden wedding gowns modest bridal dresses wedding sale vintage style 
wedding gown black strapless dress middle school prom dresses casual strapless 
dresses cheap funky clothing beautiful wedding gowns clearance evening gowns 
high end flower girl dresses bridal embellishments shift dresses dress with 
sleeves wedding photographers in new jersey unique designer wedding gown 
wedding favors japanese dress in nyc custom bridal gown princesa prom dresses 
ottawa prom dress


[2003-03-17 10:19:48] kemal at thelimelight dot nl

*** Still more info:

Microsoft acknowledge this problem (caching of objects requested via FTP/HTTP) 
affecting IIS 4.0. See for example:
http://support.microsoft.com/default.aspx?scid=KB;en-us;q184956
http://support.microsoft.com/default.aspx?scid=kb;en-us;191742
http://support.microsoft.com/default.aspx?scid=kb;EN-US;182626

Suggested workarounds:
a) Disable IIS caching (registry change)
b) Lowers caching time (registry change)
c) Wait ~30 seconds in a loop while overwriting file (script change)
d) Use copy() instead of move_uploaded_file() (script change). It appears that 
copy() has less problem than other methods.


[2003-03-02 05:18:33] w...@php.net

Not a bug in PHP; PHP cannot write to a file that is in use; it is your 
responsibility to work around this problem with IIS in your script.

As a sugges

Bug #62033 [Ana->Fbk]: php-fpm exits with status 0 on some failures to start

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

 ID: 62033
 Updated by: f...@php.net
 Reported by:js at justinsamuel dot com
 Summary:php-fpm exits with status 0 on some failures to
 start
-Status: Analyzed
+Status: Feedback
 Type:   Bug
 Package:FPM related
 Operating System:   Linux (Ubuntu 12.04)
 PHP Version:5.4.3
 Assigned To:fat
 Block user comment: N
 Private report: N

 New Comment:

I've attached a real patch to this bug report.

Can you please test it ?

thx
++ Jerome


Previous Comments:

[2012-05-23 22:50:51] f...@php.net

The following patch has been added/updated:

Patch Name: bug62033.patch
Revision:   1337813451
URL:
https://bugs.php.net/patch-display.php?bug=62033&patch=bug62033.patch&revision=1337813451


[2012-05-23 22:10:59] f...@php.net

This is strange ...

can you please test the following patch and see if exit code is 42 on error ?


diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c
index 95a7623..62c1b69 100644
--- a/sapi/fpm/fpm/fpm_main.c
+++ b/sapi/fpm/fpm/fpm_main.c
@@ -1803,7 +1803,8 @@ consult the installation file that came with this 
distribution, or visit \n\
}

if (0 > fpm_init(argc, argv, fpm_config ? fpm_config : 
CGIG(fpm_config), 
fpm_prefix, fpm_pid, test_conf, php_allow_to_run_as_root)) {
-   return FAILURE;
+// return FAILURE;
+   exit(42);
}

fpm_is_running = 1;


thx
++ Jerome


[2012-05-23 20:54:11] js at justinsamuel dot com

For simplicity here I'm going to focus on 5.3 instead of 5.4.

I've tried with the following:
* compiled from source (php.net tarballs) on Ubuntu 12.04
* compiled from source (php.net tarballs) on Debian 6
* Ubuntu 12.04's current php5-fpm package
* CentOS 6 with current php53u-fpm package from IUS

Here's the -tt info:

# /opt/test/php5.3/sbin/php-fpm --fpm-config /etc/php-test/fpm.conf -tt
[23-May-2012 13:07:26] NOTICE: [General]
[23-May-2012 13:07:26] NOTICE:  pid = /var/run/php5.3-test.pid
[23-May-2012 13:07:26] NOTICE:  error_log = /var/log/php5.3-test.log
[23-May-2012 13:07:26] NOTICE:  syslog.ident = php-fpm
[23-May-2012 13:07:26] NOTICE:  syslog.facility = 24
[23-May-2012 13:07:26] NOTICE:  log_level = unknown value
[23-May-2012 13:07:26] NOTICE:  emergency_restart_interval = 0s
[23-May-2012 13:07:26] NOTICE:  emergency_restart_threshold = 0
[23-May-2012 13:07:26] NOTICE:  process_control_timeout = 0s
[23-May-2012 13:07:26] NOTICE:  process.max = 0
[23-May-2012 13:07:26] NOTICE:  daemonize = yes
[23-May-2012 13:07:26] NOTICE:  rlimit_files = 0
[23-May-2012 13:07:26] NOTICE:  rlimit_core = 0
[23-May-2012 13:07:26] NOTICE:  events.mechanism = epoll
[23-May-2012 13:07:26] NOTICE:  
[23-May-2012 13:07:26] NOTICE: [example.com]
[23-May-2012 13:07:26] NOTICE:  prefix = undefined
[23-May-2012 13:07:26] NOTICE:  user = fakeuser
[23-May-2012 13:07:26] NOTICE:  group = fakegroup
[23-May-2012 13:07:26] NOTICE:  listen = /tmp/php5.3-test.sock
[23-May-2012 13:07:26] NOTICE:  listen.backlog = 128
[23-May-2012 13:07:26] NOTICE:  listen.owner = root
[23-May-2012 13:07:26] NOTICE:  listen.group = root
[23-May-2012 13:07:26] NOTICE:  listen.mode = 0700
[23-May-2012 13:07:26] NOTICE:  listen.allowed_clients = undefined
[23-May-2012 13:07:26] NOTICE:  pm = ondemand
[23-May-2012 13:07:26] NOTICE:  pm.max_children = 1
[23-May-2012 13:07:26] NOTICE:  pm.start_servers = 0
[23-May-2012 13:07:26] NOTICE:  pm.min_spare_servers = 0
[23-May-2012 13:07:26] NOTICE:  pm.max_spare_servers = 0
[23-May-2012 13:07:26] NOTICE:  pm.process_idle_timeout = 10
[23-May-2012 13:07:26] NOTICE:  pm.max_requests = 0
[23-May-2012 13:07:26] NOTICE:  pm.status_path = undefined
[23-May-2012 13:07:26] NOTICE:  ping.path = undefined
[23-May-2012 13:07:26] NOTICE:  ping.response = undefined
[23-May-2012 13:07:26] NOTICE:  access.log = undefined
[23-May-2012 13:07:26] NOTICE:  access.format = undefined
[23-May-2012 13:07:26] NOTICE:  slowlog = undefined
[23-May-2012 13:07:26] NOTICE:  request_slowlog_timeout = 0s
[23-May-2012 13:07:26] NOTICE:  request_terminate_timeout = 0s
[23-May-2012 13:07:26] NOTICE:  rlimit_files = 0
[23-May-2012 13:07:26] NOTICE:  rlimit_core = 0
[23-May-2012 13:07:26] NOTICE:  chroot = undefined
[23-May-2012 13:07:26] NOTICE:  chdir = undefined
[23-May-2012 13:07:26] NOTICE:  catch_workers_output = no
[23-May-2012 13:07:26] NOTICE:  security.limit_extensions = .php .phar
[23-May-2012 13:07:26] NOTICE:  
[23-May-2012 13:07:26] NOTICE: configuration file /etc/php-test/fpm.conf test 
is successful

Here's the version info for builds I've repeated this problem with. I haven't 
had any builds not show show this problem yet.

Bug #62033 [Fbk->Ana]: php-fpm exits with status 0 on some failures to start

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

 ID: 62033
 Updated by: f...@php.net
 Reported by:js at justinsamuel dot com
 Summary:php-fpm exits with status 0 on some failures to
 start
-Status: Feedback
+Status: Analyzed
 Type:   Bug
 Package:FPM related
 Operating System:   Linux (Ubuntu 12.04)
 PHP Version:5.4.3
 Assigned To:fat
 Block user comment: N
 Private report: N



Previous Comments:

[2012-05-23 22:50:51] f...@php.net

The following patch has been added/updated:

Patch Name: bug62033.patch
Revision:   1337813451
URL:
https://bugs.php.net/patch-display.php?bug=62033&patch=bug62033.patch&revision=1337813451


[2012-05-23 22:10:59] f...@php.net

This is strange ...

can you please test the following patch and see if exit code is 42 on error ?


diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c
index 95a7623..62c1b69 100644
--- a/sapi/fpm/fpm/fpm_main.c
+++ b/sapi/fpm/fpm/fpm_main.c
@@ -1803,7 +1803,8 @@ consult the installation file that came with this 
distribution, or visit \n\
}

if (0 > fpm_init(argc, argv, fpm_config ? fpm_config : 
CGIG(fpm_config), 
fpm_prefix, fpm_pid, test_conf, php_allow_to_run_as_root)) {
-   return FAILURE;
+// return FAILURE;
+   exit(42);
}

fpm_is_running = 1;


thx
++ Jerome


[2012-05-23 20:54:11] js at justinsamuel dot com

For simplicity here I'm going to focus on 5.3 instead of 5.4.

I've tried with the following:
* compiled from source (php.net tarballs) on Ubuntu 12.04
* compiled from source (php.net tarballs) on Debian 6
* Ubuntu 12.04's current php5-fpm package
* CentOS 6 with current php53u-fpm package from IUS

Here's the -tt info:

# /opt/test/php5.3/sbin/php-fpm --fpm-config /etc/php-test/fpm.conf -tt
[23-May-2012 13:07:26] NOTICE: [General]
[23-May-2012 13:07:26] NOTICE:  pid = /var/run/php5.3-test.pid
[23-May-2012 13:07:26] NOTICE:  error_log = /var/log/php5.3-test.log
[23-May-2012 13:07:26] NOTICE:  syslog.ident = php-fpm
[23-May-2012 13:07:26] NOTICE:  syslog.facility = 24
[23-May-2012 13:07:26] NOTICE:  log_level = unknown value
[23-May-2012 13:07:26] NOTICE:  emergency_restart_interval = 0s
[23-May-2012 13:07:26] NOTICE:  emergency_restart_threshold = 0
[23-May-2012 13:07:26] NOTICE:  process_control_timeout = 0s
[23-May-2012 13:07:26] NOTICE:  process.max = 0
[23-May-2012 13:07:26] NOTICE:  daemonize = yes
[23-May-2012 13:07:26] NOTICE:  rlimit_files = 0
[23-May-2012 13:07:26] NOTICE:  rlimit_core = 0
[23-May-2012 13:07:26] NOTICE:  events.mechanism = epoll
[23-May-2012 13:07:26] NOTICE:  
[23-May-2012 13:07:26] NOTICE: [example.com]
[23-May-2012 13:07:26] NOTICE:  prefix = undefined
[23-May-2012 13:07:26] NOTICE:  user = fakeuser
[23-May-2012 13:07:26] NOTICE:  group = fakegroup
[23-May-2012 13:07:26] NOTICE:  listen = /tmp/php5.3-test.sock
[23-May-2012 13:07:26] NOTICE:  listen.backlog = 128
[23-May-2012 13:07:26] NOTICE:  listen.owner = root
[23-May-2012 13:07:26] NOTICE:  listen.group = root
[23-May-2012 13:07:26] NOTICE:  listen.mode = 0700
[23-May-2012 13:07:26] NOTICE:  listen.allowed_clients = undefined
[23-May-2012 13:07:26] NOTICE:  pm = ondemand
[23-May-2012 13:07:26] NOTICE:  pm.max_children = 1
[23-May-2012 13:07:26] NOTICE:  pm.start_servers = 0
[23-May-2012 13:07:26] NOTICE:  pm.min_spare_servers = 0
[23-May-2012 13:07:26] NOTICE:  pm.max_spare_servers = 0
[23-May-2012 13:07:26] NOTICE:  pm.process_idle_timeout = 10
[23-May-2012 13:07:26] NOTICE:  pm.max_requests = 0
[23-May-2012 13:07:26] NOTICE:  pm.status_path = undefined
[23-May-2012 13:07:26] NOTICE:  ping.path = undefined
[23-May-2012 13:07:26] NOTICE:  ping.response = undefined
[23-May-2012 13:07:26] NOTICE:  access.log = undefined
[23-May-2012 13:07:26] NOTICE:  access.format = undefined
[23-May-2012 13:07:26] NOTICE:  slowlog = undefined
[23-May-2012 13:07:26] NOTICE:  request_slowlog_timeout = 0s
[23-May-2012 13:07:26] NOTICE:  request_terminate_timeout = 0s
[23-May-2012 13:07:26] NOTICE:  rlimit_files = 0
[23-May-2012 13:07:26] NOTICE:  rlimit_core = 0
[23-May-2012 13:07:26] NOTICE:  chroot = undefined
[23-May-2012 13:07:26] NOTICE:  chdir = undefined
[23-May-2012 13:07:26] NOTICE:  catch_workers_output = no
[23-May-2012 13:07:26] NOTICE:  security.limit_extensions = .php .phar
[23-May-2012 13:07:26] NOTICE:  
[23-May-2012 13:07:26] NOTICE: configuration file /etc/php-test/fpm.conf test 
is successful

Here's the version info for builds I've repeated this problem with. I haven't 
had any builds not show show this problem yet.

## on Ubuntu 12.04, built from source
# /opt/test/php5.3/sbin/php-fpm --version
PHP 5.3.13 (fpm-fcgi)

Bug #62033 [PATCH]: php-fpm exits with status 0 on some failures to start

2012-05-23 Thread f...@php.net
Edit report at https://bugs.php.net/bug.php?id=62033&edit=1

 ID: 62033
 Patch added by: f...@php.net
 Reported by:js at justinsamuel dot com
 Summary:php-fpm exits with status 0 on some failures to
 start
 Status: Feedback
 Type:   Bug
 Package:FPM related
 Operating System:   Linux (Ubuntu 12.04)
 PHP Version:5.4.3
 Assigned To:fat
 Block user comment: N
 Private report: N

 New Comment:

The following patch has been added/updated:

Patch Name: bug62033.patch
Revision:   1337813451
URL:
https://bugs.php.net/patch-display.php?bug=62033&patch=bug62033.patch&revision=1337813451


Previous Comments:

[2012-05-23 22:10:59] f...@php.net

This is strange ...

can you please test the following patch and see if exit code is 42 on error ?


diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c
index 95a7623..62c1b69 100644
--- a/sapi/fpm/fpm/fpm_main.c
+++ b/sapi/fpm/fpm/fpm_main.c
@@ -1803,7 +1803,8 @@ consult the installation file that came with this 
distribution, or visit \n\
}

if (0 > fpm_init(argc, argv, fpm_config ? fpm_config : 
CGIG(fpm_config), 
fpm_prefix, fpm_pid, test_conf, php_allow_to_run_as_root)) {
-   return FAILURE;
+// return FAILURE;
+   exit(42);
}

fpm_is_running = 1;


thx
++ Jerome


[2012-05-23 20:54:11] js at justinsamuel dot com

For simplicity here I'm going to focus on 5.3 instead of 5.4.

I've tried with the following:
* compiled from source (php.net tarballs) on Ubuntu 12.04
* compiled from source (php.net tarballs) on Debian 6
* Ubuntu 12.04's current php5-fpm package
* CentOS 6 with current php53u-fpm package from IUS

Here's the -tt info:

# /opt/test/php5.3/sbin/php-fpm --fpm-config /etc/php-test/fpm.conf -tt
[23-May-2012 13:07:26] NOTICE: [General]
[23-May-2012 13:07:26] NOTICE:  pid = /var/run/php5.3-test.pid
[23-May-2012 13:07:26] NOTICE:  error_log = /var/log/php5.3-test.log
[23-May-2012 13:07:26] NOTICE:  syslog.ident = php-fpm
[23-May-2012 13:07:26] NOTICE:  syslog.facility = 24
[23-May-2012 13:07:26] NOTICE:  log_level = unknown value
[23-May-2012 13:07:26] NOTICE:  emergency_restart_interval = 0s
[23-May-2012 13:07:26] NOTICE:  emergency_restart_threshold = 0
[23-May-2012 13:07:26] NOTICE:  process_control_timeout = 0s
[23-May-2012 13:07:26] NOTICE:  process.max = 0
[23-May-2012 13:07:26] NOTICE:  daemonize = yes
[23-May-2012 13:07:26] NOTICE:  rlimit_files = 0
[23-May-2012 13:07:26] NOTICE:  rlimit_core = 0
[23-May-2012 13:07:26] NOTICE:  events.mechanism = epoll
[23-May-2012 13:07:26] NOTICE:  
[23-May-2012 13:07:26] NOTICE: [example.com]
[23-May-2012 13:07:26] NOTICE:  prefix = undefined
[23-May-2012 13:07:26] NOTICE:  user = fakeuser
[23-May-2012 13:07:26] NOTICE:  group = fakegroup
[23-May-2012 13:07:26] NOTICE:  listen = /tmp/php5.3-test.sock
[23-May-2012 13:07:26] NOTICE:  listen.backlog = 128
[23-May-2012 13:07:26] NOTICE:  listen.owner = root
[23-May-2012 13:07:26] NOTICE:  listen.group = root
[23-May-2012 13:07:26] NOTICE:  listen.mode = 0700
[23-May-2012 13:07:26] NOTICE:  listen.allowed_clients = undefined
[23-May-2012 13:07:26] NOTICE:  pm = ondemand
[23-May-2012 13:07:26] NOTICE:  pm.max_children = 1
[23-May-2012 13:07:26] NOTICE:  pm.start_servers = 0
[23-May-2012 13:07:26] NOTICE:  pm.min_spare_servers = 0
[23-May-2012 13:07:26] NOTICE:  pm.max_spare_servers = 0
[23-May-2012 13:07:26] NOTICE:  pm.process_idle_timeout = 10
[23-May-2012 13:07:26] NOTICE:  pm.max_requests = 0
[23-May-2012 13:07:26] NOTICE:  pm.status_path = undefined
[23-May-2012 13:07:26] NOTICE:  ping.path = undefined
[23-May-2012 13:07:26] NOTICE:  ping.response = undefined
[23-May-2012 13:07:26] NOTICE:  access.log = undefined
[23-May-2012 13:07:26] NOTICE:  access.format = undefined
[23-May-2012 13:07:26] NOTICE:  slowlog = undefined
[23-May-2012 13:07:26] NOTICE:  request_slowlog_timeout = 0s
[23-May-2012 13:07:26] NOTICE:  request_terminate_timeout = 0s
[23-May-2012 13:07:26] NOTICE:  rlimit_files = 0
[23-May-2012 13:07:26] NOTICE:  rlimit_core = 0
[23-May-2012 13:07:26] NOTICE:  chroot = undefined
[23-May-2012 13:07:26] NOTICE:  chdir = undefined
[23-May-2012 13:07:26] NOTICE:  catch_workers_output = no
[23-May-2012 13:07:26] NOTICE:  security.limit_extensions = .php .phar
[23-May-2012 13:07:26] NOTICE:  
[23-May-2012 13:07:26] NOTICE: configuration file /etc/php-test/fpm.conf test 
is successful

Here's the version info for builds I've repeated this problem with. I haven't 
had any builds not show show this problem yet.

## on Ubuntu 12.04, built from source
# /opt/test/php5.3/sbin/php-fpm --version
PHP 5.3.13 (fpm-fcgi) (built: May 23 2012 12:21:32)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technol

Bug #61558 [Fbk->Asn]: Runaway spawning of children after pipe error

2012-05-23 Thread phpbug2012 at tgabber dot mine dot nu
Edit report at https://bugs.php.net/bug.php?id=61558&edit=1

 ID: 61558
 User updated by:phpbug2012 at tgabber dot mine dot nu
 Reported by:phpbug2012 at tgabber dot mine dot nu
 Summary:Runaway spawning of children after pipe error
-Status: Feedback
+Status: Assigned
 Type:   Bug
 Package:FPM related
 Operating System:   Debian Linux
 PHP Version:5.3.10
 Assigned To:fat
 Block user comment: N
 Private report: N

 New Comment:

Hi,

The bug is not reproducible as such, however it has happened 3 more times with 
exactly the same symptoms, with uptimes for fpm varying from 2 days to 5 days. 
After this I changed the fpm pool configuration files to have 
catch_workers_output = no (I'd mistakenly thought that this had to be yes to 
have php errors logged to syslog) and the bug has not resurfaced so far 
(maximum uptime reached with this config 16 days).

I'm afraid I don't have anything else from the log files now other than what I 
included in the initial bug report. However I did thoroughly check the logs at 
the time and there were no other errors either from php or any other service.

There are no ulimits in force on the server and I doubt I ran out of file 
descriptors as checking /proc/sys/fs/file-nr just now shows only 2528 out of 
392117 used.

I'm reluctant to change the config back to gather more information on the bug 
as this is a production server and the bug if it hits has a severe impact. I do 
have a backup machine (with the same config) that I could experiment on, but 
without knowing exactly how to trigger the bug and no real-world load I don't 
know how useful that would be.


Previous Comments:

[2012-05-23 18:30:39] f...@php.net

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


Does the error happened again since (is it reproductible) ? If so, It would be 
great to have a stacktrace of the last segfault.

Do you still have the error log? I'd like to see what was just before and after 
the "Bad file descriptor" lines.

Do you have, by any chances, reached any ulimit limitations (like number of 
open 
files) ? This could maybe explain the "Bad file descriptor" error (but not the 
others errors)

If you have any clue on how to reproduce the problem, it would be very useful 
to 
fix what seems to be an important bug to me.

thx a lot


[2012-03-29 20:28:53] phpbug2012 at tgabber dot mine dot nu

Description:

Relevant software versions

Linux 2.6.32-5-amd64
Server Version: Apache/2.2.16 (Debian) DAV/2 mod_fastcgi/2.4.6
PHP Version 5.3.10-1~dotdeb.1
APC Version 3.1.9

Background

This is a lightly-loaded webserver running around 40 virtual hosts that 
experiences occasional traffic spikes. Around 20 virtual hosts use php and have 
one fpm pool each to run php under their own user, configured as ondemand so 
that they have no fpm processes running when they are not serving pages. 
Generally there are between 1 and 5 fpm processes running in total at any one 
time, rising to maybe 20 to 30 when a spike of traffic comes in.

Error

I became aware of the problem after a service monitor reported that websites 
were no longer being served. Checking, I found that that php-fpm had crashed. 
Time since the last restart of php-fpm when the error occured was about 2 days 
4 hours, with around 2.5million php requests served. The APC cache of 128Mb was 
about three-quarters full.

Looking back through the logs, this is what I found. The problem appears to 
start at 18:55:32 when php-fpm was unable to read a pipe. I have no idea what 
caused this initial error, looking back through other logs I could not see any 
abnormal web requests around this time.

Mar 24 18:55:32 banana php-fpm[21906]: [ERROR] unable to read what child say: 
Bad file descriptor (9)
Mar 24 18:55:32 banana php-fpm[21906]: [ERROR] unable to read what child say: 
Bad file descriptor (9)

There were no further fpm messages in the log until those shown below. This is 
the most worrying aspect of this bug as basically fpm seems to have gone into 
meltdown, continually spawning a process (and using almost all available cpu).


Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 9 exited 
with code 0 after 0.002001 seconds from start
Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 22230 started
Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 22230 exited 
with code 0 after 0.001790 seconds from start
Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 22231 started
Mar 24 18:56:48 b

Bug #62033 [Fbk]: php-fpm exits with status 0 on some failures to start

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

 ID: 62033
 Updated by: f...@php.net
 Reported by:js at justinsamuel dot com
 Summary:php-fpm exits with status 0 on some failures to
 start
 Status: Feedback
 Type:   Bug
 Package:FPM related
 Operating System:   Linux (Ubuntu 12.04)
 PHP Version:5.4.3
 Assigned To:fat
 Block user comment: N
 Private report: N

 New Comment:

This is strange ...

can you please test the following patch and see if exit code is 42 on error ?


diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c
index 95a7623..62c1b69 100644
--- a/sapi/fpm/fpm/fpm_main.c
+++ b/sapi/fpm/fpm/fpm_main.c
@@ -1803,7 +1803,8 @@ consult the installation file that came with this 
distribution, or visit \n\
}

if (0 > fpm_init(argc, argv, fpm_config ? fpm_config : 
CGIG(fpm_config), 
fpm_prefix, fpm_pid, test_conf, php_allow_to_run_as_root)) {
-   return FAILURE;
+// return FAILURE;
+   exit(42);
}

fpm_is_running = 1;


thx
++ Jerome


Previous Comments:

[2012-05-23 20:54:11] js at justinsamuel dot com

For simplicity here I'm going to focus on 5.3 instead of 5.4.

I've tried with the following:
* compiled from source (php.net tarballs) on Ubuntu 12.04
* compiled from source (php.net tarballs) on Debian 6
* Ubuntu 12.04's current php5-fpm package
* CentOS 6 with current php53u-fpm package from IUS

Here's the -tt info:

# /opt/test/php5.3/sbin/php-fpm --fpm-config /etc/php-test/fpm.conf -tt
[23-May-2012 13:07:26] NOTICE: [General]
[23-May-2012 13:07:26] NOTICE:  pid = /var/run/php5.3-test.pid
[23-May-2012 13:07:26] NOTICE:  error_log = /var/log/php5.3-test.log
[23-May-2012 13:07:26] NOTICE:  syslog.ident = php-fpm
[23-May-2012 13:07:26] NOTICE:  syslog.facility = 24
[23-May-2012 13:07:26] NOTICE:  log_level = unknown value
[23-May-2012 13:07:26] NOTICE:  emergency_restart_interval = 0s
[23-May-2012 13:07:26] NOTICE:  emergency_restart_threshold = 0
[23-May-2012 13:07:26] NOTICE:  process_control_timeout = 0s
[23-May-2012 13:07:26] NOTICE:  process.max = 0
[23-May-2012 13:07:26] NOTICE:  daemonize = yes
[23-May-2012 13:07:26] NOTICE:  rlimit_files = 0
[23-May-2012 13:07:26] NOTICE:  rlimit_core = 0
[23-May-2012 13:07:26] NOTICE:  events.mechanism = epoll
[23-May-2012 13:07:26] NOTICE:  
[23-May-2012 13:07:26] NOTICE: [example.com]
[23-May-2012 13:07:26] NOTICE:  prefix = undefined
[23-May-2012 13:07:26] NOTICE:  user = fakeuser
[23-May-2012 13:07:26] NOTICE:  group = fakegroup
[23-May-2012 13:07:26] NOTICE:  listen = /tmp/php5.3-test.sock
[23-May-2012 13:07:26] NOTICE:  listen.backlog = 128
[23-May-2012 13:07:26] NOTICE:  listen.owner = root
[23-May-2012 13:07:26] NOTICE:  listen.group = root
[23-May-2012 13:07:26] NOTICE:  listen.mode = 0700
[23-May-2012 13:07:26] NOTICE:  listen.allowed_clients = undefined
[23-May-2012 13:07:26] NOTICE:  pm = ondemand
[23-May-2012 13:07:26] NOTICE:  pm.max_children = 1
[23-May-2012 13:07:26] NOTICE:  pm.start_servers = 0
[23-May-2012 13:07:26] NOTICE:  pm.min_spare_servers = 0
[23-May-2012 13:07:26] NOTICE:  pm.max_spare_servers = 0
[23-May-2012 13:07:26] NOTICE:  pm.process_idle_timeout = 10
[23-May-2012 13:07:26] NOTICE:  pm.max_requests = 0
[23-May-2012 13:07:26] NOTICE:  pm.status_path = undefined
[23-May-2012 13:07:26] NOTICE:  ping.path = undefined
[23-May-2012 13:07:26] NOTICE:  ping.response = undefined
[23-May-2012 13:07:26] NOTICE:  access.log = undefined
[23-May-2012 13:07:26] NOTICE:  access.format = undefined
[23-May-2012 13:07:26] NOTICE:  slowlog = undefined
[23-May-2012 13:07:26] NOTICE:  request_slowlog_timeout = 0s
[23-May-2012 13:07:26] NOTICE:  request_terminate_timeout = 0s
[23-May-2012 13:07:26] NOTICE:  rlimit_files = 0
[23-May-2012 13:07:26] NOTICE:  rlimit_core = 0
[23-May-2012 13:07:26] NOTICE:  chroot = undefined
[23-May-2012 13:07:26] NOTICE:  chdir = undefined
[23-May-2012 13:07:26] NOTICE:  catch_workers_output = no
[23-May-2012 13:07:26] NOTICE:  security.limit_extensions = .php .phar
[23-May-2012 13:07:26] NOTICE:  
[23-May-2012 13:07:26] NOTICE: configuration file /etc/php-test/fpm.conf test 
is successful

Here's the version info for builds I've repeated this problem with. I haven't 
had any builds not show show this problem yet.

## on Ubuntu 12.04, built from source
# /opt/test/php5.3/sbin/php-fpm --version
PHP 5.3.13 (fpm-fcgi) (built: May 23 2012 12:21:32)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

## on Ubuntu 12.04, using distro's package
# php5-fpm --version
PHP 5.3.10-1ubuntu3.1 (fpm-fcgi) (built: May  4 2012 02:28:04)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

## on Debian 6, built from source
# /opt/test/php5.3/sbin/php-fpm --versi

Bug #62110 [Com]: Foreach creates a copy of the array passed by value in function

2012-05-23 Thread ni...@php.net
Edit report at https://bugs.php.net/bug.php?id=62110&edit=1

 ID: 62110
 Comment by: ni...@php.net
 Reported by:a dot protaskin at gmail dot com
 Summary:Foreach creates a copy of the array passed by value
 in function
 Status: Open
 Type:   Bug
 Package:Performance problem
 Operating System:   Arch Linux
 PHP Version:5.4.3
 Block user comment: N
 Private report: N

 New Comment:

The foreach loop changes the internal array pointer. If the array zval wouldn't 
be separated the loop thus would thus affect he array which was passed by 
value, which is obviously not acceptable.


Previous Comments:

[2012-05-22 19:56:06] a dot protaskin at gmail dot com

Description:

I also tried to execute this code on PHP 5.3.13 and PHP 5.2.17 with same result.

All options are default.

Test script:
---
http://pastebin.com/caczCxuD

Expected result:

Start: 786432
Inner by_reference: 786432
Inner foreach: 786432
After by_reference: 786432
Inner by_value: 786432
Inner foreach: 786432
After by_value: 786432

Actual result:
--
Start: 786432
Inner by_reference: 786432
Inner foreach: 786432
After by_reference: 786432
Inner by_value: 786432
Inner foreach: 1310720
After by_value: 104857






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


Bug #62123 [Com]: Foreach changes the internal pointer of the array strangely

2012-05-23 Thread ni...@php.net
Edit report at https://bugs.php.net/bug.php?id=62123&edit=1

 ID: 62123
 Comment by: ni...@php.net
 Reported by:a dot protaskin at gmail dot com
 Summary:Foreach changes the internal pointer of the array
 strangely
 Status: Open
 Type:   Bug
 Package:Arrays related
 Operating System:   Linux
 PHP Version:5.4.3
 Block user comment: N
 Private report: N

 New Comment:

See http://stackoverflow.com/a/8263425/385378 for an explanation.


Previous Comments:

[2012-05-23 13:23:38] a dot protaskin at gmail dot com

Description:

Traversing the array changes once the internal pointer by 1.
Traversing the array by link changes the internal pointer just as with each().

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


Bug #62033 [Com]: php-fpm exits with status 0 on some failures to start

2012-05-23 Thread js at justinsamuel dot com
Edit report at https://bugs.php.net/bug.php?id=62033&edit=1

 ID: 62033
 Comment by: js at justinsamuel dot com
 Reported by:js at justinsamuel dot com
 Summary:php-fpm exits with status 0 on some failures to
 start
 Status: Feedback
 Type:   Bug
 Package:FPM related
 Operating System:   Linux (Ubuntu 12.04)
 PHP Version:5.4.3
 Assigned To:fat
 Block user comment: N
 Private report: N

 New Comment:

For simplicity here I'm going to focus on 5.3 instead of 5.4.

I've tried with the following:
* compiled from source (php.net tarballs) on Ubuntu 12.04
* compiled from source (php.net tarballs) on Debian 6
* Ubuntu 12.04's current php5-fpm package
* CentOS 6 with current php53u-fpm package from IUS

Here's the -tt info:

# /opt/test/php5.3/sbin/php-fpm --fpm-config /etc/php-test/fpm.conf -tt
[23-May-2012 13:07:26] NOTICE: [General]
[23-May-2012 13:07:26] NOTICE:  pid = /var/run/php5.3-test.pid
[23-May-2012 13:07:26] NOTICE:  error_log = /var/log/php5.3-test.log
[23-May-2012 13:07:26] NOTICE:  syslog.ident = php-fpm
[23-May-2012 13:07:26] NOTICE:  syslog.facility = 24
[23-May-2012 13:07:26] NOTICE:  log_level = unknown value
[23-May-2012 13:07:26] NOTICE:  emergency_restart_interval = 0s
[23-May-2012 13:07:26] NOTICE:  emergency_restart_threshold = 0
[23-May-2012 13:07:26] NOTICE:  process_control_timeout = 0s
[23-May-2012 13:07:26] NOTICE:  process.max = 0
[23-May-2012 13:07:26] NOTICE:  daemonize = yes
[23-May-2012 13:07:26] NOTICE:  rlimit_files = 0
[23-May-2012 13:07:26] NOTICE:  rlimit_core = 0
[23-May-2012 13:07:26] NOTICE:  events.mechanism = epoll
[23-May-2012 13:07:26] NOTICE:  
[23-May-2012 13:07:26] NOTICE: [example.com]
[23-May-2012 13:07:26] NOTICE:  prefix = undefined
[23-May-2012 13:07:26] NOTICE:  user = fakeuser
[23-May-2012 13:07:26] NOTICE:  group = fakegroup
[23-May-2012 13:07:26] NOTICE:  listen = /tmp/php5.3-test.sock
[23-May-2012 13:07:26] NOTICE:  listen.backlog = 128
[23-May-2012 13:07:26] NOTICE:  listen.owner = root
[23-May-2012 13:07:26] NOTICE:  listen.group = root
[23-May-2012 13:07:26] NOTICE:  listen.mode = 0700
[23-May-2012 13:07:26] NOTICE:  listen.allowed_clients = undefined
[23-May-2012 13:07:26] NOTICE:  pm = ondemand
[23-May-2012 13:07:26] NOTICE:  pm.max_children = 1
[23-May-2012 13:07:26] NOTICE:  pm.start_servers = 0
[23-May-2012 13:07:26] NOTICE:  pm.min_spare_servers = 0
[23-May-2012 13:07:26] NOTICE:  pm.max_spare_servers = 0
[23-May-2012 13:07:26] NOTICE:  pm.process_idle_timeout = 10
[23-May-2012 13:07:26] NOTICE:  pm.max_requests = 0
[23-May-2012 13:07:26] NOTICE:  pm.status_path = undefined
[23-May-2012 13:07:26] NOTICE:  ping.path = undefined
[23-May-2012 13:07:26] NOTICE:  ping.response = undefined
[23-May-2012 13:07:26] NOTICE:  access.log = undefined
[23-May-2012 13:07:26] NOTICE:  access.format = undefined
[23-May-2012 13:07:26] NOTICE:  slowlog = undefined
[23-May-2012 13:07:26] NOTICE:  request_slowlog_timeout = 0s
[23-May-2012 13:07:26] NOTICE:  request_terminate_timeout = 0s
[23-May-2012 13:07:26] NOTICE:  rlimit_files = 0
[23-May-2012 13:07:26] NOTICE:  rlimit_core = 0
[23-May-2012 13:07:26] NOTICE:  chroot = undefined
[23-May-2012 13:07:26] NOTICE:  chdir = undefined
[23-May-2012 13:07:26] NOTICE:  catch_workers_output = no
[23-May-2012 13:07:26] NOTICE:  security.limit_extensions = .php .phar
[23-May-2012 13:07:26] NOTICE:  
[23-May-2012 13:07:26] NOTICE: configuration file /etc/php-test/fpm.conf test 
is successful

Here's the version info for builds I've repeated this problem with. I haven't 
had any builds not show show this problem yet.

## on Ubuntu 12.04, built from source
# /opt/test/php5.3/sbin/php-fpm --version
PHP 5.3.13 (fpm-fcgi) (built: May 23 2012 12:21:32)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

## on Ubuntu 12.04, using distro's package
# php5-fpm --version
PHP 5.3.10-1ubuntu3.1 (fpm-fcgi) (built: May  4 2012 02:28:04)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

## on Debian 6, built from source
# /opt/test/php5.3/sbin/php-fpm --version
PHP 5.3.13 (fpm-fcgi) (built: May 23 2012 15:05:00)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

## on CentOS 6, using packages from IUS
# php-fpm --version
PHP 5.3.13 (fpm-fcgi) (built: May  8 2012 15:44:17)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

As a sanity check, I've repeated the problem again on all of the above versions 
with the same config. They all show the same error but exit with 0.


Previous Comments:

[2012-05-23 07:36:58] f...@php.net

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-

[PHP-BUG] Bug #62130 [NEW]: DateTime constructor accepts invalid TZ abbreviations

2012-05-23 Thread kavi at postpro dot net
From: kavi at postpro dot net
Operating system: Linux
PHP version:  Irrelevant
Package:  Date/time related
Bug Type: Bug
Bug description:DateTime constructor accepts invalid TZ abbreviations

Description:

PHP will accept invalid DST-related time zone abbreviations, e.g. daylight

savings time when daylight savings time cannot be in effect on the given
date; 
subsequent operations on the returned object may produce invalid results.

This should produce an error.

Test script:
---
$dt = new DateTime('1980-01-01 15:00:00 PDT');
print_r($dt);
$dt->modify('+1 hour');
print_r($dt);


Expected result:

EXPECTED output should be an error.


Actual result:
--
DateTime Object
(
[date] => 1980-01-01 15:00:00
[timezone_type] => 2
[timezone] => PDT
)
DateTime Object
(
[date] => 1980-01-01 15:00:00
[timezone_type] => 2
[timezone] => PDT
)


Note that PDT is invalid for the given date, and the modify() call didn't
work 
and also didn't throw an error.

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



Bug #61558 [Asn->Fbk]: Runaway spawning of children after pipe error

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

 ID: 61558
 Updated by: f...@php.net
 Reported by:phpbug2012 at tgabber dot mine dot nu
 Summary:Runaway spawning of children after pipe error
-Status: Assigned
+Status: Feedback
 Type:   Bug
 Package:FPM related
 Operating System:   Debian Linux
 PHP Version:5.3.10
 Assigned To:fat
 Block user comment: N
 Private report: N

 New Comment:

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


Does the error happened again since (is it reproductible) ? If so, It would be 
great to have a stacktrace of the last segfault.

Do you still have the error log? I'd like to see what was just before and after 
the "Bad file descriptor" lines.

Do you have, by any chances, reached any ulimit limitations (like number of 
open 
files) ? This could maybe explain the "Bad file descriptor" error (but not the 
others errors)

If you have any clue on how to reproduce the problem, it would be very useful 
to 
fix what seems to be an important bug to me.

thx a lot


Previous Comments:

[2012-03-29 20:28:53] phpbug2012 at tgabber dot mine dot nu

Description:

Relevant software versions

Linux 2.6.32-5-amd64
Server Version: Apache/2.2.16 (Debian) DAV/2 mod_fastcgi/2.4.6
PHP Version 5.3.10-1~dotdeb.1
APC Version 3.1.9

Background

This is a lightly-loaded webserver running around 40 virtual hosts that 
experiences occasional traffic spikes. Around 20 virtual hosts use php and have 
one fpm pool each to run php under their own user, configured as ondemand so 
that they have no fpm processes running when they are not serving pages. 
Generally there are between 1 and 5 fpm processes running in total at any one 
time, rising to maybe 20 to 30 when a spike of traffic comes in.

Error

I became aware of the problem after a service monitor reported that websites 
were no longer being served. Checking, I found that that php-fpm had crashed. 
Time since the last restart of php-fpm when the error occured was about 2 days 
4 hours, with around 2.5million php requests served. The APC cache of 128Mb was 
about three-quarters full.

Looking back through the logs, this is what I found. The problem appears to 
start at 18:55:32 when php-fpm was unable to read a pipe. I have no idea what 
caused this initial error, looking back through other logs I could not see any 
abnormal web requests around this time.

Mar 24 18:55:32 banana php-fpm[21906]: [ERROR] unable to read what child say: 
Bad file descriptor (9)
Mar 24 18:55:32 banana php-fpm[21906]: [ERROR] unable to read what child say: 
Bad file descriptor (9)

There were no further fpm messages in the log until those shown below. This is 
the most worrying aspect of this bug as basically fpm seems to have gone into 
meltdown, continually spawning a process (and using almost all available cpu).


Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 9 exited 
with code 0 after 0.002001 seconds from start
Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 22230 started
Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 22230 exited 
with code 0 after 0.001790 seconds from start
Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 22231 started
Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 22231 exited 
with code 0 after 0.001694 seconds from start
Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 22232 started
Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 22232 exited 
with code 0 after 0.001692 seconds from start
Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 22233 started
Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 22233 exited 
with code 0 after 0.001685 seconds from start
Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 22234 started
Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 22234 exited 
with code 0 after 0.001683 seconds from start
Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 22235 started
Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 22235 exited 
with code 0 after 0.001659 seconds from start
Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 22236 started
Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 22236 exited 
with code 0 after 0.001677 seconds from start
Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 22237 started
Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 22237 exited 
with code 0 after 0.001652 seconds from start
M

Bug #61689 [Asn->Fbk]: php-fpm children crashes on exit

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

 ID: 61689
 Updated by: f...@php.net
 Reported by:eugene at zhegan dot in
 Summary:php-fpm children crashes on exit
-Status: Assigned
+Status: Feedback
 Type:   Bug
 Package:FPM related
 Operating System:   FreeBSD 9.0-RELEASE
 PHP Version:5.3.10
 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.

I can't do anything w/o a coredump.

You should check your ulimits configuration, the directory where FPM children 
process are in (chdir FPM parameter), the rights of this directory and ensure 
rlimit_core FPM parameter is not set (to use default ulimit values).


Previous Comments:

[2012-04-10 14:54:02] eugene at zhegan dot in

Description:

I use an nginx + php-fpm installation. Php-fpm is installed form ports.
The problem is, that php-fpm children sometimes (not always) got signal 11 when 
the master process attempts to rotate em:

[10-Apr-2012 20:46:30.072189] DEBUG: pid 14165, fpm_got_signal(), line 72: 
received SIGCHLD
[10-Apr-2012 20:46:30.072278] WARNING: pid 14165, fpm_children_bury(), line 
252: [pool www] child 14590 exited on signal 11 (SIGSEGV) after 121.434207 
seconds from start

Seems like this doesn't affect the production process, but anyway this bothers 
me and I think you will agree that bugs should be attempted to be fixed.

I would be really glad to present you a backtrace, but unfortunately I don't 
see any corefiles anywhere. Core dumps are enabled, even for suid/gid processes:

# sysctl -a | grep core
kern.corefile: %N.core
kern.nodump_coredump: 0
kern.coredump: 1
kern.sugid_coredump: 1
debug.elf64_legacy_coredump: 0
debug.ncores: 5
debug.elf32_legacy_coredump: 0

But still no cores.

Test script:
---
I don't think this is relatred to some particular script.







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


[PHP-BUG] Bug #62129 [NEW]: rfc1867 crashes php even though turned off

2012-05-23 Thread truth at proposaltech dot com
From: truth at proposaltech dot com
Operating system: CentOS
PHP version:  5.4.3
Package:  Session related
Bug Type: Bug
Bug description:rfc1867 crashes php even though turned off

Description:

php_session_rfc1867_callback() tries to call
php_session_rfc1867_orig_callback() even if the rfc1867 feature is not
enabled.  Switching the order of the opening "if" blocks fixes the problem.
 (The second "if" block immediately returns success if the feature isn't
enabled and the first "if" block tries to call the callback.  This is all
around line 2388 of session.c.)

I upgraded from 5.3.3 to 5.4.3 and apache was segfaulting.  I produced a
core and the debugger showed infinite recursion in
php_session_rfc1867_callback().  There are probably deeper problems here,
but at the least the feature shouldn't cause problems if it is turned off.

In any case, even if something about my configuration is less than ideal,
seg faults are Bad Thing.

Test script:
---
Apparently, my code wasn't executed.  I tried using Xdebug, but it didn't
report anything.  dump_bt didn't return anything in the debugger.

Expected result:

I expected my code to be executed normally.

Actual result:
--
apache seg faulted

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



Bug #62126 [Asn->Fbk]: php-fpm segfaults when encoutering # in php.ini

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

 ID: 62126
 Updated by: f...@php.net
 Reported by:i dot galic at brainsware dot org
 Summary:php-fpm segfaults when encoutering # in php.ini
-Status: Assigned
+Status: Feedback
 Type:   Bug
 Package:FPM related
 Operating System:   Ubuntu 12.04
 PHP Version:5.4.3
 Assigned To:fat
 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/

it's already been fixed


Previous Comments:

[2012-05-23 15:51:22] i dot galic at brainsware dot org

Description:

When php-fpm encounters a '#' while parsing php.ini, it will abort with a 
Segmentation fault.

Actual result:
--
Core was generated by `/opt/bw/sbin/php-fpm --help'.
Program terminated with signal 11, Segmentation fault.
#0  0x7fbcdd57576f in sapi_cgi_log_message (
message=0x7fbcdd1001b8 "PHP Deprecated:  Comments starting with '#' are 
deprecated in /etc/bw/php/php.ini on line 713 in Unknown on line 0", 
tsrm_ls=0x7fbcddd68090) at /build/php/php-5.4.3/sapi/fpm/fpm/fpm_main.c:651
651 if (CGIG(fcgi_logging)) {
(gdb) bt
#0  0x7fbcdd57576f in sapi_cgi_log_message (
message=0x7fbcdd1001b8 "PHP Deprecated:  Comments starting with '#' are 
deprecated in /etc/bw/php/php.ini on line 713 in Unknown on line 0", 
tsrm_ls=0x7fbcddd68090) at /build/php/php-5.4.3/sapi/fpm/fpm/fpm_main.c:651
#1  0x7fbcdd43cf0a in php_log_err (
log_message=0x7fbcdd1001b8 "PHP Deprecated:  Comments starting with '#' are 
deprecated in /etc/bw/php/php.ini on line 713 in Unknown on line 0", 
tsrm_ls=0x7fbcddd68090) at /build/php/php-5.4.3/main/main.c:647
#2  0x7fbcdd43d463 in php_error_cb (type=8192, 
error_filename=0x7fbcdd57e135 "Unknown", error_lineno=0, format=, 
args=) at /build/php/php-5.4.3/main/main.c:1057
#3  0x7fbcdd4b1549 in zend_error (type=8192, format=0x7fbcdd90c118 
"Comments starting with '#' are deprecated in %s on line %d")
at /build/php/php-5.4.3/Zend/zend.c:1091
#4  0x7fbcdd47d65c in ini_lex (ini_lval=, 
tsrm_ls=0x7fbcddd68090) at Zend/zend_ini_scanner.l:564
#5  0x7fbcdd47c290 in ini_parse (tsrm_ls=0x7fbcddd68090) at 
/build/php/php-5.4.3/Zend/zend_ini_parser.c:1572
#6  0x7fbcdd47c8e2 in zend_parse_ini_file (fh=0x7fffbb5e5c40, 
unbuffered_errors=, scanner_mode=, 
ini_parser_cb=, arg=, tsrm_ls=0x7fbcddd68090) 
at /build/php/php-5.4.3/Zend/zend_ini_parser.c:319
#7  0x7fbcdd446f6a in php_init_config (tsrm_ls=0x7fbcddd68090) at 
/build/php/php-5.4.3/main/php_ini.c:579
#8  0x7fbcdd440276 in php_module_startup (sf=, 
additional_modules=0x7fbcddc1acc0, num_additional_modules=1)
at /build/php/php-5.4.3/main/main.c:2137
#9  0x7fbcdd5752e5 in php_cgi_startup (sapi_module=) at 
/build/php/php-5.4.3/sapi/fpm/fpm/fpm_main.c:823
#10 0x7fbcdd236c38 in main (argc=2, argv=0x7fffbb5ea798) at 
/build/php/php-5.4.3/sapi/fpm/fpm/fpm_main.c:1642






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


[PHP-BUG] Bug #62128 [NEW]: superfluous ";" aftercgi.redirect_status_env in the configuration file

2012-05-23 Thread calestyo at scientia dot net
From: 
Operating system: All
PHP version:  5.4.3
Package:  *Configuration Issues
Bug Type: Bug
Bug description:superfluous ";" aftercgi.redirect_status_env in the 
configuration file 

Description:

Hi.

The default php.ini contains:
;cgi.redirect_status_env = ;

Isn't the final ";" superfluous?


Cheers,
Chris.


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



[PHP-BUG] Bug #62127 [NEW]: array_change_key_case first letter

2012-05-23 Thread michael at hscbrasil dot com dot br
From: 
Operating system: CentOS 5.5
PHP version:  Irrelevant
Package:  Arrays related
Bug Type: Bug
Bug description:array_change_key_case first letter

Description:

I was trying to use array_change_key_case to convert Array keys to a Lower
Case. An error occurs in keys with accent on the first letter.

PHP Version 5.2.10

Test script:
---
$arr = array
(
'Última Atualização' => 'Última Atualização',
'IP' => 'IP',
'Ônibus' => 'Ônibus',
'MSN' => 'MSN'
);

print 'normal = '.var_export($arr, true);

print 'lower = '.var_export(array_change_key_case($arr, CASE_LOWER),
true);

/*
normal = array (
  'Última Atualização' => 'Última Atualização',
  'IP' => 'IP',
  'Ônibus' => 'Ônibus',
  'MSN' => 'MSN',
)
lower = array (
  'Última atualização' => 'Última Atualização',
  'ip' => 'IP',
  'Ônibus' => 'Ônibus',
  'msn' => 'MSN',
)
*/


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



[PHP-BUG] Bug #62126 [NEW]: php-fpm segfaults when encoutering # in php.ini

2012-05-23 Thread i dot galic at brainsware dot org
From: 
Operating system: Ubuntu 12.04
PHP version:  5.4.3
Package:  FPM related
Bug Type: Bug
Bug description:php-fpm segfaults when encoutering # in php.ini

Description:

When php-fpm encounters a '#' while parsing php.ini, it will abort with a
Segmentation fault.

Actual result:
--
Core was generated by `/opt/bw/sbin/php-fpm --help'.
Program terminated with signal 11, Segmentation fault.
#0  0x7fbcdd57576f in sapi_cgi_log_message (
message=0x7fbcdd1001b8 "PHP Deprecated:  Comments starting with '#' are
deprecated in /etc/bw/php/php.ini on line 713 in Unknown on line 0", 
tsrm_ls=0x7fbcddd68090) at
/build/php/php-5.4.3/sapi/fpm/fpm/fpm_main.c:651
651 if (CGIG(fcgi_logging)) {
(gdb) bt
#0  0x7fbcdd57576f in sapi_cgi_log_message (
message=0x7fbcdd1001b8 "PHP Deprecated:  Comments starting with '#' are
deprecated in /etc/bw/php/php.ini on line 713 in Unknown on line 0", 
tsrm_ls=0x7fbcddd68090) at
/build/php/php-5.4.3/sapi/fpm/fpm/fpm_main.c:651
#1  0x7fbcdd43cf0a in php_log_err (
log_message=0x7fbcdd1001b8 "PHP Deprecated:  Comments starting with '#'
are deprecated in /etc/bw/php/php.ini on line 713 in Unknown on line 0", 
tsrm_ls=0x7fbcddd68090) at /build/php/php-5.4.3/main/main.c:647
#2  0x7fbcdd43d463 in php_error_cb (type=8192,
error_filename=0x7fbcdd57e135 "Unknown", error_lineno=0, format=, 
args=) at /build/php/php-5.4.3/main/main.c:1057
#3  0x7fbcdd4b1549 in zend_error (type=8192, format=0x7fbcdd90c118
"Comments starting with '#' are deprecated in %s on line %d")
at /build/php/php-5.4.3/Zend/zend.c:1091
#4  0x7fbcdd47d65c in ini_lex (ini_lval=,
tsrm_ls=0x7fbcddd68090) at Zend/zend_ini_scanner.l:564
#5  0x7fbcdd47c290 in ini_parse (tsrm_ls=0x7fbcddd68090) at
/build/php/php-5.4.3/Zend/zend_ini_parser.c:1572
#6  0x7fbcdd47c8e2 in zend_parse_ini_file (fh=0x7fffbb5e5c40,
unbuffered_errors=, scanner_mode=, 
ini_parser_cb=, arg=,
tsrm_ls=0x7fbcddd68090) at /build/php/php-5.4.3/Zend/zend_ini_parser.c:319
#7  0x7fbcdd446f6a in php_init_config (tsrm_ls=0x7fbcddd68090) at
/build/php/php-5.4.3/main/php_ini.c:579
#8  0x7fbcdd440276 in php_module_startup (sf=,
additional_modules=0x7fbcddc1acc0, num_additional_modules=1)
at /build/php/php-5.4.3/main/main.c:2137
#9  0x7fbcdd5752e5 in php_cgi_startup (sapi_module=) at
/build/php/php-5.4.3/sapi/fpm/fpm/fpm_main.c:823
#10 0x7fbcdd236c38 in main (argc=2, argv=0x7fffbb5ea798) at
/build/php/php-5.4.3/sapi/fpm/fpm/fpm_main.c:1642

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



Bug #61677 [Com]: ext\zlib\tests\bug_52944.phpt fails

2012-05-23 Thread a...@php.net
Edit report at https://bugs.php.net/bug.php?id=61677&edit=1

 ID: 61677
 Comment by: a...@php.net
 Reported by:a...@php.net
 Summary:ext\zlib\tests\bug_52944.phpt fails
 Status: Open
 Type:   Bug
 Package:Zlib related
 Operating System:   all
 PHP Version:Irrelevant
 Block user comment: N
 Private report: N

 New Comment:

What happens here is most likely a zlib issue. After a lot of debugging I came 
up with the snippet to look what happens if php is completely ommited (just 
quickly adopted some code from the net):

=== START SNIPPET ===
#include 
#include 
#include 
#include 
#include 

#define CHUNK 0x4000

int main ()
{
const char * file_name = "corrupted.gz";
FILE * file;
z_stream strm = {0};
unsigned char in[CHUNK];
unsigned char out[CHUNK];
int status;

strm.zalloc = Z_NULL;
strm.zfree = Z_NULL;
strm.opaque = Z_NULL;
strm.next_in = in;
strm.avail_in = 0;
strm.next_out = out;

status = inflateInit2(&strm, -15);
if (0 > status) {
fprintf(stderr, "inflateInit2(): %s\n", zError(status));
return 3;
}

file = fopen(file_name, "rb");
if (!file) {
fprintf(stderr, "fopen(): %s\n", strerror(errno));
return 3;
}
while (1) {
int bytes_read;

bytes_read = fread(in, sizeof(char), sizeof(in), file);
if (ferror(file)){
fprintf(stderr, "fread(): %s\n", strerror(errno));
return 3;
}
strm.avail_in = bytes_read;
do {
strm.avail_out = CHUNK;

status = inflate(& strm, Z_NO_FLUSH);
if (0 > status) {
inflateEnd(&strm);
fprintf(stderr, "inflate(): %s\n", zError(status));
return 1;
}

printf("%s", out);
}
while (strm.avail_out == 0);
if (feof(file)) {
inflateEnd(&strm);
break;
}
}
if (fclose(file)) {
fprintf(stderr, "fclose(): %s\n", strerror(errno));
return 3;
}
return 0;
}

=== END SNIPPET =

I've used the data from the original bug which is still available under 
http://188.40.74.4/corrupted.gz and then compiled it on windows 


cl inflate.c C:\php-sdk\php53\vc9\x86\deps\lib\zlib_a.lib "C:\Program 
Files\Microsoft Visual Studio 10.0\VC\lib\msvcrt.lib" /I 
C:\php-sdk\php53\vc9\x86\deps\include

and linux

gcc -o inflate inflate.c -lz

The result is pretty matching, the out on windows gives 

%Cë

and on linux

inflate(): data error

So PHP. 

In both of my tests PHP reports zlib version of 1.2.5 . Despite this we could 
try to upgrade the zlib version for PHP on windows and see what happens.


Previous Comments:

[2012-04-16 12:11:12] a...@php.net

i've just realized, that the output is different on linux ... the thing needs 
probably more investigation


[2012-04-09 11:24:35] a...@php.net

zlib doesn't fail anymore on the bug 52944, so the test out is adopted


[2012-04-09 11:23:44] a...@php.net

The following patch has been added/updated:

Patch Name: 61677.diff
Revision:   1333970624
URL:
https://bugs.php.net/patch-display.php?bug=61677&patch=61677.diff&revision=1333970624


[2012-04-09 11:22:41] a...@php.net

Description:

Test diff:

001+ string(1) "%"
002+ string(1) "C"
001- string(0) ""
002- string(0) ""



Expected result:

test pass

Actual result:
--
test fail






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


Bug #62115 [Com]: Issue with method array_diff_assoc

2012-05-23 Thread arjen at react dot com
Edit report at https://bugs.php.net/bug.php?id=62115&edit=1

 ID: 62115
 Comment by: arjen at react dot com
 Reported by:patttern at gmail dot com
 Summary:Issue with method array_diff_assoc
 Status: Open
 Type:   Bug
 Package:Arrays related
 Operating System:   All
 PHP Version:5.4.3
 Block user comment: N
 Private report: N

 New Comment:

http://nl3.php.net/array_diff_assoc

"Two values from key => value pairs are considered equal only if (string) 
$elem1 === (string) $elem2 . In other words a strict check 
takes place so the string representations must be the same."

and 

"Note: This function only checks one dimension of a n-dimensional array. Of 
course you can check deeper dimensions by using, for 
example, array_diff_assoc($array1[0], $array2[0]);."

So values are casted to string for comparision.

The array-elements are casted to string, which results in "array". The 
following example returns no difference between the two arrays, 
while this is clearly not the case: http://3v4l.org/1LX4W#v540

Without notices, both arrays would look the same.  Notices are generated since 
5.4.0, which is a good solution IMO.


Previous Comments:

[2012-05-23 05:29:56] patttern at gmail dot com

Description:

While executing method array_diff_assoc error appears "Notice: Array to string 
conversion".
The output of script:
array(2) { ["one"]=> array(2) { ["param1"]=> string(23) "First Parameter for 
One" ["param2"]=> string(24) "Second Parameter for One" } ["two"]=> array(2) { 
["param1"]=> string(23) "First Parameter for Two" ["param2"]=> string(24) 
"Second Parameter for Two" } }
string(3) "two"
array(2) { ["param1"]=> string(23) "First Parameter for Two" ["param2"]=> 
string(24) "Second Parameter for Two" }
array(1) { ["two"]=> array(2) { ["param1"]=> string(23) "First Parameter for 
Two" ["param2"]=> string(24) "Second Parameter for Two" } }
Notice: Array to string conversion in /usr/web/data/test_array_diff.php on line 
14 Notice: Array to string conversion in /usr/web/data/test_array_diff.php on 
line 14 array(1) { ["one"]=> array(2) { ["param1"]=> string(23) "First 
Parameter 
for One" ["param2"]=> string(24) "Second Parameter for One" } }

What is wrong?

Test script:
---
 array ('param1' => 'First Parameter for One', 'param2' => 
'Second Parameter for One'),
'two' => array ('param1' => 'First Parameter for Two', 'param2' => 
'Second Parameter for Two')
);
$packages_from = $source_packages;
var_dump($packages_from); echo "\n";
$package_key = 'two';
var_dump($package_key); echo "\n";
$package_value = $source_packages[$package_key];
var_dump($package_value); echo "\n";
$packages_to = array($package_key => $package_value);
var_dump($packages_to); echo "\n";
$result_packages = array_diff_assoc($packages_from, $packages_to);
var_dump($result_packages); echo "\n";
?>







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


[PHP-BUG] Bug #62123 [NEW]: Foreach changes the internal pointer of the array strangely

2012-05-23 Thread a dot protaskin at gmail dot com
From: 
Operating system: Linux
PHP version:  5.4.3
Package:  Arrays related
Bug Type: Bug
Bug description:Foreach changes the internal pointer of the array strangely

Description:

Traversing the array changes once the internal pointer by 1.
Traversing the array by link changes the internal pointer just as with
each().

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



Bug #61370 [Opn->Fbk]: Segmentation fault

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

 ID: 61370
 Updated by: f...@php.net
 Reported by:floren at yqed dot com
 Summary:Segmentation fault
-Status: Open
+Status: Feedback
 Type:   Bug
 Package:FPM related
 Operating System:   CentOS 5.8 64bits
 PHP Version:5.4.0
 Block user comment: N
 Private report: N

 New Comment:

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


can you please provide a complete stack trace ?

I see APC is loaded, can you disable it to ensure the bugs does not come from 
APC.

thx


Previous Comments:

[2012-04-26 19:58:58] roeitell at gmail dot com

Backtrace link doesn't work, can you provide another one?


[2012-03-13 09:35:23] floren at yqed dot com

Description:

Starting php-fpm as service generates a segfault.
Backtrace: http://pastie.org/3584157







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


Bug #62122 [Com]: openssl_pkcs7_verify with PKCS7_BINARY flag does not work (patch included)

2012-05-23 Thread f-roth at megaera dot de
Edit report at https://bugs.php.net/bug.php?id=62122&edit=1

 ID: 62122
 Comment by: f-roth at megaera dot de
 Reported by:f-roth at megaera dot de
 Summary:openssl_pkcs7_verify with PKCS7_BINARY flag does not
 work (patch included)
 Status: Open
 Type:   Bug
 Package:OpenSSL related
 Operating System:   Linux
 PHP Version:master-Git-2012-05-23 (Git)
 Block user comment: N
 Private report: N

 New Comment:

I'm sorry, I did not finish the "I tested the patch on... line"

It should have been:
"I tested the patch on CentOS release 6.2 (Final)


Previous Comments:

[2012-05-23 13:06:33] f-roth at megaera dot de

Description:

I found the function openssl_pkcs7_verify not working correctly with the 
PKCS7_BINARY flag and an ASN1 encoded input file.

I traced the error message returned by openssl_error_string() and found the 
error hidden in ext/openssl/openssl.c.

When using libopenssl and ASN1 input you have to use the d2i_PKCS7_bio function 
instead of SMIME_read_PKCS7 because of a known bug in the later one("The parser 
assumes that the PKCS7 structure is always base64 encoded and will not handle 
the case where it is in binary format or uses quoted printable format." [from 
man 3 SMIME_read_PKCS7]).

I changed the code in ext/openssl/openssl.c similar to the one from 
openssl-1.0.0/apps/smime.c (the openssl command line tool).

I tested my patch successfully on 



Test script:
---
echo(openssl_pkcs7_verify("input", PKCS7_BINARY|PKCS7_NOVERIFY);
echo(openssl_error_string());

with ASN1 encoded "input" file.

Expected result:

output of: "1" and no error message

(this expected result actually occurs with my patch applied)

Actual result:
--
output of "-1error:0D0D40D1:asn1 encoding routines:SMIME_read_ASN1:no content 
type"






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


[PHP-BUG] Bug #62122 [NEW]: openssl_pkcs7_verify with PKCS7_BINARY flag does not work (patch included)

2012-05-23 Thread f-roth at megaera dot de
From: 
Operating system: Linux
PHP version:  master-Git-2012-05-23 (Git)
Package:  OpenSSL related
Bug Type: Bug
Bug description:openssl_pkcs7_verify with PKCS7_BINARY flag does not work 
(patch included)

Description:

I found the function openssl_pkcs7_verify not working correctly with the
PKCS7_BINARY flag and an ASN1 encoded input file.

I traced the error message returned by openssl_error_string() and found the
error hidden in ext/openssl/openssl.c.

When using libopenssl and ASN1 input you have to use the d2i_PKCS7_bio
function instead of SMIME_read_PKCS7 because of a known bug in the later
one("The parser assumes that the PKCS7 structure is always base64 encoded
and will not handle the case where it is in binary format or uses quoted
printable format." [from man 3 SMIME_read_PKCS7]).

I changed the code in ext/openssl/openssl.c similar to the one from
openssl-1.0.0/apps/smime.c (the openssl command line tool).

I tested my patch successfully on 



Test script:
---
echo(openssl_pkcs7_verify("input", PKCS7_BINARY|PKCS7_NOVERIFY);
echo(openssl_error_string());

with ASN1 encoded "input" file.

Expected result:

output of: "1" and no error message

(this expected result actually occurs with my patch applied)

Actual result:
--
output of "-1error:0D0D40D1:asn1 encoding routines:SMIME_read_ASN1:no
content type"

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



Bug #62073 [Com]: different ways of iterating over an SplMaxHeap result in different keys

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

 ID: 62073
 Comment by: reeze dot xia at gmail dot com
 Reported by:mr_platelet+jin6vr at fastmail dot fm
 Summary:different ways of iterating over an SplMaxHeap
 result in different keys
 Status: Assigned
 Type:   Bug
 Package:SPL related
 Operating System:   Debian Linux 6.0.4
 PHP Version:5.3.13
 Assigned To:colder
 Block user comment: N
 Private report: N

 New Comment:

Hi, 
  This was introduced in 
http://svn.php.net/viewvc?view=revision&revision=269522,
SplHeap::key() get updated but leave foreach iterator unchanged.

I've sent a pull request at: https://github.com/php/php-src/pull/90

Thanks


Previous Comments:

[2012-05-19 16:50:20] mr_platelet+jin6vr at fastmail dot fm

Description:

If I use a foreach-loop to iterate over an SplMaxHeap,
the first key is 1.  If I use the "key" method, the
first key is 0.

Just in case it's relevant, this is the "configure"
command I used to compile PHP.  (Don't be misled by
the value for "prefix"; I'm using PHP 5.3.13, not
PHP 5.3.12.)

./configure  --prefix=/usr/local/php/5.3.12 --disable-cgi --with-
pgsql=shared,/usr --with-xmlrpc=shared --with-tidy=shared,/usr --with-
mssql=shared,/usr --with-sqlite=shared,/usr --with-snmp=shared,/usr --with-
xsl=shared,/usr --with-recode=shared,/usr --with-unixODBC=shared,/usr --with-
pspell=shared,/usr --with-mysqli=shared,/usr/bin/mysql_config --with-
mysql=shared,/usr --with-mcrypt=shared,/usr --with-ldap-sasl=/usr --with-
ldap=shared,/usr --with-t1lib=shared,/usr --with-ttf=shared,/usr --enable-
intl=shared --with-pdo-firebird=shared,/usr --with-interbase=shared,/usr --with-
imap-ssl --with-freetype-dir=shared,/usr --with-png-dir=shared,/usr --with-xpm-
dir=shared,/usr/X11R6 --with-jpeg-dir=shared,/usr --with-gmp=shared,/usr --
enable-gd-native-ttf --with-gd=shared,/usr --with-zlib-dir=/usr --with-
enchant=shared,/usr --with-curl=shared,/usr --without-mm --with-mhash=yes --
enable-zip --enable-soap --with-openssl=/usr --with-kerberos=/usr --with-zlib --
with-libxml-dir=/usr --enable-wddx --enable-sockets --enable-shmop --with-pcre-
regex=/usr --with-onig=/usr --enable-mbstring --with-gettext --enable-ftp --
enable-exif --with-iconv --without-gdbm --with-db4 --enable-ctype --with-bz2 --
enable-bcmath --enable-sysvmsg --enable-sysvshm --enable-sysvsem --enable-
calendar --with-pic --disable-static --disable-rpath --with-regex=php --disable-
debug --enable-pcntl --with-readline

Test script:
---
insert(42);
foreach ($heap as $key => $value) {
  break;
}
var_dump($key);
var_dump($value);

$heap = new SplMaxHeap;
$heap->insert(42);
var_dump($heap->key());
var_dump($heap->current());

Expected result:

I expect to see 4 lines of output from the script,
and, among other things, I expect the third line to be
the same as the first line.

Actual result:
--
The script gives this output:

int(1)
int(42)
int(0)
int(42)

Note that the third line differs from
the first.






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


Req #55632 [Opn->Csd]: UNC path is not working with error_log

2012-05-23 Thread bengt dot hilf at de dot bosch dot com
Edit report at https://bugs.php.net/bug.php?id=55632&edit=1

 ID: 55632
 User updated by:bengt dot hilf at de dot bosch dot com
 Reported by:bengt dot hilf at de dot bosch dot com
 Summary:UNC path is not working with error_log
-Status: Open
+Status: Closed
 Type:   Feature/Change Request
 Package:PHP options/info functions
 Operating System:   Windows Server 2008 R2
 PHP Version:5.3.8
 Block user comment: N
 Private report: N

 New Comment:

Problem solved in PHP 5.3.13


Previous Comments:

[2011-09-07 09:38:11] bengt dot hilf at de dot bosch dot com

Also 

error_log = "servername\\share\\errors.log"

does not work.


[2011-09-07 09:36:51] bengt dot hilf at de dot bosch dot com

Description:

When defining a UNC share in error_log, no error logs are written.

Test script:
---
php.ini:

error_log = "\\servername\share\errors.log"

Testscript:



Expected result:

UNC path can be used







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


Bug #62070 [Asn->Csd]: Collator::getSortKey returns garbage

2012-05-23 Thread cataphract
Edit report at https://bugs.php.net/bug.php?id=62070&edit=1

 ID: 62070
 Updated by: cataphr...@php.net
 Reported by:clicky at erebot dot net
 Summary:Collator::getSortKey returns garbage
-Status: Assigned
+Status: Closed
 Type:   Bug
 Package:I18N and L10N related
 Operating System:   Ubuntu 10.10
 PHP Version:5.4.3
-Assigned To:stas
+Assigned To:cataphract
 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-05-23 11:30:40] cataphr...@php.net

Automatic comment on behalf of cataphract
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=51286bd8e5a7acd75326fae497313725e4acf234
Log: Fixed bug #62070


[2012-05-19 13:24:25] clicky at erebot dot net

Description:

I tried to use the same code snippet as the one given on Collator::getSortKey's 
manual page (http://php.net/manual/en/collator.getsortkey.php).
This resulted in a PHP Warning about a non zero-terminated string and a 
different output.

I get the same results (warning + incorrect sort key) on both a 32 bits and a 
64 bits build of PHP 5.2.17 (with intl installed from PECL), 5.3.13 & 5.4.3,

Here's the configure line I used for PHP 5.4.3 (64 bits build with debug 
symbols):

'./configure' \
'--disable-all' \
'--disable-short-tags' \
'--disable-sigchild' \
'--enable-debug' \
'--with-layout=GNU' \
'--with-regex' \
'--with-openssl' \
'--with-zlib' \
'--enable-bcmath' \
'--with-bz2' \
'--enable-calendar' \
'--with-gd' \
'--enable-gd-native-ttf' \
'--with-gettext' \
'--with-gmp' \
'--enable-mbstring' \
'--enable-pcntl' \
'--with-readline' \
'--enable-soap' \
'--enable-sockets' \
'--with-pdo-sqlite' \
'--enable-sysvmsg' \
'--enable-sysvsem' \
'--enable-sysvshm' \
'--with-xsl' \
'--with-iconv' \
'--enable-zip' \
'--enable-posix' \
'--enable-libxml' \
'--enable-dom' \
'--enable-xml' \
'--enable-xmlreader' \
'--enable-xmlwriter' \
'--enable-simplexml' \
'--enable-tokenizer' \
'--enable-pdo' \
'--enable-ctype' \
'--enable-json' \
'--enable-session' \
'--enable-intl' \
'--enable-phar' \
'--with-sqlite3' \
'--prefix=/home/.../php-5.4.3-debug' \
'--exec-prefix=/home/.../php-5.4.3-debug' \
'--with-pear=/home/.../php-5.4.3-debug/pear'


Test script:
---
http://php.net/manual/en/collator.getsortkey.php

$s1 = 'Hello';

$coll = collator_create( 'en_US' );
$res  = collator_get_sort_key( $coll, $s1);

echo urlencode($res);
?>


Expected result:

71%3F%3FE%01%09%01%8F%08%00 // No warning and same result as in the manual

Actual result:
--
PHP 5.2.17:

PHP Warning:  String is not zero-terminated (:4BBH ) (source: 
/home/.../php-5.2.17-debug/Zend/zend_execute_API.c:414) in Command line code on 
line 1
PHP Stack trace:
PHP   1. {main}() Command line code:0
%3A4BBH%01%09%01%8F%08%00

-

PHP 5.3.13:

PHP Warning:  String is not zero-terminated (:4BBH ) (source: 
/home/.../php-5.3.13-debug/Zend/zend_execute_API.c:447) in Command line code on 
line 1
PHP Stack trace:
PHP   1. {main}() Command line code:0
%3A4BBH%01%09%01%8F%08%00

-

PHP 5.4.3:

PHP Warning:  String is not zero-terminated (:4BBH ) (source: 
/home/.../php-5.4.3-debug/Zend/zend_execute.h:87) in Command line code on line 1
PHP Stack trace:
PHP   1. {main}() Command line code:0
%3A4BBH%01%09%01%8F%08%00






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


Bug #62081 [Opn->Csd]: IntlDateFormatter constructor leaks memory when called twice

2012-05-23 Thread cataphract
Edit report at https://bugs.php.net/bug.php?id=62081&edit=1

 ID: 62081
 Updated by: cataphr...@php.net
 Reported by:fel...@php.net
 Summary:IntlDateFormatter constructor leaks memory when
 called twice
-Status: Open
+Status: Closed
 Type:   Bug
 Package:I18N and L10N related
 Operating System:   Linux
 PHP Version:Irrelevant
-Assigned To:
+Assigned To:cataphract
 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-05-23 11:30:39] cataphr...@php.net

Automatic comment on behalf of cataphract
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=07c0d714a59cb4d38664008a165bacafd754fac2
Log: Fixed bug #62081


[2012-05-20 19:35:30] fel...@php.net

Description:

See below:

Test script:
---
__construct(1,1,1,1,1);


Actual result:
--
[Sun May 20 16:32:34 2012]  Script:  '/home/felipe/dev/bug.php'
/home/felipe/dev/php5_3/ext/intl/dateformat/dateformat.c(149) :  Freeing 
0x02D8A4C8 (2 bytes), script=/home/felipe/dev/bug.php
=== Total 1 memory leaks detected ===







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


Bug #62083 [Opn->Csd]: grapheme_extract() memory leaks

2012-05-23 Thread cataphract
Edit report at https://bugs.php.net/bug.php?id=62083&edit=1

 ID: 62083
 Updated by: cataphr...@php.net
 Reported by:fel...@php.net
 Summary:grapheme_extract() memory leaks
-Status: Open
+Status: Closed
 Type:   Bug
 Package:I18N and L10N related
 Operating System:   Linux
 PHP Version:Irrelevant
-Assigned To:
+Assigned To:cataphract
 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-05-20 20:21:01] fel...@php.net

Description:

See below:

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


Bug #61026 [Asn->Csd]: FPM pools can listen on the same address

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

 ID: 61026
 Updated by: f...@php.net
 Reported by:flatline at hardwired dot hu
 Summary:FPM pools can listen on the same address
-Status: Assigned
+Status: Closed
 Type:   Bug
 Package:FPM related
 Operating System:   Debain Squeeze x64
 PHP Version:5.3.10
 Assigned To:fat
 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-05-23 09:53:36] f...@php.net

Automatic comment on behalf of fat
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=1299503936597ea873a3eb8272aa4deec2f31e5b
Log: - Fixed bug #61026 (FPM pools can listen on the same address)


[2012-05-23 09:53:35] f...@php.net

Automatic comment on behalf of fat
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=5d61e56dd7e19b82abde23f83b203449a48cc91a
Log: - Fixed bug #61026 (FPM pools can listen on the same address)


[2012-05-22 16:05:09] f...@php.net

it not normal for sure. I'll look to this issue, thx


[2012-02-09 09:49:52] flatline at hardwired dot hu

Description:

It's maybe a feature, but if I define two pools and accidentally set them to 
listen on the same address/ports and I do a multiple file upload, some of the 
files will be handled by pool X, some others by pool Y. Hence their users will 
be mixed too.

user = X
listen = 127.0.0.1:9000

user = Y
listen = 127.0.0.1:9000

Test script:
---
-

Expected result:

Php fpm should warn about using two pools with the same listen directive.

Actual result:
--
-






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


Bug #61839 [Asn->Csd]: [patch] Unable to cross-compile PHP with --enable-fpm

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

 ID: 61839
 Updated by: f...@php.net
 Reported by:bos at je-eigen-domein dot nl
 Summary:[patch] Unable to cross-compile PHP with
 --enable-fpm
-Status: Assigned
+Status: Closed
 Type:   Bug
 Package:FPM related
 Operating System:   Cross compiled Linux
 PHP Version:5.4.0
 Assigned To:fat
 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.

thx for the patch


Previous Comments:

[2012-05-23 09:41:37] f...@php.net

Automatic comment on behalf of fat
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=0b44f16ea2f18a08eb1249db6621840527eab5e0
Log: - Fixed bug #61839 (Unable to cross-compile PHP with --enable-fpm)


[2012-05-23 09:41:09] f...@php.net

Automatic comment on behalf of fat
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=0b44f16ea2f18a08eb1249db6621840527eab5e0
Log: - Fixed bug #61839 (Unable to cross-compile PHP with --enable-fpm)


[2012-04-24 15:12:48] bos at je-eigen-domein dot nl

Description:

When cross-compiling PHP for a different architecture, configure fails if you 
specify the --enable-fpm option:

==
checking for ptrace... yes
checking whether ptrace works... configure: error: in 
`/hdd/max/dev/raspberry/buildroot-berryserver/output/build/php-5.4.0':
configure: error: cannot run test program while cross compiling
See `config.log' for more details.
==

Obviously it is impossible to execute a test program when the system you are 
compiling on is not the target system.

Attached a patch that skips running the test programs when cross-compiling.







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


Bug #62112 [Opn->Csd]: Regression in number_format() in PHP 5.4

2012-05-23 Thread cataphract
Edit report at https://bugs.php.net/bug.php?id=62112&edit=1

 ID: 62112
 Updated by: cataphr...@php.net
 Reported by:lstro...@php.net
 Summary:Regression in number_format() in PHP 5.4
-Status: Open
+Status: Closed
 Type:   Bug
 Package:Math related
 Operating System:   Linux
 PHP Version:5.4.3
-Assigned To:
+Assigned To:cataphract
 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-05-22 21:35:45] lstro...@php.net

Sorry, link is broken: https://github.com/php/php-src/pull/87


[2012-05-22 21:28:07] lstro...@php.net

See this pull request for the proposed fix: https://github.com/php/php-
src/pull/87


[2012-05-22 20:17:40] lstro...@php.net

Description:

In PHP 5.3.X, passing a null byte as decimal point lead to no decimal point at 
all. This is not so much problematic for userland, as for C extensions. For 
examlpe phpredis uses it internally (see 
https://github.com/nicolasff/phpredis/blob/master/redis.c#L3665) to format a 
number. This worked fine in PHP 5.3, but with PHP 5.4 only the first character 
until the first decimal point is returned.

Test script:
---
php -r 'var_dump(number_format(2000.1, 0, ".", "\x00"));'

Expected result:

string(4) "2000"

Actual result:
--
string(1) "2"






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


Bug #61295 [Ana->Csd]: php-fpm should not fail with commented 'user' for non-root start

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

 ID: 61295
 Updated by: f...@php.net
 Reported by:s...@php.net
 Summary:php-fpm should not fail with commented 'user' for
 non-root start
-Status: Analyzed
+Status: Closed
 Type:   Bug
 Package:FPM related
 Operating System:   Linux
 PHP Version:5.4.0
 Assigned To:fat
 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-05-23 09:32:16] f...@php.net

Automatic comment on behalf of fat
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=a07d76c0ba57e6471ac5869af0aaa26206baa284
Log: - Fixed bug #61295 (php-fpm should not fail with commented 'user' for 
non-root start)


[2012-05-23 09:32:14] f...@php.net

Automatic comment on behalf of fat
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=812d2481935185eeeabb2c1fe2d7eafd76fc7359
Log: - Fixed bug #61295 (php-fpm should not fail with commented 'user' for 
non-root start)


[2012-03-05 22:37:23] s...@php.net

Description:

For non-root users:

 1. if php-fpm.config has the default 'user = nobody' then php-fpm starts with:
  "WARNING: [pool www] 'user' directive is ignored when FPM is not running 
as 
root"

 2. But if the 'user' directive is commented out then php-fpm fails
to start and gives "ALERT: [pool www] user has not been defined"


Php-fpm should not fail to start for non root users when 'user' (and probably 
'group') are commented out of php-fpm.conf







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


Bug #61295 [Opn->Ana]: php-fpm should not fail with commented 'user' for non-root start

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

 ID: 61295
 Updated by: f...@php.net
 Reported by:s...@php.net
 Summary:php-fpm should not fail with commented 'user' for
 non-root start
-Status: Open
+Status: Analyzed
 Type:   Bug
 Package:FPM related
 Operating System:   Linux
 PHP Version:5.4.0
-Assigned To:
+Assigned To:fat
 Block user comment: N
 Private report: N



Previous Comments:

[2012-03-05 22:37:23] s...@php.net

Description:

For non-root users:

 1. if php-fpm.config has the default 'user = nobody' then php-fpm starts with:
  "WARNING: [pool www] 'user' directive is ignored when FPM is not running 
as 
root"

 2. But if the 'user' directive is commented out then php-fpm fails
to start and gives "ALERT: [pool www] user has not been defined"


Php-fpm should not fail to start for non root users when 'user' (and probably 
'group') are commented out of php-fpm.conf







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


Bug #62038 [Asn->Nab]: apache2 + fpm is incompatible with mod_cache, mod_mem_cache

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

 ID: 62038
 Updated by: f...@php.net
 Reported by:Tamaraxo3 at gmail dot com
 Summary:apache2 + fpm is incompatible with mod_cache,
 mod_mem_cache
-Status: Assigned
+Status: Not a bug
 Type:   Bug
 Package:FPM related
 Operating System:   Linux
 PHP Version:5.3.13
 Assigned To:fat
 Block user comment: N
 Private report: N

 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

This has nothing to do with FPM.

It's a misconfiguration of apache mod_cache or a bug in apache mod_cache 
somehow.
FPM is standalone and communicate with apache though fastcgi protocol.


Previous Comments:

[2012-05-15 15:43:21] Tamaraxo3 at gmail dot com

Description:

when you install apache2 and configure php5-fpm

and now so execute
a2enmod mem_cache

modul will be loaded

but apache cache didn't work with FPM

(all request will be handeled by FPM... none where use mem_cache)

Test script:
---
after setup try this









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


[PHP-BUG] Bug #62120 [NEW]: PDO mishandles build outside of tree

2012-05-23 Thread cataphr...@php.net
From: cataphract
Operating system: Linux
PHP version:  master-Git-2012-05-23 (Git)
Package:  Compile Failure
Bug Type: Bug
Bug description:PDO mishandles build outside of tree

Description:

If you have a different configuration in the tree, when you configure PHP
outside the tree and build PDO, the build will either fail (if you include
pdo-sqlite) or it will fail at runtime due to missing symbols.

Actual result:
--
In file included from /home/gustavo/php-src/main/php_compat.h:27,
 from /home/gustavo/php-src/main/php.h:36,
 from /home/gustavo/php-src/ext/pdo_mysql/pdo_mysql.c:26:
/tmp/t/main/php_config.h:2179:1: warning: "PHP_BUILD_DATE" redefined
In file included from /tmp/t/TSRM/tsrm_config.h:1,
 from /home/gustavo/php-src/Zend/../TSRM/TSRM.h:20,
 from /home/gustavo/php-src/Zend/zend_alloc.h:27,
 from /home/gustavo/php-src/Zend/zend.h:237,
 from /home/gustavo/php-src/main/php.h:34,
 from /home/gustavo/php-src/ext/pdo_mysql/pdo_mysql.c:26:
/home/gustavo/php-src/ext/../main/php_config.h:2179:1: warning: this is the
location of the previous definition
In file included from /home/gustavo/php-src/main/php_compat.h:27,
 from /home/gustavo/php-src/main/php.h:36,
 from /home/gustavo/php-src/ext/pdo_mysql/pdo_mysql.c:26:
/tmp/t/main/php_config.h:2404:1: warning: "ZEND_DEBUG" redefined
In file included from /tmp/t/TSRM/tsrm_config.h:1,
 from /home/gustavo/php-src/Zend/../TSRM/TSRM.h:20,
 from /home/gustavo/php-src/Zend/zend_alloc.h:27,
 from /home/gustavo/php-src/Zend/zend.h:237,
 from /home/gustavo/php-src/main/php.h:34,
 from /home/gustavo/php-src/ext/pdo_mysql/pdo_mysql.c:26:
/home/gustavo/php-src/ext/../main/php_config.h:2404:1: warning: this is the
location of the previous definition
In file included from /tmp/t/TSRM/tsrm_config.h:1,
 from /home/gustavo/php-src/TSRM/tsrm_config_common.h:13,
 from /home/gustavo/php-src/TSRM/tsrm_virtual_cwd.h:27,
 from /home/gustavo/php-src/main/php.h:401,
 from /home/gustavo/php-src/ext/pdo_mysql/pdo_mysql.c:26:
/home/gustavo/php-src/ext/../main/php_config.h:2179:1: warning:
"PHP_BUILD_DATE" redefined
In file included from /home/gustavo/php-src/main/php_compat.h:27,
 from /home/gustavo/php-src/main/php.h:36,
 from /home/gustavo/php-src/ext/pdo_mysql/pdo_mysql.c:26:
/tmp/t/main/php_config.h:2179:1: warning: this is the location of the
previous definition
In file included from /tmp/t/TSRM/tsrm_config.h:1,
 from /home/gustavo/php-src/TSRM/tsrm_config_common.h:13,
 from /home/gustavo/php-src/TSRM/tsrm_virtual_cwd.h:27,
 from /home/gustavo/php-src/main/php.h:401,
 from /home/gustavo/php-src/ext/pdo_mysql/pdo_mysql.c:26:
/home/gustavo/php-src/ext/../main/php_config.h:2404:1: warning:
"ZEND_DEBUG" redefined
In file included from /home/gustavo/php-src/main/php_compat.h:27,
 from /home/gustavo/php-src/main/php.h:36,
 from /home/gustavo/php-src/ext/pdo_mysql/pdo_mysql.c:26:
/tmp/t/main/php_config.h:2404:1: warning: this is the location of the
previous definition


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

Req #61835 [Opn->Csd]: php-fpm is not allowed to run as root

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

 ID: 61835
 Updated by: f...@php.net
 Reported by:william88 at gmail dot com
 Summary:php-fpm is not allowed to run as root
-Status: Open
+Status: Closed
 Type:   Feature/Change Request
 Package:FPM related
 Operating System:   FreeBSD
 PHP Version:5.3.10
-Assigned To:
+Assigned To:fat
 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-05-23 08:38:16] f...@php.net

Automatic comment on behalf of fat
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=06c7c3674b5e205023de7a150d29d78c313143f8
Log: - Fixed bug #61835 (php-fpm is not allowed to run as root)


[2012-05-23 08:38:15] f...@php.net

Automatic comment on behalf of fat
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=7b396c078cc8fef18f37cc9a22c437f13921e375
Log: - Fixed bug #61835 (php-fpm is not allowed to run as root)


[2012-04-24 12:16:32] william88 at gmail dot com

Description:

Hi,

Yes, I know the risks about running php as root.
However there are situations where one would _need_ to do it, like appliances, 
accessing operating system resources or even for testing purposes.

It seems correct to warn and disallow it by default, but I think it is 
reasonable 
to have a "force" option that allows php-fpm running as root, as long there is 
a 
big message warning about the risks.

Expected result:

Allow to run as root

Actual result:
--
Not able to run as root, no force option available.






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


[PHP-BUG] Bug #62119 [NEW]: basename broken with non-ASCII-chars

2012-05-23 Thread thomas dot hebinck at digionline dot de
From: 
Operating system: Linux/Ubuntu
PHP version:  5.3.13
Package:  *Directory/Filesystem functions
Bug Type: Bug
Bug description:basename broken with non-ASCII-chars

Description:

With the default locale setting "C", basename() drops non-ASCII-chars at
the beginning of a filename.

Test script:
---
$path='/test/äaä.txt';
echo $path."\n";
setlocale(LC_ALL,'C');
echo dirname($path).'/'.basename($path)."\n";
setlocale(LC_ALL,'en_US.iso885915'); // bash: locale -a
echo dirname($path).'/'.basename($path)."\n";


Expected result:

/test/äaä.txt
/test/äaä.txt
/test/äaä.txt

Actual result:
--
/test/äaä.txt
/test/aä.txt
/test/äaä.txt


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



Bug #62033 [Asn->Fbk]: php-fpm exits with status 0 on some failures to start

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

 ID: 62033
 Updated by: f...@php.net
 Reported by:js at justinsamuel dot com
 Summary:php-fpm exits with status 0 on some failures to
 start
-Status: Assigned
+Status: Feedback
 Type:   Bug
 Package:FPM related
 Operating System:   Linux (Ubuntu 12.04)
 PHP Version:5.4.3
 Assigned To:fat
 Block user comment: N
 Private report: N

 New Comment:

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


I can't reproduce the problem.

On my side with both up2date sources for 5.3 and 5.4:


root@dev:/home/fat/dev/php-git/php-5.4# ./sapi/fpm/php-fpm ; echo $?
[23-May-2012 09:32:03] ERROR: [pool direct] cannot get uid for user 'fatprout'
[23-May-2012 09:32:03] ERROR: FPM initialization failed
255

root@dev:/home/fat/dev/php-git/php-5.4# ./sapi/fpm/php-fpm ; echo $?
[23-May-2012 09:32:29] ERROR: [pool direct] cannot get gid for group 'fatprout'
[23-May-2012 09:32:29] ERROR: FPM initialization failed
255


which version of PHP are you using ? (sources from php.net you have compiled or 
a package from a distro ?)

Can you send me the result of 
php-fpm --version
php-fpm -tt

thx


Previous Comments:

[2012-05-14 22:00:38] js at justinsamuel dot com

Description:

When the php-fpm command fails because the 'user' value of a pool specifies a 
nonexistent user, php-fpm exits with 0 rather than a non-zero status. This is 
incorrect and causes problems with init scripts, for example.

This happens with both php 5.3 and 5.4.

Test script:
---
Snippet of a pool configuration which will trigger the bug:

[example.com]
user = fakeuser
...

Expected result:

php-fpm should exit with a non-zero status in all cases where there is an error 
which causes it to fail to start (including, but not limited to, nonexistent 
users).

Actual result:
--
$ php-fpm
[14-May-2012 14:39:40] ERROR: [pool example.com] cannot get uid for user 
'fakeuser'
[14-May-2012 14:39:40] ERROR: FPM initialization failed
$ echo $?
0






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


Bug #60825 [Asn]: Segfault when running symfony 2 tests

2012-05-23 Thread php at wallbash dot com
Edit report at https://bugs.php.net/bug.php?id=60825&edit=1

 ID: 60825
 User updated by:php at wallbash dot com
 Reported by:php at wallbash dot com
 Summary:Segfault when running symfony 2 tests
 Status: Assigned
 Type:   Bug
 Package:Reproducible crash
 Operating System:   Ubuntu 10.04.3 LTS
 PHP Version:5.4.0RC6
 Assigned To:laruence
 Block user comment: N
 Private report: N

 New Comment:

- DUMP #3 -


$ gdb --args php /usr/local/bin/phpunit --coverage-text=cover.txt 
test/InstanciationTest.php 
GNU gdb (GDB) CentOS (7.0.1-42.el5.centos)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from /usr/bin/php...(no debugging symbols found)...done.
(gdb) r
Starting program: /usr/bin/php /usr/local/bin/phpunit --coverage-text=cover.txt 
test/InstanciationTest.php
[Thread debugging using libthread_db enabled]
PHPUnit 3.6.10 by Sebastian Bergmann.

.

Time: 4 seconds, Memory: 21.00Mb

OK (13 tests, 71 assertions)

Generating textual code coverage report, this may take a moment.
Program received signal SIGSEGV, Segmentation fault.
0x00652700 in ?? ()
(gdb) bt
#0  0x00652700 in ?? ()
#1  0x2aaab16abe4c in ?? () from /usr/lib64/php/modules/pdo.so
#2  0x00692bcd in ?? ()
#3  0x0065876b in execute ()
#4  0x2f570f4f in xdebug_execute (op_array=0x2aaab428c878) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#5  0x0065915d in ?? ()
#6  0x0065876b in execute ()
#7  0x2f570f4f in xdebug_execute (op_array=0x179f520) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#8  0x0065915d in ?? ()
#9  0x0065876b in execute ()
#10 0x2f570f4f in xdebug_execute (op_array=0x1513890) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#11 0x0065915d in ?? ()
#12 0x0065876b in execute ()
#13 0x2f570f4f in xdebug_execute (op_array=0x1986ea8) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#14 0x00627043 in zend_call_function ()
#15 0x0064830f in zend_call_method ()
#16 0x006507e8 in zend_objects_destroy_object ()
#17 0x0064ea3c in gc_collect_cycles ()
#18 0x0064f00e in gc_zval_possible_root ()
#19 0x006b9031 in ?? ()
#20 0x0065876b in execute ()
#21 0x2f570f4f in xdebug_execute (op_array=0x21dedc0) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#22 0x0065915d in ?? ()
#23 0x0065876b in execute ()
#24 0x2f570f4f in xdebug_execute (op_array=0x21de378) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#25 0x0065915d in ?? ()
#26 0x0065876b in execute ()
#27 0x2f570f4f in xdebug_execute (op_array=0x21b9718) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#28 0x0065915d in ?? ()
#29 0x0065876b in execute ()
#30 0x2f570f4f in xdebug_execute (op_array=0x2ac245b0) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#31 0x0065915d in ?? ()
#32 0x0065876b in execute ()
#33 0x2f570f4f in xdebug_execute (op_array=0x2086cd0) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#34 0x0065915d in ?? ()
#35 0x0065876b in execute ()
#36 0x2f570f4f in xdebug_execute (op_array=0x208d828) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#37 0x0065915d in ?? ()
#38 0x0065876b in execute ()
#39 0x2f570f4f in xdebug_execute (op_array=0x1f90600) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#40 0x0065915d in ?? ()
#41 0x0065876b in execute ()
#42 0x2f570f4f in xdebug_execute (op_array=0x1f90600) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#43 0x0065915d in ?? ()
#44 0x0065876b in execute ()
#45 0x2f570f4f in xdebug_execute (op_array=0x1f90600) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#46 0x0065915d in ?? ()
#47 0x0065876b in execute ()
#48 0x2f570f4f in xdebug_execute (op_array=0x1f90600) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#49 0x0065915d in ?? ()
#50 0x0065876b in execute ()
#51 0x2f570f4f in xdebug_execute (op_array=0x1fd8f10) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#52 0x0065915d in ?? ()
#53 0x0065876b in execute ()
#54 0x2f570f4f in xdebug_execute (op_array=0x1312110) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#55 0x0065915d in ?? ()
#56 0x0065876b in execute ()
#57 0x2f570f4f in xdebug_execute (op_array=0x1fda010) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#58 0x0065915d in ?? ()
---Type  to continue, or q  to quit--

Bug #60825 [Asn]: Segfault when running symfony 2 tests

2012-05-23 Thread php at wallbash dot com
Edit report at https://bugs.php.net/bug.php?id=60825&edit=1

 ID: 60825
 User updated by:php at wallbash dot com
 Reported by:php at wallbash dot com
 Summary:Segfault when running symfony 2 tests
 Status: Assigned
 Type:   Bug
 Package:Reproducible crash
 Operating System:   Ubuntu 10.04.3 LTS
 PHP Version:5.4.0RC6
 Assigned To:laruence
 Block user comment: N
 Private report: N

 New Comment:

- DUMP #2 -

$ gdb --args php /usr/local/bin/phpunit --coverage-text=cover.txt test
GNU gdb (GDB) CentOS (7.0.1-42.el5.centos)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from /usr/bin/php...(no debugging symbols found)...done.
(gdb) r
Starting program: /usr/bin/php /usr/local/bin/phpunit --coverage-text=cover.txt 
test
[Thread debugging using libthread_db enabled]
PHPUnit 3.6.10 by Sebastian Bergmann.

.
Program received signal SIGSEGV, Segmentation fault.
0x00652700 in ?? ()
(gdb) bt
#0  0x00652700 in ?? ()
#1  0x2aaab16abe4c in ?? () from /usr/lib64/php/modules/pdo.so
#2  0x00692bcd in ?? ()
#3  0x0065876b in execute ()
#4  0x2f570f4f in xdebug_execute (op_array=0x2aaab428b5d8) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#5  0x0065915d in ?? ()
#6  0x0065876b in execute ()
#7  0x2f570f4f in xdebug_execute (op_array=0x1c63328) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#8  0x0065915d in ?? ()
#9  0x0065876b in execute ()
#10 0x2f570f4f in xdebug_execute (op_array=0x1c29480) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#11 0x0065915d in ?? ()
#12 0x0065876b in execute ()
#13 0x2f570f4f in xdebug_execute (op_array=0x1c24b10) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#14 0x00627043 in zend_call_function ()
#15 0x0064830f in zend_call_method ()
#16 0x006507e8 in zend_objects_destroy_object ()
#17 0x0064ea3c in gc_collect_cycles ()
#18 0x0064f00e in gc_zval_possible_root ()
#19 0x0067b264 in ?? ()
#20 0x0065876b in execute ()
#21 0x2f570f4f in xdebug_execute (op_array=0x1a26d38) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#22 0x0065915d in ?? ()
#23 0x0065876b in execute ()
#24 0x2f570f4f in xdebug_execute (op_array=0xee1008) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#25 0x0065915d in ?? ()
#26 0x0065876b in execute ()
#27 0x2f570f4f in xdebug_execute (op_array=0xfa0e28) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#28 0x0065915d in ?? ()
#29 0x0065876b in execute ()
#30 0x2f570f4f in xdebug_execute (op_array=0xf9e000) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#31 0x0065915d in ?? ()
#32 0x0065876b in execute ()
#33 0x2f570f4f in xdebug_execute (op_array=0xf635d0) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#34 0x0065915d in ?? ()
#35 0x0065876b in execute ()
#36 0x2f570f4f in xdebug_execute (op_array=0x10877e0) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#37 0x0065915d in ?? ()
#38 0x0065876b in execute ()
#39 0x2f570f4f in xdebug_execute (op_array=0x1bb08e8) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#40 0x0065915d in ?? ()
#41 0x0065876b in execute ()
#42 0x2f570f4f in xdebug_execute (op_array=0x1bc2610) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#43 0x0065915d in ?? ()
#44 0x0065876b in execute ()
#45 0x2f570f4f in xdebug_execute (op_array=0x1baf8a0) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#46 0x0065915d in ?? ()
#47 0x0065876b in execute ()
#48 0x2f570f4f in xdebug_execute (op_array=0x1c1d658) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#49 0x0065915d in ?? ()
#50 0x0065876b in execute ()
#51 0x2f570f4f in xdebug_execute (op_array=0x17e6270) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#52 0x0065915d in ?? ()
#53 0x0065876b in execute ()
#54 0x2f570f4f in xdebug_execute (op_array=0x17e5898) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#55 0x0065915d in ?? ()
#56 0x0065876b in execute ()
#57 0x2f570f4f in xdebug_execute (op_array=0x1775330) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#58 0x0065915d in ?? ()
---Type  to continue, or q  to quit---
#59 0x0065876b in execute ()
#60 0x2f570f4f in xdebug_execute (op_array=0xd0c5f8) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#61 0x00627043 in zend_call_function ()

Bug #60825 [Asn]: Segfault when running symfony 2 tests

2012-05-23 Thread php at wallbash dot com
Edit report at https://bugs.php.net/bug.php?id=60825&edit=1

 ID: 60825
 User updated by:php at wallbash dot com
 Reported by:php at wallbash dot com
 Summary:Segfault when running symfony 2 tests
 Status: Assigned
 Type:   Bug
 Package:Reproducible crash
 Operating System:   Ubuntu 10.04.3 LTS
 PHP Version:5.4.0RC6
 Assigned To:laruence
 Block user comment: N
 Private report: N

 New Comment:

- DUMP #1 -

$ gdb --args php /usr/local/bin/phpunit --coverage-text=cover.txt 
test/PersistTest.php 
test/InstanciationTest.php 
GNU gdb (GDB) CentOS (7.0.1-42.el5.centos)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from /usr/bin/php...(no debugging symbols found)...done.
(gdb) r
Starting program: /usr/bin/php /usr/local/bin/phpunit --coverage-text=cover.txt 
test/PersistTest.php
[Thread debugging using libthread_db enabled]
PHPUnit 3.6.10 by Sebastian Bergmann.



Time: 21 seconds, Memory: 21.75Mb

OK (12 tests, 59 assertions)

Generating textual code coverage report, this may take a moment.
Program received signal SIGSEGV, Segmentation fault.
0x00651c85 in ?? ()
(gdb) bt
#0  0x00651c85 in ?? ()
#1  0x00672eee in ?? ()
#2  0x0065876b in execute ()
#3  0x2f570f4f in xdebug_execute (op_array=0x17fe050)
at /tmp/pear/install/xdebug/xdebug.c:1390
#4  0x0065915d in ?? ()
#5  0x0065876b in execute ()
#6  0x2f570f4f in xdebug_execute (op_array=0x17e3168)
at /tmp/pear/install/xdebug/xdebug.c:1390
#7  0x0065915d in ?? ()
#8  0x0065876b in execute ()
#9  0x2f570f4f in xdebug_execute (op_array=0x17ae2c8)
at /tmp/pear/install/xdebug/xdebug.c:1390
#10 0x0065915d in ?? ()
#11 0x0065876b in execute ()
#12 0x2f570f4f in xdebug_execute (op_array=0x1f64700)
at /tmp/pear/install/xdebug/xdebug.c:1390
#13 0x0065915d in ?? ()
#14 0x0065876b in execute ()
#15 0x2f570f4f in xdebug_execute (op_array=0x1f64be8)
at /tmp/pear/install/xdebug/xdebug.c:1390
#16 0x00627043 in zend_call_function ()
#17 0x0064830f in zend_call_method ()
---Type  to continue, or q  to quit---
#18 0x006507e8 in zend_objects_destroy_object ()
#19 0x0064ea3c in gc_collect_cycles ()
#20 0x0064f00e in gc_zval_possible_root ()
#21 0x006b9031 in ?? ()
#22 0x0065876b in execute ()
#23 0x2f570f4f in xdebug_execute (op_array=0x22f8c90)
at /tmp/pear/install/xdebug/xdebug.c:1390
#24 0x0065915d in ?? ()
#25 0x0065876b in execute ()
#26 0x2f570f4f in xdebug_execute (op_array=0x22d3498)
at /tmp/pear/install/xdebug/xdebug.c:1390
#27 0x0065915d in ?? ()
#28 0x0065876b in execute ()
#29 0x2f570f4f in xdebug_execute (op_array=0x22dec68)
at /tmp/pear/install/xdebug/xdebug.c:1390
#30 0x0065915d in ?? ()
#31 0x0065876b in execute ()
#32 0x2f570f4f in xdebug_execute (op_array=0x2ac24700)
at /tmp/pear/install/xdebug/xdebug.c:1390
#33 0x0065915d in ?? ()
#34 0x0065876b in execute ()
#35 0x2f570f4f in xdebug_execute (op_array=0x22d6a60)
at /tmp/pear/install/xdebug/xdebug.c:1390
---Type  to continue, or q  to quit---
#36 0x0065915d in ?? ()
#37 0x0065876b in execute ()
#38 0x2f570f4f in xdebug_execute (op_array=0x2141e58)
at /tmp/pear/install/xdebug/xdebug.c:1390
#39 0x0065915d in ?? ()
#40 0x0065876b in execute ()
#41 0x2f570f4f in xdebug_execute (op_array=0x2142fb0)
at /tmp/pear/install/xdebug/xdebug.c:1390
#42 0x0065915d in ?? ()
#43 0x0065876b in execute ()
#44 0x2f570f4f in xdebug_execute (op_array=0x2142fb0)
at /tmp/pear/install/xdebug/xdebug.c:1390
#45 0x0065915d in ?? ()
#46 0x0065876b in execute ()
#47 0x2f570f4f in xdebug_execute (op_array=0x2142fb0)
at /tmp/pear/install/xdebug/xdebug.c:1390
#48 0x0065915d in ?? ()
#49 0x0065876b in execute ()
#50 0x2f570f4f in xdebug_execute (op_array=0x2142fb0)
at /tmp/pear/install/xdebug/xdebug.c:1390
#51 0x0065915d in ?? ()
#52 0x0065876b in execute ()
#53 0x2f570f4f in xdebug_execute (op_array=0x21418d8)
---Type  to continue, or q  to quit---
at /tmp/pear/install/xdebug/xdebug.c:1390
#54 0x0065915d in ?? ()
#55 0x0065876b in execute ()
#56 0x2f570f4f in xdebug_execute (op_array=0x1333f80)

Bug #60825 [Fbk->Asn]: Segfault when running symfony 2 tests

2012-05-23 Thread php at wallbash dot com
Edit report at https://bugs.php.net/bug.php?id=60825&edit=1

 ID: 60825
 User updated by:php at wallbash dot com
 Reported by:php at wallbash dot com
 Summary:Segfault when running symfony 2 tests
-Status: Feedback
+Status: Assigned
 Type:   Bug
 Package:Reproducible crash
 Operating System:   Ubuntu 10.04.3 LTS
 PHP Version:5.4.0RC6
 Assigned To:laruence
 Block user comment: N
 Private report: N

 New Comment:

I will take time to create a reproducible test on Saturday or Sunday. This 
looks 
like a kind a memory related issue as I can run each test individually, but not 
all tests in a batch. Trying to know more precisely what makes the process fail 
in scripts, I also installed XDebug extension. Here, a segmentation fault 
occurs 
when XDebug tries to write its coverage file. I hope this is not some kind of 
heap overflow that may introduce some vulnerability (ie. arbitrary code 
execution).

Follows a debugger dump when only one script is run with XDebug activated and 
coverage asked. An output file cover.txt is created but remains empty. The 
fault 
now seems to occur next to a call in XDebug Extension.  -- DUMP #1 --

If I try to run all the tests with XDebug activated and coverage asked, a 
segmentation fault still occurs but the back trace is now different, the 
segmentation fault now seems to occur next to a call in pdo.so -- DUMP #2 --

If I now try to run another single test with XDebug activated and coverage 
asked, a segmentation fault occurs again but the back trace is also different, 
the segmentation fault seems to occur also next to a call in pdo.so -- DUMP #3 -
-

$ php --version
PHP 5.3.13 (cli) (built: May  8 2012 15:39:23) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
with Xdebug v2.2.0, Copyright (c) 2002-2012, by Derick Rethans


DUMPS come in next comments in order not to get the "Please do not SPAM our bug 
system." error message.


Previous Comments:

[2012-05-23 02:22:05] larue...@php.net

oh,, I remebered wronly, will take a look into this later,  but the new 
segfault 
seems not the same as this one(from the bt),  could you please try to make a 
reproducable script?  thanks


[2012-05-23 02:18:15] larue...@php.net

seems the same issue exists in 5.3 too, previous fix only fixed the bug in 5.4


[2012-05-22 14:05:51] php at wallbash dot com

Dear paj...@php.net,

Sorry for answering so late. I focused my attention on other projects still now 
and did not check if the issue was solved using an higher production version. 
It 
seems the issue still exists with current stable version 5.3.13. I get the same 
segmentation fault when testing a project using Doctrine ORM. However, the 
fault 
location seems to elsewhere. See below.

$ php --version
PHP 5.3.13 (cli) (built: May  8 2012 15:39:23) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

$ gdb --args php /usr/local/bin/phpunit test
GNU gdb (GDB) CentOS (7.0.1-42.el5.centos)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from /usr/bin/php...(no debugging symbols found)...done.
(gdb) r
Starting program: /usr/bin/php /usr/local/bin/phpunit test
[Thread debugging using libthread_db enabled]
PHPUnit 3.6.10 by Sebastian Bergmann.

...
Program received signal SIGSEGV, Segmentation fault.
0x00652700 in ?? ()
(gdb) bt
#0  0x00652700 in ?? ()
#1  0x2aaab147ae4c in ?? () from /usr/lib64/php/modules/pdo.so
#2  0x00692bcd in ?? ()
#3  0x0065876b in execute ()
#4  0x00627043 in zend_call_function ()
#5  0x0064830f in zend_call_method ()
#6  0x006507e8 in zend_objects_destroy_object ()
#7  0x0064ea3c in gc_collect_cycles ()
#8  0x0064f00e in gc_zval_possible_root ()
#9  0x006b51ed in ?? ()
#10 0x0065876b in execute ()
#11 0x00627043 in zend_call_function ()
#12 0x00535fbe in ?? ()
#13 0x00659669 in ?? ()
#14 0x0065876b in execute ()
#15 0x00631ba5 in zend_execute_scripts ()
#16 0x005e1328 in php_execute_script ()
#17 0x006bbdf0 in ?? ()
#18 0x2b7cb994 in __libc_start_main () from /lib64/libc.so.6
#19 0x00422509 in _start ()