Welcome, Guest. [ Log In ]
Question   Do you support PEAR with your PHP?
Search KBase


Top 5 in this Area:
1. What's the difference between PHP-CGI and PHP as an Apache module?
2. PHP Security
3. Compiling your own custom PHP
4. Can I run a phpbb forum (message board) on my site?
5. Do you support this PHP module or extension?

 
Do you support PEAR with your PHP?
Yes!

PEAR is included in the default distribution of PHP as of 4.3.0, which we have (at least.. actually a more recent version) installed on all servers!

Just run the command

pear list
on your server and you'll get a list of what PEAR modules you have installed.. here's an example output:

Installed packages:
===================
Package        Version  State  
Archive_Tar    1.1      stable 
Console_Getopt 1.2      stable 
DB             1.6.0    stable 
HTTP           1.2.2    stable 
Mail           1.1.2    stable 
Net_SMTP       1.2.3    stable 
Net_Socket     1.0.1    stable 
PEAR           1.3.1dev devel  
XML_Parser     1.0.1    stable 
XML_RPC        1.0.4    stable 

Most people mean the DB package when they speak of PEAR -- and it's there. Of course, there are many other packages not bundled with the distribution, but you can always use

pear install --installroot=<dir> <package>
to install into a directory that you then add to include_path.

Last updated: Jul 29, 2004.

Official Reply (2005-07-17 19:30:37 )
In the actual PHP code, the ini_set(path to your installed package); function
works well. I post this for general info, (not for the issue of jdouthat, who wishes not to modify the actual script).
User Post (2005-12-02 08:35:03 by jmcclure)
in .htaccess:

php_value auto_prepend_file /path/to/update_path.php

then create update_path.php and enter:

// Define Include Path for Shared Libraries
$shared_lib_path = /path/to/new/libraries/';
set_include_path(get_include_path() . PATH_SEPARATOR.$shared_lib_path);
User Post (2005-05-28 10:20:18 by johnnym)
Yeah, this is not very straightforward. I've been vainly attempting to install
PEAR's Net_Ping package to no avail. It's the same issue with paths.
User Post (2005-03-26 09:25:50 by inkypix)
In order to use .htaccess files to set the include path, PHP must be installed as an Apache module. If PHP is compiled as a CGI binary, you can set the include path in a custom php.ini file (or so ive heard)

im having the same issue, in that i cant get .htaccess php include_paths working... and cant get them working with custom php.ini files... anybody?
User Post (2004-10-11 14:36:49 by coj)
errr, although I dunno if that works in the CGI situation. sorry.
User Post (2004-10-11 14:33:46 by coj)
You can do it using an .htaccess file directive, like:

php_value include_path <your_include_path>

Note that this doesn't add but *overwrite* the include_path setting, so you'll need to enter the default paths in addition to the new ones you want.
User Post (2004-09-24 10:28:04 by jdouthat)
does anyone know how to add a directory to your include_path without modifying your scripts when you're using PHP as a CGI?