On Tue, Mar 18, 2003 at 01:00:08AM +0000, Bobby Rahman wrote: > > > Hiya, > > Im running php4.2.3 on Win98 and apache 2.0.43. > I am having troubles passing variables from page to page. > I try to use: > > session_start(); > session_register("test"); > > > when echo $test on a different page it seems to be empty > when not called from within the page originally created. > > I have session_start() on every page at the start just under the php syntax > <? and also register the variables which I want global. > > I have edited the php.ini to set the session.save_path = "C:/windows/temp" > and also have global variables set on
If you mean register_globals, turn it back off. It's not doing you any good and it's a security problem. > > Any suggestions to what it may be as it doesnt seem to produce any errors. The last time I used the Win version of PHP, I vaguely remember that the binary download didn't support sessions. I vaguely remember that that has been changed, but it's been so long I'm no longer sure. I vaguely remember my name, the date, and my geographical location. In the past, I've successfully killed sessions by setting session.use_cookies to TRUE and turning off cookies in the browser. If you're not using cookies, you have to pass the session variables, or preferably only the session ID, in the URL. A more obscure problem involves forms that call their own files, where the file contains code that runs only on the second call. In cases where I was setting session variables on the second call, I've had to restore the session ID and name to the values set in the first call before setting the variable. Good luck. Bob Hall -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php