proggR Posted August 22, 2008 Share Posted August 22, 2008 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 Quote Link to comment Share on other sites More sharing options...
akitchin Posted August 22, 2008 Share Posted August 22, 2008 have a look at this thread: http://www.phpfreaks.com/forums/index.php/topic,95378.0.html Quote Link to comment Share on other sites More sharing options...
proggR Posted August 23, 2008 Author Share Posted August 23, 2008 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? Quote Link to comment Share on other sites More sharing options...
akitchin Posted August 23, 2008 Share Posted August 23, 2008 you should be able to find it - look in the php downloads section, or in the manual under "extensions." there's usually a repository with the most current versions. Quote Link to comment Share on other sites More sharing options...
proggR Posted August 23, 2008 Author Share Posted August 23, 2008 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. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted August 23, 2008 Share Posted August 23, 2008 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.