PHP 4 Installation error

software development


I installed PHP 4 using the DH wiki but when I check my cgi-bin/php.cgi file I get this message:

Warning: Unexpected character in input: ’ in /home/.yachtsmansybianheater/brideclay/ on line 624

I’ve tried installing mulitiple times, erasing all the installed files and adding ‘make clean’ before any ‘make’ commands in the script before each install.

Can anyone help?


You cannot directly access cgi-bin/php.cgi within the web browser. It requires a parameter, the PHP script, or else it will error out.

yerba# rm -rf /etc


Thanks for the reply guice. I was checking the cgi-bin/php.cgi was to see if the install was working based on an article on is the location of a script that works on the regular DH php installation, but not with my custom PHP4 install, hence the problem. I found a note in the wiki that suggests erasing a folder from the server Root/tmp/Username if one has tried multiple installs, like me, but I can’t seem to find this folder… Any other ideas?

PS - was your ‘rm -rf /etc’ suggestion to erase the /etc folder from the /home/Username/php folder? wouldn’t that erase the custom php.ini file, or is the one to change located somewhere else? Or am I just being silly and that’s your signature? :^)


[quote]Or am I just being silly and that’s your signature? :^)
You’re just silly. :slight_smile:

What is your .htaccess settings? Should look something like this:
Action myphp /cgi-bin/php.cgi
AddHandler myphp .php

(note the / in front of cgi-bin).

yerba# rm -rf /etc


Solved it!!

tried this:
AddHandler phpFour .php
Action phpFour /cgi-bin/php.cgi

make sure to have the AddHandler line first or the Action doesn’t know what phpFour is!

Then I tried adding a new include path from the installation notes:

| You may want to add: /home/brideclay/php/lib/php to your php.ini include_path |

So I added:
include_path = “/home/brideclay/php/lib/php”;
to my php.ini file located in /php/etc/php4/php.ini
at line 412
and that seemed to do the trick

thanks again!