Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt November 11, 2024
Bob Snow Posted Thursday at 11:32 PM Posted Thursday at 11:32 PM (edited) It is always an issue for me, at least for the past 10 years. So I paid someone to help install it, and here I sit. I Got help from SiteGround with no luck. Here is what they told me: Jan 9, 2025 05:06 PM Hello Robert, Thank you for reaching out. I've reviewed the cron job and the script it runs, and I can confirm that the command itself is executing. However, the issue lies in how the task.php script is written, it seems to be designed to work within a web environment, not for command-line execution like your cron job. When I ran the script manually, this was the output received: Cache-Control: no-cache, no-store, must-revalidate, max-age=0, s-maxage=0 Expires: 0 Content-type: text/html; charset=UTF-8 Not at command line The script is trying to send HTTP headers (which are only necessary for web requests) and also includes the message "Not at command line," which indicates the script is not handling the cron job execution properly. The core issue seems to be that the script checks if it’s running in a web environment and tries to send headers, which causes it to behave incorrectly when triggered by cron. To fix this, I would recommend contacting your developers so they can modify the script to handle both web and command-line contexts. Please feel free to reach out if you have any additional questions or require assistance with anything else. Kind Regards, SiteGround Technical Support Edited Thursday at 11:36 PM by Bob Snow
teraßyte Posted Friday at 12:16 AM Posted Friday at 12:16 AM (edited) How did you setup the cronjob? That error is only returned if it detects you aren't running the script from the command line: /* Check this is running at the command line */ if ( !isset( $_SERVER['argv'] ) ) { echo "Not at command line\n"; exit; } If you are sure the cronjob is setup correctly, for whatever reason the problem is that the server is not passing the argv value. That would still be a server configuration issue, though. Not something IPS can fix. Edited Friday at 12:18 AM by teraßyte Joey_M 1
Recommended Posts