sujinyan

sujinyan

New member
Hi.

I'm trying to do a new install.

When I try to run install.php, I get:

( ! ) Fatal error: Redefinition of parameter $page in /Library/WebServer/Documents/dadabik/include/business_logic.php on line 5007
Call Stack
# Time Memory Function Location
1 0.0019 532080 {main}( ) .../install.php:0
2 0.0024 556432 include( '/Library/WebServer/Documents/dadabik/include/functions.php' ) .../install.php:26

My info is:

Database server

Server: Localhost via UNIX socket
Server type: MySQL
Server version: 5.7.10 - MySQL Community Server (GPL)
Protocol version: 10
User: root@localhost
Server charset: UTF-8 Unicode (utf8)

Web server

Apache/2.4.16 (Unix) PHP/7.0.2
Database client version: libmysql - mysqlnd 5.0.12-dev - 20150407 - $Id: 7e72f9690b1498a1bead7a637c33a831c0d2f655 $
PHP extension: mysqli Documentation
PHP version: 7.0.2

phpMyAdmin

Version information: 4.5.3.1 (up to date)

System
OS EL Capitan (Version 10.11.12)
MacBook Pro (Retina, 15-inch, mid 2015)

DaDaBIK is 7.1

// required installation parameters: please specify at least the following 10 parameters

// dbms type ('mysql' or 'postgres' or 'sqlite')
$dbms_type = 'mysql';

// DBMS server host
$host = 'localhost'; // the name or the IP of the host (computer) where the DBMS is running (e.g. '127.0.0.1' if the DBMS is running locally); please try 'localhost' instead of '127.0.0.1' if '127.0.0.1' is not working; some Web Hosting providers can require a full name e.g. mysql.yourdomain.com; for SQLite this parameter is not needed. For mysql and postgres you can also specify the port (if it's not the default one) separated from the host by a ":", e.g. "127.0.0.1:5431" to use the port 5431

// database name
$db_name = 'restool'; // for SQLite not only the name but 1) the full path is also needed (e.g. '/my_databases/music_databases/songs.db') and 2) you need to grant to the Web server write permissions on the database file

// database user
$user = 'root'; // this user must have select, insert, update, delete permissions, create and drop permissions are also needed for installation, upgrade and administration area e.g. 'root'; for SQLite this parameter is not needed

// database password
$pass = '*********'; // for sqlite this parameter is not needed

// DaDaBIK complete url (e.g. http://www.mysite.com/john/dadabik/)
$site_url = 'http://localhost/dadabik';

// DaDaBIK url path (e.g. if $site_url is http://www.mysite.com/john/dadabik/ this must be /john/dadabik/, put slashes at the beginning and at the end; put just one slash '/' if DaDaBIK is installed in the root of a Website, e.g. for a $site_url like http://www.mysite.com) *** PLEASE NOTE THAT THIS IS NOT THE PHYSICAL PATH IT IS JUST THE LAST PART OF $site_url ***
$site_path = '/dadabik/';

// timezone, specify here your timezone (a list of available timezone here: http://php.net/manual/en/timezones.php)
$timezone = 'Americas/Los_Angeles';

// secret_key: a long (60+ characters), random and complicated phrase which is used to sign authentication cookies for this application and therefore improve authentication security; you don't need to remember this phrase
// please note that in order to benefit from this security mechanism you must choose a different secret_key for each DaDaBIK application you create and you must keep this value secret
$secret_key = 'one two three four five six seven eight nine ten nine eight seven six five four three two one ';

// dadabik_session_name: the name of the session for this DaDaBIK application, used to avoid unexpected and risky effects if other applications installed in the same domain make use of the same session variable names that this application uses
// it must contain only alphanumeric ASCII characters, with at least one letter and no blank spaces; its length must be less than 100 characters and must be different than $secret_key; you don't need to remember this name
// please note that in order to benefit from this security mechanism you must choose a name which is unique among session names used by other applications installed in the same domain
$dadabik_session_name = 'dadabiksession1';

<snip>

// display all the sql statements and the MySQL error messages in case of DB error for debugging (0|1)
$debug_mode = 1;

// display the "I think that x is similar to y......" statements during duplication check (0|1)
$display_is_similar = 1;
 

eugenio

Administrator
Staff member
Hello,
it seems a DaDaBIK bug related to PHP 7, thanks for having reported it. To fix it, open /include/business_logic.php with a plain text editor and change the line

function build_results_table($fields_labels_ar, $table_name, $res_records, $results_type, $name_mailing, $page, $action, $where_clause, $page, $order, $order_type, $master_table_name, $master_table_function, $master_table_where_field , $master_table_where_value, $is_items_table, $template_infos_ar)

deleting the parameter $page (which is repeated twice), so you should finally get:

function build_results_table($fields_labels_ar, $table_name, $res_records, $results_type, $name_mailing, $action, $where_clause, $page, $order, $order_type, $master_table_name, $master_table_function, $master_table_where_field , $master_table_where_value, $is_items_table, $template_infos_ar)
 

sujinyan

New member
Thanks for the quick response!

It installed just fine.

I'm now getting this on each dadabik page:

( ! ) Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; PasswordHash has a deprecated constructor in /Library/WebServer/Documents/dadabik/include/PasswordHash.php on line 27
Call Stack
# Time Memory Function Location
1 0.0022 709392 {main}( ) .../index.php:0

Things are working, but it'd be cool to get it removed (probably PHP 7 related as well).
 

eugenio

Administrator
Staff member
Check your php.ini to see your error_reporting settings: if you don't want to display deprecated-related warnings, you should add:
& ~E_DEPRECATED to your setting, e.g. if you want to report all errors except the deprecated your setting will be
E_ALL & ~E_DEPRECATED
 

eugenio

Administrator
Staff member
Sorry the fix related to PHP 7 was not correct: I missed an additional modification you have to do, without this modification you can get unexpected behaviours: in index.php, find & replace all the occurrences of:

, "", $action

with

, $action

you should have four occurrences, all related to lines where the function build_results_table is called.
 
Top