Hey all, I'm working out of a book teaching myself PHP4 here and I've
got this code from a login web page...
[begin code]
session_start();
if(!isset($userid)) {
login_form();
exit;
}
else {
session_regisister("userid", "userpassword");
if(!$username) {
session_unregister("userid");
session_unregister("userpassword");
echo "Authorization failed. " .
"You must enter a valid userid and password
combo. " .
"Click on teh following link to try
again.<BR>\n";
echo "<A HREF=\"$PHP_SELF\">login</A><BR>";
echo "If you do not have login, please contact
Operations to obtain one.<br>\n";
exit;
}
else echo "welcome, $username!";
}
[end code]
The page puts up a for with fields for username, password etc. nothing
crazy, but when I open the page I get the following error displayed
(before data is entered into the form and subitted).
[begin error]
PHP Warning: session_start():
open(/tmp\sess_d7d909aa6e85cf5489a50f6e42f03b12, O_RDWR) failed: No such
file or directory (2) in c:\inetpub\wwwroot\auth_user.php on line 54 PHP
Warning: Unknown(): open(/tmp\sess_d7d909aa6e85cf5489a50f6e42f03b12,
O_RDWR) failed: No such file or directory (2) in Unknown on line 0 PHP
Warning: Unknown(): Failed to write session data (files). Please verify
that the current setting of session.save_path is correct (/tmp) in
Unknown on line 0
[end error]
Not sure what I did wrong except to think that PHP is trying to write
the session id file to a directory that doesn't exist "/tmp." This is
running on a MS IIS server. If I'm correct in my assessment, where do I
set the default location for session data?
Thanks,
Jeff
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php