Project

General

Profile

information not saved to db

Added by Anchi Cheng about 16 years ago

This question is from William Rice:

Right now, I have installed leginon and all of its dependancies on

my linux computer (Fedora core 8). I configured the mysql server,

apache server, leginon.cfg and sinedon.cfg. It is not yet connected

to a microscope, as I was hoping to get leginon, the database and

webserver working here before moving to microscope communication.

I have configured my webserver to serve

/srv/www/

and everything is under /srv/www/htdocs (project_1_0, phpMyAdmin,

and dbem_1_4_4.

I can view the leginon database tools side ( http://localhost/htdocs/

project_1_0/project.php), and see the sample mrc files.

I added the usr_object user to the leginon database (dbemdata) and

project database (projectdata) as described in the manual, and was

able to add a new user and project using the web tools.

My problem comes when I launch Leginon. I run start-leginon.py,

choose myself and a sample project, and everything starts ok. When

I run the Manual app, I can take a simulated image using SimCCD.

The image doesn't seem to be added to the database, or saved in my

image directory (/Documents/leginon).

If I try to run the robot-MSI app, I get the following error:

/usr/lib/python2.5/site-packages/Leginon/leginon.cfg

I am including my config.php files from dbem and project_1_0, as

well as leginon.cfg and sinedon.cfg. Do you see any problems with

these files?

Thanks,

Bill


config.php from dbem


/**

  • The Leginon software is Copyright 2003
  • The Scripps Research Institute, La Jolla, CA
  • For terms of the license agreement

*

*/

// --- Leginon Viewer Configuration --- //

// --- Set your leginon MySQL database server parameters


$DB_HOST = "/project_1_0/";

$DB_USER = "usr_object";

$DB_PASS = "";

$DB = "dbemdata";

// --- XML test dataset

$XML_DATA = "test/viewerdata.xml";

// --- Project database config

$PROJECT_URL = "../project_1_0";

$PROJECT_DB_HOST = "localhost";

$PROJECT_DB_USER = "usr_object";

$PROJECT_DB_PASS = "";

$PROJECT_DB = "projectdata";

// --- Set Default table definition

$DEF_TABLES_FILE = "defaulttables20080319.xml";

// --- Set External SQL server here (use for import/export application)

// --- You can add as many as you want, just copy and paste the block

// --- to a new one and update the connection parameters

$SQL_HOSTS['main']['db_host'] = $DB_HOST;

$SQL_HOSTS['main']['db_user'] = $DB_USER;

$SQL_HOSTS['main']['db_pass'] = $DB_PASS;

$SQL_HOSTS['main']['db'] = $DB;

?>


project_1_0 config.php


/**

  • The Leginon software is Copyright 2003
  • The Scripps Research Institute, La Jolla, CA
  • For terms of the license agreement

*

*

*/

// --- Project Configuration --- //

// --- Leginon database config

$DBEM_PATH="../dbem_1_4_4";

$DB_HOST = "project_1_0";

$DB_USER = "usr_object";

$DB_PASS = "";

$DB = "projectdata";

// --- Project database config

$PROJECT_DB_HOST = "localhost";

$PROJECT_DB_USER = "usr_object";

$PROJECT_DB_PASS = "";

$PROJECT_DB = "dbemdata";

$VIEWER_URL = $DBEM_PATH."/3wviewer.php?expId=";

$SUMMARY_URL = $DBEM_PATH."/summary.php?expId=";

// --- don't change --- //

set_include_path(get_include_path() . PATH_SEPARATOR . $DBEM_PATH);

?>


sinedon.cfg


###########################################################################

  1. Each section name is the name of a Python module (without the .py).
  1. Options for each section are valid arguments to MySQLdb.connect:
  1. host, db, user, passwd
  1. The Global section defines defauls for every section but can be overriden
  1. in each section.

###########################################################################

###########################################################################

  1. These globals are defaults for all other sections, but each section
  1. can override them if necessary.

###########################################################################

[global]

host: localhost

user:usr_object

passwd:

[leginondata]

db: dbemdata

###########################################################################

  1. This is an example python->database mapping.
  1. The classes defined in exampledata.py describe the tables in the
  1. database configured in this section.

###########################################################################

[projectData]

db: dbemdata


Replies (1)

- Added by Anchi Cheng about 16 years ago

Hi, Bill,

I notice some inconsistency in your configuration files.

1. In config.php in dbem_1_4_4 folder:

$DB_HOST should refer to the name of the computer hosting the database. Therefore, it should be

$DB_HOST = "localhost"

in your case. This way you set the variable that is used later in the configuration file.

2. Same thing in config.php in project_1_0.

3. More problems in project_1_0 (My fault, really, I just changed it in the doc)

$DB = "dbemdata"

$PROJECT_DB = "projectdata"

4. sinedon.cfg: The [projectData] section should give the database name of the project database under "db".

[projectData]

db: projectdata

Anchi

    (1-1/1)