surefire12345 Posted June 2, 2011 Share Posted June 2, 2011 Hi all, But of a PHP newbie so treat me nice but this one is driving me nuts I have the exact same login.php file running on two different servers and they have slightly different versions of PHP installed as follows: 1. PHP Version 5.0.4 - version http://www.trafficpaymaster.com/tpm/phpversion.php 2. PHP Version 5.2.15 - version http://www.dentistsinflorida.org/tpm/phpversion.php The login works fine on the first server from here: http://www.trafficpaymaster.com/tpm/login.php Email: [email protected] Pwd: test But try it on the second server here: http://www.dentistsinflorida.org/tpm/login.php Using the same email and password (which is correct) it just loops round not letting the user into the main script at index.php Question: Why? What have I got wrong for that later version of PHP? Many thanks guys. Link to comment https://forums.phpfreaks.com/topic/238209-urghh-why-does-my-script-run-on-php-version-504-but-not-php-version-5215/ Share on other sites More sharing options...
kenrbnsn Posted June 2, 2011 Share Posted June 2, 2011 Can't tell you without seeing your code. Please post it between tags. Ken Link to comment https://forums.phpfreaks.com/topic/238209-urghh-why-does-my-script-run-on-php-version-504-but-not-php-version-5215/#findComment-1224110 Share on other sites More sharing options...
surefire12345 Posted June 2, 2011 Author Share Posted June 2, 2011 Ah yes, of course... <?php include "utils.php"; if (file_exists("password.php")) { include("password.php"); } else { header("Location: install.php"); exit(); } if ($_GET['step']=='remind') { $mes = "Hi there, Thanks for requesting a password reminder. ---------------------------- Login: {$conf['script_url']} Email: $username Your password: $password ---------------------------- "; $res = mail($username, "TPM Password Reminder ", $mes, "From: admin@{$conf['server_domain']}"); if (! $res) { $res = mail($username, "TPM Password Reminder ", $mes, "admin@{$conf['server_domain']}"); } AddMessage("Password emailed to $username."); } if ($_REQUEST['login']) { if (! ( $_POST['username'] && $_POST['password'] )) { AddError("Please enter email and password."); } else { if ( isset($_POST['username']) && isset($_POST['password']) && ($_POST['username']==$username) && ($_POST['password']==$password) ) { setcookie ("admin", 1); header('Location: index.php'); } else { AddError("Login Incorrect."); } } sleep(2); } $title='Admin Login'; include('header.php'); echo " <table border='0' width='100%' height='100%'> <tr><td width='100%' align='center' valign='middle'> <p align='center'> <font color=red>{$strs['errmes']}</font>{$strs['infomes']} <form method='post' action=\"login.php\" onSubmit=\"return CheckFieldsForm(this, new Array('username', 'password'));\" > Email<br> <input name='username' size='35'><br> Password<br> <input type='password' name='password' size='35'><br><br> <input class='button' name='login' type='Submit' value='Login'> </form> <br/> <a href=\"login.php?step=remind\">Remind Password</a> </p> </td></tr> </table>"; ?> Link to comment https://forums.phpfreaks.com/topic/238209-urghh-why-does-my-script-run-on-php-version-504-but-not-php-version-5215/#findComment-1224114 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.