Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 05-27-2009, 04:26 PM
rosepose rosepose is offline
Member
 
Join Date: Jan 2009
Posts: 127
Credits: 10,598
rosepose
Default Login Failed

A couple of people have reported that they can't log in, one of my friends provided a screenshot:
http://i724.photobucket.com/albums/ww247/BlackVulpix/1-2.jpg

I've no idea what's wrong....

-Rose
Reply With Quote
  #2  
Old 05-27-2009, 04:32 PM
Bloodrun's Avatar
Bloodrun Bloodrun is offline
I am, who I am.
 
Join Date: Apr 2009
Posts: 532
Gender: Male
Credits: 28,260
Bloodrun
Send a message via Yahoo to Bloodrun
Default RE: Login Failed

Well it could be a couple things.

First, ask them which thing they are using to log in with, if it is the side bar, you will need to check your functions.php file (if they are using the side bar, copy and paste your functions.php file here)

If they are using the actual login.php file, paste that here.

The other reason is because your database was somehow edited (this is most likely not the reason)
Reply With Quote
  #3  
Old 05-27-2009, 05:31 PM
rosepose rosepose is offline
Member
 
Join Date: Jan 2009
Posts: 127
Credits: 10,598
rosepose
Default RE: Login Failed

They're using the login.php because I don't have a sidebar.
PHP Code:
<?php

// **********************************************************************
// Rusnak PHP Adoptables Script
// Copyright 2009 Brandon Rusnak
// For help and support: http://www.rusnakweb.com/forum/
//
// Redistribution prohibited without written permission
// **********************************************************************

// Wake the sleeping giant

// **********************************************************************
// Basic Configuration Info
// **********************************************************************

include("inc/functions.php");
include(
"inc/config.php");
include(
"lang/lang.php");

$themeurl grabanysetting("themeurl");

// **********************************************************************
// Define our top links by calling getlinks()
// **********************************************************************

$links getlinks();

// **********************************************************************
// Define our ads by calling getads()
// **********************************************************************

$ads getads("login");

// **********************************************************************
// Grab any dynamic article content from the content table
// **********************************************************************

$pagecontent getsitecontent("index");
$article_title $pagecontent[title];
$article_content $pagecontent[content];
$article_content nl2br($article_content);

// **********************************************************************
// Grab any settings that we will need for the current page from the DB
// **********************************************************************

$browsertitle grabanysetting("browsertitle");
$sitename grabanysetting("sitename");
$slogan grabanysetting("slogan");

// **********************************************************************
// Check and see if the user is logged in to the site
// **********************************************************************

$loginstatus logincheck();
$isloggedin $loginstatus[loginstatus];
$loggedinname $loginstatus[username];

// **********************************************************************
// End Prepwork - Output the page to the user
// **********************************************************************

if($isloggedin == "yes"){

$article_title $langislog;
$article_content $langislogfull;

}
else{

//User is not logged in, so let's attempt to log them in...

$username $_POST["username"];
$password $_POST["password"];

//Clean it up

$username preg_replace("/[^a-zA-Z0-9\\040.]/"""$username);

$username secure($username);
$password secure($password);

//User is not logged in

$loginform "<form name='form1' method='post' action='login.php'>
  <p>Username: 
    <input name='username' type='text' id='username'>
</p>
  <p>Password: 
    <input name='password' type='password' id='password'>
</p>
  <p>
    <input type='submit' name='Submit' value='Submit'>
  </p>
  <p>Don't have an account?<br>
  <a href='register.php'>Register Free</a>  </p>
  <a href='forgotpass.php'>Forgot your password?  Click Here</a>
</form>"
;



if(
$loggedinname == "" and $password == ""){
// User is viewing login form
$article_title "Member Login:";

$article_content $loginform;
}
else if((
$username != "" and $password == "") or ($username == "" and $password != "") ){

//Something was left blank
$article_title "Login Error:";
$article_content "Something was left blank.  Please try logging in again.<br><br>".$loginform."";

}
else if(
$username != "" and $password != ""){
// Try to log the user in
$password md5($password);

$query "SELECT * FROM ".$prefix."users WHERE username = '$username'";
$result = @mysql_query($query);
$num = @mysql_numrows($result);

//Loop out code
$i=0;
while (
$i 1) {

$luser=@mysql_result($result,$i,"username");
$lpass=@mysql_result($result,$i,"password");

$i++;
}

if(
$username == $luser and $password == $lpass){
$article_title "Login Successful!";
$article_content "Welcome back ".$username.".  You are now logged in.  <a href='account.php'>Click Here to view or edit your account.</a>";


// Set the cookie
$Month 2592000 time();
setcookie("auser",$username,$Month);
setcookie("apass",$password,$Month);

}
else{
$article_title "Login Failed!";
$article_content "Sorry, we could not log you on with the details specified.  You can <a href='login.php'>try again</a> or <a href='forgotpass.php'>request a password reset.</a>";
$fail 1;
}
}




}


// **********************************************************************
// Begin Template Definition
// **********************************************************************

//Define our current theme
$file $themeurl;

// Do the template changes and echo the ready template
$template file_get_contents($file);

$template replace(':ARTICLETITLE:',$article_title,$template);
$template replace(':ARTICLECONTENT:',$article_content,$template);
$template replace(':ARTICLEDATE:',$article_date,$template);

$template replace(':BROWSERTITLE:',$browsertitle,$template);
$template replace(':SITENAME:',$sitename,$template);

//Define our links
$template replace(':LINKSBAR:',$links,$template);

//Get the content for the side bar...

$sidebar "";
$template replace(':SIDEFEED:',$sidebar,$template);

//Get the ad content...
$template replace(':ADS:',$ads,$template);

//Get the slogan info
$template replace(':SLOGAN:',$slogan,$template);


echo 
$template;

// **********************************************************************
// End Template Definition
// **********************************************************************



?>
That's it there. I have edited the database once, to chance the max adoption limit of an adoptable, but I don't think that would change anything...?
Reply With Quote
  #4  
Old 05-27-2009, 05:40 PM
Bloodrun's Avatar
Bloodrun Bloodrun is offline
I am, who I am.
 
Join Date: Apr 2009
Posts: 532
Gender: Male
Credits: 28,260
Bloodrun
Send a message via Yahoo to Bloodrun
Default RE: Login Failed

Quote:
Originally Posted by rosepose
They're using the login.php because I don't have a sidebar.
PHP Code:
<?php

// **********************************************************************
// Rusnak PHP Adoptables Script
// Copyright 2009 Brandon Rusnak
// For help and support: http://www.rusnakweb.com/forum/
//
// Redistribution prohibited without written permission
// **********************************************************************

// Wake the sleeping giant

// **********************************************************************
// Basic Configuration Info
// **********************************************************************

include("inc/functions.php");
include(
"inc/config.php");
include(
"lang/lang.php");

$themeurl grabanysetting("themeurl");

// **********************************************************************
// Define our top links by calling getlinks()
// **********************************************************************

$links getlinks();

// **********************************************************************
// Define our ads by calling getads()
// **********************************************************************

$ads getads("login");

// **********************************************************************
// Grab any dynamic article content from the content table
// **********************************************************************

$pagecontent getsitecontent("index");
$article_title $pagecontent[title];
$article_content $pagecontent[content];
$article_content nl2br($article_content);

// **********************************************************************
// Grab any settings that we will need for the current page from the DB
// **********************************************************************

$browsertitle grabanysetting("browsertitle");
$sitename grabanysetting("sitename");
$slogan grabanysetting("slogan");

// **********************************************************************
// Check and see if the user is logged in to the site
// **********************************************************************

$loginstatus logincheck();
$isloggedin $loginstatus[loginstatus];
$loggedinname $loginstatus[username];

// **********************************************************************
// End Prepwork - Output the page to the user
// **********************************************************************

if($isloggedin == "yes"){

$article_title $langislog;
$article_content $langislogfull;

}
else{

//User is not logged in, so let's attempt to log them in...

$username $_POST["username"];
$password $_POST["password"];

//Clean it up

$username preg_replace("/[^a-zA-Z0-9\\040.]/"""$username);

$username secure($username);
$password secure($password);

//User is not logged in

$loginform "<form name='form1' method='post' action='login.php'>
  <p>Username: 
    <input name='username' type='text' id='username'>
</p>
  <p>Password: 
    <input name='password' type='password' id='password'>
</p>
  <p>
    <input type='submit' name='Submit' value='Submit'>
  </p>
  <p>Don't have an account?<br>
  <a href='register.php'>Register Free</a>  </p>
  <a href='forgotpass.php'>Forgot your password?  Click Here</a>
</form>"
;



if(
$loggedinname == "" and $password == ""){
// User is viewing login form
$article_title "Member Login:";

$article_content $loginform;
}
else if((
$username != "" and $password == "") or ($username == "" and $password != "") ){

//Something was left blank
$article_title "Login Error:";
$article_content "Something was left blank.  Please try logging in again.<br><br>".$loginform."";

}
else if(
$username != "" and $password != ""){
// Try to log the user in
$password md5($password);

$query "SELECT * FROM ".$prefix."users WHERE username = '$username'";
$result = @mysql_query($query);
$num = @mysql_numrows($result);

//Loop out code
$i=0;
while (
$i 1) {

$luser=@mysql_result($result,$i,"username");
$lpass=@mysql_result($result,$i,"password");

$i++;
}

if(
$username == $luser and $password == $lpass){
$article_title "Login Successful!";
$article_content "Welcome back ".$username.".  You are now logged in.  <a href='account.php'>Click Here to view or edit your account.</a>";


// Set the cookie
$Month 2592000 time();
setcookie("auser",$username,$Month);
setcookie("apass",$password,$Month);

}
else{
$article_title "Login Failed!";
$article_content "Sorry, we could not log you on with the details specified.  You can <a href='login.php'>try again</a> or <a href='forgotpass.php'>request a password reset.</a>";
$fail 1;
}
}




}


// **********************************************************************
// Begin Template Definition
// **********************************************************************

//Define our current theme
$file $themeurl;

// Do the template changes and echo the ready template
$template file_get_contents($file);

$template replace(':ARTICLETITLE:',$article_title,$template);
$template replace(':ARTICLECONTENT:',$article_content,$template);
$template replace(':ARTICLEDATE:',$article_date,$template);

$template replace(':BROWSERTITLE:',$browsertitle,$template);
$template replace(':SITENAME:',$sitename,$template);

//Define our links
$template replace(':LINKSBAR:',$links,$template);

//Get the content for the side bar...

$sidebar "";
$template replace(':SIDEFEED:',$sidebar,$template);

//Get the ad content...
$template replace(':ADS:',$ads,$template);

//Get the slogan info
$template replace(':SLOGAN:',$slogan,$template);


echo 
$template;

// **********************************************************************
// End Template Definition
// **********************************************************************



?>
That's it there. I have edited the database once, to chance the max adoption limit of an adoptable, but I don't think that would change anything...?
Hmm, well there is nothing wrong the page.
But what I have noticed when viewing your site, is that it logs you off (or says you have to be logged in) at random intervuls(wow cant spell today)
When I logged in (it let me log in btw) I went to check things out, went from index, to my account, back to index, and it says I was logged out.

So I logged in again, and I started navigating again, and it did the same.

This is something new.
I really don't know what is wrong with this one =/
Reply With Quote
  #5  
Old 05-27-2009, 06:31 PM
BMR777 BMR777 is offline
Member
 
Join Date: Jan 2011
Posts: 1,122
Gender: Male
Credits: 10,636
BMR777 is on a distinguished road
Default RE: Login Failed

What modifications have you made to the script? Also, do you have multiple copies of the script running on your server? Maybe the cookies are conflicting if that is the case.

Otherwise, are the users using the correct username / password? Can they run the password reset / forgot password feature and then log in?
Reply With Quote
  #6  
Old 05-27-2009, 07:32 PM
rosepose rosepose is offline
Member
 
Join Date: Jan 2009
Posts: 127
Credits: 10,598
rosepose
Default RE: Login Failed

I've installed the forum, and changed the myadopts.php page so that all the adoptables are side-by-side. I do have multiple copies of the script, but the other 2 are beta scripts and there's only one user- me. I also have a copy of the old script running.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Admin failed to login IntoRain Questions and Supports 4 08-02-2013 03:42 PM
I FAILED Cindykt Questions and Supports 2 09-11-2011 09:21 AM
Login Failed Hiddenzbu Questions and Supports 2 05-23-2009 12:52 PM
Failed Login Tequila Questions and Supports 4 04-11-2009 11:20 AM
Failed Login..? Quillink Questions and Supports 3 03-19-2009 06:48 PM


All times are GMT -5. The time now is 09:45 PM.

Currently Active Users: 201 (0 members and 201 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636