Jump to content

At my wits end .... Connecting MYSQL to PHP


phpcoder121

Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/194091-at-my-wits-end-connecting-mysql-to-php/
Share on other sites

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/

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.