Creating the Database
=>Deploying the Application on a Remote Web Server
Normally, a real-life PHP application is run on a remote server and is accessed through a File Transfer Protocol (FTP). To deploy your CRUD application on a remote server, you will need to register an account on a hosting provider, register an FTP account, and create a remote database.
You can use any hosting you like. The current document describes the deployment procedure on the X10HOSTING free hosting. This hosting includes a MySQL but not an Oracle database server.
All the user names, passwords, and email addresses are fake and used as examples only. The administration of the hosting blocks an account if the user does not show up on the forum fore more than a week. So you may fail to apply exactly the same user names, passwords, email addresses, and other credentials from the tutorial.
In this lesson you learn how to do the following:
The current document is a part of the Creating a CRUD Application in the NetBeans IDE for PHP tutorial.
MySQL users: Click here to download the source code that reflects the project state after the previous lesson is completed.
Create an email account, if you have not created it before. In this example the email address is email@example.com.
To create a hosting account on the X10HOSTING free hosting, follow the steps in their wizard, entering the following settings. You will enter similar information on any other hosting site.
|Hosting Account Username (also for login to cPanel)||phpuser|
|Hosting Account Password (also for login to cPanel)||qwerty1234|
|FTP Account name||uploader|
|FTP User Namefirstname.lastname@example.org|
|Remote Database Host Name||phpuser|
|Remote Database Username||phpuser|
|Remote Database User Password||phpuserpw|
Now that you have a hosting account, you need an FTP account where you will transfer your PHP source and other related files for executing them on the server. For x10Hosting, you opent the cPanel and select New FTP Account, then follow their wizard.
Because the CRUD application uses a database you will also need to deploy the wishlist MySQL database on the remote server where you have a hosting account.
So far you have developed and run the Wish List application on the local web server and used a local MySQL or Oracle database server. To make your application work with the remote MySQL database, you need to update the connection settings specified through the variables of the class WishDB.
var $user = "<the name of the remote database user>"; var $pass = "<the password of the remote database user>"; var $dbName = "<the name of the remote database>"; var $dbHost = "<the account username specified during the hosting account creation>";In this example the variables will be updated as follows:
var $user = "phpuser"; var $pass = "phpuserpw"; var $dbName = "wishlist"; var $dbHost = "phpuser";
<< Previous lesson
Back to the Tutorial main page
To send comments and suggestions, get support, and keep informed on the latest developments on the NetBeans IDE PHP development features, join the email@example.com mailing list.
Back to the PHP Learning Trail