Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Crontab For Links 2

Quote Reply
Crontab For Links 2
Hi. I don't know if any of you here have ever tried to set up Links 2 on a cronjob, but if you have I'm sure you would have come accross an error that would cause the links.db file to be CHMODed to 664 (thus not giving you access to add or modify it). Just a little fix that I found to help get round this. Add the following line in nph-build.cgi;

NOTE: BE SURE TO MAKE A BACKUP OF NPH-BUILD.CGI BEFORE ATTEMPTING THIS AS IT MAY NOT WORK FOR YOU IN WHICH CASE YOU WILl NEED TO GO BACK TO HOW IT USED TO BE

chmod(0666, $db_script_path/data/links.db) or die "can't chmod: $db_script_path/data/links.db ($!)";

after;

# We are finished!
print "Pages Built (", time() - $start, " s)!";
print "</PRE></BODY></HTML>" if ($use_html);


Like so;

# We are finished!
print "Pages Built (", time() - $start, " s)!";
print "</PRE></BODY></HTML>" if ($use_html);

chmod(0666, $db_script_path/data/links.db) or die "can't chmod: $db_script_path/data/links.db ($!)";


Well, I hope this helps some of you out there as it certainly helped me! Cool

Andy

webmaster@ace-installer.com
http://www.ace-installer.com
Quote Reply
Re: Crontab For Links 2 In reply to
You should use this incase people don't have links.db in that location..

chmod(0666, $db_links_name) || die &cgierr("Can't chmod $db_links_name : $!");

......and also take them to the error page rather than an ugly 500....


Paul
Installations:http://wiredon.net/gt/
Support: http://wiredon.net/forum/

Edit: Missing ) Tongue

Last edited by:

Andy: Jun 16, 2003, 3:24 AM