Hi,I have trouble to make ticket polling working with external wget commandcronbox <==internet===> osticket webserverserverrcron command : wget -qO-  user-agent=xxxxx http://xxx.fr/osticket/api/ost_rcron.phpwith IP of cronboxI use wget -q0- options to debug and I get this (and no emails are polled):HTTP/1.1 404 Not FoundDate: Wed, 21 Jan 2015 14 GMTServer: ApacheX-Powered-By: PHP/5.4.34Pragma: no-cacheCache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0Vary: Accept-EncodingTransfer-Encoding: chunkedContent-Type: text/htmlFile not found.Have you got any idea ?Regards,

did you rename rcron.php to ost_rcron.php and put it in the directory that you are specifying?

Hi,My host uses Fast-CGI so I used the trick available here :http://uname.pingveno.net/blog/index.php/post/2013/06/29/osTicket,-wget,-crontab-and-FastCGI

---- quote---

After a long night trying to get HTTP cron for osTickets to work, here is my solution :

Things to know

Rewritting the URLs of a FastCGI-running PHP application, using Apache2 mod_rewrite on PATH_INFO is broken, it does not work. Never.osTicket needs POST requests to its API.osTicket uses an unsafe way to get PATH_INFO, obviously it will not work with FastCGI.

How to get it work

Open includes/class.osticket.php

Replace :

        //TODO: conruct possible path info.

With :

        $path_info = str_replace(BASE_URI."/", "", $_SERVER);        if (!empty($path_info))                 return $path_info;

And call the cron like that :

 /usr/bin/wget -q --no-cache -O /dev/null --post-data '' --header='X-API-Key' 'http://example.com/api/http.php/tasks/cron'

---/quote---

> osTicket uses an unsafe way to get PATH_INFO, obviously it will not work with FastCGI.I'm not sure how 'unsafe' is meant here. Perhaps 'unreliable' is vetted. We have production servers using mod_rewrite, Apache2, php-fpm with mod_fastcgi, and the current codebase works just fine. I like your fallback code and I'll test it out.Cheers,

Write a Reply...