Prev: Server side redirection - yet again
Next: exception throw from __autoload could not be catched on php 5.3.1
From: Venkat Raman Don on 11 Feb 2010 10:14 Hi Morris, What hotfix you are talking about? There is none to my knowledge required to run PHP. 32-bit PHP runs pretty well on 64-bit OS. This is what user configure. Pierre has already provided you a link to install PHP on IIS7. That should help. A recommended way of running PHP is using IIS FastCGI. If you want to have bare minimum problem, please try Microsoft Web Platform Installer. It will install PHP 5.2.12 for you. You can also go through below blogs of mine where I have explained things in detail. In particular go through the troubleshooting blog which will help you narrow down the problem. An important point, if you prior to doing fresh installation through Web Platform Installer or any other way, please ensure that your current installation is totally wiped out from PHP executable point of view as well as remove any handler mapping you have done in IIS or any registry tweak you have done to load the INI files. Here are the blog link: http://blogs.iis.net/donraman/archive/2009/10/07/installing-php-on-windows.aspx http://blogs.iis.net/donraman/archive/2009/10/08/upgrading-to-php-5-3-an-easy-way.aspx http://blogs.iis.net/donraman/archive/2009/11/15/troubleshooting-php-installation-on-windows.aspx Let me know in case you have any problem. Thanks, Don. -----Original Message----- From: Morris [mailto:morne(a)afridata.net] Sent: Thursday, February 11, 2010 3:53 AM To: php-windows(a)lists.php.net Subject: Re: [PHP-WIN] 64-bit PHP binaries Thanks Pierre. I am going to redo it in the morning. Just a quick one if I may. There is a hotfix from microsoft and some admin tools that is suggested should be installed. When I try to install it it says I have the incorrect software version or operating system. have you come across this on your travels with php installs on win2k8? "Pierre Joye" <pierre.php(a)gmail.com> wrote in message news:fe05d1541002110249g4e70f80bifdf20624d441ce7e(a)mail.gmail.com... > hi, > > On Thu, Feb 11, 2010 at 11:10 AM, Morne Fourie <morne(a)afridata.net> wrote: > >> Thanks, it is all getting a lot clearer now. However, there is still one >> more problem. Initially when i deployed PHP on this server I used the 5.3 >> nts version but could not get it working. If i ran the cammand line i >> could >> see it was working but it would not deliver the pages via a webbrowser. >> As >> per my earlier post i get a dot net error. This brought me to the point >> where i started thinking this is a 64bit issue. I also stated earlier >> that i >> think there is a setting that is not configured and that is not on the >> documentation and that is why it is not working. I however have been >> unable >> to figure out where the problem is. There is a lot of mention of running >> a >> command on IIS to get it to run as a 32bit version. Is this true? > > I run x86 php on my IIS x64 windows just fine (2k3/2k8/2k8R2). There > was some extra setting before with the ISAPI, but it is not required > anymore as it runs through FastCGI (different process than IIS > itself). > > See: http://www.php.net/manual/en/install.windows.iis7.php for a > detailed explanation about the FastCGI setup. > > Cheers, > -- > Pierre > > @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
From: "Morris" on 12 Feb 2010 06:50 Hi Everyone. Thanks to all of you for the great input here. I will give a step by step of what I am doing now. Platform is Windows 2008 R2 standard 64bit with all updates installed. I deleted the php folder on the c:\ drive. I removed the filters and mapping on IIS I deleted the registry setting hklm\software\php I created the environment variable path values c:\php and c:\php\ext as suggested on some sites. I went to http://www.microsoft.com/web/downloads/platform.aspx to install php but cannot find it there. I went to http://www.microsoft.com/web/gallery/install.aspx?appsxml=&appid=PHP%3bPHP%3bPHP and tried it from from there. Here I received the comment that I can install php 5.2.12. I selected it and clicked install and accept. It installed successfully. (it must have been the collective auro from this forum helping it to get installed cause I promise I tried this about 5 times before and it never wanted to install.) I went to control panel, programs and confirmed php was installed. I noticed that the php was install under program files on the c drive which a lot of people are saying is wrong. but for now I will leave it there. I opened a command prompt and went to the php folder and ran "php -info" and received the output which seems to show it is working. I opened php.ini and changed the settings as suggested as per http://www.php.net/manual/en/install.windows.iis7.php I opened IIS to check the handler mapping and it was configured as suggested. The hotfix/update I saw on http://www.microsoft.com/downloads/details.aspx?FamilyID=70278393-3291-4aa1-870b-0e9b0907bddf&DisplayLang=en. I could not isntall it as it complained about the installer service not working. I tried to install the administration pack from http://www.iis.net/expand/AdministrationPack which tells me it is not supported on my platform. That is where I am at the moment and still a no go. I will try Don's troubleshooting page next. As soon as I have this resolved I will post here. "Venkat Raman Don" <Don.Raman(a)microsoft.com> wrote in message news:3FA2AD39E9964240B4E6DD4AE62E031B45319227(a)TK5EX14MBXC120.redmond.corp.microsoft.com... > Hi Morris, > > What hotfix you are talking about? There is none to my knowledge required > to run PHP. 32-bit PHP runs pretty well on 64-bit OS. This is what user > configure. Pierre has already provided you a link to install PHP on IIS7. > That should help. A recommended way of running PHP is using IIS FastCGI. > If you want to have bare minimum problem, please try Microsoft Web > Platform Installer. It will install PHP 5.2.12 for you. You can also go > through below blogs of mine where I have explained things in detail. In > particular go through the troubleshooting blog which will help you narrow > down the problem. An important point, if you prior to doing fresh > installation through Web Platform Installer or any other way, please > ensure that your current installation is totally wiped out from PHP > executable point of view as well as remove any handler mapping you have > done in IIS or any registry tweak you have done to load the INI files. > Here are the blog link: > > http://blogs.iis.net/donraman/archive/2009/10/07/installing-php-on-windows.aspx > http://blogs.iis.net/donraman/archive/2009/10/08/upgrading-to-php-5-3-an-easy-way.aspx > http://blogs.iis.net/donraman/archive/2009/11/15/troubleshooting-php-installation-on-windows.aspx > > Let me know in case you have any problem. > > Thanks, > Don. > > -----Original Message----- > From: Morris [mailto:morne(a)afridata.net] > Sent: Thursday, February 11, 2010 3:53 AM > To: php-windows(a)lists.php.net > Subject: Re: [PHP-WIN] 64-bit PHP binaries > > Thanks Pierre. I am going to redo it in the morning. Just a quick one if I > may. There is a hotfix from microsoft and some admin tools that is > suggested > should be installed. When I try to install it it says I have the incorrect > software version or operating system. have you come across this on your > travels with php installs on win2k8? > > "Pierre Joye" <pierre.php(a)gmail.com> wrote in message > news:fe05d1541002110249g4e70f80bifdf20624d441ce7e(a)mail.gmail.com... >> hi, >> >> On Thu, Feb 11, 2010 at 11:10 AM, Morne Fourie <morne(a)afridata.net> >> wrote: >> >>> Thanks, it is all getting a lot clearer now. However, there is still one >>> more problem. Initially when i deployed PHP on this server I used the >>> 5.3 >>> nts version but could not get it working. If i ran the cammand line i >>> could >>> see it was working but it would not deliver the pages via a webbrowser. >>> As >>> per my earlier post i get a dot net error. This brought me to the point >>> where i started thinking this is a 64bit issue. I also stated earlier >>> that i >>> think there is a setting that is not configured and that is not on the >>> documentation and that is why it is not working. I however have been >>> unable >>> to figure out where the problem is. There is a lot of mention of running >>> a >>> command on IIS to get it to run as a 32bit version. Is this true? >> >> I run x86 php on my IIS x64 windows just fine (2k3/2k8/2k8R2). There >> was some extra setting before with the ISAPI, but it is not required >> anymore as it runs through FastCGI (different process than IIS >> itself). >> >> See: http://www.php.net/manual/en/install.windows.iis7.php for a >> detailed explanation about the FastCGI setup. >> >> Cheers, >> -- >> Pierre >> >> @pierrejoye | http://blog.thepimp.net | http://www.libgd.org > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
From: "Morris" on 15 Feb 2010 08:13 Herewith my troubleshooting as per Don's troubleshooting guide: C:\>%WINDIR%\system32\inetsrv\appcmd.exe list config /section:fastcgi /text:* CONFIG CONFIG.SECTION:"system.webServer/fastCgi" path:"MACHINE/WEBROOT/APPHOST" overrideMode:"Inherit" locked:"false" [system.webServer/fastCgi] [application] fullPath:"C:\Program Files (x86)\PHP\php-cgi.exe" arguments:"" monitorChangesTo:"" stderrMode:"ReturnStdErrIn500" maxInstances:"4" idleTimeout:"300" activityTimeout:"300" requestTimeout:"600" instanceMaxRequests:"10000" signalBeforeTerminateSeconds:"0" protocol:"NamedPipe" queueLength:"1000" flushNamedPipe:"false" rapidFailsPerMinute:"10" [environmentVariables] [environmentVariable] name:"PHP_FCGI_MAX_REQUESTS" value:"10000" [environmentVariable] name:"PHPRC" value:"C:\Program Files (x86)\PHP\" C:\>%WINDIR%\system32\inetsrv\appcmd.exe list config /section:handlers /text:* | findstr /i PHP name:"PHP_via_FastCGI" path:"*.php" scriptProcessor:"C:\Program Files (x86)\PHP\php-cgi.exe" I could not do the following as IIS is not serving the pages: <?php echo 'This is my first PHP program'; ?> Please name the above file as 'test.php' in your webroot folder (PHP SERVER variable _SERVER["DOCUMENT_ROOT]") and save it. I will be using 'C:\inetpub\wwwroot' as this is my webroot folder and also the place where my PHP_SERVER variable _SERVER["DOCUMENT_ROOT"] is set. When I run the following command I get the error below: C:\>"C:\Program Files (x86)\PHP\php-cgi.exe" -v PHP 5.2.12 (cgi-fcgi) (built: Dec 16 2009 16:57:38) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies When I run the following command I get the error below: C:\>"C:\Program Files (x86)\PHP\php-cgi.exe" C:\webcontent\test.mysite.com\test.php X-Powered-By: PHP/5.2.12 Content-type: text/html This is my first PHP program When I ran the above two commands I got the error "The program can't start because msvcr71.dll is missing from you computer. Try re-installing the program to fix this problem." and fixed it by searching for the missing file and copying it to the c:\windows\syswow64 directory. After that the error disappeared. I think it is because MSSQL may be enabled in the php.ini file. It is a minor issue so I will not worry about it. When I ping'ed the localhost from the command prompt I received the following which is worrying. It is not configured in the hosts file so why is it resolving like this? C:\>ping localhost Pinging MYSERVERNAME [::1] with 32 bytes of data: Reply from ::1: time<1ms Reply from ::1: time<1ms Reply from ::1: time<1ms Reply from ::1: time<1ms Ping statistics for ::1: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms When I ping the website I configured it resolves the correct IP address. This site can serve asp and html pages. C:\>ping test.mysite.com Pinging test.mysite.com [10.50.0.71] with 32 bytes of data: Reply from 10.50.0.71: bytes=32 time<1ms TTL=128 Reply from 10.50.0.71: bytes=32 time<1ms TTL=128 Reply from 10.50.0.71: bytes=32 time<1ms TTL=128 Reply from 10.50.0.71: bytes=32 time<1ms TTL=128 Ping statistics for 10.50.0.71: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms I did not go through all the testing for the default site as it does not exist anymore. The site is custom configured and it does serve html and asp pages without problems. When I run "%WINDIR%\system32\inetsrv\appcmd.exe list site" I get the following: SITE "test.mysite.com" (id:7,bindings:http/10.50.0.71:80:test.mysite.com,state:Started) When I run "%WINDIR%\system32\inetsrv\appcmd.exe list vdirs" I get the following: VDIR "test.mysite.com/" (physicalPath:C:\webcontent\test.mysite.com) So far no solution. I personally think it is IIS that does not hand off the php request to the php executable.
From: "Morris" on 15 Feb 2010 08:25 I am Starting to have a senaly suspicion that fascgi is not working correctly. Is there a way I can test this and where should the dlls be located for it? ""Morris"" <morne(a)afridata.net> wrote in message news:62.70.09468.668497B4(a)pb1.pair.com... > Herewith my troubleshooting as per Don's troubleshooting guide: > > C:\>%WINDIR%\system32\inetsrv\appcmd.exe list config /section:fastcgi > /text:* > CONFIG > CONFIG.SECTION:"system.webServer/fastCgi" > path:"MACHINE/WEBROOT/APPHOST" > overrideMode:"Inherit" > locked:"false" > [system.webServer/fastCgi] > [application] > fullPath:"C:\Program Files (x86)\PHP\php-cgi.exe" > arguments:"" > monitorChangesTo:"" > stderrMode:"ReturnStdErrIn500" > maxInstances:"4" > idleTimeout:"300" > activityTimeout:"300" > requestTimeout:"600" > instanceMaxRequests:"10000" > signalBeforeTerminateSeconds:"0" > protocol:"NamedPipe" > queueLength:"1000" > flushNamedPipe:"false" > rapidFailsPerMinute:"10" > [environmentVariables] > [environmentVariable] > name:"PHP_FCGI_MAX_REQUESTS" > value:"10000" > [environmentVariable] > name:"PHPRC" > value:"C:\Program Files (x86)\PHP\" > > > > C:\>%WINDIR%\system32\inetsrv\appcmd.exe list config /section:handlers > /text:* | findstr /i PHP > name:"PHP_via_FastCGI" > path:"*.php" > scriptProcessor:"C:\Program Files (x86)\PHP\php-cgi.exe" > > > > I could not do the following as IIS is not serving the pages: > > <?php > echo 'This is my first PHP program'; > ?> > > Please name the above file as 'test.php' in your webroot folder (PHP > SERVER variable _SERVER["DOCUMENT_ROOT]") and save it. I will be using > 'C:\inetpub\wwwroot' as this is my webroot folder and also the place where > my PHP_SERVER variable _SERVER["DOCUMENT_ROOT"] is set. > > > > When I run the following command I get the error below: > > C:\>"C:\Program Files (x86)\PHP\php-cgi.exe" -v > PHP 5.2.12 (cgi-fcgi) (built: Dec 16 2009 16:57:38) > Copyright (c) 1997-2009 The PHP Group > Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies > > > When I run the following command I get the error below: > > C:\>"C:\Program Files (x86)\PHP\php-cgi.exe" > C:\webcontent\test.mysite.com\test.php > X-Powered-By: PHP/5.2.12 > Content-type: text/html > > This is my first PHP program > > When I ran the above two commands I got the error "The program can't start > because msvcr71.dll is missing from you computer. Try re-installing the > program to fix this problem." and fixed it by searching for the missing > file and copying it to the c:\windows\syswow64 directory. After that the > error disappeared. I think it is because MSSQL may be enabled in the > php.ini file. It is a minor issue so I will not worry about it. > > When I ping'ed the localhost from the command prompt I received the > following which is worrying. It is not configured in the hosts file so why > is it resolving like this? > > C:\>ping localhost > > Pinging MYSERVERNAME [::1] with 32 bytes of data: > Reply from ::1: time<1ms > Reply from ::1: time<1ms > Reply from ::1: time<1ms > Reply from ::1: time<1ms > > Ping statistics for ::1: > Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), > Approximate round trip times in milli-seconds: > Minimum = 0ms, Maximum = 0ms, Average = 0ms > > When I ping the website I configured it resolves the correct IP address. > This site can serve asp and html pages. > > C:\>ping test.mysite.com > > Pinging test.mysite.com [10.50.0.71] with 32 bytes of data: > Reply from 10.50.0.71: bytes=32 time<1ms TTL=128 > Reply from 10.50.0.71: bytes=32 time<1ms TTL=128 > Reply from 10.50.0.71: bytes=32 time<1ms TTL=128 > Reply from 10.50.0.71: bytes=32 time<1ms TTL=128 > > Ping statistics for 10.50.0.71: > Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), > Approximate round trip times in milli-seconds: > Minimum = 0ms, Maximum = 0ms, Average = 0ms > > > I did not go through all the testing for the default site as it does not > exist anymore. The site is custom configured and it does serve html and > asp pages without problems. > When I run "%WINDIR%\system32\inetsrv\appcmd.exe list site" I get the > following: > > SITE "test.mysite.com" > (id:7,bindings:http/10.50.0.71:80:test.mysite.com,state:Started) > > > When I run "%WINDIR%\system32\inetsrv\appcmd.exe list vdirs" I get the > following: > > VDIR "test.mysite.com/" (physicalPath:C:\webcontent\test.mysite.com) > > > So far no solution. I personally think it is IIS that does not hand off > the php request to the php executable. > > > > > > > > > > > > > > > > > > > > > >
From: Richard Quadling on 15 Feb 2010 08:32
On 15 February 2010 13:25, Morris <morne(a)afridata.net> wrote: > I am Starting to have a senaly suspicion that fascgi is not working > correctly. Is there a way I can test this and where should the dlls be > located for it? > > ""Morris"" <morne(a)afridata.net> wrote in message > news:62.70.09468.668497B4(a)pb1.pair.com... >> >> Herewith my troubleshooting as per Don's troubleshooting guide: >> >> C:\>%WINDIR%\system32\inetsrv\appcmd.exe list config /section:fastcgi >> /text:* >> CONFIG >>  CONFIG.SECTION:"system.webServer/fastCgi" >>  path:"MACHINE/WEBROOT/APPHOST" >>  overrideMode:"Inherit" >>  locked:"false" >>  [system.webServer/fastCgi] >>  [application] >>   fullPath:"C:\Program Files (x86)\PHP\php-cgi.exe" >>   arguments:"" >>   monitorChangesTo:"" >>   stderrMode:"ReturnStdErrIn500" >>   maxInstances:"4" >>   idleTimeout:"300" >>   activityTimeout:"300" >>   requestTimeout:"600" >>   instanceMaxRequests:"10000" >>   signalBeforeTerminateSeconds:"0" >>   protocol:"NamedPipe" >>   queueLength:"1000" >>   flushNamedPipe:"false" >>   rapidFailsPerMinute:"10" >>   [environmentVariables] >>    [environmentVariable] >>     name:"PHP_FCGI_MAX_REQUESTS" >>     value:"10000" >>    [environmentVariable] >>     name:"PHPRC" >>     value:"C:\Program Files (x86)\PHP\" >> >> >> >> C:\>%WINDIR%\system32\inetsrv\appcmd.exe list config /section:handlers >> /text:* | findstr /i PHP >>   name:"PHP_via_FastCGI" >>   path:"*.php" >>   scriptProcessor:"C:\Program Files (x86)\PHP\php-cgi.exe" >> >> >> >> I could not do the following as IIS is not serving the pages: >> >> <?php >> echo 'This is my first PHP program'; >> ?> >> >> Please name the above file as 'test.php' in your webroot folder (PHP >> SERVER variable _SERVER["DOCUMENT_ROOT]") and save it. I will be using >> 'C:\inetpub\wwwroot' as this is my webroot folder and also the place where >> my PHP_SERVER variable _SERVER["DOCUMENT_ROOT"] is set. >> >> >> >> When I run the following command I get the error below: >> >> C:\>"C:\Program Files (x86)\PHP\php-cgi.exe" -v >> PHP 5.2.12 (cgi-fcgi) (built: Dec 16 2009 16:57:38) >> Copyright (c) 1997-2009 The PHP Group >> Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies >> >> >> When I run the following command I get the error below: >> >> C:\>"C:\Program Files (x86)\PHP\php-cgi.exe" >> C:\webcontent\test.mysite.com\test.php >> X-Powered-By: PHP/5.2.12 >> Content-type: text/html >> >> This is my first PHP program >> >> When I ran the above two commands I got the error "The program can't start >> because msvcr71.dll is missing from you computer. Try re-installing the >> program to fix this problem." and fixed it by searching for the missing file >> and copying it to the c:\windows\syswow64 directory. After that the error >> disappeared. I think it is because MSSQL may be enabled in the php.ini file. >> It is a minor issue so I will not worry about it. >> >> When I ping'ed the localhost from the command prompt I received the >> following which is worrying. It is not configured in the hosts file so why >> is it resolving like this? >> >> C:\>ping localhost >> >> Pinging  MYSERVERNAME [::1] with 32 bytes of data: >> Reply from ::1: time<1ms >> Reply from ::1: time<1ms >> Reply from ::1: time<1ms >> Reply from ::1: time<1ms >> >> Ping statistics for ::1: >>  Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), >> Approximate round trip times in milli-seconds: >>  Minimum = 0ms, Maximum = 0ms, Average = 0ms >> >> When I ping the website I configured it resolves the correct IP address. >> This site can serve asp and html pages. >> >> C:\>ping test.mysite.com >> >> Pinging test.mysite.com [10.50.0.71] with 32 bytes of data: >> Reply from 10.50.0.71: bytes=32 time<1ms TTL=128 >> Reply from 10.50.0.71: bytes=32 time<1ms TTL=128 >> Reply from 10.50.0.71: bytes=32 time<1ms TTL=128 >> Reply from 10.50.0.71: bytes=32 time<1ms TTL=128 >> >> Ping statistics for 10.50.0.71: >>  Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), >> Approximate round trip times in milli-seconds: >>  Minimum = 0ms, Maximum = 0ms, Average = 0ms >> >> >> I did not go through all the testing for the default site as it does not >> exist anymore. The site is custom configured and it does serve html and asp >> pages without problems. >> When I run "%WINDIR%\system32\inetsrv\appcmd.exe list site" I get the >> following: >> >> SITE "test.mysite.com" >> (id:7,bindings:http/10.50.0.71:80:test.mysite.com,state:Started) >> >> >> When I run "%WINDIR%\system32\inetsrv\appcmd.exe list vdirs" I get the >> following: >> >> VDIR "test.mysite.com/" (physicalPath:C:\webcontent\test.mysite.com) >> >> >> So far no solution. I personally think it is IIS that does not hand off >> the php request to the php executable. >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Can you try ... "C:\Program Files (x86)\PHP\php-cgi.exe" -n -m and then ... "C:\Program Files (x86)\PHP\php-cgi.exe" -m and then ... "C:\Program Files (x86)\PHP\php-cgi.exe" -n -i | find /i "extension build" and finally ... "C:\Program Files (x86)\PHP\php-cgi.exe" -n -f C:\webcontent\test.mysite.com\test.php Can you report each of these please? I'm wondering if you've got an extension which is not for the same version of PHP? -- ----- Richard Quadling "Standing on the shoulders of some very clever giants!" EE : http://www.experts-exchange.com/M_248814.html EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling |