Luke Warm Posted February 23, 2011 Share Posted February 23, 2011 Hey gang, Is there any way to view the apache error.log file in PHP? Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted February 23, 2011 Share Posted February 23, 2011 If you have read privs to the file, yes. Ken Quote Link to comment Share on other sites More sharing options...
Luke Warm Posted February 23, 2011 Author Share Posted February 23, 2011 I do. So far I've tried: <?php include('includes/error.log'); ?> Nothing. Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted February 23, 2011 Share Posted February 23, 2011 is your apache error log kept in ./includes/error.log? probably not, so you'll need to update the path to the actual path to the error log. not sure your PHP is going to allow that, but give it a try. Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted February 24, 2011 Share Posted February 24, 2011 Using include will probably give you errors, since PHP is going to try to interpret the log file entries as PHP code. You probably want to read the file and display the lines. If you tell us what you're trying to do in more detail, we could help you better. Ken Quote Link to comment Share on other sites More sharing options...
Luke Warm Posted February 24, 2011 Author Share Posted February 24, 2011 I have an application I've written that allows me to create, drop databases, add tables, fields,etc. I want to be able to view the error.log in a textarea (or whatever) within the application to keep track of Apache. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.