WebFaction
Community site: login faq

Im trying to make the php53 the default compiler. Here is what i have tried so far:

Created ~/bin/php:

#!/bin/bash
php53 "$@"

Ran which php:

~/bin/php

But running php -v still displays:

PHP 5.2.17 (cli) (built: Jun 20 2012 19:59:30)

asked 28 Jul '13, 12:10

ptejada
3148
accept rate: 0%


First, the easiest way might be to create a PHP alias, similar to how our python documentation describes creating an alias to change the default python version.

However, your approach should work as well. In order for this to work, you'll need to ensure that your "PATH" variable includes "$HOME/bin" before any other directories (particularly, it must come before "/usr/local"). For example:

export PATH = "$HOME/bin:$PATH"

And you may want to set this within your "$HOME/.bashrc" or "$HOME/.bash_profile" in order to make the change set automatically at login. Hope that helps!

permanent link

answered 28 Jul '13, 19:17

ryans ♦♦
5.0k103560
accept rate: 43%

Thanks for your reply, alias php=php53 did the trick

(28 Jul '13, 19:34) ptejada
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×263
×23
×2

question asked: 28 Jul '13, 12:10

question was seen: 2,777 times

last updated: 28 Jul '13, 19:34

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM