Hi, you need to verify that the session data directory exists and that it has the proper write permissions.
Open php.ini, this file is located at C:\Windows\php.ini, or where ever Windows is installed.
Locate the following snippet:
Code:
; Argument passed to save_handler. In the case of files, this is the path
; where data files are stored. Note: Windows users have to change this
; variable in order to use PHP's session functions.
session.save_path = /tmp
Change the value to reflect a valid file path,
I'd suggest: C:\PHP\sessiondata
Save the changes.
Create the sessiondata directory.
Next apply the proper write permissions to the sessiondata directory, if you're using Windows XP, then read this FAQ:
http://p2p.wrox.com/topic.asp?TOPIC_ID=11962
Verify that there is no whitespace or output before the opening <?php delimiter appearing before the call to session_start().
Restart Apache, run your script again.
This should cure all of your session-related errors.
I'd also remove the call to session_unset().. session_unset() destroys all session variables currently set, and actually wouldn't do anything anyway since its called prior to session_start().
Then..
Warning: main(common_db_only.php): failed to open stream: No such file or directory in C:\Program Files\Apache Group\Apache2\htdocs\pro\POT\login\loginadmin.php on line 5
This error has come up because the program cannot locate the file, verify the file path to common_db_only.php.
Also, a word on your code.. you don't need to post your entire script, please only post the relevant snips and the related errors.
: )
Rich
::::::::::::::::::::::::::::::::::::::::::
The Spicy Peanut Project
http://www.spicypeanut.net
::::::::::::::::::::::::::::::::::::::::::