Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

FOP2 Community Forum

  1. Home
  2. Support
  3. Cannot login to Fop2 Manager after upgrade to 2.31.09

Cannot login to Fop2 Manager after upgrade to 2.31.09

Scheduled Pinned Locked Moved Support
12 Posts 2 Posters 560 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J
    J
    Jeremy
    wrote on last edited by
    #1

    After upgrading to 2.31.09, I can no longer login to the Fop2 Manager page. I am using the default creds of fop2admin/fop2admin, but when I try them now, I get an "Invalid Credentials" error on screen.
    Everything otherwise seemed to go smoothly and I didn't notice the problem at first, but now I've done it on 3 systems (two coming from 2.31.08 and one was 2.31.04 I believe), and it's the same on each of them.
    I am not using FreePBX and my /var/www/html/fop2/admin/config.php was and still is set as follows:

    <?php
    // If FreePBX is installed, use its database auth system by default
    // To set up usernames and passwords
    define('USE_FREEPBX_AUTH',false);
    
    // User/Pass to Log into FOP2Manager. If we detect a FreePBX session
    // or a fop2 sessions with the "manager" permission, the authentication
    // will be asumed as ok.
    
    $ADMINUSER = "fop2admin";
    $ADMINPWD  = "fop2admin";
    

    Any ideas for me?

    1 Reply Last reply
    0
    • N
      N
      nicolas
      wrote on last edited by
      #2

      Users are stored on the fop2managerusers table now in your database. At upgrade/install time, the user/pass defined in the config file are inserted into the table. Check your database and inspect that particular table.

      mysql -u root -p fop2 -e "select * from fop2managerusers"

      Use the correct database name for your setup, it most probably is fop2 but I cannot know for sure.

      Do you see an entry? is the user "fop2admin" or a different user? Password field is a sha1 hash, so if you want to change/reset the password by hand, you can do so with

      update fop2managerusers set password=sha1('newpassword') where user='fop2admin'

      or similar to that.

      Best regards,

      1 Reply Last reply
      0
      • J
        J
        Jeremy
        wrote on last edited by
        #3

        Thanks for the reply.
        However, I'm actually using FOP2 and Asterisk <u>without</u> a database for simplicity. I realize this limits the availability of many features, but I formerly was able to use the fop2admin page for changing some various options.

        1 Reply Last reply
        0
        • N
          N
          nicolas
          wrote on last edited by
          #4

          Hi,

          The system should still validate against the configured values in config.php for ADMINUSER and ADMINPWD with one exception: you cannot use fop2admin/fop2admin. Be sure to change either the user or password in the config.php file... it should work then. If you want to review the code that checks user/pass its in secure/secure-functions.php

          Best regards,

          1 Reply Last reply
          0
          • J
            J
            Jeremy
            wrote on last edited by
            #5

            Specifying a different login in config.php does work, BUT once I'm in, there are no longer any buttons on the left panel for me to configure anything. Mainly I'm just interested in the Settings button, so I can set showLines to 1 and some other display related settings.

            1 Reply Last reply
            0
            • N
              N
              nicolas
              wrote on last edited by
              #6

              Well, in that case you will have to modify some code, edit the file /var/www/html/fop2/admin/secure/secure-functions.php and look for the

              function check_acl($resource, $reqlevellevel=1) {
              

              just after that, add a return true, something like:

              function check_acl($resource, $reqlevellevel=1) {
                 return true;
                 global $db, $conf, $levels;
                 etc, etc, etc,
              

              Then you will be able to see all sections.

              Best regards,

              1 Reply Last reply
              0
              • J
                J
                Jeremy
                wrote on last edited by
                #7

                We are getting close!
                That worked, and I can see all the buttons now, but whenever I try to make any change and try to submit it, I get the following error:
                DB Connection fail: SQLSTATE[HY000]: General error: 1 SQL logic error or missing database

                I've checked and double-checked the perms of my fop2settings.db file and containing folder, so I don't think taht's the problem (and the error is slightly different for permissions problems anyway: DB Connection fail: SQLSTATE[HY000]: General error: 14 unable to open database file)

                Thank you for your continued support.

                1 Reply Last reply
                0
                • N
                  N
                  nicolas
                  wrote on last edited by
                  #8

                  Check permissions of the container directory, or add some echo lines to see what is the file that the manager is attempting to open. You can have a file with 777 permissions, but if directory is not writable/executable by the web server user, then file won't be accessible. Another thing to check would be selinux... anyways, that same install worked before upgrading the fop2 manager? If so, permissions shouldn't have changed....

                  1 Reply Last reply
                  0
                  • J
                    J
                    Jeremy
                    wrote on last edited by
                    #9

                    Hmmm... perms seems to be fine. The fop2settings.db is 666 and the owning folder is 755. fop2_server is running as root and owns the folder and files.
                    SELinux is turned off.
                    Where/how would I add the echo lines?

                    1 Reply Last reply
                    0
                    • N
                      N
                      nicolas
                      wrote on last edited by
                      #10

                      Then remove the file and let fop2 recreate it.

                      1 Reply Last reply
                      0
                      • J
                        J
                        Jeremy
                        wrote on last edited by
                        #11

                        I removed the file and restarted, and a new fop2settings.db was created with proper perms, but I still get the same error when trying to edit anything in the administrator page.
                        For now it seems the workaround is to do a clean install of 2.31.08, set everything up the way I want it, and then upgrade to 2.31.09.
                        I'll also try a clean install of 2.31.09 (without a previous version to upgrade) to see if the problem is actually upgrade-related or just inherent to 2.31.09 when not running a database.

                        1 Reply Last reply
                        0
                        • J
                          J
                          Jeremy
                          wrote on last edited by
                          #12

                          Just as an update to anyone running across this...
                          I did a new install of 2.31.15 at at a nearly identical site (again, without a database), and the manager page is working for me again!
                          The one new step is, as you mentioned above, in config.php I need to change ADMINUSER and ADMINPWD to something other than the default "fop2admin". Once that's done, I am able to login to the manager page and all the buttons show up and I can save setting normally, etc.

                          1 Reply Last reply
                          0

                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                          With your input, this post could be even better 💗

                          Register Login
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          Powered by NodeBB Contributors
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups