-   Linux - Software (
-   -   apache cgi problem (

nyroc 11-29-2002 08:21 PM

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="">

stickman 11-29-2002 08:43 PM

What are you sending back as the Content-Type?

nyroc 11-30-2002 12:09 AM

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.

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