WARNING: TimeTrex maintenance jobs have not run

General support regarding TimeTrex, such as
configuring policies/taxes or processing payroll.
Locked
millersvillegray
Posts: 5
Joined: Thu May 08, 2008 5:52 pm

WARNING: TimeTrex maintenance jobs have not run

Post by millersvillegray »

we have just installed TimeTrex on a mac os 10.4 server we have everything running and working except we keep getting the following error message.

WARNING: TimeTrex maintenance jobs have not run in the last 48hours. Please contact your TimeTrex administrator immediately.

I have placed the necessary command in crontab, and I have even tried to run it from the command line with full permissions. but the bloody error will not go away. I have tried to find another thread with a similar background though it appears most people having this problem are running windows computers. Please help.

2. Clearly state the EXACT steps you took before the issue occurred, or steps to reproduce the issue. Providing screenshots can help greatly if it is possible.

Added the the fallowing line to crontab as well as attempted to run the command as "administrator" as well as "system"

3. What version of TimeTrex you are running, specifically. (stating "the latest version" is not specific enough)

version 2.2.8

4. What version of PHP you are using.

php version 4.4.8

5. What operating system you are running.

MAc osX 10.4.11

6. What web server you are using.

mac osx web server, it is a version of apachie though I am not sure which one.

7. Have you configured PHP to log errors to a file, and what errors are showing up in this file?
("error_log = <filename>" in PHP.INI)

8. In your TimeTrex.ini.php file, set the following under the [debug] section:
enable = TRUE
enable_display = TRUE
buffer_output = TRUE
enable_log = TRUE
verbosity = 11
Reproduce the issue and include any relevent information from the TimeTrex log file in your post.

Debug Buffer
============================================================================
Memory Usage: 8490576
----------------------------------------------------------------------------
DEBUG [259]: [Function](): URI: /timetrex/interface/index.php
DEBUG [261]: [Function](): Version: 2.2.8 Edition: 10 Production: 1 Demo Mode: 0
DEBUG [107]: TTDate::setTimeZone(): Setting TimeZone: America/New_York
DEBUG [497]: Authentication::Check(): Session Name: SessionID
DEBUG [503]: Authentication::Check(): Session ID: 04b1d5cb0003c592b26181e08fad60f8
DEBUG [399]: Validator::stripNonAlphaNumeric(): Alpha Numeric String:04b1d5cb0003c592b26181e08fad60f8
DEBUG [78]: Authentication::getIdle(): Idle Seconds Allowed: 14400
DEBUG [399]: Validator::stripNonAlphaNumeric(): Alpha Numeric String:04b1d5cb0003c592b26181e08fad60f8
DEBUG [69]: [Function](): User Authenticated: eric Created Date: 1210291665
DEBUG [1961]: UserFactory::isInformationComplete(): User Information is Complete:
DEBUG [102]: TTDate::setTimeZone(): TimeZone already set to: America/New_York
DEBUG [135]: TTDate::setDateFormat(): Setting Default Date Format: d-M-y
DEBUG [149]: TTDate::setTimeFormat(): Setting Default Time Format: g:i A
DEBUG [163]: TTDate::setTimeUnitFormat(): Setting Default Time Unit Format: 10
DEBUG [101]: [Function](): Locale Cookie: en_US
DEBUG [287]: TTi18n::getLanguageFromLocale(): Locale: en_US
DEBUG [109]: [Function](): User Preference Language matches cookie!
DEBUG [318]: TTi18n::setLocale(): Generated/Passed In Locale:
DEBUG [252]: TTi18n::generateLocale(): Array of Locales to try in order: en_US,en_US.UTF-8,en,en.UTF-8
DEBUG [211]: TTi18n::tryLocale(): Found valid locale: en_US
DEBUG [324]: TTi18n::setLocale(): Attempting to set Locale(s) to: en_US Category: 0 Current Locale:
DEBUG [327]: TTi18n::setLocale(): Setting currency/numeric Locale to: en_US
DEBUG [340]: TTi18n::setLocale(): Setting translator locale to: en_US
DEBUG [357]: TTi18n::setLocale(): Set Master Locale To: en_US
DEBUG [1961]: UserFactory::isInformationComplete(): User Information is Complete:
DEBUG [1138]: UserPreferenceFactory::isPreferencesComplete(): User Preferences IS Complete:
DEBUG [138]: [Function](): Station ID Cookie found! b8230b74367e1441b04902b7c91ecbb7
DEBUG [241]: [Function](): UnRead Messages: 0
DEBUG [48]: BreadCrumb::setCrumb(): Dropping Bread Crumb: Home URL: /timetrex/interface/index.php
DEBUG [147]: [Function](): Request Hierarchy ID: 1
DEBUG [171] Array: HierarchyListFactory::getCurrentLevelIdArrayByHierarchyControlIdAndUserId(): Nodes at the same level

Array
(
[0] => 3
)


DEBUG [178]: HierarchyListFactory::getCurrentLevelIdArrayByHierarchyControlIdAndUserId(): Root User ID: 3 Shared: 0
DEBUG [151] Array: [Function](): Request Levels

Array
(
)


DEBUG [314]: HierarchyListFactory::getByHierarchyControlIdAndUserIdAndLevel(): User ID: 3 Level: 0
DEBUG [171] Array: HierarchyListFactory::getCurrentLevelIdArrayByHierarchyControlIdAndUserId(): Nodes at the same level

Array
(
[0] => 3
)


DEBUG [178]: HierarchyListFactory::getCurrentLevelIdArrayByHierarchyControlIdAndUserId(): Root User ID: 3 Shared: 0
DEBUG [317] Array: HierarchyListFactory::getByHierarchyControlIdAndUserIdAndLevel(): Nodes at the same level

Array
(
[0] => 3
)


DEBUG [1517]: CompanyFactory::getLogoFileName(): Logo File Name: /var/timetrex/storage//company_logo/1/logo.jpg
============================================================================

============================================================================
PROFILER OUTPUT
============================================================================
Calls Time Routine
-----------------------------------------------------------------------------
1 78.7549 ms (7.96 %) Authentication::Check()
1 58.3341 ms (5.90 %) Interface.inc - Check for Exceptions
1 42.1329 ms (4.26 %) Interface.inc - Check for UNREAD messages...
3 10.6122 ms (1.07 %) getEmptyRecordSet()
1 57.3220 ms (5.80 %) setLocale()
1 472.0409 ms (47.73 %) unprofiled

269.7670 ms (27.28 %) Missed
============================================================================
988.9641 ms (100.00 %) OVERALL TIME
============================================================================
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Please post the exact command that you are running in cron, and the output when you run that command manually.
millersvillegray
Posts: 5
Joined: Thu May 08, 2008 5:52 pm

Post by millersvillegray »

Sorry for the delay, I was not able to get back to this on friday. The command we are using is this:

su admin -c "php /Library/WebServer/Documents/TimeTrex/classes/modules/core/../../../maint/cron.php > /dev/null 2>&1"

I have also tried running this manually as root on the system. And there is never any output after the command is run.

Thanks
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

What happens if run just this command?

Code: Select all

php /Library/WebServer/Documents/TimeTrex/classes/modules/core/../../../maint/cron.php
millersvillegray
Posts: 5
Joined: Thu May 08, 2008 5:52 pm

Post by millersvillegray »

Nothing happens. The system thinks for a fraction of a second and then returns to the command prompt.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Are your debug settings all enabled still? If not, enable them and run the command again.

As well, check your log file after you ran the command and see what the last 50-100 lines are.
8. In your TimeTrex.ini.php file, set the following under the [debug] section:
enable = TRUE
enable_display = TRUE
buffer_output = TRUE
enable_log = TRUE
verbosity = 11
Reproduce the issue and include any relevent information from the TimeTrex log file in your post.
millersvillegray
Posts: 5
Joined: Thu May 08, 2008 5:52 pm

Post by millersvillegray »

---------------[ Tue, 13 May 2008 15:39:04 -0400 (PID: 364) ]---------------
DEBUG [259]: <b>[Function]()</b>: URI: /timetrex/interface/index.php<br>
DEBUG [261]: <b>[Function]()</b>: Version: 2.2.8 Edition: 10 Production: 1 Demo Mode: 0<br>
DEBUG [107]: <b>TTDate::setTimeZone()</b>: Setting TimeZone: America/New_York<br>
DEBUG [497]: <b>Authentication::Check()</b>: Session Name: SessionID<br>
DEBUG [503]: <b>Authentication::Check()</b>: Session ID: 472745b60c863aa01a969edfadadd6f6<br>
DEBUG [399]: <b>Validator::stripNonAlphaNumeric()</b>: Alpha Numeric String:472745b60c863aa01a969edfadadd6f6<br>
DEBUG [78]: <b>Authentication::getIdle()</b>: Idle Seconds Allowed: 14400<br>
DEBUG [399]: <b>Validator::stripNonAlphaNumeric()</b>: Alpha Numeric String:472745b60c863aa01a969edfadadd6f6<br>
DEBUG [69]: <b>[Function]()</b>: User Authenticated: admin Created Date: 1210707190<br>
DEBUG [1961]: <b>UserFactory::isInformationComplete()</b>: User Information is Complete: <br>
DEBUG [102]: <b>TTDate::setTimeZone()</b>: TimeZone already set to: America/New_York<br>
DEBUG [135]: <b>TTDate::setDateFormat()</b>: Setting Default Date Format: m-d-Y<br>
DEBUG [149]: <b>TTDate::setTimeFormat()</b>: Setting Default Time Format: g:i A<br>
DEBUG [163]: <b>TTDate::setTimeUnitFormat()</b>: Setting Default Time Unit Format: 10<br>
DEBUG [101]: <b>[Function]()</b>: Locale Cookie: en_US<br>
DEBUG [287]: <b>TTi18n::getLanguageFromLocale()</b>: Locale: en_US<br>
DEBUG [109]: <b>[Function]()</b>: User Preference Language matches cookie!<br>
DEBUG [318]: <b>TTi18n::setLocale()</b>: Generated/Passed In Locale: <br>
DEBUG [252]: <b>TTi18n::generateLocale()</b>: Array of Locales to try in order: en_US,en_US.UTF-8,en,en.UTF-8<br>
DEBUG [211]: <b>TTi18n::tryLocale()</b>: Found valid locale: en_US<br>
DEBUG [324]: <b>TTi18n::setLocale()</b>: Attempting to set Locale(s) to: en_US Category: 0 Current Locale: <br>
DEBUG [327]: <b>TTi18n::setLocale()</b>: Setting currency/numeric Locale to: en_US<br>
DEBUG [340]: <b>TTi18n::setLocale()</b>: Setting translator locale to: en_US<br>
DEBUG [357]: <b>TTi18n::setLocale()</b>: Set Master Locale To: en_US<br>
DEBUG [1961]: <b>UserFactory::isInformationComplete()</b>: User Information is Complete: <br>
DEBUG [1138]: <b>UserPreferenceFactory::isPreferencesComplete()</b>: User Preferences IS Complete: <br>
DEBUG [138]: <b>[Function]()</b>: Station ID Cookie found! 3944c4602e8904968a3db00fb8939420<br>
DEBUG [241]: <b>[Function]()</b>: UnRead Messages: 0<br>
DEBUG [48]: <b>BreadCrumb::setCrumb()</b>: Dropping Bread Crumb: Home URL: /timetrex/interface/index.php<br>
DEBUG [147]: <b>[Function]()</b>: Request Hierarchy ID: 1<br>
DEBUG [171] Array: <b>HierarchyListFactory::getCurrentLevelIdArrayByHierarchyControlIdAndUserId()</b>: Nodes at the same level
<pre>
Array
(
[0] => 1
)
</pre><br>
DEBUG [178]: <b>HierarchyListFactory::getCurrentLevelIdArrayByHierarchyControlIdAndUserId()</b>: Root User ID: 1 Shared: 0<br>
DEBUG [151] Array: <b>[Function]()</b>: Request Levels
<pre>
Array
(
[0] => 1
)
</pre><br>
DEBUG [314]: <b>HierarchyListFactory::getByHierarchyControlIdAndUserIdAndLevel()</b>: User ID: 1 Level: 0<br>
DEBUG [171] Array: <b>HierarchyListFactory::getCurrentLevelIdArrayByHierarchyControlIdAndUserId()</b>: Nodes at the same level
<pre>
Array
(
[0] => 1
)
</pre><br>
DEBUG [178]: <b>HierarchyListFactory::getCurrentLevelIdArrayByHierarchyControlIdAndUserId()</b>: Root User ID: 1 Shared: 0<br>
DEBUG [317] Array: <b>HierarchyListFactory::getByHierarchyControlIdAndUserIdAndLevel()</b>: Nodes at the same level
<pre>
Array
(
[0] => 1
)
</pre><br>
DEBUG [1517]: <b>CompanyFactory::getLogoFileName()</b>: Logo File Name: /var/timetrex/storage//company_logo/1/logo.jpg<br>
---------------[ Tue, 13 May 2008 15:39:04 -0400 (PID: 364) ]---------------

Is this what you are looking for?
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

That is what we are looking for, but that debug output is from your Index.php page, not the result of running the cron.php file.

So you need to run the cron.php file with logging enabled, and then read the log file that is created (in your TimeTrex log directory) to know for sure if the cron.php file is actually doing anything.

Normally it outputs text to the screen to tell you, but depending on your settings this may be disabled somehow.
millersvillegray
Posts: 5
Joined: Thu May 08, 2008 5:52 pm

Post by millersvillegray »

carbon:/var/mysql root# php /Library/WebServer/Documents/TimeTrex/classes/modules/core/../../../maint/cron.php

Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /Library/WebServer/Documents/TimeTrex/classes/modules/core/Environment.class.php on line 30

I have no idea what is going on now, there is nothing showing in the log file, but this is now showing up on the command line.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

You are using the wrong version of PHP. You need to be running PHP v5.0 or greater, preferably v5.2.
linuxgnuru
Posts: 11
Joined: Thu May 22, 2008 3:59 am
Location: Tanzania

Different error

Post by linuxgnuru »

TimeTrex version: 2.2.8
Apache / PHP version information: Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.7l DAV/2 PHP/5.2.5
MySQL version: 5.0.51b
OS: Mac OS X 10.5.2

After manually running the

php /Library/WebServer/Documents/timetrex/classes/modules/core/../../../maint/cron.php

this is the result:

dyld: NSLinkModule() error
dyld: Symbol not found: _php_sig_gif
Referenced from: /usr/lib/php/extensions/no-debug-non-zts-20060613/gd.so
Expected in: flat namespace

Trace/BPT trap

but phpinfo() give me this:

gd

GD Support enabled
GD Version bundled (2.0.34 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.3.5
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XPM Support enabled
XBM Support enabled
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

You have something seriously wrong with your PHP installation. I have no idea what, but I would maybe try to re-install it fresh.

Keep in mind that you can have different versions of PHP for Apache and for the command line interface (CLI). This can often cause problems like the ones you are facing.
calastrilla
Posts: 1
Joined: Wed Jul 16, 2008 10:44 pm

Maintenance not running

Post by calastrilla »

Hi, I also get the Maintenance has not run in the last 48 hours.
I've set-up the cron, but to no avail
I've followed the steps in the above posts, but also no avail.
When I run:
calastrilla@LXPDC-TESTSERVER:~/TimeTrex/php/etc$ php /home/calastrilla/TimeTrex/timetrex/classes/modules/core/../../../maint/cron.php

This is what appears:

<br>
<b>Debug Buffer</b><br>
============================================================================<br>
Memory Usage: 2054228<br>
----------------------------------------------------------------------------<br>
DEBUG [264]: <b>[Function]()</b>: URI: /home/calastrilla/TimeTrex/timetrex/classes/modules/core/../../../maint/cron.php<br>
DEBUG [266]: <b>[Function]()</b>: Version: 2.2.11 Edition: 10 Production: 1 Demo Mode: 0<br>
DEBUG [76]: <b>[Function]()</b>: Error connecting to the database!<br>
DEBUG [39]: <b>DBError::__construct()</b>: postgres7 error: [-1: Missing extension for postgres] in CONNECT(localhost:5433, 'timetrex', '****', timetrex)
<br>
============================================================================<br>


Is this right, there is an error connecting to postgres? But I can access TimeTrex without a problem (reporting, employee admin, etc.)
Ubuntu Hardy Heron
Apache2
PHP v5.2.4
TimeTrex 2.2.11
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

This is a fairly common issue, because running PHP from the command line is completely 100% different from access PHP web pages. They use two different PHP.INI files, and you can have an extension enabled for PHP web pages, but not enabled for PHP command line interface (CLI).

This is what your problem is:
postgres7 error: [-1: Missing extension for postgres]
Your PostgreSQL extension is not enabled for PHP CLI. Which usually means your PHP.INI that your PHP CLI is using isn't correct. You can usually start by copying your PHP.INI that Apache is using overtop of the PHP.INI that PHP CLI is using.
Locked