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
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).

Link to comment
Share on other sites

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:

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 >_<

Link to comment
Share on other sites

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"

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.