[Scottish] problems with php header function with my ISP

Tam McLaughlin scottish at mailman.lug.org.uk
Sun Apr 27 12:12:01 2003


Hi,
I seem to have a problem with the header function working under my ISP 
force9's config. The code works fine on my apache/php config at work and 
also on my home PC but when I put the php files on my ISPs cgi server I get 
the error msg specified within the die function and it does not redirect.
I tried writing a simple php program with only the line below which worked 
fine on the F9 cgi server (well ok, it took me to the correct URL but the 
variables were obviously not set). The weird thing was, earlier today, I was 
getting the error when using konqueror but it worked ok under mozilla.
Now I just tried it under mozilla and I got the error msg. 
I am sure my code is ok i.e I am not sending any output to the browser before 
the header and it does work  under my local config.
I have tried using a relative path name and also the absolute URL. The rest of 
the program works ok and if I access the php program I am trying to redirect 
to
it work fine.

The code is:

header ("Location:  
http://cgi.tammclaughlin.force9.co.uk/cgi-bin/question_type.php?question=1&quizname=$quizname") 
or die ("Can't go to location ");


Any ideas?
Thanks.