PHP 4.0 Bug #9135 Updated: Could not establish connection

From: Date: Fri, 02 Mar 2001 03:01:14 +0000
Subject: PHP 4.0 Bug #9135 Updated: Could not establish connection
Groups: php.dev 
Request: Send a blank email to php-dev+get-47754@lists.php.net to get a copy of this message
ID: 9135 Updated by: sniper Reported By: mita@zelcom.com Old-Status: Open Status: Bogus Bug Type: MySQL related Assigned To: Comments: You're using the wrong port number. Please read the manual page for mysql_pconnect: http://www.php.net/mysql_pconnect ie. You should use the port on which the mysql server runs NOT the one Apache uses! --Jani Previous Comments: --------------------------------------------------------------------------- [2001-02-06 16:54:54] mita@zelcom.com I inserted a row in mysql database - user table with host = localhost:8080. I am running my apache server on port 8080. The insertion was successful. If I try to connect mysql using php script, I am getting a message - connection to mysql server is lost. Below is my php script: <? $connection = mysql_pconnect("localhost:8080") or die("Could not connect"); if ($connection) { $msg = "Success!!!"; } ?> <html> <head> <title>Untitled</title> </head> <body> <? echo "$msg"; ?> </body> </html> --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9135&edit=2

« previous php.dev (#47754) next »