Computer Programming web Web programming Tips



PHP Development Environment

By Sergey Skudaev


The XAMPP installation guide

Download and install XAMPP, an easy to install Apache distribution containing MySQL, PHP, and Perl:

https://sourceforge.net/projects/xampp

Hover your mouse over an image to enlarge it. Click the image to make it small again.

xampp executable

Create a xampp folder in the root directory and save executable xampp-win32-7.1.8-0-VC14-installer.exe in the folder.

xampp executable

Select the executable file, click by right mouse and select "Run as Administrator".

xampp executable

If you have an antivirus software, you may need to pause protection or disable it temporary.

xampp executable

Do not change default selections.

xampp executable

Change the destination directory from C:\Program Files(x86) to C:\xampp

xampp executable

Just click Next

xampp executable

Just click Next

xampp executable

Just click finish. Find XAMPP in your start menu and open.

xampp executable

XAMPP control panel is displayed. Click start Apache then after Apache starts running, click Start MySQL. MySQL should start running.

xampp executable

Open your favorite browser and type in the URL "http://localhost/" The welcome page is displayed.

xampp executable

Click phpMyAdmin link on the left upper corner. phpMyAdmin is started.

If your phpMyAdmin displays error, it may be related to port conflict with another software running on your PC. You may change the default 3306 port used by MySQL in xampp\mysql\bin\my.ini file to the 3307 port.

Restart Apache, MySQL and XAMPP each time after changing a port.

To change port for phpMyAdmin, open config.default.php file located in the "phpMyAdmin\libraries" directory.

Find a line: $cfg['Servers'][$i]['port'] = '' and enter between single quotation marks a mysql port that is displayed on the XAMPP Control Panel.

xampp executable

phpMyAdmin home page. You can click SQL button on the main menu. In the text area, type a query "create database mydb" and click the Go button. The mydb database will be created.

xampp executable

To create a visitor table, select a database on the left and click SQL. In the text area, type or paste a create table statement and click the Go button. The visitors table will be created.

xampp executable

Click the structure button on the main menu and you will see the table structure: the table fields, data type and the size.

xampp executable

To insert a record to the visitors table, select a table on the left and click the Insert button on the main menu. In the list of fields, enter a visitor´s data and click the Go button. The record will be inserted.

xampp executable

Click the Browse button and the records inserted in the table will be displayed.

xampp executable

To export table structure and table data, click the Export button on the main menu. Enter table name in the new template text box, select it in the exiting template list and click Go button.

xampp executable

The Save dialog is displayed. Save the file.

CREATE TABLE `visitors` ( `userid` int(11) NOT NULL AUTO_INCREMENT, `lastname` varchar(20) DEFAULT NULL, `firstname` varchar(20) DEFAULT NULL, `username` varchar(20) DEFAULT NULL, `password` varchar(50) DEFAULT NULL, `email` varchar(30) DEFAULT NULL, `role` varchar(10) DEFAULT NULL, `active` tinyint(4) DEFAULT NULL, PRIMARY KEY (`userid`) ) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

It contents will look like the table statement above.

PHP links:

www.sitepoint.com

www.codetoad.com

www.phpfreaks.com

www.devx.com

www.phpbuilder.com

www.zend.com

Home

My eBooks on Amazon.com

US    UK    BR    CA
US    UK    BR    CA
US   UK   BR   CA