Solved "PHP Fatal error: Call to undefined function mysql_connect()"

Took me a while to understand what the issues was.

Installed LAMP on Ubuntu 12.04 through

sudo apt-get install lamp-server^

After all was done, I tried running an application which was making mysql connection. The following was reported

PHP Fatal error:  Call to undefined function mysql_connect()

Checked phpinfo() output to find that mysql was not there.

Checked /etc/php/apache2/php.ini

Mysql extension was not being loaded. Added line, to no avail

Finally, found that php5 itself was not installed.

Went to Ubuntu software center. Installed php5, and Bingo!, mysql worked.


Popular posts from this blog

504 Gateway Timeout on Amazon AWS ELB (Elastic Load Balancer)

AWS RDS incompatible-parameters solved

Sone ke gahno ki Bangalore mein adla badli (exchange)