• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Resolved /bin/sh: php: command not found

ArgaViking

New Pleskian
Matomo request me to setup cron jobs and I followed instruction. I can't get it works after it show error "/bin/sh: php: command not found" and bin/sh is already access over SSH in Home > Subscriptions > tld > Websites & Domains > Web Hosting Access. What can I do to get it works?
 
You have to put there a full path to PHP, not just php but /usr/bin/php
 
On your system there might not be a PHP that was delivered with the operating system. Instead, you can equally well use a PHP that is delivered with Plesk, vor example
...
/opt/plesk/php/7.1/bin/php
/opt/plesk/php/7.2/bin/php
/opt/plesk/php/7.3/bin/php
/opt/plesk/php/7.4/bin/php
 
It seems be works but got new warning:

PHP Warning: PHP Startup: Unable to load dynamic library 'mysqli' (tried: /opt/plesk/php/7.4/lib64/php/modules/mysqli (/opt/plesk/php/7.4/lib64/php/modules/mysqli: cannot open shared object file: No such file or directory), /opt/plesk/php/7.4/lib64/php/modules/mysqli.so (/opt/plesk/php/7.4/lib64/php/modules/mysqli.so: undefined symbol: mysqlnd_global_stats)) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_mysql' (tried: /opt/plesk/php/7.4/lib64/php/modules/...

I'm using MariaDB 10.3.
 
/opt/plesk/php/7.4/lib64/php/modules/mysqli.so is installed with PHP when you use the Plesk installer. I cannot think of a situation where this could be missing.

If possible on your system without impacting other websites, I suggest to uninstall the PHP version in question with the Plesk installer and then reinstall it from there.
 
Back
Top