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

CGI Error with nph-build.cgi

Quote Reply
CGI Error with nph-build.cgi
Hello all,
i'm frenchy guy, and not very good and english, sorry :-(
i recently install the links2 product and work find but don't want building my pages.
The error look like this :


CGI ERROR
==========================================
Error Message : fatal error: (Maybe you didn't strip carriage returns after a network transfer?)

Script Location : nph-build.cgi
Perl Version : 5.00404

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

Environment Variables
-------------------------------------------
AUTH_TYPE : Basic
DOCUMENT_ROOT : /www/studiojb
GATEWAY_INTERFACE : CGI/1.1
HTTP_ACCEPT : */*
HTTP_ACCEPT_LANGUAGE: fr
HTTP_AUTHORIZATION : Basic c3R1ZGlvamI6MTkxMTY1
HTTP_CONNECTION : Keep-Alive
HTTP_COOKIE : uname=studiojb; pword=191165
HTTP_EXTENSION : Security/Remote-Passphrase
HTTP_HOST : www.studiojb.com
HTTP_IF_MODIFIED_SINCE: Sat, 05 May 2001 01:17:57 GMT
HTTP_REFERER : http://www.studiojb.com/cgi-bin/futsal/links2/admin/admin.cgi?display=navigation
HTTP_UA_CPU : PPC
HTTP_UA_OS : MacOS
HTTP_USER_AGENT : Mozilla/4.0 (compatible; MSIE 5.0b1; Mac_PowerPC)
PATH : /usr/local/bin:/usr/bin:/bin
QUERY_STRING :
REMOTE_ADDR : 193.253.182.204
REMOTE_PORT : 3039
REMOTE_USER : studiojb
REQUEST_METHOD : GET
SCRIPT_FILENAME : /www/studiojb/cgi-bin/futsal/links2/admin/nph-build.cgi
SCRIPT_NAME : /cgi-bin/futsal/links2/admin/nph-build.cgi
SERVER_ADMIN : webmaster@studiojb.com
SERVER_NAME : www.studiojb.com
SERVER_PORT : 80
SERVER_PROTOCOL : HTTP/1.1
SERVER_SOFTWARE : Apache/1.3.4 (Unix) FrontPage/4.0.4.3 PHP/3.0.14

I've checked the permissions for :
nph-build.cgi -> 755
admin and data directory -> 777
all the cgi to 755

I don't understand what's the matter. Have anybody an idea ?
Thanks in advance to answer and help me to find the pb

jerome brachet


Quote Reply
Re: CGI Error with nph-build.cgi In reply to
sorry for the explanation, i forget to say that the building pages are good, but no preview in the home.htm.
The exact and complete message is :

Links Manager: Building Pages

Building Pages

Pages built on 4-May-2001 at 20:06:54
--------------------------------------------------------

Backing up database . . .
Backup exists for today.. Skipping
Done.

Building URL Index . . .
Done.

Updating New and Popular Records . . .
What's New Cutoff: 14 days
Popular Cutoff: 2 hits
Updating record: 3, marking as new.
Done.

Updating ratings ..
Done.

Loading Category Information . . .
Done.

Gathering Category and Link information . . .
Done

Building Home Pages . . .
Subcategories: 6
Total Links: 1
Opening page: /www/studiojb/futsal/links2/pages/index.html



CGI ERROR
==========================================
Error Message : fatal error: (Maybe you didn't strip carriage returns after a network transfer?)

Script Location : nph-build.cgi
Perl Version : 5.00404

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

Environment Variables
-------------------------------------------
AUTH_TYPE : Basic
DOCUMENT_ROOT : /www/studiojb
GATEWAY_INTERFACE : CGI/1.1
HTTP_ACCEPT : */*
HTTP_ACCEPT_LANGUAGE: fr
HTTP_AUTHORIZATION : Basic c3R1ZGlvamI6MTkxMTY1
HTTP_CONNECTION : Keep-Alive
HTTP_COOKIE : uname=studiojb; pword=191165
HTTP_EXTENSION : Security/Remote-Passphrase
HTTP_HOST : www.studiojb.com
HTTP_IF_MODIFIED_SINCE: Sat, 05 May 2001 01:17:57 GMT
HTTP_REFERER : http://www.studiojb.com/cgi-bin/futsal/links2/admin/admin.cgi?display=navigation
HTTP_UA_CPU : PPC
HTTP_UA_OS : MacOS
HTTP_USER_AGENT : Mozilla/4.0 (compatible; MSIE 5.0b1; Mac_PowerPC)
PATH : /usr/local/bin:/usr/bin:/bin
QUERY_STRING :
REMOTE_ADDR : 193.253.182.204
REMOTE_PORT : 3039
REMOTE_USER : studiojb
REQUEST_METHOD : GET
SCRIPT_FILENAME : /www/studiojb/cgi-bin/futsal/links2/admin/nph-build.cgi
SCRIPT_NAME : /cgi-bin/futsal/links2/admin/nph-build.cgi
SERVER_ADMIN : webmaster@studiojb.com
SERVER_NAME : www.studiojb.com
SERVER_PORT : 80
SERVER_PROTOCOL : HTTP/1.1
SERVER_SOFTWARE : Apache/1.3.4 (Unix) FrontPage/4.0.4.3 PHP/3.0.14



Quote Reply
Re: CGI Error with nph-build.cgi In reply to
The error message indicates that you haven't uploaded your files in ASCII, but in binary. Refer to the README file.

Thomas
http://www.japanreference.com
Quote Reply
Re: CGI Error with nph-build.cgi In reply to
Hello Thomas,
first, thanks to take times for answer to my question.

reloading the file nph-build.cgi in ascii mode is the first thing i've made, but the results is the same. Always this stupid message ! The true is away … and i continue to search …

Quote Reply
Re: CGI Error with nph-build.cgi In reply to
Triple check your FTP settings...make sure that you have specified the following extensions to be uploaded in ASCII mode:

.cgi
.pl
.db
.def
.cfg
.pm

etc....

Regards,

Eliot Lee
Quote Reply
Re: CGI Error with nph-build.cgi In reply to
Hello Elliot and Thomas, and thanks a lot to give me your help to configure Links2.

i'm back with a good and bad news.
The good new is that i've reloaded the files with ascii mode then it was good, no error message when building pages. Thanks a lot

The bad new is that after i set up the category name and add a link, no error message but nothing in the index.html page. All seem to be functionaly, but the index.html is blank !

Don't understand what the matter, verified the paths, checked the links.cfg, but i find nothing to change.
Perhaps an other CHMOD error
Certainly i'm a very silly dummy guy !

Can you take yet time to see whats's wrong below ?
As you will see, my html folder isn't in the links directory:
admin dir -> http://www.studiojb.com/cgi-bin/futsal/links2/
with CHMOD 775

index.html file -> http://www.studiojb.com/futsal/links2/pages/
with CHMOD for files and folder : 777

all the CGI files in CHMOD 755

all the templates files in templates dir with CHMOD 777

This is a part of my links.cfg file :
# Paths and URL's to Important Stuff
# --------------------------------------------------------
# PATH and URL of Admin CGI directory. No Trailing Slash.
$db_script_path = "/home/www/studiojb/cgi-bin/futsal/links2/admin";
$db_dir_url = "http://www.studiojb.com/cgi-bin/futsal/links2/admin";

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

# PATH and URL of Pages to be built. No Trailing Slash.
$build_root_path = "/home/www/studiojb/futsal/links2/pages";
$build_root_url = "http://www.studiojb.com/futsal/links2/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/votes";
$build_ratings_url = "$build_root_url/votes";

# 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/sbin/sendmail'; $db_smtp_server = '';

# Email address of the administrator. BE SURE TO SET!
$db_admin_email = 'webmaster@futsal.asso.fr';

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


Quote Reply
Re: CGI Error with nph-build.cgi In reply to
Read the README file again...triple check all your folder permissions (like make sure that the pages folder is chmod 777) along with the New, Cool, and Ratings folders).

Regards,

Eliot Lee
Quote Reply
Re: CGI Error with nph-build.cgi In reply to
Hello eliot,
As i say it before i check this CHMOD at least 10 times
all the folder in the tree and particulary pages, votes, new and cool are all in CHMOD 777 (the files too).
I think that the readme.txt isn't very detailed about the CHMOD. For example what's CHMOD for the admin directory. There's no enough explanations in this file, about files and folder's permissions. A lot of messages in this board are related to this issue. And it is not very clear for me. Anyway thanks to try to help me !

Quote Reply
Re: CGI Error with nph-build.cgi In reply to
There is a FAQ in the Links -> FAQ section of the Resources section that provides a COMPLETE list of folder/file permissions!

Regards,

Eliot Lee
Quote Reply
Re: CGI Error with nph-build.cgi In reply to
ok Eliot,
thanks to give me the info, i'was trying to find it in this board and don't have seen the others boards.
The right URL for the complete CHMOD is :
http://www.gossamer-threads.com/perl/forum/showthreaded.pl?Cat=&Board=L2Unix&Number=84226&page=0&view=collapsed&sb=5&vc=1

thanks a lot for all you have made for help me
Au revoir et à bientôt,
JB