Professional PHP

PHP Programming, Web Development, PHP Advocacy and PHP Best Practices.
« Mouse problems with Safari 1.3 after using Expose
PHP versus ASP »

Installing PEAR Based Applications

April 19th, 2005

Ok, Greg Beaver’s work on channels has resurrected my interest in PEAR. I am interested in providing WACT on a PEAR channel and I’d like to better integrate WACT with some PEAR packages. My primary concern is over the installation implications.

I didn’t find a “powered by PEAR” section on the PEAR website. Can anyone recommend some large, widely deployed end user oriented applications based on PEAR? I want to try going through the installation process in some challenging environments. I’m just trying to get a feel for best practices and potential problems with installing PEAR and applications that depend on PEAR.

categories PHP, WACT
tags pear-installer, php-deployment

Related Posts

  • PEAR Channels
  • Improving Web Application Installation as a Security Imperative
  • un-PEAR-ing
  • Installing Web Applications
  • Zend Framework Webcast
You can leave a response, or trackback from your own site.

11 Responses to “Installing PEAR Based Applications”

  1. #1 Krzysztof Kotowicz responds...
    April 20th, 2005 at 12:28 am

    You could take a look at seagull - http://seagull.phpkitchen.com and Horde Project - http://www.horde.org . Both projects (the latter provides many projects build againts the same framework). Seagull for sure is available as the PEAR package - thats one of installation options.

  2. #2 ryan king responds...
    April 20th, 2005 at 2:13 am

    If you’re looking for applications that are installed by PEAR, don’t look too hard. Up until 1.4, there wasn’t really any way to deal with application code in PEAR packages.

    As for applications that depend on PEAR, the first that comes to mind is s9y.

  3. #3 admin responds...
    April 20th, 2005 at 6:26 am

    Thanks, I am looking for applications that depend on PEAR.

  4. #4 Paul M. Jones responds...
    April 20th, 2005 at 6:29 am

    Yawp is a foundation composed of PEAR components with some glue to make them interoperate. http://phpyawp.com/

    YaWiki is based on Yawp. http://yawiki.com/

    Hope this helps.

  5. #5 Paul M. Jones responds...
    April 20th, 2005 at 6:37 am

    Incidentally, kind of funny that the idea of have a channel separate from PEAR is what has “ressurected [your] interest” in it. That we can have the benefits of the PEAR installer without the rest of the PEAR repository is, I think, a Very Good Thing. Perhaps PEAR Group should start thinking about being, not a code repository first, but a standards body first.

  6. #6 boots responds...
    April 20th, 2005 at 8:29 pm

    Paul M. Jones, that’s a very astute comment and echos my own thinking. Too bad the installer isn’t called pear-get.

  7. #7 Lukas responds...
    April 21st, 2005 at 9:34 am

    I am also currently pondering how to best make my framework installable via the 1.4 installer. I currently bundle all PEAR code in my own library dir mainly so that I have more control over the code. This allows me to add ugly hacks or bug fixes when I need them rather than having to wait for the developer to fix and release. It also helps me circumvent any BC breaks that happen by accident now and then.

    Now I really dont know how to best address this issue now. I could have a channel with my fixed packages and ask anyone who uses my framework to put my channel infront of the pear channel. This would let me then add fixed releases to my repository (probably using a fourth number as the version number, since PEAR regulations specify that only 3 numbers are allowed in a version name). But from then on no PEAR release is seen anymore .. right?

    Is there a way to teach the pear installer that all I am releasing are fixed up versions of packages from another channel and that higher version numbers from the original repository get preference? That way if BC breaks or some other issues does occur I could quickly follow up with another release, but this is not really a good solution either. So I would probably just ver tightly specify my dependencies like works only with version 1.2.3.x (where .x can be omitted or where x denotes a number).

  8. #8 Greg Beaver responds...
    April 21st, 2005 at 3:53 pm

    Lukas:

    There is no secure way to allow channels to mimic other channels.

    The best way to provide patched packages is to put them up as a static download and have the users pear install http://blah.example.com/Package-1.2.3.4.tgz

    However, you can avoid the upgrade-breaking-BC issues via the tag in dependencies.

    Of course, I am always eager to hear of new situations that can’t be solved by existing solutions, and will ponder this one. This is why PEAR 1.4.0 is still alpha even though the code is stable :)

  9. #9 admin responds...
    April 21st, 2005 at 5:13 pm

    Very good points about alternate package versions. I had not considered this issue at all.

  10. #10 Paul M. Jones responds...
    April 21st, 2005 at 7:14 pm

    Boots — that’s a very “apt” name. ;-)

  11. #11 Demian Turner responds...
    April 23rd, 2005 at 12:10 pm

    Hi Jeff, am coming a bit late to your post. I disagree with Ryan King’s comment above, the PEAR installer prior to the current 1.4 version is perfectly capable of installing complex web apps, we’ve used it for Seagull for some time, taking inspiration from Greg’s own phpDocumentor which reveals many useful clues.

    The main one is that you have to set data_dir to your web document root, so your app files are installed there, and calls to PEAR and other libs are made out to their default location, eg, /usr/local/lib/php. We’ve also modified some PEAR packages for our purposes, but have chosen to only override where these mods were necessary, so upgrades are quite seamless. Eg, we override the mysql driver for PEAR::DB, and use an installer hack to place the file ‘mysql_SGL.php’ in the same directory, so a small change to the dns loads our driver.

    Looking forward, Greg’s implementation of subpackages, not very documented atm, is the perfect tool to allow a framework to load and install arbitrary modules or components (not libs). We’ve identified a few probs (such as the hard-coded calls to HTML_Template_IT in PEAR_Frontend_Web) but hope to be solving these soon, maybe even use a few WACT components :-)

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

code: use [code=php][/code].

Comment Preview

  • Search

  • Subscribe

    Subscribe All Posts
    Subscribe All Comments
    Subscribe All Bookmarks
    Subscribe with Bloglines Subscribe with My Yahoo Add to netvibes Subscribe in NewsGator Online Add to Google
  • Share This

  • Categories (Home)

    • Agile Methods (14)
    • Mac (14)
    • Misc (16)
    • Open Source (14)
    • PHP (95)
    • Software Design (28)
    • Usability (14)
    • WACT (7)
    • Web Design (20)
  • Recent Comments

    • Sarah Snow Stever  26
      Massimo, arabcrunch, Dubai Web Design, Development [...]
    • The PHP scalability saga continues  17
      vaginal, uceqlehwigi, panties [...]
    • Keywords and Language Simplicity  9
      Programmer, cfbow, olmse [...]
    • PHP 5.1 is out  8
      Preteen, Soma, teedattaltY [...]
    • goto in PHP  39
      jistanidiot, Goldilocks, [...]
    • Working with PHP 5 in Mac OS X 10.5 (Leopard)  105
      Massimo, jitesh Shetty, Jesse [...]
    • WordPress BBCode Plugin  24
      ?????? ??, ?????? ??, smolenskiy [...]
    • Why is PHP Popular?  24
      art.ru, agened.ru, visasim.ru [...]
    • nofollow and comment spam  7
      Pwhndvve, Massa, che spavento, Scopmazo [...]
    • Why is PHP Code Considered Hard to Maintain?  25
      bez-riska.ru, Visitor338, Cody [...]
    • PHP Scalability and Performance  7
      youporn, kvz, John Loehrer [...]
  • Pages

    • Tags
  • Recent Posts

    • php | tek Wrapup
    • php | tek 2008
    • Sarah Snow Stever
    • Benchmarking PHP’s Magic Methods
    • The Endpoints of the Scale of Stupidity on Video
    • Working with PHP 5 in Mac OS X 10.5 (Leopard)
    • Keywords and Language Simplicity
    • Improved Error Messages in PHP 5
    • Michigan Taxes Graphic Design Services
    • Ruby versus PHP or There and Back Again
  • Archives

    • 2008: May
    • 2007: Jan Feb Mar Apr May Sep Oct Nov
    • 2006: Jan Feb Mar Apr May Jun Jul Oct Nov Dec
    • 2005: Jan Feb Mar Apr May Sep Oct Nov Dec
    • 2004: Apr May Jun Jul Aug Sep Oct Nov
  • Menu

    • Register
    • Log in