Strange Connect Problem with PHP

From: Date: Thu, 10 Apr 2003 10:29:02 +0000
Subject: Strange Connect Problem with PHP
Groups: php.general 
Request: Send a blank email to php-general+get-143306@lists.php.net to get a copy of this message
Dear List, i am exploring a strange problem regarding php and mysql. Thats my config: two machines, one is running apache 1.3.27 with php 4.3.0 and one is running mysql 3.23.55. i am using this command to connect to the mysql server: $db=mysql_connect("111.111.111.112:3306","abcd","1234abc") or die("cant connect"); Most of the times everything is fine, but sometimes the connection cant be established. i found this strange error in the logfile: [Thu Apr 10 12:22:49 2003] [error] PHP Warning: mysql_pconnect() [<a href='http://www.php.net/function.mysql-pconnect'>function.mysql-pconnect</a>]: Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2) in filename on line 13 I dont understand why mysql tries to use the socket. its told to use the IP. Another issue is that i thought it might be a problem with persistant connection so i changed to mysql_connect as you can see in the command above but the error message still shows mysql_pconnect... Any ideas are welcome... Regards, Philipp -- ----------------- Philipp Steinkrueger Oberberg Online Informationssysteme GmbH Technik http://www.oberberg.net PGPkeyID: 690A9504 Key Fingerprint: 35CE 467E C813 06B0 B8E3 0275 2B1E E84A 690A 9504

« previous php.general (#143306) next »