On 06/30/2012 09:32 PM, Daniel Brown wrote:
?php
$ssh_entries = explode(PHP_EOL,trim(`tail /var/log/syslog | awk
{'print $1,$2,$3 | $5 | $11'}`));
This will tail a default number of lines.
I'm looking for a way to identify the last line, and when launching the
PHP script I get the added line
On Mon, Jul 2, 2012 at 3:23 PM, Mihamina Rakotomandimby
miham...@rktmb.org wrote:
On 06/30/2012 09:32 PM, Daniel Brown wrote:
?php
$ssh_entries = explode(PHP_EOL,trim(`tail /var/log/syslog | awk
{'print $1,$2,$3 | $5 | $11'}`));
This will tail a default number of lines.
I'm looking for a
On Fri, Jun 29, 2012 at 4:49 AM, Mihamina Rakotomandimby
miham...@rktmb.org wrote:
[snip!]
Typically, a log line like:
Jun 29 11:24:10 dev5 sshd[12775]: Accepted password \
for dev5 from 192.168.0.12 port 50544 ssh2
[snip!]
So that I can:
INSERT INTO ssh_activity \
VALUES
On Sat, Jun 30, 2012 at 2:30 PM, Daniel Brown danbr...@php.net wrote:
?php
$ssh_entries = explode(PHP_EOL,trim(`tail /var/log/syslog | awk
{'print $1,$2,$3 | $5 | $11'}`));
Actually, the above was intended to grab just sshd entries, so
instead of 'tail' you should use 'grep sshd' in the
-- Forwarded message --
From: tamouse mailing lists tamouse.li...@gmail.com
Date: Jun 30, 2012 4:35 PM
Subject: Re: [PHP] log tailing
To: Daniel Brown danbr...@php.net
On Jun 30, 2012 1:34 PM, Daniel Brown danbr...@php.net wrote:
On Sat, Jun 30, 2012 at 2:30 PM, Daniel Brown
On Fri, Jun 29, 2012 at 3:49 AM, Mihamina Rakotomandimby
miham...@rktmb.org wrote:
I have a /var/log/messages and /var/log/syslog file to parse to extract
information from.
I have the to extract the date, and some information in the line.
[snip]
I just need help on the right regexp function
On Sat, 2011-02-26 at 16:37 +0330, AmirBehzad Eslami wrote:
Dear list,
It seems that Python has already a Log Rotation mechanism,
which solves the problem of log file growth.
I'm wondering whether there is any PHP-based solution around?
Now let me ask from a different view:
Is it a
Mark Bomgardner wrote:
way or is there? There are pros and cons to both methods, but I am
concerned about opening and closing a text file some many times that
it may cause and issue. The file may be opened and closed 1,000 or
more times a day.
1000 times? Nothing to worry about. Even if
On Wednesday 02 July 2008 22:36:24 Mark Bomgardner wrote:
I am writing an application in which I want to create log files. I am
weighing the difference between using text files and using a database to
house the data. It appears to me that there is really no advantage either
way or is there?
Mark Bomgardner wrote:
I am writing an application in which I want to create log files. I am
weighing the difference between using text files and using a database to
house the data. It appears to me that there is really no advantage either
way or is there? There are pros and cons to both
Hello John Comerford,
log4php,you can find it on apache.org
Best regards,
=== At 2007-03-19, 08:22:13 you wrote: ===
Hi Folks,
Could someone recommend a good library for error logging. What I am
looking for is something that handles:
1) Error Log written to a DB (mysql)
2)
John Comerford wrote:
Hi Folks,
Could someone recommend a good library for error logging. What I am
looking for is something that handles:
1) Error Log written to a DB (mysql)
2) Logging of PHP errors
3) Logging of MySQL errors
4) Logging of Custom errors/events
5) A log viewer would be
Joe Harman wrote:
Hey Andrew...
IN MY OPINION... forget the cookies... only use php sessions... but
like I said IMO you can never rely on the end user having them
cookies enabled... same with things like javascript...
let me outline some steps for you... everyone else... feel free to
state
Tom,
That's a great tip!
Joe
On Wed, 26 Jan 2005 10:03:31 +, Tom [EMAIL PROTECTED] wrote:
Joe Harman wrote:
Hey Andrew...
IN MY OPINION... forget the cookies... only use php sessions... but
like I said IMO you can never rely on the end user having them
cookies enabled... same
[snip]
I need a particular type log in script. I'm not sure how to do it
or
where I could find a tutorial that would help me, so I'll describe what
I need
and then maybe someone could tell me what kind of script I need
(sessions or
whatever) and where I could get the script/learn how to
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
on Tuesday, January 25, 2005 2:46 PM said:
I need a pretty basic log in script. Something that people log in
to, and the page and all linked/related pages cannot be accessed
unless the person has logged in. So what do I need for this?
Cookies,
On Wednesday 26 January 2005 06:58, Chris W. Parker wrote:
The basic idea for restricting access goes like this:
A value is set in a cookie on the clients machine if the user
successfully authenticates. The website will not allow access to the
page(s) unless this value is found.
No what it
On Tue, 2005-01-25 at 16:45, [EMAIL PROTECTED] wrote:
Hey,
I need a particular type log in script. I'm not sure how to do it or
where I could find a tutorial that would help me, so I'll describe what I
need
and then maybe someone could tell me what kind of script I need (sessions or
[EMAIL PROTECTED] wrote:
Hey,
I need a particular type log in script. I'm not sure how to do it
or
where I could find a tutorial that would help me, so I'll describe what I
need
and then maybe someone could tell me what kind of script I need (sessions
or
whatever) and where I could
Hey Andrew...
IN MY OPINION... forget the cookies... only use php sessions... but
like I said IMO you can never rely on the end user having them
cookies enabled... same with things like javascript...
let me outline some steps for you... everyone else... feel free to
state pros and cons to
Joe Harman mailto:[EMAIL PROTECTED]
on Tuesday, January 25, 2005 4:23 PM said:
IN MY OPINION... forget the cookies... only use php sessions... but
like I said IMO you can never rely on the end user having them
cookies enabled... same with things like javascript...
Well, I don't think
These ideas are great and all, but I'm a real PHP newb so I have some
questions.
It was that I should look for the user in the database that stores the
access info Could I just use an array for that? Or does it have to be MySQL or
something.
$_Session['user_id']= (who) - Does that just add
Some quick answers for you are, no it does not have to be a database
that holds the authentication information. For one of my projects its
just a global array that holds the information.
You also don't have to use sessions to do anything. Cookies are fine as
you have been told before.
Every
Watty wrote:
I have a dynamic IP address, I used everydns.net as a DNS server. I have
a bash script that runs with cron that checks the current IP of the
machine with the DNS record so that if my IP changes; it can run the
update program.
I would like to do some thorough availability reports, so
Watty wrote:
I would like to do some thorough availability reports, so I started by
writing the result of the bash script to a log file. I want to parse the
log file to give me availability reports. The log file is in the form:
08/14/04 09:10:01 [TAB] S - when the IP
into the log when the computer shuts down.
Watty
-Original Message-
From: John Holmes [mailto:[EMAIL PROTECTED]
Sent: 15 August 2004 01:52
To: Watty
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Log parsing
Watty wrote:
I would like to do some thorough availability reports, so I started
John Holmes wrote:
Watty wrote:
We know because the IP check run every 5 minutes by
cron, and if it has no run within 5:01 minutes then
the computer is off, or the script isn't working.
But we should assume that the computer is off is there
is not a record for that 5 minute slot.
PROTECTED]
Subject: Re: [PHP] Log parsing
Watty wrote:
I would like to do some thorough availability reports, so I started
by
writing the result of the bash script to a log file. I want to parse
the
log file to give me availability reports. The log file is in the
form:
08/14/04 09:10:01
I'll try that in another way; feel free to give me your hacks for it:
?php
$file = file_get_contents( ./ip );
$line = explode( \n, $file );
## Number of log entries
$total = 0;
$unavail = 0;
$unavaillog = FALSE;
## Establish the standard difference between log entries of 5 minutes
$diff =
From: CHAN YICK WAI [EMAIL PROTECTED]
I'm writing an application that requires log every transactions users
done,
e.g. update which record, delete which record, something like that.
I guess one way is whenever I issue a mysql_query(), I also insert this
query in whole into another table
On Friday 06 August 2004 01:47, John W. Holmes wrote:
Sounds like you just need to write a wrapper for mysql_query() that logs
what's going on.
function my_mysql_query($query)
{
log_query($query);
return mysql_query($query);
}
and use my_mysql_query() everywhere instead of
From: Jason Wong [EMAIL PROTECTED]
On Friday 06 August 2004 01:47, John W. Holmes wrote:
Sounds like you just need to write a wrapper for mysql_query() that logs
what's going on.
function my_mysql_query($query)
{
log_query($query);
return mysql_query($query);
}
and
Ulitin S.S. wrote:
I am learning php.
I need to log all actions on my page. (like ip, browser, time, pages etc).
question is: how can i identify a user and when he is on my page(s) to log
all his actions.
Your web server already does all of this, why duplicate it? Just get a
log analyzer.
--
John W. Holmes [EMAIL PROTECTED] ???/ ?
?: news:[EMAIL PROTECTED]
Ulitin S.S. wrote:
I am learning php.
I need to log all actions on my page. (like ip, browser, time, pages
etc).
question is: how can i identify a user and when he is on my page(s) to
log
all
I am learning php.
I need to log all actions on my page. (like ip, browser, time, pages etc).
question is: how can i identify a user and when he is on my page(s) to log
all his actions.
Along with the other stuff posted, take a look at
http://phpsniff.sourceforge.net/
--
PHP General
[snip]
I was wondering if anyone knew of a way to log all GET and POST
information being passed to a log file?
[/snip]
Yes. Create a log file. Pass all GET and POST information to it. Over
and over.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
On Thursday 15 July 2004 09:58 am, Robert Sossomon wrote:
I was wondering if anyone knew of a way to log all GET and POST
information being passed to a log file?
Thanks,
Robert
$DEBUG_DATA = $_SERVER['PHP_SELF'].\n;
while (list ($key, $val) = each ($_REQUEST)) {
if
Robert Sossomon wrote:
I was wondering if anyone knew of a way to log all GET and POST
information being passed to a log file?
The GET stuff is already in your apache log file. The POST stuf you
probably don't want to log because it can be rather huge if you are
dealing with things like file
Robert Sossomon wrote:
I was wondering if anyone knew of a way to log all GET and POST
information being passed to a log file?
Thanks,
Robert
$get = serialize($_GET);
$post = serialize($_POST);
and store the variables somewhere, eg. database
--
PHP General Mailing List (http://www.php.net/)
To
Monil Chheda wrote:
Am I MISSING SOMETHING ?
?php
$flag = false;
if ($fp = fopen(web.log,r)) {
while (!feof($fp)) {
$line = fgets($fp,1024);
Here you check if there is an end of string $line, sure there is, there
are no infinite strings
if (ereg(\$,$line)) {
No.
Van Andel, Robbert wrote:
Is there a handy function in PHP that I can use to retrieve the users Windows Log in? We are creating an application that will allow users to add comments to a mysql database, and we would like to be able to track who is putting the comments into the table,
Rob,
create a mysql table containing usernames and passwords then do something
like the following:
Hope this helps,
Hugh
?php
$db= ;
$table= ;
$db_user= ;
$db_pass= ;
if (!isset($username) or !isset($password))
{
print form action=$PHP_SELF method=post;
print log in informationbr;
print
Is there a handy function in PHP that I can use to retrieve the users
Windows Log in? We are creating an application that will allow users
to
add comments to a mysql database, and we would like to be able to
track
who is putting the comments into the table, preferably with their
windows
log
On Fri, 10 May 2002, Josh Edwards wrote:
I'm working on using php to analyse an access log on an apache server.
If a user inputs a file path I want to be able to use PHP to determine if
it's a log file. Is there a function that will reject if it's not a binary
file. If it's a binary file
Thanks for replying Miguel
I'm new to php and wonder how I would check if the first field is an IP
address. Do I open the file fget it and then use a regular expression to
check. Also if I want to break up the first line of my array what delimiter
do I look at as the fields in the log are
You can use the Apache CustomLog directive to send each virtual host's
traffic to it's own logfile.
http://httpd.apache.org/docs-2.0/logs.html#accesslog
- Tim
http://www.phptemplates.org
On Thu, 2001-08-30 at 09:59, Mark Lo wrote:
Hi,
Is there any software or program exists that
46 matches
Mail list logo