PHP 5.2.3 Instal

I logged on the shell and tried to run the file. It started but than stopped because of a ‘stat’ because php.cgi doesn’t exist. What did I do wrong?

What “file” did you try to “run”? What exactly was/were the error message(s)?

From the information you have provided, I don’t even know what you did, and couldn’t begin to guess what you might have done “wrong”. :wink:


Sorry, I ran the PHP 5.2.3 Install file provided in the Wiki. It just stopped and said ‘stat error No such file/directory in php5/bin/php.cgi’

Well., that helps a little but still doesn’t tell us what you have done. I assume, since you did not link it, that you are talking about this page on the DreamHost wiki, which has two different scripts. If not, please let me know what page on the wiki you are using.

If you are using the page I linked above, which of the two scripts provided are you using?

Note the specific instruction on the page re. installing 5.2.3 via the first script provided:

This script does not work if you are compiling PHP version 5.2.3 or greater. To make this script work when compiling PHP version 5.2.3 or greater, change the third from last line from this…

cp ${INSTALLDIR}/bin/php ${HOME}/${DOMAIN}/cgi-bin/php.cgi

…to this…

cp ${INSTALLDIR}/bin/php-cgi ${HOME}/${DOMAIN}/cgi-bin/php.cgi

Did you use the first script, and have you done this?


Correct page, correct script and correct edit. I was trying to do everything that you said, and changed the line and it still gave me an error. Let me try again, and see if I can get it to work.

If that doesn’t work for you after double checking everything and trying again, I suggest you post what you have put in the following variables, as that might give someone here a clue as to what is happeing:

The domain in which to install the PHP CGI script.

export DOMAIN=“

Where do you want all this stuff built? I’d recommend picking a local


Don’t pick a directory that already exists! We clean up after

ourselves at the end!


And where should it be installed?


Set DISTDIR to somewhere persistent, if you plan to muck around with this

script and run it several times!



cp: cannot stat `/home/theflea912/php5/bin/php-cgi’: No such file or directory

That is correct error I got again.
Those variables are all the default ones, except export DOMAIN, which is

From the looks of it, I get almost complete than it quits on me.

Try running this script, and let me know if that works for you instead :slight_smile:

Chips N Cheese - Custom PHP installs and the like!

No previous php.ini to restore.
Striping debug info from cgi-bin files…
rm: cannot lstat .' in.’: Stale NFS file handle

Thats what I got with the new script

Yup, I still don’t understand the “rm: cannot lstat” error (I can’t reproduce it in any environment but DH’s), but if you got that far, it means it worked :wink:

Chips N Cheese - Custom PHP installs and the like!