I'm getting a Premature End of script error in my newsite.cgi I've attached the file. The only thing I've changed was the location of my perl. The site still gets submitted and saved in the inactive list but when the submit button is pressed I get that error. I don't understand how the script can do it's job but still spit out this error. Any ideas?? Please???
#!/usr/bin/perl use lib 'lib'; #########################> Ringlink 1.03 <########################## # # # Ringlink is a CGI Perl program that provides the tools # # necessary to run and administrate rings of websites. # # # # Copyright (C) 2000 Gunnar Hjalmarsson, mailbox@gunnar.cc # # Ringlink homepage: http://www.gunnar.cc/ringlink/ # # Version 1.03 released August 20, 2000 # # # # Ringlink is free software; you can redistribute it and/or # # modify it under the terms of the GNU General Public License as # # published by the Free Software Foundation; either version 2 of # # the License, or (at your option) any later version. # # # # Ringlink is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public # # License along with this program; if not, write to the Free # # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, # # MA 02111-1307 USA # # # #################################################################### use rlconfig; use gentools; use site; print "Content-type: text/html\n\n"; gentools::ringlist; if (!@rings) { $result = gentools::noring; } elsif (!$data) { &selectform; } elsif (!$data{'ringid'}) { push (@error, '<p class="error">Select ring ID!</p>'); &selectform; } else { gentools::getringvalues; gentools::htmlize ($data{'ringtitle'} = $ringtitle); $ring_site = qq~<table cellspacing="8"><tr><td><span>Ring:</span></td> <td><span><a href="$ringURL" target="Ringlink"> $data{'ringtitle'}</a></span></td></tr></table>~; if (!$allowsiteadd) { $result = qq~<p class="error"> $data{'ringtitle'} is configured so that the "Add new site" feature is not publicly available. You may want to contact the ringmaster to ask for a new site to be created. </p> <table> <tr> <td><span>Ringmaster name: </span></td> <td><span>$rmname</span></td> </tr> <tr> <td><span>Email:</span></td> <td><span><a href="mailto:$rmemail">$rmemail</a></span></td> </tr> </table>~; } elsif ($data{'submit'}) { site::validation; if (!@error) { site::create; $result = $addpage; } else { $result = site::form; } } else { $data{'entryURL'} = 'http://'; $data{'codeURL'} = 'http://'; $data{'routine'} = 'New site'; $result = site::form; } } $pagetitle = 'Add new site'; gentools::adminhtml; sub selectform { gentools::ringselect; $result = qq~@error <form method="post" action="$cgiURL/$action"> <p>Ring ID<br /> $ringselect</p> <p><input type="submit" value="Get form" /></p> </form>~; }