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
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/

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.