Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
OptimusBain Posted November 30, 2022 Posted November 30, 2022 Hello, I just updated my community to the last version released today. Since I did it, I've started to get strange notifications about locked tasks. They won't go away. Why is that? See attachment. Thanks
Daniel F Posted November 30, 2022 Posted November 30, 2022 According to the error log you're not using PHP8 for the CLI cron job, even if your TASK setting shows the path to the php8 executable. I've called the locked tasks from the ACP where they worked without any problems and have added some logging code to the applications/core/interface/task/task.php to see what's going on.
Hatsu Posted November 30, 2022 Posted November 30, 2022 (edited) Depending on your set up for cronjobs it can be that your path in the cronjob (config) still points to the 7.4 executable. If you use Plesk f.e. and you use their menu for cronjobs where you have to provide the absolute path to PHP this can happen. It happened for me when I changed my PHP version and forget about the cronjobs. But you can't see this in ACP. Edited November 30, 2022 by Hatsu Daniel F and OptimusBain 2
Solution Daniel F Posted November 30, 2022 Solution Posted November 30, 2022 Can you confirm that you also updated the cron job after switching the PHP version? 8 minutes ago, Hatsu said: Depending on your set up for cronjobs it can be that your path in the cronjob (config) still points to the 7.4 executable. If you use Plesk f.e. and you use their menu for cronjobs where you have to provide the absolute path to PHP this can happen. It happened for me when I changed my PHP version and forget about the cronjobs. But you can't see this in ACP. Yea, I'm quite sure that it's this. The current command in the ACP to create the cron job points to /opt/cpanel/ea-php80/root/usr/bin/php so anything created with PHP7.x would have pointed to /opt/cpanel/ea-php7.... OptimusBain 1
OptimusBain Posted November 30, 2022 Author Posted November 30, 2022 3 minutes ago, Daniel F said: Can you confirm that you also updated the cron job after switching the PHP version? I didn't know about the Cron job path. I will check out the cPanel and confirm it's correctly setup. I've been running the community on PHP 8 for a few weeks now without these issues and I didn't update any Cron job settings.
Daniel F Posted November 30, 2022 Posted November 30, 2022 1 minute ago, OptimusBain said: I didn't know about the Cron job path. I will check out the cPanel and confirm it's correctly setup. I've been running the community on PHP 8 for a few weeks now without these issues and I didn't update any Cron job settings. Yea we're just starting to utilize the new PHP8 features and new functions, so there's now a new function being used inside our Mail Class which is only available in PHP>8 So each time a mail is being sent via the cron, it results in Quote Error: Call to undefined function str_starts_with() (0) #0 /home/.../init.php(927) : eval()'d code(144): IPS\_Email::_parseElementForClickTracking(Object(DOMElement), '..')
OptimusBain Posted November 30, 2022 Author Posted November 30, 2022 I fixed the issue I had this morning. I only needed to change the cron job command line to make it work with PHP 8.0. Thanks a lot SeNioR- 1
Daniel F Posted November 30, 2022 Posted November 30, 2022 We're going to improve the code for the CLI task system so that a warning is logged when the wrong php version is being used. SeNioR- and media 2
SeNioR- Posted November 30, 2022 Posted November 30, 2022 47 minutes ago, Daniel F said: We're going to improve the code for the CLI task system so that a warning is logged when the wrong php version is being used. Good idea. With every new version I see a thread with "locked task". A lot of people forget to update the cron path after changing the PHP version. OptimusBain 1
Marc Posted November 30, 2022 Posted November 30, 2022 23 minutes ago, SeNioR- said: Good idea. With every new version I see a thread with "locked task". A lot of people forget to update the cron path after changing the PHP version. Us too 😄 lol
Recommended Posts