ID:               28203
 Updated by:       [EMAIL PROTECTED]
 Reported By:      drubior at tinet dot org
-Status:           Open
+Status:           Closed
-Bug Type:         Apache2 related
+Bug Type:         Documentation problem
 Operating System: Solaris 8
 PHP Version:      4.3.6
 New Comment:

This setting can only be set in php.ini; the documentation regarding to
this
(http://nl2.php.net/manual/en/ref.filesystem.php#ini.allow-url-fopen)
was wrong, but that I just fixed. The new pages will be up in a week or
so.


Previous Comments:
------------------------------------------------------------------------

[2004-04-29 08:36:19] drubior at tinet dot org

Yes, I had 1 before trying with On, because it wasn't working ...

<VirtualHost *>
ServerName www.blahblah.org
DocumentRoot /users/tesp/html
ScriptAlias /cgi-bin/ /users/tesp/html/cgi-bin/
php_flag allow_url_fopen 1
</VirtualHost>

This doesn't work ...

------------------------------------------------------------------------

[2004-04-28 15:38:22] [EMAIL PROTECTED]

Not a bug, use 1 and 0 in httpd.conf, on and off don't work.

------------------------------------------------------------------------

[2004-04-28 13:36:55] drubior at tinet dot org

Description:
------------
I think that the directives passed to virtual hosts via httpd.conf are
failing.

Concretly I've only testet php_value and php_flag.

I'm under Solaris 8, with apache 2.0.49 and php 4.3.6

I've the directive allow_url_fopen set to Off on php.ini, but on the
virtual host definition I have:

<VirtualHost *>
ServerName www.pageyouwant.net
DocumentRoot /apps/pgyw/html
ScriptAlias /cgi-bin/ /apps/pgyw/html/cgi-bin/
php_flag allow_url_fopen on
</VirtualHost>

My configure is:

'./configure' '--prefix=/apps/php-4.3.6'
'--with-apxs2=/apps/apache/bin/apxs' '--with-zlib' '--enable-exif'
'--with-jpeg-dir=/usr/local/lib' '--with-png-dir=/usr/local/lib'
'--with-pgsql=/apps/pg-7.4.1-altanet' '--with-openssl=/usr/local/ssl'
'--enable-calendar' '--enable-ftp' '--without-mysql' '--with-gnu-ld'
'--with-gd'

Reproduce code:
---------------
The script failing is someone using fopen with an url, e.g:

$this->url = "http://somedomain.com/file.txt";;
$this->fp = fopen($this->url, "r")

Expected result:
----------------
I expect to find some content placed in the referenced file

Actual result:
--------------
The php page makes a warning saying that url_fopen is not permitted by
my host:

Warning: fopen(): URL file-access is disabled in the server
configuration in /apps/pgyw/html/includes/noticies.php on line 42

Warning: fopen(http://somedomain.com/file.txt): failed to open stream:
no suitable wrapper could be found in
/apps/pgyw/html/includes/noticies.php on line 42



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=28203&edit=1

Reply via email to