Pear SOAP and XAMPP on Ubuntu
All,
I have installed xampp for linux on ubuntu 9.10. The installation directory is /opt/lampp. The xampp website says PEAR comes with the installation.. I am relatively new to PEAR and want to know the answers for following:
Is PEAR installed with xampp or need to be installed separately using synaptic package manager? I browse to /opt/lampp/bin directory and see "pear" there, but when i type it in the command line, it says
"The program 'pear' is currently not installed. You can install it by typing: sudo apt-get install php-pear pear: command not found "
I want to use PEAR:SOAP package in my PHP code. How to use that? Do I 开发者_开发百科need to set any paths to the pear in my php.ini?
Thanks
I figured it out.. xampp comes with pear... So, what I did was..
- cd /opt/lampp/bin
- sudo ./pear install soap
- In PHP code, "require_once("SOAP/Client.php");
That's all !! :)
from what I was able to ascertain from my coleagues, you would need to populate pear to be able to use it. It does come with the installation, but requires the population to be used.
source for code
First, go to your xampp installation directory/folder and navigate to the php directory. For me it’s x:\xamplite\php
x: cd \xampplite\php pear install <package-name>
once this is done pear should be available to be used. And as for the second question. XAMPP should have taken care of any settings that were needed. You should not require any additions into the .ini for it to work.
However remember that there are no secuiritis when programming in this fashion, as stated by the XAMPP website.
EDIT**
also you have Pear Ubuntu install guide link that may help.
The error message you got back should be enough. Apparently the pear program isn't in your path. How did you install XAMPP? Did you use the package manager, or did you install it yourself?
If you used the package manager, then this is the correct next step:
sudo apt-get install php-pear
As you were given in the command help. Ubuntu doesn't install a lot of things by default, but it does install a database of stuff you might type, and what package you need to install to get that command to work.
If you installed it yourself, then you need to figure out how to get PEAR to register as being installed.
精彩评论