PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Unable to find package 'MDB2_Datatype' file 'MDB2/Datatype.p

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> Database
View previous topic :: View next topic  
Author Message
mrsocks



Joined: 03 Feb 2007
Posts: 14

PostPosted: Sat Feb 03, 2007 7:43 am    Post subject: Unable to find package 'MDB2_Datatype' file 'MDB2/Datatype.p Reply with quote

Hello,

I am trying to run an insert statement and I keep getting this error:

unable to find package 'MDB2_Datatype' file 'MDB2/Datatype.php'

I cannot seem to find any info about this.
Any advice would be great.

Thanks.
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1053

PostPosted: Sat Feb 03, 2007 11:23 am    Post subject: Reply with quote

A very similar question was asked yesterday on codewalkers.com. My answer was:

<<<
The error message is misleading, as there is really no Manager.php in MDB2. But there is a Manager/ directory.

It's always the best solution to install PEAR packages via the PEAR installer. This ensures that your directory structure is right, because the .tgz files can have another structure than you will get after installing (controlled via the package.xml file).
>>>

If you replace "Manager" by "Datatype", this answer is also true for your problem.
Back to top
View user's profile Send private message
mrsocks



Joined: 03 Feb 2007
Posts: 14

PostPosted: Sun Feb 04, 2007 5:24 am    Post subject: Reply with quote

i installed all pear modules via 'pear install MDB2' etc...

I see a MDB2/Driver/Datatype/ dir, but no files named datatype.php there are two files in the Datatype dir: Common.php and mysql.php

Any suggestions?
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1053

PostPosted: Sun Feb 04, 2007 1:20 pm    Post subject: Reply with quote

mrsocks wrote:
i installed all pear modules via 'pear install MDB2' etc...

I see a MDB2/Driver/Datatype/ dir, but no files named datatype.php there are two files in the Datatype dir: Common.php and mysql.php

Any suggestions?


As I already wrote, there is no such file, regardless whether you unpack the .tgz file yourself or whether you use the PEAR installer.

It's likely that either your include_path setting is wrong or that you don't use require_once 'MDB2.php', but something like require_once 'bla/bla/MDB2.php'.
Back to top
View user's profile Send private message
mrsocks



Joined: 03 Feb 2007
Posts: 14

PostPosted: Sun Feb 04, 2007 7:55 pm    Post subject: Reply with quote

i understand that there is no 'file' but instead a dir, but I cannot get that dir to load.

I dont understand how I can get the 'extended' file/module to load but then not the datatype dir if my path is not correct?
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1053

PostPosted: Sun Feb 04, 2007 8:57 pm    Post subject: Reply with quote

mrsocks wrote:
i understand that there is no 'file' but instead a dir, but I cannot get that dir to load.

I dont understand how I can get the 'extended' file/module to load but then not the datatype dir if my path is not correct?


If you want more help, then please provide more details:
- how does your include_path look like?
- how does your code look like? (try to keep it as short as possible please)
Back to top
View user's profile Send private message
ready2rumble



Joined: 05 Feb 2007
Posts: 7

PostPosted: Mon Feb 05, 2007 2:52 pm    Post subject: Reply with quote

i think this is a bug in code somewhere for datatypes you shouldnt have to use pear installer to make it work, obviously it must be some pathing thing but i cant find it.
Back to top
View user's profile Send private message
hradtke



Joined: 11 Feb 2007
Posts: 2

PostPosted: Sun Feb 11, 2007 7:20 am    Post subject: Reply with quote

I respect what you are trying to do mark, but sometimes people just need a nudge in the right direction Wink

I encounted the same error. Here is what I did for a web server that would not let me "install" pear packages.

Code:
ini_set("include_path", realpath(dirname(__FILE__).'/pear').'/');


where "pear" is the folder that contains the MDB2 code.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> Database All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement

'Actiemonitor' online projectmanagement software