I have an app I built on a PHP/Apache machine but now I have migrated development to a PHP windows box.
I am noticing a lot of things no longer work. Most importantly to pass variable between forms and scripts I now have to access the using

$_SERVER['DOCUMENT_ROOT']

or form a from like

$_POST["title"]

on the apache box all I had to do was use

$DOCUMENT_ROOT

or

$title

My question is what php setting is causing this difference and how could I go about changing it.

I tried using the ini_set() function but it didnt sem to work

Thanks for any help

    It's the register_globals php.ini setting. It should remain off for security reasons and program accordingly. That means using $GET, $POST, $COOKIE, $SERVER, etc.

    To emulate register_globals being on without actually turning it on, you can use import_request_variables() or extract() at the top of your script:
    http://us2.php.net/manual/en/function.import-request-variables.php
    http://us2.php.net/manual/en/function.extract.php

    FYI: Info about register_globals security risk:
    http://phpsec.org/projects/guide/1.html#1.3

      Thanks for the response
      I already changes most of the script but it is good to know about the
      import_request_variables() and extract() variables

        Write a Reply...