PHP7 php_admin_value

fisher006

Verified User
Joined
Mar 5, 2015
Messages
5
Hello,

I have php values in my httpd.conf:

php_admin_value post_max_size 512M
php_admin_value upload_max_filesize 512M
php_admin_value open_basedir /home/XXX ....

all works fine in PHP 5.2-.5.6 PHP7 ignore this values even sendmail is empty:

httpd.conf

php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f [email protected] -F [email protected]'

php.ini:

sendmail_path /usr/sbin/sendmail -t -i
open_basedir not value

this problem is in apache suphp and litespeed lsphp
 
You cannot use php_admin_value/php_admin_flag with PHP compiled as CGI (suPHP), because these options are only supported when PHP is compiled as a module of Apache. Feel free to use php.ini sections to change the settings (http://php.net/manual/en/ini.sections.php). Otherwise - just switch to mod_ruid2+mod_php and you'll be able to use php_admin_value in Apache configuration files.
 
I'm using litespeed and php_admin_vaule doesn't work...
Maybe you have any sugestions about this?
PHP 5.5, 5.6 works fine i have problem only with 7.
 
Last edited:
ymmv

https://www.litespeedtech.com/suppo...httpd-conf-error-directadmin-litespeed.14743/

Code:
# cd /usr/local/directadmin/data/templates && cp virtual_host2*.conf custom && cp user_virtual_host*.conf custom

...and making changes to add the IfModule, like

Code:
        |*if HAVE_SAFE_MODE="1"|
                <IfModule litespeed>
                php_admin_flag safe_mode |SAFE_MODE|
                </IfModule>
        |*endif|
        |*if USER_CLI="1"|
                <IfModule litespeed>
                php_admin_flag engine |PHP|
                php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f |PHP_EMAIL|'
                |CLI_PHP_MAIL_LOG|
                </IfModule>
        |*endif|
        |*if OPEN_BASEDIR_AND_CLI="ON"|
                <IfModule litespeed>
                php_admin_value open_basedir |OPEN_BASEDIR_PATH|
                </IfModule>
        |*endif|

practical test... :)

Code:
# httpd -S
 
Last edited:
Back
Top