I have IIS server and Win2k and for me this code works FINE without any problems, but 2 days ago I wrote e-shop, www.helsiko.ee (not completed yet), on my PC it works fine and I have NO any problems, but there, when I uploaded it, I got the similar problem:
My LETTER to :page hoster
Well, I have 2 files, the first one index.php and the second one order.php,
in index.php is a form, which submits data to another file, this way.....
<form action="libz/order.php"..... with this form I also submit session name
and session id with help of hidden form. Before this sumbition I already
have defined some variables in session, this variables have already values,
after submit, script, which is in order.php file, begin to work with session
variables, it's getting them and changes, after changes I'am making print_r
of $SESSION and see that all session variabes changed in this file as I
wanted, but when I replace print_r string with redirection to index.php back
with this function header(" Location:
../?PHPSID=127a81792a1f43df221f1........ and after returning to this page, I
see values of SESSION variables as the were before running order.php script
which changed them. On my local server with Windows 2000 SP3 + IIS 5 Web
Server and PHP 4.2.2 version all works FINE for me, what wrong on your
server???? Access to all session variables I'am making this way
$SESSION['nameofvar'].
And on this letter they gave me this answer:
You should try redirecting with full domain name and path.
We are running php in CGI mode, that may be problem.
You should doublecheck this variable again before header() and
use exact varable.
I got this letter just about 3 hours ago, and have no time to try this way what they R recomending, but U can try. If I will have free time tonight I will try your code on their server, and if it will NOT work there, than the answer will clear.