Re: PEAR install

From: Date: Fri, 17 Dec 2004 15:01:44 +0000
Subject: Re: PEAR install
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-16285@lists.php.net to get a copy of this message
Pat Johnston wrote:
Hi I have started coding in php and would like to install and use PEAR. But my web host does not have PEAR installed. Can I install PEAR on my website on the remote host? The only means of upload is FTP...
Hi Pat, PEAR 1.4.0 will include the ability to install a local copy and have it automatically synced with the remote server. It is designed to handle situations exactly like this one. FYI, the code is implemented and tested in CVS, feel free to grab pear-core from cvs.php.net (google for anoncvs at php.net for anonymous cvs instructions) and install it locally like so: $ pear upgrade /path/to/pear-core/package-PEAR.xml $ pear install -o Net_FTP at your own risk - a fair number of features are not fully tested yet. However, if you run into trouble, simply run $ pear upgrade --force PEAR-1.3.3.1 and it will revert the changes. After installing, $ pear config-create /home/remoteuser/path/to/pear remote.ini where /home/remoteuser/path/to/pear is the FULL path to the location where you want PEAR installed. Then, ftp remote.ini to your remote host. Finally, $ pear config-create /localpath/to/mirroredpear local.ini (or $ pear config-create -w C:\localpath\to\mirroredpear local.ini on windows, try pear help config-create) to create a local config to use for mirroring. Finally, $ pear -c local.ini config-set remote_config ftp://user:pass@yourhost.com/remote.ini and voila, when you do $ pear -c local.ini install PackageName [PackageName2] it will automatically upload the package[s] to your ftp server. All you need to do is make sure that the remote include_path points to /home/remoteuser/path/to/pear/php before the remote server's own pear in order to use it. Either use an .htaccess or put this in every script: <?php set_include_path('.:/home/remoteuser/path/to/pear/php:' . get_include_path()); ?> assuming you are running PHP 4.3.0 or newer Regards, Greg

« previous php.pear.general (#16285) next »