Hello,
I have the same software installed on two servers:
works: http://developdesign.com/samples/modelagency/index.php
not working: http://killertalent.com/index.php
1 example - login as 'mat / matt'
One developdesign.com page you get directed to 'members.php' page if logged in, but one killertalent.com page you get error ( or if using Firefox you go to "http://killertalent.com/processors/login.php" page )
The processors/login.php page is supposed to redirect to either 'members.php' if logged in or 'index.php' if need to register.
Could it be that developedesign.com Server API is Apache, but killertalent.com Server API is CGI/FastCGI?
CODE for login.php page with redirect code:
<?session_start();
require("../includes/vars.inc.php");
require("../includes/functions.inc.php");
require("../includes/templates.inc.php");
require("../includes/apt_functions.inc.php");
$topass=array();
if ($_SERVER['REQUEST_METHOD']=='POST') {
$user=addslashes_mq($_POST['username']);
$pass=addslashes_mq($_POST['password']);
if (isset($user) && !empty($user) && isset($pass) && !empty($pass)) {
db_connect();
$query="SELECT user_id,name,membership,is_approved FROM users WHERE user='$user' AND pass='$pass'";
if (!($res=mysql_query($query))) {error(mysql_error(),__LINE__,__FILE__);}
if (mysql_num_rows($res)) {
list($user_id,$name,$membership,$is_approved)=mysql_fetch_row($res);
$_SESSION['user_id']=$user_id;
$_SESSION['name']=$name;
$_SESSION['membership']=$membership;
$_SESSION['is_approved']=$is_approved;
$query="UPDATE users SET last_visit=now() WHERE user_id='$user_id'";
if (!($res=mysql_query($query))) {error(mysql_error(),__LINE__,__FILE__);}
if (defined('_PCPIN_CHAT_')) {
$is_admin='no';
if ($membership==_ADMINLEVEL_) {
$is_admin='yes';
}
@mysql_query("INSERT INTO pcpin_users SET user='$user',lastping='".time()."',ip='".getenv('REMOTE_ADDR')."',language='english',color='#000000',level='$is_admin',sid='".session_id()."'");
$date_time = date('YmdHis');
@mysql_query("INSERT into pcpin_logins SET date_time='$date_time',user='$user', ip='".getenv('REMOTE_ADDR')."', password='$pass'");
$date_time = date('d').".".date('m').".".date('Y')." ".date('H').":".date('i').":".date('s');
@mysql_query("UPDATE pcpin_registered_users SET last_visit='$date_time',last_ip='".getenv('REMOTE_ADDR')."' WHERE user='$user'");
}
redirect2page('members.php');
} else {
$topass['message']='Invalid user or pass. Please try again!';
}
} else {
$topass['message']='Invalid user or pass. Please try again!';
}
}
redirect2page("index.php",$topass);
?>
The server configuration info:
http://developdesign.com/phpinfo.php
http://killertalent.com/phpinfo.php
Is it that the Server API on developdesign.com is Apache and the Server API on killertalent.com is CGI/FastCGI?
Is it that developdesign.com uses Zend Optimizer and killertalent.com uses eAccelerator?
Software says important to have one important directive for the directory where your installation is:
AllowOverride All
How do I tell if this directive is setup?