yum install php-pear* on centos - php

I'm trying to install pear on my centos.
I've used "*yum install php-pear**" to install pear and it seemed to install with success. No errors. I restart my server.
However when I check out phpinfo(). I see that my php is still built using "--without-pear".
Isn't yum supposed to rebuild my php with pear? What would be possibly going wrong?
Thanks!

Try something like
$ pear list
and
$ pear info PEAR
- now if you get a listing of installed packages in the first case and information on what version of pear is installed in the second you're ready to use it.

The output of phpinfo() is correct; the binary was built without PEAR. Fortunately what it says there doesn't matter. Look into the sections below to see what is currently available.

yum does not rebuild anything. It downloads the necessary software modules and installs it on your machine. Your stock centos php does not have pear pre-compiled, but it will still be able to use pear once you've downloaded your modules.
If you cannot run pear, make sure you have the executable included in your path, or use "locate" to find it.

You might still need to configure PEAR, did you check the PEAR site?

Resolved, I have installed the given packages and restarted the server.
Try this
yum install php-pear php-gd php-pear-DB -y
service httpd restart.
it works

Related

Cannot install mbstring php conflict

I am trying to install php-mbstring with php 5.6 and I get this error:
Error: php56w-common conflicts with php-common-5.4.45-3.el6.remi.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
I have attempted to install php56-mbstring, but I get the following. I am not sure if this means it is already installed or not:
Nothing to do
What is the most appropriate package to install? Which one should I be trying to resolve and how can I resolve it. Thanks!
I run into same problem with my server running PHP 5.6.17. For me it seems that the extension that I was looking for was php56w-mbstring.x86_64
It can be found from webtatic repository. I don't remember enabling that by myself, but in case it is missing here is the instructions how to enable said repo: http://www.certdepot.net/rhel7-install-webtatic-repository/
You can list available repos in your server by command yum repolist
To search if your repos has something related to mbstring use command yum list *mbstring*
So solution for me was this: yum install php56w-mbstring.x86_64
Finally restart Apache: service httpd restart
By the way, I am running CentOS server so your commands might be slightly different on your OS.
Have you added the module to your PHP.ini file extension=php_mbstring.dll
I tried and tried everything until i came to this link. https://docs.phpmyadmin.net/en/latest/setup.html#debian-setup
I run /usr/sbin/pma-configure and bam I had phpmyadmin working without the mbstring error
there is so many setups now that it is hard to find the one you need.
running ubuntu 14.04 with 4 versions of php installed with virtualmin webmin cp. Debian and Ubuntu changed the way how setup is enabled and disabled. few just happy this is working now. hope this helps you spend less time that i did to find this solution.

XML Extension not found

I have centos 6.5 server and when I try to install php extension using pecl I get the following error:
XML Extension not found
All the documentations say that this extension is included by default... Why this error still exists?
According to a comment on php.net
Certain Linux distributions do not have this extension included in the minimum PHP package. It can usually be found in one of the "optional" php-* packages.
For CentOS, you will need to run yum install php-xml, which provides this extension.
So please try to install it using:
yum install php-xml
Also check your php.ini and make sure that the extension is not commented out with a ; it should be listed as:
extension=dom.so
In order to be absolutely sure whether or not a module is enabled you should use phpinfo()
Ubuntu 20.04 and phpV7.4 perfectly work. Try this one
sudo apt-get install php-xml

Cannot Install any PHP PECL through Cpanel (WHM) or SSH

When I try to install a module through PHP PECL through cpanel or whm (CENTOS 6.3 x86_64 / WHM 11.34.0 (build 7) ) I always get this result:
ERROR: `/root/tmp/pear/imagick/configure --with-imagick' failed The
Imagick.so object is not in
/usr/local/lib/php/extensions/no-debug-non-zts-20090626
Here in another example with html_parse:
ERROR: `/root/tmp/pear/html_parse/configure --with-ekhtml' failed The
html_parse.so object is not in
/usr/local/lib/php/extensions/no-debug-non-zts-20090626
I have googled it, done the suggestions and always the same result.
What library are you trying to install?
I've found mixed results using pecl on Redhat, centos, or fedora machinces if I've ever used yum to install their versions of PHP libs. The easiest way around your issue would be to look to see if it's in the Yum repo and install it that way:
yum search 'modulename'
yum install 'packagename'
I usually just do a yum search php and scan down the list of modules.
If you want to use pecl or can't because the libraries aren't part of yum, I'd remove the natively included version and build your PHP from scratch. You can remove PHP and related libraries installed with the distro via yum as well.
I have a similar server setup and I needed pecl_http. Instead of using WHM (Home »
Software » Module Installers) I used command line. Simply typed: pecl install pecl_http
It should be the same for other modules like the html_parse, just change the module name, like: pecl install html_parse
Figured I'd add this for anyone else looking for this info.

Pear won't uninstall

Recently I successfully uninstalled pear using the following command:
$ sudo pear uninstall pear
So I recently reinstalled it, but I botched the installation and I want to start over (once again). This time, when I run the above command, pear gives me this message:
pear/pear not installed
Any suggestions?
PEAR is just a bunch of php scripts. To uninstall it manually just remove /usr/share/php/PEAR (the path can vary on distribs)
Refer to the correct way to install and uninstall pear:
http://pear.php.net/manual/en/installation.getting.php

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.

Categories