• 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.

Question Drupal CMS 1.0 with Plesk: Composer PATH issue for automatic updates

Passivism

New Pleskian
Server operating system version
Ubuntu 22.04.5
Plesk version and microupdate number
18.0.66 #2
Hi everyone,

With the recent WordPress news and the release of Drupal CMS 1.0, we've been exploring this new tool as an alternative. I'd like to share our experience and get some help with a specific issue.

Initial setup worked smoothly:
  1. Created a new subdomain in Plesk
  2. Uploaded the cms-1.0.0.zip content (composer.json + web folder)
  3. Set documentRoot to web/
  4. Ran the initial installation with:

Bash:
su -c "/opt/plesk/php/8.3/bin/php /usr/lib/plesk-9.0/composer.phar install --prefer-dist --no-dev" -s /bin/zsh sysuser_4


However, once in Drupal, the status report shows:

Your site does not pass some readiness checks for automatic updates. It cannot be automatically updated until further action is performed.
  • The composer executable cannot be found. Make sure it's installed and in the $PATH


The interesting part is that when I check the PATH for sysuser_4 (the Plesk system user), composer is definitely there and working:

Bash:
$ su -c "echo $PATH" -s /bin/zsh sysuser_4
/opt/plesk/php/8.3/bin:/usr/lib/plesk-9.0:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

$ su -c "which composer" -s /bin/zsh sysuser_4
/usr/lib/plesk-9.0/composer

$ su -c "composer --version" -s /bin/zsh sysuser_4
Composer version 2.8.4 2024-12-11 11:57:47
PHP version 8.3.15 (/opt/plesk/php/8.3/bin/php)

I've tried several approaches:
  • Adding PATH to PHP-FPM configuration
  • Modifying composer.json with explicit paths
  • Adding environment variables in Drupal's settings.php
  • Enabled SSH shell "/usr/bin/bash" in the hosting settings
  • Followed the documentation from "https://support.plesk.com/hc/en-us/...d-Composer-to-a-chrooted-environment-in-Plesk" but when running `./update-chroot.sh --apply domain`, I get "WARNING: Domain does not exist or has no chrooted shell enabled, skipping."

But nothing seems to work.

Has anyone successfully set up Drupal CMS 1.0 with composer recognized in Drupal, especially in a subdomain configuration? How did you handle the composer PATH issue?

Any insights would be greatly appreciated!

Thanks!
 
Is there any particular reason for installing Drupal manually over the Application installer available in Subscriptions > example.com > Applications? I haven't dug deeper into the error you are encountering, but if there's no specific reason for installing it manually, please give a try to the installer as it works perfectly fine (at least on a test Ubuntu 22.04 environment). If that's not a convenient solution, please let us know.
 
Hi!

Thanks for your answer.

Yes, I have a good reason! Only Drupal Core is available in the application installer.
In my use case, I am trying to use the 'Drupal CMS' newly available.
I've tried the latest Drupal Core version with plesk application. It worked correctly but I went through a problem with the GUI for composer update but I think it's another problem and I've not investigated this one.

I've not encountered any problem for the manual installation via CLI, and the website works well. However, the composer binary detection once installed seems stuck when it comes to read the $PATH variable...
As I'm not familiar with chrooted users, I'm trying to identify how the access to composer is working in my subdomain use case.
 
I see that you clarified it is Drupal CMS in the initial message, apologies for the misunderstanding. Could you please try changing the shell to any other than chrooted, then change it back to chrooted and give another go to adding Composer to chrooted environment.
 
Back
Top