Having problems moving sites from Plesk environment to Virtualmin GPL env.
I’ve managed to get most things working now, but I get the following error when trying to connect to MySQL with PHP…

Fatal error: Call to undefined function mysql_connect()

When I do a phpinfo() in the virtual server there is no mention of MySQL.

Does this need turning on somewhere in Virtualmin or do have to recompile PHP\Apache.


You definitely don’t need to compile anything, but you may need to install the PHP MySQL module.

You can either do that from the command line using apt-get or yum, or you can do it from within Virtualmin.

If you want to do it in Virtualmin, after logging in, you can click Webmin -> System -> Software Packages. At that point, you can search for the package, then install it.

The package name is probably either php5-mysql or php-mysql, depending on what distro you have.

Great thanks Eric!

Managed to do it through Webmin. It works a treat. I knew it would be simple, but I’m used to setting these things up from the command line rather than a GUI and was struggling find the menu option. Now I’ve found it, there’ll be no stopping me.

Thanks again