| View previous topic :: View next topic |
| Author |
Message |
mrsocks
Joined: 03 Feb 2007 Posts: 14
|
Posted: Sat Feb 03, 2007 7:43 am Post subject: Unable to find package 'MDB2_Datatype' file 'MDB2/Datatype.p |
|
|
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 |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1053
|
Posted: Sat Feb 03, 2007 11:23 am Post subject: |
|
|
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 |
|
 |
mrsocks
Joined: 03 Feb 2007 Posts: 14
|
Posted: Sun Feb 04, 2007 5:24 am Post subject: |
|
|
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 |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1053
|
Posted: Sun Feb 04, 2007 1:20 pm Post subject: |
|
|
| 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 |
|
 |
mrsocks
Joined: 03 Feb 2007 Posts: 14
|
Posted: Sun Feb 04, 2007 7:55 pm Post subject: |
|
|
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 |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1053
|
Posted: Sun Feb 04, 2007 8:57 pm Post subject: |
|
|
| 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 |
|
 |
ready2rumble
Joined: 05 Feb 2007 Posts: 7
|
Posted: Mon Feb 05, 2007 2:52 pm Post subject: |
|
|
| 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 |
|
 |
hradtke
Joined: 11 Feb 2007 Posts: 2
|
Posted: Sun Feb 11, 2007 7:20 am Post subject: |
|
|
I respect what you are trying to do mark, but sometimes people just need a nudge in the right direction
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 |
|
 |
|