mod_php missing from options, but it is loaded

Hi All,
I spent some time trawling through the code to figure out why mod_php wasn’t appearing in the list of site php options. I only had FCGId and CGI. Eventually I found the modules line in:-
which was missing mod_php5, adding it made it appear in the list. I couldn’t find the code that generated this list in the first place, so I’m worried it’ll go missing again. The mod_php5 is definitely loaded properly in apache as “httpd -M” shows it.

Any ideas why I’ve had this problem?


I was right, whatever generates that line has wiped my edit :frowning: But I can’t for the life of me find the code that generates it… I’ve a competent Perl developer, if you would point me to the file that generates that file I’ll be able to figure out what the problem is…


Bump… This is still an issue for me. Please could one of the Virtualmin team let me know how the list of apache modules is generated in:-
I could spend hours trawling though the code, a pointer please :frowning:


I hadn’t actually heard of anything like that occurring before… it’s usually pretty good at figuring out which options are available.

Which distro are you using? And are you using the standard Apache/mod_php packages for that distro?

It should work even if you aren’t using the standard version, but it’s possible you ran into an untested edge-case that needs fixed :slight_smile:


I’m using CentOS 5.5, all up to date, the default rpms… If you could just point me to the Perl code that does the detecting then I’ll be able to hack a little and figure out what’s going on. Got the same running on another server and… after just checking, it now has the same problem… I’m sure it didn’t before, so this must be since I updated to the latest CentOS/Virtualmin… In other words it may well be an issue that’s coming in now… Weren’t changes made to the php stuff in one of the last virtualmin updates?

It’s a bug in VirtualMin, it’s not picking up the apache loadmodule directives when they are like this:-

PHP is an HTML-embedded scripting language which attempts to make it

easy for developers to write dynamically generated webpages.

LoadModule php5_module modules/ # Use of the "ZTS" build with worker is experimental, and no shared # modules are supported. LoadModule php5_module modules/

Cause the PHP interpreter to handle files with a .php extension.

AddHandler php5-script .php
AddType text/html .php

Add index.php to the list of files that will be served as directory


DirectoryIndex index.php

Uncomment the following line to allow PHP to pretty-print .phps

files as PHP source code:

#AddType application/x-httpd-php-source .phps


Ahh, so it’s not catching them if it’s in the “IfModule” block. Interesting! :slight_smile:

My suggestion would be to file a bug report… you can do that using the Support link above. After doing that, Jamie will follow up with you regarding that as he looks into the issue.

Once he gets the issue is corrected, feel free to ask for a patch so that you can get your system fixed without needing to wait for the next release.