Dear Jennifer, Thank you for your quick suggestion. However, My problem is not solved yet. I have looked at the readme files but could not find a solution.
I have a perl-cgi script which runs the following shell script containing 'hgLoadBed'. The web-users name is 'dbadmin' and I already have .hg.conf file in /home/dbadmin as well as hg.conf file in /www/docs/generic_ucsc/cgi-bin with 600 permissions. When I run the shell-script from within the perl-script, it reports the following errors. However, when I run the script in a terminal (as user=dbadmin), it works perfectly. ################cgi-errors############################################ [Tue May 12 11:59:58 2009] [error] [client 10.10.2.25] Reading /www/docs/generic_ucsc/track_files/analysis_scaled_tracks/track1_scaled, referer: http://bioinformatics.unl.edu/ucsc/analysis/cgi-bin/TrkAnalysis.cgi [Tue May 12 11:59:58 2009] [error] [client 10.10.2.25] Loaded 908 elements of size 4, referer: http://bioinformatics.unl.edu/ucsc/analysis/cgi-bin/TrkAnalysis.cgi [Tue May 12 11:59:58 2009] [error] [client 10.10.2.25] Sorted, referer: http://bioinformatics.unl.edu/ucsc/analysis/cgi-bin/TrkAnalysis.cgi [Tue May 12 11:59:58 2009] [error] [client 10.10.2.25] Could not read hostname, user, or password to the database from configuration file., referer: http://bioinformatics.unl.edu/ucsc/analysis/cgi-bin/TrkAnalysis.cgi [Tue May 12 11:59:58 2009] [error] [client 10.10.2.25] , referer: http://bioinformatics.unl.edu/ucsc/analysis/cgi-bin/TrkAnalysis.cgi [Tue May 12 12:00:45 2009] [error] [client 10.10.2.25] script not found or unable to stat: /www/docs/generic_ucsc/analysis/cgi-bin/style, referer: http://bioinformatics.unl.edu/ucsc/analysis/cgi-bin/TrkAnalysis.cgi [Tue May 12 12:00:45 2009] [error] [client 10.10.2.25] Reading /www/docs/generic_ucsc/track_files/analysis_scaled_tracks/track1_scaled, referer: http://bioinformatics.unl.edu/ucsc/analysis/cgi-bin/TrkAnalysis.cgi [Tue May 12 12:00:45 2009] [error] [client 10.10.2.25] Loaded 908 elements of size 4, referer: http://bioinformatics.unl.edu/ucsc/analysis/cgi-bin/TrkAnalysis.cgi [Tue May 12 12:00:45 2009] [error] [client 10.10.2.25] Sorted, referer: http://bioinformatics.unl.edu/ucsc/analysis/cgi-bin/TrkAnalysis.cgi [Tue May 12 12:00:45 2009] [error] [client 10.10.2.25] Could not read hostname, user, or password to the database from configuration file., referer: http://bioinformatics.unl.edu/ucsc/analysis/cgi-bin/TrkAnalysis.cgi ##################cgi-errors############################################ ################shell script############################################ #!/bin/sh export BIN=/www/gb/project3 export PATH=$BIN:$PATH export MYSQLLIBS="/data/project3/lib/mysql/libmysqlclient.a -lz -lcrypt -lnsl -lm" export MYSQLINC=/data/project3/include/mysql/ export MACHTYPE=x86_64 export HOME=/home/dbadmin # To ensure the $HOME variable is defined. export USER=dbadmin # To ensure the $USER variable is defined. export LOGNAME=dbadmin export HOSTNAME=localhost export TERM=xterm export SHELL=/bin/bash export HGDB_CONF=$HOME/.hg.conf cd /home/dbadmin/ # Change to the home directory, to ensure the .hg.conf file is found /home/dbadmin/bin/project3/hgLoadBed ath1 track1_scaled /www/docs/generic_ucsc/track_files/analysis_scaled_tracks/track1_scaled /home/dbadmin/bin/project3/hgLoadBed ath1 track2_scaled /www/docs/generic_ucsc/track_files/analysis_scaled_tracks/track2_scaled cd /www/docs/generic_ucsc/browser_src/jksrc/kent/src/hg/makeDb/trackDb /usr/bin/make alpha DBS=ath1 #################shell script############################################ Could you please suggest what might be the problem here. Thanks, sridhar Jennifer Jackson <[email protected]> 05/11/2009 05:49 PM To Sridhar A Malkaram <[email protected]> cc [email protected] Subject Re: [Genome] using cgi-scripts to load tracks. Hello, For running cgi-scripts, there should also be an .hg.conf file in your home working directory with permission set so that only the owner (you) can read/write/execute. Explained here: http://genomewiki.cse.ucsc.edu/index.php/Browser_Installation see the end of section #6 For "make alpha", a checked out copy of the source tree should be in your working directory and any changes made there in your own sandbox. From your path ~kent/src/hg/makeDb/trackDb, run the make program. Check in changes to the main cvs tree before or after running "make [alpha|strict] DBS=<db>". - alpha created lines in the mySQL table trackDb for all tracks - strict makes lines in trackDb only for those tracks that actually have tables (less clustered table, especially for a minimal install) - DBS is optional, using it restricts the command. ex. DBS=hg18 means that only hg18 would be updated These and more details are in the jksrc download at /scr/products/README* Jennifer Jackson UCSC Genome Bioinformatics Group Sridhar A Malkaram wrote: > Hello, > > I have a specific question regarding using cgi-scripts along with > genome-browser. > I want to load a bed file to the mysql database, using hgLoadBed command > from within a cgi script. > > However, it complains that it cannot read the required information from > .hg.conf file despite the fact that I have the .hg.conf file in the > web-user's home directory. > It also cannot find the data base. > > What are the requirements to run hgLoadBed and make alpha commands using a > cgi-script. > > > Thankyou, > > sridhar > _______________________________________________ > Genome maillist - [email protected] > https://lists.soe.ucsc.edu/mailman/listinfo/genome > _______________________________________________ Genome maillist - [email protected] https://lists.soe.ucsc.edu/mailman/listinfo/genome
