Disclaimer:
- Source of this information varies, but mainly it was obtained by using Google.
- Tested on Linux RH 7.3 platform
PHP 4.2.2 with Apache 2.0.40 is not possible as Apache's API towards modules has changed. Download latest 4.3.0 nightly from php.net instead. It compiled cleanly for me.
PHP 4.2.2 with Apache 2.0.39 is possible but will not compile without modification to PHP source.
Try fixing line 92 at sapi/apache2filter/php_functions.c
so that the name of the macro is prefixed with "AP_"
Hope this helped. If it didn't, try pasting parts of your error message to the Google. That is what I did.