Reseller Script Execution

liunx

Guest
I got my guest book script running on the <a href="http://guest.svvg.biz" target="_blank">main site</a> 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. <br /><br />When I try to run the script on the account I created, I get a 500 error. The error log says:<br /><!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->[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<!--QuoteEnd--></div><!--QuoteEEnd--><br />I put in the following simple script as a test and got the same error:<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->#!/usr/bin/perl<br />#<br /># Generic form mailing script<br />#<br /># NOTE:  Because this script may be running on a different account than<br />#        the Web site, it requires FULLY-QUALIFIED URLs.<br />#<br />#Initialize variables<br />#<br />#<br /># Write out return HTML page<br />#<br /># Write HTML header<br />#<br />print "Content-type: text/html\n\n";<br />print "<HTML>\n";<br />print "<HEAD>\n";<br />print "<TITLE>Silicon Valley Pocket PC Contact Results</TITLE>\n";<br />print "</HEAD>\n";<br />print "<BODY>\n";<br />print "<H1>Testing script</H1>\n";<br />#<br /># Write HTML end<br />#<br />print "</BODY>\n";<br />print "</HTML>\n";<!--c2--></div><!--ec2--><br />Here's the FORM code I'm using to run the script:<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><FORM ACTION="http://www.svpocketpc.com/cgi-bin/svppc-contact.pl" METHOD=POST><!--c2--></div><!--ec2--><br />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?<br /><br />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.<br /><br />Thanks for any help,<br />Steve<!--content-->
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?<!--content-->
<!--QuoteBegin-TCH-Bruce+Aug 26 2004, 12:03 PM--><div class='quotetop'>QUOTE(TCH-Bruce @ Aug 26 2004, 12:03 PM)</div><div class='quotemain'><!--QuoteEBegin-->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?<!--QuoteEnd--></div><!--QuoteEEnd--><br />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.<br /><br />As for CHMOD, I had already changed the file to RWX, R-X, R-X (I knew I forgot to mention something).<br /><br />UPDATE: OK, it worked now. <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/blink.gif" style="vertical-align:middle" emoid=":blink:" border="0" alt="blink.gif" /> 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:<ul><li>cgiecho</li><li>cgiemail</li><li>entropybanner.cgi</li><li>randhtml.cgi</li></ul>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?)<br /><br />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.)<br /><br />Steve<!--content-->
 
Back
Top