Ask not what osTicket community can do for you - ask what you can do for osTicket community

Go Back   osTicket Forums > osTicket 1.6.x > Troubleshooting and Problems

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-08-2012, 11:53 PM
bpanjikar@gmail.com bpanjikar@gmail.com is offline
Junior Member
 
Join Date: Jul 2012
Posts: 4
Default Crontab / Auto Fetch not working on Linux

I have been trying hard to get the crontab running for email auto fetch for ticket creation but all efforts seems to be a waste after following instructions posted on this thread and copying the new cron.php file mentioned here by Peter.

The auto email works and ticket is generated if I login to Staff panel but not the case with crontab.

Details:
System: Linux red Hat 5.5
OSticket : 1.6
webserver: apache 2.2. with myssql database.
PHP : 5.1

cron.php
-------------
<?php
define('EX_CONFIG', 78);
if(!file_exists('../main.inc.php')) exit(EX_CONFIG);
require_once('../main.inc.php');
if(!defined('INCLUDE_DIR')) exit(EX_CONFIG);
require_once(INCLUDE_DIR.'class.cron.php');
Cron::run();
Sys::log(LOG_DEBUG,'Cron Job','External cron job executed ['.$_SERVER['REMOTE_ADDR'].']');
?>

crontab entry (set to run every 5 minutes)
---------------
*/5 * * * * nobody /usr/bin/php /var/www/api/cron.php


Checking the mail log, below is the error:
------------------------
Subject: Cron <root@SERVER> /usr/bin/php -c /var/www/appsupport/api/cron.php
Content-Type: text/plain; charset=UTF-8
Auto-Submitted: auto-generated
X-Cron-Env: <SHELL=/bin/bash>
X-Cron-Env: <PATH=/sbin:/bin:/usr/sbin:/usr/bin>
X-Cron-Env: <MAILTO=root>
X-Cron-Env: <HOME=/>
X-Cron-Env: <LOGNAME=root>
X-Cron-Env: <USER=root>

PHP: Error parsing /var/www/appsupport/api/cron.php on line 2

--------------------------
Not sure which line-2 refers to as all files including main.inc.php exists in the directory.

I have also disabled - Enable POP/IMAP email fetch (Global setting which can be disabled at email level) to make sure cron tab runs as suggested in this post.

Also added extension=imap.so to my php.ini file at the end.

And after no luck after all. Not sure where the problem is.

I would appreciate if any one can help out in this case. And keeping the logged session active is really a pain.

Thanks
Babi
Reply With Quote
  #2  
Old 07-12-2012, 02:56 AM
bpanjikar@gmail.com bpanjikar@gmail.com is offline
Junior Member
 
Join Date: Jul 2012
Posts: 4
Default

this is suprising to see not even a single reply to my problem. I believe there are experts who can reach out to help fix this problem.
Reply With Quote


Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:32 PM.