• 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

Issue PHP Composer only works for super user, other users get 'phpenv: composer: command not found'

carlbowles

New Pleskian
Server operating system version
Ubuntu 20.04.6 LTS
Plesk version and microupdate number
18.0.72 #1
I can run composer fine from the superuser account.

From any other account I get the following error message:

phpenv: composer: command not found

I'm guessing it's some sort of permissions issue or something, but I don't have a clue how to fix this.
 
What's the exact command you're trying to run?
All commands come back with this error, even just the 'composer' command.

If I try to run the composer update "drupal/core-*" --with-all-dependencies with the super user account it works fine, with my other plesk account if I run this command then it comes back with the error.
 
The composer command is only available to users with Superuser privileges. For other (system) users you can use Composer via the Composer Plesk extension. Which can be run via command line using to following command example /opt/plesk/php/X.X/bin/php /usr/lib/plesk-9.0/composer.phar [options] [arguments]. Where you'd replace the X.X for any of the installed PHP versions (e.g 8.3 or 7.4).

The Composer Plesk extension also allows you to perform certain composer task via the Plesk GUI directly. Like for example updates.

Also see support article about running composer.
 
The composer command is only available to users with Superuser privileges. For other (system) users you can use Composer via the Composer Plesk extension. Which can be run via command line using to following command example /opt/plesk/php/X.X/bin/php /usr/lib/plesk-9.0/composer.phar [options] [arguments]. Where you'd replace the X.X for any of the installed PHP versions (e.g 8.3 or 7.4).

The Composer Plesk extension also allows you to perform certain composer task via the Plesk GUI directly. Like for example updates.

Also see support article about running composer.
Thank you, I'll have a look at the Composer extension!
 
Back
Top