PHP directory attempted to be used to run PHP, instead of the binary

Created on 23 October 2021, about 3 years ago
Updated 13 April 2023, over 1 year ago

Problem/Motivation

PHPStan command failed:
/opt/plesk/php/7.4/bin /var/www/vhosts/mysite.com/newsite/vendor/bin/phpstan analyse --memory-limit=-1 --error-format=json --configuration=/var/www/vhosts/mysite.com/tmp/upgrade_status/deprecation_testing.neon /var/www/vhosts/mysite.com/newsite/web/modules/custom/tabedit

Command output: Empty.

Command error:
sh: /opt/plesk/php/7.4/bin: Is a directory sh: line 0: exec: /opt/plesk/php/7.4/bin: cannot execute: Is a directory

Steps to reproduce

I know this has been gone over because I read most of the issues related to it. Did I miss how this has been fixed because I have three modules showing this.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Needs work

Version

3.11

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States wxman

Live updates comments and jobs are added and updated live.
  • Needs manual testing

    The change/bugfix cannot be fully demonstrated by automated testing, and thus requires manual testing in a variety of environments.

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.

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    Just ran into this issue with upgrade_status 4.0.0 on a plesk hosted website with php 8.1. So I tried the patch.

    open_basedir is configured in plesk as:
    {WEBSPACEROOT}{/}{:}{TMP}{/}

    Error before:

    The PHP binary was not found. Scanning is not possible until this is resolved.

    Installed the patch

    - Installing drupal/upgrade_status (4.0.0): Extracting archive
      - Applying patches for drupal/upgrade_status
        https://git.drupalcode.org/project/upgrade_status/-/merge_requests/26.diff (PHP directory attempted to be used to run PHP, instead of the binary)
    

    Cleared caches and reloaded /admin/reports/upgrade-status

    Error afterwards is the same:

    The PHP binary was not found. Scanning is not possible until this is resolved.

    My current workaround is similar to change the open_basedir to:
    {WEBSPACEROOT}{/}{:}{TMP}{/}{:}{/}opt{/}plesk{/}php{/}8.1{/}bin{/}

    I wrote a blog post about the workaround, if it helps someone: https://julian.pustkuchen.com/en/run-drupal-8-upgrade-status-module-ples...

    So sadly my manual testing says, this doesn't work - at least in our case. Nor it changes the error message.

    Any ideas?

Production build 0.71.5 2024