Cron job fails with Error 500 Internal Server Error
I receive the following error
Status: 500 Internal Server Error
X-Powered-By: PHP/5.6.31
Set-Cookie: PHPSESSID=xxxxxxxx(I replaced the value); path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-
check=0
Pragma: no-cache
Content-type: text/html; charset=UTF-8
I have tried changing the cron.php file permissions to 744, 755, and 644 respectively but still does not work. I set up the cron with the command
/usr/bin/php /home/my_username/public_html/cron.php
- Does anyone know how I can fix this?
2
Answers
This error message is a response of the HTTP request, but
/usr/bin/php /home/my_username/public_html/cron.php
is the CLI command.The problem can be in that your cron.php is not designed to work via CLI (try to run it via wget).
Just add up your
openssl.conf
path to end of your command like this:This will help to generate your own certificate without errors. For linux the directory should be: