Re: [PHP-DB] Connecting PHP to MySQL on Windows - RESOLVED

2011-01-10 Thread michael manning
Hi, Thanks to everyone who assisted me. Removing the line: ::1 localhost from the c:\windows\system32\drivers\etc\hosts file did the trick and allowed me to access MySQL databases without any problems. I confirmed this was the correct solution by re-adding the line and seeing it fail again,

Re: [PHP-DB] Connecting PHP to MySQL on Windows

2011-01-07 Thread Daniel Brown
On Fri, Jan 7, 2011 at 15:06, Gavin Chalkley wrote: > Mike, > > A plain HOST file should have the commented part at the top, and only 1 > reference to localhost unless you are creating Virtual hosts. > > I would suggest removing the "::1" line As long as he never plans to use IPv6 on there, t

Re: [PHP-DB] Connecting PHP to MySQL on Windows

2011-01-07 Thread Gavin Chalkley
Mike, A plain HOST file should have the commented part at the top, and only 1 reference to localhost unless you are creating Virtual hosts. I would suggest removing the "::1" line BR Gavin On Fri, Jan 7, 2011 at 4:18 AM, michael manning wrote: > Hi, > > I swapped out 'localhost" for '127.0.0.

Re: [PHP-DB] Connecting PHP to MySQL on Windows

2011-01-06 Thread michael manning
Hi, I swapped out 'localhost" for '127.0.0.1' in the url but this had no effect. I had a look at my hosts file at c:\windows\system32\drivers\etc and this contained: # Copyright (c) 1993-2006 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file cont

Re: [PHP-DB] Connecting PHP to MySQL on Windows

2011-01-06 Thread Daniel Brown
On Thu, Jan 6, 2011 at 21:12, michael manning wrote: > Hi Daniel, > When testing with the CLI, netstat shows: [snip!] What happens when you swap out 'localhost' for '127.0.0.1' in the connection routine? If that works, check to make sure your hosts file properly designates 127.0.0.1 as 'loca

Re: [PHP-DB] Connecting PHP to MySQL on Windows

2011-01-06 Thread michael manning
Hi Daniel, When testing with the CLI, netstat shows: = C:\Users\mmanning>netstat -b Active Connections Proto Local Address Foreign AddressState TCP127.0.0.1:80 mmanning-PC:49391 ESTABLISHED [httpd.exe] TCP127.0.0.1:3306 mmanning-PC:

Re: [PHP-DB] Connecting PHP to MySQL on Windows

2011-01-06 Thread Daniel Brown
On Thu, Jan 6, 2011 at 01:13, michael manning wrote: > Hi, > > I have installed MySQL 5.1.52, Apache 2.2.15 and PHP 5.3.2 on my Windows > Vista computer. > The MySQL works fine with the command line client and I have tested the > Apache and PHP and it appears fine when I test this with the phpinfo

[PHP-DB] Connecting PHP to MySQL on Windows

2011-01-05 Thread michael manning
Hi, I have installed MySQL 5.1.52, Apache 2.2.15 and PHP 5.3.2 on my Windows Vista computer. The MySQL works fine with the command line client and I have tested the Apache and PHP and it appears fine when I test this with the phpinfo() function. There is just one exception - I cannot connect to a