Restoring Your mySQL Database From Backup using phpMyAdmin

phpMyAdmin is a program used to manipulate databases remotely through a web interface. A good hosting package will have this included.

  1. Login to phpMyAdmin.
  2. Create a new blank database first.
  3. Click databases, and select the database that you will be importing your data into.
  4. Across the top of the screen will be a row of tabs. Click the Import tab.
  5. On the next screen will be a Location of Text File box, and next to that a button named Browse.
  6. Click Browse. Locate the backup file stored on your computer.
  7. Make sure the SQL radio button is checked.
  8. Click the Go button.

Eventually you will see a success screen.

Backing up a database using phpMyAdmin

This desciption is applicable to all the applications PHP-eSeller, PHP-SecureArea and PHP-KeyCodes.

You should backup your database at regular intervals. You will then be able to restore the database if something goes wrong.

phpMyAdmin is the name of the program that you can use to manipulate databases.  It is usually provided as part of you control panel from your hosting company.

1.  Log into your web server control panel to access phpMyAdmin

2. Select ‘Databases’

Backup 1

3. Now click the name of your database.

Backup 2

4. The next screen will show you all the tables inside your database.  Click the ‘Export’ tab on the top set of tabs.

Backup 3

5. Look at the left box at the top of the Export section. All the tables in the database you selected are in that box.

Backup 4

* If you have other programs that use the database, then choose only those tables that correspond to your install. In the case of PHP-eSeller, they will be the ones with that start with “ipn_”, with PHP-SecureArea they are the ones that start with “sec_” and with PHP-KeyCodes, they are the ones that start with “key_”
* If the database is being used only by the one program, then, leave it as is (or click ‘Select All’ if you changed the selection)
* Ensure that SQL is checked.

6. In the SQL section, tick the following boxes:

* ‘Structure’
* ‘Add DROP TABLE’
* ‘Add AUTO_INCREMENT’ and
* ‘Enclose table and field names with backquotes’

7. In the DATA section, leave the boxes inside this section unticked, but make sure to keep the checkbox next to the “DATA” heading checked.

Backup 4

8.  Tick the ‘Save as file’ option, and leave the template name as is.

Backup 5

9. Now click ‘Go’ and you should be prompted for a file to download. Save the file to your computer.  Depending on the database size, this may take a few moments.

10. You have now backed up your database.   If you wanted, you could download a backup in each of the compression formats. Your choice. For example: None and “zipped

Remember : You have not backed up your files or images.  Only the database itself.

PHP 5.3 and Depreciated Functions

Version PHP 5.3 has a number of functions that are depreciated and earlier versions of PHPeSeller, PHPSecureArea and PHPKeyCodes will display warning messages identifying those depreciated functions when installed on PHP 5.3.  It will still work as the functions are still there although they will be removed in PHP 6

To overcome this for earlier versions of the applications, in the error.php file just use

error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);

This will stop the depreciated warning messages being displayed.

Sell software licence codes with PHP-KeyCodes

PHP-KeyCodes is a is used to sell software key codes or pin numbers using PayPal or Google Checkout.  The key codes are entered into the item details and when a customer makes a purchase, the first key code is removed and sent by email to the customer. This leaves the next key code ready for the next purchase. When the number of codes reach a lower limit, an email is sent to the site administrator.  This functionality can be changed because code hooks are available.

The PayPal and Google Checkout ‘buy now’ buttons can be displayed in the admin interface and then copied on to your web pages.

PHP-KeyCodes is based PHP-eSeller and includes many of its features including transaction list, sales reports and email newsletter facility.

For details refer to http://www.withinweb.com/phpkeycodes/

How to set up an external smtp service

This describes how to set up the SMTP email for use with PHP-eSeller, PHP-SecureArea, PHP-KeyCodes.

You may find that you web server is not sending out emails as well as you would like.  Shared web servers sometimes have issues with how quickly the email is sent out and the headers in the emails.

To use an external SMPT service all you have to do is change the config.php file.

If you look at the config.php file there are some settings near the bottom of the page which should explain it.

$smtpuse    =     false;                                     //set to true if you are going to use smtp
$smtphost    =    “smtp_server_host_here”;    //The smtp host that you are using
$smtpusername     =     “smtp_user_name_here”;        //Your smtp username
$smtppassword    =    “smtp_passord_here”;             //Your smtp password

You change the smtpuser to true and you need a host name, username and password for the SMTP service.

PHP-Keycodes now with Google

PHP-KeyCodes is now able to use Google checkout as well as PayPal. 

In some ways Google checkout provides a better user experience than PayPal as the key code can be displayed to the customer on their Google checkout page. 

PHP-Keycodes can be used with a response handler (the code that monitors the transaction returned from Google checkout) but this requires SSL (a site that has https) or it can be used without the response handler and so your web site does not require SSL to handle the return data from Google.  Without a response handler you do not get the updates of Google sales back at your web site, but otherwise it operates in the same way.

Installing on Windows Web Server

PHP-eSeller and PHP-KeyCodes can both be installed on a Windows Web Server which runs PHP and has a mySQL database.  This is quite a common arrangement now, and many hosting companies provide this, enabling PHP applications to be installed on Windows Web Servers. 

Both of the applications work fine on Windows servers and normally work straight out of the box installation.

The only possible issue is sending emails.  Both applications need to send out emails from the server and this can be done by configuring PHP-eSeller and PHP-KeyCodes to use SMTP if the standard PHP email has not been set up.  This requires minor configuration changes to the config file which means entering the SMTP host, username, password.  All of these details should be available from your web site host if you donot know them.

You do not have to use the web server SMTP details, you can use an external SMTP mail service such as http://www.authsmtp.com.  Sometimes, these provide a better mail service than your host and may be more reliable.

Can different applications use the one PayPal IPN account

Can I use the same PayPal account for different PayPal applications.

Yes you can. The way you do it is to pass the url of the IPN script in the purchase button using the notify_url field.  PHP-eSeller, PHP-SecureArea and PHP-KeyCodes are all able to operate on the same PayPal account because they all send the IPN confirm url within the button.  This means that if you an application that uses your IPN PayPal account, you can still use withinweb.com applications on your site. 

In fact, withinweb.com applications create the and post the data to PayPal dynamically.  The relevant information is extracted from the database and, collected together and then posted to PayPal.  This method means that you can control the data centrally using the admin panel.