Issue with custom PHP

I’ve followed the instructions from the Wiki page for downloading and compiling a custom version of PHP 5.2. The build seemed to run fine as a bin executable was output. But it won’t work through the web server.

I’ve checked everything I’ve found on this forum or the old kb. I’ve set up the .htaccess file. Contents are:
AddHandler php-Five .php
Action php-Five /cgi-bin/php.cgi

I’ve verified the permissions on the folder are 0755 and the php.cgi executable is 0755.

I created a simple test file that calls phpinfo(). I can run it from the shell command line and it runs fine and shows no startup errors. But when I attempt to call the script from a browser I get the script source returned instead, so it seems like the Handler is not being triggered.

Can someone help?

Much thanks in advance!

My handler looks like the following:

AddHandler phpFive .php
Action phpFive /cgi-bin/php.cgi


My website

Your problem may be similar to the one I am having.

I following instructions from this page:

and at the end of the process Terminal (I am on Mac OS X) displayed:
Build complete.
(It is safe to ignore warnings about tempnam and tmpnam).

Installing PHP SAPI module: cgi
Installing PHP CGI into: /home/myusername/php5/bin/
Installing build environment: /home/myusername/php5/lib/php/build/
Installing header files: /home/myusername/php5/include/php/
Installing helper programs: /home/myusername/php5/bin/
program: phpize
program: php-config
Installing man pages: /home/myusername/php5/man/man1/
page: phpize.1
page: php-config.1
Installing PDO headers: /home/myusername/php5/include/php/ext/pdo/
cp: cannot stat /home/myusername/php5/bin/php-cgi': No such file or directory [ibc]$ cp ~/php5/bin/php-cgi ~/ cp: cannot stat/home/myusername/php5/bin/php-cgi’: No such file or directory

So the script Wiki page says:
Internal Server Error
If some of your php files return an internal server error (Server error 500) the install script probably copied the php binary when you needed the php-cgi binary. execute
cp ~/php5/bin/php-cgi ~/DOMAINNAME/cgi-bin/php.cgi
and you will probably be fine.

But that doesn’t do anything for me it seems.

I have this page but still have no idea how to solve the problem:

Well I went to the blog link there and did verify again that the permissions on file & folder are 755, and the owner and group ARE set correctly.

I checked the web site’s error.log and there is nothing listed there at all. And I never get any server errors. It just returns the script as if it were an html file.

I even tried commenting out the handler commands in .htaccess and the script runs fine with DH’s standard php, so it’s not the script itself.