BMD Posted July 8, 2011 Share Posted July 8, 2011 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] Quote Link to comment https://forums.phpfreaks.com/topic/241413-mysql_connect-fatal-error/ Share on other sites More sharing options...
fenway Posted July 8, 2011 Share Posted July 8, 2011 There's a sticky in the configuration child board about this. Quote Link to comment https://forums.phpfreaks.com/topic/241413-mysql_connect-fatal-error/#findComment-1240094 Share on other sites More sharing options...
BMD Posted July 8, 2011 Author Share Posted July 8, 2011 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). Quote Link to comment https://forums.phpfreaks.com/topic/241413-mysql_connect-fatal-error/#findComment-1240121 Share on other sites More sharing options...
fenway Posted July 11, 2011 Share Posted July 11, 2011 I missed that too -- but I'm not the expert on PHP configurations. Quote Link to comment https://forums.phpfreaks.com/topic/241413-mysql_connect-fatal-error/#findComment-1241309 Share on other sites More sharing options...
PFMaBiSmAd Posted July 11, 2011 Share Posted July 11, 2011 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. Quote Link to comment https://forums.phpfreaks.com/topic/241413-mysql_connect-fatal-error/#findComment-1241313 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.