How to use Stacks web interface?

961 views
Skip to first unread message

gregor...@gmail.com

unread,
Apr 24, 2014, 12:46:38 PM4/24/14
to stacks...@googlegroups.com
I've been looking on the Stacks web site for documentation about how to use the web interface, but I haven't found it. Here's where I'm starting from:

Stacks, Apache, MySQL, PHP, and PHP MySQL are all installed. I've completed the paired-ends tutorial, so I have a database "pe_radtags," populated with data from the tutorial. I've verified that the web server works and that it can see the php scripts.
Now, presumably I need to tell the php scripts how how to connect to the correct database, e.g. it's name, the appropriate mysql user and password to use, etc...
Is all this documented somewhere that I just haven't found?

Julian Catchen

unread,
Apr 24, 2014, 2:57:04 PM4/24/14
to stacks...@googlegroups.com, gregor...@gmail.com
You should be able to go to the URL:

http://localhost/stacks/

in your local web browser (or replace localhost with the address of the
computer where you have Stacks installed). You should see a list of RAD
databases if everything is working.

If not, you may see an error message. If you don't see an error message,
you should check the log files for Apache where there may also be an
error message.

julian

Jason Munshi-South

unread,
Apr 24, 2014, 3:12:57 PM4/24/14
to stacks...@googlegroups.com, gregor...@gmail.com
Hi Julian and Greg,

I just completed an install of the Stacks database on OS X Mavericks.  All is working well, except that I need to type in the name of the database to see it: e.g. http://localhost/stacks/index.php?db=test_radtags

Greg, might that be your issue?  Can you point directly to a database in your browser?  Otherwise I just see the Stacks header with nothing listed under "Stacks Databases".

You may also need to make some slight modifications to the Apache config file or your php.ini file so it recognizes "index.php" automatically and not just index.html.

Julian, is there an easy way to get the databases to show up at http://localhost/stacks/, e.g. a minor mod to one of the Stacks php files?

Best,
Jason


--
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 to stacks-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Jason Munshi-South, Ph.D.
Associate Professor
Louis Calder Center & Dept of Biological Sciences
Fordham University
Armonk, NY 10504
jmunsh...@fordham.edu
(718) 817-0534 (MWTh in the Bronx)
(914) 273-3078 ext 20 (TuF at Calder)
http://NYCevolution.org/

Julian Catchen

unread,
Apr 24, 2014, 5:15:02 PM4/24/14
to stacks...@googlegroups.com, jmunsh...@fordham.edu
Hi Jason,

The index.php page for the Stacks web interface is going to execute this
command:

mysql --user=dbuser --password=dbpass
-N -B -e "SHOW DATABASES LIKE '%_radtags'"

Which will return a list of all the databases that end in "_radtags". If
you take a look at the index.php file, you should see this code in
there. Anyway, it's possible you don't have quite the right permissions
set up for your Stacks user in MySQL. But, you can run this command by
hand to check if that is the case.

Cheers,

julian

gregor...@gmail.com

unread,
Apr 25, 2014, 11:57:33 AM4/25/14
to stacks...@googlegroups.com
I'm making progress. Having fixed ~/.my.cnf and constants.php, the web interface is able to see my database "pe_radtags" and the web page returned by index.php looks as expected, listing my database. However, index.php?db=pe_radtags returns a page with the following error message.

File: /usr/pkg/share/httpd/htdocs/gpenn/stacks/db_functions.php (line 40) MDB2 Error: not found

Any idea why this is happening?

Gregory

gregor...@gmail.com

unread,
Apr 25, 2014, 12:23:47 PM4/25/14
to stacks...@googlegroups.com
We figured out the source of this problem. We had installed the Pear MDB2 driver for MySQLi rather than MySQL. With that corrected everything seems to be working correctly.

Thanks for all your help.



On Thursday, April 24, 2014 10:46:38 AM UTC-6, gregor...@gmail.com wrote:

Teshome Mulugeta

unread,
Jun 30, 2014, 1:49:44 AM6/30/14
to stacks...@googlegroups.com, jmunsh...@fordham.edu, jcat...@uoregon.edu
Hi,

We had similar issue with different problem. The index.php config file always try to connect to localhost while our database server is on a different host: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

I was able to fix this as follows:

Edit /local/genome/packages/stacks/1.18/share/stacks/php

add $db_host on the global and add --host=$db_host in the database connection line.


function write_database_list($database) {
    global $db_host, $db_user, $db_pass, $root_path, $img_path, $mysql_bin;

    $databases = array();

    exec("$mysql_bin --host=$db_host --user=$db_user --password=$db_pass -N -B -e \"SHOW DATABASES LIKE '%_radtags'\"", $databases);
Reply all
Reply to author
Forward
0 new messages