NYCPHP Meetup

NYPHP.org

[nycphp-talk] PEAR on shared servers

Jayesh Sheth jayeshsh at ceruleansky.com
Fri Dec 31 10:36:23 EST 2004


Hello Matthew,

In the past I have done "local installs" of PEAR libraries on shared 
servers. For examples, if you need the Auth package, you first find all 
its dependencies from its download page ( 
http://pear.php.net/package/Auth/download ). You then look up which 
libraries those dependencies depend on, and so on.

So, if you need to include 'DB.php', you just install it to the 
directory you are working in. This is somewhat quick-and-dirty, but 
sometimes it is the only thing that works.

You could also use the PEAR command line installer if you have SSH 
access, but I prefer to "hand install" my PEAR libraries, especially 
since I often have to "hand edit" them to get them to work on shared 
servers.

The funny thing is that you are (theoretically) supposed to be able to 
set the include_path using the ini_set() function, but that has rarely 
worked for me. So theoretically, you are supposed to be able to install 
all PEAR libraries to a new directory and then set the include_path 
setting to point to that setting at the top of your script. But that 
often does not work and I do not know why. (PEAR uses the include_path 
setting in php.ini to determine where to find PEAR library files.)

Best regards,

- Jay




More information about the talk mailing list