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

Unable to copy links backup

(Page 1 of 2)
> >
Quote Reply
Unable to copy links backup
i have just installed Links 2.0, and have changed a few things. i have patience to work out errors and such, so i don't mind that it doesn't work right off the bat.

i have successfully added a few categories and a few links from the admin script. but when i go to the 3rd step of building the pages, i get this error:

Building Pages
Step: Updating New and Popular Records and rebuilding URL database

Pages built on 30-Apr-1999 at 02:42:24
--------------------------------------------------------

Backing up database . . .
Backing up links, category and email database (File::Copy) ...

CGI ERROR
==========================================
Error Message : Unable to copy links backup. Reason: No such file or directory
Script Location : /home3/theoretic/public_html/shrine/links/admin/nph-build.cgi
Perl Version : 5.00404

Form Variables
-------------------------------------------
staggered : 1

Environment Variables
-------------------------------------------
DOCUMENT_ROOT : /home3/theoretic/public_html
GATEWAY_INTERFACE : CGI/1.1
HTTP_ACCEPT : image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_ACCEPT_LANGUAGE: en-us,sv;q=0.5
HTTP_CONNECTION : Keep-Alive
HTTP_HOST : www.theoretic.com
HTTP_REFERER : http://www.theoretic.com/shrine/links/admin/index.cgi?display=navigation
HTTP_USER_AGENT : Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)
PATH : /usr/sbin:/usr/bin
QUERY_STRING : staggered=1
REMOTE_ADDR : 205.184.150.35
REMOTE_HOST : 205.184.150.35
REMOTE_PORT : 2658
REQUEST_METHOD : GET
REQUEST_URI : /shrine/links/admin/nph-build.cgi?staggered=1
SCRIPT_FILENAME : /home3/theoretic/public_html/shrine/links/admin/nph-build.cgi
SCRIPT_NAME : /shrine/links/admin/nph-build.cgi
SERVER_ADMIN : webmaster@theoretic.com
SERVER_NAME : www.theoretic.com
SERVER_PORT : 80
SERVER_PROTOCOL : HTTP/1.1
SERVER_SOFTWARE : Apache/1.2.6 PHP/3.0 FrontPage/3.0.4
TZ : US/Eastern

------------------
Theoretic Internet Services (http://www.theoretic.com)
'Your Web Hosting, Button Exchange, and Weather Forecasts Solution, with Just Two Words: Quality and Privacy'
Quote Reply
Re: Unable to copy links backup In reply to
Take a look at http://www.gossamer-threads.com/...um2/HTML/000656.html and see if it doesn't solve your problem.

I hope this helps.
Quote Reply
Re: Unable to copy links backup In reply to
dope, didn't work, sorry Frown
chmoding to 777 doesn't seem to be the problem.
i have changed the path locations in the .cfg file, so could i have messed up something? i'll post that below.
also, i have had to rename all of the .PL scripts to .CGI extensions, since my server requires it. i didn't know where in te other scripts to vhange the references to these .pl scripts, so could this be the problem?
also i've renames the admin.cgi script to index.cgi, but i am pretty sure i've changed the refence properly in the .cfg file.


# -------------
# Links
# -------------
# Links Manager
#
# File: links.cfg
# Description: Contains all the setup variables.
# Author: Alex Krohn
# Email: alex@gossamer-threads.com
# Web: http://www.gossamer-threads.com/
# Version: 2.0
#
# (c) 1998 Gossamer Threads Inc.
#
# This script is not freeware! Please read the README for full details
# on registration and terms of use.
# =====================================================================

# Paths and URL's to Important Stuff
# --------------------------------------------------------
# PATH and URL of Admin CGI directory. No Trailing Slash.
$db_script_path = "/opt2/home3/theoretic/public_html/shrine/links/admin";
$db_dir_url = "http://www.theoretic.com/shrine/links/admin";

# PATH of Databin directory. No Trailing Slash.
$db_file_path = "/opt2/home3/theoretic/databin/shrine/links";

# URL of User CGI directory. No Trailing Slash.
$db_cgi_url = "http://www.theoretic.com/shrine/links";

# PATH and URL of Pages to be built. No Trailing Slash.
$build_root_path = "/opt2/home3/theoretic/public_html/shrine/links";
$build_root_url = "http://www.theoretic.com/shrine/links";

# PATH and URL of What's New page. No Trailing slash.
$build_new_path = "$build_root_path/new";
$build_new_url = "$build_root_url/new";

# PATH and URL of What's Cool page. No Trailing slash.
$build_cool_path = "$build_root_path/cool";
$build_cool_url = "$build_root_url/cool";

# PATH and URL of What's Rating page. No Trailing slash.
$build_ratings_path = "$build_root_path/ratings";
$build_ratings_url = "$build_root_url/ratings";

# Database Options
# --------------------------------------------------------
# You really need to use flock(). However if your system doesn't support it (Win95),
# then turn this off at your own risk!
$db_use_flock = 1;
# Use Pragma: no-cache to stop browsers from caching output? (0 = cache, 1 = nocache)
$db_nocache = 0;
# Use IIS headers? Set this to 1 if your web server needs the full headers (HTTP/1.0 etc.)
$db_iis = 0;
# Field number of category in category.db
$db_main_category = 1;
# Referers -- which hosts are allowed to add to your database.
@db_referers = ();

# Email Options
# --------------------------------------------------------
# NOTE: Be sure to edit the text of the message. It can be found
# in the templates directory: email-add.txt, email-del.txt and
# email-mod.txt respectively.

# Set only ONE of either $db_mail_path which should go to a
# mail program like sendmail, or $db_smtp_server which will use
# a SMTP server. Do not set both at once!

# PATH of sendmail. # SMTP Server
$db_mail_path = '/usr/lib/sendmail'; $db_smtp_server = '';

# Email address of the administrator. BE SURE TO SET!
$db_admin_email = 'webmaster@theoretic.com';

# Notify visitors automatically when their links are validated?
$db_email_add = 1;

# Notify visitors automatically when their links are modified?
$db_email_modify = 1;

# Log all outgoing messages? Put the full path to a logfile and make sure it
# exists and is writeable (chmod 666 -rw-rw-rw-). This logfile can get pretty
# big!
$db_mailer_log = '';

# Build Options
# --------------------------------------------------------
# Setting for popular cutoff, can either be a percent (i.e. top 3%), or
# a fixed value (i.e. top 10). Enter 0.03 or 10 respectively.
$db_popular_cutoff = 0.03; # Top 3%
# Number of days a link is considered New.
$db_new_cutoff = 14; # 14 days old.
# Return search results bolded (1 = yes, 0 = no).
$search_bold = 1;
# The name of an index file.
$build_index = "index.shtml";
# The extension to use for non index files:
$build_extension = ".shtml";

# Should your add.cgi automatically select what category the user
# is adding his link into?
$db_single_category = 1;

# Directory Permissions. Do NOT put quotes around it. Set to 0777
# for world writeable. If you put this at 0755, you might need a
# script to remove any directories created as they will be owned
# by the web server or user nobody. Better solution might be to
# run the nph-build routine from the command shell.
$build_dir_per = 0777;

# The script can now break up category pages that have more then x
# number of links in it. It will also create next and previous links
# to help navigate. Set this to 1 if you want to break up pages or 0 if
# you want to have only one page per category.
# Setting this to one, will also break up the What's New pages into
# per day sections (not affected by number of links per page).
$build_span_pages = 1;

# Number of links per page.
$build_links_per_page = 25;

# Detailed View: The script can build a single html page per link. This is
# great if you have a review in your database. To enable, you must set
# the directory where all the pages will be stored, the url to that directory
# and set the enable option.
$build_detailed = 0;
$build_detail_path = "$build_root_path/detailed";
$build_detail_url = "$build_root_url/detailed";

# Use Templates: instead of editing site_html.pl, you can edit regular html pages
# encoded with special <%links_tags%>. It's not as flexible as site_html.pl, but it
# may be easier.
$build_use_templates = 1;

# Site Title, the default title to use. You should really spend some time customizing
# the directory though!
$build_site_title = 'Birthright Shrine Links';

# Date Routines
# --------------------------------------------------------
# Your date format can be whatever you like, as long as the following
# two functions are defined &date_to_unix and &unix_to_date:
# The default is dd-mmm-yyyy.

sub date_to_unix {
# --------------------------------------------------------
# This routine must take your date format and return the time a la UNIX time().
# Some things to be careful about..
# timelocal does not like to be in array context, don't do my($time) = timelocal (..)
# int your values just in case to remove spaces, etc.
# catch the fatal error timelocal will generate if you have a bad date..
# don't forget that the month is indexed from 0!
#
my $date = shift; my $i;
my %months = map { $_ => $i++ } qw!Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec!;
my ($day, $mon, $year) = split(/-/, $date);

exists $months{$mon} or return undef;
$day = int($day); $year = $year - 1900;

require Time::Local;
my $time = 0;
eval {
$time = &Time::Local::timelocal(0,0,0, $day, $months{$mon}, $year);
};
if ($@) { die "invalid date format: $date - parsed as (day: $day, month: $months{$mon}, year: $year). Reason: $@"; }
return $time;
}

sub unix_to_date {
# --------------------------------------------------------
# This routine must take a unix time and return your date format
# A much simpler routine, just make sure your format isn't so complex that
# you can't get it back into unix time.
#
my $time = shift;
my ($sec, $min, $hour, $day, $mon, $year, $dweek, $dyear, $tz) = localtime $time;
my @months = qw!Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec!;
$year = $year + 1900;
return "$day-$months[$mon]-$year";
}

sub long_date {
# --------------------------------------------------------
# This routine is for printing a nicer date format on the what's new page. It should
# take in a date in your current format and return a new one.
my $time = shift;
$time = &date_to_unix ($time);
my ($sec, $min, $hour, $day, $mon, $year, $dweek, $dyear, $tz) = localtime $time;
my @months = qw!January February March April May June July August September October November December!;
my @days = qw!Sunday Monday Tuesday Wednesday Thursday Friday Saturday!;
$year = $year + 1900;
return "$days[$dweek], $months[$mon] $day $year";
}

# -------------------------------------------------------------
# Extra Paths -- unless you feel the need to rename files, you
# can leave this as is.
# -------------------------------------------------------------
$db_script_url = $db_dir_url . "/index.cgi"; # Admin script.
$db_header_path = $db_script_path . "../../../htmlbin/shrine/header"; # Place to store header and footers.
$db_footer_path = $db_script_path . "../../../htmlbin/shrine/footer";
$build_search_url = $db_cgi_url . "/search.cgi"; # URL of search script.
$build_add_url = $db_cgi_url . "/add.cgi"; # URL of add script.
$build_modify_url = $db_cgi_url . "/modify.cgi"; # URL of modify script.
$build_jump_url = $db_cgi_url . "/jump.cgi"; # URL of jump script.
$build_email_url = $db_cgi_url . "/subscribe.cgi"; # URL of email update script.
$build_rate_url = $db_cgi_url . "/rate.cgi"; # URL of rate script.
$db_mail_url = $db_dir_url . "/nph-email.cgi"; # URL of admin mass mail script.
$build_css_url = $build_root_url . "/links.css"; # URL to your CSS file.

$db_lib_path = $db_script_path; # PATH of library files.
$db_links_name = "$db_file_path/links.db"; # PATH to links database.
$db_category_name = "$db_file_path/categories.db"; # PATH to category database.
$db_valid_name = "$db_file_path/validate.db"; # PATH to validation database.
$db_modified_name = "$db_file_path/modified.db"; # PATH to modification database.
$db_url_name = "$db_file_path/url.db"; # PATH to URL lookup database.
$db_email_name = "$db_file_path/email.db"; # PATH to email database.
$db_links_id_file_name = "$db_file_path/linksid.txt"; # PATH to links counter file.
$db_category_id_file_name = "$db_file_path/categoryid.txt"; # PATH to category counter file.
$db_hits_path = "$db_file_path/hits"; # PATH to hits directory.
$db_template_path = "$db_script_path/templates"; # PATH to templates.
$db_rates_path = "$db_file_path/rates"; # PATH to ratings.
1;

------------------
Theoretic Internet Services (http://www.theoretic.com)
'Your Web Hosting, Button Exchange, and Weather Forecasts Solution, with Just Two Words: Quality and Privacy'
Quote Reply
Re: Unable to copy links backup In reply to
<<dope, didn't work, sorry>>

You're not calling Bobsie a dope, are you?! Smile That's sacrilege around here.

Dan
Quote Reply
Re: Unable to copy links backup In reply to
oh, geez. that's what i get for not getting my usual 4 hours sleep.

no! i didn't mean to say 'dope'. hold on a sec, need to go slam my head against the wall a few times.

okay, back. a lesson: when you are sleepy, but in that stage where you believe you are 'just fine', a 'd' looks just like an 'n'.

*sigh*. hold on, i don't feel i slammed my head enough. i can still feel pain.

okay, that's feeling good now.

anyway, please, understand that i *so* didn't mean that! whew, that's the second stupid thing i've 'said' today.

------------------
Theoretic Internet Services (http://www.theoretic.com)
'Your Web Hosting, Button Exchange, and Weather Forecasts Solution, with Just Two Words: Quality and Privacy'
Quote Reply
Re: Unable to copy links backup In reply to
adamtheo,

Where is your backup directory? And have you modified nph-build.cgi, sub build_backup to use that directory if it is not under the admin directory?

Are both the backup and databin directories chmod 777?

Are all the files in the databin directory, especially links.db, chmod 666?

If so, then the backup should work.

There was code for a mod in the message I referred you to that would ensure that links.db stays chmod 666.

I hope this helps.

P.S., Quit hitting your head against the wall; you could hurt the wall. Smile
Quote Reply
Re: Unable to copy links backup In reply to
well, chmoding is correct.
i also installed the new sub's in the nph-build.cgi file.

still same errors.

my backup directory i located iunder admin, and it's full path is:
/opt2/home3/theoretic/public_html/shrine/links/admin/backup
that is correct.
the databin directory is
/opt2/home3/theoretic/databin/shrine/links
also under the admin directory are the directories:
backup, html, lwp, templates
the CGI scripts such as add.cgi, jump.cgi, search.cgi, rate.cgi, etc. are under the public_html/shrine/links directory.

i have changed all Perl Scripts with the extension of .pl to the .cgi extension, but have not changed any internal references to them in the other scripts, since i have no idea where all of them are, except in the nph-build.cgi script, which i just changed all .pl references to .cgi references.

i am pretty sure chmoding is correct. but i will go back and make 110% sure again afetr i get some sleep (that always seems to help find new solutions).

if you want, you can take a look at the admin file in action, i have not password protected the directories yet, since i thought i might need to have someone look at it.
http://www.theoretic.com/shrine/links/admin

the script is called index.cgi, so it will load automatically, and the default file for the links directory is index.shtml. it is blank right now, however.
i can't remember if i created it or if the script did. should i remove it and try again?
actually, i think i created it.

anyway, i'm starting to get the feeling that the error is because i changed a configuration or file too much before i got the thing working. it is probably a messed up reference to a non existant file or folder.

thank you very much for your help on this Smile

------------------
Theoretic Internet Services (http://www.theoretic.com)
'Your Web Hosting, Button Exchange, and Weather Forecasts Solution, with Just Two Words: Quality and Privacy'
Quote Reply
Re: Unable to copy links backup In reply to
Check sub build_backup in nph-build.cgi and ensure that all occurances of

$db_script_path/data

have been changed to

$db_file_path

I hope this helps.
Quote Reply
Re: Unable to copy links backup In reply to
guess what?

i went through the nph-build.cgi script, there were about 4 places to fix it. still doesn't work, though. i'm sure that there are other places i need to change references like that, since i did change the file paths.

------------------
Theoretic Internet Services (http://www.theoretic.com)
'Your Web Hosting, Button Exchange, and Weather Forecasts Solution, with Just Two Words: Quality and Privacy'
Quote Reply
Re: Unable to copy links backup In reply to
The $db_script_path/data only occurs in links.cfg and nph-build.cgi.
Quote Reply
Re: Unable to copy links backup In reply to
It's not in my links.cfg file at all. So if it's not there, this mod above will not work??

Quote Reply
Re: Unable to copy links backup In reply to
Well it should be.......

$db_lib_path = $db_script_path; # PATH of library files.

Paul Wilson.
new - http://www.wiredon.net
Quote Reply
Re: Unable to copy links backup In reply to
That I do have from the recent download of links2. What I don't have is db_file_path in links.cfg which the fix referred to. Perhaps i'ts an old thread for an earlier version?

Anyways, I cannot get it to write to url.db. Everything has been double checked and I have gone through every thread in this list 3 times. Permissions, etc is all as prescribed. Beats me!

Quote Reply
Re: Unable to copy links backup In reply to
Do you have an empty file called links.db.bak in your data directory? If not, then this is probably your problem. Make sure that you have this file and that the permission of the file is set to 666 (rw-rw-rw-). Without this file your build process will not complete and also your database will not be fully backed up.

It is not necessarily a problem with permissions of the backup directory...

Regards,

Eliot Lee
Quote Reply
Re: Unable to copy links backup In reply to
Your paths in links.cfg are wrong.

You are trying to build pages where the cgi is and what is the Databin?

Basically your paths are wrong....once you fix them it will work.

Paul Wilson.
new - http://www.wiredon.net
Quote Reply
Re: Unable to copy links backup In reply to
Thanks, but I added links.db.bak with no effect. Please see the directory structure posted here. It's obviously that by now the problem is staring me in the face, and right under my nose??

Quote Reply
Re: Unable to copy links backup In reply to
# Paths and URL's to Important Stuff
# --------------------------------------------------------
# PATH and URL of Admin CGI directory. No Trailing Slash.
$db_script_path = "/var/lib/apache/share/cgi-bin/links/admin";
$db_dir_url = "http://artists.artdept.com.au/cgi-bin/links/admin";

# URL of User CGI directory. No Trailing Slash.
$db_cgi_url = "http://artists.artdept.com.au/cgi-bin/links";

# PATH and URL of Pages to be built. No Trailing Slash.
$build_root_path = "/var/lib/apache/share/htdocs/artists.artdept.com.au/links/pages";
$build_root_url = "http://artists.artdept.com.au/links/pages";

# PATH and URL of What's New page. No Trailing slash.
$build_new_path = "$build_root_path/new";
$build_new_url = "$build_root_url/new";

# PATH and URL of What's Cool page. No Trailing slash.
$build_cool_path = "$build_root_path/cool";
$build_cool_url = "$build_root_url/cool";

# PATH and URL of What's Rating page. No Trailing slash.
$build_ratings_path = "$build_root_path/ratings";
$build_ratings_url = "$build_root_url/ratings";



$db_script_url = $db_dir_url . "/admin.cgi"; # Admin script.
$db_header_path = $db_script_path . "/header"; # Place to store header and footers.
$db_footer_path = $db_script_path . "/footer";
$build_search_url = $db_cgi_url . "/search.cgi"; # URL of search script.
$build_add_url = $db_cgi_url . "/add.cgi"; # URL of add script.
$build_modify_url = $db_cgi_url . "/modify.cgi"; # URL of modify script.
$build_jump_url = $db_cgi_url . "/jump.cgi"; # URL of jump script.
$build_email_url = $db_cgi_url . "/subscribe.cgi"; # URL of email update script.
$build_rate_url = $db_cgi_url . "/rate.cgi"; # URL of rate script.
$db_mail_url = $db_dir_url . "/nph-email.cgi"; # URL of admin mass mail script.
$build_css_url = $build_root_url . "/links.css"; # URL to your CSS file.

$db_lib_path = $db_script_path; # PATH of library files.
$db_links_name = "$db_script_path/data/links.db"; # PATH to links database.
$db_category_name = "$db_script_path/data/categories.db"; # PATH to category database.
$db_valid_name = "$db_script_path/data/validate.db"; # PATH to validation database.
$db_modified_name = "$db_script_path/data/modified.db"; # PATH to modification database.
$db_url_name = "$db_script_path/data/url.db"; # PATH to URL lookup database.
$db_email_name = "$db_script_path/data/email.db"; # PATH to email database.
$db_links_id_file_name = "$db_script_path/data/linksid.txt"; # PATH to links counter file.
$db_category_id_file_name = "$db_script_path/data/categoryid.txt"; # PATH to category counter file.
$db_hits_path = "$db_script_path/data/hits"; # PATH to hits directory.
$db_template_path = "$db_script_path/templates"; # PATH to templates.
$db_rates_path = "$db_script_path/data/rates"; # PATH to ratings.



cgi-bin/links/
drwxrwxrwx 3 art users 4096 Feb 25 13:47 .
drwxrwxrwx 19 art users 4096 Feb 17 01:54 ..
-rwxr-xr-x 1 art users 6043 Feb 25 03:10 add.cgi
drwxrwxrwx 5 art users 4096 Feb 25 01:03 admin
-rwxr-xr-x 1 art users 4836 Feb 25 03:10 jump.cgi
-rwxr-xr-x 1 art users 6849 Feb 25 03:10 modify.cgi
-rwxr-xr-x 1 art users 4173 Feb 25 03:10 rate.cgi
-rwxr-xr-x 1 art users 11623 Feb 25 03:10 search.cgi
-rwxr-xr-x 1 art users 4765 Feb 25 03:10 subscribe.cgi


cgi-bin/links/admin/
drwxrwxrwx 5 art users 4096 Feb 25 01:03 .
drwxrwxrwx 3 art users 4096 Feb 25 13:47 ..
-rw-r--r-- 1 art users 387 Feb 22 00:38 .htaccess
-rwxr-xr-x 1 art users 11924 Feb 25 01:02 Mailer.pm
-rwxr-xr-x 1 art users 4526 Feb 25 01:03 Template.pm
-rwxr-xr-x 1 art users 5842 Feb 25 03:11 admin.cgi
-rwxr-xr-x 1 art users 71023 Feb 25 01:02 admin_html.pl
drwxrwxrwx 2 art users 4096 Feb 25 01:01 backup
-rwxr-xr-x 1 art users 3119 Feb 25 01:02 category.def
drwxrwxrwx 4 art users 4096 Feb 25 13:33 data
-rwxr-xr-x 1 art users 37893 Feb 25 01:02 db.pl
-rwxr-xr-x 1 art users 23352 Feb 25 01:02 db_utils.pl
-rw-r--r-- 1 art users 13 Feb 21 23:27 htgroup
-rw-r--r-- 1 art users 20 Feb 21 23:27 htpasswd
-rwxr-xr-x 1 art users 10558 Feb 25 03:16 links.cfg
-rwxr-xr-x 1 art users 4670 Feb 25 01:02 links.def
-rwxr-xr-x 1 art users 47815 Feb 25 03:11 nph-build.cgi
-rwxr-xr-x 1 art users 7444 Feb 25 03:11 nph-email.cgi
-rwxr-xr-x 1 art users 7769 Feb 25 03:11 nph-verify.cgi
-rwxr-xr-x 1 art users 37115 Feb 25 01:03 site_html.pl
-rwxr-xr-x 1 art users 16355 Feb 25 01:03 site_html_templates.pl
drwxrwxrwx 2 art users 4096 Feb 2 08:54 templates

cgi-bin/links/admin/data/
drwxrwxrwx 4 art users 4096 Feb 25 13:33 .
drwxrwxrwx 5 art users 4096 Feb 25 01:03 ..
-rw-rw-rw- 1 art users 13 Feb 25 01:12 categories.db
-rw-rw-rw- 1 art users 1 Feb 25 01:12 categoryid.txt
-rw-rw-rw- 1 art users 0 Feb 25 01:01 email.db
drwxrwxrwx 2 art users 4096 Feb 25 01:01 hits
-rw-rw-rw- 1 art users 580 Feb 25 13:36 links.db
-rw-rw-rw- 1 art users 0 Feb 25 13:33 links.db.bak
-rw-rw-rw- 1 art users 1 Feb 25 13:35 linksid.txt
-rw-rw-rw- 1 art users 0 Feb 25 01:01 modified.db
drwxrwxrwx 2 art users 4096 Feb 25 01:01 rates
-rw-rw-rw- 1 art users 0 Feb 25 01:01 url.db
-rw-rw-rw- 1 art users 0 Feb 25 13:36 validate.db
Quote Reply
Re: Unable to copy links backup In reply to
The BACKUP folder needs to be in the DATA folder NOT in the main cgi-bin/links folder.

Regards,

Eliot Lee
Quote Reply
Re: Unable to copy links backup In reply to
Thanks, that got me passed the backup error, but now onto the next prob... "copy"
==========================================
Error Message : Unable to copy links backup. Reason: Permission denied
Script Location : /var/lib/apache/share/cgi-bin/links/admin/nph-build.cgi
Perl Version : 5.00503

Did you read the bit where it doesn't add the link to url.db? Is this connected and further on in the sequence?

Error: Can't find link id: 11


Quote Reply
Re: Unable to copy links backup In reply to
In Reply To:
Did you read the bit where it doesn't add the link to url.db?
Yes...I did....

In Reply To:
Is this connected and further on in the sequence?
Yes...building the index file comes after the backup process...so, if that chokes, of course, the url.db will not be created, because the script has choked before getting to this process...and yes, the Unknown Link Error is associated with not being able to complete the build process.


Again, you need to have a blank file called links.db.bak in your data folder and the permission of that file needs to be set to 666.


Regards,

Eliot Lee
Quote Reply
Re: Unable to copy links backup In reply to
Yes, I had that already...

drwxrwxrwx 5 art users 4096 Feb 26 14:09 .
drwxrwxrwx 4 art users 4096 Feb 26 14:09 ..
drwxrwxrwx 2 art users 4096 Feb 25 01:01 backup
-rw-rw-rw- 1 art users 13 Feb 25 01:12 categories.db
-rw-rw-rw- 1 art users 1 Feb 25 01:12 categoryid.txt
-rw-rw-rw- 1 art users 0 Feb 25 01:01 email.db
drwxrwxrwx 2 art users 4096 Feb 25 01:01 hits
-rw-rw-rw- 1 art users 915 Feb 26 14:17 links.db
-rw-rw-rw- 1 art users 0 Feb 25 13:33 links.db.bak
-rw-rw-rw- 1 art users 2 Feb 26 14:13 linksid.txt
-rw-rw-rw- 1 art users 0 Feb 25 01:01 modified.db
drwxrwxrwx 2 art users 4096 Feb 25 01:01 rates
-rw-rw-rw- 1 art users 0 Feb 25 01:01 url.db
-rw-rw-rw- 1 art users 100 Feb 26 14:17 validate.db

Am wondering if a mod found on this board re #nph++ may be an overkill? have also added the chmod666 mod.

http://gossamer-threads.com/perl/forum/showthreaded.pl?Cat=&Board=L2Unix&Number=129087&page=0&view=&sb=&vc=1#Post129087 contains the paths as in links.cfg

Quote Reply
Re: Unable to copy links backup In reply to
In Reply To:
Am wondering if a mod found on this board re #nph++ may be an overkill? have also added the chmod666 mod.
That "mod" (actually a code hack) is only useful if your web account is hosted on a Cobalt/RAQ server...

Again...the error message you are receiving indicates that your links.db.bak is not in the proper place or has improper permissions...

Regards,

Eliot Lee
Quote Reply
Re: Not writing to url.db In reply to
Beats me...

cgi-bin/links/admin/
drwxrwxrwx 5 art users 4096 Feb 26 14:09 .
drwxrwxrwx 4 art users 4096 Feb 26 14:09 ..
drwxrwxrwx 2 art users 4096 Feb 25 01:01 backup
-rw-rw-rw- 1 art users 13 Feb 25 01:12 categories.db
-rw-rw-rw- 1 art users 1 Feb 25 01:12 categoryid.txt
-rw-rw-rw- 1 art users 0 Feb 25 01:01 email.db
drwxrwxrwx 2 art users 4096 Feb 25 01:01 hits
-rw-rw-rw- 1 art users 915 Feb 26 14:17 links.db
-rw-rw-rw- 1 art users 0 Feb 25 13:33 links.db.bak
-rw-rw-rw- 1 art users 2 Feb 26 14:13 linksid.txt
-rw-rw-rw- 1 art users 0 Feb 25 01:01 modified.db
drwxrwxrwx 2 art users 4096 Feb 25 01:01 rates
-rw-rw-rw- 1 art users 0 Feb 25 01:01 url.db
-rw-rw-rw- 1 art users 100 Feb 26 14:17 validate.db

Will re-enable nph++ then...

I actually had this script working perfectly in the first place. Then I edited the template files to suit our site, added a few links from the old listings, tweaked the scripts and whammo... no workee. Even though it wasn't writing to backup it was giving me unbroken liinks on the first tests. I rebuilt it using the original downloaded scripts and kept the revamped templates... tres frustrating and wondering if I haven't been nobbled somewhere...
Quote Reply
Re: Not writing to url.db In reply to
In Reply To:
tweaked the scripts and whammo... no workee.
Uh...how about coming forth and telling us what exactly you have done to your LINKS script??? If you did not make backups of your scripts and other files within the LINKS system, then you may have screwed yourself....

Be complete when listing ALL the code hacks and MODS you've recently added...

Regards,

Eliot Lee
Quote Reply
Re: Not writing to url.db In reply to
Apart from the lines that needed setting to suit the server, now nothing except the line ...

else { chmod 0666, $db_links_name; }

# Paths and URL's to Important Stuff
# --------------------------------------------------------
# PATH and URL of Admin CGI directory. No Trailing Slash.
$db_script_path = "/var/lib/apache/share/cgi-bin/links/admin";
$db_dir_url = "http://artists.artdept.com.au/cgi-bin/links/admin";

# URL of User CGI directory. No Trailing Slash.
$db_cgi_url = "http://artists.artdept.com.au/cgi-bin/links";

# PATH and URL of Pages to be built. No Trailing Slash.
$build_root_path = "/var/lib/apache/share/htdocs/artists.artdept.com.au/links/pages";
$build_root_url = "http://artists.artdept.com.au/links/pages";

# PATH and URL of What's New page. No Trailing slash.
$build_new_path = "$build_root_path/new";
$build_new_url = "$build_root_url/new";

# PATH and URL of What's Cool page. No Trailing slash.
$build_cool_path = "$build_root_path/cool";
$build_cool_url = "$build_root_url/cool";

# PATH and URL of What's Rating page. No Trailing slash.
$build_ratings_path = "$build_root_path/ratings";
$build_ratings_url = "$build_root_url/ratings";



$db_script_url = $db_dir_url . "/admin.cgi"; # Admin script.
$db_header_path = $db_script_path . "/header"; # Place to store header and footers.
$db_footer_path = $db_script_path . "/footer";
$build_search_url = $db_cgi_url . "/search.cgi"; # URL of search script.
$build_add_url = $db_cgi_url . "/add.cgi"; # URL of add script.
$build_modify_url = $db_cgi_url . "/modify.cgi"; # URL of modify script.
$build_jump_url = $db_cgi_url . "/jump.cgi"; # URL of jump script.
$build_email_url = $db_cgi_url . "/subscribe.cgi"; # URL of email update script.
$build_rate_url = $db_cgi_url . "/rate.cgi"; # URL of rate script.
$db_mail_url = $db_dir_url . "/nph-email.cgi"; # URL of admin mass mail script.
$build_css_url = $build_root_url . "/links.css"; # URL to your CSS file.

$db_lib_path = $db_script_path; # PATH of library files.
$db_links_name = "$db_script_path/data/links.db"; # PATH to links database.
$db_category_name = "$db_script_path/data/categories.db"; # PATH to category database.
$db_valid_name = "$db_script_path/data/validate.db"; # PATH to validation database.
$db_modified_name = "$db_script_path/data/modified.db"; # PATH to modification database.
$db_url_name = "$db_script_path/data/url.db"; # PATH to URL lookup database.
$db_email_name = "$db_script_path/data/email.db"; # PATH to email database.
$db_links_id_file_name = "$db_script_path/data/linksid.txt"; # PATH to links counter file.
$db_category_id_file_name = "$db_script_path/data/categoryid.txt"; # PATH to category counter file.
$db_hits_path = "$db_script_path/data/hits"; # PATH to hits directory.
$db_template_path = "$db_script_path/templates"; # PATH to templates.
$db_rates_path = "$db_script_path/data/rates"; # PATH to ratings.



cgi-bin/links/
drwxrwxrwx 3 art users 4096 Feb 25 13:47 .
drwxrwxrwx 19 art users 4096 Feb 17 01:54 ..
-rwxr-xr-x 1 art users 6043 Feb 25 03:10 add.cgi
drwxrwxrwx 5 art users 4096 Feb 25 01:03 admin
-rwxr-xr-x 1 art users 4836 Feb 25 03:10 jump.cgi
-rwxr-xr-x 1 art users 6849 Feb 25 03:10 modify.cgi
-rwxr-xr-x 1 art users 4173 Feb 25 03:10 rate.cgi
-rwxr-xr-x 1 art users 11623 Feb 25 03:10 search.cgi
-rwxr-xr-x 1 art users 4765 Feb 25 03:10 subscribe.cgi


cgi-bin/links/admin/
drwxrwxrwx 5 art users 4096 Feb 25 01:03 .
drwxrwxrwx 3 art users 4096 Feb 25 13:47 ..
-rw-r--r-- 1 art users 387 Feb 22 00:38 .htaccess
-rwxr-xr-x 1 art users 11924 Feb 25 01:02 Mailer.pm
-rwxr-xr-x 1 art users 4526 Feb 25 01:03 Template.pm
-rwxr-xr-x 1 art users 5842 Feb 25 03:11 admin.cgi
-rwxr-xr-x 1 art users 71023 Feb 25 01:02 admin_html.pl
drwxrwxrwx 2 art users 4096 Feb 25 01:01 backup
-rwxr-xr-x 1 art users 3119 Feb 25 01:02 category.def
drwxrwxrwx 4 art users 4096 Feb 25 13:33 data
-rwxr-xr-x 1 art users 37893 Feb 25 01:02 db.pl
-rwxr-xr-x 1 art users 23352 Feb 25 01:02 db_utils.pl
-rw-r--r-- 1 art users 13 Feb 21 23:27 htgroup
-rw-r--r-- 1 art users 20 Feb 21 23:27 htpasswd
-rwxr-xr-x 1 art users 10558 Feb 25 03:16 links.cfg
-rwxr-xr-x 1 art users 4670 Feb 25 01:02 links.def
-rwxr-xr-x 1 art users 47815 Feb 25 03:11 nph-build.cgi
-rwxr-xr-x 1 art users 7444 Feb 25 03:11 nph-email.cgi
-rwxr-xr-x 1 art users 7769 Feb 25 03:11 nph-verify.cgi
-rwxr-xr-x 1 art users 37115 Feb 25 01:03 site_html.pl
-rwxr-xr-x 1 art users 16355 Feb 25 01:03 site_html_templates.pl
drwxrwxrwx 2 art users 4096 Feb 2 08:54 templates

cgi-bin/links/admin/data/
drwxrwxrwx 4 art users 4096 Feb 25 13:33 .
drwxrwxrwx 5 art users 4096 Feb 25 01:03 ..
-rw-rw-rw- 1 art users 13 Feb 25 01:12 categories.db
-rw-rw-rw- 1 art users 1 Feb 25 01:12 categoryid.txt
-rw-rw-rw- 1 art users 0 Feb 25 01:01 email.db
drwxrwxrwx 2 art users 4096 Feb 25 01:01 hits
-rw-rw-rw- 1 art users 580 Feb 25 13:36 links.db
-rw-rw-rw- 1 art users 0 Feb 25 13:33 links.db.bak
-rw-rw-rw- 1 art users 1 Feb 25 13:35 linksid.txt
-rw-rw-rw- 1 art users 0 Feb 25 01:01 modified.db
drwxrwxrwx 2 art users 4096 Feb 25 01:01 rates
-rw-rw-rw- 1 art users 0 Feb 25 01:01 url.db
-rw-rw-rw- 1 art users 0 Feb 25 13:36 validate.db

Of the above I have moved the "backup" folder. Methinks it is either in the paths above... or something to do with the credit for Gossamer being removed from the template files. I checked this out and could't find any referrence... unless it's well hidden.

Otherwise it should be a standard install. It writes to links.db but not to url.db... then I tried adding a link to the url.db file and it still couldn't find the link ID

Only other mod was to the "new" folder name as the script didn't like the "N", but that doesn't figure in this as I haven't used that option for this testing.

All the folders and permissions seem to be ok and as advised. I do recall that when I had it woorking for the original testing that I did have problems in the "hits" folder. The script was creating the ID file but couldn't increment... also noticed that it didn't trip the counter. But as I say, this was much earlier and then I didn't have the "backup" folder in place anyway... but I did see it sort of working once.

If this was licenced would the scripts be different?

> >