{"id":2031,"date":"2013-07-29T17:17:45","date_gmt":"2013-07-30T00:17:45","guid":{"rendered":"http:\/\/www.evardsson.com\/blog\/?p=2031"},"modified":"2013-07-29T17:17:45","modified_gmt":"2013-07-30T00:17:45","slug":"pecl-on-os-x-mountain-lion-quick-and-dirty","status":"publish","type":"post","link":"https:\/\/www.evardsson.com\/blog\/2013\/07\/29\/pecl-on-os-x-mountain-lion-quick-and-dirty\/","title":{"rendered":"PECL on OS X Mountain Lion: Quick and dirty"},"content":{"rendered":"<p>Yes, this is pretty simple, but I had to look around for too long to find a solution that didn&#8217;t involve homebrew or ports or (even worse) some kind of path manipulation to install PEAR\/PECL to MAMP. (No, I do not want to set my bash_profile to use the MAMP PHP over the default. And no, I don&#8217;t want to recompile PHP &#8211; at least not today and at least not until I want to upgrade the version installed.) I just wanted to install pecl_http to run some tests, and I figured if I didn&#8217;t put my notes somewhere I would lose them. So here they are.<\/p>\n<p>Before you begin, you need to have Xcode installed &#8211; get it from the app store.<\/p>\n<p>Installing <a href=\"http:\/\/pear.php.net\/\">PEAR<\/a> (which includes <a href=\"http:\/\/pecl.php.net\/\">PECL<\/a>) is pretty straight-forward (thanks to <a href=\"http:\/\/jason.pureconcepts.net\/2012\/10\/install-pear-pecl-mac-os-x\/\">Jason McCreary at pureconcepts.net<\/a>)<\/p>\n<p>Two simple terminal commands, and some configuration:<br \/>\n<code><br \/>\ncurl -O http:\/\/pear.php.net\/go-pear.phar sudo php -d detect_unicode=0 go-pear.phar<br \/>\nsudo php -d detect_unicode=0 go-pear.phar<br \/>\n<\/code><\/p>\n<p>in the configuration prompt &#8211;<br \/>\nType 1 and then Return<br \/>\nthen type:<br \/>\n<code>\/usr\/local\/pear<\/code><\/p>\n<p>Type 4 and then return and type<br \/>\n<code>\/usr\/local\/bin<\/code><\/p>\n<p>Hit return and you are done (with the first part).<\/p>\n<p>Verify pear with:<br \/>\n<code>pear version<\/code><\/p>\n<p>Now, before you run off and type <code>sudo pecl install pecl_http<\/code> you should know that it will fail, as autoconf is not yet installed. Thankfully, this is quite simple as well, (thanks to <a href=\"http:\/\/serverfault.com\/questions\/361049\/php-autoconf-errors-on-mac-os-x-10-7-3-when-trying-to-install-pecl-extensions\">This question on serverfault.com<\/a>)<\/p>\n<p>Download the latest release <a href=\"http:\/\/ftp.gnu.org\/gnu\/autoconf\/autoconf-latest.tar.gz\">http:\/\/ftp.gnu.org\/gnu\/autoconf\/autoconf-latest.tar.gz<\/a><\/p>\n<p>Extract the files and do a normal <code>.\/configure; make; sudo make install;<\/code><\/p>\n<p>Now you can<br \/>\n<code>sudo pecl install pecl_http<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Yes, this is pretty simple, but I had to look around for too long to find a solution that didn&#8217;t involve homebrew or ports or (even worse) some kind of path manipulation to install PEAR\/PECL &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[21,33],"tags":[158,127,170],"class_list":["post-2031","post","type-post","status-publish","format-standard","hentry","category-os-x","category-php","tag-os-x","tag-pecl","tag-php"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pxT7i-wL","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.evardsson.com\/blog\/wp-json\/wp\/v2\/posts\/2031","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.evardsson.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.evardsson.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.evardsson.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.evardsson.com\/blog\/wp-json\/wp\/v2\/comments?post=2031"}],"version-history":[{"count":2,"href":"https:\/\/www.evardsson.com\/blog\/wp-json\/wp\/v2\/posts\/2031\/revisions"}],"predecessor-version":[{"id":2033,"href":"https:\/\/www.evardsson.com\/blog\/wp-json\/wp\/v2\/posts\/2031\/revisions\/2033"}],"wp:attachment":[{"href":"https:\/\/www.evardsson.com\/blog\/wp-json\/wp\/v2\/media?parent=2031"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.evardsson.com\/blog\/wp-json\/wp\/v2\/categories?post=2031"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.evardsson.com\/blog\/wp-json\/wp\/v2\/tags?post=2031"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}