0

I have my website on a managed server where i do not have any possibility to configure any php errors since I do not have access to the php.ini

The problem I am facing is that my server provider does not log php errors. I am able to catch (via exceptions) other errors as for example notices but it is not possible to catch fatal errors.

Since I do not have any access to an error log, I do not know whether some of my visitors face fatal errors on my website ...

I already asked my provider but they just told me that they do not log the errors and will not do it in the future. I really want to keep my managed server for maintenance reasons.

Is there any other possibility to track or log fatal errors so that I do not have change anything in the configuration?

Best regards,

Frederic

2 Answers 2

1

Between set_error_handler() and register_shutdown_function() you should be able to define custom logic to handle all your errors, exceptions, fatal errors, etc..

Sign up to request clarification or add additional context in comments.

Comments

0

You can handle this using PHP's set_error_handler function. When an error is thrown, you can log the error to your own text file, or have it emailed to you, or whatever you want to do.

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.