[Home]UseModWiki/InstallWindows

UseModWiki | UseModWiki | RecentChanges | Preferences

Installing UseModWiki in Windows

UseModWiki has been tested on Windows 98, Windows NT 4, Windows 2000 Server, and Windows XP Professional using the ApacheHTTPServer.

Some of the features require a current Perl release based on Perl 5.6 (Activestate build 618 or later). Visit the [ActivePerl page] to download Perl. (The download link is in the top-right corner of the page.)

The current distribution of ActivePerl is Build 816 (Perl 5.8.x), and I have problems with it, at least when using ritlabs tiny web server. See UserHelp. Build 815 (Perl 5.6.x) also available on the same page, works fine - KrishnaSuresh?

Preliminary notes for Win32

Possible ZoneAlarm? issue with Apache on Windows

I was a bit put off installing Apache on my Windows box as Apache specifically say "don't run this with (possible BlueScreenOfDeath!) or software personal firewalls in general". (OK that's not an exact quote, but it's what they say). As it happens I run ZoneAlarm? and it's currently the only firewall I got. I chose the TinyWeb option suggested by MichaelKollak on the /WhyAnotherWiki page. The steps for TinyWeb I've added in the Other Webservers section below as they took me a little while to figure out.

Edit the "wiki.pl" script

if properly installed, #!perl is all you need
Add ScriptInterpreterSource registry in the entry for the cgi-bin directory in httpd.conf and there will be no need to modify the shebang -- SvennBjerkem
I found that I had better response times when specifing the path in full. Thoughts anyone? - [Travis]
If you install Activestate Perl to C:\usr instead of the default C:\Perl, standard #!/usr/bin/perl shebang will work (as long as Apache is also on the C: drive). - Stoffe

Troubleshooting


Can anyone help with this please? I posted months ago and still haven't solved the problem. (The UserHelp page is for questions such as yours. I suggest that you try copying your questions there. Anyway, based on the (quite minimal) information that you give below, I would guess that perl is running in taint mode (-T switch). Usemod does not work in taint mode, so you might want to disable that. -- UngarPeter)

I can view the main wiki page but whenever I press 'Save' I get the following message:

Software error:

Insecure dependency in open while running with -T switch at D:/services/wiki.cgi line 2839.

For help, please send mail to the webmaster (email address), giving this error message and the time and date of the error.

I've noticed the data directory is 'readonly', i've tried unticking this but it instantly turns back to readonly - maybe this is meant to happen - i dont know much about apache etc.

any help would be greatly appreciated


I've installed everything like it should to. ActivePerl, Apache, and put everything where it should be. I get error 500 (Internal Server Error), just like if I install it on a hosting service. What am I doing wrong? Thx Already!
---
I got the same problem, my mistake was not editing wiki.pl header line to point to where perl is installed e.g. #!c:/perl/bin/perl

---
FR: Similar issue here. I resolved it by including the name of the Perl executable in my shebancg line: C:/Perl?/bin/perl.exe


All links give error: After installing and successfully accessing the home page via http://localhost:8080/cgi-bin/wiki.pl, if the page shows up correctly but all the links on the page have an extra "/cgi-bin" in its path,(eg select EditPage? and the link is http://localhost:8080/cgi-bin/cgi-bin/wiki.pl?action=edit&id=HomePage - it should have actually been http://localhost:8080/cgi-bin/wiki.pl?action=edit&id=HomePage) the solution is to edit the wiki.pl and change the line:

$ScriptName = pop(@ScriptPath);  # Name used in links
to
$ScriptName = "wiki.pl";  # Name used in links

This fixes the problem. -- SanjayBhat [Thank You CliffordAdams]


  APACHE.EXE: cannot determine local host name.
  Use the ServerName directive to set it manually.

ServerName localhost


[Todo: improve instructions above.]

I've had some trouble with this one also. It's will get really mixed up if you work with two browsers on both pages at the same time... -- HansDonner
You can make WindowsNT? or Windows2000 respect case by enabling Posix, but this only works if you're using the NTFS filesystem.


Trouble with Upload-function When one uploads a file it's getting modified. It looks like someone inserts an additional CR/LF after every line. As a result images get corrupt. All files are larger on the server side after the upload.

Has somebody else experienced this / can someone explain?

Found a solution [1] thanks to (-EricLiao)


Instructions for Web servers other than Apache

UseMod works on Windows NT 4.0 SP 5 and both Microsoft Internet Information Server 4.0 and Sambar Server 4.3 provided the current Perl release (Activestate build 618) is installed and the cgi-bin has the proper association for *.pl.

Note that the 600 series of Activestate Perl cannot be installed on top of a 500 series. At least that's in the release instructions that are offered after (!) installation of build 618 (so actually I'd to deinstall again and reinstall using a different directory).

Even though Activestate installation procedure is supposed to configure MS IIS doublecheck using the MS Management Console that on the cgi-bin directory the proper association for *.pl is configured. This is done as follows: right-mouse click on (virtual) directory: Properties; on Directory tab, Application Settings with Execute (including script) permissions, plus pressing Configuration button (might require first pressing Create button if Configuration is greyed out) create or edit an Application Mapping for Extension .pl, Executable <full path to your perl>\bin\perl.exe %s %s, Script engine unchecked, Check that file exists checked. Apply your changes.

We also had to click on "Web Service Extensions" in the left panel of the IIS Manager and change the Perl extensions from "Prohibit" to "Allow" before the web page would run the wiki.pl script.

On Sambar just enter the correct path to the Perl executable in config.ini.


I Installed it on W2K SP3 and IIS5 I had to check the check box ScriptEngine? for perl. Before i didn't work, after it works.


When I installed it on W2k, IIS5, Perl 5.8.0, UseMod 1.0, I would have found the following notes helpful (probably because I'm relatively inexperienced at all this): (JTS 2005-Nov-18)

([PKM] 2006-Mar-09) I found this note helpful. Installed on Win2003 Server IIS 6, Perl 5.8.7.815. Install was easy. However, can't get Windmail working. Any info. would be appreciated. Thanks UseModWiki, nice job.


For the TinyWeb option

(this assumes you have already installed latest version of free ActivePerl)

If anybody has any problems with the steps above please comment or query here.


Diff for Windows

See /DiffForWindows.
2001-06-14: What are people using for sendmail?

2002-04-15: I am using [BLAT!] on a Windows NT4 server. It works really well, and there are perl scripts that can be modified for use with UseMod quite easily (which is what I have done). I got the perl script I modified from [here] - I used the first example.

I would post sample code, but it's a mess, and is set up specifically for use with our internal Lotus Notes server - just check out the Blat site! - [Trav]

2002-05-31: I've been blatting as well. This terse sample code should get one into the ballpark. It is a drop-in replacement for sub SendEmail. Don't forget to blat -install ! - [bb]

 sub SendEmailUsingBlat {
  my ($to, $from, $reply, $subject, $message) = @_;
  my ($tempfile);
  $tempfile = "/temp/wikimail.txt";   # could do something more robust here
  open (TEMP, ">$tempfile") or die "Can't open temp mail file\n";
  print TEMP "$message";
  close TEMP;
  # blat instructions:  DO: 'blat -install servername username'  FIRST!!!!
  `$SendMail $tempfile -to \"$to\" -s \"$subject\" -i \"$from\" -replyto \"$reply\"`;
  unlink($tempfile);
}

If you can't get Blat installed (running on a hosting service for example) get them to add the sender::email module. Then change the SendEmail code as follows:
# Send an email message.
sub SendEmail {
  my ($to, $from, $reply, $subject, $message) = @_;

$wikimsg = new Mail::Sender {smtp => 'yoursmtpserver.com', from => 'friendlyname <emailaddress@yourdomain.com>'}
	or die "cannot open connection\n";
$wikimsg->MailMsg({to => $to,
	subject => $subject,
	msg => $message,
	auth => 'LOGIN',
	authid => 'authorizedsmtpuser@yourdomain.com',
	authpwd => 'password'});
}
You'll need to add use mail::sender and declare wikimsg at the top of wiki.pl

2002-04-12: Seem to be having problems getting a lock directory under Apache1.3.24/Win95. The functions appear to work fine running a test script at the command line (cygwin), but not through Apache, suggesting it is something to do with access control. What Options do I need to set in the <Directory $DataDir> and/or <Directory cgi-bin> sections of httpd.conf? Or am I missing something obvious?

It was something obvious! Forgot to set $ENV{PATH} to the appropriate cygwin windows path

2002-05-01: Question: ActivePerl and Apache 2.0.35 running in XP. I get a perl.exe DOS-windows each time a press a link. Does the perl interpreter really have to open up a DOS-window for each call??

Answer: ActivePerl has 'wperl.exe' which runs perl scripts W/O opening a console and works fine with Apache. I used it by changing the shebang line on my scripts, but there may be other ways. -- David Claughton


New Question. My Usewmod wiki worked very well on my Win98/Apache? setup. However when I trie to put ot my ISP (NT , IIS, ActiveState? Perl 522 ) it simply does not work. I have checked path settings etc and they seem alright. I always get a single letter 0 when I try to open the wiki.pl and no content. Any answers ?

TIA. -- Shikhar


Problems with IIS: Running Usemod 1.0 wiki with Windows XP Pro, and IIS v5.1, and ActiveState? Perl 5.8.0. I am just setting this up for use on my local machine. I set wiki.pl in c:\inetpub\wwwroot\perl\wiki. I set
    $DataDir = "c:/inetpub/wwwroot/perl/wiki/data";

When I go to http://127.0.0.1/perl/wiki.pl I get:

   Could not create c:/inetpub/wwwroot/perl/wiki/data: No such file or directory

I also tried with double backslashes, and I got this:

   Could not create C:\inetpub\wwwroot\perl\wiki\data: No such file or directory

If I go to the dos prompt and run perl wiki.pl then everything works, I get some HTML, and the data directory is created! After this, (or if I create the data directory manually), then I get the home page for the wiki in the browser just fine.

But, if I attempt to edit the home page, and then hit save, the program croaks with this error:

  Software error:
    cant write c:/inetpub/wwwroot/perl/wiki/data/page/H/HomePage?.db: No such file or directory at c:\inetpub\wwwroot\perl\wiki\wiki.pl line 2842.

  For help, please send mail to this site's webmaster, giving this error message and the time and date of the error. 

  [Wed Jan 21 21:46:47 2004] wiki.pl: cant write c:/inetpub/wwwroot/perl/wiki/data/page/H/HomePage?.db: No such file or directory at c:\inetpub\wwwroot\perl\wiki\wiki.pl line 2842. 

Looks like maybe the CreateDir command is failing somehow? - Garnet

Answer: Do not place the data directory anywhere within c:\inetpub. The mkdir is failing with permission denied. Setting $DataDir to something like c:/wikidata seems to work fine. - Garnet

Installing UseMod with OmniHTTPd and ActivePerl

This is actually quite simple with ActivePerl, so these instructions should be relatively short. Download ActivePerl and OmniHTTPd from their respective sites. It ought not matter what version of either you download, though I use [OmniHTTPd version 2.09]. Install ActivePerl to whereever you wish.

Then go to Admin -> Properties -> Add ... type in your preferred server name there (this is so you can save settings, essentially). This is actually not really necessary, but you may want to change some other settings. After you do this, go to Web Server Global Settings -> External. Edit the .cgi and .pl extensions to point to perl.exe (in your \ActivePerl\bin folder). Copy wiki.pl to your /cgi-bin directory, and that's really all there is to it. :)

Clarification
At the beginning of the page, there are the following insructions:
  1. set UseDiff=0 (unless you have diff - see /DiffForWindows)
  2. Set $DataDir to a directory on your system.
  3. set $FullUrl to the full url of your wiki service

These refer to values inside the file wiki.pl.


Is there any way to get ActivePerl without having to buy it? --MeatBall:JonasDaltonRand

Yes, here: http://www.activestate.com/store/productdetail.aspx?prdGuid=81fbce82-6bd5-49bc-a915-08d58c2648ca
it's free download if you don't want DVD.
--JuanmaMP

Can't get this to work on XAMPP

I've tried to get this to work on XAMPP, and it doesn't work!! --::MerseysideUser?
Same for me. Every time I try to get it to work on Xampp, I get the following error:
The server encountered an internal error and was unable to complete your request.

Error message: Premature end of script headers: wiki.pl

If you think this is a server error, please contact the webmaster.

--DagothUrMadGod


UseModWiki | UseModWiki | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited November 6, 2023 8:06 pm by MarkusLude (diff)
Search: