Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have updated my php version from php 5.0 to 5.3 and it started showing me this error

PHP Fatal error:  Call to undefined function mysql_pconnect() in

I need your help guyz please suggest me what to do.

I have also uncomment in my php ini file in


I am using Linux

share|improve this question

migrated from Apr 14 '12 at 11:58

This question came from our site for professional and enthusiast programmers.

What does your phpinfo() return? Does it include info about MySQL? Server restarted? – cfedermann Apr 14 '12 at 10:58
my PHP says '--without-mysql' i have restarted my server – Huzoor Bux Apr 14 '12 at 11:16
up vote 2 down vote accepted


I would recommend you use mysqli ( ) which is an improved version of mysql

Quick Fix

Full Details of all possible reason available at

Let me know if you need more assitance

Last Resort

Re install PHP53

Remove the 5.1.x PHP Packages:

 yum remove php php-*

Remove the 5.3.x PHP Packages:

 yum remove php php53-*

Install PHP5.3

yum install php53-cli
yum install php53-common
yum install php53-devel (If you need development support)
yum install php53-gd
yum install php53-mbstring
yum install php53-mysql
yum install php53-soap
yum install php53-xml
yum install php53-xmlrpc
yum install php53-bcmath
yum install php53-snmp

Restart Apache

Service httpd restart 

yum search

share|improve this answer
I am using centos its about redhat and i have check all steps given on somacon but didn't got sucess :( – Huzoor Bux Apr 14 '12 at 11:19
Ok .. i'll update my answer for another option – Baba Apr 14 '12 at 11:23
Thanks @Baba i am waiting... – Huzoor Bux Apr 14 '12 at 11:26

This problem appears because the MySQL module is not active into your PHP installation or because the MySQL module was not compiled with permanent connections support.

In the first case you should check that the php_mysql module is enabled into the php.ini file and if not, uncomment the line which enable this module. If you are running your PHP on Linux you have to compile this module first. (--with-mysql=shared)

share|improve this answer
What is the complete command to compile mysql shared. – Huzoor Bux Apr 14 '12 at 11:23

try to uncomment this lines and restart your server

extension = php_pdo.dll
extension = php_mysql.dll
extension = php_mysqli.dll
extension = php_pdo_mysql.dll
share|improve this answer
Thanks for your reply but i am using linux not windows. – Huzoor Bux Apr 14 '12 at 11:20

Please Enable 2 extensions in your php.ini


and please check libmySQL.dll in your php directory.

share|improve this answer
Thanks for your reply but i am using linux not windows. – Huzoor Bux Apr 14 '12 at 11:25
same for linux too dude – VIPIN JAIN Apr 14 '12 at 11:26
linux also have directories – VIPIN JAIN Apr 14 '12 at 11:27
i didn't find any dll file in my server which you are saying.. – Huzoor Bux Apr 14 '12 at 11:36
oh Sorry i forgot 1 thing dll r not in linux :D please go to: – VIPIN JAIN Apr 14 '12 at 12:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.