RE: [PEAR] Missing packages in PEAR installation on shared server- How to install?
| From: | Tim Weichman | Date: | Tue, 16 Dec 2003 02:34:43 +0000 |
| Subject: | RE: [PEAR] Missing packages in PEAR installation on shared server- How to install? | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-9545@lists.php.net to get a copy of this message | ||
Bertrand,
Just to complete the thread on this post (and especially for those newcomers
who have to find the right installation tricks for their shared hosting
environments):
Having telnet access I was able to install my own copy of PEAR using my
Windows telnet terminal. To begin, I used Start | Run and entered telnet in
the Open box. After configuring the Remote Host info in the telnet terminal
window, I was able to login using our regular account username and password.
Once logged in to the server, I created a PEAR folder within our user folder
on the server. Having write access to everything beneath our user folder,
this newly created PEAR folder can be used to install the PEAR packages.
example: /usr/www/users/our_main_account_folder/pear
Not sure if this matters, but I made sure I was in the above folder before
proceeding (using the Unix commads pwd (print working directory), cd (change
directory), and mkdir (make directory)). Not sure if this matters either,
but best to make sure you're in the actual folder where your docs are
stored, and not an alias that points to that location, before creating your
new pear folder.
Next I executed this command within my telnet window:
lynx -source http://go-pear.org/ | php
I hit <enter> when asked if I wished to continue then <enter> again to
continue without specifying the HTTP proxy.
In the suggested file layout I specified a different Installation Prefix
(enter 1, then <enter>). I used the path for the PEAR folder created earlier
(see above). After that all of the paths looked OK since they were
derivatives of the Installation Prefix. Hit <enter> to continue.
When prompted if I wanted to install the packages that are bundled with PEAR
I chose yes and continued.
The system then prompted if I wanted to change php.ini so that my custom
PEAR folder would be included in the include path. I chose no, as I was
worried that it might stir up some trouble at my host (probably I would have
been denied access anyway).
The system then told me that the default include path doesn't include my new
folder and that a workaround had been added so that the installer will work.
Sweet!
With that, PEAR was installed and available for other packages to be
installed.
Two things to remember:
1) Somehow you need to modify your include path to add the new PEAR
directory to it... or just specify the complete path in your "require_once"
statements when including PEAR classes. I have an application config file
that gets called for all of my pages, so in that file I just modified the
include path like this:
$PEAR_DIR = '/usr/www/users/our_main_account_folder/pear/lib/php';
ini_set( 'include_path', ':' . $PEAR_DIR . ':' .
ini_get('include_path'));
NOTE: Notice that the actual include path is slightly different from the
directory that was created to hold the PEAR installation.
One of the folks on this list might even know a way to configure APACHE or
PHP using a config file in the document root for your site.
2) When installing other PEAR packages through your telnet connection, you
can't use the standard command:
PEAR install Package_Name (because the pear command is not in your PATH
variable).
Instead you have to use the complete directory as notified during the
installation process when issuing the pear commands. In this case it would
be:
/usr/www/users/our_main_account_folder/pear/bin/pear
For example, to see a complete list of installer commands, you would issue
the following at the command prompt:
/usr/www/users/our_main_account_folder/pear/bin/pear pear
Sorry for all the words, but that should complete it for those who find the
post.
Tim
-----Original Message-----
From: Bertrand Mansion [mailto:bmansion@mamasam.com]
Sent: Saturday, December 13, 2003 2:29 AM
To: timw@guyfinley.com; pear-general@lists.php.net
Subject: Re: [PEAR] Missing packages in PEAR installation on shared
server- How to install?
<timw@guyfinley.com> wrote :
> Our site is on a shared server at Pair Networks. We have FTP and telnet
> access to the server and it's running PHP 4.3.4. The Pair support people
> provided me with the path to the pre-installed PEAR package
> ('/usr/local/lib/php/PEAR') but they provide no support beyond providing
> that info.
Are you sure they didn't mean /usr/local/lib/php ?
If HTML_QuickForm is installed, using: pear install HTML_QuickForm
then a require_once('HTML/QuickForm.php'); should be enough to get it to
work.
You can probably see what's installed using the pear command line tool from
telnet. Try to do a 'pear' to see what options you have , then a 'pear
list-all'
Bertrand Mansion
Mamasam
--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php