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:<?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?
-
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,
-
-
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 databaseI'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....
-
-
-
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.
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