Also if I run a php page with:

<?
phpinfo();
?>

The configuration File path shows as:

Configuration File (php.ini) Path C:\WINDOWS\

By the way my httpd.conf file is configured as follows:

LoadModule php4_module "c:/php/php4apache2.dll"
AddType application/x-httpd-php .php
PHPIniDir "C:/PHP/"

Also If I take into account the following:

PHP searches for php.ini in the following locations (in order):

PHPIniDir directive (Apache 2 module only)

HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath

The PHPRC environment variable

Directory of PHP (for CLI), or the web server's directory (for SAPI modules)

Windows directory (C:\windows or C:\winnt)

The last placed it looked for the php.ini file was in Windows as that is what it's showing.

Also I believe for it to be correct it should be showing:

Configuration File (php.ini) Path C:\WINDOWS\ php.ini

But as the php.ini file is not there it is only showing:

Configuration File (php.ini) Path C:\WINDOWS\

Could somebody confirm if this is true? that if it's using the php.ini file from windows PHPinfo should show:

Configuration File (php.ini) Path C:\WINDOWS\ php.ini

Either way, I then decide to place the php.ini file in windows,restart service, clear cache, and run the phpinfo again, and I can not see no modification what so ever. The configuration file still is showing as:

Configuration File (php.ini) Path C:\WINDOWS\

I do the same test for all the other locations where php.ini is searched for:

As I configured my apache 2 httpd.conf file to

PHPIniDir "C:/PHP/"

I place the php.ini file there, restart service,clear cache. And still the phpinfo says:

Configuration File (php.ini) Path C:\WINDOWS\

When I would of though it should of said something along the line of: ... Path C:\php\php.ini would this be true??

Anyway still trying to figure out why apache 2 server is still running php pages when it doesn't seem to find any php.ini file what so ever.
I do need this php.ini file to be detected as I need to configure this!!

Any suggestions are more than welcome!
Cheers!!

    Nobody can point me in the right direction??

    All I need is to get Apache to recognise my Php.ini file, and that is not happening!

    Somebody must have a suggestion!!

    Cheers!

      I'm not sure this will solve your problem, but according to the documentation,

      Where do I have to put the php.ini ?
      The php.ini files is only searched in two places:
      1) in your Apache installation directory (e.g. c:\apache\apache)
      2) in your %SYSTEMROOT% directory.

      So your php.ini is probably in the Apache installation directory.
      Hope that helped.

        Thanks Zbee, have tried what you suggested, but still no luck!

        Anyway,will keep on trying!

        Please keep those suggestions comming!

        Thanks!

          Hi,

          PHP will still work without a php.ini (at least in an Apache installation). It will just use the default configuration values.

          And you're right ... phpinfo() should display the full path to php.ini including php.ini.

          Under which Account does the Apache service run ?

          Please post the php.ini file (as attachment).

          Thomas

            Let's see, I don't know whether this answers your question!

            I am running php as an apache2 module.

            Summary of my system:

            Windows XP SP2 trying to install PHP5,Apache 2. Is this all you need to know?

            Here is my Php.ini file attached.

            Thanks for the help!
            Let me know if you need anymore info.

            (Please note I Zipped the file)

              Ok,

              just to make sure:

              The zip file contains a file named
              php.ini.ini-recommended

              Did you just copy that file to c:\windows or did you copy that file to c:\windows and rename it to php.ini ?

              The filename must be php.ini

              Thomas

                Hi,

                This is what I did,

                To rename the file I right clicked and renamed to php.ini.

                To ensure I did this correctly I also openned and did "save as" and typed php.ini.

                Is this the correct thing to do?

                Then I moved a copy to C:/Windows

                I also have put a copy in the apache2 directory:

                C:\Program Files\Apache Group\Apache2

                Also as per the page:

                http://www.php.net/manual/en/install.windows.apache2.php

                I put a copy in C:/Php

                And configured httpd.conf with:

                Phpinidir to "C:/Php"

                I think that by default it looks for php.ini first in the phpinidir, If it cant find it then goes to apache folder and then goes to the C:/Windows folder , hence the reason I put a copy of php.ini in each one of these folders.

                The php.ini file I have attached is the one I am trying to use and is the one I renamed to php.ini , when renaming am I doing this in the correct way? I am quite sure I did do it right.

                Thanks for the help!

                  Sorry,

                  Just to say I am taking into account "/" and "\" when configuring httpd.conf. As in my above thread I didn't make it clear.

                  Httpd.conf should always have "/" when configuring paths.

                  Cheers!

                    I have attached here my php.info.

                    As you can see it looks for php.ini in C:/Windows , but doesn't find it.

                    Cheers!

                      Is the "Hide file extensions for known file types" option enabled in the explorer folder options ? If yes then disable that option and check the filename of the php.ini file c:\windows.

                      Thomas

                        Hello!

                        Have just solved the problem, this is very embarrasing!

                        But the problem was down to me renaming incorrectly the php file to php.ini.

                        What I was doing was right clicking and then renaming to php.ini.

                        What I have done now is create from scratch a notepad file ,save as all types, with the name php.ini and then copy into this file all the info from the recommend php file.

                        This way it was saved with the name php.ini and also type of file as "configuration settings".

                        Anyway,thanks a lot for the help!!!
                        :o :o :o !!

                          Write a Reply...