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: "Mabbett, Lane" <lane dot mabbett at exsc01 dot exch dot eds dot com>
Subject: no HTML after &dbuse
Date: Sep 8 1997 4:11PM

     
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
	- The server is NCSA HTTPd Server 1.5.2
	- If I output it to a file, and call the file from my browser, all is
fine, so there is not an HTML problem
	- As far as I can tell, the Sybase environment is properly set. (my
environment is SYBASE=/sybase)

I would think that the HTTP daemon is not setting the Sybperl
environment when executing the script, but as our UNIX/Sybase SA has
departed the company, I am stuck.  Please correct me if I'm wrong, but
with the browser calling the script as user 'nobody', a successful call
is not made to Sybase??  If I set the environment in the script,
shouldn't that work?

 After outputting all this to a file, I could call the file and put it
in the browser, but that's messy and I don't want to do that.  Any help
is greatly appreciated.  Thanks in advance.

Lane Mabbett


       #!/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);