Bug #61665 [Opn-Fbk]: include on stream wrapper results in wsod

2012-06-27 Thread pollita
Edit report at https://bugs.php.net/bug.php?id=61665edit=1

 ID: 61665
 Updated by: poll...@php.net
 Reported by:btmash at gmail dot com
 Summary:include on stream wrapper results in wsod
-Status: Open
+Status: Feedback
 Type:   Bug
 Package:Streams related
 Operating System:   Ubuntu 10.04
 PHP Version:5.3.10
 Block user comment: N
 Private report: N



Previous Comments:

[2012-06-28 00:56:28] poll...@php.net

Hi, could you paste the wrapper code again? That link is invalid (the content 
hosting site went down).  Thanks!


[2012-04-19 08:08:15] btmash at gmail dot com

I'm setting it back to open since I've provided feedback.


[2012-04-09 23:29:13] btmash at gmail dot com

I've pasted a version of the class at http://paste.pocoo.org/show/578721/ since 
it is longer than 20 lines.

Please note that a large chunk of this is the drupal stream wrapper interface 
and at the bottom is the stream class that I implemented 'MyLocalStreamWrapper' 
which returns back the directory it is currently in. I perform an include to a 
info.php file which consists of:

?php

phpinfo();



I tested this out on PHP 5.3.8 and it worked. When I tested this on 5.3.10, it 
failed.


[2012-04-09 22:12:44] cataphr...@php.net

Please include the code of the stream wrapper, otherwise we can't reproduce 
this problem. In particular, the implementation of stream_open would be very 
important (but please include everything).


[2012-04-08 09:56:51] btmash at gmail dot com

Description:

Hi,

I am currently running a drupal website using a module 
(http://drupal.org/project/configuration) that provided its own contributed 
stream wrapper to find the local configuration directory (so it was in the 
format 'config://path/to/file' - the implementation can be seen at 
http://drupalcode.org/project/configuration.git/blob/refs/heads/7.x-1.x:/configuration_stream.inc).
 On my local environment of running the site with the module (which runs php 
5.3.6), the configuration would be able to scan on files with the protocol 
without any issues. 

However, once I moved to my staging environment which runs php 5.3.10, I would 
end up with a wsod. The strange part was that the page returned a code 200 and 
nothing in the error log. I made sure that allow_url_fopen was enabled and the 
protocols actually registered so it should have worked correctly. Moreover, 
using file_exists and is_file work to ensure the file exists so that meant the 
file was being found the first time around.

For now, my workaround has been to use drupal's functions to get the stream 
converted correctly (see http://drupal.org/files/config-stream.patch as my 
workaround for the module to work) but problem seems to stem from PHP which is 
why I am filing my issue here. Any help that can be provided would be greatly 
appreciated.

Test script:
---
Implement a simple stream wrapper to a file in local (lets call it local).

Create a php file to include from somewhere (called test_include.inc).

Have the line 'include local://path/to/test_include.inc'.

Expected result:

It should result in a code 200 but also a wsod.

Actual result:
--
The script should be correctly included.






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


Bug #61665 [Opn-Fbk]: include on stream wrapper results in wsod

2012-04-09 Thread cataphract
Edit report at https://bugs.php.net/bug.php?id=61665edit=1

 ID: 61665
 Updated by: cataphr...@php.net
 Reported by:btmash at gmail dot com
 Summary:include on stream wrapper results in wsod
-Status: Open
+Status: Feedback
 Type:   Bug
 Package:Streams related
 Operating System:   Ubuntu 10.04
 PHP Version:5.3.10
 Block user comment: N
 Private report: N

 New Comment:

Please include the code of the stream wrapper, otherwise we can't reproduce 
this problem. In particular, the implementation of stream_open would be very 
important (but please include everything).


Previous Comments:

[2012-04-08 09:56:51] btmash at gmail dot com

Description:

Hi,

I am currently running a drupal website using a module 
(http://drupal.org/project/configuration) that provided its own contributed 
stream wrapper to find the local configuration directory (so it was in the 
format 'config://path/to/file' - the implementation can be seen at 
http://drupalcode.org/project/configuration.git/blob/refs/heads/7.x-1.x:/configuration_stream.inc).
 On my local environment of running the site with the module (which runs php 
5.3.6), the configuration would be able to scan on files with the protocol 
without any issues. 

However, once I moved to my staging environment which runs php 5.3.10, I would 
end up with a wsod. The strange part was that the page returned a code 200 and 
nothing in the error log. I made sure that allow_url_fopen was enabled and the 
protocols actually registered so it should have worked correctly. Moreover, 
using file_exists and is_file work to ensure the file exists so that meant the 
file was being found the first time around.

For now, my workaround has been to use drupal's functions to get the stream 
converted correctly (see http://drupal.org/files/config-stream.patch as my 
workaround for the module to work) but problem seems to stem from PHP which is 
why I am filing my issue here. Any help that can be provided would be greatly 
appreciated.

Test script:
---
Implement a simple stream wrapper to a file in local (lets call it local).

Create a php file to include from somewhere (called test_include.inc).

Have the line 'include local://path/to/test_include.inc'.

Expected result:

It should result in a code 200 but also a wsod.

Actual result:
--
The script should be correctly included.






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