0

The following code:

echo 'display_errors: '.ini_get('display_errors').'<br>';
echo 'log_errors: '.ini_get('log_errors').'<br>';
echo 'error_log: '.ini_get('error_log').'<br>';
echo 'error_reporting: '.ini_get('error_reporting').'<br>';

error_log('test 123');

produces the following output:

display_errors: 1
log_errors: 1
error_log: /home/sitename/public_html/error_log
error_reporting: E_ALL

Also 'test 123' appears in the correct error log, but when I try to produce an error using the following script:

<?php

  echo (12312312)
  1qweeqw

?>

I get nothing, but a white page. This code should display something like:

Parse error: syntax error, unexpected '1' (T_LNUMBER), expecting ',' or ';' in /home/sitename/public_html/test.php on line 4

I does just that on another server. This is some cheap hosting with cPanel. I'm slowly going mad. Please help.

dj50
  • 51
  • 8
  • The answer https://stackoverflow.com/a/1053431/1213708 is probably the most relevant in this case as it's a parse error and not a runtime error. – Nigel Ren Jun 22 '20 at 08:19
  • This doesn't help me at all ... On other servers it was enough to set display_errors to on and error_reporting to E_ALL and everything would be fine ... – dj50 Jun 22 '20 at 08:26

0 Answers0