Solved

C/CGI Premature end of script headers

Posted on 2004-08-18
7
11,226 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

920 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now