From: dmitry dot poltaryonok at gmail dot com
Operating system: Windows XP SP2
PHP version: 5.0.5
PHP Bug Type: Reproducible crash
Bug description: PHP crashes when you use include for user defined stream
wrapper
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 bug report at http://bugs.php.net/?id=34501&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34501&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=34501&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=34501&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=34501&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=34501&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=34501&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=34501&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=34501&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34501&r=support
Expected behavior: http://bugs.php.net/fix.php?id=34501&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=34501&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=34501&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=34501&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34501&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=34501&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=34501&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34501&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=34501&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=34501&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=34501&r=mysqlcfg