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

Help Before Giving up!!

Quote Reply
Help Before Giving up!!
Before giving up in this installation (I've try it at least for the last two days), I run the Perl debugger for admin.cgi and found this:

main: Frownadmin.cgi:28): require "$db_lib_path/db.pl"; # Database Routines.

Illegal character \015 (carriage return) at /home/www/carraizo/cgi-bin/link/admi
n/db.pl line 19, <IN> chunk 73.

Cannot print stack trace, load with -MCarp option to see stack at /usr/lib/perl5
/perl5db.pl line 1833, <IN> chunk 73.
main: Frownadmin.cgi:33): if ($@) {


I have checked and double-cheked path and permissions. I even run a small perl script posted in this BBS for checking the absolute paths. Still no results.

Any ideas?
Quote Reply
Re: Help Before Giving up!! In reply to
chmod all(!)(or only db.pl and if you get new errors in other files the rest too) files to 777 - i dont know if it works but try...

rik
Quote Reply
Re: Help Before Giving up!! In reply to
rik,
Thanks for your idea. If I understood correctly, I chmod every *.pl file to 777. However, the same problem keep showing...

I'm confused on what's happening. Any new ideas are welcome.
Quote Reply
Re: Help Before Giving up!! In reply to
Do NOT chmod all files to 777. Some servers have restictions and will not execute files set to 777.

Sounds to me like the files were just not uploaded in ASCII mode.

--mark
Quote Reply
Re: Help Before Giving up!! In reply to
Usually this means that you have some problems with carriage returns at the end of all the lines. (the zip was made in a dos environment)

to fix, run the following commands from you links cgi-bin directory.

find -name "*pl" -exec perl -i -e "while(<> ){s/\r//g;print;}" {} \;
find -name "*cgi" -exec perl -i -e "while(<> ){s/\r//g;print;}" {} \;
find -name "*pm" -exec perl -i -e "while(<> ){s/\r//g;print;}" {} \;


Quote Reply
Re: Help Before Giving up!! In reply to
I downloaded the zip file three times. The last time I made the download with Lynx directly to the server and unzipped the file there (no FTP from my computer to the server). After much trouble I found that there is some sort of problem with carriage returns. This showed up when running 'perl -d' and perl -c on every cgi, pl and pm file. Most of them showed and extra carriage return between line 4 and 8. I even use a small strip application to get rid of all the comments. Well this work partially, because after editing with 'pico' all those files I get the admin.cgi to work. However there is still some problem because the 'Build' and 'Verify' functions still pops a carriage return error somewhere.
I'll try once more with Kitsume idea to see how it goes. IF not, well, I'll leave it there and delete the file from the server -(.
Quote Reply
Re: Help Before Giving up!! In reply to
when you unzipped on the server, did you remember to use the -a switch?

unzip -a links.zip

--mark
Quote Reply
Re: Help Before Giving up!! In reply to
No I did not use the -a. I'll reinstall once more using that switch to see how it goes.

Thanks.

--
Manuel
Quote Reply
Re: Help Before Giving up!! In reply to
Actually, the list of commands run though and nuke the carriage returns in all the .pl, .pm, .cgi files that it finds. (this is good if you've already done some configuation)

But if you can, Mark's idea is certainly the best.