Installing PHP-eSeller ....
The following describes how to install PHP-eSeller for the first time. The process is simple and should take just a few minutes.
- PHP version PHP 4.1.0 or higher (including PHP5)
- Apache web server or Windows IIS
- mySQL database version 3.23 or higher
- Linux, FreeBSD or Windows operating system on the web server
- A Paypal Business or Premier account (if using PayPal) sign up here.
- A Google checkout account (if using Google) sign up here
- Email functionality on the web server so that the PHP scripts can send out emails to customers.
- If you are looking for a suitable host for you site, I would recommend the basic web hosting plan from LunarPages which has all the required features for this application.
Unzipping the files
The files are supplied in .zip format. After unzipping the files you will have a folder called 'eseller' containing a number of files and folders.
Create a folder on your web server with a suitable name such as 'store', or 'shop' and upload all the files and folders into the new folder. If you are uploading to a folder called 'shop' then the site will be located at http://www.yoursitename.com/shop/.
Remember to to use lower case for your folder name, as Linux is case sensitive.
Note that Godaddy hosting requires a small script modification as described here
Here is a quick summary of the 'eseller' folders :
/admin - code to administer the application
/cart - an alternative cart system
/classes - object classes used in the application
/files - a number of test files which can be used to test the download process.
/functions - miscellaneous functions
/functionscart - miscellaneous functions for the template cart system
/google - Google Checkout library
/images - graphics
/ipn - PayPal ipn scripts
/ipn_sandbox - PayPal ipn sandbox testing scripts
/ipncommon - common ipn functions
/mp3previewer - swf files
/pat - the patTemplate files
/store - an alternative store system
/templates - the folder where the templates are located
/templcache - folder for storing template cache when cache is turned on
The files which you are going to sell and allow customers to download, should be placed in a location outside the root of your web site and on the same web server. This is so that no one can get to your files using a browser.
If you cannot place the files outside your web site root, then you can protect them using a .htaccess file. I have provided a number of test files in the /files folder along with a .htaccess file. The .htaccess file will deny all attempts to access the folder using a web browser.
mp3 clip files folder
If you are using mp3 clips to allow the customer to preview the mp3s, the mp3 clips cannot be placed in the same folder as the files you are going to sell because that folder is protected. Any mp3 clips are separate files that are usually about 20 seconds long and should be placed in a publicly accessible folder.
Create a mySQL database with cpanel tutorial (old style)
Click here for a tutorial.
Create a mySQL database with cpanel tutorial (new style)
Click here for a tutorial
Create a mySQL database with GoDaddy hosting tutorial
Click here for a tutorial.
Create a database
Create a new empty mySQL database with an appropriate name (e.g. eseller).
The above links provides some examples on how to create a database.
If you are using a hosting company, then you will probably be given a control panel to access your databases system. For mySQL this is usually phpMyAdmin which allows you to administer the database via a web browser.
Quite often hosting companies will prefix the name of the database with your login name. So when you create a database called eseller, it becomes paul_eseller for example.
You can install into an existing database if you wish. The table names are all prefixed by ipn_. First check that there are no other tables in your database that start with ipn_ to make sure that there are no name clashes.
Create a user for the database
Create a user (e.g. eselleruser) that has access to that database and that database only.
If you are using a hosting company, there will probably be an administration page which will allow you to create database users, define their permissions and add the user to your database.
Quite often hosting companies will prefix the user name with your login name. So when you enter eselleruser, it becomes paul_eselleruser for example.
In the first instance, you need to make sure that the user has permissions which include CREATE privileges because the first script that you run will be creating tables in the database. Normally you will select the All Privileges option for this.
Run the install.php page
The install.php page should be accessible at :
When you display this in your web browser, it will ask for host name, database name, username, password and table prefix.
The above image shows the default display.
The host name will usually be localhost, the database name will be whatever you have already created, usually eseller. Enter in a user name and password for a user who has table creation privileges.
Note that the host name may not be localhost, you will need to check your hosting for that. Also, the username and the database name may have a prefix added by your host, again you will need to check your hosting for that.
Click on 'Create' and the script will display a list, which should all be green to indicate success. Any failures will be indicated in red.
If all are green, then all tables have been created.
The config.php file contains the database connection username / password for the application.
Edit the config.php file with a text editor such as Notepad. Do not put any spaces, blank lines or other text after the last ?> symbol or before the first <?php symbol.
You need to enter :
database host name (usually localhost, but see your hosting documentation for this)
Note that the database name, and database username may have been given a prefix by the host system.
Modifications to your PayPal account
If you have not enabled IPN in your PayPal account, you do need to enable it so that your PayPal account sends back the IPN.
- Log into your PayPal account and click on 'Profile' on the menu.
- Click on 'My Selling Preferences'.
- For 'Instant payment notifications' click on 'Update'.
- Enable the IPN.
In the url box, enter the confirm.php url which will be http://www.yoursitename.com/installation_folder/ipn/confirm.php. This url is not actually needed because PHP-eSeller sends the url to PayPal anyway.
If the url box is already being used, you do not have to change it because PHP-eSeller sends the url to PayPal anyway.
The template system can use a cache which will improve the speed of the template driven pages.
Change the permissions on the /templcache/ folder to 777.
When index.php page is displayed, the cache files will appear in the /templcache/ folder.
The cache system will improve performance with large datasets.
Modification for GoDaddy Hosting
GoDaddy servers require a slight modification to the script because of their security system. In the folder 'ipncommon', remove the existing file 'com_ipnfunctions.php' and change the file name 'com_ipnfunctions_godaddy.php' to 'com_ipnfunctions.php'
The application should now be working correctly and you can go to the admin pages using :
The default login is user : admin, password : admin
You should change your password and user name as soon as possible via the 'change password' page.
Usernames and passwords are located in tblusers which you may modify directly if you have access to a web interface to your database. Note that passwords are encrypted using MD5 and you should only use characters 0-9 and a-z and should not be more than 10 characters long.
User names should are restricted to characters 0-9, a-z, @ and full stop.
Display the buy now and add to cart buttons and login page
Examples of how to display your products and how to place the login page onto a web page are explained on the following associated pages :