Articles in this section

Plesk PHP Composer does not detect the composer.json file: No applications were found

kb: bug Plesk for Linux ext: composer

Applicable to:

  • Plesk for Linux

Symptoms

  • A composer.json file has been placed into /var/www/vhosts/example.com/httpdocs directory
  • Pressing the Domains > example.com > PHP Composer > Scan button does not detect any applications - the following generic message is displayed:

CONFIG_TEXT: The domain was scanned. No applications were found

  • The example.com subscription has several secondary domains

Cause

The example.com domain's document root folder is shared across several domains and it is excluded from the scan. This is expected behavior according to the PHP Composer scanning logic.

A request #EXTPHPCOMP-173 has been created to improve the generic "No applications were found" message to communicate the cause of this issue more clearly.

Resolution

As a workaround, consider one of the following options:

  • Either move the composer.json file from the example.com domains's document root folder to the home directory:

# mv /var/www/vhosts/example.com/httpdocs/composer.json /var/www/vhosts/example.com/

Note: Doing this will make the PHP Composer scan the entire /var/www/vhosts/example.com/ directory and all subdirectories.

  • Or change the example.com domain's document root directory to a separate one in Domains > example.com > Hosting Settings. Alternatively, reconfigure all the secondary domains to use a separate document root directory.
Was this article helpful?

Comments

1 comment
Date Votes
  • Note: Doing this will make the PHP Composer scan the entire /var/www/vhosts/example.com/ directory and all subdirectories

    Wrong, doing so just catch the composer.json moved in root folder. Composer ext is still unable to find any composer.json in subdirectories

    0

Please sign in to leave a comment.