Archives

In the interest of what’s a particularly small percentage of the online population, i’ve taken the instructions from a couple different places for installing PHP5 as a CGI module on Dreamhost hosting accounts and assembled a shell script to do the work and a bit of a how-to.

Shell Script to Install PHP5 on a Dreamhost Hosting Account

(In all fairness the vast majority of this is a relatively light reworking of the information provided on Moztips.com i just took what he had posted in a couple different places and put them in one spot.)

PHP5 for Dreamhost Install Script

February 25th, 2005

Update: Dreamhost appears to have one-upped the lot of us and put up a real version of how to do this on the Dreamhost wiki. Installing PHP5

There are already several different sites out there that chronicle the whole process to install PHP5 as a CGI module on a Dreamhost shared hosting account. And the one from moztips is quite good but it was missing the MySQL support. Conveniently he had explained how to do that in a Dreamhost knowledge base comment. So really this is 99% his work (and good work too, I might add), I’ve just done a little bit of housekeeping and cleaning up to package the bulk of it into a shell script that does include the MySQL support stuff in it by default (rather than having to dig about between two sources for it). This may delve into the mildly arcane, but hopefully should still be easy enough for anyone who’d think about doing this sort of thing to do with no problem.

  1. Right-Click/Command-Click/etc. to download the following:
  2. Open the shell script in your text-editor of choice (i’m a fan of jEdit, myself) and use find/replace to replace ALL INSTANCES (notice how that’s all caps and bold?) of the following items:
    • YOUR_DH_LOGIN – replace this with your SSH login name.
    • YOUR_DH_DOMAIN – replace this with the directory name for the domain you want to install PHP5 in.
  3. Rename the shell script to php5.sh and upload it to your home directory on your server, then CHMOD the script to give it execute permissions (chmod 744 php5.sh will work and keep anyone random out of it). Some FTP clients can do this, I tend to stick with the command line for it. Just my personal preference.
  4. Rename the htaccess.txt file to .htaccess and upload it to the root level of your server (or into a specific directory if you want to continue using PHP4 for the rest of the site). Alternately if you’re already using a custom .htaccess file then you can just add the contents of htaccess.txt to that file.
  5. Log into the server using SSH and type ./php5.sh to execute the script. Once you do this just leave your SSH window alone since it will take a good 45 minutes to an hour to actually run through everything. There will be long pauses where it doesn’t look like it’s doing much but it’s still going, trust me. Also, it will spit out streams of text and some error messages along the way, everything is going fine, though, and you’re free to ignore them unless it’s something that makes the script as a whole stop running and drops you back to a command prompt. If that happens, well, try starting at the beginning again.
  6. Once all that is finished the script will create a cgi-bin directory inside the site directory and copy the php file into it as php.cgi. Right now the script tries to make the cgi-bin directory, and if one already exists it will freak out and not copy the php file into it. So if you already have a cgi-bin you’ve got a couple options.
    • Rename your existing cgi-bin and copy the existing scripts into the new one that will be created.
    • Copy the resulting PHP file on your own from /home/YOUR_DH_LOGIN/php/bin/php (which is a file with no extension) to wherever you want it and rename it to php.cgi.
    • Change the name of cgi-bin at the end of the shell script to another directory name.

    If you go with the third option you’ll need to either move the file manually or tweak the directory path in the .htaccess file too.

  7. After that you should be all set, just make yourself a test page that calls phpinfo(); and enjoy the fruits of your labor.

huhwhat?

February 24th, 2005

I’m a twenty-something New York escort. I love Prada, Seven jeans, and Jimmy Choos. I’m also totally addicted to Starbucks’ grande non-fat white mocha and working out.

A New York Escorts Confessions

OMGOMGOMG!

February 17th, 2005

FRIGGIN FINALLY!

Nausicaa of the Valley of the Wind finally comes out on DVD on the 22nd!

HOORAY!

NWN Redux

February 1st, 2005

So I reinstalled NWN last night, and tried to install the modern era hakpack, but something went, like, extra bonus screwy on me. Suffice it to say the character generation process was waaaay weird. As the largest thing that sticks out for example: when selecting skills for a character you were able to assign skill points to things that aren’t skills. Things like “alignment” and “druid” and “character generation”. I’m purely guessing about my problems, mind you, but I think it’s either that I installed the multitude of parts in a way that wasn’t quite right, or that their code is built on the assumption that you’ve bought all the expansion packs for the game as well (which I have not). Either way I’ll have to try hacking about with it again tonight.