Cannot login to Fop2 Manager after upgrade to 2.31.09

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:
// If FreePBX is installed, use its database auth system by default
// To set up usernames and passwords

// 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?


  • 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,
  • Thanks for the reply.
    However, I'm actually using FOP2 and Asterisk without 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.
  • 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,
  • 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.
  • 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,
  • 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.
  • 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....

  • 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?
  • Then remove the file and let fop2 recreate it.
  • 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.
  • 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.
Sign In or Register to comment.