CentOS 8 / VirtualMin 6.14 - Adding php_admin_value to httpd.conf when adding new virtual server

Operating system: CentOS Linux release 8.3.2011
VirtualMin Version: 6.14

Hi Everyone,

When we are creating a new virtual server in VirtualMin, the new config isn’t being loaded automatically.

I went digging and found out that there is an error in the httpd.conf file -

httpd -S

AH00526: Syntax error on line 688 of /etc/httpd/conf/httpd.conf:
Invalid command ‘php_admin_value’, perhaps misspelled or defined by a module not included in the server configuration

Checking the httpd.conf file I find this entry on that specific line:

php_admin_value engine Off

So I removed this line, and can successfully restart and the new config takes hold.

However, when you go to add the next virtual server, the same thing happens again and that line mysteriously appears back in the config.

The install is using PHP-FPM and I was reading on other posts that it’s because mod_php is not installed. Is there a way to make that specific entry being added each time. Weird thing is, it only ever applies to a single virtual server entry, not all of them.

Output of httpd -M

httpd -M

Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
access_compat_module (shared)
actions_module (shared)
alias_module (shared)
allowmethods_module (shared)
auth_basic_module (shared)
auth_digest_module (shared)
authn_anon_module (shared)
authn_core_module (shared)
authn_dbd_module (shared)
authn_dbm_module (shared)
authn_file_module (shared)
authn_socache_module (shared)
authz_core_module (shared)
authz_dbd_module (shared)
authz_dbm_module (shared)
authz_groupfile_module (shared)
authz_host_module (shared)
authz_owner_module (shared)
authz_user_module (shared)
autoindex_module (shared)
brotli_module (shared)
cache_module (shared)
cache_disk_module (shared)
cache_socache_module (shared)
data_module (shared)
dbd_module (shared)
deflate_module (shared)
dir_module (shared)
dumpio_module (shared)
echo_module (shared)
env_module (shared)
expires_module (shared)
ext_filter_module (shared)
filter_module (shared)
headers_module (shared)
include_module (shared)
info_module (shared)
log_config_module (shared)
logio_module (shared)
macro_module (shared)
mime_magic_module (shared)
mime_module (shared)
negotiation_module (shared)
remoteip_module (shared)
reqtimeout_module (shared)
request_module (shared)
rewrite_module (shared)
setenvif_module (shared)
slotmem_plain_module (shared)
slotmem_shm_module (shared)
socache_dbm_module (shared)
socache_memcache_module (shared)
socache_shmcb_module (shared)
status_module (shared)
substitute_module (shared)
suexec_module (shared)
unique_id_module (shared)
unixd_module (shared)
userdir_module (shared)
version_module (shared)
vhost_alias_module (shared)
watchdog_module (shared)
dav_module (shared)
dav_fs_module (shared)
dav_lock_module (shared)
lua_module (shared)
mpm_event_module (shared)
proxy_module (shared)
lbmethod_bybusyness_module (shared)
lbmethod_byrequests_module (shared)
lbmethod_bytraffic_module (shared)
lbmethod_heartbeat_module (shared)
proxy_ajp_module (shared)
proxy_balancer_module (shared)
proxy_connect_module (shared)
proxy_express_module (shared)
proxy_fcgi_module (shared)
proxy_fdpass_module (shared)
proxy_ftp_module (shared)
proxy_http_module (shared)
proxy_hcheck_module (shared)
proxy_scgi_module (shared)
proxy_uwsgi_module (shared)
proxy_wstunnel_module (shared)
ssl_module (shared)
systemd_module (shared)
cgid_module (shared)
fcgid_module (shared)
http2_module (shared)
proxy_http2_module (shared)

Grateful for any ideas anyone might have.

Cheers,
Craig Marchant

Virtualmin thinks you have mod_php installed/enabled. Don’t install mod_php.

Was this domain restored from a backup made on an older system that had mod_php enabled? That can also do it.

Hi Joe,

Thanks for the reply.

This is a brand spanking new installation of CentOS 8 and Virtualmin. It was a minimal install of CentOS than I ran the Virtualmin installation routine.

We haven’t installed mod_php at all.

Also this isn’t a restored account, it’s a brand new virtual server.

Cheers,
Craig

OK, then that’s a bug. I don’t understand it, though, as I don’t think I’ve seen it. I’m gonna have to look at the code to figure out how it’s happening, or maybe @Jamie knows off-hand.

Hi Joe,

No worries - happy to throw access to you guys if you want to have a bit of a look around at it?

Cheers,
Craig

If you could just post the offending VirtualHost section, that may be useful. (You can remove any identifying information, like domain name, if you like.)

Can you also post the contents of /etc/webmin/apache/site , which contains the PHP modules Virtualmin thinks are enabled?

Hi Joe / Jamie,

For some reason which I have yet to understand the issue is no longer occurring. Sorry to have wasted your time with this. Merry XMas and a Happy New Year to you all.

Cheers,
Craig

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.