php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5903 Compile fails with Apache 1.2.6 (Re: #3966)
Submitted: 2000-08-01 17:30 UTC Modified: 2000-08-04 18:46 UTC
From: nels at maei dot ca Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.0.1pl2 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: nels at maei dot ca
New email:
PHP Version: OS:

 

 [2000-08-01 17:30 UTC] nels at maei dot ca
This is the same bug as #3966, and is still present in PHP 4.0.1pl2.

I discovered the solution some time ago, but for some reason was unable
to edit my previous bug report.  I was prompted to submit this when I received 
e-mail notification that #3966 had been closed, but no action had been taken.

The problem only occurs with certain (older) Apache versions, though I don't know
which MODULE_MAGIC_NUMBER translates to which apache version.

Output from make:
----
mod_php4.c: In function `php_apache_log_message':
mod_php4.c:282: `requset_rec' undeclared (first use this function)
mod_php4.c:282: (Each undeclared identifier is reported only once
mod_php4.c:282: for each function it appears in.)
mod_php4.c:282: parse error before `)'
make[3]: *** [mod_php4.lo] Error 1
make[3]: Leaving directory `/usr/src/redhat/BUILD/php-4.0.1pl2/sapi/apache'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/redhat/BUILD/php-4.0.1pl2/sapi/apache'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/redhat/BUILD/php-4.0.1pl2/sapi'
make: *** [all-recursive] Error 1

The problem is due to a simple typo -- it should be "request_rec" rather than
"requset_rec".

Here's a patch for ~phpsrc/sapi/apache/mod_php4.c:

---- BEGIN mod_php4.c.patch ----
--- mod_php4.orig	Mon Jul 31 08:35:32 2000
+++ mod_php4.c	Mon Jul 31 08:58:24 2000
@@ -284,7 +284,7 @@
 #if MODULE_MAGIC_NUMBER >= 19970831
 		aplog_error(NULL, 0, APLOG_ERR | APLOG_NOERRNO, ((request_rec *) SG(server_context))->server, "%s", message);
 #else
-		log_error(message, ((requset_rec *) SG(server_context))->server);
+		log_error(message, ((request_rec *) SG(server_context))->server);
 #endif
 	} else {
 		fprintf(stderr, message);
---- END ----

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-04 18:46 UTC] rasmus@php.net
Fixed in CVS

But wow...  You are using a version of Apache that is 4 years old!!
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Mon Jun 29 18:00:01 2026 UTC