Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

$_SESSION help

Status
Not open for further replies.

shaggy56

Programmer
Mar 16, 2003
12
US
ok so I have the $_POST var being passed to the $_SESSION var on my index page. Then when you click it link it does this
session_register('username');
$_SESSION['username'] = $username;
session_register('password');
$_SESSION['password'] = $password;

Now that seems to pass the two vars just fine, if the other page it is linked to is in the same dir. When I put the page in a different dir I get an error when I click another link on that page(it should be passing the $_SESSION) every time I cick a link. Here is the error:

CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:(doesn't say)

I am new to the Session thing so I have no clue why it is doing this.
 
Insufficient data for a meaningful answer.

What is your PHP environment? What OS? What web server? What version of PHP? How are you running PHP -- as a standalone CGI or as a web server module?

A CGI script must output at least a "Content-Type" HTTP header. PHP generally supplies that for you automatically, but in your case, it seems to not be. Want the best answers? Ask the best questions: TANSTAAFL!
 
I am running it on a Win2k server, with IIS, version of php is 4.1.3.
 
no it works perfectly when the PHP file is in the same dir as the file that is linked to it. but when I move that file into a folder and set up the index.php to link to that file it gives me that error.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top