Author |
|
pjduplooy
Joined: 12 May 2012 Posts: 11
|
Posted: Sat 21 Jul '12 13:49 Post subject: Windows 64 bit builds of Apache and PHP |
|
|
Hi guys
I am planning to convert a 32 bit install of Apache to a 64 bit install. I would like to use option 4 (4. Apache64 with NTS PHP32 and FCGID64) from http://www.apachelounge.com/viewtopic.php?t=4481
I am a bit lost as what I have to do to change httpd.conf to have it use fcgid64 in order to have this 64 bit install.
Could one of you please have a look at my httpd.conf and php.ini in order to do this change. (The httpd.conf is from Apache 2.4.0, so please also tell me if there is anything to change for me being able to use Apache 2.4.2.
Suhosin for php is a nts safe version by the way (comes from NewEraCracker)
This is part of a ZPanel install.
Sorry for posting the code in here, but I could attach any files.
Admin note:
The conf file removed, see forum rules for use paste bin. |
|
Back to top |
|
pjduplooy
Joined: 12 May 2012 Posts: 11
|
Posted: Sat 21 Jul '12 13:52 Post subject: |
|
|
Sorry the php.ini did not copy and paste properly.
Admin note:
Also removed |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Mon 23 Jul '12 10:32 Post subject: Re: Windows 64 bit builds of Apache and PHP |
|
|
pjduplooy wrote: |
I am a bit lost as what I have to do to change httpd.conf to have it use fcgid64 in order to have this 64 bit install.
|
Change? You need to download and install the 64 bit apache and use the 64 bit version of mod_fcgid. http://www.apachelounge.com/download/win64/
Running a 64 bit or 32 application has nothing to do with a configuration file when it comes to apache |
|
Back to top |
|
pjduplooy
Joined: 12 May 2012 Posts: 11
|
Posted: Mon 23 Jul '12 10:38 Post subject: |
|
|
James
Sorry I meant how do I change the httpd.conf to reflect that I am using fcgid and not the apache php handler? Do I just add the entries as per example in the 64bit fcgid file? What do I remove? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Mon 23 Jul '12 11:22 Post subject: |
|
|
Here is an topic how to use both. Mod_php and fcgid
http://www.apachelounge.com/viewtopic.php?t=3430
if you only want to run fcgid just
remove
Code: |
LoadModule php5_module "c:/php5/php5apache2_2.dll"
AddHandler application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "c:/php5"
|
and add
Code: |
FcgidInitialEnv PHPRC "c:/php"
FcgidInitialEnv PATH "c:/php;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;"
FcgidInitialEnv SystemRoot "C:/Windows"
FcgidInitialEnv SystemDrive "C:"
FcgidInitialEnv TEMP "C:/WINDOWS/Temp"
FcgidInitialEnv TMP "C:/WINDOWS/Temp"
FcgidInitialEnv windir "C:/WINDOWS"
FcgidIOTimeout 64
FcgidConnectTimeout 16
FcgidMaxRequestsPerProcess 500
<Files ~ "\.php$>"
AddHandler fcgid-script .php
FcgidWrapper "c:/php/php-cgi.exe" .php
</Files>
|
|
|
Back to top |
|
eschulma
Joined: 08 Aug 2014 Posts: 1
|
Posted: Mon 11 Aug '14 3:35 Post subject: Bug in previous post |
|
|
A very helpful configuration post BUT there is a bug. One SHOULD NOT put double quotes around the name of the php-cgi.exe file in FcgidWrapper. At least on Windows 2012 and Apache 2.0.54, that prevented the exe from starting. Got lots of HTTP 500 errors and a massive headache before I figured it all out.
I realize this makes no sense, it may have to do with some of the path bugs that have been reported with FcgidWrapper and fixes that broke other things:
https://issues.apache.org/bugzilla/show_bug.cgi?id=51194
Hopefully, this will be patched in a later version. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Mon 11 Aug '14 15:37 Post subject: Re: Bug in previous post |
|
|
eschulma wrote: | At least on Windows 2012 and Apache 2.0.54, that prevented the exe from starting. Got lots of HTTP 500 errors and a massive headache before I figured it all out.
|
2.0 is out of order! Use 2.4! |
|
Back to top |
|
vee
Joined: 19 May 2012 Posts: 2 Location: TH
|
Posted: Fri 13 Jan '17 11:10 Post subject: |
|
|
James Blond wrote: | Here is an topic how to use both. Mod_php and fcgid
http://www.apachelounge.com/viewtopic.php?t=3430
if you only want to run fcgid just
remove
Code: |
LoadModule php5_module "c:/php5/php5apache2_2.dll"
AddHandler application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "c:/php5"
|
and add
Code: |
FcgidInitialEnv PHPRC "c:/php"
FcgidInitialEnv PATH "c:/php;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;"
FcgidInitialEnv SystemRoot "C:/Windows"
FcgidInitialEnv SystemDrive "C:"
FcgidInitialEnv TEMP "C:/WINDOWS/Temp"
FcgidInitialEnv TMP "C:/WINDOWS/Temp"
FcgidInitialEnv windir "C:/WINDOWS"
FcgidIOTimeout 64
FcgidConnectTimeout 16
FcgidMaxRequestsPerProcess 500
<Files ~ "\.php$>"
AddHandler fcgid-script .php
FcgidWrapper "c:/php/php-cgi.exe" .php
</Files>
|
|
Thank you for this post that help my PHP run in fast cgi mode.
However it is unable to load .user.ini in the folder that is deeper than 2 level.
Example:
If I put .user.ini in http://localhost this website root will be working.
but http://localhost/test/lv2/lv3 will not work.
Does anyone have this problem and how to fix? |
|
Back to top |
|