Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

nuBuilder - unwanted logout

Questions related to using nuBuilder Forte.
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

nuBuilder - unwanted logout

Unread post by Janusz »

Hi,
I am receiving often the message:
You must be logged into nuBuilder..
and I need to login again into nuBuilder to use it.

there are some posiibiliteis to set-up the Timeout in setup - but it looks - it does not affect or reduce that issue .

Do you have some experience with such issue - or maybe some workaround to minimise the unwanted logout?
If you like nuBuilder, please leave a review on SourceForge
kev1n
nuBuilder Team
Posts: 4305
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 446 times
Contact:

Re: nuBuilder - unwanted logout

Unread post by kev1n »

This "Timeout (minutes)" has been removed a while ago. It might help installing the latest version.
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: nuBuilder - unwanted logout

Unread post by Janusz »

Yes I know - this field stays on the old form - and it is not present on the recent one.
But anyway the value in the zzzz_.... table remains and is used by code later on with default value of 120minutes.
(The latest version is just removing the field to change this value from the form).
Concerning the php and java script files on the server I have the latest ones.

So general question if anyone is experiencing or not similar issues - maybe someone has some experience how to limit this.

It's not a blocking point at all to use nuBuilder - but it would be nice to have it limited.
If you like nuBuilder, please leave a review on SourceForge
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: nuBuilder - unwanted logout

Unread post by Janusz »

FYI,
not sure for real cause but probably looks like some network connection disapperance, routing change or whatever happening after some time on idle by client computer.

Now I implementd a kind of cycling ping every one minute from nuBuilder client computer to cloud server - and so far issue is not appearing anymore.
If you like nuBuilder, please leave a review on SourceForge
fpdragon
Posts: 38
Joined: Wed May 29, 2019 2:50 pm

Re: nuBuilder - unwanted logout

Unread post by fpdragon »

Janusz wrote:FYI,
not sure for real cause but probably looks like some network connection disapperance, routing change or whatever happening after some time on idle by client computer.

Now I implementd a kind of cycling ping every one minute from nuBuilder client computer to cloud server - and so far issue is not appearing anymore.
Could you post your solution please.
Thanks
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: nuBuilder - unwanted logout

Unread post by Janusz »

Hi,
In my case this solution works perfectly since several months with cloud server somewhere in the world.
Before that the database users had connections broken more than 10 times per day with a need to log again and again - currently they are working the whole day with one time login.
But this is not a plug and play solution and must be adjusted carefully to the database structure. In my case I have all forms inside iframes - if not there might be a problem.
So before implementing make a copy of DB - or the best check it on any non production test version of your database - because may happen that it stops to react.
So how is it implemented:
1. Client computer is sending every few minutes to the server via php procedure request to get time:
Procedure name: my_time (with just one line of code)

Code: Select all

 $teraz = date('Y-m-d H:i:s');
2. In header I have defined JS function to run it every few minutes

Code: Select all

function refreshServerConnection() {
x = 240;    //refresh ping in seconds
nuRunPHPHidden('my_time');
setTimeout(refreshServerConnection, x*1000);
}
var my_refresh=0;
3. The JS function is stared from the main form of database with following code:

Code: Select all

if (my_refresh===0) {refreshServerConnection(); my_refresh++;}
and this is the whole setting.
If you like nuBuilder, please leave a review on SourceForge
fpdragon
Posts: 38
Joined: Wed May 29, 2019 2:50 pm

Re: nuBuilder - unwanted logout

Unread post by fpdragon »

Janusz wrote:Hi,
In my case this solution works perfectly since several months with cloud server somewhere in the world.
Before that the database users had connections broken more than 10 times per day with a need to log again and again - currently they are working the whole day with one time login.
But this is not a plug and play solution and must be adjusted carefully to the database structure. In my case I have all forms inside iframes - if not there might be a problem.
So before implementing make a copy of DB - or the best check it on any non production test version of your database - because may happen that it stops to react.
So how is it implemented:
1. Client computer is sending every few minutes to the server via php procedure request to get time:
Procedure name: my_time (with just one line of code)

Code: Select all

 $teraz = date('Y-m-d H:i:s');
2. In header I have defined JS function to run it every few minutes

Code: Select all

function refreshServerConnection() {
x = 240;    //refresh ping in seconds
nuRunPHPHidden('my_time');
setTimeout(refreshServerConnection, x*1000);
}
var my_refresh=0;
3. The JS function is stared from the main form of database with following code:

Code: Select all

if (my_refresh===0) {refreshServerConnection(); my_refresh++;}
and this is the whole setting.

Thank you very much for your answer.

I understand what you were doing with the work around solution but I'm currently not so familiar with "php procedures". If I understood correctly then this is a defined function on php server side that can be triggered. In the end the "nuRunPHPHidden" triggers php procedures on the server from the browser JavaScript context. This forces a communication (ping).
But I am having troubles in finding out how I should define such a procedure.
In phpMyAdmin I found out that I can define Procedures by following these steps:
*) changing to the DB
*) click on "Procedures" tab
*) click on "Add Procedure"
But here I have the problem that it seems that the tool only allows SQL syntax for the procedure definition. Even if "NO SQL" is selected.

Where do I have to define this php procedure?
Can't I use just an other php function like getdate()?

Thanks
kev1n
nuBuilder Team
Posts: 4305
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 446 times
Contact:

Re: nuBuilder - unwanted logout

Unread post by kev1n »

The procedure can be added here:

Tab Builder -> Procedure -> Build Procedure -> Button Add
procedure.png
You do not have the required permissions to view the files attached to this post.
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: nuBuilder - unwanted logout

Unread post by Janusz »

fpdragon,
and, by the way - how often do you experiece similar issue?
is it on the local network or with remote server?
If you like nuBuilder, please leave a review on SourceForge
fpdragon
Posts: 38
Joined: Wed May 29, 2019 2:50 pm

Re: nuBuilder - unwanted logout

Unread post by fpdragon »

kev1n wrote:The procedure can be added here:

Tab Builder -> Procedure -> Build Procedure -> Button Add
procedure.png
ahhhh...

I see.
Thank you.

Now I am testing.
Post Reply