PEAR Packages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPEAR Packages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old August 15th, 2008, 11:55 AM
sapling sapling is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Aug 2008
Posts: 4 sapling User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 14 m 31 sec
Reputation Power: 0
Question MDB2 error with createTables

I am attempting to use createTables.php but I can't resolve the error "unable to find package 'MDB2_Driver_mysqli". I am using php 5, mysqli, MDB2 (btw: I don't have problems with this same combination on other php pages.) I turned up debug levels to 5 and here is what I get:

DB_DataObject_Generator : 0 : CREATING FOR 0

DB_DataObject_Generator : CONNECT : NEW CONNECTION
DB_DataObject_Generator : CONNECT : mysqli:/root:mypwd@localhost/practice_stat 831cf97cd08f9b7f72544ea6833803ce
DB_DataObject_Generator : CONNECT : a:1:{s:32:"831cf97cd08f9b7f72544ea6833803ce";O:10:"MDB2_Error":8:{s:20:"error_message_prefix";s:0:"";s:4:"mode";i:1;s:5:"level";i:1024;s:4:"code";i:-4;s:7:"message";s:21:"MDB2 Error: not found";s:8:"userinfo";s:153:"unable to find package 'MDB2_Driver_mysqli:/root:mypwd@localhost/practice_stat' file 'MDB2\Driver\mysqli:/root:mypwd@localhost/practice\stat.php'";s:9:"backtrace";a:10:{i:0;a:6:{s:4:"file";s:20:"C:\PHP\PEAR\MDB2.php";s:4:"line";i:973;s:8:"function";s:10:"PEAR_Error";s:5:"class";s:10:"PEAR_Error";s:4:"type";s:2:"->";s:4:"args";a:5:{i:0;s:21:"MDB2 Error: not found";i:1;i:-4;i:2;i:1;i:3;i:1024;i:4;s:153:"unable to find package 'MDB2_Driver_mysqli:/root:mypwd@localhost/practice_stat' file 'MDB2\Driver\mysqli:/root:mypwd@localhost/practice\stat.php'";}}i:1;a:7:{s:4:"file";s:20:"C:\PHP\PEAR\PEAR.php";s:4:"line";i:574;s:8:"function";s:10:"MDB2_Error";s:5:"class";s:10:"MDB2_Error";s:6:"object";r:2;s:4:"type";s:2:"->";s:4:"args";a:4:{i:0;i:-4;i:1;i:1;i:2;i:1024;i:3;s:153:"unable to find package 'MDB2_Driver_mysqli:/root:mypwd@localhost/practice_stat' file 'MDB2\Driver\mysqli:/root:mypwd@localhost/practice\stat.php'";}}i:2;a:7:{s:4:"file";s:20:"C:\PHP\PEAR\MDB2.php";s:4:"line";i:574;s:8:"function";s:10:"raiseError";s:5:"class";s:4:"PEAR";s:6:"object";O:23:"DB_DataObject_Generator":19:{s:6:"tables";N;s:12:"_definitions";N;s:5:"table";N;s:10:"_newConfig";N;s:8:"_extends";s:13:"DB_DataObject";s:12:"_extendsFile";s:17:"DB/DataObject.php";s:10:"_className";N;s:22:"_DB_DataObject_version";s:5:"1.8.8";s:7:"__table";s:0:"";s:1:"N";i:0;s:13:"_database_dsn";s:46:"mysqli:/root:mypwd@localhost/practice_stat";s:17:"_database_dsn_md5";s:32:"831cf97cd08f9b7f72544ea6833803ce";s:9:"_database";i:0;s:6:"_query";a:7:{s:9:"condition";s:0:"";s:8:"group_by";s:0:"";s:8:"order_by";s:0:"";s:6:"having";s:0:"";s:11:"limit_start";s:0:"";s:11:"limit_count";s:0:"";s:11:"data_select";s:1:"*";}s:12:"_DB_resultid";N;s:13:"_resultFields";b:0;s:12:"_link_loaded";b:0;s:5:"_join";s:0:"";s:10:"_lastError";b:0;}s:4:"type";s:2:"->";s:4:"args";a:7:{i:0;N;i:1;i:-4;i:2;N;i:3;N;i:4;s:153:"unable to find package 'MDB2_Driver_mysqli:/root:mypwd@localhost/practice_stat' file 'MDB2\Driver\mysqli:/root:mypwd@localhost/practice\stat.php'";i:5;s:10:"MDB2_Error";i:6;b:1;}}i:3;a:7:{s:4:"file";s:20:"C:\PHP\PEAR\MDB2.php";s:4:"line";i:340;s:8:"function";s:10:"raiseError";s:5:"class";s:4:"MDB2";s:6:"object";r:39;s:4:"type";s:2:"->";s:4:"args";a:4:{i:0;i:-4;i:1;N;i:2;N;i:3;s:153:"unable to find package 'MDB2_Driver_mysqli:/root:mypwd@localhost/practice_stat' file 'MDB2\Driver\mysqli:/root:mypwd@localhost/practice\stat.php'";}}i:4;a:7:{s:4:"file";s:20:"C:\PHP\PEAR\MDB2.php";s:4:"line";i:385;s:8:"function";s:9:"loadClass";s:5:"class";s:4:"MDB2";s:6:"object";r:39;s:4:"type";s:2:"->";s:4:"args";a:2:{i:0;s:58:"MDB2_Driver_mysqli:/root:mypwd@localhost/practice_stat";i:1;b:0;}}i:5;a:7:{s:4:"file";s:20:"C:\PHP\PEAR\MDB2.php";s:4:"line";i:433;s:8:"function";s:7:"factory";s:5:"class";s:4:"MDB2";s:6:"object";r:39;s:4:"type";s:2:"->";s:4:"args";a:2:{i:0;s:46:"mysqli:/root:mypwd@localhost/practice_stat";i:1;a:1:{s:11:"portability";i:126;}}}i:6;a:7:{s:4:"file";s:29:"C:\PHP\PEAR\DB\DataObject.php";s:4:"line";i:2252;s:8:"function";s:7:"connect";s:5:"class";s:4:"MDB2";s:6:"object";r:39;s:4:"type";s:2:"->";s:4:"args";a:2:{i:0;s:46:"mysqli:/root:mypwd@localhost/practice_stat";i:1;a:1:{s:11:"portability";i:126;}}}i:7;a:7:{s:4:"file";s:39:"C:\PHP\PEAR\DB\DataObject\Generator.php";s:4:"line";i:175;s:8:"function";s:8:"_connect";s:5:"class";s:13:"DB_DataObject";s:6:"object";r:39;s:4:"type";s:2:"->";s:4:"args";a:0:{}}i:8;a:7:{s:4:"file";s:39:"C:\PHP\PEAR\DB\DataObject\Generator.php";s:4:"line";i:144;s:8:"function";s:16:"_createTableList";s:5:"class";s:23:"DB_DataObject_Generator";s:6:"object";r:39;s:4:"type";s:2:"->";s:4:"args";a:0:{}}i:9;a:7:{s:4:"file";s:42:"C:\PHP\PEAR\DB\DataObject\createTables.php";s:4:"line";i:58;s:8:"function";s:5:"start";s:5:"class";s:23:"DB_DataObject_Generator";s:6:"object";O:23:"DB_DataObject_Generator":19:{s:6:"tables";N;s:12:"_definitions";N;s:5:"table";N;s:10:"_newConfig";N;s:8:"_extends";s:13:"DB_DataObject";s:12:"_extendsFile";s:17:"DB/DataObject.php";s:10:"_className";N;s:22:"_DB_DataObject_version";s:5:"1.8.8";s:7:"__table";s:0:"";s:1:"N";i:0;s:13:"_database_dsn";s:0:"";s:17:"_database_dsn_md5";s:0:"";s:9:"_database";s:0:"";s:6:"_query";a:7:{s:9:"condition";s:0:"";s:8:"group_by";s:0:"";s:8:"order_by";s:0:"";s:6:"having";s:0:"";s:11:"limit_start";s:0:"";s:11:"limit_count";s:0:"";s:11:"data_select";s:1:"*";}s:12:"_DB_resultid";N;s:13:"_resultFields";b:0;s:12:"_link_loaded";b:0;s:5:"_join";s:0:"";s:10:"_lastError";b:0;}s:4:"type";s:2:"->";s:4:"args";a:0:{}}}s:8:"callback";N;}}
DB_DataObject_Generator : CONNECT FAILED : [mdb2_error: message="MDB2 Error: not found" code=-4 mode=return level=notice prefix="" info="unable to find package 'MDB2_Driver_mysqli:/root:mypwd@localhost/practice_stat' file 'MDB2\Driver\mysqli:/root:mypwd@localhost/practice\stat.php'"]
DB_DataObject_Generator : ERROR : Connect failed, turn on debugging to 5 see why
DB_DataObject Error: Connect failed, turn on debugging to 5 see why


>pear list shows this:
INSTALLED PACKAGES, CHANNEL PEAR.PHP.NET:
=========================================
PACKAGE VERSION STATE
Archive_Tar 1.3.2 stable
Console_Getopt 1.2.3 stable
Console_Table 1.1.2 stable
DB 1.7.13 stable
DB_DataObject 1.8.8 stable
DB_Table 1.5.5 stable
Date 1.4.7 stable
File 1.3.0 stable
HTML_Common 1.2.4 stable
HTML_QuickForm 3.2.10 stable
HTML_Table 1.8.2 stable
MDB2 2.4.1 stable
MDB2_Driver_mysqli 1.4.1 stable
Net_URL 1.0.15 stable
Net_URL_Mapper 0.9.0 beta
OLE 1.0.0RC1 beta
PEAR 1.7.1 stable
PHPUnit 1.3.2 stable
PHP_Compat 1.5.0 stable
Pager 2.4.7 stable
Spreadsheet_Excel_Writer 0.9.1 beta
Structures_DataGrid 0.9.0 beta
Structures_DataGrid_DataSource_Array 0.1.4 beta
Structures_DataGrid_DataSource_CSV 0.1.6 beta
Structures_DataGrid_DataSource_DB 0.1.1 beta
Structures_DataGrid_DataSource_DBQuery 0.1.11 beta
Structures_DataGrid_DataSource_DBTable 0.1.7 beta
Structures_DataGrid_DataSource_DataObject 0.2.1 beta
Structures_DataGrid_DataSource_MDB2 0.1.11 beta
Structures_DataGrid_DataSource_PDO 0.1.0 beta
Structures_DataGrid_DataSource_RSS 0.1.1 beta
Structures_DataGrid_DataSource_XML 0.2.0 beta
Structures_DataGrid_Renderer_CSV 0.1.4 beta
Structures_DataGrid_Renderer_Console 0.1.1 beta
Structures_DataGrid_Renderer_HTMLSortForm 0.1.3 beta
Structures_DataGrid_Renderer_HTMLTable 0.1.5 beta
Structures_DataGrid_Renderer_Pager 0.1.3 beta
Structures_DataGrid_Renderer_Smarty 0.1.4 beta
Structures_DataGrid_Renderer_XLS 0.1.3 beta
Structures_DataGrid_Renderer_XML 0.1.3 beta
Structures_DataGrid_Renderer_XUL 0.1.3 beta
Structures_Graph 1.0.2 stable
XML_Parser 1.2.8 stable
XML_RSS 0.9.10 beta
XML_Serializer 0.18.0 beta
XML_Util 1.2.0 stable


I have a feeling I'm missing a pear package, but I don't know which one.
Can anyone help?

Also, if anyone can point me to some instructions for deciphering the debug output I would really appreciate it.

Thanks, Roxanne

Reply With Quote
  #2  
Old August 15th, 2008, 02:50 PM
wiesemann wiesemann is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 175 wiesemann User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 h 10 m 36 sec
Reputation Power: 3
The missing package that the error message indicates seems to be installed. Maybe an include_path issue? Did you install the mentioned packages via the PEAR installier, without modifying the directory structure after the installation?

Reply With Quote
  #3  
Old August 15th, 2008, 04:07 PM
sapling sapling is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Aug 2008
Posts: 4 sapling User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 14 m 31 sec
Reputation Power: 0
Yes, I did install the pear packages with the installer. No, I didn't make any directory changes. You may be right about the include path issue.

from c:\WINDOWS\php.ini:
;***** Added by go-pear
include_path="C:\php\PEAR\pear;c:\php\pear"
;****

from the directory c:\PHP\PEAR\DB\DataObject
I type the command:
>php createTables.php c:\dataobjects\practice_stat.ini


contents of practice_stat.ini:
[DB_DataObject]
database = mysqli:/root:****@localhost/practice_stat
schema_location = /dataobjects/schema/
class_location = /dataobjects/
require_prefix = /dataobjects/
class_prefix = DataObjects_
extends_location = DB/DataObject.php
extends = DB_DataObject
db_driver = MDB2
debug = 5

WINDOWS Environment Variable "Path" contains:
C:\php\;c:\php\PEAR\;


Did I cover all the bases for include paths?

Reply With Quote
  #4  
Old August 15th, 2008, 04:50 PM
wiesemann wiesemann is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 175 wiesemann User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 h 10 m 36 sec
Reputation Power: 3
The include_path is usually configured in php.ini. It is likely that you have two files of this name on your system, one for the webserver's PHP, and one for the CLI version of PHP. The latter one is used if you run "php ..." on the command line. Both of these files need to have the right include_path. I guess that the PEAR installer has modified only of these files.

Reply With Quote
  #5  
Old September 5th, 2008, 03:03 PM
sapling sapling is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Aug 2008
Posts: 4 sapling User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 14 m 31 sec
Reputation Power: 0
Red face Problem Solved

I did have more than one php.ini and messed around with my system's configuration so that I only need one. That didn't fix the problem though. What did solve the problem was fixing a typo in my [DB_DataObject] options. The connect string, mysqli:/root:****@localhost/practice_stat, was missing a "/". It should be - mysqli://root:****@localhost/practice_stat . It is one of those dumb errors that you kick yourself for, but I thought I would post it in case it could trigger the lightbulb for someone else. Thanks for your help, wiesemann.

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPEAR Packages > MDB2 error with createTables


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

Request Your Free Technology Downloads!
 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

Request Your Free Technology Downloads!
 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

Request Your Free Technology Downloads!
 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

Request Your Free Technology Downloads!
 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek