Go Back   Dynamic Drive Forums > General Coding > PHP
Search Dynamic Drive Forums:

Reply
 
Thread Tools Search this Thread
  #1  
Old 06-28-2006, 06:31 PM
jad9321 jad9321 is offline
Regular Coders
 
Join Date: Jun 2006
Posts: 148
Thanks: 0
Thanked 0 Times in 0 Posts
Angry Problem With This Script. [URGENT ATTENTION!!!]

Ok,
I have an online radio station and I just downloaded a request line 3.2 script for it from http://googleit.pspsite.be/index.php. I installed the script, Chmodded the config.php file, I did everything it said to do. When I try to login it Says click here to refresh and enter the control panel. I click there and it brings me back to the login screen. But when I am on another computer it lets me log in fine. I think that it wont create a cookie and thats the problem. I'm not sure but can the problem be that I am on a wireless connection? And the other computers are not? And my browser is allowing cookies from other sites, Just not that script. I tried both browsers IE and Mozilla Fire Fox. Neither worked on my computer. Please help I REALLY NEED THIS TO WORK! I even tried reinstalling my browser!!! Maby someone could Download it and rewrite the cookie so it will work on my computer???


Thanks in advance,
Joe
__________________
Cheap Webhosting At ONE TIME fees! Also offering Scripts, Software, Web Designs, and Graphic Designs. Outstanding Designs and Webhosting!
Reply With Quote
  #2  
Old 06-29-2006, 07:55 AM
djr33's Avatar
djr33 djr33 is offline
Global Moderator
 
Join Date: Mar 2006
Location: N. California, USA
Posts: 6,408
Thanks: 11
Thanked 82 Times in 82 Posts
Default

Some cookies are allowed through while others are not, depending on your security settings. If at the lowest, all cookies are let though. If at the highest, none are. If between, some are, some aren't.
Lower your security and see if that works.

Aside from that, there may just be an error in the script. However, since it usually works, just not on your computer, it is almost surely something with your settings.

Or, perhaps, your host has weird settings... but, then again, it still is likely your computer as it works on others.
__________________
Daniel - <?php?> | <html>| Ich lerne Deutsch. | Studio l'italiano. | Estudiaba español. | Estudo português. | 日本語の勉強。| मैं हिन्दी सीखो | درس العربية
Reply With Quote
  #3  
Old 06-29-2006, 10:33 PM
jad9321 jad9321 is offline
Regular Coders
 
Join Date: Jun 2006
Posts: 148
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I tried it with Allowing ALL cookies, Still not working, Nothing works! I tried reinstalling the script.This is REALLY getting on my nerves! djr33 Please go on AOL.
__________________
Cheap Webhosting At ONE TIME fees! Also offering Scripts, Software, Web Designs, and Graphic Designs. Outstanding Designs and Webhosting!
Reply With Quote
  #4  
Old 06-29-2006, 10:45 PM
djr33's Avatar
djr33 djr33 is offline
Global Moderator
 
Join Date: Mar 2006
Location: N. California, USA
Posts: 6,408
Thanks: 11
Thanked 82 Times in 82 Posts
Default

Why don't you just cut/paste the source for the cookie part here.
__________________
Daniel - <?php?> | <html>| Ich lerne Deutsch. | Studio l'italiano. | Estudiaba español. | Estudo português. | 日本語の勉強。| मैं हिन्दी सीखो | درس العربية
Reply With Quote
  #5  
Old 06-29-2006, 10:50 PM
jad9321 jad9321 is offline
Regular Coders
 
Join Date: Jun 2006
Posts: 148
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Not really sure where it is in the script.... But I'll try to find it.
__________________
Cheap Webhosting At ONE TIME fees! Also offering Scripts, Software, Web Designs, and Graphic Designs. Outstanding Designs and Webhosting!
Reply With Quote
  #6  
Old 06-29-2006, 10:53 PM
jad9321 jad9321 is offline
Regular Coders
 
Join Date: Jun 2006
Posts: 148
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok. I really dont know where it is. I do know its in the login.php file so I will paste the whole code from that page.


Code:
<?
require('config.php');
require('bar.php');

if($userData[user] !="" && $userData[pass] !=""){
  if($userData[rank] =="0"){
    Echo"<b>Error:</b> You no longer are employed at $shortDomain - If you are
    caught DJing after now, you will be banned from our website, and reported
    to our partner websites. Your career of DJing on Habbo Fansites will
    be destroyed. You are welcome to get more experience, and apply next time
    applications open.


    <hr width='100%' height='1' color='#000000' shade='no'>
    <u>Message from Administration:</u><br>
    $userData[msg]";
    exit;
  }
  
  Echo"You are already logged in. Please use the staff login bar at the top
  of this page to navigate.<br>";
  exit;
}

switch($_GET['act']){
default:
  Echo"<center><b>Staff Login</b></center>
  This is the $websiteName Staff Login. Only DJ's and Administrators have an
  account, please do not try and brute force into a staff members account.
  If you forgot your password, please use the
  <a href='contact.php'>contact forms</a>.
  
  <hr width='100%' height='1' color='#000000' shade='no'>
  
  <form method='post' action='login.php?act=submit'>
  <table>
  <tr>
    <td>Username:</td>
    <td><input type='text' name='user' size='20'></td>
  </tr>
  <tr>
    <td>Password:</td>
    <td><input type='password' name='pass' size='20'></td>
  </tr>
  <tr>
    <td></td>
    <td><input type='submit' value='Login'></td>
  </tr>
  </table>
  </form>";
break;

case"submit":
  $user = $_POST['user']; $pass = $_POST['pass'];
  $pass = md5($pass);
  
  // Validity
  $validityQuery = mysql_query("SELECT * FROM users WHERE user ='$user' AND pass ='$pass'");
  if(mysql_num_rows($validityQuery) =="0"){
    Echo"<b>Error:</b> Invalid Username/Password Combination<br>
    If you have been hired, and you typed in your information corrently,
    DO NOT WORRY! This simply means your account wasn't completely created.
    Please use our <a href='contact.php'>contact</a> form. Tell us your desired
    username and password and we will check it against Application Logs. Before
    you do that, please try again and type your password in more carefully.
    Your username is your Habbo Hotel name. <br><br>
    - <a href='login.php'>Back</a>";
    exit;
  }
  $validityData = mysql_fetch_array($validityQuery);
  
  $_SESSION["user"] = $validityData[user];
  $_SESSION["pass"] = $validityData[pass];
  
  Echo"<b>You are now logged in, click <a href='login.php'>here</a> to refresh.
  (Allows Staff Bar to Load)";
break;

}
?>
Big Code. :\
__________________
Cheap Webhosting At ONE TIME fees! Also offering Scripts, Software, Web Designs, and Graphic Designs. Outstanding Designs and Webhosting!
Reply With Quote
  #7  
Old 06-30-2006, 12:48 AM
djr33's Avatar
djr33 djr33 is offline
Global Moderator
 
Join Date: Mar 2006
Location: N. California, USA
Posts: 6,408
Thanks: 11
Thanked 82 Times in 82 Posts
Default

The database connection works out ok? That could be an issue.


There's nothing to do with cookies in the entire thing.

The only thing related is the use of sessions:
Code:
  $_SESSION["user"] = $validityData[user];
  $_SESSION["pass"] = $validityData[pass];
So... not sure what those are doing. I guess that the array validityData is being assigned those values from the mysql query.

I'm still a bit confused here. Sessions should work on every browser, practically.

Can you install firefox instead? (of use IE if you're using FF now?)


I guess you should post bar.php and config.php as well, but remove all passwords (though you should be POSITIVE they are correct, or it will waste a bunch of time )
__________________
Daniel - <?php?> | <html>| Ich lerne Deutsch. | Studio l'italiano. | Estudiaba español. | Estudo português. | 日本語の勉強。| मैं हिन्दी सीखो | درس العربية
Reply With Quote
  #8  
Old 06-30-2006, 12:58 AM
Twey's Avatar
Twey Twey is offline
Modtoreador
 
Join Date: Jun 2005
Location: 英国
Posts: 11,933
Thanks: 1
Thanked 180 Times in 172 Posts
Blog Entries: 2
Default

A link to a demo page would be very handy.
__________________
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Reply With Quote
  #9  
Old 06-30-2006, 02:21 AM
jad9321 jad9321 is offline
Regular Coders
 
Join Date: Jun 2006
Posts: 148
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok.

config.php:
Code:
<?PHP

session_start();

// Install Variable
$installed ="Y"; // Y/N

// Connect
mysql_connect ("", "", "");
mysql_select_db ("");

// Domain Vars
$shortDomain = "";
$wwwDomain = "smileyoureahabbo.freepgs.com";
$longDomain = "http://smileyoureahabbo.freepgs.com";
$websiteName = "smileyoureahabbo.net.tf";
$adminEmail = "smileyoureahabbo.net.tf";

// Radio Vars
$scdef = "";
$scip = "";
$scport = "";
$scpass = "";

// Allow Important.php
$check = "10245";

require('important.php');

?>


bar.php:

Code:
<?
require('config.php');

if($userData[user] =="" || $userData[pass] ==""){
  Echo"Username: Not Logged In - Click <a href='login.php'>here</a> to login.
  <hr width='100%' height='1' color='#000000' shade='no'>";
}else{
  if($userData[rank] =="0"){
    $linksVar ="You are no longer staff at $websiteName, Sorry.";
  }else{
    $linksVar ="| <a href='requests.php'>Request Line</a> |
                <a href='info.php'>Radio Info</a> |
                <a href='rules.php'>DJ Rules</a> |
                <a href='cps.php'>Control Panels</a> |
                <a href='message.php'>DJ Says</a> |";
  }
  
  Echo"User: $userData[user] $linksVar
  <hr width='100%' height='1' color='#000000' shade='no'>";
}

?>

Demo:

http://smileyoureahabbo.freepgs.com/Djjoe/login.php
__________________
Cheap Webhosting At ONE TIME fees! Also offering Scripts, Software, Web Designs, and Graphic Designs. Outstanding Designs and Webhosting!
Reply With Quote
  #10  
Old 06-30-2006, 02:24 AM
Twey's Avatar
Twey Twey is offline
Modtoreador
 
Join Date: Jun 2005
Location: 英国
Posts: 11,933
Thanks: 1
Thanked 180 Times in 172 Posts
Blog Entries: 2
Default

Yes, an account will be necessary too.
Rank 0 will be fine, just so long as it logs in.
__________________
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


All times are GMT. The time now is 11:02 PM.

Home - Contact Us - Archives - Link to DD - Top 

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.