[PHP-BUG] Bug #65584 [NEW]: recv() failed (104: Connection reset by peer) while reading response ...

2013-08-29 Thread michael dot heuberger at binarykitchen dot com
From: michael dot heuberger at binarykitchen dot com
Operating system: Ubuntu 13.04
PHP version:  5.5.3
Package:  FPM related
Bug Type: Bug
Bug description:recv() failed (104: Connection reset by peer) while reading 
response ...

Description:

Hi there

I recently apt-get upgraded my PHP disto on my server, adjusted, tested few
lines of the current website but there is one last problem: PHP-FPM crashes
always. With these log lines in NGINX:

2013/08/30 01:34:06 [error] 12282#0: *51 recv() failed (104: Connection
reset by peer) while reading response header from upstream, client:
78.10.247.202, server: binarykitchen.com, request: GET
/user/register/action/why/language/de/ HTTP/1.0, upstream:
fastcgi://unix:/var/run/php5-fpm.sock:, host: www.binarykitchen.com,
referrer:
http://www.binarykitchen.com/user/register/action/why/language/de/;

There are many of those. Sometimes the page loads, sometimes not.

I tried hard to adjust nginx and php-fpm but no success. I am using
sockets.

Tell me, how can I see what is exactly resetting the connection? Why it is
crashing? What commands should I try?

And here more details:

$ php -v
PHP 5.5.3-1+debphp.org~raring+2 (cli) (built: Aug 27 2013 09:16:12) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
with Zend OPcache v7.0.3-dev, Copyright (c) 1999-2013, by Zend
Technologies

Thanks for your help,
Michael


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



Bug #65584 [Fbk-Opn]: recv() failed (104: Connection reset by peer) while reading response ...

2013-08-29 Thread michael dot heuberger at binarykitchen dot com
Edit report at https://bugs.php.net/bug.php?id=65584edit=1

 ID: 65584
 User updated by:michael dot heuberger at binarykitchen dot com
 Reported by:michael dot heuberger at binarykitchen dot com
 Summary:recv() failed (104: Connection reset by peer) while
 reading response ...
-Status: Feedback
+Status: Open
 Type:   Bug
 Package:FPM related
 Operating System:   Ubuntu 13.04
 PHP Version:5.5.3
 Block user comment: N
 Private report: N

 New Comment:

Thank you but I am unable to create a backtrace on my server.

I have set /proc/sys/kernel/core_pattern with
echo /var/cores/core-%e.%p  /proc/sys/kernel/core_pattern 

Then I made /var/cores/ writeable for user www-data and chmodded it with 777. 
Then sudo service php5-fpm restart and reloaded the page. It crashed but no 
core was dumped. Why? ulimit is unlimited.

By the way, I am on nginx. Your instructions are for Apache.


Previous Comments:

[2013-08-29 15:18:26] larue...@php.net

should be: http://snaps.php.net/php5.5-latest.tar.gz


[2013-08-29 15:17:45] larue...@php.net

seems your php-fpm is crashing, you need try to get a backtrace.. 

http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32


and you could also try to test with the latest snapshot of php-5.5 branch: 
http://snaps.php.net/php5.4-latest.tar.gz


[2013-08-29 13:43:31] michael dot heuberger at binarykitchen dot com

Description:

Hi there

I recently apt-get upgraded my PHP disto on my server, adjusted, tested few 
lines of the current website but there is one last problem: PHP-FPM crashes 
always. With these log lines in NGINX:

2013/08/30 01:34:06 [error] 12282#0: *51 recv() failed (104: Connection reset 
by peer) while reading response header from upstream, client: 78.10.247.202, 
server: binarykitchen.com, request: GET /user/register/action/why/language/de/ 
HTTP/1.0, upstream: fastcgi://unix:/var/run/php5-fpm.sock:, host: 
www.binarykitchen.com, referrer: 
http://www.binarykitchen.com/user/register/action/why/language/de/;

There are many of those. Sometimes the page loads, sometimes not.

I tried hard to adjust nginx and php-fpm but no success. I am using sockets.

Tell me, how can I see what is exactly resetting the connection? Why it is 
crashing? What commands should I try?

And here more details:

$ php -v
PHP 5.5.3-1+debphp.org~raring+2 (cli) (built: Aug 27 2013 09:16:12) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
with Zend OPcache v7.0.3-dev, Copyright (c) 1999-2013, by Zend Technologies

Thanks for your help,
Michael







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


Bug #65584 [Opn]: recv() failed (104: Connection reset by peer) while reading response ...

2013-08-29 Thread michael dot heuberger at binarykitchen dot com
Edit report at https://bugs.php.net/bug.php?id=65584edit=1

 ID: 65584
 User updated by:michael dot heuberger at binarykitchen dot com
 Reported by:michael dot heuberger at binarykitchen dot com
 Summary:recv() failed (104: Connection reset by peer) while
 reading response ...
 Status: Open
 Type:   Bug
 Package:FPM related
 Operating System:   Ubuntu 13.04
 PHP Version:5.5.3
 Block user comment: N
 Private report: N

 New Comment:

Ah, I managed it. I have the core dumps now.

You forgot to mention that I have to adjust /etc/php5/fpm/pool.d/www.conf with 
a higher value than zero, i.E. rlimit_core = 10

I have 10 core dumps, all 119 MB large. How can I attach them here or hand them 
over to you?


Previous Comments:

[2013-08-29 23:06:24] michael dot heuberger at binarykitchen dot com

Thank you but I am unable to create a backtrace on my server.

I have set /proc/sys/kernel/core_pattern with
echo /var/cores/core-%e.%p  /proc/sys/kernel/core_pattern 

Then I made /var/cores/ writeable for user www-data and chmodded it with 777. 
Then sudo service php5-fpm restart and reloaded the page. It crashed but no 
core was dumped. Why? ulimit is unlimited.

By the way, I am on nginx. Your instructions are for Apache.


[2013-08-29 15:18:26] larue...@php.net

should be: http://snaps.php.net/php5.5-latest.tar.gz


[2013-08-29 15:17:45] larue...@php.net

seems your php-fpm is crashing, you need try to get a backtrace.. 

http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32


and you could also try to test with the latest snapshot of php-5.5 branch: 
http://snaps.php.net/php5.4-latest.tar.gz


[2013-08-29 13:43:31] michael dot heuberger at binarykitchen dot com

Description:

Hi there

I recently apt-get upgraded my PHP disto on my server, adjusted, tested few 
lines of the current website but there is one last problem: PHP-FPM crashes 
always. With these log lines in NGINX:

2013/08/30 01:34:06 [error] 12282#0: *51 recv() failed (104: Connection reset 
by peer) while reading response header from upstream, client: 78.10.247.202, 
server: binarykitchen.com, request: GET /user/register/action/why/language/de/ 
HTTP/1.0, upstream: fastcgi://unix:/var/run/php5-fpm.sock:, host: 
www.binarykitchen.com, referrer: 
http://www.binarykitchen.com/user/register/action/why/language/de/;

There are many of those. Sometimes the page loads, sometimes not.

I tried hard to adjust nginx and php-fpm but no success. I am using sockets.

Tell me, how can I see what is exactly resetting the connection? Why it is 
crashing? What commands should I try?

And here more details:

$ php -v
PHP 5.5.3-1+debphp.org~raring+2 (cli) (built: Aug 27 2013 09:16:12) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
with Zend OPcache v7.0.3-dev, Copyright (c) 1999-2013, by Zend Technologies

Thanks for your help,
Michael







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


Bug #65584 [Opn]: recv() failed (104: Connection reset by peer) while reading response ...

2013-08-29 Thread michael dot heuberger at binarykitchen dot com
Edit report at https://bugs.php.net/bug.php?id=65584edit=1

 ID: 65584
 User updated by:michael dot heuberger at binarykitchen dot com
 Reported by:michael dot heuberger at binarykitchen dot com
 Summary:recv() failed (104: Connection reset by peer) while
 reading response ...
 Status: Open
 Type:   Bug
 Package:FPM related
 Operating System:   Ubuntu 13.04
 PHP Version:5.5.3
 Block user comment: N
 Private report: N

 New Comment:

PS: The gdb command does not exist on my machine.


Previous Comments:

[2013-08-29 23:15:34] michael dot heuberger at binarykitchen dot com

Ah, I managed it. I have the core dumps now.

You forgot to mention that I have to adjust /etc/php5/fpm/pool.d/www.conf with 
a higher value than zero, i.E. rlimit_core = 10

I have 10 core dumps, all 119 MB large. How can I attach them here or hand them 
over to you?


[2013-08-29 23:06:24] michael dot heuberger at binarykitchen dot com

Thank you but I am unable to create a backtrace on my server.

I have set /proc/sys/kernel/core_pattern with
echo /var/cores/core-%e.%p  /proc/sys/kernel/core_pattern 

Then I made /var/cores/ writeable for user www-data and chmodded it with 777. 
Then sudo service php5-fpm restart and reloaded the page. It crashed but no 
core was dumped. Why? ulimit is unlimited.

By the way, I am on nginx. Your instructions are for Apache.


[2013-08-29 15:18:26] larue...@php.net

should be: http://snaps.php.net/php5.5-latest.tar.gz


[2013-08-29 15:17:45] larue...@php.net

seems your php-fpm is crashing, you need try to get a backtrace.. 

http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32


and you could also try to test with the latest snapshot of php-5.5 branch: 
http://snaps.php.net/php5.4-latest.tar.gz


[2013-08-29 13:43:31] michael dot heuberger at binarykitchen dot com

Description:

Hi there

I recently apt-get upgraded my PHP disto on my server, adjusted, tested few 
lines of the current website but there is one last problem: PHP-FPM crashes 
always. With these log lines in NGINX:

2013/08/30 01:34:06 [error] 12282#0: *51 recv() failed (104: Connection reset 
by peer) while reading response header from upstream, client: 78.10.247.202, 
server: binarykitchen.com, request: GET /user/register/action/why/language/de/ 
HTTP/1.0, upstream: fastcgi://unix:/var/run/php5-fpm.sock:, host: 
www.binarykitchen.com, referrer: 
http://www.binarykitchen.com/user/register/action/why/language/de/;

There are many of those. Sometimes the page loads, sometimes not.

I tried hard to adjust nginx and php-fpm but no success. I am using sockets.

Tell me, how can I see what is exactly resetting the connection? Why it is 
crashing? What commands should I try?

And here more details:

$ php -v
PHP 5.5.3-1+debphp.org~raring+2 (cli) (built: Aug 27 2013 09:16:12) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
with Zend OPcache v7.0.3-dev, Copyright (c) 1999-2013, by Zend Technologies

Thanks for your help,
Michael







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


Bug #65584 [Fbk-Opn]: recv() failed (104: Connection reset by peer) while reading response ...

2013-08-29 Thread michael dot heuberger at binarykitchen dot com
Edit report at https://bugs.php.net/bug.php?id=65584edit=1

 ID: 65584
 User updated by:michael dot heuberger at binarykitchen dot com
 Reported by:michael dot heuberger at binarykitchen dot com
 Summary:recv() failed (104: Connection reset by peer) while
 reading response ...
-Status: Feedback
+Status: Open
 Type:   Bug
 Package:FPM related
 Operating System:   Ubuntu 13.04
 PHP Version:5.5.3
 Block user comment: N
 Private report: N

 New Comment:

Thx!

I have the dump here. An clues?

$ sudo gdb /usr/sbin/php5-fpm /var/cores/core-php5-fpm.31743
GNU gdb (GDB) 7.5.91.20130417-cvs-ubuntu
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
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-linux-gnu.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /usr/sbin/php5-fpm...(no debugging symbols found)...done.
[New LWP 31743]

warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library /lib/x86_64-linux-gnu/libthread_db.so.1.
Core was generated by `php-fpm: pool www
   '.
Program terminated with signal 11, Segmentation fault.
#0  0x006f8459 in gc_remove_zval_from_buffer ()
(gdb) bt
#0  0x006f8459 in gc_remove_zval_from_buffer ()
#1  0x00763ff8 in ?? ()
#2  0x007480e8 in execute_ex ()
#3  0x006dad99 in zend_execute_scripts ()
#4  0x006799ac in php_execute_script ()
#5  0x00466844 in main ()


Previous Comments:

[2013-08-29 23:21:22] ras...@php.net

apt-get install gdb


[2013-08-29 23:19:19] michael dot heuberger at binarykitchen dot com

PS: The gdb command does not exist on my machine.


[2013-08-29 23:15:34] michael dot heuberger at binarykitchen dot com

Ah, I managed it. I have the core dumps now.

You forgot to mention that I have to adjust /etc/php5/fpm/pool.d/www.conf with 
a higher value than zero, i.E. rlimit_core = 10

I have 10 core dumps, all 119 MB large. How can I attach them here or hand them 
over to you?


[2013-08-29 23:06:24] michael dot heuberger at binarykitchen dot com

Thank you but I am unable to create a backtrace on my server.

I have set /proc/sys/kernel/core_pattern with
echo /var/cores/core-%e.%p  /proc/sys/kernel/core_pattern 

Then I made /var/cores/ writeable for user www-data and chmodded it with 777. 
Then sudo service php5-fpm restart and reloaded the page. It crashed but no 
core was dumped. Why? ulimit is unlimited.

By the way, I am on nginx. Your instructions are for Apache.


[2013-08-29 15:18:26] larue...@php.net

should be: http://snaps.php.net/php5.5-latest.tar.gz




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


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


Bug #65584 [Opn]: recv() failed (104: Connection reset by peer) while reading response ...

2013-08-29 Thread michael dot heuberger at binarykitchen dot com
Edit report at https://bugs.php.net/bug.php?id=65584edit=1

 ID: 65584
 User updated by:michael dot heuberger at binarykitchen dot com
 Reported by:michael dot heuberger at binarykitchen dot com
 Summary:recv() failed (104: Connection reset by peer) while
 reading response ...
 Status: Open
 Type:   Bug
 Package:FPM related
 Operating System:   Ubuntu 13.04
 PHP Version:5.5.3
 Block user comment: N
 Private report: N

 New Comment:

I also see a file in /var/crash/
_usr_sbin_php5-fpm.33.crash

It is full with binary data. I tried to run it with gdb but no success.


Previous Comments:

[2013-08-29 23:26:15] michael dot heuberger at binarykitchen dot com

Thx!

I have the dump here. An clues?

$ sudo gdb /usr/sbin/php5-fpm /var/cores/core-php5-fpm.31743
GNU gdb (GDB) 7.5.91.20130417-cvs-ubuntu
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
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-linux-gnu.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /usr/sbin/php5-fpm...(no debugging symbols found)...done.
[New LWP 31743]

warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library /lib/x86_64-linux-gnu/libthread_db.so.1.
Core was generated by `php-fpm: pool www
   '.
Program terminated with signal 11, Segmentation fault.
#0  0x006f8459 in gc_remove_zval_from_buffer ()
(gdb) bt
#0  0x006f8459 in gc_remove_zval_from_buffer ()
#1  0x00763ff8 in ?? ()
#2  0x007480e8 in execute_ex ()
#3  0x006dad99 in zend_execute_scripts ()
#4  0x006799ac in php_execute_script ()
#5  0x00466844 in main ()


[2013-08-29 23:21:22] ras...@php.net

apt-get install gdb


[2013-08-29 23:19:19] michael dot heuberger at binarykitchen dot com

PS: The gdb command does not exist on my machine.


[2013-08-29 23:15:34] michael dot heuberger at binarykitchen dot com

Ah, I managed it. I have the core dumps now.

You forgot to mention that I have to adjust /etc/php5/fpm/pool.d/www.conf with 
a higher value than zero, i.E. rlimit_core = 10

I have 10 core dumps, all 119 MB large. How can I attach them here or hand them 
over to you?


[2013-08-29 23:06:24] michael dot heuberger at binarykitchen dot com

Thank you but I am unable to create a backtrace on my server.

I have set /proc/sys/kernel/core_pattern with
echo /var/cores/core-%e.%p  /proc/sys/kernel/core_pattern 

Then I made /var/cores/ writeable for user www-data and chmodded it with 777. 
Then sudo service php5-fpm restart and reloaded the page. It crashed but no 
core was dumped. Why? ulimit is unlimited.

By the way, I am on nginx. Your instructions are for Apache.




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


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


Bug #65584 [Opn]: recv() failed (104: Connection reset by peer) while reading response ...

2013-08-29 Thread michael dot heuberger at binarykitchen dot com
Edit report at https://bugs.php.net/bug.php?id=65584edit=1

 ID: 65584
 User updated by:michael dot heuberger at binarykitchen dot com
 Reported by:michael dot heuberger at binarykitchen dot com
 Summary:recv() failed (104: Connection reset by peer) while
 reading response ...
 Status: Open
 Type:   Bug
 Package:FPM related
 Operating System:   Ubuntu 13.04
 PHP Version:5.5.3
 Block user comment: N
 Private report: N

 New Comment:

I tried to parse it with apport-retrace but it is not helpful:

$ apport-retrace -R -g /var/crash/_usr_sbin_php5-fpm.33.crash
GNU gdb (GDB) 7.5.91.20130417-cvs-ubuntu
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
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-linux-gnu.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Reading symbols from /usr/sbin/php5-fpm...(no debugging symbols found)...done.
[New LWP 2530]
warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library /lib/x86_64-linux-gnu/libthread_db.so.1.
Core was generated by `php-fpm: pool www
   '.
Program terminated with signal 11, Segmentation fault.
#0  0x006f8459 in gc_remove_zval_from_buffer ()
(gdb)


Previous Comments:

[2013-08-30 00:27:22] michael dot heuberger at binarykitchen dot com

I also see a file in /var/crash/
_usr_sbin_php5-fpm.33.crash

It is full with binary data. I tried to run it with gdb but no success.


[2013-08-29 23:26:15] michael dot heuberger at binarykitchen dot com

Thx!

I have the dump here. An clues?

$ sudo gdb /usr/sbin/php5-fpm /var/cores/core-php5-fpm.31743
GNU gdb (GDB) 7.5.91.20130417-cvs-ubuntu
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
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-linux-gnu.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /usr/sbin/php5-fpm...(no debugging symbols found)...done.
[New LWP 31743]

warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library /lib/x86_64-linux-gnu/libthread_db.so.1.
Core was generated by `php-fpm: pool www
   '.
Program terminated with signal 11, Segmentation fault.
#0  0x006f8459 in gc_remove_zval_from_buffer ()
(gdb) bt
#0  0x006f8459 in gc_remove_zval_from_buffer ()
#1  0x00763ff8 in ?? ()
#2  0x007480e8 in execute_ex ()
#3  0x006dad99 in zend_execute_scripts ()
#4  0x006799ac in php_execute_script ()
#5  0x00466844 in main ()


[2013-08-29 23:21:22] ras...@php.net

apt-get install gdb


[2013-08-29 23:19:19] michael dot heuberger at binarykitchen dot com

PS: The gdb command does not exist on my machine.


[2013-08-29 23:15:34] michael dot heuberger at binarykitchen dot com

Ah, I managed it. I have the core dumps now.

You forgot to mention that I have to adjust /etc/php5/fpm/pool.d/www.conf with 
a higher value than zero, i.E. rlimit_core = 10

I have 10 core dumps, all 119 MB large. How can I attach them here or hand them 
over to you?




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


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


Bug #65584 [Fbk-Opn]: recv() failed (104: Connection reset by peer) while reading response ...

2013-08-29 Thread michael dot heuberger at binarykitchen dot com
Edit report at https://bugs.php.net/bug.php?id=65584edit=1

 ID: 65584
 User updated by:michael dot heuberger at binarykitchen dot com
 Reported by:michael dot heuberger at binarykitchen dot com
 Summary:recv() failed (104: Connection reset by peer) while
 reading response ...
-Status: Feedback
+Status: Open
 Type:   Bug
 Package:FPM related
 Operating System:   Ubuntu 13.04
 PHP Version:5.5.3
 Block user comment: N
 Private report: N

 New Comment:

Happy to give your snapshots a try but do not how to install these. I installed 
PHP-FPM via apt-get.


Previous Comments:

[2013-08-30 03:28:06] larue...@php.net

Please try using this snapshot:

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

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


we fixed some segfaults issues recently, maybe you could have a try..thanks


[2013-08-30 03:08:02] larue...@php.net

hmm, the backtrace is too generic, I can not get any useful info from there.

are you able to get a reproduce test script?


[2013-08-30 00:31:15] michael dot heuberger at binarykitchen dot com

I tried to parse it with apport-retrace but it is not helpful:

$ apport-retrace -R -g /var/crash/_usr_sbin_php5-fpm.33.crash
GNU gdb (GDB) 7.5.91.20130417-cvs-ubuntu
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
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-linux-gnu.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Reading symbols from /usr/sbin/php5-fpm...(no debugging symbols found)...done.
[New LWP 2530]
warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library /lib/x86_64-linux-gnu/libthread_db.so.1.
Core was generated by `php-fpm: pool www
   '.
Program terminated with signal 11, Segmentation fault.
#0  0x006f8459 in gc_remove_zval_from_buffer ()
(gdb)


[2013-08-30 00:27:22] michael dot heuberger at binarykitchen dot com

I also see a file in /var/crash/
_usr_sbin_php5-fpm.33.crash

It is full with binary data. I tried to run it with gdb but no success.


[2013-08-29 23:26:15] michael dot heuberger at binarykitchen dot com

Thx!

I have the dump here. An clues?

$ sudo gdb /usr/sbin/php5-fpm /var/cores/core-php5-fpm.31743
GNU gdb (GDB) 7.5.91.20130417-cvs-ubuntu
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
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-linux-gnu.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /usr/sbin/php5-fpm...(no debugging symbols found)...done.
[New LWP 31743]

warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library /lib/x86_64-linux-gnu/libthread_db.so.1.
Core was generated by `php-fpm: pool www
   '.
Program terminated with signal 11, Segmentation fault.
#0  0x006f8459 in gc_remove_zval_from_buffer ()
(gdb) bt
#0  0x006f8459 in gc_remove_zval_from_buffer ()
#1  0x00763ff8 in ?? ()
#2  0x007480e8 in execute_ex ()
#3  0x006dad99 in zend_execute_scripts ()
#4  0x006799ac in php_execute_script ()
#5  0x00466844 in main ()




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


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


Bug #65584 [Opn]: recv() failed (104: Connection reset by peer) while reading response ...

2013-08-29 Thread michael dot heuberger at binarykitchen dot com
Edit report at https://bugs.php.net/bug.php?id=65584edit=1

 ID: 65584
 User updated by:michael dot heuberger at binarykitchen dot com
 Reported by:michael dot heuberger at binarykitchen dot com
 Summary:recv() failed (104: Connection reset by peer) while
 reading response ...
 Status: Open
 Type:   Bug
 Package:FPM related
 Operating System:   Ubuntu 13.04
 PHP Version:5.5.3
 Block user comment: N
 Private report: N

 New Comment:

I managed to get more logging information.

In the log I see this fatal error:

[30-Aug-2013 17:05:50 Pacific/Auckland] PHP Fatal error:  Cannot redeclare 
class SGL_Request in /opt/bk/lib/SGL/Request.php on line 53

But in my spl_autoload_register function I already test with this to make sure 
classes won't be redeclared:

public static function isLoaded($name)
{
return class_exists($name, false) || interface_exists($name, false);
}

But when, why doesn't it work?


Previous Comments:

[2013-08-30 04:31:59] michael dot heuberger at binarykitchen dot com

Happy to give your snapshots a try but do not how to install these. I installed 
PHP-FPM via apt-get.


[2013-08-30 03:28:06] larue...@php.net

Please try using this snapshot:

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

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


we fixed some segfaults issues recently, maybe you could have a try..thanks


[2013-08-30 03:08:02] larue...@php.net

hmm, the backtrace is too generic, I can not get any useful info from there.

are you able to get a reproduce test script?


[2013-08-30 00:31:15] michael dot heuberger at binarykitchen dot com

I tried to parse it with apport-retrace but it is not helpful:

$ apport-retrace -R -g /var/crash/_usr_sbin_php5-fpm.33.crash
GNU gdb (GDB) 7.5.91.20130417-cvs-ubuntu
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
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-linux-gnu.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Reading symbols from /usr/sbin/php5-fpm...(no debugging symbols found)...done.
[New LWP 2530]
warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library /lib/x86_64-linux-gnu/libthread_db.so.1.
Core was generated by `php-fpm: pool www
   '.
Program terminated with signal 11, Segmentation fault.
#0  0x006f8459 in gc_remove_zval_from_buffer ()
(gdb)


[2013-08-30 00:27:22] michael dot heuberger at binarykitchen dot com

I also see a file in /var/crash/
_usr_sbin_php5-fpm.33.crash

It is full with binary data. I tried to run it with gdb but no success.




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


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


Bug #65584 [Opn]: recv() failed (104: Connection reset by peer) while reading response ...

2013-08-29 Thread michael dot heuberger at binarykitchen dot com
Edit report at https://bugs.php.net/bug.php?id=65584edit=1

 ID: 65584
 User updated by:michael dot heuberger at binarykitchen dot com
 Reported by:michael dot heuberger at binarykitchen dot com
 Summary:recv() failed (104: Connection reset by peer) while
 reading response ...
 Status: Open
 Type:   Bug
 Package:FPM related
 Operating System:   Ubuntu 13.04
 PHP Version:5.5.3
 Block user comment: N
 Private report: N

 New Comment:

I also found out, that when I comment out logic around $_COOKIE (auto-login 
feature), then my site is back up working.

Does PHP 5.5.3 have issues with $_COOKIE?


Previous Comments:

[2013-08-30 05:12:09] michael dot heuberger at binarykitchen dot com

I managed to get more logging information.

In the log I see this fatal error:

[30-Aug-2013 17:05:50 Pacific/Auckland] PHP Fatal error:  Cannot redeclare 
class SGL_Request in /opt/bk/lib/SGL/Request.php on line 53

But in my spl_autoload_register function I already test with this to make sure 
classes won't be redeclared:

public static function isLoaded($name)
{
return class_exists($name, false) || interface_exists($name, false);
}

But when, why doesn't it work?


[2013-08-30 04:31:59] michael dot heuberger at binarykitchen dot com

Happy to give your snapshots a try but do not how to install these. I installed 
PHP-FPM via apt-get.


[2013-08-30 03:28:06] larue...@php.net

Please try using this snapshot:

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

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


we fixed some segfaults issues recently, maybe you could have a try..thanks


[2013-08-30 03:08:02] larue...@php.net

hmm, the backtrace is too generic, I can not get any useful info from there.

are you able to get a reproduce test script?


[2013-08-30 00:31:15] michael dot heuberger at binarykitchen dot com

I tried to parse it with apport-retrace but it is not helpful:

$ apport-retrace -R -g /var/crash/_usr_sbin_php5-fpm.33.crash
GNU gdb (GDB) 7.5.91.20130417-cvs-ubuntu
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
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-linux-gnu.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Reading symbols from /usr/sbin/php5-fpm...(no debugging symbols found)...done.
[New LWP 2530]
warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library /lib/x86_64-linux-gnu/libthread_db.so.1.
Core was generated by `php-fpm: pool www
   '.
Program terminated with signal 11, Segmentation fault.
#0  0x006f8459 in gc_remove_zval_from_buffer ()
(gdb)




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


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


Bug #65093 [Com]: password_hash ignores salts with spaces

2013-06-22 Thread michael at squiloople dot com
Edit report at https://bugs.php.net/bug.php?id=65093edit=1

 ID: 65093
 Comment by: michael at squiloople dot com
 Reported by:michael at squiloople dot com
 Summary:password_hash ignores salts with spaces
 Status: Open
 Type:   Bug
 Package:hash related
 Operating System:   Windows Vista SP2
 PHP Version:5.5.0
 Block user comment: N
 Private report: N

 New Comment:

Would it be worth then having an error or a boolean/null return value rather 
than 
have it fail silently? If at any point the allowed characters for the salt 
were 
to extend then past hashes (where a salt was generated by the developer with 
previously invalid characters) would be broken.

If you give the developer the option to provide a value then surely it should 
be 
either accepted or denied rather than just ignored.


Previous Comments:

[2013-06-22 05:48:33] r...@php.net

I think it's only a documentation problem which should explains which are the 
allowed characters in the salt (from code: a-z A-Z 0-9 . /)

(notice: It is strongly recommended that you do not generate your own salt for 
this function)


[2013-06-21 22:37:03] michael at squiloople dot com

Description:

When manually setting a salt which contains spaces the function ignores it and 
automatically generates its own.

Test script:
---
  echo password_hash('this is a test', PASSWORD_DEFAULT, array('salt' = 
'thisisatestthisisatest'));

  echo 'br';

  echo password_hash('this is a test', PASSWORD_DEFAULT, array('salt' = 
'thisisatestthisis test'));

Expected result:

$2y$10$thisisatestthisisateseLNFJ7M2ONUSijVBKli7sVFN6rQm7o36
$2y$10$thisisatestthisis tesOZPioeRNSLNeG3cuJW56OSusfQ5SjKdO

(with the part after the salt being whatever it would be)

Actual result:
--
$2y$10$thisisatestthisisateseLNFJ7M2ONUSijVBKli7sVFN6rQm7o36
$2y$10$dGhpc2lzYXRlc3R0aGlzaOZPioeRNSLNeG3cuJW56OSusfQ5SjKdO






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


[PHP-BUG] Bug #65092 [NEW]: Neither errors nor result with generators and anonymous functions

2013-06-21 Thread michael at squiloople dot com
From: michael at squiloople dot com
Operating system: Windows Vista SP2
PHP version:  5.5.0
Package:  Arrays related
Bug Type: Bug
Bug description:Neither errors nor result with generators and anonymous 
functions

Description:

When using generators with an anonymous function neither an error nor the
expected 
result are shown.

Test script:
---
  foreach (function ()
  {

for ($i = 1; $i = 10; ++$i)
{
  yield $i = $i;
}

  } as $key = $value)
  {
echo $key . ': ' . $value . 'br';
  }

Expected result:

Either:

1: 1
2: 2
3: 3
4: 4
5: 5
6: 6
7: 7
8: 8
9: 9
10: 10

Or an error of some sort.

Actual result:
--
[neither result nor error]

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



[PHP-BUG] Bug #65093 [NEW]: password_hash ignores salts with spaces

2013-06-21 Thread michael at squiloople dot com
From: michael at squiloople dot com
Operating system: Windows Vista SP2
PHP version:  5.5.0
Package:  hash related
Bug Type: Bug
Bug description:password_hash ignores salts with spaces

Description:

When manually setting a salt which contains spaces the function ignores it
and 
automatically generates its own.

Test script:
---
  echo password_hash('this is a test', PASSWORD_DEFAULT, array('salt' =
'thisisatestthisisatest'));

  echo 'br';

  echo password_hash('this is a test', PASSWORD_DEFAULT, array('salt' =
'thisisatestthisis test'));

Expected result:

$2y$10$thisisatestthisisateseLNFJ7M2ONUSijVBKli7sVFN6rQm7o36
$2y$10$thisisatestthisis tesOZPioeRNSLNeG3cuJW56OSusfQ5SjKdO

(with the part after the salt being whatever it would be)

Actual result:
--
$2y$10$thisisatestthisisateseLNFJ7M2ONUSijVBKli7sVFN6rQm7o36
$2y$10$dGhpc2lzYXRlc3R0aGlzaOZPioeRNSLNeG3cuJW56OSusfQ5SjKdO

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



Req #64603 [Com]: missing function to close persistent connection

2013-05-25 Thread michael at mjburgess dot co dot uk
Edit report at https://bugs.php.net/bug.php?id=64603edit=1

 ID: 64603
 Comment by: michael at mjburgess dot co dot uk
 Reported by:slavb18 at gmail dot com
 Summary:missing function to close persistent connection
 Status: Open
 Type:   Feature/Change Request
 Package:PDO related
 Operating System:   Any
 PHP Version:5.3.23
 Block user comment: N
 Private report: N

 New Comment:

I've confirmed this


Previous Comments:

[2013-04-07 07:24:16] slavb18 at gmail dot com

may be there is also third way to resolve problem

1. PDO class should have function
public function isValid(){
return TRUE; // or some embedded functional like start/finish transaction ? 
dont know how it work with other drivers
}
2. derived class override  implement method isValid() (like in my example)
3. php before returning PDO class from connection pool should call isValid() 
method, and if validation the result is false, then automatically refresh 
connection


[2013-04-07 07:13:03] slavb18 at gmail dot com

there is similiar Bug #40681 with oracle


[2013-04-07 07:11:12] slavb18 at gmail dot com

Description:

PHP PDO class is missing ability to close persistent connection:
__destruct does not close it, even if I call 
setAttribute(PDO::ATTR_PERSISTENT,FALSE) before destruction
May be __destruct should analyze PDO::ATTR_PERSISTENT attribute or there should 
be explicit function to close persistent connection.

Need to close invalid (shutdown) peristent connection demonstrate example below:

Example with firebird:
1. establish persistent connect in php
2. shutdown connection on server
3. try to get persistent connect from php again
there will be error General error: -902 connection shutdown

I can check connection validity in my pdo derived class like this:
public function isValid(){
$valid=TRUE;
try {
$this-beginTransaction();
$this-commit();
} catch (PDOException $e){
$valid=FALSE;
}
return $valid;
}

but I can not refresh or close my broken connection, there is no function 
to free it in php connection pool







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


Bug #45735 [Com]: preg_match fails with Segmentation Fault on capturing subpattern

2013-04-11 Thread michael at writhem dot com
Edit report at https://bugs.php.net/bug.php?id=45735edit=1

 ID: 45735
 Comment by: michael at writhem dot com
 Reported by:johnston dot joshua at gmail dot com
 Summary:preg_match fails with Segmentation Fault on
 capturing subpattern
 Status: Not a bug
 Type:   Bug
 Package:PCRE related
 Operating System:   *
 PHP Version:5.2CVS, 5.3CVS, 6CVS (2008-08-06)
 Block user comment: N
 Private report: N

 New Comment:

why is this status not a bug?


Previous Comments:

[2011-12-23 13:09:46] vojtech dot kurka at gmail dot com

We have hit this bug today on 5.3.8, just sending 70KB variable as an input to 
preg_match_all().

Please fix this, it took us quite a lot of time to find the root cause. This 
should never cause a segfault. If the preg_match_all() function would throw a 
standard PHP error/warning, we would find the problem immeadiately. Debugging 
such problems is just a waste of time, this bugreport is more than 3 years old.


[2011-12-15 14:42:35] josiecki at silvercube dot pl

Why is this bug status set to Bogus? Seems to be unsolved since over three 
years, and I haven't found a single PHP installation that would not be 
vulnerable to this, including quite new 5.3.8 installation...


[2008-08-07 13:44:55] johnston dot joshua at gmail dot com

Just for my own personal knowledge, is it the capturing pattern the part that 
causes the recursion?

If I remove the () part of the pattern I can keep adding 0's to the below code 
I can trigger a php memory error but no seg fault.

jjohnston:~$ php -r 'preg_match(/http:\/\/.+\.ru/i, 
str_repeat(http://google.ru;, 200));


[2008-08-07 11:27:29] lbarn...@php.net

I seen that PCRE has a NO_RECURSE flag to avoid the recursion in
match() (described in pcre_exec.c).

Defining NO_RECURSE at compile time avoids this problem :)

diff -u -r1.38.2.3.2.10.2.3 config0.m4
--- ext/pcre/config0.m4 2 Jun 2008 14:12:20 -  
1.38.2.3.2.10.2.3
+++ ext/pcre/config0.m4 7 Aug 2008 11:25:39 -
@@ -59,7 +59,7 @@
 pcrelib/pcre_ord2utf8.c
pcrelib/pcre_refcount.c pcrelib/pcre_study.c \
 pcrelib/pcre_tables.c
pcrelib/pcre_try_flipped.c pcrelib/pcre_valid_utf8.c \
 pcrelib/pcre_version.c
pcrelib/pcre_xclass.c
-PHP_NEW_EXTENSION(pcre, $pcrelib_sources php_pcre.c, no,,-
+PHP_NEW_EXTENSION(pcre, $pcrelib_sources php_pcre.c, no,,-
 PHP_ADD_BUILD_DIR($ext_builddir/pcrelib)
 PHP_INSTALL_HEADERS([ext/pcre], [php_pcre.h pcrelib/])
 AC_DEFINE(HAVE_BUNDLED_PCRE, 1, [ ])



[2008-08-07 08:28:20] der...@php.net

AFAIK only be using a non-stack based evaluator (pcre_dfa_exec)... which is not 
compatible with the perl regular expressions, see the description at 
http://manpages.courier-mta.org/htmlman3/pcre_dfa_exec.3.html




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


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


Req #38712 [Com]: Add support for CAPABILITY, NAMESPACE etc.

2013-03-28 Thread michael dot radzewitz at freenet-ag dot de
Edit report at https://bugs.php.net/bug.php?id=38712edit=1

 ID: 38712
 Comment by: michael dot radzewitz at freenet-ag dot de
 Reported by:benjamin dot podszun at gmail dot com
 Summary:Add support for CAPABILITY, NAMESPACE etc.
 Status: Open
 Type:   Feature/Change Request
 Package:IMAP related
 Operating System:   *
 PHP Version:5.3
 Block user comment: N
 Private report: N

 New Comment:

The attached patch works fine for us but you should review the source 
code to ensure that all the necessary data structures, error checking
and return values are setup correctly. 

As mentioned in the above comment: The c-client library supports the 
function call on: imap_cap(MAILSTREAM *stream) directly and we just 
call it *directly*! We don't went through the mail interface in the 
c-client library (mail.h/mail.c) which does not support an capability 
function for different drivers. 

As far as we see - this in some way breaks with the previous php imap 
implementation because all the other functions went through these
mail interface functions. This may also the reason why php does not 
support it by now.

Michael R.


Previous Comments:

[2006-09-15 14:42:49] benjamin dot podszun at gmail dot com

Just to make clear that it's not 4.x related or OS dependend..


[2006-09-04 20:52:59] tony2...@php.net

Missing functionality is not a bug.


[2006-09-04 20:52:24] benjamin dot podszun at gmail dot com

Please reconsider your classification again.

php.net/imap links (Section See also) to the imap RFC 
(http://www.faqs.org/rfcs/rfc2060).

Section 6.1.1 describes the CAPABILITY command, something that the php module 
just doesn't support/include. Therefor this is a bug in my book, because the 
(linked/quoted even) RFC is not fully supported.

If there are rules for classifying this as FR I'd kindly like to ask you for 
any hint where I can find them.

My point: CAPABILITY is missing. The RFC includes it. Bug in the (not complete) 
imap implementation/wrapper of PHP.
Yes, the second mentioned command is optional..

Last try,
Ben


[2006-09-04 20:30:55] benjamin dot podszun at gmail dot com

No offense, but you're probably not reading the report right.
I cannot provide a script that demonstrate that PHP is lacking support for 
functions. It would be empty.

Trying to be more clear about this: php.net/imap lists lots of methods. It 
doesn't list (and the source lacks..) methods that wrap the imap command 
CAPABILITY and the imap command NAMESPACE (caps, because they are used like 
this in the RFC).
Since the underlying c-client library, that provides the current imap 
implementation for php, supports these commands (I checked the source for that) 
I hereby ask php to include these commands into the php imap module. While the 
NAMESPACE command is optional (and therefor more or less a feature request) the 
CAPABILITY command is part of the RFC that php.net/imap links to. It's part of 
common imap support. There should be a wrapper in php.

Since there _is_ no wrapper I cannot provide a script that reproduces the 
problem. I hope I provided enough feedback to get this back on track.


[2006-09-04 11:57:57] benjamin dot podszun at gmail dot com

Description:

The current imap modules fails to wrap methods to query for the server 
capabilities and the server namespace. This is crucial for some servers like 
courier-imap with virtual shared folders, since those end up in a different 
namespace and cannot be found without support for both CAPABILITY and NAMESPACE 
imap support.

Reproduce code:
---
IMAP source transcript to show the right way that php should offer as well:


Transcript on my server:

a001 capability
* CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT 
THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION
a001 OK CAPABILITY completed

- My server supports namespace, which is exactly what I want/need to use

a002 namespace
* NAMESPACE ((INBOX. .)) NIL ((#shared. .)(shared. .))
a002 OK NAMESPACE completed.

- As you can see the server supports both shared. and #shared for shared 
folder namespaces. The latter is the one I need/use.

a003 list  *
* LIST (\Marked \HasNoChildren) . INBOX
a003 OK LIST completed

- A wildcard list of everything, without giving any namespace. This results in 
only one response: My INBOX.

a004 list  #shared.*
* LIST (\HasNoChildren) . #shared.support@mydomain de
* LIST (\HasNoChildren) . #shared.sql-bugs@mydomain de
* LIST (\HasNoChildren) . #shared.treffen@mydomain de
* LIST (\HasNoChildren

Bug #53556 [Com]: cURL returns wrong Content-Length after a redirect to a page without CL-header

2013-03-04 Thread michael dot moench at marktjagd dot de
Edit report at https://bugs.php.net/bug.php?id=53556edit=1

 ID: 53556
 Comment by: michael dot moench at marktjagd dot de
 Reported by:michael dot moench at marktjagd dot de
 Summary:cURL returns wrong Content-Length after a redirect
 to a page without CL-header
 Status: No Feedback
 Type:   Bug
 Package:HTTP related
 Operating System:   Ubuntu 10.04
 PHP Version:5.3SVN-2010-12-16 (SVN)
 Block user comment: N
 Private report: N

 New Comment:

To reproduce this error you can use the following three scripts. index.php and 
hello.php are placed on an Apache-Webserver. If you call test.php it will load 
index.php, which returns a content-length of 3 and redirects to hello.php, 
which uses output-buffering and thus causes Apache to omit the content-length 
header. The result is that download_content_length returned by cURL is 3 
instead of NULL or -1.
This might be a bug in libCurl though.

test.php
?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, http://php.local.site/index.php;);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
$output = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);
echo \ndownload_content_length = .$info['download_content_length'].\n;
?

index.php
?php
header('Location: http://php.local.site/hello.php');
echo ...;
?

hello.php
?php
ob_start();
echo 'hello world';
ob_flush();
flush();
ob_end_flush();
?


Previous Comments:

[2013-02-18 00:34:37] php-bugs at lists dot php dot net

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to Open. Thank you.


[2010-12-21 23:02:39] il...@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.




[2010-12-16 18:24:03] cataphr...@php.net

This looks like a problem upstream.


[2010-12-16 13:27:22] michael dot moench at marktjagd dot de

Description:

I have an URL which will redirect me to a second, final URL. The first response 
contains a Content-Length-Header, the second does not. If I set the 
CURLOPT_FOLLOWLOCATION option, I would expect that the 
download_content_length-field from curl_getinfo contains the Content-Length 
of the final URL, in this case 0, but it contains the Content-Length of the 
first Response.

The first Response:

HTTP/1.1 302 Found
Date: Thu, 16 Dec 2010 11:39:31 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Location: http://productdata.download.affili.net/xxx
Set-Cookie: ASP.NET_SessionId=xxx; path=/; HttpOnly
Cache-Control: private
Content-Type: text/html; charset=Windows-1252
Content-Length: 214

The Second Response:

HTTP/1.1 200 OK
Date: Thu, 16 Dec 2010 11:39:32 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Content-Disposition: attachment; filename=xxx.gz
Transfer-Encoding: chunked
Cache-Control: private
Content-Type: application/gzip








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


Bug #61780 [Com]: Inconsistent PCRE captures in match results

2013-02-11 Thread michael at mbaas dot de
Edit report at https://bugs.php.net/bug.php?id=61780edit=1

 ID: 61780
 Comment by: michael at mbaas dot de
 Reported by:danielklein at airpost dot net
 Summary:Inconsistent PCRE captures in match results
 Status: Open
 Type:   Bug
 Package:PCRE related
 PHP Version:5.4.0
 Block user comment: N
 Private report: N

 New Comment:

Here is a reproduceable example (PHP 5.3.20 and 5.3.21) where named captures do 
not return matches at all! I've tested this pattern against the PCRE-
Implementation in another language and it worked...

?php


$QQ=chr(92) . chr(34);
$delimeters = {};
$del0 = preg_quote($delimeters{0});
$del1 = preg_quote($delimeters{1});
$tag=language;
$string=fdfdfdfdf{language=1}testhgg;
$preg = ~ . $del0 . $tag . \s*=\s*(?P . quote[ . $QQ . \']*)(?
Patt.*?)(?P=quote)\s*/ . $del1 . ~;
$match=array();
preg_match($preg,$string,$match);
echo brstring =  . htmlspecialchars($string) . brpreg= . 
htmlspecialchars($preg) . brmatch:pre;var_dump($match);echo/pre;


?


Previous Comments:

[2012-04-20 00:54:39] danielklein at airpost dot net

Description:

Named and unnamed captures in both preg_match and preg_match_all (and probably 
preg_replace and the other PCRE functions too but I haven't tested them all) 
can capture the wrong number of parentheses if alternation or a zero-or-more 
quantifier is used.

If the pattern '/(?bb)|(?cc)|(?dd)/' is used to match 'c', both 'b' and 
'c' will be set in the results array but 'd' won't be. 'b' should not be set 
(even to an empty string) as it failed to match anything. However, if it was 
trying to match '/(?bb?)(?cc)/' (note: optional 'b' AND mandatory 'c'), 'b' 
_should_ be set to '' as it's allowed to match a zero-length string. If a match 
gets tried but it fails and a capture later in the pattern works, the skipped 
capture should never produce a key in the results array. It should be OK to 
leave holes in the numbered sequence (e.g. match 0 and 2 but not 1).

Currently, you need to use PREG_OFFSET_CAPTURE and test to see if the key 
exists, and if it does, test to see if the capture position is -1. If this bug 
is fixed, capture positions will never be -1 as the key won't exist. 
Alternatively, an additional flag could be added (e.g. PREG_KEEP_NONMATCHES) to 
create keys for ALL captures whether used or not (so, in the first pattern 
above, keys would be created for 'b', 'c' and 'd' in all cases, and if matching 
the string 'c' the offsets for both 'b' and 'd' would be -1).

In summary, if the pattern '/(?bb)|(?cc)|(?dd)/' is used to match 'c', by 
default it should only ever create a key for 'c'. If desired, an additional 
flag could be added so that it creates keys for all captures: 'b', 'c' and 'd'. 
The current behaviour where it creates a key for 'b' and 'c' but not 'd' should 
be considered a bug and fixed.

Test script:
---
print('pre');
$offset = 0;
while (preg_match('/(?:(?bb)|(?cc)|(?dd))(?ee)?/', 'cdec', $matches, 
PREG_OFFSET_CAPTURE, $offset)) {
  $offset = $matches[0][1] + strlen($matches[0][0]);
  var_export($matches);
  print(\n\n);
}

print(\n\n);

preg_match_all('/(?:(?bb)|(?cc)|(?dd))(?ee)?/', 'cdec', $matches, 
PREG_OFFSET_CAPTURE | PREG_SET_ORDER);
var_export($matches);
print('/pre');


Expected result:

array (
  0 = 
  array (
0 = 'c',
1 = 0,
  ),
  'c' = 
  array (
0 = 'c',
1 = 0,
  ),
  2 = 
  array (
0 = 'c',
1 = 0,
  ),
)

array (
  0 = 
  array (
0 = 'de',
1 = 1,
  ),
  'd' = 
  array (
0 = 'd',
1 = 1,
  ),
  3 = 
  array (
0 = 'd',
1 = 1,
  ),
  'e' = 
  array (
0 = 'e',
1 = 2,
  ),
  4 = 
  array (
0 = 'e',
1 = 2,
  ),
)

array (
  0 = 
  array (
0 = 'c',
1 = 3,
  ),
  'c' = 
  array (
0 = 'c',
1 = 3,
  ),
  2 = 
  array (
0 = 'c',
1 = 3,
  ),
)



array (
  0 = 
  array (
0 = 
array (
  0 = 'c',
  1 = 0,
),
'c' = 
array (
  0 = 'c',
  1 = 0,
),
2 = 
array (
  0 = 'c',
  1 = 0,
),
  ),
  1 = 
  array (
0 = 
array (
  0 = 'de',
  1 = 1,
),
'd' = 
array (
  0 = 'd',
  1 = 1,
),
3 = 
array (
  0 = 'd',
  1 = 1,
),
'e' = 
array (
  0 = 'e',
  1 = 2,
),
4 = 
array (
  0 = 'e',
  1 = 2,
),
  ),
  2 = 
  array (
0 = 
array (
  0 = 'c',
  1 = 3,
),
'c' = 
array (
  0 = 'c',
  1 = 3,
),
2 = 
array (
  0 = 'c',
  1 = 3,
),
  ),
)

Actual result:
--
array (
  0 = 
  array (
0 = 'c',
1 = 0,
  ),
  'b' = 
  array (
0 = '',
1 = -1,
  ),
  1 = 
  array (
0 = '',
1 = -1,
  ),
  'c' = 
  array (
0 = 'c',
1 = 0,
  ),
  2 = 
  array (
0 = 'c',
1 = 0

[PHP-BUG] Bug #64169 [NEW]: opendir not working with sftp since upgrade from php 5.3.14 to 5.3.21

2013-02-07 Thread michael dot dalbosco at gmail dot com
From: michael dot dalbosco at gmail dot com
Operating system: Debian 4.4.5-8
PHP version:  5.3.21
Package:  Directory function related
Bug Type: Bug
Bug description:opendir not working with sftp since upgrade from php 5.3.14 to 
5.3.21

Description:

---
From manual page:
http://www.php.net/function.opendir#refsect1-function.opendir-description
---

I'm connecting to a Sftp server and try to open a directory on this server.
It worked fine on php 5.3.10 and php 5.3.14 but since we upgraded to 5.3.21
it doesn't work anymore, opendir returns false.


Test script:
---
$con = ssh2_connect($server, $port);
ssh2_auth_pubkey_file ( $con, $login, $pubKeyFile, $privKeyFile);
$sftp = ssh2_sftp($con);
$dir = ssh2.sftp://$sftp/;;
var_dump(opendir($dir));

Expected result:

the directory resource

Actual result:
--
false

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



Req #42516 [Com]: __FILE__ resolves symlinks

2013-01-24 Thread michael at zedeler dot dk
Edit report at https://bugs.php.net/bug.php?id=42516edit=1

 ID: 42516
 Comment by: michael at zedeler dot dk
 Reported by:michael at zedeler dot dk
 Summary:__FILE__ resolves symlinks
 Status: Not a bug
 Type:   Feature/Change Request
 Package:Scripting Engine problem
 Operating System:   Linux
 PHP Version:4.4.7
 Block user comment: N
 Private report: N

 New Comment:

I agree that this isn't a bug. I filed it as a change/feature request. Please 
revert.


Previous Comments:

[2013-01-23 19:01:16] paj...@php.net

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

It is required by require_once and include_once, along other things (realpath 
cache). It always been like that.


[2013-01-23 17:36:39] ale dot comp_06 at xox dot ch

On development server I often have symlinked directories to common libraries.

It would be wonderful to have an option for the behavior of __FILE__ and allow 
it to return the non resolved path if the developer wishes so.

Generally speaking, having some paths automatically resolved and some not, is 
very disturbing. As far I can tell, all paths should be unresolved and one 
should use resolve_path() to get the real path. A central switch should 
allow to get all the paths resolved if one wants so (or the other way: the 
default being the paths being resolved and the switch makes them unresolved).


[2012-06-15 07:43:47] daniele dot segato at gmail dot com

This bug was open since 2007

would you mind assigning it to someone for fixing or discuss why you are 
leaving 
it open?
maybe someone out there can help you

thank you


[2012-04-06 17:28:55] bj...@php.net

I don't know why this was assigned to me


[2011-08-20 09:56:33] clicky at erebot dot net

Also, the DOCUMENT_ROOT workaround only works in case you're dealing with a 
website. It's completely useless in case you're working from a terminal (eg. 
some unit tests run through PHPUnit).

+1 on having this behaviour changed (maybe as a second magic constant as other 
proposed, so as not to break backward compatibility for __FILE__).




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


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


Bug #63379 [Com]: Warning when using session_regenerate_id(TRUE) with a SessionHandler

2012-11-25 Thread cheap-michael-kors-handbags at hotmail dot com
Edit report at https://bugs.php.net/bug.php?id=63379edit=1

 ID: 63379
 Comment by: cheap-michael-kors-handbags at hotmail dot com
 Reported by:avatar2004-php at yahoo dot fr
 Summary:Warning when using session_regenerate_id(TRUE) with
 a SessionHandler
 Status: Assigned
 Type:   Bug
 Package:Session related
 Operating System:   Gentoo
 PHP Version:5.4.8
 Assigned To:arpad
 Block user comment: N
 Private report: N

 New Comment:

I think if you have gone to a 
href=http://www.cheap-michael-kors-handbags-outlet.com/;strongmichael kors 
handbags outlet/strong/a,then you will find the a 
href=http://www.cheap-michael-kors-handbags-outlet.com/;strongmichael kors 
factory outlet/strong/a is really so good .In fact its function is nice 
too.All stuffs here are a 
href=http://www.cheap-michael-kors-handbags-outlet.com/;strongmichael kors 
handbags/strong/a.I think you won't be empty-handed.


Previous Comments:

[2012-11-25 12:44:35] beatdrdre at hotmail dot com

Whereever we go,we always hope to get perfect things.a 
href=http://www.cheap-beats-by-dre-sale-outlet.com/;strongbeats by dre 
sale/strong/a is such a place that offer me good items.a 
href=http://www.cheap-beats-by-dre-sale-outlet.com/;strongwholesale beats 
by dre/strong/a is quite good with the service.I like the a 
href=http://www.cheap-beats-by-dre-sale-outlet.com/;strongbeats by dre 
outlet/strong/a.So I want you can love it too.


[2012-10-29 04:21:47] avatar2004-php at yahoo dot fr

Looking at the code, it feels like the very semantics of the mod_user_is_open 
flag are not exactly consistent.

The flag is a global, yet it is manipulated by instance code. Meaning if the 
user space code uses several handlers interchangeably, the result can quickly 
become confusing.

I suggest a decision should be made as to whether the SessionHandler is a 
stateless, thin wrapper for the handler calls in which case it should default 
to the same checks as the procedural API. Otherwise, the flag should really be 
an instance variable used to track the proper invocation sequence of the 
different callbacks and make sure THIS handler is open before calling dependent 
routines.

Adding an instance variable to the (base) class though is probably not worth 
it. The session management semantics are already defined by the procedural API 
which uses a global session state flag (session_status). If required for a 
handler implementation, the flag can simply be implemented in user space.

Just my 2c.


[2012-10-29 03:07:41] larue...@php.net

I mean, maybe only reset it in close handler?


[2012-10-29 03:07:08] larue...@php.net

is the reseting of user_is_open necessary?

diff --git a/ext/session/mod_user_class.c b/ext/session/mod_user_class.c
index 70d2f40..4edac28 100644
--- a/ext/session/mod_user_class.c
+++ b/ext/session/mod_user_class.c
@@ -121,7 +121,6 @@ PHP_METHOD(SessionHandler, destroy)
return;
}

-   PS(mod_user_is_open) = 0;
RETVAL_BOOL(SUCCESS == PS(default_mod)-s_destroy(PS(mod_data), key 
TSRMLS_CC));
 }
 /* }}} */


[2012-10-29 01:14:11] avatar2004-php at yahoo dot fr

If I understand correctly and mod_user_is_open is just a global state 
parameter used by the SessionHandler instance, I was wondering why the check 
wasn't being done on session_status instead to conform with the rest of the 
session_* API ?




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


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


Bug #63413 [Com]: Intermittent warning and fatal error on require() statement

2012-11-25 Thread cheap-michael-kors-handbags at hotmail dot com
Edit report at https://bugs.php.net/bug.php?id=63413edit=1

 ID: 63413
 Comment by: cheap-michael-kors-handbags at hotmail dot com
 Reported by:ben at indietorrent dot org
 Summary:Intermittent warning and fatal error on require()
 statement
 Status: Open
 Type:   Bug
 Package:Scripting Engine problem
 Operating System:   Windows 7 x64
 PHP Version:5.4.8
 Block user comment: N
 Private report: N

 New Comment:

I think if you have gone to a 
href=http://www.cheap-michael-kors-handbags-outlet.com/;strongmichael kors 
handbags outlet/strong/a,then you will find the a 
href=http://www.cheap-michael-kors-handbags-outlet.com/;strongmichael kors 
factory outlet/strong/a is really so good .In fact its function is nice 
too.All stuffs here are a 
href=http://www.cheap-michael-kors-handbags-outlet.com/;strongmichael kors 
handbags/strong/a.I think you won't be empty-handed.


Previous Comments:

[2012-11-25 12:45:53] beatdrdre at hotmail dot com

Whereever we go,we always hope to get perfect things.a 
href=http://www.cheap-beats-by-dre-sale-outlet.com/;strongbeats by dre 
sale/strong/a is such a place that offer me good items.a 
href=http://www.cheap-beats-by-dre-sale-outlet.com/;strongwholesale beats 
by dre/strong/a is quite good with the service.I like the a 
href=http://www.cheap-beats-by-dre-sale-outlet.com/;strongbeats by dre 
outlet/strong/a.So I want you can love it too.


[2012-11-16 16:29:11] ben at indietorrent dot org

Additional testing indicates that this problem is likely related to a specific 
piece of software that has been installed on the affected machines, and not PHP 
or the manner in which it is integrated with Apache.

I tested the steps-to-reproduce with the exact same project/code-base on a LAMP 
stack (Ubuntu 12.04 + Apache 2.2.22 + MySQL 5.5.24 + PHP 5.3.10) and cannot 
reproduce the issue, no matter how hard I hammer the server with requests.

As mentioned previously, I am unable to reproduce this issue with a comparable 
stack on Mac OS 10.8, either.

These facts pointed to a Windows-specific cause, perhaps related to Apache's 
winnt MPM, so I setup a VM with a pristine Windows 7 x86 installation. I 
installed the same stack components as are installed on the computers on which 
this issue occurs. Yet, after several hours of hammering the server with 
constant page-requests, not a single error has been registered in PHP's error 
log.

If at any point I'm able to determine which software causes this issue, I will 
post my findings here.


[2012-11-05 15:45:02] ben at indietorrent dot org

Another update.

I began to suspect that this is a thread-safety issue, so I downloaded the 
latest non-thread-safe version of PHP and configured Apache to serve PHP files 
via Fast-CGI (mod_fcgid).

To my surprise, this problem still occurs, and it seems to be worse with 
Fast-CGI than with Mod-PHP.

Also, I tried to reproduce the problem on a Mac with Mac OS 10.8 and a fairly 
modern MAMP installation that runs PHP via Mod-PHP. No matter how hard I 
hammered on Apache, these spurious require() failures did not occur.


[2012-11-01 21:07:42] ben at indietorrent dot org

It occurred to me to examine Apache's internal error log for entries that 
correspond to those in PHP's error log when this occurs. I noticed what may be 
an important clue.

Sample entries in PHP's error log:

---
[01-Nov-2012 13:29:41 America/New_York] PHP Warning:  
require(../include/global.inc.php): failed to open stream: No such file or 
directory in C:\Users\Ben\Documents\Projects\project 
Testing\project-svn\trunk\public\auxiliary\css.php on line 5

[01-Nov-2012 13:29:41 America/New_York] PHP Fatal error:  require(): Failed 
opening required '../include/global.inc.php' (include_path='.;C:\Program 
Files\php\includes;C:\Program Files\php\PEAR\pear') in 
C:\Users\Ben\Documents\Projects\project 
Testing\project-svn\trunk\public\auxiliary\css.php on line 5

[01-Nov-2012 13:29:43 America/New_York] PHP Warning:  
require(C:/Users/Ben/Documents/Apache/project/protected/constants.inc.php): 
failed to open stream: No such file or directory in 
C:\Users\Ben\Documents\Projects\project 
Testing\project-svn\trunk\public\include\global.inc.php on line 18

[01-Nov-2012 13:29:43 America/New_York] PHP Fatal error:  require(): Failed 
opening required 
'C:/Users/Ben/Documents/Apache/project/protected/constants.inc.php' 
(include_path='.;C:\Program Files\php\includes;C:\Program Files\php\PEAR\pear') 
in C:\Users\Ben\Documents\Projects\project 
Testing\project-svn\trunk\public\include\global.inc.php on line 18

Bug #55290 [Com]: \NumberFormatter::parseCurrency() fails

2012-10-23 Thread mail at michael-weimann dot eu
Edit report at https://bugs.php.net/bug.php?id=55290edit=1

 ID: 55290
 Comment by: mail at michael-weimann dot eu
 Reported by:franssen dot roland at gmail dot com
 Summary:\NumberFormatter::parseCurrency() fails
 Status: Open
 Type:   Bug
 Package:I18N and L10N related
 Operating System:   Linux
 PHP Version:5.3.6 - 5.3.8
 Block user comment: N
 Private report: N

 New Comment:

Doesn't work in PHP 5.3.10

intl version 1.1.0
ICU version 4.8.1.1
ICU Data version 4.8.1


Previous Comments:

[2012-05-05 09:15:37] franssen dot roland at gmail dot com

Still fails in PHP 5.4RC9...

version 1.1.0
ICU version 4.4.2
ICU Data version4.4.2


[2011-11-09 04:56:08] johnlinton at mailinator dot net

Seeing the same issue except I am using PHP 5.3.8 as a fcgi module under apache 
2.2 on Windows 7.


[2011-08-23 18:09:34] franssen dot roland at gmail dot com

Still fails in 5.3.8...
However it does seems to work when parsing in locale en[_US], e.g. $1 returns 
float(1) (USD). Didn't spot any other locales that work (mostly tested 
european locales; netherlands, germany, french)


[2011-07-28 07:04:52] franssen dot roland at gmail dot com

Same code does works on PHP 5.2.17 (Linux)

version 1.0.3
ICU version 3.6


[2011-07-26 20:23:42] franssen dot roland at gmail dot com

Description:

Hi,

The example code at 
http://nl2.php.net/manual/en/numberformatter.parsecurrency.php doesn't seem to 
work for me.

This is perhaps also related to bug #54163 (?)

---

version1.1.0
ICU version4.4.1

Directive  Local ValueMaster Value
intl.default_localeno value   no value
intl.error_level   0  0

Test script:
---
?php
$fmt = numfmt_create( 'de_DE', NumberFormatter::CURRENCY );
$num = 1.234.567,89 $;
echo We have .numfmt_parse_currency($fmt, $num, $curr). in $curr\n;
echo \PHP_EOL;

$fmt = new NumberFormatter( 'de_DE', NumberFormatter::CURRENCY );
$num = 1.234.567,89 $;
echo We have .$fmt-parseCurrency($num, $curr). in $curr\n;
die;

Expected result:

We have 1234567.89 in USD
We have 1234567.89 in USD

Actual result:
--
We have FALSE in NULL
We have FALSE in NULL






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


Bug #63097 [Com]: Segfault on php-fpm service start

2012-09-16 Thread debian at michael-neubert dot de
Edit report at https://bugs.php.net/bug.php?id=63097edit=1

 ID: 63097
 Comment by: debian at michael-neubert dot de
 Reported by:admin at yqed dot com
 Summary:Segfault on php-fpm service start
 Status: Open
 Type:   Bug
 Package:FPM related
 Operating System:   CentOS 5/6 64bits
 PHP Version:5.3.17
 Block user comment: N
 Private report: N

 New Comment:

Hello,

since PHP 5.3.15 we have also segmentation faults when using xcache PHP module 
in 
combination with ionCubeLoader PHP module. 5.3.14 is not affected. Without 
loading 
xcache PHP module everything works also fine for us in 5.3.17.

Maybe this is also related to this bug: Bug 
https://bugs.php.net/bug.php?id=63005.

Best wishes
Michael


Previous Comments:

[2012-09-16 02:15:37] admin at yqed dot com

Some additional troubleshooting:
# DAEMON_COREFILE_LIMIT=unlimited strace -s 1024 -f /etc/init.d/php-fpm restart 
21 | grep -i SEGV
[pid 21884] --- SIGSEGV (Segmentation fault) @ 0 (0) ---
[pid 21883] ... wait4 resumed [{WIFSIGNALED(s)  WTERMSIG(s) == SIGSEGV  
WCOREDUMP(s)}], 0, NULL) = 21884

The above error occurs on a regular basis, no matter how many times I run the 
strace:
# DAEMON_COREFILE_LIMIT=unlimited strace -s 1024 -f /etc/init.d/php-fpm restart 
21 | grep -i SEGV
[pid 21914] --- SIGSEGV (Segmentation fault) @ 0 (0) ---
[pid 21913] ... wait4 resumed [{WIFSIGNALED(s)  WTERMSIG(s) == SIGSEGV  
WCOREDUMP(s)}], 0, NULL) = 21914

I believe it could be related to this bug:
https://bugs.php.net/bug.php?id=61231


[2012-09-16 01:36:48] admin at qyqed dot com

The segfault occurs randomly, I can restart the service several times without 
issues. All of the sudden, it pops without explanation.


[2012-09-16 01:34:28] admin at yqed dot com

The error format I get when I restart the php-fpm service:
# service php-fpm restart
Stopping php-fpm:  [  OK  ]
Starting php-fpm: /bin/bash: line 1: 20659 Segmentation fault  
/usr/sbin/php-
fpm -y /etc/php-fpm/php-fpm.conf
   [FAILED]


[2012-09-16 01:25:02] admin at yqed dot com

Description:

This issue started making surface with PHP 5.3.15 and is still present in 
5.3.17 
release. In /var/log/messages, you will see entries similar to:
hermes kernel: php-fpm[20659]: segfault at 2aea5a750210 rip 
003ca220da3e 
rsp 7fff6b7d56b0 error 4

I created a objdump which will help you precisely locate the current issue.

Test script:
---
php-fpm.debug objdump file: http://www.mediafire.com/?qbkjzbidj9b1zsr







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


[PHP-BUG] Req #62356 [NEW]: Add syslog support to mail.log (php_mail)

2012-06-18 Thread michael at orlitzky dot com
From: michael at orlitzky dot com
Operating system: 
PHP version:  5.4Git-2012-06-18 (Git)
Package:  Mail related
Bug Type: Feature/Change Request
Bug description:Add syslog support to mail.log (php_mail)

Description:

The PHP error logs support logging to syslog. You simply set,

  error_log = syslog

in php.ini, and PHP handles the rest. The new mail.log setting does not
support this, however, so it is difficult to consolidate your logs if you
use syslog. Setting,

  mail.log = syslog

results in a file name 'syslog' in the current directory.



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



Bug #62281 [Fbk-Opn]: crash when method in extending class has different params than parent class

2012-06-10 Thread michael dot stering at gmx dot net
Edit report at https://bugs.php.net/bug.php?id=62281edit=1

 ID: 62281
 User updated by:michael dot stering at gmx dot net
 Reported by:michael dot stering at gmx dot net
 Summary:crash when method in extending class has different
 params than parent class
-Status: Feedback
+Status: Open
 Type:   Bug
 Package:Class/Object related
 Operating System:   Windows 7 Ultimate
 PHP Version:5.4.3
 Block user comment: N
 Private report: N

 New Comment:

Tried the r324251 for windows; works.


Previous Comments:

[2012-06-10 02:36:09] larue...@php.net

Please try using this snapshot:

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

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

a knew issue has been fixed


[2012-06-09 19:22:50] michael dot stering at gmx dot net

Description:

When a method of a class which extends another class has the same name, but a 
different amount of parameters than the parent class, php seems to crash. Every 
browser tells that the website is not reachable.  
Wasn't able to get useful info from the logfiles. 

Test script:
---
class basicUser {
private function methodA() {
echo hello;
}
}

...

class extendedUser extends basicUser {  
private function methodA($var1) {
echo bye!;
}
} 


Expected result:

overloading methods with the same name, but different params shouldn't be that 
kind of problem!







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


[PHP-BUG] Bug #62281 [NEW]: crash when method in extending class has different params than parent class

2012-06-09 Thread michael dot stering at gmx dot net
From: michael dot stering at gmx dot net
Operating system: Windows 7 Ultimate
PHP version:  5.4.3
Package:  Class/Object related
Bug Type: Bug
Bug description:crash when method in extending class has different params than 
parent class

Description:

When a method of a class which extends another class has the same name, but
a different amount of parameters than the parent class, php seems to crash.
Every browser tells that the website is not reachable.  
Wasn't able to get useful info from the logfiles. 

Test script:
---
class basicUser {
private function methodA() {
echo hello;
}
}

...

class extendedUser extends basicUser {  
private function methodA($var1) {
echo bye!;
}
} 


Expected result:

overloading methods with the same name, but different params shouldn't be
that kind of problem!


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



[PHP-BUG] Bug #62041 [NEW]: Fails when recursive group comes before reference

2012-05-15 Thread michael at squiloople dot com
From: 
Operating system: Windows Vista
PHP version:  5.4.3
Package:  PCRE related
Bug Type: Bug
Bug description:Fails when recursive group comes before reference

Description:

When the recursive subpattern is captured after it is referenced:

(?2)?::(?((?1)(?:(?1)){0,4}):)?

It works fine. But when the capture comes before the reference it doesn't:

((?1)(?:(?1)){0,4})?::(?(?2):)?

The problem is the final : as other characters work fine. Replacing it
with \: 
or [:] does not help.

Test script:
---
// Test 1
preg_match('/^(?([a-f0-9]{1,4})(?:(?1)){5}:|(?!(?:.*[a-f0-9]:){6,})(?2)?::(?((?1)(?:(?1)){0,4}):)?)(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(?\.(?3)){3}$/iD',
'0:0:0:0::0:255.255.255.255');

// Test 2
preg_match('/^(?([a-f0-9]{1,4})(?:(?1)){5}:|(?!(?:.*[a-f0-9]:){6,})((?1)(?:(?1)){0,4})?::(?(?2):)?)(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(?\.(?3)){3}$/iD',
'0:0:0:0::0:255.255.255.255');

// Test 3
preg_match('/^(?([a-f0-9]{1,4})(?:(?1)){5}:|(?!(?:.*[a-f0-9]:){6,})((?1)(?:(?1)){0,4})?::(?(?2)!)?)(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(?\.(?3)){3}$/iD',
'0:0:0:0::0!255.255.255.255');

Expected result:

// Test 1
int(1)

// Test 2
int(1)

// Test 3
int(1)

Actual result:
--
// Test 1
int(1)

// Test 2
int(0)

// Test 3
int(1)

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



Bug #52752 [Com]: Program terminated with signal 7, Bus error.

2012-04-26 Thread michael at vstadi dot com
Edit report at https://bugs.php.net/bug.php?id=52752edit=1

 ID: 52752
 Comment by: michael at vstadi dot com
 Reported by:paulgao at yeah dot net
 Summary:Program terminated with signal 7, Bus error.
 Status: Feedback
 Type:   Bug
 Package:Scripting Engine problem
 Operating System:   Centos 5 32bit
 PHP Version:5.3SVN-2010-08-31 (SVN)
 Block user comment: N
 Private report: N

 New Comment:

We are experiencing the same thing:

CentOS5, Nginx 1.1.12, PHP-FPM 5.3.10, (extensions APC 3.1.9 and memcache 2.2.6)
Occasional SIGBUS, [26-Apr-2012 17:05:23] WARNING: [pool www] child 2562 exited 
on signal 7 (SIGBUS - core dumped) after 84.407806 seconds from start

gdb core dump and backtrace:

Core was generated by `php-fpm:'.
Program terminated with signal 7, Bus error.
#0  lex_scan (zendlval=0x7fffd5e9fde8) at Zend/zend_language_scanner.c:943
943 if (yych != '') goto yy4;
(gdb) bt
#0  lex_scan (zendlval=0x7fffd5e9fde8) at Zend/zend_language_scanner.c:943
#1  0x00591ee0 in zendlex (zendlval=0x7fffd5e9fde0)
at /usr/src/debug/php-5.3.10/Zend/zend_compile.c:4975
#2  0x0057c6a6 in zendparse ()
at /usr/src/debug/php-5.3.10/Zend/zend_language_parser.c:3287
#3  0x00587352 in compile_file (file_handle=0x7fffd5ea1360,
type=value optimized out) at Zend/zend_language_scanner.l:364
#4  0x7f02feaf344f in my_compile_file (h=0x7fffd5ea1360, type=8)
at /usr/src/debug/php-pecl-apc-3.1.9/APC-3.1.9/apc_main.c:543
#5  0x7f02f8b7f291 in phar_compile_file (file_handle=0x7fffd5ea1360,
type=8) at /usr/src/debug/php-5.3.10/ext/phar/phar.c:3393
#6  0x00586bde in compile_filename (type=8, filename=0x2a97418)
at Zend/zend_language_scanner.l:407
#7  0x005d8442 in ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER (
execute_data=0x294c6a8)
at /usr/src/debug/php-5.3.10/Zend/zend_vm_execute.h:22529
#8  0x005d1770 in execute (op_array=0x2a43d58)
at /usr/src/debug/php-5.3.10/Zend/zend_vm_execute.h:107
#9  0x005a197a in zend_call_function (fci=0x7fffd5ea16f0,
fci_cache=value optimized out)
at /usr/src/debug/php-5.3.10/Zend/zend_execute_API.c:969
#10 0x004f6e33 in zif_call_user_func (ht=value optimized out,
return_value=0x2b39d68, return_value_ptr=value optimized out,
this_ptr=value optimized out, return_value_used=value optimized out)
at /usr/src/debug/php-5.3.10/ext/standard/basic_functions.c:4774
#11 0x005fa0d8 in zend_do_fcall_common_helper_SPEC (
execute_data=value optimized out)
at /usr/src/debug/php-5.3.10/Zend/zend_vm_execute.h:320
#12 0x005d1770 in execute (op_array=0x2a64df8)
at /usr/src/debug/php-5.3.10/Zend/zend_vm_execute.h:107
#13 0x005ab2bd in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /usr/src/debug/php-5.3.10/Zend/zend.c:1236
#14 0x00558558 in php_execute_script (primary_file=0x7fffd5ea3ea0)
at /usr/src/debug/php-5.3.10/main/main.c:2308
#15 0x0063e269 in main (argc=44076704, argv=0x2a08bc0)
at /usr/src/debug/php-5.3.10/sapi/fpm/fpm/fpm_main.c:1858


Previous Comments:

[2012-02-08 09:58:10] vc at artstyle dot ru

About the only way - disable use of mmap() on PHP code files. Need to patch and 
recompile. Something like this:

--- main/main.c~2012-02-08 06:00:52.0 +0400
+++ main/main.c 2012-02-08 06:01:28.0 +0400
@@ -1229,7 +1229,7 @@
/* can we mmap immeadiately? */
memset(handle-handle.stream.mmap, 0, 
sizeof(handle-handle.stream.mmap)); 
len = php_zend_stream_fsizer(stream TSRMLS_CC);
-   if (len != 0
+   if (0  len != 0
 #if HAVE_MMAP  
 ((len - 1) % page_size) = page_size - ZEND_MMAP_AHEAD
 #endif


[2012-02-07 18:57:30] mbreid at thepei dot com

I believe I'm running into this exact same error. I'm new to PHP-FPM (v5.3.9) 
as well as GDB, so here's what I managed to pull from the core dump / gdb 
backtrace log:

Core was generated by `php-fpm: pool www '.
Program terminated with signal 7, Bus error.
#0  lex_scan (zendlval=0x7fffbe65e368) at Zend/zend_language_scanner.l:1801
1801if (*YYCURSOR == '\'') {

AND


#0  lex_scan (zendlval=0x7fffbe65e368) at Zend/zend_language_scanner.l:1801
#1  0x0076fe90 in zendlex (zendlval=0x7fffbe65e360)
at /usr/src/install/php-5.3.9/Zend/zend_compile.c:4975
#2  0x007598ae in zendparse ()
at /usr/src/install/php-5.3.9/Zend/zend_language_parser.c:3285
#3  0x00765268 in compile_file (file_handle=0x7fffbe65e6e0, type=2)
at Zend/zend_language_scanner.l:364
#4  0x005ee40a in phar_compile_file (file_handle=value optimized out, 
type=value optimized out) at 
/usr/src

Bug #54233 [Com]: PHP Filter email doesn't work properly

2012-04-08 Thread michael at squiloople dot com
Edit report at https://bugs.php.net/bug.php?id=54233edit=1

 ID: 54233
 Comment by: michael at squiloople dot com
 Reported by:flood at itnews-bg dot com
 Summary:PHP Filter email doesn't work properly
 Status: Open
 Type:   Bug
 Package:Filter related
 Operating System:   Slackware 13x86_64
 PHP Version:5.3.5
 Block user comment: N
 Private report: N

 New Comment:

That is a valid email address. ?, ' and _, ., as well as letters and 
numbers are acceptable characters in an email address's local-part.

carsten_sttgt at gmx dot de, it uses RFC 5321 (more or less).


Previous Comments:

[2011-03-12 12:14:02] carsten_sttgt at gmx dot de

That's the correct behavior.
FILTER_SANITIZE_EMAIL on:
?“?‰?“a‚¬?“?S?“a‚¬_?“a€??“a€¦?“??' 
this.is.a.test...@email.com

results in:
???a??S?a_?a??a???'this.is.a.test...@email.com

and that's a valid email address according to (at least) RFC822
(sorry, don't know which RFC PHP is exactly using for FILTER_VALIDATE_EMAIL. 
Should be documented)


[2011-03-11 22:44:21] flood at itnews-bg dot com

Hey,

It seems the filter function is not working some times.
You can see in the test script that the email is returned as a valid though 
it's not quite.


[2011-03-11 22:43:36] flood at itnews-bg dot com

Description:

Hey,

It seems the filter function is not working some times.
You can see in the test script that the email is returned as a valid though 
it's not quite.

Testing script:
?php

$email = ?“?‰?“a‚¬?“?S?“a‚¬_?“a€??“a€¦?“??' 
this.is.a.test...@email.com;
var_dump(filter_var(filter_var($email,FILTER_SANITIZE_EMAIL), 
FILTER_VALIDATE_EMAIL));

?



Test script:
---
?php

$email = ?“?‰?“a‚¬?“?S?“a‚¬_?“a€??“a€¦?“??' 
this.is.a.test...@email.com;
var_dump(filter_var(filter_var($email,FILTER_SANITIZE_EMAIL), 
FILTER_VALIDATE_EMAIL));

?

Expected result:

It should return a false boolean. This is not a valid email.

Actual result:
--
Returns an invalid email:
???a??S?a_?a??a???'this.is.a.test...@email.com








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


[PHP-BUG] Bug #61606 [NEW]: Unstable function renaming

2012-04-03 Thread michael dot rouges at gmail dot com
From: 
Operating system: Debian Squeeze
PHP version:  5.4.0
Package:  Reproducible crash
Bug Type: Bug
Bug description:Unstable function renaming

Description:

Since APD is no longer compatible with recent versions of PHP, I use custom
extension functions for renaming (sources:
http://www.developpez.net/forums/attachments/p92460d183074/c-cpp/c/besoin-daide-corriger-extension-php-toute-petite-jure/php_rename.zip/)

Test script:
---
?php
function_rename('native_function_name','new_name');
?

Expected result:

This extension should rename functions, native or not, for the execution
context of the script called.

Actual result:
--
This extension fills its role very well but, strangely, in some executions
(variable number, nearly one out of 10-15), the function function_rename ()
seems to have a permanent effect on PHP functions.

Currently, the only way to fix this bug, it's a restart Apache.

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



Req #43304 [Com]: Casting During Comparison

2012-01-16 Thread michael dot kluge at wundermedia dot de
Edit report at https://bugs.php.net/bug.php?id=43304edit=1

 ID: 43304
 Comment by: michael dot kluge at wundermedia dot de
 Reported by:ken at smallboxsoftware dot net
 Summary:Casting During Comparison
 Status: Open
 Type:   Feature/Change Request
 Package:Feature/Change Request
 Operating System:   ALL
 PHP Version:5.2.5
 Block user comment: N
 Private report: N

 New Comment:

No comments from any PHP devs yet?

Well I strongly disagree with the current implementation.

From PHP-Docs:
$a === $b Identical TRUE if $a is equal to $b, and they are of the same type.

This is the correct definition of the === operator.
An so it should work like that definition:

So
$a = 001234;
$b = 1234;
$a == $b should be equal to $a === $b (both should be false)
as both variables hold the same type
and from the above definition
those expressions should be equal:
$a === $b
($a == $b  typeof($a)==typeof($b))

So if (typeof($a)==typeof($b)) is true, $a===$b should be identical to $a==$b.

If comparing two variables of the same type in NO case any type-conversion 
should be applied!

If you need conversions in those cases these should be explicitly noted as e.g.:
intval($a) == intval($b)

Adding special exceptions to the general definition doesn't make much sense in 
my eyes; it just makes the base definition wrong in certain circumstances and 
leads to unexpected behaviour in certain cases (see comment from kissifrot).

We stumbled upon this when comparing certain product ids in use by one of our 
customers, just being different in the leading zeros. (So id 001 is another 
product than 01 == therefore using strings; please don't ask why, as I don't 
know what reasons might have caused these strange ids)

delphists said that there are also lots of cases when numerical strings have 
to be compared as integers. I agree with that, but in those cases the 
developer should convert the types manually.
Also the example with the database should, in my opinion, be implemented 
differently:
The model should return integers for integer-typed database fields and not 
strings.
On the other hand if you expect input parameters containing integer values 
these could also be converted to integers, which can be easily done in the 
validity checks of the parameters.

IMHO, despite of PHP trying to make type-conversions transparent to the 
developer, the developer should in any case keep in mind, that PHP is not 
typeless and respect the types accordingly. And 0123 and 123 are definitely 
NOT logically equal in any case! I think the weird concept of numerical 
strings should be dropped.


Previous Comments:

[2011-03-11 09:43:13] delphists at apollo dot lv

Sorry for digging up this bug report, but it's still opened, so I don't think 
that digging it up should be a problem.

I agree with kissifrot about specific case - both values convert to 
(int)2147483647, at least on 32bit system, which is nowhere near to 
11000198358.

Though, I can't agree with drm. There is a reason for having two types of 
comparisons - if you are sure that you don't need values to be converted, just 
use strict comparison.

I agree that there are cases when numerical strings need to be compared as 
strings, but there are also lots of cases when numerical strings have to be 
compared as integers. For example, some functions that return data from DB, 
return integers as strings, which may be compared to data from browser, which 
by default is also string, but comparison needs to work like if they were 
numbers.


[2011-02-17 08:58:37] kissifrot at gmail dot com

I agree with that, for example if I have
$ric1 = '11000198358';
$ric2 = '11000198455';
var_dump($ric1 == $ric2)

should return false, not true, just because it's logical.
But the current behavior makes PHP somewhat unreliable :(


[2008-09-06 23:49:58] drm at melp dot nl

Though documented (http://www.php.net/language.operators, quote If you compare 
two numerical strings, they are compared as integers.), this is indeed 
unexpected behaviour (and thus a bug)

This bug will probably be closed and denoted as sorry, documented feature, 
but I think this is really a candidate for revision in any next major PHP 
version.

Comparison should always feel intuitive, and PHP has made the move towards more 
secure defaults. This falls (imo) under the same category. Please witness 
following example.

client side code:
form ...
   input type=radio value=0 name=selection / No selection
   input type=radio value=whatever name=selection / whatever selection
   (...)
/form

server side code:
if ( $_GET['selection'] == 0 ) {
   echo 'pPlease make a selection!/p';
} else {
   // process

Req #43304 [Com]: Casting During Comparison

2012-01-16 Thread michael dot kluge at wundermedia dot de
Edit report at https://bugs.php.net/bug.php?id=43304edit=1

 ID: 43304
 Comment by: michael dot kluge at wundermedia dot de
 Reported by:ken at smallboxsoftware dot net
 Summary:Casting During Comparison
 Status: Open
 Type:   Feature/Change Request
 Package:Feature/Change Request
 Operating System:   ALL
 PHP Version:5.2.5
 Block user comment: N
 Private report: N

 New Comment:

Well, this is what we do.
But this is in my opinion nothing but a workaround for that.

I would regard the current behaviour as a bug or, sadly, rather as an example 
of bad design in any language. It's just not logical.

Javascript e.g. implements this correctly (from Firebug; Mozilla 
JS-implementation):
 var x1='001',x2='01';
undefined
 x1==x2
false
 x1===x2
false
 x2=1
1
 x1==x2
true
 x1===x2
false

Therefore I added my last comment to (re-)start a discussion on that, hoping 
that this might be changed or at least be made configurable. 
At least this request is marked as Feature/Change Request. ;-)

My idea is to change this:
- Drop the concept of numerical strings
- Equal types do never convert on any comparison

First this should be made configurable (default is to stop the weird 
behaviour), to give grace time to the developers to adapt their scripts
In later versions this should be removed completely.
Maybe a similiar way the magic-quotes-crap is going...

Maybe one more thing about the docs:
It states:
If you compare a number with a string or the comparison involves numerical 
strings, then each string is converted to a number and the comparison performed 
numerically.
This also constricts the simple declarations of the operators in the case of 
both operands being numerical strings.
This is exactly the behaviour being very bad in my eyes, and should be changed 
for creating unexpected results in certain circumstances.
I see no valid reason for the operators to change behaviour if both operands 
are of the same type.
(Except maybe lazy devs not willing to obey types) ;-)

Maybe I've overseen something... Does anybody know of any good reason why the 
actual behaviour might be regarded better than the one proposed by others and 
me?


Previous Comments:

[2012-01-16 15:53:25] delphists at apollo dot lv

From docs:
[quote]
If you compare a number with a string or the comparison involves numerical 
strings, then each string is converted to a number and the comparison performed 
numerically.
[/quote]

Want to be strict, when comparing? Then use strict operators...


[2012-01-16 14:29:07] michael dot kluge at wundermedia dot de

No comments from any PHP devs yet?

Well I strongly disagree with the current implementation.

From PHP-Docs:
$a === $b Identical TRUE if $a is equal to $b, and they are of the same type.

This is the correct definition of the === operator.
An so it should work like that definition:

So
$a = 001234;
$b = 1234;
$a == $b should be equal to $a === $b (both should be false)
as both variables hold the same type
and from the above definition
those expressions should be equal:
$a === $b
($a == $b  typeof($a)==typeof($b))

So if (typeof($a)==typeof($b)) is true, $a===$b should be identical to $a==$b.

If comparing two variables of the same type in NO case any type-conversion 
should be applied!

If you need conversions in those cases these should be explicitly noted as e.g.:
intval($a) == intval($b)

Adding special exceptions to the general definition doesn't make much sense in 
my eyes; it just makes the base definition wrong in certain circumstances and 
leads to unexpected behaviour in certain cases (see comment from kissifrot).

We stumbled upon this when comparing certain product ids in use by one of our 
customers, just being different in the leading zeros. (So id 001 is another 
product than 01 == therefore using strings; please don't ask why, as I don't 
know what reasons might have caused these strange ids)

delphists said that there are also lots of cases when numerical strings have 
to be compared as integers. I agree with that, but in those cases the 
developer should convert the types manually.
Also the example with the database should, in my opinion, be implemented 
differently:
The model should return integers for integer-typed database fields and not 
strings.
On the other hand if you expect input parameters containing integer values 
these could also be converted to integers, which can be easily done in the 
validity checks of the parameters.

IMHO, despite of PHP trying to make type-conversions transparent to the 
developer, the developer should in any case keep in mind, that PHP is not 
typeless and respect the types accordingly. And 0123 and 123 are definitely 
NOT logically equal in any case! I think the weird concept of numerical 
strings should be dropped

Bug #60158 [Bgs]: Segmentation fault in _zend_mm_free_canary_int

2011-10-31 Thread michael dot irey at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=60158edit=1

 ID: 60158
 User updated by:michael dot irey at gmail dot com
 Reported by:michael dot irey at gmail dot com
 Summary:Segmentation fault in _zend_mm_free_canary_int
 Status: Bogus
 Type:   Bug
 Package:Apache2 related
 Operating System:   Ubuntu 10.04.3 LTS
-PHP Version:5.3.8
+PHP Version:5.3.x
 Block user comment: N
 Private report: N

 New Comment:

Ok, I have reproduced the bug from a clean PHP build using 5.3.8

Here is the new gdb details:


Program terminated with signal 11, Segmentation fault.
#0  0x7fabd4b288b6 in _zval_dtor_func (zvalue=0x7fff0a50eb70, 
__zend_filename=0x7fabd4ea8558 /root/downloads/php-
5.3.8/Zend/zend_object_handlers.c, __zend_lineno=441)
at /root/downloads/php-5.3.8/Zend/zend_variables.c:35
35  CHECK_ZVAL_STRING_REL(zvalue);
(gdb) dump_bt executor_globals.current_execute_data
[0xd8959e80] setElement() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Form/Decorator/Abstract.php:186 
[0xd8959b18] setElement() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Form/Element.php:2030 
[0xd8959940] render() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Form/Element.php:2046 
[0x0a50eec0] __toString() 
[0xd89580d0] ??? 
/web/vhosts/imac.michael.dev.bluehawk.evanta.com/website/application/views/scrip
ts/contacts/duplicate.phtml:62 
[0xd8957ed0] ??? /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/View.php:108 
[0xd8957c88] _run() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/View/Abstract.php:888 
[0xd89579b8] render() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Controller/Action/Helper/ViewRenderer.php:900 
[0xd89577b0] renderScript() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Controller/Action/Helper/ViewRenderer.php:921 
[0xd8957670] render() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Controller/Action/Helper/ViewRenderer.php:960 
[0xd89574a8] postDispatch() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Controller/Action/HelperBroker.php:277 
[0xd8956e20] notifyPostDispatch() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Controller/Action.php:527 
[0xd8956008] dispatch() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Controller/Dispatcher/Standard.php:295 
[0xd89545e0] dispatch() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Controller/Front.php:954 
[0xd89541e0] dispatch() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Application/Bootstrap/Bootstrap.php:97 
[0xd89540a0] run() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Application.php:366 
[0xd8953090] run() 
/web/vhosts/imac.michael.dev.bluehawk.evanta.com/website/public/index.php:69


Previous Comments:

[2011-10-28 16:14:44] fel...@php.net

zend_alloc_canary.c is from Suhosin project, not PHP.

So, try reproduce the crash in a clean PHP build.


[2011-10-28 16:10:58] michael dot irey at gmail dot com

Added more detail in the summary


[2011-10-28 16:05:50] michael dot irey at gmail dot com

Description:

Using ZendFramework-1.11.10. Seg fault occurs also in 5.3.2 as well as 5.3.8. 
Does 
not occur in 5.2.4.  Difficult to reproduce, but I will include the gdb 
backtrace. 
Basically assigning the value of variable to another, causes the seg fault. I 
can 
not determine why. The line $this-_element = $element; causes the seg fault.

Test script:
---
public function setElement($element)
{
if ((!$element instanceof Zend_Form_Element)
 (!$element instanceof Zend_Form)
 (!$element instanceof Zend_Form_DisplayGroup))
{
require_once 'Zend/Form/Decorator/Exception.php';
throw new Zend_Form_Decorator_Exception('Invalid element type 
passed to decorator');
}

$this-_element = $element;
return $this;
}

Expected result:

Not this: exit signal Segmentation fault (11)

Actual result:
--
Program terminated with signal 11, Segmentation fault.
#0  0x7ffd348abe53 in _zend_mm_free_canary_int (heap=0x7ffd39b11130, 
p=0x21143c453bb97f0f) at /build/buildd/php5-5.3.2/Zend/zend_alloc_canary.c:2090
2090/build/buildd/php5-5.3.2/Zend/zend_alloc_canary.c: No such file or 
directory.
in /build/buildd/php5-5.3.2/Zend/zend_alloc_canary.c




(gdb) dump_bt executor_globals.current_execute_data
[0x386f2e30] setElement() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Form/Decorator/Abstract.php:186 
[0x386f2ac8] setElement() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Form/Element.php:2030 
[0x386f28f0

Bug #60158 [Bgs]: Segmentation fault in zend_variables.c

2011-10-31 Thread michael dot irey at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=60158edit=1

 ID: 60158
 User updated by:michael dot irey at gmail dot com
 Reported by:michael dot irey at gmail dot com
-Summary:Segmentation fault in _zend_mm_free_canary_int
+Summary:Segmentation fault in zend_variables.c
 Status: Bogus
 Type:   Bug
 Package:Apache2 related
 Operating System:   Ubuntu 10.04.3 LTS
 PHP Version:5.3.x
 Block user comment: N
 Private report: N

 New Comment:

Updated the summary line to contain zend_variables.c


Previous Comments:

[2011-10-31 18:47:39] michael dot irey at gmail dot com

Ok, I have reproduced the bug from a clean PHP build using 5.3.8

Here is the new gdb details:


Program terminated with signal 11, Segmentation fault.
#0  0x7fabd4b288b6 in _zval_dtor_func (zvalue=0x7fff0a50eb70, 
__zend_filename=0x7fabd4ea8558 /root/downloads/php-
5.3.8/Zend/zend_object_handlers.c, __zend_lineno=441)
at /root/downloads/php-5.3.8/Zend/zend_variables.c:35
35  CHECK_ZVAL_STRING_REL(zvalue);
(gdb) dump_bt executor_globals.current_execute_data
[0xd8959e80] setElement() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Form/Decorator/Abstract.php:186 
[0xd8959b18] setElement() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Form/Element.php:2030 
[0xd8959940] render() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Form/Element.php:2046 
[0x0a50eec0] __toString() 
[0xd89580d0] ??? 
/web/vhosts/imac.michael.dev.bluehawk.evanta.com/website/application/views/scrip
ts/contacts/duplicate.phtml:62 
[0xd8957ed0] ??? /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/View.php:108 
[0xd8957c88] _run() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/View/Abstract.php:888 
[0xd89579b8] render() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Controller/Action/Helper/ViewRenderer.php:900 
[0xd89577b0] renderScript() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Controller/Action/Helper/ViewRenderer.php:921 
[0xd8957670] render() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Controller/Action/Helper/ViewRenderer.php:960 
[0xd89574a8] postDispatch() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Controller/Action/HelperBroker.php:277 
[0xd8956e20] notifyPostDispatch() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Controller/Action.php:527 
[0xd8956008] dispatch() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Controller/Dispatcher/Standard.php:295 
[0xd89545e0] dispatch() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Controller/Front.php:954 
[0xd89541e0] dispatch() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Application/Bootstrap/Bootstrap.php:97 
[0xd89540a0] run() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Application.php:366 
[0xd8953090] run() 
/web/vhosts/imac.michael.dev.bluehawk.evanta.com/website/public/index.php:69


[2011-10-28 16:14:44] fel...@php.net

zend_alloc_canary.c is from Suhosin project, not PHP.

So, try reproduce the crash in a clean PHP build.


[2011-10-28 16:10:58] michael dot irey at gmail dot com

Added more detail in the summary


[2011-10-28 16:05:50] michael dot irey at gmail dot com

Description:

Using ZendFramework-1.11.10. Seg fault occurs also in 5.3.2 as well as 5.3.8. 
Does 
not occur in 5.2.4.  Difficult to reproduce, but I will include the gdb 
backtrace. 
Basically assigning the value of variable to another, causes the seg fault. I 
can 
not determine why. The line $this-_element = $element; causes the seg fault.

Test script:
---
public function setElement($element)
{
if ((!$element instanceof Zend_Form_Element)
 (!$element instanceof Zend_Form)
 (!$element instanceof Zend_Form_DisplayGroup))
{
require_once 'Zend/Form/Decorator/Exception.php';
throw new Zend_Form_Decorator_Exception('Invalid element type 
passed to decorator');
}

$this-_element = $element;
return $this;
}

Expected result:

Not this: exit signal Segmentation fault (11)

Actual result:
--
Program terminated with signal 11, Segmentation fault.
#0  0x7ffd348abe53 in _zend_mm_free_canary_int (heap=0x7ffd39b11130, 
p=0x21143c453bb97f0f) at /build/buildd/php5-5.3.2/Zend/zend_alloc_canary.c:2090
2090/build/buildd/php5-5.3.2/Zend/zend_alloc_canary.c: No such file or 
directory.
in /build/buildd/php5-5.3.2/Zend/zend_alloc_canary.c




(gdb) dump_bt executor_globals.current_execute_data
[0x386f2e30] setElement

Bug #60158 [Bgs]: Segmentation fault in zend_variables.c

2011-10-31 Thread michael dot irey at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=60158edit=1

 ID: 60158
 User updated by:michael dot irey at gmail dot com
 Reported by:michael dot irey at gmail dot com
 Summary:Segmentation fault in zend_variables.c
 Status: Bogus
 Type:   Bug
-Package:Apache2 related
+Package:Scripting Engine problem
 Operating System:   Ubuntu 10.04.3 LTS
 PHP Version:5.3.x
 Block user comment: N
 Private report: N

 New Comment:

Changed the package description


Previous Comments:

[2011-10-31 18:49:12] michael dot irey at gmail dot com

Updated the summary line to contain zend_variables.c


[2011-10-31 18:47:39] michael dot irey at gmail dot com

Ok, I have reproduced the bug from a clean PHP build using 5.3.8

Here is the new gdb details:


Program terminated with signal 11, Segmentation fault.
#0  0x7fabd4b288b6 in _zval_dtor_func (zvalue=0x7fff0a50eb70, 
__zend_filename=0x7fabd4ea8558 /root/downloads/php-
5.3.8/Zend/zend_object_handlers.c, __zend_lineno=441)
at /root/downloads/php-5.3.8/Zend/zend_variables.c:35
35  CHECK_ZVAL_STRING_REL(zvalue);
(gdb) dump_bt executor_globals.current_execute_data
[0xd8959e80] setElement() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Form/Decorator/Abstract.php:186 
[0xd8959b18] setElement() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Form/Element.php:2030 
[0xd8959940] render() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Form/Element.php:2046 
[0x0a50eec0] __toString() 
[0xd89580d0] ??? 
/web/vhosts/imac.michael.dev.bluehawk.evanta.com/website/application/views/scrip
ts/contacts/duplicate.phtml:62 
[0xd8957ed0] ??? /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/View.php:108 
[0xd8957c88] _run() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/View/Abstract.php:888 
[0xd89579b8] render() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Controller/Action/Helper/ViewRenderer.php:900 
[0xd89577b0] renderScript() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Controller/Action/Helper/ViewRenderer.php:921 
[0xd8957670] render() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Controller/Action/Helper/ViewRenderer.php:960 
[0xd89574a8] postDispatch() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Controller/Action/HelperBroker.php:277 
[0xd8956e20] notifyPostDispatch() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Controller/Action.php:527 
[0xd8956008] dispatch() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Controller/Dispatcher/Standard.php:295 
[0xd89545e0] dispatch() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Controller/Front.php:954 
[0xd89541e0] dispatch() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Application/Bootstrap/Bootstrap.php:97 
[0xd89540a0] run() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Application.php:366 
[0xd8953090] run() 
/web/vhosts/imac.michael.dev.bluehawk.evanta.com/website/public/index.php:69


[2011-10-28 16:14:44] fel...@php.net

zend_alloc_canary.c is from Suhosin project, not PHP.

So, try reproduce the crash in a clean PHP build.


[2011-10-28 16:10:58] michael dot irey at gmail dot com

Added more detail in the summary


[2011-10-28 16:05:50] michael dot irey at gmail dot com

Description:

Using ZendFramework-1.11.10. Seg fault occurs also in 5.3.2 as well as 5.3.8. 
Does 
not occur in 5.2.4.  Difficult to reproduce, but I will include the gdb 
backtrace. 
Basically assigning the value of variable to another, causes the seg fault. I 
can 
not determine why. The line $this-_element = $element; causes the seg fault.

Test script:
---
public function setElement($element)
{
if ((!$element instanceof Zend_Form_Element)
 (!$element instanceof Zend_Form)
 (!$element instanceof Zend_Form_DisplayGroup))
{
require_once 'Zend/Form/Decorator/Exception.php';
throw new Zend_Form_Decorator_Exception('Invalid element type 
passed to decorator');
}

$this-_element = $element;
return $this;
}

Expected result:

Not this: exit signal Segmentation fault (11)

Actual result:
--
Program terminated with signal 11, Segmentation fault.
#0  0x7ffd348abe53 in _zend_mm_free_canary_int (heap=0x7ffd39b11130, 
p=0x21143c453bb97f0f) at /build/buildd/php5-5.3.2/Zend/zend_alloc_canary.c:2090
2090/build/buildd/php5-5.3.2/Zend/zend_alloc_canary.c: No such file or 
directory

Bug #60158 [Fbk-Opn]: Segmentation fault in zend_variables.c

2011-10-31 Thread michael dot irey at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=60158edit=1

 ID: 60158
 User updated by:michael dot irey at gmail dot com
 Reported by:michael dot irey at gmail dot com
 Summary:Segmentation fault in zend_variables.c
-Status: Feedback
+Status: Open
 Type:   Bug
 Package:Scripting Engine problem
 Operating System:   Ubuntu 10.04.3 LTS
 PHP Version:5.3.x
 Block user comment: N
 Private report: N

 New Comment:

I would really like to provide a short example script to reproduce the problem. 
However, the problem only seems to pop up on when a large amount of objects are 
used, but that is only a guess.

We use ZendFramework 1.11.x. I have re-compiled PHP with --enable-debug and 
when 
I execute the script that caused the seg fault I get this:

Unknown(0) : Warning - String is not zero-terminated (APPLICATION_PATH??
bZZZ?b) (source: /root/downloads/php-5.3.8/Zend/zend_opcode.c:261)
[Mon Oct 31 12:17:52 2011]  Script:  
'/web/vhosts/imac.michael.dev.bluehawk.evanta.com/website/public/index.php'
---
/root/downloads/php-5.3.8/Zend/zend_opcode.c(261) : Block 0x7f88250c2ab0 status:
/root/downloads/php-5.3.8/Zend/zend_variables.c(36) : Actual location (location 
was relayed)
Beginning:  OK (allocated on Zend/zend_language_scanner.l:1695, 17 bytes)
Start:  OK
  End:  Overflown (magic=0x002B instead of 0x62D3082C)
1 byte(s) overflown
---
[Mon Oct 31 12:17:52 2011]  Script:  
'/web/vhosts/imac.michael.dev.bluehawk.evanta.com/website/public/index.php'
Zend/zend_language_scanner.l(1695) :  Freeing 0x7F88250C2AB0 (17 bytes), 
script=/web/vhosts/imac.michael.dev.bluehawk.evanta.com/website/public/index.php
=== Total 1 memory leaks detected ===
Unknown(0) : Warning - String is not zero-terminated (APPLICATION_PATH??
bZZZ?b) (source: /root/downloads/php-5.3.8/Zend/zend_opcode.c:261)
[Mon Oct 31 12:18:09 2011]  Script:  
'/web/vhosts/imac.michael.dev.bluehawk.evanta.com/website/public/index.php'
---
/root/downloads/php-5.3.8/Zend/zend_opcode.c(261) : Block 0x7f88250c2ab0 status:
/root/downloads/php-5.3.8/Zend/zend_variables.c(36) : Actual location (location 
was relayed)
Beginning:  OK (allocated on Zend/zend_language_scanner.l:1695, 17 bytes)
Start:  OK
  End:  Overflown (magic=0x002B instead of 0x62D3082C)
1 byte(s) overflown
---
[Mon Oct 31 12:18:09 2011]  Script:  
'/web/vhosts/imac.michael.dev.bluehawk.evanta.com/website/public/index.php'
Zend/zend_language_scanner.l(1695) :  Freeing 0x7F88250C2AB0 (17 bytes), 
script=/web/vhosts/imac.michael.dev.bluehawk.evanta.com/website/public/index.php
=== Total 1 memory leaks detected ===


Is there anything else I can do to help diagnose and resolve this issue?


Previous Comments:

[2011-10-31 20:13:05] paj...@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.




[2011-10-31 19:51:35] michael dot irey at gmail dot com

Changed the package description


[2011-10-31 18:49:12] michael dot irey at gmail dot com

Updated the summary line to contain zend_variables.c


[2011-10-31 18:47:39] michael dot irey at gmail dot com

Ok, I have reproduced the bug from a clean PHP build using 5.3.8

Here is the new gdb details:


Program terminated with signal 11, Segmentation fault.
#0  0x7fabd4b288b6 in _zval_dtor_func (zvalue=0x7fff0a50eb70, 
__zend_filename=0x7fabd4ea8558 /root/downloads/php-
5.3.8/Zend/zend_object_handlers.c, __zend_lineno=441)
at /root/downloads/php-5.3.8/Zend/zend_variables.c:35
35  CHECK_ZVAL_STRING_REL(zvalue);
(gdb) dump_bt executor_globals.current_execute_data
[0xd8959e80] setElement() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Form/Decorator/Abstract.php:186 
[0xd8959b18] setElement() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Form/Element.php:2030 
[0xd8959940] render() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Form/Element.php:2046 
[0x0a50eec0] __toString() 
[0xd89580d0] ??? 
/web/vhosts

[PHP-BUG] Bug #60158 [NEW]: Segmentation fault

2011-10-28 Thread michael dot irey at gmail dot com
From: 
Operating system: Ubuntu 10.04.3 LTS
PHP version:  5.3.8
Package:  Apache2 related
Bug Type: Bug
Bug description:Segmentation fault

Description:

Using ZendFramework-1.11.10. Seg fault occurs also in 5.3.2 as well as
5.3.8. Does 
not occur in 5.2.4.  Difficult to reproduce, but I will include the gdb
backtrace. 
Basically assigning the value of variable to another, causes the seg fault.
I can 
not determine why. The line $this-_element = $element; causes the seg
fault.

Test script:
---
public function setElement($element)
{
if ((!$element instanceof Zend_Form_Element)
 (!$element instanceof Zend_Form)
 (!$element instanceof Zend_Form_DisplayGroup))
{
require_once 'Zend/Form/Decorator/Exception.php';
throw new Zend_Form_Decorator_Exception('Invalid element type
passed to decorator');
}

$this-_element = $element;
return $this;
}

Expected result:

Not this: exit signal Segmentation fault (11)

Actual result:
--
Program terminated with signal 11, Segmentation fault.
#0  0x7ffd348abe53 in _zend_mm_free_canary_int (heap=0x7ffd39b11130, 
p=0x21143c453bb97f0f) at
/build/buildd/php5-5.3.2/Zend/zend_alloc_canary.c:2090
2090/build/buildd/php5-5.3.2/Zend/zend_alloc_canary.c: No such file or 
directory.
in /build/buildd/php5-5.3.2/Zend/zend_alloc_canary.c




(gdb) dump_bt executor_globals.current_execute_data
[0x386f2e30] setElement() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Form/Decorator/Abstract.php:186 
[0x386f2ac8] setElement() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Form/Element.php:2030 
[0x386f28f0] render() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Form/Element.php:2046 
[0xa59d03f0] __toString() 
[0x386f1080] ??? 
/web/vhosts/imac.michael.dev.bluehawk.evanta.com/website/application/views/scrip
ts/contacts/duplicate.phtml:186 
[0x386f0e80] ??? /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/View.php:108 
[0x386f0c38] _run() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/View/Abstract.php:888 
[0x386f0968] render() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Controller/Action/Helper/ViewRenderer.php:900 
[0x386f0760] renderScript() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Controller/Action/Helper/ViewRenderer.php:921 
[0x386f0620] render() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Controller/Action/Helper/ViewRenderer.php:960 
[0x386f0458] postDispatch() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Controller/Action/HelperBroker.php:277 
[0x386efdd0] notifyPostDispatch() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Controller/Action.php:527 
[0x386eefb8] dispatch() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Controller/Dispatcher/Standard.php:295 
[0x386ed590] dispatch() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Controller/Front.php:954 
[0x386ed190] dispatch() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Application/Bootstrap/Bootstrap.php:97 
[0x386ed050] run() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Application.php:366 
[0x386ec068] run() 
/web/vhosts/imac.michael.dev.bluehawk.evanta.com/website/public/index.php:69



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

Bug #60158 [Opn]: Segmentation fault in _zend_mm_free_canary_int

2011-10-28 Thread michael dot irey at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=60158edit=1

 ID: 60158
 User updated by:michael dot irey at gmail dot com
 Reported by:michael dot irey at gmail dot com
-Summary:Segmentation fault
+Summary:Segmentation fault in _zend_mm_free_canary_int
 Status: Open
 Type:   Bug
 Package:Apache2 related
 Operating System:   Ubuntu 10.04.3 LTS
 PHP Version:5.3.8
 Block user comment: N
 Private report: N

 New Comment:

Added more detail in the summary


Previous Comments:

[2011-10-28 16:05:50] michael dot irey at gmail dot com

Description:

Using ZendFramework-1.11.10. Seg fault occurs also in 5.3.2 as well as 5.3.8. 
Does 
not occur in 5.2.4.  Difficult to reproduce, but I will include the gdb 
backtrace. 
Basically assigning the value of variable to another, causes the seg fault. I 
can 
not determine why. The line $this-_element = $element; causes the seg fault.

Test script:
---
public function setElement($element)
{
if ((!$element instanceof Zend_Form_Element)
 (!$element instanceof Zend_Form)
 (!$element instanceof Zend_Form_DisplayGroup))
{
require_once 'Zend/Form/Decorator/Exception.php';
throw new Zend_Form_Decorator_Exception('Invalid element type 
passed to decorator');
}

$this-_element = $element;
return $this;
}

Expected result:

Not this: exit signal Segmentation fault (11)

Actual result:
--
Program terminated with signal 11, Segmentation fault.
#0  0x7ffd348abe53 in _zend_mm_free_canary_int (heap=0x7ffd39b11130, 
p=0x21143c453bb97f0f) at /build/buildd/php5-5.3.2/Zend/zend_alloc_canary.c:2090
2090/build/buildd/php5-5.3.2/Zend/zend_alloc_canary.c: No such file or 
directory.
in /build/buildd/php5-5.3.2/Zend/zend_alloc_canary.c




(gdb) dump_bt executor_globals.current_execute_data
[0x386f2e30] setElement() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Form/Decorator/Abstract.php:186 
[0x386f2ac8] setElement() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Form/Element.php:2030 
[0x386f28f0] render() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Form/Element.php:2046 
[0xa59d03f0] __toString() 
[0x386f1080] ??? 
/web/vhosts/imac.michael.dev.bluehawk.evanta.com/website/application/views/scrip
ts/contacts/duplicate.phtml:186 
[0x386f0e80] ??? /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/View.php:108 
[0x386f0c38] _run() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/View/Abstract.php:888 
[0x386f0968] render() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Controller/Action/Helper/ViewRenderer.php:900 
[0x386f0760] renderScript() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Controller/Action/Helper/ViewRenderer.php:921 
[0x386f0620] render() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Controller/Action/Helper/ViewRenderer.php:960 
[0x386f0458] postDispatch() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Controller/Action/HelperBroker.php:277 
[0x386efdd0] notifyPostDispatch() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Controller/Action.php:527 
[0x386eefb8] dispatch() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Controller/Dispatcher/Standard.php:295 
[0x386ed590] dispatch() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Controller/Front.php:954 
[0x386ed190] dispatch() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Application/Bootstrap/Bootstrap.php:97 
[0x386ed050] run() /web/lib/zend/ZendFramework-1.11.10-
minimal/library/Zend/Application.php:366 
[0x386ec068] run() 
/web/vhosts/imac.michael.dev.bluehawk.evanta.com/website/public/index.php:69 







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


[PHP-BUG] Bug #55751 [NEW]: printf issue in combinatin with com connection

2011-09-21 Thread michael dot fellinger at multitec-sono dot at
From: 
Operating system: Windows 7
PHP version:  Irrelevant
Package:  COM related
Bug Type: Bug
Bug description:printf issue in combinatin with com connection

Description:

I use PHP Version 5.3.5 but it seems to be not solved in newer Versions

It only happends with the number or string 1900 and only if the execute
command from the adodb connection was performed.
I gues i also happens with other numbers.

Test script:
---
$ADODB = new COM( 'ADODB.Connection' );
$ADODB-open($strConn);  #connection to a MS-Access
Database

$RS = $ADODB-execute(SELECT Lagerwert FROM tblStammdaten WHERE
tblStammdaten.Seriennummer='74925KR9';);
echo $RS-Fields(0)-Value . br;
$x = sprintf(%f,$RS-Fields(0)-Value);
echo $x;


Expected result:

1900
1900.00

Actual result:
--
1900
18:0.00 

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



Bug #55751 [Com]: printf issue in combinatin with com connection

2011-09-21 Thread michael dot fellinger at multitec-sono dot at
Edit report at https://bugs.php.net/bug.php?id=55751edit=1

 ID: 55751
 Comment by: michael dot fellinger at multitec-sono dot at
 Reported by:michael dot fellinger at multitec-sono dot at
 Summary:printf issue in combinatin with com connection
 Status: Feedback
 Type:   Bug
 Package:COM related
 Operating System:   Windows 7
 PHP Version:Irrelevant
 Block user comment: N
 Private report: N

 New Comment:

5.3.8 solves the problem, thanks!


Previous Comments:

[2011-09-21 08:42:11] paj...@php.net

Please try with 5.3.8 or a snapshot.


[2011-09-21 08:25:03] michael dot fellinger at multitec-sono dot at

Description:

I use PHP Version 5.3.5 but it seems to be not solved in newer Versions

It only happends with the number or string 1900 and only if the execute command 
from the adodb connection was performed.
I gues i also happens with other numbers.

Test script:
---
$ADODB = new COM( 'ADODB.Connection' );
$ADODB-open($strConn);  #connection to a MS-Access Database

$RS = $ADODB-execute(SELECT Lagerwert FROM tblStammdaten WHERE 
tblStammdaten.Seriennummer='74925KR9';);
echo $RS-Fields(0)-Value . br;
$x = sprintf(%f,$RS-Fields(0)-Value);
echo $x;


Expected result:

1900
1900.00

Actual result:
--
1900
18:0.00 






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


Bug #47304 [Com]: typecast of numeric string to float produces strange result

2011-09-12 Thread michael dot fellinger at multitec-sono dot at
Edit report at https://bugs.php.net/bug.php?id=47304edit=1

 ID: 47304
 Comment by: michael dot fellinger at multitec-sono dot at
 Reported by:lennart dot vandendool at fonq dot nl
 Summary:typecast of numeric string to float produces strange
 result
 Status: Assigned
 Type:   Bug
 Package:Scripting Engine problem
 Operating System:   win32 only
 PHP Version:5.2.9
 Assigned To:pajoye
 Block user comment: N
 Private report: N

 New Comment:

Similar Bug in PHP Version 5.3.5

My Code:
--
$ADODB = new COM( 'ADODB.Connection' );
$ADODB-open($strConn);

$RS = $ADODB-execute(SELECT Lagerwert FROM tblStammdaten WHERE 
tblStammdaten.Seriennummer='74925KR9';);
echo $RS-Fields(0)-Value . br;
$x = sprintf(%f,$RS-Fields(0)-Value);
echo $x;
--
gives following result:
---
1900
18:0.00 
---
It only happends with the number or string 1900 and only if the execute command 
from the adodb connection was performed.
I gues i also happens with other numbers.


Previous Comments:

[2010-11-08 19:04:49] lennart dot vandendool at fonq dot nl

The same goes for php-5.3.3-nts-Win32-VC9-x86 on SBS 2003 (x86) and 2008 R2 
(x64)


[2010-11-08 18:54:24] lennart dot vandendool at fonq dot nl

I just tested php-5.3.3-Win32-VC9-x86 on Windows Server 2003 x86 and 2008 R2 
x64. The problem doesn't occur anymore.


[2010-07-13 12:45:53] ola dot andersson at liko dot se

Thank you for your suggestion pajoye.

Neither php-5.3.2-nts-Win32-VC6-x86 or php-5.3.2-nts-Win32-VC9-x86 include the 
extension php_mssql.dll. Without this extension I am not able to properly 
upgrade and test our systems with this version of PHP. 

Howcome php_mssql is no longer included with the distributions?


[2010-07-12 13:48:17] paj...@php.net

Please try with 5.3.2 or 5.3.3RC2 VC9 version.


[2010-07-12 12:53:18] ola dot andersson at liko dot se

Error occur also when fetching data from a MS SQL server having the column 
value 290.00 (database Money format). 

$query =select pris from sa_jobb_3_1 WHERE id='.$id.';
$result = mssql_query($query) or die($query);
$row = mssql_fetch_array($result,MSSQL_ASSOC);
printf(%f,$row['pris']);  

The code above outputs incorrectly 28:.00 and not as expected 290.00




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


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


Bug #30959 [Com]: __call does not return by reference

2011-08-28 Thread michael at unsolicted dot yahoo dot com
Edit report at https://bugs.php.net/bug.php?id=30959edit=1

 ID: 30959
 Comment by: michael at unsolicted dot yahoo dot com
 Reported by:joel at zmail dot pt
 Summary:__call does not return by reference
 Status: Bogus
 Type:   Bug
 Package:Scripting Engine problem
 Operating System:   *
 PHP Version:5CVS-2005-03-09
 Assigned To:andi
 Block user comment: N
 Private report: N

 New Comment:

With all due respect, only variables should be assigned by reference makes no 
sense.

__call does not assign variables.  It executes code for innaccessible methods, 
and that code may wish to return a reference.

Not bogus; this functionality existed in PHP4 as __call()'s third parameter was 
passed by reference.

Although this is in no way justification for the fix (as I have already 
justified it) consider this: (pedantic error checking removed for simplicity)

?
class Foo
{
private $world;

function __call($method,$params)
{
if( substr(0,3,$method) == 'get' )
return $this-{substr($method,3)};
}

function __get($property)
{
return $this-{'get'.$property}();
}
}

$hello = new Hello;
$hello-world[] = 'php maintainers always say NO';
?

--which does not work.  For those of us mere 'users' who need this, as a work 
around try this:

?
class Hello
{
. . . include definition from above . . .

function getWorld()
{
return $this-world;
}
}
?

--which DOES work, although that is not really the point!


Previous Comments:

[2005-06-19 02:28:03] sni...@php.net

PHP Strict Standards:  Only variables should be assigned by reference



[2005-03-09 01:00:30] sni...@php.net

Andi, is this the final call? :)
(documentation or engine change..that is the question)



[2005-03-08 12:53:29] joel at zmail dot pt

well, then that info about __call and return by reference should go into the 
manual, in the __call section.
right?


[2005-03-08 12:50:23] he...@php.net

At the moment __call() relies on the internal signature which is return by copy 
and the fact that the engine prevents from implementing return by reference 
functions at c-level.


[2005-03-08 12:01:42] joel at zmail dot pt

I've just tested with latest php 5 (php5-200503080930)
and the problem is not solved.




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


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


[PHP-BUG] Bug #54621 [NEW]: The return value of the svn_update function is incorrect

2011-04-28 Thread michael at abouttheweb dot de
From: 
Operating system: Ubuntu 10.04 2.6.32-31-generic
PHP version:  5.3.6
Package:  Unknown/Other Function
Bug Type: Bug
Bug description:The return value of the svn_update function is incorrect

Description:

---

From manual page: http://www.php.net/function.svn-update#Rückgabewerte

---

The return value of the svn_update function is incorrect. It should be the
current revision but it seems to me, that the return value is always 1.

Test script:
---
print svn_update($path, SVN_REVISION_HEAD, true);

Expected result:

The current revison number

Actual result:
--
1

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



[PHP-BUG] Bug #54309 [NEW]: Multiple environment variables for PHP_ADMIN_VALUE only accepts last value

2011-03-18 Thread michael at kazenonline dot com
From: 
Operating system: Linux
PHP version:  5.3.6
Package:  FPM related
Bug Type: Bug
Bug description:Multiple environment variables for PHP_ADMIN_VALUE only accepts 
last value

Description:

If you wanted to specify multiple PHP_ADMIN_VALUE environment variables,
such as 

(nginx config):



fastcgi_param PHP_ADMIN_VALUE sendmail_from=Me;

fastcgi_param PHP_ADMIN_VALUE sendmail_path=/usr/sbin/sendmail -f
m...@me.com;



then only the second one gets picked up (probably because as an environment


variable, the last one is clobbering over the first one(s)).





Expected result:

Respect multiple PHP_ADMIN_VALUE variables, or perhaps read in environment


variables like PHP_ADMIN_VALUE[variable_name], so that this would work:



fastcgi_param PHP_ADMIN_VALUE[sendmail_from] me;

fastcgi_param PHP_ADMIN_VALUE[sendmail_path] /usr/sbin/sendmail -f
m...@me.com;




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



[PHP-BUG] Bug #54278 [NEW]: mysqli extension compiles against mysql-5.5.9 but does not run

2011-03-16 Thread michael at nileguide dot com
From: 
Operating system: Linux
PHP version:  Irrelevant
Package:  Reproducible crash
Bug Type: Bug
Bug description:mysqli extension compiles against mysql-5.5.9 but does not run

Description:

PHP-5.1.6 mysqli extension compiles against mysql-5.5.9 but fails to load.
The failure message is: 



PHP Warning:  PHP Startup: Unable to load dynamic library
'/usr/lib64/php/modules/mysqli.so' - /usr/lib64/php/modules/mysqli.so:
undefined symbol: mysql_disable_reads_from_master in Unknown on line 0



The reason for this is that the msql_disable_ functions were removed from
mysql, as per the following bug: http://bugs.mysql.com/bug.php?id=31952



Please update such that php-5.1.6 is compatible with mysql-5.5

Thanks!


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



Bug #52412 [Com]: __autoload fails to throw exception when calling a static method on the class

2011-02-19 Thread michael at squiloople dot com
Edit report at http://bugs.php.net/bug.php?id=52412edit=1

 ID: 52412
 Comment by: michael at squiloople dot com
 Reported by:madboyka at yahoo dot com
 Summary:__autoload fails to throw exception when calling a
 static method on the class
 Status: Bogus
 Type:   Bug
 Package:Scripting Engine problem
 Operating System:   *
 PHP Version:5.3.3
 Block user comment: N
 Private report: N

 New Comment:

Here's a request to re-open the bug, for it is indeed a bug: exceptions
can be 

thrown and caught if the method called is _not_ static, as documented,
but cannot 

be thrown and caught if the method _is_ static (and where the class name
is not a 

variable), which is both inconsistent and against the documentation. It
is 

_unexpected_ behaviour.


Previous Comments:

[2011-02-16 15:31:49] madboyka at yahoo dot com

To: der...@php.net

I don't think you've read the documentation on autoloading yourself:

http://www.php.net/manual/en/language.oop5.autoload.php



The first note states that since PHP 5.3, you may throw an exception
from the autoload function (even if the class can be loaded) and catch
that exception without a problem. Examples #3 and #4 in the
documentation entry demonstrate this. This works when the autoload
function gets invoked when instantiating a class, but doesn't when you
make a static call on it. This behavior is not consistent.

Also, take a look at michael@...'s workaround, which unexpectedly works
great. And don't tell me that PHP behaves as expected.



I understand, that this is not a major bug, we all can live without a
fix, but at least mark it as to be fixed in the far future.


[2011-02-16 11:24:38] der...@php.net

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

FWIW, this is expected. The __autoload() method is the last line of
defense for PHP to find a class definition. If it can't find it, PHP
bails out with a fatal error. If you throw an exception, you basically
abort this final chance, and thus gives PHP you that fatal can not find
class error. However, you can catch the exception in the __autoload()
method,


[2011-02-16 08:05:14] michael at squiloople dot com

There's a slight hack of a solution tested using PHP 5.3.5 and Windows
Vista: 

use a variable as the class name:



function __autoload($class)

{



  if (!include $class . '.php')

  {

throw new Exception('Cannot autoload ' . $class);

  }



}



$class = 'Application';



try

{

  $class::start();

}



catch (Exception $e)

{

  echo $e-getMessage();

}



// Outputs the exception as expected.


[2010-09-25 23:39:25] alex dot offshore at gmail dot com

Temporary solution.

Caveats and notices:

- The class actually WILL BE DEFINED ANYWAY;

- 'eval' usage;

- __callStatic used to avoid method not found error.



?php

function __autoload($className)

{

  echo Want to load $className.\n;

  

  // assuming we can not load class

  // error handling code

  {

eval('class ' . $className . ' { static function __callStatic($n,
$a) { return false; } }');

throw new Exception(Unable to load $className.);

  }

}



try

{

  //new MissingClass(); // works as expected

  MissingClass::someFunction();

}

catch (Exception $e)

{

  echo 'CAUGHT: ' . $e-getMessage(), \n;

}


[2010-09-03 03:26:56] php dot net at phrozenbyte dot de

Same on Ubuntu 10.04 / Apache 2.2 and CLI mode



Test script:

---

?php

spl_autoload_register(

function($autoload) {

throw new Exception();

}

);

try {

Foo::bar();

} catch(Exception $e) {

echo Exception caught\n;

}

?



Expected result:



Exception caught



Actual result:

--

Fatal error: Class 'Foo' not found in /home/daniel/www/other/php-bug.php
on line 0




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

http://bugs.php.net/bug.php?id=52412


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=52412edit=1


Bug #52412 [Com]: __autoload fails to throw exception when calling a static method on the class

2011-02-15 Thread michael at squiloople dot com
Edit report at http://bugs.php.net/bug.php?id=52412edit=1

 ID: 52412
 Comment by: michael at squiloople dot com
 Reported by:madboyka at yahoo dot com
 Summary:__autoload fails to throw exception when calling a
 static method on the class
 Status: Open
 Type:   Bug
 Package:Scripting Engine problem
 Operating System:   Windows
 PHP Version:5.3.3
 Block user comment: N
 Private report: N

 New Comment:

There's a slight hack of a solution tested using PHP 5.3.5 and Windows
Vista: 

use a variable as the class name:



function __autoload($class)

{



  if (!include $class . '.php')

  {

throw new Exception('Cannot autoload ' . $class);

  }



}



$class = 'Application';



try

{

  $class::start();

}



catch (Exception $e)

{

  echo $e-getMessage();

}



// Outputs the exception as expected.


Previous Comments:

[2010-09-25 23:39:25] alex dot offshore at gmail dot com

Temporary solution.

Caveats and notices:

- The class actually WILL BE DEFINED ANYWAY;

- 'eval' usage;

- __callStatic used to avoid method not found error.



?php

function __autoload($className)

{

  echo Want to load $className.\n;

  

  // assuming we can not load class

  // error handling code

  {

eval('class ' . $className . ' { static function __callStatic($n,
$a) { return false; } }');

throw new Exception(Unable to load $className.);

  }

}



try

{

  //new MissingClass(); // works as expected

  MissingClass::someFunction();

}

catch (Exception $e)

{

  echo 'CAUGHT: ' . $e-getMessage(), \n;

}


[2010-09-03 03:26:56] php dot net at phrozenbyte dot de

Same on Ubuntu 10.04 / Apache 2.2 and CLI mode



Test script:

---

?php

spl_autoload_register(

function($autoload) {

throw new Exception();

}

);

try {

Foo::bar();

} catch(Exception $e) {

echo Exception caught\n;

}

?



Expected result:



Exception caught



Actual result:

--

Fatal error: Class 'Foo' not found in /home/daniel/www/other/php-bug.php
on line 0


[2010-07-23 09:34:02] madboyka at yahoo dot com

Description:

I've tried to do the following:



1. Wrote and autoload method, that throws an exception.

3. Made a static call on a non-existing class within a try block.



Tried this on windows 7 / Apache 2.2 / PHP 5.3.3.

Test script:
---
?php



function __autoload($class_name) {

throw new Exception($class_name);

}



try {

Application::start();

// new Application(); works fine

} catch (Exception $ex) {

var_dump($ex);

}



Expected result:

The script should var_dump() an exception with the Message 'Application'
as it does when instantiating a class.

Actual result:
--
The script dies with Fatal error: Class 'Application' not found.






-- 
Edit this bug report at http://bugs.php.net/bug.php?id=52412edit=1


Req #48587 [Fbk-Asn]: MySQL PDO driver doesn't support SSL connections

2011-02-09 Thread michael dot stringer at yuuguu dot com
Edit report at http://bugs.php.net/bug.php?id=48587edit=1

 ID: 48587
 User updated by:michael dot stringer at yuuguu dot com
 Reported by:michael dot stringer at yuuguu dot com
 Summary:MySQL PDO driver doesn't support SSL connections
-Status: Feedback
+Status: Assigned
 Type:   Feature/Change Request
 Package:PDO related
 Operating System:   *
-PHP Version:5.2.9
+PHP Version:*
 Assigned To:mysql
 Block user comment: N
 Private report: N

 New Comment:

As of version 5.3.5 this still hasn't been implemented so it is not
limited to 5.2.*


Previous Comments:

[2011-02-09 15:51:10] and...@php.net

5.2.* only? If yes, then this will be won't fix.


[2010-10-28 09:46:22] u...@php.net

5.2 is closed, http://www.php.net/archive/2010.php#id2010-07-22-1





 The PHP development team would like to announce the immediate
availability of PHP 5.2.14. This release focuses on improving the
stability of the PHP 5.2.x branch with over 60 bug fixes, some of which
are security related.



This release marks the end of the active support for PHP 5.2. Following
this release the PHP 5.2 series will receive no further active bug
maintenance. Security fixes for PHP 5.2 might be published on a case by
cases basis. All users of PHP 5.2 are encouraged to upgrade to PHP 5.3


[2009-06-17 15:55:44] michael dot stringer at yuuguu dot com

Description:

The mysqli driver supports connecting to MySQL databases using SSL
certificates via the ssl_set command (which in turn calls the native
client ssl_set function).



Please add this functionality to the PDO driver. This is currently
preventing us from switching from the mysqli APIs to PDO.







-- 
Edit this bug report at http://bugs.php.net/bug.php?id=48587edit=1


Bug #52674 [Com]: [FPM] Status page returns inconsistent Content-Type headers

2011-01-18 Thread 1 dot david dot michael at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=52674edit=1

 ID: 52674
 Comment by: 1 dot david dot michael at gmail dot com
 Reported by:php-bugs at majkl578 dot cz
 Summary:[FPM] Status page returns inconsistent Content-Type
 headers
 Status: Closed
 Type:   Bug
 Package:FPM related
 Operating System:   Linux Debian
 PHP Version:5.3.3
 Assigned To:fat
 Block user comment: N
 Private report: N

 New Comment:

Is there a work around with apache to avoid upgrading to 5.3.4 or 5.3.5?
Or is 

upgrading the only option?


Previous Comments:

[2010-08-23 22:41:56] f...@php.net

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




[2010-08-23 22:40:46] f...@php.net

Automatic comment from SVN on behalf of fat
Revision: http://svn.php.net/viewvc/?view=revisionamp;revision=302721
Log: - Fixed bug #52674 (FPM Status page returns inconsistent
Content-Type headers).


[2010-08-23 10:38:51] f...@php.net

Moreover, the Content-Type used for json was not the best choice. It was


application/jsonrequest.



As specified in RFC4627, it should be application/json.


[2010-08-23 10:28:43] f...@php.net

The status page does not return a valid Content-Type header:



...

text/plain

Content-type: text/plain

...



it should be



...

Content-type: text/plain

...



It affects apache but also any other front web servers. Nginx is more
tolerant 

and ignores unknown / malformed headers but text/html was use instead.


[2010-08-23 04:23:08] php-bugs at majkl578 dot cz

Description:

Apache 2 ends up with an error while trying to get content of /status
url. Ping url works fine.

Same problem with /status?json and /status?html.



Apache version: 2.2.16, mpm-worker

mod_fastcgi version: 2.4.6

Test script:
---
IfModule mod_fastcgi.c

FastCGIExternalServer /php5-fpm-handler -socket
/var/run/php5-fpm.sock

AddHandler php5-fcgi .php



LocationMatch /(ping|status)

SetHandler php5-fcgi-virt

Action php5-fcgi-virt /php5-fpm-handler.fcgi virtual

/LocationMatch



Action php5-fcgi /php5-fpm-handler.fcgi

ScriptAlias /php5-fpm-handler.fcgi /php5-fpm-handler

/IfModule

Expected result:

FPM status page

Actual result:
--
500 Internal error



Logged in Apache's error log:

[Mon Aug 23 04:16:55 2010] [error] [client 127.0.0.1] FastCGI: comm with
server /php5-fpm-handler aborted: error parsing headers: malformed
header 'text/plain'






-- 
Edit this bug report at http://bugs.php.net/bug.php?id=52674edit=1


[PHP-BUG] Bug #53609 [NEW]: $_POST failes to populate

2010-12-25 Thread michael at tuxgames dot com
From: 
Operating system: Linux
PHP version:  5.3SVN-2010-12-25 (snap)
Package:  Variables related
Bug Type: Bug
Bug description:$_POST failes to populate

Description:

PHP's php.ini can be configured in a valid way that causes $_POST to stop 

populating.



upload_max_filesize = 6000M

post_max_size = 8000M



Setting these values too high (in this case to allow a DVD upload) caues
$_POST 

to just be an empty array()



Changing them to 60M and 80M respectively it all works again.


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



[PHP-BUG] Bug #53556 [NEW]: cURL returns wrong Content-Length after a redirect to a page without CL-header

2010-12-16 Thread michael dot moench at marktjagd dot de
From: 
Operating system: Ubuntu 10.04
PHP version:  5.3SVN-2010-12-16 (SVN)
Package:  HTTP related
Bug Type: Bug
Bug description:cURL returns wrong Content-Length after a redirect to a page 
without CL-header

Description:

I have an URL which will redirect me to a second, final URL. The first
response contains a Content-Length-Header, the second does not. If I set
the CURLOPT_FOLLOWLOCATION option, I would expect that the
download_content_length-field from curl_getinfo contains the
Content-Length of the final URL, in this case 0, but it contains the
Content-Length of the first Response.



The first Response:



HTTP/1.1 302 Found

Date: Thu, 16 Dec 2010 11:39:31 GMT

Server: Microsoft-IIS/6.0

X-Powered-By: ASP.NET

X-AspNet-Version: 2.0.50727

Location: http://productdata.download.affili.net/xxx

Set-Cookie: ASP.NET_SessionId=xxx; path=/; HttpOnly

Cache-Control: private

Content-Type: text/html; charset=Windows-1252

Content-Length: 214



The Second Response:



HTTP/1.1 200 OK

Date: Thu, 16 Dec 2010 11:39:32 GMT

Server: Microsoft-IIS/6.0

X-Powered-By: ASP.NET

X-AspNet-Version: 2.0.50727

Content-Disposition: attachment; filename=xxx.gz

Transfer-Encoding: chunked

Cache-Control: private

Content-Type: application/gzip




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



Bug #42834 [Com]: strstr before_needle bug

2010-11-20 Thread michael dot t dot bryan at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=42834edit=1

 ID: 42834
 Comment by: michael dot t dot bryan at gmail dot com
 Reported by:calvink at conceptualnetworking dot com
 Summary:strstr before_needle bug
 Status: Bogus
 Type:   Bug
 Package:*General Issues
 Operating System:   Linux
 PHP Version:5.2.4
 Block user comment: N
 Private report: N

 New Comment:

This was added in php 5.3.0 according the manual as of this date. I am
running php 

5.3.3 and encounter this error.


Previous Comments:

[2007-10-03 08:12:25] tony2...@php.net

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




[2007-10-03 05:11:33] judas dot iscariote at gmail dot com

6.0.0Added the before_needle parameter



so, the error is expected , parameter only present in PHP6 (CVS HEAD
atm)


[2007-10-03 04:31:56] calvink at conceptualnetworking dot com

Description:

strstr() does not handle the third parameter appropriately for
before_needle.



This uses the example provided in the documentation for strstr.

Reproduce code:
---
$email  = 'n...@example.com';

$user = strstr($email, '@', true);

echo $user;

Expected result:

It should print name

Actual result:
--
Nothing is displayed and I receive the error:



Warning: Wrong parameter count for strstr() in
/xxx/xxx/x/test_read.php5



This also occured using PHP 4.4.7.






-- 
Edit this bug report at http://bugs.php.net/bug.php?id=42834edit=1


[PHP-BUG] Bug #53309 [NEW]: Capturing group failing with a colon

2010-11-14 Thread michael at squiloople dot com
From: 
Operating system: Vista
PHP version:  5.3.3
Package:  Regexps related
Bug Type: Bug
Bug description:Capturing group failing with a colon

Description:

In some circumstances, when a colon is a specified character in a capturing
group, 

it unexpectedly fails.

Test script:
---
preg_match('/^(([a-z])(?::(?2))*)::(?:(?1):)[a-z]$/', 'a::a:a');

preg_match('/^(([a-z])(?::(?2))*)::(?:(?1)-)[a-z]$/', 'a::a-a');

Expected result:

int(1)

int(1)

Actual result:
--
int(0)

int(1)

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



Bug #53309 [Bgs]: Capturing group failing with a colon

2010-11-14 Thread michael at squiloople dot com
Edit report at http://bugs.php.net/bug.php?id=53309edit=1

 ID: 53309
 User updated by:michael at squiloople dot com
 Reported by:michael at squiloople dot com
 Summary:Capturing group failing with a colon
 Status: Bogus
 Type:   Bug
 Package:Regexps related
 Operating System:   Vista
 PHP Version:5.3.3
 Block user comment: N

 New Comment:

I don't understand. The only difference between the two cases is that
one has a 

colon after the backreference and the other has a dash. Look at it like
this:



GROUP 1 :: COPY OF GROUP ONE :

GROUP 1 :: COPY OF GROUP ONE -



Why would the first fail but the second not? They should both work.


Previous Comments:

[2010-11-14 22:19:13] fel...@php.net

This is a behavior of PCRE library.



PCRE manpages says:



   Like  recursive  subpatterns, a subroutine call is always treated
as an

   atomic group. That is, once it has matched some of the subject 
string,

   it  is  never  re-entered, even if it contains untried
alternatives and

   there is a subsequent matching failure. Any capturing parentheses
 that

   are  set  during  the  subroutine  call revert to their previous
values

   afterwards.


[2010-11-14 16:16:33] michael at squiloople dot com

Description:

In some circumstances, when a colon is a specified character in a
capturing group, 

it unexpectedly fails.

Test script:
---
preg_match('/^(([a-z])(?::(?2))*)::(?:(?1):)[a-z]$/', 'a::a:a');

preg_match('/^(([a-z])(?::(?2))*)::(?:(?1)-)[a-z]$/', 'a::a-a');

Expected result:

int(1)

int(1)

Actual result:
--
int(0)

int(1)






-- 
Edit this bug report at http://bugs.php.net/bug.php?id=53309edit=1


[PHP-BUG] Bug #53195 [NEW]: __invoke fails when object is member of another object.

2010-10-28 Thread dmgx dot michael at gmail dot com
From: 
Operating system: Windows
PHP version:  5.3.3
Package:  Class/Object related
Bug Type: Bug
Bug description:__invoke fails when object is member of another object.

Description:

The magic invoke function fails to trigger if an object belongs to another
object.

Test script:
---
class A {

public function __invoke() {

echo 'hello from A ';

}

}



class B {

protected $a;   

public function __invoke() {

echo 'hello from B ';

$this-a = new A();

$this-a();

}

}



$b = new B();

$b();

Expected result:

hello from B hello from A

Actual result:
--
hello from B

Fatal error: Call to undefined method B::a() in
C:\xampp\gazelle\tools\htdocs\testing.php on line 15

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



Req #52995 [Com]: Modify Include and Require to specify namespace.

2010-10-25 Thread dmgx dot michael at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=52995edit=1

 ID: 52995
 Comment by: dmgx dot michael at gmail dot com
 Reported by:dmgx dot michael at gmail dot com
 Summary:Modify Include and Require to specify namespace.
 Status: Open
 Type:   Feature/Change Request
 Package:Class/Object related
 Operating System:   Irrelevant
 PHP Version:5.3.3
 Block user comment: N

 New Comment:

I played around with some test cases using eval to simulate the
autoloaders case use I mentioned - but that's a no go because PHP dies
if a second request for a class is raised while evaluating autoload
code.  Unless this is changed so that PHP recalls the autoloader when
this occurs the case study can't be applied which in turn makes the
usefulness of this change partially moot.  It's still useful for the
original corner case of template parsing but beyond that not.


Previous Comments:

[2010-10-06 00:16:04] dmgx dot michael at gmail dot com

I just noted that you can emulate what I propose in the current language
with 

eval()



eval( 'namespace '.$namespace.'; '.file_get_contents($path) );



Not usable in production I would imagine since eval is fairly slow
compared to 

straight including (but I could be wrong);


[2010-10-05 23:50:27] dmgx dot michael at gmail dot com

Description:

Would it be possible to modify include() and require() to take a second
argument specifying the namespace scope that the included code will
execute in.  If the argument is omitted the code executes in the root
scope it always has. Any namespace paths in the file would be
sub-namespaces of the namespace path specified in this new second
argument.  Examples:



include('file.php', __NAMESPACE__); // exec in current namespace

require('other.php', '\\MyNamspace'); // exec in 'MyNamespace';

require_once('again.php'); // exec in global namespace for backward
compat.



This change addresses a minor problem I hit while using namespaces with
my template system. The template files are included into the function
scope, but the code in those templates loses the namespace of the
function that made the include call. I could namespace the templates,
but they are primarily html files and so having a namespace header on
them looks ugly.



I do not know if the loss of namespace is considered a bug in and of
itself.



One powerful application of this addition is it would allow autoloaders
to load classes into different namespaces. Instead of declaring the
namespace of the class in the class file statically, the autoloader
could determine the namespace it needs to load the class into to satisfy
the path. This would also allow for dynamic subclassing of projects.



Consider framework with namespaces \Framework and \Project.  The former
contains the default work files of the framework and the latter those of
the project.  A call for a new class is issued to the autoloader from
code executing in \Framework space looking for the Page class.  The
autoloader is programmed to check the project files first to see if
there's an override.  There is.  The file starts off with class Page
extends \Framework\Page If include(Page.php \\Framework) is allowed
then we will get a second call to the autoloader for the original
framework file, but the path will be \Framework\Framework\Page. With a
little effort in the autoload writing this could be resolved and code
execution could continue.



Not going to say how easy it would be to *debug*... but it does add a
lot of flexibility into the mix.







-- 
Edit this bug report at http://bugs.php.net/bug.php?id=52995edit=1


[PHP-BUG] Req #53159 [NEW]: Tolerant and Strict Variables and functions

2010-10-25 Thread dmgx dot michael at gmail dot com
From: 
Operating system: 
PHP version:  Irrelevant
Package:  Variables related
Bug Type: Feature/Change Request
Bug description:Tolerant and Strict Variables and functions

Description:

These are suggestions for PHP 6.0.



A tolerant variable, unlike a scalar, has an assigned type.  If a value is


placed in a tolerant variable of the wrong type it silently casts it to the


correct type. It would require a new language keyword, tolerant.



tolerant string $a = 'hello';

$a = false;

echo $a // echos the string value of false, '' 



A strict variable behaves much the same but triggers an error (or throws 

exception) rather than silently recasting. It requires a new keyword
strict



strict int $a = 5;

$a = false; // exception thrown.



The purpose of these var types is to build a better bridge between
undata-typed 

programming used by beginning coders and strict data-typed programming used
by 

veterans without forcing the former camp to adjust - PHP's strength is ease
of 

learning.



Tolerant functions apply the recasting to their incoming arguments
according to 

the datatypes hinted for the objects - if the value isn't of the
appropriate 

object a new object ob the type hinted is created receiving that value as
an 

argument.



Strict functions throw errors but can also overload sharing names with each


other so long as no two strict functions try to have both the same name and


argument types. So



strict function foo ( int $a ) {}

strict function foo ( string $a ) {}

strict function foo ( MyClass $a ) {}



would be possible.


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



[PHP-BUG] Bug #53160 [NEW]: Importing and Legacy Mode suggestion for PHP 6.0 (7.0?)

2010-10-25 Thread dmgx dot michael at gmail dot com
From: 
Operating system: 
PHP version:  Irrelevant
Package:  Class/Object related
Bug Type: Bug
Bug description:Importing and Legacy Mode suggestion for PHP 6.0 (7.0?)

Description:

Currently the internal PHP function library is, well, unique.  Proposed is
a 

means to maintain backward compatibility while rectifying the problem and 

hopefully on the engine side speed up the process by reducing what the zend


engine has to track.



import keyword.

import attaches the specified namespace to the current one. An error is
thrown 

if there is a symbol collision between the namespaces.



namespace Bar {

   function Foo(){}

}

namespace Test {

  import \Bar

  Foo() // works

  Bar\Foo() // doesn't work - try use Bar instead.

}



If import is asked to pull a namespace that doesn't exist there's an error.


Import has one other use.



namespace Test;

import @PDO;



This pulls the PDO library of PHP 6 into the Test namespace. This brings us
back 

to the solution of the function library problem.



PHP 6 would ship with a legacy mode set to true. In that mode everything is
as 

now - the namespace \ having thousands of functions.



Turn it off though and namespace \ is empty except for a core selection of


functions and objects. The rest of the function library will be divided
into 

libraries that can be imported as needed.



Legacy functions remain available in library legacy so



namespace MyNamespace;

import @Legacy;



would let code in MyNamespace use the current function library.


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



Req #52807 [Com]: magic __toArray() for objects

2010-10-11 Thread dmgx dot michael at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=52807edit=1

 ID: 52807
 Comment by: dmgx dot michael at gmail dot com
 Reported by:jtegwen at gmail dot com
 Summary:magic __toArray() for objects
 Status: Open
 Type:   Feature/Change Request
 Package:Class/Object related
 Operating System:   n/a
 PHP Version:Irrelevant
 Block user comment: N

 New Comment:

I've found that when I have an object I need to behave like an array in
some contexts that it is worth the time to implement Iterator and Array
in the object, which allows the object to behave like an array.  It
takes more effort than implementing a theoretical magic __toArray()
method, but its worth it. 



Read here for information on doing this:
http://php.net/manual/en/language.oop5.iterations.php


Previous Comments:

[2010-10-03 18:36:00] + at ni-po dot com

@aharvey: Couldn't the patch in the RFC you mentioned be modified to
support arrays, too? Or would the implementation for arrays be
completely different to the one for arrays?


[2010-09-12 04:06:35] ahar...@php.net

You are quite correct about request #52583. My apologies. I

remember skimming it when it came in, but obviously not very well. :)



To be honest, I think this is a better candidate for a thread on the

Internals mailing list or an RFC than a feature request here. I also

think this is extremely unlikely to make it in in any case,

particularly without a patch.



Nevertheless, I'll reopen this for now.


[2010-09-10 17:21:11] jtegwen at gmail dot com

I found that request when researching this one. I read that as casting
*to* an object not casting *from* an object. 



Am I missing something?


[2010-09-10 04:58:39] ahar...@php.net

Probably better bundled under request #52583 -- the RFC linked to there
is specifically to deal with casting to scalar types, but the syntax
suggested in the feature request is general enough to deal with arrays.


[2010-09-09 22:33:53] jtegwen at gmail dot com

Description:

It would be nice to have an analogous method to __toString() for
arrays.. maybe __toArray() for customized array return. 

Test script:
---
class myObject {

  private $data1;

  private $data2;

  private $meta1;



  public function __construct($data1, $data2) {

$this-data1 = $data1;

$this-data2 = $data2;

$this-meta1 = strlen($data1) + strlen($data2);

  }

  public function __toArray() {

return array('data1'=$this-data1, 'data2'=$this-data2);

  }

}



  $obj = new myObject('test', 'script');

  var_dump($obj);





Expected result:

array('data1'='test', 'data2'= 'script')

Actual result:
--
Not implemented






-- 
Edit this bug report at http://bugs.php.net/bug.php?id=52807edit=1


[PHP-BUG] Req #52995 [NEW]: Modify Include and Require to specify namespace.

2010-10-05 Thread dmgx dot michael at gmail dot com
From: 
Operating system: Irrelevant
PHP version:  5.3.3
Package:  Class/Object related
Bug Type: Feature/Change Request
Bug description:Modify Include and Require to specify namespace.

Description:

Would it be possible to modify include() and require() to take a second
argument specifying the namespace scope that the included code will execute
in.  If the argument is omitted the code executes in the root scope it
always has. Any namespace paths in the file would be sub-namespaces of the
namespace path specified in this new second argument.  Examples:



include('file.php', __NAMESPACE__); // exec in current namespace

require('other.php', '\\MyNamspace'); // exec in 'MyNamespace';

require_once('again.php'); // exec in global namespace for backward
compat.



This change addresses a minor problem I hit while using namespaces with my
template system. The template files are included into the function scope,
but the code in those templates loses the namespace of the function that
made the include call. I could namespace the templates, but they are
primarily html files and so having a namespace header on them looks ugly.



I do not know if the loss of namespace is considered a bug in and of
itself.



One powerful application of this addition is it would allow autoloaders to
load classes into different namespaces. Instead of declaring the namespace
of the class in the class file statically, the autoloader could determine
the namespace it needs to load the class into to satisfy the path. This
would also allow for dynamic subclassing of projects.



Consider framework with namespaces \Framework and \Project.  The former
contains the default work files of the framework and the latter those of
the project.  A call for a new class is issued to the autoloader from code
executing in \Framework space looking for the Page class.  The autoloader
is programmed to check the project files first to see if there's an
override.  There is.  The file starts off with class Page extends
\Framework\Page If include(Page.php \\Framework) is allowed then we
will get a second call to the autoloader for the original framework file,
but the path will be \Framework\Framework\Page. With a little effort in
the autoload writing this could be resolved and code execution could
continue.



Not going to say how easy it would be to *debug*... but it does add a lot
of flexibility into the mix.


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



Req #52995 [Opn]: Modify Include and Require to specify namespace.

2010-10-05 Thread dmgx dot michael at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=52995edit=1

 ID: 52995
 User updated by:dmgx dot michael at gmail dot com
 Reported by:dmgx dot michael at gmail dot com
 Summary:Modify Include and Require to specify namespace.
 Status: Open
 Type:   Feature/Change Request
 Package:Class/Object related
 Operating System:   Irrelevant
 PHP Version:5.3.3
 Block user comment: N

 New Comment:

I just noted that you can emulate what I propose in the current language
with 

eval()



eval( 'namespace '.$namespace.'; '.file_get_contents($path) );



Not usable in production I would imagine since eval is fairly slow
compared to 

straight including (but I could be wrong);


Previous Comments:

[2010-10-05 23:50:27] dmgx dot michael at gmail dot com

Description:

Would it be possible to modify include() and require() to take a second
argument specifying the namespace scope that the included code will
execute in.  If the argument is omitted the code executes in the root
scope it always has. Any namespace paths in the file would be
sub-namespaces of the namespace path specified in this new second
argument.  Examples:



include('file.php', __NAMESPACE__); // exec in current namespace

require('other.php', '\\MyNamspace'); // exec in 'MyNamespace';

require_once('again.php'); // exec in global namespace for backward
compat.



This change addresses a minor problem I hit while using namespaces with
my template system. The template files are included into the function
scope, but the code in those templates loses the namespace of the
function that made the include call. I could namespace the templates,
but they are primarily html files and so having a namespace header on
them looks ugly.



I do not know if the loss of namespace is considered a bug in and of
itself.



One powerful application of this addition is it would allow autoloaders
to load classes into different namespaces. Instead of declaring the
namespace of the class in the class file statically, the autoloader
could determine the namespace it needs to load the class into to satisfy
the path. This would also allow for dynamic subclassing of projects.



Consider framework with namespaces \Framework and \Project.  The former
contains the default work files of the framework and the latter those of
the project.  A call for a new class is issued to the autoloader from
code executing in \Framework space looking for the Page class.  The
autoloader is programmed to check the project files first to see if
there's an override.  There is.  The file starts off with class Page
extends \Framework\Page If include(Page.php \\Framework) is allowed
then we will get a second call to the autoloader for the original
framework file, but the path will be \Framework\Framework\Page. With a
little effort in the autoload writing this could be resolved and code
execution could continue.



Not going to say how easy it would be to *debug*... but it does add a
lot of flexibility into the mix.







-- 
Edit this bug report at http://bugs.php.net/bug.php?id=52995edit=1


[PHP-BUG] Bug #52920 [NEW]: Division equations are overridden

2010-09-24 Thread michael at nerdalert dot biz
From: 
Operating system: Windows Server 2008 R2 Enterpris
PHP version:  5.3.3
Package:  Date/time related
Bug Type: Bug
Bug description:Division equations are overridden

Description:

The result of this equation (echo 240 / 23;) is NAN in each occurrence when
I run DateTime class before the equation. The datetime class needs to be
run multiple times to get the NAN result (for ($a=0;$a2;$a++){). 





Test script:
---
for ($a=0;$a2;$a++){

$lastResponse = date(Y-m-d);  

$noResponse = date(Y-m-d);

$dateCreated = new DateTime(date(Y-m-d, strtotime($lastResponse)));

$dateNotCreated = new DateTime(date(Y-m-d, strtotime($noResponse)));

$today = new DateTime(date(Y-m-d));



if(isset($lastResponse))

{

$diff = $today-diff($dateCreated);

}

else

{

$diff = $today-diff($dateNotCreated);

}

}

echo 240 / 23;

Expected result:

Not NAN

Actual result:
--
NAN

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



Bug #52920 [Opn]: Multiple datetime affects divisions

2010-09-24 Thread michael at nerdalert dot biz
Edit report at http://bugs.php.net/bug.php?id=52920edit=1

 ID: 52920
 User updated by:michael at nerdalert dot biz
 Reported by:michael at nerdalert dot biz
-Summary:Division equations are overridden
+Summary:Multiple datetime affects divisions
 Status: Open
 Type:   Bug
 Package:Date/time related
 Operating System:   Windows Server 2008 R2 Enterpris
 PHP Version:5.3.3
 Block user comment: N

 New Comment:

Changing the title only


Previous Comments:

[2010-09-24 17:25:48] michael at nerdalert dot biz

Description:

The result of this equation (echo 240 / 23;) is NAN in each occurrence
when I run DateTime class before the equation. The datetime class needs
to be run multiple times to get the NAN result (for ($a=0;$a2;$a++){).






Test script:
---
for ($a=0;$a2;$a++){

$lastResponse = date(Y-m-d);  

$noResponse = date(Y-m-d);

$dateCreated = new DateTime(date(Y-m-d, strtotime($lastResponse)));

$dateNotCreated = new DateTime(date(Y-m-d, strtotime($noResponse)));

$today = new DateTime(date(Y-m-d));



if(isset($lastResponse))

{

$diff = $today-diff($dateCreated);

}

else

{

$diff = $today-diff($dateNotCreated);

}

}

echo 240 / 23;

Expected result:

Not NAN

Actual result:
--
NAN






-- 
Edit this bug report at http://bugs.php.net/bug.php?id=52920edit=1


Bug #49788 [Com]: Missing command in make file for Generating phar.php

2010-09-22 Thread michael dot gilliam at aramco dot com
Edit report at http://bugs.php.net/bug.php?id=49788edit=1

 ID: 49788
 Comment by: michael dot gilliam at aramco dot com
 Reported by:venkata dot ballari at gmail dot com
 Summary:Missing command in make file for Generating
 phar.php
 Status: Feedback
 Type:   Bug
 Package:Compile Failure
 Operating System:   AIX 5.3
 PHP Version:5.3.0
 Block user comment: N

 New Comment:

I downloaded the latest release that was mentioned at the bottom of them
message 

and I still get the same error that was mentioned as this thread was
opened.



/home/gilliamb/php5.3-201009220630/sapi/cli/php_cli.c: In function 

'cli_seek_file_begin':

/home/gilliamb/php5.3-201009220630/sapi/cli/php_cli.c:621: warning:
comparison 

is always true due to limited range of data type

/home/gilliamb/php5.3-201009220630/sapi/cli/php_cli.c: In function
'main':

/home/gilliamb/php5.3-201009220630/sapi/cli/php_cli.c:1402: warning:
visibility 

attribute not supported in this configuration; ignored

/home/gilliamb/php5.3-201009220630/sapi/cli/php_cli.c: At top level:

/home/gilliamb/php5.3-201009220630/sapi/cli/php_cli.c:1402: warning:
visibility 

attribute not supported in this configuration; ignored

/bin/sh /home/gilliamb/php5.3-201009220630/libtool --silent
--preserve-

dup-deps --mode=compile gcc  -Isapi/cli/ -I/home/gilliamb/php5.3-

201009220630/sapi/cli/ -DPHP_ATOM_INC -I/home/gilliamb/php5.3-

201009220630/include -I/home/gilliamb/php5.3-201009220630/main -

I/home/gilliamb/php5.3-201009220630 -I/home/gilliamb/php5.3-

201009220630/ext/date/lib
-I/home/gilliamb/php5.3-201009220630/ext/ereg/regex -

I/opt/freeware/include/libxml2 -I/usr/local/nssg/curl/include -

I/usr/local/nssg/openldap/include -I/home/gilliamb/php5.3-

201009220630/ext/mbstring/oniguruma -I/home/gilliamb/php5.3-

201009220630/ext/mbstring/libmbfl -I/home/gilliamb/php5.3-

201009220630/ext/mbstring/libmbfl/mbfl
-I/home/gilliamb/php5.3-201009220630/TSRM 

-I/home/gilliamb/php5.3-201009220630/Zend-I/usr/include -g -O2 -

fvisibility=hidden   -c /home/gilliamb/php5.3-

201009220630/sapi/cli/php_cli_readline.c -o sapi/cli/php_cli_readline.lo


/bin/sh /home/gilliamb/php5.3-201009220630/libtool --silent
--preserve-

dup-deps --mode=compile gcc  -Imain/
-I/home/gilliamb/php5.3-201009220630/main/ 

-DPHP_ATOM_INC -I/home/gilliamb/php5.3-201009220630/include -

I/home/gilliamb/php5.3-201009220630/main
-I/home/gilliamb/php5.3-201009220630 -

I/home/gilliamb/php5.3-201009220630/ext/date/lib
-I/home/gilliamb/php5.3-

201009220630/ext/ereg/regex -I/opt/freeware/include/libxml2 -

I/usr/local/nssg/curl/include -I/usr/local/nssg/openldap/include -

I/home/gilliamb/php5.3-201009220630/ext/mbstring/oniguruma -

I/home/gilliamb/php5.3-201009220630/ext/mbstring/libmbfl -

I/home/gilliamb/php5.3-201009220630/ext/mbstring/libmbfl/mbfl -

I/home/gilliamb/php5.3-201009220630/TSRM -I/home/gilliamb/php5.3-

201009220630/Zend-I/usr/include -g -O2 -fvisibility=hidden   -c 

main/internal_functions_cli.c -o main/internal_functions_cli.lo 

echo '\

\

Generating phar.php

/bin/sh[14]: /home/gilliamb/php5.3-201009220630/sapi/cli/php:  not
found.

make: 1254-004 The error code from the last command is 127.





Stop.


Previous Comments:

[2010-05-09 23:20:11] fel...@php.net

Please try using this snapshot:

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

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




[2009-10-14 01:00:00] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to Open.


[2009-10-08 08:16:04] venkata dot ballari at gmail dot com

I tried the snapshot available at
http://snaps.php.net/php5.3-latest.tar.gz

I'm using bash. Still getting errors.



-I/usr/include -g   -c
/home/oa_apps/php5.3-200910070430/ext/fileinfo/libmagic/encoding.c -o
ext/fileinfo/libmagic/encoding.lo

1500-052: (S) Cannot write object file.

make: 1254-004 The error code from the last command is 1.





Stop.


[2009-10-06 15:25:26] j...@php.net

Please try using this snapshot:

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

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

And what shell are you using? Only bash is supported.


[2009-10-06 14:52:45] venkata dot ballari at gmail dot com

Description:

The Generating phar.php section of make fails with the error:



/bin/sh[14]: -d:  not found

Bug #50830 [Com]: FILTER_VALIDATE_IP incorrectly validates a compressed IPv4-mapped IPv6 address

2010-09-07 Thread michael at squiloople dot com
Edit report at http://bugs.php.net/bug.php?id=50830edit=1

 ID: 50830
 Comment by: michael at squiloople dot com
 Reported by:mikerushton at hotmail dot co dot uk
 Summary:FILTER_VALIDATE_IP incorrectly validates a
 compressed IPv4-mapped IPv6 address
 Status: Open
 Type:   Bug
 Package:Filter related
 Operating System:   *
 PHP Version:5.*, 6
 Block user comment: N

 New Comment:

RFC 5952 is only a Proposed Standard. RFC 4291 is still the authority.
And even 

if/when RFC 5952 is accepted, it is only a recommendation for (good
practice) 

representation and clearly states that all implementations must accept
and be 

able to handle any legitimate RFC 4291 format.


Previous Comments:

[2010-09-07 21:42:21] sob at academ dot com

Please note that RFC 4291 has been updated by RFC 5952.


[2010-08-17 18:47:30] michael at squiloople dot com

It has come to my attention that the regular expression I provided above
uses 

RFC 5321 as the authority on IPv6 address format. This differs from RFC
4291 

however, which is the ACTUAL authority on IPv6 address format. The key 

difference between the two is that 4291 allows a double colon to
represent just 

ONE 16-bit group of zeros whereas 5321 requires that it represent at
least TWO 

groups. As such, I have provided a modified regular expression which
conforms 

with 4291 in this respect (and have also removed the unnecessary
capturing 

groups present in my earlier regex)



(?:(?:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){7})|(?:(?!(?:.*[a-f0-

9](?::|$)){8,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,6})?::(?:[a-f0-

9]{1,4}(?::[a-f0-9]{1,4}){0,6})?)))|(?:(?:(?:(?:[a-f0-9]{1,4}(?::[a-f0-

9]{1,4}){5}:)|(?:(?!(?:.*[a-f0-9]:){6,})(?:[a-f0-9]{1,4}(?::[a-f0-

9]{1,4}){0,4})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,4}:)?)))?(?:25[0-5]|2[0-

4][0-9]|1[0-9]{2}|[1-9]?[0-9])(?:\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-

9])){3}))


[2010-02-01 15:34:13] mikerushton at hotmail dot co dot uk

An addition: here's my solution (as a regular expression):



(?:(?:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){7})|(?:(?!(?:.*[a-f0-9](?

::|$)){7,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?::(?:[a-f0-9]{1,4}(?

::[a-f0-9]{1,4}){0,5})?)))|(?:(?:(?:[a-f0-9]{1,4}(?::[a-f0-

9]{1,4}){5}:)|(?:(?!(?:.*[a-f0-9]:){5,})(?:[a-f0-9]{1,4}(?::[a-f0-

9]{1,4}){0,3})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3}:)?))?(?:(?

:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))(?:\.(?:(?:25[0-

5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))){3}))


[2010-01-24 15:45:29] mikerushton at hotmail dot co dot uk

Description:

FILTER_VALIDATE_IP validates the incorrect 0:::255.255.255.255 and does


not validate the correct 0::255.255.255.255



According to RFC 5321, the correct syntax is:



[IPv6-hex *3(: IPv6-hex)] :: [IPv6-hex *3(: IPv6-hex) :] IPv4-

address-literal



This does not allow for three consecutive colons.

Reproduce code:
---
// First



filter_var(':::255.255.255.255', FILTER_VALIDATE_IP);



// Second



filter_var('::255.255.255.255', FILTER_VALIDATE_IP);

Expected result:

// First



bool(false)



// Second



string(21) '::255.255.255.255'

Actual result:
--
// First



string(22) ':::255.255.255.255'



// Second



bool(false)






-- 
Edit this bug report at http://bugs.php.net/bug.php?id=50830edit=1


Bug #52713 [Com]: Can't call undefined methods (using __call) on parent

2010-08-30 Thread michael at wakeless dot net
Edit report at http://bugs.php.net/bug.php?id=52713edit=1

 ID: 52713
 Comment by: michael at wakeless dot net
 Reported by:michael at wakeless dot net
 Summary:Can't call undefined methods (using __call) on
 parent
 Status: Open
 Type:   Bug
 Package:Scripting Engine problem
 Operating System:   All
 PHP Version:5.3.3
 Block user comment: N

 New Comment:

I'm pretty sure everyone should be aware of this but I'll say it
nonetheless.



parent:: isn't necessarily a static call. When it's used within an
object context it should remain within an object context, but the
subsequent call to __callStatic seems to lose it.



I tried a workaround of testing for $this in __callStatic but it seems
to have gone missing.



Is there anything I can do to help this out? Write a more comprehensive
test case that can be checked into the suite?


Previous Comments:

[2010-08-31 01:06:05] fel...@php.net

The change was introduced as a fix for the bug #51176.


[2010-08-31 01:05:07] fel...@php.net

The difference introduced was that the __call() just will be called when
__callStatic() is not implemented, on such static method calls.


[2010-08-28 22:38:40] giovanni at giacobbi dot net

I ran into the same problem.



It's a serious breakage! I just tested on php 5.3.2 and it works as
expected!


[2010-08-27 06:06:16] michael at wakeless dot net

Description:

When using the __call and __callStatic functionality on a parent class
calls to parent::method() will always use __callStatic rather than the
__call. 



This breaks backwards compatibility in a number of cases.

Test script:
---
class A {

  function __call($method, $args) {

if($method == Test) {

  echo Success.;

}

  }

  

  function __callStatic($method, $args) {

echo Failure.;

  }

}



class B extends A {

  function Test() {

echo Test called.;

parent::Test();

  }

}



$test = new B;

$test-Test();



Expected result:

//Expected output: Test called.Success.

Actual result:
--
//Actual output: Test called.Failure






-- 
Edit this bug report at http://bugs.php.net/bug.php?id=52713edit=1


[PHP-BUG] Bug #52713 [NEW]: Can't call undefined methods (using __call) on parent

2010-08-26 Thread michael at wakeless dot net
From: 
Operating system: All
PHP version:  5.3.3
Package:  Scripting Engine problem
Bug Type: Bug
Bug description:Can't call undefined methods (using __call) on parent

Description:

When using the __call and __callStatic functionality on a parent class
calls to parent::method() will always use __callStatic rather than the
__call. 



This breaks backwards compatibility in a number of cases.

Test script:
---
class A {

  function __call($method, $args) {

if($method == Test) {

  echo Success.;

}

  }

  

  function __callStatic($method, $args) {

echo Failure.;

  }

}



class B extends A {

  function Test() {

echo Test called.;

parent::Test();

  }

}



$test = new B;

$test-Test();



Expected result:

//Expected output: Test called.Success.

Actual result:
--
//Actual output: Test called.Failure

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



Bug #50431 [Com]: Using filter_var to filter an email address returns incorrect result

2010-08-20 Thread michael at squiloople dot com
Edit report at http://bugs.php.net/bug.php?id=50431edit=1

 ID: 50431
 Comment by: michael at squiloople dot com
 Reported by:troy at scriptedmotion dot com
 Summary:Using filter_var to filter an email address returns
 incorrect result
 Status: Bogus
 Type:   Bug
 Package:Filter related
 Operating System:   Ubuntu
 PHP Version:5.2.11
 Block user comment: N

 New Comment:

The standards are actually RFC 5321 and 5322, and according to RFC 5321
(which 

goes into more specific detail over domain names in email addresses),
in the case 

of a top-level domain used by itself in an email address, a single
string is used 

without any dots.


Previous Comments:

[2010-05-08 02:32:01] office at lucian0308 dot com

i see a deference 

the standard is http://tools.ietf.org/html/rfc2822



this function respect the standard?



because PEAR
http://pear.php.net/manual/en/package.validate.validate.email.php

say that use RFC2822 and it works corectly 



without  dot and level domain shoud be a false email.


[2009-12-09 19:02:01] ras...@php.net

That's a valid email address.  Email addresses don't need a tld.  Try 

emailing r...@localhost, for example.  Any locally defined host can 

potentially receive email.


[2009-12-09 18:59:19] troy at scriptedmotion dot com

Description:

Using filter_var to filter a string containing an email address with no
top level domain returns the string instead of false.



For example:



filter_var('t...@1', FILTER_VALIDATE_EMAIL);



returns 't...@1' instead of false.

Reproduce code:
---
filter_var('t...@1', FILTER_VALIDATE_EMAIL); // returns 't...@1' instead of
false.

Expected result:

false

Actual result:
--
t...@1 // a string






-- 
Edit this bug report at http://bugs.php.net/bug.php?id=50431edit=1


Bug #50830 [Com]: FILTER_VALIDATE_IP incorrectly validates a compressed IPv4-mapped IPv6 address

2010-08-17 Thread michael at squiloople dot com
Edit report at http://bugs.php.net/bug.php?id=50830edit=1

 ID: 50830
 Comment by: michael at squiloople dot com
 Reported by:mikerushton at hotmail dot co dot uk
 Summary:FILTER_VALIDATE_IP incorrectly validates a
 compressed IPv4-mapped IPv6 address
 Status: Open
 Type:   Bug
 Package:Filter related
 Operating System:   *
 PHP Version:5.*, 6
 Block user comment: N

 New Comment:

It has come to my attention that the regular expression I provided above
uses 

RFC 5321 as the authority on IPv6 address format. This differs from RFC
4291 

however, which is the ACTUAL authority on IPv6 address format. The key 

difference between the two is that 4291 allows a double colon to
represent just 

ONE 16-bit group of zeros whereas 5321 requires that it represent at
least TWO 

groups. As such, I have provided a modified regular expression which
conforms 

with 4291 in this respect (and have also removed the unnecessary
capturing 

groups present in my earlier regex)



(?:(?:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){7})|(?:(?!(?:.*[a-f0-

9](?::|$)){8,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,6})?::(?:[a-f0-

9]{1,4}(?::[a-f0-9]{1,4}){0,6})?)))|(?:(?:(?:(?:[a-f0-9]{1,4}(?::[a-f0-

9]{1,4}){5}:)|(?:(?!(?:.*[a-f0-9]:){6,})(?:[a-f0-9]{1,4}(?::[a-f0-

9]{1,4}){0,4})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,4}:)?)))?(?:25[0-5]|2[0-

4][0-9]|1[0-9]{2}|[1-9]?[0-9])(?:\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-

9])){3}))


Previous Comments:

[2010-02-01 15:34:13] mikerushton at hotmail dot co dot uk

An addition: here's my solution (as a regular expression):



(?:(?:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){7})|(?:(?!(?:.*[a-f0-9](?

::|$)){7,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?::(?:[a-f0-9]{1,4}(?

::[a-f0-9]{1,4}){0,5})?)))|(?:(?:(?:[a-f0-9]{1,4}(?::[a-f0-

9]{1,4}){5}:)|(?:(?!(?:.*[a-f0-9]:){5,})(?:[a-f0-9]{1,4}(?::[a-f0-

9]{1,4}){0,3})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3}:)?))?(?:(?

:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))(?:\.(?:(?:25[0-

5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))){3}))


[2010-01-24 15:45:29] mikerushton at hotmail dot co dot uk

Description:

FILTER_VALIDATE_IP validates the incorrect 0:::255.255.255.255 and does


not validate the correct 0::255.255.255.255



According to RFC 5321, the correct syntax is:



[IPv6-hex *3(: IPv6-hex)] :: [IPv6-hex *3(: IPv6-hex) :] IPv4-

address-literal



This does not allow for three consecutive colons.

Reproduce code:
---
// First



filter_var(':::255.255.255.255', FILTER_VALIDATE_IP);



// Second



filter_var('::255.255.255.255', FILTER_VALIDATE_IP);

Expected result:

// First



bool(false)



// Second



string(21) '::255.255.255.255'

Actual result:
--
// First



string(22) ':::255.255.255.255'



// Second



bool(false)






-- 
Edit this bug report at http://bugs.php.net/bug.php?id=50830edit=1


Req #49576 [Com]: Filter var for validating email is not validating emails correctly

2010-08-17 Thread michael at squiloople dot com
Edit report at http://bugs.php.net/bug.php?id=49576edit=1

 ID: 49576
 Comment by: michael at squiloople dot com
 Reported by:mparkin at de-facto dot com
 Summary:Filter var for validating email is not validating
 emails correctly
 Status: Feedback
 Type:   Feature/Change Request
 Package:*General Issues
 Operating System:   *
 PHP Version:5.*
 Assigned To:rasmus
 Block user comment: N

 New Comment:

You might find this useful, taken directly from my article on E-mail
address 

validation, in deciding whether or not to allow single-label domain
names:



There is some confusion over whether or not single-label domain names
are 

allowed — mich...@squiloople, for example. People often cite the
following 

section in RFC 5321 to argue that they are not allowed:



'Only resolvable, fully-qualified domain names (FQDNs) are permitted
when 

domain names are used in SMTP. In other words, names that can be
resolved to MX 

RRs or address (i.e., A or ) RRs (as discussed in Section 5) are
permitted, 

as are CNAME RRs whose targets can be resolved, in turn, to MX or
address RRs. 

Local nicknames or unqualified names MUST NOT be used.'



The implicit premise here is that TLD-only domain names cannot be
resolved to 

MX RRs. This is simply untrue: both checkdnsrr('ai', 'MX') and
getmxrr('ai', 

$array) return true, showing that single-label domain names can, and do,
resolve 

to MX RRs. Additionally, http://www.to/ is a valid, and active, domain.


Therefore, mich...@squiloople is valid (although in this example,
‘squiloople’ 

is not a TLD).



And as an extra note, here’s another excerpt from RFC 5321:



'In the case of a top-level domain used by itself in an email address,
a single 

string is used without any dots.'


Previous Comments:

[2010-08-15 02:09:23] paj...@php.net

Have you tried with 5.2.14 or 5.3.3?


[2010-08-14 21:10:33] grangeway at hotmail dot com

Additionally:



1) at the moment, I believe the current regex does not allow f...@com as
an 

email address. Albeit, it's going back almost 10 years now - I'm pretty
sure  I 

received an email from someone @tld, complaining that a regex  did not
allow 

their valid email address to sign up.



2) The issue the user hit is the phpmailer class contains the following
code to 

validate email addresses against FILTER_VALIDATE_EMAIL regardless of
whether 

SMTP or mail() is the sending method.



550  public static function ValidateAddress($address) {

551if (function_exists('filter_var')) { //Introduced in PHP 5.2

...

else 

 regex


[2010-08-14 20:48:24] ka...@php.net

Re-opened, the last comment seems quite valid to me, don't you think so
Rasmus?


[2010-08-05 16:41:58] alexsander dot rosa at gmail dot com

The format usern...@box for local networks IS allowed when the mail()
method is used. I quote RFC 5321: local aliases MUST NOT appear in any
SMTP transaction. They say NOTHING about mail() method in the RFC.


[2010-04-02 19:57:45] ras...@php.net

A much better RFC-compliant regex has been committed now.




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

http://bugs.php.net/bug.php?id=49576


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=49576edit=1


[PHP-BUG] Bug #52388 [NEW]: pg_fetch return space char on empty field

2010-07-21 Thread michael at jmslondon dot com
From: 
Operating system: Linux
PHP version:  5.2.13
Package:  PostgreSQL related
Bug Type: Bug
Bug description:pg_fetch return space char on empty field

Description:

pg_fetch_* returns space string (e.g. #38;#39; #38;#39;) when returning a
empty sting #13;#10;#38;#39;#38;#39;#38;#13;#38;#10;Postgres is
returning an empty string and pg_fetch is #13;#10;changing the return
value.#38;#13;#38;#10;Empty string is only return if the result is
#13;#10;caste as a varchar in the sql
#38;#13;#38;#10;e.g.#38;#34;SELECT test_thing::varchar#38;#34;.

Test script:
---
//In DB#38;#13;#38;#10;CREATE TABLE test ( test_thing VARCHAR(5) NOT NULL
DEFAULT #38;#39;#38;#39;);#38;#13;#38;#10;INSERT INTO test VALUES
(#38;#39;#38;#39;);#38;#13;#38;#10;#38;#13;#38;#10;//code#38;#13;#38;#10;$testing
= pg_query($db_conn,#38;#34;SELECT test_thing FROM test WHERE
test_thing=#38;#39;#38;#39;);#38;#13;#38;#10;print_r(pg_fetch_all($testing));#38;#13;#38;#10;print
#38;#39;testing#38;#39;.pg_fetch_result($testing,0,0).#38;#39;this#38;#39;;

Expected result:

array(1) {#38;#13;#38;#10;[0]=#38;#13;#38;#10;  array(1)
{#38;#13;#38;#10;   
#13;#10;[#38;#39;test_thing#38;#39;]=#38;#13;#38;#10;string(0)
#13;#10;#38;#39;#38;#39;#38;#13;#38;#10;}#38;#13;#38;#10;}#38;#13;#38;#10;#38;#13;#38;#10;testingthis#38;#13;#38;#10;


Actual result:
--
array(1) {#38;#13;#38;#10;[0]=#38;#13;#38;#10;  array(1)
{#38;#13;#38;#10;   
#13;#10;[#38;#39;test_thing#38;#39;]=#38;#13;#38;#10;string(1)
#38;#39;
#13;#10;#38;#39;#38;#13;#38;#10;}#38;#13;#38;#10;}#38;#13;#38;#10;#38;#13;#38;#10;testing
this

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



Bug #52388 [Opn-Csd]: pg_fetch return space char on empty field

2010-07-21 Thread michael at jmslondon dot com
Edit report at http://bugs.php.net/bug.php?id=52388edit=1

 ID:   52388
 User updated by:  michael at jmslondon dot com
 Reported by:  michael at jmslondon dot com
 Summary:  pg_fetch return space char on empty field
-Status:   Open
+Status:   Closed
 Type: Bug
 Package:  PostgreSQL related
 Operating System: Linux
 PHP Version:  5.2.13

 New Comment:

The submission has altered this so it is unreadable. Closing it as make
no sense


Previous Comments:

[2010-07-21 13:41:39] michael at jmslondon dot com

Description:

pg_fetch_* returns space string (e.g. #38;#39; #38;#39;) when
returning a empty sting
#13;#10;#38;#39;#38;#39;#38;#13;#38;#10;Postgres is returning an
empty string and pg_fetch is #13;#10;changing the return
value.#38;#13;#38;#10;Empty string is only return if the result is
#13;#10;caste as a varchar in the sql
#38;#13;#38;#10;e.g.#38;#34;SELECT test_thing::varchar#38;#34;.

Test script:
---
//In DB#38;#13;#38;#10;CREATE TABLE test ( test_thing VARCHAR(5) NOT
NULL DEFAULT #38;#39;#38;#39;);#38;#13;#38;#10;INSERT INTO test
VALUES
(#38;#39;#38;#39;);#38;#13;#38;#10;#38;#13;#38;#10;//code#38;#13;#38;#10;$testing
= pg_query($db_conn,#38;#34;SELECT test_thing FROM test WHERE
test_thing=#38;#39;#38;#39;);#38;#13;#38;#10;print_r(pg_fetch_all($testing));#38;#13;#38;#10;print
#38;#39;testing#38;#39;.pg_fetch_result($testing,0,0).#38;#39;this#38;#39;;

Expected result:

array(1) {#38;#13;#38;#10;[0]=#38;#13;#38;#10;  array(1)
{#38;#13;#38;#10;   
#13;#10;[#38;#39;test_thing#38;#39;]=#38;#13;#38;#10;string(0)
#13;#10;#38;#39;#38;#39;#38;#13;#38;#10;}#38;#13;#38;#10;}#38;#13;#38;#10;#38;#13;#38;#10;testingthis#38;#13;#38;#10;


Actual result:
--
array(1) {#38;#13;#38;#10;[0]=#38;#13;#38;#10;  array(1)
{#38;#13;#38;#10;   
#13;#10;[#38;#39;test_thing#38;#39;]=#38;#13;#38;#10;string(1)
#38;#39;
#13;#10;#38;#39;#38;#13;#38;#10;}#38;#13;#38;#10;}#38;#13;#38;#10;#38;#13;#38;#10;testing
this






-- 
Edit this bug report at http://bugs.php.net/bug.php?id=52388edit=1


Bug #31749 [Com]: deadlock due to libc mutexes not released when timeout signal is delivered

2010-06-08 Thread michael at makeweb dot no
Edit report at http://bugs.php.net/bug.php?id=31749edit=1

 ID:   31749
 Comment by:   michael at makeweb dot no
 Reported by:  phpbug2 at mailinator dot com
 Summary:  deadlock due to libc mutexes not released when timeout
   signal is delivered
 Status:   No Feedback
 Type: Bug
 Package:  Scripting Engine problem
 Operating System: Linux 2.4.28, 2.4.21-SMP
 PHP Version:  5CVS, 4CVS (2005-06-19)
 Assigned To:  dmitry

 New Comment:

I have the same problem, reproduced on php 4.4.9 and 5.3.0.



Basically pseudocode to reproduce is set_time_limit(1); do { ... } until
time passed = 1 second.



This will create a race condition where sometimes a libc lock will
prevent zend_timeout to process properly.



Script to reproduce on 5.3.0: ($limit is not 1, because php seems to not
break accurately on time - this value must be adjusted so the error PHP
Fatal error:  Maximum execution time of 1 second exceeded in Unknown on
line 0 frequently appears. The script should fail within 100 runs (lock
up).



?php

  echo Trying to break php...\n;

  set_time_limit(1);

  $limit = 1.235;

  $start = array_sum(explode(' ',$x = microtime()));

  $a = array();

  for ($cnt = 0; $cnt  10; $cnt++) {

for ($cntb = 0; $cntb  100; $cntb++) {

  for ($cntc = 0; $cntc  100; $cntc++) {

$end = array_sum(explode(' ',$y = microtime()));

$a[$cnt][$cntb][$cntc] = md5($cnt.$cntb.$cntc);

if ($end = $start+$limit) break;   

  }

  if ($end = $start+$limit) break;   

}

if ($end = $start+$limit) break;   

  }

  echo $x - $y (.($end-$start).)\n;

?



run with: while [ true ]; do php break.php; done



Though this scenario is unlikely, there are other cases where it can
happen very often, however I fail to come up with a short example of it.
The reason for generating a multidimensional array is that in php4, the
hang is very likely to happen within zend_shutdown, as the resources are
freed (hangs within 1-10 cycles)



Keep in mind error logging has to be enabled (this is when there's calls
for libc get time which causes the locking issue within zend_timeout)



pstack for php 5.3.0:



# pstack 1565

#0  0x00319402 in __kernel_vsyscall ()

#1  0x001dede3 in __lll_lock_wait_private () from /lib/libc.so.6

#2  0x0016e6f6 in _L_lock_15330 () from /lib/libc.so.6

#3  0x0016dbb4 in free () from /lib/libc.so.6

#4  0x0012067c in setlocale () from /lib/libc.so.6

#5  0x08084586 in seek_to_tz_position ()

#6  0x08084664 in timelib_timezone_id_is_valid ()

#7  0x0806575c in guess_timezone ()

#8  0x080657a5 in get_timezone_info ()

#9  0x08067f35 in php_format_date ()

#10 0x082ab96e in php_log_err ()

#11 0x082abe17 in php_error_cb ()

#12 0x082f9fe8 in zend_error_noreturn ()

#13 0x082ec745 in zend_timeout ()

#14 signal handler called

#15 0x00169c49 in _int_free () from /lib/libc.so.6

#16 0x0016dbc0 in free () from /lib/libc.so.6

#17 0x082ac6df in php_conv_fp ()

#18 0x082ad409 in strx_printv ()

#19 0x082ad804 in ap_php_snprintf ()

#20 0x082565f2 in _php_gettimeofday ()

#21 0x08342509 in zend_do_fcall_common_helper_SPEC ()

#22 0x08319f3d in execute ()

#23 0x082f8e47 in zend_execute_scripts ()

#24 0x082a92be in php_execute_script ()

#25 0x08378457 in main ()



Any suggestions how to patch php4 be greatly appreciated!



Michael


Previous Comments:

[2008-07-21 01:00:00] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to Open.


[2008-07-13 15:51:47] j...@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi




[2005-12-24 02:46:25] sni...@php.net

Dmitry, can you check this out please?


[2005-02-20 15:55:55] w...@php.net

Andi, please take a look.  I remember some talk in the past about going
this route, but I don't recall the arguments against it.

Similarly, I'm not sure that this is really a problem for PHP to fix;
given that the time() function is officially not thread-safe, it seems
wrong for the libc to mutex internally.


[2005-02-19 22:28:32] phpbug2 at mailinator dot com

I've created a patch against 5.0.3 to implement my soft timeout idea
above. It will try to soft-break execution after the timeout period
elapses and then hard-break

[PHP-BUG] Bug #51779 [NEW]: FTP socket failed

2010-05-09 Thread michael dot clark at ncver dot edu dot au
From: 
Operating system: HP-UX 11.23 ia64
PHP version:  5.2.13
Package:  FTP related
Bug Type: Bug
Bug description:FTP socket failed

Description:

Have built new installations of apache 2.2.14 with PHP 5.2.13 to replace
previous installation of Apache 2.0 with PHP 4.3.4.

Other functionality has all worked.



We are recieving warning on all file related ftp functions:

Warning: ftp_rawlist() [function.ftp-rawlist]: socket() failed: Protocol
not supported (221)



Connection to server and login complete successfully.

When trying to list, put, get any data it fails.



My guess is connection successful on first port but second (data) port not
successful?

Test script:
---
?php

$conn_id = ftp_connect(server);

$login_result = ftp_login($conn_id, user, pass);

// check connection

if ((!$conn_id) || (!$login_result)) {

$error_message .= FTP connection has failed!;

} else {

echo FTP pwd: .ftp_pwd($conn_id). br /;

$remote_list = ftp_rawlist($conn_id, /home/devdba);

foreach ($remote_list as $list_item) {

echo $list_item.br /;

}

}

?



Expected result:

FTP pwd: /home

item1

item2

item3

Actual result:
--
FTP pwd: /home



Warning: ftp_rawlist() [function.ftp-rawlist]: socket() failed: Protocol
not supported (221) 

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



Bug #51779 [Com]: FTP socket failed

2010-05-09 Thread michael dot clark at ncver dot edu dot au
Edit report at http://bugs.php.net/bug.php?id=51779edit=1

 ID:   51779
 Comment by:   michael dot clark at ncver dot edu dot au
 Reported by:  michael dot clark at ncver dot edu dot au
 Summary:  FTP socket failed
 Status:   Open
 Type: Bug
 Package:  FTP related
 Operating System: HP-UX 11.23 ia64
 PHP Version:  5.2.13

 New Comment:

Sorry, forgot to mention.

ftp_pasv is no help in this case, especially when client and server are
the same machine.



PS thanks for any help resolving this issue.


Previous Comments:

[2010-05-10 04:57:18] michael dot clark at ncver dot edu dot au

Description:

Have built new installations of apache 2.2.14 with PHP 5.2.13 to replace
previous installation of Apache 2.0 with PHP 4.3.4.

Other functionality has all worked.



We are recieving warning on all file related ftp functions:

Warning: ftp_rawlist() [function.ftp-rawlist]: socket() failed: Protocol
not supported (221)



Connection to server and login complete successfully.

When trying to list, put, get any data it fails.



My guess is connection successful on first port but second (data) port
not successful?

Test script:
---
?php

$conn_id = ftp_connect(server);

$login_result = ftp_login($conn_id, user, pass);

// check connection

if ((!$conn_id) || (!$login_result)) {

$error_message .= FTP connection has failed!;

} else {

echo FTP pwd: .ftp_pwd($conn_id). br /;

$remote_list = ftp_rawlist($conn_id, /home/devdba);

foreach ($remote_list as $list_item) {

echo $list_item.br /;

}

}

?



Expected result:

FTP pwd: /home

item1

item2

item3

Actual result:
--
FTP pwd: /home



Warning: ftp_rawlist() [function.ftp-rawlist]: socket() failed: Protocol
not supported (221) 






-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51779edit=1


Bug #36073 [Com]: Source-compiled MySQL on x86_64 causes PHP configure failure

2010-03-25 Thread michael at michaelsnet dot us
Edit report at http://bugs.php.net/bug.php?id=36073edit=1

 ID:   36073
 Comment by:   michael at michaelsnet dot us
 Reported by:  chris at spawnordie dot com
 Summary:  Source-compiled MySQL on x86_64 causes PHP configure
   failure
 Status:   Wont fix
 Type: Bug
 Package:  Compile Failure
 Operating System: Linux/Any
 PHP Version:  5.1.2

 New Comment:

IMHO this is a documentation bug.  Consider adding a README.64bit file
containing this information and other relevant information.


Previous Comments:

[2006-01-18 23:53:50] sni...@php.net

Works fine for me.

Hint: Don't try building Mysql yourself if you don't know how to do it
properly. Use the binary packages provided by MySQL.

And last but not least: report this to MySQL. It's not our fault if they
do things wrong.


[2006-01-18 22:14:10] chris at spawnordie dot com

Description:

Please accept my apologies if this is already reported - I searched and
didn't find it.



When configuring PHP for x86_64, it is necessary to use:

--with-libdir=lib64



When you compile MySQL from source, it does not place its files in
lib64, but rather lib.



MySQL was configured using:

--prefix=/usr/local/mysql



Configuring PHP using:

--with-mysql=/usr/local/mysql

fails with this:

checking for MySQL support... yes

checking for specified location of the MySQL UNIX socket... no

checking for MySQL UNIX socket location... no

configure: error: Cannot find libmysqlclient under /usr/local/mysql.

Note that the MySQL client library is not bundled anymore!



This fixes the problem:

cd /usr/local/mysql

ln -s lib lib64



When PHP is configured using --with-mysql=mysql_dir and
--with-libdir=lib_dir, it should search mysql_dir/lib_dir and then
mysql_dir/lib

Reproduce code:
---
./configure --with-mysql=path/to/mysql when MySQL is compiled from
source code

Expected result:

successful configure

Actual result:
--
configure fails with:

checking for MySQL support... yes

checking for specified location of the MySQL UNIX socket... no

checking for MySQL UNIX socket location... no

configure: error: Cannot find libmysqlclient under /usr/local/mysql.

Note that the MySQL client library is not bundled anymore!








-- 
Edit this bug report at http://bugs.php.net/bug.php?id=36073edit=1


#50875 [Com]: Objects loaded using PDO are *empty* when the __construct method is called

2010-02-11 Thread michael at twofishcreative dot com
 ID:   50875
 Comment by:   michael at twofishcreative dot com
 Reported By:  contact at weirdog dot com
 Status:   Open
 Bug Type: PDO related
 Operating System: Linux
 PHP Version:  5.2.12
 New Comment:

See this post to the PHP internals list, and follow ups, about this
change http://news.php.net/php.internals/46748.


Previous Comments:


[2010-01-28 20:17:13] contact at weirdog dot com

Description:

Objects loaded using PDO are *empty* (as in they have no properties)
when the __construct() method is called.

This was not the case before version 5.2.12. Usualy, properties loaded
from the database where already applyed when the __construct() method
was called.

This is really annoying since further initialisation during the
__construct() method is now impossible.

Reproduce code:
---
class WdActiveRecord
{
public function __construct()
{
var_dump($this);
}
}

$stmt = $db-query('SELECT * FROM nodes WHERE nid = 498');

$stmt-fetchObject('WdActiveRecord');

Expected result:

object(site_pages_WdActiveRecord)[68]
  public 'nid' = string '498' (length=3)
  public 'parentid' = string '0' (length=1)
  public 'pattern' = string 'about' (length=5)
  public 'weight' = string '9' (length=1)
  public 'layout' = string 'page' (length=5)
  public 'location' = string '' (length=22)
  public 'is_navigation_excluded' = string '0' (length=1)
  public 'is_restricted' = string '0' (length=1)
  public 'uid' = string '9' (length=1)
  public 'title' = string 'À propos' (length=16)
  public 'slug' = string 'apropos' (length=15)
  public 'created' = string '2009-11-29 18:13:17' (length=19)
  public 'modified' = string '2009-11-29 18:17:29' (length=19)
  public 'constructor' = string 'site.pages' (length=10)
  public 'is_online' = string '1' (length=1)
  public 'language' = string '' (length=0)
  public 'tnid' = string '0' (length=1)
  public 'is_translation_deprecated' = string '0' (length=1)

Actual result:
--
object(site_pages_WdActiveRecord)#68 (0) { }





-- 
Edit this bug report at http://bugs.php.net/?id=50875edit=1



#50975 [NEW]: Floating point match Failure

2010-02-09 Thread dmgx dot michael at gmail dot com
From: dmgx dot michael at gmail dot com
Operating system: Windows  Linux
PHP version:  5.3.1
PHP Bug Type: *Math Functions
Bug description:  Floating point match Failure

Description:

What is 34.2 - 33.98? I don't think the answer needs 15 digits.

Reproduce code:
---
?php echo 34.2 - 33.98 ?

Expected result:

0.22

Actual result:
--
0.220001

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



#45986 [Com]: rename() generates Bad file descriptor

2010-01-12 Thread michael-l-smith at att dot net
 ID:   45986
 Comment by:   michael-l-smith at att dot net
 Reported By:  david at grudl dot com
 Status:   Assigned
 Bug Type: Filesystem function related
 Operating System: win32 only
 PHP Version:  5.3CVS-2008-11-11
 Assigned To:  pajoye
 New Comment:

I also observe this issue in multiple Windows OS'.  Below is the
offending code:

echo Modifying $file\n;
$currentFile = 
str_replace(c:,C:,$testFileDirectory) . \\ .
$file;
$fh = fopen($currentFile, 'r') or die(can't 
open the original
file);
$tmpfile = getcwd() . \\temp\\ . rand();
$fp = fopen($tmpfile, 'a') or die(can't open 
tmp file);
$temporaryString = ;
while ($tmpStringData = fread($fh,1024))
{
$stringLength = 
mb_strlen($tmpStringData);
$coinFlip = rand(0,1);
switch ($coinFlip)
{
case 0:

while 
(mb_strlen($temporaryString)  $stringLength)
{

$temporaryString = $temporaryString . rand(0,9);
}

fwrite($fp,$temporaryString);
break;

case 1:

fwrite($fp,$tmpStringData);
break;
}//end switch
}//end while
fclose($fh);
fclose($fp);

rename($tmpfile,$currentFile) or die(Unable to 
rename the tmp
file.);

$fileToMD5 = getCWD() . 
str_replace(c:,C:,$testFileDirectory) .
\\;
addMD5($currentFile);

The error occurs during the rename() after fclose().  It seems that the
file is locked or otherwise prevented from being renamed.  Perhaps
fclose() is lagging somehow?  I have verified that the file does, in
fact, exist when this issue occurs.


Previous Comments:


[2008-09-03 17:02:39] david at grudl dot com

Description:

Renaming of non-existent file generates in PHP 5.2.6 warning:

   Warning: rename(foo,bar) [function.rename]: No such file or
directory 

And in PHP 5.3.0 alpha2 it generates warning:

   Warning: rename(foo,bar): Bad file descriptor

I am not sure, but maybe this points to any hidden bug in renaming
routine...






-- 
Edit this bug report at http://bugs.php.net/?id=45986edit=1



#49292 [Com]: infinite recursive call in ob_011.phpt

2009-12-27 Thread michael at schmidt2 dot de
 ID:   49292
 Comment by:   michael at schmidt2 dot de
 Reported By:  dmendo...@php.net
 Status:   No Feedback
 Bug Type: Output Control
 Operating System: Linux
 PHP Version:  5.2.11RC1
 New Comment:

I'm running Solaris 10. On that system it's worse ! Whole system 
freezes. You cannot be serious to let THIS happen.

Please remove this test.

balrog.# php -v
PHP 5.3.1 (cli) (built: Dec 27 2009 12:23:33)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies
balrog.# uname -a
SunOS balrog 5.10 Generic_139555-08 sun4u sparc SUNW,UltraSPARC-IIi-
cEngine


Previous Comments:


[2009-09-25 01:00:01] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to Open.



[2009-09-20 09:36:19] PromyLOPh at lavabit dot com

Snapshot (php5.2-200909200830) still crashes.

Valgrind report:
$ valgrind ./sapi/cli/php tests/output/ob_011.phpt
==2561== Memcheck, a memory error detector.
==2561== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et
al.
==2561== Using LibVEX rev 1854, a library for dynamic binary
translation.
==2561== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==2561== Using valgrind-3.3.1-Debian, a dynamic binary instrumentation
framework.
==2561== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et
al.
==2561== For more details, rerun with: -v
==2561== 
--TEST--
output buffering - fatalism
--XFAIL--
This test will fail until the fix in version 1.178 of
ext/main/output.c
is backported from php 6
--FILE--
==2561== Stack overflow in thread 1: can't grow stack to 0x7FE801FD8
==2561== 
==2561== Process terminating with default action of signal 11
(SIGSEGV)
==2561==  Access not within mapped region at address 0x7FE801FD8
==2561==at 0x720CA2: ZEND_RECV_SPEC_HANDLER (zend_execute.c:276)
==2561== Stack overflow in thread 1: can't grow stack to 0x7FE801FD0
==2561== 
==2561== Process terminating with default action of signal 11
(SIGSEGV)
==2561==  Access not within mapped region at address 0x7FE801FD0
==2561==at 0x4A1D310: _vgnU_freeres (vg_preloaded.c:56)
==2561== 
==2561== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 27 from
3)
==2561== malloc/free: in use at exit: 8,537,327 bytes in 14,555
blocks.
==2561== malloc/free: 15,101 allocs, 546 frees, 9,428,515 bytes
allocated.
==2561== For counts of detected errors, rerun with: -v
==2561== searching for pointers to 14,555 not-freed blocks.
==2561== checked 12,431,728 bytes.
==2561== 
==2561== LEAK SUMMARY:
==2561==definitely lost: 0 bytes in 0 blocks.
==2561==  possibly lost: 0 bytes in 0 blocks.
==2561==still reachable: 8,537,327 bytes in 14,555 blocks.
==2561== suppressed: 0 bytes in 0 blocks.
==2561== Rerun with --leak-check=full to see details of leaked memory.
Speicherzugriffsfehler

Configure args:
$ ./configure --with-config-file-path=/home/www-data/conf
--prefix=/home/promyloph/testenv/php --without-openssl --with-curl=/usr
--without-pear --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr
--with-freetype-dir=/usr --with-gettext=/usr --with-mcrypt
--with-mysql=/usr/local/mysql --with-mysqli
--with-pdo-mysql=/usr/local/mysql --with-zlib=/usr --with-bz2=/usr
--disable-ipv6 --enable-cli --disable-safe-mode --enable-exif
--enable-libxml --with-libxml-dir=/usr --enable-session
--enable-magic-quotes --disable-sigchild --enable-mbstring
--enable-gd-jis-conv --enable-gd-native-ttf --enable-fastcgi
--enable-force-cgi-redirect --disable-debug --with-pcre-regex=/usr
--disable-posix

$ uname -a
Linux * 2.6.26-2-amd64 #1 SMP Wed Aug 19 22:33:18 UTC 2009 x86_64
GNU/Linux

$ gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian
4.3.2-1.1' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc
--enable-mpfr --enable-cld --enable-checking=release
--build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.3.2 (Debian 4.3.2-1.1)



[2009-09-17 15:44:05] j...@php.net

Please try using this snapshot:

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

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

And if it still crashes, provide the full configure line you used

#50585 [NEW]: infinite recursive call in ob_011.phpt crashes solaris

2009-12-27 Thread michael at schmidt2 dot de
From: michael at schmidt2 dot de
Operating system: Solaris 10, sparc
PHP version:  5.3.1
PHP Bug Type: Reproducible crash
Bug description:  infinite recursive call in ob_011.phpt crashes solaris

Description:

When you call :

make test TESTS=./tests/output/ob_011.phpt

The system crashes within 10 seconds.

(CPU usage goes to 100% and system freezes in about 10 seconds.
No ping. Console access is dead too.)


see also bug: 49292


Reproduce code:
---
tests/output/ob_011.phpt


Expected result:

   PID USERNAME  SIZE   RSS STATE  PRI NICE  TIME  CPU PROCESS/NLWP
   745 root  326M  317M run 100   0:00:08  100% php/1





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



#50215 [Fbk-Opn]: Parent: child process exited with status 3221225477 -- Restarting.

2009-12-21 Thread michael dot hollstein at web dot de
 ID:   50215
 User updated by:  michael dot hollstein at web dot de
 Reported By:  michael dot hollstein at web dot de
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: win32 only - Windows 2000
 PHP Version:  5.2.11
 New Comment:

I tried it without apc. The result is the same. 
If I'm using php_xdebug.dll version 2.0.3 and above the error occurs
with or without apc. With version 2.0.0 (product version 5.2.2) of
php_xdebug.dll I can't see an error.

Analysis Summary  
  Type Description Recommendation 
  Error WARNING - DebugDiag was not able to locate debug symbols for
php_xdebug.dll, so the information below may be incomplete.



In
httpd__PID__2528__Date__12_21_2009__Time_04_36_50PM__325__Second_Chance_Exception_C005.dmp
the assembly instruction at php_xdebug!xdebug_init_oparray+23 in
C:\Programme\PHP\ext\php_xdebug.dll from Derick Rethans has caused an
access violation exception (0xC005) when trying to write to memory
location 0x650a1bac on thread 3
 Please follow up with the vendor Derick Rethans for
C:\Programme\PHP\ext\php_xdebug.dll
 
  Information DebugDiag determined that this dump file
(httpd__PID__2528__Date__12_21_2009__Time_04_36_50PM__325__Second_Chance_Exception_C005.dmp)
is a crash dump and did not perform any hang analysis. If you wish to
enable combined crash and hang analysis for crash dumps, edit the
CrashHangAnalysis.asp script (located in the DebugDiag\Scripts folder)
and set the g_DoCombinedAnalysis constant to True.   
 
 


 
 Analysis Details  
  


 Your browser settings are currently prohibiting this report's scripts
from running.

This is preventing some features of this analysis report from
displaying properly. To enable scripts to run, right-click the security
warning above and choose Allow Blocked Content... or enable the Allow
active content to run in files on My Computer* setting on the Advanced
tab of your Internet Options dialog to avoid being prompted in the
future 





Table Of Contents
httpd__PID__2528__Date__12_21_2009__Time_04_36_50PM__325__Second_Chance_Exception_C005.dmp

   Faulting Thread

   Faulting Module Information



 Report for
httpd__PID__2528__Date__12_21_2009__Time_04_36_50PM__325__Second_Chance_Exception_C005.dmp




Report for
httpd__PID__2528__Date__12_21_2009__Time_04_36_50PM__325__Second_Chance_Exception_C005.dmp
Type of Analysis Performed   Crash Analysis 
Machine Name   GN82514 
Operating System   Windows 2000 Service Pack 4 
Number Of Processors   1 
Process ID   2528 
Process Image   C:\www\bin\httpd.exe 
System Up-Time   12 day(s) 05:10:22 
Process Up-Time   00:01:53 


Thread 3 - System ID 3772
Entry point   msvcrt!_endthreadex+32 
Create time   21.12.2009 16:34:57 
Time spent in user mode   0 Days 0:0:0.15 
Time spent in kernel mode   0 Days 0:0:0.0 






Function Arg 1 Arg 2 Arg 3   Source 
php_xdebug!xdebug_init_oparray+23 08fae4f0 010787d2
004fabf8
php5ts!init_op_array+102 004fabf8 08fae4f0 034576f8
php5ts!zend_llist_apply_with_argument+22 014a3700 0107c3d0
08fae4f0
php5ts!init_op_array+dc 08fae4f0 0002 0040
php5ts!compile_file+b6 0227fe9c 0008 03457600
php_xdebug!get_module+52a7 0227fe9c 0008 034576f8
php5ts!zend_execute_scripts+66 0008 034576f8   
 
php5ts!php_execute_script+20d      





PHP_XDEBUG!XDEBUG_INIT_OPARRAY+23WARNING - DebugDiag was not able to
locate debug symbols for php_xdebug.dll, so the information below may be
incomplete.



In
httpd__PID__2528__Date__12_21_2009__Time_04_36_50PM__325__Second_Chance_Exception_C005.dmp
the assembly instruction at php_xdebug!xdebug_init_oparray+23 in
C:\Programme\PHP\ext\php_xdebug.dll from Derick Rethans has caused an
access violation exception (0xC005) when trying to write to memory
location 0x650a1bac on thread 3

Module Information 
Image Name: C:\Programme\PHP\ext\php_xdebug.dll   Symbol Type:  Export

Base address: 0x0195   Time Stamp:  Thu Jul 02 11:04:55 2009  
Checksum: 0x   Comments:  Thanks to Derick Rethans, Ilia
Alshanetsky, Harald Radi 
COM DLL: False   Company Name:  Derick Rethans 
ISAPIExtension: False   File Description:  Xdebug 
ISAPIFilter: False   File Version:  2.0.5 
Managed DLL: False   Internal Name:  php_xdebug.dll 
VB DLL: False   Legal Copyright:  Copyright ? 2002-2008 Derick Rethans

Loaded Image Name:  php_xdebug.dll   Legal Trademarks:   
Mapped Image Name:  C:\Programme\PHP\ext\php_xdebug.dll   Original
filename:  php_xdebug.dll 
Module name:  php_xdebug   Private Build:   
Single Threaded:  False   Product Name:  Xdebug 
Module Size:  164,00 KBytes   Product Version:  2.0.5 
Symbol File Name:  php_xdebug.dll   Special Build:   




 
 


 
 Script Summary  
  Script Name Status Error Code Error Source Error Description Source
Line

#50442 [NEW]: __construct Method Chaining

2009-12-10 Thread michael dot patrick dot mcnally at gmail dot com
From: michael dot patrick dot mcnally at gmail dot com
Operating system: Windows Vista
PHP version:  5.2.11
PHP Bug Type: Feature/Change Request
Bug description:  __construct Method Chaining

Description:

Method chaining is very impressive when done properly.  For example:

$location = new location();
$location-city('Boston')-state('Massachusetts')-getMap();

In JavaScript, it is possible to chain from the constructor, like this:
new location.city('Boston').state('Massachusetts').getMap();

Where in PHP, the equivalent would be:
new location()-city('Boston')-state('Massachusetts')-getMap();

Is there a reason why the __construct of a class cannot return itself for
method chaining like its' methods?  When I try, I receive a Parse Error.

Thank you!


Reproduce code:
---
---
From manual page: language.oop5
---


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



#50401 [NEW]: Array Key Data Type Conversion

2009-12-07 Thread michael dot patrick dot mcnally at gmail dot com
From: michael dot patrick dot mcnally at gmail dot com
Operating system: Windows Vista
PHP version:  5.3.1
PHP Bug Type: Feature/Change Request
Bug description:  Array Key Data Type Conversion

Description:

It is necessary that I check to see if an array key has been set by the
code.  Such as is with this code:

foreach($array as $key = $value){

 if(is_int($key)) echo 'the code assigned a key for this element';

}


How can I achieve this with the following array?:

array('1'='Yes','0'='No');


PHP converts the '1' into 1 which leaves me no detection for user assigned
keys.  This is bad form.

Reproduce code:
---
---
From manual page: language.types.array
---



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



#50215 [Fbk-Opn]: Parent: child process exited with status 3221225477 -- Restarting.

2009-11-19 Thread michael dot hollstein at web dot de
 ID:   50215
 User updated by:  michael dot hollstein at web dot de
 Reported By:  michael dot hollstein at web dot de
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: win32 only - Windows 2000
 PHP Version:  5.2.11
 New Comment:

With PHP5.2.6 the error is not gone but nearly only 1% of the errors
with PHP5.2.11.

Today I've build a crash dump. I've monitored php.exe and httpd.exe.
I've found out, that with PHP5.2.11 without php_xdebug-2.0.5-5.2.dll
only sometimes  an error occurs in php_apc.dll.

With php_xdebug-2.0.5-5.2.dll there are many errors in the system and
the apache service crashes.

***
Without Xdebug
***
 
 Analysis Summary  
  Type Description Recommendation 
  Error In
httpd__PID__1456__Date__11_19_2009__Time_11_42_29AM__605__Second_Chance_Exception_C008.dmp
the assembly instruction at NTDLL!KiRaiseUserExceptionDispatcher+38 in
C:\WINNT\system32\NTDLL.DLL from Microsoft Corporation has caused an
unknown exception (0xc008) on thread 0



This exception originated from php_apc+65cb.  This exception occured as
a result of an invalid handle passed to KERNEL32!CLOSEHANDLE by the
following function:



php_apc+65cb



Please follow up with the vendor of this module, The PHP Group, for
further assistance with this issue. 
  Information DebugDiag determined that this dump file
(httpd__PID__1456__Date__11_19_2009__Time_11_42_29AM__605__Second_Chance_Exception_C008.dmp)
is a crash dump and did not perform any hang analysis. If you wish to
enable combined crash and hang analysis for crash dumps, edit the
CrashHangAnalysis.asp script (located in the DebugDiag\Scripts folder)
and set the g_DoCombinedAnalysis constant to True.   
 
 


 
 Analysis Details  
  


 Your browser settings are currently prohibiting this report's scripts
from running.

This is preventing some features of this analysis report from
displaying properly. To enable scripts to run, right-click the security
warning above and choose Allow Blocked Content... or enable the Allow
active content to run in files on My Computer* setting on the Advanced
tab of your Internet Options dialog to avoid being prompted in the
future 





Table Of Contents
httpd__PID__1456__Date__11_19_2009__Time_11_42_29AM__605__Second_Chance_Exception_C008.dmp

   Faulting Thread

   Faulting Module Information



 Report for
httpd__PID__1456__Date__11_19_2009__Time_11_42_29AM__605__Second_Chance_Exception_C008.dmp




Report for
httpd__PID__1456__Date__11_19_2009__Time_11_42_29AM__605__Second_Chance_Exception_C008.dmp
Type of Analysis Performed   Crash Analysis 
Machine Name   GN82514 
Operating System   Windows 2000 Service Pack 4 
Number Of Processors   1 
Process ID   1456 
Process Image   C:\www\bin\httpd.exe 
System Up-Time   21:20:33 
Process Up-Time   00:24:15 


Thread 0 - System ID 1472
Entry point   httpd+1ecf 
Create time   19.11.2009 11:18:14 
Time spent in user mode   0 Days 0:0:0.187 
Time spent in kernel mode   0 Days 0:0:0.171 






Function Arg 1 Arg 2 Arg 3   Source 
NTDLL!KiRaiseUserExceptionDispatcher+38 77e77ef0 01a4
0006fe80
NTDLL!NtClose+b 01a4 0006fe80 019565cb
KERNEL32!CloseHandle+4f 01a4 01951aa0 01a4
php_apc+65cb 00424078 77e77ea1 6eec6d10
libapr_1!apr_pool_destroy+42 00424068 0023a6a0 00465148   

libhttpd!ap_regkey_value_remove+b22 00424160 6ff3a8a0
06a6
libhttpd!ap_mpm_run+1c5 0023a6a0 00456120 00465148
httpd+17b5 0007 002324c8 00232c68
httpd+1fb2 778b7e64 0006f874 7ffdf000
KERNEL32!BaseProcessStart+3d 00401ecf  00c8   





In
httpd__PID__1456__Date__11_19_2009__Time_11_42_29AM__605__Second_Chance_Exception_C008.dmp
the assembly instruction at NTDLL!KiRaiseUserExceptionDispatcher+38 in
C:\WINNT\system32\NTDLL.DLL from Microsoft Corporation has caused an
unknown exception (0xc008) on thread 0



This exception originated from php_apc+65cb. Module Information 
Image Name: C:\Programme\PHP\ext\php_apc.dll   Symbol Type:  Export 
Base address: 0x0195   Time Stamp:  Fri Nov 09 05:20:55 2007  
Checksum: 0x   Comments:   
COM DLL: False   Company Name:  The PHP Group 
ISAPIExtension: False   File Description:  PHP php_apc.dll 
ISAPIFilter: False   File Version:  5.2.5.5 
Managed DLL: False   Internal Name:  php_apc.dll 
VB DLL: False   Legal Copyright:  Copyright ? 1997-2007 The PHP Group 
Loaded Image Name:  php_apc.dll   Legal Trademarks:  PHP 
Mapped Image Name:  C:\Programme\PHP\ext\php_apc.dll   Original
filename:  php_apc.dll 
Module name:  php_apc   Private Build:   
Single Threaded:  False   Product Name:  PHP php_apc.dll 
Module Size:  80,00 KBytes   Product Version:  5.2.5 
Symbol File Name:  php_apc.dll   Special Build:   




 
 


 
 Script Summary  
  Script Name Status Error Code

#50215 [NEW]: Parent: child process exited with status 3221225477 -- Restarting.

2009-11-18 Thread michael dot hollstein at web dot de
From: michael dot hollstein at web dot de
Operating system: Windows 2000
PHP version:  5.2.11
PHP Bug Type: *General Issues
Bug description:  Parent: child process exited with status 3221225477 -- 
Restarting.

Description:

Parent: child process exited with status 3221225477 -- Restarting.
Error in Apache, logs/error.log and Apache crash.
The error occurs if I tried to call a MediaWiki 1.15 Page.
These pages are using a : inside the URL.

PHP Version 5.2.11
Apache Version 2.2.14

After a long time of error searching I desided to use another PHP
Version.

PHP Version 5.2.6
Apache Version 2.2.14

With this PHP Version, the error is gone ! 



Actual result:
--
*
HTTP-Protocol
*

With PHP 5.2.11 - http Protocol:
If I call a MediaWiki Page, I can see this with DebugBar three times,
one time in the middle of the communication and two times at the end.
The Result is, that the Apache crashes:

URL: http://:/

Content Type: 
Headers size (bytes): 0
Data size (bytes): 0
Total size (bytes): 0
Transferred data size (bytes): 0
Cached data: No

With PHP 5.2.6 - http Protocol:
If I call a MediaWiki Page, I can see this with DebugBar only one time in
the middle of the communication.
The Result is, that the Apache is working.

URL: http://:/

Content Type: 
Headers size (bytes): 0
Data size (bytes): 0
Total size (bytes): 0
Transferred data size (bytes): 0
Cached data: No


***
With PHP 5.2.11 - Apache Error Log:
***
[Tue Nov 17 17:43:15 2009] [notice] Parent: child process exited with
status 3221225477 -- Restarting.
[Tue Nov 17 17:43:16 2009] [notice] Apache/2.2.14 (Win32) PHP/5.2.11
configured -- resuming normal operations
[Tue Nov 17 17:43:16 2009] [notice] Server built: Sep 28 2009 22:41:08
[Tue Nov 17 17:43:16 2009] [notice] Parent: Created child process 2268
[Tue Nov 17 17:43:16 2009] [notice] Disabled use of AcceptEx() WinSock2
API
[Tue Nov 17 17:43:16 2009] [notice] Child 2268: Child process is running
[Tue Nov 17 17:43:16 2009] [notice] Child 2268: Acquired the start mutex.
[Tue Nov 17 17:43:16 2009] [notice] Child 2268: Starting 150 worker
threads.
[Tue Nov 17 17:43:16 2009] [notice] Child 2268: Listening on port 80.



**
With PHP 5.2.6 - Apache Error Log:
**
[Wed Nov 18 09:52:12 2009] [notice] Apache/2.2.14 (Win32) PHP/5.2.6
configured -- resuming normal operations
[Wed Nov 18 09:52:12 2009] [notice] Server built: Sep 28 2009 22:41:08
[Wed Nov 18 09:52:12 2009] [notice] Parent: Created child process 1180
[Wed Nov 18 09:52:13 2009] [notice] Disabled use of AcceptEx() WinSock2
API
[Wed Nov 18 09:52:13 2009] [notice] Child 1180: Child process is running
[Wed Nov 18 09:52:13 2009] [notice] Child 1180: Acquired the start mutex.
[Wed Nov 18 09:52:13 2009] [notice] Child 1180: Starting 150 worker
threads.
[Wed Nov 18 09:52:13 2009] [notice] Child 1180: Listening on port 80.
[Wed Nov 18 09:53:53 2009] [error] [client 127.0.0.1] (20024)The given
path is misformatted or contained invalid characters: Cannot map GET
/wiki/Fehler:Dokument_in_der_Ansicht_nicht_gefunden_(Begriffskl%C3%A4rung)
HTTP/1.1 to file, referer: http://localhost/wiki/Hauptseite




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

#50013 [Com]: Support for AES-CBC in openssl_pkcs7_encrypt()

2009-10-28 Thread michael at stroeder dot com
 ID:  50013
 Comment by:  michael at stroeder dot com
 Reported By: michael at stroeder dot com
 Status:  Open
 Bug Type:Feature/Change Request
 PHP Version: 5.2.11
 New Comment:

Another patch for php-5.3.0

--- openssl.c.orig  2009-04-20 11:44:29.0 +0200
+++ openssl.c   2009-10-27 14:00:42.0 +0100
@@ -83,8 +83,9 @@
PHP_OPENSSL_CIPHER_RC2_64,
PHP_OPENSSL_CIPHER_DES,
PHP_OPENSSL_CIPHER_3DES,
+   PHP_OPENSSL_CIPHER_AES_CBC,
 
-   PHP_OPENSSL_CIPHER_DEFAULT = PHP_OPENSSL_CIPHER_RC2_40
+   PHP_OPENSSL_CIPHER_DEFAULT = PHP_OPENSSL_CIPHER_AES_CBC
 };
 
 PHP_FUNCTION(openssl_get_md_methods);
@@ -940,6 +941,13 @@
return EVP_des_ede3_cbc();
break;
 #endif
+
+#ifndef OPENSSL_NO_AES
+   case PHP_OPENSSL_CIPHER_AES_CBC:
+   return EVP_aes_256_cbc();
+   break;
+#endif
+
default:
return NULL;
break;
@@ -1017,6 +1025,9 @@
REGISTER_LONG_CONSTANT(OPENSSL_CIPHER_DES,
PHP_OPENSSL_CIPHER_DES, CONST_CS|CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(OPENSSL_CIPHER_3DES,
PHP_OPENSSL_CIPHER_3DES, CONST_CS|CONST_PERSISTENT);
 #endif
+#ifndef OPENSSL_NO_AES
+   REGISTER_LONG_CONSTANT(OPENSSL_CIPHER_AES_CBC,
PHP_OPENSSL_CIPHER_AES_CBC, CONST_CS|CONST_PERSISTENT);
+#endif
 
/* Values for key types */
REGISTER_LONG_CONSTANT(OPENSSL_KEYTYPE_RSA,
OPENSSL_KEYTYPE_RSA, CONST_CS|CONST_PERSISTENT);


Previous Comments:


[2009-10-27 10:21:49] michael at stroeder dot com

Description:

openssl_pkcs7_encrypt() cannot generate encrypted S/MIME messages using
symmetric cipher AES-CBC. This patch also sets the default cipher used
which might not be want one want.

--- ext/openssl/openssl.c.orig  2009-10-26 13:46:25.0 +0100
+++ ext/openssl/openssl.c   2009-10-26 16:32:56.0 +0100
@@ -88,8 +88,9 @@
PHP_OPENSSL_CIPHER_RC2_64,
PHP_OPENSSL_CIPHER_DES,
PHP_OPENSSL_CIPHER_3DES,
+   PHP_OPENSSL_CIPHER_AES_CBC,
 
-   PHP_OPENSSL_CIPHER_DEFAULT = PHP_OPENSSL_CIPHER_RC2_40
+   PHP_OPENSSL_CIPHER_DEFAULT = PHP_OPENSSL_CIPHER_AES_CBC
 };
 
 /* {{{ openssl_functions[]
@@ -730,6 +731,9 @@
REGISTER_LONG_CONSTANT(OPENSSL_CIPHER_DES,
PHP_OPENSSL_CIPHER_DES, CONST_CS|CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(OPENSSL_CIPHER_3DES,
PHP_OPENSSL_CIPHER_3DES, CONST_CS|CONST_PERSISTENT);
 #endif
+#ifndef OPENSSL_NO_AES
+   REGISTER_LONG_CONSTANT(OPENSSL_CIPHER_AES_CBC,
PHP_OPENSSL_CIPHER_AES_CBC, CONST_CS|CONST_PERSISTENT);
+#endif
 
/* Values for key types */
REGISTER_LONG_CONSTANT(OPENSSL_KEYTYPE_RSA,
OPENSSL_KEYTYPE_RSA, CONST_CS|CONST_PERSISTENT);
@@ -2998,6 +3002,12 @@
break;
 #endif
 
+#ifndef OPENSSL_NO_AES
+   case PHP_OPENSSL_CIPHER_AES_CBC:
+   cipher = EVP_aes_256_cbc();
+   break;
+#endif
+
default:
php_error_docref(NULL TSRMLS_CC, E_WARNING,
Invalid cipher type `%ld', cipherid);
goto clean_exit;







-- 
Edit this bug report at http://bugs.php.net/?id=50013edit=1



#50013 [Opn]: Support for AES-CBC in openssl_pkcs7_encrypt()

2009-10-28 Thread michael at stroeder dot com
 ID:  50013
 User updated by: michael at stroeder dot com
 Reported By: michael at stroeder dot com
 Status:  Open
 Bug Type:Feature/Change Request
-PHP Version: 5.2.11
+PHP Version: 5.2.11 and 5.3.0
 New Comment:

Report applies to any PHP version.


Previous Comments:


[2009-10-28 09:06:12] michael at stroeder dot com

Another patch for php-5.3.0

--- openssl.c.orig  2009-04-20 11:44:29.0 +0200
+++ openssl.c   2009-10-27 14:00:42.0 +0100
@@ -83,8 +83,9 @@
PHP_OPENSSL_CIPHER_RC2_64,
PHP_OPENSSL_CIPHER_DES,
PHP_OPENSSL_CIPHER_3DES,
+   PHP_OPENSSL_CIPHER_AES_CBC,
 
-   PHP_OPENSSL_CIPHER_DEFAULT = PHP_OPENSSL_CIPHER_RC2_40
+   PHP_OPENSSL_CIPHER_DEFAULT = PHP_OPENSSL_CIPHER_AES_CBC
 };
 
 PHP_FUNCTION(openssl_get_md_methods);
@@ -940,6 +941,13 @@
return EVP_des_ede3_cbc();
break;
 #endif
+
+#ifndef OPENSSL_NO_AES
+   case PHP_OPENSSL_CIPHER_AES_CBC:
+   return EVP_aes_256_cbc();
+   break;
+#endif
+
default:
return NULL;
break;
@@ -1017,6 +1025,9 @@
REGISTER_LONG_CONSTANT(OPENSSL_CIPHER_DES,
PHP_OPENSSL_CIPHER_DES, CONST_CS|CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(OPENSSL_CIPHER_3DES,
PHP_OPENSSL_CIPHER_3DES, CONST_CS|CONST_PERSISTENT);
 #endif
+#ifndef OPENSSL_NO_AES
+   REGISTER_LONG_CONSTANT(OPENSSL_CIPHER_AES_CBC,
PHP_OPENSSL_CIPHER_AES_CBC, CONST_CS|CONST_PERSISTENT);
+#endif
 
/* Values for key types */
REGISTER_LONG_CONSTANT(OPENSSL_KEYTYPE_RSA,
OPENSSL_KEYTYPE_RSA, CONST_CS|CONST_PERSISTENT);



[2009-10-27 10:21:49] michael at stroeder dot com

Description:

openssl_pkcs7_encrypt() cannot generate encrypted S/MIME messages using
symmetric cipher AES-CBC. This patch also sets the default cipher used
which might not be want one want.

--- ext/openssl/openssl.c.orig  2009-10-26 13:46:25.0 +0100
+++ ext/openssl/openssl.c   2009-10-26 16:32:56.0 +0100
@@ -88,8 +88,9 @@
PHP_OPENSSL_CIPHER_RC2_64,
PHP_OPENSSL_CIPHER_DES,
PHP_OPENSSL_CIPHER_3DES,
+   PHP_OPENSSL_CIPHER_AES_CBC,
 
-   PHP_OPENSSL_CIPHER_DEFAULT = PHP_OPENSSL_CIPHER_RC2_40
+   PHP_OPENSSL_CIPHER_DEFAULT = PHP_OPENSSL_CIPHER_AES_CBC
 };
 
 /* {{{ openssl_functions[]
@@ -730,6 +731,9 @@
REGISTER_LONG_CONSTANT(OPENSSL_CIPHER_DES,
PHP_OPENSSL_CIPHER_DES, CONST_CS|CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(OPENSSL_CIPHER_3DES,
PHP_OPENSSL_CIPHER_3DES, CONST_CS|CONST_PERSISTENT);
 #endif
+#ifndef OPENSSL_NO_AES
+   REGISTER_LONG_CONSTANT(OPENSSL_CIPHER_AES_CBC,
PHP_OPENSSL_CIPHER_AES_CBC, CONST_CS|CONST_PERSISTENT);
+#endif
 
/* Values for key types */
REGISTER_LONG_CONSTANT(OPENSSL_KEYTYPE_RSA,
OPENSSL_KEYTYPE_RSA, CONST_CS|CONST_PERSISTENT);
@@ -2998,6 +3002,12 @@
break;
 #endif
 
+#ifndef OPENSSL_NO_AES
+   case PHP_OPENSSL_CIPHER_AES_CBC:
+   cipher = EVP_aes_256_cbc();
+   break;
+#endif
+
default:
php_error_docref(NULL TSRMLS_CC, E_WARNING,
Invalid cipher type `%ld', cipherid);
goto clean_exit;







-- 
Edit this bug report at http://bugs.php.net/?id=50013edit=1



#50013 [NEW]: Support for AES-CBC in openssl_pkcs7_encrypt()

2009-10-27 Thread michael at stroeder dot com
From: michael at stroeder dot com
Operating system: 
PHP version:  5.2.11
PHP Bug Type: Feature/Change Request
Bug description:  Support for AES-CBC in openssl_pkcs7_encrypt()

Description:

openssl_pkcs7_encrypt() cannot generate encrypted S/MIME messages using
symmetric cipher AES-CBC. This patch also sets the default cipher used
which might not be want one want.

--- ext/openssl/openssl.c.orig  2009-10-26 13:46:25.0 +0100
+++ ext/openssl/openssl.c   2009-10-26 16:32:56.0 +0100
@@ -88,8 +88,9 @@
PHP_OPENSSL_CIPHER_RC2_64,
PHP_OPENSSL_CIPHER_DES,
PHP_OPENSSL_CIPHER_3DES,
+   PHP_OPENSSL_CIPHER_AES_CBC,
 
-   PHP_OPENSSL_CIPHER_DEFAULT = PHP_OPENSSL_CIPHER_RC2_40
+   PHP_OPENSSL_CIPHER_DEFAULT = PHP_OPENSSL_CIPHER_AES_CBC
 };
 
 /* {{{ openssl_functions[]
@@ -730,6 +731,9 @@
REGISTER_LONG_CONSTANT(OPENSSL_CIPHER_DES,
PHP_OPENSSL_CIPHER_DES, CONST_CS|CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(OPENSSL_CIPHER_3DES,
PHP_OPENSSL_CIPHER_3DES, CONST_CS|CONST_PERSISTENT);
 #endif
+#ifndef OPENSSL_NO_AES
+   REGISTER_LONG_CONSTANT(OPENSSL_CIPHER_AES_CBC,
PHP_OPENSSL_CIPHER_AES_CBC, CONST_CS|CONST_PERSISTENT);
+#endif
 
/* Values for key types */
REGISTER_LONG_CONSTANT(OPENSSL_KEYTYPE_RSA, OPENSSL_KEYTYPE_RSA,
CONST_CS|CONST_PERSISTENT);
@@ -2998,6 +3002,12 @@
break;
 #endif
 
+#ifndef OPENSSL_NO_AES
+   case PHP_OPENSSL_CIPHER_AES_CBC:
+   cipher = EVP_aes_256_cbc();
+   break;
+#endif
+
default:
php_error_docref(NULL TSRMLS_CC, E_WARNING,
Invalid cipher type `%ld', cipherid);
goto clean_exit;



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



#49744 [NEW]: Multi-line comment at EOF causes no output

2009-10-01 Thread michael dot cordover+php at gmail dot com
From: michael dot cordover+php at gmail dot com
Operating system: Linux
PHP version:  5.2.11
PHP Bug Type: Reproducible crash
Bug description:  Multi-line comment at EOF causes no output

Description:

An unterminated multi-line comment (i.e. /* without */) that runs to the
end of the file causes the parser to stop upon encountering certain
functions (phpinfo() and trigger_error() verified; others not checked).

This behaviour did not occur in 5.2.5 but does occur in 5.2.10

Environment:
PHP Version 5.2.10
FreeBSD [host-removed] 6.2-RELEASE-p12 FreeBSD 6.2-RELEASE-p12 #3: Tue Apr
14 20:41:44 UTC 2009 r...@[host-removed]:/usr/obj/usr/src/sys/SERVER i386
Build Date  Jul 2 2009 15:29:12
Configure Command   './configure'
Server API  Apache
PHP API 20041225
PHP Extension   20060613
Zend Extension  220060519
Apache Version  Apache
Apache Release  10339100
Apache API Version  19990320

Reproduce code:
---
?php

echo 'Test';

if (false) {
  phpinfo();
}

/*

?

Expected result:

HTTP 200 OK HEAD
Associated default PHP headers (Date, Connection, Proxy-Connection,
Content-Type, Server, X-Powered-By)
Body content 'Test' (content-length 4)

This result is obtained by removing the block comment opener (/*) or by
closing the block comment, even if closed AFTER ?

Actual result:
--
HTTP 500 Internal Server Error in HEAD
Default PHP headers (Date, Connection, Proxy-Connection, Date,
Content-Type, Server, X-Powered-By)
No output (content-length 0)
No error logged by Apache
Apache does not load ErrorDocument 500

I am unfortunately not in a position to generate a backtrace (shared
hosting).

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



#49744 [Opn]: Multi-line comment at EOF causes no output

2009-10-01 Thread michael dot cordover+php at gmail dot com
 ID:   49744
 User updated by:  michael dot cordover+php at gmail dot com
 Reported By:  michael dot cordover+php at gmail dot com
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: Linux
 PHP Version:  5.2.11
 New Comment:

It should be noted that the following code does not create this error.

?php

echo 'Test';

if (false) {
  
}

/*

? */


Previous Comments:


[2009-10-02 04:19:00] michael dot cordover+php at gmail dot com

Description:

An unterminated multi-line comment (i.e. /* without */) that runs to
the end of the file causes the parser to stop upon encountering certain
functions (phpinfo() and trigger_error() verified; others not checked).

This behaviour did not occur in 5.2.5 but does occur in 5.2.10

Environment:
PHP Version 5.2.10
FreeBSD [host-removed] 6.2-RELEASE-p12 FreeBSD 6.2-RELEASE-p12 #3: Tue
Apr 14 20:41:44 UTC 2009 r...@[host-removed]:/usr/obj/usr/src/sys/SERVER
i386
Build Date  Jul 2 2009 15:29:12
Configure Command   './configure'
Server API  Apache
PHP API 20041225
PHP Extension   20060613
Zend Extension  220060519
Apache Version  Apache
Apache Release  10339100
Apache API Version  19990320

Reproduce code:
---
?php

echo 'Test';

if (false) {
  phpinfo();
}

/*

?

Expected result:

HTTP 200 OK HEAD
Associated default PHP headers (Date, Connection, Proxy-Connection,
Content-Type, Server, X-Powered-By)
Body content 'Test' (content-length 4)

This result is obtained by removing the block comment opener (/*) or by
closing the block comment, even if closed AFTER ?

Actual result:
--
HTTP 500 Internal Server Error in HEAD
Default PHP headers (Date, Connection, Proxy-Connection, Date,
Content-Type, Server, X-Powered-By)
No output (content-length 0)
No error logged by Apache
Apache does not load ErrorDocument 500

I am unfortunately not in a position to generate a backtrace (shared
hosting).





-- 
Edit this bug report at http://bugs.php.net/?id=49744edit=1



#49586 [NEW]: argv Varriables reverse registration

2009-09-18 Thread michael dot schmidt at innogames dot net
From: michael dot schmidt at innogames dot net
Operating system: Linux
PHP version:  5.3.0
PHP Bug Type: Feature/Change Request
Bug description:  argv Varriables reverse registration

Description:

Sometimes i write php-cli Daemons who forks many different kind of childs.
There is no way to identify this processes (e.g. by using ps or top ...)
If i change the argv varriable in my php-script, the argv varriables of
the php-interpreter are untouched.

A solution would be a function which re-syncs the $argv from the
php-script to the interpreter. This would change /proc/pid/cmdline and ps
/ top would display the given string.

Reproduce code:
---
?php

$argv[1] = BAR; // Override argv

resyncargv(); // Requested function

?


Expected result:

linux:~# ps ax
4030 ?S  0:04 /usr/bin/php foo.php


Actual result:
--
linux:~# ps ax
4030 ?S  0:04 /usr/bin/php BAR


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



#49586 [Opn]: argv Varriables reverse registration

2009-09-18 Thread michael dot schmidt at innogames dot de
 ID:   49586
 User updated by:  michael dot schmidt at innogames dot de
-Reported By:  michael dot schmidt at innogames dot net
+Reported By:  michael dot schmidt at innogames dot de
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Linux
 PHP Version:  5.3.0
 New Comment:

Email address fixed


Previous Comments:


[2009-09-18 09:47:17] michael dot schmidt at innogames dot de

Description:

Sometimes i write php-cli Daemons who forks many different kind of
childs. There is no way to identify this processes (e.g. by using ps or
top ...)
If i change the argv varriable in my php-script, the argv varriables of
the php-interpreter are untouched.

A solution would be a function which re-syncs the $argv from the
php-script to the interpreter. This would change /proc/pid/cmdline and
ps / top would display the given string.

Reproduce code:
---
?php

$argv[1] = BAR; // Override argv

resyncargv(); // Requested function

?


Expected result:

linux:~# ps ax
4030 ?S  0:04 /usr/bin/php foo.php


Actual result:
--
linux:~# ps ax
4030 ?S  0:04 /usr/bin/php BAR






-- 
Edit this bug report at http://bugs.php.net/?id=49586edit=1



#48216 [Com]: PHP Fatal error: SOAP-ERROR: Parsing WSDL: Extra content at the end of the doc

2009-09-06 Thread michael dot tibben at gmail dot com
 ID:   48216
 Comment by:   michael dot tibben at gmail dot com
 Reported By:  mark at everytruckjob dot com
 Status:   Open
 Bug Type: SOAP related
 Operating System: CentOs 5.3
 PHP Version:  5.3.0RC2
 New Comment:

We are experiencing a similar issue. However, the HTTP reply is using
chunked transfer encoding (Content-Length is NOT required when using
chunked)


HTTP/1.1 200 OK
Date: Sun, 06 Sep 2009 23:25:16 GMT
Server: Apache
X-Powered-By: Servlet/2.4 JSP/2.0
Transfer-Encoding: chunked
Content-Type: text/xml; charset=UTF-8


Previous Comments:


[2009-06-24 10:23:47] sjoerd-php at linuxonly dot nl

Thank you for your bug report.

The WSDL URL you supply does not send a Content-Length or
Transfer-Encoding header in some cases, which is mandatory in a response
with a body. In other words, it does not follow the HTTP protocol. You
should contact the provider of the WSDL about this.


GET /url HTTP/1.0
Host: example.com

HTTP/1.1 200 OK
Date: Wed, 24 Jun 2009 10:18:10 GMT
Server: Apache
Connection: close
Content-Type: text/xml

?xml version=1.0 encoding=UTF-8?...



[2009-05-09 23:12:48] mark at everytruckjob dot com

Description:

Trying to set up a soapClient using the wsdl from the location found in
http://www.everytruckjob.com/php53-url.txt (this contains the url and is
not the wsdl file itself so I can remove the location once this report
is closed as it is not my soap server).

Copying the wsdl from the referenced location to my own
(http://www.everytruckjob.com/wsdl.php) or saving it to a local file
allows parsing to succeed, but while the file sizes seem to be the same,
I can't figure out what headers or content causes the Extra content at
the end of the document error.

This works as expected on php 5.2.9 compiled and in use on the same
client server with Centos 5.3 libxml2.x86_64 2.6.26-2.1.2.7.


Reproduce code:
---
?php
$wsdl =
trim(file_get_contents('http://www.everytruckjob.com/php53-url.txt'));  

try {
$a = new SoapClient($wsdl);
} catch (SoapFault $e) {
var_dump(libxml_get_last_error());
var_dump($e);
}
?

Expected result:

No SoapFault

Actual result:
--
object(LibXMLError)#1 (6) { [level]=  int(3) [code]=  int(5)
[column]=  int(4) [message]=  string(41) Extra content at the end
of the document  [file]=  string(55) http://; [line]= 
int(488) } 

object(SoapFault)#2 (9) {
[message:protected]=  string(146) SOAP-ERROR: Parsing WSDL:
Couldn't load from 'X' : Extra content at the end of the document 







-- 
Edit this bug report at http://bugs.php.net/?id=48216edit=1



#42516 [Csd-Opn]: __FILE__ resolves symlinks - not mentioned in manual

2009-08-17 Thread michael at zedeler dot dk
 ID:   42516
 User updated by:  michael at zedeler dot dk
 Reported By:  michael at zedeler dot dk
-Status:   Closed
+Status:   Open
-Bug Type: Documentation problem
+Bug Type: Feature/Change Request
 Operating System: Linux
 PHP Version:  4.4.7
 Assigned To:  bjori
 New Comment:

Moved to Feature/Change request category.


Previous Comments:


[2009-04-24 05:58:24] bj...@php.net

Please use the developers mailinglist for feature discussions
(intern...@lists.php.net).



[2009-04-23 18:51:59] michael at zedeler dot dk

Wrong category.



[2009-04-23 17:53:20] michael at zedeler dot dk

Sorry to bug you again, but as I am writing in the report, just putting
a description of the errant behaviour is not a useful fix.



[2008-04-13 23:46:35] bj...@php.net

This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation
better.





[2007-09-01 21:02:38] michael at zedeler dot dk

Description:

__FILE__ does not return the path used to invoke the current file, but
resolves symlinks.

This behaviour is extremely problematics, since important information
is thrown away. The web is teeming with postings from people that are
experiencing problems because of this.

In http://bugs.php.net/bug.php?id=37603 this bug was mentioned and the
response was that it is intended behavior with a reference to the
manual.

The page

http://es.php.net/manual/en/language.constants.predefined.php

is the primary source of information for __FILE__, and it does not
mention resolving symlinks at all.

I'd like if we could have som kind of dialogue about how to solve the
problem, in stead of just having this bug being closed with a Bogus
status.

My suggestions are:

 1) introduce a new magical constant that behaves as it should.
 2) put a parameter in php.ini that changes how __FILE__ behaves.


Reproduce code:
---
This is basically a reopening of http://bugs.php.net/bug.php?id=37603

Expected result:

This is basically a reopening of http://bugs.php.net/bug.php?id=37603

Actual result:
--
This is basically a reopening of http://bugs.php.net/bug.php?id=37603





-- 
Edit this bug report at http://bugs.php.net/?id=42516edit=1



#42516 [Opn]: __FILE__ resolves symlinks

2009-08-17 Thread michael at zedeler dot dk
 ID:   42516
 User updated by:  michael at zedeler dot dk
-Summary:  __FILE__ resolves symlinks - not mentioned in manual
 Reported By:  michael at zedeler dot dk
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Linux
 PHP Version:  4.4.7
 Assigned To:  bjori
 New Comment:

Fixed subject.


Previous Comments:


[2009-08-17 12:56:08] michael at zedeler dot dk

Moved to Feature/Change request category.



[2009-04-24 05:58:24] bj...@php.net

Please use the developers mailinglist for feature discussions
(intern...@lists.php.net).



[2009-04-23 18:51:59] michael at zedeler dot dk

Wrong category.



[2009-04-23 17:53:20] michael at zedeler dot dk

Sorry to bug you again, but as I am writing in the report, just putting
a description of the errant behaviour is not a useful fix.



[2008-04-13 23:46:35] bj...@php.net

This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation
better.





The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/42516

-- 
Edit this bug report at http://bugs.php.net/?id=42516edit=1



#41519 [Com]: is_readable() returns true, when it's effectively false

2009-08-11 Thread Michael dot Heyse at fh-kl dot de
 ID:   41519
 Comment by:   Michael dot Heyse at fh-kl dot de
 Reported By:  marcelo dot schmidt+php at gmail dot com
 Status:   No Feedback
 Bug Type: Filesystem function related
 Operating System: Windows XP
 PHP Version:  5.2.2
 New Comment:

This bug still exists in PHP-5.2.11-dev (phpinfo(): System Windows NT,
5.2 build 3790, Build Date Aug 11 2009 11:42:34). Here some more
detailled information.

is_readable and is_writable seem to ignore ACLs.

testcase:

The apache 2.0.63 service runs as user apache. I created three files
as follows:

- not_readable.txt without any permissions for user apache
- readable.txt with permissions Read, Execute and Read
- writable.txt with permissions Change, Read, Execute, Read,
Write

testcode:

echo 'not_readable.txt is ' . (is_writable('not_readable.txt') ?
'writable' : 'not writable') . '; ';
echo 'fopen(not_readable.txt, a) returns ' .
(@fopen(not_readable.txt, a) ? 'true' : 'false'). 'br/';
echo 'not_readable.txt is ' . (is_readable('not_readable.txt') ?
'readable' : 'not readable') . '; ';
echo 'fopen(not_readable.txt, r) returns ' .
(@fopen(not_readable.txt, r) ? 'true' : 'false'). 'br/';
echo 'readable.txt is ' . (is_writable('readable.txt') ? 'writable' :
'not writable') . '; ';
echo 'fopen(readable.txt, a) returns ' . (@fopen(readable.txt,
a) ? 'true' : 'false'). 'br/';
echo 'readable.txt is ' . (is_readable('readable.txt') ? 'readable' :
'not readable') . '; ';
echo 'fopen(readable.txt, r) returns ' . (@fopen(readable.txt,
r) ? 'true' : 'false'). 'br/';
echo 'writable.txt is ' . (is_writable('writable.txt') ? 'writable' :
'not writable') . '; ';
echo 'fopen(writable.txt, a) returns ' . (@fopen(writable.txt,
a) ? 'true' : 'false'). 'br/';
echo 'writable.txt is ' . (is_readable('writable.txt') ? 'readable' :
'not readable') . '; ';
echo 'fopen(writable.txt, r) returns ' . (@fopen(writable.txt,
r) ? 'true' : 'false'). 'br/';

actual result:

not_readable.txt is writable; fopen(not_readable.txt, a) returns
false
not_readable.txt is readable; fopen(not_readable.txt, r) returns
false
readable.txt is writable; fopen(readable.txt, a) returns false
readable.txt is readable; fopen(readable.txt, r) returns true
writable.txt is writable; fopen(writable.txt, a) returns true
writable.txt is readable; fopen(writable.txt, r) returns true

expected result:

not_readable.txt is not writable; fopen(not_readable.txt, a)
returns false
not_readable.txt is not readable; fopen(not_readable.txt, r)
returns false
readable.txt is not writable; fopen(readable.txt, a) returns false
readable.txt is readable; fopen(readable.txt, r) returns true
writable.txt is writable; fopen(writable.txt, a) returns true
writable.txt is readable; fopen(writable.txt, r) returns true


Previous Comments:


[2007-06-05 01:00:01] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to Open.



[2007-05-28 20:40:09] tony2...@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.


Ooops. Clicked wrong button.



[2007-05-28 16:24:09] marcelo dot schmidt+php at gmail dot com

Description:

I have the following permissions on a file:
Everyone have full control, though they are denied read and read 
execute.
is_readable is returning true for this file, while fopen is not able to
read it (which is expected).






-- 
Edit this bug report at http://bugs.php.net/?id=41519edit=1



#41519 [Com]: is_readable() returns true, when it's effectively false

2009-08-11 Thread Michael dot heyse at fh-kl dot de
 ID:   41519
 Comment by:   Michael dot heyse at fh-kl dot de
 Reported By:  marcelo dot schmidt+php at gmail dot com
 Status:   Feedback
 Bug Type: Filesystem function related
 Operating System: Windows XP
 PHP Version:  5.2.2
 New Comment:

It does indeed work with php-5.3.1-dev. However, the production server
is still running php-2.2 and can't be updated (yet).


Previous Comments:


[2009-08-11 14:00:40] paj...@php.net

Please try using this snapshot:

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

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





[2009-08-11 13:59:17] Michael dot Heyse at fh-kl dot de

This bug still exists in PHP-5.2.11-dev (phpinfo(): System Windows NT,
5.2 build 3790, Build Date Aug 11 2009 11:42:34). Here some more
detailled information.

is_readable and is_writable seem to ignore ACLs.

testcase:

The apache 2.0.63 service runs as user apache. I created three files
as follows:

- not_readable.txt without any permissions for user apache
- readable.txt with permissions Read, Execute and Read
- writable.txt with permissions Change, Read, Execute, Read,
Write

testcode:

echo 'not_readable.txt is ' . (is_writable('not_readable.txt') ?
'writable' : 'not writable') . '; ';
echo 'fopen(not_readable.txt, a) returns ' .
(@fopen(not_readable.txt, a) ? 'true' : 'false'). 'br/';
echo 'not_readable.txt is ' . (is_readable('not_readable.txt') ?
'readable' : 'not readable') . '; ';
echo 'fopen(not_readable.txt, r) returns ' .
(@fopen(not_readable.txt, r) ? 'true' : 'false'). 'br/';
echo 'readable.txt is ' . (is_writable('readable.txt') ? 'writable' :
'not writable') . '; ';
echo 'fopen(readable.txt, a) returns ' . (@fopen(readable.txt,
a) ? 'true' : 'false'). 'br/';
echo 'readable.txt is ' . (is_readable('readable.txt') ? 'readable' :
'not readable') . '; ';
echo 'fopen(readable.txt, r) returns ' . (@fopen(readable.txt,
r) ? 'true' : 'false'). 'br/';
echo 'writable.txt is ' . (is_writable('writable.txt') ? 'writable' :
'not writable') . '; ';
echo 'fopen(writable.txt, a) returns ' . (@fopen(writable.txt,
a) ? 'true' : 'false'). 'br/';
echo 'writable.txt is ' . (is_readable('writable.txt') ? 'readable' :
'not readable') . '; ';
echo 'fopen(writable.txt, r) returns ' . (@fopen(writable.txt,
r) ? 'true' : 'false'). 'br/';

actual result:

not_readable.txt is writable; fopen(not_readable.txt, a) returns
false
not_readable.txt is readable; fopen(not_readable.txt, r) returns
false
readable.txt is writable; fopen(readable.txt, a) returns false
readable.txt is readable; fopen(readable.txt, r) returns true
writable.txt is writable; fopen(writable.txt, a) returns true
writable.txt is readable; fopen(writable.txt, r) returns true

expected result:

not_readable.txt is not writable; fopen(not_readable.txt, a)
returns false
not_readable.txt is not readable; fopen(not_readable.txt, r)
returns false
readable.txt is not writable; fopen(readable.txt, a) returns false
readable.txt is readable; fopen(readable.txt, r) returns true
writable.txt is writable; fopen(writable.txt, a) returns true
writable.txt is readable; fopen(writable.txt, r) returns true



[2007-06-05 01:00:01] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to Open.



[2007-05-28 20:40:09] tony2...@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.


Ooops. Clicked wrong button.



[2007-05-28 16:24:09] marcelo dot schmidt+php at gmail dot com

Description:

I have the following permissions on a file:
Everyone have full control, though they are denied read and read 
execute.
is_readable is returning true for this file, while fopen is not able to
read it (which is expected).






-- 
Edit this bug report at http://bugs.php.net/?id=41519edit=1



  1   2   3   4   5   >