Re: optimal PEAR installation directory
| From: | Stephen Dewey | Date: | Mon, 16 Jun 2008 07:13:01 +0000 |
| Subject: | Re: optimal PEAR installation directory | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-29016@lists.php.net to get a copy of this message | ||
Thanks for the information. This has been helpful. I'm now having
difficulty connecting to my database using MDB2, and the worst part is
that I can't really determine what is going wrong. I modified the file
to dump the full error object but it doesn't seem to include any
useful information:
Mail_Queue_Error Object ( [error_message_prefix] => [mode] => 1
[level] => 256 [code] => -6 [message] => Mail Queue Error: Cannot
connect to database [userinfo] => MDB2::connect failed - FILE:
/usr/share/pear/PEAR/Mail/Queue/Container/mdb2.php, LINE: 141
[backtrace] => Array ( [0] => Array ( [file] =>
/usr/share/pear/PEAR/Mail/Queue.php [line] => 555 [function] =>
PEAR_Error [class] => PEAR_Error [type] => -> [args] => Array ( [0]
=> Mail Queue Error: Cannot connect to database [1] => -6 [2] => 1 [3]
=> 256 [4] => MDB2::connect failed - FILE:
/usr/share/pear/PEAR/Mail/Queue/Container/mdb2.php, LINE: 141 ) ) [1]
=> Array ( [file] =>
/usr/share/pear/PEAR/Mail/Queue/Container/mdb2.php [line] => 141
[function] => Mail_Queue_Error [class] => Mail_Queue_Error [object] =>
Mail_Queue_Error Object *RECURSION* [type] => -> [args] => Array (
[0] => -6 [1] => 1 [2] => 256 [3] =>
/usr/share/pear/PEAR/Mail/Queue/Container/mdb2.php [4] => 141 [5] =>
MDB2::connect failed ) ) [2] => Array ( [file] =>
/usr/share/pear/PEAR/Mail/Queue/Container/mdb2.php [line] => 226
[function] => _checkConnection [class] => Mail_Queue_Container_mdb2
[object] => Mail_Queue_Container_mdb2 Object ( [db] => [mail_table] =>
mail_queue [sequence] => [queue_data] => Array ( ) [_current_item] =>
0 [_last_item] => 0 [limit] => [offset] => [try] => [force_preload] =>
[buffer_size] => 10 [pearErrorMode] => 1 ) [type] => -> [args] =>
Array ( ) ) [3] => Array ( [file] =>
/usr/share/pear/PEAR/Mail/Queue.php [line] => 441 [function] => put
[class] => Mail_Queue_Container_mdb2 [object] =>
Mail_Queue_Container_mdb2 Object ( [db] => [mail_table] => mail_queue
[sequence] => [queue_data] => Array ( ) [_current_item] => 0
[_last_item] => 0 [limit] => [offset] => [try] => [force_preload] =>
[buffer_size] => 10 [pearErrorMode] => 1 )
I know I'm using the right parameters and everything. Any suggestions
for debugging this?
On Sun, Jun 15, 2008 at 12:20 PM, Brett Bieber <brett.bieber@gmail.com> wrote:
> Hey Stephen,
>
> On Sat, Jun 14, 2008 at 4:03 PM, Stephen Dewey
> <stepheneliotdewey@gmail.com> wrote:
>> So I'm just wondering what the generally-recommended location for PEAR
>> installation is. Clearly it's contemplated that it might be in a web
>> directory since go-pear can be run from the web, but I'm wondering
>> about non-web locations
>
> I normally configure pear to place the package files within
> /usr/local/lib/php or /usr/share/pear
>
> By adding this path to the php.ini include_path, you can make this
> pear installation available without any additional configuration for
> each website.
>
> Individual websites can maintain their own PEAR installations if they
> need additional packages not in the system-wide pear installation, or
> a different version of a package in the system-wide pear installation.
> The individual websites would just need to alter their include path by
> using <?php set_include_path(...);
> The manual has more details on configuring a PEAR installation for
> individual sites in a shared-hosting environment -
> http://pear.php.net/manual/en/installation.shared.php
>
> Hope that helps!
>
> --
> Brett Bieber
>
> http://saltybeagle.com/
>