Strage PHP Issue

Hello, I just did a fresh install of virtualmin on ubuntu 12.04. When i go to create a new virtual server and upload php files ( a copy of client exec) it will not interpet them at all – it just returns a 500 message. However, when I try to call a file like /INSTALL.txt it works just fine. Is there some sort of known php issue like this? Virtualmin says Your system only has PHP version 5 installed, so selecting a different version for each directory is not possible and I am using fcgid.

Thanks.

Howdy,

Take a peek at your Apache error logs, in $HOME/logs/error_log… what errors are being logged there whenever you see the 500 error in your browser?

-Eric

Turns out it was an ioncube loader issue! Thanks Eric.

On another note, does it make sense to somehow remove mod_php and the cgi wrapper (php script executers) from the VPS if all accounts use FCGId? I’m trying to save memory on my 2gb system. If so, how would this be done? Thanks.

I don’t know that I’d change/remove any of the CGI stuff, but you can certainly get rid of mod_php.

You can disable it with this command:

a2dismod php5

Doing so creates the following error when restarting apache2

Syntax error on line 32 of /etc/apache2/sites-enabled/domain.com.conf; Invalid command ‘php_admin_value’, perhaps mispelled or defined by a module not included in the server configuration. Action ‘configttest’ failed.

Howdy,

Nuts! Those are some parameters which require mod_php to be loaded… but aren’t needed unless your sites are configured to use mod_php.

My recommendation is to comment out any line beginning with “php_admin_value”… which will then allow you to remove that module.

-Eric