I'm running Windows NT4, Apache 1.3.2x, PHP 4.3.0-dev.
PHP is installed to C:\Programme\PHP. I moved the php.ini file to C:\WINNT.400\system32.

Thats ok, php works fine.

But as I change some settings in the php.ini nothing happens. I mean the changes in the config file do not become live.
Not even after restarting the whole system.

I already deleted any other kind of php.ini file (php.ini-dist ...), but still isn't my settings used.

Any idea why?

    Create a php file and call it phpinfo.php with following content:

    <?phpinfo();?>
    

    Execute this file.
    The php.ini path is being displayed there beside "Configuration File (php.ini) Path"
    In this Directory php.ini should be stored.

      Ok, of course I did that. That's where I usually check my settings.

      So phpinfo() says php.ini is located in c:/Winnt.400, but there is no php.ini. My php.ini is in C:/Winnt.400/system32

      What now?

        ... in Windows (whatever version) *.ini files always go in the windows folder.
        So try placing your php.ini file in c:\winnt.400 (and not in it's subfolder system32)

        hope this helps,
        Yaak.
        🆒 🙂

          Originally posted by Yaak
          ... in Windows (whatever version) *.ini files always go in the windows folder.
          So try placing your php.ini file in c:\winnt.400 (and not in it's subfolder system32)

          Ok in the mean time I already tried this also. But didn't help.:mad:
          (Maybe a system restart also needed?).

          I also searched thorough my registry, but i didn't find any kind of php.ini settings.

          Any other idea? 😕

            Have you tried removing the php.ini (or giving it a completely different name) and then running some php script?
            You might want to reboot your machine after changing the filename or at least stop and restart the local webserver.

            You say you are using version 4.3 of php... as far as I know the latest released version is 4.2.2... you might want to try this version if all you want to do is programme in PHP and not debug some new (to be released) version.

              Windows is completely based upon the path.

              In NT/2k/XP it is located in the system/user variables in the computer properties.

              You may want to see if you have more than 1 copy of the php.ini file in any of those folders at the start of the path.

              When you do changes to php.ini you will most likely need to reboot for the changes to take effect.

              Technically you can restart IIS/Apache and it should call the changes but depending on how windows feels it may not reload the file.

                Originally posted by Yaak
                Have you tried removing the php.ini (or giving it a completely different name) and then running some php script?
                You might want to reboot your machine after changing the filename or at least stop and restart the local webserver.

                Ok, I did this, but also didn't help. My scripts run well without any kind of php.ini file (I removed all from my system).

                You say you are using version 4.3 of php... as far as I know the latest released version is 4.2.2... you might want to try this version if all you want to do is programme in PHP and not debug some new (to be released) version.

                I'm using the PHP 4.3.0-dev, beacause I need some functions which are only in 4.3.0. See http://snaps.php.net/win32.

                But with PHP 4.2.2 I have had the same problem.

                An other interesting thing for me is, that some of my settings are present, when I call phpinfo(), for example I changed the session.name directive, and this change is present in php.ini.

                Now what? 😕

                  from your phpinfo you should place the php.ini in c:\winnt.400 ...
                  and have you tried restarting the webserver?

                    I just tried upgrading to Apache2.0.40 with 4.3.0-dev and I see the same thing--- some settings from php.ini (and overridden in httpd.conf) are just ignored. Example:
                    auto_prepend_file and register_globals ignored
                    include_path recognized

                    What is going on here?

                      Originally posted by teddyjas
                      from your phpinfo you should place the php.ini in c:\winnt.400 ...
                      and have you tried restarting the webserver?

                      Of course, I tried everything. Nothing helped.

                      And as the messege before me says, it is not only my problem.

                      Is it a bug or a feature? 😕

                        Originally posted by alphafoo
                        I just tried upgrading to Apache2.0.40 with 4.3.0-dev and I see the same thing--- some settings from php.ini (and overridden in httpd.conf) are just ignored. Example:
                        auto_prepend_file and register_globals ignored
                        include_path recognized

                        What is going on here?

                        Maybe this can help you:
                        http://bugs.php.net/report.php

                          Im presuming the -dev ending to the title means that the product is still in development, meaning that it is a beta product and u may have stumbled across a bug.

                          Click on the link in the above post and report the bug. (or there might be a workaround posted there...)

                            Originally posted by piersk
                            Im presuming the -dev ending to the title means that the product is still in development, meaning that it is a beta product and u may have stumbled across a bug.

                            Click on the link in the above post and report the bug. (or there might be a workaround posted there...)

                            That's correct.
                            But I have the same problem with stable 4.2.2..

                            More idea?🆒

                              Originally posted by piersk
                              Have you tried using the ini_set() function to change settings temporarily?

                              Yes I did, and it works fine.
                              But I don't prefer this method.

                              For example I changed the sytnax highlighting color for .phps files. How can I change that with ini_set() without any modifications in my source files? And this should be used globally.

                                Have you tried downloading 4.2.2, getting the php.ini-dist (or whatever its called), renaming it php.ini and copying it to %systemroot% and %systemroot%\system and %systemroot%\system32 then run phpinfo() and see which one it is picking up and then edit that one...

                                  It look's like I found the resolution to my problem.

                                  As I decided to use the latest avaiable version of PHP, I simply downloaded the 4.3.0-dev version in zip file (http://snaps.php.net/win32/php4-win32-latest.zip).
                                  After that I stoped Apache, and overwrite C:\WINNT.400\system32\php4ts.dll. I thought that is enough.

                                  And particulary it was, because my scripts worked fine.

                                  Now I removed all of PHP's dlls, exe, ini files, and "reinstalled" all from one zip (version 4.3.0-dev). And now the changes in php.ini are after an Apache restart recognized.

                                  Wow 🆒

                                  Ps: thank for everyone who tried to help :p

                                    I still can't get some php.ini settings to take hold, and I can't use ini_set for things like auto_prepend_file, so I am stuck.

                                    I'm using 2.0.40 and 4.3.0-dev (php4-200208230600) on linux.

                                    I'll file a bug.

                                      It turns out that the values in php.ini are recognized--- it's just the apache php_value's and php_flag's that are ignored. I filed a bug here:
                                      http://bugs.php.net/bug.php?id=19076

                                      Perhaps it's an Apache2.0.x bug, perhaps it's a PHP4.3.0-dev bug.😕

                                        Write a Reply...