[SOLVED] PHP as CGI or/else FCGId doesn't work anymore

6 posts / 0 new
Last post
#1 Wed, 09/09/2015 - 11:00
te-deum

[SOLVED] PHP as CGI or/else FCGId doesn't work anymore

Hello,

I don't know why but since 2 days my server don't work as it should. If I activate PHP as CGI or FCGId then PHP are not parsed and is served as download file with source code. I have to force every Virtual Server to use mod_php. To do so, I commented out every lines with php_admin_value engine Off to re-enable every Virtual Server quickly. But now I have rights problems with apache/php.

I find some thread where they say to deactivcate module php_cgi in Servers -> Apache Webserver -> Click on "Global Configuration" tab -> choose "Configure Apache Modules". But I don't have Configure Apache Modules in Global Configuration tab :-(

Here is my configuration :

  • CentOS Linux 7.1.1503
  • Webmin 1.760
  • Virtualmin 4.18
  • Apache 2.4.6 (CentOS)
  • PHP 5.4.45, 5.5.29 and 5.6.13 from remi repos

Thank you for your help.

Jeff.

Wed, 09/09/2015 - 12:51
andreychek

Howdy,

The PHP version from a third party repository is likely the cause of what you're seeing.

There are some details about that here:

https://www.virtualmin.com/documentation/system/faq#Why_does_PHP_ProFTPd...

Wed, 09/09/2015 - 15:00
te-deum

Hello andreychek,

I am using the remi repos for a long time w/o problem.

The problem appear in the apache error log : [so:warn] [pid 24802] AH01574: module php5_module is already loaded, skipping

This error was not there before !

It appear when I add a new Virtual Server and after I add aliases to this new server. What I did was :

  • Add a new Virtual Server domain.com
  • Add a new alias with
    • Accept mail for domain
    • Setup DNS zone
    • Setup website for domain
  • Add a new alias with
    • Accept mail for domain
    • Setup DNS zone
  • Remove first created alias (with website)
  • Add same alias without website
  • Add 7 more alias with
    • Accept mail for domain
    • Setup DNS zone
  • Problem appear when I try to access any php script

If you have any idea... Thank you.

Wed, 09/09/2015 - 15:07
andreychek

I unfortunately don't know why it worked in the past, but that particular repository is known to cause that particular problem that you are seeing.

If you try performing the steps mentioned in the link above, does that resolve the issue you're seeing?

-Eric

Wed, 09/09/2015 - 16:00
te-deum

Re,

You are right and I am wrong ! I remove 2 files named php.conf and php55-php.conf, I redo my configuration (restore httpd.conf original file) and everything is working :-)

Thank you Eric and sorry for not reading your link first. Jeff.

Wed, 09/09/2015 - 17:45
andreychek

Howdy,

Oh it's no problem, glad to hear it's working now!

It may have something to do with a recent update that was pushed out, Apache restarting, or who knows what... I'm really not sure why it started acting up now and not earlier.

But, it's great that it's working, thanks for letting us know!

-Eric

Topic locked