Author |
|
tibberous
Joined: 13 May 2006 Posts: 1
|
Posted: Sat 13 May '06 1:11 Post subject: Need help getting PHP 5 to work with Apache 2.2 on XP Pro SP |
|
|
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
|
Posted: Sat 13 May '06 2:39 Post subject: |
|
|
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
|
Posted: Sat 13 May '06 9:40 Post subject: |
|
|
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
|
Posted: Mon 15 May '06 16:46 Post subject: |
|
|
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
|
Posted: Mon 15 May '06 17:50 Post subject: |
|
|
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
|
Posted: Mon 15 May '06 17:57 Post subject: |
|
|
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
|
Posted: Mon 15 May '06 19:15 Post subject: |
|
|
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
|
Posted: Mon 15 May '06 19:54 Post subject: |
|
|
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
|
Posted: Mon 15 May '06 21:21 Post subject: Re: Need help getting PHP 5 to work with Apache 2.2 on XP Pr |
|
|
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 |
|