[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pear-general
Subject:    Re: [PEAR] optimal PEAR installation directory
From:       "Stephen Dewey" <stepheneliotdewey () gmail ! com>
Date:       2008-06-16 7:22:49
Message-ID: cc174c190806160022p69c0840s4cb836423c0efe8d () mail ! gmail ! com
[Download RAW message or body]

Actually, it looks like it is working now, but only because I added a
DSN entry to the container options. The documented approach (below)
didn't seem to work for me.

$container_options = array(
    'type'        => 'db',
    'database'    => 'dbname',
    'phptype'     => 'mysql',
    'username'    => 'root',
    'password'    => '',
    'mail_table'  => 'mail_queue',
);





On Mon, Jun 16, 2008 at 3:13 AM, Stephen Dewey
<stepheneliotdewey@gmail.com> wrote:
> 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/
>>
>

-- 
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic