php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24426 Apache Installation Doesn't Work
Submitted: 2003-06-30 17:44 UTC Modified: 2003-06-30 18:06 UTC
From: LouisGreen at pljg dot freeserve dot co dot uk Assigned:
Status: Not a bug Package: Apache related
PHP Version: 5.0.0b1 (beta1) OS: Windows XP Pro
Private report: No CVE-ID: None
 [2003-06-30 17:44 UTC] LouisGreen at pljg dot freeserve dot co dot uk
Description:
------------
I have tried without success to get php-5.0.0b1-Win32 installed. The web servers I have tried with are:

Apache 1.3.27
Apache 2.0.46

I tried following the PHP 4 instructions for installing PHP 5, both as a Module and CGI, but Apache refuses to start up. This is what I have put in to the config httpd.conf file for the server:

LoadModule php4_module C:/Apache2/PHP5/sapi/php4apache2.dll
AddType application/x-httpd-php .php

or

LoadModule php5_module C:/Apache2/PHP5/sapi/php4apache2.dll
AddType application/x-httpd-php .php

I have also copied the php4ts.dll file to the Windows/Winnt and system32 driectories. Also the php.ini file to the windows/winnt directory. Then when I start Apache, I get this error:

Syntax error on line 176 of C:/Apache2/conf/httpd.conf
Cannot load C:/Apache2/PHP5/sapi/php4apache2.dll into server. The specified module could not be found


-----------------------------------------------------------
I also tried PHP 4.3.2 and it on Apache 1.3.27 & 2.0.46 using:

#LoadModule php4_module C:/Apache2/PHP4/sapi/php4apache.dll
LoadModule php4_module C:/Apache2/PHP4/sapi/php4apache2.dll
AddType application/x-httpd-php .php

with success (of course using the right apache file and php4ts.dll).

I know I can get PHP 4 working with a clean install, but not PHP 5 :-S

Expected result:
----------------
To work :'(

Actual result:
--------------
Syntax error on line 176 of C:/Apache2/conf/httpd.conf
Cannot load C:/Apache2/PHP5/sapi/php4apache2.dll into server. The specified module could not be found

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-30 17:52 UTC] LouisGreen at pljg dot freeserve dot co dot uk
err, slight tpyo, but did do a complete refresh install of apache 1 and 2. And I did complete uninstalled and removed the old apache directory each time, so the remains of the old one left.

Should of typed for the working bit

#LoadModule php4_module C:/Apache/PHP4/sapi/php4apache.dll
LoadModule php4_module C:/Apache2/PHP4/sapi/php4apache2.dll
AddType application/x-httpd-php .php
 [2003-06-30 17:53 UTC] LouisGreen at pljg dot freeserve dot co dot uk
err, slight tpyo, but did do a complete refresh install of apache 1 and 2. And I did complete uninstalled and removed the old apache directory each time, so the remains of the old one left.

Should of typed for the working bit

#LoadModule php4_module C:/Apache/PHP4/sapi/php4apache.dll
LoadModule php4_module C:/Apache2/PHP4/sapi/php4apache2.dll
AddType application/x-httpd-php .php
 [2003-06-30 17:53 UTC] sniper@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

.
 [2003-06-30 18:04 UTC] LouisGreen at pljg dot freeserve dot co dot uk
php4apache2.dll
php4apache.dll


Is this not bundled as part PHP, because it fuses to work. The bundled instructions are only for PHP 4, not 5. I could spend time going thought dozens of news groups / forums and mailing list, looking for the answer, may even spend days chasing a wide goose. If there is ever likely a chance for a Windows Apache user to try/ debug PHP5, could u or somone please point me to some where more specific where I can get answer. Thanks
 [2003-06-30 18:06 UTC] sniper@php.net
If you had bothered to search the bug database, you'd know the answer already. Don't bother reopening, you're just wasting our time.


 [2003-07-01 04:56 UTC] igor at design dot rv dot ua
I've been tried to install php_5.0.0 beta1 under Windows XP Pro with Sp1 platform. Apache ver 1.3.6

I recieved one error, I can't fix it :
--------------------------------------------------
Syntax error on line 181 of "..."/apache/conf/httpd.conf
Can't locate API module structure 'php4_module' in file 
"..."/php4apache.dll
The filename, directory name, or volume id label syntax is incorrect.
--------------------------------------------------
#181 httpd.conf : 
LoadModule php4_module "..."/php4apache.dll
--------------------------------------------------
All about path's and need_2_load modules -- okey.
 [2003-07-06 02:29 UTC] psycode at adsl dot on dot net
I had the exact same problem with both the latest versions of apache (1 and 2) and php 4 and 5.


THERE IS A FIX!

For some reason, apache cannot find any non-.so files. No idea why, don't know if this was intentional. If you rename the sapi dll to .so, and update the httpd.conf as such, then it will detect it and work fine.

I don't know whos fault this is. If this is a permament change in apache, something should be put in the docs for php at least.
 [2004-04-15 20:49 UTC] callenstc at hotmail dot com
I had luck by simply changing the top PHP folder to 
c:\php.

then it magically worked!!!

so in your case move c:\apache2\PHP5 stuff all to
c:\php

update everything to match including extensions in php.ini if necessary
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 29 00:01:32 2024 UTC