CGI script error ... sendmail?

admin

Administrator
Staff member
hey folks--<br />new kid on the block here. i'm in the process of moving my site over here. it's mostly a blog at this point, driven by a guestbook script that's been modified a little. it's working fine, but i added a 'comments' feature to each post, and i can't get it to work. i keep getting 'premature end of script headers' error and i'm trying to pin down the problem.<br /><br />what i wanna know, among other things, is where is sendmail located? i don't think it's the problem but i wanna rule it out first. is there a list somewhere that details the locations of things like that (perl, etc.)? i could figure this stuff out if i had shell access, but that's another story of course <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /> <br /><br />if it turns out to be something other than sendmail, does anybody have any tips? i gotta admit, i'm working on the edge of my ability as it is, so if there' s not a simple fix, i'll probably throw in the towel. i plan to rebuild the entire site in PHP soon, so this isn't really that big a deal.<br /><br />my site is here:<br /><a href="http://www.jimmylegs.com" target="_blank">Jimmy Legs Site</a><br />(look for the 'comments []' link under each post.<br /><br />everything else has been smooth sailing!<!--content-->
Recent posts by other users have indicated that the 'premature end of script' has to do with chmod settings. In particular, if your BLOG script tells you to set your BLOG directory to CHMOD 777, you might try 755 instead.<br /><br />-kw<!--content-->
I get a Page Not Found error when I click on the comments link. I looked at the source code but don't know enough about how it is set up to help.<br /><br />If you want blog software that is stable and includes comments built in I would recommend Movable Type. It's free for non-commercial use and works great. It should be pretty simple to adapt the template you are using to MT and I've seen other MT sites with the BlogAmp add-in. <br /><br />I use MT 2.51 for several blogs and w.blogger to post when I don't feel like going into the Movable Type entry system. I can go from thinking of an idea to having it posted in a couple of minutes. (Not always a good thing. <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> )<!--content-->
I will second the <a href="http://www.movabletype.org/" target="_blank">Movable Type</a> recommendation. Though I imagine I'm probably a little biased. <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/cool.gif" style="vertical-align:middle" emoid="B)" border="0" alt="cool.gif" /><!--content-->
thanks for the replies. it's definitely not a permissions problem. i really just wanna know if there's a list of program locations somewhere. i know where perl is located from an earlier discussion. if i can be sure of sendmail's location, i can rule it out as the source of my problem. of course, once i do that i'm all out of ideas <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> <br /><br />as for MT, if i ever break down i will def get MT, it's obviously got everything anyone could think of for blogging. but i'm still obsessed with doing all the stuff myself. maybe i should petition for shell access. <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/blink.gif" style="vertical-align:middle" emoid=":blink:" border="0" alt="blink.gif" /><!--content-->
On your Cpanel you should see<br />Sendmail Path = /usr/sbin/sendmail<br />at the bottom left<!--content-->
doh! thanks. it was there all along! so at least i know that's not the problem. <br /><br />and while figuring this stuff out i discovered the problem: i left out -w.<br /><br />#!/usr/bin/perl <!--coloro:red--><span style="color:red"><!--/coloro-->-w<!--colorc--></span><!--/colorc--><br /><br />adding that switch made it work! i don't totally understand why that made it run, but i guess i won't look a gift horse in the mouth at this point. anybody know why that helped?<br /><br />thanks again for the replies. so for the time being it looks like i can stick to my homemade blog <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><!--content-->
I'm surprised to, as the -w option is used to tell Perl to issue compile-time and run-time warnings.<br />Here are some reference links:<br /><br /><a href="http://www.codebits.com/p5be/ch17.cfm" target="_blank">http://www.codebits.com/p5be/ch17.cfm</a><br /><a href="http://www.pic.ucla.edu/piclab/lang/perl/cmdlnops/" target="_blank">http://www.pic.ucla.edu/piclab/lang/perl/cmdlnops/</a><br /><br />-kw<!--content-->
i was looking through google's usenet archive and found a couple of people saying that the -w switch may help with compatibility issues. i know my code is ancient, so newer versions of Perl may have trouble with it.<!--content-->
Interesting. Thanks for the followup.<br />-kw<!--content-->
 
Back
Top