« Previous Next »

Thread: PHP.INI not picked up by IIS

Last post 06-11-2008 10:14 AM by brashquido. 8 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (9 items)

Sort Posts:

  • 06-10-2008, 4:33 AM

    PHP.INI not picked up by IIS

    I have spent all day reading and trying to get my win2003/IIS6 to pick up changes in my php.ini file.

    PHP works fine, but it wont recongize changes to php.ini.

    Things I have tried:
    - refresh application pool
    - restart IIS (about 50 times)
    - add PHPRC environmental variable and restart win2003 server.
    - add C:\PHP to Path env.variable and restart server.
    - copy php.ini to C:\WINNT, restart IIS, delete it again etc.

    Strange things in phpinfo():

    Build Date  May 2 2008 18:01:20
    ---- THIS IS WRONG, I INSTALLED IT TODAY JUNE 10

    Configure Command  cscript /nologo configure.js "--enable-snapshot-build" "--with-gd=shared" "--with-extra-includes=C:\Program Files (x86)\Microsoft SDK\Include;C:\PROGRA~2\MICROS~2\VC98\ATL\INCLUDE;C:\PROGRA~2\MICROS~2\VC98\INCLUDE;C:\PROGRA~2\MICROS~2\VC98\MFC\INCLUDE" "--with-extra-libs=C:\Program Files (x86)\Microsoft SDK\Lib;C:\PROGRA~2\MICROS~2\VC98\LIB;C:\PROGRA~2\MICROS~2\VC98\MFC\LIB" 
    --- THIS LOOKS STRANGE.  I WANT OPENSSL HERE LIKE IN MY PHP.INI

    Server API  ISAPI 
    Virtual Directory Support  enabled 
    Configuration File (php.ini) Path  C:\WINNT 
    Loaded Configuration File  C:\PHP\php.ini 
    --- C:\WINNT IS SUSPECT, THERE IS NO PHP.INI IN THERE.

    PHPRC  C:\PHP 
    --- SHOWS THAT PHPRC ENV.VAR WAS SETUP OK.

    Please please please help me...!

     

  • 06-10-2008, 7:51 AM In reply to

    • khichi
    • Not Ranked
    • Joined on 06-10-2008, 11:26 AM
    • Posts 2

    Re: PHP.INI not picked up by IIS

     You have not told that you are using PHP installer or trying to install manually,

    If you are using installer than no problem, If not than try to use installer, Its best for beginners,

    After installing  you can find the php.ini file in  system32 (C:\WINNT\system32) directory,  where you can make any changes that works,  and  remember that  after making changes  in php.ini  please restart the IIS  to take effect.

    Sorry for my bad english,


     

     

     

  • 06-10-2008, 8:23 AM In reply to

    Re: PHP.INI not picked up by IIS

    I didnt use the installer.  I used the .zip version.

    I followed these instructions exactly:

    http://www.peterguy.com/php/install_IIS6.html

  • 06-10-2008, 12:58 PM In reply to

    • khichi
    • Not Ranked
    • Joined on 06-10-2008, 11:26 AM
    • Posts 2

    Re: PHP.INI not picked up by IIS

     If you are using zip version than please copy php.ini file in to system32 directory, and it will pickes by IIS, If not than simply remove the zip version, and download setup file from PHP.net and use the installer, and install it in C:\php , and after that go to c:\winnt\system32 and find php.ini file and make changes as required

     

  • 06-10-2008, 4:05 PM In reply to

    Re: PHP.INI not picked up by IIS

     What is your "Loaded Configuration File" value when doing a phpinfo(); ? Your system directory is actually the last place php looks for your php.ini file as detailed in my guide on where php.ini is loaded from. However, if you have set the PHPRC env variable to the directory containing your php.ini file, restarted the server and it is still not loading it then there must be something else at play.

    ----------------
    Dominic Ryan
    Microsoft IIS MVP
    www.iis-aid.com
    My IIS articles
    My PHP articles
    My How-to guides
  • 06-10-2008, 7:43 PM In reply to

    Re: PHP.INI not picked up by IIS

    Loaded Configuration File  C:\PHP\php.ini  

    I have tried copying php.ini to c:\winnt\system32\ and restarting IIS/recycling app pool, but that still didnt make any difference.

    What else could be causing this problem?

  • 06-10-2008, 7:54 PM In reply to

    Re: PHP.INI not picked up by IIS

    HMMM - I just found that I CAN change some values in php.ini and they take effect!  For example, I can turn on/off display_errors.  

    But I can't get openssl to come on:

    - I have enabled the openssl module in php.ini
    - The dlls are in the right place
    - typing php -m at command prompt lists openssl in list of loaded php modules
    - But my configure command doesnt mention openssl and when I try to use SSL I get a php error saying openssl is not installed.

  • 06-10-2008, 8:16 PM In reply to

    Re: PHP.INI not picked up by IIS

    This solved my problem:

    http://jp2.php.net/manual/en/ref.openssl.php#79441

    You need to copy libeay32.dll and ssleay32.dll from PHP directory to c:\winnt\system32

    I had some old versions of these dlls in there installed by another application. 

    I have to install some software (process explorer) to identify what programs were using the old dlls before I could overwrite them.

  • 06-11-2008, 10:14 AM In reply to

    Re: PHP.INI not picked up by IIS

    Ah, that is good. Was wondering why/how the PHPRC variable was not working. That is the second OpenSSL installation issue I've seen in the last few weeks. I feel a new guide coming on ;)

    ----------------
    Dominic Ryan
    Microsoft IIS MVP
    www.iis-aid.com
    My IIS articles
    My PHP articles
    My How-to guides
Page 1 of 1 (9 items)
Microsoft Communities