Question:

Mysql_connect undefine function?

by  |  earlier

0 LIKES UnLike

Hi,

I am using the following

Apache 2.2

PHP 5.2.6

MySQL Essential 5.0.67

Im using WinXP Pro as the OS.

When ever i try to call any MySQL functions i get a fatal error saying that its a undefined function.

I am aware that PHP5 doesnt have MySQL compiled with it so i have tried the following.

Enabled the extension in php.ini by removing the semicolon.

I have set extension_dir to point to the ext directory. i.e. c:\php5\ext

I have tried cut and pasting libmysql.dll to the system32 folder.

I have also tried cut and pasting the php_mysql.dll to the system32 folder as stated on a website. This didnt work so i put it back in ext where I found it.

I have tried php -m to see what modules are loaded alot of the extensions that i have taken away the semicolon dont seem to be have loaded.

Any ideas?

Thanks in advance.

I also have looked around on the net and have tried the following:

http://www.webmasterworld.com/forum88/4495.htm

 Tags:

   Report

1 ANSWERS


  1. With that version of PHP you might want to use the mysqli (mysql improved) library instead, the functions are more robust and there are some new features. The function calls are all pretty much the same, eg. you'd call mysqli_connect() instead of mysql_connect(). You can enable it by following the same instructions you used to enable mysql in PHP, just make sure you restart the PHP service after you've changed php.ini so the changes get applied!

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.