View Full Version : Problem With This Script. [URGENT ATTENTION!!!]
jad9321
06-28-2006, 05:31 PM
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
djr33
06-29-2006, 06:55 AM
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.
jad9321
06-29-2006, 09:33 PM
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.
djr33
06-29-2006, 09:45 PM
Why don't you just cut/paste the source for the cookie part here.
jad9321
06-29-2006, 09:50 PM
Not really sure where it is in the script.... But I'll try to find it.
jad9321
06-29-2006, 09:53 PM
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.
<?
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. :\
djr33
06-29-2006, 11:48 PM
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:
$_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 :p)
A link to a demo page would be very handy.
jad9321
06-30-2006, 01:21 AM
Ok.
config.php:
<?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:
<?
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
Yes, an account will be necessary too. :)
Rank 0 will be fine, just so long as it logs in.
jad9321
06-30-2006, 01:28 AM
I cant create an account unless I can sign in... PROBLEM... Yeah. I would let you in mine but my password is used for to many of my accounts on other things. Twey do you have AIM, MSN, Or yahoo?
Just insert a row manually into your database:
insert into tablename (user, pass) values ('Twey', MD5('password'));
jad9321
06-30-2006, 02:13 AM
The passwords in the database is hash... So I dont know what to put.
djr33
06-30-2006, 03:18 AM
md5 IS hash... that's what MD5('password') will do.
Twey, that works in mysql too? Thought that was only a php thing. (at least as a default function). cool.
MySQL provides several functions for the purposes of hashing data: MD5(), SHA1(), PASSWORD(), and OLD_PASSWORD(). It also provides true AES and DES encryption functions (AES_ENCRYPT(), AES_DECRYPT(), DES_ENCRYPT(), DES_DECRYPT()), as well as a function called simply ENCODE(), algorithm unknown.
jad9321
06-30-2006, 04:46 PM
Ok. I created that account.
Username: Twey
Password: Password
At Rank 0
djr33
06-30-2006, 07:05 PM
as well as a function called simply ENCODE(), algorithm unknown.Not sure why I find that to be funny. Hehe.
jad9321
06-30-2006, 08:12 PM
Come on guys... You Please help me with this script???
djr33
06-30-2006, 09:02 PM
We will. Have patience. I'm not doing anything because I think Twey will fix it easily now that he can log in. He's clearly busy and not around at the moment, but he'll surely stop by soon.
jad9321
06-30-2006, 09:04 PM
OK, Its just We can't use the radio until we get the request line up. And the radio server is a waste of money if I can't use it.
djr33
06-30-2006, 09:04 PM
Isn't the only issue your computer? Can you not use another for the day or something?
jad9321
06-30-2006, 09:38 PM
I don't have another computer... In the house.
djr33
06-30-2006, 09:39 PM
Library, heh.
jad9321
06-30-2006, 09:48 PM
If I had a ride...
djr33
06-30-2006, 10:01 PM
I'm looking at the source after seeing the page load, and just noticed another page, important.php. Post the source for that too.
At the moment... this is what I see:
You log in, sending POST data... user/pass.
It checks that, then logs you in.
Then saves SESSION variables of user/pass.
However, it never does CHECK for those session vars when you return, so that is why you aren't still logged in. It works fine, but there is no check. That's the weird thing.
Echo"<b>You are now logged in, click <a href='login.php'>here</a> to refresh.This page links to login.php, which does only two things: if you haven't tried to log in, gives you the form. If you have, says whether it worked or not. there is nothing more going on on the page.
There is a switch structure... but it just has a default (show the form) and one if the action is to submit, but nothing for using the page aside from that.
Perhaps it should link to a new page rather than refreshing?
jad9321
07-01-2006, 01:24 AM
Na, It works fine on other computers. So it really dosent matter if it links to another page.... ahh... Just remembered that I did try to have it link to bar.php (didnt work) :\ I really wish this would work.
jad9321
07-01-2006, 10:23 PM
:\ I Really need this fixed. :\ Guys Pleeeeaaaaaasssseeee help.
The cookie is sent, but the data is apparently not stored in the session.
jad9321
07-02-2006, 01:07 AM
Ok, Is there any way to fix it? :\
What we really need to do is figure out what your setup and my setup have in common, and then what those machines on which it didn't work have different.
What browser(s) and OS(es) were you and the working machines running?
jad9321
07-02-2006, 04:25 PM
Well twey, If you have AOL, MSN, Or Yahoo messenger we can find that stuff out. Do you have it? If so just IM me at
AOL- DJJOEYD93
MSN- jad9321@hotmail.com
Yahoo- smileyoureahabbo
Ok.
I can tell you this now...
I have windows 2000
I tried it on Mozilla Fire Fox and IE
jad9321
07-02-2006, 06:58 PM
:/ :/ :/ :[
Twey what info about my computer do you need???
Isn't IRC good enough for anyone these days? Blimey. :p
That's quite enough info about your computer. Now, what about these computers on which it worked?
jad9321
07-02-2006, 09:04 PM
-thinks- Not really sure. Did it work for you?
No. That's why I need to find out what your computer and my computer have in common that those computers don't. :)
djr33
07-02-2006, 10:14 PM
Didn't work on my mac either.
So... figure out what ones worked, and maybe that will explain everything.
jad9321
07-03-2006, 12:23 AM
Ok. It worked on a Windows 2000 And Windows XP with Firefox, Opera, IE, and Netscape... So... The person who wrote the script said its probubly browser settings. :\ So... Whatadya thinkkk?
jad9321
07-03-2006, 01:36 AM
:/ I can't wait till this is fixed...
I doubt it's a problem with browser settings. It's now been tested on a wide range of platforms and browsers (djr33, I presume you tried Safari?), and found to be broken on all of them. Additionally, the session is started perfectly, but no data is saved. Saving data to a session, once it has been established, is an entirely server-side process. Have you changed the script at all since it worked?
jad9321
07-03-2006, 02:42 AM
It has never worked on my computer. And no, I havent changed the script...
:\ I have a fealing that this will never work :\
:(
djr33
07-03-2006, 07:24 AM
Yes, it was Safari.
Did it work from your server? Perhaps it worked when running off another server, but it won't work from yours.
I don't get it.
jad9321
07-03-2006, 02:00 PM
I guess i'll try it on another server...
I'll let you guys know if it worked...
jad9321
07-03-2006, 03:31 PM
I accually cant try it on another... Can anyone else try it on their server???
Its the v3.2 of the request line at http://googleit.pspsite.be/index.php
djr33
07-03-2006, 07:45 PM
Did it work from your server?
When it worked, was it running from YOUR server?
jad9321
07-03-2006, 09:16 PM
Yes...
jad9321
07-03-2006, 09:41 PM
I just tried it on another server.... Still didn't work on 2 computers...
:\ if this isnt going to work, can someone make a script like this???
jad9321
07-04-2006, 01:30 AM
:[ This is really not gona work... Just don't get it.
jad9321
07-04-2006, 07:04 PM
:/
I realllllllllllllllllllllllllly need this to work.
Strangeplant
07-05-2006, 06:58 PM
I'm almost afraid to post because I may be wrong to suggest this, but I couldn't hold session data unless I had
session_start();on both the main page and the include file. You have it only in the include file.:rolleyes:
I'm not clear on whether this program ever worked on your computer, and if there are other computers in your office that have ever used this program working.
There are all sorts of peculiar reported problems with $_SESSION[]. See http://us3.php.net/function.session-start just to make sure.:cool:
Just trying to help a little and learn a lot.
I'm a bit confused as to where $userData is actually set.
Strangeplant: It doesn't matter where it is, so long as it's before $_SESSION is used (and no page data has been sent).
Strangeplant
07-05-2006, 07:50 PM
login.php requires config.php and bar.php
config.php requires important.php
(if initialized correctly - config.php is written by install.php)
and the $userData comes from this in important.php:
<?
if($check !="10245"){
die();
}
// Sessions
$Username = "$one";
$Password = "$two";
// Misc Vars
$dateVar = date("m/d/y");
$IP_Address = $_SERVER['REMOTE_ADDR'];
// User Data
if($Username !="" && $Password !=""){
$userQuery = mysql_query("SELECT * FROM users WHERE user ='$Username' AND pass ='$Password'");
$userData = mysql_fetch_array($userQuery);
}
// Stylesheet
Echo"
<head>
<LINK REL='stylesheet' HREF='style.css' TYPE='text/css'>
</head>";
?>I think this was written for an earlier version of php.
jad9321
07-05-2006, 07:56 PM
That could be it...
Idk... This is REALLY PISSING ME OFF!
jad9321
07-05-2006, 08:36 PM
I like REALLY NEED THIS Script to work... I REALLLLY NEED A REQUEST LINE!
:(
jad9321
07-06-2006, 12:39 AM
Sooo? >.<
jad9321
07-06-2006, 03:35 PM
:-[ :-[
jad9321
07-06-2006, 06:13 PM
I Don't Know if this will help but I think I have all my php info on this page... http://smileyoureahabbo.freepgs.com/test.php
Thanks.
jad9321
07-06-2006, 09:19 PM
There are no replys... I guess you guys dont want to help me
:[
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.