Cron job returns "Undefined index: REQUEST_METHOD" |
03-20-2019, 11:36 AM
(This post was last modified: 03-20-2019, 11:48 AM by anturom. Edit Reason: corrected URL )
@php_rocs,
Yes, to be more accurate, on Windows I can run this job successfully from the command line manually (not actually as a cron), like this: Code: php index.php cronjobs statistics From the log on the Linux server where I get the problem I can now see that it falls back for some reason to the default controller, namely: Code: DEBUG - 2019-03-20 19:32:01 --> UTF-8 Support Enabled I've double checked of course that the path to index.php is correct in my cron job. Maybe it's worth pointing out that the server directory where index.php lives is not public_html, but a directory parallel to public_html. Also, the directory name contains dots, like "my.subdomain.com", if that matters. So basically the structure is: Code: dir The route http://sandbox.mydomain.com/cronjobs/statistics correctly returns 401 when accessed directly from the browser. I've also tried disabling CSRF protection completely just to be able to narrow down the issue, but that didn't help... |
Messages In This Thread |
Cron job returns "Undefined index: REQUEST_METHOD" - by anturom - 03-19-2019, 12:35 PM
RE: Cron job returns "Undefined index: REQUEST_METHOD" - by php_rocs - 03-19-2019, 04:39 PM
RE: Cron job returns "Undefined index: REQUEST_METHOD" - by kilishan - 03-19-2019, 07:30 PM
RE: Cron job returns "Undefined index: REQUEST_METHOD" - by anturom - 03-20-2019, 01:23 AM
RE: Cron job returns "Undefined index: REQUEST_METHOD" - by php_rocs - 03-20-2019, 06:56 AM
RE: Cron job returns "Undefined index: REQUEST_METHOD" - by anturom - 03-20-2019, 11:36 AM
RE: Cron job returns "Undefined index: REQUEST_METHOD" - by php_rocs - 03-20-2019, 09:06 PM
RE: Cron job returns "Undefined index: REQUEST_METHOD" - by anturom - 03-20-2019, 10:02 PM
RE: Cron job returns "Undefined index: REQUEST_METHOD" - by anturom - 03-23-2019, 03:42 AM
|