Particularly I need to know ErrorLog Apache configuration setting from PHP script to show the latest fatal errors.
Can PHP obtain such setting or I need to pass the log path manually?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As far as I know, Apache will not reveal that information to PHP, even if it runs as Apache module. You have two possibilities:
If you control the server, you can enable the mod_info Apache module. It generates an HTML page that looks like this:
Of course, if you control the server you can simply inspect the
*.conffiles yourself.You can always configure PHP to send its errors to a known location (I’d say this is the most common approach). You can use the error_log and log_errors PHP directives.