Select Category
Sitemap Help Contact
print article

Enable Error Logs

For 1&1 Linux packages

Use the following code to enable error logging. Copy and paste the code below into a php.ini text file. This php.ini file should be saved in the webspace folder containing that website files that should be monitored for logging.

Please note:
Replace /homepages/27/d382162338/htdocs/ in the code below with the absolute path to the root of your webspace.
error_reporting = E_ALL | E_STRICT
log_errors = On
display_errors = Off
error_log = /homepages/27/d382162338/htdocs/php-errors.log
Code Explanation
error_reporting = E_ALL | E_STRICT This line specifies which errors should be recorded. E_ALL indicates that all errors and warnings are shown. E_STRICT proposed code changes, which ensures compatibility PHP code with future versions of PHP.
log_errors = On Errors in the log file of the server are recorded.
display_errors = Off Errors in the browser are not displayed.
error_log = /home/d123456789/private/php-errors.log The errors are recorded in the appropriate file in the private directory.
For additional information, you may want to reference: