Installing PEAR on Linux Web Hosting
We no longer install PEAR (PHP Extension and Application Repository) by default on our Linux Web hosting environments.
PEAR is a structured library of open-source code for users of PHP. The installation requires a specialized file named go-pear.php, which is a modification of your php5.ini file. You also need to password protect the directory you create for the PEAR admin.
To Install PEAR on Linux Web Hosting
- Go to http://pear.php.net/go-pear.
- Copy the script on the page, and then paste it into a new text document.
- Save the new file as go-pear.php.
- Upload the file to the root level of your hosting account.
- Using an Internet browser, locate the file. For example, go to coolexample.com/go-pear.php, where coolexample.com is your domain name.
- Follow the displayed instructions.
NOTE: This installer creates an index.php in the root and overwrites any existing index.php files. To avoid accidental overwrite, you can temporarily rename the current index.php before running the go-pear.php script.
- Once the installation completes, update the php5.ini file with include_path:
“.:/usr/local/php5/lib/php:/absolutepath/PEAR”
- Create a directory for the PEAR admin, and then password protect it.
- Move the index.php that the PEAR installer created to the new directory. The directory is the path for your PEAR admin.
After installing PEAR, you can install modules by going to the PEAR admin at coolexample.com/pearadmin, where coolexample.com is your domain name.