PDA

View Full Version : session variables don't work in cgi-bin directory


m1234
10-18-2004, 06:19 AM
session variables seem to work across any directories on my web site except the cgi-bin directory. For example, the asp code: session("mike") = "Mike" is available for display in any asp page in any directory (using =session("mike"). But in the cgi-bin directory, an asp web page referenceing session("mike") finds the variable empty (or perhaps even non-existent). What am I missing here?

bruce
10-18-2004, 11:54 AM
CGI-BIN is set up as a seperate web application. Session do not carry across multiple application


[b]quote:Originally posted by m1234

session variables seem to work across any directories on my web site except the cgi-bin directory. For example, the asp code: session("mike") = "Mike" is available for display in any asp page in any directory (using =session("mike"). But in the cgi-bin directory, an asp web page referenceing session("mike") finds the variable empty (or perhaps even non-existent). What am I missing here?
</blockquote id="quote"></font id="quote">

B.

DiscountASP.NET
http://www.DiscountASP.NET

m1234
10-19-2004, 06:50 AM
All of our web sites at discountasp.net use the cgi-bin directory for asp pages that write to databases. session variables are used on all of those web pages to assure proper access to the page before writing to databases. Are you telling me that we have to re-code thousands of web pages across all of our domains at discountasp.net because of some scheme you have set up?

Post Edited (m1234) : 10/19/2004 6:57:54 AM GMT

bruce
10-19-2004, 06:50 AM
No. I am not saying that, i am just addressing to your question as to why this doesn't work.

You can remove the application in the web application tool in the control panel.

Bruce

DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)

m1234
10-19-2004, 11:01 AM
Bruce:


I see what you are refering to. Is there some reason the web site, when first installed, defaulted to having the cgi-bin directory a web application? What are the disadvantages of removing it or the advantages of keeping it?


Thanks.

bruce
10-20-2004, 01:19 AM
I am not sure why it is done this way, i think it's more like a traditional way of setting up the cgi-bin dir. In fact, in Win2K3, all scripts can be executed outside of the cgi-bin dir.

I do not see any problem removing it.

Bruce

DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)

m1234
10-20-2004, 01:22 AM
Great Bruce. Thanks for all your help.