I'm facing this problem since yesterday evening. I have been now over 6 hours on Google, trying to figure out what the solution could be.
I have tried this, setting the timeout on all php.ini files to 300 or unlimited, I have tried setting the buffer of MySQL higher, tried to restart both Apache and MySQL server, ...
Problem: What I'm trying to do, where the error occurs, is to execute a SOAP-command (command is correct) $this -> soap -> executeCommand(new SoapParam($command, 'command'));
, which results in:
"Could not connect to host"
--> if I set define('DB_HOST', '127.0.0.1');
or
Problem 2:
//Warning: mysqli::mysqli() [function.mysqli-mysqli]: (HY000/2003): Can't connect to MySQL server on 'blacktempel.dyndns-home.com' (10060) in C:\Users\NAME\Desktop\Server_09122014\Apache\_Server\htdocs\SOAPRegistration.php on line 109
//Warning: mysqli::close() [function.mysqli-close]: Couldn't fetch mysqli in C:\Users\NAME\Desktop\Server_09122014\Apache\_Server\htdocs\SOAPRegistration.php on line 154
$this -> db = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME, DB_PORT); //Line 109
$this -> db -> close(); //Line 154
"Database connection failed: Can't connect to MySQL server on 'blacktempel.dyndns-home.com' (10060)"
--> if I set define('DB_HOST', 'blacktempel.dyndns-home.com');
.
My firewall is not the problem, I have checked this multiple times.
My hosts file contains this:
# 127.0.0.1 localhost
# ::1 localhost
MyExternalIp blacktempel.dyndns-home.com
SOAP:
define('SOAP_IP', '127.0.0.1');
define('SOAP_PORT', '7878');
MySQL is running on port 3306 and listening. My other defines, such as DB_USER
, DB_PASS
, are correct.
Q: Why won't it work ? What could be wrong ? Is there anything I could possibly have missed ?