Grey Matter Forums
« Software error »

Welcome Guest. Please Login or Register.
Jun 19, 2013, 9:25am



Greymatter: Free Personal Blogging Software

About Greymatter (including System Requirements)

Greymatter on FreshMeat

Download current version from:

News: Greymatter 1.8.2 is released! Read the announcement.

Got a minute? We want to know what's your preferred site navigation?

Please read the security announcement regarding author passwords.

Next Greymatter release will be 1.8.3


Grey Matter Forums :: Support :: Installation Issues :: Software error
   [Search This Thread] [Share Topic] [Print]
 AuthorTopic: Software error (Read 1,409 times)
nihil
New Member
*
member is offline





Joined: Mar 2007
Posts: 5
Karma: 0
 Software error
« Thread Started on Mar 2, 2007, 6:14pm »

I have installed GM on my new website, but when trying to run the gm.cgi script I get the following error message;

Software error:
Can't locate gm-library.cgi in @INC (@INC contains: libs /usr/perl5/5.8.4/lib/i86pc-solaris-64int /usr/perl5/5.8.4/lib /usr/perl5/site_perl/5.8.4/i86pc-solaris-64int /usr/perl5/site_perl/5.8.4 /usr/perl5/site_perl /usr/perl5/vendor_perl/5.8.4/i86pc-solaris-64int /usr/perl5/vendor_perl/5.8.4 /usr/perl5/vendor_perl) at gm.cgi line 29.

Anyone got any ideas as to what may be wrong here?

Best regards

Nihil

Link to Post - Back to Top  IP: Logged
Carlos Phelps
Global Moderator
*****
member is offline





Joined: Jan 2007
Gender: Male
Posts: 177
Karma: 30
 Re: Software error
« Reply #1 on Mar 2, 2007, 8:06pm »

Did you copy the gm-library.cgi file to the same folder as gm.cgi ?
Link to Post - Back to Top  IP: Logged
nihil
New Member
*
member is offline





Joined: Mar 2007
Posts: 5
Karma: 0
 Re: Software error
« Reply #2 on Mar 3, 2007, 3:28am »

Yes, I did. Could it have something to do with the CHMOD-setting? I've searched the forum to see if anyone has experienced the same problem, but as far as I can see there has been no other posts along these lines, so I'd be very thankful for any help on this.

Best regards

Nihil
Link to Post - Back to Top  IP: Logged
Carlos Phelps
Global Moderator
*****
member is offline





Joined: Jan 2007
Gender: Male
Posts: 177
Karma: 30
 Re: Software error
« Reply #3 on Mar 3, 2007, 10:28am »

Maybe the file was damaged during transfer.

Delete it then ftp it again making sure you used text transfer mode then chmod it to 755.
Link to Post - Back to Top  IP: Logged
nihil
New Member
*
member is offline





Joined: Mar 2007
Posts: 5
Karma: 0
 Re: Software error
« Reply #4 on Mar 3, 2007, 3:25pm »

I tried putting a copy of the gm.library.cgi file in the libs directory, and for some reason I can access Greymatter when I do that. I have then configured all the paths correctly, but when I run the diagnostics & repair part of the program as I have to do before adding any entries I get the following error-message;

Software error:
Insecure dependency in open while running with -T switch at libs/gm-library.cgi line 9892.

So now I got a little bit further, but stuck once again. Any bright ideas as how to fix this?

Thanks in advance :)

Best regards Nihil
Link to Post - Back to Top  IP: Logged
Carlos Phelps
Global Moderator
*****
member is offline





Joined: Jan 2007
Gender: Male
Posts: 177
Karma: 30
 Re: Software error
« Reply #5 on Mar 3, 2007, 4:30pm »

The gm-library.cgi needs to be in the same folder as gm.cgi not in the libs folder.

The problem is that your web server is looking for gm-library.cgi everywhere but in the local folder. If you add this line to gm.cgi

unshift( @INC, "." );

just before this line

require "gm-library.cgi";

should be near line 32. Use a program like Notepad not Word to add the line then ftp it in text mode.

Good luck,
Carlos
Link to Post - Back to Top  IP: Logged
nihil
New Member
*
member is offline





Joined: Mar 2007
Posts: 5
Karma: 0
 Re: Software error
« Reply #6 on Mar 3, 2007, 5:05pm »

Thank you for your help Carlos, but I still get this error when running the diagnostics and repair part of the program;

Software error:
Insecure dependency in open while running with -T switch at gm-library.cgi line 9892.

Any ideas on how to fix this. I have the gm.library.cgi in the same folder as gm.cgi file, and I can access the program, but as I said, it won't complete the diagnostic and repair part of it.

Best regards

Nihil
Link to Post - Back to Top  IP: Logged
Carlos Phelps
Global Moderator
*****
member is offline





Joined: Jan 2007
Gender: Male
Posts: 177
Karma: 30
 Re: Software error
« Reply #7 on Mar 3, 2007, 11:03pm »

I believe this will get you going.

Change the first line in gm.cgi to
#!/usr/bin/perl -wt
but make sure the path matches your system

Forget using this line
unshift( @INC, "." );

Change this line to
require "./gm-library.cgi";

Use a program like Notepad not Word to edit the file then ftp it in text mode.

Good luck,
Carlos
Link to Post - Back to Top  IP: Logged
nihil
New Member
*
member is offline





Joined: Mar 2007
Posts: 5
Karma: 0
 Re: Software error
« Reply #8 on Mar 4, 2007, 6:57am »

Thank you so much for all your help.

Greymatter is now up and running smoothly on my site, and I am sooo pleased ;D

Best regards

Nihil

Link to Post - Back to Top  IP: Logged
coldstone
Global Moderator
*****
member is offline

[avatar]


[homepage]

Joined: Aug 2006
Posts: 816
Karma: 18
 Re: Software error
« Reply #9 on Mar 5, 2007, 11:33pm »

Ok, I give, I couldn't come up with a google answer. I know the -w is warn (which shouldn't be needed) but I can't find any command line information on -t? does this override the server somehow? Since none of the GM code currently runs in Taint mode, I am guessing that somehow -T is being forced upon any script running perl. Or am I totally off base? :)

---
Update: I am the worst googler every, but running perl -h gave me the answer (I think), so -t causes taint 'warnings' vs 'checking', so it won't stop on the Taint violations?

Also, you can just do a "use lib '.';", instead of messing with INC or doing a ./ in the require. This maybe needed since some of the file manipulation requires that '.' be in the path. Which is weird that it wasn't since the code at the start of all the scripts:
Code:
eval {
    ($0 =~ m,(.*)/[^/]+,) && unshift (@INC, "$1");
    ($0 =~ m,(.*)\\[^\\]+,) && unshift (@INC, "$1");
};

Is basically added the directory where the script resides onto INC. But I don't know how this would interact with -T or -t.
« Last Edit: Mar 5, 2007, 11:39pm by coldstone »Link to Post - Back to Top  IP: Logged
Carlos Phelps
Global Moderator
*****
member is offline





Joined: Jan 2007
Gender: Male
Posts: 177
Karma: 30
 Re: Software error
« Reply #10 on Mar 6, 2007, 12:43am »

Coldstone,

If you look at the error

Software error:
Can't locate gm-library.cgi in @INC (@INC contains: libs /usr/perl5/5.8.4/lib/i86pc-solaris-64int /usr/perl5/5.8.4/lib /usr/perl5/site_perl/5.8.4/i86pc-solaris-64int /usr/perl5/site_perl/5.8.4 /usr/perl5/site_perl Is warning /usr/perl5/vendor_perl/5.8.4/i86pc-solaris-64int /usr/perl5/vendor_perl/5.8.4 /usr/perl5/vendor_perl) at gm.cgi line 29.

you will notice that the local "." is missing from the path. This happens whenever perl is running in Taint mode. So the server must be forcing it.

-t

Is like -T, but taint checks will issue warnings rather than fatal errors

-w

Is warning mode. Not needed but can't hurt.

Need to change this line to
require "./gm-library.cgi";

since server is still in taint, even if it is not fatal.

Check the perldocs at http://perldoc.perl.org/perlrun.html
Link to Post - Back to Top  IP: Logged
coldstone
Global Moderator
*****
member is offline

[avatar]


[homepage]

Joined: Aug 2006
Posts: 816
Karma: 18
 Re: Software error
« Reply #11 on Mar 6, 2007, 6:01pm »

Yeah, a sysadmin friend of mine mentioned how it could be done with creating a wrapper, or it looks like ModPerl has a global Taint flag.

Taint doesn't prevent the 'use lib' command though does it? If not then the './' wouldn't be need if you 'use lib "."' or 'use lib "fully_qualified_path"'. Of course, I haven't tested this so its theory and since your solution works fine, its not important. Theres always more than one way to do something in Perl.
Link to Post - Back to Top  IP: Logged
Carlos Phelps
Global Moderator
*****
member is offline





Joined: Jan 2007
Gender: Male
Posts: 177
Karma: 30
 Re: Software error
« Reply #12 on Mar 6, 2007, 6:17pm »

I forced it to happen on one my web servers, but I had no problem with the line,

use lib;

only with the line

require "gm-library.cgi";

this is due to the fact that Taint mode removes the "." from the path
Link to Post - Back to Top  IP: Logged
maria22
New Member
*
member is offline





Joined: May 2007
Posts: 1
Karma: 0
 Re: Software error
« Reply #13 on May 8, 2007, 1:39pm »

i think that file was damage...
Link to Post - Back to Top  IP: Logged
   [Search This Thread] [Share Topic] [Print]

Click Here To Make This Board Ad-Free


This Board Hosted For FREE By ProBoards
Get Your Own Free Message Boards & Free Forums!
Terms of Service | Privacy Policy | Notice | FTC Disclosure | Report Abuse | Mobile