PHP guys?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • brizzad
    holla
    • Jul 2003
    • 11769

    #1

    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
    holla
    • Jul 2003
    • 11769

    #2
    bump5678

    Comment

    • Apache_A
      Confirmed User
      • May 2004
      • 434

      #3
      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
      ICQ:2116226

      Comment

      • mortenb
        Confirmed User
        • Jul 2004
        • 2203

        #4
        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

        Comment

        • CaptainHowdy
          Too lazy to set a custom title
          • Dec 2004
          • 94733

          #5
          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...

          Comment

          • CyberHustler
            Masterbaiter
            • Feb 2006
            • 28736

            #6
            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
            “If you can convince the lowest white man he’s better than the best colored man, he won’t notice you’re picking his pocket. Hell, give him somebody to look down on, and he’ll empty his pockets for you.”

            Comment

            • mortenb
              Confirmed User
              • Jul 2004
              • 2203

              #7
              was I right?

              Comment

              • AdultEUhost
                ORLY?
                • Oct 2005
                • 2579

                #8
                open php.ini, searh for register_globals and change Off into On and you are all set
                ICQ: 267-443-722 / leon [at] adulteuhost [dotcom]

                Nominated for an XBIZ Award as "Webhost of the Year" in 2007, 2012, 2013 and 2014

                Comment

                • brizzad
                  holla
                  • Jul 2003
                  • 11769

                  #9
                  Originally posted by mortenb
                  prolly just register globals.. older versions of PHP had register globals on as standard.. newer versions don't.
                  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.

                  Comment

                  • citizen tower
                    Confirmed User
                    • Apr 2005
                    • 238

                    #10
                    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
                    .NET Windows and Web Applications Developer
                    ICQ: 484-388-695

                    Comment

                    • jrap
                      Confirmed User
                      • Feb 2005
                      • 448

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

                      Comment

                      • micker
                        Confirmed User
                        • Nov 2005
                        • 748

                        #12
                        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?

                        Comment

                        • nofx
                          Too lazy to set a custom title
                          • Nov 2002
                          • 16826

                          #13
                          brizzad is a jew

                          Often times I wonder why
                          There's love and hate, theres live or die.
                          When sickness comes I must decide:
                          When feelings go, theres suicide.

                          Comment

                          • ddfGandalf
                            Confirmed User
                            • Feb 2005
                            • 534

                            #14
                            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

                            Comment

                            • pornpf69
                              Too lazy to set a custom title
                              • Jun 2004
                              • 15782

                              #15
                              what script are you using?

                              Comment

                              • ddfGandalf
                                Confirmed User
                                • Feb 2005
                                • 534

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

                                Comment

                                Working...