Set up an Apache+PHP+MySQL local environment

You want to have a local Apache web server to test your new site? We’ll show you how to setup a web server and an MySQL server using XAMPP. XAMPP is a software that will install Apache+PHP+MySQL on your computer. Of course, you can download Apache, PHP and MySQL and install them by yourself, but using a suite like XAMPP will make the things much easier.

This tutorial is for XAMPP on Windows OS. XAMPP is also available for Linux and Max OS.

So, the steps to install the Apache+MariaDB(MySQL) development environment are:

1.Download XAMPP from (the Windows Installer is about 110MB)


2. Install XAMPP. During the installation, choose the components you want to install.

XAMPP Installer Components

3. Start XAMPP Control Panel. 

4. Start the modules you want to run – in our case Apache(which includes PHP) and MySQL.

XAMPP Control Panel

You can now access the web server on your web browser at http://localhost/. The root folder of the web server is c:\xampp\htdocs\ In this folder you will put your site’s files.

To manage the database server go to http://localhost/phpmyadmin/. phpMyAdmin is a graphical tool that allow you perform various database operations.

And the video tutorial:


Share this post:

How to check server information in cPanel

Ever wanted to check your web hosting account details? Like Apache Web Server, MYSQL, PHP versions? cPanel allow you to examine these details. The steps are:

  1. Log into your cPanel account (you can find the cPanel username and password in the Welcome email you received from your host)
  2. On the right side of the cPanel click the Server Information link
  3. A new page will load where you can see a lot of details about your web hosting account, like: Apache, PHP, MySQL, PERL, cPanel versions; server load, status of the server services.
cPanel Server Information
cPanel Server Information

An example of some server details for your web hosting account that you can see in cPanel:

Item Detail
Hosting Package default
Server Name w08
cPanel Version 62.0 (build 17)
Apache Version 2.4.25
PHP Version 7.0.17
MySQL Version 10.1.22-MariaDB
Architecture x86_64
Operating System linux
Shared IP Address
Path to Sendmail /usr/sbin/sendmail
Path to Perl /usr/bin/perl
Perl Version 5.16.3
Kernel Version 2.6.32-042stab117.14

Check out the video we made to show you how easy is to check the server information in cPanel:

All our shared and reseller plans comes with cPanel. cPanel is a tool that allows you to manage many aspects of your web hosting account.
Share this post:

How to start,restart and stop Apache web server

Here we will list some very simple commands to start, restart and stop the Apache web server. Of course, you should take care about the stop command as your websites will stop working.

For starting Apache use:

root@web [/home/admin]# /sbin/service httpd start
httpd (pid 11858) already running
root@web [/home/admin]#

As you can see, if the Appache (httpd service) is already running the system will let you know.

To restart httpd:

root@web [/home/admin]# /sbin/service httpd restart
root@web [/home/admin]#

To stop Apache server :

root@web [/home/admin]# /sbin/service httpd stop
root@web [/home/admin]#
Share this post:

How to get MySQL/Apache/PHP versions

You can use these commands on a virtual private server (VPS) or dedicated server running CentOS. Usually, you will use the CentOS for a web hosting server. Many times you want to check the versions of Apache, PHP and MySQL server.

For MySQL:

root@web [/home/admin]# mysql -V
mysql Ver 14.14 Distrib 5.5.29, for Linux (i686) using readline 5.1
root@web [/home/admin]# 

Notice that capital “V” from the first command.

Alternatively you can use:

root@host [/]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 273052
Server version: 5.5.28-cll MySQL Community Server (GPL)
Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> SHOW VARIABLES LIKE "%version%";
| Variable_name | Value |
| innodb_version | 1.1.8 |
| protocol_version | 10 |
| slave_type_conversions | |
| version | 5.5.28-cll |
| version_comment | MySQL Community Server (GPL) |
| version_compile_machine | i686 |
| version_compile_os | Linux |
7 rows in set (0.00 sec)

root@host [/]#

For PHP use:

root@host [/]# php -v
PHP 5.3.21 (cli) (built: Jan 27 2013 06:28:24)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies
with the ionCube PHP Loader v4.2.2, Copyright (c) 2002-2012, by ionCube Ltd.
root@host [/]#

For Apache try :

root@host [/]# /usr/local/apache/bin/httpd -v
Server version: Apache/2.2.23 (Unix)
Server built: Jan 27 2013 06:23:25
Cpanel::Easy::Apache v3.16.7 rev9999
root@host [/]#

As you can see, this command will also output the Easy Apache version – if the server has cPanel installed.

Share this post: