PHP Sessions on Windows

Loaded PHP 4.4.4 onto a Windows 2003 Web Edition Server.  All php functions work fine, except for session variables.  Smae code works fine on other servers, so I assume its a php.ini setting.  Looked and chagned everything I could find, but still cant get session variable to resolve.

code works like:
set session variable
redirect to new page
retreive session variable

Always come up empty on the Windows servers.  Any ideas where the php.ini setting is that would cause this.  Keep in mind, I do not beleive this to be a page scripting problem since it works fine when on a unix machine with PHP.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

you might have already checked out but,

is the key to use(set/get) the session variables.
at the very top of the page..
mopar003Author Commented:
first two lines of every page are:


any other ideas?  I can post a link to a phpinfo() page as well if needed.
after checking that the php.ini file is the one you are touching,
in the ini file,
please check session.save_path is pointing a true folder.
and for a crash test, set that folders security settings to "everyone" and try again..
Learn SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

also, restart iis after the change.. don t remember if the restart is a must at such a change though.
mopar003Author Commented:
save_path is going to a true folder, and a session file is being written, although empty.  Access for everyone is full.  Still no success.

many quotes like "I get empty sess_ files in /tmp"

looks like a bug still unsolved.. but one thing worth trying

session.save_path = "0;c:\<<your session var path>>"
don't forget to use the 0; before the path.

on the page there are some other solutions to try ..

hope it helps


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mopar003Author Commented:
Still ahving the same issue.  Tried all the suggestions on the linked page above, and still no success.  have also tried different versions of PHP as well, all to no avail.  This seems to be specific to the Windows PHP.  *nix platform works fine.  I also took the phpinfo() from both windows and unix and did a side by side comparison adn matched them up as best I could.  

This seems to be a fairly common problem.
mopar003Author Commented:

All it took!  For whatver reason, I have to close out the session before any header redirects or it loses the info.  Thats not quite right.  If I take out the header redirects, and just do a one line echo, it worked fine.  Not sure why, but I added the session_write_close() before the ehader redirect and then everything worked.  Thanks for the info.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.