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

fatal errors.....but only on two scripts?? very strange~~~>>

Quote Reply
fatal errors.....but only on two scripts?? very strange~~~>>
OK, I got everything up and running pretty well, I thought......admin section all works fine, adding categories, links, deleteing, modifying, etc..building pages works fine.....on main index page, I can rate a link, go to a random link, jump to a link with an ID, and search all just fine. BUT....when I attempt to ADD or MODIFY a link from the built pages, it returns a fatal error as follows:

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

Script Location : add.pl
Perl Version : 5.00404

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

Environment Variables
-------------------------------------------
CONTENT_LENGTH : 266
CONTENT_TYPE : application/x-www-form-urlencoded
DOCUMENT_ROOT : /home/usr42/html
GATEWAY_INTERFACE : CGI/1.1
HTTP_ACCEPT : image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*
HTTP_ACCEPT_CHARSET : iso-8859-1,*,utf-8
HTTP_ACCEPT_ENCODING: gzip
HTTP_CONNECTION : Keep-Alive
HTTP_HOST : www.mylittlecorner.com
HTTP_REFERER : http://www.mylittlecorner.com/cgi-bin/wsearch/add.pl
HTTP_USER_AGENT : Mozilla/4.08 (Macintosh; I; PPC, Nav)
PATH : /usr/local/bin:/usr/bin:/bin
QUERY_STRING :
REMOTE_ADDR : 168.191.127.154
REMOTE_PORT : 1525
REQUEST_METHOD : POST
REQUEST_URI : /cgi-bin/wsearch/add.pl
SCRIPT_FILENAME : /home/usr42/cgi-bin/wsearch/add.pl
SCRIPT_NAME : /cgi-bin/wsearch/add.pl
SERVER_ADMIN : usr42@localhost
SERVER_NAME : mylittlecorner.com
SERVER_PORT : 80
SERVER_PROTOCOL : HTTP/1.0
SERVER_SOFTWARE : Apache/1.3.3 (Unix) FrontPage/3.0.4.2


Now, I know this means ostensibly that I did not upload the add.cgi and the modify.cgi in ASCII mode, but I deleted each file and re-uploaded them several times, they ARE in ASCII and the path to perl is correct. If the other scripts in that directory work but not those two, what could possibly be the problem do you think??

------------------
-----------
Blessings,
Rhiannon
Quote Reply
Re: fatal errors.....but only on two scripts?? very strange~~~>> In reply to
It looks to me like something else is wrong. Either the name add.pl is incorrect (normally, it would be add.cgi), or the paths are not defined properly. What are the first 5 paths/urls in your links.cfg?
Quote Reply
Re: fatal errors.....but only on two scripts?? very strange~~~>> In reply to
Hi, and thank you for replying! =)
I do realize that the scripts are all named .cgi, but my server requires that all cgi scripts have the extension .pl, so I always change them if needed, and i THOUGHT I searched through all the files with a fine-toothed comb to change all the .cgi's to .pl's. Here are parts of my modified links.cfg:

# Paths and URL's to Important Stuff
# --------------------------------------------------------
# PATH and URL of Admin CGI directory. No Trailing Slash.
$db_script_path = "/home/usr42/cgi-bin/wsearch/admin";
$db_dir_url = "http://www.mylittlecorner.com/cgi-bin/wsearch/admin";

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

# PATH and URL of Pages to be built. No Trailing Slash.
$build_root_path = "/home/usr42/html/wsearch";
$build_root_url = "http://www.mylittlecorner.com/wsearch";

# 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";



THEN at the bottom, where the "extra paths are, I have:

# -------------------------------------------------------------
# Extra Paths -- unless you feel the need to rename files, you
# can leave this as is.
# -------------------------------------------------------------
$db_script_url = $db_dir_url . "/admin.pl"; # 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.pl"; # URL of search script.
$build_add_url = $db_cgi_url . "/add.pl"; # URL of add script.
$build_modify_url = $db_cgi_url . "/modify.pl"; # URL of modify script.
$build_jump_url = $db_cgi_url . "/jump.pl"; # URL of jump script.
$build_email_url = $db_cgi_url . "/subscribe.pl"; # URL of email update script.
$build_rate_url = $db_cgi_url . "/rate.pl"; # URL of rate script.
$db_mail_url = $db_dir_url . "/nph-email.pl"; # URL of admin mass mail script.
$build_css_url = $build_root_url . "/links.css"; # URL to your CSS file.

I caouldn't seem to find anyplace else where it said .cgi for anything, with the exception of the html for the admin section, which was easy enough to change and works fine.....*sigh* Thanks for any help you can give me =)


------------------
-----------
Blessings,
Rhiannon
Quote Reply
Re: fatal errors.....but only on two scripts?? very strange~~~>> In reply to
Well, there is no problem using .pl instead of .cgi as long as all the scripts are modified to use .pl instead. Looks like you have it covered pretty well to me. Your paths look okay as well.

However, you are still getting the "carriage return" error message. This means that something is not uploaded in ASCII. Perhaps it is one of the scripts required by add.pl. Try reuploading everthing in this list:

Quote:
require "admin/links.cfg"; # Change this to full path to links.cfg if you have problems.
require "$db_lib_path/db_utils.pl";
require "$db_lib_path/links.def";
$build_use_templates ?
require "$db_lib_path/site_html_templates.pl" :
require "$db_lib_path/site_html.pl";

I hope this helps.
Quote Reply
Re: fatal errors.....but only on two scripts?? very strange~~~>> In reply to
Great! Glad you got it solved. Just for reference for anyone else, the only file in the Links distribution that is not uploaded in ASCII mode is the background.gif file in the pages directory. All other files must be uploaded in ASCII mode.
Quote Reply
Re: fatal errors.....but only on two scripts?? very strange~~~>> In reply to
*sigh* grrrrr.......well, I delted everything and re-installed everything one file at a time....and get the EXACT same error!!! I really cannot figure what is going on? Could it be the mailer.pm module?? I tried to upload that individually, and my ftp program would not allow me to upload it is ASCII mode?? Does it need to be? Could that be causing errors only in add.pl and modify.pl??? Those are the only two scripts that I am getting this error on....

------------------
-----------
Blessings,
Rhiannon
Quote Reply
Re: fatal errors.....but only on two scripts?? very strange~~~>> In reply to
Whoa, never mind, I did it!!! For some reason, my ftp proggie didn't like the .pm modules, but when I uploaded more than one, it let me do it in ASCII mode (LoL) Everything looks to be working now.....wow, cool *G*
http://www.mylittlecorner.com/quest

------------------
-----------
Blessings,
Rhiannon