• First, create a mySQL database with an appropriate name.
  • Modify config.php with a text editor such as NotePad.
  • FTP all the files to your web server into a folder with an appropriate name.
  • Run this file (install.php) from your web browser and enter the details in the form below.
  • Press submit, will create all the tables in the mySQL database.
  • Delete this file (install.php) from your web server, and log in to the admin section using username of admin and password of admin.
  • For full details refer to the installation documentation on the website.
 
Host name (usually localhost)  
Database User name  
Database Password  
Database Name  
Table Prefix (optional)  
     
The table ipn_tblitems was successfully created

"); } else { echo("Error creating table ipn_tblitems " . mysql_error() . "

"); } //Create table------------------------------------- $query = "CREATE TABLE ".$dbprefix."ipn_tblsetup ( " . " recid INT NOT NULL , " . " paypaladdress VARCHAR(100) , " . " emailsubject TEXT , " . " emailtext TEXT , " . " emailtextphysical TEXT , " . " adminaddress VARCHAR(100) , " . " copyemail INT DEFAULT '1' NOT NULL , " . " defaultlocation TEXT , " . " mc_currency VARCHAR(10) DEFAULT 'USD', " . " currency VARCHAR(20) DEFAULT 'USD $', " . " button VARCHAR(200) DEFAULT '../images/btn/x-click-but23.gif' , " . " manual_entered INT DEFAULT '0' NOT NULL , " . " button_templates VARCHAR(200) DEFAULT 'images/btn/x-click-but23.gif' , " . " button_add_to_cart VARCHAR(200) DEFAULT '../images/btn/x-click-but22.gif' , " . " manual_entered_add_to_cart INT DEFAULT '0' NOT NULL , " . " button_add_to_cart_templates VARCHAR(200) DEFAULT 'images/btn/x-click-but22.gif' , " . " button_view_cart VARCHAR(200) DEFAULT '../images/btn/view_cart_02.gif' , " . " manual_entered_view_cart INT DEFAULT '0' NOT NULL , " . " button_view_cart_templates VARCHAR(200) DEFAULT 'images/btn/view_cart_02.gif' , " . " button_free_item VARCHAR(200) DEFAULT '../images/btn/free.gif' , " . " manual_entered_free_item INT DEFAULT '0' NOT NULL , " . " button_free_item_templates VARCHAR(200) DEFAULT 'images/btn/free.gif' , " . " button_login VARCHAR(200) DEFAULT '../images/btn/login.gif' , " . " manual_entered_login INT DEFAULT '0' NOT NULL , " . " button_login_templates VARCHAR(200) DEFAULT 'images/btn/login.gif' , " . " button_download VARCHAR(200) DEFAULT '../images/btn/download.gif' , " . " manual_entered_download INT DEFAULT '0' NOT NULL , " . " button_download_templates VARCHAR(200) DEFAULT 'images/btn/download.gif' , " . " button_search VARCHAR(200) DEFAULT '../images/btn/search.gif' , " . " manual_entered_search INT DEFAULT '0' NOT NULL , " . " button_search_templates VARCHAR(200) DEFAULT 'images/btn/search.gif' , " . " button_secure_checkout VARCHAR(200) DEFAULT '../images/btn/secure_checkout.gif' , " . " manual_entered_secure_checkout INT DEFAULT '0' NOT NULL , " . " button_secure_checkout_templates VARCHAR(200) DEFAULT 'images/btn/secure_checkout.gif' , " . " button_small_mp3 VARCHAR(200) DEFAULT '../images/btn/small_mp3.gif' , " . " manual_entered_small_mp3 INT DEFAULT '0' NOT NULL , " . " button_small_mp3_templates VARCHAR(200) DEFAULT 'images/btn/small_mp3.gif' , " . " sandbox_seller VARCHAR (100) , " . " referring_server VARCHAR(100) , " . " sitetitle VARCHAR(255) , " . " template VARCHAR(255) DEFAULT 'basic' , " . " cancel_url VARCHAR(200) , " . " return_url VARCHAR(200) , " . " notify_url VARCHAR(200) , " . " notify_sandbox_url VARCHAR(200) , " . " install_folder VARCHAR(150) , " . " version_no VARCHAR(10) ," . " wimpy INT default '0' NOT NULL , " . " frontendsite VARCHAR(150) , " . " PRIMARY KEY (recid) ) " . " "; if (mysql_db_query($dbname, $query, $link)) { echo("The table ipn_tblsetup was successfully created

"); } else { echo("Error creating table ipn_tblsetup " . mysql_error() . "

"); } //Create table------------------------------------- $query = " CREATE TABLE ".$dbprefix."ipn_tblsaleshistory ( " . " recid INT NOT NULL AUTO_INCREMENT, " . " item_id INT , " //will always have an entry . " users_id INT , " //will not have an entry for physical goods because the user does not go in tblUsers . " receiver_email VARCHAR( 100 ) NOT NULL , " . " item_name VARCHAR( 100 ) NOT NULL , " . " item_number VARCHAR( 50 ) NOT NULL , " . " payment_status VARCHAR( 50 ) , " . " mc_gross VARCHAR( 10 ) NOT NULL , " . " payer_email VARCHAR( 100 ) NOT NULL , " . " txn_type VARCHAR( 50 ) , " . " txn_id VARCHAR( 100 ) , " . " mc_currency VARCHAR(10) NOT NULL , " . " completed DATETIME NOT NULL , " . " quantity INT default '1' NOT NULL , " . " PRIMARY KEY ( recid ) ) " . " "; if (mysql_db_query($dbname, $query, $link)) { echo("The table ipn_tblsaleshistory was successfully created

"); } else { echo("Error creating table ipn_tblsaleshistory " . mysql_error() . "

"); } //Create table------------------------------------- $query = "CREATE TABLE ".$dbprefix."ipn_tblusers ( " . " recid INT NOT NULL AUTO_INCREMENT , " . " payer_email VARCHAR(100) NOT NULL , " . " password VARCHAR(50) NOT NULL , " . " PRIMARY KEY (recid) ) " . " "; if (mysql_db_query($dbname, $query, $link)) { echo("The table ipn_tblusers was successfully created

"); } else { echo("Error creating table ipn_tblusers " . mysql_error() . "

"); } //Create table------------------------------------- $query = "CREATE TABLE ".$dbprefix."ipn_tblpasswords ( " . " username VARCHAR(50) NOT NULL , " . " userpassword VARCHAR(50) NOT NULL , " . " type INT DEFAULT '1' NOT NULL , " . " PRIMARY KEY (username) ) " . " "; if (mysql_db_query($dbname, $query, $link)) { echo("The table ipn_tblpasswords was successfully created

"); } else { echo("Error creating table ipn_tblPassword " . mysql_error() . "

"); } //Create table------------------------------------- $query = "CREATE TABLE ".$dbprefix."ipn_tbldatalayer ( " . " recid INT NOT NULL AUTO_INCREMENT, " . " name VARCHAR(255), " . " age INT, " . " description BLOB, " . " PRIMARY KEY (recid) ) " . " "; if (mysql_db_query($dbname, $query, $link)) { echo("The table ipn_tbldatalayer was successfully created

"); } else { echo("Error creating table ipn_tbldateLayer " . mysql_error() . "

"); } //Create table------------------------------------- $query = "CREATE TABLE ".$dbprefix."ipn_tblmaincategory ( " . " recid INT NOT NULL AUTO_INCREMENT, " . " maincategory VARCHAR(100), " . " INDEX (maincategory), " . " PRIMARY KEY (recid) ) " . " "; if (mysql_db_query($dbname, $query, $link)) { echo("The table ipn_tblmaincategory was successfully created

"); } else { echo("Error creating table ipn_tblmaincategory " . mysql_error() . "

"); } //Create table------------------------------------- $query = "CREATE TABLE ".$dbprefix."ipn_tblmainsub ( " . " recid INT NOT NULL AUTO_INCREMENT, " . " maincat_id INT, " . " subcat_id INT, " . " PRIMARY KEY (recid) ) " . " "; if (mysql_db_query($dbname, $query, $link)) { echo("The table ipn_tblmainsub was successfully created

"); } else { echo("Error creating table ipn_tblmainsub " . mysql_error() . "

"); } //Create table------------------------------------- $query = "CREATE TABLE ".$dbprefix."ipn_tblsubcategory ( " . " recid INT NOT NULL AUTO_INCREMENT, " . " subcategory VARCHAR(100), " . " INDEX (subcategory), " . " PRIMARY KEY (recid) ) " . " "; if (mysql_db_query($dbname, $query, $link)) { echo("The table ipn_tblsubcategory was successfully created

"); } else { echo("Error creating table ipn_tblsubcategory " . mysql_error() . "

"); } //Create table------------------------------------- //This table contains the definitions for each file $query = "CREATE TABLE ".$dbprefix."ipn_tblfiles ( " . " recid INT NOT NULL AUTO_INCREMENT, " . " item_id INT, " . " item_days_to_expire INT DEFAULT '0' NOT NULL ," //Number of days to expire e.g. 4 . " item_downloads_remaining INT DEFAULT '0' NOT NULL, " //Number of downloads remaining e.g.3 . " folder VARCHAR(255), " //folder for file . " location VARCHAR(255), " //path and filemname of file . " location_small_mp3 VARCHAR(255), " //path and filename of mp3 clip - NOT USED . " filename VARCHAR(255), " //filename of file . " PRIMARY KEY (recid) ) " . " "; if (mysql_db_query($dbname, $query, $link)) { echo("The table ipn_tblfiles was successfully created

"); } else { echo("Error creating table ipn_tblfiles " . mysql_error() . "

"); } //Create table------------------------------------- //When an item is puchased, this table identifies the user and which files //that person has purhcased with the actual date of expiry and number of downloads remaining $query = "CREATE TABLE ".$dbprefix."ipn_tbldownloads ( " . " recid INT NOT NULL AUTO_INCREMENT, " . " users_id INT NOT NULL ," . " files_id INT NOT NULL ," . " item_expire_date DATETIME NOT NULL ," . " item_downloads_remaining INT DEFAULT '0' NOT NULL , " . " PRIMARY KEY (recid) ) " . " "; if (mysql_db_query($dbname, $query, $link)) { echo("The table ipn_tbldownloads was successfully created

"); } else { echo("Error creating table ipn_tbldownloads " . mysql_error() . "

"); } //Create table------------------------------------- $query = "CREATE TABLE ".$dbprefix."ipn_tblcurrency ( " . " recid INT NOT NULL AUTO_INCREMENT, " . " currency_code VARCHAR(10) ," . " currency_symbol VARCHAR(15) ," . " currency_description VARCHAR(30) ," . " PRIMARY KEY (recid) ) " . " "; if (mysql_db_query($dbname, $query, $link)) { echo("The table ipn_tbldownloads was successfully created

"); } else { echo("Error creating table ipn_tbldownloads " . mysql_error() . "

"); } //Create record id 1 in ipn_tblsetup --------------------- $query = "INSERT INTO ".$dbprefix."ipn_tblsetup (recid, emailsubject, emailtext, emailtextphysical, sitetitle, version_no) " . "Values ( 1, 'Subject line of email sent to purchaser', " . " 'A suitable entry for the body text of the email for digital goods which should include a link to the login page and the username/password similar to the following :\r\n\r\nTo download your purchases, enter the following into your browser address bar :\r\n\r\n\r\nLogin with :\r\n\r\nUsername : \\r\Password : \\r\n\r\nIf you purchase from this site again you will be able to use this username / password without waiting for a confirmation email from us.', " . " 'A suitable entry for the body text of the email for physical goods', " . " 'Site title', '5.01' )"; if (mysql_db_query($dbname, $query, $link)) { echo("The default record in ipn_tblsetup was successfully created

"); } else { echo("Error inserting record into ipn_tblsetup " . mysql_error() . "

"); } //Create default site admin user / password------------------ $query = "INSERT INTO ".$dbprefix."ipn_tblpasswords (username, userpassword, type) Values ( 'admin', md5('admin'), 0 )"; if (mysql_db_query($dbname, $query, $link)) { echo("The site admin user/password of admin/admin was successfully created

"); } else { echo("Error inserting record into ipn_tblpasswords " . mysql_error() . "

"); } //Create currency entries in tblcurrency------------------ $query = "INSERT INTO ".$dbprefix."ipn_tblcurrency (currency_code, currency_symbol, currency_description) Values ( 'AUD', 'AUD $', 'Australian Dollar' )"; if (mysql_db_query($dbname, $query, $link)) { $currency_error = true; } else { $currency_error = false; } $query = "INSERT INTO ".$dbprefix."ipn_tblcurrency (currency_code, currency_symbol, currency_description) Values ( 'CAD', 'CAD $', 'Canadian Dollar' )"; if (mysql_db_query($dbname, $query, $link)) { $currency_error = true; } else { $currency_error = false; } $query = "INSERT INTO ".$dbprefix."ipn_tblcurrency (currency_code, currency_symbol, currency_description) Values ( 'CHF', 'CHF Fr', 'Swiss Franc' )"; if (mysql_db_query($dbname, $query, $link)) { $currency_error = true; } else { $currency_error = false; } $query = "INSERT INTO ".$dbprefix."ipn_tblcurrency (currency_code, currency_symbol, currency_description) Values ( 'CZK', 'CZK Kč', 'Czech Koruna' )"; if (mysql_db_query($dbname, $query, $link)) { $currency_error = true; } else { $currency_error = false; } $query = "INSERT INTO ".$dbprefix."ipn_tblcurrency (currency_code, currency_symbol, currency_description) Values ( 'DKK', 'DKK kr', 'Danish Krone' )"; if (mysql_db_query($dbname, $query, $link)) { $currency_error = true; } else { $currency_error = false; } $query = "INSERT INTO ".$dbprefix."ipn_tblcurrency (currency_code, currency_symbol, currency_description) Values ( 'EUR', 'EUR €', 'Euro' )"; if (mysql_db_query($dbname, $query, $link)) { $currency_error = true; } else { $currency_error = false; } $query = "INSERT INTO ".$dbprefix."ipn_tblcurrency (currency_code, currency_symbol, currency_description) Values ( 'GBP', 'GBP £', 'Pound Sterling' )"; if (mysql_db_query($dbname, $query, $link)) { $currency_error = true; } else { $currency_error = false; } $query = "INSERT INTO ".$dbprefix."ipn_tblcurrency (currency_code, currency_symbol, currency_description) Values ( 'HKD', 'HKD $', 'Hong Kong Dollar' )"; if (mysql_db_query($dbname, $query, $link)) { $currency_error = true; } else { $currency_error = false; } $query = "INSERT INTO ".$dbprefix."ipn_tblcurrency (currency_code, currency_symbol, currency_description) Values ( 'HUF', 'HUF Ft', 'Hungarian Forint' )"; if (mysql_db_query($dbname, $query, $link)) { $currency_error = true; } else { $currency_error = false; } $query = "INSERT INTO ".$dbprefix."ipn_tblcurrency (currency_code, currency_symbol, currency_description) Values ( 'JPY', 'YEN ¥', 'Japanese Yen' )"; if (mysql_db_query($dbname, $query, $link)) { $currency_error = true; } else { $currency_error = false; } $query = "INSERT INTO ".$dbprefix."ipn_tblcurrency (currency_code, currency_symbol, currency_description) Values ( 'NOK', 'NOK kr', 'Norwegian Krone' )"; if (mysql_db_query($dbname, $query, $link)) { $currency_error = true; } else { $currency_error = false; } $query = "INSERT INTO ".$dbprefix."ipn_tblcurrency (currency_code, currency_symbol, currency_description) Values ( 'NZD', 'NZD $', 'New Zealand Dollar' )"; if (mysql_db_query($dbname, $query, $link)) { $currency_error = true; } else { $currency_error = false; } $query = "INSERT INTO ".$dbprefix."ipn_tblcurrency (currency_code, currency_symbol, currency_description) Values ( 'PLN', 'PLN zł', 'Polish Zloty' )"; if (mysql_db_query($dbname, $query, $link)) { $currency_error = true; } else { $currency_error = false; } $query = "INSERT INTO ".$dbprefix."ipn_tblcurrency (currency_code, currency_symbol, currency_description) Values ( 'SEK', 'SEK kr', 'Swedish Krona' )"; if (mysql_db_query($dbname, $query, $link)) { $currency_error = true; } else { $currency_error = false; } $query = "INSERT INTO ".$dbprefix."ipn_tblcurrency (currency_code, currency_symbol, currency_description) Values ( 'SGD', 'SGD $', 'Singapore Dollar' )"; if (mysql_db_query($dbname, $query, $link)) { $currency_error = true; } else { $currency_error = false; } $query = "INSERT INTO ".$dbprefix."ipn_tblcurrency (currency_code, currency_symbol, currency_description) Values ( 'USD', 'USD $', 'U.S. Dollar' )"; if (mysql_db_query($dbname, $query, $link)) { $currency_error = true; } else { $currency_error = false; } if ($currency_error == true) { echo("Currency entries was successfully created

"); } else { echo("Error inserting a record into ipn_tblcurrency " . mysql_error() . "

"); } ?>
If all results are green, you may now log into the admin displays
using the default username / password of admin / admin. PHP-IPNMonitor Set Up

PHP-IPNMonitor Set Up