« Previous Next »

Thread: Stuck with FastCGI on IIS6, W2k3 Server x64 R2 native and PHP 5.3.0

Last post 07-02-2009 4:21 AM by Noname200009. 4 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (5 items)

Sort Posts:

  • 07-01-2009, 3:47 PM

    Stuck with FastCGI on IIS6, W2k3 Server x64 R2 native and PHP 5.3.0

    Hi,

    I really don't have anything left to try, perhaps someone here can give me more insight.

    Yesterday I installed PHP x64 5.3.0 as CGI-Application; long story short, it works perfectly. I can even run OWA 2007 on the same IIS site without any trouble.

    Only with fastCGI I cannot get eny further. I downloaded the X64 version from  this site, installed it via double-click and had no errors there. DLL version is 6.1.0036.1, IIS is 6.0.

    • When checking the webservice extensions, FastCGI is allowed and does have $windir/system32/inetsrv/fcgiext.dll as the only necessary file in it.
    • I created an fcgiext.ini manually in the same directory as above (the fcgiext config script for cscript was not installed with fastcgi somehow) and put exactly five lines in it:
      [Types]
      php=PHP

      [PHP]
      ExePath=C:\PHP\php-cgi.exe

      Access ist granted to Everyone with Full Access (!)
    • I got the Tool Process Monitor to view any file action that might occur
    • I configured a script mapping for Default Site pointing to the above DLL for the extension ".php" and all verbs. Both checkboxes in that dialogue are ticked as well
    • Then I reset IIS via iisreset.exe

    Now when browsing to a PHP file, it will always throw a fastcgi error:

    • Could not find entry for "php" on site 1 in [Types] section.
    • Error Number: 1413 (0x80070585).
    • Error Description: invalid index.

     whereas the ini file looks as stated above.

    and most confusing of all, when viewing the process monitor file activity log it would look like this:

    ###############
    21:15:30,7565924    w3wp.exe    3804    CreateFile    C:\WINDOWS\system32\inetsrv\fcgiext.dll    SUCCESS    Desired Access: Read Control, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
    21:15:30,7567302    w3wp.exe    3804    QuerySecurityFile    C:\WINDOWS\system32\inetsrv\fcgiext.dll    BUFFER OVERFLOW    Information: Owner, Group, DACL
    21:15:30,7567519    w3wp.exe    3804    CloseFile    C:\WINDOWS\system32\inetsrv\fcgiext.dll    SUCCESS   
    21:15:30,7569366    w3wp.exe    3804    CreateFile    C:\WINDOWS\system32\inetsrv\fcgiext.dll    SUCCESS    Desired Access: Read Control, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
    21:15:30,7569645    w3wp.exe    3804    QuerySecurityFile    C:\WINDOWS\system32\inetsrv\fcgiext.dll    SUCCESS    Information: Owner, Group, DACL
    21:15:30,7569833    w3wp.exe    3804    CloseFile    C:\WINDOWS\system32\inetsrv\fcgiext.dll    SUCCESS   
    21:15:30,7571914    w3wp.exe    3804    QueryOpen    C:\WINDOWS\system32\inetsrv\fcgiext.dll    SUCCESS    CreationTime: 08.11.2007 09:39:18, LastAccessTime: 01.07.2009 21:10:22, LastWriteTime: 08.11.2007 09:39:18, ChangeTime: 01.07.2009 20:04:47, AllocationSize: 114.688, EndOfFile: 111.632, FileAttributes: A
    21:15:30,7573590    w3wp.exe    3804    CreateFile    C:\WINDOWS\system32\inetsrv\fcgiext.dll    SUCCESS    Desired Access: Execute/Traverse, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a, ShareMode: Read, Delete, AllocationSize: n/a, OpenResult: Opened
    21:15:30,7573998    w3wp.exe    3804    CreateFileMapping    C:\WINDOWS\system32\inetsrv\fcgiext.dll    SUCCESS    SyncType: SyncTypeCreateSection, PageProtection:
    21:15:30,7574160    w3wp.exe    3804    QueryStandardInformationFile    C:\WINDOWS\system32\inetsrv\fcgiext.dll    SUCCESS    AllocationSize: 114.688, EndOfFile: 111.632, NumberOfLinks: 1, DeletePending: False, Directory: False
    21:15:30,7574467    w3wp.exe    3804    CreateFileMapping    C:\WINDOWS\system32\inetsrv\fcgiext.dll    SUCCESS    SyncType: SyncTypeOther
    21:15:30,7575026    w3wp.exe    3804    CloseFile    C:\WINDOWS\system32\inetsrv\fcgiext.dll    SUCCESS   
    21:15:30,7576794    w3wp.exe    3804    QueryOpen    C:\WINDOWS\system32\inetsrv\fcgiext.dll    SUCCESS    CreationTime: 08.11.2007 09:39:18, LastAccessTime: 01.07.2009 21:15:30, LastWriteTime: 08.11.2007 09:39:18, ChangeTime: 01.07.2009 20:04:47, AllocationSize: 114.688, EndOfFile: 111.632, FileAttributes: A
    21:15:30,7578429    w3wp.exe    3804    CreateFile    C:\WINDOWS\system32\inetsrv\fcgiext.dll    SUCCESS    Desired Access: Read Data/List Directory, Execute/Traverse, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a, ShareMode: Read, Delete, AllocationSize: n/a, OpenResult: Opened
    21:15:30,7578711    w3wp.exe    3804    CreateFileMapping    C:\WINDOWS\system32\inetsrv\fcgiext.dll    SUCCESS    SyncType: SyncTypeCreateSection, PageProtection:
    21:15:30,7579339    w3wp.exe    3804    CreateFileMapping    C:\WINDOWS\system32\inetsrv\fcgiext.dll    SUCCESS    SyncType: SyncTypeOther
    21:15:30,7579649    w3wp.exe    3804    CloseFile    C:\WINDOWS\system32\inetsrv\fcgiext.dll    SUCCESS   
    21:15:30,7581979    w3wp.exe    3804    Load Image    C:\WINDOWS\system32\inetsrv\fcgiext.dll    SUCCESS    Image Base: 0x3070000, Image Size: 0x1e000
    21:15:30,7594017    w3wp.exe    3804    CreateFile    C:\WINDOWS\system32\inetsrv\fcgiext.ini    SUCCESS    Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, AllocationSize: n/a, OpenResult: Opened
    21:15:30,7595769    w3wp.exe    3804    QueryOpen    C:\WINDOWS\system32\inetsrv\fcgiext.ini    SUCCESS    CreationTime: 12.01.2009 23:03:02, LastAccessTime: 01.07.2009 21:10:22, LastWriteTime: 12.01.2009 23:03:02, ChangeTime: 01.07.2009 06:42:34, AllocationSize: 8.192, EndOfFile: 7.612, FileAttributes: A
    21:15:30,7597560    w3wp.exe    3804    CreateFile    C:\WINDOWS\system32\inetsrv\fcgiext.ini    SUCCESS    Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
    21:15:30,7598884    w3wp.exe    3804    LockFile    C:\WINDOWS\system32\inetsrv\fcgiext.ini    SUCCESS    Exclusive: False, Offset: 0, Length: 4.294.967.295, Fail Immediately: False
    21:15:30,7599071    w3wp.exe    3804    QueryStandardInformationFile    C:\WINDOWS\system32\inetsrv\fcgiext.ini    SUCCESS    AllocationSize: 8.192, EndOfFile: 7.612, NumberOfLinks: 1, DeletePending: False, Directory: False
    21:15:30,7599328    w3wp.exe    3804    ReadFile    C:\WINDOWS\system32\inetsrv\fcgiext.ini    SUCCESS    Offset: 0, Length: 7.612
    21:15:30,7600253    w3wp.exe    3804    UnlockFileSingle    C:\WINDOWS\system32\inetsrv\fcgiext.ini    RANGE NOT LOCKED    Offset: 0, Length: 4.294.967.295
    21:15:30,7600437    w3wp.exe    3804    CloseFile    C:\WINDOWS\system32\inetsrv\fcgiext.ini    SUCCESS   
    21:15:30,7602990    w3wp.exe    3804    CreateFile    C:\WINDOWS\system32\inetsrv\fcgiext.ini    SUCCESS    Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
    21:15:30,7603320    w3wp.exe    3804    LockFile    C:\WINDOWS\system32\inetsrv\fcgiext.ini    SUCCESS    Exclusive: False, Offset: 0, Length: 4.294.967.295, Fail Immediately: False
    21:15:30,7603465    w3wp.exe    3804    QueryStandardInformationFile    C:\WINDOWS\system32\inetsrv\fcgiext.ini    SUCCESS    AllocationSize: 8.192, EndOfFile: 7.612, NumberOfLinks: 1, DeletePending: False, Directory: False
    21:15:30,7603700    w3wp.exe    3804    ReadFile    C:\WINDOWS\system32\inetsrv\fcgiext.ini    SUCCESS    Offset: 0, Length: 7.612
    21:15:30,7604426    w3wp.exe    3804    UnlockFileSingle    C:\WINDOWS\system32\inetsrv\fcgiext.ini    RANGE NOT LOCKED    Offset: 0, Length: 4.294.967.295
    21:15:30,7604588    w3wp.exe    3804    CloseFile    C:\WINDOWS\system32\inetsrv\fcgiext.ini    SUCCESS   
    21:15:30,7606605    w3wp.exe    3804    CreateFile    C:\WINDOWS\system32\inetsrv\fcgiext.ini    SUCCESS    Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
    21:15:30,7606879    w3wp.exe    3804    LockFile    C:\WINDOWS\system32\inetsrv\fcgiext.ini    SUCCESS    Exclusive: False, Offset: 0, Length: 4.294.967.295, Fail Immediately: False
    21:15:30,7607013    w3wp.exe    3804    QueryStandardInformationFile    C:\WINDOWS\system32\inetsrv\fcgiext.ini    SUCCESS    AllocationSize: 8.192, EndOfFile: 7.612, NumberOfLinks: 1, DeletePending: False, Directory: False
    21:15:30,7607231    w3wp.exe    3804    ReadFile    C:\WINDOWS\system32\inetsrv\fcgiext.ini    SUCCESS    Offset: 0, Length: 7.612
    21:15:30,7608678    w3wp.exe    3804    UnlockFileSingle    C:\WINDOWS\system32\inetsrv\fcgiext.ini    RANGE NOT LOCKED    Offset: 0, Length: 4.294.967.295
    21:15:30,7608863    w3wp.exe    3804    CloseFile    C:\WINDOWS\system32\inetsrv\fcgiext.ini    SUCCESS   
    21:15:30,7609905    w3wp.exe    3804    CloseFile    C:\WINDOWS\system32\inetsrv\fcgiext.ini    SUCCESS   
    ###############

    I cannot find any errors when opening the file, so I tend to conclude that fastcgi actually reads the file and then somehow crashes?

    Is there anything else I can do or try? Thanks...

  • 07-01-2009, 7:35 PM In reply to

    • ksingla
    • Top 25 Contributor
    • Joined on 06-14-2006, 3:02 AM
    • Redmond, WA
    • Posts 863

    Re: Stuck with FastCGI on IIS6, W2k3 Server x64 R2 native and PHP 5.3.0

    Only reason I can think of is that you are working in syswow64\inetsrv folder but the worker process is reading from system32\inetsrv folder. Reason you didn't find the fcgiconfig.js in the inetsrv folder is also possible because of the above. procmon shows fcgiext.ini filesize as 7612 bytes also indicates that its reading fcgiext.ini file which comes with the setup and not the file you created with just 5 lines.

    Thanks,
    Kanwal

    Follow me on twitter at http://twitter.com/kjsingla
  • 07-02-2009, 2:32 AM In reply to

    Re: Stuck with FastCGI on IIS6, W2k3 Server x64 R2 native and PHP 5.3.0

    Hi thanks for your reply. Good point, but:

    When I create or delete the file in /system32/inetsrv, my action will be mirrored instantaneously  to the syswow64/inetsrv folder. I create the file, there is one in syswow64; I edit it, same content in both folders.

    I searched for fcgiext.ini, there were only two files; one in syswow/... and one in system32/... both around ~70 Bytes.

    sooo.... anything else I might try? or perhaps there is another fastcgi extension for iis?

    Thanks

  • 07-02-2009, 3:51 AM In reply to

    Re: Stuck with FastCGI on IIS6, W2k3 Server x64 R2 native and PHP 5.3.0

    Ok, I tried again with process monitor. I found out that when I "notepad" the /system32/inetsrv/fcgiext.ini file, procmon would give a file path of "/sysWOW64/inetsrv/fcgiext.ini"?!?!

    Then I changed the webservice externsion and the script mapping to /syswow64/* but now there is only a plain text error "%1 is not a valid 32bit application", which somehow makes sense, since my IIS is definitely not running in 32bit mode.

    Is there any switch oder method or something how I get access to the system32/inetsrv folder instead of the syswow64 folder? Or am I missing something totally different?

    Thanks...
     

  • 07-02-2009, 4:21 AM In reply to

    SOLVED: Stuck with FastCGI on IIS6, W2k3 Server x64 R2 native and PHP 5.3.0

     Oh for HEAVENS SAKE! This is a so stupid, banal thing I almost could cry.

    When creating the textfile, I was of course creating it with total commander and flo's notepad2. but those are win32 applications and according to MS then folder redirection to syswow64 takes place automatically.

    I downloaded an x64 text editor and used its "open file" function, and voila: I found a preconfigured fcgiext.ini, the config.js and so on. 

    After editing the correct ini file now everything rox =)

    Thanks m8, I'd have been searching for days if it weren't for your suggestion.

Page 1 of 1 (5 items)
Microsoft Communities