I recently found out how to install PEAR on a Godaddy shared hosting account.
- Visit http://pear.php.net/go-pear Save the text displayed onto your desktop and name it go-pear.php
Upload this to your server. If you’re hosting multiple domains on the account, it’s best that you should upload this file in your root folder.
visit your primary /root domaing (if u have more than one in one hosting) Run this file on your browser and follow the on-screen instructions.
- After completing the installation, it is time to edit your php.ini file.
If you are running PHP4, there should be a file in the root directory called php.ini.
If you are running PHP5, there should be a file in the root directory called php5.ini.
If not, create one and add/edit (.ini) the following: include_path = “.:/usr/local/php5/lib/php:/home/content/s/a/m/sample/html/PEAR”
- Keep in mind that /s/a/m/sample is just an example. Doing this will ensure that every page, you create, will look in the PEAR directory so that you it will use the installed packages.
NOTE: if u don’t know your root path directory, you can use this upload a php script containing this:
- //start script
- //end script
- This installation will include Pear_Frontend_Web which is the web-based admin interface. It may have created an index.php file in the directory where PEAR is installed (root).
IMPORTANT: If you have an index file in the root directory, MODIFYING THE NAME TO BE CREATED, IT WILL BE REPLACED FULLY (for example: pear.php)
If not you can get a copy from PEAR/docs/PEAR_Frontend_Web/docs/index.php.txt. I would suggest creating a folder called pear_admin in the root directory and storing this file there. If you didn’t install PEAR in the root directory, you may need to edit this file accordingly.
- You will need to create a .htaccess and .htpasswd file in the same directory as the index.php file. An example of how the .htaccess file should look as follows:
- AuthUserFile /home/content/s/a/m/sample/html/pear_admin/.htpasswd
- AuthType Basic
- AuthName “Web-based PEAR Frontend”
- Require valid-user
An example of how the .htpasswd file should look as follows:
This will create “admin” as the user name and “password” as the password. You can generate your own by going to this link – http://www.htaccesstools.com/htpasswd-generator/
Be aware that files beginning with a dot are invisible. You may have to edit your settings on the FTP app you’re using so that you can see them.
Once the files are created and saved, you can now go to http://your-domain.com/pear_admin/index.php. It will ask for the user name and password. Once you are logged in, you can now manage Pear via web browser. That’s it! Now you can run PEAR on a shared account from Godaddy. One less complaint!
NOTE2: probably if you was moved the index/pear.php file from the root folder to pear_admin folder, you will need to edit this file for found correctly the PEAR folder wich is located.
so, edit the line and add the full URL path: $pear_dir = ‘/home/content/a/b/b/abcdary/html/PEAR’;
*thanks for the original author of this article: http://abbyandwin.net/blog/tag/pear/