MySQL Support in PHP5 how to enable Ubuntu

1 post / 0 new
#1 Wed, 10/03/2007 - 20:44
linesdrawn

MySQL Support in PHP5 how to enable Ubuntu

If you want to enable MySQL support in PHP5 in Ubuntu follow along...

SSH into your server and type this:

dpkg-query -l > packages.txt

View your newly created file "packages.txt" in your favorite editor, I like to use an FTP server then move it to my local computer for easer viewing. Look for "php4-mysql" and "php5-mysql" assuming your setup was like mine you are missing php5-mysql.

So lets install it with: [code:1] apt-get install php5-mysql [/code:1]

Edit your php.ini file at /etc/php5/apache2/php.ini Look for [code:1] ;extension=mysql.so [/code:1] and change it to [code:1] extension=mysql.so [/code:1] notice no ; in the above thus enabling it.

Log into Virtualmin and relaunch Apache, I had to REBOOT my machine for the changes to take effect.

In your apache root directory drop this phpinfo.php file in [code:1] <?php

phpinfo();

?> [/code:1]

Then view the above at http://yourdomain/phpinfo.php and look for mysql in the list.

Cheers,