Setup a development environment with free and open source web server solution stack (XAMPP) and Database management software (phpMyAdmin)
I install XAMPP server on MAC OS 10.6 it was working fine. After a lot of days I checked it, but not working this time, localhost not opening this time. After some R&D I reinstall XAMPP server. DNS.1 = localhost. Create SSL CRT openssl x509 -req -sha256 -extfile localhost.ext-days 3650 -in localhost.csr -signkey localhost.key -out localhost.crt 8. Add SSL CRT to macOS Keychain. Double click on localhost.crt on Finder; Select Keychain: System then click Add; Find & double click on localhost cert in Keychain Access. Mac OS X actually includes an Apache server out-of-the-box, but most developers will prefer to use the integrated tools and configurability provided by XAMPP. As with most programs on Mac, installation is a.
XAMPP and phpMyAdmin as localhost provides a local server for developers to test and build web apps. XAMPP is a local server that is installed on personal computers/laptops. It provides a local environment to create, run, and test PHP applications before deploying them on live servers.
Localhost Xampp Phpmyadmin
We will cover following sections in this blog post:
XAMPP is free and open source web server solution stack. It contains Apache, MySQL, MariaDB, PHP, and Perl. XAMPP is available for Windows operating systems. It is extremely easy to install and use. That’s why it’s the most popular PHP development environment. XAMPP and phpMyAdmin as localhost provides a complete environment for web app development and testing.
Alphabets in XAMPP stand for:
- X — cross-platform (supports multiple operating systems including Linux, Windows and Mac OS)
- A — Apache HTTP Server
- M — MariaDB (Database)
- P — PHP
- P — PERL
- Download XAMPP from here.
- Install the executable file.
- Then click “Next”.
- Choose the components you want to install.
- For most web apps you only need Apache, MySQL, PHP, and phpMyAdmin.
- Select the installation directory where you want to install XAMPP.
- You will be shown a windows security alert. You must check the following option: “Private networks, such as my home or work network”.
- Finally click on “Finish” to complete installation.
- After successful installation, open XAMPP control panel.
- Start “Apache” and “MySQL” services.
To access phpMyAdmin dashboard, click on “Admin” button next to MySQL service. You can also access phpMyAdmin by visiting http://localhost/phpmyadmin from your browser. Here you can create databases. Follow these steps to create a new database.
- From dashboard, click on “Databases” tab.
- Enter database name and click on “Create” button. This will simply create a new empty database.
- Next you can create tables by selecting the newly created database.
- Enter table name under “Create Table”.
- Select number of columns.
- Then click on “Go” button.
- After that you need to fill the form on next page to finish creating table.
XAMPP installation is simple and straight forward. It takes no more than 15 minutes to the setup XAMPP server. Once it’s installed, developers can build and test their PHP based web apps even without an internet connection. Instead of testing projects directly on a live web server, it’s simple and time-saving to test them locally. It’s a great platform for beginners to learn, test, and polish their PHP, Perl, and database skills.
These instructions are for XAMPP 1.7.3 running on Windows XP.
Xampp Localhost Page
They should be similar for other configuration combinations, but no guarantee is made.
These instructions should also work for an Apache Server install that is not part of a XAMPP install (specific details regarding file locations and restarting of the Apache Server will differ). Evowars.
NOTE: XAMPP 1.7.4 and XAMPP 1.7.7 display misleading port information in the XAMPP Control Panel.
Regardless of which port you specify Apache to listen to, the XAMPP Control Panel will always display:
Apache started [Port 80]
This is WRONG!!!! This is a HARDCODED string in XAMPP 1.7.4 and 1.7.7. It does not reflect the actual port Apache is listening to.
Yet another reason why you should not be using XAMPP 1.7.4 or 1.7.7.
By default, Apache Server listens on port 80, but this can be changed.
Why Change the Port?
Perhaps certain ports are blocked by your network admin or ISP (although, I would not recommend running XAMPP as a publicly accessible server).
Perhaps port 80 is already being used by some other application (like IIS) and you don’t want to or are not allowed to shut it down or change it.
Apache Server is not starting and you are using XAMPP 1.7.4 (I recommend XAMPP 1.7.3). XAMPP 1.7.4 removed a useful port debugging tool, so changing the Apache Server port is one way of checking to see if you have a port conflict – change the port and if Apache Server starts working, then you know some other application is using port 80. You should try several ports, just in case you are lucky and manage to pick ports used by other applications. Some ports to try are 2375, 4173, 5107, 9260, 20010 – these ports, among others, are all listed as unassigned (but that doesn’t mean someone else isn’t using them).
How to Change the Port
Edit the httpd.conf file to change the port Apache listens on.
Xampp Localhost Not Working
(1) Locate the file httpd.conf. This file should be found in C:xamppapacheconf (or whichever directory you installed XAMPP in – mine is on my D-drive because that is where I installed XAMPP).
(2) Open the file using a text editor or programmer’s editor (I use notepad++). DO NOT use a word processor (like Word) to open the file, it will badly mess it up.
(3a) Locate the line that says
Listen 80. It is line #47 in the XAMPP 1.7.3 install.
(3b) Change the port number (80) to a different number (for this tutorial, I changed it to 1234).
(3c) Save the file.
(4) Restart the Apache Server to have the change take effect. Do this by clicking on the Stop button on the XAMPP control panel and then clicking on the Start button. (You could also just reboot the computer, but that is overkill).
When you connect to the Apache Server, you will have to append the port number to the URL. Previously where you typed localhost, you will now have to type localhost:1234 (or whatever your new port number is):
Note: in Microsoft Internet Explorer 8 (IE8), it is necessary to prepend the prefix http:// before localhost: localhost:1234 will not work, it must be http://localhost:1234.
I did not observe this with Firefox 4.0 – entering localhost:1234 worked just fine (the browser was able to resolve the address as http://localhost:1234).
Second note: this is not a bug in IE8 – as a convenience, browsers automatically try to fixup URLs for you. Technically, you ARE required to type http:// before every URL you type in.