Bug #13466 Updated: Errors when using variables as the host parameter
| From: | sniper@php.net | Date: | Tue, 02 Oct 2001 02:59:44 +0000 |
| Subject: | Bug #13466 Updated: Errors when using variables as the host parameter | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-66965@lists.php.net to get a copy of this message | ||
ID: 13466
Updated by: sniper
Reported By: neil.walker@syntegra.com
Old Status: Open
Status: Bogus
Bug Type: MySQL related
Operating System:
PHP Version: 4.0.6
New Comment:
RTFM: http://www.php.net/manual/en/function.mysql-connect.php
The 'walkern' part is assumed to be port/unix socket path.
--Jani
Previous Comments:
------------------------------------------------------------------------
[2001-09-27 08:25:10] neil.walker@syntegra.com
If I do:
$user="frank";
$pwd="skinner";
$db="db.cp-productions.f2s.com:walkern";
The following works fine:
$conn = mysql_connect("db.cp-productions.f2s.com:walkern", $user, $pwd);
If I do:
$conn = mysql_connect($db, $user, $pwd);
The following error occurs:
Warning: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in
/web/sites/253/walkern/www.cp-productions.f2s.com/inc/news.php
I think it's something to do with the ':walkern' bit. It works ok on my other site
where
I have $db="localhost".
I've tried putting it in quotes, etc.
I have tried it on a 4.06 and a 4.01 build (different ISP's) and both do the same.
Neil.
------------------------------------------------------------------------
[2001-09-27 08:20:38] neil.walker@syntegra.com
If I do:
$user="frank";
$pwd="skinner";
$db="db.cp-productions.f2s.com:walkern";
The following works fine:
$conn = mysql_connect("db.cp-productions.f2s.com:walkern", $user, $pwd);
If I do:
$conn = mysql_connect($db, $user, $pwd);
The following error occurs:
Warning: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in
/web/sites/253/walkern/www.cp-productions.f2s.com/inc/news.php
I think it's something to do with the ':walkern' bit. It works ok on my other site
where I have $user="localhost".
I've tried putting it in quotes, etc.
I have tried it on a 4.06 and a 4.01 build (different ISP's) and both do the same.
Neil.
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=13466&edit=1