[BlueOnyx:17408] Re: php_admin_value overwriting

OCEANET - Cédric BASSAGET cedric at oceanet.com
Thu Apr 9 03:15:00 -05 2015


Hello Michael,

The problem is that blueonyx sets the php_admin_value max_execution_time 
in vhost :

[root at sar-w10 vhosts]# cat /etc/httpd/conf/vhosts/site38 | grep 
php_admin_value
php_admin_value open_basedir 
/var/lib/php/session/:/usr/bin/openssl:/usr/sausalito/configs/php/:/tmp/:/etc/mail/:/usr/lib/php/:/home/.sites/4/site38/
php_admin_value post_max_size 40M
php_admin_value upload_max_filesize 32M
*php_admin_value max_execution_time 120*
php_admin_value max_input_time 60
php_admin_value memory_limit 128M
php_admin_value sendmail_path /usr/sausalito/sbin/phpsendmail
php_admin_value auto_prepend_file 
/usr/sausalito/configs/php/set_php_headers.php


When this values are set, they can't be overwritten by 
"set_time_limit()" or "ini_set()" functions :

from http://php.net/manual/en/configuration.changes.php :
> php_admin_value name value
> Sets the value of the specified directive. This can not be used in 
> .htaccess files. Any directive type set with php_admin_value can *not* 
> be overridden by .htaccess or ini_set(). To clear a previously set 
> value use none as the value.

I've tried yesterday, functions return false, and time limit is not 
adjusted.

Regards,
Cédric

OCEANET
---------------------------------------------------------------
[AGENCE DU MANS]
7, rue des Frênes
ZAC de la Pointe
72190 SARGE LES LE MANS
[t] +33 (0)2.43.50.26.50
[f] +33 (0)2.43.72.21.14

[AGENCE D'ANGERS]
5, rue Fleming
Angers Technopole
49066 ANGERS
[t] +33 (0)2.41.19.28.65
[f] +33 (0)2.52.19.22.00

http://www.oceanet.com
http://www.oceanet-telecom.com

On 08/04/2015 20:07, Michael Stauber wrote:
> Hi Cédric,
>
>> Is there a way to overwrite blueonyx vhost's settings like
>> "php_admin_value max_execution_time 30" ?
> The option "php_admin_value" can only be used in the Apache
> configuration, not in .htaccess files. It also cannot be used via
> "ini_set()" from within a script.
>
> However, "max_execution_time" is a PHP_INI_ALL parameter, so you
> wouldn't need to use "php_admin_value" for it:
>
> http://php.net/manual/en/info.configuration.php
>
> So the easiest way to use it for just one script would be to add this
> line at the top of the PHP script in question:
>
> ini_set('max_execution_time', 0);
>
> That would set the execution time to unlimited for this script.
>
> A better way might be to use this function instead of the ini_set(), though:
>
> http://php.net/manual/en/function.set-time-limit.php
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.blueonyx.it/pipermail/blueonyx/attachments/20150409/d9ea4664/attachment.html>


More information about the Blueonyx mailing list