<p>I'm trying to install <a href="http://laconi.ca/" rel="noreferrer">Laconica</a>, an open-source Microblogging application on my Windows development server using XAMPP as per the <a href="http://laconi.ca/trac/wiki/InstallationWindows" rel="noreferrer">instructions provided</a>.</p>
<p>The website cannot find PEAR, and throws the below errors:</p>
<blockquote>
<p>Warning: require_once(PEAR.php) [function.require-once]: failed to open stream: No such file or directory in C:\xampplite\htdocs\laconica\lib\common.php on line 31</p>
<p>Fatal error: require_once() [function.require]: Failed opening required 'PEAR.php' (include_path='.;\xampplite\php\pear\PEAR') in C:\xampplite\htdocs\laconica\lib\common.php on line 31</p>
</blockquote>
<ol>
<li>PEAR is located in <code>C:\xampplite\php\pear</code></li>
<li><code>phpinfo()</code> shows me that the include path is <code>.;\xampplite\php\pear</code></li>
</ol>
<p>What am I doing wrong? Why isn't the PEAR folder being included?</p>

[{'answer_id': 62755, 'author': 'Sietse', 'author_id': 6400, 'author_profile': 'https://Stackoverflow.com/users/6400', 'pm_score': 0, 'selected': False, 'text': "<p>Try adding the drive letter:</p>\n\n<pre><code>include_path='.;c:\\xampplite\\php\\pear\\PEAR'\n</code></pre>\n\n<p>also verify that PEAR.php is actually there, it might be in \\php\\ instead:</p>\n\n<pre><code>include_path='.;c:\\xampplite\\php'\n</code></pre>\n"}, {'answer_id': 62763, 'author': 'THEMike', 'author_id': 7106, 'author_profile': 'https://Stackoverflow.com/users/7106', 'pm_score': 1, 'selected': False, 'text': "<p>AS per point 1, your PEAR path is c:\\xampplite\\php\\pear\\</p>\n\n<p>However, your path is pointing to \\xampplite\\php\\pear\\PEAR</p>\n\n<p>Putting the two one above the other you can clearly see one is too long:</p>\n\n<p>c:\\xampplite\\php\\pear\\</p>\n\n<p>\\xampplite\\php\\pear\\PEAR</p>\n\n<p>Your include path is set to go one PEAR too deep into the pear tree. The PEAR subfolder of the pear folder includes the PEAR component. You need to adjust your include path up one level.</p>\n\n<p>(you don't need the c: by the way, your path is fine as is, just too deep)</p>\n"}, {'answer_id': 62829, 'author': 'user7075', 'author_id': 7075, 'author_profile': 'https://Stackoverflow.com/users/7075', 'pm_score': 6, 'selected': True, 'text': '<p>You need to fix your <code>include_path</code> system variable to point to the correct location. </p>\n\n<p>To fix it edit the <code>php.ini</code> file. In that file you will find a line that says, "<code>include_path = ...</code>". (You can find out what the location of php.ini by running <code>phpinfo()</code> on a page.) Fix the part of the line that says, "<code>\\xampplite\\php\\pear\\PEAR</code>" to read "<code>C:\\xampplite\\php\\pear</code>". Make sure to leave the semi-colons before and/or after the line in place.</p>\n\n<p>Restart PHP and you should be good to go. To restart PHP in IIS you can restart the application pool assigned to your site or, better yet, restart IIS all together.</p>\n'}, {'answer_id': 12060371, 'author': 'Reid Johnson', 'author_id': 1429777, 'author_profile': 'https://Stackoverflow.com/users/1429777', 'pm_score': 3, 'selected': False, 'text': "<p>If you are using the portable XAMPP installation and Windows 7, and, like me have the version after they removed the XAMPP shell from the control panel none of the suggested answers here will do you much good as the packages will not install.</p>\n\n<p>The problem is with the config file. I found the correct settings after a lot of trial and error.</p>\n\n<p>Simply pull up a command window in the \\xampp\\php directory and run</p>\n\n<pre><code>pear config-set doc_dir :\\xampp\\php\\docs\\PEAR\npear config-set cfg_dir :\\xampp\\php\\cfg\npear config-set data_dir :\\xampp\\php\\data\\PEAR\npear config-set test_dir :\\xampp\\php\\tests\npear config-set www_dir :\\xampp\\php\\www\n</code></pre>\n\n<p>you will want to replace the ':' with the actual drive letter that your portable drive is running on at the moment. Unfortunately, this needs to be done any time this drive letter changes, but it did get the module I needed installed.</p>\n"}, {'answer_id': 18788627, 'author': 'bluestraggler', 'author_id': 1413229, 'author_profile': 'https://Stackoverflow.com/users/1413229', 'pm_score': 0, 'selected': False, 'text': "<p>Another gotcha for this kind of problem: avoid running pear within a Unix shell (e.g., Git Bash or Cygwin) on a Windows machine. I had the same problem and the path fix suggested above didn't help. Switched over to a Windows shell, and the pear command works as expected.</p>\n"}, {'answer_id': 31203967, 'author': 'Alex Rapso', 'author_id': 3679696, 'author_profile': 'https://Stackoverflow.com/users/3679696', 'pm_score': 2, 'selected': False, 'text': '<p>I tried all of the other answers first but none of them seemed to work so I set the pear path statically in the pear config file</p>\n\n<p>C:\\xampp\\php\\pear\\Config.php</p>\n\n<p>find this code:</p>\n\n<pre><code>if (!defined(\'PEAR_INSTALL_DIR\') || !PEAR_INSTALL_DIR) {\n    $PEAR_INSTALL_DIR = PHP_LIBDIR . DIRECTORY_SEPARATOR . \'pear\';\n} \nelse {\n    $PEAR_INSTALL_DIR = PEAR_INSTALL_DIR;\n}\n</code></pre>\n\n<p>and just replace it with this:</p>\n\n<pre><code>$PEAR_INSTALL_DIR = "C:\\\\xampp\\\\php\\\\pear";\n</code></pre>\n\n<p>I restarted apache and used the command:</p>\n\n<pre><code>pear config-all \n</code></pre>\n\n<p>make sure the all of the paths no longer start with C:\\php\\pear</p>\n'}, {'answer_id': 41975155, 'author': 'mpalencia', 'author_id': 1191830, 'author_profile': 'https://Stackoverflow.com/users/1191830', 'pm_score': 1, 'selected': False, 'text': "<p>On Windows use the <strong>Xampp shell</strong> (there is a 'Shell' button in your XAMPP control panel)</p>\n\n<p>then</p>\n\n<pre><code>cd php\\pear\n</code></pre>\n\n<p>to go to 'C:\\xampp\\php\\pear'</p>\n\n<p>then type</p>\n\n<pre><code>pear\n</code></pre>\n"}, {'answer_id': 55215386, 'author': 'Musab ibnu Siraj', 'author_id': 10579938, 'author_profile': 'https://Stackoverflow.com/users/10579938', 'pm_score': 2, 'selected': False, 'text': '<p>I fixed </p>\n\n<p>avast deletes your server.php in your directory\nso disable the antivirus </p>\n\n<p>check the (server.php) file on your laravel folder</p>\n\n<blockquote>\n  <p>server.php</p>\n</blockquote>\n\n<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">\r\n<div class="snippet-code">\r\n<pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;?php\r\n\r\n/**\r\n * Laravel - A PHP Framework For Web Artisans\r\n *\r\n * @package  Laravel\r\n * @author   Taylor Otwell &lt;taylor@laravel.com&gt;\r\n */\r\n\r\n$uri = urldecode(\r\n    parse_url($_SERVER[\'REQUEST_URI\'], PHP_URL_PATH)\r\n);\r\n\r\n// This file allows us to emulate Apache\'s "mod_rewrite" functionality from the\r\n// built-in PHP web server. This provides a convenient way to test a Laravel\r\n// application without having installed a "real" web server software here.\r\nif ($uri !== \'/\' &amp;&amp; file_exists(__DIR__.\'/public\'.$uri)) {\r\n    return false;\r\n}\r\n\r\nrequire_once __DIR__.\'/public/index.php\';</code></pre>\r\n</div>\r\n</div>\r\n</p>\n'}]
['https://Stackoverflow.com/questions/62658', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/6939/']