From:             [EMAIL PROTECTED]
Operating system: Linux 1.3.14
PHP version:      4.2.0
PHP Bug Type:     MySQL related
Bug description:  mysql_pconnect sometimes not work

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.
-- 
Edit bug report at http://bugs.php.net/?id=17188&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=17188&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=17188&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=17188&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=17188&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17188&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=17188&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=17188&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=17188&r=submittedtwice
register_globals:    http://bugs.php.net/fix.php?id=17188&r=globals

Reply via email to