Search code examples
phppear

Question on installing PEAR on a shared server


I need to install PEAR on a shared server & was reading this page: http://pear.php.net/manual/en/installation.getting.php

Down the bottom part it says:

Go to go-pear and save as go-pear.php. Copy go-pear.php to your server and open the corresponding URL in your browser, for example http://example.com/pear/go-pear.php.

But then it says:

*Do not forget to protect the pear directory if you did not do already before the installation: Make it unreadable and not executable from external (i.e. put it outside public_html).*

Which directory are they talking about exactly? One you enter during the installation process?


Solution

  • the directory which contains the pear files (where pear was installed) It's always a good idea and best practise to keep library folders secured and out of reach for users (The best way is to move them out of the html root (The folder which you can access from your webbrowser) but not all webhosts allow you to access these parts of the server). Otherwise people could access sensible files in your librarys (get information about your setup/ weaknesses etc.).

    For example:

    you could have a library which contains a readme.txt changelog.txt etc. if somebody finds this file on your server he knows which version you use therefore knows if your website/ server might be attackable if in this particular version of the library are any known security holes (many people forget to update their librarys).