Custom compilation of PHP to enable additional features may cause apache errors. In some cases you may see apache 500 error. Apache logs may show "Premature end of header...".
This can indicate that the custom compiled PHP is not compiled in CGI mode. To check this run the following command:
This should print something similar to:
PHP 4.3.3 (cgi) (built: Sep 1 2003 04:45:21)
If the output shows (cli), then you need to recompile so that the php binary is running in cgi mode. Please refer to PHP documentation on how to recompile in cgi mode.