Upgrade problem from 9.22 to 9.3

steff

New member
Hi,
I have an upgrade problem from 9.22 enterprice to 9.3 enterprice. I went through the steps => "Upgrade from previous versions".

1. If i use the old (9.2.2) config.php it works and the Admin Area told me "You are using DaDaBIK version 9.3-Monterosso enterprise" but there is also the message "(New version available!)".

2. If i use the new config.php (9.3) and the config_custom.php it doesn't work. Error message:
You are using a custom users or groups table, please make sure, for the fields dadabik_users.id_user, dadabik_users.id_group and dadabik_groups.id_group that their DB field type is INTEGER (for example INT, SMALLINT, BIGINT are all ok) and that dadabik_users.id_user and dadabik_groups.id_group are primary keys. Otherwise you can have unexpected behaviours and security issues. If you are sure the fields respect the requirements, you can disable this warning by setting $warning_custom_users_groups = 0 in config.php.

Ok, close

[03] Error: it is impossible to run DaDaBIK because you haven't installed it yet or you have accidentally deleted the installation table, go to the installation page.

I leaved the new config.php clean and put all my parameters into the config_custom.php. I checked the config in config_custom.php many times.

Any idea?
 

steff

New member
I tried a little bit. Maybe i found the bug. I have another value in parameter => $prefix_internal_table = 'zxyz_'
I think its to late to include this parameter at the end of config.php (with the config_custom.php).

If so, you cant leave the config.php clean in this case, you have to edit this value in this file.
 

eugenio

Administrator
Staff member
You are right! There are a couple of cases where the new config_custom approach doesn't work as expected.

If you are not using external users / groups table and your prefix is not the default one, this should fix your specific issue: add these lines at the end of your config_custom

$users_table_name = $prefix_internal_table.'users';
$groups_table_name = $prefix_internal_table.'groups';
$table_list_name = $prefix_internal_table."table_list";

Another problem can arise if you use Microsoft SQL Server.

I will re-test everything and post here (or in a email message) the solution. I am pretty sure it can be fixed just with a config/config_custom editing.

Thanks for your feedback.
 

eugenio

Administrator
Staff member
I confirm the new config_custom approach introduced in DaDaBIK v. 9.3 didn't work and could lead to unexpected behaviours in two cases:

- you have set the $prefix_internal_table parameter in config_custom OR

- you use MS SQL Server as DBMS.

V 9.3 will be fixed and updated. Here is what you can do to fix by yourself the problem:

DaDaBIK Enterprise/Platinum:

File config.php (do this modification in the right order)
1) remove this line:
[pre]$table_list_name = $prefix_internal_table."table_list"; // this parameter is here for historical reasons, don't change it[/pre]

1) Replace this parte of code, at the end of the file:

[pre]
if ($dbms_type === 'sqlserver'){
// MS SQL Server unicode connection encoding
$sqlserver_conn_additional_attributes[PDO::SQLSRV_ATTR_ENCODING] = PDO::SQLSRV_ENCODING_UTF8;
}

// don't change this line
require 'include/config_custom.php';
[/pre]


with:

[pre]
/*************************************/

// don't change the following lines

// no custom users or groups table, you can use config_custom
if ($groups_table_name === $prefix_internal_table.'groups' && $users_table_name === $prefix_internal_table.'users'){

require 'include/config_custom.php';

// re-set, because $prefix_internal_table might change in config_custom
$groups_table_name = $prefix_internal_table.'groups';
$users_table_name = $prefix_internal_table.'users';

}

// table_list_name name
$table_list_name = $prefix_internal_table."table_list";

if ($dbms_type === 'sqlserver'){
// MS SQL Server unicode connection encoding
$sqlserver_conn_additional_attributes[PDO::SQLSRV_ATTR_ENCODING] = PDO::SQLSRV_ENCODING_UTF8;
}
[/pre]

File config_custom.php

If you want to use custom users or groups table you cannot use config_custom.php at all, you have to use config.php for all the parameters, at the moment there is no solution for that so add this reminder to config_custom.php:

[pre]
/* Please note that if you want to use a custom users or groups table (you want to change $groups_table_name or $users_table_name, Enterprise/Platinum only) YOU CANNOT USE THIS CONFIG CUSTOM FILE, YOU HAVE TO EDIT ALL YOUR PARAMETERS, INCLUDING USERS AND GROUPS TABLE NAMES, IN THE CONFIG.PHP FILE */
[/pre]


DaDaBIK Pro:

File config.php (do this modification in the right order)
1) remove this line:
[pre]$table_list_name = $prefix_internal_table."table_list"; // this parameter is here for historical reasons, don't change it[/pre]

1) Replace this parte of code, at the end of the file:

[pre]
if ($dbms_type === 'sqlserver'){
// MS SQL Server unicode connection encoding
$sqlserver_conn_additional_attributes[PDO::SQLSRV_ATTR_ENCODING] = PDO::SQLSRV_ENCODING_UTF8;
}

// don't change this line
require 'include/config_custom.php';
[/pre]


with:

[pre]
/*************************************/

// don't change the following lines

require 'include/config_custom.php';

// table_list_name name
$table_list_name = $prefix_internal_table."table_list";

if ($dbms_type === 'sqlserver'){
// MS SQL Server unicode connection encoding
$sqlserver_conn_additional_attributes[PDO::SQLSRV_ATTR_ENCODING] = PDO::SQLSRV_ENCODING_UTF8;
}
[/pre]


Sorry for the inconvenience.


Best,
 

eugenio

Administrator
Staff member
V 9.3 has been fixed (silent upgrade, without producing a new 9.3.1 version): if you buy DaDaBIK now you get the fixed version, but, as a customer noticed, if you use the old link you got after having purchased DaDaBIK 9.3 (before the fix), you still get the old (unfixed) version.

Best,
 
Top