This happens because for some reason the PHP module is not running smoothly. Please check the following three steps before asking for help:
Make sure that the httpd program you are running is the one you just compiled. Please run /path/to/binary/httpd -l. If you don't see mod_php3.c in the list, please reinstall the Apache program.
Make sure you add the MIME type in the Apache configuration file .conf (such as httpd.conf), such as AddType application/x-httpd-php3 .php3, and also make sure that the above AddType is not placed in a
Finally, due to the different locations of the system configuration files of Apache 1.2.x and Apache 1.3.x. You need to check which configuration file is the real one and see if there is an AddType for PHP in it. You can put an incorrect configuration syntax in httpd.conf and see if there are any error messages when running httpd to determine whether the configuration file is correct.