--- loncom/lonsql 2007/09/12 20:29:13 1.89 +++ loncom/lonsql 2011/11/07 18:13:38 1.91 @@ -3,7 +3,7 @@ # The LearningOnline Network # lonsql - LON TCP-MySQL-Server Daemon for handling database requests. # -# $Id: lonsql,v 1.89 2007/09/12 20:29:13 raeburn Exp $ +# $Id: lonsql,v 1.91 2011/11/07 18:13:38 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -233,13 +233,13 @@ unless ($dbh = DBI->connect("DBI:mysql:l system("echo 'Cannot connect to MySQL database!' |". " mailto $emailto -s '$subj' > /dev/null"); - open(SMP,'>/home/httpd/html/lon-status/mysql.txt'); + open(SMP,">$perlvar{'lonDocRoot'}/lon-status/mysql.txt"); print SMP 'time='.time.'&mysql=defunct'."\n"; close(SMP); exit 1; } else { - unlink('/home/httpd/html/lon-status/mysql.txt'); + unlink("$perlvar{'lonDocRoot'}/lon-status/mysql.txt"); $dbh->disconnect; } @@ -447,7 +447,7 @@ sub make_new_child { ($arg2 =~ /\%\%/)) { ($srchby,$srchtype) = map {&unescape($_);} (split(/\%\%/,$arg2)); - my $srchterm = &unescape($arg3); + $srchterm = &unescape($arg3); } else { ($srchby,$srchtype,$srchterm) = map {&unescape($_);} ($arg1,$arg2,$arg3);