PhpSwitcher $dirname parameter is not defined

  • Hi,

    Have upgraded my debian from 8 to 9 and wanted to upgrade PhpSwitcher and now I got this:


    Code
    1. Plugin::PhpSwitcher::disable: $dirname parameter is not defined. at /var/www/imscp/engine/PerlLib/iMSCP/Dir.pm line 303


    imscp.plugin:


    Code: plugin_config
    1. {"phpinfo":true,"compiled":{"php_fpm_log_file_pattern":"psw%PHP_VERSION%-fpm.log","php_fpm_logrotate_file_pattern":"psw%PHP_VERSION%-fpm","php_fpm_pid_file_pattern":"psw%PHP_VERSION%-fpm.pid","php_fpm_reopenlogs_script_pattern":"psw%PHP_VERSION%-fpm-reopenlogs","php_fpm_systemd_unit_pattern":"psw%PHP_VERSION%-fpm.service","php_fpm_sysvinit_pattern":"psw%PHP_VERSION%-fpm","php_fpm_tmpfile_pattern":"psw%PHP_VERSION%-fpm.conf","php_fpm_service_name_pattern":"psw%PHP_VERSION%-fpm","php_fpm_uds_path_pattern":"psw%PHP_VERSION%-fpm-%DOMAIN%.sock","php_fpm_run_dir":"\/run\/phpswitcher","php_fpm_log_dir":"\/var\/log\/phpswitcher","php_fpm_lib_dir":"\/usr\/local\/lib\/phpswitcher","sys_logrotate_dir":"\/etc\/logrotate.d","sys_tmpfiles_dir":"\/etc\/tmpfiles.d","sys_systemd_unit_dir":"\/etc\/systemd\/system","sys_sysvinit_dir":"\/etc\/init.d"},"packaged":{"php_fpm_service_name_pattern":"php%PHP_VERSION%-fpm","php_fpm_uds_path_pattern":"php%PHP_VERSION%-fpm-%DOMAIN%.sock","php_fpm_run_dir":"\/run\/php","php_fpm_log_dir":"\/var\/log\/php"},"database":{"php_version_table":"php_switcher_version","domain_php_version_table":"php_switcher_version_admin"}}


    Code: plugin_config_prev
    1. {"phpinfo":true,"php_fpm_log_file_pattern":"psw%PHP_VERSION%-fpm.log","php_fpm_logrotate_file_pattern":"psw%PHP_VERSION%-fpm","php_fpm_pid_file_pattern":"psw%PHP_VERSION%-fpm.pid","php_fpm_reopenlogs_script_pattern":"psw%PHP_VERSION%-fpm-reopenlogs","php_fpm_systemd_unit_pattern":"psw%PHP_VERSION%-fpm.service","php_fpm_sysvinit_pattern":"psw%PHP_VERSION%-fpm","php_fpm_tmpfile_pattern":"psw%PHP_VERSION%-fpm.conf","php_fpm_service_name_pattern":"psw%PHP_VERSION%-fpm","php_fpm_run_dir":"\/run\/phpswitcher","php_fpm_log_dir":"\/var\/log\/phpswitcher","php_fpm_lib_dir":"\/usr\/local\/lib\/phpswitcher","sys_logrotate_dir":"\/etc\/logrotate.d","sys_tmpfiles_dir":"\/etc\/tmpfiles.d","sys_systemd_unit_dir":"\/etc\/systemd\/system","sys_sysvinit_dir":"\/etc\/init.d"}


    Code: plugin_status
    1. todisable



    line 303 of file ../dir.pm is:


    Code: dir.pm
    1. defined $dirname or die( '$dirname parameter is not defined.' );


    How to correct this ?

  • Moin Rexikon


    Please try to connect to mysql server via console and then deactivate the plugin

    my System :

    - Distribution: Debian | Release: 9.13 | Codename: wheezy
    - i-MSCP Version: i-MSCP 1.5.3| Build: 20181208 | Codename: Ennio Morricone
    - Plugins installed: ClamAV (v. 1.3.0), Mailgraph (v 1.1.1), OpenDKIM (v 2.0.0), SpamAssassin (v 2.0.1)
    - LetsEncrypt (v3.3.0), PhpSwitcher (v 5.0.5), RoundcubePlugins (v 2.0.2)YubiKeyAuth 1.1.0

  • Moin Rexikon


    Please try to connect to mysql server via console and then deactivate the plugin

    Tried this, but problem still exist because I'm unable to: delete, uninstall this plugin.


    Edit: after deactivation in DB what should I do ?



    Edit2: Wait a moment, uninstall went ok

    Edited once, last by Rexikon ().