Can any one please let me know, i have a issue on setting up session variables on my php site. I have also checked with my php_info()
where it is not enabled. But, the other sites in the same server are works fine. Please can any one advice on this to close?
session_start();
Make sure you have this at the top of your script. Its very common to forget that which can lead to frustrations of code not working. Like Marcus Adams said, you need that at the top of every script that will be accessing session variables.
Use session_start()
in every script where you intend to access session variables and call it before ANY output.
Also, ensure your browser has cookies enabled (most likely won't work if you're running PHP via the command line).
Use session_save_path()
to get the location of the session save folder, and ensure your script has access.
If you need further help, please show us some codez and some error messages.