 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
primeminister Site Admin

Joined: 16 Apr 2006 Posts: 94 Location: Netherlands
|
Posted: Tue Apr 18, 2006 11:35 am Post subject: Installing PEAR in your home directory |
|
|
I've got an old installation of PEAR and don't have the permissions to install a new version - what now?
Last edited by primeminister on Tue Apr 18, 2006 12:15 pm; edited 2 times in total |
|
| Back to top |
|
 |
primeminister Site Admin

Joined: 16 Apr 2006 Posts: 94 Location: Netherlands
|
Posted: Tue Apr 18, 2006 11:36 am Post subject: |
|
|
If $ which pear gives you something like /usr/local/bin/pear and $ pear -v shows a very old version or if you don't want to use it for other reasons, you have to install PEAR in your home directory.
Go to http://go-pear.org, save as gopear.php and do $ php gopear.php or try $ lynx -source http://pear.php.net/go-pear | php -q.
Use /home/user/pear as prefix while installing PEAR, where user is your username.
Once the installation is done, edit your PATH variable to include your planned new PEAR directory before the old one.
For example put a export PATH=/home/user/pear/bin:$PATH at the end of your ~/.bashrc or ~/.profile under Linux. $ echo $PATH should give you now /home/user/pear/bin:[...]
$ which pear should result in /home/user/pear/bin/pear and $ pear -v something like "PEAR Version: 1.4.8" (at the time of writing) or newer. Check the latest stable version at http://pear.php.net/package/PEAR under Current Release.
Now all you need is to set your include_path correctly, most likely via
| Code: | <?php
$path = ini_get('include_path');
ini_set('include_path', '/home/user/pear;'.$path);
?> |
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|