This took me a while to find, so I'm saving it somewhere I can find it again.

The easy way to select the PHP version used for web applications is to use the CPanel configuration tool. However, that doesn't work if you're using SSH and need PHP on the command line. Also, on HostGator, you can't create a symlink outside of your directory (such as to the global php).

You can find out what version you have with

$ php --version

If that's not the version you want, try a specific version like this (php55 is 5.5, etc):

$ /opt/php55/bin/php --version

If that works, add an alias to your .bashrc file.

$ nano ~/.bashrc

Add lines like the ones below and then Ctrl-X to close nano (be sure to hit 'y' to save changes when closing)

alias php='/opt/php55/bin/php'
alias composer='/opt/php55/bin/php ~/bin/composer'
export DRUSH_PHP='/opt/php55/bin/php'

Now, re-source the file so the command line gets the new aliases

$ . ~/.bashrc

Just as a sanity check, check the version again

$ php --version
Tags

Traffic Question 15: Mailing a letter

Traffic Question 15:

During a period of heavy traffic, you want to mail a letter and then head in the direction of the pink arrow. How do you do it?

  1. Stop at Mailbox A, then do a U turn
  2. Park in a spot near Mailbox A, then turn left out of the parking lot
  3. Use Mailbox A, then use the left turn lane at the intersection to do a legal U turn
  4. Turn right at the main street, turn left into the parking lot for Mailbox B, then go through the intersection in the desired direction

Traffic Question 14: A traffic light turns yellow and you’re not quite going to make it through before it turns red... what do you do?

Traffic Question 14:

A traffic light turns yellow and you’re not quite going to make it through before it turns red... what do you do?

  1. Stomp on the gas pedal and zoom through
  2. Continue through the intersection without any change in speed
  3. Wait until the last second and then stomp on the brake
  4. Start coming to a gradual stop immediately
  5. None of the above

Traffic Question 9: If you get a phone call while you’re driving, what do you do?

traffic-09q.pngTraffic Question 9: If you get a phone call while you’re driving, what do you do?

A. Answer it right away

B. Wait until you get to a stop light and call back.

C. Stop at a stop sign and call back.

D. See who it is. If you think it might be an emergency, park the car in a designated parking area and then call back.

(Yes, this is pretty similar to #2 If you get a text while you’re driving... The main difference is, texting on the phone is illegal whereas talking on the phone is legal. At least in Moline.)

Traffic Question 12: Which of the following are factors in whether or not a vehicle is going to be slower than normal?

Traffic Question 12:

Which of the following are factors in whether or not a vehicle is going to be slower than normal?

* Car is Buick, Cadillac, or similar type

* One or more children are present

* Vehicle is a minivan

* Age of driver is over 60

* Handicapped license plates

* Driver is using cell phone

* Vehicle is a "sporty" color

* Driver is female

Traffic Quiz 6: Is it possible to back out of a driveway and use only one lane?

traffic-06q.pngTraffic Question 6:

The blue dots indicate the path used to pull IN the driveway.

Is it possible to back out of a driveway and head in the direction indicated by the pink arrow, using only one lane of the road?

A. No, one lane is not enough room.

B. Yes, it can be done in one lane.