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.3 & PHP 5.4.7 configuration problem
Author
vasanthkumar



Joined: 16 Sep 2012
Posts: 5
Location: India, Chennai

PostPosted: Mon 17 Sep '12 9:27    Post subject: Apache 2.4.3 & PHP 5.4.7 configuration problem Reply with quote

Hi,

I have a problem to setup Apache 2.4.3 (32 bit) with PHP 5.4.7 (32 bit TS) running on Windows 7 x64.

I get the below error while running the httpd.exe :

F:\vasanth\MyWamp\apps\VC9\Apache24\bin>httpd
httpd: Syntax error on line 172 of
F:/vasanth/MyWamp/apps/VC9/Apache24/conf/httpd.conf:
Cannot load F:/vasanth/MyWamp/apps/VC9/php-5.4.7/php5apache2_4.dll
into server: The specified module could not be found.

No logs were created by the program.

Please help.

Vasanth
Back to top
Steffen
Moderator


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

PostPosted: Mon 17 Sep '12 12:37    Post subject: Reply with quote

Please recheck if you have the correct version of the php5apache2_4.dll and the correct path to it.

Instructions:
Code:
# Install:

- Copy php5apache2_4.dll to your php folder (eg. c:/php)


# Add to your httpd.conf

LoadModule php5_module "c:/php/php5apache2_4.dll"
AddHandler application/x-httpd-php .php

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

Note: Remember to substitute the c:/php for your actual path to PHP in the above example.
Back to top
vasanthkumar



Joined: 16 Sep 2012
Posts: 5
Location: India, Chennai

PostPosted: Mon 17 Sep '12 19:47    Post subject: Reply with quote

The same files work perfectly in my Windows 7 32bit laptop. Am facing problem only on Windows 7 64bit desktop.

VC9 & VC10 runtime for x86 is also installed in my desktop.

So definitely the configuration files are not the problem.

Any other options to check ?
Back to top
admin
Site Admin


Joined: 15 Oct 2005
Posts: 692

PostPosted: Mon 17 Sep '12 20:40    Post subject: Reply with quote

Check list:

- Use Win32 Apache 2.4.x from Apache Lounge and Visual Studio VC10 run-time

- Download Thread Safe (TS) version of php 5.4.x from http://windows.php.net/download/

- Be sure you installed for php the Visual Studio 2008 (VC9) run-time, see left column at http://windows.php.net/download/

- Download php5apache2_4.dll-php-5.4-win32.zip from Apache Lounge and use the correct version in the zip

- Follow the instructions in the Readme in the php5apache2_4.dll zip

- First try to run without php extensions !
Back to top
vasanthkumar



Joined: 16 Sep 2012
Posts: 5
Location: India, Chennai

PostPosted: Wed 19 Sep '12 10:03    Post subject: Reply with quote

I tried to run Apache without PHP extensions and I got this error :

====
F:\vasanth\MyWamp\apps\VC10\Apache24\bin>httpd
(OS 10048)Only one usage of each socket address (protocol/network address/port)
is normally permitted. : AH00072: make_sock: could not bind to address 127.0.0.
1:80
AH00451: no listening sockets available, shutting down
AH00015: Unable to open logs
====

I did a port scan and no applications access this port 80. When I run wampserver 2.2, apache works fine on the same port.

What's the next step ?
Back to top
vasanthkumar



Joined: 16 Sep 2012
Posts: 5
Location: India, Chennai

PostPosted: Wed 19 Sep '12 11:09    Post subject: Reply with quote

I replaced localhost with 127.0.0.1 and tried to run Apache and it started fine.

If I enable PHP extensions, then it does not work.
Back to top
James Blond
Moderator


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

PostPosted: Wed 19 Sep '12 14:00    Post subject: Reply with quote

Edit the extension_dir in your php.ini
Add the full path

e.g.
Code:

extension_dir = "C:\php\ext"
Back to top
vasanthkumar



Joined: 16 Sep 2012
Posts: 5
Location: India, Chennai

PostPosted: Wed 19 Sep '12 17:26    Post subject: Reply with quote

To confirm my configuration :

1. http.conf

LoadModule php5_module "F:/vasanth/MyWamp/apps/php-5.4.7-Win32-VC9-x86/php5apache2_4.dll"
PHPIniDir "F:/vasanth/MyWamp/apps/php-5.4.7-Win32-VC9-x86"
SetEnv TMP "F:/vasanth/MyWamp/tmp"

2. php.ini

extension_dir = "F:\vasanth\MyWamp\apps\php-5.4.7-win32-VC9-X86\ext"

Please correct me if am wrong.
Back to top


Reply to topic   Topic: Apache 2.4.3 & PHP 5.4.7 configuration problem View previous topic :: View next topic
Post new topic   Forum Index -> Other Software