Submitted by pcfreak30 on Thu, 04/24/2014 - 18:40
It seems that when a server is on FCGID on centos. it doesnt remove the mod_php php_admin_value directives, causing a configuration check to fail.
I used the transfer server feature between a ubuntu box and a centos box. I disabled the web feature on the server and also switch from fcgid to mod_php and back. It doesn't seem to remove the statements.
Thanks.
Status:
Active
Comments
Submitted by JamieCameron on Thu, 04/24/2014 - 19:25 Comment #1
Does the system on which the config check is failing have mod_php disabled in Apache?
Submitted by pcfreak30 on Thu, 04/24/2014 - 22:21 Comment #2
If it does, its a stock setting as I did not change the modules.
Also why are the apache2 module selection not available on centos?
Submitted by JamieCameron on Fri, 04/25/2014 - 17:13 Comment #3
A stock install should support mod_php by default ... what config check error message are you getting?
Submitted by pcfreak30 on Fri, 04/25/2014 - 17:15 Comment #4
service httpd start
the php_admin_value stay even if fcgid is used.
Submitted by andreychek on Fri, 04/25/2014 - 18:01 Comment #5
That's actually normal for those directives to remain -- that's normally only a problem if mod_php is removed entirely from Apache.
Was mod_php removed in this particular case?
Submitted by pcfreak30 on Fri, 04/25/2014 - 18:03 Comment #6
It was never removed or added. It was a stock CentOS install and the module settings werent changed.
Submitted by andreychek on Fri, 04/25/2014 - 18:33 Comment #7
Hmm, what is the output of these two commands:
rpm -qa | grep php-5
cat /etc/httpd/conf.d/php.conf
Submitted by pcfreak30 on Fri, 04/25/2014 - 18:36 Comment #8
http://pastie.org/private/dilh3mwsdkswwnsxeyfg
I had to use the remi repo to get php 5.4.
Submitted by andreychek on Fri, 04/25/2014 - 18:58 Comment #9
Ah, you don't appear to have a stock/default CentOS installation there.
I suspect the third party PHP version that's installed is causing the issue you're seeing, as that doesn't occur normally.
If you don't need mod_php, what you could do is comment out the contents of that php.conf file, as well as comment out the existing "php_admin_value" values in the Apache config, then restart Apache.
Once you do that, Virtualmin will stop adding additional php_admin_value lines.
Submitted by pcfreak30 on Fri, 04/25/2014 - 19:00 Comment #10
Actually it happened before I switched php versions. I am using the centos 6 x64 template from openvz.org, so you may should test it yourself.
Submitted by pcfreak30 on Fri, 01/16/2015 - 01:13 Comment #11
Just to update, I created a new openvz box recently.
Stopping httpd: [ OK ]
Starting httpd: Syntax error on line 1045 of /etc/httpd/conf/httpd.conf:
Invalid command 'php_admin_value', perhaps misspelled or defined by a module not included in the server configuration
This is a stock issue on CENTOS/RHEL 6 that needs fixing.
Submitted by pcfreak30 on Fri, 01/16/2015 - 01:56 Comment #12
It seems I also had to run
to force mod_php to disable as it was overriding fcgid?
I think this needs to be looked at further.
Submitted by andreychek on Fri, 01/16/2015 - 09:48 Comment #13
Regarding mod_php overriding other PHP execution modes -- are you by chance using a third party PHP version at the moment?
Unfortunately, the issue you're seeing there is a known issue when using PHP from a third party repository. Third party PHP versions can setup a config that causes mod_php to override other PHP Execution Modes.
We actually have some documentation about there here in the section titled "Why does PHP / ProFTPd no longer work after performing updates? (I'm using CentOS, and enabled third party repositories)":
https://www.virtualmin.com/documentation/system/faq
As far as the issue you mentioned above, when commenting out the prefork mode -- mod_php can't load when using the Apache prefork mode, as Apache doesn't support mod_php in worker mode.
When switching to Apache's worker mode, you would need to comment out the various "php_admin_value" options.
I'd be curious what the output of this command on your server is:
rpm -qa | grep php
Submitted by pcfreak30 on Fri, 01/16/2015 - 19:48 Comment #14
No I am not. I use stock rpm's.
And if your not on prefork mode, virtualmin should check that and not use mod_php statements. Heck virtualmin should allow you to change execution modes..
Submitted by pcfreak30 on Mon, 02/08/2016 - 17:42 Comment #15
this has happened again. on CentOS 7.
I found
/etc/httpd/conf.modules.d/10-php.conf
hasI have the event mpm running.