PDA

View Full Version : Statistics not compiling.


thevinster
14th September 2005, 13:00
Hi,

I'm having some trouble with my statistics not compiling. Unless I run the log.php manually, cron doesn't seem to be doing it. How do I check / fix this?

I run Debian 3.1, and have installed to Falko's Perfect Setup instructions.

Also, what URL would I use to view the statistics?

falko
14th September 2005, 13:02
Hi,

I'm having some trouble with my statistics not compiling. Unless I run the log.php manually, cron doesn't seem to be doing it. How do I check / fix this?

I run Debian 3.1, and have installed to Falko's Perfect Setup instructions.

Also, what URL would I use to view the statistics?

Do you have error messages from cron in /var/log/messages or /var/log/syslog?

The statistics URL would be www.example.com/stats.

thevinster
15th September 2005, 09:50
Nope... there are no errors, but the stats just don't compile.

falko
15th September 2005, 10:15
Nope... there are no errors, but the stats just don't compile.

There are really no errors? Maybe you've overseen them. Run

grep -i cron /var/log/messages and grep -i cron /var/log/syslog to find the cron related lines.

thevinster
16th September 2005, 11:03
This is what I get:


Sep 16 06:39:01 econwiki /USR/SBIN/CRON[4700]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Sep 16 07:09:01 econwiki /USR/SBIN/CRON[5112]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Sep 16 07:17:01 econwiki /USR/SBIN/CRON[5219]: (root) CMD ( run-parts --report /etc/cron.hourly)
Sep 16 07:39:01 econwiki /USR/SBIN/CRON[5485]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Sep 16 08:09:01 econwiki /USR/SBIN/CRON[5860]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Sep 16 08:17:01 econwiki /USR/SBIN/CRON[5966]: (root) CMD ( run-parts --report /etc/cron.hourly)
Sep 16 08:39:01 econwiki /USR/SBIN/CRON[6232]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Sep 16 09:09:01 econwiki /USR/SBIN/CRON[6602]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Sep 16 09:17:01 econwiki /USR/SBIN/CRON[6708]: (root) CMD ( run-parts --report /etc/cron.hourly)
Sep 16 09:39:01 econwiki /USR/SBIN/CRON[6995]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)

falko
16th September 2005, 12:12
We need log entries from the time between 00.00h and 5.00h because that's the time when the statistics related cron jobs run.

Ovidiu
19th September 2005, 01:47
I have exactly the same problem: no stats get compiled.

heres is what a grep -i grep -i cron /var/log/syslog > crongrep delivers into crongrep file. in messages there are no cron entries.


Sep 18 22:39:01 h5810 /USR/SBIN/CRON[17505]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Sep 18 23:00:01 h5810 /USR/SBIN/CRON[17770]: (root) CMD ( test -x /usr/sbin/tigercron && /usr/sbin/tigercron -q)
Sep 18 23:05:01 h5810 /USR/SBIN/CRON[17951]: (logcheck) CMD ( if [ -x /usr/sbin/logcheck ]; then nice -n10 /usr/sbin/logcheck; fi)
Sep 18 23:09:01 h5810 /USR/SBIN/CRON[18772]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Sep 18 23:17:01 h5810 /USR/SBIN/CRON[18879]: (root) CMD ( run-parts --report /etc/cron.hourly)
Sep 18 23:39:01 h5810 /USR/SBIN/CRON[19148]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Sep 19 00:00:01 h5810 /USR/SBIN/CRON[19413]: (root) CMD ( test -x /usr/sbin/tigercron && /usr/sbin/tigercron -q)
Sep 19 00:05:01 h5810 /USR/SBIN/CRON[20762]: (logcheck) CMD ( if [ -x /usr/sbin/logcheck ]; then nice -n10 /usr/sbin/logcheck; fi)
Sep 19 00:09:01 h5810 /USR/SBIN/CRON[21579]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Sep 19 00:17:01 h5810 /USR/SBIN/CRON[21685]: (root) CMD ( run-parts --report /etc/cron.hourly)
Sep 19 00:39:01 h5810 /USR/SBIN/CRON[21955]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Sep 19 01:00:01 h5810 /USR/SBIN/CRON[22221]: (root) CMD ([ -x /usr/share/john/cronjob ] && nice /usr/share/john/cronjob start)
Sep 19 01:00:01 h5810 /USR/SBIN/CRON[22222]: (root) CMD ( test -x /usr/sbin/tigercron && /usr/sbin/tigercron -q)
Sep 19 01:05:01 h5810 /USR/SBIN/CRON[30646]: (logcheck) CMD ( if [ -x /usr/sbin/logcheck ]; then nice -n10 /usr/sbin/logcheck; fi)
Sep 19 01:09:01 h5810 /USR/SBIN/CRON[31489]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Sep 19 01:17:01 h5810 /USR/SBIN/CRON[31646]: (root) CMD ( run-parts --report /etc/cron.hourly)
Sep 19 01:39:01 h5810 /USR/SBIN/CRON[32147]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)

I gave you only the parts from the time interval you were asking from,
but I had a strange section Sep 18 11:41:01 h5810 /usr/sbin/cron[662]: (*system*logcheck) RELOAD (/etc/cron.d/logcheck)
Sep 18 11:41:01 h5810 /usr/sbin/cron[662]: (root) WRONG INODE INFO (crontabs/root)
Sep 18 11:44:01 h5810 /usr/sbin/cron[662]: (*system*john) RELOAD (/etc/cron.d/john)
Sep 18 11:44:01 h5810 /usr/sbin/cron[662]: (root) WRONG INODE INFO (crontabs/root)
Sep 18 11:45:01 h5810 /usr/sbin/cron[662]: (*system*logcheck) RELOAD (/etc/cron.d/logcheck)
Sep 18 11:45:01 h5810 /usr/sbin/cron[662]: (root) WRONG INODE INFO (crontabs/root)


I guess that was when I run the commands manually?

jmroth
25th September 2005, 00:38
Hi there,
I have had a similar problem...
I noticed that a few crons were running, for whatever reason.
Try to do a
/etc/init.d/cron stop
pkill cron (Make sure no cron processes are left.)
Edit your crontab (crontab -e) and save it again.
Then restart cron: /etc/init.d/cron start
Worked fine here...
Regards,
~jm

thevinster
6th October 2005, 17:06
This worked perfectly. Great job!

kuyaedz
2nd December 2005, 01:13
I've followed these instructions too. Do I now need to wait 24hrs to give cron a chance to run again?

Also, it mentions editing crontab (crontab -e) and save again. Is there something I need to 'edit' or just re-save? I'm having the same issue of stats not compiling & not access at www.domain.com/stats/ (404 Error)

falko
2nd December 2005, 01:27
I've followed these instructions too. Do I now need to wait 24hrs to give cron a chance to run again?
You have to wait until your cron job is scheduled to run the next time, so if you have a cron job that is run once a day, then you have to wait 24h in the worst case.

Also, it mentions editing crontab (crontab -e) and save again. Is there something I need to 'edit' or just re-save? I'm having the same issue of stats not compiling & not access at www.domain.com/stats/ (404 Error)
You don't need to change anything. Just save.

kuyaedz
4th December 2005, 05:37
ok I've done as suggested and, for whatever reason, I still don't get a /stats/ directory (directory doesn't exist under any of my six domains hosted). Any other suggestions?

misterm
4th December 2005, 10:39
Hello

I had the same error, is all was to return in the order after 24hrs.

:D

falko
4th December 2005, 11:30
ok I've done as suggested and, for whatever reason, I still don't get a /stats/ directory (directory doesn't exist under any of my six domains hosted). Any other suggestions?
Run grep -i cron /var/log/syslog and see if you can find errors related to the logs.php or webalizer.php script. The webalizer.php script runs at 4.00h every morning.

danf.1979
19th December 2005, 02:54
Is this ok?

root@Alcon:/home/dan# crontab -l
30 00 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/logs.php &> /dev/null
59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/ftp_logs.php &> /dev/null
59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/mail_logs.php &> /dev/null
59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/cleanup.php &> /dev/null
0 4 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php &> /dev/null
0,30 * * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/check_services.php &> /dev/null
15 3,15 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/quota_msg.php &> /dev/null
40 00 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/traffic.php &> /dev/null

Why is webalizer pointing to dev/null?

falko
19th December 2005, 10:00
Is this ok?
Yes.

Why is webalizer pointing to dev/null?
This is just to redirect any output that the scripts produce (status messages, etc.) to /dev/null because otherwise you'd get an email with the output everytime a cron job runs which can be quite annoying after some time.
It does not mean that the statistics that webalizer produces are sent to /dev/null! :)

nenad
11th March 2006, 22:45
/etc/init.d/cron stop

won't work for me (Fedora Core 3)

falko
12th March 2006, 14:48
/etc/init.d/cron stop

won't work for me (Fedora Core 3)
On Fedora it's /etc/init.d/crond stop

nenad
14th March 2006, 12:17
I have:

403 Error- Forbidden!

when I try to login ?

username / password are valid

statistics are compiled, pages (index.html) and images (png) are generated

till
14th March 2006, 15:10
Which username and password do you use to login to the stats. It must be a valid email username and password that has not been added or changed after the last run of the statistics script.

nenad
14th March 2006, 15:31
I use the first and only username (for first website) that I created since installing ISPConfig.
I can login into webmail using that username/pass and I can FTP also

falko
14th March 2006, 17:58
The username must be of the form web1_user.

Do you have an .htaccess file in the stats folder? What's in it?

nenad
14th March 2006, 18:41
yes, username is in form web1_ xxxx

there is .htacess file in dir:

AuthType Basic
AuthName "Members Only"
AuthUserFile /var/www/web1/.htpasswd
<limit GET PUT POST>
require valid-user
</limit>


I noticed that in
/var/www/web1/.htpasswd

web1_xxxxx: ghhgihggGUGUGuhh --- this string does not match my password ? (probably it is encrypted?)

After I input username/password it looks like user is logged in, but then error
"403 Error- Forbidden!" occurs.

falko
15th March 2006, 00:45
I noticed that in
/var/www/web1/.htpasswd

web1_xxxxx: ghhgihggGUGUGuhh --- this string does not match my password ? (probably it is encrypted?)Yes, the password is encrypted.

After I input username/password it looks like user is logged in, but then error
"403 Error- Forbidden!" occurs.Normally this means there's no index page in the directory.
Please post the output of ls -la /var/www/web1/web/stats

nenad
15th March 2006, 07:33
[root@noc ~]# ls -la /var/www/web1/web/stats
total 284
drwxr-xr-x 2 web1_nenad web1 4096 Mar 5 13:16 .
drwxrwxr-x 19 web1_nenad web1 4096 Mar 13 03:16 ..
-rwxr-xr-x 1 web1_nenad web1 3183 Mar 15 04:00 ctry_usage_200603.png
-rwxr-xr-x 1 web1_nenad web1 3009 Mar 15 04:00 daily_usage_200603.png
-rwxr-xr-x 1 web1_nenad web1 12288 Mar 14 04:00 dns_cache.db
-rwxr-xr-x 1 web1_nenad web1 2111 Mar 15 04:00 hourly_usage_200603.png
-rw-rw-r-- 1 web1_nenad web1 124 Mar 15 04:00 .htaccess
-rwxr-xr-x 1 web1_nenad web1 3779 Mar 15 04:00 index.html
-rwxr-xr-x 1 web1_nenad web1 91765 Mar 15 04:00 usage_200603.html
-rwxr-xr-x 1 web1_nenad web1 2363 Mar 15 04:00 usage.png
-rwxr-xr-x 1 web1_nenad web1 89110 Mar 15 04:00 webalizer.current
-rwxr-xr-x 1 web1_nenad web1 41 Mar 15 04:00 webalizer.hist

falko
15th March 2006, 12:48
That's ok.
And you can't login with all users from the "User & Email" tab, or is it only one that makes problems?

Ovidiu
15th March 2006, 18:09
hi, I have already told you somewhere in the middle of this psot, that I had exactly the same issue, now after Till advised me to create another test user - after waiting for more than 24hours, this user does work, I can access the stats. BUT none of the older users does work... even if I change their password and some of their settings, clicking on save afterwards these accounts do not work... I guess I have to recreate them, will that work if I delete them, empty the recycle bin and recreate them? what do you think?

till
15th March 2006, 19:11
hi, I have already told you somewhere in the middle of this psot, that I had exactly the same issue, now after Till advised me to create another test user - after waiting for more than 24hours, this user does work, I can access the stats.

Ok, thats the first step.

BUT none of the older users does work... even if I change their password and some of their settings, clicking on save afterwards these accounts do not work...

Have you waited 24 ours after you changed the passwords? ISPConfig is creating the .htaccess files once each night, when the stats where generated.

I guess I have to recreate them, will that work if I delete them, empty the recycle bin and recreate them? what do you think?

I dont think that this is nescessary. Are the old users in this file too?

/var/www/web1/.htpasswd

Ovidiu
15th March 2006, 19:40
yes the old users are in /var/www/web1/.htpasswd too and yes I have waited about 24 hours...

could I try again and change their passwords to the same value they had before? will that work? or does ispcfg recognize the password is the same and not write the changes?

nenad
15th March 2006, 19:52
1. is it possible to reassign existing sites to new users ? How?

2. is it possible to force ISPConfig to re-create .htacess in shorter period than 24hrs ?

till
15th March 2006, 20:15
1. is it possible to reassign existing sites to new users ? How?


No. thats not possible.

2. is it possible to force ISPConfig to re-create .htacess in shorter period than 24hrs ?

You can run the webalizer script manually on the commandline:

/root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php

nenad
15th March 2006, 20:26
You can run the webalizer script manually on the commandline:

/root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php


I know that. But does that re-create .htacess files?

till
15th March 2006, 20:34
But does that re-create .htacess files?

Yes, thats why i posted it as answer to the question:

2. is it possible to force ISPConfig to re-create .htacess in shorter period than 24hrs ?

nenad
15th March 2006, 20:42
It won't work :(

I just changed password for web_ user
Then regenerated stats using
/root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php

..and

nothing. I can't login into stats...

falko
15th March 2006, 22:18
You are absolutely sure you used the correct username and password?

nenad
15th March 2006, 22:37
Yes. The same username/password I use for WEB-FTP, webmail etc.

With web(x)_ prefix

falko
16th March 2006, 11:53
And the user belongs to that web site?

nenad
16th March 2006, 15:52
yes, user belongs to that website.

nenad
21st March 2006, 03:33
I reinstalled complete system (Now it's Fedora Core 4)

Now I have this error:

[root@localhost etc]# /root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php
PHP Notice: Undefined variable: HTTP_GET_VARS in /home/admispconfig/ispconfig/lib/config.inc.php on line 32
PHP Warning: Invalid argument supplied for foreach() in /home/admispconfig/ispconfig/lib/config.inc.php on line 32
PHP Notice: Undefined variable: HTTP_POST_VARS in /home/admispconfig/ispconfig/lib/config.inc.php on line 38
PHP Warning: Invalid argument supplied for foreach() in /home/admispconfig/ispconfig/lib/config.inc.php on line 38
PHP Notice: Undefined variable: HTTP_COOKIE_VARS in /home/admispconfig/ispconfig/lib/config.inc.php on line 44
PHP Warning: Invalid argument supplied for foreach() in /home/admispconfig/ispconfig/lib/config.inc.php on line 44
PHP Notice: Undefined variable: HTTP_GET_VARS in /home/admispconfig/ispconfig/lib/config.inc.php on line 53
9 records (9 ignored) in 0.00 seconds

nenad
21st March 2006, 07:04
yum update, reboot then once again:
/root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php

now there's no error, but I still can't acess stats.

they are there with file browser (built into webmin) I can acess index,html and browse throughh complete wealizer statistics.

BTW is there a way to make those statistics public avaiable?

nenad
21st March 2006, 07:05
According to the date and time of created files, with command:

/root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php

only .htacess file is recreated, not html and png files ?

till
21st March 2006, 11:10
According to the date and time of created files, with command:

/root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php

only .htacess file is recreated, not html and png files ?

The .htaccess file is recreated by the webalizer.php script. The html and png files where creted / modified by the webalizer log analysis program.

Ovidiu
25th March 2006, 08:56
sorry to interrupt again, but I just realized, that all my sites stopped generating stats on the 22.03.

I just had a look at the stats and the last stats are from the 22. - any idea what could have caused that and what I can check to see that from today all will run fine again?

I just tried to run it manually like you suggested earlier in this post: /root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php but if I enter that in a shell nothing happens, it just sits there, and no stats appear... ?

till
25th March 2006, 11:09
I just tried to run it manually like you suggested earlier in this post: /root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php but if I enter that in a shell nothing happens, it just sits there, and no stats appear... ?

How long did you wait? On large systems it may take 30 minutes and more.

Ovidiu
25th March 2006, 12:05
hmmm.... I did not remember, anyway, I am trying again now:

ssh into server, then start screen, then /root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php

and now I'll leave for a barbeque - we have the first nice day with sunshine today :-)

when I am back later on today, I'll check if anything shows up, and because of using screen even if my wireless connection at home drops I can resume :-)

cu all and have a nice day

till
25th March 2006, 12:07
You can try to check with "ps -aux" in another terminal window if there where processes of the webalizer program running.

Ovidiu
25th March 2006, 12:38
yes there were, now they are gone but the console where I typed that webalizer command in is still waiting, do I have to manually do strg+c to stop?
the webalizer process was running for maybe 15 min, but I still do not see any changes in any of the stats...

falko
25th March 2006, 14:18
If you have large web sites with lots of traffic, it can take a little longer to create the statistics. So you should wait.
You should also increase the PHP memory limit in /root/ispconfig/ispconfig/php.ini and restart ISPConfig.

Ovidiu
25th March 2006, 17:03
I guess you meatn this file: /root/ispconfig/php/php.ini
here are the new values I entered:

max_execution_time = 450
max_input_time = 120
memory_limit = 64M

in the old screen I just resumed I found this:

h5810:/var/www/web1# /root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php
Warning: Truncating oversized referrer field
24996 records (24996 ignored) in 0,14 seconds
9059850 records (9059850 ignored) in 192,68 seconds, 47020/sec
105276 records (105276 ignored) in 0,85 seconds
130 records (130 ignored) in 0,00 seconds
2468 records (2468 ignored) in 0,02 seconds
612 records (612 ignored) in 0,01 seconds
1025 records (1025 ignored) in 0,01 seconds

Warning: array_merge(): Argument #1 is not an array in /root/ispconfig/scripts/shell/webalizer.php on line 161

Warning: array_merge(): Argument #1 is not an array in /root/ispconfig/scripts/shell/webalizer.php on line 161

Warning: array_merge(): Argument #2 is not an array in /root/ispconfig/scripts/shell/webalizer.php on line 161
h5810:/var/www/web1#

so after changing those values and restarting ispconfig I tried again.. lets wait and see :-)

btw. this php.ini concerns only httpd not my main apache2 I guess?

###edit###

I waited, result is the same:

h5810:/var/www/web1# /root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php
Warning: Truncating oversized referrer field
24996 records (24996 ignored) in 0,14 seconds
9059850 records (9059850 ignored) in 174,42 seconds, 51942/sec
105276 records (105276 ignored) in 0,85 seconds
130 records (130 ignored) in 0,00 seconds
2468 records (2468 ignored) in 0,02 seconds
612 records (612 ignored) in 0,00 seconds
1025 records (1025 ignored) in 0,01 seconds

Warning: array_merge(): Argument #1 is not an array in /root/ispconfig/scripts/shell/webalizer.php on line 161

Warning: array_merge(): Argument #1 is not an array in /root/ispconfig/scripts/shell/webalizer.php on line 161

Warning: array_merge(): Argument #2 is not an array in /root/ispconfig/scripts/shell/webalizer.php on line 161
h5810:/var/www/web1#

falko
26th March 2006, 11:23
btw. this php.ini concerns only httpd not my main apache2 I guess?

This php.ini is only for the ISPConfig PHP, not for your main PHP.

Ovidiu
26th March 2006, 16:24
thx. but what about the webalizer error?
there is obviuosly an error, like you can see above, any clues what to do about that? the end of the month is coming closer and I need the stats to be ready...

nenad
26th March 2006, 20:11
I still cant resolve "403 Error- Forbidden!" issue

falko
26th March 2006, 20:38
thx. but what about the webalizer error?
there is obviuosly an error, like you can see above, any clues what to do about that? the end of the month is coming closer and I need the stats to be ready...
I guess you have some folders or files in /var/www that the webalizer script doesn't expect. As long as your web site statistics are generated, you can ignore the warnings.

Ovidiu
26th March 2006, 23:40
all that I have inside /var/www is this:

h5810:/var/www# ls -al
insgesamt 60
drwxr-xr-x 15 root root 4096 2006-03-14 22:44 .
drwxr-xr-x 15 root root 4096 2006-02-28 21:29 ..
drwxr-xr-x 2 root root 4096 2006-02-28 21:29 apache2-default
drwxr-xr-x 3 root root 4096 2006-03-01 00:30 localhost
drwxr-xr-x 3 root root 4096 2006-03-10 00:30 mail
drwxr-xr-x 2 root root 4096 2006-02-28 21:42 sharedip
drwxr-xr-x 13 web1_postmaster web1 4096 2006-03-09 09:29 web1
drwxr-xr-x 12 web2_info web2 4096 2006-03-09 08:20 web2
drwxr-xr-x 13 web3_melanie web3 4096 2006-03-26 16:27 web3
drwxr-xr-x 9 web4_ossi web4 4096 2006-03-07 02:22 web4
drwxr-xr-x 9 web5_postmaster web5 4096 2006-03-13 13:18 web5
drwxr-xr-x 9 web6_postmaster web6 4096 2006-03-10 13:09 web6
drwxr-xr-x 10 web7_admin web7 4096 2006-03-23 11:47 web7
drwxr-xr-x 2 root root 4096 2006-02-28 21:34 webalizer
drwxr-xr-x 5 root www-data 4096 2005-10-05 20:49 webmail
lrwxrwxrwx 1 www-data web2 13 2006-02-28 22:51 www.hai-hui.net -> /var/www/web2
lrwxrwxrwx 1 www-data web4 13 2006-03-01 09:26 www.kissaki.de -> /var/www/web4
lrwxrwxrwx 1 www-data web7 13 2006-03-14 22:44 www.klub-kamikaze.com -> /var/www/web7
lrwxrwxrwx 1 www-data web6 13 2006-03-01 12:10 www.pacura.ru -> /var/www/web6
lrwxrwxrwx 1 www-data web3 13 2006-02-28 23:04 www.rum-reisen.de -> /var/www/web3
lrwxrwxrwx 1 www-data web1 13 2006-02-28 22:46 www.web-designerz.de -> /var/www/web1
lrwxrwxrwx 1 www-data web5 13 2006-03-01 12:06 www.zice.ro -> /var/www/web5
h5810:/var/www#


and after having a peak at webalizer.php I guess its only looking for web followed by a number folders so evreything should be ok but no stats are bein generated.

###edit###
how would I debug this webalizer.php script? it only reports those errors above, and I really need to do something...

nenad
5th April 2006, 02:49
Finallz I resolved "403 Forbidden Error" for webalizer stats:

Instead of http://www.web-hosting-solutions.biz/stats

I use

http://www.web-hosting-solutions.biz/stats/index.html

and everzthing works nice!

Any explanation for this?

sbovisjb1
5th April 2006, 05:16
It is possible that the index is where the program was looking for the whole times, or maybe its how the directory calls and paths function. Its probably one of those things that will take a while to figure out.

falko
6th April 2006, 00:00
Finallz I resolved "403 Forbidden Error" for webalizer stats:

Instead of http://www.web-hosting-solutions.biz/stats

I use

http://www.web-hosting-solutions.biz/stats/index.html

and everzthing works nice!

Any explanation for this?
http://www.web-hosting-solutions.biz/stats is working for me (I'm prompted for the login)...

nenad
6th April 2006, 00:56
Yes, but 403 error was AFTER login

but if I login with .../index.html then everything is OK, after login popup statistics are shown

falko
6th April 2006, 11:27
Then I guess the problem is that www.web-hosting-solutions.biz is not listed as ServerName or ServerAlias in the vhost configuration for that web site.

nenad
7th April 2006, 15:35
How to chechk that, and how to correct that?

falko
7th April 2006, 19:17
Have a look at the vhost of the web site in Vhosts_ispconfig.conf and look for ServerName and ServerAlias.

Also check if www.web-hosting-solutions.biz is listed either as the main domain or as Co-Domain in ISPConfig for that specific web site.

nenad
20th April 2006, 23:56
You mean this?:

# Vhost: www.web-hosting-solutions.biz:80
######################################
#
#
<VirtualHost 192.168.123.200:80>
SuexecUserGroup xxxxxxxxxxxxxxxx (edited for security reasons)
ServerName www.web-hosting-solutions.biz:80
ServerAdmin webmaster@web-hosting-solutions.biz
DocumentRoot /var/www/web1/web
ServerAlias web-hosting-solutions.biz

Also check if www.web-hosting-solutions.biz is listed either as the main domain or as Co-Domain in ISPConfig for that specific web site.

Yes it is listed as main domain.

There is kind of Warning during the booting of the system:

starting httpd [warn] nameVirtualHosts has no virtual hosts

Why is that for?

falko
21st April 2006, 11:46
There is kind of Warning during the booting of the system:

starting httpd [warn] nameVirtualHosts has no virtual hosts

Why is that for?
It's just a warning, you can ignore it. IT means that you have a NameVirtualHosts line in your Apache configuration for an IP address that doesn't have virtual hosts yet.

Ovidiu
1st May 2006, 11:57
sorry to disturb again the peace of this threat but my stats stopped compiling again on the 25. of april and since then the logfiles have been growing again. on the 28. of april I have upgraded ispconfig to the latest version so that is not the reason as they stopped working before...
I am back to the same problems I already had at the gbeginning of this threat. I get webalizer errors and the stats do not get compiled and logfiles start growing.

here is what a manual execution of webalizer gives me now:

h5810:/# /root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php
Warning: Truncating oversized referrer field
7325 records (7325 ignored) in 0,04 seconds
9002042 records (9002042 ignored) in 97,63 seconds, 92205/sec
89635 records (89635 ignored) in 0,84 seconds
166 records (166 ignored) in 0,00 seconds
424 records (424 ignored) in 0,01 seconds
62838 records (62838 ignored) in 0,65 seconds
123 records (123 ignored) in 0,00 seconds

Warning: array_merge(): Argument #1 is not an array in /root/ispconfig/scripts/shell/webalizer.php on line 161

Warning: array_merge(): Argument #2 is not an array in /root/ispconfig/scripts/shell/webalizer.php on line 161

Warning: array_merge(): Argument #1 is not an array in /root/ispconfig/scripts/shell/webalizer.php on line 161

Warning: array_merge(): Argument #2 is not an array in /root/ispconfig/scripts/shell/webalizer.php on line 161

Warning: array_merge(): Argument #1 is not an array in /root/ispconfig/scripts/shell/webalizer.php on line 161

Warning: array_merge(): Argument #2 is not an array in /root/ispconfig/scripts/shell/webalizer.php on line 161
h5810:/#


also here is whats inside my /var/www:

h5810:/var/www# ls -al
insgesamt 56
drwxr-xr-x 14 root root 4096 2006-03-29 00:30 .
drwxr-xr-x 15 root root 4096 2006-02-28 21:29 ..
drwxr-xr-x 2 root root 4096 2006-02-28 21:29 apache2-default
drwxr-xr-x 3 root root 4096 2006-03-29 00:30 localhost
drwxr-xr-x 3 root root 4096 2006-03-29 00:30 mail
drwxr-xr-x 2 root root 4096 2006-02-28 21:42 sharedip
drwxr-xr-x 13 web1_postmaster web1 4096 2006-03-31 16:01 web1
drwxr-xr-x 12 web2_info web2 4096 2006-04-14 23:27 web2
drwxr-xr-x 13 web3_melanie web3 4096 2006-03-26 16:27 web3
drwxr-xr-x 9 web4_ossi web4 4096 2006-04-17 23:50 web4
drwxr-xr-x 9 web5_postmaster web5 4096 2006-03-13 13:18 web5
drwxr-xr-x 10 web6_postmaster web6 4096 2006-04-05 15:25 web6
drwxr-xr-x 10 web7_admin web7 4096 2006-03-23 11:47 web7
drwxr-xr-x 5 root www-data 4096 2005-10-05 20:49 webmail
lrwxrwxrwx 1 www-data web2 13 2006-02-28 22:51 www.hai-hui.net -> /var/www/web2
lrwxrwxrwx 1 www-data web4 13 2006-03-01 09:26 www.kissaki.de -> /var/www/web4
lrwxrwxrwx 1 www-data web7 13 2006-03-14 22:44 www.klub-kamikaze.com -> /var/www/web7
lrwxrwxrwx 1 www-data web6 13 2006-03-01 12:10 www.pacura.ru -> /var/www/web6
lrwxrwxrwx 1 www-data web3 13 2006-02-28 23:04 www.rum-reisen.de -> /var/www/web3
lrwxrwxrwx 1 www-data web1 13 2006-02-28 22:46 www.web-designerz.de -> /var/www/web1
lrwxrwxrwx 1 www-data web5 13 2006-03-01 12:06 www.zice.ro -> /var/www/web5


Please help me, this can't go on like this.

falko
1st May 2006, 14:55
Have you tried to increase the PHP memory limit in /root/ispconfig/php/php.ini? I guess your log files are too big for your current memory limit.

Ovidiu
1st May 2006, 16:04
seems like the upgrade overrode the values I had changed inside the php.ini.

I changed the values back to way higher values and here is the next result:

max_execution_time = 500 ; Maximum execution time of each script, in seconds
max_input_time = 120 ; Maximum amount of time each script may spend pars$
memory_limit = 64M ;

h5810:/var/www/web1# /root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php
Error: Unable to lock DNS cache file dns_cache.db
Warning: Truncating oversized referrer field
7325 records (7325 ignored) in 0,04 seconds
9002042 records (9002042 ignored) in 396,40 seconds, 22709/sec
89635 records (89635 ignored) in 0,90 seconds
166 records (166 ignored) in 0,00 seconds
424 records (424 ignored) in 0,00 seconds
62838 records (62838 ignored) in 0,44 seconds
123 records (123 ignored) in 0,00 seconds

Warning: array_merge(): Argument #1 is not an array in /root/ispconfig/scripts/shell/webalizer.php on line 161

Warning: array_merge(): Argument #2 is not an array in /root/ispconfig/scripts/shell/webalizer.php on line 161

Warning: array_merge(): Argument #1 is not an array in /root/ispconfig/scripts/shell/webalizer.php on line 161

Warning: array_merge(): Argument #2 is not an array in /root/ispconfig/scripts/shell/webalizer.php on line 161

Warning: array_merge(): Argument #1 is not an array in /root/ispconfig/scripts/shell/webalizer.php on line 161

Warning: array_merge(): Argument #2 is not an array in /root/ispconfig/scripts/shell/webalizer.php on line 161
h5810:/var/www/web1#

falko
1st May 2006, 20:00
64 MB might not be enough, depending on the size of the logs. Set it to 200 MB or higher for testing purposes.

Ovidiu
1st May 2006, 23:29
I have been rethinking this. the upgrade, changing the memory limit back to 16m could not have been the reason as it seems I had started getting these problems 3-4 days before the upgrade. anyway I set memory limit to 256m with the same result:

max_execution_time = 500 ; Maximum execution time of each script, in seconds
max_input_time = 120 ; Maximum amount of time each script may spend pars$
memory_limit = 256M ; Maximum amount of memory a script may consume (8MB)


h5810:/var/www/web1# /root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php
Warning: Truncating oversized referrer field
7325 records (7325 ignored) in 0,04 seconds
9002042 records (9002042 ignored) in 172,45 seconds, 52200/sec
89635 records (89635 ignored) in 0,72 seconds
166 records (166 ignored) in 0,00 seconds
424 records (424 ignored) in 0,01 seconds
62838 records (62838 ignored) in 0,61 seconds
123 records (123 ignored) in 0,00 seconds

Warning: array_merge(): Argument #1 is not an array in /root/ispconfig/scripts/shell/webalizer.php on line 161

Warning: array_merge(): Argument #2 is not an array in /root/ispconfig/scripts/shell/webalizer.php on line 161

Warning: array_merge(): Argument #1 is not an array in /root/ispconfig/scripts/shell/webalizer.php on line 161

Warning: array_merge(): Argument #2 is not an array in /root/ispconfig/scripts/shell/webalizer.php on line 161

Warning: array_merge(): Argument #1 is not an array in /root/ispconfig/scripts/shell/webalizer.php on line 161

Warning: array_merge(): Argument #2 is not an array in /root/ispconfig/scripts/shell/webalizer.php on line 161

Ovidiu
2nd May 2006, 20:21
any more ideas?

falko
3rd May 2006, 15:37
Not really... :confused:

Ovidiu
3rd May 2006, 16:19
I have reread all related posts and I saw that the presence of a folder called localhost was making problems, now I have seen that I have also a folder called mail and one webmail inside /var/www

the webmail folder was always there, there are no logs inside, while I do not know where the mail folder came from, it has log files. Could this folder be causing the same problems like the localhost folder was doing? And how could I circumvent this?

falko
3rd May 2006, 22:39
None of these folders should prevent ISPConfig from creating the webalizer statistics. They will produce warnings, nothing more.

Ovidiu
4th May 2006, 01:33
ok, I'll perform the update to the newest version tomorrow, maybe you can asist with more ideas of what to test. can't I perform some more debugging of the webalizer.php script?

Ovidiu
5th May 2006, 06:52
yesterday evening, maybe around 23 o'clock I performed the upgrade to 2.2.2 and this morning I found that my stats were compiling again.

with the standard settings of memory_limit = 16M...

now I changed the values back to :

max_execution_time = 600
max_input_time = 180
memory_limit = 512M

and hopefully it will continue to run.

nenad
24th May 2006, 22:02
server200:~# /root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php
1200 records (1200 ignored) in 0.03 seconds
255 records (255 ignored) in 0.01 seconds


what does this mean?:
1200 records (1200 ignored) in 0.03 seconds
255 records (255 ignored) in 0.01 seconds

falko
25th May 2006, 14:43
what does this mean?:
1200 records (1200 ignored) in 0.03 seconds
255 records (255 ignored) in 0.01 seconds
This happens if you feed records to webalizer that it already has in its database.

nenad
27th May 2006, 12:34
It seems that Apache is not creating any log files????

falko
27th May 2006, 13:37
What's the output of ls -l /var/log?

nenad
27th May 2006, 14:19
server200:~# ls -l /var/log
total 11440
drwxr-xr-x 2 root root 4096 2006-05-21 06:26 apache2
-rw-r--r-- 1 root root 2401 2006-05-09 23:11 aptitude
-rw-r----- 1 root adm 885308 2006-05-27 14:17 auth.log
-rw-r----- 1 root adm 857580 2006-05-21 06:47 auth.log.0
-rw-r----- 1 root adm 25920 2006-05-14 06:47 auth.log.1.gz
-rw-r--r-- 1 root root 467273 2006-05-09 23:18 base-config.log.1
-rw-r--r-- 1 root root 58727 2006-05-09 23:18 base-config.timings.1
-rw-rw-r-- 1 root utmp 0 2006-05-10 00:25 btmp
-rw-r----- 1 root adm 1201103 2006-05-27 14:17 daemon.log
-rw-r----- 1 root adm 1296119 2006-05-25 06:25 daemon.log.0
-rw-r----- 1 root adm 51722 2006-05-21 06:46 daemon.log.1.gz
-rw-r----- 1 root adm 69638 2006-05-18 06:26 daemon.log.2.gz
-rw-r----- 1 root adm 54951 2006-05-14 06:46 daemon.log.3.gz
drwxr-xr-x 3 root root 4096 2006-05-10 00:31 debian-installer
-rw-r----- 1 root adm 187897 2006-05-27 12:13 debug
-rw-r----- 1 root adm 19502 2006-05-21 01:45 debug.0
-rw-r----- 1 root adm 781 2006-05-13 23:32 debug.1.gz
-rw-r--r-- 1 root root 7563 2006-05-15 10:38 dmesg
drwxr-s--- 2 Debian-exim adm 4096 2006-05-12 06:25 exim4
-rw-r--r-- 1 root root 404 2006-05-09 23:36 fontconfig.log
drwxr-xr-x 2 root root 4096 2006-05-27 00:00 httpd
-rw-r--r-- 1 root root 8766 2006-05-10 21:55 ispconfig_install.log
-rw-r----- 1 root adm 0 2006-05-21 06:47 kern.log
-rw-r----- 1 root adm 13679 2006-05-15 10:38 kern.log.0
-rw-r----- 1 root adm 9920 2006-05-13 23:33 kern.log.1.gz
drwxr-xr-x 2 root root 8192 2006-05-27 09:37 ksymoops
-rw-rw-r-- 1 root utmp 3504584 2006-05-27 14:16 lastlog
-rw-r--r-- 1 root root 0 2006-05-09 23:15 lp-acct
-rw-r--r-- 1 root root 0 2006-05-09 23:15 lp-errs
-rw-r----- 1 root adm 0 2006-05-14 06:47 lpr.log
-rw-r----- 1 root adm 47 2006-05-09 23:15 lpr.log.0
-rw-r----- 1 root adm 0 2006-05-14 06:47 mail.err
-rw-r----- 1 root adm 87 2006-05-10 22:33 mail.err.0
-rw-r----- 1 root adm 649822 2006-05-27 14:16 mail.info
-rw-r----- 1 root adm 1080916 2006-05-25 06:25 mail.info.0
-rw-r----- 1 root adm 24884 2006-05-21 06:46 mail.info.1.gz
-rw-r----- 1 root adm 58953 2006-05-19 06:25 mail.info.2.gz
-rw-r----- 1 root adm 42959 2006-05-14 06:46 mail.info.3.gz
-rw-r----- 1 root adm 670068 2006-05-27 14:16 mail.log
-rw-r----- 1 root adm 1099029 2006-05-25 06:25 mail.log.0
-rw-r----- 1 root adm 35991 2006-05-21 06:46 mail.log.1.gz
-rw-r----- 1 root adm 49572 2006-05-18 06:26 mail.log.2.gz
-rw-r----- 1 root adm 44143 2006-05-14 06:46 mail.log.3.gz
-rw-r----- 1 root adm 0 2006-05-21 06:47 mail.warn
-rw-r----- 1 root adm 178 2006-05-17 13:23 mail.warn.0
-rw-r----- 1 root adm 837 2006-05-13 14:02 mail.warn.1.gz
-rw-r----- 1 root adm 17169 2006-05-27 13:58 messages
-rw-r----- 1 root adm 31469 2006-05-21 06:38 messages.0
-rw-r----- 1 root adm 10680 2006-05-14 06:25 messages.1.gz
drwxr-x--- 2 munin adm 4096 2006-05-27 06:25 munin
drwxr-s--- 2 mysql adm 4096 2006-05-27 06:25 mysql
-rw-r----- 1 root adm 0 2006-05-27 06:25 mysql.err
-rw-r----- 1 root adm 20 2006-05-27 06:25 mysql.err.1.gz
-rw-r----- 1 root adm 20 2006-05-26 06:25 mysql.err.2.gz
-rw-r----- 1 root adm 20 2006-05-25 06:26 mysql.err.3.gz
-rw-r----- 1 root adm 20 2006-05-24 06:25 mysql.err.4.gz
-rw-r----- 1 root adm 20 2006-05-23 06:25 mysql.err.5.gz
-rw-r----- 1 root adm 20 2006-05-22 06:25 mysql.err.6.gz
-rw-r----- 1 root adm 20 2006-05-21 06:26 mysql.err.7.gz
-rw-r----- 1 mysql adm 0 2006-05-27 06:25 mysql.log
-rw-r----- 1 mysql adm 20 2006-05-27 06:25 mysql.log.1.gz
-rw-r----- 1 mysql adm 20 2006-05-26 06:25 mysql.log.2.gz
-rw-r----- 1 mysql adm 20 2006-05-25 06:26 mysql.log.3.gz
-rw-r----- 1 mysql adm 20 2006-05-24 06:25 mysql.log.4.gz
-rw-r----- 1 mysql adm 20 2006-05-23 06:25 mysql.log.5.gz
-rw-r----- 1 mysql adm 20 2006-05-22 06:25 mysql.log.6.gz
-rw-r----- 1 mysql adm 20 2006-05-21 06:26 mysql.log.7.gz
drwxr-sr-x 2 news news 4096 2006-05-10 00:33 news
-rw-r----- 1 root adm 697707 2006-05-27 14:17 syslog
-rw-r----- 1 root adm 702394 2006-05-27 06:25 syslog.0
-rw-r----- 1 root adm 35479 2006-05-26 06:25 syslog.1.gz
-rw-r----- 1 root adm 37140 2006-05-25 06:25 syslog.2.gz
-rw-r----- 1 root adm 35129 2006-05-24 06:25 syslog.3.gz
-rw-r----- 1 root adm 39180 2006-05-23 06:25 syslog.4.gz
-rw-r----- 1 root adm 36057 2006-05-22 06:25 syslog.5.gz
-rw-r----- 1 root adm 37474 2006-05-21 06:25 syslog.6.gz
-rw-r----- 1 root adm 0 2006-05-21 06:47 user.log
-rw-r----- 1 root adm 127 2006-05-15 10:38 user.log.0
-rw-r----- 1 root adm 368 2006-05-13 23:33 user.log.1.gz
-rw-r--r-- 1 root root 0 2006-05-10 00:33 uucp.log
-rw-rw-r-- 1 root utmp 277248 2006-05-27 14:16 wtmp
-rw-r--r-- 1 root root 465969 2006-05-27 12:26 xferlog

till
27th May 2006, 16:19
Please post the output of:

ls -lah /var/log/httpd
ls -lah /var/log/apache2

nenad
27th May 2006, 16:33
server200:/var/www/web2# ls -lah /var/log/httpd
total 14M
drwxr-xr-x 2 root root 4.0K 2006-05-27 00:00 .
drwxr-xr-x 10 root root 4.0K 2006-05-27 06:25 ..
lrwxrwxrwx 1 root root 46 2006-05-27 00:00 ispconfig_access_log -> /var/log/httpd/ispconfig_access_log_2006_05_27
-rw-r--r-- 1 root root 4.1K 2006-05-10 22:36 ispconfig_access_log_2006_05_10
-rw-r--r-- 1 root root 1.8M 2006-05-11 23:59 ispconfig_access_log_2006_05_11
-rw-r--r-- 1 root root 460K 2006-05-12 23:59 ispconfig_access_log_2006_05_12
-rw-r--r-- 1 root root 401K 2006-05-13 23:59 ispconfig_access_log_2006_05_13
-rw-r--r-- 1 root root 1001K 2006-05-14 23:59 ispconfig_access_log_2006_05_14
-rw-r--r-- 1 root root 248K 2006-05-15 23:59 ispconfig_access_log_2006_05_15
-rw-r--r-- 1 root root 427K 2006-05-16 23:59 ispconfig_access_log_2006_05_16
-rw-r--r-- 1 root root 2.0M 2006-05-17 23:59 ispconfig_access_log_2006_05_17
-rw-r--r-- 1 root root 1.8M 2006-05-18 23:59 ispconfig_access_log_2006_05_18
-rw-r--r-- 1 root root 573K 2006-05-19 23:59 ispconfig_access_log_2006_05_19
-rw-r--r-- 1 root root 650K 2006-05-20 23:59 ispconfig_access_log_2006_05_20
-rw-r--r-- 1 root root 422K 2006-05-21 23:58 ispconfig_access_log_2006_05_21
-rw-r--r-- 1 root root 380K 2006-05-22 23:59 ispconfig_access_log_2006_05_22
-rw-r--r-- 1 root root 520K 2006-05-24 23:59 ispconfig_access_log_2006_05_24
-rw-r--r-- 1 root root 444K 2006-05-25 23:59 ispconfig_access_log_2006_05_25
-rw-r--r-- 1 root root 752K 2006-05-26 23:59 ispconfig_access_log_2006_05_26
-rw-r--r-- 1 root root 1.4M 2006-05-27 16:30 ispconfig_access_log_2006_05_27

nenad
27th May 2006, 16:33
server200:/var/www/web2# ls -lah /var/log/apache2
total 808K
drwxr-xr-x 2 root root 4.0K 2006-05-21 06:26 .
drwxr-xr-x 10 root root 4.0K 2006-05-27 06:25 ..
-rw-r----- 1 root adm 78 2006-05-25 20:21 access.log
-rw-r----- 1 root adm 304 2006-05-21 01:50 access.log.1
-rw-r----- 1 root adm 295 2006-05-21 06:26 access.log.2.gz
-rw-r----- 1 root adm 393K 2006-05-27 16:22 error.log
-rw-r----- 1 root adm 370K 2006-05-21 06:26 error.log.1
-rw-r----- 1 root adm 9.9K 2006-05-21 06:26 error.log.2.gz
server200:/var/www/web2#

till
27th May 2006, 16:35
Ok, this means the logs where written by apache but the ISPConfig logsplitting script is not run.

Did you get any errors when you run the following command as root user on the shell:

/root/ispconfig/php/php /root/ispconfig/scripts/shell/logs.php

nenad
27th May 2006, 16:38
/root/ispconfig/php/php /root/ispconfig/scripts/shell/logs.php

there are no errors at all ?

till
27th May 2006, 16:42
How long has it take to run the file? Please check your syslog for cron errors that occur in the morning.

nenad
27th May 2006, 16:52
How long has it take to run the file? Please check your syslog for cron errors that occur in the morning.

It takes just a second. Where is exactly syslog filew where should I check for errors?

server200:/var/www/web2# /var/log/syslog

IW /var/log/syslog Row 1 Col 1 4:52 Ctrl-K H for help
May 27 06:25:26 server200 syslogd 1.4.1#17: restart.
May 27 06:25:29 server200 proftpd[3483]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session closed.
May 27 06:25:29 server200 postfix/smtpd[32478]: connect from localhost.localdomain[127.0.0.1]
May 27 06:25:29 server200 postfix/smtpd[32478]: disconnect from localhost.localdomain[127.0.0.1]
May 27 06:26:29 server200 proftpd[3581]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session opened.
May 27 06:26:34 server200 proftpd[3581]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session closed.
May 27 06:26:34 server200 postfix/smtpd[32478]: connect from localhost.localdomain[127.0.0.1]
May 27 06:26:34 server200 postfix/smtpd[32478]: disconnect from localhost.localdomain[127.0.0.1]
May 27 06:27:34 server200 proftpd[3599]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session opened.
May 27 06:27:39 server200 proftpd[3599]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session closed.
May 27 06:27:40 server200 postfix/smtpd[32478]: connect from localhost.localdomain[127.0.0.1]
May 27 06:27:40 server200 postfix/smtpd[32478]: disconnect from localhost.localdomain[127.0.0.1]
May 27 06:28:40 server200 proftpd[3615]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session opened.
May 27 06:28:45 server200 proftpd[3615]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session closed.
May 27 06:28:45 server200 postfix/smtpd[32478]: connect from localhost.localdomain[127.0.0.1]
May 27 06:28:45 server200 postfix/smtpd[32478]: disconnect from localhost.localdomain[127.0.0.1]
May 27 06:29:45 server200 proftpd[3633]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session opened.
May 27 06:29:50 server200 proftpd[3633]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session closed.
May 27 06:29:50 server200 postfix/smtpd[32478]: connect from localhost.localdomain[127.0.0.1]
May 27 06:29:50 server200 postfix/smtpd[32478]: disconnect from localhost.localdomain[127.0.0.1]
May 27 06:30:02 server200 /USR/SBIN/CRON[3643]: (root) CMD ([ -x /etc/munin/plugins/apt ] && /etc/munin/plugins/apt update 7
May 27 06:30:02 server200 /USR/SBIN/CRON[3644]: (munin) CMD (if [ -x /usr/bin/munin-cron ]; then /usr/bin/munin-cron; fi)
May 27 06:30:50 server200 proftpd[3878]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session opened.
May 27 06:30:55 server200 proftpd[3878]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session closed.
May 27 06:30:55 server200 postfix/smtpd[32478]: connect from localhost.localdomain[127.0.0.1]
May 27 06:30:55 server200 postfix/smtpd[32478]: disconnect from localhost.localdomain[127.0.0.1]
May 27 06:31:55 server200 proftpd[3896]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session opened.
May 27 06:32:00 server200 proftpd[3896]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session closed.
May 27 06:32:00 server200 postfix/smtpd[32478]: connect from localhost.localdomain[127.0.0.1]
May 27 06:32:00 server200 postfix/smtpd[32478]: disconnect from localhost.localdomain[127.0.0.1]
May 27 06:33:00 server200 proftpd[3912]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session opened.
May 27 06:33:05 server200 proftpd[3912]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session closed.
May 27 06:33:05 server200 postfix/smtpd[32478]: connect from localhost.localdomain[127.0.0.1]
May 27 06:33:05 server200 postfix/smtpd[32478]: disconnect from localhost.localdomain[127.0.0.1]
May 27 06:34:05 server200 proftpd[3930]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session opened.
May 27 06:34:10 server200 proftpd[3930]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session closed.
May 27 06:34:10 server200 postfix/smtpd[32478]: connect from localhost.localdomain[127.0.0.1]
May 27 06:34:10 server200 postfix/smtpd[32478]: disconnect from localhost.localdomain[127.0.0.1]
May 27 06:35:01 server200 /USR/SBIN/CRON[3946]: (root) CMD ([ -x /etc/munin/plugins/apt ] && /etc/munin/plugins/apt update 7
May 27 06:35:01 server200 /USR/SBIN/CRON[3947]: (munin) CMD (if [ -x /usr/bin/munin-cron ]; then /usr/bin/munin-cron; fi)
May 27 06:35:10 server200 proftpd[4174]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session opened.
May 27 06:35:15 server200 proftpd[4174]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session closed.

falko
27th May 2006, 21:26
server200:/var/www/web2# ls -lah /var/log/httpd
total 14M
drwxr-xr-x 2 root root 4.0K 2006-05-27 00:00 .
drwxr-xr-x 10 root root 4.0K 2006-05-27 06:25 ..
lrwxrwxrwx 1 root root 46 2006-05-27 00:00 ispconfig_access_log -> /var/log/httpd/ispconfig_access_log_2006_05_27
-rw-r--r-- 1 root root 4.1K 2006-05-10 22:36 ispconfig_access_log_2006_05_10
-rw-r--r-- 1 root root 1.8M 2006-05-11 23:59 ispconfig_access_log_2006_05_11
-rw-r--r-- 1 root root 460K 2006-05-12 23:59 ispconfig_access_log_2006_05_12
-rw-r--r-- 1 root root 401K 2006-05-13 23:59 ispconfig_access_log_2006_05_13
-rw-r--r-- 1 root root 1001K 2006-05-14 23:59 ispconfig_access_log_2006_05_14
-rw-r--r-- 1 root root 248K 2006-05-15 23:59 ispconfig_access_log_2006_05_15
-rw-r--r-- 1 root root 427K 2006-05-16 23:59 ispconfig_access_log_2006_05_16
-rw-r--r-- 1 root root 2.0M 2006-05-17 23:59 ispconfig_access_log_2006_05_17
-rw-r--r-- 1 root root 1.8M 2006-05-18 23:59 ispconfig_access_log_2006_05_18
-rw-r--r-- 1 root root 573K 2006-05-19 23:59 ispconfig_access_log_2006_05_19
-rw-r--r-- 1 root root 650K 2006-05-20 23:59 ispconfig_access_log_2006_05_20
-rw-r--r-- 1 root root 422K 2006-05-21 23:58 ispconfig_access_log_2006_05_21
-rw-r--r-- 1 root root 380K 2006-05-22 23:59 ispconfig_access_log_2006_05_22
-rw-r--r-- 1 root root 520K 2006-05-24 23:59 ispconfig_access_log_2006_05_24
-rw-r--r-- 1 root root 444K 2006-05-25 23:59 ispconfig_access_log_2006_05_25
-rw-r--r-- 1 root root 752K 2006-05-26 23:59 ispconfig_access_log_2006_05_26
-rw-r--r-- 1 root root 1.4M 2006-05-27 16:30 ispconfig_access_log_2006_05_27
Actually, the logging is working...

nenad
27th May 2006, 21:48
???

Then what might be wrong? I didn't restarted server for 2 weeks.
Maybie I should try that?

till
28th May 2006, 10:30
It takes just a second. Where is exactly syslog filew where should I check for errors?

The file /var/log/syslog is the correct file. You can try to find the errors by running

cat /var/log/syslog | grep error

nenad
28th May 2006, 23:16
server200:~# cat /var/log/syslog | grep error
May 28 17:02:59 server200 postfix/smtp[7144]: 944A76C296: to=<nenad@neobee.net>, relay=none, delay=57, status=deferred (Host or domain name not found. Name service error for name=neobee.net type=MX: Host not found, try again)
May 28 20:34:17 server200 monit[1659]: HTTP error: Server returned status 404
May 28 20:35:24 server200 monit[1659]: HTTP error: Server returned status 404
May 28 20:36:30 server200 monit[1659]: HTTP error: Server returned status 404
May 28 20:37:37 server200 monit[1659]: HTTP error: Server returned status 404
May 28 20:38:44 server200 monit[1659]: HTTP error: Server returned status 404
May 28 20:39:50 server200 monit[1659]: HTTP error: Server returned status 404
May 28 20:40:57 server200 monit[1659]: HTTP error: Server returned status 404
May 28 20:42:04 server200 monit[1659]: HTTP error: Server returned status 404
May 28 20:43:11 server200 monit[1659]: HTTP error: Server returned status 404
May 28 20:44:17 server200 monit[1659]: HTTP error: Server returned status 404
May 28 20:45:23 server200 monit[1659]: HTTP error: Server returned status 404
May 28 20:46:29 server200 monit[1659]: HTTP error: Server returned status 404
May 28 20:47:36 server200 monit[1659]: HTTP error: Server returned status 404
May 28 20:48:42 server200 monit[1659]: HTTP error: Server returned status 404
May 28 20:49:48 server200 monit[1659]: HTTP error: Server returned status 404
May 28 20:50:54 server200 monit[1659]: HTTP error: Server returned status 404
May 28 20:52:01 server200 monit[1659]: HTTP error: Server returned status 404
May 28 20:53:07 server200 monit[1659]: HTTP error: Server returned status 404
May 28 20:54:13 server200 monit[1659]: HTTP error: Server returned status 404
May 28 20:55:19 server200 monit[1659]: HTTP error: Server returned status 404
May 28 20:56:26 server200 monit[1659]: HTTP error: Server returned status 404
server200:~#

(I temporararly disabled server200 throught ruter panel, that is why there is HTTP error)

nenad
3rd June 2006, 16:13
Is there something wrong within this crontab file?

30 00 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/logs.php &> /dev/null
59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/ftp_logs.php &> /dev/null
59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/mail_logs.php &> /dev/null
59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/cleanup.php &> /dev/null
0 4 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php &> /dev/null
0,30 * * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/check_services.php &> /dev/null
15 3,15 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/quota_msg.php &> /dev/null
40 00 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/traffic.php &> /dev/null
05 02 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/backup.php &> /dev/null

falko
3rd June 2006, 22:11
No, it's looking good. :)

Mountainman
4th June 2006, 02:01
Got a similar/same problem here...

I installed ISPConfig on Debian Sarge according to the Perfect Setup Guide.

When I want to view website statistics ( and yes the site has been visited...), I go to http://website.com/stats and log in with a correct Username / Pass. After I logged in I'm presented with a 403.

When I look into the stats-dir, it appears to be empty ( together with it's web# directory ).

I did a grep on cron-errors in /var/log/syslog and /var/log/messages, in syslog it says:


Jun 4 00:02:01 highmountain /USR/SBIN/CRON[9720]: (logcheck) CMD ( if [ -x /usr/sbin/logcheck ]; then nice -n10 /usr/sbin/logcheck; fi)
Jun 4 00:09:01 highmountain /USR/SBIN/CRON[10587]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Jun 4 00:17:01 highmountain /USR/SBIN/CRON[10706]: (root) CMD ( run-parts --report /etc/cron.hourly)
Jun 4 00:39:01 highmountain /USR/SBIN/CRON[10999]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Jun 4 01:02:01 highmountain /USR/SBIN/CRON[11308]: (logcheck) CMD ( if [ -x /usr/sbin/logcheck ]; then nice -n10 /usr/sbin/logcheck; fi)
Jun 4 01:09:01 highmountain /USR/SBIN/CRON[12159]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Jun 4 01:17:01 highmountain /USR/SBIN/CRON[12274]: (root) CMD ( run-parts --report /etc/cron.hourly)
Jun 4 01:30:22 highmountain crontab[12466]: (root) BEGIN EDIT (root)
Jun 4 01:31:03 highmountain crontab[12466]: (root) REPLACE (root)
Jun 4 01:31:03 highmountain crontab[12466]: (root) END EDIT (root)


The grep on /var/log/messages doesn't show anything.

Then I did the /etc/init.d/cron stop and the pkill cron, crontab -e and a save of the crontab. After 24 hours stats still won't compile.

When I do a :

/root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php

The shell doesn't give any feedback...

till
4th June 2006, 10:34
When I do a :

/root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php

The shell doesn't give any feedback...

How long did you wait? It may take half an hour or longer, depending on the traffic of your sites. Did the cursor return?

Please post the output of:

ls -la /var/log/httpd

falko
4th June 2006, 15:31
Is webalizer installed? What's the output of which webalizer?

Mountainman
4th June 2006, 20:31
@ Till:

the cursor returned almost instantly

ls -la /var/log/httpd:


total 9184
drwxr-xr-x 2 root root 4096 2006-06-04 02:53 .
drwxr-xr-x 13 root root 4096 2006-06-03 06:25 ..
lrwxrwxrwx 1 root root 46 2006-06-04 02:53 ispconfig_access_log -> /var/l og/httpd/ispconfig_access_log_2006_06_04
-rw-r--r-- 1 root root 5269 2006-05-29 23:43 ispconfig_access_log_2006_05_2 9
-rw-r--r-- 1 root root 1006171 2006-05-30 23:59 ispconfig_access_log_2006_05_3 0
-rw-r--r-- 1 root root 2486815 2006-05-31 23:59 ispconfig_access_log_2006_05_3 1
-rw-r--r-- 1 root root 3364061 2006-06-01 23:57 ispconfig_access_log_2006_06_0 1
-rw-r--r-- 1 root root 940818 2006-06-02 23:19 ispconfig_access_log_2006_06_0 2
-rw-r--r-- 1 root root 671685 2006-06-03 23:56 ispconfig_access_log_2006_06_0 3
-rw-r--r-- 1 root root 883059 2006-06-04 20:26 ispconfig_access_log_2006_06_0 4


@Falko:

yes I've got webalizer installed;

which webalizer:
/usr/bin/webalizer

till
5th June 2006, 11:41
Please run the script:

/root/ispconfig/php/php /root/ispconfig/scripts/shell/logs.php

Did you get any errors? If not, run the webalizer script afterwards:

/root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php

Mountainman
5th June 2006, 12:07
Hi Till,

I did get some errors :( :


Warning: include(/home/admispconfig/ispconfig/lib/config.inc.php): failed to open stream: Permission denied in /root/ispconfig/scripts/lib/config.inc.php on line 30

Warning: include(): Failed opening '/home/admispconfig/ispconfig/lib/config.inc.php' for inclusion (include_path='.:') in /root/ispconfig/scripts/lib/config.inc.php on line 30
Could not connect to MySQL server!


What should i do?

falko
5th June 2006, 14:05
What's the output of ls -la /home/admispconfig/ispconfig/lib?

Mountainman
5th June 2006, 14:07
highmountain:/# ls -la /home/admispconfig/ispconfig/lib
total 76
drwxr-xr-x 6 admispconfig admispconfig 4096 2006-05-29 11:46 .
drwxr-xr-x 8 admispconfig admispconfig 4096 2006-06-05 13:08 ..
-rwxr-xr-x 1 admispconfig admispconfig 6340 2006-05-22 22:17 app.inc.php
-rwxr-xr-x 1 admispconfig admispconfig 1768 2006-05-22 22:17 banner.inc.php
drwxr-xr-x 2 admispconfig admispconfig 4096 2006-05-22 22:17 classes
-rw------- 1 admispconfig admispconfig 6433 2006-05-29 11:46 config.inc.php
-rwxr-xr-x 1 admispconfig admispconfig 354 2006-05-22 22:17 copyright.inc.php
-rwxr-xr-x 1 admispconfig admispconfig 7502 2006-05-22 22:17 go_info.inc.php
drwxr-xr-x 2 admispconfig admispconfig 4096 2006-05-22 22:17 help
-rwxr-xr-x 1 admispconfig admispconfig 324 2006-05-22 22:17 index.php
drwxr-xr-x 2 admispconfig admispconfig 4096 2006-05-22 22:17 lang
drwxr-xr-x 2 admispconfig admispconfig 4096 2006-05-22 22:17 plugins
-rwxr-xr-x 1 admispconfig admispconfig 5 2006-05-22 22:17 preload.inc.php
-rwxr-xr-x 1 admispconfig admispconfig 11876 2006-05-22 22:17 session.inc.php

falko
5th June 2006, 14:27
Hi Till,

I did get some errors :( :


Warning: include(/home/admispconfig/ispconfig/lib/config.inc.php): failed to open stream: Permission denied in /root/ispconfig/scripts/lib/config.inc.php on line 30

Warning: include(): Failed opening '/home/admispconfig/ispconfig/lib/config.inc.php' for inclusion (include_path='.:') in /root/ispconfig/scripts/lib/config.inc.php on line 30
Could not connect to MySQL server!


What should i do?
You must run these commands as root!

Mountainman
5th June 2006, 14:53
Omg very stupid, I always do a su when i log in :S really strange I didn't did it then.. feel n00bish :S

ah well, very happy that it's fix0red! :D

I presume that stats are now automatically maintained and i do not have to run these scripts again?

grz and thnx a lot (again)!

falko
5th June 2006, 14:55
I presume that stats are now automatically maintained and i do not have to run these scripts again?

You should observe that over the next few days.

Mountainman
8th June 2006, 10:18
Dear Falko,

I observed the compilation of statistics the last few days, but they aren't compiled over night... Do you have any suggestion on what to do?

grz,

p.s

when I run the scripts manually ( log and webalizer ) then everything is fine...

till
8th June 2006, 12:11
Please check your syslog for cron errors in the early morning hours.

falko
8th June 2006, 15:23
What's the output of crontab -l (you must run this as root)?

Mountainman
9th June 2006, 10:45
contrab -l:


30 00 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/logs.php &> /dev/null
59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/ftp_logs.php &> /dev/null
59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/mail_logs.php &> /dev/null
59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/cleanup.php &> /dev/null
0 4 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php &> /dev/null
0,30 * * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/check_services.php &> /dev/null
15 3,15 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/quota_msg.php &> /dev/null
40 00 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/traffic.php &> /dev/null
05 02 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/backup.php &> /dev/null


a cat /var/log/syslog | grep error doesn't give any feedback...

thanks for helping!

falko
9th June 2006, 12:08
Looks ok. Can you try this again: http://www.howtoforge.com/forums/showpost.php?p=3227&postcount=8

Mountainman
10th June 2006, 15:01
after the last time I ran both scripts (log.php and webalizer.php) all seems to be fine :confused:

Ah well it's working :D

tnx again...

cctex10
14th June 2006, 19:03
When I do the command i get...

s1:~ # /root/ispconfig/php/php /root/ispconfig/scripts/shell/logs.php

Warning: readlink(): Invalid argument in /root/ispconfig/scripts/shell/logs.php on line 125

Warning: readlink(): Invalid argument in /root/ispconfig/scripts/shell/logs.php on line 125
_______________________________
My stats dont work... HELP

403 Error stats..

GURRRRR

till
15th June 2006, 14:57
When I do the command i get...

s1:~ # /root/ispconfig/php/php /root/ispconfig/scripts/shell/logs.php

Warning: readlink(): Invalid argument in /root/ispconfig/scripts/shell/logs.php on line 125

Warning: readlink(): Invalid argument in /root/ispconfig/scripts/shell/logs.php on line 125

Thats just a warning, nothing serious.

nenad
23rd June 2006, 20:34
Unbeliveable but true:

/etc/init.d/cron stop
pkill cron
crontab -e
... and save it again.
/etc/init.d/cron start

Didn't helped me.

But DELETING of crontab file and writing new one RESOLVED crontab & statistcs issue?

Finally, I don't have to run manually those scripts for refreshing statictics every day.

BTW this can be added and thus help you to see if script is executing:

00 4 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php 2>&1 | mail -s "webalizer is proceessing logs" your.name@yourdomain.com


30 0 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/logs.php &> /dev/null
59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/ftp_logs.php &> /dev/null
59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/mail_logs.php &> /dev/null
59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/cleanup.php &> /dev/null
00 4 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php 2>&1 | mail -s "webalizer is proceessing logs" your.name@yourdomain.com
0,30 * * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/check_services.php &> /dev/null
15 3,15 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/quota_msg.php &> /dev/null
40 00 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/traffic.php &> /dev/null
05 02 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/backup.php &> /dev/null

falko
24th June 2006, 15:20
I'm glad it finally worked out. :)

ProgressiveBastion
11th July 2006, 13:06
after the last time I ran both scripts (log.php and webalizer.php) all seems to be fine :confused:

Ah well it's working :D

tnx again...

After running the 2 suggested commands it seems to work I can see my stats. Very cool. If it seems to not work after a few days I guess it'lll be back to the forums...

peace Michael

p.s. thanks for the info till & falko...

Ovidiu
2nd August 2006, 08:03
hi there,

after moving to a new server, it seems stats are not generated, I had a look inside my webxxx/log/ folders and it seems the log.php script is running and splitting the logs so that each web now has its logs inside its log folder, but for a newly created site (a weeke ago) the stats folder is not being created and for the older sites the stats are not compiled, it still shows me stats from july ...

here is some sample commands I tried:

stop cron edit crontab save restart cron did not help

h898552:/var/www# /root/ispconfig/php/php /root/ispconfig/scripts/shell/logs.php

Warning: readlink(): Invalid argument in /root/ispconfig/scripts/shell/logs.php on line 125


h898552:/var/www# /root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php
h898552:/var/www#


the prompt returned 2-3 seconds after I ran the webalizer script...

Ovidiu
3rd August 2006, 08:01
Please I need some help. its 3.rd august and I have no stats for this month. any feedback you can give? what can I do to debug this problem?

till
3rd August 2006, 09:35
Do you have logfiles with todays and yesterdays date in /var/log/httpd ?

Ovidiu
3rd August 2006, 10:08
yes I have and there are also logs inside the webXXX fodlers, meaning it seems like the logs are getting splitte ok, its just that no stats are processed by webalizer!?

till
3rd August 2006, 10:20
What is the output of:

which webalizer

Ovidiu
3rd August 2006, 10:22
h898552:~# which webalizer
/usr/bin/webalizer
h898552:~#

falko
3rd August 2006, 15:07
What's the output of crontab -l (you must run this as root)?

Ovidiu
3rd August 2006, 15:15
here is the output:

h898552:/home/ovi# crontab -l
30 00 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/logs.php &> /dev/null
59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/ftp_logs.php &> /dev/null
59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/mail_logs.php &> /dev/null
59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/cleanup.php &> /dev/null
0 4 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php &> /dev/null
0,30 * * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/check_services.php &> /dev/null
15 3,15 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/quota_msg.php &> /dev/null
40 00 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/traffic.php &> /dev/null
05 02 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/backup.php &> /dev/null
0 4 * * * /usr/local/bin/ftplicity backup #daily ftplicity backup to FTP_Backupspace
0 6 1 * * /usr/local/bin/ftplicity full && /usr/local/bin/ftplicity purge --force #monthly full backup + deleting of old records
h898552:/home/ovi#


btw. I tried almost everything you have already suggested in this 13-pages post as I did not want to waste your time, but its a no-go.nothing works.

falko
4th August 2006, 12:49
Then I don't know how to help you from here... We could log in to your server and try to fix it, but that would be paid support then, of course...

Ovidiu
6th August 2006, 19:05
I did not want to appear rude, I am just very frustrated :-(

can you give me a tip how to debug the webalizer script? to get its output? Like I said, I start it and seconds later I am back at the command prompt...

nenad
6th August 2006, 19:15
Tenaka,

I had very similiar problem.

Look one page back.

http://www.howtoforge.com/forums/showthread.php?t=562&page=3

The problem was in crontab.

Once when I DELETED crontab file, and RETYPED it from scratch, webalizer scripts were executed from crontab as it should be.

I don't know why that happened, maybie some buggy character which was invisibble or who knows what, but that is how I resolved the problem.

Give it a try....

And drink FANTA - Stay Bamboocha :) :) :) just joking

Ovidiu
6th August 2006, 19:33
retyping did not work either :-(

can someone tell me which script shopuld create the stats folder? that isn't created either for new sites.

falko
7th August 2006, 13:27
can someone tell me which script shopuld create the stats folder? that isn't created either for new sites.
It's /root/ispconfig/scripts/shell/webalizer.php.

Ovidiu
12th August 2006, 09:59
I contacted falko to get paid support, but one last thing I tried seems to have fixed everything:

went to ispconfig, login as admin, went to the site that does not produce stat, went to options and below, unchecked Webalizer
Statistics: saved the site, waited some minutes, checked it again and saveed the site again.

this seems to have helped me, since this morning my stats appeared again. I feel a bit like doing voodoo magic here, try this and pray, try that and pray :D

nenad
19th September 2006, 22:10
this seems to have helped me, since this morning my stats appeared again. I feel a bit like doing voodoo magic here, try this and pray, try that and pray

But you throwed chicken bones all over the place, didn't you? If you didn't maybie that was the problem, 'cos you have to do voodoo magic with bones :) ;)

madcrock
3rd October 2006, 23:36
http://www.howtoforge.com/forums/showthread.php?p=43397#post43397

gilas
4th October 2006, 08:38
I contacted falko to get paid support, but one last thing I tried seems to have fixed everything:

went to ispconfig, login as admin, went to the site that does not produce stat, went to options and below, unchecked saved the site, waited some minutes, checked it again and saveed the site again.

this seems to have helped me, since this morning my stats appeared again. I feel a bit like doing voodoo magic here, try this and pray, try that and pray :D

Dear Tenaka I getting crazy for webalizer that is not working. I tried to use admin interface, select the interested site then click on options but I cant see any itemto check/uncheck about webalizer. I suspect the problem is anywhere.

Looking into webalizer.php i discovered that there is a query on the table isp_isp_web, field: webalizer_stats but I have not this field. Then I added the field and set it to '1' withouth any result.

Could you help me please? Thank you!

till
4th October 2006, 09:41
Dear Tenaka I getting crazy for webalizer that is not working. I tried to use admin interface, select the interested site then click on options but I cant see any itemto check/uncheck about webalizer. I suspect the problem is anywhere.

Looking into webalizer.php i discovered that there is a query on the table isp_isp_web, field: webalizer_stats but I have not this field. Then I added the field and set it to '1' withouth any result.

Could you help me please? Thank you!

Which ISPConfig version do you have installed?

Ben
15th December 2006, 13:08
i stillt got the problem not to have any stats on my server. So any ideas where to take a look?

till
15th December 2006, 18:03
i stillt got the problem not to have any stats on my server. So any ideas where to take a look?

The only solution I see is to try to debug the logs.php and webalizer.php files step by step on your server, to see what fails and why they fail.

Ben
15th December 2006, 18:41
good idea ;) WOndering why i did not head it earlier.
Looks like it does not find webalizer, so i will install it and see then...

DaFux
3rd December 2008, 10:41
Maybe slightly off-topic - but I got a question about the statistics in general: How do I comile the statistics more often than once a day? I changed the cron job, but that does not give me more recent statistics until I found out that I have to call

/root/ispconfig/php/php /root/ispconfig/scripts/shell/logs.php

as well to make sure the latest log entries are available for webalizer.

So, my question: Does it hurt to run the logs script more than once a day? Is it possible to update just the statiistics of ONE web more frequently and let the others untouched?

Cheers
Dafux
http://www.hoppenrath.com/isp/avatar_e.jpg

till
3rd December 2008, 11:03
Does it hurt to run the logs script more than once a day?

Yes, the statistics will be incorrect if the script is run more then once a day.

Is it possible to update just the statiistics of ONE web more frequently and let the others untouched?

No.

codemaster
11th November 2010, 10:54
5 years on, and this solution worked perfectly for me as well. Kudos to jmroth!