Web Hosting Talk







View Full Version : Reading Logs with PHP


SI-Chris
03-10-2001, 01:32 AM
I'm trying to write a script in PHP that will analyze Web logs on a RaQ 4. However, when I try to open a Web log (like $fp=fopen("/home/sites/www.site.com/logs/web.log","r");) I get a permission denied. I presume this is because the ownship of the log file is root and PHP is running has httpd. Does someone know of a way I can read log files with PHP?

Starhost
03-10-2001, 07:16 AM
chown your script as root, or change the logdaily so that it will run as admin.