Since most know CentOS ships with PHP 5.3.3, sadly, some of my software does not support this anymore and require at least 5.4, even while RHEL is backporting security fixes, I can’t use this version anymore for some softwares.
Now, on this machine I don’t need FCGI since its only my own websites and sure DSO works fine for and I prefer to handle one general PHP, if you google there are instructions on how to replace the default PHP version globally on the server and its easy, but the problem is that its not from a known repository. You are replacing the packages with a third party from a blog. To be honest I don’t feel comfortable by replacing rpm with non official CentOS repositories.
So the only solution even suggested by Virtualmin developers on its documentation and this forum is to change to FCGI and install an alternative php version, then change that account to use that version. Not exactly what I want but fine, it works, I can run now another PHP version but there seems to be some serious bugs in how Virtualmin is handling this FCGI.
Of course now my default php.ini is useless and I need to edit the ones directly on the virtual account, it seems for some reason Virtualmin created 2 directories
I assume the first one is just a copy from the global one /etc/php.d, since when I load a PHP file on the account its actually using the second one, sure, since I want to run PHP 5.4 and this is what I have setup.
So far all fine, except this PHP is not complete with all required modules in my case. Example, its missing mycrypt which is very important. If I go to the Website Options even Virtualmin shows the PHP5 modules and the PHP5.4 modules loaded on each version and there is a difference.
In PHP 5.4 mcrypt for example is missing, since I remember this actually does not come with Virtualmin and I installed this on the server setup. Now, this is not he only module missing, but it seems this custom PHP does not want to load modules even when I tell it to do so. Example, if I install xcache, it shows fine and installed and working on the default PHP version 5.3.3, but again it does not want to load in my custom php 5.4
Ok, so lets see, the additional .ini files in this case are loaded from:
So I put there the same ini file the default PHP version has
Does it work? No.
It just will not load up mcrypt. Ok, maybe this PHP version needs to load its extension from its own directory, right? Indeed, the modules for PHP5.4 seems to be here instead:
This is what the PHP information is telling me at least. Now I copy a module from the default location to
Now it should load the module fine right? No, again it does nothing. It loads fine other modules in there like curl, fileinfo, gd, etc.
So why in the world does it not want to load any module I put there like xcache, or mycrypt, etc?
If this is the solution Virtualmin is suggesting for people that need to use a newer PHP version then its messy and its not working. I don’t want to run anything fancy, php 5.3 is very old already and even popular scripts are dropping support in the next coming weeks, its not like we have a choice right now, if Virtualmin would update PHP from its own repository at least this mess could be avoided, if not, and they are suggesting to use alternative PHP versions per account, should there not be at least basic instruction on how to make it work correctly with modules?
I have other servers and in the case of cPanel you can just custom build anything you want with Easy Apache, even if you run other PHP versions side by side, I never had problems putting modules on it, now I’m don’t expect an Easy Apache builder but I don’t know why Virtualmin is maintain its own repository if they are just going to copy and use the same RHEL/CENTOS is shipping with anything new added to it, they should just use the CentOS repository instead. But in the case of Virtualmin it seems there is a serious issue on how its handling this alternative PHP version. Its mostly useless if you cannot make use of a basic PHP module.
There are no errors at all. It even shows its loading the php ini in PHP but the modules are not loaded with PHP.