Problem with PHP install from Web Platform [Answered]RSS

18 replies

Last post Jul 11, 2012 04:41 PM by dweisbaum

  • Problem with PHP install from Web Platform

    Nov 22, 2009 02:25 PM|SteveRicketts|LINK

    I've gone to the Web Platform Installer and installed PHP.  However, when I run my info.php (phpinfo()), I get a 404 error.  Looking at the mappings extensions there is no .php extension defined.  Shouldn't the installer have configured that?... or do I need to make a manual entry of some kind.

    Thanks again for all the help,

    sr

    Life more interesting viewed upside down.
  • Re: Problem with PHP install from Web Platform

    Nov 22, 2009 02:31 PM|don.raman|LINK

    Hi Steve,

    Yes PHP installer should have done it. The only reason this can be missed by installer is if you do not have Microsoft FastCGI installed. Do you have Microsoft FastCGI installed properly? Can you do some troubleshooting using http://blogs.iis.net/donraman/archive/2009/11/15/troubleshooting-php-installation-on-windows.aspx and see if FastCGI is present or not. Also let me know the oputput of each command mentioned n the blog.

    If FastCGI is present simply uninstall PHP and reinstall it again from the installer. Please ensure that while running PHP MSI, you are chosing to configure 'IIS FastCGI'.

    All said, WPI should have configured everything for you. So there is somethng which went wrong somewhere.

    Thanks,

    Don.

  • Re: Problem with PHP install from Web Platform

    Nov 22, 2009 03:44 PM|SteveRicketts|LINK

    Ok FastCGI was installed. 

    DefaultDoc script worked fine.

    Second script didn't produce any output.

    I do have fcgiext.dll and fcgiext.ini

    In ini there were no entries after [Types].  I copied the php=PHP and then everything under the [PHP] section.

    Since this is 2003 I have no appcmd.exe

    I do have php-cgi.exe in the proper location

    php-cgi.exe -v failed because I didn't have msvcr71.dll.  So, I found it and that worked ok after that.

    I was going to uninstall PHP and reinstall in the mean time.

     

    sr

    Life more interesting viewed upside down.
  • Re: Problem with PHP install from Web Platform

    Nov 22, 2009 03:55 PM|SteveRicketts|LINK

    Reinstalled from the WPI but it doesn't give me any options to configure IIS FastCGI.  Just accept the agreement and away it goes.

    Still nothing in the mappings for .php and therefore can't find any of the php pages.

    Life more interesting viewed upside down.
  • Re: Problem with PHP install from Web Platform

    Nov 22, 2009 03:56 PM|don.raman|LINK

    stevericketts

    In ini there were no entries after [Types].  I copied the php=PHP and then everything under the [PHP] section.

    Hmmm. This means FastCGI is not configured/installed correctly. A properly installed FastCGI should have proper INI file as outlined in my blog. Also second script not producing any output means that handler mapping for PHP is not present. Can you also ensure that you have 'fcgiconfig.js' in the same folder as 'fcgiext.dll'. PHP MSI uses this script to create mapping for PHP handler as well as adds 'index.php' to default document if not already added.

    stevericketts

    php-cgi.exe -v failed because I didn't have msvcr71.dll.  So, I found it and that worked ok after that.

    This error is because of extension php_msssql.dll. This DLL is dependent on msvcr71.dll. Good that is is working fine.

    Please uninstall PHP from Control Panel--->Add/Remove Programs and try installing it again using WPI. Ensure that handler mapping is configured properly. MSI should do that.

    Thanks,

    Don.

  • Re: Problem with PHP install from Web Platform

    Nov 22, 2009 04:01 PM|don.raman|LINK

    Hi,

    Can you do this:

    • <div mce_keep="true">Go to Control Panel--->Add/Remove program and uninstall</div>
      • <div mce_keep="true">PHP 5.2.11</div>
      • <div mce_keep="true">IIS FastCGI</div>
    • <div mce_keep="true">Please maintain the order of uninstallation.</div>
    • <div mce_keep="true">Go to C:\Program Files and delete PHP folder.</div>
    • <div mce_keep="true">Ensure that no other installation of PHP is present in the machine. Neither manual nor using MSI.</div>
    • <div mce_keep="true">Now invoke WPI and check PHP5.2.11. WPI should show IIS FastCGI as a dependency at the time of installation. Accept the license agreement and click OK.</div>

    This should install everything.

    Thanks,

    Don.

  • Re: Problem with PHP install from Web Platform

    Nov 22, 2009 04:19 PM|don.raman|LINK

    Hi Steve,

    Can you also let me know if your are running 32-bit Windows or 64 bit Windows 2003.

    Location of PHP installation on 32 bit Windows: C:\Program Files\PHP

    Localtion of PHP installation on 64 bit Windows: C:\Program Files (x64)\PHP

    So delete 'PHP' folder appropriately. Also there should be no PHP folder present in C:\Program Files\PHP if you are running 64 bit OS.

    Thanks,

    Don.

  • Re: Problem with PHP install from Web Platform

    Nov 22, 2009 04:29 PM|SteveRicketts|LINK

    Ok, I uninstalled PHP then FastCGI... however, it said FastCGI (x86) not IIS FastCGI in uninstall programs.  So, I went to WPI and selected PHP.  It did identify the IIS FastCGI dependancy.  Accepted the agreement and it downloaded and installed.

     However, still no .php mapping in IIS.  Pages can't be found.

    First script still works

    Second script, still no output

    fcgiconnfig.js does exist

    fcgiext.ini has the types I entered... didn't remove that before reinstall

    php-cgi.exe -v gives similar output (shows 5.2.11 not 5.3)

    php-cgi.exe test.php gives proper output "this is my first php program"

    Accessing the test.php from the web browser gives 404 error... and like I said, there are no .php mappings in the default web (port 80).

    To answer your last question, this is a 32 bit machine and I removed the program files\php directory.

    Should I try to configure the .php mapping manually?

     sr

     

    Life more interesting viewed upside down.
  • Re: Problem with PHP install from Web Platform

    Nov 22, 2009 04:38 PM|don.raman|LINK

    Hi,

    This is really strange. Can you go to Control Panel-->Add/Remove Program, select PHP5.2.11 and say 'Change/Repair'. While repairing, select 'IIS FastCGI' for configuration. If this doesn't help, try creating the handler manually as described at http://learn.iis.net/page.aspx/247/using-fastcgi-to-host-php-applications-on-iis-60/

    Thanks,

    Don.

  • Re: Problem with PHP install from Web Platform

    Nov 22, 2009 04:49 PM|don.raman|LINK

    Hi,

    Can you also send me the WPI log files. I would like to take a look. The logs can be found at C:\Documents and Settings\<your user name>\Local Settings\Application Data\Microsoft\Web Platform Installer\logs. Just zip it and mail me at don[dot]raman[at]microsoft[dot]com.

    Thanks,

    Don.

  • Re: Problem with PHP install from Web Platform

    Nov 22, 2009 04:50 PM|SteveRicketts|LINK

    Wow... that was fun!  ;-) 

    Did the change/repair thing... FastCGI was already selected.  Went through it anyway.  Still no .php mappings in IIS.  So I manually entered the mapping and everything works great!

    I now have the mySQL section from phpinfo() and went through the configuration of Moodle... which also completed perfectly. 

    Thanks to everyone who contributed to this today.  My sincere appreciation!

    Steve

    Life more interesting viewed upside down.
  • Re: Problem with PHP install from Web Platform

    Nov 22, 2009 05:00 PM|SteveRicketts|LINK

    LOL... not my day! 

    Went to the log location specified and guess what?.. No logs.  The only file I have in the Microsoft\Web Platform Installer directory is webpi.preferences and no other files or directories.  I checked all the other user directories just in case but nothing in any of them.  Mine was the only one with a Web Platform Installer directory.  I have the options to show hidden and protected operating system files too.

    Looked in the system32\logfiles directories for something there just in case but no luck.

    Any other ideas on where it may be or what I can do to get you one?

     sr

    Life more interesting viewed upside down.
  • Re: Problem with PHP install from Web Platform

    Nov 22, 2009 05:07 PM|don.raman|LINK

    You are looking at wrong path. webpi.preferences file is located at

    C:\Documents and Settings\Administrator\Application Data\Microsoft\Web Platform Installer

    Whereas logs will be at:

    C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\Web Platform Installer\logs

    See the path difference after C:\Documents and Settings\Administrator.

    There should be some log. It is impossible not to have those.

    Thanks,

    Don.

  • Re: Problem with PHP install from Web Platform

    Nov 22, 2009 05:24 PM|SteveRicketts|LINK

    D'oh!... Working on WAY too many things... brain dead!

    Ok, I zipped them up and they will be headed your way shortly.

     

    sr

    Life more interesting viewed upside down.
  • Re: Problem with PHP install from Web Platform

    Nov 22, 2009 05:47 PM|don.raman|LINK

    Hi Steve,

    The log indicates that none of the custom commands were able to run. All failed with message below:

    C:\WINDOWS\Installer\MSI1A.tmp, Entrypoint: CAQuietExec
    CAQuietExec:  Error 0x80070035: Command failed to execute.
    CAQuietExec:  Error 0x80070035: CAQuietExec Failed

    This is the reason why your fcgiext.ini file was empty and there was no handler mapping for *.php.

    Seems somehow the path \\localhost\admin$ is not getting resolved on your machine. I do not know why. I will see how can we address this.

    Glad to know that your PHP is running properly and thanks for sending the WPI log files.

    Regards,

    Don.

  • Re: Problem with PHP install from Web Platform

    Nov 22, 2009 06:01 PM|SteveRicketts|LINK

    I think it's just me... seems like I'm the exception for everything I install!!  ;-)

    Let me know if there is anything else I can do to follow up... happy to help if you need anything.

    For now I think I'll go put up some Christmas lights for the wife... doing it in the dark should take my mind of PHP for a while... going to get cold here in Ann Arbor later in the week.  Hope you're someplace warm!  ;-)

    Life more interesting viewed upside down.
  • Re: Problem with PHP install from Web Platform

    Jun 18, 2012 03:44 PM|dweisbaum|LINK

    Don,

        I'm having a similar problem. My system is Window 7 Home Premium, 64-bit. After configuring IIS 7.5 as per the php.net page, I installed PHP 5.3 using WPI, then copied the PHP 5.4.4 files over the 5.3 files. When I tried to open a test php file, I got a 404.0 error. Using the test file in PHP Manager, I get the error "No input file specified." I went through all the steps. I went through all the steps on your blog (http://blogs.iis.net/donraman/archive/2009/11/15/troubleshooting-php-installation-on-windows.aspx); all the output matches what you say it should be, but I still get the "No input file specified" error. Any assistance would be greatly appreciated.

  • Re: Problem with PHP install from Web Platform

    Jul 10, 2012 04:35 PM|dcummiskey@yahoo.com|LINK

    Did you ever figure this out? I'm seeing a similar issue after installing PHP on IIS 7 using the PHP installer. I've dropped the sample php file into a directory and created a site using port 85 on the localhost to try to access it. Handler Mappings are registered, walked through the steps on your post and see htis wehn I try the executable:

     c:\Program Files\PHP\v5.3>ph
    Status: 404 Not Found
    X-Powered-By: PHP/5.3.13
    Content-type: text/html

    No input file specified.

    c:\Program Files\PHP\v5.3>

     Banging my head against the wall, any ideas?

  • Re: Problem with PHP install from Web Platform

    Jul 11, 2012 04:41 PM|dweisbaum|LINK

    Yes, I got it sorted out. The problem was three lines in the php.ini file. When researching the problem, it was suggested that the following lines be set:

         extension_dir = "ext"

         cgi.force_redirect = 1

         fastcgi.logging = 0

    This didn't work, so I set them as:

          extension_dir = "D:\PHP\ext" (This is my PHP installation path.)

          cgi.force_redirect = 0

          fastcgi.logging = 1

    I also activated, the following lines, but retained the default values:

         cgi.fix_pathinfo = 1

         fastcgi.impersonate = 1

    If you plan on using PHP with MS SQL Server, you'll als need to download the appropriate drivers.

    I hope this helps, and please keep me posted.