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 user@domain.tld -F user@domain.tld'

php.ini:

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

this problem is in apache suphp and litespeed lsphp
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,206
Location
LT, EU
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.
 

fisher006

Verified User
Joined
Mar 5, 2015
Messages
5
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:

aaronmax

Verified User
Joined
Mar 25, 2019
Messages
15
ymmv

https://www.litespeedtech.com/support/forum/threads/resolved-vhost-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:
Top