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. Upgraded to FreePBX 15 all user, phone books and configuration is gone

Upgraded to FreePBX 15 all user, phone books and configuration is gone

Scheduled Pinned Locked Moved Support
5 Posts 3 Posters 169 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.
  • Y
    Y
    yahdie
    wrote on last edited by
    #1

    Is there any way to restore this?

    1 Reply Last reply
    0
    • A
      A
      agudino
      wrote on last edited by
      #2

      try editing the file /var/www/html/fop2/config.php and input the credentials to login to mysql and to database 'asterisk'...
      make sure DBNAME is 'asterisk' (you may see 'fop2' but change to 'asterisk') and input correct credentials to login to asterisk database.
      Then you can try if phonebook is correct.
      Regards

      1 Reply Last reply
      0
      • S
        S
        spirejoey
        wrote on last edited by
        #3

        It looks like the DB data is no longer in amportal.conf. Some of the config scripts for fop2 seem to know how to look in /etc/freepbx.conf but the config.php file doesn't have logic to do that. I'll take a stab at that and try to submit a quick snippet here.

        1 Reply Last reply
        0
        • S
          S
          spirejoey
          wrote on last edited by
          #4

          Here is a quick hack that seems to fix things:
          In config.php:

             if (is_readable("/etc/freepbx.conf")) {
                 $amp_conf = parse_amportal_conf("/etc/freepbx.conf");
                 $DBHOST = $amp_conf['AMPDBHOST'];
                 $DBNAME = $amp_conf['AMPDBNAME'];
                 $DBUSER = $amp_conf['AMPDBUSER'];
                 $DBPASS = $amp_conf['AMPDBPASS'];
             } else if (is_readable("/etc/freepbx/freepbx.conf")) {
          

          and:

                 if (preg_match("/\\\$amp_conf\[\"([^\"]+)\"]\s*=\s*\"?([\w\/\:\.\*\?\%!=\+\#@&\\$-]*)\"?\s*([;].*)?/",$line,$matches)) {
                     $conf[ $matches[1] ] = trim($matches[2]);
                 } else if (preg_match("/^\s*([\w]+)\s*=\s*\"?([\w\/\:\.\*\?\%!=\+\#@&\\$-]*)\"?\s*([;].*)?/",$line,$matches)) {
                     $conf[ $matches[1] ] = trim($matches[2]);
                 }
          
          1 Reply Last reply
          0
          • S
            S
            spirejoey
            wrote on last edited by
            #5

            I forgot to add that you should also run mysql_secure_installation (don't set root password). Otherwise the logic in config.php will get a connection for the blank user, but wont have any access to dbs.

            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