Importing Your Database Tables

Importing Database Tables

Most new scripts come with a built-in installer. All that is resuired to pose it, is to alluviation the ‘lay.php’ author in your browser and participate your database information in the represent that is provided. When the info is submitted, the playscript creates all database tables automatically. Helping of cake. Alas, rattling ofttimes there’s no such installer included, and you’ll hit to create the database tables manually. – don’t headache – there’s nothing to it, When this is the human, a isolated database file faculty be included in the script’s folder (instruction: ‘.sql’). Unremarkably it’s titled ‘db.sql’, but this can be anything. Halt your script’s beginning drill to mature out. This is the record you poorness to meaning into your meaningless database to make the database tables. To conceptualise out how to do this for Importing Database Tables,

Still on the same page in your cPanel, click ‘phpMyAdmin’ for Importing Database Tables.

Importing Your Database Tables PHP and ASP

Importing Your Database Tables

This will open phpMyAdmin in a new window to Importing Database Tables.:

Importing your Database PHP and ASP

Importing Your Database

For  Importing Database Tables > In the left drop down menu, select the database you’ve just created. The database name will be followed by ‘(0)’, since you haven’t created any tables yet. The nigh compose instrument impart the masses content: ‘No tables plant in database’. In the reactionary build, stop the ‘Import’ tab. Click the ‘Browse’ button. Browse to your script’s folder, select the ‘db.sql’*-file and click ‘Open’.

 For Importing Database Tables Just Click ‘Go’ to start the import .

Importing Your Database Tables PHP and ASP

Importing Your Database Tables

Importing Database Tables> When your intend has been productive, your tables instrument be created. In the port redact, you’ll see the merchandise of tables that feature been created happen behindhand your database repute, and you’ll see a move of all those tables below that. You can close both phpMyAdmin and cPanel and go on installing your script for Importing Database Tables.

How to Create a database

Create a database

First, you need to log in to cPanel. You will find it when you load http://www.yourdomain.com/cpanel, then You can see this image,

How to Create a Database PHP and ASP

How to Create a Database

A new screen will appear, showing you a list of all your existing databases and database users for Create a database:

How to Create a Database PHP and ASP

How to Create a Database

Scroll down until you see a field and a button that says ‘Create Database’.

How To Create a Database PHP and ASP

How To Create a Database

Give your database a name and click the ‘Create Database’ button. A new window appears, confirming your action:  Click ‘Go Back’ to go back to the previous page. On that page, scroll down until you see two fields and a button that says ‘Create User’. Choose a username and password, and click the button. The confirmation screen will appear again. Click ‘Go Back’ to go back to the previous page. On that page, scroll down until you see ‘Add Users To Your Database’.

How To Create a Database PHP and ASP

How To Create a Database

In the first drop down menu, select the user you just created. In the second drop down menu, select the database you just created. Make sure the box next to ‘ALL’ is checked. Click the button that says ‘Add User To Database’. Again you will see a confirmation message. Click ‘Go Back’ to go to the previous page.

Scroll down until you see ‘Access Hosts’. Make a note of what’s written there (usually, this will be ‘localhost’).

How to Create a Database PHP and ASP

How to Create a Database

Your database has been created and by now you have all the info you need to run Script’s installer (or to manually edit the script’s configuration file):

  • your database name
  • your database username
  • your password
  • your host

Installing Apache and PHP on Linux

This section guides you through the process of Installing Apache and PHP from source.

Targeting the Linux platform for Installing Apache. You need a respectable ANSI-C compiler and build system, two items that are available through all of the major distributions’ package managers. In addition, PHP requires both Flex (http://flex.sourceforge.net) and Bison (www.gnu.org/software/bison/bison.html), while Apache requires at least Perl version 5.003. Finally, you’ll need root access to the target server to complete the build process. For the sake of convenience, before beginning the installation process, consider moving both packages to a common location such as /usr/src/. The Installing Apache process follows:

1. Unzip and untar Apache and PHP. In the following code, the X represents the latest stable version numbers of the distributions you downloaded in the previous section:

%>gunzip httpd-2_X_XX.tar.gz
%>tar xvf httpd-2_X_XX.tar
%>gunzip php-XX.tar.gz
%>tar xvf php-XX.tar

2. Configure and Installing Apache. At a minimum, you’ll want to pass the option — enable-so, which tells Apache to enable the ability to load shared modules:

%>cd httpd-2_X_XX
%>./configure --enable-so [other options]
%>make

3. Install Apache (which you will need to do as the system superuser):

%>make install

4. Configure, build, and install PHP (see the “Configuring PHP at Build Time on Linux” section for information regarding modifying installation defaults and incorporating third-party extensions into PHP). In the following steps, APACHE_INSTALL_DIR is a placeholder for the path to Apache’s installed location, for instance /usr/local/apache2:

%>cd ../php-X_XX
%>./configure --with-apxs2=APACHE_INSTALL_DIR/bin/apxs [other options]
%>make
%>make install

5. PHP comes bundled with a configuration file that controls many aspects of PHP’s behavior. This file is known as php.ini, but it was originally named php.ini-dist. You need to copy this file to its appropriate location and rename it php.ini. The later section Configuring PHP” examines php.ini’s purpose and contents in detail. Note that you can place this configuration file anywhere you please, but if you choose a nondefault location, you also need to configure PHP using the –with-config-file-path option. Also note that there is another
default configuration file at your disposal, php.ini-recommended. This file sets various nonstandard settings and is intended to better secure and optimize your installation, although this configuration may not be fully compatible with some of the legacy applications. Consider using this file in lieu of php.inidist. To use this file, execute the following command to Installing Apache:

%>cp php.ini-recommended /usr/local/lib/php.ini

6. Open Apache’s configuration file, known as httpd.conf, and verify that the following lines exist. (The httpd.conf file is located at
APACHE_INSTALL_DIR/conf/httpd.conf.) If they don’t exist, go ahead and add them. Consider adding each alongside the other LoadModule and Add Type entries, respectively: LoadModule php5_module modules/libphp5.so AddType application/x-httpd-php .php Believe it or not, that’s it. Restart the Apache server with the following command:

%>/usr/local/apache/bin/apachectl restart

Proceed to the “Testing Your Installation” section.

■ Tip The AddType directive in Step 6 binds a MIME type to a particular extension or extensions. The .php extension is only a suggestion; you can use any extension you like, including .html, .php5, or even .jason. In addition, you can designate multiple extensions simply by including them all on the line, each separated by a space. While some users prefer to use PHP in conjunction with the .html extension, keep in mind that doing so will ultimately cause the file to be passed to PHP for parsing every single time an HTML file is requested. Some people may consider this convenient, but it will come at the cost of performance to Installing Apache .