AH00526: Syntax error on line 397 of /etc/httpd/conf/httpd.conf:

Operating system: CentOS SELinux 8 x64
OS version: CentOS Linux release 8.2.2004 (Core)
I’m using Webmin + Virtualmin

I have this problem after installing multiple PHP

Is there a way of fixing this?
/etc/httpd/conf/httpd.conf
line 397: php_admin_value engine Off

lines

Which versions of PHP do you have installed, and what version of PHP and what execution mode are you using?

I think that line should only be there if you’re using mod_php. If you’re using php-fpm (or fcgid), I’m pretty sure it shouldn’t be there.

Richard

It was a new install with all default settings.

Removing the offending line gives the following error

Virtualmin thinks you have mod_php installed, but you don’t (and you should not, it is never recommended to use mod_php).

What exactly did you install when you installed multiple PHP versions? (I don’t see any indication that the doc you linked would have installed mod_php, so I’m not sure where it’d be coming from.)

This user had the same problem, which seemingly resolved itself…seems like maybe there’s a bug in Virtualmin on CentOS 8 where it’s detecting mod_php when it should not be.

For anyone who’s seeing this, can you post the contents of the file /etc/webmin/apache/site ? This lists the Apache modules that Virtualmin thinks are installed.

Also, does this perhaps happen only when a Virtualmin backup taken from another system is restored?

webmin=1.962
size=580016
path=/usr/sbin/httpd
modules=core/2.437 mod_actions/2.437 mod_alias/2.437 mod_auth_basic/2.437 mod_auth_digest/2.437 mod_authn_dbm/2.437 mod_authn_file/2.437 mod_authz_dbm/2.437 mod_authz_groupfile/2.437 mod_authz_host/2.437 mod_authz_owner/2.437 mod_autoindex/2.437 mod_cache/2.437 mod_dir/2.437 mod_env/2.437 mod_ext_filter/2.437 mod_include/2.437 mod_info/2.437 mod_log_config/2.437 mod_mime_magic/2.437 mod_mime/2.437 mod_negotiation/2.437 mod_rewrite/2.437 mod_setenvif/2.437 mod_status/2.437 mod_suexec/2.437 mod_userdir/2.437 mod_vhost_alias/2.437 mod_dav/2.437 mod_proxy/2.437 mod_proxy_balancer/2.437 mod_ssl/2.437 mod_fcgid/2.437

I had an older Centos 7 install that I did backups for the websites.
I copied them over to the New Centos 8 site, and restored them.

There it is. You had mod_php on the old server and not on the new server (that’s good). Just remove those bogus lines. (Though Virtualmin should probably be smart enough to know the environment has changed.)

Yes, the next release will deal with this kind of restore better by removing non-supported PHP directives.

1 Like

Which Ones?

These ones below or something completely differrent?
line 397: php_admin_value engine Off
and

Excellent News.

Yes, of course. Without mod_php any php_* directives have no meaning and are syntax errors.

All PHP Errors now removed, and Virtualmin websites are running nicely.

Thank You

1 Like