|
|
sybperl-l Archive
Up Prev Next
From: "Mabbett, Lane" <lane dot mabbett at exsc01 dot exch dot eds dot com>
Subject: RE: no HTML after &dbuse
Date: Sep 9 1997 12:28PM
Thanks Doug. Sybase is down with a bad disk right now (making me
re-think our maintenance contract with Sun), but I'll give it a shot.
>----------
>From: Doug Fairclough[SMTP:kensey@clearstation.com]
>Sent: Monday, September 08, 1997 2:55 PM
>To: 'SYBPERL-L@trln.lib.unc.edu'
>Subject: Re: no HTML after &dbuse
>
>
>> I have been grappling with the following problem for quite a while, and
>> am thoroughly stuck. Any HTML that I put in this script will not make
>> it to the browser after &dbuse($dbproc, $opt_d; This script runs fine
>> from the command prompt. I have verified the following:
>> - The WebServers Log indicates 200 when this script is accessed from
>> the browser
>
>some things to try :
>
>its helpful to check the error log. find out where it is (it should
>be in the same directory as the access log, which is what you refer to
>above). if your script is having a problem making a connection to the
>database, this should be indicated there.
>
>in your BEGIN block, you may want to try setting DSQUERY. i see
>it is used in your script on the line :
>
> $opt_s = $ENV{DSQUERY} || "KingKong";
>
>so your BEGIN block becomes :
>
>BEGIN {
> $ENV{SYBASE} = '/sybase';
> $ENV{DSQUERY} = ".......";
>}
>
>GetOpts is not going to work from the web server. you can find out with
>some debuggin lines.
>
>add something like :
>
>print "my script thinks : $opt_u, $opt_d ....."
>
>as a debugging line. if you dont want debugging output to interfere with
>whats displayed by your browser, do this instead :
>
>print STDERR "my script thinks ....."
>
>printing to STDERR will cause it to write into the error log, so you need
>to know where the error log is.
>
>good luck !
>
>flamer disclaimer : this information is not gauranteed to be accurate or
>complete.
>
>doug
>
>> #!/bin/perl
>> print "Content-type: text/html\n\n";
>>
>>
>> BEGIN {
>> $ENV{SYBASE} = '/sybase';
>> }
>>
>> print "Results of your
>> Search\n";
>> print "\n";
>> print "\n";
>> print " \n";
>> print "Results of your Search on Zip Code\n";
>> print " \n";
>> print " \n";
>>
>> use Sybase::DBlib
>> require 'sybperl.pl';
>> require 'getopts.pl';
>> require 'ctime.pl';
>>
>> do Getopts('u:d:t:s:p');
>> $opt_u = '******' unless $opt_u;
>> $opt_d = 'pestest' unless $opt_d;
>> $opt_t = '%' unless $opt_t;
>> $opt_s = $ENV{DSQUERY} || "KingKong";
>> $opt_p = '*****' unless $opt_p;
>>
>> $dbproc = &dblogin($opt_u, $opt_p, $opt_s);
>> &dbuse($dbproc, $opt_d);
>>
>
>
|