For Programmers: Free Programming Magazines  


Home > Archive > PHP Documentation > April 2004 > #28203 [Opn->Csd]: Php_value and php_flag directives ignored by apache-2.0.49









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author #28203 [Opn->Csd]: Php_value and php_flag directives ignored by apache-2.0.49
derick@php.net

2004-04-29, 5:32 am

ID: 28203
Updated by: derick@php.net
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.fi...allow-url-fopen)
was wrong, but that I just fixed. The new pages will be up in a w 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] derick@php.net

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
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com