Details

    • Bug
    • Resolution: Not A Bug
    • Major
    • None
    • Professional Edition
    • Web Interface
    • None

    Description

      upgraded to revision 10951 

      login page giving 500 error

      error.log reporting:

      [Sun Jan 17 12:28:36.578518 2021] [:error] [pid 29389] [client x.x.x.x:51108] PHP Fatal error:  Call to undefined function random_int() in /opt/observium/includes/defaults.inc.php on line 768

      Found in defaults.inc.php:

      $config['irc_nick'] = "Observium" . random_int(1, 99999);

       

       

       

      Attachments

        Activity

          [OBS-3612] latest SVN up broke login page
          bot Observium Bot made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

          indeed, that was the issue. somehow apache had reverted to using 5.x through some debian update. once forced back to 7, svn head works fine.

          Thanks!!

          hoyosa Andrew Hoyos added a comment - indeed, that was the issue. somehow apache had reverted to using 5.x through some debian update. once forced back to 7, svn head works fine. Thanks!!

          Hrm, probably I know how that possible:

          • your apache still use old php (5.x), check it in About page (https://<observium>/about/). While poller/discovery used new php (7.x).

          Check your packages and remove old ones:

          dpkg -l | grep apache2-mod-php | grep ii

          landy Mike Stupalov added a comment - Hrm, probably I know how that possible: your apache still use old php (5.x), check it in About page (https://<observium>/about/). While poller/discovery used new php (7.x). Check your packages and remove old ones: dpkg -l | grep apache2-mod-php | grep ii

          I checked php.ini files, they are default from debian9. No mention of this function being blocked.

          Confirming that mt_rand() fix works fine.

           

          root@nm:/opt/observium# svn revert includes/defaults.inc.php

          Reverted 'includes/defaults.inc.php'

          root@nm:/opt/observium# svn up

          Updating '.':

          U    includes/defaults.inc.php

          Updated to revision 10952.

           

           

           

          hoyosa Andrew Hoyos added a comment - I checked php.ini files, they are default from debian9. No mention of this function being blocked. Confirming that mt_rand() fix works fine.   root@nm:/opt/observium# svn revert includes/defaults.inc.php Reverted 'includes/defaults.inc.php' root@nm:/opt/observium# svn up Updating '.': U    includes/defaults.inc.php Updated to revision 10952.      
          landy Mike Stupalov made changes -
          Resolution New: Not A Bug [ 6 ]
          Status Original: Pending Response [ 10000 ] New: Resolved [ 5 ]

          Not a bug, but temporary fixed in r10952.

          landy Mike Stupalov added a comment - Not a bug, but temporary fixed in r10952.
          landy Mike Stupalov made changes -
          Status Original: In Review [ 10101 ] New: Pending Response [ 10000 ]

          Use random_int() function in this place completely not neccesary, I replace it with mt_rand().

          But this is completelly impossible that this is function not exist on any php7.x.
          This is native function, not loaded as module!

          Only way - if function blocked by php.ini config.

          landy Mike Stupalov added a comment - Use random_int() function in this place completely not neccesary, I replace it with mt_rand(). But this is completelly impossible that this is function not exist on any php7.x. This is native function, not loaded as module! Only way - if function blocked by php.ini config.
          landy Mike Stupalov made changes -
          Status Original: Pending Response [ 10000 ] New: In Review [ 10101 ]

          Yep, just some additional information after looking at this a bit more - this is a Debian 9 machine, which doesn't natively have php 7.1 or 7.2 in repo. 

          The install guide still seems to suggest that Debian 9 is supported, but I see the software requirements have been updated to list 7.1 as min. 

          So, I'd suggest you either need to say Debian 9 no longer supported (because lack of php 7.1/7.2 natively) or include library for backwards compatibility.

           

           

          hoyosa Andrew Hoyos added a comment - Yep, just some additional information after looking at this a bit more - this is a Debian 9 machine, which doesn't natively have php 7.1 or 7.2 in repo.  The install guide still seems to suggest that Debian 9 is supported, but I see the software requirements have been updated to list 7.1 as min.  So, I'd suggest you either need to say Debian 9 no longer supported (because lack of php 7.1/7.2 natively) or include library for backwards compatibility.    

          People

            adama Adam Armstrong
            hoyosa Andrew Hoyos
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: