Home > Tech > Set up Pear and Symfony on Dreamhost in 5 minutes.

Set up Pear and Symfony on Dreamhost in 5 minutes.

There were a few glitches to install pear and symfony on Dreamhost before. But recently I found out the way to run (at least) Symfony pretty quick, so I’d like to share with you. I just open a new account, and try this procedure. It will take 5 minutes and 23 seconds. Not bad.

Procedure

  1. Append $HOME/bin in your search path
    $ vi .bash_profile
    ...
    PATH=$HOME/bin:/usr/local/bin:/usr/bin:/bin
    ...
    $ source .bash_profile
  2. make a link to php5 binary in your $HOME/bin
    $ ln -s /usr/local/dh/cgi-system/php5.cgi $HOME/bin/php
    $ php -v
    PHP 5.2.6 (cgi-fcgi) (built: May 11 2008 13:09:38)
    Copyright (c) 1997-2008 The PHP Group...
  3. make a local PEAR repository by using go-pear.
    $ wget http://pear.php.net/go-pear
    $ mv go-pear go-pear.php
    $ php go-pear.php
    ...
  4. add $HOME/pear/bin in search path
    $ vi .bash_profile
    …
    PATH=$HOME/bin:$HOME/pear/bin:/usr/local/bin:/usr/bin:/bin
    …
    $ source .bash_profile
  5. install symfony!
    $ pear channel-discover pear.symfony-project.com
    $ pear install symfony/symfony-1.0.17

That’s it! The original problem: you cannot change php.ini for your own site so that you cannot use Pear library, except you set up a cgi-bin dir and copy php5.cgi in it, which is ugly and hard to maintain. Symfony has its own loaders that will allow make it run without tweaking php.ini!

Comments:0

Comment Form
Remember personal info

Trackbacks:0

Trackback URL for this entry
http://blog.nydd.org/2008/07/set-up-pear-and-symfony-on-dreamhost-in-5-minutes/trackback/
Listed below are links to weblogs that reference
Set up Pear and Symfony on Dreamhost in 5 minutes. from Vantage Point of Queens

Home > Tech > Set up Pear and Symfony on Dreamhost in 5 minutes.

Search
Feeds
Meta
Links
Ads!

Return to page top