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

ID: 19504
Updated by: alan@roojs.com
Reported By: noeldacosta@googlemail.com
Summary: Upgrading from 1.7.15 to 1.10.0 causes error due to
no links file
-Status: Open
+Status: Bogus
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:

-Status: Open
+Status: Bogus
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PEAR.

dupe


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

[2012-07-11 22:43:18] #6f5d36320baa8a8455e

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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedJul 12, '12 at 8:17a
activeJul 12, '12 at 8:17a
posts1
users1
websitepear.php.net

1 user in discussion

Alan: 1 post

People

Translate

site design / logo © 2022 Grokbase