Jump to content

Reconfiguring PHP5 with PEAR


Recommended Posts

So I installed a script that needed PHP5. So I manually upgraded to PHP5. Well there's an error and the creator of the script says I need to reconfigure PHP5 with PEAR. The odd thing is I see PEAR installed.

 

Another problem is I cant find the site that I used to install PHP5 from yum. So I'm looking for a easy set of commands to reconfigure/install PHP5 with lots of extensions and PEAR configured with it.

 

Hope someone can help

Thanks for any help

:D

Link to comment
https://forums.phpfreaks.com/topic/168351-reconfiguring-php5-with-pear/
Share on other sites

Pear is simply a framework (of sorts) used by some php scripts, its written in php so php doesn't need to be rebuilt in order to use it.

 

I'm not a yum user so I'm not sure of the exact commands but have you tried searching your yum repo's for pear? eg;

 

yum search pear

 

Then to install it would be...

 

yum install <package-name>

 

where <package-name> would be something like php-pear (as found by your yum search).

It found and installed it. but I still get the error. It seems like PHP cant find PEAR or something like that. Not really sure.

I did come across some forums that said I need to tell PHP where to find PEAR.

 

Maybe that's my problem?

and if so then what would I edit  :confused: :confused:

You need to edit your include_path directive within your php.ini file. Yum should have done this for you, however, it may have failed.

 

You need to find where pear is installed, typically /usr/share/php/pear (or similar), then add this directory to your include_path within your php.ini file then restart your server for your php.ini changes to take effect.

I didn't find any include_path in my php.ini nor did I find anything relating to PEAR =/

 

You know how the commands should look? I'll just add them manually

 

Also "whereis" command said PEAR (since php-pear pulled up nothing) is located at

 

# whereis pear
pear: /usr/bin/pear /etc/pear.conf /usr/local/bin/pear /usr/local/etc/pear.conf /usr/share/pear

 

seems like there is a bunch of messy stuff happening >_<

The whereis returned correct data. The pear command is located within /usr/bin as it should be. Your pear libraries are located within /usr/share/pear so add that to your include path.

 

If you don't already have an include path defined (you should) it should now look like....

 

include_path = ".:/usr/share/pear"

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.