php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #43574 unclear error message on allow_url_fopen=0
Submitted: 2007-12-12 03:35 UTC Modified: 2013-08-02 00:34 UTC
From: greg at chiaraquartet dot net Assigned: yohgaki (profile)
Status: Closed Package: Streams related
PHP Version: 5.3CVS-2007-12-12 (CVS) OS: n/a
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: greg at chiaraquartet dot net
New email:
PHP Version: OS:

 

 [2007-12-12 03:35 UTC] greg at chiaraquartet dot net
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;



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-04-08 21:19 UTC] jani@php.net
-Package: Feature/Change Request +Package: Streams related
 [2013-08-02 00:34 UTC] yohgaki@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: yohgaki
 [2013-08-02 00:34 UTC] yohgaki@php.net
Already fixed.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 00:01:29 2024 UTC