Bug #17188 Updated: mysql_pconnect sometimes not work

From: Date: Mon, 13 May 2002 18:42:21 +0000
Subject: Bug #17188 Updated: mysql_pconnect sometimes not work
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-7550@lists.php.net to get a copy of this message
ID: 17188 Updated by: derick@php.net Reported By: kingyip@bigfoot.com Status: Closed Bug Type: MySQL related Operating System: Linux 1.3.14 PHP Version: 4.2.0 New Comment: It is already released :) Derick Previous Comments: ------------------------------------------------------------------------ [2002-05-13 14:27:27] mfischer@php.net Known issue. 4.2.1 is fixed which will be released pretty soon. For a quick fix, rebuild the ./configure script in your php-4.2.0/ directory with autoconf 2.13 (run ./buildconf) and it should work (reconfigure and recompile your source then, better do it on a a fresh archive) ------------------------------------------------------------------------ [2002-05-13 14:25:19] kingyip@bigfoot.com 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 this bug report at http://bugs.php.net/?id=17188&edit=1

« previous php.bugs (#7550) next »