From: greg at chiaraquartet dot net
Operating system: n/a
PHP version: 5.3CVS-2007-12-12 (CVS)
PHP Bug Type: Streams related
Bug description: unclear error message on allow_url_fopen=0
Description:
------------
if one tries to use the data stream (or any url-based stream), the error
message is:
%s:// wrapper is disabled in the server configuration
It would be more helpful if it said:
s:// wrapper is disabled in the server configuration by allow_url_fopen=0
Reproduce code:
---------------
Index: main/streams/streams.c
===================================================================
RCS file: /repository/php-src/main/streams/streams.c,v
retrieving revision 1.82.2.6.2.18.2.1
diff -u -r1.82.2.6.2.18.2.1 streams.c
--- main/streams/streams.c 6 Nov 2007 11:02:36 -0000
1.82.2.6.2.18.2.1
+++ main/streams/streams.c 12 Dec 2007 03:33:09 -0000
@@ -1621,7 +1621,7 @@
if (options & REPORT_ERRORS) {
/* protocol[n] probably isn't '\0' */
char *protocol_dup = estrndup(protocol, n);
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s://
wrapper is disabled in the server configuration", protocol_dup);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s://
wrapper is disabled in the server configuration by allow_url_fopen=0",
protocol_dup);
efree(protocol_dup);
}
return NULL;
--
Edit bug report at http://bugs.php.net/?id=43574&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=43574&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=43574&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=43574&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=43574&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=43574&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=43574&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=43574&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=43574&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=43574&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=43574&r=support
Expected behavior: http://bugs.php.net/fix.php?id=43574&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=43574&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=43574&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=43574&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43574&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=43574&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=43574&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=43574&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=43574&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=43574&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=43574&r=mysqlcfg