+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 16

Thread: Register_globals work around??

  1. #1
    Client
    Join Date
    Oct 2003
    Posts
    18
    Squirrelcart version
    not specified!

    Register_globals work around??

    Hello again, The ISP that I'm using now has Register_globals turn OFF and I requested for them to be turned on. They can't but he send me the following code. Will this work? If so where do I put in in the code. Is there a better work around?

    ----------------------
    Mike,

    Register_globals is turned off for security reasons and cannot be
    enabled. However, for scripts that need register_globals on, you can
    add the following lines of code to emulate that functionality:

    ### register_globals = off ### +++
    //HTTP_GET_VARS
    while (list($key, $val) = @each($HTTP_GET_VARS)) {
    $GLOBALS[$key] = $val;
    }
    //HTTP_POST_VARS
    while (list($key, $val) = @each($HTTP_POST_VARS)) {
    $GLOBALS[$key] = $val;
    }
    //HTTP_POST_FILES
    while (list($key, $val) = @each($HTTP_POST_FILES)) {
    $GLOBALS[$key] = $val;
    }
    //$HTTP_SESSION_VARS
    while (list($key, $val) = @each($HTTP_SESSION_VARS)) {
    $GLOBALS[$key] = $val;
    }
    ### register_globals = off ### ---

    -------

    Thanks for your help again....

    Mike

  2. #2
    Squirrelcart Staff Jamie's Avatar
    Join Date
    May 2002
    Posts
    6,719
    Squirrelcart version
    v3.3.7
    Hi Mike,

    If you add that to the top of your cart page (store.php by default) it should work.

    Just make sure you surround it with PHP tags:
    <?
    your code here
    ?>

    Thanks,
    Jamie

  3. #3
    Client
    Join Date
    Oct 2003
    Posts
    18
    Squirrelcart version
    not specified!

    Code...

    I tried it.

    <?
    ### register_globals = off ### +++
    //HTTP_GET_VARS
    while (list($key, $val) = @each($HTTP_GET_VARS)) {
    $GLOBALS[$key] = $val;
    }
    //HTTP_POST_VARS
    while (list($key, $val) = @each($HTTP_POST_VARS)) {
    $GLOBALS[$key] = $val;
    }
    //HTTP_POST_FILES
    while (list($key, $val) = @each($HTTP_POST_FILES)) {
    $GLOBALS[$key] = $val;
    }
    //$HTTP_SESSION_VARS
    while (list($key, $val) = @each($HTTP_SESSION_VARS)) {
    $GLOBALS[$key] = $val;
    }
    ### register_globals = off ### ---
    ?>

    added this to the top of store.php and it didn't seem to work. I don't recieve an errors, just a blank page.

    Did I insert the code correctly?

    Here's the phpinfo link. http://dartoidsworldcom.web0210.upli...rt/phpinfo.php

    Mike

    Quote Originally Posted by Jamie
    Hi Mike,

    If you add that to the top of your cart page (store.php by default) it should work.

    Just make sure you surround it with PHP tags:
    <?
    your code here
    ?>

    Thanks,
    Jamie

  4. #4
    Squirrelcart Staff Jamie's Avatar
    Join Date
    May 2002
    Posts
    6,719
    Squirrelcart version
    v3.3.7
    Hi,

    The code looks fine. If the error reporting on the server is configured a certain way, and you get a fatal error, PHP won't output anything to the browser. It is tough to say what the problem is. I would double check your connection info for your database, as a problem with that could definitely cause that.

    If you can't get by it, please open a helpdesk ticket, and we'll check it out for you.

    Thanks,
    Jamie

  5. #5
    Client
    Join Date
    Oct 2003
    Posts
    18
    Squirrelcart version
    not specified!

    ticket

    FYI: I opened a ticket.

    Quote Originally Posted by Jamie
    Hi,

    The code looks fine. If the error reporting on the server is configured a certain way, and you get a fatal error, PHP won't output anything to the browser. It is tough to say what the problem is. I would double check your connection info for your database, as a problem with that could definitely cause that.

    If you can't get by it, please open a helpdesk ticket, and we'll check it out for you.

    Thanks,
    Jamie

  6. #6
    Squirrelcart Staff Rich's Avatar
    Join Date
    May 2002
    Location
    Warwick, R.I. USA
    Posts
    450
    Squirrelcart version
    not specified!
    Quote Originally Posted by Mbroderick
    FYI: I opened a ticket.
    Thank you. It has been received.

  7. #7
    Client
    Join Date
    Oct 2003
    Posts
    18
    Squirrelcart version
    not specified!

    More details...

    I added more details and a responce from my ISP support. Please review.

    Thanks

  8. #8
    Client
    Join Date
    Oct 2003
    Posts
    18
    Squirrelcart version
    not specified!
    Can you please look at my ticket. Or give me a timeframe on when you can look at the Call ID 633 .

    Thanks

  9. #9
    Client
    Join Date
    Oct 2003
    Posts
    18
    Squirrelcart version
    not specified!

    Hello? It this thing on??

    Can someone please get back to me on this issues I submited.

    Thanks

  10. #10
    Squirrelcart Staff Jamie's Avatar
    Join Date
    May 2002
    Posts
    6,719
    Squirrelcart version
    v3.3.7
    Please check your ticket.

    Thanks,
    Jamie

  11. #11
    Client
    Join Date
    Oct 2003
    Posts
    18
    Squirrelcart version
    not specified!

    Thanks.

    Thanks, added one more item to the ticket.

  12. #12
    Client
    Join Date
    Oct 2003
    Posts
    18
    Squirrelcart version
    not specified!

    Ticket

    Thanks for the responce.

    Please check ticket again.

    Mike Broderick

  13. #13
    Client
    Join Date
    Oct 2003
    Posts
    18
    Squirrelcart version
    not specified!

    New Details

    New detail in ticket PLEASE review. I have only a few days left on the ISP ( 30 day money back). Still can't upload images and the test program you sent works.

  14. #14
    Squirrelcart Staff Jamie's Avatar
    Join Date
    May 2002
    Posts
    6,719
    Squirrelcart version
    v3.3.7
    Hi Mike,

    I saw your update. I have no FTP access at the moment, but will check shortly. The ticket system is checked as often as the helpdesk, so please do not ask for updates to tickets here and vice versa.

    Thanks,
    Jamie

  15. #15
    Client
    Join Date
    Sep 2005
    Posts
    70
    Squirrelcart version
    not specified!

    register_globals setting

    We have squirrelcart 1.2 store. It requires register_globals to be on. I am changing the hosting company. The new company has register_globals turned off. Does anyone has the resolution for this? Jamie or Rich knows about this? Thank you for any help!

+ Reply to Thread
Page 1 of 2 1 2 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts