On Thu, 2004-01-08 at 16:27, Carlton L. Whitmore wrote: > I'm very new to PHP. > I want to display /var/log/lastlog with php on a webpage, but I need > some help. How do I do that? > Looking at the docs it looks like file() would work, but I couldn't get > it to display the file.
I would guess that this is because the user that your web server is running as (usually www or nobody or apache; you can find out by looking in your httpd.conf file) does not have read access to that file. Out of curiosity, why do you want to read that file? I would suggest creating a cron job that runs the lastlog command and writes the results to a file that is readable by the user that the web server is running as. If you want the information to be more up to date, you could make that user a 'sudoer' and run the lastlog command via shell_exec(). I would be cautious about giving that kind of privileges though. - Brad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php