Invalid command 'php_admin_flag', perhaps misspelled or defined by a module not ...

mt92

Verified User
Joined
Aug 8, 2019
Messages
6
Hi
on the
Code:
Dashboard / Custom HTTPD Configurations / View Domain Configuration
control panel path i get Syntax Error contain:
AH00526: Syntax error on line 15 of /usr/local/directadmin/data/users/admin/httpd.conf:
Invalid command 'php_admin_flag', perhaps misspelled or defined by a module not included in the server configuration.

line 15 is:
Code:
php_admin_flag engine ON

how can fix it ?

(sorry for bad english)
 
I think you have php mode set which doesn't support php_admin_flag. Please check if the following solves it:
Code:
cd /usr/local/directadmin/custombuild
./build update
./build php
./build rewrite_confs
 
I think you have php mode set which doesn't support php_admin_flag. Please check if the following solves it:
Code:
cd /usr/local/directadmin/custombuild
./build update
./build php
./build rewrite_confs
thank you but dosent fix.
any other idea ?
 
LiteSpeed relies on Apache configtest (httpd -t), and it seems to fail on your server due to no apache module understanding php_admin_value directives.
 
Ive updated to 1.58.1 and see the changes in the virtual_host.confs and have rebuilt the confs yet I still seem to get this error every single time.


AH00526: Syntax error on line 15 of /usr/local/directadmin/data/users/adbtech/httpd.conf:
Invalid command 'php_admin_flag', perhaps misspelled or defined by a module not included in the server configuration


Directadmin install with litespeed.
 
Please check if you have any files in /usr/local/directadmin/data/templates/custom directory.
 
Please check if you have any files in /usr/local/directadmin/data/templates/custom directory.

I do but after the update I copied the new virtual_host configs in place of the custom ones and replaced the Options line with the FollowSymLinks command we were using in the custom files. These custom files do have and show the new lite speed module lines in all the httpd config files as expected but we still get the error.
 
I do but after the update I copied the new virtual_host configs in place of the custom ones and replaced the Options line with the FollowSymLinks command we were using in the custom files. These custom files do have and show the new lite speed module lines in all the httpd config files as expected but we still get the error.

I guess some of the files might not have the ifmodule directives. A ticket on this with access details would be great :)
 
facing same issue in 1.61 version when switched to LiteSpeed.
Fresh DA installation with CWAF.
Bug still present?
 
facing same issue in 1.61 version when switched to LiteSpeed.
Fresh DA installation with CWAF.
Bug still present?
It's not a DA bug :) LiteSpeed does not have its own configtest, and relies on apache for this (httpd -t). You have no module to recognize those values (mod_lsapi or mod_php required), while they're read by LiteSpeed without problems. It's possible to disable config checks completely, if that's what you'd like to do: https://www.directadmin.com/features.php?id=2699.
 
It's not a DA bug :) LiteSpeed does not have its own configtest, and relies on apache for this (httpd -t). You have no module to recognize those values (mod_lsapi or mod_php required), while they're read by LiteSpeed without problems. It's possible to disable config checks completely, if that's what you'd like to do: https://www.directadmin.com/features.php?id=2699.

I don't want to disable config checks as I am using LiteSpeed paid version and not OLS.
Followed the below steps after the 'fresh' installation of DA.

cd /usr/local/directadmin/custombuild
./build update
./build set webserver litespeed
./build set php1_mode lsphp
./build set php2_mode lsphp
./build set php3_mode lsphp
./build set php4_mode lsphp
./build litespeed
./build php n
 
OLS has the config check, it’s LiteSpeed Enterprise not having it. I’d suggest contacting their support, maybe they’d be interested in creating one.
 
facing same issue in 1.61 version when switched to LiteSpeed.
Fresh DA installation with CWAF.
Bug still present?

Solved.
I skipped the following commands thinking it is not compulsory to change them as I am using only 1 PHP version.
./build set php3_mode lsphp
./build set php4_mode lsphp



I followed all the commands again and it was working.
Thank you for replies smtalk.
Actually came to know when I tried to open ticket with LiteSpeed and they asked for build version and when I gave command /usr/local/lsws/bin/lshttpd -v no version was found and then I checked /usr/local/lsws/autoupdate/ but the folder was also not present so it clicked my mind.
I hope it helps someone.
 
Back
Top