note 98189 deleted from errorfunc.constants by danbrown
| From: | danbrown@php.net | Date: | Tue, 01 Jun 2010 14:47:53 +0000 |
| Subject: | note 98189 deleted from errorfunc.constants by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-169788@lists.php.net to get a copy of this message | ||
Note Submitter: wolf at digris dot ch
----
<?php
echo "\n***************************************************\n\n";
echo " When setting PHP error_reporting() levels in Apache\n";
echo " config files instead of the php.ini file, one can not\n";
echo " use the predefined constants.\n\n";
echo " Problem is, the values for the constants keep changing\n";
echo " and new constants are added with every new version of\n";
echo " PHP. \n\n";
echo " This script will tell you the correct values for the\n";
echo " constants you need, to set the desired error reporting\n";
echo " level for the PHP version running on this server.\n";
echo "\n***************************************************\n\n";
echo "PHP Version " . phpversion() . "\n\n";
echo "E_ERROR...............: ".E_ERROR . "\n";
echo "E_WARNING.............: ".E_WARNING . "\n";
echo "E_PARSE...............: ".E_PARSE . "\n";
echo "E_NOTICE..............: ".E_NOTICE . "\n";
echo "E_CORE_ERROR..........: ".E_CORE_ERROR . "\n";
echo "E_CORE_WARNING........: ".E_CORE_WARNING . "\n";
echo "E_COMPILE_ERROR.......: ".E_COMPILE_ERROR . "\n";
echo "E_COMPILE_WARNING.....: ".E_COMPILE_WARNING . "\n";
echo "E_USER_ERROR..........: ".E_USER_ERROR . "\n";
echo "E_USER_WARNING........: ".E_USER_WARNING . "\n";
echo "E_USER_NOTICE.........: ".E_USER_NOTICE . "\n";
echo "E_STRICT..............: ".E_STRICT . "\n";
echo "E_RECOVERABLE_ERROR...: ".E_RECOVERABLE_ERROR . "\n";
echo "E_DEPRECATED..........: ".E_DEPRECATED . "\n";
echo "E_USER_DEPRECATED.....: ".E_USER_DEPRECATED . "\n";
echo "E_ALL.................: ".E_ALL . "\n";
echo "\n***************************************************\n\n";
echo "Error handling settings on this server:\n";
echo "\nerror_reporting.....: ".ini_get("error_reporting");
echo "\ndisplay_errors......: ".ini_get("display_errors");
echo "\nlog_errors..........: ".ini_get("log_errors");
echo "\nerror_log...........: ".ini_get("error_log");
echo "\n***************************************************\n\n";
echo "For setting error reporting to E_ALL | E_STRICT" . "\n";
echo "The recommended setting for development servers." . "\n";
error_reporting(E_ALL | E_STRICT);
echo " Use:\n\n 'php_admin_value error_reporting ";
echo error_reporting();
echo "' \n\n in your Apache configuration file.\n";
echo "\n***************************************************\n\n";
echo "For setting error reporting to E_ALL & ~E_DEPRECATED" . "\n";
echo "The recommended setting for production servers." . "\n";
error_reporting(E_ALL & ~E_DEPRECATED);
echo " Use:\n\n 'php_admin_value error_reporting ";
echo error_reporting();
echo "' \n\n in your Apache configuration file.\n";
echo "\n***************************************************\n\n";
echo "For setting error reporting to E_ALL & ~E_STRICT" . "\n";
error_reporting(E_ALL & ~E_STRICT);
echo " Use:\n\n 'php_admin_value error_reporting ";
echo error_reporting();
echo "' \n\n in your Apache configuration file.\n";
echo "\n***************************************************\n\n";
echo "For setting error reporting to E_ALL & ~E_NOTICE" . "\n";
error_reporting(E_ALL & ~E_NOTICE);
echo " Use:\n\n 'php_admin_value error_reporting ";
echo error_reporting();
echo "' \n\n in your Apache configuration file.\n";
echo "\n***************************************************\n\n";
?>