{"id":255,"date":"2010-09-01T10:17:30","date_gmt":"2010-09-01T17:17:30","guid":{"rendered":"http:\/\/truelogic.org\/wordpress\/?p=255"},"modified":"2010-09-01T10:17:30","modified_gmt":"2010-09-01T17:17:30","slug":"installing-pear-for-php","status":"publish","type":"post","link":"https:\/\/truelogic.org\/wordpress\/2010\/09\/01\/installing-pear-for-php\/","title":{"rendered":"Installing PEAR for PHP"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-263\" title=\"pearsmall\" src=\"https:\/\/truelogic.org\/wordpress\/wp-content\/uploads\/2010\/09\/pearsmall.gif\" alt=\"pearsmall\" width=\"104\" height=\"50\" \/><\/p>\n<p><strong>Installation<\/strong><\/p>\n<p>For Windows:<\/p>\n<ul>\n<li>To update your PEAR installation, request      <strong><a class=\"link external\" href=\"http:\/\/pear.php.net\/go-pear\">http:\/\/pear.php.net\/go-pear<\/a><\/strong> in your browser and save the output to a local      file <tt class=\"filename\">go-pear.php<\/tt>.<\/li>\n<li>Assuming you have installed PHP already, and it is runnable from the command line type<em> <\/em><strong>php go-pear.php<\/strong><\/li>\n<\/ul>\n<p>For FreeBSD:<\/p>\n<ul>\n<li>Add the PEAR DB package from the ports \/usr\/ports\/databases\/pear-DB<\/li>\n<\/ul>\n<p><strong>Test Installation<\/strong><\/p>\n<p>To make sure that PEAR is working simply type in <em>pear<\/em> at the command prompt. If nothing shows then check that the PEAR path is part of your system path. Check the version of PEAR by typing <em>pear version<\/em><\/p>\n<p>To use PEAR and PEAR compatible packages in your applications,      you normally include them into your PHP scripts using\u00a0<strong><span class=\"link external\"><strong class=\"function\"><\/strong><\/span><\/strong>require_once().\u00a0 For this to work, PEAR&#8217;s <tt class=\"literal\">php_dir<\/tt> must be a      part of PHP&#8217;s include path.<\/p>\n<p>First check where PEAR installs php files by typing<\/p>\n<p><strong>pear\u00a0config-get\u00a0php_dir<\/strong><\/p>\n<p>Whatever the folder is, this folder will contain System.php<\/p>\n<p>To find which configuration file is used by        your PHP installation. On command line, execute <strong>php &#8211;ini <\/strong><\/p>\n<p>When you execute a phpinfo() in the browser it should always the show the PEAR path in its include path for the PEAR packages to work.<\/p>\n<p><em><br \/>\n<\/em><\/p>\n<p><em><br \/>\n<\/em><\/p>\n<pre class=\"screen\"><em><\/em><\/pre>\n<p><strong><span class=\"link external\"><strong class=\"function\"><br \/>\n<\/strong><\/span><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>Installation For Windows: To update your PEAR installation, request http:\/\/pear.php.net\/go-pear in your browser and save the output to a local file go-pear.php. Assuming you have <a class=\"mh-excerpt-more\" href=\"https:\/\/truelogic.org\/wordpress\/2010\/09\/01\/installing-pear-for-php\/\" title=\"Installing PEAR for PHP\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[36,37,149,150,198,200,257],"class_list":["post-255","post","type-post","status-publish","format-standard","hentry","category-apachephp","tag-amit","tag-amit-sengupta","tag-install","tag-installing","tag-pear","tag-php","tag-truelogic"],"_links":{"self":[{"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/posts\/255","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/comments?post=255"}],"version-history":[{"count":0,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/posts\/255\/revisions"}],"wp:attachment":[{"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/media?parent=255"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/categories?post=255"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/tags?post=255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}