Session.Quit, AutoQuit and cgi script

I’m probably missing something obvious…

I create a new project, put a button on it and put Session.Quit on the action. Compile it for Linux and post in my web site.

I start two instances of it. I see 2 cgi scripts as expected. I click on the Button on each to “close” the session. However I now see 3 cgi scripts. And after waiting for several minutes, continue to see those scripts still there. And I expect since they are still there the default WebApplication.AutoQuit doesn’t kick in either.

I’m sorry if this an obvious question, but I been testing on the Web with this beta, and been generally pleased with how much better is it working than the previous released version, but this one puzzles me.


This should be in the “web” channel. That aside, do you mean that you see two “cgi” processes? You should actually see a cgi process start and stop each time the client sends a message (event) to your server app. As to Session.Quit… That’s worked unexpectedly for long enough that I typically use ShowURL to direct the browser to another page to end a session.

I created a new project. Added a button and put ShowURL(“”) in the Action event. I then started the application twice in two tabs on a browser. In the process listing (Linux) I see MyApplication running with 2 instances of myapplication.cgi. I click the button on the application in one of the tabs of my browser. It goes to Google as expected. I then look at my process listing again and I still see MyApplication running with 2 instances of myapplication.cgi.

Did I misunderstand what you said, or is this not what you would have expected to happen?

I’d expect this. The myapplication.cgi instances do not correspond to sessions. They correspond to events sent from the client (browser) to the server. There could be a lot of these active at any particular time.

Update. I didn’t wait long enough. After three minutes the cgi script went away. So I click on the second tab and about 3 minutes later the other cgi went away. About a minute after that the MyApplication went away (that one I expected. This is the default behavior to close after 60 seconds of the last process).

Thanks for the help Brad with the ShowURL that seems to have cleaned up most of the stray cgi scripts after sessions have ended.

Follow up question. I’m trying to hide the full address of where my cgi is executing, so I am using a frame in a php file to do so. Works fine until I try to run ShowURL, I get the following message:

Could not execute returned javascript:
Source: window.location = “”;

Works fine if I let it run the cgi script directly without a frame.

Any suggestions or alternatives?

Here is the frame code:

<?php session_start(); ?> ARK <?php if (!empty($_POST["arkdirect"])) { $_SESSION["Package"] = "redirect"; ?> <?php $_SESSION["arkdirect"]=""; } else { $_SESSION["Package"] = ""; ?> <?php } ?>

I discovered an answer. ShowURL("/ARK/logout.htm") will work within a frame (where another web address will not). I can then use that page to redirect to another server if desired.