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: Need help getting PHP 5 to work with Apache 2.2 on XP Pro SP
Author
tibberous



Joined: 13 May 2006
Posts: 1

PostPosted: Sat 13 May '06 1:11    Post subject: Need help getting PHP 5 to work with Apache 2.2 on XP Pro SP Reply with quote

I added these lines to my httpd.conf file:

LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php

I added c:\php to my system path variable.

... but the server will not start. I checked the error log, but it doesn't give any kind of error code. The path is right, the versions are right, is there something I am missing?

I'd even be happy if I could get some kind of helpful error message.

Thanks for any help, this really has me stumped.
Back to top
Steffen
Moderator


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

PostPosted: Sat 13 May '06 2:39    Post subject: Reply with quote

Which version of Apache you are running ?

When you start Apache with Debug:

httpd.exe -e debug or for apache 2.0.x apache.exe -e debug

What is the error message you get ?

Steffen
Back to top
James Blond
Moderator


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

PostPosted: Sat 13 May '06 9:40    Post subject: Reply with quote

At first I would say, there is a line missing before loading the module

LoadFile "C:/php/php5ts.dll"
Back to top
mphare



Joined: 12 May 2006
Posts: 43
Location: Texas

PostPosted: Mon 15 May '06 16:46    Post subject: Reply with quote

I don't have a 'LoadFile' line in my conf file.

I run Apache 2.2.2 with PHP 5.1.4. Be usre you are using the 'php5apache2.dll' you can find on this site. Mine didn't work until I downloaded that module. The version that ships with 5.1.x didn't work with 2.2.2.

My conf looks like:
Code:
#------------------------------------------
# -- php5 --
LoadModule php5_module "c:/Programs/php/php5apache2.dll"
AddType application/x-httpd-php .php

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


I didn't add anything to my system Path for finding the php.ini file. The 'PHPIniDIr' line in the conf does that.

I also added index.php to the 'DirectoryIndex' directive.

Code:
<IfModule dir_module>
#    DirectoryIndex index.html
#----------------------------
    DirectoryIndex index.html index.php index.html.var
#----------------------------
</IfModule>


That's the only php related changes I made to my conf file.
Back to top
James Blond
Moderator


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

PostPosted: Mon 15 May '06 17:50    Post subject: Reply with quote

I download PHP 5.1.4 form www.php.net/downloads.php (zip + pecl)
Downloaded the Module form this page. replaced the php5apache2.dll
and copied httpd.exe.manifest to apache\bin folder.

my config
Code:

PHPIniDir "/server2/php"
LoadFile "/server2/php/php5ts.dll"
LoadModule php5_module "/server2/php/php5apache2.dll"
AddType application/x-httpd-php .php


(I know that the Driveletter is missing, but this is a trick to use it on a usb-stick. The Path could be C:\server2\php and C:\server2\apache\bin )
Back to top
mphare



Joined: 12 May 2006
Posts: 43
Location: Texas

PostPosted: Mon 15 May '06 17:57    Post subject: Reply with quote

What does php5ts.dll do?
My install seems to be working fine without it.
Back to top
James Blond
Moderator


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

PostPosted: Mon 15 May '06 19:15    Post subject: Reply with quote

You're right. PHP5 will work without loading php5ts.dll early versions from PHP5 needed it. I took a look in the manual. And now it is not needed anymore. My fault. Sorry
Back to top
mphare



Joined: 12 May 2006
Posts: 43
Location: Texas

PostPosted: Mon 15 May '06 19:54    Post subject: Reply with quote

No problem for me... I just wanted to be sure I was missing something..
Back to top
fonfi



Joined: 18 Jan 2006
Posts: 5
Location: Poland

PostPosted: Mon 15 May '06 21:21    Post subject: Re: Need help getting PHP 5 to work with Apache 2.2 on XP Pr Reply with quote

tibberous wrote:


I'd even be happy if I could get some kind of helpful error message.



check in system logs (start->run and type "eventvwr") in "application" branch - I find there a lot of hints...
Back to top


Reply to topic   Topic: Need help getting PHP 5 to work with Apache 2.2 on XP Pro SP View previous topic :: View next topic
Post new topic   Forum Index -> Other Software