Tags:
create new tag
view all tags

Question

After installing PublishAddOn, when I attempt to generate a ZIP file I receive the following error:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, name@mail.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


Apache/1.3.34 Server at http://127.0.0.1/Port 80

Background Information

Here is background information on my installation.

Installation File Structure

  • Apache is installed on c:/Apache
  • Cygwin is installed on c:/cygwin
  • TWiki is installed on c:/twiki

Note: As you can see from the error message above, I am using the loopback address. Client PCs on our corporate intranet can access our TWiki site with the URL http://twiki/bin/view ("twiki" is also the name of the PC)

PublishAddOn.zip File Version

This is the version of PublishAddOn that I installed.

  • Version 1.7
  • File date 28 Apr 2005

Archive::Zip and Compress::Zlib ARE INSTALLED

I ran a module installation on each of these just to make sure they were installed. They report as being installed and current.

TWikiPreferences Configuration

I'm confused about the exact settings that need to be added to TWikiPreferences. The Settings section in the PublishAddOn topic state that you only need to add these:

  • Name of the perl package
    • Set STUB = TWiki::Contrib::Publish
  • Short description
    • Set SHORTDESCRIPTION = Generate static HTML for a TWiki Web

I added these exact settings in my TWikiPreferences topic and still received the reported error. After running a search on the Support web here, I found a topic (see PublishAddOnComplainsAboutConfigurationError), which mentions adding these two settings to TWikiPreferences:

    • Set PUBLISH_DIR = /var/www/twiki/publish
    • Set PUBLISH_URL_PATH = var/www/twiki/publish

Based on this information, I added these settings to my TWikiPreferences topic in addition to the STUB and SHORTDESCRIPTION settings:

    • Set PUBLISH_DIR = c:/twiki/pub/Manuals
    • Set PUBLISH_URL_PATH = http://twiki/pub/Manuals

First, what are the settings?

Second, what are the values?

File Configuration and Modifications

I would appreciate it if someone could please tell me exactly what files and topics need edited or configured based on the configuration of my TWiki installation.

  • data/TWiki/PublishAddOn.txt: this is just the topic; I don't believe anything needs modified.
  • data/TWiki/PublishWeb.txt: this is just the topic; I don't believe anything needs modified.
  • data/TWiki/TWiki.TWikiPreferences: what settings need to be added?
    • Please give the actual (or for my install specific paths, an example of the value to enter for each).
    • Do I need to specify the drive letter in paths?
    • For URL paths, because I use the loopback address does it matter whether I use http://127.0.0.1/... or http://twiki/... as the "beginning" of the URL path?
  • lib/TWiki.cfg: does this file need to be configured? I stumbled across a topic on TWiki.org (see PublishAddOnDev) that mentioned configuring some values in it.
    • E.g., $publishDir and $publishUrlPath
  • lib/TWiki/Contrib/Publish.pm: are there any file paths or URL paths or anything else that needs modified/specified in this file?
  • lib/TWiki/Contrib/PublishAddOn/Build.pl: are there any file paths or URL paths or anything else that needs modified/specified in this file?
    • I don't see anything in this file that would appear to require modification.
  • lib/TWiki/Contrib/PublishAddOn/PublishAddOn.cfg: I see this records the values I entered when I ran the perl PublishAddOn_installer.pl script.
    • What are the settings in this file used for? Are they just used to set the location in which the created ZIP file is placed or is there some other use for this setting?
    • Does the $PUBLISH_DIR setting need to include the drive letter?
    • What is the correct format to use for the value of the $PUBLISH_URL setting?
  • bin/publish: if I run the script from Cygwin it generates the following in the Cygwin user interface, but I can't find any ZIP file (ran a search on *.zip on my C: drive, including hidden and system folders and no other disk drive is installed on this machine):

Status: 302 Moved

Set-Cookie: CGISESSID=308b17aef7cd0b07b2bba9ab25a2b343; path=/

Date: Wed, 15 Feb 2006 20:06:34 GMT

Location: http://127.0.0.1/bin/view/TWiki/PublishAddOn?CGISESSID=308b17aef7cd0b0

7b2bba9ab25a2b343&publishweb=Main&publishtopic=WebHome

File Attachments

I attached the files from my installation in case someone knows what to look for and wants to browse them.

Environment

TWiki version: TWikiRelease04Sep2004
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Windows XP Professional Service Pack 1
Web server: Apache 1.3.34 (Win32)
Perl version: 5.8.7-5 (Cygwin)
Client OS: Windows XP Professional Service Pack 2
Web Browser: Internet Explorer 6.0
Categories: Add-Ons

-- JasonVensel - 15 Feb 2006

Answer

Adjust the perl path in the publish script to match your perl installation location.

I figured it out!

During the process of installing the GenPDFAddOn, I got to the step that requires you to Adjust the perl path in the genpdf script to match your perl installation location.

  • I am not a developer or much of a technical person so I wasn't sure exactly what to enter. For this reason, I opened some of the standard TWiki perl scripts like Search, Save, Manage, etc.
  • In comparing the text of those scripts, I noticed they all had the exact same line at the very top (which appeared to be the path for my perl installation). Now, I always thought that by placing a "#" at the very beginning of a line, anything that followed was commented out, meaning the TWiki application would not process/read that line. Now, I believe that commenting out a line may require a "# " (the pound sign and a space); at the very least, it seems that "#!" does NOT comment out a line.
  • Anyway, after viewing the standard perl scripts, I opened the publish script with the Programmer’s File Editor GUI.
  • The script is located in /twiki/bin.
  • I then changed the very first (top) line of the file from

#!/usr/bin/perl -wI.

-to-

#!c:/cygwin/bin/perl -wT

  • I made this change after looking at the path that was set in each of the standard perl scripts (Save, Manage, Search, etc.).
  • I made no other changes, closed the file, and saved the change.
  • I went to the PublishAddOn topic in my TWiki site and attempted to run the included publish function. It ran successfully and generated the zip file.
  • The generated zip file was placed in /twiki/pub/webname (where webname is Manuals).

I still want to play around with this function after I get the GenPDFAddOn installed in working (I'm in the middle of that right now), but I'm going to add the following line to the installation instructions for the PublishAddOn topic located here

The added line is:

Adjust the perl path in the publish script to match your perl installation location.

-- JasonVensel - 16 Feb 2006

Topic attachments
I Attachment History Action Size Date Who Comment
Perl source code filepm Publish.pm r1 manage 13.1 K 2006-02-15 - 21:25 UnknownUser Publish.pm file
Unknown file formatcfg PublishAddOn.cfg r1 manage 0.2 K 2006-02-15 - 21:26 UnknownUser PublishAddOn.cfg file
Unknown file formatcfg TWiki.cfg r1 manage 23.1 K 2006-02-15 - 21:24 UnknownUser TWiki.cfg file
Texttxt build.pl.txt r1 manage 1.1 K 2006-02-15 - 21:25 UnknownUser Build.pl file
Unknown file formatext publish r1 manage 1.3 K 2006-02-15 - 21:26 UnknownUser Publish file
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2006-02-16 - JasonVensel
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.