4

I'm trying to install a package via PEAR, PHPUnit to be precise. However, the server I'm using is not connected to the Internet.

I managed to find a .tgz of PHPUnit in its PEAR repository at : PEAR PHPunit-3.7
(although it's not the latest version, 3.8)

When I tried to put this on the server, I ran pear install PHPUnit-3.7.22.tgz but I got:

Unknown channel "pear.phpunit.de"
Parsing of package.xml from file "/var/tmp/pearUdSQzm/package.xml" failed
install failed

So what do I need to do instead?

3 Answers3

4

I had to use the the -O (offline) parameter of pear

pear install -O /path/to/packet.tgz

in order to stop pear trying to connect to pear.php.net first.

r_3
  • 161
2

Apart from downloading the packages, you need to download all dependencies and install them first.

Before you can do that, you need to register the channels. For each channel you have packages from, download /channel.xml and use pear add channel.xml to register it.

Then you can install the package .tgz file without problems.

cweiske
  • 2,191
1

Use the full path of the file

For Example :

pear install /path/to/PHPUnit-3.7.22.tgz