Randomness

Simple Setup of PEAR on a DreamHost Account

0

While DH installs a basic set of PEAR modules it’s a common situation need others, when that situation comes up you’ll often be referred to the PEAR article on the DH wiki. I’ve taken the instructions found there and created a shell script you can download and execute, it’ll do the following:

  1. Creates a .pearrc file in your home directory.
  2. Sets the download_dir, cache_dir, and temp_dir to folders within your /home/user/pear directory
  3. Sets the PHP_PEAR_PHP_BIN variables by adding “export PHP_PEAR_PHP_BIN=/usr/local/php5/bin/php” to your .bash_profile
  4. Modifies your PATH variable by adding “export PATH=/home/user/pear:/usr/local/php5/bin:$PATH” to your .bash_profile. This change also sets the PHP5 binary as the default for your shell.

Next time you call pear you’ll be using your custom settings and when you attempt to install any modules it will be done within your home directory. Now in order to use these PEAR modules in your application you will need to add the following to your app:

$pear_user_config = '/home/user/.pearrc';
set_include_path('.' . PATH_SEPERATOR . '/home/user/pear/php' . PATH_SEPERATOR . get_include_path());

Make sure to update “user” in the path to the actual user you are using and you’ll be set.

Download and Execute the Script

Just execute the following in a shell session:

wget http://files.gimmesoda.com/dreamhost/install_pear.sh; chmod 0744 install_pear.sh; ./install_pear.sh;

You can download and review the shell script from here, just open it up in a text editor of your choice.

Code Fix for Missing PATH_INFO

0

Many applications seem to be using the $_SERVER['PATH_INFO'] and related variables in their router section of code to figure out what information or page is being requested without having to write rewrite_rules for each possible request. It’s smart really! What about the web hosts that aren’t setting this information due to whatever reason?

While there are ways to getting this fixed on the server side, where I do agree it should be fixed, an application should be able to handle running in as many possible environments as possible. With that in mind I’ve found a way to ‘fake’ the information in PATH_INFO when it isn’t being set through the use of the argv array.

$path = (substr($_SERVER[argv][0], 0, 1) == "/") ? $_SERVER['argv'][0] : false;

This has been useful in my current patch for Concrete5 and should be useful for any app that depends on PATH_INFO.

Enjoy.

Slacking

0

I really need to do some work with my CJ affiliate earnings. I’ve done basically nothing in the last three months and I wouldn’t mind boosting my earnings. WTH should help out with that, once it’s finished. :(

Playlist AWESOME

3

You HIMYM fans will recognize this. Some of the songs have been cut to decrease any potential for loss in tremors of psychitude.

1) You Give Love a Bad Name – Bon Jovi
2) The Humpty Dance – Digital Underground

3) Come Sail Away – Styx
4) Don’t Stop Believin’ – Journey
5) The Transformers Theme – Vince DiCola
6) You’re The Best Around – Joe Esposito
7) High Enough – Damn Yankees
8) Jessie’s Girl – Rick Springfield
9) Rock You Like A Hurricane – Scorpions
10) Hip Hop Hooray – Naughty By Nature
11) Change Of Heart – Tom Petty
12) Run Runaway – Slade

I’m worried now – we NEED more songs. Working on it….

Songs to add in:

I Wanna Rock – Twisted Sister ???
Paradise City – Guns N’ Roses *fist bump*
Lick It Up – KISS
Talk Dirty To Me – Poison

In the mood for tequila…

0

Okay so I’m normally in the mood for some good tequila however, tonight/this morning, I’ve really been craving two very specific bottles, however I wouldn’t mind some of the third about now.

First we have La Pinta Pomegranate Tequila, which I’ve been craving for awhile but have been too lazy to go pick up or order.

http://www.bevmo.com/Media/Images/ProductImagesFull/3612.jpg

The next is Tres Generaciones Anejo, which anyone who has been introduced to tequila by me has very likely had a taste of. It’s among my favorites and goes down smoothly even for those people who aren’t big on tequila.

I’ve only had this one twice Milagro Select Anejo tequila, super smooth tequila that’s just a little sweeter then most anejo’s I’ve tasted. Wonderful, a great tequila for special occasions, or the nights you want to get messed up – with class.

As my buddy Sambeano would say, “Goulet!”

Now, if you happen to feel like being REALLY REALLY kind to me and want to feed my habit, you could always send a bottle of Herradura Tequila Seleccion Suprema my way, I promise it won’t impede my programming for tooo long. I probably wouldn’t open it until I finish up with WhereToHost.net and get a few extra patches/additions out for my installer framework.

Love My Job

0

I got off work at around 11:10 tonight and I left feeling satisfied and happy. I love this job!

That is all. =D

I need some crack…

0

It’s been awhile since I’ve done some SERIOUS programming. Most of what I’m working on (like the laconica web based installer, the modified zenPhoto installation, various modifications to e-commerce sites) is actually the type of thing I would work on and create when I was younger. I guess most things don’t change. Anyhow, I’m starting to itch for a real project, something complex or with an interesting problem to solve… maybe I’ll continue work on my framework.

I don’t know, anyhow I got a great read for you.

While working today I got the chance to help out with Greg Marriott’s blog, and when I finished up I noticed one of his posts was on a topic that I’ve always had some trouble explaining to my non-programmer friends. Go check it out and find out why programming is my drug of choice…

Programming is like crack

Without Time – Dropping Clients

0

As quite a few of you have noticed I haven’t been able to get any new work or scripts out lately. I’ve also have not been taking on any new clients for awhile because I don’t have any time! I’m actually at the point where I’m about to fire a few of my remaining clients in order to free up time! Crazy.

Projects that need to be finished, in random order:

  1. WordPress MU based Community for Anonymous Bloggers
  2. Modified ZenPhoto system that hosts multiple galleries for the above system through one install. (Think of it as ZenPhoto MU.)
  3. Laconica web based installer script. This one bothers me because I’m so close yet having been getting any time to complete it.
  4. Re-organization of GimmeSoda Blog
  5. Re-organization of Black Falcon Solutions and automating a few more tasks for client billing

Need A Drink?

0

Today was a horrible day at work and just kinda makes me want to sit at a bar for the next few hours and let myself forget about the horrors of not being able to get anything done, but if you’re like me and don’t like paying absolutely outrageous prices for a drink, mix your own!

Which makes this the prefect day to announce that I’m working on a site for a community of those who enjoy their drinks – not just alcohol based (although mainly it will be). You can see the current database over at http://drinks.gimmesoda.com/ and a simple random drink page at http://drinks.gimmesoda.com/

Cheers!

Song from F.E.A.R. Commercial – Tears for Fears!

0

The song used in the F.E.A.R. commercial!

“All around me are familiar faces
Worn out places, worn out faces
Bright and early for their daily races
Going nowhere, going nowhere
And their tears are filling up their glasses
No expression, no expression
Hide my head I want to drown my sorrow
No tomorrow, no tomorrow…”

–Tears for Fears, “Mad World”

Go to Top