php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17826 PHP 4.2.1 Apache SAPI is not compatible with Apache 2.0.39
Submitted: 2002-06-18 23:45 UTC Modified: 2002-11-10 13:28 UTC
Votes:18
Avg. Score:4.6 ± 0.8
Reproduced:17 of 17 (100.0%)
Same Version:14 (82.4%)
Same OS:14 (82.4%)
From: jan at penninkhof dot com Assigned: edink (profile)
Status: Closed Package: Apache2 related
PHP Version: 4.2.1 OS: Win32
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
6 + 10 = ?
Subscribe to this entry?

 
 [2002-06-18 23:45 UTC] jan at penninkhof dot com
If PHP is used as a module in Apache 2.0.39 (via php4apache2.dll), Apache won't start and gives the following error message:

Apache.exe: module "c:\php4build\snap\sapi\apache2filter\sapi_apache2.c" is not compatible with this version of Apache.
Please contact the vendor for the correct version.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-19 00:44 UTC] kevin at west28 dot com
Same error on linux with version 2.0.39
 [2002-06-19 01:01 UTC] chris at dvdplaza dot com dot au
Encountered here as well on two different systems - upgrade Apache to the urgent security fix 2.0.39 and it fails claiming that php4apache2.dll is not compatible.  Remove PHP from httpd.conf and Apache2 is happy, but obviously useless :)
 [2002-06-19 01:28 UTC] mtmori at acc dot kumagaku dot ac dot jp
Since php.exe didn't occur this problem, I had changed
our httpd.conf to use PHP by ScriptAlias temporarily.
 [2002-06-19 01:30 UTC] imajes@php.net
if you wish to use apache2, please use cvs rather than 4.2.1.
 [2002-06-19 03:02 UTC] jan at penninkhof dot com
This issue also exists in the current version in CVS.

> if you wish to use apache2, please use cvs rather than 
> 4.2.1.
 [2002-06-19 03:44 UTC] marcel dot neuser at kumavision dot de
I'm experiencing the same problem with Apache 2.0.39 and PHP 4.2.1 under Win2K. Latest Cvs-version also doesn't work.
Since "Versions of the Apache web server up to and including 1.3.24 and 2.0 up to and including 2.0.36 contain a bug in the routines which deal with invalid requests which are encoded using chunked encoding..." I have to use
2.0.39...
 [2002-06-19 07:06 UTC] edink@php.net
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a documentation 
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.

You could also try http://ftp.proventum.net/pub/php/win32/php4.2.x-apache2.zip which might work with PHP 4.2.1.

The correct link for the cvs version is:
http://snaps.php.net/win32/php4-win32-latest.zip
 [2002-06-19 10:21 UTC] Joe at system03 dot freeserve dot co dot uk
Not only on windows systems, running this on Unix (redhat Linux) also produces this error:
httpd: module "sapi_apache2.c" is not compatible with this version of Apache
 [2002-06-19 11:10 UTC] dmiyachi at co dot sutter dot ca dot us
The lastest cvs version as refered by the [19 Jun 7:06am] edink@php.net entry is incomplete as it does not contain all the dll's in the /extensions directory including the php_pgsql.dll that I need to load.

On apache startup the following error msg are found in the Win2K event viewer:

1) Application popup: Warning : Unable to load dynamic library 'c:\php421\extensions/php_pgsql.dll' - The specified procedure could not be found.

2) Application popup: Apache.exe - Entry Point Not Found : The procedure entry point php_fopen_wrapper could not be located in the dynamic link library php4ts.dll.  

I've followed standard installation procedures as I have done with prior versions (4.2.1 for apache 2.36), but the latest 4.2.1 for apache 2.39 fails to install/run correctly because of the aforementioned errors.
 [2002-06-19 11:50 UTC] dmiyachi at co dot sutter dot ca dot us
Also, is this latest cvs version a fix for 4.2.1 or a development release?  

Displaying phpinfo() shows that the cvs version is 4.3.0-Dev, so are we now dealing with an unstable version?

Can someone change the status of this bug to Open based on my previous entry as well as this one?
 [2002-06-19 11:56 UTC] derick@php.net
It's a development version, but that doesn't really matter as Apache itself is not really stable either.

Derick
 [2002-06-20 08:53 UTC] davidpatrick at rogers dot com
as listed by edink@php.net
download this sapi
http://ftp.proventum.net/pub/php/win32/php4.2.x-apache2.zip
it will work with Apache 2.0.39 php 4.2.1 on win32
 [2002-06-23 04:33 UTC] antony dot seedhouse at ntlworld dot com
glad i decided to go through the bug database on php.net now, ive been looking for a fix for this for the last 30 mins, first i thought it was me goofing up, glad it isn't :)

i get same error with 2.0.39, 4.2.1 and WinXP, going to tryout the CVS now, im going to post this on the apache bug database as well as there are people there who haven't thought about coming here it looks like, i just noticed a comment about the CVS on the the install newsgroup now as well. updating the manual would be a good idea
 [2002-07-03 23:38 UTC] joeuser at nospam dot firenet dot net
I found this thread because it was posted as a source for the solution to the Apache 2.0.39 sapi compilation problem.  As I don't use Windoze, the links to Win32 binaries aren't helping me much.  It seems to me that after over 2 weeks of waiting for a patch or stable release, there is still no version (INCLUDING THE CVS, WHICH I TRY DAILY) that will compile properly under RedHat Linux 7.3 for me to use PHP+Apache 2.0.39.

"This bug has been fixed in CVS?"  I cannot even COMPILE the code.  I would feel much better if I could even compile a useless module that complains about being the wrong version, but every time I 'make', I get a sapi-related error!
 [2002-07-04 03:23 UTC] edink@php.net
The latest STABLE snapshot should work with Apache 2.0.39.
http://snaps.php.net/php4-STABLE-latest.tar.gz (source)
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip (windows binary)
 [2002-07-09 13:14 UTC] nakkid at msn dot com
i tried your CVS version and i experience a cookie timeout error. i'm automatically logged out if i run any bulletin board on my localhost.

php binary for windows (from the link above)
apache 2.0.39
mysql 4.01
 [2002-07-11 01:54 UTC] hubweb at hotmail dot com
Apache 2.0.39 and PHP 4.2.2-dev work together, BUT my PHP code isn't parsed !!! Problem here !
 [2002-07-11 12:12 UTC] hubweb at hotmail dot com
Forget it... that problem was caused by MSIE... what a surprise !
 [2002-07-13 10:49 UTC] baxant at cogeco dot ca
I use the CVS release and still I get errors. I run the test configuration and get 2 error windows instead of one like in the public release, and then Apache gets shut down by windows.

So anyone know when Apache 2.0.40 will be out and fix the PHP Dilemma that all of us are having???
 [2002-07-14 19:11 UTC] roach2010 at hotmail dot com
Thankyou very much.

I was just about to tear my hair out when i found a link to this page and finally I have managed to get Apache 2.0.39 to use the API thanks to the PHP/4.2.2-dev posted here.

This being my first encounter of Apache/PHP, I just assumed that I was doing something completely wrong.

Now I have no excuse for not reading the manual :(
 [2002-08-21 02:20 UTC] tongo at bossig dot com
Okay, exact same problem with Apache 2.0.4 and PHP 4.2.2. New php4apache.dll didn't help. Win2k SP2 for an os.
 [2002-08-21 06:26 UTC] DaRKoNe at MicroShit dot NL
Ok.. same problem here..

WinXP Pro
Apache 2.0.40
PHP 4.2.2

"Cannot load C:/php4/sapi/php4apache2.dll into server: The specified module could not be found."

Downloaded new php4apache2.dll.. didn't work.. So what's the next step ?
 [2002-08-23 12:40 UTC] doron at ben-david dot co dot il
Indeedlido :)...
same here...
XP pro, apache 2.0.40, latest php from the CVS.
same error:

C:\WINDOWS\system32>net start apache2
The Apache2 service is starting.
The Apache2 service could not be started.

A service specific error occurred: 1.

More help is available by typing NET HELPMSG 3547.
 [2002-08-23 15:34 UTC] leithal at cool-tools dot co dot uk
I'm getting this exact same error as well! Same setup as the last three posts.. Has anyone come across a solution for this yet?
 [2002-08-24 21:33 UTC] roman_alexandru_gabriel at otmail dot com
As the last three or four messages I have problems running Apache 2.0.40 with PHP 4.2.2. I use Windows XP Professional.
I tried to start Apache from the command prompt(interpreter) and this is the listing:

<--START OF LISTING-->
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\alex>net start apache2
The Apache2 service is starting.
The Apache2 service could not be started.

A service specific error occurred: 1.

More help is available by typing NET HELPMSG 3547.


C:\Documents and Settings\alex>NET HELPMSG 3547

A service specific error occurred: ***.


EXPLANATION

A service-specific error occurred.

ACTION

Refer to the Help or documentation for that service to determine the problem.
<--END OF LISTING-->

I do not know what could have caused this problem. If someone knows what is going on here... please help.
Thank you in advance!
 [2002-08-24 21:58 UTC] roman_alexandru_gabriel at hotmail dot com
Forget that. Sorry. I downloaded the latest version and it worked!!! You all should do the same.
 [2002-09-04 03:20 UTC] crazed at zonnet dot nl
Right..
It is now september...
I just dl'ed the latest (i may hope) php4.2.2 zipped distribution.

Running XP Pro
Apache 2.0.40

And i get this error in the application log:

The Apache service named  reported the following error:
>>> Cannot load G:/php-4/sapi/php4apache2.dll into server: Can't find stated procedure.

One would think this had been solved from what i read above...

Off to find "newer" releases now..
 [2002-10-02 22:11 UTC] Tim at vwgeek dot com
My version is doing same thing, 

cannot load C/PHP4/sapi/php4apache2.dll into server, specified procedure cannot be found

XP Pro SP1
Apache 2.0.42
PHP 4.2.3

I even tried the older version of the dll, no luck, I also tried to load the module directly into the modules directoy, no luck, does php4ts.dll need to be specified, as it always has to run/
Off to try that now.
Tim
 [2002-10-03 08:05 UTC] jhiltunen at genencor dot com
I have tried to get Apache 2.0.4.2 and PHP latest (tested many versions) working together, but I am not able to.  I get similar erros what everybody else here. 

After two hours googling, yahooing etc. I found apache2filter.dll from old 4.20 package, but that doesn't work either. I am stuck with new Apacje 2.0 version and I don't have a clue how I can get my Apache/MySQL/PHP server functioning (except roll-back from backups).

Apache developers should display warning that PHP doesn't work with Apache2 !
 [2002-10-03 19:12 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip


 [2002-10-04 00:02 UTC] kreynolds at guidecomm dot net
Sniper, the newest snapshot does not fix the problem here.  Apache_2.0.43 doesn't read the php4apache2.dll correctly.  Has anyone got this to work yet?
 [2002-10-04 00:30 UTC] jhiltunen at genencor dot com
Hello.

I figured this out. There is no other way than using a 2.0.36 version and apache2filter.dll ! That seems to work perfectly. Only problem is that where from you can find 2.0.36 version of the Apache. Here is location where from I downloaded it: http://apache.kr.net/dist/

I have now PHP 4.2.3, MySQL and Apache 2.0.36 up and running. I have done quite a few tests and I didn't face problems.

In httpd.conf you need just following lines:
LoadModule php4_module c:/www/bin/php4/experimental/apache2filter.dll

    DirectoryIndex index.php index.html index.html.var index.htm index.phtml index.php3 default.htm

AddType application/x-httpd-php .php .php3 .phtml .php4

That all you need. Apache2filter.dll might be also problematic to find, but I found it from older PHP distributions (4.2.0, see http://ftp.proventum.net/pub/php/win32/)

Greetings,

Jari Hiltunen, aka OH4BC
 [2002-10-05 10:58 UTC] me at jonsimpson dot co dot uk
after having some trouble with this myself on both apache 2.0.42 and 2.0.43 and finding this thread, i used just the php4apache2.dll file from 
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

with the rest of the files being php 4.2.3 ones, and it works perfectly now. havent seen any bugs so far.

hope this helps someone :)
 [2002-10-11 07:01 UTC] emchojin at hotmail dot com
Thank you for all the Help
Its working perfect with the php4apache2.dll from the Prerelease PHP Version 4.2.4 from 
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

But it take alot of time to find this Bugreport.
If you would add a little link from the Downloadpage of PHP to this Page, it would help many scared php-newbies like me ;)

Thanks for all the help
Chojin
 [2002-10-11 08:37 UTC] edink@php.net
PHP will work with whatever is current Apache version at the time of its release.

Newer versions of Apache2 often break backwards compatibility so php4apache2.dll will not work with them.

So either use the version of Apache that is supported by that PHP release, or use (almost) always current snapshot from http://snaps.php.net/win32/
 [2002-10-11 14:17 UTC] kronuz at email dot com
The problem with this message:
"Cannot load C:/php4/sapi/php4apache2.dll into server: The specified module could not be found."

Should be addressed as:

1. Install PHP/Apache
2. Copy required files from c:\php\dlls\ to c:\winnt\system32\
3. Grab the latest php snapSnap (http://snaps.php.net/win32/) 
4. Copy php4apache2.dll from the snap to c:php\sapi\ 
5. Copy php4ts.dll from the snap c:winnt\system32 
6. Edit Apache's configuration file and add:
    LoadModule php4_module c:/php/sapi/php4apache2.dll 
    AddType application/x-httpd-php .php .phtml 

That's it (probably many are just missing the php4ts.dll part)
 [2002-10-12 04:43 UTC] jhiltunen at genencor dot com
I confirm that Apache 2.0.43 and latest PHP4 php4apache2.dll works perfectly. However, I haven't heard about php4ts.dll ? What for is that ?

P.S. getting Tomcat 4.11 + Apache 2.0.43 + MySQL + PHP4 working together seems to be even more painfull that getting Apache 2 and PHP4 working together : )

Jari
 [2002-10-23 20:52 UTC] blalond at umich dot edu
If you're getting 
"Cannot load C:/php4/sapi/php4apache2.dll into server: The specified module could not be found."
  or
"apache: module "c:\php4build\snap\sapi\apache2filter\sapi_apache2.c" is not compatible with this version of Apache (found 20020628, need 20020903)."

I got it working and this is everything I did:

1. Download:
 a. Apache: apache_2.0.43-win32-x86-no_ssl.msi
 b. PHP: php-4.2.3-Win32.zip
 c. Latest PHP Snap: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

2. Install
    a. apache
    b. PHP (by upzipping and renaming dir to "c:\php"
2. Copy c:\php\php.ini-recommended to c:\windows\php.ini
3. Edit c:\php.ini
    -doc_root = [current apache doc root]
    -extension_dir = C:\php\extensions
4. Copy c:\php\php4ts.dll to c:\winnt\system32\
4. Copy php4apache2.dll from the c. Snap zip file to c:\php\sapi\ 
6. Edit Apache's configuration file and add:
    LoadModule php4_module c:/php/sapi/php4apache2.dll 
    AddType application/x-httpd-php .php
 [2002-11-02 21:28 UTC] phn737 at hotmail dot com
I have a question for the comment by:
[23 Oct 8:52pm] blalond@umich.edu 

You omit the following line in your httpd.conf:
   AddModule mod_php4.c

So how is the mod_php4.c module being loaded?

This is the error if AddModule is used:
C:\Apache2043\bin>apache -t
Syntax error on line 976 of C:/Apache2043/conf/httpd.conf:
Invalid command 'AddModule', perhaps mis-spelled or defined by a module not included in the server configuration

Thank you
 [2002-11-10 05:31 UTC] mclogiciel at btinternet dot com
What is the fix for this bug... ? Is there a new bug fix - I have the same error. What is the workaround and can somone answer the last entry. This error makes depressing reading. The snspsnap latest zip page is inaccessible at this moment. Why is this bug "closed" ?
 [2002-11-10 13:16 UTC] ender at unset dot net
I appreciate all the information posted on this bug, but does anyone know what's wrong with snaps.php.net?  I can't download the file that's referenced above, http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

Does anyone have any information on what's going on with snaps.php.net?
 [2002-11-10 13:28 UTC] imajes@php.net
snaps has moved server, and win32 snaps haven't been uploaded yet.

please bear with us as we fix this.

Thanks
 [2002-11-10 17:51 UTC] ender at unset dot net
FYI - The files referenced above are back online.  Thanks, imajes, for your quick response!
 [2002-11-13 06:51 UTC] mcdragon at email dot si
Thank you

The post:
[11 Oct 2:17pm] kronuz@email.com
did the trick for me. I had some problems that are explained at the http://bugs.php.net/bug.php?id=16575 page (read the mcdragon posts in november)

The trick with the latest (stable) snaps worked. I used the php4apache2.dll and the php4ts.dll
Interesting! I took the PHP download and the SNAP in the same day and the first had the modified date at the begin of sept 2002 and the snap had november 13th 2002 (TODAY).

In any case, thanks KRONUZ for the great help :-)))))))
 [2002-12-07 11:18 UTC] cis at cis dot net
When I use the SAPI DLL for PHP on W2K and Apache 2.0.43, I get nothing. :(

No errors anywhere I can see, but also no php processing. I know it's
'supposed' to be buggy, but I get nothing - not even an error.

I can load a .php page, but everything between the <?php and ?> shows up in
the page source.

If I use php-cgi.exe instead of php4apache2.dll, my pages work. But I have
an urgent need for the virtual() function and this only works in the dll
version of php.

Using apache -k start there are no errors. There are also no errors in
error.log. I've set php.ini to report errors, but there aren't ever any.

Anyone got an idea? My httpd.conf contains:

# PHP
LoadModule php4_module c:/php/sapi/php4apache2.dll
#AddModule mod_php4.c
AddType application/x-httpd-php .phtml .php .php3 .php4 .html

I've commented out the AddModule line for 2 reasons. One is that I have no
module called mod_php4.c - the other reason is that the docs say that it's
not required in the newer versions of Apache, especially Apache 2.

Bob Kramer
 [2002-12-13 05:18 UTC] vince at alkinos dot com
Hi,

Despite having done exactly what is explained in "[23 Oct 8:52pm] blalond@umich.edu" in this bug list, I still have "cannot load php4apache2.dll into server - The specified procedure cannot be found". 

Versions of apache and php are the same. The only thing is that I'm using Windows XP Pro SP1 with all windows updates... Download of php4-win32-STABLE-latest.zip
 was made today (buggy version?)
What's wrong???
Do I have to put php4ts.dll into the register datas???
DO I miss any specific XP Pro procedure?
I spent 3 hours on this and it still doesn't work.
Urgent help needed plz.
Thanks in advance.
Vince
 [2002-12-13 07:46 UTC] vince at alkinos dot com
OK,

corrected thanks to Edin:

# There is link on the front page:
# 
# http://snaps.php.net/~edink/php-4.3.0RC3-Win32.zip
# 
# Edin

Vince
 [2002-12-22 11:16 UTC] bodewes_NO_SPAM_ at fmf dot nl
Finaly!!!

I got i fixed!

I downloaded the latest from the website (rc4) from:
http://snaps.php.net/~edink/php-4.3.0RC4-Win32.zip

Just unzipped it and named it c:/php/

edited the http.conf in the way mentioned above
and edited the php.ini in the windows folder

And that only after 3 hours :P
 [2002-12-29 11:50 UTC] kemalcelayir at hotmail dot com
Apache 2.0.43 and PHP Version 4.3.1-dev work together. Most problems are because of PHP version.

http://snaps.php.net/win32/php4-win32-latest.zip

LoadModule php4_module c:/php/sapi/php4apache2.dll
AddType application/x-httpd-php .php .php3 .php4 .phtml

That's all.
 [2004-08-19 04:05 UTC] cp444 at nyu dot edu
I'm running on Windows XP and dont have the winnt directory.  I followed all the directions as posted previously but am still running into the command line: the specified module cannot be found.

I downloaded php5-win32-latest and am working on mysql-4.0.20d-win. Please advise.
 [2004-10-15 19:12 UTC] iris dot cdm at seznam dot cz
The same experience on:
PHP-4.3.9Win32
Apache-2.0.52-win32
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 00:01:41 2024 UTC