Warning: "Cannot change session name when session is active" etc

Dirk Bok

New member
After installing DaDaBIK for the first time, after clicking next on page install.php I get install2.php with the warning
[pre]
Warning: session_name(): Cannot change session name when session is active in
/volume1/web/dadabik/include/common_start.php on line 0
Warning: ini_set(): A session is active. You cannot change the session module's ini
settings at this time in /volume1/web/dadabik/include/common_start.php on line 0
Warning: session_set_cookie_params(): Cannot change session cookie
parameters when session is active in /volume1/web/dadabik/include/common_start.php on line 0
[/pre]
After generation of the application cade, the message persists. The application is not working as expected. After opening page https://[IP-address]/dadabik/internal_table_manager.php I immediately get the message
[pre]
unexpected error function get_where_value_form_previes code 2.
Possible reasons:
-The table you are configuring is disabled ("Pages" tab)
You (admin) do not have the permission to read it
- You have deleted a table/view (or the table/view is not installed/enabled)
used in form configurator as source for lookup field or as an items table
[/pre]
I checked, but: the table is enabled, I have permission to read it and it's not deleted. The error message is repeated on every change I make to any property of the form.

Furthermore, if I select a table as detail for a master/detail form, I get the error:
[pre]
{"readyState":4,"responseText":"\nWarning: session_name():
Cannot change session name when session is active in
/volume1/web/dadabik/include/common_start.php on line 0\n\n\n
Warning: ini_set(): A session is active. You cannot change the
session module's ini settings at this time in /volume1/web/dadabik/include/common_start.php
on line 0\n\n\nWarning: session_set_cookie_params():
Cannot change session cookie parameters when session is active in
/volume1/web/dadabik/include/common_start.php on line 0\n\n
/volume1/web/dadabik/include/db_functions_pdo.php:817:
\nstring(22) \"[TABLENAME]\"\n{\"fields\":[\"ID\",\"Description\",\"Instructions\"],
\"status\":\"ok\"}","status":200,"statusText":"parsererror"}
[/pre]
The lookup for "Items table foreign key field name" is greyed out then.

What can be the problem in this case? Thank you for your help.
 

eugenio

Administrator
Staff member
Hello,
the messages about the session are strange, since the session is not started when the session name is set.
Can you confirm you get the same messages not only in install2.php but on every page of the application, after installation?

Have you changed anything in the dadabik code, apart from the few required parameters in config.php?

The fact that the lookup related to the master in a details table is grayed out is ok, you shouldn't change that value.

About the error in form configurator, I would fix the session error first .

Best,
 

Dirk Bok

New member
Eugenio,

You're right: after installation, every page shows that warning.
The form configurator shows less errors when I hide the preview.

I can confirm that I didn't change anything to the code, except for configuration parameters in config.php.

Kind regards,
Dirk Bok
 

eugenio

Administrator
Staff member
Very strange, that's an error that I think it was introduced in php 7.2 but dadabik was not subject to that, I am just trying to repdoduce it with php 7.4 and I cannot reproduce the error.

What I would do:

1) even if you are sure you didn't modify anything, create a new simple application (having just one table) starting from the original files you have downloaded and be sure not to change anything and/or to add blank lines in the config.php file.

2) If you are still getting the same error with 1), could you try with another php version (maybe another hosting as well it would be a good test) AND with a different browser?

Best,
 

Dirk Bok

New member
Eugenio,

1. I did a fresh install and didn't change anything (I didn't even enter the serial number). When navigating to install.php from either Edge or Firefox I get the result:
[pre]
Warning: session_name():
Cannot change session name when session is active in /volume1/web/dadabiktwee/include/common_start.php on line 0
Warning: ini_set(): A session is active. You cannot change the session module's ini settings at this time in /volume1/web/dadabiktwee/include/common_start.php on line 0
Warning: session_set_cookie_params(): Cannot change session cookie parameters when session is active in /volume1/web/dadabiktwee/include/common_start.php on line 0
[01] Error: $serial_number must be 8 characters long
[/pre]

2. I tried this also with Firefox. And I tried it on another server, without modifying anything. On that server, there was no warning, I only got the "normal" error message when nothing is filled-in in config.php.
[pre]
"Requirements check
[01] Error: Please specify $host in your config.php"
[/pre]

But the question remains: what is causing the warnings? Thank you
 

Dirk Bok

New member
In addition to the previous post: on the newly created server I do get the error message shown below.

After generation of the application cade, the message persists. The application is not working as expected. After opening page https://[IP-address]/dadabik/internal_table_manager.php I immediately get the message
[pre]
unexpected error function get_where_value_form_previes code 2.
Possible reasons:
-The table you are configuring is disabled ("Pages" tab)
You (admin) do not have the permission to read it
- You have deleted a table/view (or the table/view is not installed/enabled)
used in form configurator as source for lookup field or as an items table
[/pre]
 

eugenio

Administrator
Staff member
Hello,
I think the only explanation is that for some reason you have
session.auto_start = 1
in the php.ini of the first server. By default this variable is set to 0.

Using phpinfo() you can check what was the value. Let me know if this explained the first problem.

About the second problem, you get this error only in form configurator and only if live preview is enabled, right?

Does the application generated (not the admin area) work without issues?
 

Dirk Bok

New member
Eugenio,

You're right! Setting session.auto_start = 0 did the trick. I don't know the reason why that setting was 1.

The second error does come up when preview is on in the Form Configurator. Like you are already expecting: the generated application is working fine.

Kind regards,
Dirk Bok
 

eugenio

Administrator
Staff member
Hello,
are you sure that this didn't happen?

"You have deleted a table/view (or the table/view is not installed/enabled) used in form configurator as source for lookup field or as an items table"

please double check all the lookup fields you have in your table.

Best,
 

Dirk Bok

New member
Eugenio,

At the start of working with DaDaBIK on that server something went wrong and you helped me solve that. Perhaps there is some collateral damage. So, I no longer use that first environment, and in the other ones DaDaBIK works well.

I did a small check-up of tables and views and everything looked fine, but I'm no longer using that environment for development, so, thank you for your help.

Kind regards,
Dirk Bok
 
Top