: : : We moved a website from a server onto a laptop. Its got a dealer locator script running on it so when you select a location it displays a list of dealers for that area in a new window. The problem is if you select one location then another on the laptop it displays the old informatino then the new information below it. Which is weird because it reloads the cgi script and doesn't save the previous queried data anywhere.
: : : It works fine on the server side. Its random as to when it will append the information.
: : : Now, if you set the array that is storing the queried information to null at the begining of the script it doesn't have the problem except the first dealer information it displays is blank.
: : : It looks like the array isn't getting cleared each time the script is run but I've never seen that before?
: : :
: : Hehe...sounds very much like the classic "my script is running under mod_perl and doing weird stuff" problem. You've probably only used the script in CGI mode before, but problems of this nature normally arise when you start to use a script under mod_perl, where stuff gets preserved between executions. Solution: fix the script to account for this, or don't use mod_perl.
: :
: : As for "its random", this is because variables are only preserved in the same "thread". If a new "thread" services your request (e.g. one that hasn't run your script before) then it will probably work as normal. After that, the symbol table will have the older stuff in.
: :
: : I've often wondered if there are some interesting exploits you can do by stealing data other scripts left hanging around...then, that's me.

: :
: : Jonathan
: :
: : ###
: : for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
: : (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
: : /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");
: :
: :
:
: Yup, mod_perl was installed on the laptop and I that'll be it. Guess I will remove/uninstall mod_perl and see what happens =)
:
: If its leaving that data behind I wouldn't doubt that you could go in and grab the data. I wonder if they are aware of this problem?
:
: Thanks again,
: David
David, why not just clear the array just after the data the array contains is displayed? Then it will run on mod_perl and non-mod_perl systems.
--
Mark
"If I can't code I'm not going to be a happy camper!"