# php/mythweb config assistance required [SOLVED]

## Art Vandalay

after an update (i think it was php) my mythweb status page now produces the following error:

 *Quote:*   

> Error at /var/www/localhost/htdocs/mythweb/modules/status/handler.php, line 29:
> 
> file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration
> 
> Error at /var/www/localhost/htdocs/mythweb/modules/status/handler.php, line 29:
> ...

 

ok after some googling it seems to be that i need to enable the php flag 'allow_url_fopen' to get the above working again?

now i've enabled this flag in the following locations:

/etc/php/apache2-php5/php.ini 

/etc/php/cli-php5/php.ini

/var/www/localhost/htdocs/mythweb/.htaccess

/etc/apache2/vhosts.d/default_vhost.include

last time i got it working by appending default_vhost.include with 

 *Quote:*   

> php_admin_flag allow_url_fopen on

 

but now when i start apache2 with this flag i get:

 *Quote:*   

> * Apache2 has detected a syntax error in your configuration files:
> 
> Syntax error on line 72 of /etc/apache2/vhosts.d/default_vhost.include:
> 
> php_admin_flag takes two arguments, PHP Flag Modifier (Admin)
> ...

 

so something has changed.....is anyone able to suggest where exactly do i need to edit this flag to get it working again?

btw i'm using apache 2 with php 5 ...and php works fine

thanks

----------

## nixnut

Moved from Other Things Gentoo to Networking & Security.

networking/webserver stuff so moved here

----------

## bunder

 */etc/php/apache2-php5/php.ini wrote:*   

> ; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
> 
> allow_url_fopen = On
> 
> ; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
> ...

 

works for me.

cheers

----------

## Art Vandalay

 *Quote:*   

> calista jk # cat /etc/php/apache2-php5/php.ini|grep -i allow_url
> 
> allow_url_fopen = On  
> 
> allow_url_include = On
> ...

 

have it set, but thanks for the suggestion

----------

## bunder

is your apache set to use php5? (as opposed to -D PHP)?

cheers

----------

## Art Vandalay

 *Quote:*   

> calista jk # cat /etc/conf.d/apache2|grep -i PHP
> 
> APACHE2_OPTS="-D DEFAULT_VHOST -D PHP5 -D DAV -D DAV_FS -D INFO -D LANGUAGE -D SSL -D SSL_DEFAULT_VHOST -D SUEXEC"
> 
> 

 

is there anyway to show my php status...ie like a summary of which flags are set and what version is being used?

----------

## Art Vandalay

fixed it by appending

php_admin_flag allow_url_fopen on

to /etc/apache2/vhosts.d/00_default_vhost.conf

don't know why it goes there now, but it works. i wish there was some adequate documentation for php on apache2 for gentoo.

apache2 config on gentoo seems to deviate from the norm compared to the other distros

----------

