Jump to content

mysql_connect() fatal error


BMD

Recommended Posts

I know this has been asked probably a bazillion times but after asking on Freenode's PHP channel and reading past threads from this site I still can't get this to work.

 

Basically, following: http://www.bicubica.com/apache-php-mysql/index.php, I installed MySQL 5.5 in attempt to get it to run alongside PHP 5.3.5 in an Apache server. Running the MySQL test they had seemed to produce no errors so MySQL is installed correctly. As per title, I'm getting an error when trying to run a MySQL script that returns an error stating: "Fatal error: Call to undefined function mysql_connect() in [dir] on line [#]". I've uncommented everything in my php.ini file and such, added the path of my PHP folder to the windows path variable, set my directories (PHP is installed at C:\php, meaning the extensions are in C:\php\ext) but nothing seems to be working in my favour. I've copied libmysql.dll in the ext folder and Windows folder and nothing seems to get rid of this error.

 

For information's sake, when I execute phpinfo() I don't get any subheadings with anything about MySQL, only something called mysqlnd. Did I forget something during the installation of PHP?

 

Anyway, my php.ini file is attatched in text form. The MySQL script I'm trying to run is specified on the previously mentioned page with "define("MYSQL_PASS", "password");" changed to replace "password" with the password I inputted (which I'm 99.99% sure I put in correctly).

 

Help! :(

 

[attachment deleted by admin]

Link to comment
Share on other sites

Should've mentioned "reading past threads from this site" meant that thread too. If you looked in my php.ini file and read my summary + compared to said sticky you'd notice the steps have been taken (at least I think, which is the purpose of this thread).

Link to comment
Share on other sites

How did you obtain and install PHP?

 

If you used the .msi installer package, you must use the Windows control panel add/remove menu to enable php language extensions.

 

If you manually installed php from the .zip package, you need to make sure that the php.ini that you are changing is the one that php is using. The phpinfo() output Loaded Configuration File is the php.ini that php is using.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.