Doc #47336 [Com]: data: stream restricted by allow_url_fopen
Edit report at https://bugs.php.net/bug.php?id=47336&edit=1
ID: 47336
Comment by: stoller at leonex dot de
Reported by: evert at rooftopsolutions dot nl
Summary: data: stream restricted by allow_url_fopen
Status: Not a bug
Type: Documentation Problem
Package: Documentation problem
Operating System: *
PHP Version: 5.2.9RC1
Block user comment: N
Private report: N
New Comment:
This bug still exists. I am calling
$res = fopen('data://text/plain;base64,' . base64_encode($value), 'r');
And getting this error log: PHP Warning: fopen(): data:// wrapper is disabled in the server
configuration by allow_url_fopen=0 in
/var/www/htdocs/src/Acme/Component/Doctrine/DBAL/Types/Mediumblob.php on line 27
$ php -v
PHP 5.3.3-7+squeeze15 with Suhosin-Patch (cli) (built: Mar 4 2013 13:11:17)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH
Previous Comments:
------------------------------------------------------------------------
[2009-11-20 10:13:10] evert at rooftopsolutions dot nl
Dear vrana,
This is incorrect. Either the documentation or the behaviour is broken.
The documentation states:
Restricted by allow_url_fopen No
------------------------------------------------------------------------
[2009-11-20 10:07:28] vrana@php.net
Documented at http://www.php.net/manual/en/wrappers.data.php
------------------------------------------------------------------------
[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 https://bugs.php.net/bug.php?id=47336&edit=1
Thread (5 messages)