December 14, 200916 yr comment_7963 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."; ?> Report
January 20, 201016 yr comment_8060 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. Report
January 20, 201016 yr comment_8061 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 Report
February 13, 201016 yr Author comment_8123 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. Report
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.