php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #28203 Php_value and php_flag directives ignored by apache-2.0.49
Submitted: 2004-04-28 13:36 UTC Modified: 2004-04-29 09:16 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: drubior at tinet dot org Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.3.6 OS: Solaris 8
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: drubior at tinet dot org
New email:
PHP Version: OS:

 

 [2004-04-28 13:36 UTC] 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


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-04-28 15:38 UTC] derick@php.net
Not a bug, use 1 and 0 in httpd.conf, on and off don't work.
 [2004-04-29 08:36 UTC] 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-29 09:16 UTC] derick@php.net
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.
 [2004-05-16 21:46 UTC] selva at thescian dot com
Setting "php_value allow_url_fopen 1" in the .htaccess
will not work either I guess.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 16 20:01:32 2025 UTC