{"id":116,"date":"2009-08-23T20:28:06","date_gmt":"2009-08-24T02:28:06","guid":{"rendered":"http:\/\/www.n8williams.com\/devblog\/?p=116"},"modified":"2009-08-23T22:33:59","modified_gmt":"2009-08-24T04:33:59","slug":"using-pear-classes-with-bluehost-php-edit-your-include_path","status":"publish","type":"post","link":"https:\/\/n8williams.com\/devblog\/general_dev\/using-pear-classes-with-bluehost-php-edit-your-include_path","title":{"rendered":"Using PEAR classes with bluehost php &#8211; Edit your include_path"},"content":{"rendered":"<p>Getting an HTTP_Request class was pissing me off. So it seems like you can&#8217;t install PECL classes on your php install because of rights issues on a shared hosting environment.<\/p>\n<p>BUT, you can get PEAR classes installed through the cPanel, using the PHP PEAR Packages link. I was adding the HTTP_Request package (HTTP_Request2 won&#8217;t install because there is no stable release as of yet).<\/p>\n<p>But even after the install, the classes could not be found. Like when I did require_once(&#8216;HTTP\/Request.php&#8217;) I was getting the classic not found warning and error:<\/p>\n<p><strong>Warning<\/strong>:  include(HTTP\/Request.php) [function.include]: failed to open stream: No such file or directory<br \/>\n<strong>Warning<\/strong>:  include() [function.include]: Failed opening &#8216;HTTP\/Request.php&#8217; for inclusion<br \/>\n<strong>Fatal error<\/strong>:  Class &#8216;HTTP_Request&#8217; not found<\/p>\n<p>You have to edit the php.ini (or ini_set the include_path ) to include :\/home\/yourusername\/php, or in my case the home directory is now home3 for some reason, with some weird aliasing allowing for home I think. The PEAR packages install to \/home\/yourusername\/php, so this needs to be added to the include path.<\/p>\n<p>If you still get:<br \/>\nPHP Fatal error:\u00a0 main(): Failed opening required &#8216;PEAR.php&#8217;<br \/>\nThen your include_path may be missing :\/usr\/lib\/php, this is the main (not your local user) php lib folder that, I think, has the main PEAR files (The ones that your local PEAR package installs like HTTP_Request will be calling). So when you install a PEAR package via the cPanel, it puts them in \/home\/yourusername\/php, and those files will need to know about the main PEAR install in \/usr\/lib\/php by having \/usr\/lib\/php in the include path.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Getting an HTTP_Request class was pissing me off. So it seems like you can&#8217;t install PECL classes on your php install because of rights issues on a shared hosting environment. BUT, you can get PEAR classes installed through the cPanel, using the PHP PEAR Packages link. I was adding the HTTP_Request package (HTTP_Request2 won&#8217;t install &hellip; <a href=\"https:\/\/n8williams.com\/devblog\/general_dev\/using-pear-classes-with-bluehost-php-edit-your-include_path\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Using PEAR classes with bluehost php &#8211; Edit your include_path&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.11 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Using PEAR classes with bluehost php - Edit your include_path - The Dev Pages<\/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:\/\/n8williams.com\/devblog\/general_dev\/using-pear-classes-with-bluehost-php-edit-your-include_path\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using PEAR classes with bluehost php - Edit your include_path - The Dev Pages\" \/>\n<meta property=\"og:description\" content=\"Getting an HTTP_Request class was pissing me off. So it seems like you can&#8217;t install PECL classes on your php install because of rights issues on a shared hosting environment. BUT, you can get PEAR classes installed through the cPanel, using the PHP PEAR Packages link. I was adding the HTTP_Request package (HTTP_Request2 won&#8217;t install &hellip; Continue reading &quot;Using PEAR classes with bluehost php &#8211; Edit your include_path&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/n8williams.com\/devblog\/general_dev\/using-pear-classes-with-bluehost-php-edit-your-include_path\" \/>\n<meta property=\"og:site_name\" content=\"The Dev Pages\" \/>\n<meta property=\"article:published_time\" content=\"2009-08-24T02:28:06+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2009-08-24T04:33:59+00:00\" \/>\n<meta name=\"author\" content=\"Nate Admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@admin\" \/>\n<meta name=\"twitter:site\" content=\"@admin\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nate Admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/n8williams.com\/devblog\/general_dev\/using-pear-classes-with-bluehost-php-edit-your-include_path#article\",\"isPartOf\":{\"@id\":\"https:\/\/n8williams.com\/devblog\/general_dev\/using-pear-classes-with-bluehost-php-edit-your-include_path\"},\"author\":{\"name\":\"Nate Admin\",\"@id\":\"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757\"},\"headline\":\"Using PEAR classes with bluehost php &#8211; Edit your include_path\",\"datePublished\":\"2009-08-24T02:28:06+00:00\",\"dateModified\":\"2009-08-24T04:33:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/n8williams.com\/devblog\/general_dev\/using-pear-classes-with-bluehost-php-edit-your-include_path\"},\"wordCount\":298,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757\"},\"articleSection\":[\"General Dev\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/n8williams.com\/devblog\/general_dev\/using-pear-classes-with-bluehost-php-edit-your-include_path#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/n8williams.com\/devblog\/general_dev\/using-pear-classes-with-bluehost-php-edit-your-include_path\",\"url\":\"https:\/\/n8williams.com\/devblog\/general_dev\/using-pear-classes-with-bluehost-php-edit-your-include_path\",\"name\":\"Using PEAR classes with bluehost php - Edit your include_path - The Dev Pages\",\"isPartOf\":{\"@id\":\"https:\/\/n8williams.com\/devblog\/#website\"},\"datePublished\":\"2009-08-24T02:28:06+00:00\",\"dateModified\":\"2009-08-24T04:33:59+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/n8williams.com\/devblog\/general_dev\/using-pear-classes-with-bluehost-php-edit-your-include_path#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/n8williams.com\/devblog\/general_dev\/using-pear-classes-with-bluehost-php-edit-your-include_path\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/n8williams.com\/devblog\/general_dev\/using-pear-classes-with-bluehost-php-edit-your-include_path#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/n8williams.com\/devblog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using PEAR classes with bluehost php &#8211; Edit your include_path\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/n8williams.com\/devblog\/#website\",\"url\":\"https:\/\/n8williams.com\/devblog\/\",\"name\":\"The Dev Pages\",\"description\":\"A knowledge base for web applications development (and beyond)\",\"publisher\":{\"@id\":\"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/n8williams.com\/devblog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757\",\"name\":\"Nate Admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/19d7bc7602072ac846e912622704a628?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/19d7bc7602072ac846e912622704a628?s=96&d=mm&r=g\",\"caption\":\"Nate Admin\"},\"logo\":{\"@id\":\"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/n8williams.com\",\"https:\/\/twitter.com\/admin\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using PEAR classes with bluehost php - Edit your include_path - The Dev Pages","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:\/\/n8williams.com\/devblog\/general_dev\/using-pear-classes-with-bluehost-php-edit-your-include_path","og_locale":"en_US","og_type":"article","og_title":"Using PEAR classes with bluehost php - Edit your include_path - The Dev Pages","og_description":"Getting an HTTP_Request class was pissing me off. So it seems like you can&#8217;t install PECL classes on your php install because of rights issues on a shared hosting environment. BUT, you can get PEAR classes installed through the cPanel, using the PHP PEAR Packages link. I was adding the HTTP_Request package (HTTP_Request2 won&#8217;t install &hellip; Continue reading \"Using PEAR classes with bluehost php &#8211; Edit your include_path\"","og_url":"https:\/\/n8williams.com\/devblog\/general_dev\/using-pear-classes-with-bluehost-php-edit-your-include_path","og_site_name":"The Dev Pages","article_published_time":"2009-08-24T02:28:06+00:00","article_modified_time":"2009-08-24T04:33:59+00:00","author":"Nate Admin","twitter_card":"summary_large_image","twitter_creator":"@admin","twitter_site":"@admin","twitter_misc":{"Written by":"Nate Admin","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/n8williams.com\/devblog\/general_dev\/using-pear-classes-with-bluehost-php-edit-your-include_path#article","isPartOf":{"@id":"https:\/\/n8williams.com\/devblog\/general_dev\/using-pear-classes-with-bluehost-php-edit-your-include_path"},"author":{"name":"Nate Admin","@id":"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757"},"headline":"Using PEAR classes with bluehost php &#8211; Edit your include_path","datePublished":"2009-08-24T02:28:06+00:00","dateModified":"2009-08-24T04:33:59+00:00","mainEntityOfPage":{"@id":"https:\/\/n8williams.com\/devblog\/general_dev\/using-pear-classes-with-bluehost-php-edit-your-include_path"},"wordCount":298,"commentCount":2,"publisher":{"@id":"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757"},"articleSection":["General Dev"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/n8williams.com\/devblog\/general_dev\/using-pear-classes-with-bluehost-php-edit-your-include_path#respond"]}]},{"@type":"WebPage","@id":"https:\/\/n8williams.com\/devblog\/general_dev\/using-pear-classes-with-bluehost-php-edit-your-include_path","url":"https:\/\/n8williams.com\/devblog\/general_dev\/using-pear-classes-with-bluehost-php-edit-your-include_path","name":"Using PEAR classes with bluehost php - Edit your include_path - The Dev Pages","isPartOf":{"@id":"https:\/\/n8williams.com\/devblog\/#website"},"datePublished":"2009-08-24T02:28:06+00:00","dateModified":"2009-08-24T04:33:59+00:00","breadcrumb":{"@id":"https:\/\/n8williams.com\/devblog\/general_dev\/using-pear-classes-with-bluehost-php-edit-your-include_path#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/n8williams.com\/devblog\/general_dev\/using-pear-classes-with-bluehost-php-edit-your-include_path"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/n8williams.com\/devblog\/general_dev\/using-pear-classes-with-bluehost-php-edit-your-include_path#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/n8williams.com\/devblog\/"},{"@type":"ListItem","position":2,"name":"Using PEAR classes with bluehost php &#8211; Edit your include_path"}]},{"@type":"WebSite","@id":"https:\/\/n8williams.com\/devblog\/#website","url":"https:\/\/n8williams.com\/devblog\/","name":"The Dev Pages","description":"A knowledge base for web applications development (and beyond)","publisher":{"@id":"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/n8williams.com\/devblog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757","name":"Nate Admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/19d7bc7602072ac846e912622704a628?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/19d7bc7602072ac846e912622704a628?s=96&d=mm&r=g","caption":"Nate Admin"},"logo":{"@id":"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/n8williams.com","https:\/\/twitter.com\/admin"]}]}},"_links":{"self":[{"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/posts\/116"}],"collection":[{"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/comments?post=116"}],"version-history":[{"count":4,"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/posts\/116\/revisions"}],"predecessor-version":[{"id":121,"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/posts\/116\/revisions\/121"}],"wp:attachment":[{"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/media?parent=116"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/categories?post=116"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/tags?post=116"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}