View Full Version : PHP Server Question - Please answer quickly
10-22-2003, 09:03 AM
I have localhosting setup, and when i run a script which uses $_SESSION to register the session a text ($_SESSION['s_logged_n'] = 'TRUE';)
i have debugged it by running echo with it and it comes out as null...
is this a problem with my server? should i change something in the server to allow sessions?
10-22-2003, 09:43 AM
This is a nobrainer reply, but did you have
(to check whether session is supported. try echo phpinfo(); )
10-22-2003, 09:46 AM
i dont need to use session_register(); and yes i have used session_start(); hence there are no error messages, it just doesnt show anything, it appears null when i echo it..
10-22-2003, 11:51 AM
where are you trying to print the var? be aware that you must have session_start() on every page where you need to print session vars.
10-22-2003, 09:20 PM
What's your PHP version? Maybe it doesn't support $_SESSION and you should use $HTTP_SESSION_VARS, so, change your code from:
$_SESSION["something"] = "somethingelse";
$HTTP_SESSION_VARS["something"] = "somethingelse";
It might help as it helped me once :rolleyes:
10-27-2003, 09:12 AM
ill try that as a last resort but i have downloaded the latest version of php so i dont think that'd be a problem :)
10-27-2003, 03:20 PM
Do you have a temp directory set up for your sessions? And is it that path specified in your php.ini file?
10-28-2003, 03:32 AM
yes. also my mail() function does not work.
10-28-2003, 04:30 AM
Are you positive your temp directory is working? Have you check it after creating a session to see if the session file is actually in there?
10-28-2003, 05:03 AM
the session files are all there. it just wont let me use them...
10-31-2003, 05:24 AM
** fixed itself **
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.