|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I want to do a quick and dirty scan of Apache logs using some of the
zlib Compression Functions. My hosting company tars and gzips several other log files into the gz file. Is there an easy way, using PHP, to separate the files, and only process the Apache log? |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
Hi you can exec this command
tar xzvf logs.tar.gz access_log where access_log is the file you want to extract. Regards, John Peters On Apr 28, 9:52 pm, William Gill <nore...@example.com> wrote: > I want to do a quick and dirty scan of Apache logs using some of the > zlib Compression Functions. My hosting company tars and gzips several > other log files into the gz file. Is there an easy way, using PHP, to > separate the files, and only process the Apache log? |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
petersprc wrote:
> Hi you can exec this command > > tar xzvf logs.tar.gz access_log > > where access_log is the file you want to extract. > Thanks, but I don't remote access to the shell. I was hoping I could use the PHP compression functions to split the files, extract to a variable, and scan the data. I have been playing with gzfile() but what I'm doing seems a little crude. |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
On 30 Apr, 13:28, William Gill <nore...@example.com> wrote:
> petersprc wrote: > > Hi you can exec this command > > > tar xzvf logs.tar.gz access_log > > > where access_log is the file you want to extract. > > Thanks, but I don't remote access to the shell. I was hoping I could > use the PHP compression functions to split the files, extract to a > variable, and scan the data. > > I have been playing with gzfile() but what I'm doing seems a little > crude. <?php `tar xzvf logs.tar.gz access_log`; ?> or <?php exec('tar xzvf logs.tar.gz access_log'); ?> |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
Captain Paralytic wrote:
> <?php > `tar xzvf logs.tar.gz access_log`; > ?> > > or > > <?php > exec('tar xzvf logs.tar.gz access_log'); > ?> Thanks I hadn't used "execution operator: backticks" but it may be a good place to look. |
|
![]() |
| Outils de la discussion | |
|
|