Welcome to WebmasterWorld Guest from

Forum Moderators: ocean10000

Message Too Old, No Replies

Problem with server side includes

Problem with server side includes

4:28 am on Nov 28, 2002 (gmt 0)

New User

10+ Year Member

joined:Nov 3, 2002
votes: 0

Hello folks.

The hosts of my chat room can type in a password protected url to change the room status to "open" or "closed". This is supposed to change several things at once, including the image site wide that displays the chat room status.

This page itself is working fine. The variable is changed in a text file. This text file is included into settings.asp and then settings.asp is included in all the other relevant pages, is doesn't seem to be having an effect though.

settings.asp is getting included, but the chat status file included into that appears as if it is not included, although it must be!

There are no errors so the code should be getting included, chatStatus="open" for example. For the page which re-directs users accordingly, no re-direction is taking place. I've played around with the coding a lot, but to no avail.

Originally I would ftp the settings.asp file whenever a change in the chat rooms status occured. However, this is not suitable for my hosts and in the long term isn't really an efficent method.

The problem is probably something really simple, that's always the way!

1:23 am on Nov 29, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member korkus2000 is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 20, 2002
votes: 0

Why not have a setting in a database instead of using a text file?
12:45 pm on Nov 29, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:Oct 28, 2002
votes: 0

What about using a cookie? If you're referring to a local variable in an include file, it will be re-initialized every time the page loads. Use a cookie or Session variable.
8:05 pm on Nov 29, 2002 (gmt 0)

New User

10+ Year Member

joined:Nov 3, 2002
votes: 0

I know someone would mention databases.

The reason I'm using a text file is that I'm only just getting into databases and the info is only one little piece of data.

In terms of security with holding the variable in a text file, well it's in a url secured area so that's okay.

I'll look into using a session variable,

6:19 pm on Dec 8, 2002 (gmt 0)

New User

10+ Year Member

joined:May 23, 2002
votes: 0

Could the problem you're having be caused by pages being cached in the browser so that the updated status text file doesn't take effect?

If so there is another Webmaster World discussion that suggests something you might try:
Response.Expires = -1
Response.Expiresabsolute = Now() - 2
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "no-cache"

(before the html tag).


Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members