Magento 2.4.5 Plesk obsidian

when running the cron job in plesk it runs fine without errors, however do not update the logs in /var/logs in magento.

manually running the cron job via ssh is fine /opt/plesk/php/8.1/bin/php -dmemory_limit=-1 bin/magento cron:run

installed cron manager only error that comes up is for sales order invoices etc..: Deprecated Functionality: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /public_html/vendor/magento/zendframework1/library/Zend/Log/Formatter/Simple.php on line 103

hoever the cron job is not running on schedule and the /bin/sh: 1: /usr/bin/php8.1: Permission denied, is persistent.

i have fixed permissions running the usual commands: sudo find var/ generated/ vendor/ pub/static/ pub/media/ app/etc/ -type f -exec chmod g+w {} ; sudo find var/ generated/ vendor/ pub/static/ pub/media/ app/etc/ -type d -exec chmod g+ws {} ; sudo chown -R _user:www-data .

any advice will be appreciated

2 Answers 2


I suspect one of your server not running with the php version you are expecting resulting in your dreprecated error.

It's either that, either your vendor is mot up to date with the required php version.

  • Im not to worried about the depreciated error, the symptom i need to resolve its the persistent permission denied error in the magento.cron.log. where im lost is that running the cronjob manually all seems ok, but why the when i run the cron job in plesk, its fine as well, but it doesn't update the cron.log in magento, its almost like there are 2 variants here that needs to use the same folder somehow...
    – Chris
    Commented Oct 17, 2023 at 9:02

Deleted the cronjob and recreated it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.