ratcateme Posted January 21, 2008 Share Posted January 21, 2008 I want to open my access log and output the contents and highlight the 404's and stuf but first i need to open it I made sure my log file was chmod 777 but when i try to open it with this command: <?php $file=fopen('/php/access_log','r'); while(!feof($file)){ echo fgets($file).'<br />'; } fclose($file); ?> i get a permission denied error followed by a endless lot of feof and fgets errors I am woundering if this is even possible. Thanks Scott. Quote Link to comment https://forums.phpfreaks.com/topic/87006-opening-apache-access-logs/ Share on other sites More sharing options...
Lumio Posted January 21, 2008 Share Posted January 21, 2008 It is, but it only, if you have root access (I think). To access a file that is not in your web-directory and open_basedir is set, you don't have access to any other directory except /tmp. Quote Link to comment https://forums.phpfreaks.com/topic/87006-opening-apache-access-logs/#findComment-444940 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.