PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Doug Fairclough <kensey at clearstation dot com>
Subject: Re: no HTML after &dbuse
Date: Sep 8 1997 6:55PM

> 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); >