LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 11-29-2002, 07:21 PM   #1
nyroc
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">
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<LINK REL="SHORTCUT ICON" href="">
<TITLE>My Calendar</TITLE>
<BASE href="http://helaman.local.org/">
 
Old 11-29-2002, 07:43 PM   #2
stickman
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-29-2002, 11:09 PM   #3
nyroc
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-29-2002 at 11:11 PM.
 
  


Reply



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 05:55 PM
Apache cgi-script problem palanisaravanan Linux - General 6 02-07-2004 09:41 AM
Apache CGI Problem : Browser not running script Zaknafien Linux - Software 3 12-31-2003 01:16 PM
perl problem? apache problem? cgi problem? WorldBuilder Linux - Software 1 09-17-2003 07:45 PM
apache v2.0.44 + cgi ; securing cgi-support in apache markus1982 Linux - General 0 01-20-2003 01:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:44 AM.

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