eAuction
  Not just another Perl script
Google
Welcome, Guest. Please Login or Register


If you use eAuction a lot and like it or if you make money from eAuction or from eAuction-related activities ...
then the project asks you for a donation in favor of the further development.



The forums are protected by
AccessControl
(written by Dieter Werner)
Click here if you want to check your IP against the most important RBLs of the net.
Click here in order to visite the AccessControl forums.


<< Visit the international e Auction Marketplace >>
Buy and sell PC and Consumer Electronic components






  HomeHelpSearchLoginRegister
 



Pages: 1 2 3 4 
getting 500 internal error when editing the text (Read 2470 times)
designsedge
eAuction Novice
*
Offline

I Love Perl

Posts: 2

Re: getting 500 internal error when editing the te
Reply #6 - 06/10/06 at 23:10:28
 
Make sure that you are saving the file ANSI and not UTF-8, I had the same problem earlier.
Back to top
 
 


Advertising
View Profile   IP Logged
gpspigeon
eAuction Novice
*
Offline

I Love Perl

Posts: 2

Re: getting 500 internal error when editing the te
Reply #7 - 07/20/06 at 04:49:48
 
#!/bin/sh
#
# Version 1.00
#
# A shell script for eliminating pesky DOS or Windows
# "carriage returns" from text files such as are used for
# programming in Perl.
#
# By peter@gregg.homelinux.net
# 20th July, 2006
#
# Are you baffled by server error (500) errors while executing
# a Perl script?
#
# Although there may be other reasons, this filter
# script should eliminate one of the most common causes of the error
# especially if you are trying to execute programmes that at some stage
# have been manipulated in a DOS or Windows environment.
#
# Background:-
# In text files, DOS and Windows delineate lines with a
# carriage return line feed combination (CRLF). Linux
# (and all Unix and Unix workalikes) use only a line feed (LF).
#
# "Perl" language programmes can fail and produce server errors (500)
# if the (CRLF) end of line format exists. To safeguard against "corrupt"
# Perl scripts this shell script will filter and remove those troublesome
# carriage returns. It works on single files and on wildcards by converting
# each file from DOS/Windows to UNIX format or, if the file is already in UNIX
# format then no conversion will take place. It keeps a backup of the file used
# at the time of running the script and retains the original file date and
# time by using the "touch" command.
#
# CAUTION:-
# This script must NEVER be used against binary files because it will
# irretrievably corrupt a binary file.
#
# The script is as simple as possible however it would be a good idea
# to also backup any files on which you intend to run the script. Use a safe
# area outside the directory that holds the files you wish to filter and be sure
# to make the copies prior to the actual execution of the script on the target files.
#
# Either type or cut and paste this document into your TEXT EDITOR.
# Never use a word processor like Windows Word or Wordperfect for editing
# programmes as they add formatting information to the file that corrupts it
# for the target application. You may leave out the comments but don't forget
# to include the very first line in this script i.e."#!/bin/sh" as it is used by the
# shell in the execution of the utility.
# (It may be necessary to adjust the first line if your environment uses a
# different shell or if it is located in a different path)
# Save the file with a suitable name e.g. filterCR
# Make the file executable. e.g. chmod 755 filterCR
# Copy the executable file to the /usr/bin directory
# You should now be ready to return to the directory containing the files you
# wish to filter and run your new utility.
# At your command prompt type e.g. filterCR ./filename
#
# Your filtered file is now ready for further use in Perl.
#
while [ $1 ]; do {
     echo Converting $1
     cp $1 $1.bak
     touch -r $1 $1.bak
     cat $1.bak | sed s/[[:cntrl:]M]$//g > $1
     touch -r $1.bak $1
     shift
}
done      
#
# PS. If you find this utility saves you days of frustration similar to what
# I experienced (along others in the forum) while trying to get Everyscripts
# "eAuction" up and running due to this very reason, please consider sending
# a small donatation to Dieter Werner so that he may quench his thirst and
# keep up his excellent work on the eAuction project. You will know if the
# script has saved you much heartache if the file created after running the
# script has fewer characters in it than the original. (There will be one less
# character for each line processed)
#
# Have fun!
# Peter Gregg - Brisbane Australia
Back to top
 
« Last Edit: 07/20/06 at 06:07:11 by gpspigeon »  


Advertising
View Profile   IP Logged
ludwig_von_rocht
eAuction Novice
*
Offline

Linux Rocks!

Posts: 1
La Feria, TX
Gender: male
Re: getting 500 internal error
Reply #8 - 08/03/06 at 17:26:46
 
I am also getting this error message, but I haven't made any changes to the code yet. I'm using Dreamweaver MX 2004, I have changed the settings to save file as Unix newlines, uploaded after downloading from site, changed permissions according to installation/configuration files, try to view in browser, and I get 500 Internal Server Error. In the Apache error log, I get the following:

[Thu Aug 03 10:20:14 2006] [error] [client xxx.xxx.xxx.xxx] (2)No such file or directory: exec of '/home/webint/cgi-bin/eAuction161/eAuction.pl' failed
[Thu Aug 03 10:20:14 2006] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers: eAuction.pl

I've tried creating the directories for closed and userreg, but that didn't work either.
Any ideas?
Back to top
 
 


Advertising
View Profile | YIM   IP Logged
Pages: 1 2 3 4 


If you like eAuction, please Rate it.
If you don't like eAuction, please Rate it too.


1 is being poor and 10 is being excellent


EveryScript

ip-location


AccessControl - Members Only