Maint not running Linux

Ask your questions regarding TimeTrex installation here.
Locked
rons
Posts: 52
Joined: Fri Jul 06, 2007 11:24 am

Maint not running Linux

Post by rons »

I am running on Ubuntu server box. The command given in the setup for the cron job was su www-data -c "php ../TimeTrex/classes/.../cron.php"> /dev/null > 2 &1. I was getting the Maintenance Not Ran error after logiing in two days after installation. When I tried running it from the command line it said file not found. I found the cron.php in the maint directory and changed the path to the file. I get this:
LibClamAV Error: cl_loaddbdir(): Can't open directory /var/lib/clamav
PHP Warning: cl_loaddbdir: Unable to open file or directory
in Unknown on line 0
PHP Warning: Unknown(): Unable to initialize module 'clamav' in Unknown on line 0

Parse error: syntax error, unexpected T_STATIC, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/swiftbo/public_html/TimeTrex/classes/modules/core/Environment.class.php on line 30.
Please help
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

What is the actual command you ran?
su www-data -c "php ../TimeTrex/classes/.../cron.php"> /dev/null > 2 &1
Looks like an approximation, but not the actual command, since it is invalid anyways.

Also I have no idea what the ClamAV errors are about:
LibClamAV Error: cl_loaddbdir():
They have nothing to do directly with TimeTrex, as ClamAV is an antivirus utility. It looks as though Ubuntu has a PHP ClamAV extension that you can install, which appears to be broken on your system, so I would try removing it. "php-clamav" is the Ubuntu package name I believe.
rons
Posts: 52
Joined: Fri Jul 06, 2007 11:24 am

Cron job

Post by rons »

I removed php-clamav. What is the correct command for the cron.php job? When I run su www-data -c "php ../TimeTrex/maint/cron.php" I get an error like what appeared before, Parse error: syntax error, unexpected T_STATIC, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/swiftbo/public_html/TimeTrex/classes/modules/core/Environment.class.php on line 30.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Try running:

Code: Select all

php -v
and make sure that the PHP version is in fact v5.x. That error usually means you are running PHP v4.
rons
Posts: 52
Joined: Fri Jul 06, 2007 11:24 am

Maintenance not running Linux

Post by rons »

Thanks again for the help. I had to install php5-cli for php to use version 5 from the command line. Hopefully this may help others if they encounter this problem.
Locked