Re: [PHP4BETA] Dont you love those error messages? :)
| From: | Zeev Suraski | Date: | Wed, 04 Aug 1999 18:52:44 +0000 |
| Subject: | Re: [PHP4BETA] Dont you love those error messages? :) | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-3114@lists.php.net to get a copy of this message | ||
You don't have your error reporting set high enough.
Note the difference between PHP 4.0 and 3.0 - in 3.0, the script up until the point where the function is redefined would get executed; In 4.0, since compilation is performed, the error will be generated right away, and before a single line is executed! Yes, that means you can't use error_reporting() to set the error reporting to a higher level if the error is a compile time error, since the error will occur before error_reporting() gets called.
You must use .htaccess or equivalent to set the error reporting to show E_COMPILE_ERROR.
Zeev
At 17:11 04/08/99 , Sander Pilon wrote:
Okay, The initial reason for getting the latest CVS was an error where a script wouldnt include another script. The page just stayed blank. The new recompile didnt solve the problem, but I did find what caused it. If an already declared function is declared again, no error message is generated. A little script to demonstrate: <script language="php">-- Zeev Suraski <zeev@zend.com> http://www.zend.com/ For a PGP public key, finger bourbon@netvision.net.ilfunction foo() { echo "hello"; }function foo() { echo "hello"; }echo "check!";</script> Should output an error, but instead the page stays blank. *POOF* 4 hours down the drain :) Sander -- PHP 4 Beta