tags:

views:

229

answers:

4
+1  Q: 

PHP and PEAR

Hi All,

PHP 5 and I want to install PEAR so I can use Spreadsheet_Excel_Writer

I dont see how to install it on my ISP nor my personal Macbook.

Thoughts for both?

Thanks!

+1  A: 

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.

jlleblanc
But I need Pear installed, correct? I dont see anything that shipped called pear with my MacBook
Mac OS X ships with PHP and PEAR; you run it from the command line in Terminal.
jlleblanc
ok, I have PEAR going now, thanks Where do I put the Spreadsheet_Excel_Write now and test?
so it might be: pear install Spreadsheet_Excel_Writer
+1  A: 

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

SeanDowney
+1  A: 

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

gnud
+1  A: 

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

hangy