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

links.db is UN-chmodding??

Quote Reply
links.db is UN-chmodding??
Hello,

Something is screwy. I recently moved my domain to a new webhost and reinstalled Links 2.0 (and CHMOD'd everything right), etc., etc, to get it up and running again, and it's working fine except that when I validate sites and hten do the build, I go and see that none of the New sites are showing up in the What's New page. I had originally CHMOD links.db to rw-rw-rw- and had to do it again. Then today again, I add more links in and build. And again I check hte What's New Page, -- no links. So I checked links.db again, and it's once again back to just rw-rw-r--

the url if you want to go see for yourself is http://www.sanguinarius.org/...bin/links/pages/New/

Why is it UN-chmodding? What causes thsi, and how can I correct it?MadPirate I hope this isn't causing a loss of sites information! *alarmed look!* :(
--Sanguinarius
Your resident vampire ;P
http://www.sanguinarius.org/

Last edited by:

Sanguinarius: Dec 12, 2002, 2:10 AM
Quote Reply
Re: [Sanguinarius] links.db is UN-chmodding?? In reply to
Ever used the search tool? Wink

http://www.gossamer-threads.com/...i?post=136767#136767

That should sort your problem...

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] links.db is UN-chmodding?? In reply to
I am trying to use it but the only keywords I can figure out to use are things like links.db build new what's new etc, and they bring me back very many nonrelevant results :(

-----

This is an excerpt from the build page (I tried it staggered this time, too):



Quote:


** Creating What's New Pages . . .
Total New Links:
** Done (0 s)!

** Creating What's Cool Page. . .
Cool Links: 80
** Done (0 s)!

** Creating Top Rated Page. . .
Vote Range: 703 .. 68
Rate Range: 10.00 .. 9.62
** Done (0 s)!




It is not making new links it seems. It's the same type of server as what I was on, that I am on now, btw.
--Sanguinarius
Your resident vampire ;P
http://www.sanguinarius.org/
Quote Reply
Re: [Sanguinarius] links.db is UN-chmodding?? In reply to
Have you added any new links within the last x number of days? Unsure

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] links.db is UN-chmodding?? In reply to
In Reply To:
Ever used the search tool? Wink

http://www.gossamer-threads.com/...i?post=136767#136767

That should sort your problem...

Cheers


Quote:


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

# hhh added following line, from: http://www.gossamer-threads.com/...i?post=136767#136767

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

}


I followed those instructions (see above fragment) and ran the Build again and this time at the end, it tells me this:



Quote:


Done Pages Built (7 s)! CGI ERROR
==========================================
Error Message : fatal error: Illegal division by zero at /home/.sites/93/site73/web/cgi-bin/links/admin/nph-build.cgi line 342. Script Location : /home/.sites/93/site73/web/cgi-bin/links/admin/nph-build.cgi
Perl Version : 5.006 Form Variables
------------------------------------------- Environment Variables
-------------------------------------------
AUTH_TYPE : Basic
DOCUMENT_ROOT : /home/.sites/93/site73/web
GATEWAY_INTERFACE : CGI/1.1
HTTP_ACCEPT : application/vnd.ms-excel, application/msword, application/vnd.ms-powerpoint, image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_ACCEPT_LANGUAGE: en-us,x-ns1nq5RUg0INhQ;q=0.7,x-ns2r3809OnmPe2;q=0.3
HTTP_CONNECTION : Keep-Alive
HTTP_COOKIE : phpAds_blockView[3]=1039678474; phpAds_blockView[21]=1039678789; phpAds_blockView[9]=1039687407; phpAds_blockView[35]=1039678660; phpAds_blockView[63]=1039678228; phpAds_blockAd[63]=1039678228; phpAds_blockView[39]=1039678241; phpAds_blockView[37]=1039679459; phpAds_blockView[31]=1039679449; phpAds_blockView[18]=1039678800; phpAds_blockView[24]=1039678947; phpAds_blockView[28]=1039679031; phpAds_blockView[26]=1039679053; phpAds_blockView[64]=1039679411; phpAds_blockAd[64]=1039679411; phpAds_blockView[23]=1039679420; phpAds_blockView[78]=1039679439; phpAds_blockAd[78]=1039679739; phpAds_blockView[5]=1039687386; phpAds_blockView[32]=1039688018
HTTP_HOST : www.sanguinarius.org
HTTP_REFERER : http://www.sanguinarius.org/...i?display=navigation
HTTP_USER_AGENT : Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)
PATH : /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
PATH_INFO : /cgi-bin/links/admin/nph-build.cgi
PATH_TRANSLATED : /home/.sites/93/site73/web/cgi-bin/links/admin/nph-build.cgi
QUERY_STRING :
REDIRECT_SCRIPT_URI : http://www.sanguinarius.org/.../admin/nph-build.cgi
REDIRECT_SCRIPT_URL : /cgi-bin/links/admin/nph-build.cgi
REDIRECT_STATUS : 200
REDIRECT_UNIQUE_ID : PfhmJ9Hf2AIAAHdMMCI
REDIRECT_URL : /cgi-bin/links/admin/nph-build.cgi
REMOTE_ADDR : 208.191.39.143
REMOTE_HOST : adsl-208-191-39-143.dsl.tpkaks.swbell.net
REMOTE_PORT : 3582
REMOTE_USER : Sanguinarius
REQUEST_METHOD : GET
REQUEST_URI : /cgi-bin/links/admin/nph-build.cgi
SCRIPT_FILENAME : /home/.sites/93/site73/web/cgi-bin/links/admin/nph-build.cgi
SCRIPT_NAME : /cgi-bin/links/admin/nph-build.cgi
SCRIPT_URI : http://www.sanguinarius.org/.../admin/nph-build.cgi
SCRIPT_URL : /cgi-bin/links/admin/nph-build.cgi
SERVER_ADDR : 209.223.216.48
SERVER_ADMIN : admin
SERVER_NAME : www.sanguinarius.org
SERVER_PORT : 80
SERVER_PROTOCOL : HTTP/1.1
SERVER_SIGNATURE :
SERVER_SOFTWARE : Apache
UNIQUE_ID : PfhmJ9Hf2AIAAHdMMCI






And yes, I have added a number of new links today as well as a few days ago, when I first noticed they did not show up. (I didn't mention it then because this is the first that I have been able to find the time to deal with the problem.)

=====

P.S. When I tried to use:

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

I got a 500 Internal Server Error.
--Sanguinarius
Your resident vampire ;P
http://www.sanguinarius.org/

Last edited by:

Sanguinarius: Dec 12, 2002, 2:46 AM
Quote Reply
Re: [Sanguinarius] links.db is UN-chmodding?? In reply to
It may be not building the New pages, period?

Quote:



Updating New and Popular Records . . .
What's New Cutoff: 28 days
Popular Cutoff: 477 hits
Updating record: 4, marking as popular (1171).
Updating record: 5, marking as popular (781).
Updating record: 10, marking as popular (1456).
Updating record: 12, marking as popular (817).
Updating record: 14, marking as popular (514).
Updating record: 15, marking as popular (1442).
Updating record: 16, marking as popular (917).
Updating record: 17, marking as popular (504).
Updating record: 18, marking as popular (614).
Updating record: 32, marking as popular (1111).
Updating record: 48, marking as popular (807).
Updating record: 53, marking as popular (1003).
Updating record: 63, marking as popular (947).
Updating record: 64, marking as popular (2248).
Updating record: 86, marking as popular (1487).
Updating record: 90, marking as popular (745).
Updating record: 91, marking as popular (792).
Updating record: 92, marking as popular (668).
Updating record: 138, marking as popular (816).
Updating record: 170, marking as popular (1569).
Updating record: 174, marking as popular (1199).
Updating record: 180, marking as popular (1542).
Updating record: 181, marking as popular (731).
Updating record: 211, marking as popular (1186).
Updating record: 215, marking as popular (577).
Updating record: 217, marking as popular (531).
Updating record: 219, marking as popular (811).
Updating record: 220, marking as popular (644).
Updating record: 225, marking as popular (676).
Updating record: 233, marking as popular (572).
Updating record: 240, marking as popular (1067).
Updating record: 256, marking as popular (710).
Updating record: 302, marking as popular (798).
Updating record: 305, marking as popular (523).
Updating record: 307, marking as popular (1031).
Updating record: 332, marking as popular (1011).
Updating record: 359, marking as popular (501).
Updating record: 367, marking as popular (564).
Updating record: 370, marking as popular (1402).
Updating record: 380, marking as popular (534).
Updating record: 384, marking as popular (970).
Updating record: 430, marking as popular (992).
Updating record: 434, marking as popular (861).
Updating record: 442, marking as popular (492).
Updating record: 483, marking as popular (779).
Updating record: 486, marking as popular (1626).
Updating record: 534, marking as popular (484).
Updating record: 559, marking as popular (526).
Updating record: 560, marking as popular (538).
Updating record: 613, marking as popular (864).
Updating record: 628, marking as popular (643).
Updating record: 650, marking as popular (1024).
Updating record: 665, marking as popular (766).
Updating record: 675, marking as popular (513).
Updating record: 679, marking as popular (497).
Updating record: 693, marking as popular (2621).
Updating record: 694, marking as popular (3738).
Updating record: 708, marking as popular (479).
Updating record: 706, marking as popular (601).
Updating record: 745, marking as popular (1238).
Updating record: 744, marking as popular (1118).
Updating record: 773, marking as popular (1295).
Updating record: 792, marking as popular (715).
Updating record: 826, marking as popular (1178).
Updating record: 834, marking as popular (477).
Updating record: 874, marking as popular (798).
Updating record: 894, marking as popular (863).
Updating record: 890, marking as popular (1006).
Updating record: 908, marking as popular (642).
Updating record: 909, marking as popular (506).
Updating record: 923, marking as popular (793).
Updating record: 928, marking as popular (1081).
Updating record: 935, marking as popular (604).
Updating record: 933, marking as popular (2169).
Updating record: 939, marking as popular (944).
Updating record: 947, marking as popular (749).
Updating record: 1004, marking as popular (1739).
Updating record: 1049, marking as popular (622).
Updating record: 1062, marking as popular (477).
Updating record: 1402, marking as popular (546).
Done.
--Sanguinarius
Your resident vampire ;P
http://www.sanguinarius.org/
Quote Reply
Re: [Sanguinarius] links.db is UN-chmodding?? In reply to
Illegal division by zero is a problem with the rating files. Please search the forum, and you should find the filer (it requires deleting some files...but i can't remember what they are).

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] links.db is UN-chmodding?? In reply to
Well, it must not be at http://gossamer-threads.com/..._latest_reply;so=ASC; because I did that.



In nph-build.cgi:



Quote:


# hhh begin original code
#if (exists $votes{$id}) {
#$values[$db_rating] = (($values[$db_rating] * $values[$db_votes]) + $rating{$id}) /
#($values[$db_votes] + $votes{$id});
#$values[$db_rating] = sprintf ("%.2f", $values[$db_rating]);
#$values[$db_votes] = $values[$db_votes] + $votes{$id};
#print "\tUpdating rating to $values[$db_rating] for link id $id\n";
#}
# hhh end original code
# hhh code below replaces original code above (to fix 'illegal division by zero' error)
if (exists $votes{$id}) {
$values[$db_rating] = eval { (($values[$db_rating] * $values[$db_votes]) + $rating{$id}) / ($values[$db_votes] + $votes{$id}); };
if ($@) {
print "\tUpdating rating to $values[$db_rating] for link id $id\n";
}
$values[$db_rating] = sprintf ("%.2f", $values[$db_rating]);
$values[$db_votes] = $values[$db_votes] + $votes{$id};
print "\tUpdating rating to $values[$db_rating] for link id $id\n";
}
# hhh end replacement code

Quote:


I uploaded the file. I ran Build. I got:

Quote:


(long crap snipped)

Done

Pages Built (9 s)!

CGI ERROR
==========================================
Error Message : fatal error: Illegal division by zero at /home/.sites/93/site73/web/cgi-bin/links/admin/nph-build.cgi line 342.

Script Location : /home/.sites/93/site73/web/cgi-bin/links/admin/nph-build.cgi
Perl Version : 5.006

Form Variables
-------------------------------------------

Environment Variables
-------------------------------------------
AUTH_TYPE : Basic
DOCUMENT_ROOT : /home/.sites/93/site73/web
GATEWAY_INTERFACE : CGI/1.1
HTTP_ACCEPT : application/vnd.ms-excel, application/msword, application/vnd.ms-powerpoint, image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_ACCEPT_LANGUAGE: en-us,x-ns1nq5RUg0INhQ;q=0.7,x-ns2r3809OnmPe2;q=0.3
HTTP_CONNECTION : Keep-Alive
HTTP_HOST : www.sanguinarius.org
HTTP_REFERER : http://www.sanguinarius.org/...i?display=navigation
HTTP_USER_AGENT : Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)
PATH : /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
PATH_INFO : /cgi-bin/links/admin/nph-build.cgi
PATH_TRANSLATED : /home/.sites/93/site73/web/cgi-bin/links/admin/nph-build.cgi
QUERY_STRING :
REDIRECT_SCRIPT_URI : http://www.sanguinarius.org/.../admin/nph-build.cgi
REDIRECT_SCRIPT_URL : /cgi-bin/links/admin/nph-build.cgi
REDIRECT_STATUS : 200
REDIRECT_UNIQUE_ID : PfoLodHf2AIAAEVXyZU
REDIRECT_URL : /cgi-bin/links/admin/nph-build.cgi
REMOTE_ADDR : 208.191.38.155
REMOTE_HOST : adsl-208-191-38-155.dsl.tpkaks.swbell.net
REMOTE_PORT : 1207
REMOTE_USER : Sanguinarius
REQUEST_METHOD : GET
REQUEST_URI : /cgi-bin/links/admin/nph-build.cgi
SCRIPT_FILENAME : /home/.sites/93/site73/web/cgi-bin/links/admin/nph-build.cgi
SCRIPT_NAME : /cgi-bin/links/admin/nph-build.cgi
SCRIPT_URI : http://www.sanguinarius.org/.../admin/nph-build.cgi
SCRIPT_URL : /cgi-bin/links/admin/nph-build.cgi
SERVER_ADDR : 209.223.216.48
SERVER_ADMIN : admin
SERVER_NAME : www.sanguinarius.org
SERVER_PORT : 80
SERVER_PROTOCOL : HTTP/1.1
SERVER_SIGNATURE :
SERVER_SOFTWARE : Apache
UNIQUE_ID : PfoLodHf2AIAAEVXyZU


I know it is acted like I should know this stuff and what's wrong, but I don't. All I know is that for some reason, it's not working. I was on a certain type of server and it worked. I moved to a different webhost with the same type of server (RAQ) and everything's the same but it doesn't work now. It should work, there's no logical reason why it doesn't/won't, and when I do the things that are "fixes", they don't help any.

*stupid cow look* Moo... ;o} :o| *sigh* :o{
--Sanguinarius
Your resident vampire ;P
http://www.sanguinarius.org/

Last edited by:

Sanguinarius: Dec 13, 2002, 9:44 AM
Quote Reply
Re: [Sanguinarius] links.db is UN-chmodding?? In reply to
In reply to the post at http://www.gossamer-threads.com/...arent_post_id=168478

In Reply To:
Hi,

This error may caused by some null linkid in the links.db. Please find out which linkid is null or zero and then update them

Cheers,


If this is referring to looking in links.db (and/or url.db for that matter), and looking at the link id which is the number before the first | on the left side (beginning of the line) to see if any beigin with 0, 00, 000, etc, or are empty before the first | divider, or if the space contains any nonnumeric characters, then this is not my problem because the database is in order.

I didn't have the "illegal division by zero" error until I applied some "fix" that was intended to keep my links.db file chmodded at rw-rw-rw instead of changing to rw-rw-r--. Before I applied that "fix", all I had wrong was the fact that when link.db gets updated, it becomes only rw-rw-r-- and that my What's New links are not showing up, or possibly even being created.

Maybe I'm wrong, or maybe I'm just too dumb, but it seems to me that we're trying to fix problems that are being created from problems created by fixes that do not work. I feel that the problem I'm trying to deal with now -- the "illegal division by zero" error may not have anything to do with keeping links.db not chmodding as rw-rw-rw-.

(And another thing: I'm told to look in the search for answers to the "illegal division by zero" thing, but all I come up with are people asking about it and replies saying, " Look in the search..." Is there some way to exclude THOSE from the search results?)

It's very frustrating when the official "fix" only makes more problems than the ones I originally had. Now, I have to fix those before I can get back to addressing the original, still unsolved, problem? I don't know enough, obviously. Is there somebody that I could just pay to fix it? Can I ask that? I know there are Installers, but..it's already installed. I can and have installed it at least 4 or 5 times before (2x for somebody else, even!). I need it looked at, or something! (???)Pirate
--Sanguinarius
Your resident vampire ;P
http://www.sanguinarius.org/

Last edited by:

Sanguinarius: Dec 13, 2002, 9:43 AM
Quote Reply
Re: [Sanguinarius] links.db is UN-chmodding?? In reply to
I removed the two "fixes", and now everything is working fine except for the problem of the "What's New" links not showing up (or being built) and the links.db file not stayiong chmodded at rw-rw-rw- (it gets changed to rw-rw-r--). This is my original problem.



At least I got the "illegal division by zero" error taken care of. I removed the code I added which started casuing it to say that while at the same time not solving the other problem. :> Now that I'm back to the first problem again.....
--Sanguinarius
Your resident vampire ;P
http://www.sanguinarius.org/
Quote Reply
Re: [Sanguinarius] links.db is UN-chmodding?? In reply to
Well, I looke at the files on the server at my old webhost (which fortunately, I have not canceled my accounnt there yet!!!), and where I had no problems (specifically, no problems with the what's new not registering). The links.db there was also rw-rw-r-- so apparently that is not even an issue.

Which still leaves me only the one problem of the "What's New" not showing, building etc., on my new server. I looked an the newly validated links *are* in the database. When I browse in the directory like I'm a surfer, they turn up in search results and the date on them is the data I added them. Their detailed page shows up, even... But they are not present on the "Waht's New" page and when I build the directory, there are none that get marked as new and the what's new text shows nothing.

The paths are all correct. At any rate, the "What's Cool" and "Top Rated" pages are getting built and all. I don't see an5ything different about those that would make them show up and the "Waht's New" page NOT show up or get built, etc.

=====

Is there some way to split this thread? As I don't think it is relevant anymore to the original title.

I am and have been looking and looking (and looking) in the search results for something that is similar to MY problem, to no avail. I am not getting any sort of cgi errors or anything. All the results I see have to do with errors... Maybe I just don't know the right things to search for. I looked in the FAQs and saw something about RAQ servers but the link was no good so THAT didn't help.
--Sanguinarius
Your resident vampire ;P
http://www.sanguinarius.org/