[thelist] Trouble with PHP Include

Sarah Adams sarahwbs at gmail.com
Mon Feb 17 07:31:01 CST 2014

> Thank you Lee and Anthony for your help.  I think you are on to it, Lee.  I
> think it is a flaw in my logic somewhere.  You see I have these scripts
> running on a hosted server.  I am adding some features which I am testing
> on
> my XAMPP server.  The script runs perfectly on the hosted server, but for
> some reason I have to add the following assignments to the XAMPP version.
> $clubdraws = $_SESSION['clubdraws'];
> $clubresults = $_SESSION['clubresults'];
> $clublogin = $_SESSION['clublogin'];
> Obviously this assignment must be happening somewhere on the hosted script,
> otherwise it wouldn't work.  But it is not in the current script so it must
> be in an included script, but I can't find it.  I will have to do some
> detective work.  With your help I have managed to narrow the issue down to
> something I have done rather than something not working correctly.  Thanks
> again.

It sounds like your host may have an older version of PHP with
register_globals turned on.
That would cause your session variables to be global so that you would be
able to access them without using $_SESSION['var'].

If you determine that this is the case, I recommend turning
register_globals off... but you have to be careful doing so, as you can
see, your code up to now may be depending on having it turned on.


More information about the thelist mailing list