Re: DB_DataObject, to work what do I need
| From: | Brent Cook | Date: | Sun, 08 Sep 2002 21:45:44 +0000 |
| Subject: | Re: DB_DataObject, to work what do I need | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-8954@lists.php.net to get a copy of this message | ||
> I have ssh access to MY files on the system.
>
> http://www.php.net/manual/en/function.ini-set.php
>
> As I understand ini_set, I put it in php files and it depends on settings in php.ini which I
> don't control. But I'm certainly not going to mess with ini_set for
> other people's files.
>
> Here is what I do on one of my servers to tell Perl where to find my local modules:
>
> setenv PERL5LIB /usr/home/rede1/usr/local/lib/site_perl
>
> so when I run Perl at the command line it finds my modules. Works like a
> charm. I put the above path in my httpd.conf on that server so Apache
> knows where they are. I have no problems.
>
> But I don't understand how to do this with Pear. I know I can use an
> include path for simiple php classes I created and put it in the
> document root in .htaccess as such:
>
> php_value include_path ".:/home/pschon/php_modules"
> php_flag safe_mode on
> php_flag register_globals off
>
> And that works for Pear. But my system is using Pear from somewhere
> else, somewhere controlled by the ROOT server:
>
Peter:
When I need to use a local copy of pear, I copy the files I need from pear
into a local directory and use ini_set() in the header of my application:
ini_set('include_path', '.:/home/busterb/include/pear');
include('PEAR.php');
etc.
Your .htaccess file should work too. When you set the include path with
the .htaccess file though, does it append or overwrite the global
include_path. I know that ini_set() overwrites it, so there's no way for a
system-wide copy of pear to interfere (it won't be found).
You can check by setting your include_path in .htaccess and doing an
echo ini_get('include_path');
The bigger trick, at least for me, was installing pear into a given
directory simply and automatically. I just have a shell script that copies
the things I need to the right places, but it ignores the package.xml
files, so it's not the best solution.
Now that I'm thinking about it, it might be nice if there was a 'pear
essentials' distribution tarball/zip file that users could just decompress
and include; a kind of snapshot of the most useful/mature components. The
pear utility and packaging is nice, but a one-stop distro would be helpful
for pear newbies, especially ones without their own servers to work with.
- Brent