Hi folks,
I have some very wierd behavior with my Mac OSX 10.1.5.
I am runing MYSQL and PHP on both a Windows 2k and Mac machine. I have code that will execute on the Win2k machine and not on the Mac.
I have a form that is submitting information to a file that will set a session variable and pass the user on to a main page. The issue is that I can't seem to get the variable that is passed through to the login script from the origial form. Here is my code....
Login Page:
require('./config.inc.php');
require('./functions.inc.php');
if ( isset($i6token) && ($i6token[login]!="") ) {
header("Location: $i6global[httproot]/manage.php");
} else {
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<head><title>Inline6 <?echo $i6info[version];?> - Login</title>
<link rel="stylesheet" href="<? echo $i6global[css];?>">
<script language="Javascript">
if (top.location != self.location) {top.location = self.location.href}
</script>
</head><body>
<table border=0 cellpadding=1 cellspacing=0 width="100%" height="100%">
<tr><td width="20%"> </td>
<td valign=middle align=center width="60%">
<table border=0 cellpadding=1 cellspacing=0><tr><td class=border>
<table border=0 cellpadding=5 cellspacing=0>
<tr><td align=left class=lightgray width="60%">
<img src="images/arrow.gif" border=0 alt="arrow.gif">
<span class=path>Inline6 Login</span></td>
<td align=right class=lightgray width="50%">
<span class=path><? echo $i6info[version]; ?></span>
</td></tr>
<tr><td align=left class=white colspan=2>
<form name="loginform" method=post action="<?echo $i6global[httproot];?>/scripts/login.php">
<table border=0 cellpadding=4 cellspacing=0>
<tr><td align=right>
<span class=formTXT>user</span>
</td><td align=left>
<input type=text name="i6f[login]" size=25 maxlength=12 class=formInput>
</td></tr>
<tr><td align=right>
<span class=formTXT>pass</span>
</td><td align=left>
<input type=password name="i6f[password]" size=25 maxlength=12 class=formInput>
</td></tr>
<tr><td align=right> </td>
<td align=center>
<input type=checkbox name="i6f[remember]"><span class=tinyblack>Remember?</span>
<input type=submit name="submitbutton" class=formButton value="login">
</td></tr>
</table>
</form>
</td></tr></table>
</td></tr></table>
<?
if ($i6global[signup]) {
echo "<br>Not a user? <a href=\"$i6global[httproot]/signup.php\">Signup</a>";
}
?>
</td>
<td width="20%" valign=bottom align=right>
<a href="javascript:alert('Inline6, <?echo $i6info[version];?>\n\nWebsite authoring tool.\n\nAuthos: <?echo $i6info[author];?>\nReleased: <?echo $i6info[released];?>\nHomepage: <?echo $i6info[url];?> \n\nEnjoy.')" onMouseOver="window.status='Inline6';return true;" onMouseOut="window.status='';return true;"><!--
//--><img src="<?echo $i6global[httproot];?>/images/inline6.gif" border=0 alt="Inline6"></a>
</td></tr></table>
</body>
<? } / else / ?>
And the login script....
require('../config.inc.php');
require('../functions.inc.php');
if ( isset($i6f) ) {
$i6link = db_connect();
$i6f[password] = crypt($i6f[password],$i6info[version]);
if ( $uid = good_token($i6f[login],$i6f[password]) ) {
/*
Simplistic Session Management/Authentication
set the authentication token with user/pass
sessions terminate with closing of browser..
(per-session cookies)
*/
if ($i6f[remember] == "on") {
setcookie("i6token[login]",$i6f[login],time()+18144000,"/");
setcookie("i6token[password]",$i6f[password],time()+18144000,"/");
setcookie("i6token[uid]",$uid,time()+18144000,"/");
setcookie("i6token[remember]","me",time()+18144000,"/");
} else {
setcookie("i6token[login]",$i6f[login],0,"/");
setcookie("i6token[password]",$i6f[password],0,"/");
setcookie("i6token[uid]",$uid,0,"/");
}
db_close($i6link);
header("Location: $i6global[httproot]/manage.php");
exit;
} else {
db_close($i6link);
header("Location: $i6global[httproot]");
}
} else {
header("Location: $i6global[httproot]");
//print "bad";
}
?>
Now it is breaking at the original if ( isset($i6f) ) { condition. It is looking to ensure that an array has been created and if so, perform the set session information. If not, go back to the home page (or print my "bad" error message). It is clearly not finding the array.
Can anyone help?
Thanks in advance.
-Tim