Re: Installing local PEAR copy on shared host
| From: | Jim Tom Polk | Date: | Mon, 29 Dec 2003 03:32:36 +0000 |
| Subject: | Re: Installing local PEAR copy on shared host | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-9850@lists.php.net to get a copy of this message | ||
Thanks, that helps out. This new shared pear installer is just the thing to broaden the usage of PEAR beyond people who have a technical bent or who had PEAR installed on their sytem by their SysAdmin.
I recently started using PEAR, and recommended as an alternative to the "Dynamic Libraries" that used to come with GoLive, but was flat out told that installation for beginners was not an alternative, especially for the "mass hosting providers", that instead using something like ADODB would have to be used. I sat down and wrote out a whole list of instructions, and realized that with that long of a list, someone just starting WOULD make tiny mistakes and get frustrated, so I worked on them some more, took a break to turn out some projects, and when I next look at the PEAR site there is this wonderful installer, that other than needing some tweaking for the configuration and the include path is absolutely wonderful.
It makes PEAR something that I can turn to someone needing to add dynamic content to a web site, and who is very new, and say "give it a try": a quality, peer reviewed libraries AND a quick and easy installer.
Yipee!
On Wed, 24 Dec 2003 03:25:53 +0000, Helgi <helgi@trance.is> wrote
Well here is one quite good solution :) // Setup include path $app_root = dirname(__FILE__); $pear = $app_root . '/pear/'; $delim = (PHP_OS == "WIN32" || PHP_OS == "WINNT") ? ';': ':'; ini_set('include_path', ".{$delim}$pear{$delim}$app_root/include{$delim}$app_root"); this is a part of my config file which is located in the root dir of my project :) which i got from this here artical http://smarty.incutio.com/?page=SmartestSmartyPractices ( user of PEAR in a local dir with Smarty ) with a small modifaction dirname(__FILE__) this allows you to move the whole project between folders/servers without need to modify the config file :) Author of the artical is Tom Anderson (toma) Regards Helgi Jim Tom Polk wrote:-- Jim Tom Polk - Alive Since 1954 Helping hold a LAMP to West Texas http://users.camalott.com/~jtpolk/ Using M2: http://www.opera.com/m2/Check your configuration. The documentation does not state that you need to double check the configuration. Once you get it correct, manually, it works great! I elected to install PEAR into /www/servername/includes, and after it installed the basics, it wrote the file for the front end into that directory. I copied it over to a place accessible to my web server, then ran it, and it gave me the same errors. Changing the configuration fixed the problem. Before I go there, you might want to do the include path differently. It assumes a certain configuration, that will not work on all servers. I work on Linux, so it would do it like this... <?php ini_set('include_path' . '/www/servername/includes/PEAR' . PATH_SEPARATOR . ini_get('include_path')); ?> But that does not work because the PATH_SEPARATOR does not work on my system, so I do: ini_set("include_path",ini_get("include_path") . ":/www/servername/includes/PEAR"); With that aside...