Website does not work: PHP files are downloaded instead of being executed

Created:

2016-12-12 03:44:52 UTC

Modified:

2017-08-17 03:09:02 UTC

1

Was this article helpful?


Have more questions?

Submit a request

Website does not work: PHP files are downloaded instead of being executed

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk Onyx for Linux

Note: This article has the reference to the issue with the fix available:

Please consider updating your server:

Symptoms

  • Website does not work: PHP files are downloaded instead of being executed.

  • Subdomain's PHP handler is changed if the handler is changed on main domain of subscription.

  • Unable to switch php version for main domain on subscription:

    phpinimng failed: Job for plesk-php70-fpm.service failed. See "systemctl status plesk-php70-fpm.service" and "journalctl -xe" for details. Failed to start plesk-php70-fpm service

    # systemctl status plesk-php70-fpm.service
    ● plesk-php70-fpm.service - The PHP 7.0.12 FastCGI Process Manager
    Loaded: loaded (/lib/systemd/system/plesk-php70-fpm.service; enabled; vendor preset: enabled)
    Active: inactive (dead) since Mon 2016-10-31 14:55:59 CET; 47s ago
    Process: 65526 ExecStart=/opt/plesk/php/7.0/sbin/php-fpm --nodaemonize (code=exited, status=0/SUCCESS)
    Main PID: 65526 (code=exited, status=0/SUCCESS)
    Status: "Ready to handle connections"

    Okt 31 14:55:55 server_name systemd[1]: Started The PHP 7.0.12 FastCGI Process Manager.
    Okt 31 14:55:59 server_name systemd[1]: Stopping The PHP 7.0.12 FastCGI Process Manager...
    Okt 31 14:55:59 server_name systemd[1]: Stopped The PHP 7.0.12 FastCGI Process Manager.
    Okt 31 14:55:59 server_name systemd[1]: plesk-php70-fpm.service: Start request repeated too quickly.
    Okt 31 14:55:59 server_name systemd[1]: Failed to start The PHP 7.0.12 FastCGI Process
    # systemctl start plesk-php70-fpm.service
    #
  • It is possible to start PHP service manually.

  • An error during a migration:

    stderr: [2016-12-05 14:07:35] ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/phpinimng' '--type' 'fpm' '--service' 'plesk-php55-fpm' '--poold' '/opt/plesk/php/5.5/etc/php-fpm.d' '--restart'] with exit code [1]
    [2016-12-05 14:07:36] ERR [panel] Remove PHP-FPM config for example.com due to service failure.
    An error occurred during domain creation: An error occurred during changing of hosting settings: phpinimng failed: Job for plesk-php55-fpm.service failed because the control process exited with error code. See "systemctl status plesk-php55-fpm.service" and "journalctl -xe" for details.
    Failed to restart plesk-php55-fpm service

Cause

The issue is submitted as a bug PPPM-5142 . The fix is considered to be included in one of the next Plesk updates.

Workaround

Change PHP handler of each affected subdomain manually.

Custom fix is available only for Plesk Onyx :

  1. Download and unzip the archive.

  2. Make a backup of /opt/psa/admin/plib/PHostingManager/Abstract.php :

    # cp /opt/psa/admin/plib/PHostingManager/Abstract.php /opt/psa/admin/plib/PHostingManager/Abstract.php_backup
  3. Replace the file /opt/psa/admin/plib/PHostingManager/Abstract.php .

    NOTE : The described above workaround might break service plan synchronization of PHP handlers for subdomains.

Attachments:

Have more questions? Submit a request
Please sign in to leave a comment.