1.5.3-2018120800​ - Can't locate object method "remove" via package "iMSCP::File" (iMSCP::Service core library)

  • Hallo,


    nach I-MSCP upgrade von 1.5.3. auf 1.5.3-2018120800


    habe ich nun folgenden Fehler bei PhpSwitcher Plugin:


    Code
    1. Ein unerwarteter Fehler ist aufgetreten:
    2. Plugin::PhpSwitcher::_deactivatePhpFpmService: Couldn't remove the psw5.6-fpm service: Can't locate object method "remove" via package "iMSCP::File" at /root/imscp-1.5.3-2018120800/engine/PerlLib/iMSCP/Service.pm line 136. at /var/www/imscp/gui/plugins/PhpSwitcher/backend/PhpSwitcher.pm line 1150.


    i-MSCP 1.5.3

    Build: 2018120800

    Codename: Ennio Morricone

    Ubuntu 14.04

    PhpSwitcher - Version 4.0.3 (Build 2017111000)




  • Schöne Grüße


    Bitte verzeihen Sie mein Deutsch…


    Meine Konfiguration ähnelt Ihrer. (i-MSCP 1.5.3 build 2018120800 auf Ubuntu 14.04.1) PHPSwitcher 4.0.3 arbeitet für mich an dieser Konfiguration, daher sollten wir in der Lage sein, eine Lösung zu finden.


    1) Welche Version von PHPSwitcher haben Sie installiert?

    2) Haben Sie versucht, PHPSwitcher zu deaktivieren und wieder zu aktivieren?


    :/

    Regards,


    /\/\___


    “There are 10 kinds of people. Those who understand base-2 and those who do not.”

  • Hat den bitte keiner eine idee?

    That look like a bug... There is not remove() method in the iMSCP::File library (core). The method should be delFile(). I'll check.


    Please say us the version of your PhpSwitcher plugin.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Ok, I did just check. The bug is in i-MSCP core (iMSCP::Service library).


    Perl
    1. iMSCP::File->new( filename => $jobFilePath )->remove();


    should be


    Perl
    1. iMSCP::File->new( filename => $jobFilePath )->delFile();


    Basically put, that's not a bug from the PhpSwitcher plugin. That's a bug in the IMSCP::Service core library. Just edit that file and change the method as showed above, then retry. You need edit the file inside the archive directory: engine/PerlLib/iMSCP/Service.pm. As I see, there is two lines with that bug:



    This bug will be fixed in next maintenance release. Thank you for your report.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Nuxwin

    Changed the title of the thread from “1.5.3-2018120800​ - PhpSwitcher Fehler” to “1.5.3-2018120800​ - Can't locate object method "remove" via package "iMSCP::File" (iMSCP::Service core library)”.
  • Nuxwin

    Added the Label patched
  • Fixed in https://github.com/i-MSCP/imsc…261cbe65bcd5386bd35393eb0

    Please, just replace the remove() method by delFile() were appropriate in your current version. The Try/Catch are not available in latest released version.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206