Pony99CA Posted August 26, 2004 Posted August 26, 2004 I got my guest book script running on the main site of my reseller account with just a little tweaking. However, that same basic script is not running on another site on an account that I created. When I try to run the script on the account I created, I get a 500 error. The error log says: [Thu Aug 26 08:41:00 2004][error] [client 216.139.37.234] Premature end of script headers: /home/pocketpc/public_html/cgi-bin/svppc-contact.pl I put in the following simple script as a test and got the same error: >#!/usr/bin/perl # # Generic form mailing script # # NOTE: Because this script may be running on a different account than # the Web site, it requires FULLY-QUALIFIED URLs. # #Initialize variables # # # Write out return HTML page # # Write HTML header # print "Content-type: text/html\n\n"; print "<HTML>\n"; print "<HEAD>\n"; print "<TITLE>Silicon Valley Pocket PC Contact Results</TITLE>\n"; print "</HEAD>\n"; print "<BODY>\n"; print "<H1>Testing script</H1>\n"; # # Write HTML end # print "</BODY>\n"; print "</HTML>\n"; Here's the FORM code I'm using to run the script: ><FORM ACTION="http://www.svpocketpc.com/cgi-bin/svppc-contact.pl" METHOD=POST> I'm probably not pointing to the correct location in the FORM code. The premature end of the script headers probably means that it's trying to run a non-existent script, so what path should I use? Note that the same guest book script runs fine with that FORM HTML pointing to my ISP, but I'm probably going to be leaving that ISP soon, so I need it running on TCH. I think this is the last major piece to getting my site completely ported to TCH. Thanks for any help, Steve Quote
TCH-Bruce Posted August 26, 2004 Posted August 26, 2004 I cut and pasted your code and uploaded it to my server and it worked fine. Did you upload it in ASCII mode and did you change the permissions to 755? Quote
Pony99CA Posted August 26, 2004 Author Posted August 26, 2004 I cut and pasted your code and uploaded it to my server and it worked fine. Did you upload it in ASCII mode and did you change the permissions to 755? I uploaded it with the same FTP client (FTP Genius) as the script that works. I didn't have .pl files listed as ASCII (I thought I had), but, as indicated, the other script worked fine. I'll try changing it and see what happens, though. As for CHMOD, I had already changed the file to RWX, R-X, R-X (I knew I forgot to mention something). UPDATE: OK, it worked now. One thing that I noticed was that I now have additional script files in the cgi-bin directory. When my guest book script wasn't working, it was the only script file there, but now there are the following files: cgiecho cgiemail entropybanner.cgi randhtml.cgi I did visit CPanel's CGI Center and execute the simple CGI wrapper script, but that only seemed to create an scgi-bin directory. Does it do something else? (And what is the difference between the cgi-bin directory and the scgi-bin directory?) But, whatever happened, things seem to be working now. (This isn't the first time mysterious things have happened; one of my pages wasn't showing graphics for some reason, then started showing them again even though I didn't change any HTML near the graphics.) Steve Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.