Visual Phonebook Empty 'no records exist'

Hi,

I have gotten most of my setup issues worked out through these forums and with Nicolas's help. I am thrilled to see how well this looks and works.

One issue. I have tried (in vain) to add an entry to the visual phonebook.

I can add them just fine, but it reports "no records found" when trying to view them.

Mysql tables:
mysql> use fop2;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> select * from visual_phonebook;
+----+-----------+----------+---------------------------+------------+------------+---------+
| id | firstname | lastname | company                   | phone1     | phone2     | picture |
+----+-----------+----------+---------------------------+------------+------------+---------+
|  1 | Kenneth   | Myers    | Atlantia Technology Group | 190        | 8431983648 |         |
|  2 | Darrell   | Watson   | Atlantia Technology Group | 191        | 8431982545 |         |
|  3 | john      | doe      | NULL                      | 0141123456 | NULL       | NULL    |
+----+-----------+----------+---------------------------+------------+------------+---------+
3 rows in set (0.02 sec)

mysql> show columns from visual_phonebook;
+-----------+--------------+------+-----+---------+----------------+
| Field     | Type         | Null | Key | Default | Extra          |
+-----------+--------------+------+-----+---------+----------------+
| id        | int(11)      | NO   | PRI | NULL    | auto_increment |
| firstname | varchar(50)  | YES  |     | NULL    |                |
| lastname  | varchar(50)  | YES  |     | NULL    |                |
| company   | varchar(100) | YES  |     | NULL    |                |
| phone1    | varchar(25)  | YES  |     | NULL    |                |
| phone2    | varchar(25)  | YES  |     | NULL    |                |
| picture   | varchar(100) | YES  |     | NULL    |                |
+-----------+--------------+------+-----+---------+----------------+
7 rows in set (0.01 sec)



I have tried regranting permissions to the user on tables to no avail. The first two users were added via the web interface.

MySQL Server version: 5.0.45

PHP

PHP 5.2.9 (cli) (built: Jul 8 2009 05:59:13)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

FOP2 Beta

thanks in advance, gonna keep trying to resolve the issue

Comments

  • I also get an error when trying to add a user with a picture:

    Array ( => Array ( [display] => id => text [values] => [display_filter] => Array ( ) [edit_filter] => Array ( ) => [default] => ) [firstname] => Array ( [display] => firstname => text [values] => [display_filter] => Array ( ) [edit_filter] => Array ( ) => [default] => ) [lastname] => Array ( [display] => lastname => text [values] => [display_filter] => Array ( ) [edit_filter] => Array ( ) => [default] => ) [company] => Array ( [display] => company => text [values] => [display_filter] => Array ( ) [edit_filter] => Array ( ) => [default] => ) [phone1] => Array ( [display] => phone1 => text [values] => [display_filter] => Array ( ) [edit_filter] => Array ( ) => [default] => ) [phone2] => Array ( [display] => phone2 => text [values] => [display_filter] => Array ( ) [edit_filter] => Array ( ) => [default] => ) [picture] => Array ( [display] => picture => img [values] => [display_filter] => Array ( [0] => display_image ) [edit_filter] => Array ( ) => [default] => ) )
    Array
    (
    [firstname] => Test
    [lastname] => User
    [company] =>
    [phone1] => 123456789
    [phone2] =>
    [picture] => Array
    (
    [name] => n789442807_6602.jpg
    [type] => image/jpeg
    [tmp_name] => /tmp/phpgU2kKm
    [error] => 0
    [size] => 8960
    )

    )
    An error has occurred
    No se pudo copiar el archivo

    EDIT: I was able to fix this issue by chown apache. /var/www/htl/fop2/uploads

    Could my first issue also be permissions based?
  • Note: turning on debug has giving me some Mysql resource errors. Delving further now. I'll post my results when I figure it out.

    notice
    /var/www/html/fop2/lib/dblib.php (line 233)


    mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource
    notice
    /var/www/html/fop2/lib/dblib.php (line 344)


    mysql_num_fields(): supplied argument is not a valid MySQL result resource
    notice
    /var/www/html/fop2/lib/dblib.php (line 333)


    mysql_num_rows(): supplied argument is not a valid MySQL result resource
    Add Export Import
    Search

    No records found
    NOTICE
    /VAR/WWW/HTML/FOP2/LIB/DBLIB.PHP (LINE 244)
  • Tried the solution proposed here with no success.

    View Post 143&p=545&hilit=supplied+argument+is+not+a+valid+MySQL+result+resource#p545

    giving up on that issue for the night, Happy New years to all. Will figure it out Monday.

    KM
  • Are you sure the config.php is setup properly?
  • Pretty sure. I have even tried the root mysql account authentication, as well as using the localhost IP vs localhost entry. Still having the issue.
    <?
    // Database connection details
    $DBHOST = '127.0.0.1';
    $DBNAME = 'fop2';
    $DBUSER = 'root';
    $DBPASS = 'mypassword';
    
    $language="en";
    

    I have also tried the fop2 user and credentials. The two entries I listed were entered via the phonebook web interface, so it was able to access the database then. Immediately after entering them though they would not display in the list, along with the errors shown above (mysql_num_rows(): supplied argument is not a valid MySQL result resource, etc)

    Not sure what else to look for. i understand those errors usually mean mysql permission issues, but if even the root account causes the error, and the table is setup properly, then I am a bit confused as to the nature of the issue.
  • The visual_phonebook table structure in the beta changed. You are using the old structure. In the beta tarball there is a mysql-update.db file with the alter commands to add the missing fields. Best regards,
  • The visual_phonebook table structure in the beta changed. You are using the old structure. In the beta tarball there is a mysql-update.db file with the alter commands to add the missing fields. Best regards,

    That would answer that bad result ;) Happy New Year.
  • That fixed it for the most part, with the exception of one remaining error:

    "notice
    /var/www/html/fop2/lib/dblib.php (line 233)


    mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource"

    I am going to use the fix posted by Thomas in a previous forum post

    View Post 143&p=545&hilit=supplied+argument+is+not+a+valid+MySQL+result+resource#p545

    But wanted to give a head's up.
  • That fixed it for the most part, with the exception of one remaining error:

    "notice
    /var/www/html/fop2/lib/dblib.php (line 233)


    mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource"

    I am going to use the fix posted by Thomas in a previous forum post

    View Post 143&p=545&hilit=supplied+argument+is+not+a+valid+MySQL+result+resource#p545

    But wanted to give a head's up.

    I wouldn't do that because all I did in that post was give it a condition that it could never match, just switch debugging off and report it as a bug to Nicolas.
  • I wouldn't do that because all I did in that post was give it a condition that it could never match, just switch debugging off and report it as a bug to Nicolas.

    Will do. Should I start a new thread for the call parking issue?
  • #PARKSLOT=`/usr/sbin/asterisk -rx "dialplan show parkedcalls" | grep "=>" | cut -d= -f1 | sed s/\'//g | sed 's/ //g'`
    #if [ "X${PARKSLOT}" != "X" ]; then
    #echo
    #echo "[PARK/default]"
    #echo "extension=${PARKSLOT}"
    #echo "context=parkedcalls"
    #echo "type=park"
    #echo "Label=Park ${PARKSLOT}"
    #echo
    #fi

    The parking lot seems to be commented out in autoconfig-buttons-freepbx.sh for some reason, maybe its not ready yet.
  • Not using freepbx either so it wouldn't make much of a difference if it wasn't commented out (althought I see your point).
    I'll have to look at that script and see what it does, maybe it will clue me into what buttons.cfg wants.

    EDIT:

    based on that script you would end up with

    [PARK/default] ; I assume default is the context in which "parkedcalls" exists?
    extension=700
    context=parkedcalls
    type=park
    Label=Park 700

    from:
    /usr/sbin/asterisk -rx "dialplan show parkedcalls" | grep "=>" | cut -d= -f1 | sed s/\'//g | sed 's/ //g'
    700
    
  • Moving the parking enable discussion to View Post 230 (if an admin wants to move the above posts (12 and 13) I can reformat the first thread post to be easier on the eyes.)

    FWIW I understand all this is beta. Nicolas did mention in an email that parking lots queue should show up in beta, but since it isn't I figured I'd troubleshoot on my end.
Sign In or Register to comment.