Got error on visual phonebook

  1. 14 years ago

    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

  2. admin

    31 Mar 2010 Administrator

    What php version are you using?

  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

  4. admin

    12 Apr 2010 Administrator

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

  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

  6. admin

    13 Apr 2010 Administrator
    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,

or Sign Up to reply!