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

Link Verifying & LWP

Quote Reply
Link Verifying & LWP
Link verifying is a feature I could really use, but my server doesn't have the LWP module installed, and I don't have root access. I really need to use this feature, though, and I thought that I could run it on my computer.

I have Apache 1.3 & Perl for Win32 installed on my Win95 computer (w/ 28.8 modem), and am sure I could get Links working with no problems. However, I have no idea how to install a Perl module on a Windows computer. Any advice?

Thanks.
Quote Reply
Re: Link Verifying & LWP In reply to
Go to:

http://activestate.com

and download ActivePerl 508. It has all the modules built in for you. There's also a FAQ on how to set up apache to run perl scripts if you are curious:

http://www.activestate.com/...2/perlwin32faq6.html

Cheers,

Alex
Quote Reply
Re: Link Verifying & LWP In reply to
Ah, thanks. I was using the old ActiveState Perl for Win32, which certainly doesn't make module installation easy.
Quote Reply
Re: Link Verifying & LWP In reply to
If you don't mind me asking How do you install Apache on Win 95? I never could get it to work right, so I finally ended up using Ohhtd, could you please help me install Apache? I have alot of mods, I want to try out on 2.0b2 but my server is offly slow and I don't like having to wait till it uploads, just changing one thing,
Thanks
Joey
Quote Reply
Re: Link Verifying & LWP In reply to
Hmm... I don't remember installing Apache very clearly, but I don't think it was too difficult. Just make sure you download a binary version, and after installing it look through httpd.conf and change anything that really needs to be changed (in the section where you have to specify your IP, 127.0.0.1 worked for me).
As for scripts, just use a ScriptAlias line to make a cgi-bin, and have a line like #!C:/Perl/bin/perl.exe at the top of your script.
Quote Reply
Re: Link Verifying & LWP In reply to
Download the Apache 1.3.3 NT version. It works just fine. Installation is as simple as any other install program... click on setup (or install) and answer a few questions.

I had it up and running in 1 minute =)

--Mark

------------------
You can reach my by ICQ at UID# 8602162

Quote Reply
Re: Link Verifying & LWP In reply to
Yes, I did this and everything works perfectly. If anyone else reading this is unable to use link verifying because they don't have the LWP module, this method was incredibly easy. Apache took about 15 minutes to set up, ActivePerl took about 5, and then copying my Links files from my server and changing the paths took another 5 minutes. I use this for manually adding links now, as the response times are considerably faster than using my server, and afterwards I just transfer the files in the data directory (with the exception of validate.db).

One thing though, it's not the NT version of Apache, it's the general Win32 version; unlike some NT-only servers like IIS, Apache works perfectly on Win95/98 as well.
Quote Reply
Re: Link Verifying & LWP In reply to
Ok a few things heres,
I had Apache setup(from the setup program) but when I runed it, a Dos box opened and then closed, is is suposed to do this?
Second,
I'm not sure if my sever has LWP or not, when I go to the admin dir, IE says the server retured an invalid reponse, I gussing that doent have the LWP installed, so I would like to do the same as elvii and run it from my computer, how do I modify it to not use LWP?
Thanks
Joey
Quote Reply
Re: Link Verifying & LWP In reply to
Well, a few things. First, Apache is a command-line program (not actually DOS, but looks like DOS), so a DOS box is normal. Run it from a DOS window and read the error message it produces before closing, that should help you fix it; most likely it's a setting in httpd.conf. You have to read through httpd.conf and change settings where appropriate before Apache will work.
Second, you can't modify the link checker to work without LWP. The whole purpose of running it on your machine is that on your machine, you have full access, and so you can install LWP. In fact, just download ActivePerl, it comes with LWP, and you can download more modules easily with ppm (I downloaded libnet, not sure if I needed to).
And the first line of your scripts has to point to your perl, with backslashes changed to forward slashes:
#!C:/Perl/bin/perl.exe
Quote Reply
Re: Link Verifying & LWP In reply to
Thanks for this reply, I guess I misread the part"If anyone else reading this is unable to
use link verifying because they don't have the LWP module" as far as that Dos like box it closes way to soon, there's know way I can read the output, Im not sure if you ever heard of Ohttd or not, but couldnt I use it instead of Apache? Its a web server and allows Perl scripts to run, as a matter a fact I didnt even haft to change #!/usr/bin/local/perl the scripts propperly exicuted, but when I tryed to build the pages , it said error building New reson illegal cariters(.)(somthing like that its been awhile since I used it on Win 95)
Thanks
Joey
Quote Reply
Re: Link Verifying & LWP In reply to
Yes, as I wrote above, if the DOS box closes too soon, run it from a DOS window (MS-DOS prompt, but from within Windows).
Quote Reply
Re: Link Verifying & LWP In reply to
Ok I ran APACHE.exe from MS Dos here's what it said
C:\Program Files\Apache Group\Apache>APACHE
httpd: cannot determine local host name.
Use the ServerName directive to set it manually.
I set the httd.conf to local host(or 127.0.0.1 what files exactly, or what varibles do I nned to change?
Thanks
Joey
Quote Reply
Re: Link Verifying & LWP In reply to
Just the ServerName one if that's the error it's giving you. In httpd.conf (in the Apache conf directory), there is a section which explains ServerName and a commented-out ServerName line. You can uncomment and change that line, or if you prefer you can just stick the line ServerName localhost anywhere in httpd.conf (well, near the top, it can't be inside a <directory> section or anything like that).
Quote Reply
Re: Link Verifying & LWP In reply to
And, to set up cgi scripts: First, add this line somewhere in httpd.conf:
AddHandler cgi-script .cgi

And, near the top of access.conf, you'll find the following:

# This should be changed to whatever you set DocumentRoot to.

<Directory "C:/Program Files/Apache/htdocs">

# This may also be "None", "All", or any combination of "Indexes",
# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".

# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.

Options Indexes FollowSymLinks

Change the Options line to the following:
Options Indexes FollowSymLinks ExecCGI

And you can now run CGI scripts in every directory within your htdocs, provided they start with the correct path to Perl.
Quote Reply
Re: Link Verifying & LWP In reply to
THANKS!!! I guess its kinda like Perl those # marks means to skip that part, anyways it working
Thanks again
Joey

[This message has been edited by Joey Bost (edited December 25, 1998).]
Quote Reply
Re: Link Verifying & LWP In reply to
Well I got the server to run, but when I try it run Links it just shows the words, Any thing else I need to chagne besiced the ones above?
Thanks
Joey
Quote Reply
Re: Link Verifying & LWP In reply to
If you did everything above, should work. Again, make sure you:
- Have Options ExecCGI on for your htdocs directory
- Have AddHandler cgi-script .cgi (actually, I think that's supposed to be in srm.conf, but it shouldn't make a difference)
- All your CGIs should have a .cgi extension
- They need the correct path to Perl, though if you had that wrong you'd get a 500 server error.

If for some reasons all that is right and it STILL doesn't work, do the following:
- Create a directory called cgi beneath the main Apache directory (not htdocs).
- Install Links into that directory, and add the following line to srm.conf:
ScriptAlias /cgi-bin/ "C:/Program Files/Apache/cgi/"
- You should be able to access that directory at http://localhost/cgi-bin/, though because it's a cgi-bin you need the trailing slash and it won't do a directory index.
Quote Reply
Re: Link Verifying & LWP In reply to
I am having the same problem, I used add.cgi as a test file and all that it does is show the code, not the output. Also, I cannot run SSI's. It says that it can't find cgi files in the cgi-bin - I had to create a dir. under htdocs called cgi-bin and that works.

Thanks for your help.


------------------
Jason
Extreme mtb
http://extreme.nas.net
Quote Reply
Re: Link Verifying & LWP In reply to
Not running SSIs is standard behaviour, look through srm.conf, there's a couple of lines you have to uncomment to run SSIs. I personally use the ScriptAlias method to make a CGI-BIN, so maybe my instructions for ExecCGI were wrong (doubt it though). Try that, it always works.
Quote Reply
Re: Link Verifying & LWP In reply to
Ok I did that and now Im getting one of those 500 error, at the bottem it said somthing about unable to span child at <script name> )I tried admin.cgi, nph-verify.cgi, nph-build.cgi,add.cgi,) All the settings in the links.cfg are right(I think I put it like C:/dir/dir/)
Thanks
Joey
Quote Reply
Re: Link Verifying & LWP In reply to
First: what exactly is the message you're receiving? Not span child sounds like you've got the wrong path to perl in the #! first line of your script. It will probably be #!C:/Perl/bin/perl.exe (possible case sensitive).

Second: good, it's working, my instructions aren't completely wrong Smile
Yes, it is slightly slow, this happens for a variety of reasons. First, you're running both a web server and browser at the same time, that slows things down. Second, Windows 95 is a TERRIBLE operating system for servers, and Apache for Win32 was designed for NT, it just happens to work on 95. There are some ways which I don't know much about to make Perl faster (FastCGI, Perl for ISAPI), but if you're just using it personally it probably isn't worth it.
I'm using it on a Pentium/166 with 32 MB of RAM, and it is even slightly faster than my server, so it isn't a big problem.
Quote Reply
Re: Link Verifying & LWP In reply to
Thanks guys for all this discussion.
I was able to run Links on my own computer, with apache and perl installed Smile, and now I'm able to run the LWP link check Smile)

However, it seems that any CGI instruction I run from my own local machine are SLOWER than when I do the same on my ISP. My own pc is a p2 400, and it always wait 2-3 seconds before starting to perform any CGI instruction.

I was wandering if there are any settings in the apache config to reduce this delay and ask the server to immediately perform and return results.

Thanks,
Paul
Quote Reply
Re: Link Verifying & LWP In reply to
Ok, I got everything to work, your instructions was partly right, you haft to remove the # sign in srm.conf under add handler,
Thanks
Joey
Quote Reply
Re: Link Verifying & LWP In reply to
Hi Paul,

I'd also check that you have no domain name references. For instance if your html is looking for a background image on an internet server, it seems like it's taking a long time as the server is doing DNS work and timing out. On a p2 400, the script should be much much faster that through your ISP (for oh so many reasons).

Cheers,

Alex
Quote Reply
Re: Link Verifying & LWP In reply to
Yes, in Apache config files, like in Perl and many other files, the # sign at the beginning of the line means it's a comment, and ignored by the program/interpreter. In the Apache files, lines you may want to use are there and commented, you have to uncomment them for them to take effect.