Results 1 to 5 of 5

Thread: register_globals errors

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Matt's Avatar
    Matt is offline GlowHost Administrator
    Join Date
    Jan 2005
    Location
    Behind your monitor
    Posts
    6,417

    Default

    Here is another workaround to get your broken scripts running while you solve the underlying problem having to due with outdated software and register_globals.

    Upload a file called php.ini to the directory of the script that has the errors. This file if it does not already exist, will have this line of code in it:

    Code:
    register_globals = on
    If you already have a php.ini you can add the line of code above to the file, on a new line, then save the file.

    This will allow your cart (or other software) to immediately run again.

    However, it has opened your site up to potential security problems which we strongly encourage you to address, as soon as possible.

    We recommend that you update the software to the latest version. This should resolve the issue with register_globals being required to be on in order for the software to run.

    If you update the software in the same installation directory where it exists currently, make sure to delete the php.ini file from the server once you have completed the update process.

    If you have a php.ini that has other directives besides
    Code:
    register_globals = on
    then you can keep the php.ini installed if needed, but make sure to remove the line that says
    Code:
    register_globals = on
    so that you can remove the potential security hole completely after update.

    If you have problems updating your software, which you may, because earlier versions of some scripts did not have easy upgrade paths like most do today, your other option is to make a fresh installation of the software in another directory, then import your database. This may, or may not work because some of the upgrades that have been released since your version may have contained database schema updates. However it may be worth a try on some scripts where only the php scripts may have changed.

    The other option is to make a fresh install, then manually recreate the store, or import portions of the database that will work from the old version, to the new version, to save some time.

    The final option of course it to hire a qualified programmer to handle the upgrade path for you.

    In all cases above dealing with a fresh install in a secondary directory, once you have verified that it is working properly in the secondary directory (example: /cart2), you can rename or delete the entire directory that contains the outdated software (example: /cart), then rename the folder that contains the new software, to the same name as the old software directory.

    This makes it so that you do not have to recode the links on your site to point to the new software installation.

    For example, if you have an old shopping cart located at:
    http://example.com/cart
    you would make a fresh installation at
    http://example.com/cart2

    Once you verify /cart2 works fine, you would rename /cart to /oldcart (for backup purposes) then rename /cart2 to /cart.

    Your new updated cart will exist at the same location as the old one, and you now have an backup of the outdated cart at /oldcart

    You should remove /oldcart as soon as possible from the server so that you have one less potential security problem running on your site to worry about.

    Hopefully that will help some of you out.
    Last edited by Matt; 11-01-2006 at 11:51 AM.
    Send your friends and site visitors to GlowHost and get $125 plus bonus!
    GlowHost Affiliate Program | Read our Blog | Follow us on X |

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14