Under status in ISPConfig it says that my web and mysql server are offline. But everything is working fine so why should ISPConfig say they are offline?
What could be the reason for that? I followed this guide when I created the server: http://www.howtoforge.com/perfect-server-debian-wheezy-apache2-bind-dovecot-ispconfig-3-p4
Maybe you changed the servers to listen on the external IP only. In the guide, they listen on all IP's. you can see that e.g. with: netstat -tap
are you able to connect to mysql with both commands: mysql -h localhost -u root -p and mysql -j 127.0.0.1 -u root -p
I seem to have found the error. In the host file it said: ::1 localhost And I changed that too: 127.0.0.1 localhost But I haven't changed the host file before so it was as standard like that. And wouldn't your commands have failed with a error in the host file?
Normally yes. But it might be that the mysql command contains some workarounds or fallbacks for broken hosts files while the php socket functions do not have such workarounds.