Articles in this section

Unable to remove a broken PHP handler in Plesk

Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux
  • Unable to remove a broken PHP handler:

    # plesk bin php_handler --remove -id plesk-php72-fpm
    The PHP handler "plesk-php72-fpm" is not found.
    exit status 4

  • PHP handler is marked as broken:

    # plesk bin php_handler --list | grep broken
    id: display name: full version: version: type: cgi-bin: php-cli: php.ini: custom: status:
    [..]
    plesk-php72-fpm 7.2.24 7.2.24 7.2 fpm /opt/plesk/php/7.2/sbin/php-fpm /opt/plesk/php/7.2/bin/php /opt/plesk/php/7.2/etc/php.ini true broken

Note: 'plesk-php72-fpm' handler id used as an example, it should be substituted with your own version.

Cause

Orphaned records remain in the database:

# plesk db "select section,name from ServiceNodeConfiguration where section='phphandlers' and name='plesk-php72-fpm' union all select section,name from ServiceNodeEnvironment where section='phphandlers' and name='plesk-php72-fpm'; "
+-------------+-----------------+
| section | name |
+-------------+-----------------+
| phphandlers | plesk-php72-fpm |
| phphandlers | plesk-php72-fpm |
+-------------+-----------------+

Resolution

  1. Connect to the server via SSH

  2. Create Plesk database backup

  3. Access Plesk database and execute the following query:

    MYSQL_LIN: MariaDB [psa]> begin;
    MariaDB [psa]> delete from ServiceNodeConfiguration where section='phphandlers' and name='plesk-php72-fpm';
    MariaDB [psa]> delete from ServiceNodeEnvironment where section='phphandlers' and name='plesk-php72-fpm';
    MariaDB [psa]> commit;

  4. Reread PHP handlers

    # plesk bin php_handler --reread

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.