php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9135 Could not establish connection
Submitted: 2001-02-06 16:54 UTC Modified: 2001-03-01 22:01 UTC
From: mita at zelcom dot com Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 4.0.4pl1 OS: windows nt
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mita at zelcom dot com
New email:
PHP Version: OS:

 

 [2001-02-06 16:54 UTC] mita at zelcom dot 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>



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-03-01 22:01 UTC] sniper@php.net
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

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC