Forgoten
| From: | Cesar Aracena | Date: | Thu, 21 Nov 2002 19:57:32 +0000 |
| Subject: | Forgoten | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-125478@lists.php.net to get a copy of this message | ||
Hi all,
Im quite rusty with this sessions stuff (just came from vacations) and
have this strange problem with a session Im trying to build. Along with
that, Im making my first lines of code with a new portable computer and
maybe PHP or Apache is not well configured
any ideas? The code goes as
follows and the result page is below that:
====================================
<?
session_start();
if ($username && $password)
{
$db_conn = mysql_connect("www.icaam.com.ar", "icaam",
"xxxxxxx");
mysql_select_db("icaam", $db_conn);
$query = "SELECT * FROM maraadmins WHERE adminuser = '$username'
AND adminpassword = password('$password')";
$result = mysql_query($query, $db_conn);
if (mysql_num_rows($result) > 0)
{
$row = mysql_fetch_array($result);
$valid_admin = $row['adminid'];
session_register("valid_admin");
header("Location: admin.php");
exit;
}
else
{
header("Location: ../index.html");
exit;
}
}
else
{
header("Location: ../index.html");
exit;
}
?>
====================================
Resulta at IE:
Warning: open(/tmp\sess_d25ead36103aaf410d8ad254d206ada3, O_RDWR)
failed: No such file or directory (2) in
C:\apache\htdocs\joyeriamara\admin\login.php on line 3
Warning: Cannot add header information - headers already sent by (output
started at C:\apache\htdocs\joyeriamara\admin\login.php:3) in
C:\apache\htdocs\joyeriamara\admin\login.php on line 16
Warning: open(/tmp\sess_d25ead36103aaf410d8ad254d206ada3, O_RDWR)
failed: No such file or directory (2) in Unknown on line 0
Warning: Failed to write session data (files). Please verify that the
current setting of session.save_path is correct (/tmp) in Unknown on
line 0
====================================
Any thoughts are welcome and appreciated.
Cesar L. Aracena
icaam@icaam.com.ar
caracena@infovia.com.ar
(0299) 156-356688
Neuquén (8300) Capital
Argentina