logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Other Software View previous topic :: View next topic
Reply to topic   Topic: Windows 64 bit builds of Apache and PHP
Author
pjduplooy



Joined: 12 May 2012
Posts: 11

PostPosted: Sat 21 Jul '12 13:49    Post subject: Windows 64 bit builds of Apache and PHP Reply with quote

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

PostPosted: Sat 21 Jul '12 13:52    Post subject: Reply with quote

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: 7288
Location: Germany, Next to Hamburg

PostPosted: Mon 23 Jul '12 10:32    Post subject: Re: Windows 64 bit builds of Apache and PHP Reply with quote

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 Wink
Back to top
pjduplooy



Joined: 12 May 2012
Posts: 11

PostPosted: Mon 23 Jul '12 10:38    Post subject: Reply with quote

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: 7288
Location: Germany, Next to Hamburg

PostPosted: Mon 23 Jul '12 11:22    Post subject: Reply with quote

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

PostPosted: Mon 11 Aug '14 3:35    Post subject: Bug in previous post Reply with quote

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: 7288
Location: Germany, Next to Hamburg

PostPosted: Mon 11 Aug '14 15:37    Post subject: Re: Bug in previous post Reply with quote

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

PostPosted: Fri 13 Jan '17 11:10    Post subject: Reply with quote

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


Reply to topic   Topic: Windows 64 bit builds of Apache and PHP View previous topic :: View next topic
Post new topic   Forum Index -> Other Software