Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Change of Server - Error 500

Quote Reply
Change of Server - Error 500
I moved server in November (still with same host)and since then none of my cgi files has worked. My link list has been non-operational. My host says I have illegal carriage returns in some files. I have downloaded another copy of the script and replaced the old copy but still no luck. Anyone encountered and overcome one of these.
Quote Reply
Re: [hopey] Change of Server - Error 500 In reply to
1) Check your error log
2) Post the error content here
Quote Reply
Re: [Paul] Change of Server - Error 500 In reply to
I posted the latest log on this page. I wanted my host to take a look.

http://www.netsexindex.com/cgierror.html

If that isn't much help, I will post more.

Thanks
Quote Reply
Re: [hopey] Change of Server - Error 500 In reply to
Erm, you were running admin.cgi via telnet? Unsure

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] Change of Server - Error 500 In reply to
I am a complete novice at this. My host adviced me to use SecureCRT to SSH in to my server and run the scripts. This will throw up any errors especially the illegal carriage returns and then I can remove them. I will post more logs anyway.

Cheers
hopey
Quote Reply
Re: [hopey] Change of Server - Error 500 In reply to
You could try adding this to the top of admin.cgi, and then running it from the browser;

use CGI::Carp qw(fatalsToBrowser);

It should give us better details on the 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] Change of Server - Error 500 In reply to
admin.cgi works to the point of validating links. Then I get this:

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

Script Location : /var/usr2/netsexindex.com/cgi-bin/links/admin/admin.cgi
Perl Version : 5.00401



If there are more carriage returns to strip, how can I find them.

Thanks
Hopey
Quote Reply
Re: [hopey] Change of Server - Error 500 In reply to
That error is usually related to uploading the file in BINARY versus ASCII mode. Try re-uploading the file via ASCII mode.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Stealth] Change of Server - Error 500 In reply to
Stealth,

I have uploaded in ASCII mode. Now I just get this for any CGI file:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, ***** and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.



--------------------------------------------------------------------------------

Apache/1.3.24 Server at ****** Port 80


This is where I was at before trying to strip the CR manually.

Thanks
hopey

Last edited by:

hopey: Feb 25, 2003, 12:38 AM
Quote Reply
Re: [Andy] Change of Server - Error 500 In reply to
Andy,

What other way(s) can I run a .cgi file to find where there are errors? This was how my host adviced me.

Cheers
hopey
Quote Reply
Re: [Stealth] Change of Server - Error 500 In reply to
Stealth,

I also got these messages after stripping carriage returs on one of the cgi.files. Are these warnings or errors.

=============

Ambiguous use of log => resolved to "log" => at add.cgi line 166.
Name "main::build_root_url" used only once: possible typo at add.cgi line 61.
Name "main::build_use_templates" used only once: possible typo at add.cgi line 31.
Name "main::db_mail_path" used only once: possible typo at add.cgi line 161.
Name "main::db_smtp_server" used only once: possible typo at add.cgi line 160.
Name "main::db_mailer_log" used only once: possible typo at add.cgi line 167.
Name "main::db_single_category" used only once: possible typo at add.cgi line 58.
Name "main::db_modified" used only once: possible typo at add.cgi line 92.
Name "main::db_script_url" used only once: possible typo at add.cgi line 137.
Name "main::db_contact_email" used only once: possible typo at add.cgi line 135.

====================


Thanks
hopey
Quote Reply
Re: [hopey] Change of Server - Error 500 In reply to
debugging info if you are using the -w switch.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [hopey] Change of Server - Error 500 In reply to
have you set permissions on the cgi files to 755?

Klaus

http://www.ameinfo.com
Quote Reply
Re: [klauslovgreen] Change of Server - Error 500 In reply to
In Reply To:
have you set permissions on the cgi files to 755?
The permissions must be set correctly if the program is sending several warnings to a log file.

If they were incorrect, it wouldn't execute at all.
Quote Reply
Re: [wysardry] Change of Server - Error 500 In reply to
Thats not true. I can chmod a cgi file to 777 and it will write to STDERR.
Quote Reply
Re: [Paul] Change of Server - Error 500 In reply to
Every warning as if it executed completely, or just a single error explaining why it didn't execute?
Quote Reply
Re: [klauslovgreen] Change of Server - Error 500 In reply to
Permissions are set to 755.
I re-uploaded the script and still having no luck.

I got this error message when I tried to run admin.cgi.

========

Illegal character \015 (carriage return) at admin.cgi line 22.
(Maybe you didn't strip carriage returns after a network transfer?)

=========

But line 22 of admin.cgi lopks fine, like this

16 # This script is not freeware! Please read the README for full details
17 # on registration and terms of use.
18 # ===============================
19 #
20 # Required Librariers
21 # --------------------------------------------------------
22 eval {
23 ($0 =~ m,(.*)/[^/]+,) && unshift (@INC, "$1"); # Get the script location: UNIX /
24 ($0 =~ m,(.*)\\[^\\]+,) && unshift (@INC, "$1"); # Get the script location: Windows \


===================

I don't see any carriage return at line 22. I'm so confused. Could my server be the problem at all.

Thanks for all your help guys.

Hopey
Quote Reply
Re: [hopey] Change of Server - Error 500 In reply to
put your cursor at the beginning of line 23 and backspace until you get:

Code:
22 eval {($0 =~ m,(.*)/[^/]+,) && unshift (@INC, "$1"); # Get the script location: UNIX /
23 ($0 =~ m,(.*)\\[^\\]+,) && unshift (@INC, "$1"); # Get the script location: Windows \


but I bet you get another error


Gene
"The older I get, the more I admire competence, just simple competence in any field from adultery to zoology."
Quote Reply
Re: [esm] Change of Server - Error 500 In reply to
Yup, same error message for every line without a "#" at the end. Is that normal? The script worked ok before i moved server.

hopey
Quote Reply
Re: [hopey] Change of Server - Error 500 In reply to
maybe you should change hosts?


Gene
"The older I get, the more I admire competence, just simple competence in any field from adultery to zoology."
Quote Reply
Re: [hopey] Change of Server - Error 500 In reply to
It sounds as if you're on a Windoze system, and your host is using UNIX, and you aren't uploading in ASCII mode.

In text files (including Perl source), Windows uses a carriage return and a line break at the end of every line, Macs use a carriage return only, and UNIX uses a line break only.

To counteract that, upload all non-image files in ASCII mode, and all images in binary mode in your FTP client.
Quote Reply
Re: [wysardry] Change of Server - Error 500 In reply to
I am on a windows system but I uploaded the files in ASCII mode. The thing is, everything worked ok until I moved to a smaller server with the SAME host.


hopey