|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1998-02-22 22:11 UTC] jim
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 13 11:00:01 2025 UTC |
Hi. I've got the following in php3.ini :- track_errors=1 ; Store the last error/warning message in $php_errmsg (boolean) 1) Note the typo in the comment above - the $php_errmsg variable name is wrong.(from php3-dist.ini) 2) I am sure my Apache 1.3a1 httpd is looking at php3.ini because I trussed it, and can see a successfull open of the correct file. When I try to access the variable (after forcing a mysql_connect failure), I get: Warning: Using uninitialized variable $php_errormsg in /myfile.php3 on line 77 Yet in main.c, this is the variable name which is defined. Curiously, that variable is only in main.c so I don't see how it can get set at all. Anything I can do to get it working? This is my code snippet (passwords removed): dbh=mysql_connect("somehost","someuser","wrongpassword"); if (!$dbh) { echo "$php_errormsg<P>\n"; exit; } And the message Warning: MySQL: Unable to connect to server: Access denied for user:... is displayed, yet not set into $php_errormsg. Adding the @ before mysql_connect silences the warning, but it's still not set into $php_errormsg I'd like to get this working so I can email myself these errors when they occur [meaningless to my users, but meaningful to me...] Thanks! Brian