Click to See Complete Forum and Search --> : IIS/PHP != Apache/PHP for same script?


Anon
04-19-2001, 12:50 PM
I've installed Apache and PHP4 on a Win2k box. I developed a web application making extensive use of start_session et al. Now I'm trying to port this to IIS. I've got PHP4 work (without many problems -- occational "access violation" etc) but for some reason the session variables won't get set and Header("Location: http://foo.com"); doesn't work either.

Any suggestions?

-j

Anon
04-19-2001, 01:03 PM
<?php
session_start();

print "a:" . $HTTP_SESSION_VARS['foo'] . "<br>";


session_register("foo");

$HTTP_SESSION_VARS['foo'] = 1;

print "b:" . $HTTP_SESSION_VARS['foo'];

?>

//this should produce
a:
b: 1

//on the first run an
a: 1
b: 1
//on the second. but I don't get the second results.

what gives?
-j

toma42
04-19-2001, 01:41 PM
Is the path for saving session files correct on the windows box?

ame12
04-21-2001, 10:43 AM
Jason I had the same problem.

Make sure firstly that your php configuration file matches on both platforms.

Then as Tom suggests make sure that any paths referred to in the ini file are present (like temp/session directories).

lastly make sure that all extensions are properly installed on both platforms.

Dave


===========================================
http://badblue.com
Small footprint P2P web server for Windows,
File-sharing, PHP, wireless apps & more
===========================================

Anon
04-21-2001, 01:51 PM
strangely enough, if I use register_globals, the global variables do sessions just fine, however $HTTP_SESSION_VARS['foo'] seems to be read only. If i do $HTTP_SESSION_VARS['foo'] += 1; nothing changes, but $foo += 1; works fine.

?

-j