Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting PEAR to work on XAMPP (Apache/MySQL stack on Windows)

Tags:

php

pear

laconica

I'm trying to install Laconica, an open-source Microblogging application on my Windows development server using XAMPP as per the instructions provided.

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

  1. PEAR is located in C:\xampplite\php\pear
  2. phpinfo() shows me that the include path is .;\xampplite\php\pear

What am I doing wrong? Why isn't the PEAR folder being included?

like image 785
Donnie Thomas Avatar asked Sep 15 '08 13:09

Donnie Thomas


People also ask

Can I run two XAMPP in windows?

As two different versions of XAMPP cannot run on the same port, we need to change to the port. Steps to change the port for the XAMPP1_8_2: Open the file HTTP CONF file > change the port from the 80 to 8080. After changing the port click on save and exit.

Is PHP installed with XAMPP?

XAMPP is a free, easy-to-install Apache distribution containing MariaDB, PHP, and Perl.


1 Answers

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.

like image 145
user7075 Avatar answered Sep 30 '22 13:09

user7075