nihil
New Member
Posts: 5
|
Post by nihil on Mar 2, 2007 18:14:23 GMT -5
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
|
|
|
Post by Carlos Phelps on Mar 2, 2007 20:06:52 GMT -5
Did you copy the gm-library.cgi file to the same folder as gm.cgi ?
|
|
nihil
New Member
Posts: 5
|
Post by nihil on Mar 3, 2007 3:28:11 GMT -5
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
|
|
|
Post by Carlos Phelps on Mar 3, 2007 10:28:57 GMT -5
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.
|
|
nihil
New Member
Posts: 5
|
Post by nihil on Mar 3, 2007 15:25:43 GMT -5
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
|
|
|
Post by Carlos Phelps on Mar 3, 2007 16:30:23 GMT -5
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
|
|
nihil
New Member
Posts: 5
|
Post by nihil on Mar 3, 2007 17:05:02 GMT -5
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
|
|
|
Post by Carlos Phelps on Mar 3, 2007 23:03:23 GMT -5
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
|
|
nihil
New Member
Posts: 5
|
Post by nihil on Mar 4, 2007 6:57:53 GMT -5
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
|
|
|
Post by coldstone on Mar 5, 2007 23:33:13 GMT -5
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: 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.
|
|
|
Post by Carlos Phelps on Mar 6, 2007 0:43:00 GMT -5
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 perldoc.perl.org/perlrun.html
|
|
|
Post by coldstone on Mar 6, 2007 18:01:46 GMT -5
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.
|
|
|
Post by Carlos Phelps on Mar 6, 2007 18:17:01 GMT -5
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
|
|
|
Post by maria22 on May 8, 2007 13:39:32 GMT -5
i think that file was damage. ..
|
|