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:
Any ideas for me?
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?
Comments
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,
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.
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,
just after that, add a return true, something like:
Then you will be able to see all sections.
Best regards,
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.
SELinux is turned off.
Where/how would I add the echo lines?
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.
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.