$GLOBALS array

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Michael Wild

    $GLOBALS array

    Hi all

    I'm not quite new to PHP, but also not very proficient in its use, so
    please excuse me if my question is a FAQ. Perhaps I didn't know the right
    terms, but google wasn't my friend this time :-)


    I had a page running on a host which worked perfectly fine. Then, one day,
    it stopped working since strangly some values in the $GLOBALS array are
    not set. For example things such as $GLOBALS["_GET"], $GLOBALS["_POST"],
    $GLOBALS["_ENV"] and $GLOBALS["_SERVER"] are just set to NULL. It would be
    fine with me, if they were just empty arrays (as they are on my
    test-system on the laptop), but I would really hate to hack into vBulletin
    to get it to run again.

    My suspicion is that the hosting company changed their php.ini, but they
    have a lousy service, haven't gotten any answer from them for months
    now. So I don't expect them to help me here either.

    Thanks for any help


    Michael
  • whiskey

    #2
    Re: $GLOBALS array

    Do a print_r($LOBALS ), maybe you misspelled the keys.

    Comment

    • Erwin Moller

      #3
      Re: $GLOBALS array

      whiskey wrote:
      Do a print_r($LOBALS ), maybe you misspelled the keys.
      And you mispelled GLOBALS.
      ;-)

      But besides the typo: good advise.

      Regards,
      Erwin Moller

      Comment

      • Michael Wild

        #4
        Re: $GLOBALS array

        On Fri, 03 Nov 2006 15:35:33 +0100, Erwin Moller wrote:
        whiskey wrote:
        >
        >Do a print_r($LOBALS ), maybe you misspelled the keys.
        >
        And you mispelled GLOBALS.
        ;-)
        >
        But besides the typo: good advise.
        >
        Regards,
        Erwin Moller

        :-)

        I already did, and it looks like:

        Array (<stuff left out[_GET] =[_POST] =)

        On my laptop it looks like:

        Array (<stuff left out[_GET] =array() [_POST] =array() )


        So there definitely is a difference.


        Michael

        Comment

        • Erwin Moller

          #5
          Re: $GLOBALS array

          Michael Wild wrote:
          On Fri, 03 Nov 2006 15:35:33 +0100, Erwin Moller wrote:
          >
          >whiskey wrote:
          >>
          >>Do a print_r($LOBALS ), maybe you misspelled the keys.
          >>
          >And you mispelled GLOBALS.
          >;-)
          >>
          >But besides the typo: good advise.
          >>
          >Regards,
          >Erwin Moller
          >
          >
          :-)
          >
          I already did, and it looks like:
          >
          Array (<stuff left out[_GET] =[_POST] =)
          >
          On my laptop it looks like:
          >
          Array (<stuff left out[_GET] =array() [_POST] =array() )
          >
          >
          So there definitely is a difference.
          >
          >
          Michael
          Hi,

          To make the print_r() more readable, use <pre>

          <pre>
          <?php print_r($GLOBAL S); ?>
          </pre>

          But more usefull maybe in your situation:

          <pre>
          <?php print_r($_POST) ; ?>
          </pre>

          and

          <pre>
          <?php print_r($_GET); ?>
          </pre>

          Regards,
          Erwin

          Comment

          • Michael Wild

            #6
            Re: $GLOBALS array

            Erwin Moller wrote:
            Michael Wild wrote:
            >
            >On Fri, 03 Nov 2006 15:35:33 +0100, Erwin Moller wrote:
            >>
            >>whiskey wrote:
            >>>
            >>>Do a print_r($LOBALS ), maybe you misspelled the keys.
            >>And you mispelled GLOBALS.
            >>;-)
            >>>
            >>But besides the typo: good advise.
            >>>
            >>Regards,
            >>Erwin Moller
            >>
            >:-)
            >>
            >I already did, and it looks like:
            >>
            >Array (<stuff left out[_GET] =[_POST] =)
            >>
            >On my laptop it looks like:
            >>
            >Array (<stuff left out[_GET] =array() [_POST] =array() )
            >>
            >>
            >So there definitely is a difference.
            >>
            >>
            >Michael
            >
            Hi,
            >
            To make the print_r() more readable, use <pre>
            >
            <pre>
            <?php print_r($GLOBAL S); ?>
            </pre>
            >
            But more usefull maybe in your situation:
            >
            <pre>
            <?php print_r($_POST) ; ?>
            </pre>
            >
            and
            >
            <pre>
            <?php print_r($_GET); ?>
            </pre>
            >
            Regards,
            Erwin

            well, they are just not set... a test for $_GET==NULL or $_POST==NULL
            returns true.

            thanks for the formatting tip!

            michael

            Comment

            • Erwin Moller

              #7
              Re: $GLOBALS array

              Michael Wild wrote:
              Erwin Moller wrote:
              >Michael Wild wrote:
              >>
              >>On Fri, 03 Nov 2006 15:35:33 +0100, Erwin Moller wrote:
              >>>
              >>>whiskey wrote:
              >>>>
              >>>>Do a print_r($LOBALS ), maybe you misspelled the keys.
              >>>And you mispelled GLOBALS.
              >>>;-)
              >>>>
              >>>But besides the typo: good advise.
              >>>>
              >>>Regards,
              >>>Erwin Moller
              >>>
              >>:-)
              >>>
              >>I already did, and it looks like:
              >>>
              >>Array (<stuff left out[_GET] =[_POST] =)
              >>>
              >>On my laptop it looks like:
              >>>
              >>Array (<stuff left out[_GET] =array() [_POST] =array() )
              >>>
              >>>
              >>So there definitely is a difference.
              >>>
              >>>
              >>Michael
              >>
              >Hi,
              >>
              >To make the print_r() more readable, use <pre>
              >>
              ><pre>
              ><?php print_r($GLOBAL S); ?>
              ></pre>
              >>
              >But more usefull maybe in your situation:
              >>
              ><pre>
              ><?php print_r($_POST) ; ?>
              ></pre>
              >>
              >and
              >>
              ><pre>
              ><?php print_r($_GET); ?>
              ></pre>
              >>
              >Regards,
              >Erwin
              >
              >
              well, they are just not set... a test for $_GET==NULL or $_POST==NULL
              returns true.
              >
              thanks for the formatting tip!
              >
              michael
              Glad I could help with the formatting.
              But sorry, I have no clue why $_GET and $_POST are NULL.
              I never saw that before.
              Contact your (lazy) ISP and kick his/her lazy ass.
              If you pay for their service they should help you with such enormous
              problems ($_GET and $_POST are completely accepted and used everywhere, I
              couldn't make an app without them).

              Good luck. :-/

              Regards,
              Erwin Moller


              Comment

              • Michael Wild

                #8
                Re: $GLOBALS array

                On Mon, 06 Nov 2006 10:00:08 +0100, Erwin Moller wrote:

                Glad I could help with the formatting.
                But sorry, I have no clue why $_GET and $_POST are NULL.
                I never saw that before.
                Contact your (lazy) ISP and kick his/her lazy ass.
                If you pay for their service they should help you with such enormous
                problems ($_GET and $_POST are completely accepted and used everywhere, I
                couldn't make an app without them).
                >
                Good luck. :-/
                >
                Regards,
                Erwin Moller
                that's where the problems start, our club virtually pays nothing. it's
                like "i know somebody who's married to someone else who does some
                hosting"... not the way i would have chosen, but i'm stuck with it...

                so you don't know of any directive which could cause such a thing to
                happen?

                thanks for the help anyways!

                michael

                Comment

                • Erwin Moller

                  #9
                  Re: $GLOBALS array

                  Michael Wild wrote:
                  On Mon, 06 Nov 2006 10:00:08 +0100, Erwin Moller wrote:
                  >
                  >
                  >Glad I could help with the formatting.
                  >But sorry, I have no clue why $_GET and $_POST are NULL.
                  >I never saw that before.
                  >Contact your (lazy) ISP and kick his/her lazy ass.
                  >If you pay for their service they should help you with such enormous
                  >problems ($_GET and $_POST are completely accepted and used everywhere, I
                  >couldn't make an app without them).
                  >>
                  >Good luck. :-/
                  >>
                  >Regards,
                  >Erwin Moller
                  >
                  that's where the problems start, our club virtually pays nothing. it's
                  like "i know somebody who's married to someone else who does some
                  hosting"... not the way i would have chosen, but i'm stuck with it...
                  >
                  Yes, that is the problem with free services: You cannot treaten to walk
                  away. :-/
                  so you don't know of any directive which could cause such a thing to
                  happen?
                  No sorry.
                  I am one of those spoiled guys with their own server, so it is my php.ini,
                  and I only changed stuff I understood.

                  Maybe you can repost your question, rephrasing your problem and what you
                  tried, the settings that may be of importance, maybe a dump of your php.ini
                  file.
                  That helps sometimes.
                  Some (many) visitors only look at recent post (last few days) and they
                  mayhap missed this thread.

                  Good luck.

                  Regards,
                  Erwin Moller
                  >
                  thanks for the help anyways!
                  >
                  michael

                  Comment

                  Working...