I cannot get IPN to communicate with the Paypal.pl script on my server side (hosted by Earthlink which is no help because they are promoting their own e-commerce package). I've been at this for the past day and a half, and can't get it to work, so I truly would appreciate any help an expert can provide.
My website is located at
www.k12tlc.net with cgi scripts located in
www.k12tlc.net/cgi/, and .htpassword located in
www.k12tlc.net/data/. I have run many cgi scripts using this configuration, and the permissions are all set at 755. I initially wanted to run in a secure environment, but gave up on that hoping on settings would be a little easier to create.
When I test EliteWeaver I get:
Target IPN Script:
http://www.k12tlc.net/cgi/paypal.pl
HTTP Status: HTTP/1.1 500 Internal Server Error
IPN Received: Your script did not reply!
When I test it live my logs give me:
64.4.241.140 - - [19/Feb/2004:08:36:12 -0800] "POST /cgi/paypal.pl HTTP/1.0" 500 369 "-" "-"
[Thu Feb 19 08:36:12 2004] [error] [client 64.4.241.140] Premature end of script headers: /www/htdocs/domains/s7/01139/www.k12tlc.net/webdocs/cgi/paypal.pl
My Paypal.pl file was downloaded from Paypal.com, and I have made not any modificationd except to enter the required items, and to change the setting for the PERL to the local Earthlink location. Here are the script settings:
#!/usr/local/bin/perl
use strict;
# Modules
use CGI::Carp;
use CGI qw(:standard escapeHTML);
use LWP::UserAgent;
# CGI.pm versioning issue
$CGI::USE_PARAM_SEMICOLONS = 0;
# Revision Notes
# 09/20/01 - initial release
# 10/24/01 - added error emails for flock and seek failures
# 01/09/02 - changed email support to sendmail
# Version Number
# 1.2
# © 2002 PayPal, Inc. and others. All rights reserved.
# This code is subject to the Terms and Conditions in
# the accompanying Beta Software License Agreement
# User Constants - customize these to YOUR installation (see manual)
# -------------------------------------------------------------------
# Set this to the path of your .htpassword file
my $PASSWORD_FILE = 'www.k12tlc.net/data/.htpassword';
# Set this to the path of your processed_txns file
my $TRANSACTION_FILE = 'www.k12tlc.net/data/processed_txns';
# You only need to change this if you are running with https
# see the manual for details
my $PAYPAL_URL = 'http://www.paypal.com/cgi-bin/webscr';
# If you have an initial trial period set it here. For example one
# month would be '1 M'
my $PERIOD1 = '1 W';
# If you have a second trial period set it here. For example one
# month would be '1 M'
my $PERIOD2 = '';
# Set this to your recurring or normal period. For example one
# month would be '1 M'
my $PERIOD3 = '1 Y';
# Set this to the dollar amount for your initial trial period. For
# example a free trial would be '0.00'
my $AMOUNT1 = '$3.00';
# Set this to the dollar amount for your second trial period. For
# example a $1.00 trial would be '1.00'
my $AMOUNT2 = '';
# Set this to the dollar amount for your recurring or normal period.
# For example $1.00 would be '1.00'
my $AMOUNT3 = '$36.00';
# Set this to the path of sendmail. On Linux and FreeBSD systems this
# is typically '/usr/sbin/sendmail', on Solaris systems it is usually
# found at '/usr/lib/sendmail'
my $SENDMAIL_PATH = '#!/usr/lib/sendmail';
# Set this to the email address you'd like to have error notification
# messages sent to
my $ADMIN_EMAIL = 'mark@k12tlc.net';
# Set this to your primary PayPal email address
my @PAYMENT_EMAILS = ('mark@k12tlc.net');
# -------------------------------------------------------------------
Any suggestions would be greatly appreciated.
Thanks.
Mark
My current IPN URL is set at <http://www.k12tlc.net/cgi/paypal.pl>