check directory rights.
If need be, passwd the user and give it a shell.
then try on the console as the webserver user
to tail the file.
- Original Message -
From: Liam MacKenzie [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; Tom Rogers [EMAIL PROTECTED]
Sent: Saturday, May 04, 2002 11:26 AM
Subject: Re: [PHP] Tailing a log file {!?}
That doesn't work either!
Something's going on here...
- Original Message -
From: Tom Rogers [EMAIL PROTECTED]
To: Liam MacKenzie [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Sunday, May 05, 2002 6:49 PM
Subject: Re: [PHP] Tailing a log file {!?}
Hi
The following works for me, give it a try with the correct path.
?
exec(tail -n 50 /usr/local/apache/logs/access_log,$result);
echo count($result). results returned. br;
if(count($result) 0){
foreach($result as $line){
echo $line.br;
}
}
?
Tom
At 06:25 PM 4/05/2002, Liam MacKenzie wrote:
$cmd = exec(tail -n $len /www/hosting/domains/lanolot/logs/$open,
$result);
echo $cmd;
Still returns nothing under the top text.
All log files are chmodded 644 and are owned by the web server.
The paths to the files are correct.
I've run out of ideas =(
Thanks
- Original Message -
From: Jason Wong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, May 05, 2002 6:22 PM
Subject: Re: [PHP] Tailing a log file {!?}
On Saturday 04 May 2002 16:09, Liam MacKenzie wrote:
Sorry, I should have included this in the first email...
[snip]
When I call the page, I get the expected at the top:
Excecuting: tail -n 150 /www/hosting/domains/lanolot/logs/error.log
Displaying the last 150 lines of error.log...
But there's nothing underneath it.
1) Check that you have permissions to access the file
2) Add a 'return_var' to your exec() call. And check what this contains.
--
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design Hosting * Internet Intranet Applications Development *
/*
DeVries' Dilemma:
If you hit two keys on the typewriter, the one you don't want
hits the paper.
*/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php