Gossamer Forum
Home : Products : Gossamer Links : Discussions :

CGI Error; Can't locate Links.pm in @INC

Quote Reply
CGI Error; Can't locate Links.pm in @INC
Hi

I've just built pages for the first time. Worked fine. "Homepage" works fine as well. But, when I try to "add" or "modify", I get a CGI error, and the same one in both cases:

CGI Error

The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:

Can't locate Links.pm in @INC (@INC contains: d:\www2\asp.stiften\cgi-bin\links/admin C:/Perl/lib C:/Perl/site/lib .)
at d:\www2\asp.stiften\cgi-bin\links\add.cgi line 17.
BEGIN failed--compilation aborted at d:\www2\asp.stiften\cgi-bin\links\add.cgi line 17.
I have checked the paths in @INC. Links.pm is located in the folder "d:\www2\asp.stiften\cgi-bin\links/admin ",
and the path to perl is C:\Perl\bin\perl.exe.


Below I've CV'd the lines from add.cgi.


15 use strict;
16 use lib 'd:\www2\asp.stiften\cgi-bin\links/admin';
17 use Links qw/$CFG/;
18 use Links::User::Add;


The question is, is there anybody who has experienced the same error message, and if so, what was the solution to the problem.

cheers

Helgi

Last edited by:

helgi: Jan 29, 2003, 5:12 AM
Quote Reply
Re: [helgi] CGI Error; Can't locate Links.pm in @INC In reply to
Is that right ???:

use lib 'd:\www2\asp.stiften\cgi-bin\links/admin'



Regards,
Manu

Shopping Portal Shop-Netz.de® | Partnerprogramme | Flugreisen & Billigflüge | KESTERMEDIA e.K. | European Affiliate Marketing Forum.
Quote Reply
Re: [ManuGermany] CGI Error; Can't locate Links.pm in @INC In reply to
Hi Manu

Have tried both / and \, because / looked odd to me in the context. The result was exactly the same both ways.

Helgi
Quote Reply
Re: [helgi] CGI Error; Can't locate Links.pm in @INC In reply to
All slashes should be forward.
Quote Reply
Re: [Paul] CGI Error; Can't locate Links.pm in @INC In reply to
All slashes changed to forward in setup.cgi, submitted succesfully, and all pages rebuilt. Manually changed in add.cgi giving the following result:

Can't locate Links.pm in @INC (@INC contains: d:/www2/asp.stiften/cgi-bin/links/admin C:/Perl/lib C:/Perl/site/lib .) at d:\www2\asp.stiften\cgi-bin\links\add.cgi line 17.BEGIN failed--compilation aborted at d:\www2\asp.stiften\cgi-bin\links\add.cgi line 17.


Helgi

Last edited by:

helgi: Jan 29, 2003, 6:02 AM
Quote Reply
Re: [helgi] CGI Error; Can't locate Links.pm in @INC In reply to
Does Links.pm exist in the d:/www2/asp.stiften/cgi-bin/links/admin folder?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] CGI Error; Can't locate Links.pm in @INC In reply to
It was the first thing I checked, and yes, Links.pm is in that location, as I mentioned in my first post.

cheers
Helgi
Quote Reply
Re: [helgi] CGI Error; Can't locate Links.pm in @INC In reply to
Did you try replacing the Links.pm ?

You are on windows, did you make sure the file was "text" for DOS not Unix?

Just a thought.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] CGI Error; Can't locate Links.pm in @INC In reply to
I think that moving files created on windows to *nix is more prone to errors than vice versa. If it was the case though I'm fairly sure the error would be premature script headers rather than the error received.

As long as the file exists and can be read and the lib/init path is correct then I see no reason for it not to work.
Quote Reply
Re: [Paul] CGI Error; Can't locate Links.pm in @INC In reply to
Perl's kind of funny. If it can't figure out the end of the line, it can't run.

It was a suggestion, since if the file *is* there, and *is* readable, then the @INC error makes no sense.

Perl seems to think that the file does not exist. So, what are the reasons the file may "appear" to not exist?

I don't use Windows, so it's up for you windows people to figure it out.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] CGI Error; Can't locate Links.pm in @INC In reply to
I can't rule out, that I've made a mistake during the installation process, so I'm going to use this opportunity to reinstall Links and "upgrade" from 2.1.1 to 2.1.2.

Should there be any problems in just copying install.cgi and install.dat as described in README and running install.cgi, without removing the 2.1.1 installation first.

cheers

Helgi

Last edited by:

helgi: Jan 30, 2003, 3:58 AM
Quote Reply
Re: [helgi] CGI Error; Can't locate Links.pm in @INC In reply to
In theory, no. No problems.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] CGI Error; Can't locate Links.pm in @INC In reply to
Well, one thing is theory and other is reality with Murphy running all over the place. It can't go worse than bad, so I'll give it a try.
Quote Reply
Re: [helgi] CGI Error; Can't locate Links.pm in @INC In reply to
I would do some backups before overinstalling the current install.
- Backup database
- save config files (Links/ConfigData.pm, Plugins/plugin.cfg)
- save defs directory content, in the case you did any field modifications (add, modify, delete field)
- save template files, if you did any modification there
This way your data should be safe in case of any problem.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [pugdog] CGI Error; Can't locate Links.pm in @INC In reply to
GT's Virginia Lo found the reason why Can't locate Links.pm in @INC appears. It has got something to do with IUSR protection of .../links/admin.

If the protection is on, the cgi's in .../links can't find Links.pm. However, if these cgi's are moved into the IUSR protected .../links/admin, everything works ok.

On the other hand, when the IUSR protection is removed everything works ok.

The problem here is the obvious lack of security.

Any suggestions on how to get around this problem?

cheers Helgi

Last edited by:

helgi: Mar 17, 2003, 3:00 AM
Quote Reply
Re: [helgi] CGI Error; Can't locate Links.pm in @INC In reply to
Hi,

You want to still allow the IUSR_machinename access to the links/admin directory, but you want to go into your IIS control panel, and remove read ability for the entire admin directory (and make sure allow authentication is allowed).

Cheers,

Alex
--
Gossamer Threads Inc.