• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

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