$_SESSION Variables on IIS

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
dwessell
Forum Commoner
Posts: 62
Joined: Fri Dec 23, 2005 2:30 pm

$_SESSION Variables on IIS

Post by dwessell »

Hi,

I've just installed php on a IIS server..

The script calls the variable:

$_SESSION['valid_user'].. However, it always is returned as empty.. Code functioned just fine on a Apache server.

Is there something special that needs to be done during the installation? I'm running IIS 6 and PHP 5.2.4...

THanks
David
User avatar
Zoxive
Forum Regular
Posts: 974
Joined: Fri Apr 01, 2005 4:37 pm
Location: Bay City, Michigan

Post by Zoxive »

The server probably had Session's Autostart.

Try putting session_start() at the very top of each page that uses session variables.

Error_reporting helps too, then you would see you are getting errors.
dwessell
Forum Commoner
Posts: 62
Joined: Fri Dec 23, 2005 2:30 pm

Post by dwessell »

Hi Zoxive,

Thanks for the information.. I just found the error as your note came in..

In php5 installations on IIS6, the default session.save_path variable will NOT function unless you adjust the permissions of the dir, or change it to the old setting of c:\temp..

Wish that had been in the installation manual somehwere :) would have saved me hours..

Thanks
David
Post Reply