LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-19-2003, 01:45 PM   #1
Sm0k3
Member
 
Registered: Sep 2003
Location: Chicago
Distribution: Slackware-current
Posts: 63

Rep: Reputation: 15
Apache 1.4.7 cgi problems


Hello everyone, i've ran into a problem with apache, i've been developing a CGI program in C for about 2 months now, and this the first time i've ran into this error.

in error_log, it claims "premature end of script headers", but when i su to nobody (the user that httpd runs as), and export QUERY_STRING and other environment variables, i get a perfectly fine chunk of HTML code.

the cgi automatically outputs 'Content-type: text/html' and 2 LF chars. This is how CGI is supposed to work that i know of... so i don't know if the program is segfaulting when the apache httpd executes it, or if for some reason it isn't doing exit(0) (to exit normally, without error?). I've went through the error logs
 
Old 10-19-2003, 02:12 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Moved: More suitable in Programming.

PS. Also I've never heard or Apache 1.4.7, I thought the latest was 2.1.x ? And if you post more output of your script your creating, I'm sure someone could help some more with the details provided.

Regards.
 
  


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
Apache .cgi execution problems KeithKessler Linux - Software 7 12-01-2004 11:19 AM
Apache CGI problems clb Linux - Networking 2 11-24-2004 10:03 AM
Problems with apache and cgi Joshsawyer77 Linux - General 3 01-25-2003 01:39 PM
Problems CGI apache Joshsawyer77 Linux - Software 5 01-23-2003 08:56 PM
Apache and SSI/CGI PROBLEMS morbo Linux - Networking 2 01-18-2003 04:04 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:46 PM.

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