Welcome Guest, Not a member yet? Register   Sign In
Viewing log files in CI
#1

[eluser]machouinard[/eluser]
I'm using CI on a few different sites.

On one site I can view the log files at http://mysite.com/application/logs/log.php

log.php is apparently a log file viewer written by Chris Petermann. For the life of me I can't remember putting it in my logs directory. I searched CI, but came up with nothing.

Anyway, I can't figure out what is allowing me access to that file on that site.
I'd assume it would be obvious in .htaccess
Code:
allow from all
Options -Indexes
Options +FollowSymLinks
Options -MultiViews
DirectoryIndex index.php
<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [NC,L,QSA]
</IfModule>

<IfModule !mod_rewrite.c>
  ErrorDocument 404 index.php
</IfModule>
But it's not.

Anyone have any ideas? Or any good suggestions about viewing log files?

Thanks,
Mark
#2

[eluser]InsiteFX[/eluser]
AJAX Logfile Tailer & Viewer
#3

[eluser]machouinard[/eluser]
That logfile viewer looks great, but I still can't figure out how to allow access to the log files at application/logs/.

If I understand correctly, my .htaccess file basically says if the URL being requested isn't a file or directory then let CI handle it through index.php.

I don't understand why I can access the log files on one site but get a 404 on another. The .htaccess and file structure are identical on both sites I'm working with.

I tried switching the rewrite conditions to
Code:
RewriteCond $1 !^(index\.php|public|application|images|css|js|robots\.txt|favicon\.ico)
but I still get a 404 error when trying to access http://mysite.com/application/logs/log.php

What am I missing? Something simple?


#4

[eluser]InsiteFX[/eluser]
Code:
RewriteCond $1 !^(index\.php|public|application|logs|images|css|js|robots\.txt|favicon\.ico)

Make sure that you have read/write access to the directory!

You need to turn that code int a controller...




Theme © iAndrew 2016 - Forum software by © MyBB