catalyst2 community forums  

Go Back   catalyst2 community forums > Support > Scripting Support

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old 09-02-2006, 05:26 PM   #1 (permalink)
Registered User
 
Join Date: Feb 2006
Posts: 4
Problems Accessing Log File

Good afternoon all

I am haviong problems accessing the log files on my domain.

I can oppen them by downloading them, and view them using the control panel, but i am trying to write a little asp that gets the current uncompressed file and displays it nicely.

however wehn i try to do this i get a "Permission Denied Error", i thought that i might be having problems so i wrote a little script that looked to see if the file existed, and it says it does not... and i know it does.

The path i am using is:
d:\domains\<domain name>\logs\W3SVC5781\

can someone help me, as when i try this locally it works ok..

Thanks in advance

Hanzs Wolfgang
www.hanzswolfgang.co.uk
dahquim is offline   Reply With Quote
Old 09-02-2006, 05:34 PM   #2 (permalink)
Administrator
 
Jacob's Avatar
 
Join Date: May 2003
Posts: 1,299
Hi Hanzs,

The easiest thing to do add SmarterStats as extra feature for £10 a year. However if you want to debug your code, please post it up here and we can have a look.

Regards,

Jacob
Jacob is offline   Reply With Quote
Old 09-02-2006, 10:23 PM   #3 (permalink)
Registered User
 
Join Date: Feb 2006
Posts: 4
Ok, first thing i make the path

<%
MyYear = right(year(date), 2)
If month(date) < 10 Then
MyMonth = "0" & month(date)
Else
MyMonth = month(date)
End If
If day(date) < 10 Then
MyDay = "0" & day(date)
Else
MyDay = day(date)
End If

Foldername = "d:\domains\hanzswolfgang.co.uk\logs\W3SVC5781 \ex" & myyear & mymonth & myday & ".log"
%>

Then i checked to see if the file exists, and this is where i get the 'File does not exist."

<%
Set fs=Server.CreateObject("Scripting.FileSystemObject ")
Response.Write(Foldername & "<br />")
If (fs.FileExists(Foldername))=true Then
Response.Write("File exists.")
Else
Response.Write("File does not exist.")
End If
set fs=nothing
%>

Its not alot of code, or very complicated... hope u can help, i haven't even got round to formatting the output yet, as i cannot open the file... one step at a time and all that.

Thanks

Hanzs Wolfgang
dahquim is offline   Reply With Quote
Old 09-02-2006, 10:38 PM   #4 (permalink)
Administrator
 
Jacob's Avatar
 
Join Date: May 2003
Posts: 1,299
Do you have a live copy of the code somewhere?

Regards,

Jacob
Jacob is offline   Reply With Quote
Old 10-02-2006, 10:37 AM   #5 (permalink)
Administrator
 
WhiskyFudge's Avatar
 
Join Date: Oct 2003
Posts: 1,484
Jacob - from experience the perms on the w3c folder are not correctly set

dahquim - if you open a ticket with your details someone *should* be able to fix it
__________________
Jason Robbins
jason@catalyst2.com
WhiskyFudge is offline   Reply With Quote
Old 10-02-2006, 10:39 AM   #6 (permalink)
Registered User
 
Join Date: Feb 2006
Posts: 4
yes the file is located here:

http://www.hanzswolfgang.co.uk/viewLogs.asp

Thanks

Hanzs Wolfgang
dahquim is offline   Reply With Quote
Old 10-02-2006, 10:44 AM   #7 (permalink)
Administrator
 
Jacob's Avatar
 
Join Date: May 2003
Posts: 1,299
Hi Hanzs,

I have just updated your permissions - it is now finding the file. (Thanks WhiskyFudge )

Regards,

Jacob
Jacob is offline   Reply With Quote
Old 10-02-2006, 11:27 AM   #8 (permalink)
Registered User
 
Join Date: Feb 2006
Posts: 4
thanks...
I will now start the hard part of putting the log into a readable format... lol

Hanzs Wolfgang
dahquim is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 12:30 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.