Jump to content

Fatal Error Using Database


proggR

Recommended Posts

I tried to start scripting the page that will update my database today and when I do I get the error:

Fatal error: Call to undefined function mysql_connect() in E:\Program Files\Apache Group\Apache2\htdocs\updateDB.php on line 35

I've been looking around for a way to fix it but haven't been able to. I read about uncommenting ;extension=php_mysql.dll in the php.ini file but I don't seem to even have that in there. php_info() shows the MySQL installation in the PATH. I'm kinda stuck. I know that it must not be "turned on" somewhere otherwise it would know its a function. Any help would be great. Thanks :)

 

Link to comment
Share on other sites

Thanks. That's a lot more information than I've found elsewhere. But I don't seem to have a file named php_mysql.dll on my computer to point it to as an extension in my php.ini file. I've changed the extension_dir path and restarted the server as per the instructions given but still no luck. I installed MySQL after PHP so there shouldn't be any conflicts with older files/software. Is there anyway I could just download the the php_mysql.dll file from somewhere and if I can where would I be placing it?

Link to comment
Share on other sites

Ok I have the file. Its actually pretty small (15kb). Where would I put it? Just in my \PHP folder? I know that article you cited said something about C:\PHP\ext but I don't have an ext folder in my PHP directory.

Link to comment
Share on other sites

If you don't have an ext folder or the .dll files, it means your php installation is not complete (probably because you used the php .msi installer package and you are supposed to use the Windows control panel add/remove to add the mysql extension.)

 

Trying to make this work piece by piece (adding folders, adding files - there is more than just the php_mysql.dll that is needed for the mysql extension) will take the most time and the most effort.

 

Unfortunately, that link provided is not up to date. There is a more up to date post (somewhere in the installation and/or WAMP forum) that concisely lists the current recommended steps to install php manually using the full .zip package and that will allow the mysql extension (and any other extension) to be enabled by simply uncommenting the line in php.ini and stopping and starting the web server.

 

Edit: Here is the link: http://www.phpfreaks.com/forums/index.php/topic,189883.0.html

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.