Ok this is long winded but I need to explain the ENTIRE problem if I expect you too follow me 😃
I have setup apache so that I can hide dynamic pages.
Basically when you type:
http://mydomain.com/php/script/value1/value2/
Apache has a Force-Type set on the /php/script that forces it to be treated as php. This works and
I retrieve my variables from the URL.
In my /php/script file I want to include the page that would normally be:
http://mydomain.com/script?var1=value1&var2=value2
I parse the /php/script/ URL and convert it into the real url and do an include(realURL) and it works...sort
of.
My php $SESSION variables don't seem to be included for use in the include file. I echoed the $SESSION
variables in my /php/script file to make sure that it wasn't related to the directories and they are
there, so I have ruled out that possibility.
I did some research and decided to try adding &PHPSESSID=sessionidhere to the includeed URL to get the
session to continue on that page. Here is where the problem gets ugly.
Apache basically hangs when I attempt this and I have to wait for it to timeout. I don't know why it
does this, but it does. I checked the URL I am passing, and it is valid and works in the browser (so
I am assuming passing PHPSESSID should work if I can type the URL in and I have no problems) This leaves
me more baffled. Why does apache hang if it is done in an include and not in the browser window???
I then tried using a docReader class to read the output of the file as a string then echo it to the
browser, once again it hangs.
Is this a bug? What can I do to carry the session variables over? Why don't they automatically, I
thought included files retained the variable scope from the called page, they appear to everywhere else?
HELP!