|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-04-17 13:40 UTC] lance_rushing at hotmail dot com
[2002-07-07 22:09 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 18:00:01 2025 UTC |
I have a little bit of code for db connecting If I call this function more than once in the script (e.i. to connect to a 2nd database) php prompts Apache to send an error report using M$ bugreporting in XP. The code crases using either mysql_pconnect or mysql_connect //Crashes function db_hostconnect($host, $db_user, $db_pass) { $dbh = mysql_pconnect($host, $db_user, $db_pass); // some code return $dbh; } //still crashes function db_hostconnect($host, $db_user, $db_pass) { $dbh = mysql_pconnect($host, $db_user, $db_pass); return $dbh; } //works function db_hostconnect($host, $db_user, $db_pass) { return mysql_pconnect($host, $db_user, $db_pass); } It appears to be something with moving the database handle into a variable and then returning the variable. Thanks. When running a script that has more than one mysql_connect prompts apache to send an error report (using M$ bug report feature in XP). Commenting out one of the connections takes care of the problem.