First make sure you have configured mysql correctly. You can verify this by checking if you can access mysql using the mysql command promp. Therefore, if you are running mysql, it may not be loading. To do this, follow the steps below.
First of all, you should find your php.ini. It could be anywhere, but if you create a small php file with
<?php phpinfo(); ?>
The script will tell you where it is. Just look at the path of the downloaded configuration file. Common places include /etc/apache/,/etc/php4/apache2/php.ini,/etc/php5/apache2/php.ini or even /usr/local/lib/php.ini for Windows, it could be C: \ Users \ username \ PHP \ php.ini
Edit the php.ini servers and find the following line. Delete '; from the beginning of the line and restart Apache. Now everything should be fine!
should become
extension=mysql.so
For windows, it will be
should become
extension=mysql.dll
source share