{"id":323,"date":"2008-12-28T00:46:21","date_gmt":"2008-12-27T23:46:21","guid":{"rendered":"http:\/\/t-machine.org\/?p=323"},"modified":"2009-07-21T07:59:02","modified_gmt":"2009-07-21T06:59:02","slug":"how-to-install-pear-on-os-x-105","status":"publish","type":"post","link":"http:\/\/new.t-machine.org\/index.php\/2008\/12\/28\/how-to-install-pear-on-os-x-105\/","title":{"rendered":"How to install PEAR on OS X 10.5"},"content":{"rendered":"<p>The <a href=\"http:\/\/clickontyler.com\/blog\/2008\/01\/how-to-install-pear-in-mac-os-x-leopard\/\">simple guide I found here<\/a> doesn&#8217;t actually work, although it &#8220;mostly&#8221; works. Several bits are out of date. Even then it only *partly* works, because it leaves all PEAR commands as requiring root to run. That may be what you want, but I doubt it. Not what I wanted.<br \/>\n<!--more--><br \/>\nCorrect way would be:<\/p>\n<ol>\n<li>From a newly-opened Terminal, type: <code>curl http:\/\/pear.php.net\/go-pear | sudo php<\/code>\n<li>When it&#8217;s finished downloading, enter your login password (the prompt sometimes is hard to see)\n<li>Change the &#8220;1. Installation prefix ($prefix) :&#8221; to be &#8220;\/usr\/local&#8221;\n<li>Change the &#8220;2. Temporary files directory     :&#8221; to be &#8220;\/tmp&#8221; (on OS X this is currently symlinked to the correct OS X equivalent, which is \/private\/tmp)\n<li>From Terminal, type: <code>sudo chmod a+w \/usr\/local\/PEAR<\/code>\n<li>From Terminal, type: <code>sudo chmod a+w \/usr\/local\/PEAR\/docs\/<\/code>\n<li>From Terminal, type: <code>sudo chmod a+w \/usr\/local\/PEAR\/tests\/<\/code>\n<li>Restart Apache2. If <a href=\"http:\/\/www.procata.com\/blog\/archives\/2007\/10\/28\/working-with-php-5-in-mac-os-x-105\/\">you&#8217;ve enabled OS X&#8217;s built-in copy of Apache2<\/a>, then just go to System Preferenes, select &#8220;Sharing&#8221;, UNcheck the &#8220;web sharing&#8221;, wait until the green light beside &#8220;Web Sharing&#8221; goes grey (instead of yellow), and finally CHECK the &#8220;Web Sharing&#8221; box again.\n<\/ol>\n<p>&#8230;there are probably some other things you need to chmod as a+w in the PEAR directory &#8211; if you want a hassle-free life, you could just do this instead:<\/p>\n<blockquote><p>\nFrom Terminal, type: <code>sudo chmod -R a+w \/usr\/local\/PEAR<\/code>\n<\/p><\/blockquote>\n<p>&#8230;which will do ALL files and ALL sub-directories of PEAR.<\/p>\n<p>Last thing (that I&#8217;m not sure how to deal with) is that I&#8217;m not 100% sure the files should be owned by &#8220;root:wheel&#8221;, but I don&#8217;t yet know enough about OS X to know what the correct ownership of those files is. Everything else (*everything*) in my \/usr\/local is owned by &#8220;root:wheel&#8221;, so maybe that is correct?<\/p>\n<p>PS: IMHO any developer who creates a custom packaging system that is INDEPENDENT-OF and INTERFERES-WITH the native OS should be shot. This is a peculiar mental disease that infects Perl (and, it seems by extension, PHP) developers. They should have a look at Java and take note (Sun got it right for once) &#8211; you have a simple choice, with two options.<\/p>\n<p>Option 1: let the OS handle everything<br \/>\nOption 2: handle everything yourself, by making a unique binary install for EVERY different OS.<\/p>\n<p>There is no Option 3. The world of PHP programming would be a better, simpler place if more people had understood this :).<\/p>\n<p>PPS: a developer who then further takes the step of *not supporting* people who don&#8217;t use their proprietary, OS-interfering, packaging system (PEAR, I&#8217;m looking at you &#8211; where&#8217;s the explicit dependency list for each package? Nowhere easy to find) should be revived &#8230; and then shot again.<\/p>\n<p>PPPS: &#8230;even though I&#8217;d almost certainly do the same if I were them. It&#8217;s too much hassle to support people who don&#8217;t use your standard installer, even if said installer does suck donkey.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The simple guide I found here doesn&#8217;t actually work, although it &#8220;mostly&#8221; works. Several bits are out of date. Even then it only *partly* works, because it leaves all PEAR commands as requiring root to run. That may be what you want, but I doubt it. Not what I wanted.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20,45],"tags":[],"_links":{"self":[{"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/posts\/323"}],"collection":[{"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/comments?post=323"}],"version-history":[{"count":0,"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/posts\/323\/revisions"}],"wp:attachment":[{"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/media?parent=323"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/categories?post=323"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/tags?post=323"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}