help me...i want to modify the register_globals value in my php.ini..
but find prob...
i have two php.ini (could you explain this too ), in windows folder (c🙂 and in php folder.
i don't know which one to modify..? recently.. i tried to modify both of them
(tested it one by one offcourse)
i looked for register_globals and changed the value to 'off' and save it.
then i ran php_info(); but the value didn't change there... still on.
how...? thankyu in advance.

    If you're using Windows, you usually place *.ini files within the Windows directory.

    Are you using IIS or Apache? If you're using Apache you can specify the directory where your php.ini file resides within the httpd.conf file with the following line:

    Apache 1.3

    SetEnv PHPRC C:/Windows

    Apache 2.x

    PHPIniDir "C:/Windows"

      i'm using windows and apache http server 2.0.46 , i opened conf folder in my apache folder
      and there are two text file httpd and httpd.default
      in httpd.default there is no information about php or phpinidir
      and in httpd i find that #phpinidir : c:\windows
      that's where my php ini file resides ,right? but i already tried to modify it and didn't get any changes..

        You have to restart apache after modifying php.ini

        EDIT: try this:

        echo PHP_CONFIG_FILE_PATH;

          The text file you require is httpd.conf, not the httpd.default - the default file is just in case you want to starta ll over again with configuration.

          Also, you mentioned that you do have a line in the .conf file as #phpinidir c:\windows .... the hash sign at the beginning means that the line is a comment line, and ignored by Apache. Remove the hash sign and restart the Apache service.

            weird, before my phpinidir in "C:\windows", now phpinidir become "C:\php"
            i removed my # sign.
            now on php_info(), i got 'Configuration File (php.ini) Path C:\php\php.ini '
            if i run that echo php_config_file_path, i got 'c:\'
            i tried to set my magic_quotes_gpc to on (at c:\php\php.ini) but after restarting apache
            and run php_info() , i still got that magic_quotes_gpc with 'off' value...
            i also tried it c:\windows\php.ini, but didn't work too.

              Rename both php.ini files to php.ini.old. Restart Apache and try running phpinfo() again.

              Does it work, probably not (hopefully). Rename one of them back to php.ini, restart Apache, and run phpinfo() again.

              Now does it work? If not, use the other php.ini. Just make sure you haven't got any other php.ini lurking around anywhere else - Windows is probably getting itself confused!

                ops .. i did mistake when change the register global...
                i changed the one which in the first section...
                i should modify the one in the middle section....
                i can get over it now... sorry..
                and thank you for your helping...it's really help me to understand the php.ini
                c u

                  Write a Reply...