Support non proc_open composer

Created on 20 September 2022, over 2 years ago
Updated 14 January 2025, 22 days ago

Clicking on "Update" I got the following error message:

Error message
Your site does not pass some readiness checks for automatic updates. It cannot be automatically updated until further action is performed.
The Process class relies on proc_open, which is not available on your PHP installation. See the help page for information on how to configure the path to Composer.

I host this site on a private shared server that doesn't have proc_open enabled and this was caught in the readiness check.

Which hosting provider did you test Automatic Updates with? eg. BlueHost, SiteGround, etc.

I host this on a private cloud instance from Hetzner that is personally configured by our DevOps team.

What was your goal? For example, what versions of Drupal core were you trying to update from and to?

I was trying to update from version 9.4.0 to version 9.4.6

What were the steps you took, starting from when you added the Automatic Updates module to your Drupal project (see https://www.drupal.org/i/3275810#install-module β†’ for instructions)? Include anything that seems relevant, including commands you ran, links you clicked on, output logs, relevant config files, screenshots, screen recordings, etc.

I did exactly what was layed out in the instructions here 🌱 Automatic updates 8.x-2.x testing guide for hosting environments Closed: outdated and I only enabled proc_open after it prompted that it needed it.

What was your environment like?
Please answer as many of the following questions as you can.
Are you using Lando, DDEV, or another Docker-based environment?:

No

What operating system were you using?

Ubuntu 20.04.4 LTS with kernel version 5.4.0-94-generic

What web server are you using?

Nginx version 1.23.1

What PHP version are you using (see https://www.drupal.org/i/3275810#confirm-php-version β†’ )?

PHP 7.4.30 (fpm and cli)

What version of Composer are you using (see https://www.drupal.org/i/3275810#confirm-composer-version β†’ )?

Composer version 2.4.2

Did you accomplish your goal? Were the instructions clear? Did you observe any bugs or errors, or other issues? Did you need to do any workarounds?

I did not. Even after I solve the proc_open issue the update batch process results in a 500 error with a generic error of losing connection to the database. I am currently investigating whether this is a PHP memory limit issue that kills the process during the update.

Problem with these instructions? Anything else we should know?

None that I can think of.

✨ Feature request
Status

Active

Version

11.0 πŸ”₯

Component

ajax system

Created by

πŸ‡¨πŸ‡ΎCyprus EliasPapa

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¬πŸ‡§United Kingdom catch

    Moving this to the core queue.

    I have no idea how widespread disabling proc_open on shared hosting (or other hosting environments) is in 2025, but I think it would be useful to try to get data from at least a few major hosting providers.

    Depending on that, and reports like the original one here from people trying to run automatic_updates/project_browser on hosting without proc_open support, we could then consider what to do.

    It would probably require a fallback that bypasses Symfony's Process component altogether - but unless we re-implement the process component or swap out some classes, that probably means calling composer API functions directly instead of via the cli.

  • πŸ‡¬πŸ‡§United Kingdom catch
  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    An idea: I have no idea if this would actually work or be remotely feasible, but we can't use proc_open, then maybe we can take advantage of the fact that Composer is itself built on Symfony components. We could perhaps use Symfony Console's command testing harness to invoke the various Composer commands CLI-style, but without creating an actual process. This means we'd need to bring in Composer's PHP code base as a runtime dependency, but wouldn't necessarily need the Composer binary itself.

Production build 0.71.5 2024