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. Got error on visual phonebook

Got error on visual phonebook

Scheduled Pinned Locked Moved Support
6 Posts 3 Posters 107 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.
  • F
    F
    fabianoheringer
    wrote on last edited by
    #1

    Hi, I'mt getting this error on visual phonebook:

    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /var/www/htdocs/fop2/lib/dblib.php on line 4

    Find in forum but not found nothing.
    FOP 2.10

    Thanks

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

      What php version are you using?

      1 Reply Last reply
      0
      • O
        O
        ou812
        wrote on last edited by
        #3

        When I try to access phone book I also get an error
        (An error has occurred)
        I'm using PHP ver 5.1.6

        Gary

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

          Did you read the FAQ? You have to create a database and edit config.php in order for the phonebook to work.

          1 Reply Last reply
          0
          • O
            O
            ou812
            wrote on last edited by
            #5

            I followed these instructions

            The visual phonebook requires php and mysql to be installed and running. You need to create a database and a table and give proper mysql credentials to the php application so it can read and write to the table. You also have to configure the language for the php application. In order to start, be sure to create a database for mysql using the proper password (replace XXXXX with your mysql root password):

            #> cd /var/www/html/fop2
            #> mysqladmin -u root -pXXXXX create fop2
            #> mysql -u root -pXXXXX fop2 < mysql.db
            After creating a database and the table, you might want to create a special mysql user for FOP2:

            #> mysql -u root -pXXXXX -e
            "grant all privileges on fop2.* to fop2@'localhost'
            identified by 'myPassw0rd'"
            Finally you have to edit the configuration file and set the language and proper mysql credentials:

            /var/www/html/fop2/config.php
            <?
            // Database connection details
            $DBHOST = 'localhost';
            $DBNAME = 'fop2';
            $DBUSER = 'fop2';
            $DBPASS = 'myPassw0rd';

            $language="en";

            // ---------------------------------------------------------
            // Do not modify below this line
            // ---------------------------------------------------------
            ..

            I'm using pbxinaflash
            Gary

            1 Reply Last reply
            0
            • N
              N
              nicolas
              wrote on last edited by
              #6
              mysql -u root -pXXXXX fop2 -e "desc visual_phonebook"
              

              Does that show the table structure as depicted in mysql.db ?

              If so, and if credentials are ok, the phonebook should work fine, with no errors.

              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