db_functions.php MDB2 Error: not found

1,765 views
Skip to first unread message

Emily Fountain

unread,
Oct 2, 2013, 12:05:31 PM10/2/13
to stacks...@googlegroups.com
Hi,
I know web interface problems have been discussed multiple times, but I could not find a previous discussion topic to address my particular issue. So I greatly apologize if I missed something previously posted and I am repeating a question already answered.

My I see my database in the stacks web interface but when I click on it I get the following error: 
File: /usr/local/share/stacks/php/db_functions.php (line 40) MDB2 Error: not found

I am running stacks 1.08 on Ubuntu

db_functions.php is located in the directory where the error is saying it is not found. 

I am learning to use Linux as I am learning to use this software, so this may be I did something stupid or did not do something obvious, but I really have no idea why it will not find a file that is there.

Thank you,
Em 

chris blair

unread,
Oct 2, 2013, 1:43:55 PM10/2/13
to stacks...@googlegroups.com
Hi Em, 

I am stuck on the same step. I will be interested to hear if anyone has suggestions.

Chris

Ryan McCormick

unread,
Oct 2, 2013, 2:35:18 PM10/2/13
to stacks...@googlegroups.com
If you are both running Ubuntu, and you've installed everything else from the package manager, running this from the command line may solve your issue:

sudo apt-get install php-mdb2-driver-mysql

Ryan McCormick

http://codextechnicanum.blogspot.com/

Christopher Blair

unread,
Oct 2, 2013, 2:42:01 PM10/2/13
to stacks...@googlegroups.com
Hi Ryan, 

Thanks for the email. I am running OSX Mountain Lion. To my knowledge, I have installed the mdb2 driver for mysql, but perhaps it is not in the right place?

Chris


--
Stacks website: http://creskolab.uoregon.edu/stacks/
---
You received this message because you are subscribed to a topic in the Google Groups "Stacks" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stacks-users/P_Yku5zhKuk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stacks-users...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Christopher Blair, Ph.D.
Postdoctoral Associate
Department of Biology
Duke University, Box 90338
BioSci 130 Science Drive
Durham, NC 27708
ph: 919-613-8727
Christopher.Blair@duke.edu

Emily Fountain

unread,
Oct 2, 2013, 2:47:42 PM10/2/13
to stacks...@googlegroups.com
Thanks Ryan, but that is how I originally installed mdb2 and the mdb2-driver-mysql so I am not sure the issue. I checked my log files and the apache2 only has the error logged:

file does ntot exist: /var/www/favicon.ico which should not be causing the issue since that has to do with creating a favorites bookmark as far as I am aware.




--
Stacks website: http://creskolab.uoregon.edu/stacks/
---
You received this message because you are subscribed to a topic in the Google Groups "Stacks" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stacks-users/P_Yku5zhKuk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stacks-users...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
--" You must never be afraid to go there."--
--Harlan Ellison

Emily Fountain

unread,
Oct 3, 2013, 11:46:23 AM10/3/13
to stacks...@googlegroups.com
Hey Chris,
Any luck on getting any further on this issue?
Cheers,
Em

chris blair

unread,
Oct 3, 2013, 2:11:27 PM10/3/13
to stacks...@googlegroups.com
Hey Em, 

Nope still no luck......


On Wednesday, 2 October 2013 12:05:31 UTC-4, Emily Fountain wrote:

chris blair

unread,
Oct 3, 2013, 2:48:40 PM10/3/13
to stacks...@googlegroups.com
Perhaps there is an issue with Step 2.5 of the installation instructions. However, I did copy the command listed...


On Wednesday, 2 October 2013 12:05:31 UTC-4, Emily Fountain wrote:

Emily Fountain

unread,
Oct 3, 2013, 3:02:04 PM10/3/13
to stacks...@googlegroups.com
Yes I did as well and I am not getting any other errors in regards to mysql or MDB2. Just this one error. And the log of my run and my apache2 log show no errors. So I really have no clue.

Christopher Blair

unread,
Oct 4, 2013, 12:24:18 PM10/4/13
to stacks...@googlegroups.com
I installed MDB2 and the MDB2 MySQL driver using the following commands: 

pear install MDB2-2.5.0b5

pear install MDB2_Driver_mysql-1.5.0b4

Perhaps the installation placed them in a directory that Stacks cannot see?


--
Stacks website: http://creskolab.uoregon.edu/stacks/
---
You received this message because you are subscribed to a topic in the Google Groups "Stacks" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stacks-users/P_Yku5zhKuk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stacks-users...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

chris blair

unread,
Oct 4, 2013, 12:49:58 PM10/4/13
to stacks...@googlegroups.com
Although my MDB2.php file is in /usr/local/share/stacks/php.


On Wednesday, 2 October 2013 12:05:31 UTC-4, Emily Fountain wrote:

Julian Catchen

unread,
Oct 4, 2013, 1:19:04 PM10/4/13
to stacks...@googlegroups.com, chris blair, efou...@gmail.com
Chris:

Your MDB2.php file should not be in the Stacks' directory. It should be
installed in a system directory.

You can check that Pear is installed and working, and verify that the place Pear
is installing the MDB2 files is in PHP's include path. Follow these instructions:

http://pear.php.net/manual/en/installation.checking.php

You should not need to move any files by hand, the installation should take care
of it.

If, by step 2.5 of the install instructions, you are referring to "Enable
web-based exporting from the MySQL database," this is unrelated to the MDB2
install and would have no effect.

Emily:

The install instructions should work on any Ubuntu distribution without any
changes or manual interventions, as long as you used apt-get. Are you certain
you didn't manually move anything around with respect to MDB2?

I would also check the above link. The question is, what directory are your Pear
files installed in, and, is PHP configured to look in that directory to find them?

For both of you, you should check the Apache access_log and error_log as well as
the system log (syslog or messages), all in the /var/log directory while trying
to access the Stacks web page to monitor it for errors.

Best,

julian

Christopher Blair

unread,
Oct 4, 2013, 4:48:05 PM10/4/13
to Julian Catchen, stacks...@googlegroups.com, efou...@gmail.com
HI Julian, 

Yes, pear is successfully installed. I have found the directory where pear installs the MDB2 files (/Users/labmanager/pear/share/pear). I first removed MDB2.php from the Stacks directory.

In /etc I cp php.ini.default php.ini.

I then added the following:

; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
include_path = ".:/Users/labmanager/pear/share/pear/

sudo apachectl restart

I then reloaded localhost/stacks/ and received a server error from Google Chrome. 

Emily Fountain

unread,
Oct 4, 2013, 4:56:26 PM10/4/13
to stacks...@googlegroups.com, chris blair, efou...@gmail.com, jcat...@uoregon.edu
Hi Julian,

Thanks for your reply. I have not messed with the MDB2 as I do not think I know enough to do that. When I use command locate MDB2 it is installed in the /usr/share/php/MDB2

I checked to make sure php is configured to locate my pear and MDB2 files as the php.ini has path_include for the /usr/share/php and ran through the everything suggested in the link and had  no issues with checking everything.

The only error in my apache2 error.log is the the favicon.ico which should not interfere with stacks.

My apache2 access.log: "GET /stacks/index.php?db=sloth1_ddRAD_radtags HTTP/1.1" 200 371 "http://localhost/stacks/"  (and then it goes on to list webbrowsers; there is also another entry about getting the favicon.ico)

My syslog has an invalid response from packet host avahi-daemon that occurs often because I am using VM and it also has something I do not understand but has to do with my php : CRON [3896]: (root) CMD ( [-x /usr/lib/php5/maxlifetime] && [-d /var/lib/php5] && find /var/lib/php5/ .... and it keeps going with a few other things but nothing that says error or fail.

The only thing I can think of is that within my stacks 1.08 folder there is the php folder, but I do not see how this could mess up anything as this does not contain anything like my MDB2.php

I can open the .tsv files in Gnumeric but it is not ideal. Was really hoping to use the web interface.

Thanks again,
Em

Christopher Blair

unread,
Oct 4, 2013, 5:15:56 PM10/4/13
to Emily Fountain, stacks...@googlegroups.com, Julian Catchen
OK I was able to get past this step. Now, I can click on a database and I can see my batch ID, date, and type. However, I get errors when I click on catalogue or samples:

File: /usr/local/share/stacks/php/catalog.php (line 59)
MDB2 Error: no such table
_doQuery: [Error message: Could not execute statement] [Last executed query: PREPARE mdb2_statement_mysql_2f366d93d6a88a78cc604eb6030aa03df6d92bae1 FROM 'SELECT COUNT(tag_id) as count FROM catalog_index WHERE batch_id=?'] [Native code: 1146] [Native message: Table 'tut_radtags.catalog_index' doesn't exist] 

Julian Catchen

unread,
Oct 5, 2013, 3:33:32 AM10/5/13
to stacks...@googlegroups.com, Christopher Blair, Emily Fountain
Okay, everything is installed and working in your case, Chris. Now you just need
to run index_radtags.pl to index your database and it should work.

julian

On 10/4/13 11:15 PM, Christopher Blair wrote:
> OK I was able to get past this step. Now, I can click on a database and I can
> see my batch ID, date, and type. However, I get errors when I click on catalogue
> or samples:
>
> File: /usr/local/share/stacks/php/catalog.php (line 59)
> *MDB2 Error: no such table*
> http://pear.php.net/manual/en/__installation.checking.php
> > File: /usr/local/share/stacks/php/__db_functions.php (line 40)
> MDB2 Error: not
> > found
> >
> > I am running stacks 1.08 on Ubuntu
> >
> > db_functions.php is located in the directory where the error is
> saying it is
> > not found.
> >
> > I am learning to use Linux as I am learning to use this software,
> so this
> > may be I did something stupid or did not do something obvious,
> but I really
> > have no idea why it will not find a file that is there.
> >
> > Thank you,
> > Em
> >
>
>
>
>
> --
> Christopher Blair, Ph.D.
> Postdoctoral Associate
> Department of Biology
> Duke University, Box 90338
> BioSci 130 Science Drive
> Durham, NC 27708
> ph: 919-613-8727
> Christop...@duke.edu <mailto:peter....@duke.edu>
> <http://individual.utoronto.ca/chrisblair/index.html>
>
> --
> Stacks website: http://creskolab.uoregon.edu/stacks/
> ---
> You received this message because you are subscribed to the Google Groups
> "Stacks" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
Julian M Catchen, Ph.D.
Institute of Ecology and Evolution
University of Oregon
--
jcat...@uoregon.edu
http://www.uoregon.edu/~jcatchen/

Julian Catchen

unread,
Oct 5, 2013, 3:36:16 AM10/5/13
to stacks...@googlegroups.com, Emily Fountain, chris blair
Okay, Emily, I am assuming you have the Stacks files installed in
/usr/local/share/stacks (the default location), and you have configured Apache2
to load the PHP files in /usr/local/share/stacks/php. Is this correct?

If so, what does your web browser display when you try to load the Stacks
website? Do you see the Stacks logo, or a server error of some kind (if so, what
error)?

julian

Emily Fountain

unread,
Oct 7, 2013, 4:35:37 PM10/7/13
to stacks...@googlegroups.com, Emily Fountain, chris blair, jcat...@uoregon.edu
Hi Julian,

I have the stacks files installed in /usr/local/share/stacks and have configured apache to load the php files in /usr/local/share/stacks/php.

When I load the website I see the stacks logo and my database. The only time I get an error is when I click on my database and I always get the same one: db_functions.php MDB2 not found

Em

Julian Catchen

unread,
Oct 16, 2013, 9:19:42 PM10/16/13
to stacks...@googlegroups.com
Hi Emily,

On my machine I have these files present:

/usr/share/pear/MDB2
/usr/share/pear/MDB2.php
/usr/share/pear/MDB2/Date.php
/usr/share/pear/MDB2/Driver
/usr/share/pear/MDB2/Extended.php
/usr/share/pear/MDB2/Iterator.php
/usr/share/pear/MDB2/LOB.php
/usr/share/pear/MDB2/Driver/Datatype
/usr/share/pear/MDB2/Driver/Function
/usr/share/pear/MDB2/Driver/Manager
/usr/share/pear/MDB2/Driver/Native
/usr/share/pear/MDB2/Driver/Reverse
/usr/share/pear/MDB2/Driver/mysql.php
/usr/share/pear/MDB2/Driver/mysqli.php
/usr/share/pear/MDB2/Driver/Datatype/Common.php
/usr/share/pear/MDB2/Driver/Datatype/mysql.php
/usr/share/pear/MDB2/Driver/Datatype/mysqli.php
/usr/share/pear/MDB2/Driver/Function/Common.php
/usr/share/pear/MDB2/Driver/Function/mysql.php
/usr/share/pear/MDB2/Driver/Function/mysqli.php
/usr/share/pear/MDB2/Driver/Manager/Common.php
/usr/share/pear/MDB2/Driver/Manager/mysql.php
/usr/share/pear/MDB2/Driver/Manager/mysqli.php
/usr/share/pear/MDB2/Driver/Native/Common.php
/usr/share/pear/MDB2/Driver/Native/mysql.php
/usr/share/pear/MDB2/Driver/Native/mysqli.php
/usr/share/pear/MDB2/Driver/Reverse/Common.php
/usr/share/pear/MDB2/Driver/Reverse/mysql.php
/usr/share/pear/MDB2/Driver/Reverse/mysqli.php
/usr/share/pear/data/MDB2_Driver_mysql
/usr/share/pear/data/MDB2_Driver_mysqli

Do you have these files? If they are not in that exact location, you may be able
to find them with the 'locate' or 'find' commands.

locate MDB2

or

cd /
find . MDB2* -print

If not, I would try to force apt-get to reinstall the MDB2 packages.

julian
> > to stacks-users...@googlegroups.com <javascript:>.
> > For more options, visit https://groups.google.com/groups/opt_out
> <https://groups.google.com/groups/opt_out>.
>
> --
> Julian M Catchen, Ph.D.
> Institute of Ecology and Evolution
> University of Oregon
> --
> jcat...@uoregon.edu <javascript:>
> http://www.uoregon.edu/~jcatchen/ <http://www.uoregon.edu/~jcatchen/>

atla goutham

unread,
Mar 11, 2014, 2:20:25 AM3/11/14
to stacks...@googlegroups.com
I have the similar problem. I have all the files listed by Julian but missing 'mysqli.php' files. Any idea why they are missing ?

m
Reply all
Reply to author
Forward
0 new messages