FAQ
Edit report at https://pear.php.net/bugs/bug.php?id=19505&edit=1

ID: 19505
Updated by: alan@roojs.com
Reported By: noel at arc2 dot co dot uk
Summary: Upgrading from 1.7.15 to 1.10.0 causes error due to
no links file
Status: Open
Type: Bug
Package: DB_DataObject
Operating System: OSX 10.6.8
Package Version: 1.10.0
PHP Version: 5.3.8
Roadmap Versions:
New Comment:

Can you test this - the decision code for using the proxy generator
should be simpler.

Note you need to have the ini setting 'proxy' => 1 set somewhere for it
to work.

http://svn.php.net/viewvc/pear/packages/DB_DataObject/trunk/DB/DataObject.php?
revision=326601&view=co


Previous Comments:
------------------------------------------------------------------------

[2012-07-11 22:49:01] noeldc

Description:
------------
I'm using DB_DataObjects without any links file because I find it
non RAD to use the links.ini file.

Until v1.7.15, this worked fine. It hasn't worked since then.

Test script:
---------------
$test = DB_DataObject::factory('menu');
DB_DataObject::debugLevel(5);
$result = $test->get(1);
var_dump($result);
die('end');

Expected result:
----------------

Menu: CONNECT: NEW CONNECTION
Menu: CONNECT:
mysql://root:root@localhost/headspace_local
fdc0344bd4c91aff97a75e2d0628c197
Menu: CONNECT: a:1:
{s:32:"fdc0344bd4c91aff97a75e2d0628c197";O:8:"DB_mysql"
:8:
{s:10:"autocommit";b:1;s:8:"dbsyntax";s:5:"mysql";s:3:"dsn"
;a:9:
{s:7:"phptype";s:5:"mysql";s:8:"dbsyntax";s:5:"mysql";s:8:"u
sername";s:4:"root";s:8:"password";s:4:"root";s:8:"protocol";
s:3:"tcp";s:8:"hostspec";s:9:"localhost";s:4:"port";b:0;s:6:"so
cket";b:0;s:8:"database";s:15:"headspace_local";}s:8:"featur
es";a:7:
{s:5:"limit";s:5:"alter";s:8:"new_link";s:5:"4.2.0";s:7:"numro
ws";b:1;s:8:"pconnect";b:1;s:7:"prepare";b:0;s:3:"ssl";b:0;s:
12:"transactions";b:1;}s:9:"fetchmode";i:1;s:22:"fetchmode_
object_class";s:8:"stdClass";s:7:"options";a:8:
{s:16:"result_buffering";i:500;s:10:"persistent";b:0;s:3:"ssl";
b:0;s:5:"debug";i:0;s:14:"seqname_format";s:6:"%s_seq";s:8
:"autofree";b:0;s:11:"portability";i:0;s:8:"optimize";s:11:"perf
ormance";}s:13:"was_connected";b:1;}}
DB_DataObject_Generator: CONNECT: USING CACHED
CONNECTION
DB_DataObject_Generator: fillTable: getting def for
headspace_local/menu
DB_DataObject_Generator: defs: Array ( [0] => Array (
[table] => menu [name] => menu_id [type] => int [len] =>
10 [flags] => not_null primary_key unsigned auto_increment )
[1] => Array ( [table] => menu [name] => name [type] =>
string [len] => 25 [flags] => ) [2] => Array ( [table] =>
menu [name] => editable [type] => int [len] => 1 [flags] =>
) [3] => Array ( [table] => menu [name] => viewable [type]
=> string [len] => 255 [flags] => ) [4] => Array ( [table] =>
menu [name] => description [type] => blob [len] => 65535
[flags] => blob ) )
TABLE STRUCTURE FOR menu Array ( [0] => stdClass Object
( [table] => menu [name] => menu_id [type] => int [len] =>
10 [flags] => not_null primary_key unsigned auto_increment )
[1] => stdClass Object ( [table] => menu [name] => name
[type] => string [len] => 25 [flags] => ) [2] => stdClass
Object ( [table] => menu [name] => editable [type] => int
[len] => 1 [flags] => ) [3] => stdClass Object ( [table] =>
menu [name] => viewable [type] => string [len] => 255
[flags] => ) [4] => stdClass Object ( [table] => menu [name]
=> description [type] => blob [len] => 65535 [flags] => blob
) ) Array ( [0] => dump for menu [1] => Array ( [table] =>
Array ( [menu_id] => 129 [name] => 2 [editable] => 17
[viewable] => 2 [description] => 66 ) [keys] => Array (
[menu_id] => N ) ) ) Menu: GET: menu_id 1 Array ( [0] =>
menu_id )
Menu: __find: 1
Menu: QUERY: SELECT * FROM menu WHERE menu.menu_id =
1
Menu: query: QUERY DONE IN 0.000351905822754 seconds
Menu: RESULT: O:9:"DB_result":11:
{s:8:"autofree";b:0;s:3:"dbh";O:8:"DB_mysql":8:
{s:10:"autocommit";b:1;s:8:"dbsyntax";s:5:"mysql";s:3:"dsn"
;a:9:
{s:7:"phptype";s:5:"mysql";s:8:"dbsyntax";s:5:"mysql";s:8:"u
sername";s:4:"root";s:8:"password";s:4:"root";s:8:"protocol";
s:3:"tcp";s:8:"hostspec";s:9:"localhost";s:4:"port";b:0;s:6:"so
cket";b:0;s:8:"database";s:15:"headspace_local";}s:8:"featur
es";a:7:
{s:5:"limit";s:5:"alter";s:8:"new_link";s:5:"4.2.0";s:7:"numro
ws";b:1;s:8:"pconnect";b:1;s:7:"prepare";b:0;s:3:"ssl";b:0;s:
12:"transactions";b:1;}s:9:"fetchmode";i:1;s:22:"fetchmode_
object_class";s:8:"stdClass";s:7:"options";a:8:
{s:16:"result_buffering";i:500;s:10:"persistent";b:0;s:3:"ssl";
b:0;s:5:"debug";i:0;s:14:"seqname_format";s:6:"%s_seq";s:8
:"autofree";b:0;s:11:"portability";i:0;s:8:"optimize";s:11:"perf
ormance";}s:13:"was_connected";b:1;}s:9:"fetchmode";i:1;s:
22:"fetchmode_object_class";s:8:"stdClass";s:11:"limit_count"
;N;s:10:"limit_from";N;s:10:"parameters";a:0:
{}s:5:"query";s:47:"SELECT * FROM menu WHERE
menu.menu_id = 1
";s:6:"result";i:0;s:11:"row_counter";N;s:9:"statement";N;}
Menu: __find: CHECK autofetchd 1
Menu: __find: ABOUT TO AUTOFETCH
Menu: FETCH: a:5:
{s:7:"menu_id";s:1:"1";s:4:"name";s:8:"TopMenu2";s:8:"edit
able";N;s:8:"viewable";s:1:"1";s:11:"description";s:30:"Main
headspace navigation menu";}
Menu: fetchrow LINE: menu_id = 1
Menu: fetchrow LINE: name = TopMenu2
Menu: fetchrow LINE: editable =
Menu: fetchrow LINE: viewable = 1
Menu: fetchrow LINE: description = Main headspace navigation
menu
Menu: fetchrow: menu DONE
Menu: __find: DONE
int(1) end


Actual result:
--------------

Menu: CONNECT: Checking for database specific ini ('') :
database_ in options
Menu: CONNECT: NEW CONNECTION TP DATABASE :
Menu: CONNECT:
mysql://root:root@localhost/headspace_local
fdc0344bd4c91aff97a75e2d0628c197
Menu: CONNECT: a:1:
{s:32:"fdc0344bd4c91aff97a75e2d0628c197";O:8:"DB_mysql"
:8:
{s:10:"autocommit";b:1;s:8:"dbsyntax";s:5:"mysql";s:3:"dsn"
;a:9:
{s:7:"phptype";s:5:"mysql";s:8:"dbsyntax";s:5:"mysql";s:8:"u
sername";s:4:"root";s:8:"password";s:4:"root";s:8:"protocol";
s:3:"tcp";s:8:"hostspec";s:9:"localhost";s:4:"port";b:0;s:6:"so
cket";b:0;s:8:"database";s:15:"headspace_local";}s:8:"featur
es";a:7:
{s:5:"limit";s:5:"alter";s:8:"new_link";s:5:"4.2.0";s:7:"numro
ws";b:1;s:8:"pconnect";b:1;s:7:"prepare";b:0;s:3:"ssl";b:0;s:
12:"transactions";b:1;}s:9:"fetchmode";i:1;s:22:"fetchmode_
object_class";s:8:"stdClass";s:7:"options";a:8:
{s:16:"result_buffering";i:500;s:10:"persistent";b:0;s:3:"ssl";
b:0;s:5:"debug";i:0;s:14:"seqname_format";s:6:"%s_seq";s:8
:"autofree";b:0;s:11:"portability";i:0;s:8:"optimize";s:11:"perf
ormance";}s:13:"was_connected";b:1;}}
Menu: databaseStructure: Cant find database schema:
headspace_local/menu
in links file data: Array
(
[headspace_local] => Array
(
)

)

Menu: ERROR: Unable to load schema for database and table
(turn debugging up to 5 for full error message)
DB_DataObject Error: Unable to load schema for database and
table (turn debugging up to 5 for full error message)

------------------------------------------------------------------------

Search Discussions

  • Noel at Jul 12, 2012 at 7:25 am
    Edit report at https://pear.php.net/bugs/bug.php?id=19505&edit=1

    ID: 19505
    Updated by: noel@arc2.co.uk
    Reported By: noel at arc2 dot co dot uk
    Summary: Upgrading from 1.7.15 to 1.10.0 causes error due to
    no links file
    Status: Open
    Type: Bug
    Package: DB_DataObject
    Operating System: OSX 10.6.8
    Package Version: 1.10.0
    PHP Version: 5.3.8
    Roadmap Versions:
    New Comment:

    Just tried the version on your (with proxy = full and then with proxy =
    1). No
    change. Same error:

    Menu: CONNECT: Checking for database specific ini ('') : database_ in
    options
    Menu: CONNECT: NEW CONNECTION TP DATABASE :
    Menu: CONNECT: mysql://root:root@localhost/headspace_local
    fdc0344bd4c91aff97a75e2d0628c197
    Menu: CONNECT: a:1:
    {s:32:"fdc0344bd4c91aff97a75e2d0628c197";O:8:"DB_mysql":8:
    {s:10:"autocommit";b:1;s:8:"dbsyntax";s:5:"mysql";s:3:"dsn";a:9:
    {s:7:"phptype";s:5:"mysql";s:8:"dbsyntax";s:5:"mysql";s:8:"username";s:4:"root"
    ;s:8:"password";s:4:"root";s:8:"protocol";s:3:"tcp";s:8:"hostspec";s:9:"localhost";s
    :4:"port";b:0;s:6:"socket";b:0;s:8:"database";s:15:"headspace_local";}s:8:"featur
    es";a:7:
    {s:5:"limit";s:5:"alter";s:8:"new_link";s:5:"4.2.0";s:7:"numrows";b:1;s:8:"pconnec
    t";b:1;s:7:"prepare";b:0;s:3:"ssl";b:0;s:12:"transactions";b:1;}s:9:"fetchmode";i:1
    ;s:22:"fetchmode_object_class";s:8:"stdClass";s:7:"options";a:8:
    {s:16:"result_buffering";i:500;s:10:"persistent";b:0;s:3:"ssl";b:0;s:5:"debug";i:0;s
    :14:"seqname_format";s:6:"%s_seq";s:8:"autofree";b:0;s:11:"portability";i:0;s:8:"
    optimize";s:11:"performance";}s:13:"was_connected";b:1;}}
    Menu: databaseStructure: Cant find database schema: headspace_local/menu

    in links file data: Array
    (
    [headspace_local] => Array
    (
    )

    )

    Menu: ERROR: Unable to load schema for database and table (turn
    debugging up to
    5 for full error message)
    DB_DataObject Error: Unable to load schema for database and table (turn

    debugging up to 5 for full error message)


    Previous Comments:
    ------------------------------------------------------------------------

    [2012-07-12 04:51:04] alan_k

    Can you test this - the decision code for using the proxy generator
    should be simpler.

    Note you need to have the ini setting 'proxy' => 1 set somewhere for it
    to work.

    http://svn.php.net/viewvc/pear/packages/DB_DataObject/trunk/DB/DataObject.php?
    revision=326601&view=co

    ------------------------------------------------------------------------

    [2012-07-11 22:49:01] noeldc

    Description:
    ------------
    I'm using DB_DataObjects without any links file because I find it
    non RAD to use the links.ini file.

    Until v1.7.15, this worked fine. It hasn't worked since then.

    Test script:
    ---------------
    $test = DB_DataObject::factory('menu');
    DB_DataObject::debugLevel(5);
    $result = $test->get(1);
    var_dump($result);
    die('end');

    Expected result:
    ----------------

    Menu: CONNECT: NEW CONNECTION
    Menu: CONNECT:
    mysql://root:root@localhost/headspace_local
    fdc0344bd4c91aff97a75e2d0628c197
    Menu: CONNECT: a:1:
    {s:32:"fdc0344bd4c91aff97a75e2d0628c197";O:8:"DB_mysql"
    :8:
    {s:10:"autocommit";b:1;s:8:"dbsyntax";s:5:"mysql";s:3:"dsn"
    ;a:9:
    {s:7:"phptype";s:5:"mysql";s:8:"dbsyntax";s:5:"mysql";s:8:"u
    sername";s:4:"root";s:8:"password";s:4:"root";s:8:"protocol";
    s:3:"tcp";s:8:"hostspec";s:9:"localhost";s:4:"port";b:0;s:6:"so
    cket";b:0;s:8:"database";s:15:"headspace_local";}s:8:"featur
    es";a:7:
    {s:5:"limit";s:5:"alter";s:8:"new_link";s:5:"4.2.0";s:7:"numro
    ws";b:1;s:8:"pconnect";b:1;s:7:"prepare";b:0;s:3:"ssl";b:0;s:
    12:"transactions";b:1;}s:9:"fetchmode";i:1;s:22:"fetchmode_
    object_class";s:8:"stdClass";s:7:"options";a:8:
    {s:16:"result_buffering";i:500;s:10:"persistent";b:0;s:3:"ssl";
    b:0;s:5:"debug";i:0;s:14:"seqname_format";s:6:"%s_seq";s:8
    :"autofree";b:0;s:11:"portability";i:0;s:8:"optimize";s:11:"perf
    ormance";}s:13:"was_connected";b:1;}}
    DB_DataObject_Generator: CONNECT: USING CACHED
    CONNECTION
    DB_DataObject_Generator: fillTable: getting def for
    headspace_local/menu
    DB_DataObject_Generator: defs: Array ( [0] => Array (
    [table] => menu [name] => menu_id [type] => int [len] =>
    10 [flags] => not_null primary_key unsigned auto_increment )
    [1] => Array ( [table] => menu [name] => name [type] =>
    string [len] => 25 [flags] => ) [2] => Array ( [table] =>
    menu [name] => editable [type] => int [len] => 1 [flags] =>
    ) [3] => Array ( [table] => menu [name] => viewable [type]
    => string [len] => 255 [flags] => ) [4] => Array ( [table] =>
    menu [name] => description [type] => blob [len] => 65535
    [flags] => blob ) )
    TABLE STRUCTURE FOR menu Array ( [0] => stdClass Object
    ( [table] => menu [name] => menu_id [type] => int [len] =>
    10 [flags] => not_null primary_key unsigned auto_increment )
    [1] => stdClass Object ( [table] => menu [name] => name
    [type] => string [len] => 25 [flags] => ) [2] => stdClass
    Object ( [table] => menu [name] => editable [type] => int
    [len] => 1 [flags] => ) [3] => stdClass Object ( [table] =>
    menu [name] => viewable [type] => string [len] => 255
    [flags] => ) [4] => stdClass Object ( [table] => menu [name]
    => description [type] => blob [len] => 65535 [flags] => blob
    ) ) Array ( [0] => dump for menu [1] => Array ( [table] =>
    Array ( [menu_id] => 129 [name] => 2 [editable] => 17
    [viewable] => 2 [description] => 66 ) [keys] => Array (
    [menu_id] => N ) ) ) Menu: GET: menu_id 1 Array ( [0] =>
    menu_id )
    Menu: __find: 1
    Menu: QUERY: SELECT * FROM menu WHERE menu.menu_id =
    1
    Menu: query: QUERY DONE IN 0.000351905822754 seconds
    Menu: RESULT: O:9:"DB_result":11:
    {s:8:"autofree";b:0;s:3:"dbh";O:8:"DB_mysql":8:
    {s:10:"autocommit";b:1;s:8:"dbsyntax";s:5:"mysql";s:3:"dsn"
    ;a:9:
    {s:7:"phptype";s:5:"mysql";s:8:"dbsyntax";s:5:"mysql";s:8:"u
    sername";s:4:"root";s:8:"password";s:4:"root";s:8:"protocol";
    s:3:"tcp";s:8:"hostspec";s:9:"localhost";s:4:"port";b:0;s:6:"so
    cket";b:0;s:8:"database";s:15:"headspace_local";}s:8:"featur
    es";a:7:
    {s:5:"limit";s:5:"alter";s:8:"new_link";s:5:"4.2.0";s:7:"numro
    ws";b:1;s:8:"pconnect";b:1;s:7:"prepare";b:0;s:3:"ssl";b:0;s:
    12:"transactions";b:1;}s:9:"fetchmode";i:1;s:22:"fetchmode_
    object_class";s:8:"stdClass";s:7:"options";a:8:
    {s:16:"result_buffering";i:500;s:10:"persistent";b:0;s:3:"ssl";
    b:0;s:5:"debug";i:0;s:14:"seqname_format";s:6:"%s_seq";s:8
    :"autofree";b:0;s:11:"portability";i:0;s:8:"optimize";s:11:"perf
    ormance";}s:13:"was_connected";b:1;}s:9:"fetchmode";i:1;s:
    22:"fetchmode_object_class";s:8:"stdClass";s:11:"limit_count"
    ;N;s:10:"limit_from";N;s:10:"parameters";a:0:
    {}s:5:"query";s:47:"SELECT * FROM menu WHERE
    menu.menu_id = 1
    ";s:6:"result";i:0;s:11:"row_counter";N;s:9:"statement";N;}
    Menu: __find: CHECK autofetchd 1
    Menu: __find: ABOUT TO AUTOFETCH
    Menu: FETCH: a:5:
    {s:7:"menu_id";s:1:"1";s:4:"name";s:8:"TopMenu2";s:8:"edit
    able";N;s:8:"viewable";s:1:"1";s:11:"description";s:30:"Main
    headspace navigation menu";}
    Menu: fetchrow LINE: menu_id = 1
    Menu: fetchrow LINE: name = TopMenu2
    Menu: fetchrow LINE: editable =
    Menu: fetchrow LINE: viewable = 1
    Menu: fetchrow LINE: description = Main headspace navigation
    menu
    Menu: fetchrow: menu DONE
    Menu: __find: DONE
    int(1) end


    Actual result:
    --------------

    Menu: CONNECT: Checking for database specific ini ('') :
    database_ in options
    Menu: CONNECT: NEW CONNECTION TP DATABASE :
    Menu: CONNECT:
    mysql://root:root@localhost/headspace_local
    fdc0344bd4c91aff97a75e2d0628c197
    Menu: CONNECT: a:1:
    {s:32:"fdc0344bd4c91aff97a75e2d0628c197";O:8:"DB_mysql"
    :8:
    {s:10:"autocommit";b:1;s:8:"dbsyntax";s:5:"mysql";s:3:"dsn"
    ;a:9:
    {s:7:"phptype";s:5:"mysql";s:8:"dbsyntax";s:5:"mysql";s:8:"u
    sername";s:4:"root";s:8:"password";s:4:"root";s:8:"protocol";
    s:3:"tcp";s:8:"hostspec";s:9:"localhost";s:4:"port";b:0;s:6:"so
    cket";b:0;s:8:"database";s:15:"headspace_local";}s:8:"featur
    es";a:7:
    {s:5:"limit";s:5:"alter";s:8:"new_link";s:5:"4.2.0";s:7:"numro
    ws";b:1;s:8:"pconnect";b:1;s:7:"prepare";b:0;s:3:"ssl";b:0;s:
    12:"transactions";b:1;}s:9:"fetchmode";i:1;s:22:"fetchmode_
    object_class";s:8:"stdClass";s:7:"options";a:8:
    {s:16:"result_buffering";i:500;s:10:"persistent";b:0;s:3:"ssl";
    b:0;s:5:"debug";i:0;s:14:"seqname_format";s:6:"%s_seq";s:8
    :"autofree";b:0;s:11:"portability";i:0;s:8:"optimize";s:11:"perf
    ormance";}s:13:"was_connected";b:1;}}
    Menu: databaseStructure: Cant find database schema:
    headspace_local/menu
    in links file data: Array
    (
    [headspace_local] => Array
    (
    )

    )

    Menu: ERROR: Unable to load schema for database and table
    (turn debugging up to 5 for full error message)
    DB_DataObject Error: Unable to load schema for database and
    table (turn debugging up to 5 for full error message)

    ------------------------------------------------------------------------
  • Alan at Jul 12, 2012 at 8:17 am
    Edit report at https://pear.php.net/bugs/bug.php?id=19505&edit=1

    ID: 19505
    Updated by: alan@roojs.com
    Reported By: noel at arc2 dot co dot uk
    Summary: Upgrading from 1.7.15 to 1.10.0 causes error due to
    no links file
    Status: Open
    Type: Bug
    Package: DB_DataObject
    Operating System: OSX 10.6.8
    Package Version: 1.10.0
    PHP Version: 5.3.8
    Roadmap Versions:
    New Comment:

    I've tested it here with tests/bug6953.php

    Seems to work fine - it looks like it's not picking up your proxy
    setting

    try var_Dump'ing the value near line 1981 to check that it's trying to
    use the
    generator.


    Previous Comments:
    ------------------------------------------------------------------------

    [2012-07-12 09:31:15] noeldc

    Just tried the version on your (with proxy = full and then with proxy =
    1). No
    change. Same error:

    Menu: CONNECT: Checking for database specific ini ('') : database_ in
    options
    Menu: CONNECT: NEW CONNECTION TP DATABASE :
    Menu: CONNECT: mysql://root:root@localhost/headspace_local
    fdc0344bd4c91aff97a75e2d0628c197
    Menu: CONNECT: a:1:
    {s:32:"fdc0344bd4c91aff97a75e2d0628c197";O:8:"DB_mysql":8:
    {s:10:"autocommit";b:1;s:8:"dbsyntax";s:5:"mysql";s:3:"dsn";a:9:
    {s:7:"phptype";s:5:"mysql";s:8:"dbsyntax";s:5:"mysql";s:8:"username";s:4:"root"
    ;s:8:"password";s:4:"root";s:8:"protocol";s:3:"tcp";s:8:"hostspec";s:9:"localhost";s
    :4:"port";b:0;s:6:"socket";b:0;s:8:"database";s:15:"headspace_local";}s:8:"featur
    es";a:7:
    {s:5:"limit";s:5:"alter";s:8:"new_link";s:5:"4.2.0";s:7:"numrows";b:1;s:8:"pconnec
    t";b:1;s:7:"prepare";b:0;s:3:"ssl";b:0;s:12:"transactions";b:1;}s:9:"fetchmode";i:1
    ;s:22:"fetchmode_object_class";s:8:"stdClass";s:7:"options";a:8:
    {s:16:"result_buffering";i:500;s:10:"persistent";b:0;s:3:"ssl";b:0;s:5:"debug";i:0;s
    :14:"seqname_format";s:6:"%s_seq";s:8:"autofree";b:0;s:11:"portability";i:0;s:8:"
    optimize";s:11:"performance";}s:13:"was_connected";b:1;}}
    Menu: databaseStructure: Cant find database schema: headspace_local/menu

    in links file data: Array
    (
    [headspace_local] => Array
    (
    )

    )

    Menu: ERROR: Unable to load schema for database and table (turn
    debugging up to
    5 for full error message)
    DB_DataObject Error: Unable to load schema for database and table (turn

    debugging up to 5 for full error message)

    ------------------------------------------------------------------------

    [2012-07-12 04:51:04] alan_k

    Can you test this - the decision code for using the proxy generator
    should be simpler.

    Note you need to have the ini setting 'proxy' => 1 set somewhere for it
    to work.

    http://svn.php.net/viewvc/pear/packages/DB_DataObject/trunk/DB/DataObject.php?
    revision=326601&view=co

    ------------------------------------------------------------------------

    [2012-07-11 22:49:01] noeldc

    Description:
    ------------
    I'm using DB_DataObjects without any links file because I find it
    non RAD to use the links.ini file.

    Until v1.7.15, this worked fine. It hasn't worked since then.

    Test script:
    ---------------
    $test = DB_DataObject::factory('menu');
    DB_DataObject::debugLevel(5);
    $result = $test->get(1);
    var_dump($result);
    die('end');

    Expected result:
    ----------------

    Menu: CONNECT: NEW CONNECTION
    Menu: CONNECT:
    mysql://root:root@localhost/headspace_local
    fdc0344bd4c91aff97a75e2d0628c197
    Menu: CONNECT: a:1:
    {s:32:"fdc0344bd4c91aff97a75e2d0628c197";O:8:"DB_mysql"
    :8:
    {s:10:"autocommit";b:1;s:8:"dbsyntax";s:5:"mysql";s:3:"dsn"
    ;a:9:
    {s:7:"phptype";s:5:"mysql";s:8:"dbsyntax";s:5:"mysql";s:8:"u
    sername";s:4:"root";s:8:"password";s:4:"root";s:8:"protocol";
    s:3:"tcp";s:8:"hostspec";s:9:"localhost";s:4:"port";b:0;s:6:"so
    cket";b:0;s:8:"database";s:15:"headspace_local";}s:8:"featur
    es";a:7:
    {s:5:"limit";s:5:"alter";s:8:"new_link";s:5:"4.2.0";s:7:"numro
    ws";b:1;s:8:"pconnect";b:1;s:7:"prepare";b:0;s:3:"ssl";b:0;s:
    12:"transactions";b:1;}s:9:"fetchmode";i:1;s:22:"fetchmode_
    object_class";s:8:"stdClass";s:7:"options";a:8:
    {s:16:"result_buffering";i:500;s:10:"persistent";b:0;s:3:"ssl";
    b:0;s:5:"debug";i:0;s:14:"seqname_format";s:6:"%s_seq";s:8
    :"autofree";b:0;s:11:"portability";i:0;s:8:"optimize";s:11:"perf
    ormance";}s:13:"was_connected";b:1;}}
    DB_DataObject_Generator: CONNECT: USING CACHED
    CONNECTION
    DB_DataObject_Generator: fillTable: getting def for
    headspace_local/menu
    DB_DataObject_Generator: defs: Array ( [0] => Array (
    [table] => menu [name] => menu_id [type] => int [len] =>
    10 [flags] => not_null primary_key unsigned auto_increment )
    [1] => Array ( [table] => menu [name] => name [type] =>
    string [len] => 25 [flags] => ) [2] => Array ( [table] =>
    menu [name] => editable [type] => int [len] => 1 [flags] =>
    ) [3] => Array ( [table] => menu [name] => viewable [type]
    => string [len] => 255 [flags] => ) [4] => Array ( [table] =>
    menu [name] => description [type] => blob [len] => 65535
    [flags] => blob ) )
    TABLE STRUCTURE FOR menu Array ( [0] => stdClass Object
    ( [table] => menu [name] => menu_id [type] => int [len] =>
    10 [flags] => not_null primary_key unsigned auto_increment )
    [1] => stdClass Object ( [table] => menu [name] => name
    [type] => string [len] => 25 [flags] => ) [2] => stdClass
    Object ( [table] => menu [name] => editable [type] => int
    [len] => 1 [flags] => ) [3] => stdClass Object ( [table] =>
    menu [name] => viewable [type] => string [len] => 255
    [flags] => ) [4] => stdClass Object ( [table] => menu [name]
    => description [type] => blob [len] => 65535 [flags] => blob
    ) ) Array ( [0] => dump for menu [1] => Array ( [table] =>
    Array ( [menu_id] => 129 [name] => 2 [editable] => 17
    [viewable] => 2 [description] => 66 ) [keys] => Array (
    [menu_id] => N ) ) ) Menu: GET: menu_id 1 Array ( [0] =>
    menu_id )
    Menu: __find: 1
    Menu: QUERY: SELECT * FROM menu WHERE menu.menu_id =
    1
    Menu: query: QUERY DONE IN 0.000351905822754 seconds
    Menu: RESULT: O:9:"DB_result":11:
    {s:8:"autofree";b:0;s:3:"dbh";O:8:"DB_mysql":8:
    {s:10:"autocommit";b:1;s:8:"dbsyntax";s:5:"mysql";s:3:"dsn"
    ;a:9:
    {s:7:"phptype";s:5:"mysql";s:8:"dbsyntax";s:5:"mysql";s:8:"u
    sername";s:4:"root";s:8:"password";s:4:"root";s:8:"protocol";
    s:3:"tcp";s:8:"hostspec";s:9:"localhost";s:4:"port";b:0;s:6:"so
    cket";b:0;s:8:"database";s:15:"headspace_local";}s:8:"featur
    es";a:7:
    {s:5:"limit";s:5:"alter";s:8:"new_link";s:5:"4.2.0";s:7:"numro
    ws";b:1;s:8:"pconnect";b:1;s:7:"prepare";b:0;s:3:"ssl";b:0;s:
    12:"transactions";b:1;}s:9:"fetchmode";i:1;s:22:"fetchmode_
    object_class";s:8:"stdClass";s:7:"options";a:8:
    {s:16:"result_buffering";i:500;s:10:"persistent";b:0;s:3:"ssl";
    b:0;s:5:"debug";i:0;s:14:"seqname_format";s:6:"%s_seq";s:8
    :"autofree";b:0;s:11:"portability";i:0;s:8:"optimize";s:11:"perf
    ormance";}s:13:"was_connected";b:1;}s:9:"fetchmode";i:1;s:
    22:"fetchmode_object_class";s:8:"stdClass";s:11:"limit_count"
    ;N;s:10:"limit_from";N;s:10:"parameters";a:0:
    {}s:5:"query";s:47:"SELECT * FROM menu WHERE
    menu.menu_id = 1
    ";s:6:"result";i:0;s:11:"row_counter";N;s:9:"statement";N;}
    Menu: __find: CHECK autofetchd 1
    Menu: __find: ABOUT TO AUTOFETCH
    Menu: FETCH: a:5:
    {s:7:"menu_id";s:1:"1";s:4:"name";s:8:"TopMenu2";s:8:"edit
    able";N;s:8:"viewable";s:1:"1";s:11:"description";s:30:"Main
    headspace navigation menu";}
    Menu: fetchrow LINE: menu_id = 1
    Menu: fetchrow LINE: name = TopMenu2
    Menu: fetchrow LINE: editable =
    Menu: fetchrow LINE: viewable = 1
    Menu: fetchrow LINE: description = Main headspace navigation
    menu
    Menu: fetchrow: menu DONE
    Menu: __find: DONE
    int(1) end


    Actual result:
    --------------

    Menu: CONNECT: Checking for database specific ini ('') :
    database_ in options
    Menu: CONNECT: NEW CONNECTION TP DATABASE :
    Menu: CONNECT:
    mysql://root:root@localhost/headspace_local
    fdc0344bd4c91aff97a75e2d0628c197
    Menu: CONNECT: a:1:
    {s:32:"fdc0344bd4c91aff97a75e2d0628c197";O:8:"DB_mysql"
    :8:
    {s:10:"autocommit";b:1;s:8:"dbsyntax";s:5:"mysql";s:3:"dsn"
    ;a:9:
    {s:7:"phptype";s:5:"mysql";s:8:"dbsyntax";s:5:"mysql";s:8:"u
    sername";s:4:"root";s:8:"password";s:4:"root";s:8:"protocol";
    s:3:"tcp";s:8:"hostspec";s:9:"localhost";s:4:"port";b:0;s:6:"so
    cket";b:0;s:8:"database";s:15:"headspace_local";}s:8:"featur
    es";a:7:
    {s:5:"limit";s:5:"alter";s:8:"new_link";s:5:"4.2.0";s:7:"numro
    ws";b:1;s:8:"pconnect";b:1;s:7:"prepare";b:0;s:3:"ssl";b:0;s:
    12:"transactions";b:1;}s:9:"fetchmode";i:1;s:22:"fetchmode_
    object_class";s:8:"stdClass";s:7:"options";a:8:
    {s:16:"result_buffering";i:500;s:10:"persistent";b:0;s:3:"ssl";
    b:0;s:5:"debug";i:0;s:14:"seqname_format";s:6:"%s_seq";s:8
    :"autofree";b:0;s:11:"portability";i:0;s:8:"optimize";s:11:"perf
    ormance";}s:13:"was_connected";b:1;}}
    Menu: databaseStructure: Cant find database schema:
    headspace_local/menu
    in links file data: Array
    (
    [headspace_local] => Array
    (
    )

    )

    Menu: ERROR: Unable to load schema for database and table
    (turn debugging up to 5 for full error message)
    DB_DataObject Error: Unable to load schema for database and
    table (turn debugging up to 5 for full error message)

    ------------------------------------------------------------------------
  • Noel at Jul 12, 2012 at 8:20 am
    Edit report at https://pear.php.net/bugs/bug.php?id=19505&edit=1

    ID: 19505
    Updated by: noel@arc2.co.uk
    Reported By: noel at arc2 dot co dot uk
    Summary: Upgrading from 1.7.15 to 1.10.0 causes error due to
    no links file
    Status: Open
    Type: Bug
    Package: DB_DataObject
    Operating System: OSX 10.6.8
    Package Version: 1.10.0
    PHP Version: 5.3.8
    Roadmap Versions:
    New Comment:

    What variable must I var_dump?


    Previous Comments:
    ------------------------------------------------------------------------

    [2012-07-12 10:23:21] alan_k

    I've tested it here with tests/bug6953.php

    Seems to work fine - it looks like it's not picking up your proxy
    setting

    try var_Dump'ing the value near line 1981 to check that it's trying to
    use the
    generator.

    ------------------------------------------------------------------------

    [2012-07-12 09:31:15] noeldc

    Just tried the version on your (with proxy = full and then with proxy =
    1). No
    change. Same error:

    Menu: CONNECT: Checking for database specific ini ('') : database_ in
    options
    Menu: CONNECT: NEW CONNECTION TP DATABASE :
    Menu: CONNECT: mysql://root:root@localhost/headspace_local
    fdc0344bd4c91aff97a75e2d0628c197
    Menu: CONNECT: a:1:
    {s:32:"fdc0344bd4c91aff97a75e2d0628c197";O:8:"DB_mysql":8:
    {s:10:"autocommit";b:1;s:8:"dbsyntax";s:5:"mysql";s:3:"dsn";a:9:
    {s:7:"phptype";s:5:"mysql";s:8:"dbsyntax";s:5:"mysql";s:8:"username";s:4:"root"
    ;s:8:"password";s:4:"root";s:8:"protocol";s:3:"tcp";s:8:"hostspec";s:9:"localhost";s
    :4:"port";b:0;s:6:"socket";b:0;s:8:"database";s:15:"headspace_local";}s:8:"featur
    es";a:7:
    {s:5:"limit";s:5:"alter";s:8:"new_link";s:5:"4.2.0";s:7:"numrows";b:1;s:8:"pconnec
    t";b:1;s:7:"prepare";b:0;s:3:"ssl";b:0;s:12:"transactions";b:1;}s:9:"fetchmode";i:1
    ;s:22:"fetchmode_object_class";s:8:"stdClass";s:7:"options";a:8:
    {s:16:"result_buffering";i:500;s:10:"persistent";b:0;s:3:"ssl";b:0;s:5:"debug";i:0;s
    :14:"seqname_format";s:6:"%s_seq";s:8:"autofree";b:0;s:11:"portability";i:0;s:8:"
    optimize";s:11:"performance";}s:13:"was_connected";b:1;}}
    Menu: databaseStructure: Cant find database schema: headspace_local/menu

    in links file data: Array
    (
    [headspace_local] => Array
    (
    )

    )

    Menu: ERROR: Unable to load schema for database and table (turn
    debugging up to
    5 for full error message)
    DB_DataObject Error: Unable to load schema for database and table (turn

    debugging up to 5 for full error message)

    ------------------------------------------------------------------------

    [2012-07-12 04:51:04] alan_k

    Can you test this - the decision code for using the proxy generator
    should be simpler.

    Note you need to have the ini setting 'proxy' => 1 set somewhere for it
    to work.

    http://svn.php.net/viewvc/pear/packages/DB_DataObject/trunk/DB/DataObject.php?
    revision=326601&view=co

    ------------------------------------------------------------------------

    [2012-07-11 22:49:01] noeldc

    Description:
    ------------
    I'm using DB_DataObjects without any links file because I find it
    non RAD to use the links.ini file.

    Until v1.7.15, this worked fine. It hasn't worked since then.

    Test script:
    ---------------
    $test = DB_DataObject::factory('menu');
    DB_DataObject::debugLevel(5);
    $result = $test->get(1);
    var_dump($result);
    die('end');

    Expected result:
    ----------------

    Menu: CONNECT: NEW CONNECTION
    Menu: CONNECT:
    mysql://root:root@localhost/headspace_local
    fdc0344bd4c91aff97a75e2d0628c197
    Menu: CONNECT: a:1:
    {s:32:"fdc0344bd4c91aff97a75e2d0628c197";O:8:"DB_mysql"
    :8:
    {s:10:"autocommit";b:1;s:8:"dbsyntax";s:5:"mysql";s:3:"dsn"
    ;a:9:
    {s:7:"phptype";s:5:"mysql";s:8:"dbsyntax";s:5:"mysql";s:8:"u
    sername";s:4:"root";s:8:"password";s:4:"root";s:8:"protocol";
    s:3:"tcp";s:8:"hostspec";s:9:"localhost";s:4:"port";b:0;s:6:"so
    cket";b:0;s:8:"database";s:15:"headspace_local";}s:8:"featur
    es";a:7:
    {s:5:"limit";s:5:"alter";s:8:"new_link";s:5:"4.2.0";s:7:"numro
    ws";b:1;s:8:"pconnect";b:1;s:7:"prepare";b:0;s:3:"ssl";b:0;s:
    12:"transactions";b:1;}s:9:"fetchmode";i:1;s:22:"fetchmode_
    object_class";s:8:"stdClass";s:7:"options";a:8:
    {s:16:"result_buffering";i:500;s:10:"persistent";b:0;s:3:"ssl";
    b:0;s:5:"debug";i:0;s:14:"seqname_format";s:6:"%s_seq";s:8
    :"autofree";b:0;s:11:"portability";i:0;s:8:"optimize";s:11:"perf
    ormance";}s:13:"was_connected";b:1;}}
    DB_DataObject_Generator: CONNECT: USING CACHED
    CONNECTION
    DB_DataObject_Generator: fillTable: getting def for
    headspace_local/menu
    DB_DataObject_Generator: defs: Array ( [0] => Array (
    [table] => menu [name] => menu_id [type] => int [len] =>
    10 [flags] => not_null primary_key unsigned auto_increment )
    [1] => Array ( [table] => menu [name] => name [type] =>
    string [len] => 25 [flags] => ) [2] => Array ( [table] =>
    menu [name] => editable [type] => int [len] => 1 [flags] =>
    ) [3] => Array ( [table] => menu [name] => viewable [type]
    => string [len] => 255 [flags] => ) [4] => Array ( [table] =>
    menu [name] => description [type] => blob [len] => 65535
    [flags] => blob ) )
    TABLE STRUCTURE FOR menu Array ( [0] => stdClass Object
    ( [table] => menu [name] => menu_id [type] => int [len] =>
    10 [flags] => not_null primary_key unsigned auto_increment )
    [1] => stdClass Object ( [table] => menu [name] => name
    [type] => string [len] => 25 [flags] => ) [2] => stdClass
    Object ( [table] => menu [name] => editable [type] => int
    [len] => 1 [flags] => ) [3] => stdClass Object ( [table] =>
    menu [name] => viewable [type] => string [len] => 255
    [flags] => ) [4] => stdClass Object ( [table] => menu [name]
    => description [type] => blob [len] => 65535 [flags] => blob
    ) ) Array ( [0] => dump for menu [1] => Array ( [table] =>
    Array ( [menu_id] => 129 [name] => 2 [editable] => 17
    [viewable] => 2 [description] => 66 ) [keys] => Array (
    [menu_id] => N ) ) ) Menu: GET: menu_id 1 Array ( [0] =>
    menu_id )
    Menu: __find: 1
    Menu: QUERY: SELECT * FROM menu WHERE menu.menu_id =
    1
    Menu: query: QUERY DONE IN 0.000351905822754 seconds
    Menu: RESULT: O:9:"DB_result":11:
    {s:8:"autofree";b:0;s:3:"dbh";O:8:"DB_mysql":8:
    {s:10:"autocommit";b:1;s:8:"dbsyntax";s:5:"mysql";s:3:"dsn"
    ;a:9:
    {s:7:"phptype";s:5:"mysql";s:8:"dbsyntax";s:5:"mysql";s:8:"u
    sername";s:4:"root";s:8:"password";s:4:"root";s:8:"protocol";
    s:3:"tcp";s:8:"hostspec";s:9:"localhost";s:4:"port";b:0;s:6:"so
    cket";b:0;s:8:"database";s:15:"headspace_local";}s:8:"featur
    es";a:7:
    {s:5:"limit";s:5:"alter";s:8:"new_link";s:5:"4.2.0";s:7:"numro
    ws";b:1;s:8:"pconnect";b:1;s:7:"prepare";b:0;s:3:"ssl";b:0;s:
    12:"transactions";b:1;}s:9:"fetchmode";i:1;s:22:"fetchmode_
    object_class";s:8:"stdClass";s:7:"options";a:8:
    {s:16:"result_buffering";i:500;s:10:"persistent";b:0;s:3:"ssl";
    b:0;s:5:"debug";i:0;s:14:"seqname_format";s:6:"%s_seq";s:8
    :"autofree";b:0;s:11:"portability";i:0;s:8:"optimize";s:11:"perf
    ormance";}s:13:"was_connected";b:1;}s:9:"fetchmode";i:1;s:
    22:"fetchmode_object_class";s:8:"stdClass";s:11:"limit_count"
    ;N;s:10:"limit_from";N;s:10:"parameters";a:0:
    {}s:5:"query";s:47:"SELECT * FROM menu WHERE
    menu.menu_id = 1
    ";s:6:"result";i:0;s:11:"row_counter";N;s:9:"statement";N;}
    Menu: __find: CHECK autofetchd 1
    Menu: __find: ABOUT TO AUTOFETCH
    Menu: FETCH: a:5:
    {s:7:"menu_id";s:1:"1";s:4:"name";s:8:"TopMenu2";s:8:"edit
    able";N;s:8:"viewable";s:1:"1";s:11:"description";s:30:"Main
    headspace navigation menu";}
    Menu: fetchrow LINE: menu_id = 1
    Menu: fetchrow LINE: name = TopMenu2
    Menu: fetchrow LINE: editable =
    Menu: fetchrow LINE: viewable = 1
    Menu: fetchrow LINE: description = Main headspace navigation
    menu
    Menu: fetchrow: menu DONE
    Menu: __find: DONE
    int(1) end


    Actual result:
    --------------

    Menu: CONNECT: Checking for database specific ini ('') :
    database_ in options
    Menu: CONNECT: NEW CONNECTION TP DATABASE :
    Menu: CONNECT:
    mysql://root:root@localhost/headspace_local
    fdc0344bd4c91aff97a75e2d0628c197
    Menu: CONNECT: a:1:
    {s:32:"fdc0344bd4c91aff97a75e2d0628c197";O:8:"DB_mysql"
    :8:
    {s:10:"autocommit";b:1;s:8:"dbsyntax";s:5:"mysql";s:3:"dsn"
    ;a:9:
    {s:7:"phptype";s:5:"mysql";s:8:"dbsyntax";s:5:"mysql";s:8:"u
    sername";s:4:"root";s:8:"password";s:4:"root";s:8:"protocol";
    s:3:"tcp";s:8:"hostspec";s:9:"localhost";s:4:"port";b:0;s:6:"so
    cket";b:0;s:8:"database";s:15:"headspace_local";}s:8:"featur
    es";a:7:
    {s:5:"limit";s:5:"alter";s:8:"new_link";s:5:"4.2.0";s:7:"numro
    ws";b:1;s:8:"pconnect";b:1;s:7:"prepare";b:0;s:3:"ssl";b:0;s:
    12:"transactions";b:1;}s:9:"fetchmode";i:1;s:22:"fetchmode_
    object_class";s:8:"stdClass";s:7:"options";a:8:
    {s:16:"result_buffering";i:500;s:10:"persistent";b:0;s:3:"ssl";
    b:0;s:5:"debug";i:0;s:14:"seqname_format";s:6:"%s_seq";s:8
    :"autofree";b:0;s:11:"portability";i:0;s:8:"optimize";s:11:"perf
    ormance";}s:13:"was_connected";b:1;}}
    Menu: databaseStructure: Cant find database schema:
    headspace_local/menu
    in links file data: Array
    (
    [headspace_local] => Array
    (
    )

    )

    Menu: ERROR: Unable to load schema for database and table
    (turn debugging up to 5 for full error message)
    DB_DataObject Error: Unable to load schema for database and
    table (turn debugging up to 5 for full error message)

    ------------------------------------------------------------------------
  • Noel at Jul 12, 2012 at 8:26 am
    Edit report at https://pear.php.net/bugs/bug.php?id=19505&edit=1

    ID: 19505
    Comment by: noel@arc2.co.uk
    Reported By: noel at arc2 dot co dot uk
    Summary: Upgrading from 1.7.15 to 1.10.0 causes error due to
    no links file
    Status: Open
    Type: Bug
    Package: DB_DataObject
    Operating System: OSX 10.6.8
    Package Version: 1.10.0
    PHP Version: 5.3.8
    Roadmap Versions:
    New Comment:

    OK never mind. Was getting confused between two code-bases. Setting
    proxy = 1 does work.

    Tx!


    Previous Comments:
    ------------------------------------------------------------------------

    [2012-07-12 10:26:39] noeldc

    What variable must I var_dump?

    ------------------------------------------------------------------------

    [2012-07-12 10:23:21] alan_k

    I've tested it here with tests/bug6953.php

    Seems to work fine - it looks like it's not picking up your proxy
    setting

    try var_Dump'ing the value near line 1981 to check that it's trying to
    use the
    generator.

    ------------------------------------------------------------------------

    [2012-07-12 09:31:15] noeldc

    Just tried the version on your (with proxy = full and then with proxy =
    1). No
    change. Same error:

    Menu: CONNECT: Checking for database specific ini ('') : database_ in
    options
    Menu: CONNECT: NEW CONNECTION TP DATABASE :
    Menu: CONNECT: mysql://root:root@localhost/headspace_local
    fdc0344bd4c91aff97a75e2d0628c197
    Menu: CONNECT: a:1:
    {s:32:"fdc0344bd4c91aff97a75e2d0628c197";O:8:"DB_mysql":8:
    {s:10:"autocommit";b:1;s:8:"dbsyntax";s:5:"mysql";s:3:"dsn";a:9:
    {s:7:"phptype";s:5:"mysql";s:8:"dbsyntax";s:5:"mysql";s:8:"username";s:4:"root"
    ;s:8:"password";s:4:"root";s:8:"protocol";s:3:"tcp";s:8:"hostspec";s:9:"localhost";s
    :4:"port";b:0;s:6:"socket";b:0;s:8:"database";s:15:"headspace_local";}s:8:"featur
    es";a:7:
    {s:5:"limit";s:5:"alter";s:8:"new_link";s:5:"4.2.0";s:7:"numrows";b:1;s:8:"pconnec
    t";b:1;s:7:"prepare";b:0;s:3:"ssl";b:0;s:12:"transactions";b:1;}s:9:"fetchmode";i:1
    ;s:22:"fetchmode_object_class";s:8:"stdClass";s:7:"options";a:8:
    {s:16:"result_buffering";i:500;s:10:"persistent";b:0;s:3:"ssl";b:0;s:5:"debug";i:0;s
    :14:"seqname_format";s:6:"%s_seq";s:8:"autofree";b:0;s:11:"portability";i:0;s:8:"
    optimize";s:11:"performance";}s:13:"was_connected";b:1;}}
    Menu: databaseStructure: Cant find database schema: headspace_local/menu

    in links file data: Array
    (
    [headspace_local] => Array
    (
    )

    )

    Menu: ERROR: Unable to load schema for database and table (turn
    debugging up to
    5 for full error message)
    DB_DataObject Error: Unable to load schema for database and table (turn

    debugging up to 5 for full error message)

    ------------------------------------------------------------------------

    [2012-07-12 04:51:04] alan_k

    Can you test this - the decision code for using the proxy generator
    should be simpler.

    Note you need to have the ini setting 'proxy' => 1 set somewhere for it
    to work.

    http://svn.php.net/viewvc/pear/packages/DB_DataObject/trunk/DB/DataObject.php?
    revision=326601&view=co

    ------------------------------------------------------------------------

    [2012-07-11 22:49:01] noeldc

    Description:
    ------------
    I'm using DB_DataObjects without any links file because I find it
    non RAD to use the links.ini file.

    Until v1.7.15, this worked fine. It hasn't worked since then.

    Test script:
    ---------------
    $test = DB_DataObject::factory('menu');
    DB_DataObject::debugLevel(5);
    $result = $test->get(1);
    var_dump($result);
    die('end');

    Expected result:
    ----------------

    Menu: CONNECT: NEW CONNECTION
    Menu: CONNECT:
    mysql://root:root@localhost/headspace_local
    fdc0344bd4c91aff97a75e2d0628c197
    Menu: CONNECT: a:1:
    {s:32:"fdc0344bd4c91aff97a75e2d0628c197";O:8:"DB_mysql"
    :8:
    {s:10:"autocommit";b:1;s:8:"dbsyntax";s:5:"mysql";s:3:"dsn"
    ;a:9:
    {s:7:"phptype";s:5:"mysql";s:8:"dbsyntax";s:5:"mysql";s:8:"u
    sername";s:4:"root";s:8:"password";s:4:"root";s:8:"protocol";
    s:3:"tcp";s:8:"hostspec";s:9:"localhost";s:4:"port";b:0;s:6:"so
    cket";b:0;s:8:"database";s:15:"headspace_local";}s:8:"featur
    es";a:7:
    {s:5:"limit";s:5:"alter";s:8:"new_link";s:5:"4.2.0";s:7:"numro
    ws";b:1;s:8:"pconnect";b:1;s:7:"prepare";b:0;s:3:"ssl";b:0;s:
    12:"transactions";b:1;}s:9:"fetchmode";i:1;s:22:"fetchmode_
    object_class";s:8:"stdClass";s:7:"options";a:8:
    {s:16:"result_buffering";i:500;s:10:"persistent";b:0;s:3:"ssl";
    b:0;s:5:"debug";i:0;s:14:"seqname_format";s:6:"%s_seq";s:8
    :"autofree";b:0;s:11:"portability";i:0;s:8:"optimize";s:11:"perf
    ormance";}s:13:"was_connected";b:1;}}
    DB_DataObject_Generator: CONNECT: USING CACHED
    CONNECTION
    DB_DataObject_Generator: fillTable: getting def for
    headspace_local/menu
    DB_DataObject_Generator: defs: Array ( [0] => Array (
    [table] => menu [name] => menu_id [type] => int [len] =>
    10 [flags] => not_null primary_key unsigned auto_increment )
    [1] => Array ( [table] => menu [name] => name [type] =>
    string [len] => 25 [flags] => ) [2] => Array ( [table] =>
    menu [name] => editable [type] => int [len] => 1 [flags] =>
    ) [3] => Array ( [table] => menu [name] => viewable [type]
    => string [len] => 255 [flags] => ) [4] => Array ( [table] =>
    menu [name] => description [type] => blob [len] => 65535
    [flags] => blob ) )
    TABLE STRUCTURE FOR menu Array ( [0] => stdClass Object
    ( [table] => menu [name] => menu_id [type] => int [len] =>
    10 [flags] => not_null primary_key unsigned auto_increment )
    [1] => stdClass Object ( [table] => menu [name] => name
    [type] => string [len] => 25 [flags] => ) [2] => stdClass
    Object ( [table] => menu [name] => editable [type] => int
    [len] => 1 [flags] => ) [3] => stdClass Object ( [table] =>
    menu [name] => viewable [type] => string [len] => 255
    [flags] => ) [4] => stdClass Object ( [table] => menu [name]
    => description [type] => blob [len] => 65535 [flags] => blob
    ) ) Array ( [0] => dump for menu [1] => Array ( [table] =>
    Array ( [menu_id] => 129 [name] => 2 [editable] => 17
    [viewable] => 2 [description] => 66 ) [keys] => Array (
    [menu_id] => N ) ) ) Menu: GET: menu_id 1 Array ( [0] =>
    menu_id )
    Menu: __find: 1
    Menu: QUERY: SELECT * FROM menu WHERE menu.menu_id =
    1
    Menu: query: QUERY DONE IN 0.000351905822754 seconds
    Menu: RESULT: O:9:"DB_result":11:
    {s:8:"autofree";b:0;s:3:"dbh";O:8:"DB_mysql":8:
    {s:10:"autocommit";b:1;s:8:"dbsyntax";s:5:"mysql";s:3:"dsn"
    ;a:9:
    {s:7:"phptype";s:5:"mysql";s:8:"dbsyntax";s:5:"mysql";s:8:"u
    sername";s:4:"root";s:8:"password";s:4:"root";s:8:"protocol";
    s:3:"tcp";s:8:"hostspec";s:9:"localhost";s:4:"port";b:0;s:6:"so
    cket";b:0;s:8:"database";s:15:"headspace_local";}s:8:"featur
    es";a:7:
    {s:5:"limit";s:5:"alter";s:8:"new_link";s:5:"4.2.0";s:7:"numro
    ws";b:1;s:8:"pconnect";b:1;s:7:"prepare";b:0;s:3:"ssl";b:0;s:
    12:"transactions";b:1;}s:9:"fetchmode";i:1;s:22:"fetchmode_
    object_class";s:8:"stdClass";s:7:"options";a:8:
    {s:16:"result_buffering";i:500;s:10:"persistent";b:0;s:3:"ssl";
    b:0;s:5:"debug";i:0;s:14:"seqname_format";s:6:"%s_seq";s:8
    :"autofree";b:0;s:11:"portability";i:0;s:8:"optimize";s:11:"perf
    ormance";}s:13:"was_connected";b:1;}s:9:"fetchmode";i:1;s:
    22:"fetchmode_object_class";s:8:"stdClass";s:11:"limit_count"
    ;N;s:10:"limit_from";N;s:10:"parameters";a:0:
    {}s:5:"query";s:47:"SELECT * FROM menu WHERE
    menu.menu_id = 1
    ";s:6:"result";i:0;s:11:"row_counter";N;s:9:"statement";N;}
    Menu: __find: CHECK autofetchd 1
    Menu: __find: ABOUT TO AUTOFETCH
    Menu: FETCH: a:5:
    {s:7:"menu_id";s:1:"1";s:4:"name";s:8:"TopMenu2";s:8:"edit
    able";N;s:8:"viewable";s:1:"1";s:11:"description";s:30:"Main
    headspace navigation menu";}
    Menu: fetchrow LINE: menu_id = 1
    Menu: fetchrow LINE: name = TopMenu2
    Menu: fetchrow LINE: editable =
    Menu: fetchrow LINE: viewable = 1
    Menu: fetchrow LINE: description = Main headspace navigation
    menu
    Menu: fetchrow: menu DONE
    Menu: __find: DONE
    int(1) end


    Actual result:
    --------------

    Menu: CONNECT: Checking for database specific ini ('') :
    database_ in options
    Menu: CONNECT: NEW CONNECTION TP DATABASE :
    Menu: CONNECT:
    mysql://root:root@localhost/headspace_local
    fdc0344bd4c91aff97a75e2d0628c197
    Menu: CONNECT: a:1:
    {s:32:"fdc0344bd4c91aff97a75e2d0628c197";O:8:"DB_mysql"
    :8:
    {s:10:"autocommit";b:1;s:8:"dbsyntax";s:5:"mysql";s:3:"dsn"
    ;a:9:
    {s:7:"phptype";s:5:"mysql";s:8:"dbsyntax";s:5:"mysql";s:8:"u
    sername";s:4:"root";s:8:"password";s:4:"root";s:8:"protocol";
    s:3:"tcp";s:8:"hostspec";s:9:"localhost";s:4:"port";b:0;s:6:"so
    cket";b:0;s:8:"database";s:15:"headspace_local";}s:8:"featur
    es";a:7:
    {s:5:"limit";s:5:"alter";s:8:"new_link";s:5:"4.2.0";s:7:"numro
    ws";b:1;s:8:"pconnect";b:1;s:7:"prepare";b:0;s:3:"ssl";b:0;s:
    12:"transactions";b:1;}s:9:"fetchmode";i:1;s:22:"fetchmode_
    object_class";s:8:"stdClass";s:7:"options";a:8:
    {s:16:"result_buffering";i:500;s:10:"persistent";b:0;s:3:"ssl";
    b:0;s:5:"debug";i:0;s:14:"seqname_format";s:6:"%s_seq";s:8
    :"autofree";b:0;s:11:"portability";i:0;s:8:"optimize";s:11:"perf
    ormance";}s:13:"was_connected";b:1;}}
    Menu: databaseStructure: Cant find database schema:
    headspace_local/menu
    in links file data: Array
    (
    [headspace_local] => Array
    (
    )

    )

    Menu: ERROR: Unable to load schema for database and table
    (turn debugging up to 5 for full error message)
    DB_DataObject Error: Unable to load schema for database and
    table (turn debugging up to 5 for full error message)

    ------------------------------------------------------------------------

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedJul 12, '12 at 2:45a
activeJul 12, '12 at 8:26a
posts5
users3
websitepear.php.net

3 users in discussion

Noel: 2 posts Alan: 2 posts Noel: 1 post

People

Translate

site design / logo © 2022 Grokbase