roldahayes Posted September 13, 2007 Share Posted September 13, 2007 Hi I have a database installed that can accept a csv file. when I installed onto a new server, it wont upload. is there anything obvious in the phpinfo that could be causing this? also, the login page wont work on this server. just reloads the page again when submitting the user and pass <?php /* filename: login.php version: 1.1 last revision: 23/11/02 description: admin logon authentication - password check and session creation */ if (!$HTTP_POST_VARS['submit']) { ?> <script language="JavaScript"> <!-- function validateForm(form) { if (form.username.value == "") { alert("Please Enter a Username."); form.username.focus( ); return false; } else if (form.password.value == "") { alert("Please Enter a Password."); form.password.focus( ); return false; } } --> </script> <style type="text/css"> <!-- BODY { } A { COLOR: #003366; TEXT-DECORATION: none; } A:hover { TEXT-DECORATION: underline; } .small { FONT-SIZE: 8pt; FONT-FAMILY: Verdana; } .std { FONT-SIZE: 8pt; FONT-FAMILY: Verdana; COLOR: #000000; } .header { FONT-SIZE: 8pt; FONT-FAMILY: Verdana; FONT-WEIGHT: BOLD; COLOR:#000000; } .bigheader { FONT-SIZE: 8pt; FONT-FAMILY: Verdana; FONT-WEIGHT: BOLD; COLOR:#FFFFFF; } .error { FONT-SIZE: 8pt; FONT-FAMILY: Verdana; COLOR:#FF0000 } .headertable { FONT-SIZE: 8pt; FONT-FAMILY: Verdana; FONT-WEIGHT: regular; COLOR:#FFFFFF; BACKGROUND-COLOR:#000066; } .stdtable { FONT-SIZE: 8pt; FONT-FAMILY: Verdana; FONT-WEIGHT: regular; COLOR:#000066; } --> </style> <table width="60" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td><img src="new/1_r1_c12.gif" width="348" height="120"></td> <td><img src="new/1_r1_c5.gif" width="350" height="120"></td> </tr> </table> <table width="630" align="center" cellspacing="0"> <tr align="center"> <td valign="top"> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td width="3"></td> <td width="593" colspan="3"> </td> <td width="3"></td> </tr> <tr> <td> </td> <td align="center" valign="middle" colspan="3"> <table border="0" cellspacing="0" cellpadding="4" width="98%"> <tr align="center"> <td class="small" colspan="8"> <form name="Login" action="login.php" method="post"> Username: <input type="text" name="username"/> Password: <input type="password" name="password"/> <input type="submit" name="submit" value="submit" onClick="return validateForm(form)"> </form> </td> </tr> </table> </td> <td></td> </tr> <tr> <td rowspan="2"> </td> <td rowspan="2"> </td> <td class=small align="center"> <table width="98%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class=small> </td> <td align="right"> </td> </tr> </table> </td> <td rowspan="2" align="right"> </td> <td rowspan="2"> </td> </tr> <tr> <td valign="bottom"> </td> </tr> </table> <p> </p> </td> </tr> </table> <?php } else { // include session authentication file include_once("session.php"); // include the wykes website configuration file include_once("web_conf.php"); // set login variables $strInvalid = "The username or password you have entered is invalid. Please try again: <p><a href=\"login.php\">Login</a><p>"; $username = $HTTP_POST_VARS ["username"]; $password = $HTTP_POST_VARS ["password"]; // test for blank entries if (($username == "") || ($password == "")) { echo($strInvalid); return; } // test the password if(($password == $AUTORACKPASSWORD)&&($username == $AUTORACKUSERNAME)) { // Create session and set authenticated flag if (!session_start()) echo("Not able to create Session"); if (!session_register("isAuthenticated")) { echo("Could not add isAuthenticated variable to session."); return; } $HTTP_SESSION_VARS ['isAuthenticated'] = "loggedIn"; $HTTP_SESSION_VARS ['SessionExpired'] = "<p>User session has expired. Please login again: <a href=\"login.php\">Login</a><p>"; include_once("upload.php"); } else { echo($strInvalid); return; } } ?> http://www.thule-professional.co.uk/info.php thanks Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted September 13, 2007 Share Posted September 13, 2007 instead of $HTTP_POST_VARS, try $_POST $HTTP_SESSION_VARS to $_SESSION and I don't know what these are used for: $AUTORACKPASSWORD $AUTORACKUSERNAME Quote Link to comment Share on other sites More sharing options...
roldahayes Posted September 13, 2007 Author Share Posted September 13, 2007 no that didn't work, the autorack bit is just how the login was coded it points to a user and pass in a config file... Quote Link to comment Share on other sites More sharing options...
Jessica Posted September 13, 2007 Share Posted September 13, 2007 Looking at the phpinfo page, your new server has register_globals off. Did the old one have it enabled? That could cause a lot of problems. I would print the info() on both servers and look through for any settings that are different, then look them up in the manual to see what they do. This might lead you to a solution. Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted September 13, 2007 Share Posted September 13, 2007 http://phpsnips.com/help.php?hlp=2%20Page%20Login&id=4 Quote Link to comment Share on other sites More sharing options...
roldahayes Posted September 13, 2007 Author Share Posted September 13, 2007 globals off on both servers so thats not it.... Quote Link to comment Share on other sites More sharing options...
roldahayes Posted September 14, 2007 Author Share Posted September 14, 2007 also it works on another server with them on so that def cant be it? This is driving me crazy!!!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.