I have an old project that relies heavily on PEAR. I need to run the script that installs pear packages daily on a clean virtual machine. In other words, I have to install packages daily since it's a new vm everyday.
Now that PEAR is down and there is no ETA, I can't instal from php.pear.net
My question is how to install pear packages now that pear server is down.
Download the zip you need from https://github.com/pear/ for example: https://github.com/pear/Pager and then pear install package.xml
Unfortunately, this is a terrible solution and it remains to wait until the party gets up.
I tried install package pear Pager in this way:
Download zip from github -> in console I went to the downloaded folder -> I used the command: sudo pear install package.xml
then Pager is installed, but with many package this is very problematic...
I got info from another dev that I have to wait for the website to get up, but it has been going on for so long...
Related
I am using XAMPP 1.8.1.
I need to write code with PHPUnit.
When I try to install PEAR using command prompt, I get the message below:
Are you installing a system-wide PEAR or a local copy?
Could some one suggest which option I should use?
Thanks in advance.
PEAR is usually installed system-wide. The benefit of this is that the various packages can be reused between different projects.
One reason why you might install a local copy of PEAR is that the administrator[s] of the server you are installing on might be reluctant to install additional packages or upgrade existing ones.
By performing a local install of PEAR you can choose the location of where the PEAR installer places the packages/PEAR code that you install.
So, another reason for installing local, even multiple, copies of PEAR is to have separate installs for each project you might be working on, though using Composer in this scenario is much more common place.
Naturally if you do install a local copy of PEAR then you will need to adjust your include-path accordingly.
I'm a little confused about the reasoning behind installing PEAR through CLI like this (ubu ntu/debian):
sudo apt-get install php-pear
AFAIK Pear is just PHP library - so - that's just bunch of PHP classes. So - if I need one - I just go to their website, download one, plug it into my php code - and that's it. - right? or so I think.
so - my questions are:
1) Why would I install PEAR through command line? What are the benefits over just downloading and ungzipping a package?
2) If installed through CLI - Where those packages are being installed? what dir?
Thanks:)
UPDATE
In retrospect - if you have the same problems with PEAR - they have been addressed by pyrus installer.
Right now - there is no need to install PEAR into single directory using apt-get or whatever. One can simply download pyrus installer (it's a single file) and install PEAR packages using pyrus installer file wherever you want. You can even have multiple PEAR packages location - no need top install it under /usr/php/pear or whatever.
makes a lot more sense than PEAR installer.
PEAR can resolve a package's dependencies much like apt does. You won't have to download dependency packages yourself.
On debian, that's usually /usr/share/php
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.
i want to install magento extension but not from the magento connect how can i do this
i have the module(extension) code and i allready install the sample data in magento installtion
From magento wiki:
Alternatively, if you do not like to make all files and folders writable to the web service, it is possible to install and upgrade Magento from shell, using command line PEAR instructions, such as:
# all commands are to be ran from the root Magento folder.
# help on all available PEAR commands:
./pear help
# set preferred stability for installed/upgraded packages (alpha,beta,stable):
./pear config-set preferred_state beta
# initial installation from downloader package:
./pear mage-setup .
./pear install magento-core/Mage_All_Latest
# install additional extension:
./pear install magento-community/Some_Extension
# list available upgrades
./pear list-upgrades
# upgrade a package
./pear upgrade magento-core/Mage_Package
# uninstall a package
./pear uninstall magento-community/Unwanted_Package
The pear script should be located under magento/downloader/pearlib
Besides installing Magento extension via Magento Connect Manager, you can install manually by using the "Magento Extension Downloader" tool here: http://miragedesign.net/tools/download-magento-extension/
Basically, you just need to enter the key and click Get Extension button, then download the "ready to use" zip file, extract all the content of the extension folder to your Magento installation root, clear cache and that's all!!!
A more detail guide can be found here: http://miragedesign.net/newss/download-magento-extension-directly/
Hope it's useful for you!
For some reason i have better luck with the mage functions, such as
./pear upgrade-all
./mage sync-pear
./mage upgrade-all
if you get a conflicting error, then run
./mage upgrade-all --force
It's depend on how your extension was packaged(occurred), e.g. pear package(most likely you downloaded extension from magento website or purchased from professional vendor) or regular archive(purchased from some junior or amateurish vendor):
installing pear package:
./pear install Foo_FooBar-0.1.0.tgz
installing from regular archive: usually you just need to extract archive into the magento root, otherwise look for instruction inside archive or request from vendor
See also installing magento via ssh
Thanks.
I want to install PEAR on PHP 5, so I can use Spreadsheet_Excel_Writer.
I don`t know how to install it on my ISP nor my personal MacBook.
Thoughts for both?
The PEAR Manual has a quite extensive list of instructions on how to install the PEAR manager on Windows, *NIX and Mac OS X. The manual also has a section on installing PEAR remotely, for example using FTP. Following those instructions, you should be able to install PEAR (nearly) anywhere. :)
From the command line, do this:
pear install Spreadsheet_Excel_Writer
You can also download the package directly here without using PEAR: http://download.pear.php.net/package/Spreadsheet_Excel_Writer-0.9.1.tgz. It's pretty easy to use if you have the script located anywhere within your include path.
For your personal computer, using the "pear" script that ships with most PHP distributions is a good idea.
For shared hosting, you can
Track your dependencies manually, and copy all the appropriate files to the server yourself
With pear installed, do "pear install -R/my/root_dir -a Spreadsheet_Excel_Writer". This will install the package and all dependencies to the specified root directory. Copy this installation to your webhost.
You should also have a look at "pear help" and "pear help install".
You can't install pear to your isp's core. But you can install the individual files from pear's site and upload them to your host:
http://pear.php.net/package/Spreadsheet_Excel_Writer/download