Bug #57638 [Com]: memory size can't be larger than 30Mb

2011-10-29 Thread 1kenthomas at 1kenthomas dot com
Edit report at https://bugs.php.net/bug.php?id=57638&edit=1

 ID: 57638
 Comment by: 1kenthomas at 1kenthomas dot com
 Reported by:roberto at spadim dot com dot br
 Summary:memory size can't be larger than 30Mb
 Status: Closed
 Type:   Bug
 Package:APC
 Operating System:   Linux 64bits archlinux 0.8
 PHP Version:5.2.1
 Assigned To:shire
 Block user comment: N
 Private report: N

 New Comment:

As of today,  v. 3.1.3.x is still shipping with Ubuntu 11.10 while there are 
setup examples using "M".  Just a FYI;  it would be a service to backport,  and 
it would be a service to have v4 in current distros.


Previous Comments:

[2009-03-22 19:55:10] sh...@php.net

*experimental* apc-4.x branch supports the G and M suffixes, I don't think I'll 
be back-porting support for this to apc-3.x unless there's a lot of interest in 
it.


[2008-12-01 11:43:04] melser dot anton at gmail dot com

I'm surprised this is still here...
I'd bet a fiver on the fact that your kernel.shmmax is still set to 32M max. 
Google for increasing your kernel.shmmax then check again.


[2007-11-25 22:40:28] sh...@php.net

apc.shm_size doesn't accept values with the suffix 'M','G' or anything else.  
It's using the default value of 30MB because it sees '64M' as invalid.  I'll 
try to add code to make this more flexible so you can input values such as 'M' 
and 'G' and warn on invalid values.  Try just '64' and it should work for you.


[2007-04-26 18:15:20] wiesem...@php.net

> (package selection corrected)

now really ;-)


[2007-04-26 18:01:38] wiesem...@php.net

(package selection corrected)




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


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


Req #59393 [Com]: memcache >= 3 addServer doesn't accept timeoutms parameter

2011-10-29 Thread guigude at yahoo dot de
Edit report at https://bugs.php.net/bug.php?id=59393&edit=1

 ID: 59393
 Comment by: guigude at yahoo dot de
 Reported by:niko dot sams at gmail dot com
 Summary:memcache >= 3 addServer doesn't accept timeoutms
 parameter
 Status: Feedback
 Type:   Feature/Change Request
 Package:memcache
 Operating System:   Debian stable
 PHP Version:5.2.13
 Block user comment: N
 Private report: N

 New Comment:

http://www.medionakku.de/Medion-MD96500-akku-4800mAh-Schwarz.htm Medion MD 
96500 akku
http://www.medionakku.de/Medion-MD97090-akku-Schwarz.htm Medion MD 97090 akku


Previous Comments:

[2011-09-18 13:35:39]  at php dot net

I see it in php_mmc_pool_addserver.

Are you sure it doesn't work anymore?


[2011-09-15 21:37:21] info at s88 dot co dot jp

http://www.medicsupport.net/";>prednisone 95967 http://www.medicaservice.net/";>prednisone no prescription 8P


[2011-09-12 19:48:22] zamami-d at ii-okinawa dot ne dot jp

http://www.medicaservice.net/";>where to buy prednisone 65979 http://www.pillsparadise.com/";>valtrex on line pharmacy 663


[2011-08-28 20:51:44] info at ishigakijima dot co dot jp

http://www.pillscity.net/";>valtrex =DD http://www.topmdhelp.com/";>topamax 364


[2010-09-02 08:53:45] niko dot sams at gmail dot com

Description:

The parameter is documented but doesn't exist anymore for memcache >= 3







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


[PHP-BUG] Bug #60166 [NEW]: Locale::lookup() returns an empty string if the first arg is an empty array

2011-10-29 Thread np dot viktorov at gmail dot com
From: 
Operating system: Debian GNU/Linux 6.0.2 (squeeze)
PHP version:  Irrelevant
Package:  intl
Bug Type: Bug
Bug description:Locale::lookup() returns an empty string if the first arg is an 
empty array

Description:

Locale::lookup() will return an empty string if the first argument is an
empty array() no matter that we have already set the default argument
(argument #4)

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



Bug #60166 [Opn]: Locale::lookup() returns an empty string if the first arg is an empty array

2011-10-29 Thread np dot viktorov at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=60166&edit=1

 ID: 60166
 User updated by:np dot viktorov at gmail dot com
 Reported by:np dot viktorov at gmail dot com
 Summary:Locale::lookup() returns an empty string if the
 first arg is an empty array
 Status: Open
 Type:   Bug
 Package:intl
 Operating System:   Debian GNU/Linux 6.0.2 (squeeze)
 PHP Version:Irrelevant
 Block user comment: N
 Private report: N

 New Comment:

I forgot the INTL information.
According to phpinfo() the INTL version information is this:
 - version  1.1.0
 - ICU version  4.4.1


Previous Comments:

[2011-10-29 11:24:32] np dot viktorov at gmail dot com

Description:

Locale::lookup() will return an empty string if the first argument is an empty 
array() no matter that we have already set the default argument (argument #4)

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


[PHP-BUG] Bug #60167 [NEW]: Crash / memory corruption

2011-10-29 Thread the...@php.net
From: 
Operating system: Windows Vista
PHP version:  5.4.0beta2
Package:  COM related
Bug Type: Bug
Bug description:Crash / memory corruption

Description:

Multiple calls to a COM function result in crash / memory corruption /
weird behaviour.

Test script:
---
$ php -r '$com= new com("winmgmts:"); foreach (explode(",", $argv[1]) as
$pid) { $p= $com->get("//./root/cimv2:Win32_Process.Handle=$pid"); echo
$pid, ": ", $p->executablePath, ": "; var_dump($p->commandLine); }'
3132,2760,3268

Expected result:

Something like:
3132: C:\...\GoogleToolbarNotifier.exe: string(74)
""C:\...\GoogleToolbarNotifier.exe" "
2760: F:\...\ONENOTEM.EXE: string(58) ""F:\...\ONENOTEM.EXE" /tsr"
3268: F:\...\XWin.exe: string(38) "F:\...\XWin.exe :0 -multiwindow"

Actual result:
--
Something like:
3132: C:\...\GoogleToolbarNotifier.exe: string(74)
""C:\...\GoogleToolbarNotifier.exe" "
3132: C:\...\GoogleToolbarNotifier.exe: string(74)
""C:\...\GoogleToolbarNotifier.exe" "
3132: C:\...\GoogleToolbarNotifier.exe: string(74)
""C:\...\GoogleToolbarNotifier.exe" "


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



Bug #60167 [Opn]: Crash / memory corruption

2011-10-29 Thread the...@php.net
Edit report at https://bugs.php.net/bug.php?id=60167&edit=1

 ID: 60167
 User updated by:the...@php.net
 Reported by:the...@php.net
 Summary:Crash / memory corruption
 Status: Open
 Type:   Bug
 Package:COM related
 Operating System:   Windows Vista
 PHP Version:5.4.0beta2
 Block user comment: N
 Private report: N

 New Comment:

Might be related to #55715


Previous Comments:

[2011-10-29 12:38:13] the...@php.net

Description:

Multiple calls to a COM function result in crash / memory corruption / weird 
behaviour.

Test script:
---
$ php -r '$com= new com("winmgmts:"); foreach (explode(",", $argv[1]) as $pid) 
{ $p= $com->get("//./root/cimv2:Win32_Process.Handle=$pid"); echo $pid, ": ", 
$p->executablePath, ": "; var_dump($p->commandLine); }' 3132,2760,3268

Expected result:

Something like:
3132: C:\...\GoogleToolbarNotifier.exe: string(74) 
""C:\...\GoogleToolbarNotifier.exe" "
2760: F:\...\ONENOTEM.EXE: string(58) ""F:\...\ONENOTEM.EXE" /tsr"
3268: F:\...\XWin.exe: string(38) "F:\...\XWin.exe :0 -multiwindow"

Actual result:
--
Something like:
3132: C:\...\GoogleToolbarNotifier.exe: string(74) 
""C:\...\GoogleToolbarNotifier.exe" "
3132: C:\...\GoogleToolbarNotifier.exe: string(74) 
""C:\...\GoogleToolbarNotifier.exe" "
3132: C:\...\GoogleToolbarNotifier.exe: string(74) 
""C:\...\GoogleToolbarNotifier.exe" "







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


[PHP-BUG] Bug #60169 [NEW]: Conjunction of ternary and list crashes PHP

2011-10-29 Thread the...@php.net
From: 
Operating system: Windows Vista
PHP version:  5.4.0beta2
Package:  Scripting Engine problem
Bug Type: Bug
Bug description:Conjunction of ternary and list crashes PHP

Description:

This code makes PHP exit with exit code #127:

list($a, $b)= is_array($argv) ? $argv : explode("@", $argv[1]);

Test script:
---
$ php.exe -r 'list($a, $b)= is_array($argv) ? $argv : explode("@",
$argv[1]);' ; echo $?


Expected result:

0

Actual result:
--
127

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



Bug #60169 [Opn->Fbk]: Conjunction of ternary and list crashes PHP

2011-10-29 Thread pajoye
Edit report at https://bugs.php.net/bug.php?id=60169&edit=1

 ID: 60169
 Updated by: paj...@php.net
 Reported by:the...@php.net
 Summary:Conjunction of ternary and list crashes PHP
-Status: Open
+Status: Feedback
 Type:   Bug
 Package:Scripting Engine problem
 Operating System:   Windows Vista
 PHP Version:5.4.0beta2
 Block user comment: N
 Private report: N

 New Comment:

I can't reproduce it. Please provide a script without external data (arg).


Previous Comments:

[2011-10-29 13:40:32] the...@php.net

Description:

This code makes PHP exit with exit code #127:

list($a, $b)= is_array($argv) ? $argv : explode("@", $argv[1]);

Test script:
---
$ php.exe -r 'list($a, $b)= is_array($argv) ? $argv : explode("@", $argv[1]);' 
; echo $?


Expected result:

0

Actual result:
--
127






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


Bug #60100 [Com]: segmentation fault at Zip::extractto()

2011-10-29 Thread adamg at pld-linux dot org
Edit report at https://bugs.php.net/bug.php?id=60100&edit=1

 ID: 60100
 Comment by: adamg at pld-linux dot org
 Reported by:adamg at pld-linux dot org
 Summary:segmentation fault at Zip::extractto()
 Status: Feedback
 Type:   Bug
 Package:Reproducible crash
 Operating System:   PLD/Linux
 PHP Version:5.3.8
 Block user comment: N
 Private report: N

 New Comment:

http://adamg.eu/~adamg/zip/

But it seems it was a distro problem caused by a recently applied patch, but I 
am puting the zip files for reference anyway.


Previous Comments:

[2011-10-19 21:03:59] paj...@php.net

Please provide the zip file you use to test.


[2011-10-19 20:59:47] adamg at pld-linux dot org

Description:

(gdb) bt
#0  0x767a1e34 in free () from /lib64/libc.so.6
#1  0x711439ef in php_zip_extract_file (za=0xb01d40, dest=0xaddc28 
"test", file=0xb019b0 "admin/", file_len=)
at /usr/src/debug/php-5.3.8/ext/zip/php_zip.c:226
#2  0x71143d62 in c_ziparchive_extractTo (ht=, 
return_value=0xadc7f8, return_value_ptr=, this_ptr=,
return_value_used=) at 
/usr/src/debug/php-5.3.8/ext/zip/php_zip.c:2487
#3  0x71a648b4 in ?? () from /usr/lib64/php/suhosin.so
#4  0x77d18b34 in zend_do_fcall_common_helper_SPEC 
(execute_data=0x7fffef0a3140) at 
/usr/src/debug/php-5.3.8/Zend/zend_vm_execute.h:322
#5  0x77cb8fcb in execute (op_array=0xb01c50) at 
/usr/src/debug/php-5.3.8/Zend/zend_vm_execute.h:107
#6  0x71a64e64 in ?? () from /usr/lib64/php/suhosin.so
#7  0x77d1881c in zend_do_fcall_common_helper_SPEC 
(execute_data=0x7fffef0a3068) at 
/usr/src/debug/php-5.3.8/Zend/zend_vm_execute.h:344
#8  0x77cb8fcb in execute (op_array=0xad9878) at 
/usr/src/debug/php-5.3.8/Zend/zend_vm_execute.h:107
#9  0x71a64e64 in ?? () from /usr/lib64/php/suhosin.so
#10 0x77c94a80 in zend_execute_scripts (type=8, retval=0x0, 
file_count=3) at /usr/src/debug/php-5.3.8/Zend/zend.c:1308
#11 0x77c40ff0 in php_execute_script (primary_file=0x7fffe440) at 
/usr/src/debug/php-5.3.8/main/main.c:2299
#12 0x00404969 in main (argc=2, argv=0x7fffe5f8) at 
/usr/src/debug/php-5.3.8/sapi/cli/php_cli.c:1188


Test script:
---
open($file);
if ($res === TRUE) {
$zip->extractTo($extractPath);
$zip->close();
return TRUE;
} else {
return FALSE;
}
}
zip_extract('file11.zip','test');








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


Bug #60100 [Fbk]: segmentation fault at Zip::extractto()

2011-10-29 Thread pajoye
Edit report at https://bugs.php.net/bug.php?id=60100&edit=1

 ID: 60100
 Updated by: paj...@php.net
 Reported by:adamg at pld-linux dot org
 Summary:segmentation fault at Zip::extractto()
 Status: Feedback
 Type:   Bug
 Package:Reproducible crash
 Operating System:   PLD/Linux
 PHP Version:5.3.8
 Block user comment: N
 Private report: N

 New Comment:

a distro problem? Were you not using the PHP src?


Previous Comments:

[2011-10-29 20:30:21] adamg at pld-linux dot org

http://adamg.eu/~adamg/zip/

But it seems it was a distro problem caused by a recently applied patch, but I 
am puting the zip files for reference anyway.


[2011-10-19 21:03:59] paj...@php.net

Please provide the zip file you use to test.


[2011-10-19 20:59:47] adamg at pld-linux dot org

Description:

(gdb) bt
#0  0x767a1e34 in free () from /lib64/libc.so.6
#1  0x711439ef in php_zip_extract_file (za=0xb01d40, dest=0xaddc28 
"test", file=0xb019b0 "admin/", file_len=)
at /usr/src/debug/php-5.3.8/ext/zip/php_zip.c:226
#2  0x71143d62 in c_ziparchive_extractTo (ht=, 
return_value=0xadc7f8, return_value_ptr=, this_ptr=,
return_value_used=) at 
/usr/src/debug/php-5.3.8/ext/zip/php_zip.c:2487
#3  0x71a648b4 in ?? () from /usr/lib64/php/suhosin.so
#4  0x77d18b34 in zend_do_fcall_common_helper_SPEC 
(execute_data=0x7fffef0a3140) at 
/usr/src/debug/php-5.3.8/Zend/zend_vm_execute.h:322
#5  0x77cb8fcb in execute (op_array=0xb01c50) at 
/usr/src/debug/php-5.3.8/Zend/zend_vm_execute.h:107
#6  0x71a64e64 in ?? () from /usr/lib64/php/suhosin.so
#7  0x77d1881c in zend_do_fcall_common_helper_SPEC 
(execute_data=0x7fffef0a3068) at 
/usr/src/debug/php-5.3.8/Zend/zend_vm_execute.h:344
#8  0x77cb8fcb in execute (op_array=0xad9878) at 
/usr/src/debug/php-5.3.8/Zend/zend_vm_execute.h:107
#9  0x71a64e64 in ?? () from /usr/lib64/php/suhosin.so
#10 0x77c94a80 in zend_execute_scripts (type=8, retval=0x0, 
file_count=3) at /usr/src/debug/php-5.3.8/Zend/zend.c:1308
#11 0x77c40ff0 in php_execute_script (primary_file=0x7fffe440) at 
/usr/src/debug/php-5.3.8/main/main.c:2299
#12 0x00404969 in main (argc=2, argv=0x7fffe5f8) at 
/usr/src/debug/php-5.3.8/sapi/cli/php_cli.c:1188


Test script:
---
open($file);
if ($res === TRUE) {
$zip->extractTo($extractPath);
$zip->close();
return TRUE;
} else {
return FALSE;
}
}
zip_extract('file11.zip','test');








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


[PHP-BUG] Req #60171 [NEW]: Suggestion for new function

2011-10-29 Thread invictible at live dot co dot uk
From: 
Operating system: Windows
PHP version:  5.3.8
Package:  Unknown/Other Function
Bug Type: Feature/Change Request
Bug description:Suggestion for new function

Description:

I've been looking for a solution on PHP as I need some way to evaluate
expressions within strings.

Since with if:
$str = '5>6';
if($str)
Would evaluate as true regardless of the expression.

A good possible solution for this may be a function for evaluating the
expressions in the string, eg. evalexp($str); which would return true or
false based on the expression within the string.

Eval is an alternative however, it can create security issues when used
with user provided content for obvious reasons.


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



Req #48080 [Asn->Opn]: Add support for forcing DOM to validate a DOMDocument with a DTD

2011-10-29 Thread cataphract
Edit report at https://bugs.php.net/bug.php?id=48080&edit=1

 ID: 48080
 Updated by: cataphr...@php.net
 Reported by:jose dot rob dot jr at gmail dot com
 Summary:Add support for forcing DOM to validate a
 DOMDocument with a DTD
-Status: Assigned
+Status: Open
 Type:   Feature/Change Request
 Package:DOM XML related
 PHP Version:5.2.9
 Assigned To:cataphract
 Block user comment: N
 Private report: N



Previous Comments:

[2011-09-08 09:55:23] cataphr...@php.net

The particular solution enunciated in this request for handling the external 
external DTD is not implemented, but you can now intercept the loading of such 
external entity with the external entity loader. See 
https://svn.php.net/viewvc/php/php-src/trunk/ext/libxml/tests/libxml_set_external_entity_loader_basic.phpt?revision=315672&view=markup


[2011-09-08 09:49:11] bj...@php.net

Gustavo; So this is fixed?


[2011-08-29 05:08:32] cataphr...@php.net

Added libxml_set_external_entity_loader() in PHP 5.4/trunk, which also solves 
this problem.


[2010-10-31 12:49:50] php at example dot com

It should also be noted that this affects any DOMDocuments using the standard 
XHTML SystemIDs. The W3C decided to block all requests to their URIs. See 
http://www.w3.org/blog/systeam/2008/02/08/w3c_s_excessive_dtd_traffic


[2009-04-26 17:17:38] jose dot rob dot jr at gmail dot com

Description:

I need to validate XML files before loading them, then I created a DTD and 
hosted it.

With python I can distribute the DTD file with the program and validate the XML 
file locally.
A python example:
---
from lxml import etree
from StringIO import StringIO

xmlstart="""
http://example.com/mydtd.dtd'>"""

xmlok=xmlstart+"The XML file";
xmlinvalid=xmlstart+"testThe XML file";

dtddata="";

f=StringIO(dtddata);
dtd=etree.DTD(f);

print "Valid XML:";
xml1=etree.XML(xmlok);
validation=dtd.validate(xml1);
print validation;
print dtd.error_log.filter_from_errors();

print "Invalid XML:";
xml2=etree.XML(xmlinvalid);
validation=dtd.validate(xml2);
print validation;
print dtd.error_log.filter_from_errors();

The only way I find to port this stript is using DOMDocument::validate() but 
this method will get the DTD from http://example.com/mydtd.dtd and be slower, 
generate traffic, and fail when example.com is off-line...

I suggest adding an attribute like DOMDocument::validate($source) where $source 
is a string with DTD source to avoid situations like this...

Reproduce code:
---

http://example.com/mydtd.dtd'>
XML;

$xmlok=$xmlstart."The XML file";
$xmlinvalid=$xmlstart."testThe XML file";
$dtddata="";

print "Valid XML:";
$xml1=DOMDocument::loadXML($xmlok);
$validation=(int)$xml1->validate($dtddata); //Example that would work
print "$validation";
print "Invalid XML:";
$xml1=DOMDocument::loadXML($xmlinvalid);
$validation=(int)$xml1->validate($dtddata); //Example that would work
print "$validation";
?>

Expected result:

Valid XML:

1

Invalid XML:

Warning: DOMDocument::validate() [function.DOMDocument-validate]: Element 
example was declared #PCDATA but contains non text nodes in 
/script/path/xml.php on line 19

Warning: DOMDocument::validate() [function.DOMDocument-validate]: No 
declaration for element a in /script/path/xml.php on line 19

0

Actual result:
--
When no argument is passed to validate and DTD server is off-line:

Valid XML:

Warning: DOMDocument::validate(http://example.com/mydtd.dtd) 
[function.DOMDocument-validate]: failed to open stream: HTTP request failed! 
HTTP/1.1 404 Not Found in /script/path/xml.php on line 14

Warning: DOMDocument::validate() [function.DOMDocument-validate]: I/O warning : 
failed to load external entity "http://example.com/mydtd.dtd"; in 
/script/path/xml.php on line 14

Warning: DOMDocument::validate() [function.DOMDocument-validate]: Could not 
load the external subset "http://example.com/mydtd.dtd"; in /script/path/xml.php 
on line 14

0

Invalid XML:

Warning: DOMDocument::validate(http://example.com/mydtd.dtd) 
[function.DOMDocument-validate]: failed to open stream: HTTP request failed! 
HTTP/1.1 404 Not Found in /script/path/xml.php on line 19

Warning: DOMDocument::validate() [function.DOMDocument-validate]: I/O warning : 
failed to load external entity "http://example.com/mydtd.dtd"; in 
/script/path/xml.php on line 19

Warning: DOMDocument::validate() [function.DOMDocument-validate]: Could not 
load the external subset "http://example.com/mydtd.dtd"; in /script/path/xml.php 
on line 

Req #48080 [Asn->Opn]: Add support for forcing DOM to validate a DOMDocument with a DTD

2011-10-29 Thread cataphract
Edit report at https://bugs.php.net/bug.php?id=48080&edit=1

 ID: 48080
 Updated by: cataphr...@php.net
 Reported by:jose dot rob dot jr at gmail dot com
 Summary:Add support for forcing DOM to validate a
 DOMDocument with a DTD
-Status: Assigned
+Status: Open
 Type:   Feature/Change Request
 Package:DOM XML related
 PHP Version:5.2.9
-Assigned To:cataphract
+Assigned To:
 Block user comment: N
 Private report: N



Previous Comments:

[2011-09-08 09:55:23] cataphr...@php.net

The particular solution enunciated in this request for handling the external 
external DTD is not implemented, but you can now intercept the loading of such 
external entity with the external entity loader. See 
https://svn.php.net/viewvc/php/php-src/trunk/ext/libxml/tests/libxml_set_external_entity_loader_basic.phpt?revision=315672&view=markup


[2011-09-08 09:49:11] bj...@php.net

Gustavo; So this is fixed?


[2011-08-29 05:08:32] cataphr...@php.net

Added libxml_set_external_entity_loader() in PHP 5.4/trunk, which also solves 
this problem.


[2010-10-31 12:49:50] php at example dot com

It should also be noted that this affects any DOMDocuments using the standard 
XHTML SystemIDs. The W3C decided to block all requests to their URIs. See 
http://www.w3.org/blog/systeam/2008/02/08/w3c_s_excessive_dtd_traffic


[2009-04-26 17:17:38] jose dot rob dot jr at gmail dot com

Description:

I need to validate XML files before loading them, then I created a DTD and 
hosted it.

With python I can distribute the DTD file with the program and validate the XML 
file locally.
A python example:
---
from lxml import etree
from StringIO import StringIO

xmlstart="""
http://example.com/mydtd.dtd'>"""

xmlok=xmlstart+"The XML file";
xmlinvalid=xmlstart+"testThe XML file";

dtddata="";

f=StringIO(dtddata);
dtd=etree.DTD(f);

print "Valid XML:";
xml1=etree.XML(xmlok);
validation=dtd.validate(xml1);
print validation;
print dtd.error_log.filter_from_errors();

print "Invalid XML:";
xml2=etree.XML(xmlinvalid);
validation=dtd.validate(xml2);
print validation;
print dtd.error_log.filter_from_errors();

The only way I find to port this stript is using DOMDocument::validate() but 
this method will get the DTD from http://example.com/mydtd.dtd and be slower, 
generate traffic, and fail when example.com is off-line...

I suggest adding an attribute like DOMDocument::validate($source) where $source 
is a string with DTD source to avoid situations like this...

Reproduce code:
---

http://example.com/mydtd.dtd'>
XML;

$xmlok=$xmlstart."The XML file";
$xmlinvalid=$xmlstart."testThe XML file";
$dtddata="";

print "Valid XML:";
$xml1=DOMDocument::loadXML($xmlok);
$validation=(int)$xml1->validate($dtddata); //Example that would work
print "$validation";
print "Invalid XML:";
$xml1=DOMDocument::loadXML($xmlinvalid);
$validation=(int)$xml1->validate($dtddata); //Example that would work
print "$validation";
?>

Expected result:

Valid XML:

1

Invalid XML:

Warning: DOMDocument::validate() [function.DOMDocument-validate]: Element 
example was declared #PCDATA but contains non text nodes in 
/script/path/xml.php on line 19

Warning: DOMDocument::validate() [function.DOMDocument-validate]: No 
declaration for element a in /script/path/xml.php on line 19

0

Actual result:
--
When no argument is passed to validate and DTD server is off-line:

Valid XML:

Warning: DOMDocument::validate(http://example.com/mydtd.dtd) 
[function.DOMDocument-validate]: failed to open stream: HTTP request failed! 
HTTP/1.1 404 Not Found in /script/path/xml.php on line 14

Warning: DOMDocument::validate() [function.DOMDocument-validate]: I/O warning : 
failed to load external entity "http://example.com/mydtd.dtd"; in 
/script/path/xml.php on line 14

Warning: DOMDocument::validate() [function.DOMDocument-validate]: Could not 
load the external subset "http://example.com/mydtd.dtd"; in /script/path/xml.php 
on line 14

0

Invalid XML:

Warning: DOMDocument::validate(http://example.com/mydtd.dtd) 
[function.DOMDocument-validate]: failed to open stream: HTTP request failed! 
HTTP/1.1 404 Not Found in /script/path/xml.php on line 19

Warning: DOMDocument::validate() [function.DOMDocument-validate]: I/O warning : 
failed to load external entity "http://example.com/mydtd.dtd"; in 
/script/path/xml.php on line 19

Warning: DOMDocument::validate() [function.DOMDocument-validate]: Could not 
load the external subset "http://example.com/mydtd.dtd"; in /script/

Bug #60100 [Fbk->Csd]: segmentation fault at Zip::extractto()

2011-10-29 Thread adamg at pld-linux dot org
Edit report at https://bugs.php.net/bug.php?id=60100&edit=1

 ID: 60100
 User updated by:adamg at pld-linux dot org
 Reported by:adamg at pld-linux dot org
 Summary:segmentation fault at Zip::extractto()
-Status: Feedback
+Status: Closed
 Type:   Bug
 Package:Reproducible crash
 Operating System:   PLD/Linux
 PHP Version:5.3.8
 Block user comment: N
 Private report: N

 New Comment:

Yes, just checked, does not happen with unpatched php. 
Closing a bug report, sorry about the noise.


Previous Comments:

[2011-10-29 21:19:34] paj...@php.net

a distro problem? Were you not using the PHP src?


[2011-10-29 20:30:21] adamg at pld-linux dot org

http://adamg.eu/~adamg/zip/

But it seems it was a distro problem caused by a recently applied patch, but I 
am puting the zip files for reference anyway.


[2011-10-19 21:03:59] paj...@php.net

Please provide the zip file you use to test.


[2011-10-19 20:59:47] adamg at pld-linux dot org

Description:

(gdb) bt
#0  0x767a1e34 in free () from /lib64/libc.so.6
#1  0x711439ef in php_zip_extract_file (za=0xb01d40, dest=0xaddc28 
"test", file=0xb019b0 "admin/", file_len=)
at /usr/src/debug/php-5.3.8/ext/zip/php_zip.c:226
#2  0x71143d62 in c_ziparchive_extractTo (ht=, 
return_value=0xadc7f8, return_value_ptr=, this_ptr=,
return_value_used=) at 
/usr/src/debug/php-5.3.8/ext/zip/php_zip.c:2487
#3  0x71a648b4 in ?? () from /usr/lib64/php/suhosin.so
#4  0x77d18b34 in zend_do_fcall_common_helper_SPEC 
(execute_data=0x7fffef0a3140) at 
/usr/src/debug/php-5.3.8/Zend/zend_vm_execute.h:322
#5  0x77cb8fcb in execute (op_array=0xb01c50) at 
/usr/src/debug/php-5.3.8/Zend/zend_vm_execute.h:107
#6  0x71a64e64 in ?? () from /usr/lib64/php/suhosin.so
#7  0x77d1881c in zend_do_fcall_common_helper_SPEC 
(execute_data=0x7fffef0a3068) at 
/usr/src/debug/php-5.3.8/Zend/zend_vm_execute.h:344
#8  0x77cb8fcb in execute (op_array=0xad9878) at 
/usr/src/debug/php-5.3.8/Zend/zend_vm_execute.h:107
#9  0x71a64e64 in ?? () from /usr/lib64/php/suhosin.so
#10 0x77c94a80 in zend_execute_scripts (type=8, retval=0x0, 
file_count=3) at /usr/src/debug/php-5.3.8/Zend/zend.c:1308
#11 0x77c40ff0 in php_execute_script (primary_file=0x7fffe440) at 
/usr/src/debug/php-5.3.8/main/main.c:2299
#12 0x00404969 in main (argc=2, argv=0x7fffe5f8) at 
/usr/src/debug/php-5.3.8/sapi/cli/php_cli.c:1188


Test script:
---
open($file);
if ($res === TRUE) {
$zip->extractTo($extractPath);
$zip->close();
return TRUE;
} else {
return FALSE;
}
}
zip_extract('file11.zip','test');








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


[PHP-BUG] Bug #60172 [NEW]: make fails

2011-10-29 Thread martin at psinas dot com
From: 
Operating system: Ubuntu 10.04 / Apache2
PHP version:  5.4SVN-2011-10-29 (snap)
Package:  Compile Failure
Bug Type: Bug
Bug description:make fails

Description:

I already have PHP installed, trying to upgrade to latest development
version. 
I'm using Ubuntu 10.04 w/ Apache2.

Test script:
---
worm@worm-desktop:~$ wget http://snaps.php.net/php5.4-201110292230.tar.gz
worm@worm-desktop:~$ tar -xvzf php5.4-201110292230.tar.gz
worm@worm-desktop:~$ cd php5.4-201110292230
worm@worm-desktop:~/php5.4-201110292230$ ./configure
worm@worm-desktop:~/php5.4-201110292230$ sudo make

Actual result:
--
/php5.4-201110292230/ext/sqlite3/libsqlite
-I/home/worm/php5.4-201110292230/TSRM 
-I/home/worm/php5.4-201110292230/Zend-I/usr/include -g -O2 -
fvisibility=hidden -DZEND_SIGNALS  -c /home/worm/php5.4-
201110292230/Zend/zend_ini_parser.c -o Zend/zend_ini_parser.lo 
cc: /home/worm/php5.4-201110292230/Zend/zend_ini_parser.c: No such file or

directory
cc: no input files
make: *** [Zend/zend_ini_parser.lo] Error 1

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



Bug #55175 [Asn->Csd]: SplFileInfo throws a LogicException saying it's constructor has to be called

2011-10-29 Thread cataphract
Edit report at https://bugs.php.net/bug.php?id=55175&edit=1

 ID: 55175
 Updated by: cataphr...@php.net
 Reported by:s...@php.net
 Summary:SplFileInfo throws a LogicException saying it's
 constructor has to be called
-Status: Assigned
+Status: Closed
 Type:   Bug
 Package:SPL related
 PHP Version:5.4SVN-2011-07-11 (snap)
 Assigned To:cataphract
 Block user comment: N
 Private report: N

 New Comment:

Replaced with 5.3 code.


Previous Comments:

[2011-10-29 23:17:15] cataphr...@php.net

Automatic comment from SVN on behalf of cataphract
Revision: http://svn.php.net/viewvc/?view=revision&revision=318566
Log: - Reverted changes that required constructor overrides to invoke the parent
  constructor in several SPL classes and applied 5.3 fixes instead.
  Related bugs: #54384, #55175 and #55300


[2011-07-11 07:21:13] sala...@php.net

Related to #54384


[2011-07-11 07:09:04] s...@php.net

Description:

SplFileInfo throws the following exception whenever you extend it:

LogicException: In the constructor of ExtendingClass, parent::__construct() 
must be called and its exceptions cannot be cleared

Note that, in the example below, defining the constructor explicitly and 
calling parent::__construct() does not fix the issue.

Test script:
---
# php -r 'class Foo extends SplFileInfo {} new SplFileInfo("foo"); new Foo("bar
");'


Expected result:

No output

Actual result:
--
Fatal error: Uncaught exception 'LogicException' with message 'In the 
constructor of Foo, parent::__construct() must be called and its exceptions 
cannot be cleared' in Command line code:1
Stack trace:
#0 Command line code(1): Foo->internal_construction_wrapper('bar')
#1 {main}
  thrown in Command line code on line 1






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


Bug #55300 [Asn->Csd]: \DirectoryIterator, parent::__construct() and \LogicException

2011-10-29 Thread cataphract
Edit report at https://bugs.php.net/bug.php?id=55300&edit=1

 ID: 55300
 Updated by: cataphr...@php.net
 Reported by:frederic dot hardy at mageekbox dot net
 Summary:\DirectoryIterator, parent::__construct() and
 \LogicException
-Status: Assigned
+Status: Closed
 Type:   Bug
 Package:SPL related
 Operating System:   Linux
 PHP Version:5.4.0alpha2
 Assigned To:cataphract
 Block user comment: N
 Private report: N

 New Comment:

Replaced with 5.3 code.


Previous Comments:

[2011-10-29 23:17:16] cataphr...@php.net

Automatic comment from SVN on behalf of cataphract
Revision: http://svn.php.net/viewvc/?view=revision&revision=318566
Log: - Reverted changes that required constructor overrides to invoke the parent
  constructor in several SPL classes and applied 5.3 fixes instead.
  Related bugs: #54384, #55175 and #55300


[2011-09-14 15:38:41] frederic dot hardy at mageekbox dot net

\Phar has the same problem, because this class extends 
\recursiveDirectoryIterator.
And stream wrapper can not be used with it because "Phar objects can only be 
created from local files".


[2011-09-02 20:03:27] krossekrabbe at gmail dot com

No, it's not only a BC break. It's exactly the same, it is not possible to 
extend 
the class. Not when calling parent::__construct(), nor when not overriding 
__construct() at all.


[2011-08-09 08:52:19] cataphr...@php.net

I wouldn't consider these duplicates. #55175 is an actual problem, this is 
simply an intended BC break that turned out to have a larger impact than I 
expected. I'll take care of both not after the beginning of next week.


[2011-08-09 08:46:37] s...@php.net

Actually according to my test case in https://bugs.php.net/bug.php?id=55175 - 
it's even happening if you don't redefine the constructor at all. It prevents 
extending the class altogether, which makes no sense to me.




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


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


[PHP-BUG] Bug #60173 [NEW]: Wrong message on trait instantiation

2011-10-29 Thread php-bugs at majkl578 dot cz
From: 
Operating system: 
PHP version:  5.4SVN-2011-10-29 (snap)
Package:  Scripting Engine problem
Bug Type: Bug
Bug description:Wrong message on trait instantiation

Description:

Wrong error message when trait is being instanciated using reflection or
being unserialized by unserialize().

Test script:
---
trait Test
{}

$rc = new ReflectionClass('Test');
$rc->newInstance();

Expected result:

Fatal error: Cannot instantiate trait Test in %s on line %d

Actual result:
--
Fatal error: Cannot instantiate abstract class Test in %s on line %d

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



Req #60171 [Opn->Wfx]: Suggestion for new function

2011-10-29 Thread cataphract
Edit report at https://bugs.php.net/bug.php?id=60171&edit=1

 ID: 60171
 Updated by: cataphr...@php.net
 Reported by:invictible at live dot co dot uk
 Summary:Suggestion for new function
-Status: Open
+Status: Wont fix
 Type:   Feature/Change Request
 Package:Unknown/Other Function
 Operating System:   Windows
 PHP Version:5.3.8
 Block user comment: N
 Private report: N

 New Comment:

This is the purpose of eval (though it would probably be better – including 
versatile – to parse the expression yourself), the "security issues" (really, 
input validation) can be handled by analyzing  the tokens in the strings; see 
token_get_all().

Besides, this request is very vague – for instance it doesn't specify which 
subset of the expressions space would be admissible and gives a rationale for 
it.

Won't fix.


Previous Comments:

[2011-10-29 21:28:06] invictible at live dot co dot uk

Description:

I've been looking for a solution on PHP as I need some way to evaluate 
expressions within strings.

Since with if:
$str = '5>6';
if($str)
Would evaluate as true regardless of the expression.

A good possible solution for this may be a function for evaluating the 
expressions in the string, eg. evalexp($str); which would return true or false 
based on the expression within the string.

Eval is an alternative however, it can create security issues when used with 
user provided content for obvious reasons.







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


Bug #60134 [Opn->Fbk]: SIGSEGV in zend_std_write_property

2011-10-29 Thread cataphract
Edit report at https://bugs.php.net/bug.php?id=60134&edit=1

 ID: 60134
 Updated by: cataphr...@php.net
 Reported by:fbaligant at synalabs dot com
 Summary:SIGSEGV in zend_std_write_property
-Status: Open
+Status: Feedback
 Type:   Bug
 Package:Scripting Engine problem
 Operating System:   Debian Squeeze
 PHP Version:5.4.0beta2
 Block user comment: N
 Private report: N

 New Comment:

This is going to be difficult without a script. If you can't get a short one, a 
big one is better than nothing.


Previous Comments:

[2011-10-28 14:20:32] fbaligant at synalabs dot com

Wrong package


[2011-10-25 22:35:26] fbaligant at synalabs dot com

Description:

PHP5.4beta2 from SVN, up to this revision: http://svn.php.net/viewvc?
view=revision&revision=318411

Repeatable crash in Symfony 1.4.14's Doctrine 1.2.4 Doctrine_Record constructor.

PHP environment is FastCGI with lighttpd.

No APC or Xcache active.

This code runs fine with PHP 5.3.8.


Test script:
---
Didn't manage to reproduce it in a simple script yet

Expected result:

Should not crash

Actual result:
--
Program received signal SIGSEGV, Segmentation fault.
0x006c787d in zend_std_write_property (object=0x3cc01e0, 
member=0x2964040, value=0xcd11c69b772c0444, key=0x2964040) at /tmp/buildd/php5-
5.3.99+5.4.0/Zend/zend_object_handlers.c:244
244 if (key && (property_info = CACHED_POLYMORPHIC_PTR(key-
>cache_slot, ce)) != NULL) {
(gdb) print key
$1 = (zend_literal *) 0x2964040
(gdb) print key->cache_slot
$2 = 4
(gdb) print ce
$3 = (zend_class_entry *) 0x4
(gdb) bt full
#0  0x006c787d in zend_std_write_property (object=0x3cc01e0, 
member=0x2964040, value=0xcd11c69b772c0444, key=0x2964040) at /tmp/buildd/php5-
5.3.99+5.4.0/Zend/zend_object_handlers.c:244
property_info = 0x85
scope_property_info = 0x6c85a3
denied_access = 184 '\270'
h = 64829024
zobj = 0x3cc4690
tmp_member = 0x13c21c8
variable_ptr = 0x13c42f0
property_info = 0x0
#1  0x0071f5b3 in zend_assign_to_object (retval=0x0, 
object_ptr=0x3cc01e0, property_name=0x7f18dc45d5e8, value_type=4, 
value_op=0x29612e0, Ts=0x1, opcode=7471229, key=0x2964040) at /tmp/buildd/php5-
5.3.99+5.4.0/Zend/zend_execute.c:738
object = 0x3cb69e0
value = 0x3cc01e0
opcode = 136
key = 0x2964040
#2  0x0072007d in ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_HANDLER 
(execute_data=0x7f18dc45cb58) at /tmp/buildd/php5-
5.3.99+5.4.0/Zend/zend_vm_execute.h:21975
opline = 0x29612e0
#3  0x00711fb8 in execute (op_array=0x3dba620) at /tmp/buildd/php5-
5.3.99+5.4.0/Zend/zend_vm_execute.h:410
ret = 0
execute_data = 0x7f18dc45cb58
nested = 0 '\000'
original_in_execution = 0 '\000'
#4  0x006a03ad in zend_execute_scripts (type=32767, 
retval=0x7bb685f0, file_count=3) at /tmp/buildd/php5-
5.3.99+5.4.0/Zend/zend.c:1272
files = {{gp_offset = 0, fp_offset = 0, overflow_arg_area = 0x28, 
reg_save_area = 0x7bb68680}}
i = 1
file_handle = 
orig_op_array = 0x0
orig_retval_ptr_ptr = 0xd23518
#5  0x00643268 in php_execute_script (primary_file=0x0) at 
/tmp/buildd/php5-5.3.99+5.4.0/main/main.c:2414
__orig_bailout = 0x7bb67db0
__bailout = {{__jmpbuf = {4223038732, 32767, 4223038736, 32767, 
4223040800, 32767, 4223038688, 32767}, __mask_was_saved = 7041200, __saved_mask 
= {__val = {6910217, 0, 76, 0, 4223038784, 32767, 64586544, 0, 64623000, 0, 
4223038912, 32767, 0, 1, 4223039008, 
32767
prepend_file_p = 0x0
append_file_p = 0x0
prepend_file = {type = 3695567936, filename = 0x7f180001 , opened_path = 0x27348c8 "\370Hs\002", handle = 
{fd = -599399504, fp = 0x7f18dc45e3b0, stream = {handle = 0x7f18dc45e3b0, 
isatty 
= 13775168, mmap = {
len = 10411208, pos = 4223041392, map = 0x1, buf = 0x2 , old_handle = 0x7bb67710, old_closer = 0x20}, reader = 
0x648bb2 , fsizer = 0, 
  closer = 0x6dfc89 }}, 
free_filename = 172 '\254'}
append_file = {type = 6, filename = 0x0, opened_path = 0x3 , handle = {fd = 7012488, fp = 0x6b0088, stream = {handle = 
0x6b0088, isatty = 8, mmap = {len = 0, pos = 3695567936, map = 0x7f18dc45e458, 
buf = 0x6444e0 "H\201", , 
old_handle = 0x7f18dc45e3b0, old_closer = 0xd23140 }, reader 
= 
0, fsizer = 0, closer = 0x25eb400}}, free_filename = 176 '\260'}
retval = 0
#6  0x0074d03f in main (argc=32767, argv=0x20) at /tmp/buildd/php5-
5.3.99+5.4.0/sapi/cgi/cgi_main.c:2420
__bailout = {{__jmpbuf = {0, 0, 0, 0, 1871636702, 1462165169, 13779936, 
0}, __mask_was_saved = -1

Bug #60169 [Fbk]: Conjunction of ternary and list crashes PHP

2011-10-29 Thread laruence
Edit report at https://bugs.php.net/bug.php?id=60169&edit=1

 ID: 60169
 Updated by: larue...@php.net
 Reported by:the...@php.net
 Summary:Conjunction of ternary and list crashes PHP
 Status: Feedback
 Type:   Bug
 Package:Scripting Engine problem
 Operating System:   Windows Vista
 PHP Version:5.4.0beta2
 Block user comment: N
 Private report: N

 New Comment:

backtrace:

#0  0x008d69e5 in zend_fetch_dimension_address_read 
(result=0x2a95dac1d0, container_ptr=0x0, 
dim=0x2a95de57f8, dim_type=1, type=0)
at /home/huixc/opensource/php-src/trunk/Zend/zend_execute.c:1244
1244zval *container = *container_ptr;
(gdb) bt
#0  0x008d69e5 in zend_fetch_dimension_address_read 
(result=0x2a95dac1d0, container_ptr=0x0, 
dim=0x2a95de57f8, dim_type=1, type=0)
at /home/huixc/opensource/php-src/trunk/Zend/zend_execute.c:1244
#1  0x0091630d in ZEND_FETCH_DIM_R_SPEC_VAR_CONST_HANDLER 
(execute_data=0x2a95dac0e8)
at /home/huixc/opensource/php-src/trunk/Zend/zend_vm_execute.h:12694
#2  0x008d79ae in execute (op_array=0x2a95de36e8) at 
/home/huixc/opensource/php-
src/trunk/Zend/zend_vm_execute.h:410
#3  0x008a0063 in zend_execute_scripts (type=8, retval=0x0, 
file_count=3) at 
/home/huixc/opensource/php-src/trunk/Zend/zend.c:1272
#4  0x00820850 in php_execute_script (primary_file=0x7fb2a0) at 
/home/huixc/opensource/php-
src/trunk/main/main.c:2414
#5  0x009c12dd in do_cli (argc=2, argv=0x7fb588) at 
/home/huixc/opensource/php-
src/trunk/sapi/cli/php_cli.c:983
#6  0x009c217e in main (argc=2, argv=0x7fb588) at 
/home/huixc/opensource/php-
src/trunk/sapi/cli/php_cli.c:1356


Previous Comments:

[2011-10-29 14:26:31] paj...@php.net

I can't reproduce it. Please provide a script without external data (arg).


[2011-10-29 13:40:32] the...@php.net

Description:

This code makes PHP exit with exit code #127:

list($a, $b)= is_array($argv) ? $argv : explode("@", $argv[1]);

Test script:
---
$ php.exe -r 'list($a, $b)= is_array($argv) ? $argv : explode("@", $argv[1]);' 
; echo $?


Expected result:

0

Actual result:
--
127






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


Bug #60169 [Fbk]: Conjunction of ternary and list crashes PHP

2011-10-29 Thread laruence
Edit report at https://bugs.php.net/bug.php?id=60169&edit=1

 ID: 60169
 Updated by: larue...@php.net
 Reported by:the...@php.net
 Summary:Conjunction of ternary and list crashes PHP
 Status: Feedback
 Type:   Bug
 Package:Scripting Engine problem
 Operating System:   Windows Vista
 PHP Version:5.4.0beta2
 Block user comment: N
 Private report: N

 New Comment:

I can reproduce this on linux with a more simple script:


and I have pasted the bt above~


Previous Comments:

[2011-10-30 01:37:39] larue...@php.net

backtrace:

#0  0x008d69e5 in zend_fetch_dimension_address_read 
(result=0x2a95dac1d0, container_ptr=0x0, 
dim=0x2a95de57f8, dim_type=1, type=0)
at /home/huixc/opensource/php-src/trunk/Zend/zend_execute.c:1244
1244zval *container = *container_ptr;
(gdb) bt
#0  0x008d69e5 in zend_fetch_dimension_address_read 
(result=0x2a95dac1d0, container_ptr=0x0, 
dim=0x2a95de57f8, dim_type=1, type=0)
at /home/huixc/opensource/php-src/trunk/Zend/zend_execute.c:1244
#1  0x0091630d in ZEND_FETCH_DIM_R_SPEC_VAR_CONST_HANDLER 
(execute_data=0x2a95dac0e8)
at /home/huixc/opensource/php-src/trunk/Zend/zend_vm_execute.h:12694
#2  0x008d79ae in execute (op_array=0x2a95de36e8) at 
/home/huixc/opensource/php-
src/trunk/Zend/zend_vm_execute.h:410
#3  0x008a0063 in zend_execute_scripts (type=8, retval=0x0, 
file_count=3) at 
/home/huixc/opensource/php-src/trunk/Zend/zend.c:1272
#4  0x00820850 in php_execute_script (primary_file=0x7fb2a0) at 
/home/huixc/opensource/php-
src/trunk/main/main.c:2414
#5  0x009c12dd in do_cli (argc=2, argv=0x7fb588) at 
/home/huixc/opensource/php-
src/trunk/sapi/cli/php_cli.c:983
#6  0x009c217e in main (argc=2, argv=0x7fb588) at 
/home/huixc/opensource/php-
src/trunk/sapi/cli/php_cli.c:1356


[2011-10-29 14:26:31] paj...@php.net

I can't reproduce it. Please provide a script without external data (arg).


[2011-10-29 13:40:32] the...@php.net

Description:

This code makes PHP exit with exit code #127:

list($a, $b)= is_array($argv) ? $argv : explode("@", $argv[1]);

Test script:
---
$ php.exe -r 'list($a, $b)= is_array($argv) ? $argv : explode("@", $argv[1]);' 
; echo $?


Expected result:

0

Actual result:
--
127






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


Bug #60169 [Fbk->Asn]: Conjunction of ternary and list crashes PHP

2011-10-29 Thread pajoye
Edit report at https://bugs.php.net/bug.php?id=60169&edit=1

 ID: 60169
 Updated by: paj...@php.net
 Reported by:the...@php.net
 Summary:Conjunction of ternary and list crashes PHP
-Status: Feedback
+Status: Assigned
 Type:   Bug
 Package:Scripting Engine problem
 Operating System:   Windows Vista
 PHP Version:5.4.0beta2
-Assigned To:
+Assigned To:lbarnaud
 Block user comment: N
 Private report: N

 New Comment:

Arnaud, could you try to give a look please? Happens only in 5.4, the recent 
optimization in this area could be the cause.


Previous Comments:

[2011-10-30 01:56:49] larue...@php.net

I can reproduce this on linux with a more simple script:


and I have pasted the bt above~


[2011-10-30 01:37:39] larue...@php.net

backtrace:

#0  0x008d69e5 in zend_fetch_dimension_address_read 
(result=0x2a95dac1d0, container_ptr=0x0, 
dim=0x2a95de57f8, dim_type=1, type=0)
at /home/huixc/opensource/php-src/trunk/Zend/zend_execute.c:1244
1244zval *container = *container_ptr;
(gdb) bt
#0  0x008d69e5 in zend_fetch_dimension_address_read 
(result=0x2a95dac1d0, container_ptr=0x0, 
dim=0x2a95de57f8, dim_type=1, type=0)
at /home/huixc/opensource/php-src/trunk/Zend/zend_execute.c:1244
#1  0x0091630d in ZEND_FETCH_DIM_R_SPEC_VAR_CONST_HANDLER 
(execute_data=0x2a95dac0e8)
at /home/huixc/opensource/php-src/trunk/Zend/zend_vm_execute.h:12694
#2  0x008d79ae in execute (op_array=0x2a95de36e8) at 
/home/huixc/opensource/php-
src/trunk/Zend/zend_vm_execute.h:410
#3  0x008a0063 in zend_execute_scripts (type=8, retval=0x0, 
file_count=3) at 
/home/huixc/opensource/php-src/trunk/Zend/zend.c:1272
#4  0x00820850 in php_execute_script (primary_file=0x7fb2a0) at 
/home/huixc/opensource/php-
src/trunk/main/main.c:2414
#5  0x009c12dd in do_cli (argc=2, argv=0x7fb588) at 
/home/huixc/opensource/php-
src/trunk/sapi/cli/php_cli.c:983
#6  0x009c217e in main (argc=2, argv=0x7fb588) at 
/home/huixc/opensource/php-
src/trunk/sapi/cli/php_cli.c:1356


[2011-10-29 14:26:31] paj...@php.net

I can't reproduce it. Please provide a script without external data (arg).


[2011-10-29 13:40:32] the...@php.net

Description:

This code makes PHP exit with exit code #127:

list($a, $b)= is_array($argv) ? $argv : explode("@", $argv[1]);

Test script:
---
$ php.exe -r 'list($a, $b)= is_array($argv) ? $argv : explode("@", $argv[1]);' 
; echo $?


Expected result:

0

Actual result:
--
127






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


Bug #60169 [PATCH]: Conjunction of ternary and list crashes PHP

2011-10-29 Thread larue...@php.net
Edit report at https://bugs.php.net/bug.php?id=60169&edit=1

 ID: 60169
 Patch added by: larue...@php.net
 Reported by:the...@php.net
 Summary:Conjunction of ternary and list crashes PHP
 Status: Assigned
 Type:   Bug
 Package:Scripting Engine problem
 Operating System:   Windows Vista
 PHP Version:5.4.0beta2
 Assigned To:lbarnaud
 Block user comment: N
 Private report: N

 New Comment:

The following patch has been added/updated:

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


Previous Comments:

[2011-10-30 02:01:56] paj...@php.net

Arnaud, could you try to give a look please? Happens only in 5.4, the recent 
optimization in this area could be the cause.


[2011-10-30 01:56:49] larue...@php.net

I can reproduce this on linux with a more simple script:


and I have pasted the bt above~


[2011-10-30 01:37:39] larue...@php.net

backtrace:

#0  0x008d69e5 in zend_fetch_dimension_address_read 
(result=0x2a95dac1d0, container_ptr=0x0, 
dim=0x2a95de57f8, dim_type=1, type=0)
at /home/huixc/opensource/php-src/trunk/Zend/zend_execute.c:1244
1244zval *container = *container_ptr;
(gdb) bt
#0  0x008d69e5 in zend_fetch_dimension_address_read 
(result=0x2a95dac1d0, container_ptr=0x0, 
dim=0x2a95de57f8, dim_type=1, type=0)
at /home/huixc/opensource/php-src/trunk/Zend/zend_execute.c:1244
#1  0x0091630d in ZEND_FETCH_DIM_R_SPEC_VAR_CONST_HANDLER 
(execute_data=0x2a95dac0e8)
at /home/huixc/opensource/php-src/trunk/Zend/zend_vm_execute.h:12694
#2  0x008d79ae in execute (op_array=0x2a95de36e8) at 
/home/huixc/opensource/php-
src/trunk/Zend/zend_vm_execute.h:410
#3  0x008a0063 in zend_execute_scripts (type=8, retval=0x0, 
file_count=3) at 
/home/huixc/opensource/php-src/trunk/Zend/zend.c:1272
#4  0x00820850 in php_execute_script (primary_file=0x7fb2a0) at 
/home/huixc/opensource/php-
src/trunk/main/main.c:2414
#5  0x009c12dd in do_cli (argc=2, argv=0x7fb588) at 
/home/huixc/opensource/php-
src/trunk/sapi/cli/php_cli.c:983
#6  0x009c217e in main (argc=2, argv=0x7fb588) at 
/home/huixc/opensource/php-
src/trunk/sapi/cli/php_cli.c:1356


[2011-10-29 14:26:31] paj...@php.net

I can't reproduce it. Please provide a script without external data (arg).


[2011-10-29 13:40:32] the...@php.net

Description:

This code makes PHP exit with exit code #127:

list($a, $b)= is_array($argv) ? $argv : explode("@", $argv[1]);

Test script:
---
$ php.exe -r 'list($a, $b)= is_array($argv) ? $argv : explode("@", $argv[1]);' 
; echo $?


Expected result:

0

Actual result:
--
127






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


Bug #60169 [PATCH]: Conjunction of ternary and list crashes PHP

2011-10-29 Thread larue...@php.net
Edit report at https://bugs.php.net/bug.php?id=60169&edit=1

 ID: 60169
 Patch added by: larue...@php.net
 Reported by:the...@php.net
 Summary:Conjunction of ternary and list crashes PHP
 Status: Assigned
 Type:   Bug
 Package:Scripting Engine problem
 Operating System:   Windows Vista
 PHP Version:5.4.0beta2
 Assigned To:lbarnaud
 Block user comment: N
 Private report: N

 New Comment:

The following patch has been added/updated:

Patch Name: bug60169.phpt
Revision:   1319940509
URL:
https://bugs.php.net/patch-display.php?bug=60169&patch=bug60169.phpt&revision=1319940509


Previous Comments:

[2011-10-30 02:03:53] larue...@php.net

The following patch has been added/updated:

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


[2011-10-30 02:01:56] paj...@php.net

Arnaud, could you try to give a look please? Happens only in 5.4, the recent 
optimization in this area could be the cause.


[2011-10-30 01:56:49] larue...@php.net

I can reproduce this on linux with a more simple script:


and I have pasted the bt above~


[2011-10-30 01:37:39] larue...@php.net

backtrace:

#0  0x008d69e5 in zend_fetch_dimension_address_read 
(result=0x2a95dac1d0, container_ptr=0x0, 
dim=0x2a95de57f8, dim_type=1, type=0)
at /home/huixc/opensource/php-src/trunk/Zend/zend_execute.c:1244
1244zval *container = *container_ptr;
(gdb) bt
#0  0x008d69e5 in zend_fetch_dimension_address_read 
(result=0x2a95dac1d0, container_ptr=0x0, 
dim=0x2a95de57f8, dim_type=1, type=0)
at /home/huixc/opensource/php-src/trunk/Zend/zend_execute.c:1244
#1  0x0091630d in ZEND_FETCH_DIM_R_SPEC_VAR_CONST_HANDLER 
(execute_data=0x2a95dac0e8)
at /home/huixc/opensource/php-src/trunk/Zend/zend_vm_execute.h:12694
#2  0x008d79ae in execute (op_array=0x2a95de36e8) at 
/home/huixc/opensource/php-
src/trunk/Zend/zend_vm_execute.h:410
#3  0x008a0063 in zend_execute_scripts (type=8, retval=0x0, 
file_count=3) at 
/home/huixc/opensource/php-src/trunk/Zend/zend.c:1272
#4  0x00820850 in php_execute_script (primary_file=0x7fb2a0) at 
/home/huixc/opensource/php-
src/trunk/main/main.c:2414
#5  0x009c12dd in do_cli (argc=2, argv=0x7fb588) at 
/home/huixc/opensource/php-
src/trunk/sapi/cli/php_cli.c:983
#6  0x009c217e in main (argc=2, argv=0x7fb588) at 
/home/huixc/opensource/php-
src/trunk/sapi/cli/php_cli.c:1356


[2011-10-29 14:26:31] paj...@php.net

I can't reproduce it. Please provide a script without external data (arg).




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


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


Bug #60131 [Opn->Wfx]: fopen('php://stdout'...) redirect all posterious echo to /dev/null

2011-10-29 Thread cataphract
Edit report at https://bugs.php.net/bug.php?id=60131&edit=1

 ID: 60131
 Updated by: cataphr...@php.net
 Reported by:frederic dot hardy at mageekbox dot net
 Summary:fopen('php://stdout'...) redirect all posterious
 echo to /dev/null
-Status: Open
+Status: Wont fix
 Type:   Bug
 Package:Streams related
 Operating System:   Mac OS Snow Leopard
 PHP Version:5.3.8
 Block user comment: N
 Private report: N

 New Comment:

Won't fix since some people rely on this behavior. What happens is the first 
time you fopen stdout, the file descriptor 1 is not duped and exposed with a 
stream, instead the stdlib FILE* is exposed through a stream. When the stream 
is closed, the FILE* is closed too, potentially also closing stdout, i.e., a 
close(1) syscall (which is what happens in your case – since you don't assign 
the return of fopen, the stream is immediately destroyed). Turns out some 
people use this technique to close the standard file descriptors and open 
others (and AFAIK there's no other way to do it in PHP).


Previous Comments:

[2011-10-25 14:24:53] frederic dot hardy at mageekbox dot net

Description:

If fopen('php://stdout', ...) is used in a php processus open with proc_open(), 
all posterious call to echo or print seems to be redirected to /dev/null.

Test script:
---
 array("pipe", "r"),
   1 => array("pipe", "w")
);

$php = proc_open('php', $descriptors, $pipes);

stream_set_blocking($pipes[1], 0);

fwrite($pipes[0], '');
fclose($pipes[0]);

$null = null;

$select = array($pipes[1]);

while (feof($pipes[1]) === false)
{
if (stream_select($select, $null, $null, null))
{
var_dump(stream_get_contents($pipes[1]));
}
}

Expected result:

foobar

Actual result:
--
foo






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


Bug #60131 [PATCH]: fopen('php://stdout'...) redirect all posterious echo to /dev/null

2011-10-29 Thread cataphr...@php.net
Edit report at https://bugs.php.net/bug.php?id=60131&edit=1

 ID: 60131
 Patch added by: cataphr...@php.net
 Reported by:frederic dot hardy at mageekbox dot net
 Summary:fopen('php://stdout'...) redirect all posterious
 echo to /dev/null
 Status: Wont fix
 Type:   Bug
 Package:Streams related
 Operating System:   Mac OS Snow Leopard
 PHP Version:5.3.8
 Block user comment: N
 Private report: N

 New Comment:

The following patch has been added/updated:

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


Previous Comments:

[2011-10-30 03:09:23] cataphr...@php.net

Won't fix since some people rely on this behavior. What happens is the first 
time you fopen stdout, the file descriptor 1 is not duped and exposed with a 
stream, instead the stdlib FILE* is exposed through a stream. When the stream 
is closed, the FILE* is closed too, potentially also closing stdout, i.e., a 
close(1) syscall (which is what happens in your case – since you don't assign 
the return of fopen, the stream is immediately destroyed). Turns out some 
people use this technique to close the standard file descriptors and open 
others (and AFAIK there's no other way to do it in PHP).


[2011-10-25 14:24:53] frederic dot hardy at mageekbox dot net

Description:

If fopen('php://stdout', ...) is used in a php processus open with proc_open(), 
all posterious call to echo or print seems to be redirected to /dev/null.

Test script:
---
 array("pipe", "r"),
   1 => array("pipe", "w")
);

$php = proc_open('php', $descriptors, $pipes);

stream_set_blocking($pipes[1], 0);

fwrite($pipes[0], '');
fclose($pipes[0]);

$null = null;

$select = array($pipes[1]);

while (feof($pipes[1]) === false)
{
if (stream_select($select, $null, $null, null))
{
var_dump(stream_get_contents($pipes[1]));
}
}

Expected result:

foobar

Actual result:
--
foo






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


Bug #60131 [Wfx]: fopen('php://stdout'...) redirect all posterious echo to /dev/null

2011-10-29 Thread cataphract
Edit report at https://bugs.php.net/bug.php?id=60131&edit=1

 ID: 60131
 Updated by: cataphr...@php.net
 Reported by:frederic dot hardy at mageekbox dot net
 Summary:fopen('php://stdout'...) redirect all posterious
 echo to /dev/null
 Status: Wont fix
 Type:   Bug
 Package:Streams related
 Operating System:   Mac OS Snow Leopard
 PHP Version:5.3.8
 Block user comment: N
 Private report: N

 New Comment:

For the record, I added a patch that would fix this problem.


Previous Comments:

[2011-10-30 03:14:01] cataphr...@php.net

The following patch has been added/updated:

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


[2011-10-30 03:09:23] cataphr...@php.net

Won't fix since some people rely on this behavior. What happens is the first 
time you fopen stdout, the file descriptor 1 is not duped and exposed with a 
stream, instead the stdlib FILE* is exposed through a stream. When the stream 
is closed, the FILE* is closed too, potentially also closing stdout, i.e., a 
close(1) syscall (which is what happens in your case – since you don't assign 
the return of fopen, the stream is immediately destroyed). Turns out some 
people use this technique to close the standard file descriptors and open 
others (and AFAIK there's no other way to do it in PHP).


[2011-10-25 14:24:53] frederic dot hardy at mageekbox dot net

Description:

If fopen('php://stdout', ...) is used in a php processus open with proc_open(), 
all posterious call to echo or print seems to be redirected to /dev/null.

Test script:
---
 array("pipe", "r"),
   1 => array("pipe", "w")
);

$php = proc_open('php', $descriptors, $pipes);

stream_set_blocking($pipes[1], 0);

fwrite($pipes[0], '');
fclose($pipes[0]);

$null = null;

$select = array($pipes[1]);

while (feof($pipes[1]) === false)
{
if (stream_select($select, $null, $null, null))
{
var_dump(stream_get_contents($pipes[1]));
}
}

Expected result:

foobar

Actual result:
--
foo






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


Req #60068 [Opn->Wfx]: Inconsistencies in language

2011-10-29 Thread cataphract
Edit report at https://bugs.php.net/bug.php?id=60068&edit=1

 ID: 60068
 Updated by: cataphr...@php.net
 Reported by:php dot net at kangaconsulting dot co dot uk
 Summary:Inconsistencies in language
-Status: Open
+Status: Wont fix
 Type:   Feature/Change Request
 Package:Unknown/Other Function
 Operating System:   n/a
 PHP Version:Irrelevant
 Block user comment: N
 Private report: N

 New Comment:

Can't be done at this point (all PHP scripts in existence would have to be 
extensively rewritten).


Previous Comments:

[2011-10-16 08:32:08] php dot net at kangaconsulting dot co dot uk

Description:

Hello

I think php is fantastic but I do find it is a bit inconsistent. The following 
line illustrates my point exactly:

$foo = addslashes(file_get_contents($bar));

When are underscores used to separate words and when aren't they?

It would be much easier to remember as the language grows if it was always one 
or the other.

Apart from that php is a great language in every respect and thanks a lot for 
writing it.








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


Req #60171 [Com]: Suggestion for new function

2011-10-29 Thread invictible at live dot co dot uk
Edit report at https://bugs.php.net/bug.php?id=60171&edit=1

 ID: 60171
 Comment by: invictible at live dot co dot uk
 Reported by:invictible at live dot co dot uk
 Summary:Suggestion for new function
 Status: Wont fix
 Type:   Feature/Change Request
 Package:Unknown/Other Function
 Operating System:   Windows
 PHP Version:5.3.8
 Block user comment: N
 Private report: N

 New Comment:

Expressions such as >, >+ aka something like the comparison operators except, 
in function form.


Previous Comments:

[2011-10-30 00:52:48] cataphr...@php.net

This is the purpose of eval (though it would probably be better – including 
versatile – to parse the expression yourself), the "security issues" (really, 
input validation) can be handled by analyzing  the tokens in the strings; see 
token_get_all().

Besides, this request is very vague – for instance it doesn't specify which 
subset of the expressions space would be admissible and gives a rationale for 
it.

Won't fix.


[2011-10-29 21:28:06] invictible at live dot co dot uk

Description:

I've been looking for a solution on PHP as I need some way to evaluate 
expressions within strings.

Since with if:
$str = '5>6';
if($str)
Would evaluate as true regardless of the expression.

A good possible solution for this may be a function for evaluating the 
expressions in the string, eg. evalexp($str); which would return true or false 
based on the expression within the string.

Eval is an alternative however, it can create security issues when used with 
user provided content for obvious reasons.







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