#34501 [Fbk]: PHP crashes when you use include for user defined stream wrapper
| From: | sniper@php.net | Date: | Thu, 15 Sep 2005 07:31:08 +0000 |
| Subject: | #34501 [Fbk]: PHP crashes when you use include for user defined stream wrapper | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-85072@lists.php.net to get a copy of this message | ||
ID: 34501
Updated by: sniper@php.net
Reported By: dmitry dot poltaryonok at gmail dot com
Status: Feedback
Bug Type: Reproducible crash
Operating System: Windows XP SP2
PHP Version: 5.0.5
New Comment:
No it isn't. I get an error while running your script about not having
implemented stream_eof(). Try the snapshot.
Previous Comments:
------------------------------------------------------------------------
[2005-09-15 09:30:14] tony2001@php.net
Then provide your actual reproduce code, not the one that doesn't work
at all.
------------------------------------------------------------------------
[2005-09-15 09:23:30] dmitry dot poltaryonok at gmail dot com
My actual wrapper is complete (contains all functions)
------------------------------------------------------------------------
[2005-09-14 22:32:17] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
And fix your script. The wrapper class is incomplete.
------------------------------------------------------------------------
[2005-09-14 20:48:23] dmitry dot poltaryonok at gmail dot com
Crash is right after call to stream_open
------------------------------------------------------------------------
[2005-09-14 20:37:59] dmitry dot poltaryonok at gmail dot com
Description:
------------
After you register custom wrapper PHP crashes during inclusion of the
file using this wrapper.
Reproduce code:
---------------
<?
define('suAPI', 'mywrap://api.su/api/', true);
class mywrap
{
function stream_open ( $path, $mode, $options, &$opened_path )
{
return true;
}
function stream_read ( $count )
{
return '<? echo \'test\';?>';
}
}
stream_wrapper_register('mywrap', 'mywrap');
include(suAPI.'config/config.php');
?>
Expected result:
----------------
I expect to see "test" string echoed from included code. included code
returned by stream_read()
Actual result:
--------------
Windows displays that CLI PHP application crashed (or that Apache is
crashed).
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34501&edit=1