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. 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 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.
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). 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/.htpasswdAuthType BasicAuthName “Web-based PEAR Frontend”Require valid-user
An example of how the .htpasswd file should look as follows:
admin:cGyUX9QugYMgE
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
orignal link :http://abbyandwin.net/blog/2008/06/16/installing-pear-on-godaddy-shared-accounts/
No comments:
Post a Comment