Go2Linux | Linux Operating System

A site dedicated to: Linux Operating System

HOWTO Fix Fatal error: Call to undefined function: mysql_connect()

Date: 2007-02-04 00:00:00 -0400

Hi, I want to share this with all of you, today my server suddenly start showing this.

Fatal error: Call to undefined function: mysql_connect()

What I had to do is

First,

apt-get install php4-mysql

after that

dpkg-reconfigure php4-mysql

Edit: 12/15/2010

You may want to run instead of the above commands:

apt-get install php5-mysql

and

dpkg-reconfigure php5-mysql

If you want to use php5 instead of php4.

-------------------------- Then you can continue ----------

and finaly.

/etc/init.d/mysql restart

and.

/etc/init.d/apache2 restart

I don't know why if it was working before, suddenly stop working, my PHP application (like this one) but it did.

If you liked this article please share it.

powered by TinyLetter

If you want to contact me in any other way, please use the contact page.