PHP stopped working on with IIS

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bigbloke
    New Member
    • Jun 2007
    • 9

    PHP stopped working on with IIS

    Hi

    I have a server running PHP 5.2.3 Isapi module with 64 bit IIS 6 on a windows 2003 server.

    This has been working fine for several weeks.

    Overnight, it has stopped processing php, it will still display html pages but php pages are just rendered as an html page header and no content, even a simple hello_world script that just shows a couple of thumbnails and then runs phpinfo();. There have not been any changes to code or config overnight (that I know of).

    I've looked at what I would consider the usual stuff and just can't see what's going on. The windows logs arent showing anything useful.

    Has anybody else seen this? or can somebody tell me where I might find some useful information to get the server back to normal.

    Thanks

    Paul
  • kovik
    Recognized Expert Top Contributor
    • Jun 2007
    • 1044

    #2
    You checked the server error logs?

    Comment

    • bigbloke
      New Member
      • Jun 2007
      • 9

      #3
      Hi

      Yes went through system, application and security logs. Nothing there that matches the time that this happened.

      Do you think it's worth re-installing php on the server ?

      Thanks

      Paul

      Comment

      • kovik
        Recognized Expert Top Contributor
        • Jun 2007
        • 1044

        #4
        Possibly.

        Who else has access to it? The rendering of PHP files is handled through server settings that use the PHP DLLs to parse the code into web pages. Check your configuration for anything with the word "php" in it and see what you find.

        Comment

        • bigbloke
          New Member
          • Jun 2007
          • 9

          #5
          At the moment, nobody else uses it.

          I have now re-installed iis6 and re configured to use PHP ISAPI.

          It is back to exactly what I had before which is when I display a php only page I get...

          Code:
          <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
          <HTML><HEAD>
          <META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
          <BODY></BODY></HTML>
          nothing between the php tags on the page is displayed.

          Here is the code for my page...

          Code:
          <?php
          //phpinfo();
          session_start();
          require 'functions.php';
          $sess = session_id();
          $this_path =session_save_path();
          $this_session = $this_path."\sess_".$sess;
          echo $this_session."<br>";
          print_r ($_SESSION);
          echo "hello world<br>";
          
          dateSelect($sel_day,$sel_month,$sel_year);
          echo "<br><br><img src= ../user_images/2/koi_thumbs/2_3_20060919232737_736257985.jpg border=\"0\"></a></center>";
          echo "<br><br><img src=../user_images/2/koi_thumbs/2_3_20060919232737_736257985.jpg border=\"0\"></a></center>";
          echo "<br><br><img src=../user_images/2/koi_thumbs/test_image.jpg border=\"0\"></a></center>";
          echo "<br><br><img src=../user_images/test_image.jpg border=\"0\"></a></center>";
          phpinfo();
          ?>
          I know in the end this will be simple but right now I just cannot see what's going on.

          Paul

          Comment

          • kovik
            Recognized Expert Top Contributor
            • Jun 2007
            • 1044

            #6
            It's not the code you should be concerned about. It's the server configuration. Again, look at the lines in the configuration file that have "php" in them and tell me what they say.

            Comment

            • bigbloke
              New Member
              • Jun 2007
              • 9

              #7
              Okay

              Here are the bits from MetaBase.xml containing references to php

              Code:
              ScriptMaps=".asa,C:\WINDOWS\system32\inetsrv\asp.dll,5,GET,HEAD,POST,TRACE
              .asp,C:\WINDOWS\system32\inetsrv\asp.dll,5,GET,HEAD,POST,TRACE
              .cdx,C:\WINDOWS\system32\inetsrv\asp.dll,5,GET,HEAD,POST,TRACE
              .cer,C:\WINDOWS\system32\inetsrv\asp.dll,5,GET,HEAD,POST,TRACE
              .idc,C:\WINDOWS\system32\inetsrv\httpodbc.dll,5,GET,POST
              .php,C:\php\php5isapi.dll,5,GET,POST,HEAD
              .shtm,C:\WINDOWS\system32\inetsrv\ssinc.dll,5,GET,POST
              .shtml,C:\WINDOWS\system32\inetsrv\ssinc.dll,5,GET,POST
              .stm,C:\WINDOWS\system32\inetsrv\ssinc.dll,5,GET,POST"
              WAMUserName="IWAM_S15258006"
              Code:
              WebSvcExtRestrictionList="1,C:\WINDOWS\system32\inetsrv\httpodbc.dll,0,HTTPODBC,Internet Data Connector
              1,C:\WINDOWS\system32\inetsrv\ssinc.dll,0,SSINC,Server Side Includes
              1,C:\WINDOWS\system32\inetsrv\asp.dll,0,ASP,Active Server Pages
              1,C:\WINDOWS\system32\bitssrv.dll,0,BITSEXTS,BITS Server Extensions
              1,C:\php\php5isapi.dll,1,,PHP ISAPI
              0,*.exe
              0,C:\WINDOWS\system32\inetsrv\httpext.dll,0,WEBDAV,WebDAV
              0,*.dll"
              Code:
              <IIsFilter	Location ="/LM/W3SVC/521478854/filters/PHP ISAPI"
              		FilterDescription="ISAPI"
              		FilterFlags="NotifyPreProcHeaders | NotifyAuthentication"
              		FilterPath="C:\php\php5isapi.dll"
              		FilterState="1"
              	>
              Code:
              <IIsFilters	Location ="/LM/W3SVC/Filters"
              		AdminACL="49634462f0000000a4000000400000009f0e4425a1136d80d43dbfdafba3523aaa9202844b51aa85a30a7e2b90ce4cc28846c4b406d9d50d0772a1a012e95c0f06cd46a9e767738858a7b742a840ac3d06e07fbc2641f6c77033b1e09231a2db52ff115dca21f9e724ebf23cfc264251fc787c884527d50a9fc1478b84d795e3ae5e32665e26d93be913d06558c9445f9aedfcd374fcab4bf2a325a006910c18fc8185f91389b97369f83d1e44851bb239bfae0c00000000ea22ddb0d4e225a92e358cd1539321b81bd482a4ea0f5407d91de36e3af5bf8321430f68635652b9dc66f558959c68d3ac038255a1f33a0367f74b4693e54728"
              		FilterLoadOrder="PHP5 ISAPI"
              	>
              </IIsFilters>
              Code:
              <IIsFilter	Location ="/LM/W3SVC/Filters/PHP ISAPI"
              		FilterFlags="0"
              		FilterPath="C:\php\php5isapi.dll"
              		FilterState="4"
              	>
              </IIsFilter>
              <IIsFilter	Location ="/LM/W3SVC/Filters/PHP5 ISAPI"
              		FilterDescription="ISAPI"
              		FilterFlags="NotifyPreProcHeaders | NotifyAuthentication"
              		FilterPath="C:\php\php5isapi.dll"
              		FilterState="1"
              	>
              </IIsFilter>
              Hope this makes sense

              Paul

              Comment

              • kovik
                Recognized Expert Top Contributor
                • Jun 2007
                • 1044

                #8
                And PHP is in c:\php?

                Try this website: VisualWin.com

                They've got a lot of resources on IIS.

                Comment

                • bigbloke
                  New Member
                  • Jun 2007
                  • 9

                  #9
                  Hi

                  Yes, PHP is in c:\php.

                  I used the installation instructions here...



                  It's fixed for now (or more accurately worked around).

                  I have changed the setup to be CGI rather than ISAPI.

                  I'll have to sort this out properly at some time but it's back in action for now.

                  Thanks

                  Paul

                  Comment

                  • kovik
                    Recognized Expert Top Contributor
                    • Jun 2007
                    • 1044

                    #10
                    Originally posted by bigbloke
                    Hi

                    Yes, PHP is in c:\php.

                    I used the installation instructions here...



                    It's fixed for now (or more accurately worked around).

                    I have changed the setup to be CGI rather than ISAPI.

                    I'll have to sort this out properly at some time but it's back in action for now.

                    Thanks

                    Paul
                    Well, as long as it's local, CGI won't hurt anybody. Otherwise, you'll need to deal with that ASAP.

                    Comment

                    • bigbloke
                      New Member
                      • Jun 2007
                      • 9

                      #11
                      Well, it gets odder and odder.

                      Today I have reset back from CGI to ISAPI and it works just fine.

                      There does seem to be something odd and nasty around using 32 bit modules with the 64 bit version of IIS 6. even with the WOW compatibility on and the

                      cscript %SYSTEMDRIVE%\i netpub\adminscr ipts\adsutil.vb s SET W3SVC/AppPools/Enable32bitAppO nWin64 1

                      command which is supposed to enable 32 bit and 64 bit modules to be run at the same time.

                      So I have a work around if / when it happens again which is to change to CGI mode, run a few pages through, restart IIS and then reset back to ISAPI.

                      Paul

                      Comment

                      • mfeog
                        New Member
                        • Jul 2007
                        • 2

                        #12
                        I have had the same issue. PHP just stopped working on my server after about 2 weeks of working fine. I tried the cgi solution suggested but that has made no difference. Anyone else with any ideas? Would really appreciate the help

                        Comment

                        • mfeog
                          New Member
                          • Jul 2007
                          • 2

                          #13
                          Hi, just an update on this. Installed an earlier version of php5 (5.1.6) and got the server back up and running. Today the same thing has happened again. No amount of reinstalling seems to be working this time

                          Comment

                          Working...