The website cannot find PEAR, and throws the below errors:
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
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
phpinfo()shows me that the include path is
What am I doing wrong? Why isn't the PEAR folder being included?
You need to fix your
include_path system variable to point to the correct location.
To fix it edit the
php.ini file. In that file you will find a line that says, "
include_path = ...". (You can find out what the location of php.ini by running
phpinfo() on a page.) Fix the part of the line that says, "
\xampplite\php\pear\PEAR" to read "
C:\xampplite\php\pear". Make sure to leave the semi-colons before and/or after the line in place.
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.
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.
The problem is with the config file. I found the correct settings after a lot of trial and error.
Simply pull up a command window in the \xampp\php directory and run
pear config-set doc_dir :\xampp\php\docs\PEAR pear config-set cfg_dir :\xampp\php\cfg pear config-set data_dir :\xampp\php\data\PEAR pear config-set test_dir :\xampp\php\tests pear config-set www_dir :\xampp\php\www
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.