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

nph-build.cgi Error! Plz Help!

Quote Reply
nph-build.cgi Error! Plz Help!
Hello

I'm trying to setup links 2.1. Following the step by step instructions provided in readme.txt - everything seemed to work fine until i hit the Build All link. I get a 500 Internal Server Error message and checking the error log file shows following:

[Sat Mar 3 06:51:43 2001] [error] [client 24.205.183.81] attempt to include NPH CGI script:
/data/aapkelinks/cgi-bin/links/admin/nph-build.cgi
[Sat Mar 3 06:51:43 2001] [error] [client 24.205.183.81] MOD_VR9: Error 403 occured while processing :
/data/aapkelinks/cgi-bin/links/admin/nph-build.cgi

I have double checked all permissions and made sure that files are uploaded in ASCII. I have gone through this forum and FAQ section to find a possible solution but nothing has worked. You guys are my last hope. PLEASE help! I'd really appreciate it.

Deep Impact

Quote Reply
Re: nph-build.cgi Error! Plz Help! In reply to
Just found out that if i try to run add.cgi etc from outside the admin pannel they are also giving all sorts of errors. I have configured the local path and path to perl etc just as specified by my host but seems like something is really wrong... i haven't passwod protected the cgi-bin dir yet so you can go to http://aapkelinks.vr9.com/cgi-bin/links/ and see for urself all that is going on. Any help at all will be greatly appreciated.

Thanks
Deep Impact

Quote Reply
Re: nph-build.cgi Error! Plz Help! In reply to
For starters are you on a RAQ3/4?

In all of the nph- files in the admin dir find $nph++ and comment it out.....like....

# $nph++;


Secondly.....what errors are your other cgi script giving...being more specific will help us to answer more efficiently.

Paul Wilson.
Installations:
http://www.wiredon.net/gt/
Quote Reply
Re: nph-build.cgi Error! Plz Help! In reply to
Hi Paul

No i'm not on a RAQ. Actually i'm trying to setup links on a FREE web server http://www.vr9.com
in the following account: http://aapkelinks.vr9.com/

I havn't password protected my dir yet so all the errors can be viewed if you try to run links from my site. FAQ about what kinda server etc my site is being hosted on can be found on http://www.vr9.com in FAQ section.

Here's a copy of my links.cfg:

# Paths and URL's to Important Stuff
# --------------------------------------------------------
# PATH and URL of Admin CGI directory. No Trailing Slash.
$db_script_path = "/data/aapkelinks/cgi-bin/links/admin";
$db_dir_url = "http://aapkelinks.vr9.com/cgi-bin/links/admin";

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

# PATH and URL of Pages to be built. No Trailing Slash.
$build_root_path = "/data/aapkelinks/links";
$build_root_url = "http://aapkelinks.vr9.com/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 = 1;
# 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 = '/var/qmail/bin/qmail-inject'; $db_smtp_server = '';

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

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

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

# 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.html";
# The extension to use for non index files:
$build_extension = ".html";

# 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 = 10;

# 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 = 'Aapke Links';

I really appreciate your willingness to help me out. Thanks a million in advance.

Best Regards
Deep Impact

Quote Reply
Re: nph-build.cgi Error! Plz Help! In reply to
Double check your paths because they look incorrect......

$db_script_path = "/data/aapkelinks/cgi-bin/links/admin";

$build_root_path = "/data/aapkelinks/links";




Paul Wilson.
Installations:
http://www.wiredon.net/gt/
Quote Reply
Re: nph-build.cgi Error! Plz Help! In reply to
Yes, but the first is where the cgi is (in the cgi dir), and the second is where the pages are written to, so these are correct?

Quote Reply
Re: nph-build.cgi Error! Plz Help! In reply to
Err yes I know what they are but I said that they look incorrect!



Double check them!

Paul Wilson.
Installations:
http://www.wiredon.net/gt/
Quote Reply
Re: nph-build.cgi Error! Plz Help! In reply to
Yes, but I'm asking how they look incorrect, because they look correct to me.

Quote Reply
Re: nph-build.cgi Error! Plz Help! In reply to
Normally hosted accounts are like..

/home/username/www.domain.com/web

or

/home/username/www.domain.com/htdocs

or

/home/username/www.domain.com/www

SO I was saying that your paths don't look like that so they may not be correct.

Did your host tell you that these were the correct paths?



Paul Wilson.
Installations:
http://www.wiredon.net/gt/
Quote Reply
Re: nph-build.cgi Error! Plz Help! In reply to
Mine looks like opt2/home3/mydomain/public_html/

I've never seen the path include "www.domain.com".

Guess different hosts are different...

Quote Reply
Re: nph-build.cgi Error! Plz Help! In reply to
Well if youve never seen a path with www.domain.com then what is this in your path.........

opt2/home3/mydomain/mydomain/public_html

SOME servers use domain.com and some use domain-www and SOME www.domain.com

Paul Wilson.
Installations:
http://www.wiredon.net/gt/
Quote Reply
Re: nph-build.cgi Error! Plz Help! In reply to
Hey, don't get so upitty... I was just saying that his path looked ok to me.

In answer to your question, with *my* domain (and I *am* only talking about *my* domain, although *non* of the dozens of other accounts I've worked with are any different).

/op2/home3/mydomain/public_html

where the URL for mydomain is www.mydomain.com.

The path to *my* domain does not include the "www." or ".com". Only the URL does.

Did you notice where I said I'd never seen it any other way? Did you notice I *never* said you where wrong? Cool your jets.

Quote Reply
Re: nph-build.cgi Error! Plz Help! In reply to
I wasn't being upitty.....sorry if you felt that way....I was just pointing out the possible paths.

Maybe the bold text was too abrupt?

Paul Wilson.
Installations:
http://www.wiredon.net/gt/
Quote Reply
Re: nph-build.cgi Error! Plz Help! In reply to
Hello Paul,

i have problem here, the nph-build.cgi was error on my server. i`m using cobalt raq4. can u show me how to fix this error.

Quote Reply
Re: nph-build.cgi Error! Plz Help! In reply to
In build_staggered and build_all find

$nph++;

and change it to

#$nph++;

Paul Wilson.
Installations:
http://www.wiredon.net/gt/
Quote Reply
Re: nph-build.cgi Error! Plz Help! In reply to
I had this exact same problem and commented out $nph++; in the two subroutines mentioned above. It allowed me to view the error, which was that Links could not access the backup files.

I then chmod'd my backup directory to 777 and everything worked fine. I doublechecked the readme and it did not mention chmodding that directory.

Try that and see if it solves your problem.

| www.meltedmonitor.com |
Quote Reply
Re: nph-build.cgi Error! Plz Help! In reply to
Let me state that when I uncommented the $nph++; line I again started receiving errors, so it was a combination of both.

| www.meltedmonitor.com |
Quote Reply
Re: nph-build.cgi Error! Plz Help! In reply to
I had this problem as well and it turned out my server could not execute nph files.
The solution was to trick the server to print by adding the following in nph-build.cgi:

#!/usr/bin/perl
print "Content-type: text/plain\n\n";

Hope this helps.

http://tommatthews.net
Quote Reply
Re: nph-build.cgi Error! Plz Help! In reply to
Its $nph++; Paul....lol Cool

Andy

webmaster@ace-installer.com
http://www.ace-installer.com
Quote Reply
Re: nph-build.cgi Error! Plz Help! In reply to
Actually I know Andy but sometimes this forum parses out plus signs so that is what happened in this case Wink

Anyway, I've just replaced them with their ASCII value.

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