httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Sidelinger" <>
Subject [users@httpd] Content Type
Date Tue, 05 Nov 2002 02:11:08 GMT
Ok I'm trying to set up apache on my main debian desktop.  I can't see to
get apache to work with some perl cgi scripts.  When I try to access them
in any broswer it sends the output of the script as the name of the script
and wants to know if I want to open or save it.  I can't seem to figure
out why after diging through the apache config file and logs.  Here is an
example of the code and the output.  I do know that apache is changing the
content to what is in the mine file for pl files. I can tell this by
looking at lynx --source -head script_url If I say that pl files are
text/html then it works fine but then a perl script can't output anything
else.  Could someone please help me.

Code ex:  This is the code that actually prints the html.  I am using the
CGI pm for the print header, start_html and end html

print header();
print start_html(-title=>"SQL Page");
print '<form name="" method="get" action="'.$script_name.'">
        Enter SQL statement:<br>
        <textarea name="statement" cols="80"
        <br><input type="submit">
Statement Executed: '.param('statement').'
print end_html();

command line output when I run the script

Content-Type: text/html; charset=ISO-8859-1

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="" lang="en-US"><head><title>SQL
</head><body><form name="" method="get" action="/./">
        Enter SQL statement:<br>
        <textarea name="statement" cols="80" rows="5"></textarea>
        <br><input type="submit">
Statement Executed:

And finally what is sent to the browser:  This is what shows up when I
open it with a text editor

                <title>Untitled Document</title>
                <meta http-equiv="Content-Type" content="text/html;
                Something went wrong and the page can not be displayed<br>
                Error Msg:<br>Could not connect to the database.

If anyone can tell me what may be causing this I would be very thankfull.
It works fine under apache for windows.  The scripts work just fine under
orlder version of apache too.

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message