Visual Phonebook with database
-
Im trying to make my fop2 version 2.26 use phonebook with my database in a non pbx installation
I activated
define('DEBUG',true); in config.phpwhen i go to:
http://X.X.X.X/fop2/phonebook.phpi get :
"']+)\s*$/",$line,$matches)) { $conf[ $matches[1] ] = trim($matches[2]); } } } else { die("
".sprintf("Missing or unreadable config file (%s)...cannot continue", $filename)."
"); } return $conf; } ?> You do not have permissions to access this resource. -
At the top of config.php you can define a mysql user, password and database. You have to create that database and populate it with the tables found in the mysql-tables.db file in the web directory. Once that is done, everything will work. You do not need to modify php files, just create the database and set the proper credentials at the top of config.php
Best regards,
-
I populated my database with the mysql.db from the fop2 web directory and set config.php mysql user, password and database.
when i go to:
http://X.X.X.X/fop2/phonebook.phpi still get this error:
"']+)\s*$/",$line,$matches)) { $conf[ $matches[1] ] = trim($matches[2]); } } } else { die("
".sprintf("Missing or unreadable config file (%s)...cannot continue", $filename)."
"); } return $conf; } ?> You do not have permissions to access this resource.when i go in my fop2 web interface and click on phonebook it won't open it just kept loading.
-
-
Im using version 2.26 and the first 2 line of phonebook.php look like this
<?php
header("Content-Type: text/html; charset=utf-8");
require_once("config.php");
?>
and those are the one for config.php<?
// Database connection details
//
// Only needed if you do not use FreePBX or want to specify
// a different database than the freepbx one.$DBHOST = 'localhost';
$DBNAME = 'fop2';
$DBUSER = 'XXX';
$DBPASS = 'XXXXXXX'; -
config.php
<?php
// Database connection details
//
// Only needed if you do not use FreePBX or want to specify
// a different database than the freepbx one.
added php but now i getting this
notice
/var/www/fop2/lib/dblib.php (line 234)mysql_fetch_assoc() expects parameter 1 to be resource, boolean given
notice
/var/www/fop2/lib/dbgrid.php (line 1020)Function split() is deprecated
notice
/var/www/fop2/lib/dbgrid.php (line 1020)Function split() is deprecated
Add Delete Marked Export Import SearchFirst Name Last Name Phone 1 Phone 2 Company Picture
No records found
«‹1 ›»
Page : 1 of 0 . Total records found: 0 -
Im using version 2.26 and the first 2 line of phonebook.php look like this
$DBHOST = 'localhost';
$DBNAME = 'fop2';
$DBUSER = 'XXX';
$DBPASS = 'XXXXXXX';Are you sure the above data is correct? can you connect to it with the mysql command line client:
mysql -u XXX -pXXXXXXX -h localhost fop2 -
yes im able to connect to mysql database fop2 with the command.
mysql -u XXX -pXXXXXXX -h localhost fop2
PHP 5.4.7 (cli) (built: Sep 14 2012 14:44:02)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
root@SIP:/var/www/fop2/lib# mysql -u XXX -pXXXXXX fop2 -e "desc visual_phonebook"
+-----------+------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------+------------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| firstname | varchar(50) | YES | MUL | NULL | |
| lastname | varchar(50) | YES | | NULL | |
| company | varchar(100) | YES | | NULL | |
| phone1 | varchar(50) | YES | | NULL | |
| phone2 | varchar(50) | YES | | NULL | |
| owner | varchar(50) | YES | | | |
| private | enum('yes','no') | YES | | no | |
| picture | varchar(100) | YES | | NULL | |
| context | varchar(150) | YES | | | |
+-----------+------------------+------+-----+---------+----------------+ -
-
I think I blew away my correct permissions for visual_phonebook
re-applied these
grant all privileges on . to 'root'@'%' with grant option;
grant all privileges on . to 'root'@'localhost' with grant option;
flush privileges;
restarted db
have 4900+ entries, and can see only the 2 that I have manually entered from gui
I can see the 2 from the command line as well
mysql -u root -pfakenew-password -h localhost fop2 -e "show tables"
this command works fine
any suggestionsver 2.29.01
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