Re: installing pear manually

From: Date: Tue, 10 Feb 2004 16:06:39 +0000
Subject: Re: installing pear manually
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-10608@lists.php.net to get a copy of this message
Hello Sasha, Of course there is. You can create a includes/ directory inside your "root" directory and place all the PEAR stuff there. Let's say your documentroot is /var/www/www.example.com/. Create a directory called "includes" in it. (/var/www/www.example.com/includes/). 1. Download the latest PEAR base package form http://pear.php.net/package/PEAR Extract all the files from it and upload to your server so that you'll have the following directory structure: /var/www/www.example.com/includes/PEAR.php /var/www/www.example.com/includes/System.php /var/www/www.example.com/includes/[.....] other files /var/www/www.example.com/includes/OS/Guess.php /var/www/www.example.com/includes/PEAR/Autoloader.php etc... (all of these files come from the base PEAR package .tgz) 2. Download the (latest stable) packages you'd like to use. For example, DB_DataObject can be downloaded from http://pear.php.net/package/DB_DataObject Package names refer to the directory hierarchy. So, DB_DataObject will have the following directory structure on your server: /var/www/www.example.com/includes/DB/DataObject.php <- main script /var/www/www.example.com/includes/DB/DataObject/*.* <- package files Another package, DB_DataObject_FormBuilder will have the following directory structure on your server: /var/www/www.example.com/includes/DB/DataObject/FormBuilder.php /var/www/www.example.com/includes/DB/DataObject/FormBuilder/*.* package.xml files may be completely ignored as long as you don't want to use the PEAR installer. Don't forget to modify the include_path php environment variable in your php.ini, or change it at the top of your scripts run-time: ini_set("include_path", '/var/www/www.example.com/includes/' . PATH_SEPARATOR . ini_get("include_path")); This way your packages can be loaded properly. More information: http://pear.php.net/manual/en/installation.manually.php Regards, Norbert ssklar wrote:
I'm a web developer working in a somewhat restricted server environment. The unit which controls the web server we work on has refused to install PEAR to the base php directory, citing security issues. They recommended that I simply copy the files to a directory on the server and link to them from there. I'd like to use the pear packages in my projects, but downloading the packages and placing them in a directory in my file structure has not worked for me. When one package looks for pear, it looks for it in the (forgive my terminology abuse, I'm unsure of how to describe this) root directory, but of course it isn't there. Is there a way in which I can arrange the files in a directory on the webserver that I have access to in such a way that preserves the directory structure? This is my first time posting on this list, so please forgive any breach of protocol. Sincerely, Sasha Sklar Web Application Developer Wayne State University


« previous php.pear.general (#10608) next »