{"id":76,"date":"2020-06-03T11:43:07","date_gmt":"2020-06-03T10:43:07","guid":{"rendered":"http:\/\/kbnco.names.dev.pdunsford.localdev\/?post_type=ht_kb&#038;p=76"},"modified":"2024-10-25T12:33:10","modified_gmt":"2024-10-25T11:33:10","slug":"using-pear-modules","status":"publish","type":"ht_kb","link":"https:\/\/www.names.co.uk\/support\/articles\/using-pear-modules\/","title":{"rendered":"Using PEAR Modules"},"content":{"rendered":"\n<p>PEAR modules should be installed within your website rather than globally onto the server itself, the advantage this provides primarily is portability; you&#8217;ll be able to move your website between different hosting servers without needing to reinstall these modules, as they&#8217;ll be contained within your website.<\/p>\n\n\n\n<p>For the sake of simplicity, we&#8217;re going to pretend we need the module&nbsp;<em>Crypt_Blowfish<\/em>&nbsp;in this guide. Simply replace all references of the example module name with the one you&#8217;re looking to use.<\/p>\n\n\n\n<p>Locating the Module<\/p>\n\n\n\n<p>The first step is to locate the module you need on&nbsp;<a href=\"https:\/\/pear.php.net\/\">the official PEAR website<\/a>. You can find the module either by browsing or by using the search box on the home page. Once you&#8217;ve found your module, you should end up on a page that looks like this:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/2020\/09\/screenshot.png\" alt=\"PEAR Website\" title=\"PEAR Website\"\/><\/figure>\n\n\n\n<p>Installing the Module<\/p>\n\n\n\n<p>Click the Download tab at the top and select the &#8220;Download For manual installation only&#8221; option. This will download a&nbsp;<em>.tgz<\/em>&nbsp;file to your computer which you can then extract with your favourite archiving program. If you don&#8217;t already have a program to open this type of file then&nbsp;<a href=\"https:\/\/www.7-zip.org\/download.html\">7Zip<\/a>&nbsp;is probably easiest to use due to the wide array of file types it supports and it&#8217;s free.<\/p>\n\n\n\n<p>Once extracted, you&#8217;ll end up with a folder named something along the lines of&nbsp;<em>module_name.module_version<\/em>. Inside that folder are the files you need.<\/p>\n\n\n\n<p>Now create a folder within your website, we&#8217;ll be using this to store the PEAR modules so to keep things simple we&#8217;ll name the folder&nbsp;<em>pear<\/em>.<\/p>\n\n\n\n<p>Setting Up Your Website<\/p>\n\n\n\n<p>Next step is to tell your website that you want to look in that folder for modules.&nbsp;<strong>If you&#8217;re using Plesk 11 or higher, skip down past this paragraph to &#8220;Plesk 11+ Notice&#8221;.<\/strong><\/p>\n\n\n\n<p>What you&#8217;ll need to do is modify your website&#8217;s&nbsp;<em>.htaccess<\/em>&nbsp;file (or create it if one doesn&#8217;t yet exist) and then add the following line:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">php_value include_path \".:\/var\/www\/vhosts\/example.org\/httpdocs\/pear\/\"<\/pre>\n\n\n\n<p><em>(you&#8217;ll need to replace example.org with your actual domain name)<\/em><\/p>\n\n\n\n<p><strong>Plesk 11+ Notice<\/strong>: If you&#8217;re on Plesk 11 or above then instead of amending your .htaccess file, you should configure this setting through Plesk. Please see&nbsp;<a href=\"https:\/\/www.names.co.uk\/support\/1443.html\">this article<\/a>&nbsp;on how to change your PHP settings in Plesk 11 and above. You will want to set the&nbsp;<em>include_path<\/em>&nbsp;option in Plesk to &#8220;.:\/var\/www\/vhosts\/example.org\/httpdocs\/pear\/&#8221; (without quotes, replacing example.org with your actual domain name).<\/p>\n\n\n\n<p>Installing the PEAR Base<\/p>\n\n\n\n<p>The last part is the most important, actually providing the base PEAR files. Download the PEAR base modules from the PEAR site&nbsp;<a href=\"https:\/\/pear.php.net\/package\/PEAR\/download\">here<\/a>&nbsp;and&nbsp;<a href=\"https:\/\/pear.php.net\/package\/Console_Getopt\/download\">here<\/a>, installing them the same way you did for your module, by copying the contents of the downloaded archive into the newly created &#8220;pear&#8221; folder that you added to your hosting space earlier.<\/p>\n\n\n\n<p>You should now have a pear folder that looks something like this (again using Blowfish as the example module I&#8217;m installing):<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/2020\/09\/screenshot2.png\" alt=\"File Layout\" title=\"File Layout\"\/><\/figure>\n\n\n\n<p>And that&#8217;s it. Both PEAR and the Blowfish PEAR module should now work within your website.<\/p>\n\n\n\n<p>Additional Modules<\/p>\n\n\n\n<p>If you need to install any additional modules in future, just follow the initial parts of this guide again: Download the module, extract it, upload it to your PEAR folder. No other additional configuration will be needed.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PEAR modules should be installed within your website rather than globally onto the server itself, the advantage this provides primarily is portability; you&#8217;ll be able to move your website between different hosting servers without needing to reinstall these modules, as they&#8217;ll be contained within your website. For the sake of simplicity, we&#8217;re going to pretend [&hellip;]<\/p>\n","protected":false},"author":2,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[163,140],"ht-kb-tag":[126,141,257],"class_list":["post-76","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-managed-servers","ht_kb_category-servers","ht_kb_tag-managed-servers","ht_kb_tag-servers","ht_kb_tag-xsw"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Using PEAR Modules - Support Centre - names.co.uk<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.names.co.uk\/support\/articles\/using-pear-modules\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using PEAR Modules - Support Centre - names.co.uk\" \/>\n<meta property=\"og:description\" content=\"PEAR modules should be installed within your website rather than globally onto the server itself, the advantage this provides primarily is portability; you&#8217;ll be able to move your website between different hosting servers without needing to reinstall these modules, as they&#8217;ll be contained within your website. For the sake of simplicity, we&#8217;re going to pretend [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.names.co.uk\/support\/articles\/using-pear-modules\/\" \/>\n<meta property=\"og:site_name\" content=\"Support Centre - names.co.uk\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/namesco\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-25T11:33:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.names.co.uk\/support\/wp-content\/uploads\/2021\/02\/og-support-centre.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@namesco\" \/>\n<meta name=\"twitter:label1\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.names.co.uk\/support\/articles\/using-pear-modules\/\",\"url\":\"https:\/\/www.names.co.uk\/support\/articles\/using-pear-modules\/\",\"name\":\"Using PEAR Modules - Support Centre - names.co.uk\",\"isPartOf\":{\"@id\":\"https:\/\/www.names.co.uk\/support\/#website\"},\"datePublished\":\"2020-06-03T10:43:07+00:00\",\"dateModified\":\"2024-10-25T11:33:10+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.names.co.uk\/support\/articles\/using-pear-modules\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.names.co.uk\/support\/articles\/using-pear-modules\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.names.co.uk\/support\/articles\/using-pear-modules\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.names.co.uk\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using PEAR Modules\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.names.co.uk\/support\/#website\",\"url\":\"https:\/\/www.names.co.uk\/support\/\",\"name\":\"Support Centre - names.co.uk\",\"description\":\"names.co.uk Support Centre\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.names.co.uk\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using PEAR Modules - Support Centre - names.co.uk","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.names.co.uk\/support\/articles\/using-pear-modules\/","og_locale":"en_GB","og_type":"article","og_title":"Using PEAR Modules - Support Centre - names.co.uk","og_description":"PEAR modules should be installed within your website rather than globally onto the server itself, the advantage this provides primarily is portability; you&#8217;ll be able to move your website between different hosting servers without needing to reinstall these modules, as they&#8217;ll be contained within your website. For the sake of simplicity, we&#8217;re going to pretend [&hellip;]","og_url":"https:\/\/www.names.co.uk\/support\/articles\/using-pear-modules\/","og_site_name":"Support Centre - names.co.uk","article_publisher":"https:\/\/www.facebook.com\/namesco","article_modified_time":"2024-10-25T11:33:10+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/www.names.co.uk\/support\/wp-content\/uploads\/2021\/02\/og-support-centre.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_site":"@namesco","twitter_misc":{"Estimated reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.names.co.uk\/support\/articles\/using-pear-modules\/","url":"https:\/\/www.names.co.uk\/support\/articles\/using-pear-modules\/","name":"Using PEAR Modules - Support Centre - names.co.uk","isPartOf":{"@id":"https:\/\/www.names.co.uk\/support\/#website"},"datePublished":"2020-06-03T10:43:07+00:00","dateModified":"2024-10-25T11:33:10+00:00","breadcrumb":{"@id":"https:\/\/www.names.co.uk\/support\/articles\/using-pear-modules\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.names.co.uk\/support\/articles\/using-pear-modules\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.names.co.uk\/support\/articles\/using-pear-modules\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.names.co.uk\/support\/"},{"@type":"ListItem","position":2,"name":"Using PEAR Modules"}]},{"@type":"WebSite","@id":"https:\/\/www.names.co.uk\/support\/#website","url":"https:\/\/www.names.co.uk\/support\/","name":"Support Centre - names.co.uk","description":"names.co.uk Support Centre","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.names.co.uk\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"}]}},"_links":{"self":[{"href":"https:\/\/www.names.co.uk\/support\/wp-json\/wp\/v2\/ht-kb\/76","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.names.co.uk\/support\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.names.co.uk\/support\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.names.co.uk\/support\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.names.co.uk\/support\/wp-json\/wp\/v2\/comments?post=76"}],"version-history":[{"count":1,"href":"https:\/\/www.names.co.uk\/support\/wp-json\/wp\/v2\/ht-kb\/76\/revisions"}],"predecessor-version":[{"id":5195,"href":"https:\/\/www.names.co.uk\/support\/wp-json\/wp\/v2\/ht-kb\/76\/revisions\/5195"}],"wp:attachment":[{"href":"https:\/\/www.names.co.uk\/support\/wp-json\/wp\/v2\/media?parent=76"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.names.co.uk\/support\/wp-json\/wp\/v2\/ht-kb-category?post=76"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.names.co.uk\/support\/wp-json\/wp\/v2\/ht-kb-tag?post=76"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}