mysql problem with ubuntu 10.4 LTS

I have a fresh ubuntu 10.4 LTS install on my vps on to which I installed virtualmin gpl via the script.

The problem is that I cannot access mysql via php.

Mysql is running, and I have set up a test table on a virtualmin server I created, then wrote a test script to call mysql_get_server_info() as I had no joy with mysql_connect(x,x,x);
I checked the apache error logs and they read:

Call to undefined function mysql_connect()

I searched the forum and online and the information I read seemed to suggest that php5-mysql was not there.

I installed it via apt-get and after a reboot the problem seems to have been solved.

Howdy,

Yup, installing php5-mysql should indeed fix that problem you saw.

You can see all the PHP modules available to you in the Ubuntu repository by typing this command:

dpkg -l ‘php5*’

You shouldn’t need to reboot after installing any of those though, you could restart Apache with this command:

/etc/init.d/apache2 restart