Re: installing PEAR standalone/non-root
| From: | Ryan Grange | Date: | Thu, 18 Oct 2001 15:20:54 +0000 |
| Subject: | Re: installing PEAR standalone/non-root | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-400@lists.php.net to get a copy of this message | ||
Got me what that "make" command is about. PEAR is a collection of PHP files,
not source code requiring compilation. Include can NOT be done in .htaccess
(PHP doesn't parse .htaccess - it's for Apache only), but I do know you can
override the php.ini's include path in your PHP file to include the directory
where you put your PEAR files.
(Since I've got root access on my machine, I can just download it to
/usr/share/lib/php/lib/php/pear and add that to php.ini myself.
For you though, I think what you need is...
$incpath = ini_get("include_path");
// Add path to PEAR
$incpath .= ":/home/{YOUR_DIR}/{PATH_TO_PEAR}";
// Remove :: if incpath already had a : at end
$incpath = str_replace("::", ":", $incpath);
// Set the new include path
ini_set("include_path", $incpath);
This is assuming the host doesn't have the security set to where you can't
pull php.ini's values.
On Wednesday 17 October 2001 07:54 pm, you wrote:
> Well, the thing I was wondering was, what do I do? I have it in my
> include_path via .htaccess, but do I need to do anything? Currently
> all I have is the pear directory directly from the php4 source tree,
> without doing anything to it. The install_pear.txt file just says to
> 'make install-su', but there isn't even a Makefile so I can do it
> manually. Any ideas? Thanks,
> John
>
> 10/17/01 8:15:54 PM, Ryan Grange <ryangrange@home.com> wrote:
> >IIRC, PEAR can be put anywhere and you can specify the full path to
>
> it in the
>
> >includes.
> >
> >On Wednesday 17 October 2001 02:04 pm, you wrote:
> >> Hello, can somebody give me instructions to install PEAR without
>
> PHP
>
> >> (I'm not root and PHP is already installed as part of Apache but
>
> PEAR
>
> >> is not). The only instructions I could find in the php4/pear dir
>
> were
>
> >> telling me to do 'make install-su' as root, which I can't do.
>
> Thanks,
>
> >> John