Welcome to CyberPK - IT, Web, Gaming and Anime discussions. Mark forums read | View Forum Leaders
CyberPK - IT, Web, Gaming and Anime discussions.
eBloggy.net - IT, Internet & Web Blogger

Naruto Anime/Manga Discussions


Reply
Thread Tools Display Modes
MYSQL Error - Call to undefined function mysql_connect()
 
  #1  
Old 08-08-2009, 09:39 PM
phpFreak phpFreak is offline
Newbie
 
Join Date: Aug 2009
Posts: 8
Unhappy MYSQL Error - Call to undefined function mysql_connect()

Hi and Salam

i am beginner learning php and when i try to install it on my windows xp system i get this error

Call to undefined function mysql_pconnect()

I don't understand What is the problem????

i install apache 1.3 / php 5 / mysql 5

any help is appreciated
Reply With Quote
  #2  
Old 08-08-2009, 11:07 PM
zubair's Avatar
zubair zubair is offline
Administrator
 
Join Date: May 2009
Posts: 88
Default

Hi phpFreak,

You can try following the below steps and I'm sure it work out.
  • Make sure that you have a valid php.ini in your windows directory.

  • Try to copy libmysql.dll to the system32 directory (php_mysql.dll would not load without doing this).

  • Set the extension_dir in php.ini to the ext directory of your PHP installation directory (like e.g. extension_dir=C:\php5\ext)

  • Enable the MySQL extension in php.ini by uncommenting the line extension=php_mysql.dll.

  • In the end Restart The Apache Server.
PHP 5 doesn't come with MySQL Support Enabled By Default you have to enable this manually and that might be the cause you were getting the error, because PHP wasn't able to find the mysql libraries required to load MySQL Support.

Cheers :-)
__________________
Reply With Quote
  #3  
Old 08-10-2009, 09:59 PM
phpFreak phpFreak is offline
Newbie
 
Join Date: Aug 2009
Posts: 8
Default

Quote:
Originally Posted by zubair View Post
Hi phpFreak,

You can try following the below steps and I'm sure it work out.
  • Make sure that you have a valid php.ini in your windows directory.

  • Try to copy libmysql.dll to the system32 directory (php_mysql.dll would not load without doing this).

  • Set the extension_dir in php.ini to the ext directory of your PHP installation directory (like e.g. extension_dir=C:\php5\ext)

  • Enable the MySQL extension in php.ini by uncommenting the line extension=php_mysql.dll.

  • In the end Restart The Apache Server.
PHP 5 doesn't come with MySQL Support Enabled By Default you have to enable this manually and that might be the cause you were getting the error, because PHP wasn't able to find the mysql libraries required to load MySQL Support.

Cheers :-)
jazak-allah zubair

it worked after i put my php.ini file to the windows directory
Reply With Quote
Reply

Bookmarks

Tags
apache, error, mysql, php, programming

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump

Loading...


 

All times are GMT +5. The time now is 03:38 AM.

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36