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: How do I diagnose setup issues between Apache2.4 and Php5.5?
Author
Dorian



Joined: 04 May 2014
Posts: 3
Location: UK

PostPosted: Sun 04 May '14 18:13    Post subject: How do I diagnose setup issues between Apache2.4 and Php5.5? Reply with quote

Good afternoon,

I am still very new to all this so this may be a very basic question. I tried searching the site and the web for info but failed.

I am running Apache 2.4.9 on windows, the Apache monitor works fine on its own. However, when I press 'Start' while trying to load the php module, I get the following error: 'Error: The requested operation has failed!'.

I am using php 5.5.12 (VC11, Thread Safe version, x86) (I previously tried 5.5.11 with the same results). For the Php install, I saved a copy of the developers's ini file as 'php.ini', activating the windows compatible extension line (apart from that I didn't change anything in the php folder).

In the Apache 2.4 httpd config file, I added 3 lines and changed the Directory index(I unsuccessfully tried using AddHandle instead of AddType):

# For PHP 5 do something like this:
LoadModule php5_module "c:/php/php5apache2_4.dll"
AddType application/x-httpd-php .php

# configure the path to php.ini
PHPIniDir "C:/php"

<IfModule dir_module>
DirectoryIndex index.php index.html
</IfModule>

Thank you for any advice you can send my way.

Kind Regards,
Dorian
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3059
Location: Hilversum, NL, EU

PostPosted: Sun 04 May '14 19:25    Post subject: Reply with quote

What is in the Apache error.log and/or Windows Event Viewer ?

Check if both Apache and PHP are the VC11 win32 or Win64 versions.

Preferred in httpd.conf:

LoadModule php5_module "c:/php/php5apache2_4.dll"
AddHandler application/x-httpd-php .php
PHPIniDir "C:/php"
Back to top
Dorian



Joined: 04 May 2014
Posts: 3
Location: UK

PostPosted: Sun 04 May '14 19:55    Post subject: Reply with quote

Hi Steffen

Thank you for your response.

I have now changed the line to AddHandler.

Apache and php are both VC11, though I have a Win32 version of php and a Win64 version of Apache. Do they both need to be win 32/64?

The error log gave the following warnings:

[Sun May 04 15:26:14.286949 2014] [core:warn] [pid 6568:tid 500] AH00098: pid file C:/Apache24/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sun May 04 15:26:14.329972 2014] [mpm_winnt:notice] [pid 6568:tid 500] AH00455: Apache/2.4.9 (Win64) configured -- resuming normal operations
[Sun May 04 15:26:14.329972 2014] [mpm_winnt:notice] [pid 6568:tid 500] AH00456: Apache Lounge VC11 Server built: Mar 16 2014 12:42:59
[Sun May 04 15:26:14.329972 2014] [core:notice] [pid 6568:tid 500] AH00094: Command line: 'C:\\Apache24\\bin\\httpd.exe -d C:/Apache24'
[Sun May 04 15:26:14.343976 2014] [mpm_winnt:notice] [pid 6568:tid 500] AH00418: Parent: Created child process 7164
[Sun May 04 15:26:14.847359 2014] [mpm_winnt:notice] [pid 7164:tid 464] AH00354: Child: Starting 64 worker threads.
[Sun May 04 15:42:57.726422 2014] [mpm_winnt:notice] [pid 6568:tid 500] AH00424: Parent: Received restart signal -- Restarting the server.
httpd.exe: Syntax error on line 531 of C:/Apache24/conf/httpd.conf: Cannot load c:/php/php5apache2_4.dll into server: %1 is not a valid Win32 application.
[Sun May 04 15:42:59.727660 2014] [mpm_winnt:notice] [pid 7164:tid 464] AH00364: Child: All worker threads have exited.
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3059
Location: Hilversum, NL, EU

PostPosted: Sun 04 May '14 20:20    Post subject: Reply with quote

Your combo does not work. Both need 32 or 64.

Try from windows.php.net the "VC11 x64 Thread Safe" version.
Back to top
Dorian



Joined: 04 May 2014
Posts: 3
Location: UK

PostPosted: Mon 05 May '14 16:10    Post subject: Reply with quote

Thank you. The problem is now fixed.

PS: I was previously wary of using the x64 version of php as it was marked as experimental. It is also marked as WIN32-VC11-x64 which I guess is an error in labling.
Back to top


Reply to topic   Topic: How do I diagnose setup issues between Apache2.4 and Php5.5? View previous topic :: View next topic
Post new topic   Forum Index -> Other Software