#34501 [Opn]: PHP crashes when you use include for user defined stream wrapper

From: Date: Wed, 14 Sep 2005 18:48:24 +0000
Subject: #34501 [Opn]: 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-85050@lists.php.net to get a copy of this message
ID: 34501 User updated by: dmitry dot poltaryonok at gmail dot com Reported By: dmitry dot poltaryonok at gmail dot com Status: Open Bug Type: Reproducible crash Operating System: Windows XP SP2 PHP Version: 5.0.5 New Comment: Crash is right after call to stream_open Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#85050) next »