phpcoder121 Posted March 4, 2010 Share Posted March 4, 2010 To begin let me tell you that I am running on Windows Home Premium 64bit; I have installed and reinstalled PHP, Apache, and Mysql numerous times ( between 5-10) and I have looked at many different tutorials and methods of how to install all three. Well, I have gotten to the point where I have successfully installed Apache andconfigured it with PHP. And, I have installed Mysql and it runs (I checked it thorugh the command prompt, etc). ** note ** I have installed all 32 bit versions, apache 32 bit and php 32 bit with mySql 64bit, and now I am trying all three 64bit. However, when I make a page with the code below I get an error page. As you will see from the screenshots I have my extensions working, msql working, etc. Everything should be insync; sadly, thats not the case. ** one more note ** I have put the libmysql.dll file in the windows directory, put the php path into my environmental variables, etc. Here are the screenshots of my issue. http://img218.imageshack.us/img218/804/phpinfotop.png http://img37.imageshack.us/img37/6122/phpinfomysqlapache.png http://img197.imageshack.us/img197/9356/dbtestpageerrormysql.png http://img85.imageshack.us/img85/6903/mysqlworkingproof.png <?php $con = mysql_connect("localhost","root","root"); if (!$con) { die('Could not connect: ' . mysql_error()); } // some code ?> By the way I usd all zip files, no MSI installeers. But I dont think that matters. DOes anyone have any idea how I can solve this extremel hair-pulling nusance? Quote Link to comment https://forums.phpfreaks.com/topic/194091-at-my-wits-end-connecting-mysql-to-php/ Share on other sites More sharing options...
trq Posted March 4, 2010 Share Posted March 4, 2010 Have you enabled the mysql extension within your php ini? Also, in your browser, trun off 'show friendly error messages'. The error your getting isn't exactly helpful. Quote Link to comment https://forums.phpfreaks.com/topic/194091-at-my-wits-end-connecting-mysql-to-php/#findComment-1021247 Share on other sites More sharing options...
phpcoder121 Posted March 4, 2010 Author Share Posted March 4, 2010 Yes I have enabled the extensions on my php.ini, isnt that why the Msql module shows up in the phpinfo page? I did turn it off and restarted my browser still get this error...... http://img689.imageshack.us/img689/3341/dbtestnofriendly.png just downloaded google chrome and it gave me some error that may be more helpful. Here is screenshot http://img237.imageshack.us/i/chromeerror.png/ Quote Link to comment https://forums.phpfreaks.com/topic/194091-at-my-wits-end-connecting-mysql-to-php/#findComment-1021250 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.