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: Apache 2.4.10 64bit fails to start with PHP 5.6.2 32bit
Author
KARichardson



Joined: 03 Nov 2014
Posts: 3

PostPosted: Mon 03 Nov '14 17:34    Post subject: Apache 2.4.10 64bit fails to start with PHP 5.6.2 32bit Reply with quote

System:
Windows 8.1 64-bit

Visual C++ Redist:
2005, 2008, 2010, 2012, 2013
Installed vcredist_x64.exe
Installed vcredist_x86.exe

Apache:
Installed httpd-2.4.10-win64-VC11 (main focus)
Installed httpd-2.4.10-win32-VC11
C:/Apache/httpd/x64/Apache24
C:/Apache/httpd/x86/Apache24

PHP (Thread Safe):
Installed php-5.3.29-Win32-VC9-x86
Installed php-5.4.34-Win32-VC9-x86
Installed php-5.5.18-Win32-VC11-x86
Installed php-5.6.2-Win32-VC11-x86 (main focus)
C:/Program Files (x86)/PHP/v5.6/

Hello. Okay, so I am pretty new to installing and configuring the latest version of Apache and PHP on my system. I found a video on youtube called "Install Apache 2.4 PHP 5.4 on Windows 8 PC" and i followed those instructions as a guideline. I got all the way in the video to 13:50 and tried to start the Apache service but i get "The request operation has failed" error. I tried to debug the issue by opening the command prompt "Run as Administrator" and ran the following command: "httpd.exe -e debug", and i got this:

C:\Apache\httpd\x64\Apache24\bin>httpd.exe -e debug
...
...
[Modules loaded fine]
...
...
httpd.exe: Syntax error on line 177 of C:/Apache/httpd/x64/Apache24/conf/httpd.conf: Cannot load C:/Program Files (x86)/PHP/v5.6/php5apache2_4.dll into server: %1 is not a valid Win32 application.



I back traced my steps in the video to the first time i got my first error during the service install and i recall this on the service install with the 64-bit service:

C:\Apache\httpd\x64\Apache24\bin>httpd.exe -k install
Installing the Apache 2.4 service
The Apache 2.4 service is successfully installed.
Testing httpd.conf....
Errors reported here must be corrected before the service can be started.
httpd.exe: Syntax error on line 177 of C:/Apache/httpd/x64/Apache24/conf/httpd.conf: Cannot load C:/Program Files (x86)/PHP/v5.6/php5apache2_4.dll into server: %1 is not a valid Win32 application.



I then tried uninstalling the 64bit Apache service and tried installing the service using the 32-bit service and got this:

C:\Apache\httpd\x86\Apache24\bin>httpd.exe -k install
Installing the Apache 2.4 service
The Apache 2.4 service is successfully installed.
Testing httpd.conf....
Errors reported here must be corrected before the service can be started.
AH00526: Syntax error on line 533 of C:/Apache/httpd/x86/Apache24/conf/httpd.conf:
PHPINIDir takes one argument, Directory containing the php.ini file



Any help or feedback in understanding would be greatly appreciated?

Thanks.
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Mon 03 Nov '14 20:55    Post subject: Reply with quote

You cannot load a 32bit module into a 64bit Apache.

Jan has 5.6.2 64bit builds of PHP if you want to try
php-5.6.2-Win32-VC11-x64.zip

See Jan's post here
http://www.apachelounge.com/viewtopic.php?t=6123
Back to top
wm003



Joined: 24 Mar 2006
Posts: 88

PostPosted: Tue 04 Nov '14 11:30    Post subject: Reply with quote

If you use fcgi instead of mod_php then you can still use php 32 Bit together with apache 64-bit.
Back to top
KARichardson



Joined: 03 Nov 2014
Posts: 3

PostPosted: Tue 04 Nov '14 19:32    Post subject: Reply with quote

Thanks for the inputs.

To be honest, I was a little hesitate to install any of the x64 (64-bit) builds of PHP. I noted on the windows.php.net site that the x64 were experimental builds. So, I wanted a more stable version of PHP which I assumed would be the x86 (32-bit) builds.

Does anyone know if they've tried the x64 builds of PHP and have had success with no buggy issues that would make them revert back to the x86 builds?

I've seen some of these acronyms before (i.e., fcgi, etc...) but i'm not too familiar with these acronyms. I googled search fcgi php apache and found some links. So, I will read up on this.

But...May I ask, "what advantages/disadvantages does one gain/lose by using these mod versions versus the normal Apache/PHP installs?"

Appreciate your input/feedback again.

Thanks.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7288
Location: Germany, Next to Hamburg

PostPosted: Wed 05 Nov '14 11:12    Post subject: Reply with quote

For me I noticed that the x86 PHP builds are faster ( last test in autumn last year. might have changed) and the x64 wasn't always stable.

Many admin in the forum use PHP over f(ast)cgi(d). It is very stable and can run high performance. An example setup http://www.apachelounge.com/viewtopic.php?t=2394
Back to top
KARichardson



Joined: 03 Nov 2014
Posts: 3

PostPosted: Sun 09 Nov '14 5:55    Post subject: Reply with quote

To all that have responded, I appreciate your feedback and input and help in this topic.

So, I decided to install the x64-bit version of PHP on my machine. This turned out to be an interesting task for me. Even with the install of the x64-bit PHP version, I still had issues starting up Apache which drove me nuts for the last couple of days of trying to figure out what else could be causing the problem. Then I finally decided to comment out the PHP modules and just get Apache running first. Turns out that there was a binding problem on port 80. Didn't know how to figure out which software was using that same port. Found this command in one of the forums from google search:

netstat -aon | findstr 0.0:80

Come to find out, there was a port conflict on my machine. Seems my Apache and Oracle XE software were using the same port number. So, once I changed the port for Apache, I got it working and running. And then, I was able to successfully use PHP x64-bit version with Apache.

So, thanks again to everyone that help with his topic. I appreciate it very much.
Back to top


Reply to topic   Topic: Apache 2.4.10 64bit fails to start with PHP 5.6.2 32bit View previous topic :: View next topic
Post new topic   Forum Index -> Other Software