Menu

#5055 Perl execution error after updating to 1.870

1.870
open
nobody
None
5
2018-02-02
2017-12-11
KF Camp
No

I've updated from 1.860 to 1.870 and only get perl execution errors. Webmin is non accessable

The error seen is:

Error - Perl execution failed

Can't locate /authentic-init.pm in @INC (you may need to install the ::authentic-init module) (@INC contains: /usr/local/etc/webmin-1.870/authentic-theme/lib /usr/local/etc/webmin-1.870 /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 . /usr/local/etc/webmin-1.870/ ..) at /usr/local/etc/webmin-1.870/authentic-theme/authentic-lib.pm line 18. Compilation failed in require at /usr/local/etc/webmin-1.870/authentic-theme/session_login.cgi line 10.

System is running Slackware 14.1

Discussion

1 2 3 > >> (Page 1 of 3)
  • Jamie Cameron

    Jamie Cameron - 2017-12-12

    Which linux distribution and version are you running webmin on there?

     
  • KF Camp

    KF Camp - 2017-12-12

    We're running Slackware 14.1 with Webmin utilizing "Old Webmin Theme"

    Just to make things even more fun, I replaced the "authentic-theme" files with the files from 1.860 (after backing up the directory) and the issue goes away

    If I restore the original files, the issue returns

    Ken

     
  • Jamie Cameron

    Jamie Cameron - 2017-12-13

    So you get errors about the authetic theme, even though you aren't using it?? That's very surprising ..

     
  • KF Camp

    KF Camp - 2017-12-13

    What was even more surprising was that it rendered Webmin effectivly useless, until I copied over the Authentic-theme files from 1.860

     
  • KF Camp

    KF Camp - 2017-12-13

    Ok,

    I think I narrowed the issue down to authentic-lib.pm

    changing line 18 from
    require "$current_theme/authentic-init.pm";

    to
    require "/usr/local/etc/webmin-1.870/authentic-theme/authentic-init.pm";

    appears to resolve the issue, not that I've gone through everything to verify functionality

    The larger question forming is why am I the only one seeing this :\

     
  • KF Camp

    KF Camp - 2017-12-13

    changing line 18 from
    require "$current_theme/authentic-init.pm";

    to

    do "authentic-theme/authentic-init.pm";

    Also seems to resolve the issue

     
  • KF Camp

    KF Camp - 2017-12-13

    Testing found that the above changes to authentic-init.pm while resolving the errors, it also creates "form" functionality issues in the Authentic-theme (primarily under firefox)

    For example you can select the MySQL module, A database, and table, however "view data" in inoperable.

    Chrome seemed work with 4 out of 5 modules checked

    Downgrading the authentic-theme from 1.870 to 1.860 resolves the errors with no side effects noticed

    Since I'm not sure how the "old webmin theme" will be impacted I've decided to downgrade the authentic-theme to 1.860 until a fix for 1.870 can be provided.

    As a side note (I'm not sure if this is a bug or not) but the primary reason for using the Old Webmin Theme over the Authentic Theme due to the difference in how they handle MySQL table sorts

    OWT will sort all of the data (1-400 to 400-1), where Authentic-theme only sorts the 25 results on the page.

    Anyway, I've done all I can think of to try to help with this
    Let me know if you need me to do anything

    Ken

     
  • Jamie Cameron

    Jamie Cameron - 2017-12-13

    I'll ask the theme author to look into this ..

     
  • Ilia Rostovtsev

    Ilia Rostovtsev - 2017-12-14

    @KF Camp

    Hi,

    About your Perl error. Well, I can't tell for sure right now unfortunately.

    Could you check few things on your system?

    Can you run in console:

    perl -e "use File::Basename; print dirname(__FILE__);"

    What is the output?

    Also will chaning in line 10 of session_login.cgi require to do will change anything?

    About MySQL issues. That should also be fine. Make sure to clear browser's cache and/or try in incognito mode. There are browser extensions that might break functionality (that happened before).

     
  • Ilia Rostovtsev

    Ilia Rostovtsev - 2017-12-14

    Yes, and sorting issue in MySQL is actually a deal. I will revert it to the original behaviour.

     
  • KF Camp

    KF Camp - 2017-12-14

    Hello Ilia,

    The result was "."
    Meaning root@localhost: $ perl -e "use File::Basename; print dirname(FILE);"
    resulted in: .root@localhost:

    Changing session_login.cgi line 10
    from: require(dirname(FILE) . "/authentic-lib.pm");
    to: do "authentic-theme/authentic-lib.pm";

    with out the above mentioned changes to authentic-lib.pm produces:
    Undefined subroutine &main::settings called at /usr/local/etc/webmin-1.870/authentic-theme/session_login.cgi line 15

    "With" the above mentioned changes to authentic-lib.pm functionality remains the same as described earlier

    Ken

     
  • Ilia Rostovtsev

    Ilia Rostovtsev - 2017-12-14

    Ken,

    What if line 10 changed to?

    do (dirname(__FILE__) . "/authentic-lib.pm");

    I suppose same result?

    Okay then, what is the output of, if added after/instead of line 10:

    `
    print "Content-type: text/html\n\n";
    print dirname(FILE) . "/authentic-lib.pm" . " : lib path\n";
    print $current_theme . " : current_theme\n";
    print $config_directory. ": config_directory\n";

    `

     
  • KF Camp

    KF Camp - 2017-12-14

    Ilia,

    Yes, the same

    "After Line 10" output is:
    ./authentic-lib.pm : lib path : current_theme /etc/webmin: config_directory Auth-type: auth-required=1 Set-Cookie: redirect=1; path=/ Set-Cookie: testing=1; path=/; secure X-Frame-Options: SAMEORIGIN Content-Security-Policy: script-src 'self' 'unsafe-inline' 'unsafe-eval'; frame-src 'self'; child-src 'self' Content-type: text/html; Charset=UTF-8

    Instead of Line 10 output is:
    ./authentic-lib.pm : lib path : current_theme : config_directory HTTP/1.0 500 Perl execution failed Server: MiniServ/1.870 Date: Thu, 14 Dec 2017 12:00:25 GMT Content-type: text/html; Charset=iso-8859-1 Connection: close

     
  • Ilia Rostovtsev

    Ilia Rostovtsev - 2017-12-14

    For some reason $current_theme is not initialized on WebminCore init.

    The text editor of SF clipped double underscore in dirname subroutine.

    Could you try running it again, I think File::Basename works fine, just to double check, run it anywhere:

    print dirname(__FILE__) . "/authentic-lib.pm" . " : lib path\n";

     
  • KF Camp

    KF Camp - 2017-12-14

    After Line 10:
    /usr/local/etc/webmin-1.870/authentic-theme/authentic-lib.pm : lib path : current_theme /etc/webmin: config_directory Auth-type: auth-required=1 Set-Cookie: redirect=1; path=/ Set-Cookie: testing=1; path=/; secure X-Frame-Options: SAMEORIGIN Content-Security-Policy: script-src 'self' 'unsafe-inline' 'unsafe-eval'; frame-src 'self'; child-src 'self' Content-type: text/html; Charset=UTF-8

    Instead of Line 10:
    /usr/local/etc/webmin-1.870/authentic-theme/authentic-lib.pm : lib path : current_theme : config_directory HTTP/1.0 500 Perl execution failed Server: MiniServ/1.870 Date: Thu, 14 Dec 2017 12:25:35 GMT Content-type: text/html; Charset=iso-8859-1 Connection: close

     
  • KF Camp

    KF Camp - 2017-12-14

    Just tried logging into Webmin with your additions to session_login.cgi and was met with a new error

    Error - No cookies

    Your browser does not support cookies, which are required for this web server to work in session authentication mode

    I'm not sure if this was expected or not

    Ken

     
  • Ilia Rostovtsev

    Ilia Rostovtsev - 2017-12-14

    Okay, and now, just try 2 senarious:

    1. Replace in authentic-lib.pm line 13 with this:

    our (%in, %text, %config, $current_theme);

    in case it doesn't work, try adding on line 17":

    our $current_theme = "authentic-theme";

     
  • KF Camp

    KF Camp - 2017-12-14

    Do you want to use the original authentic-lib.pm line 18
    require "$current_theme/authentic-init.pm";

    or the modified?
    do "authentic-theme/authentic-init.pm";

     
  • Ilia Rostovtsev

    Ilia Rostovtsev - 2017-12-14

    Original.

     
  • Ilia Rostovtsev

    Ilia Rostovtsev - 2017-12-14

    I just had a fix for MySQL/PostgreSQL sorting issue. Now it will work as intended and use server-side sorting.

     
  • KF Camp

    KF Camp - 2017-12-14

    Ok,

    Reverting both authentic-lib.pm and session_login.cgi to their original states and adding your lines 13 and 17 fixes resolved the "Perl execution" error and webmin loads

    However switching to the Authentic-Theme the module issues (For example you can select the MySQL module, A database, and table, however "view data" is inoperable.) still exist

     
  • KF Camp

    KF Camp - 2017-12-14

    Another example, the only way I can switch my theme back ot OWT is by reverting to 1.860's authentic-theme code, due to form selection issues

     
  • Ilia Rostovtsev

    Ilia Rostovtsev - 2017-12-14

    Wait a second, please.

    I don't need both senarious applied.

    Can you remove line 17. I just want to know if fix for line 13 works alone or not.

    The issue with not working View Data is most likely cache issue.

    Clear browser's cache and try again. Firefox might fail due to broken extensions. Try Incognito Tab. It works for me on all servers and with all browsers.

    Please go to theme's settings and force update the theme.

    Afterwards, just apply the fix to line 13 with

    our (%in, %text, %config, $current_theme);

    Tell me how it goes.

     
  • Ilia Rostovtsev

    Ilia Rostovtsev - 2017-12-14

    Why in the world Old Webmin Theme but not Gray Theme for example?

     
  • KF Camp

    KF Camp - 2017-12-14

    Sorry,

    I wasn't trying to jump ahead on you, only trying to describe what I'm seeing

    Line 13 only = previous perl execution error
    Line 17 only = no error

    Cache cleared no change
    Incongnito tried with no change
    I'm not using any extensions / Java and flash are disabled

    I can update the theme but will have to revert to 1.860 code to do it

    Why OWT? Meh... I like it, it's simple, clean, and old like me ;)

    Do you want me to revert and update?

     
1 2 3 > >> (Page 1 of 3)

Log in to post a comment.