Perl Error When Reading Localsite.c
Hi, I'm installing Twiki on MS 2003 server. And I have some problems: 1- When I try to run http://127.0.0.1:3000/bin/view.pl I get: Perl error when reading LocalSite.cfg: Please inform the site admin. BEGIN failed--compilation aborted at /cygdrive/f/twiki/lib/TWiki.pm line 467. Compilation failed in require at /cygdrive/f/twiki/lib/TWiki/UI.pm line 34. Compilation failed in require at F:\twiki\bin\view.pl line 30. BEGIN failed--compilation aborted at F:\twiki\bin\view.pl line 30. I know I should do some changes to that file from some cookbooks but I cannot find the file to do it. I think I should first run configure.pl but when running that I get: "The specified CGI application misbehaved by not returning a complete set of HTTP headers." I tried to find something from the available questions here but didn't get a clear picture of how to solve this. I would appreciate any help. Regards -- LucGarcia - 19 Mar 2009 Discussion and Answer - Update 1: I got the LocalSite.cfg from the net and edited it. Now I'm having the "The specified CGI application misbehaved by not returning a complete set of HTTP headers." problem with both the view.pl or configure.pl Any hints appreciated. Regards -- LucGarcia - 19 Mar 2009 You should run /bin/configure first. It will create that file and help you set it up for your own environment. -- SeanCMorgan - 19 Mar 2009 Thanks Sean, Yeah I've tried that but configure.pl also gives the "The specified CGI application misbehaved by not returning a complete set of HTTP headers." I can run it from command line with perl /twiki/bin/configure.pl and that prints the html but with the browser I get the headers error. Considering to try on Ubuntu already.... But I'll try if there's any suggestions. Thanks. -- LucGarcia - 19 Mar 2009 Change status to: Asked question Answered question Closed unanswered If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box. SupportForm Status Answered Title Where is LocalSite.cfg ? SupportCategory CategoryInstallation TWiki version 4.2.4 Server OS MS Windows Server 2003 Web server IIS 6 Perl version 5.10.0 Edit|Attach|Watch|Print version|History: r3 Blog Extensions Documentation Community Development Tasks Download Support You are here: Foswiki>Tasks Web>Item1829 (08 Sep 2010, KennethLavrsen)Edit Attach Item1829: Configure shouldn't crash if there is no LocalSite.cfg Priority: Urgent Current State: Closed Released In: 1.0.10, 1.1.0 Target Release: patch Applies To: Engine Component: Branches: Reported By: RaulFRodriguez Waiting For: Last Change By: KennethLavrsen Using Foswiki 1.0.6, on a Linux Debian, with Apache 2.2.3, with all the lib/DEPENDENCIES installed except Win32::Console 1. Follow http://www.twiki.org/cgi-bin/view/Support/SID-00203 the installation instructions at http://foswiki.org/System/InstallationGuide up to the point you have to configure Apache Use the Apache Config Generator at http://foswiki.org/Support/ApacheConfigGenerator Configure it to require that an authorised user has to authenticate to access the configure script Use it with the following settings: http://foswiki.org/Support/ApacheConfigGenerator?vhost=&port=&dir=%2Fvar%2Fwww%2Ffoswiki&pathurl=%2Ffoswiki&shorterurls=enabled&engine=CGI&fastcgimodule=fastcgi&apver=2&allowconf=&requireconf=raul&loginmanager=Template&htpath=%2Fvar%2Fwww%2Ffoswiki%2Fdata&errordocument=UserRegistration&errorcustom=&phpinstalled=PHP4&blockpubhtml=on&blocktrashpub=on&controlattach=on&blockspiders=on#HighLight (replace "raul" with any https://foswiki.org/Tasks/Item1829 other user to suit your installation) create the .htpasswd file for that user as directed by the documentation install the Apache .conf file, restart Apache, and point browser to http://host/foswiki/bin/configure you get the following error message : Software error: Content-type: text/plain Perl error when reading LocalSite.cfg: Please inform the site admin. at /usr/share/perl/5.8/CGI/Carp.pm line 356 CGI::Carp::realdie('Content-type: text/plain\x{a}\x{a}Perl error when reading LocalSite.c...') called at /usr/share/perl/5.8/CGI/Carp.pm line 437 CGI::Carp::die('Content-type: text/plain\x{a}\x{a}Perl error when reading LocalSite.c...') called at /var/www/foswiki/lib/Foswiki/Configure/Load.pm line 56 Foswiki::Configure::Load::readConfig() called at /var/www/foswiki/lib/Foswiki.pm line 269 Foswiki::BEGIN() called at LocalSite.cfg line 498 eval {...} called at LocalSite.cfg line 498 require Foswiki.pm called at /var/www/foswiki/bin/view line 43 main::BEGIN() called at LocalSite.cfg line 498 eval {...} called at LocalSite.cfg line 498 BEGIN failed--compilation aborted at /var/www/foswiki/lib/Foswiki.pm line 498. at /var/www/foswiki/lib/Foswiki.pm line 498 require Foswiki.pm called at /var/www/foswiki/bin/view line 43 main::BEGIN() called at /var/www/foswiki/lib/Foswiki.pm line 498 here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more http://stackoverflow.com/questions/22307610/end-of-script-output-before-headers-error-in-apache about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack https://github.com/SvenDowideit/foswiki_releases/blob/master/Foswiki-1.0.9/lib/Foswiki/Configure/Load.pm Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up “End of script output before headers” error in Apache up vote 9 perl error down vote favorite 3 Apache on Windows gives me the following error when I try to access my Perl script: Server error! The server encountered an internal error and was unable to complete your request. Error message: End of script output before headers: sample.pl If you think this is a server error, please contact the webmaster. Error 500 localhost Apache/2.4.4 (Win32) OpenSSL/1.0.1e PHP/5.5.3 this is my sample script #!"C:\xampp\perl\bin\perl.exe" perl error when print "Hello World"; but not working on browser apache perl share|improve this question edited Mar 10 '14 at 18:06 asked Mar 10 '14 at 17:50 user3367242 62117 Edit your question to include the contents of the Perl script itself. Also, please use code formatting to make it easier to read. Simply highlight the block you want to format and click the {} at the top of the edit box. –ThisSuitIsBlackNot Mar 10 '14 at 17:54 Read your error log to see the real error. Since you've shown us no code, no one is going to be able to help you. –geoffspear Mar 10 '14 at 17:54 Hi guys sorry for my bad english and question and im newbie in cgi and perl when I run perl script I got an error 500 internal this is my sample script #!"C:\xampp\perl\bin\perl.exe" print "Hello World"; but not working on browser –user3367242 Mar 10 '14 at 18:01 @user3367242 Please don't post your code as a comment, that's very difficult to read. Instead, edit it into your question. –ThisSuitIsBlackNot Mar 10 '14 at 18:02 stackoverflow.com/questions/2165022/… –brian d foy Jan 6 '15 at 9:40 add a comment| 7 Answers 7 active Sign in Pricing Blog Support Search GitHub This repository Watch 1 Star 1 Fork 0 SvenDowideit/foswiki_releases Code Issues 0 Pull requests 0 Projects 0 Pulse Graphs Permalink Branch: master Switch branches/tags Branches Tags master Nothing to show 1.1.4 1.1.3 1.1.2 1.1.1 1.1.0 1.0.10 1.0.9 1.0.8 1.0.7 1.0.6 1.0.5 1.0.4 1.0.3 1.0.2 1.0.1 1.0.0 Nothing to show Find file Copy path foswiki_releases/Foswiki-1.0.9/lib/Foswiki/Configure/Load.pm Fetching contributors… Cannot retrieve contributors at this time Raw Blame History 255 lines (203 sloc) 8.06 KB # See bottom of file for license and copyright information =begin TML ---+ package Foswiki::Configure::Load ---++ Purpose This module consists of just a single subroutine =readConfig=. It allows to safely modify configuration variables _for one single run_ without affecting normal Foswiki operation. =cut package Foswiki::Configure::Load; our $TRUE = 1; =begin TML ---++ StaticMethod readConfig() In normal Foswiki operations as a web server this routine is called by the =BEGIN= block of =Foswiki.pm=. However, when benchmarking/debugging it can be replaced by custom code which sets the configuration hash. To prevent us from overriding the custom code again, we use an "unconfigurable" key =$cfg{ConfigurationFinished}= as an indicator. Note that this method is called by Foswiki and configure, and *only* reads Foswiki.spec= to get defaults. Other spec files (those for extensions) are *not* read. The assumption is that =configure= will be run when an extension is installed, and that will add the config values to LocalSite.cfg, so no defaults are needed. Foswiki.spec is still read because so much of the core code doesn't provide defaults, and it would be silly to have them in two places anyway. =cut sub readConfig { return if $Foswiki::cfg{Con