GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   PHP guys? (https://gfy.com/showthread.php?t=582900)

brizzad 03-04-2006 04:27 PM

PHP guys?
 
Alright.. I'm sure you guys have all seen scripts where all navigation is controlled through index.php

ex:
index.php?mode=register would get the person of to register.php

Well, I'm trying to get a script installed, everything seems to be working fine.. except.. none of the links work. All of the navigational links work through index.php like mentioned above, but every single one just brings me back to the index.php main homepage.

any suggestions?

brizzad 03-04-2006 04:38 PM

bump5678

Apache_A 03-04-2006 04:42 PM

I wouldn't be suprised if it was a sessions issue. but I couldn't really be able to tell without knowing or seeing the script

mortenb 03-04-2006 04:43 PM

prolly just register globals.. older versions of PHP had register globals on as standard.. newer versions don't.

which means:
when the script is trying the get the "mode" variable it is probably just calling $mode, when it should be calling $_GET["mode"] - which in turn means that it gets an empty $mode variable and just defaults to the main page

CaptainHowdy 03-04-2006 06:28 PM

Quote:

Originally Posted by mortenb
prolly just register globals.. older versions of PHP had register globals on as standard.. newer versions don't.

which means:
when the script is trying the get the "mode" variable it is probably just calling $mode, when it should be calling $_GET["mode"] - which in turn means that it gets an empty $mode variable and just defaults to the main page

You rocked that shit, man...

CyberHustler 03-04-2006 06:37 PM

Quote:

Originally Posted by mortenb
prolly just register globals.. older versions of PHP had register globals on as standard.. newer versions don't.

which means:
when the script is trying the get the "mode" variable it is probably just calling $mode, when it should be calling $_GET["mode"] - which in turn means that it gets an empty $mode variable and just defaults to the main page


WOA.. I NEED SOME PHP CLASSES AND SHIT

mortenb 03-04-2006 06:37 PM

was I right?

AdultEUhost 03-04-2006 07:01 PM

open php.ini, searh for register_globals and change Off into On and you are all set

brizzad 03-05-2006 04:21 PM

Quote:

Originally Posted by mortenb
prolly just register globals.. older versions of PHP had register globals on as standard.. newer versions don't.

Quote:

Originally Posted by AdultEUhost
open php.ini, searh for register_globals and change Off into On and you are all set


Sorry it took so long to reply (I know at least 1 of you guys were wondering). I just checked my phpinfo and I did see this..
register_globals Off Off
This particular server is a VPS, and I've got no idea hot to SSH or get into php.ini, so I emailed me host and asked them to change it for me. I'll post back if that fixed it.

citizen tower 03-05-2006 05:02 PM

Quote:

Originally Posted by AdultEUhost
open php.ini, searh for register_globals and change Off into On and you are all set

opens the potential exploit, however

jrap 03-05-2006 05:17 PM

I would suggest keeping register_globals off, and edit the script.

micker 03-05-2006 07:40 PM

Quote:

Originally Posted by AdultEUhost
open php.ini, searh for register_globals and change Off into On and you are all set

are you trying to get the poor guy hacked or something?

nofx 03-05-2006 08:10 PM

brizzad is a jew

ddfGandalf 03-05-2006 08:18 PM

well...

I might be wrong, or didnt understand your problem, btut:

index.php?mode=register

that assumes that you'll handle that GET variable inside the php.
So....

if($_GET['mode'] hahahaha "register") {
header("location: youraddress/register.php
}

or if($_GET['mode']) {

[from here you can go either by testing every condition by if, or case)

if($_GET['mode'] hahahaha "register") header() // see above

or
$whatever = $_GET['mode'];

switch($whatever) {

case "register":
header()../see above
break;
case "whatever"...


and so on...

hope that helped a bit

pornpf69 03-05-2006 08:19 PM

what script are you using?

ddfGandalf 03-05-2006 08:19 PM

hahaha is = =, and change header("location: youraddress/register.php to header("location: youraddress/register.php");


All times are GMT -7. The time now is 03:23 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123