Session Variables
Posted: Fri Jun 16, 2006 3:44 pm
I'm trying to create session variables to hold a username and password.
The following code generates the following error:
Warning: session_start() [function.session-start]: open(C:\PHP\sessiondata\sess_cd186036c4193d17424ca1fa77c80cd6, O_RDWR) failed: No such file or directory (2)
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent
Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0
Warning: Unknown: open(C:\PHP\sessiondata\sess_cd186036c4193d17424ca1fa77c80cd6, O_RDWR) failed: No such file or directory (2) in Unknown on line 0
Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (C:\PHP\sessiondata) in Unknown on line 0
The following code generates the following error:
Code: Select all
$user = $HTTP_POST_VARS['user'];
$pass = $HTTP_POST_VARS['pass'];
session_start();
session_register("username");
$username = $user;Warning: session_start() [function.session-start]: open(C:\PHP\sessiondata\sess_cd186036c4193d17424ca1fa77c80cd6, O_RDWR) failed: No such file or directory (2)
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent
Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0
Warning: Unknown: open(C:\PHP\sessiondata\sess_cd186036c4193d17424ca1fa77c80cd6, O_RDWR) failed: No such file or directory (2) in Unknown on line 0
Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (C:\PHP\sessiondata) in Unknown on line 0