Solved

C/CGI Premature end of script headers

Posted on 2004-08-18
7
11,229 Views
Last Modified: 2013-12-25
Hi,

I have the following message in the error_log of my apache:
                        "Premature end of script headers: search.cgi"

i've chmoded 755 on my cgi-script.
My script run well if i call it from the browser directly but not from my php page.
My Php returns: "failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error"

I use Apache 2.0.50  /  Red Hat 8 /  PHP 5  /  CGI programmed in C Language

Thanx for your help!
0
Comment
Question by:psycho_cat_69
7 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 11830861
beside that it is a very bad idea to call a cgi from within another cgi ...

could you please post the PHP call
0
 
LVL 5

Expert Comment

by:Peewee
ID: 11831372
psycho_cat_69,

is your script on a server we can see?  if so paste the url here for your php and your cgi file..

Peewee
0
 
LVL 1

Author Comment

by:psycho_cat_69
ID: 11833076
Sorry People...I've found my problem...

Error in my CGI...

Thanx for  your help!
0
Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

 
LVL 51

Expert Comment

by:ahoffmann
ID: 11834720
> My script run well if i call it from the browser directly
and
> Error in my CGI...
how could it then run first?
0
 
LVL 1

Author Comment

by:psycho_cat_69
ID: 11834753
Something with netscape validation!  I've removed those lines and then everything was OK!

Bizar!

********************************************************
********************************************************
Lines removed:

int netscape=0

if(!strstr(getenv("HTTP_USER_AGENT"), "MSIE"))
               netscape=1

********************************************************
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 12107631
PAQed, with points refunded (500)

Computer101
E-E Admin
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction:   Welcome to my first article ever. To begin with, the reason I write this article.  I participated in a question on Experts Exchange about the start command in Windows and there were some discussion about the usage. The discussio…
In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question