Author: Edward HardinReference Number: AA-00717Views: 11978Last Updated: 05/30/2012 05:03 PM
0 Rating/ Voters
You can use either mysqli or pdo_mysql PHP extension for connecting to the MySQL server. The instructions are simple, as follows.
Recommendation
We strongly recommend to use mysqli extension because pdo_mysql has some unresolved issues at the moment.
mysqli
The php_mysqli.so extension must be enabled inside of php.ini. In order to do this you need to find the php.ini file (typically located in /etc/php5/cgi/), and make sure you remove the comment (semi-colon) from the start of the line:
extension=mysqli.so
Then you need to save the php.ini and restart the Apache.
pdo_mysql
PDO and PDO MySQL extensions must be enabled inside of php.ini. In order to do this you need to find the php.ini file (typically located in /etc/php5/cgi/), and make sure you remove the comment (semi-colon) from the start of the line:
extension=pdo.so
extension=pdo_mysql.so
Then you need to save the php.ini and restart the Apache.