#21934 [NEW]: $php_errmsg superglobal not accessible

From: Date: Wed, 29 Jan 2003 10:38:43 +0000
Subject: #21934 [NEW]: $php_errmsg superglobal not accessible
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-31548@lists.php.net to get a copy of this message
From: jc@mega-bucks.co.jp Operating system: Red Hat Linux 7.2 PHP version: 4.3.0 PHP Bug Type: Compile Warning Bug description: $php_errmsg superglobal not accessible According to the documentation at http://jp.php.net/manual/en/reserved.variables.php (at the very end) "$php_errormsg is a variable containing the text of the last error message generated by PHP. This variable will only be available within the scope in which the error occurred, and only if the track_errors configuration option is turned on (it defaults to off)." I have tried accessing this variable but to no avail. It always throws an "Undefined variable" warning. TEST SCRIPT: <?php ini_set("track_errors", true); error_reporting (E_ALL); $a = $php_errmsg; //the above line threw a warning so now php_errmsg should be initialized ... $a = $php_errmsg; echo $a; exit; ?> OUPUT: Notice: Undefined variable: php_errmsg in err.php on line 5 Notice: Undefined variable: php_errmsg in err.php on line 7 -- Edit bug report at http://bugs.php.net/?id=21934&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=21934&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=21934&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=21934&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=21934&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=21934&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=21934&r=support Expected behavior: http://bugs.php.net/fix.php?id=21934&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=21934&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=21934&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=21934&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21934&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=21934&r=dst IIS Stability: http://bugs.php.net/fix.php?id=21934&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=21934&r=gnused

« previous php.bugs (#31548) next »