We help IT Professionals succeed at work.

How get Apache 2.2.15 service to start with PHP 5.3.2, Windows XP?

murrayhome
murrayhome used Ask the Experts™
on
On a localhost development configuration under Windows XP Pro (SP3), I cannot get Apache2.2.15  http service to start after I enable PHP 5.3.2 as a module.  Without PHP, Apache starts and works just fine; PHP itself works (from a command prompt).

I had had Apache 2.2.14 and an older PHP 5.2.x working happily together, supporting MySQL, phpMyAdmin, etc.  I uninstalled all that and instead:

(1) Installed Apache 2.2.15 from httpd-2.2.15-win32-x86-no_ssl.msi (also tried the openssl version when the former + PHP didn't work).  It's installed as a service for all users on port 80. And I'm running as Administrator. That worked just fine.

(2) Installed PHP 5.3.2 from php-5.3.2-Win32-VC6-x86.msi (thread safe version). As php.net says, with apache.org binaries, I used the VC6 version, not VC9.

Now the apache http service will not start. So of course I never got so far as to try a .php script in the browser.

When that failed, I uninstalled PHP and instead tried to use php-5.3.2-Win32-VC6-x86.zip and configure manually, starting with php.ini-development copied to php.ini and edited as below.

Of course I put the correct entries in Windows system environment variables PATH (starts with D:\Server\PHP\ext;D:\Server\PHP) and PHPRC (D:\Server\PHP).

File httpd.conf is what the Apache installer set up plus my edits in appropriate spots:
ServerName localhost:80
DocumentRoot "E:/htdocs"
<Directory "E:/htdocs">
LoadModule php5_module "D:/Server/PHP/php5apache2_2.dll"
PHPIniDir "D:/Server/PHP"
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

Open in new window


My edits to php.ini are:
extension_dir = "D:\Server\PHP\ext"
session.save_path = "E:\htdocs\tmp"

Open in new window

Above code snippet edited by quomodo re: http:#a33144943

Open in new window


I'm completely mystified as to what's wrong, but I'm beginning to believe there's a fundamental incompatibility between Apache 2.2.15 and PHP 5.3.2. Any ideas?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
Windows Event Viewer reports as follows... Application view:[CODE]Faulting application httpd.exe, version 2.2.15.0, faulting module unknown, version 0.0.0.0, fault address 0x0074f1a9.[/CODE]. And System view:[CODE][The Apache2.2 service terminated with service-specific error 1 (0x 1)./CODE]
Top Expert 2015

Commented:
do not reload php apache plugin in php.ini
it is not a PHP plugin like mysql or mbstring

Author

Commented:
Sorry, I unintentionally miscopied what my edits to php.ini are. I do NOT reload the apache plugin in php.ini; I'm not that inexperienced!  I started with php.ini-devlopement, renamed to php.ini of course. My only edits then to php.ini are:
[CODE]
extension_dir = "D:\Server\PHP\ext"
session.save_path = "E:\htdocs\tmp"
[/CODE]
Top Expert 2015

Commented:
check for other copies of php in your %PATH%

Author

Commented:
I find no copy of php.ini in any directory on my path other than D:\Server\PHP, which is where my PHP is installed.

[I checked using two nifty tools: (1) PathBreaker, which allows you to look at environment variables, and PATH in particular, in a format with one directory per line; and (2) Everything, which very quickly scans directories on all drives for a file name and lists all occurrences.]
Top Expert 2015
Commented:
look for php_*.dll - if there is any around your PHP may crash

Author

Commented:
I found a number of php_*.dll files in a MarvellMRU subdirectory of C:\Program Files.  They were for a separate apache server/client used to monitor a Marvell RAID array driver -- a driver which I do not have installed.

Curiously, though, that directory was not on my path. But nonetheless unintalling that Marvell utility now allows PHP 5.3.2 to work with Apache 2.2.15  loaded as a module in PHP.

Thanks!

Author

Commented:
I even was able to remove the PHP directory created from the .zip and use the PHP VC6 x86 Thread Safe.msi installer now.
Top Expert 2015

Commented:
unzipping to c:\PHP\ helps to avoid long paths and makes upgrade transparent.
MSI is not the best way to go.

Author

Commented:
The length of the path to PHP was never an issue: with the .msi installer, I used D:\Server\PHP.
Robert SilverSr. Software Engineer

Commented:
Where exactly do you get the file:
PHP 5.3.2 from php-5.3.2-Win32-VC6-x86.msi

I go on the php.net sites and find no such file for download. What is going on here????