Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 11-29-2002, 08:21 PM   #1
LQ Newbie
Registered: Nov 2002
Posts: 9

Rep: Reputation: 0
apache cgi problem

I have configured apache to run cgi scrips. They run, but they are displayed in mozilla as text (as in when you view the page source) and not as html. I have verified this behavior from only 2 different redhat 8.0 hosts.

However, the scripts work perfectly when viewed from IE from the apache server. Pages, images, links everything is happy in IE.

Also, the scripts work perfectly in mozilla and IE when the same scripts are run a micro$oft IIS web server.

Anybody got ideas? I wonder if it is my header?

<HTML lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<TITLE>My Calendar</TITLE>
<BASE href="">
Old 11-29-2002, 08:43 PM   #2
Senior Member
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
What are you sending back as the Content-Type?
Old 11-30-2002, 12:09 AM   #3
LQ Newbie
Registered: Nov 2002
Posts: 9

Original Poster
Rep: Reputation: 0
Never mind. I found the prob (and, you are correct).

I needed to put "Content-type:text/html\n\n" right at the very start, nothing in front of it.

This is my second day using Apache. I am surprised at how many things I had to change in the scripts to get them running on apache. Not just the obvious stuff like the above omission, but even some obscure, arcane things too. For instance $variable = $cgi->url() does not produce the same results from IIS as it does on Apache. Case sensitivity has gotten me a few times.

I'm not done with all of the websites (8 of them), but I think all the hard stuff is over with.

Last edited by nyroc; 11-30-2002 at 12:11 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
CGI and Apache Sevoma Linux - Software 7 02-06-2005 06:55 PM
Apache cgi-script problem palanisaravanan Linux - General 6 02-07-2004 10:41 AM
Apache CGI Problem : Browser not running script Zaknafien Linux - Software 3 12-31-2003 02:16 PM
perl problem? apache problem? cgi problem? WorldBuilder Linux - Software 1 09-17-2003 08:45 PM
apache v2.0.44 + cgi ; securing cgi-support in apache markus1982 Linux - General 0 01-20-2003 02:03 PM

All times are GMT -5. The time now is 09:18 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration