You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 22, 2024. It is now read-only.
Hi,
I discovered Atomik few days ago and I LOVE it! Now, I'm making a website for my classmates, just a little web game, and I need to execute a PHP script every midnight. I used ConsoleKit and I'm using Nginx on a Raspberry Pi (Debian). So when I type my command php index.php <command>, it works well, but when I add this line in my cron table: 0 0 * * * php /path/to/index.php <command>, it doesn't works and outputs this error:
PHP Notice: Undefined index: REQUEST_METHOD in /var/www/vendor/atomik/atomik/src/Atomik.php on line 363
PHP Fatal error: Uncaught exception 'AtomikException' with message 'HTTP method not allowed' in /var/www/vendor/atomik/atomik/src/Atomik.php:369
Stack trace:
thrown in /var/www/vendor/atomik/atomik/src/Atomik.php on line 369
So it's saying REQUEST_METHOD isn't defined. That's normal because I'm using php-cli (although I don't understand why it works in shell but not with cron), now is there a solution to make my script not crash? Maybe Atomik could use some sort of error checking with php_sapi_name()?
I hope you'll have a solution, thanks!
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
I discovered Atomik few days ago and I LOVE it! Now, I'm making a website for my classmates, just a little web game, and I need to execute a PHP script every midnight. I used ConsoleKit and I'm using Nginx on a Raspberry Pi (Debian). So when I type my command
php index.php <command>
, it works well, but when I add this line in my cron table:0 0 * * * php /path/to/index.php <command>
, it doesn't works and outputs this error:So it's saying REQUEST_METHOD isn't defined. That's normal because I'm using php-cli (although I don't understand why it works in shell but not with cron), now is there a solution to make my script not crash? Maybe Atomik could use some sort of error checking with
php_sapi_name()
?I hope you'll have a solution, thanks!
The text was updated successfully, but these errors were encountered: