Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 08-25-2003, 10:23 AM   #1
LQ Newbie
Registered: Aug 2003
Posts: 6

Rep: Reputation: 0
Angry simple script

I'm just playing around with CGI, trying to create a simple script, and I keep getting an Internal Server Error for the code below. I checked all the permissions and everything. What's wrong with it?


$testsentence="This is just a $teststring";

print "Content-type: text/html\n\n";
print <<ENDHTML;
<TITLE>Variable Test</TITLE>

Old 08-25-2003, 11:15 AM   #2
LQ Newbie
Registered: Aug 2003
Posts: 6

Original Poster
Rep: Reputation: 0
Does anybody have any idea about this script? I don't understand why it isn't working.

By the way, this is the error I receive:

Premature end of script headers
Old 08-25-2003, 12:09 PM   #3
LQ Newbie
Registered: Aug 2003
Posts: 6

Original Poster
Rep: Reputation: 0
I found out what I needed. I had to have a new line at the end of the script. It works now.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Iptables (with masq) troubleshooting, very simple script attached script and logs. xinu Linux - Networking 13 11-01-2007 04:19 AM
New to C++ help with simple script Fredstar Programming 9 08-08-2005 11:09 AM
Help on simple script granny Programming 2 02-11-2004 04:02 PM
Simple Script fiod Linux - General 2 09-08-2003 03:03 PM
Simple C Shell script is not so simple elconde Programming 2 09-16-2001 11:53 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:02 PM.

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