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

add.cgi not working

Quote Reply
add.cgi not working
I get the following error when I try to add a link from the browser. I am able to add links from the cgi-bin/links/admin/admin.cgi but get this error from the browser add link which uses add.cgi.
CGI ERROR
==========================================
Error Message : fatal error: Compilation failed in require at F:\users\netbhara\www\vhost\ilaaj\www\htdocs\cgi-bin\links\add.cgi line 161.

Could somebody help.

Quote Reply
Re: add.cgi not working In reply to
Make sure that you have the complete CORRECT absolute path for the require line for links.cfg file in your add.cgi file (and all other scripts that require the links.cfg file), like the following:

Code:
require "F:/users/netbhara/www/vhost/ilaaj/www/htdocs/cgi-bin/links/admin/links.cfg";

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
Quote Reply
Re: add.cgi not working In reply to
Am still getting an error. Did add the whole path to the add.cgi file. This is the error now.CGI ERROR
==========================================
Error Message : fatal error: Compilation failed in require at F:\users\netbhara\www\vhost\ilaaj\www\htdocs\cgi-bin\links\add.cgi line 161.

Script Location : F:\users\netbhara\www\vhost\ilaaj\www\htdocs\cgi-bin\links\add.cgi

Line 161 is somewhere in this portion of the add.cgi script:
# Then mail it away!
require "$db_lib_path/Mailer.pm";
my $mailer = new Mailer ( { smtp => $db_smtp_server,
sendmail => $db_mail_path,
from => $from,
subject => $subject,
to => $to,
msg => $msg,
log => $db_mailer_log
} ) or return;
$mailer->send or return;

Mailer.pm was in the cgi-bin/links/admin directory. I tried adding mailer.pm to the cgi-bin/links directory with no luck. I am wondering if I am doing something wrong the way I am entering the info about my smtp server in links.cfg. I entered 'smtp.mydomain.com' where mydomain is the name of my domain.

Thanks.




Quote Reply
Re: add.cgi not working In reply to
The problem could be with the variable definitions in the links.cfg file. Please save this file as a text file, upload to a publicly accessible directory in your server, and then post the URL to this file.

Your Mailer.pm needs to be in the same directory as your db.pl and db_utils.pl files.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
Quote Reply
Re: add.cgi not working In reply to
Mailer.pm is at the right location.

links.txt is uploaded to ftp://ftp.netbharat.com/pub/

Thanks for your help.
Quote Reply
Re: add.cgi not working In reply to
Here is your problem. You need to have a mailer log that is used for the admin.cgi script (even though you have turned off the email-add and email-mod options):

Change the following:

Code:
db_mailer_log = '';

to the following:

Code:
db_mailer_log = 'F:/users/netbhara/www/vhost/ilaaj/www/htdocs/cgi-bin/links/admin/mailer.log';

Then upload a blank file called mailer.log to your admin directory.

Then change the permission of this file to Read, Write for all users.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
Quote Reply
Re: add.cgi not working In reply to
Eliot,
Thanks for all your interest. I finally figured it out. Accidentally, I had uploaded mailer.pm in binary mode. Don't ask me how? But I went back to the initial instructions with the script. For fatal errors it said, to go back and check if a file had been uploaded in binary and not ASCII. I discovered my mistake, fixed it and it is working like a charm.

Thanks again for your interest.

Quote Reply
Re: add.cgi not working In reply to
Good, glad you figured it out.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
Quote Reply
Re: add.cgi not working In reply to
Eliot,

Thanks for your interest, but despite doing what you told me, I still get the same error. I turned on the email option and created the mailer.log file. I have uploaded the links.cfg, mailer.pm and add.cgi files in text form at
ftp://ftp.netbharat.com/pub

I would appreciate if you could take a look and see if you can figure out. Once again, I am able to add from admin.cgi and I can run all the other commands except add.cgi

Thanks.