Well, you didn’t follow the instructions.
Per your description of what you did, you went straight to the “update” step, and completely skipped the first step after creating the claninfectionist.com/cgi-bin directory, which is as follows:
[quote]Create a script to retrieve the latest copy of php.cgi and php.ini
Make a file in ~/ called php-copy.sh containing the following, where 100M contains whatever file size limit you like, and [your website directory] is appropriately substituted.
CGIFILE="$HOME/[your website directory]/cgi-bin/php.cgi"
INIFILE="$HOME/[your website directory]/cgi-bin/php.ini"
rsync -a /dh/cgi-system/php.cgi “$CGIFILE”
REMOVE THE FOLLOWING LINE TO CREATE THE UPDATE-ONLY SCRIPT:
cp /etc/php/cgi/php.ini “$INIFILE”
perl -p -i -e ‘
s/.post_max_size./post_max_size = 100M/;
s/.upload_max_filesize./upload_max_filesize = 100M/;
You omitted this step completely, and if you look at the code, you will see that was the source of the error messages you got; since you never copied the original DH php.ini file from it’s default location into your cgi-bin before running the “update” script (which is actually a later step) the perl instructions could not be properly executed - the error messages explain that. (also note that these scripts shold not be placed in the CGI bin - Make a file in ~/ called php-copy.sh - the php-update script should be in the same location, not in cgi-bin)
I warned you that you needed to follow the directions - and you didn’t even make it past the second instruction (sigh).
It should have been in your ~/ directory
because you uploaded it to the wrong place (cgi-bin).
From there, one error compounded with the next and the whole thing got borked.
Note that you should never have even created php-update.sh (it does have a file type if you follow the directions) until after you had sucessfully created and executed php-copy.sh, configured your domain as instructed, and tested to see that it worked. Only then do you create update-php.sh, which you should run weekly, or so, bia a cron job (though if everything else was done correctly in the article you can run it manually instead.
TO FIX IT:
Use a real FTP client, or the shell, to delete everything you can out of cgi-bin (even the whole directory if you can). There is no reason, if you have told me everything, that you should not be able to delete the php.cgi, php.ini, and update-php files from that directory.
Start over following the directions in the article. If you get creative, and try to modify the process, unless you understand what is happening with the bash and perl scripts, you are likely to fail again; if you follow the instructions (stopping when you don’t understand something and googling it, or asking here, rather than charging ahead in some other way that may have effects you don’t understand), you will succeed.
The short version of the process you are trying to accomplish, via these scripts, goes something like this:
- Get copies of DH default php.cgi and php.ini files and store them in your own space in cgi-bin
- Modify (via the perl sections of the script) that php.ini to change the parameter you want to modify
- Install a crom job to do this weekly so that you will stay current with DH’s installation of PHP4 or PHP5.
These two simple scripts, which only vary by one line, accomplish all of this in a few seconds - but you have to create them, place them in the right places, make them executable, and run them in the proper order for the process to work.