New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cron / rCron wont collect mail - support.xxxx.com? (Solved) #347

Closed
gitfve opened this Issue Dec 20, 2013 · 22 comments

Comments

Projects
None yet
5 participants
@gitfve

gitfve commented Dec 20, 2013

Hi

osticket 1.8.0.1 (Git)

  1. OK
    On my imap mail server there are mail.
    I log in to osticket
    osticket collect and move the mail, OK.
    Then a new mail hit the imap server, after 5 minutes (poll time) it show up in osticket.

  2. Error
    Email Polling: Enable POP/IMAP polling Poll on auto-cron -> Both are enabled!
    When running rcron with API key nothing happened!

  • Is this working in 1.8.0.1?
    *Is there some advanced log to search in?

*******Update 211213

My installation is: support.xxxx.com -> HTTP/1.1 404 Not Found
Another installation is: xxx.com/support -> And it seen to work

***The problem is in ".htaccess" but I cant figure it out?

***The problem was: My hoster have now activated "suPHP" and all is NICE and running!

@greezybacon

This comment has been minimized.

Show comment
Hide comment
@greezybacon

greezybacon Dec 20, 2013

Member

So, from what I'm reading, you're saying that osTicket is correctly fetching email, creating tickets, and moving the emails to a folder every five minutes. And you question is whether then rcron.php will work correctly with an API key?

Member

greezybacon commented Dec 20, 2013

So, from what I'm reading, you're saying that osTicket is correctly fetching email, creating tickets, and moving the emails to a folder every five minutes. And you question is whether then rcron.php will work correctly with an API key?

@gitfve

This comment has been minimized.

Show comment
Hide comment
@gitfve

gitfve Dec 20, 2013

The 5 minutes is the default system setup, for the auto-cron..

It only collecting the imap email when somebody is logged in.

When nobody is logged in there are no collected email. It is here I use rcron.php to run every 1 hour, it wont collect anything! This is the problem.

gitfve commented Dec 20, 2013

The 5 minutes is the default system setup, for the auto-cron..

It only collecting the imap email when somebody is logged in.

When nobody is logged in there are no collected email. It is here I use rcron.php to run every 1 hour, it wont collect anything! This is the problem.

@greezybacon

This comment has been minimized.

Show comment
Hide comment
@greezybacon

greezybacon Dec 20, 2013

Member

rcron.php went away in osTicket 1.8. Are you sending a POST request to api/tasks/cron with your API key? What is the server response?

Member

greezybacon commented Dec 20, 2013

rcron.php went away in osTicket 1.8. Are you sending a POST request to api/tasks/cron with your API key? What is the server response?

@greezybacon

This comment has been minimized.

Show comment
Hide comment
@greezybacon

greezybacon Dec 20, 2013

Member

If you're doing a local scheduled task on the web server, you can do

/path/to/php -q /path/to/osticket/api/cron.php

As often as you like. Of course paths to PHP and osticket will be different on your server

Member

greezybacon commented Dec 20, 2013

If you're doing a local scheduled task on the web server, you can do

/path/to/php -q /path/to/osticket/api/cron.php

As often as you like. Of course paths to PHP and osticket will be different on your server

@gitfve

This comment has been minimized.

Show comment
Hide comment
@gitfve

gitfve Dec 20, 2013

*rcron.php went away in osTicket 1.8. Are you sending a POST request to api/tasks/cron
-There are a folder in the zip osTicket-v1.8.0.zip called "script" there are the RCron.php this folder is removed in 1.8.0.1, I just reuse the script. The path "api/tasks/cron" is NOT existing, I use "api/cron" is this wrong?


My installation is NOT on the cron server, therefore I use rcron.

gitfve commented Dec 20, 2013

*rcron.php went away in osTicket 1.8. Are you sending a POST request to api/tasks/cron
-There are a folder in the zip osTicket-v1.8.0.zip called "script" there are the RCron.php this folder is removed in 1.8.0.1, I just reuse the script. The path "api/tasks/cron" is NOT existing, I use "api/cron" is this wrong?


My installation is NOT on the cron server, therefore I use rcron.

@gitfve

This comment has been minimized.

Show comment
Hide comment
@gitfve

gitfve Dec 20, 2013

My installation is NOT on the cron server, therefore I use API with rcron.

gitfve commented Dec 20, 2013

My installation is NOT on the cron server, therefore I use API with rcron.

@greezybacon

This comment has been minimized.

Show comment
Hide comment
@greezybacon

greezybacon Dec 20, 2013

Member

Yes api/tasks/cron is correct. It is handled by api/http.php

Member

greezybacon commented Dec 20, 2013

Yes api/tasks/cron is correct. It is handled by api/http.php

@gitfve

This comment has been minimized.

Show comment
Hide comment
@gitfve

gitfve Dec 20, 2013

Hi then I will try to make this change, sorry

gitfve commented Dec 20, 2013

Hi then I will try to make this change, sorry

@gitfve

This comment has been minimized.

Show comment
Hide comment
@gitfve

gitfve Dec 20, 2013

This is the call in RCRON

$config = array(
'url'=>'http://support.xxx.com/api/tasks/cron',
'key'=>'xxF0ADDDBAB468387E5BCD2C2859BC0F'
);

OK, here is the output:

c:\Data\Script>c:\php\php -q rcron.php
HTTP/1.1 404 Not Found
Date: Fri, 20 Dec 2013 14:45:22 GMT
Server: Apache
X-Powered-By: PHP/5.3.27
Vary: Accept-Encoding
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8

gitfve commented Dec 20, 2013

This is the call in RCRON

$config = array(
'url'=>'http://support.xxx.com/api/tasks/cron',
'key'=>'xxF0ADDDBAB468387E5BCD2C2859BC0F'
);

OK, here is the output:

c:\Data\Script>c:\php\php -q rcron.php
HTTP/1.1 404 Not Found
Date: Fri, 20 Dec 2013 14:45:22 GMT
Server: Apache
X-Powered-By: PHP/5.3.27
Vary: Accept-Encoding
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8

@gitfve

This comment has been minimized.

Show comment
Hide comment
@gitfve

gitfve Dec 20, 2013

***I have something:

My installation is: support.xxxx.com -> HTTP/1.1 404 Not Found

Another installation is: xxx.com/support -> And it seen to work, but not with Rcron.php -> I use curl.

***The problem is in ".htaccess" but I cant figure it out?

**How to get the other to work?

gitfve commented Dec 20, 2013

***I have something:

My installation is: support.xxxx.com -> HTTP/1.1 404 Not Found

Another installation is: xxx.com/support -> And it seen to work, but not with Rcron.php -> I use curl.

***The problem is in ".htaccess" but I cant figure it out?

**How to get the other to work?

@cbueno2

This comment has been minimized.

Show comment
Hide comment
@cbueno2

cbueno2 Dec 21, 2013

Hi, I have the same problem with rcron.php

HTTP/1.1 404 Not Found Date: Sat, 21 Dec 2013 11:41:25 GMT Server: Apache X-Powered-By: PleskLin Vary: Accept-Encoding Transfer-Encoding: chunked Content-Type: text/html No input file specified

Osticket in mode debug, it does not register this event.

I have tested with 1.8 stable and v1.8.0.1.

Thanks in advance, César

cbueno2 commented Dec 21, 2013

Hi, I have the same problem with rcron.php

HTTP/1.1 404 Not Found Date: Sat, 21 Dec 2013 11:41:25 GMT Server: Apache X-Powered-By: PleskLin Vary: Accept-Encoding Transfer-Encoding: chunked Content-Type: text/html No input file specified

Osticket in mode debug, it does not register this event.

I have tested with 1.8 stable and v1.8.0.1.

Thanks in advance, César

@greezybacon

This comment has been minimized.

Show comment
Hide comment
@greezybacon

greezybacon Dec 21, 2013

Member

@cbueno2 would you mind sharing some details about how you have the rcron.php script setup? What steps have you done thus far to get you to the 404?

Member

greezybacon commented Dec 21, 2013

@cbueno2 would you mind sharing some details about how you have the rcron.php script setup? What steps have you done thus far to get you to the 404?

@gitfve

This comment has been minimized.

Show comment
Hide comment
@gitfve

gitfve Dec 21, 2013

Here are some test from curl!
Working
c:\curl>curl -d "{}" -H "X-API-Key: BA00B76BAA30F62E1940B46CC1C3C73C" http://domain.dk/support/api/tasks/cron
Completed
Error
c:\curl>curl -d "{}" -H "X-API-Key: BA00B76BAA30F62E1940B46CC1C3C73C" http://support.mydomain.dk/api/tasks/cron
No input file specified.
);

gitfve commented Dec 21, 2013

Here are some test from curl!
Working
c:\curl>curl -d "{}" -H "X-API-Key: BA00B76BAA30F62E1940B46CC1C3C73C" http://domain.dk/support/api/tasks/cron
Completed
Error
c:\curl>curl -d "{}" -H "X-API-Key: BA00B76BAA30F62E1940B46CC1C3C73C" http://support.mydomain.dk/api/tasks/cron
No input file specified.
);

@gitfve

This comment has been minimized.

Show comment
Hide comment
@gitfve

gitfve Dec 22, 2013

Hi

Real confused now, have used lot of time, and I still can't understand it. It wont work.

I have installed osticket on 4 domains now, on 2 of them I can use curl to trigger the cron. Rcron.php wont work at all! I only use curl called from cmd line with the above setting, it run on 2 of the installation. I can't understand it wont run on the other 2 installation. The error is "404 Not Found". Is there some issue with sub-domains? or other things.

osticket run without any other problem on all 4 domains, only the cron wont work.

Where are the secret about all this? Can it be something in the .httpaccess file?

I give up, until some clever person can find some hint to me:-)

gitfve commented Dec 22, 2013

Hi

Real confused now, have used lot of time, and I still can't understand it. It wont work.

I have installed osticket on 4 domains now, on 2 of them I can use curl to trigger the cron. Rcron.php wont work at all! I only use curl called from cmd line with the above setting, it run on 2 of the installation. I can't understand it wont run on the other 2 installation. The error is "404 Not Found". Is there some issue with sub-domains? or other things.

osticket run without any other problem on all 4 domains, only the cron wont work.

Where are the secret about all this? Can it be something in the .httpaccess file?

I give up, until some clever person can find some hint to me:-)

@cbueno2

This comment has been minimized.

Show comment
Hide comment
@cbueno2

cbueno2 Dec 22, 2013

Hello @greezybacon.

With local cron (/path/to/php -q /path/to/osticket/api/cron.php) it works fine.

With rcron, I did this test:

1.- I have created the key with my IP.
2.- I have modified the files: automail.php, rcron.php with the key and correct path of API.
3.- I don't know Which is the correct permission for these files (automail.php, rcron.php) I have tested with 755 and 655.
4.- Thes I did form IE or mozilla loading http://mydomain/osticket/path/rcron.php.
HTTP/1.1 404 Not Found Date: Sun, 22 Dec 2013 19:44:28 GMT Server: Apache X-Powered-By: PleskLin Vary: Accept-Encoding Transfer-Encoding: chunked Content-Type: text/html No input file specified

I found another possible error around a this issue:
If I try to delete/disable one key I have received this error "Unknown action - get technical help"

key

Thank very much for your time.
Regards, César

cbueno2 commented Dec 22, 2013

Hello @greezybacon.

With local cron (/path/to/php -q /path/to/osticket/api/cron.php) it works fine.

With rcron, I did this test:

1.- I have created the key with my IP.
2.- I have modified the files: automail.php, rcron.php with the key and correct path of API.
3.- I don't know Which is the correct permission for these files (automail.php, rcron.php) I have tested with 755 and 655.
4.- Thes I did form IE or mozilla loading http://mydomain/osticket/path/rcron.php.
HTTP/1.1 404 Not Found Date: Sun, 22 Dec 2013 19:44:28 GMT Server: Apache X-Powered-By: PleskLin Vary: Accept-Encoding Transfer-Encoding: chunked Content-Type: text/html No input file specified

I found another possible error around a this issue:
If I try to delete/disable one key I have received this error "Unknown action - get technical help"

key

Thank very much for your time.
Regards, César

@cbueno2

This comment has been minimized.

Show comment
Hide comment
@cbueno2

cbueno2 Dec 22, 2013

About my before comment of delete / disable key the problem is only with IE, with Mozilla works fine.

cbueno2 commented Dec 22, 2013

About my before comment of delete / disable key the problem is only with IE, with Mozilla works fine.

@greezybacon

This comment has been minimized.

Show comment
Hide comment
@greezybacon

greezybacon Dec 22, 2013

Member

Can I just confirm that the URL in the rcron.php script is configured for

http://domain.com/api/tasks/cron

Perhaps confusingly, the URL requested by rcron.php should point to a virtual URL that is handled by api/http.php

So I just want to confirm that the rcron.php script's URL is neither .../cron.php nor .../rcron.php

I'm confused by the IE and Firefox comments with respect to the rcron script. Rcron should be run by a scheduled task or via the command line on a remote machine.

Von meinem iPhone gesendet

Am Dec 22, 2013 um 14:02 schrieb cbueno2 notifications@github.com:

Hello @greezybacon.

With local cron (/path/to/php -q /path/to/osticket/api/cron.php) it works fine.

With rcron, I did this test:

1.- I have created the key with my IP.
2.- I have modified the files: automail.php, rcron.php with the key and correct path of API.
3.- I don't know Which is the correct permission for these files (automail.php, rcron.php) I have tested with 755 and 655.
4.- Thes I did form IE or mozilla loading http://mydomain/osticket/path/rcron.php.
HTTP/1.1 404 Not Found Date: Sun, 22 Dec 2013 19:44:28 GMT Server: Apache X-Powered-By: PleskLin Vary: Accept-Encoding Transfer-Encoding: chunked Content-Type: text/html No input file specified

I found another possible error around a this issue:
If I try to delete/disable one key I have received this error "Unknown action - get technical help"

Thank very much for your time.
Regards, César


Reply to this email directly or view it on GitHub.

Member

greezybacon commented Dec 22, 2013

Can I just confirm that the URL in the rcron.php script is configured for

http://domain.com/api/tasks/cron

Perhaps confusingly, the URL requested by rcron.php should point to a virtual URL that is handled by api/http.php

So I just want to confirm that the rcron.php script's URL is neither .../cron.php nor .../rcron.php

I'm confused by the IE and Firefox comments with respect to the rcron script. Rcron should be run by a scheduled task or via the command line on a remote machine.

Von meinem iPhone gesendet

Am Dec 22, 2013 um 14:02 schrieb cbueno2 notifications@github.com:

Hello @greezybacon.

With local cron (/path/to/php -q /path/to/osticket/api/cron.php) it works fine.

With rcron, I did this test:

1.- I have created the key with my IP.
2.- I have modified the files: automail.php, rcron.php with the key and correct path of API.
3.- I don't know Which is the correct permission for these files (automail.php, rcron.php) I have tested with 755 and 655.
4.- Thes I did form IE or mozilla loading http://mydomain/osticket/path/rcron.php.
HTTP/1.1 404 Not Found Date: Sun, 22 Dec 2013 19:44:28 GMT Server: Apache X-Powered-By: PleskLin Vary: Accept-Encoding Transfer-Encoding: chunked Content-Type: text/html No input file specified

I found another possible error around a this issue:
If I try to delete/disable one key I have received this error "Unknown action - get technical help"

Thank very much for your time.
Regards, César


Reply to this email directly or view it on GitHub.

@cbueno2

This comment has been minimized.

Show comment
Hide comment
@cbueno2

cbueno2 Dec 23, 2013

Hello,

It is correct:

$config = array(
'url'=>'http://www.XXXXX.es/consulta-xxxxxx/180/api/tasks/cron',
'key'=>'50BC7006EC8C84667776736EA4C88B4C'
);

Note: My URL has a dash "-" consulta-xxxxxxx.

About the test with IE or Firefox only is a manual test, I know should be run a schduled with wget task.

Thanks, César

cbueno2 commented Dec 23, 2013

Hello,

It is correct:

$config = array(
'url'=>'http://www.XXXXX.es/consulta-xxxxxx/180/api/tasks/cron',
'key'=>'50BC7006EC8C84667776736EA4C88B4C'
);

Note: My URL has a dash "-" consulta-xxxxxxx.

About the test with IE or Firefox only is a manual test, I know should be run a schduled with wget task.

Thanks, César

@gitfve

This comment has been minimized.

Show comment
Hide comment
@gitfve

gitfve Dec 26, 2013

***The problem was: My hoster have now activated "suPHP" and all is NICE and running!

gitfve commented Dec 26, 2013

***The problem was: My hoster have now activated "suPHP" and all is NICE and running!

@gitfve gitfve closed this Dec 26, 2013

@webermax

This comment has been minimized.

Show comment
Hide comment
@webermax

webermax Feb 15, 2016

I suggest to use sth. like the following instead of calling "rcron.php" if it is hosted next to osticket.

<?php shell_exec('/usr/bin/php55 -q /full/path/to/api/cron.php');

following the osticket wiki is quite confusing and what i've read so far most people using rcron.php are doing it "from behind through the chest into the eye".

webermax commented Feb 15, 2016

I suggest to use sth. like the following instead of calling "rcron.php" if it is hosted next to osticket.

<?php shell_exec('/usr/bin/php55 -q /full/path/to/api/cron.php');

following the osticket wiki is quite confusing and what i've read so far most people using rcron.php are doing it "from behind through the chest into the eye".

@ntozier

This comment has been minimized.

Show comment
Hide comment
@ntozier

ntozier Feb 15, 2016

Contributor

@webermax you commented on a issue that was closed in Dec 2013.
I am of the understanding that many webhosts disable shell_exec.
You should really just use cron as intended,

Contributor

ntozier commented Feb 15, 2016

@webermax you commented on a issue that was closed in Dec 2013.
I am of the understanding that many webhosts disable shell_exec.
You should really just use cron as intended,

@webermax

This comment has been minimized.

Show comment
Hide comment
@webermax

webermax Feb 15, 2016

@ntozier Sure, this won't work in "safemode". But many webhosts do not offer crontab, either.

webermax commented Feb 15, 2016

@ntozier Sure, this won't work in "safemode". But many webhosts do not offer crontab, either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment