note 98189 added to errorfunc.constants
| From: | wolf at digris dot ch | Date: | Mon, 31 May 2010 20:36:10 +0000 |
| Subject: | note 98189 added to errorfunc.constants | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-169751@lists.php.net to get a copy of this message | ||
<?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";
?>
----
Server IP: 194.153.94.10
Probable Submitter: 62.2.143.34
----
Manual Page -- http://www.php.net/manual/en/errorfunc.constants.php
Edit -- https://master.php.net/note/edit/98189
Del: integrated -- https://master.php.net/note/delete/98189/integrated
Del: useless -- https://master.php.net/note/delete/98189/useless
Del: bad code -- https://master.php.net/note/delete/98189/bad+code
Del: spam -- https://master.php.net/note/delete/98189/spam
Del: non-english -- https://master.php.net/note/delete/98189/non-english
Del: in docs -- https://master.php.net/note/delete/98189/in+docs
Del: other reasons-- https://master.php.net/note/delete/98189
Reject -- https://master.php.net/note/reject/98189
Search -- https://master.php.net/manage/user-notes.php