Uploading CGI Scripts
Common Reasons For 500 Error Messages:
1. It is vitally important that you use the proper permissions
for all cgi files. All
executable cgi scripts must be chmod to 755. All folders that
contain cgi
scripts (Including the cgi-bin and any folders within the cgi-bin)
must be
chmod to 755. Dirs and files that your cgi script writes data to
must be chmod to 777.
2. If you use an FTP program to upload your scripts, you must use
ASCII mode. If you use 'Binary', your script will not work.
3. Wrong absolute
server path setups in config.pl file.
Download This is a script that
displays your absolute server path statements, and path to the
sendmail exc.. need for the setup of most cgi perl scripts
===== FAQ and
Troubleshooting =====
Q. How do I
find my absolute server path statement info that goes here in the
config.cgi file
$config{'basepath'} = '/your/server/path/cgi-bin/auction/auctiondata/';
A. You can get your server
absolute path statement and other info needed like the path to the
servers sendmail need by the software by using a server info display
program like this one clicking
here. You need to place it in your cgi-bin dir on your
server and give it the permissions of 755, then run it VIA your
browser http://www.your.com/cgi-bin/envtest3.cgi
Q. I keep
getting this Error: The item number may not contain any non-numeric
characters.
A. This
problem happens when using FrontPage the backup dir's _vti_cnf it
creates under the auctiondata dir and all the category dirs under
it, the auction tries to read these FrontPage backups as a category
and data file and can't giving you this error. So it you are getting
this error you need to delete all the _vti_cnf dirs under your
auctiondata dir and under all the categories dir under the
auctiondata dir that FrontPage created. if your going to use
FrontPage to update the webpages on your site set it up to exclude
the cgi-bin dir as most all cgi scripts that make data files have a
problem with these backups frontpage creates. the best it to use a
normal ftp program to upload your files to your site.
Q. My users keep getting
the error message:
Error:
We were unable to write to the user directory.
A. This is usually caused
when a user is trying to bid on an
item or post an item and the server permissions are not set
correctly on the auctiondata dir and or all category dirs under the
auctiondata dir they all need the permissions of 777 or
(read/write/execute on an NT server)
You also should not put any files or directories in these folders
you created the
script will create them automatically.
Q. When a user is
uploading an image to be posted with their auction item they keep
getting the error message:
Error:
Can't open /your/server/path/auct-photos/temp/file.gif
A. This happens if the server
path statements in the image upload setup section are not set up
correctly in the config.pl file and or the yourphoto.pl file, and or
the permissions not set correcty on the auct-photo dir and the auct-photo/temp
dir both of these have to have the permissions of 777 or
(read/write/execute on an NT server)
Q. Mail is not sent to the
user when a new user registers or then a auction item closes. Why?
A. Check the server path to
your servers sendmail program, find this in your config.pl file and
make sure this points to your servers sendmail (you may need to ask
your host for the path to their sendmail.exe)
$config{'mailprog'} = '/usr/sbin/sendmail';.
If your on a NT server then most of these use a program like
Blat.exe so then you'll need to define this line in your config.pl
file instead of the above sendmail. (comment out the one you do
not use using the #)
$config{'smtp_addr'} = 'mail.your.com';
Q. When viewing some
auction items I get a plug in error?
A. If you have the deluxe
auction version this is caused by when the auction item was posted
you selected music background and there is no music files in the
music dir so the plug in could not find the music file and gave a
plug in error. the auction does not come with music files you have
to get your own NON Copyrighted music files.
Q. New Banner placed for
rotation but still not
displaying a banner?
A. Check the permissions on
the rbanner.pl file it need the permissions of 755
(read/execute on an NT server)
Q. The accounting is not
saving the user info and or billing?
A. Check your /accounting/userbilling/
dir permissions it needs the permissions of 777 or
(read/write/execute on an NT server)
Q. How does the user payments work?
A. If you have a
PayPal.com, PayByCheck.com, Nochex.com,
2CheckOut.com account you can setup and turn them on in the
config.pl file like this example below using PayPal.com
##################################################
# PayPal.com setup turn $config{'paypal'}
= 'off'; to on if
# you have a PayPal Account
$config{'paypal'}
= 'on';
$config{'paypalacc'}
= 'youaccountname@your.com';
Now when a user logs in to there user accounting by
clicking this link: (Make A Payment or View Your Account) the
payment options you have turned on (setup) in the config.pl file
like PayPal.com will be displayed as a payment option. now the user
can make a payment using this link, after payment has been made they
will be taken back to the auction site and there accounting will
have been auto credited in real time by the amount they just payed .
Now for another option: This checks for Negative Balance,
be for a user can post they must have a min balance you define in
the config.pl file.
##############################
# This checks for Negative
Balance
# be for a user can post they
must
# have a min balance you define
# set to on or off
$config{'AccountStatus'}
= 'off';
##############################
# If the above is turned off
this
# has no effect
# This checks for Negative or
Positave Balance
# be for a user can post they
must
# have a min balance you define
# define the min amount like:
# example -5.00 for a max -
ballance or 5.00 for a positive
$config{'MaxAccountBallance'}
= '-5.00';
Now if this is turned on and the user is below this amount
you setup, the user is taken to a payment screen to make a payment
to there account using the payment options you setup in the
config.pl file like PayPal before they can post a new auction item.
Q. How do I make
new/different categories?
A. Edit the config.cgi to
point to new categories.
The directories listed will be automatically created by the
script. Each category should be listed like:
###############################################
#
# EXAMPLES OF CATEGORY AND A SUBCAT AND SUB-SUBCAT
# %supercat = (
#
# antiques => 'Antiques',
# Sub Category
# antiquesart => 'Art', #
Sub Category with a Sub Category
# antiquestables =>
'Tables', # Sub Category with a Sub Category
# );
#
## Define your sub categories here ############
#
# %category = (
#
# homes=> 'Homes', # No
Sub Category
#
# antiques01 =>
'<!--antiques-->Antiques', # Sub Category dir
# antiques001 =>
'<!--antiques--><!--antiquesart-->ART', # # Sub Category with a Sub
Category Dir
# antiques0001 =>
'<!--antiques--><!--antiquetables-->Tables', # Sub Category with a
Sub Category Dir
# );
#
###############################################
Q. How do I edit or remove
entries from the auction before the auction
closes?
A. The system administrator
may edit or remove items from the auction
at any time.
http://www.your.com/cgi-bin/auction/auction.pl?action=admin
The administrator password is defined in the config.cgi file.
Or the user/seller can edit their own item from that items
display page using the link: user you may
edit this item
Q. How do I edit or remove
registered users?
A. The system administrator
may edit or remove registered users at any time. Just use the
URL:
http://www.your.com/cgi-bin/auction/auction.pl?action=admin
The administrator password is defined in the config.cgi file.
Q. How do I administer
users accounting info?
A. The system administrator
may view or credit registered users accounting info at any
time. Just use the URL:
http://www.your.com/cgi-bin/auction/auction.pl?action=adminlogin
Q. Do users need accounts
to post a product or place a bid?
A. Yes registrations are
required for a user to sell a item and or bid on a auction item.
Random passwords will be sent via e-mail and user data will be
stored in the registration dir you specify.
Q. Are closed items
retained on the server?
A. Yes when an item closes,
e-mail is sent to both the winning
bidder and the seller explaining the results. Then the auction
item will be copied to the closed directory upon close, Then after X
days default is 46 the closed auction items will be deleted from the
closed dir along with there images if one was uploaded.
Q. When is e-mail sent
out?
A. E-Mail is sent out when a
bid is placed to the seller and bidder, out bid email will also be
sent, and when auctions items close and when a user registers they
will be send their then user password.
Q. How does the command
line for the script work?
A. When called from a web
browser, the script can be called
http://www.your.com/cgi-bin/auction/auction.pl (for the default
main page)
http://www.your.com/cgi-bin/auction/auction.pl?action=dispcat
(Also for the default main page)
http://www.your.com/cgi-bin/auction/auction.pl?action=dispcat2
(for the type 2 main page)
http://www.your.com/cgi-bin/auction/auction.pl?action=dispcat3
(for the type 3 main page)
http://www.your.com/cgi-bin/auction/auction.pl?action=dispcat4
(for the type 4 main page)
http://www.your.com/cgi-bin/auction/auction.pl?action=dispcat5
(for the type 5 main page)
Rotating Featured Main Displayes
http://www.your.com/cgi-bin/auction/auction.pl?action=dispcat6
(for the type 6 main page)
http://www.your.com/cgi-bin/auction/auction.pl?action=dispcat7
(for the type 7 main page)
Q. What is file locking,
and how can I enable/disable it?
File locking is included to eliminate the
risk of data corruption on high-traffic sites. If two users
try
to post a bid at the EXACT SAME TIME, file locking will delay
the second poster until the first poster is finished posting.
File
locking should be enabled unless your server does not support it.
If you get weird flock errors or your script crashes, try setting
$flock = 0.