Re: Local install help

From: Date: Sat, 10 Jun 2006 09:34:02 +0000
Subject: Re: Local install help
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-24313@lists.php.net to get a copy of this message
Justin Patrin wrote:
On 6/8/06, Patrick Paul <ppaul_apache@yahoo.ca> wrote:
Hi, After trying for hours to get PEAR working on a remote server I am turning to the experts on this list. Bascically I am using PEAR for a web application. On my local server I had no problems setting up PEAR, wether in /usr/share/pear, on a local account or just by copying the files of the packages I used. However I cannot get it to work on a remote server on which I have SSH access. I have tried copying the PEAR files of the packages I am using (the same way I did it on my box), I was also able to do a local install but that didn't work out (I suspect I can't require files from the user's home directory). I do not have access to the error_log which makes it hard to troubleshoot. Am I doing something wrong ? Ideally I would like to have a copy of the packages as part of my application. Although that worked fine on my home machine it did not on the remote server. Are there some paths that need to be setup and if so how can I find them ? Any help would be very much appreciated. Thank you, Patrick P.S. Here is a concrete example of what I am attempting to do : copy PEAR.php, MDB2.php, PEAR and MDB2 into lib/ (MDB2_Driver_mysql is installed, and the MySQL server works fine with PHP) create and index.php file such as : |<?php require_once 'lib/MDB2.php';
This is a wrong way to require PEAR packages. You should require them from the pear installation root. require_once 'MDB2.php'; PEAR *requires* that the PEAR installation directory be in your include_path. You either need to set this in the php.ini or in a .htaccess or in your script with ini_set('include_path', '...'); or set_include_path('...');.
This worsk fine on my home machine but not on the remote server. I must be missing something.
Thank you for the tip Justin. I got things working by copying the PEAR files to a lib/ directory I created for my web application. Which bring me to the question of wether this is appropriate and how can I know which parts of the PEAR files need configuration (automatically done by the installer ?) Patrick

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