From: [EMAIL PROTECTED]
Operating system:
PHP version: 4.0.6
PHP Bug Type: MySQL related
Bug description: Errors when using variables as the host parameter
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 bug report at: http://bugs.php.net/?id=13466&edit=1
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]