Question
I get a
Premature end of script headers: preview, referer: http://hornbeam/twiki/bin/edit/Sandbox/PaulRyanTest?t=1089908766
error when I try to preview changes I've made to a page. I think it's a conflict with a plugin, because it seems to view,edit,prieview fine when I disable them all. However, I am running another server with all the same plugins installed and it doesn't have the same problem.
Also I ran the testenv and everything appears in place.
SERVER_SOFTWARE Apache/2.0.49 (Unix) mod_perl/1.99_13 Perl/v5.8.0
CGI Setup:
Operating system: Unix (linux)
Perl version: 5.8.0
@INC library path: /home/httpd/twiki/lib
/usr/lib/perl5/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0
/usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/5.8.0
.
Note: This is the Perl library path, used to load TWiki modules, third-party modules used by some plugins, and Perl built-in modules.
TWiki module in @INC path:
OK, TWiki.pm found (TWiki version: 01 Feb 2003)
Required Perl modules:
CGI (2.89)
CGI::Carp (1.24)
File::Copy (2.05)
Optional Perl modules:
Algorithm::Diff (1.01)
MIME::Base64 (2.12)
POSIX (1.05)
Thanks in advance for the help
Environment
| TWiki version: |
TWikiRelease01Feb2003 |
| TWiki plugins: |
DefaultPlugin, EmptyPlugin, InterwikiPlugin, DefaultPlugin, TWikiDrawPlugin, EditInTablePlugin, EditTablePlugin, GaugePlugin, InterwikiPlugin, SlideShowPlugin, SpreadSheetPlugin, TablePlugin |
| Server OS: |
Red Hat 9.0, kernel 2.4.20-8 |
| Web server: |
Apache 2.0.49 |
| Perl version: |
5.8.0 |
| Client OS: |
MS Windows XP, SP1 |
| Web Browser: |
MS IE 6 |
--
PaulRyan - 15 Jul 2004
Answer
You may have already checked this but more than once I've found that "Premature end of script headers" problems were simply the result of scripts not having permission to execute. - so just confirm that the preview script in bin directory is has permission to execute.
--
LynnwoodBrown - 15 Jul 2004
Thank you for the reply. Yes, preview has the correct permissions nobody:nobody (755). I've noticed that I sometimes get the error when trying to view also. For example I will edit something, hit preview and that will work, but then I click save and it errors out with the same error. Observe:
Premature end of script headers: view, referer: http://hornbeam/twiki/bin/view/Main/PaulRyan
By the way, these errors are being extracted from the Apache error_log. I was getting a 500 Internal Server Error in the actual browser window.
--
PaulRyan - 15 Jul 2004
Hrmm...still haven't figured it out, but here's one more piece of information I've run across. If I set a link in
Main.PaulRyan to go to
Sandbox.PaulRyanTest it doesn't work (I get the 500 Server Error). However, if I click on the Sandbox web, then in the "GO" field I type PaulRyanTest it displays the page. And when I go the second route, I'm able to edit, preview, and save just fine...
--
PaulRyan - 20 Jul 2004
As I'm still having issues with this, I'll continue updating this page with things I find out.
Now, in the page I could not even view I had the
GaugePlugin as one of the first things. I disabled all the plugins, was able to view, edit, preview and save that page. When I re-enabled the plugins and tried to paste the gauge plugin code back in to test it (in the middle or the bottom), it again failed when trying to preview. This time the error_log said
preview: Undefined subroutine &TWiki::Plugins::SpreadSheetPlugin::commonTagsHandler called at /home/httpd/twiki/lib/TWiki/Plugins.pm line 171.
[Mon Aug 9 12:42:06 2004] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers: /home/httpd/twiki/bin/preview
I read in
GaugeAndSpreadSheetPluginsProblem that the order of the Plugins actually makes a difference. I'll try changing the order of the Plugins and update this topic with the results.
--
PaulRyan - 09 Aug 2004
A long troubleshooting period on Mac OSX finally led to resolution of this error by finding a missing semi-colon in the TWiki.cfg file on the line $defaultUrlHost = "http://youname-here.local/~username/";
So that is one more reason not yet reported for this error.
--
StephenPribut - 29 Nov 2004