Gossamer Forum
Home : Products : Links 2.0 : Installation -- Windows :

Solution for Win2000 and IIS 5.0 and Active Perl

Quote Reply
Solution for Win2000 and IIS 5.0 and Active Perl
Hi,

I managed to install links 2.0 on a windows 2000 server running IIS 5.0 and ActivePerl. What a huge head ache it was.
Before I begin I should say, if you have the option to intall on a UNIX machine you will save yourself hours.

Here is what I did to make it work, (I hope I don't leave anything out) I used a search and replace program to do all the changes below, otherwise it would be impossible. I used BBedit on the mac.

- I found another program that was running perl on the server and simply copied that path to perl and added it in all the files. I used "#!c:\program files\perl\bin\perl.exe"

- i renamed all the files that were .cgi to .pl so that active perl could read them properly. i don't know why this works, but it does. i also had to do a huge search and replace in all the code to change every occurance of .cgi to .pl

- I changed the link.cfg file accordingly and had to use double back slashes becuase perl thinks you are excaping the character. Now maybe there is a way to turn this off in Perl but I don't have access to the server. here is what I used: "D:\\mysite\\cgi-bin\\links\\admin" for the $db_script_path.

- keeping with this idea i had to change every single hard reference to the path to \\ instead of /. There were over 200+ changes in multiple files. For example, "$db_script_path/data/links.db" had to change to "$db_script_path\\data\\links.db".

- Everything seemed to work at that point except builds would stall at what's new. So I manually created the New, Cool and Ratings directory in the pages directery. Then I commented out (by adding a #) this code in each of the new, cool and ratings subroutines:
if ($build_new_path =~ m,^$build_root_path\\(.*)$,) {
&build_dir ($1);
}

- i am still having some problems with deleting files but I think changing the permissions might help. Otherwise links works like a charm.

Best of luch to you all.

By the way, never use the installers dotmatrix.

-Deryk (the hard way)

Quote Reply
Re: Solution for Win2000 and IIS 5.0 and Active Perl In reply to
I forgot to mention that there is probably a much better way to get it working than taking the route I took. I'm sure there must be a way for Perl to read .cgi files. and I'm sure there is a way for perl to understand the forward slash / instead of using two backslashes \\. Maybe the more experienced people on the board have some insight.

ciao

Quote Reply
Re: Solution for Win2000 and IIS 5.0 and Active Perl In reply to
In Reply To:
I'm sure there must be a way for Perl to read .cgi files
Yes...there is...in the MIME mapping, you need to specify .cgi in the same manner that you did for .pl.

Also, if you use perl.exe versus perl.DLL, you should be able to use the same directory slash path structure as UNIX.

Regards,

Eliot Lee

Quote Reply
Re: Solution for Win2000 and IIS 5.0 and Active Perl In reply to
I have installed links 2.0 on Unix now and works fine (I have a search engine). but I need to move this site to another server (windows 2000).
Ive installed all the scripts fine, Ive renamed the script as .pl etc..
and all works fine.. , I can add categories, links, etc.
but when I press in "Build All" appears the following error and I dont know where is the error:-(

Building What's Cool Page . . .

CGI ERROR
==========================================
Error Message : fatal error: Can't find unicode character property definition via main->a or a.pl at unicode/Is/a.pl line 0

Script Location : d:\websites\adn-netcomar\cgi-bin\links\admin\nph-build.pl
Perl Version : 5.006


Can anybody help me please?

Many thanks in advance
Regards
Fabian

Quote Reply
Re: Solution for Win2000 and IIS 5.0 and Active Perl In reply to
Hi Guys, can someone provide instructions to create a MIME for CGI in Windows 2000. This is deeply appreciated.

Thanks

Quote Reply
Re: Solution for Win2000 and IIS 5.0 and Active Perl In reply to
I have not altered the script after transferring from WinNT to Win2k server. Naturally I had to alter the path. I was unable to open the database (error re: nph_build.cgi). I removed the data and backup material and loaded "virgin" files. Now I can bring up all the pages such as 'add categories' and 'add links' but I still can't get it to build. The error I am still getting is:
Error Message : unable to open database: . Reason:
Script Location : e:\...path\domain...\user\htdocs\cgi-bin\admin\nph-build.cgi
Perl Version : 5.00503

I have no idea about win2k but would like any suggests apart from the double back-slash. Surely, its only a matter of figuring the right syntax to open and write to database.


Quote Reply
Re: IIS 5.0 and mapping .cgi In reply to
Open website properties box under application settings select the configuration button. This will present the current mappings. Select the add button to add .cgi or the edit button to edit the .cgi current mapping. Next simply browse to the application file that will be used for .cgi and select it and your done.