An exception has been thrown after system upgrade

  • Hello guys,

    I have the following problem after login to the panel.

    The server has been upgraded today from Jessie to Stretch and from i-MSCP 1.5.3 to i-MSCP 1.5.3-2018120800

    Everything went well, but unfortunately after the login form I can not do anything else.


    With Debug Mode enabled, I can see:

    Code
    1. An unexpected error occurred
    2. An exception has been thrown in file /var/www/imscp/gui/library/Functions/Shared.php at line 1634:
    3. Invalid Host "w00.mydomain.com4443"


    Unfortunately the logs are not telling big things… in effect the error is reported nowhere…

    This is the only thing I have.


    The list of the installed Plugins is: ServerDefaultPage, Postscreen, ClamAV, SpamAssassin, Monitorix, RoundcubePlugins, PhpSwitcher, OpenDKIM, Mailgraph, LetsEncrypt, WHMCS


    Please tell me where I can watch in order to find the cause.

    Thx for help,

    bye Kess.

  • Just for your information,

    I modified line 1599 in /var/www/imscp/gui/library/Functions/Shared.php

    from

    Code
    1. $possibleHostSources = ['HTTP_X_FORWARDED_HOST', 'HTTP_HOST', 'SERVER_NAME', 'SERVER_ADDR'];

    to

    Code
    1. $possibleHostSources = ['HTTP_X_FORWARDED_HOST', 'SERVER_NAME', 'HTTP_HOST', 'SERVER_ADDR'];


    It seems that $_SERVER['HTTP_HOST'] returns w00.mydomain.com4443 and this is not the result we expect. I don't know why the result is not w00.mydomain.com:4443

    So I choosed SERVER_NAME as preference...


    Now the panel is working again as expected.

  • Nuxwin

    Added the Label won't fix