Click to See Complete Forum and Search --> : Webalizer - Perl & failing cronjobs


JunkMale
04-07-2009, 04:32 AM
Not wanting to double post...

http://www.webdeveloper.com/forum/showthread.php?p=995955#post995955

The pint pot version...

HTTP requests end in the expected result... web stats
Cronjob requests result in a failure to run.

The issue appears to be with the PERL regular expression.

The above link to my post in server management as thats were I first thought that this post should be until I learned that theyre using PERL.

Any ideas on how to change this expression?

Sixtease
04-07-2009, 01:21 PM
One thought that comes into mind after quickly skimming through the other thread:

If I understand correctly, you said your $cwd is /home/sites/{****.***.**}/public_html/stats/. The regular expression expects that $cwd only contains letters, digits, underscores, dots and minuses after the /home/sites/ part. Does the thing you wrote as {****.***.**} contain anything else? If so, then this may be the problem.

JunkMale
04-07-2009, 01:33 PM
{****.***.**} = the domain name which I have removed.

Sixtease
04-07-2009, 01:57 PM
Yes. Does it contain any other characters than those I listed?

JunkMale
04-07-2009, 06:31 PM
OK, the mystery may have been solved.

This is a classic example of rubber walling people in help and support scanrios and as this forum is frequented by many a so called professional, it is important to note that when you have a request for support from a client that your support team / department are aware of the origins of various components that you may offer customers, even if they are homecooked or 3rd party and also to give the information in a format that the client understands.

My host quite rightly said that the cronjob was set and running but didn't know why the script was failing.

Webalizer folk gave me the rubberwall treatment whitout stating why or on what grounds and after my rather polite email must say that the guy came off in his second reply a bit ****ty. I can understand that and after a set of emails, a plea for help here and a few other alternative attempts, I hope to have finally got the answer.

They say I need to write a shell command file that is uploaded and chmod it to 755 so it has the right permissions set. This file is uploaded to the server root folder of the domain where the public_html folder is and then you go and set up a cron job to run the shell command and sit back with a nice cuppa and a few biscuites.

We shall see.

BTW, No one had told the new guys which CGI scripts were written by the company... Major goof on that part, Goof two was Mr Unix, had he said straight off that "The script aint mine" I would have thanked him instead of my reply that was quite polite.

Well I hope this is it, an education for you as much as it was for me and a lesson in why you just do not fob off a clients request for support, check what belongs to the company, etc. If it aint yours, tell the client whos it is if you know. It makes life much easier.

Thanks for taking the time to respond.

Ciao.

JunkMale
05-31-2009, 06:13 AM
Just to let people know that it works.

I get an average of 3 to 5 error messages a day, all due to file lock issues but thats just a minor one.

I will be modifying the shell script to then call a script to push the data in to a database which will then be scraped so it gets around the file lock issue.