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.

PHP-SecureArea can use buy now type buttons

Normally with PHP-SecureArea you use PayPal subscription facilities which control access to your secure area.  So when the subscription expires the access to the secure area ends.

One issue with this is that the customer has to have a PayPal account rather than purchasing through a credit / debit card.  This is because it is PayPal that controls the subscription process.

It is now possible with PHP-SecureArea to use a PayPal ‘buy now’ button which means that the customer can purchase with a credit / debit card.  As it does not use subscriptions it means that access will not automatically end, but this can be controlled using the cron job which checks for manually created subscriptions.

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.

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.

Extracting data from myPHPAdmin

A question I am often asked is how can I create better reports from the data that is in the mySQL database for transactions processed by PHPeSeller or by PHPSecureArea.  Both of these have sales history displays but you may wish to process the data in another application such as MS Excel or MS Access.

One approach is to extract the data from mySQL using your web server control panel.  Login into the control panel of your server and find the section that deals with mySQL.  You should have a link to myPHPAdmin or a similar database tool.

Navigate to the correct database in myPHPAdmin.  Navigate to the table that you want to export and at the top of the page you should see an EXPORT tab.  Click on this.  You will need to select a particular format for the export. This is normally CSV for Excel or CSV.  CSV stands for Comma Separted Values and is a very common method of transfering data to and from different application.  That should then allow you to download the file which can then be opened in your required application.

How do I change the language code for PayPal?

The language code for the PayPal site is defined in the button using a hidden field.

So for English language use
<input type=’hidden’ name=’lc’ value=’US’ />

Possible values are France(FR), Spain (ES), Italy (IT), Germany (DE), China (CN), English (US).

The customer should hopefully see the login page in the defined language.

To change the language code, go to the file ipnfunction.php open in a text editor and you should see the default language code of
<input type=’hidden’ name=’lc’ value=’US’ />

Change the value to what ever code you require and upload the file back to your server.

Creating a mySQL Database in cPanel (new style)

Log in to your Cpanel

Log into cPanel and click on the mySQL database link.

Create A New Database

Scroll down to where it says ‘new database’ and enter your choosen database name in the field and click on ‘Create Database’

MySql Account Maintenance Page 

Each step in the process will take you back and forth to the mySQL Maintenace page to verify that you have set up the process correctly and you will be able to see the information you have created.

Here you will see you have added the database.

Click on the Go Back button.

Enter Username and Password

Scroll down to username and password and enter your information.  Click on create user.

Back to MySql Account Maintenance Page 

The username and password have been created for you database.  Click on the Go Back button to return.

Add username to database

Scroll down to add users to your databases.

If there are no users or databases previously created you will only see one in each selection.

Choose the username that you want to add.  Note that the username previously created “myusername” has been shortened to “myusern”  This is the name that you need to use in the config.php file. 

Example: “vonnamia_myusern” not “vonnamia_myusername”

Select the Database you created from the list.

Select the Checkbox “All Privileges”.

Click Add User To Database

MySql Account Maintenance 

This will take you back to the MySql Account Maintenance page for verification, you will see the shortened Username there.

Click on the Go Back button and you will see the contents of your finished Database.

Running the install.php file

At this point you have created the database, created a user and allocated the user to the database.

You can now create the tables using the install.php script supplied with the zip file.

You will need to have the following information available :

database name
database username
database password
database host (usually local host but refer to your host documentation if you are not sure)

When you run the install.php file in your browser you will be presented with boxes as follows :

Create a mySQL database with GoDaddy hosting

This describes creating a database with GoDaddy hosting

First, start by logging into your GoDaddy account:

Click on my hosting account (dropdown under “hosting”)

Click on “manage account” under the correct hosting account domain

Once you’re in the “hosting control center” click on “mysql” from the “databases” dropdown menu

Click the “create database” button

Choose MySQL version 4 or 5, and then enter a description (can be anything), database/user name (must be very unique, or you’ll have to try again), and password (must use at least one capital letter and a number)

(NOTE: you may have to wait 5-10 minutes while the database is setup )

Click the little pencil icon to edit/view database details

Write down or copy the “Host Name:” this will go in the wp-config.php file in place of “localhost”

In your web browser, go to the installation script install.php and fill in the details:

Create a mySQL database using cpanel (old style)

This tutorial will take you step-by-step through the process of creating a database for use with withinweb applications using CPanel.

First, login to your cpanel control panel.

You should see a large number of icons, one of which will be mySQL Database

Click on this and you will be taken to the mySQL Account Maintenance page.  You may also see other database details listed if you have created other database before.

Add User

You need to first add a user name and a password.

Click the Add User button

Note that your host will usually add a prefix to the user name, so this will become something like wptemp_Podz

Create your database

You should now be looking at the screen below. Note that you – the User – are listed in a box at the top, and also below the line too.

Enter the name of the database where database name is listed. Then click Add Db

The database is now created.

Allocate the user to the database

The two pieces of information you just added are now here on this screen: the user name and the database name.

If you have other databases and users, the whole screen may look different, but this small part will look the same.

Look at the two drop-down boxes.

The User box MUST contain the name that you added first above. (Note that for each name you put in, the CPanel has added a prefix.) If you need to, click the drop down to get the name you added to appear in the left hand box. The same applies to the database: – get the name of the database in the box too.

When finished, click the button that says Add User to Db.

This is REALLY important – nothing will work unless you click that button.

You should see this.

At this point you have created the database, created a user and allocated the user to the database.

You can now create the tables using the install.php script supplied with the zip file.

You will need to have the following information available :

database name
database username
database password
database host (usually local host but refer to your host documentation if you are not sure)

When you run the install.php file in your browser you will be presented with boxes as follows :