1

I need 2 php errors, fatal and parse, so I can test my logrotate configuration because I saw that after logrotate configuration the error_log file still empty and I would like check

Thank you

1

3 Answers 3

2

Catchable fatal error

<?php echo new stdClass();

Parse error

<?php echo .....

Notice and Warning

<?php echo A / B;

Deprecated

<?php mysql_connect();
Sign up to request clarification or add additional context in comments.

Comments

0

You'll need two PHP files for that, as each error will stop execution.

Shouldn't be too hard to create a parse error:

<?PHP
{
?>

And a fatal error is similarly easy to provoke:

<?PHP
noSuchFunction();
?>

Was that your question?

Comments

0

Call an undefined function for a Fatal error, and a syntax error for a Parse error.

PHP Fatal error: Call to undefined function

PHP Parse error: syntax error, unexpected '}'

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.