|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-05-13 14:27 UTC] mfischer@php.net
[2002-05-13 14:42 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 28 10:00:01 2025 UTC |
I just upgrade the php from 4.1.2 to 4.2.0 and the only problem I encounter is using the mysql_pconnect. It seems like sometimes working and sometimes not. I am connecting to the mySQL database with the following code: function connectDB() { $link = mysql_pconnect("localhost", "abc.com", "12345"); if (!$link) die("Couldn't connect to MYSQL"); mysql_select_db("product") or die("Couldn't open product: ".mysql_error()); return $link; } Sometimes I get an error of "Warning: Host 'localhost.localdomain' is not allowed to connect to this MySQL server in /mnt/home/apache/public_html/data.php on line 3 Couldn't connect to MYSQL" I don't know why sometimes the host has been altered to localhost.localdomain, but sometimes it works just perfectly fine. I have no problem on the previous version (4.1.2). I have a solution for this now which is setting the host of the user permission to not only with "localhost" but also with "Any". However I wish this bug can be fixed in the future time. Thanks.