|
2 Help U
- For NT servers
|
|
This page
|
Help page to install ONLY the EA 1.5+
Advise, Comments and Tips are always welcome.
|
|
Text Editor
|
It's very important that you get a suitable text editor to edit scripts.
-
Arachnophilia & UltraEdit
All in one editors. Works fine for me.
Download them from:
Arachnophilia
and
UltraEdit
-
Recommended by others
Textpad
|
|
Standard configuration
|
The standard configuration for NT servers has been supplied by users who are on
NT servers. Thanks!
All other NT variation of the standard configuration are welcome.
-
Not highly recommended BUT do so ONLY if the rest of your trials failed.
Comment line 2 and line 3
# use vars qw(%config %category %form);
# use strict;
-
#!d: or e:/perl??/bin/perl
This must point to the Perl version on your server. If you don't know, ask
your host.
In most cases
#!d: or e:/perl??/bin/perl
or
#!d: or e:/perl??/bin/perl5
works
OK.
-
$config{'basepath'} = 'e:/xxxx/xxxx/xxxx/';
This is your basepath. The EA script will create your "category", "closed" and
"reg" directories automatically in this path (data directory). Trailing slash
"/" is needed.
For data security reasons, it must be out of the web. See FAQ "What is basepath"
ANOTHER POSSIBILITY FOR SECURITY
If you want to place the data directory in a web-accessible section you can
do so BUT you must have the .htaccess file with the text "deny from all" in that
same directory.
So you create a file with the text DENY FROM ALL and save it as .htaccess
and upload it in your data directory.
You can get to know your basepath in 3 ways
(1) Telnet and issue the command PWD
(2) ask your host and
(3) with the scripts, basepath.cgi, perldive.cgi or servercheck.cgi
Download them from the FAQ page.
-
$config{'closedir'} = 'closed';
Closed auctions will be moved to this directory (leave this 'closed' "as is" for now)
-
$config{'regdir'} = 'reg';
The data of all registered user will be in this directory (leave this 'reg' "as is" for now)
-
$config{'adminpass'} = 'auction';
The password for deleting posted items
-
$config{'mailprog'} = d: or e:/????/????.com/????/????/sendmail -t
OR
$config{'mailhost'} = 'localhost';
The mail program on your server. Ask your host.
-
$config{'admin_address'} = 'xxxxxx@xxxxx.xxx';
Your email address
-
$config{'scripturl'} = 'xxx.xxxx.xxx';
Your domain - eg. www.auction.com
-
$config{'sitename'} = 'xxxxxx';
Your site name - The name of your auction.
-
Save your script when done with the above mentioned STANDARD CONFIGURATION.
PS: Some servers require CGI scripts. In that case, just rename auction.pl to
auction.cgi
-
Make a directory out of the WEB. (your base directory).
-
Make a directory in your cgi-bin directory and upload the script with ASCII
there.
-
Finished.
|
|
Miscellaneous
|
To call the script : eg.
http://www.yourdomain.com/cgi-bin/auctiondirectory/auction.cgi
To go to the admininstration section of the script : eg.
http://www.yourdomain.com/cgi-bin/auctiondirectory/auction.cgi?action=admin
CVS Tutorial
Another way to download and update the script
|
|
No help
|
Distribute free scripts
Redistribute free scripts
Sell free scripts
Download free scripts for others
Take responsibility for damage(s) caused by free scripts.
|
|
NT Sendmail
|
|
After a number of hours reading this forum and digging into the sub sendemail
function (ver 1.51) we have discovered a necessary correction to facilitate
using SMTP e-mail on NT Server.
The following was added to the end of the
SMTP section following the
print $remote "QUIT\r\n";
Added: $trash =
<$remote>
;
With this addition the e-mail session is completed and thus the e-mail is sent.
We hope this helps others.
Following is the function as modified:
sub sendemail {
my ($to,$from,$subject,$message) = @_;
my $trash;
if ($config{'mailhost'}) {
eval('use IO::Socket; 1;') or &oops("IO::Socket could
not be loaded by the
script. Please see the script documentation for
details. It looks like this server
is using perl version $]. IO::Socket may not be included
with versions of perl
prior to 5.00404."); # don't cause errors on
machines where IO::Socket is not
available
my $remote;
$remote = IO::Socket::INET->
new("$config{'mailhost'}:smtp(25)");
$remote->
autoflush();
print $remote "HELO\r\n";
$trash =
<$remote>
;
print $remote "MAIL From:
<$config{'admin_address'}>
\r\n";
$trash =
<$remote>
;
print $remote "RCPT To:
<$to>
\r\n";
$trash =
<$remote>
;
print $remote "DATA\r\n";
$trash =
<$remote>
;
print $remote "From:
<$from>
\r\n";
print $remote "To:
<$to>
\r\n";
print $remote "Subject: $subject\r\n\r\n";
print $remote $message;
print $remote "\r\n.\r\n";
$trash =
<$remote>
;
print $remote "QUIT\r\n";
$trash =
<$remote>
;
}
else {
open MAIL, "|$config{'mailprog'}";
print MAIL "To: $to\r\nFrom: $from\r\nSubject:
$subject\r\n\r\n$message\r\n\r\n";
close MAIL;
}
}
|
Here is another one
###############################################
# E-mail fix for NT users.
###############################################
#Simply replace entire send e-mail sub with the below one, #and you are done.
#If you have any problems, you can e-mail me at #boboki@boboki.com and I can help out if I can.. but i am #not a perl programmer ;-P
###############################################
#-#############################################
# SUB: Send E-mail
# This is a real quick-and-dirty mailer that
# should work on any platform. It is my first
# attempt to work with sockets, so if anyone
# has any suggestions, let me know!
#
# Takes:
# (To, Subject, From, Message)
sub sendemail {
my ($to,$from,$subject,$message) = @_;
my $smtp;
if ($config{'mailhost'}) {
use Net::SMTP;
$smtp = Net::SMTP->new($config{'mailhost'});
$smtp->mail($from);
$smtp->to($to);
$smtp->data();
$smtp->datasend("To: $to\n");
$smtp->datasend("From: $from\n");
$smtp->datasend("Subject: $subject\n");
$smtp->datasend("\n");
$smtp->datasend("$message\n");
$smtp->dataend();
$smtp->quit;
}
else {
open MAIL, "$config{'mailprog'}";
print MAIL "To: $to\r\nFrom: $from\r\nSubject:
$subject\r\n\r\n$message\r\n.\r\n";
close MAIL;
}
}
Home
Unix Server
FAQ
© Copyright 2000 All Rights Reserved