#47336 [Opn]: data: stream restricted by allow_url_fopen
ID: 47336 User updated by: evert at rooftopsolutions dot nl -Summary: data: stream restricted by Reported By: evert at rooftopsolutions dot nl Status: Open Bug Type: Streams related Operating System: Any PHP Version: 5.2.9RC1 New Comment: Fixed the title Previous Comments: [2009-02-07 22:33:47] evert at rooftopsolutions dot nl Description: Looks like data: streams are restricted by allow_url_fopen, but the documentation seems to state otherwise.. http://ca2.php.net/manual/en/wrappers.data.php Reproduce code: --- php -d allow_url_fopen=0 -r "fopen('data://text/plain,hi','r');" Expected result: nothing Actual result: -- Warning: fopen(): URL file-access is disabled in the server configuration in Command line code on line 1 Call Stack: 0.0002 47712 1. {main}() Command line code:0 0.0003 47792 2. fopen() Command line code:1 -- Edit this bug report at http://bugs.php.net/?id=47336&edit=1
#47336 [NEW]: data: stream restricted by
From: evert at rooftopsolutions dot nl Operating system: Any PHP version: 5.2.9RC1 PHP Bug Type: Streams related Bug description: data: stream restricted by Description: Looks like data: streams are restricted by allow_url_fopen, but the documentation seems to state otherwise.. http://ca2.php.net/manual/en/wrappers.data.php Reproduce code: --- php -d allow_url_fopen=0 -r "fopen('data://text/plain,hi','r');" Expected result: nothing Actual result: -- Warning: fopen(): URL file-access is disabled in the server configuration in Command line code on line 1 Call Stack: 0.0002 47712 1. {main}() Command line code:0 0.0003 47792 2. fopen() Command line code:1 -- Edit bug report at http://bugs.php.net/?id=47336&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47336&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47336&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47336&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47336&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47336&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47336&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47336&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47336&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47336&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47336&r=support Expected behavior: http://bugs.php.net/fix.php?id=47336&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47336&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47336&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47336&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47336&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=47336&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47336&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47336&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47336&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47336&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47336&r=mysqlcfg
#47335 [Bgs]: get_called_class() sometimes returning incorrect value
ID: 47335 Updated by: col...@php.net Reported By: php at kennel17 dot co dot uk Status: Bogus Bug Type: Unknown/Other Function Operating System: Win32 PHP Version: 5.3.0beta1 New Comment: The problem is that in your last example, the call is not static since you're in an object context and the getClassName method is not defined as static. Turn E_STRICT reporting on and you'll get errors about that. Previous Comments: [2009-02-07 18:22:41] php at kennel17 dot co dot uk I checked the documentation[1] before posting, and according to what it says there, this is not bogus. The documentation simply states that get_called_class() "Gets the name of the class the static method is called in." In this example, the static method is in MyClass, so the function should return "MyClass". Now, either this is a bug in get_called_class(), or it is a bug in the documentation. Personally, this function has a lot less utility if you can't guarantee that it behaves as described below. How else can you get the current class name? If this is intended behaviour, then can you please point to something that documents the reason for this unintuitive response. [1] http://www.php.net/manual/en/function.get-called-class.php [2009-02-07 16:21:15] fel...@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 [2009-02-07 14:54:35] php at kennel17 dot co dot uk Description: The new get_called_class() function returns the wrong class name when called from within a static method, when that function is called from an instantiated class method. Reproduce code: --- Foo() . "\n"); ?> Expected result: MyClass MyClass MyClass Actual result: -- MyClass MyClass OtherClass -- Edit this bug report at http://bugs.php.net/?id=47335&edit=1
#47335 [Bgs]: get_called_class() sometimes returning incorrect value
ID: 47335 User updated by: php at kennel17 dot co dot uk Reported By: php at kennel17 dot co dot uk Status: Bogus Bug Type: Unknown/Other Function Operating System: Win32 PHP Version: 5.3.0beta1 New Comment: I checked the documentation[1] before posting, and according to what it says there, this is not bogus. The documentation simply states that get_called_class() "Gets the name of the class the static method is called in." In this example, the static method is in MyClass, so the function should return "MyClass". Now, either this is a bug in get_called_class(), or it is a bug in the documentation. Personally, this function has a lot less utility if you can't guarantee that it behaves as described below. How else can you get the current class name? If this is intended behaviour, then can you please point to something that documents the reason for this unintuitive response. [1] http://www.php.net/manual/en/function.get-called-class.php Previous Comments: [2009-02-07 16:21:15] fel...@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 [2009-02-07 14:54:35] php at kennel17 dot co dot uk Description: The new get_called_class() function returns the wrong class name when called from within a static method, when that function is called from an instantiated class method. Reproduce code: --- Foo() . "\n"); ?> Expected result: MyClass MyClass MyClass Actual result: -- MyClass MyClass OtherClass -- Edit this bug report at http://bugs.php.net/?id=47335&edit=1
#47335 [Opn->Bgs]: get_called_class() sometimes returning incorrect value
ID: 47335 Updated by: fel...@php.net Reported By: php at kennel17 dot co dot uk -Status: Open +Status: Bogus Bug Type: Unknown/Other Function Operating System: Win32 PHP Version: 5.3.0beta1 New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Previous Comments: [2009-02-07 14:54:35] php at kennel17 dot co dot uk Description: The new get_called_class() function returns the wrong class name when called from within a static method, when that function is called from an instantiated class method. Reproduce code: --- Foo() . "\n"); ?> Expected result: MyClass MyClass MyClass Actual result: -- MyClass MyClass OtherClass -- Edit this bug report at http://bugs.php.net/?id=47335&edit=1
#47335 [NEW]: get_called_class() sometimes returning incorrect value
From: php at kennel17 dot co dot uk Operating system: Win32 PHP version: 5.3.0beta1 PHP Bug Type: Unknown/Other Function Bug description: get_called_class() sometimes returning incorrect value Description: The new get_called_class() function returns the wrong class name when called from within a static method, when that function is called from an instantiated class method. Reproduce code: --- Foo() . "\n"); ?> Expected result: MyClass MyClass MyClass Actual result: -- MyClass MyClass OtherClass -- Edit bug report at http://bugs.php.net/?id=47335&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47335&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47335&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47335&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47335&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47335&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47335&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47335&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47335&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47335&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47335&r=support Expected behavior: http://bugs.php.net/fix.php?id=47335&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47335&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47335&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47335&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47335&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=47335&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47335&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47335&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47335&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47335&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47335&r=mysqlcfg
#47334 [NEW]: debug_backtrace() gives incorrect 'type' value
From: php at kennel17 dot co dot uk Operating system: Win32 PHP version: 5.2.9RC1 PHP Bug Type: Unknown/Other Function Bug description: debug_backtrace() gives incorrect 'type' value Description: The 'type' attribute returned by debug_backtrace() seems to always be set to "->" in PHP5, but was correctly set to "::" for static calls in PHP4. I have tested this on 5.2.8, 5.2.9RC1 and 5.3.0beta1 and it applies to all of these. In the example code, StaticFunc() is called statically from OtherFunc(), so the type field should contain "::", which it does in PHP4, but in PHP5 it contains "->", as you can see in the results below. Note that this also affects debug_print_backtrace(), which gives the following output: #0 MyClass->StaticFunc() called at [example.php:11] #1 MyClass->OtherFunc() called at [example.php:16] instead of what you would expect: #0 MyClass::StaticFunc() called at [example.php:11] #1 MyClass->OtherFunc() called at [example.php:16] Reproduce code: --- OtherFunc(); ?> Expected result: PHP4 produces this, which is the expected result. Note the 'type' field in element [0]. Array ( [0] => Array ( [file] => example.php [line] => 11 [function] => staticfunc [class] => myclass [type] => :: [args] => Array ( ) ) [1] => Array ( [file] => example.php [line] => 16 [function] => otherfunc [class] => myclass [type] => -> [args] => Array ( ) ) ) Actual result: -- PHP5 gives the following: Array ( [0] => Array ( [file] => example.php [line] => 11 [function] => StaticFunc [class] => MyClass [object] => MyClass Object ( ) [type] => -> [args] => Array ( ) ) [1] => Array ( [file] => example.php [line] => 16 [function] => OtherFunc [class] => MyClass [object] => MyClass Object ( ) [type] => -> [args] => Array ( ) ) ) -- Edit bug report at http://bugs.php.net/?id=47334&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47334&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47334&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47334&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47334&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47334&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47334&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47334&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47334&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47334&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47334&r=support Expected behavior: http://bugs.php.net/fix.php?id=47334&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47334&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47334&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47334&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47334&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=47334&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47334&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47334&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47334&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47334&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47334&r=mysqlcfg
#44908 [Com]: stream_select on pipes returned by proc_open returns streams that are not ready
ID: 44908 Comment by: ondraster at gmail dot com Reported By: mike at silverorange dot com Status: No Feedback Bug Type: Streams related Operating System: * PHP Version: 5.2CVS-2008-09-08 New Comment: function loadModule ( $moduleName ) { $descriptorspec = array( 0 => array("pipe", "r"), 1 => array("pipe", "w"), 2 => array("file", "errors.txt", "a") ); $module = proc_open ( 'I:\httpd\php\php.exe I:\httpd\php-irc-bot\module.' . $moduleName . '.php', $descriptorspec, $pipes, NULL, array ( 'RUNFIRST' => true ) ); $this -> runningModules[$moduleName] = $module; echo "Registered new module: $moduleName\r\n"; $this -> pipes[$moduleName] = $pipes; } ... few code ... foreach ( $this -> pipes as $module => $pipes ) { fwrite ( $pipes[0], $msg ); $forChange[] = $pipes[1]; } $r = NULL; $e = NULL; $sock_change = stream_select ( $forChange, $r, $e, 0, 20 ); if ( $sock_change > 0 && $sock_change !== false ) { foreach ( $forChange as $key => $stream ) { echo fread ( $stream, 4096 ); } } PHP 5.2.2, 5.2.8, 5.3 (Windows Vista 64bit, x86 build, running from CLI) still not working. After 3/4 of year still not fixed. PHP6 says some warnings, never seen before ("Cannot cast a filtered stream on this system", complete errors: http://clip2net.com/clip/m12051/1233956312-clip-16kb.png Previous Comments: [2008-12-03 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-11-25 03:57:58] lbarn...@php.net Please try using this CVS snapshot: http://snaps.php.net/php5.3-latest.tar.gz For Windows: http://windows.php.net/snapshots/ [2008-09-08 14:51:00] gauthi...@php.net Jani, I tried the posted development snapshot and the test still fails. The stream_select() call still returns stdout and stderr streams in the read array and reading from either will block indefinitely (because they're not ready). Please reopen this bug. [2008-05-27 15:51:00] ciocan at gmail dot com Sorry i forgot to mention that for me it happens in Linux: CentOS 5, php 5.2.6 (and also tried on CentoOS 5, php 5.2.1) Thank you, Pavel [2008-05-27 15:46:52] pciocan at gmail dot com I encountered the same problem with stream_select but when using named pipes (created with posix_mkfifo and opened using fopen). Is there a workaround for this problem? Thank you, Pavel 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/44908 -- Edit this bug report at http://bugs.php.net/?id=44908&edit=1