Details Steps given below
Symptoms
When the page is loaded in the web browser, you receive the error, Fatal error: Call to undefined function mysql_connect().
Fix
- Verify that your installation of PHP has been compiled with mysql support. Create a test web page containing
and load it in your browser. Search the page for MySQL. If you don't see it, you need to recompile PHP with MySQL support, or reinstall a PHP package that has it built-in.
- Verify that the line to load the extension in
php.ini
has been uncommented. In Linux, the line isextension=mysql.so
and in Windows, the line isextension=php_mysql.dll
. Uncomment the line by removing the semi-colon. You might also need to configure theextension_dir
variable.
#sudo apt-get install php5-mysql
#sduo apt-get install php5-cgi
4. Then restart the mysql and apache
#sudo /etc/init.d/apache2 restart
#sudo /etc/init.d/mysql restart
1 comment:
genius man!!! but step 3 should be
3. For installing php5-mysql
#sudo apt-get install php5-mysql
#sudo apt-get install php5-cgi
thanks anyway
Post a Comment