Jason
Jason

Reputation:

Installing PEAR on PHP 5?

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?

Upvotes: 1

Views: 1604

Answers (4)

hangy
hangy

Reputation: 10859

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

Upvotes: 3

gnud
gnud

Reputation: 78528

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

Upvotes: 2

SeanDowney
SeanDowney

Reputation: 17734

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

Upvotes: 1

jlleblanc
jlleblanc

Reputation: 3510

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.

Upvotes: 2

Related Questions