Restore From CentOS 5 to Cent OS 6 & PHP Module Issues

It appears that when restoring a backup from a CentOS5 x86 machine to a CentOS6 x64 machine, the old values for extension_dir are used in the php.ini file (same version of PHP, as far as I know).

In a default install of CentOS6 x64, the PHP modules are stored in a different location.

/usr/lib64/php/modules/ (x64) vs. /usr/lib/php/modules/ (x86)

I'm not sure if this is just something folks should be aware of when doing such a transfer, or if the restore script should be warning and/or adjusting the php.ini file to correct the issue.

Caveat: I do not know if the issue exists from CentOS5 to CentOS6 when using the same architecture, but I did find a blog post of someone discussing it happening in that situation, too.



Virtualmin actually has code that should handle this, by changing the lib in the extension_dir path to lib64 . However, this is only triggered if the old directory /usr/lib/php/modules doesn't exist on the new system, and if the PHP execution mode for the domain is set to CGI or FastCGI..