PacFox Posted December 14, 2009 Report Share Posted December 14, 2009 I tried out the latest version (Nano-5.5) of Uniform Server and found that it would timeout while trying to connect to anything using MySQL other than phpMyAdmin in the admin panel. After much fiddling around I was able to pinpoint the problem down to PHP 5.3.1 after I switched it with PHP 5.3.0 from Nano-5.1 and found I could connect again. I've only tested on Windows 7 (I use the Professional x64 version) so I don't know if it happens on other OSs. This is the code that I used to test (works with 5.3.0, timeout on 5.3.1):<?php error_reporting(0); $connect = mysql_connect("localhost", "root", "root"); $connect; echo "Connection was "; if (!$connect) { echo "not"; } echo " successful."; ?> Quote Link to comment Share on other sites More sharing options...
SnowyOwl Posted January 20, 2010 Report Share Posted January 20, 2010 A useful post, thank you. I was finding the same problem using Windows 7 (64-bit) Home Premium and Nano-5.5. I switched to Nano-5.1 and I can now connect to MySQL using php. I have found that in Nano-5.1 the 'Server Status' component of the control panel does not work however because LIBEAY32.dll is missing. Quote Link to comment Share on other sites More sharing options...
Ric Posted January 20, 2010 Report Share Posted January 20, 2010 There is a bug in 5.3.1 PhpMyAdmin works because it uses 127.0.0.1 instead of localhost it also uses extension mysqli I think the bug ignores localhost and tries to connect to the MySQL server using IPV6. Change your test code to<?php error_reporting(0); $connect = mysql_connect("127.0.0.1:3306", "root", "root"); $connect; echo "Connection was "; if (!$connect) { echo "not"; } echo " successful."; ?>Just wondering it that works. I would be interested to see if 5.6 beta works? It uses 5.3.2RC1, which may have fixed this bug. All the bestRic Quote Link to comment Share on other sites More sharing options...
PacFox Posted February 13, 2010 Author Report Share Posted February 13, 2010 I have tried changing localhost to 127.0.0.1 and it does indeed work. On the subject of it being a PHP bug I've found this and this suggesting it's not going to be fixed. Quote Link to comment 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.