• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

Resolved Cannot verify Drupal drush install or invoke drush commands

PeterK900

Basic Pleskian
Server operating system version
AlmaLinux9
Plesk version and microupdate number
Plesk Obsidian 18.074 Update #3
I have successfully installed drush and re-run the install to check all is still good,,,

[root@716881 d10314a]# /opt/plesk/php/8.4/bin/php /usr/lib64/plesk-9.0/composer.phar require drush/dru
sh
Do not run Composer as root/super user! See How do I install untrusted packages safely? Is it safe to run Composer as superuser or root? - Composer for details
Continue as root/super user [yes]? yes
./composer.json has been updated
Running composer update drush/drush
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Writing lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating autoload files
44 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Found 17 security vulnerability advisories affecting 2 packages.
Run "composer audit" for a full list of advisories.
Using version ^13.6 for drush/drush

However when I run code to display the version, I get an error...
[root@716881 d10314a]# ./vendor/bin/drush --version
/usr/bin/env: ‘php’: No such file or directory

And when I the Drush command to rebuild the Drupal cache I get the same error...
[root@716881 d10314a]# ./vendor/bin/drush cr
/usr/bin/env: ‘php’: No such file or directory

All these commands (version display and cache rebuilt) work on an identical Drush install on the cPanel platform.

What am I doing wrong? Thanks for any help on this.
 
Hello @PeterK900

In general, I would like to note that drush is not officially supported by Plesk.

However, this looks like an issue related to the missing PHP by OS vendor. You have installed drush by using a specific Plesk PHP, but the utility itself tries to use the PHP that is available directly from the OS.
I would suggest trying to install it and checking again.

Or you might just set the used PHP version over a symlink:
Bash:
ln -s /opt/plesk/php/8.4/bin/php /usr/bin/php

Anyway, it should be done at your own risk.
 
Brilliant Mikhail. Thanks. As you say, running ln -s /opt/plesk/php/8.4/bin/php /usr/bin/php solves the problem. So the command below rebuilds the drupal cache...
[root@716881 d10314a]# ./vendor/bin/drush cr
[success] Cache rebuild complete.

Thank you again for sorting this problem.
.
 
Back
Top