Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Apache Log Viewer Details »»
Apache Log Viewer
Version: 1.00, by Trigunflame Trigunflame is offline
Developer Last Online: Nov 2019 Show Printable Version Email this Page

Version: 3.5.3 Rating:
Released: 02-10-2006 Last Update: Never Installs: 6
 
No support by the author.

[CENTER]Apache Log Viewer
View Live Access

Summary:

Simply allows you to view apache log statistics for your desired logfile. Shows IP Addresses, Requests for that IP, and Last Request ordered by Total Requests.

It is compatible with Apaches common, and combined default log formats; other than that its up to you to make the modifications to suit your needs, if you need help just reply back here with the logformat that you use and we can add it as an option for other people.

Also to note, depending on the log file size it may take a good bit of memory to parse the logfile, although there is an option to set how many lines the script should parse before ending.

Note: You probably should set the path to Your domains logfile wherever that may be, as the global apache logfile is probably huge.


Installation:
  1. Download Zip File, Extract..
  2. Open apache_logs.php and edit these 2 settings:
    define('LOG_FILE_NAME', 'c:\apache\logs\common.log');
    define('LOG_FILE_LINES', 5000);
  3. Place apache_logs.php in your admincp folder
  4. Place cpnav_apache_logs.xml in your includes/xml/ folder
  5. Import the product-apache_logs.xml as a product
  6. Click the View Apache Logs link in your admincp navbar.

Changes:
Moved the feof loop outside of the fscanf to prevent termination of non-matching lines.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 02-11-2006, 08:34 PM
Trigunflame's Avatar
Trigunflame Trigunflame is offline
 
Join Date: Aug 2002
Posts: 742
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Chris-777
This work with linux? I don't have a common.log on my server.
Yes, you just have to point the script to your Domains logs wherever that may be.

Most apache log formats are common or combined whether they are named such or not.
Reply With Quote
  #13  
Old 02-12-2006, 09:18 AM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

w00t w00t

* Aftermath clicks on install
Reply With Quote
  #14  
Old 02-12-2006, 03:25 PM
Symen_4ab's Avatar
Symen_4ab Symen_4ab is offline
 
Join Date: Jun 2002
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great idea, I hate when I have to go through ssh + vi to read my logs

Tried to install it, but.. My log is located at /usr/local/apache/domlogs/mydomain.com
So, i the configuration line looks like this :

Code:
define('LOG_FILE_NAME', '/usr/local/apache/domlogs/mydomain.com');
Doesn't work.. Could not open log file.

Any advice ?
Reply With Quote
  #15  
Old 02-12-2006, 04:13 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Are you sure that is the logfilename, and not only the directory in which the file is located?
Reply With Quote
  #16  
Old 02-12-2006, 04:36 PM
Symen_4ab's Avatar
Symen_4ab Symen_4ab is offline
 
Join Date: Jun 2002
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, I'm sure about this, I can vi it.
I'll try with relative path in a few minutes


edit : Did try some things and achieved to finally understand..

I removed the @ in front of the fopen function, showing me the error returned.
When using the correct path : Warning: fopen(/usr/local/apache/domlogs/domain.com): failed to open stream: Permission denied in /admincp/apache_logs.php on line 39
Got it working by chmodding the logfile (is 555 right ?)
Reply With Quote
  #17  
Old 02-12-2006, 04:56 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Symen_4ab
Got it working by chmodding the logfile (is 555 right ?)
Better use 644. If you use 555 your webserver also can not write to it anymore.
Reply With Quote
  #18  
Old 02-12-2006, 05:05 PM
Symen_4ab's Avatar
Symen_4ab Symen_4ab is offline
 
Join Date: Jun 2002
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Marco, just changed it
Reply With Quote
  #19  
Old 02-12-2006, 10:40 PM
Trigunflame's Avatar
Trigunflame Trigunflame is offline
 
Join Date: Aug 2002
Posts: 742
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Updated
Reply With Quote
  #20  
Old 02-27-2006, 02:17 AM
Trigunflame's Avatar
Trigunflame Trigunflame is offline
 
Join Date: Aug 2002
Posts: 742
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bump.. for the hell of it (GET A HACK DB MADE ALREADY).
Reply With Quote
  #21  
Old 03-15-2006, 07:35 PM
Trigunflame's Avatar
Trigunflame Trigunflame is offline
 
Join Date: Aug 2002
Posts: 742
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:54 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07833 seconds
  • Memory Usage 2,307KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete