httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Sidelinger" <g...@ilive4code.net>
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"
rows="5">'.$statement.'</textarea>
        <br><input type="submit">
</form>
<br>
Statement Executed: '.param('statement').'
<br><br>
'.$html;
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"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"><head><title>SQL
Page</title>
</head><body><form name="" method="get" action="/./select.pl">
        Enter SQL statement:<br>
        <textarea name="statement" cols="80" rows="5"></textarea>
        <br><input type="submit">
</form>
<br>
Statement Executed:
<br><br>
</body></html>



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


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



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:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message