Difference between revisions of "Enabling the use of PHP5 by default in the shell"

From DreamHost
Jump to: navigation, search
(New page: This enables you to use PHP5 by default instead of PHP4 when running PHP scripts * edit ".bash_profile" file using vim, vi, nano, or some other text editor * add a line "export PATH=/usr/...)
 
(correction!)
Line 1: Line 1:
 
This enables you to use PHP5 by default instead of PHP4 when running PHP scripts
 
This enables you to use PHP5 by default instead of PHP4 when running PHP scripts
  
* edit ".bash_profile" file using vim, vi, nano, or some other text editor
+
* edit ".bashrc" file using vim, vi, nano, or some other text editor
 
* add a line "export PATH=/usr/local/php5/bin/:$PATH"
 
* add a line "export PATH=/usr/local/php5/bin/:$PATH"
 
* in the shell type "which php" and you should see "/usr/local/php5/bin/php"
 
* in the shell type "which php" and you should see "/usr/local/php5/bin/php"

Revision as of 08:19, 26 February 2010

This enables you to use PHP5 by default instead of PHP4 when running PHP scripts

  • edit ".bashrc" file using vim, vi, nano, or some other text editor
  • add a line "export PATH=/usr/local/php5/bin/:$PATH"
  • in the shell type "which php" and you should see "/usr/local/php5/bin/php"