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. FOP2 Manager Access and Login Issue

FOP2 Manager Access and Login Issue

Scheduled Pinned Locked Moved Support
16 Posts 2 Posters 5.2k 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.
  • N
    N
    nicolas
    wrote on last edited by
    #4

    What user/password are you using in the manager? Credentials for it are different than to login to the fop2 panel itself, it will use the FreePBX credentials if use_freepbx_auth is set to true in config.php, or it will use its own user/pass defined on that same config.php page if you do not use freepbx or the former setting is set to false.

    Anyways, if you cannot login from ANY machine, that is actually a good sign ,and an indication of that what you might have broken is not related to fop2 manager at all, but to your php sessions. Check your apache error log file, and look for session errors/problems.

    It is surprisingly usual when using some ready made distros, where they offer an apache web server that runs under the "asterisk" user, that is different from the regular distro web server that usually has a special user like nobody, www-data, or similar. Whe those systems update apache or php via yum or repositories, they might install the original distro package and not the modified asterisk distro one, so files and directories change ownership back to apache, www-data or whatever. However, the configuration file remains the same and runs under 'asterisk'. That effectively breaks php session handling

    The fix is usually changing ownership of the session variable, something like:

    chown asterisk.asterisk /var/lib/php/session

    Best regards,

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

      What user/password are you using in the manager? Credentials for it are different than to login to the fop2 panel itself, it will use the FreePBX credentials if use_freepbx_auth is set to true in config.php, or it will use its own user/pass defined on that same config.php page if you do not use freepbx or the former setting is set to false.

      Anyways, if you cannot login from ANY machine, that is actually a good sign ,and an indication of that what you might have broken is not related to fop2 manager at all, but to your php sessions. Check your apache error log file, and look for session errors/problems.

      It is surprisingly usual when using some ready made distros, where they offer an apache web server that runs under the "asterisk" user, that is different from the regular distro web server that usually has a special user like nobody, www-data, or similar. Whe those systems update apache or php via yum or repositories, they might install the original distro package and not the modified asterisk distro one, so files and directories change ownership back to apache, www-data or whatever. However, the configuration file remains the same and runs under 'asterisk'. That effectively breaks php session handling

      The fix is usually changing ownership of the session variable, something like:

      chown asterisk.asterisk /var/lib/php/session

      Best regards,

      1 Reply Last reply
      0
      • H
        H
        homeautomation
        wrote on last edited by
        #6

        I've tried User: fop2admin Password: fop2admin as defined in /var/www/html/fop2/admin/config.php. I've also tried my normal PBX in a Flash / FreePBX credentials as well as all other accounts defined in manager.conf and manager_custom.conf.

        I've tried using both the internal host name as well as the server IP address. No change in FOP2 Manager behavior.

        I can successfully log in to the PBX in a Flash FreePBX interface just fine. All PC's and browsers being used can access all other applications and websites without issue, both internal and external.

        I've attached the associated access logs from within /var/log/httpd for your review. Nothing stood out to me. The error_log had nothing to report.

        By the way, I'm again experiencing intermittent FOP2 Manager access issues again. While typing this message I used a separate Firefox browser tab to perform another FOP2 Manager attempt and it worked. I closed that session and tried again from the same PC using IE and Chrome and they both prompted me to log in and failed. I then opened another Firefox tab and it failed there as well. This condition is only experienced when I access the FOP2 Manager interface.

        I've confirmed the /var/lib/php/session folder has asterisk as the owner (see attached). I also ran chown asterisk.asterisk /var/lib/php/session without any change in this behavior.

        Here are the access logs. Any other thoughts? Thank you!

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

          Be careful on what you post, you might be disclosing sensitive information in a public forum. What do you have in config.php for the use_freepbx_auth define ? Set it to false if you want to log with fop2admin/fop2admin. What do you have there?

          1 Reply Last reply
          0
          • H
            H
            homeautomation
            wrote on last edited by
            #8

            Thank you for the post warning.

            Interesting. After changing the define('USE_FREEPBX_AUTH',true); to define('USE_FREEPBX_AUTH',false) attempting to access FOP2 Manager from any PC and browser does not present the login page, but it also doesn't present the FOP2 Manager page. Internet Explorer reports HTTP 500 The website cannot display the page •The website is under maintenance. •The website has a programming error. Firefox and Chrome simply present a blank page. Changing back to define('USE_FREEPBX_AUTH',true); again prompts me to log in to FOP2 Manager. As experience before, all credentials used come back as invalid. Hopefully this offers a hint as to what might be wrong.

            Thanks

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

              If you see a blank page or a 500 error, then there MUST be a log line for php errors on your system, that is defined in php.ini itself. It is usually logged in the apache error_log file, so, as I pointed before, please look at your apache error log for possible php errros. I still suspect you have session permission issues in php of some sort, or maybe even you introduced some kind of syntax error when typing 'false' on that define line.

              1 Reply Last reply
              0
              • H
                H
                homeautomation
                wrote on last edited by
                #10

                It appears I did have a syntax error when I tried using define('USE_FREEPBX_AUTH',false). I just noticed the commented out entry I left in the file omitted the semicolon at the end. That was my error and it did create an entry the error_log file as one would suspect. I should have checked.

                I've since corrected the syntax issue and have it set to define('USE_FREEPBX_AUTH',false);. I'm again presented with the Fop2 Manager log in page but can now successfully log in using the admin credentials defined within /var/www/html/fop2/admin/config.php. I can now log into FOP2 Manager from all PC's and browsers that previously failed.

                It appears FOP2 is having difficulty detecting FreePBX. My PBX in a Flash system is currently running FreePBX 2.11.0.42.

                1 Reply Last reply
                0
                • H
                  H
                  homeautomation
                  wrote on last edited by
                  #11

                  I subsequently noticed the following entries in my err_log file since changing to define('USE_FREEPBX_AUTH',false);. I'm not sure if these are somehow related.

                  [Mon Mar 09 05:07:19 2015] [error] [client ::1] script not found or unable to stat: /var/www/cgi-bin/awstats.pl
                  [Mon Mar 09 05:14:37 2015] [notice] caught SIGTERM, shutting down
                  [Mon Mar 09 05:18:47 2015] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
                  [Mon Mar 09 05:18:47 2015] [notice] Digest: generating secret for digest authentication ...
                  [Mon Mar 09 05:18:47 2015] [notice] Digest: done
                  [Mon Mar 09 05:18:47 2015] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips mod_wsgi/3.3 Python/2.6.6 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
                  [Mon Mar 09 05:37:49 2015] [error] [client 192.168.1.194] script not found or unable to stat: /var/www/cgi-bin/awstats.pl

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

                    I do not think the manager has issues, but you might not be using the freepbx users mechanism for authentication (auth type database)

                    What is the output of this mysql query? (If you get results, do not post the sha1 pass, change it for xxxx)

                    mysql -p asterisk -e "select * from ampusers"

                    Best regards,

                    1 Reply Last reply
                    0
                    • H
                      H
                      homeautomation
                      wrote on last edited by
                      #13

                      When running that command it prompts me for the mysql password. Once the mysql password is entered the following is returned. I intentionally removed the sha pass.

                      +-----------------+-----------------------------------------------+-----------------------+------------------------+-----------------+--------------+
                      | username | password_sha1 | extension_low | extension_high | deptname | sections |
                      +-----------------+-----------------------------------------------+-----------------------+------------------------+-----------------+---------------+
                      | admin | | | | | * |
                      +-----------------+-----------------------------------------------+-----------------------+-------------------------+-----------------+--------------+

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

                        Try this, using your admin password and compare the result to the stored password_sha1 field

                        mysql -u root -p asterisk -e "select sha1('mypassword')"

                        Do they match?

                        My guess is that you are not using database based auth in freepbx, but .htaccess file based, and password stored in the DB is not the one stored in .htaccess , or something to that effect.

                        In any case, just leave the use_freepbx_auth set to false and set whatever user/password you want in the config.php.

                        Best regards,

                        1 Reply Last reply
                        0
                        • H
                          H
                          homeautomation
                          wrote on last edited by
                          #15

                          I receive two different sha1 results when invoking mysql -p asterisk -e "select * from ampusers" compared to invoking mysql -u root -p asterisk -e "select sha1('myadminpasswordhere')".

                          Regardless, I'll simply leave the use_freepbx_auth setting to false in the config.php file and define a password of choice as suggested. All is good as long as I can access FOP2 Manager.

                          Thank you very much for the outstanding support!

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

                            As I have suspected, you are NOT using freepbx database based authentication, and that is why the password you tried did not work. If you change the sha1 password in the users table, then it will work. It is not a problem with the fop2 manager in itself, so there is nothing to fix on it.

                            Best regards,

                            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