Install Apache Php5 Mysql Windows Client

This tutorial shows you two ways of configuring your PHP development environment on the Windows operating system. The first and most convenient way is to install and configure an AMP (Apache, MySQL, PHP) package. This tutorial shows you how to install the XAMPP package. The second way is to install and configure each component separately.

This brief tutorial shows students and new users how to install phpMyAdmin with Apache2, MySQL and PHP support on Ubuntu 17.04 17.10. This post should be short and easy to follow. In our previous post, we showed students and new users how to install phpMyAdmin with MariaDB support.

Contents

  • Using an AMP Package
  • Installing the Components Separately

To follow this tutorial, you need the following software and resources.

Software or ResourceVersion Required
NetBeans IDEPHP download bundle
A PHP engineVersion 5. Included in XAMPP-Windows.
A web serverApache HTTP Server 2.2 is recommended.
Included in XAMPP Windows.
A database serverMySQL Server 5.0 is recommended.
Included in XAMPP Windows.
A PHP debugger (optional)XDebug 2.0 or later.

Typically, development and debugging is performed on a local web server, while the production environment is located on a remote web server. Setting up a remote web server is described in Deploying a PHP Application on a Remote Web Server Using the NetBeans IDE. This tutorial has you set up a local web server. PHP support can be added to a number of local web servers (IIS, Xitami, and so on), but most commonly Apache HTTP Server is used. Apache HTTP server is included in the XAMPP AMP package used in this tutorial. For information on installing and configuring Apache HTTP server standalone, click here.

Required Software

To create, run, and debug your PHP projects you need the following software:

  • The NetBeans IDE for PHP. Downloads are available here.
  • A web server. Typically development and debugging is performed on a local web server, while the production environment is located on a remote web server. The current version enables using a local server. Using a remote server with FTP access will be supported in future versions. PHP support can be added to a number of web servers (IIS, Xitami, and so on), but most commonly Apache HTTP Server is used. Click here for information on how to install and configure Apache 2.2.
  • The PHP engine. The supported version is PHP5. Downloads are available here.
  • The PHP debugger. The NetBeans IDE for PHP allows you to use XDebug, but using a debugger is optional. The recommended version is XDebug 2.0 or higher as it is compatible with PHP5.
  • A database server. You can use various database servers while one of the most popular ones is the MySQL server. Downloads are available here.
    Note: The recommended version of the product is MySQL Server 5.0. The provided documents describe the work with this version.

After the installation, you need to set up the environment that all the software components work properly with each other.

You can use a Package, that contains the required software, or install each component separately.

Using an AMP Package

To have all the configuration settings for the PHP engine, the Apache HTTP Server, and the MySQL database server specified automatically, use an AMP package. This tutorial gives instructions only for the XAMPP-Windows package. For help with the WAMP package, please see the NetBeans XDebug Wiki.

Installing and Configuring the XAMPP Package

The section describes how to download, install, and configure the XAMPP package.

Warning: Do NOT use XAMPP 1.7.0. There are significant problems with XDebug in this version. Use version 1.7.1 or later, where these problems are fixed.

Note: Starting with XAMPP 1.7.2, XAMPP comes with PHP 5.3, not PHP 5.2.x. NetBeans IDE for PHP version 6.7.x does not support the new PHP 5.3 functions. NetBeans IDE for PHP 6.8, currently available as a development build, fully supports PHP 5.3. Also note that Xdebug installation differs between PHP 5.2.x and PHP 5.3.

  1. Download the XAMPP installer package. (XAMPP Lite does not include XDebug.)
  2. When the download is completed, run the .exe file.

    On Microsoft Vista, the User Access Control feature blocks the PHP installer from updating the Apache httpd configuration. Disable UAC while you are installing XAMPP. See Microsoft support for more information.

  3. You are given the option to install the Apache server and the MySQL database server as services. If you install the Apache Server and MySQL as services, you will not have to start them manually through the XAMP Control Panel. Note that you have the option to install or uninstall these services in the XAMPP Control Panel.
  4. If you are using the self-extracting archive, after the archive is extracted, run the file setup-xampp.bat to configure the components of the package. (The XAMPP installer runs this file automatically.)
  5. After configuration, open the XAMP Control Panel. (You can open it manually by running the file XAMPP_HOME/xampp-control.exe or from the Xampp Control Panel icon that is automatically placed on your desktop.) When you open the XAMPP Control Panel, note that the modules that are installed as services are already running.

    Warning: On Windows Vista sometimes xampp-control.exe will not run. You can run xampp-start.exe instead.

    Warning: The winmysqladmin.exe file, which is launched by the Admin button for MySQL, does not work. A cascade of error messages appears, which can only be stopped by manually terminating the winmysqladmin process. You cannot launch winmysqladmin.exe from the command line, either. See http://bugs.xampp.org/view.php?id=71.

  6. The Svc checkboxes indicate that a module is installed as a Windows service and will start automatically on system startup. You can install or uninstall Windows services by selecting or unselecting the Svc checkbox. Uninstalling a Windows service does not uninstall the module, but it does require you to start the module manually. The XAMPP control panel includes buttons for stopping and starting modules and opening their administration consoles.

Checking XAMPP Installation

  1. Run your browser and enter the following URL: http://localhost. The XAMPP welcome page opens:
  2. To ensure that the Apache and MySQL servers have been installed as system services, restart your operating system, run the browser, and enter the http://localhost URL again. The XAMPP welcome page opens. Note that the XAMPP welcome page includes a menu in the left margin through which you can check the status of XAMPP components and run phpinfo(), among other useful features. phpinfo() returns a screen with configuration information about your XAMPP components.

Installing and Enabling the XDebug Debugger

You need to configure your PHP stack to use XDebug. The process differs if you are using XAMPP 1.7.1, which bundles PHP 5.2.6, or XAMPP 1.7.2, which bundles PHP 5.3.

Many users have experienced difficulties in getting XDebug to work on their systems. Please see our wiki and the NetBeans PHP Editor Users' Forum for assistance.

XDebug on XAMPP 1.7.1 (PHP 5.2)

You must download XDebug, place the .dll file in your php extensions directory, and configure php.ini to find and use this file.

  1. Download the latest thread-safeXDebug compatible with your version of PHP. The download links are listed under Releases. Copy the .dll file to your XAMP_HOME/php/ext directory. (XAMPP_HOME refers to your XAMPP or XAMPP Lite installation directory, such as C:Program Filesxampp or C:xampplite.)
  2. Locate and open the active php.ini file for your XAMPP. This is located by default in the XAMPP_HOME/apache/bin directory. Confirm which php.ini file is active by running phpinfo() and searching for Loaded Configuration File.
  3. Because Zend optimizer blocks XDebug, you need to disable Zend optimizer. In the active php.ini file, locate the following lines and delete them or mark as comments (To be safe, search for and comment out all properties related to Zend):
  4. To attach XDebug to the PHP engine, uncomment the following lines in the php.ini files (directly beneath the [Zend] section, add them if not there). Some additional notes have been added.

    Set the xdebug.remote_enable property to 1, not 'true' or any other value.

    Note: Make sure the paths you specify match the location of the corresponding files as determined during your installation.

  5. Save php.ini.
  6. Run the XAMPP Control Panel Application and restart the Apache server.
See our wiki and the XDebug documentation for more information on how to configure XDebug.

Xdebug on XAMPP 1.7.2 (PHP 5.3)

XAMPP 1.7.2 comes bundled with the appropriate Xdebug .dll file. You only have to configure php.ini to use it. Note that all Xdebug settings have text explaining them.

  1. Locate and open XAMPP_HOMEphpphp.ini for editing. This is the only php.ini file in XAMPP 1.7.2.
  2. Find and uncomment the line zend_extension = 'XAMPP_HOMEphpextphp_xdebug.dll'.
  3. Find and uncomment the line xdebug.remote_host=localhost. Change the value of the setting from localhost to 127.0.0.1.
  4. Find and uncomment the line xdebug.remote_enable = 0. Change 0 to 1.
  5. Find and uncomment the line xdebug.remote_handler = 'dbgp'.
  6. Find and uncomment the line xdebug.remote_port = 9000.
  7. Save php.ini.
  8. Run the XAMPP Control Panel Application and restart the Apache server.

See our wiki and the XDebug documentation for more information on how to configure XDebug.

Installing the Components Separately

Apache HTTP Server

  1. Download the Apache2 HTTP server.
  2. Run the installation file .msi. The installation wizard starts. Follow the instructions.

    On Microsoft Vista, do not install the Apache Server to the default location, which is in Program Files. All files in Program Files are write-protected.

  3. When the installation is completed, restart the Apache server.
  4. To check that the installation is successful, run the browser and enter the following URL: The Apache welcome test page opens:

Troubleshooting

By default, the Apache server listens to port 80. This port can be already used by other services, for example Skype. To solve the issue, change the port which the server listens to:
  1. Open the Apache web server configuration file httpd.conf. By default the file is located in C:Program FilesApache Software FoundationApache<version>conf
  2. Locate the line Listen 80 and change the port number, for example 8080. Save the file.
  3. Restart the Apache web server.
  4. To check that the web server works, run the browser and enter the URL and specify the port number explicitly: http://localhost:8080

You can also stop the processes that possibly listen to port 80. In the Task Manager, select the relevant file name and click End Process.

Find more information on installing and configuring the server here.

PHP Engine

  1. Download the Windows binary installer for the PHP5 version of your choice.

    Important: If there is no installer available for the version of PHP you want to install, you have to install it manually from the .zip file. See Manual Instruction Steps in the php.net documentation.

  2. When the download is complete, run the .msi installation file. The installation wizard starts.
  3. On the Apache Configuration Directory panel, specify the directory where the httpd.conf file is located, the default setting is C:Program FilesApache Software FoundationApache<version>conf. The PHP processing will be enabled automatically.
  4. If you want to use the MySQL database server, choose the Complete installation option or select the MySQL and MySQLi items in the Extensions list.
  5. After the installation is completed, restart the Apache server.
  6. To check that the PHP engine has been installed successfully and PHP processing has been enabled in the Apache configuration:
    • Open Notepad or another text editor. Create a file and type the following text:
    • Save the file in the htdocs folder as test.php. The default path is C:Program FilesApache Software FoundationApache<version>htdocstest.php
    • Run the browser and enter the following URL: http://localhost:<port>/test.php. The following page opens:

Troubleshooting

If the page does not open:
  1. Restart the Apache server.
  2. Check that the Apache server configuration file httpd.conf contains the following lines:
  3. If the lines are missing, add them, save httpd.conf, and restart Apache.
  4. Refresh the http://localhost:<port>/test.php page.

MySQL Database Server

Find detailed information on installing and configuring the MySQL database server.

XDebug

  1. Download XDebug.
  2. Install XDebug into the php/ folder. You will need the path to it to configure your environment.

Setting Up the Environment

  1. If your installation follows the default settings, PHP processing will be enabled automatically.
  2. To attach XDebug to the PHP engine, locate the php.ini file and add the following lines to it:

    For a thread-safe PHP 5.2 engine:

    For a non-thread-safe PHP 5.2 engine:

    For any PHP 5.3 engine:

    Some users also find that they need to include the following lines, although other users do not:

    Click here for more information on how to configure XDebug.

    Note: Make sure the paths you specify match the names and locations of the corresponding files as determined during your installation.

  3. To be sure that previously installed PHP engine supports using the MySQL database server:
    1. Click Start > Control Panel.
    2. On the Control Panel, choose Add or Remove Programs.
    3. On the Add or Remove Programs panel, select the PHP <version number> area and click Change. The PHP Setup Wizard starts. Click Next.
    4. On the Change, repair or remove installation panel, choose Change and click Next.
    5. On the Web Server Setup panel, choose the version of the Apache server - in our example it is Apache 2.2.x Module. Click Next.
    6. On the Apache Configuration Directory panel, specify the directory where the Apache configuration file httpd.conf is located. Click Next.
    7. On the Choose Items to Install panel, expand the Extensions node and choose the MySQL and MySQLi items. Click Next.
    8. On the Ready to change PHP <version number> panel, click Change.
    9. On the Completed the PHP <version number> Setup Wizard panel, click Finish.


To send comments and suggestions, get support, and keep informed on the latest developments on the NetBeans IDE PHP development features, join the users@php.netbeans.org mailing list.

Back to the PHP Learning Trail

Test your site on your own computer with the help of XAMPP


by Christopher Heng, thesitewizard.com

This article shows you an easy way to install and configure Apache, PHP, Perl and MySQLon your own Windows computer, so that you can test a temporary version of your website before transferring itto the Internet for the rest of the world to use.

The Software

While it's possible to install Apache,PHP,Perl andMySQLseparately, you will do it here with the help of a (free) third party pre-packaged bundle, called XAMPP, thatmakes the process almost painless.

For Development Purposes

As mentioned above, this article is meant for those who want to install these pieces of software fordevelopment purposes. That is, you will be using them to develop and test your websitebefore committing it 'live' to the Internet. It is not meant for those who wantto host their site on their own computer, and expose that computer to the Internet.

This is very important to note, because the software as it stands is not configured for suchproduction use. The default settings are designed to make it easy for you, the webmaster, to developand test your site. They are not secured, as they need to be, for a site visible on the Internet.

In fact, my personal preference is to disconnect completely from the Internet every time I start the web server upto test.

Who Can Benefit

I'm sure that there will be a few new webmasters who arrive at this article thinking that it applies to them because itlets them experiment with creatinga website before putting one 'live' onto the Internet.

However, in reality, the average webmaster, who isusing a web editor softwareto design a website will probably not gain much by installing Apache. If you use a web editor, yourwebsite files are saved on your own computer, and you can already view them with a web browser. Installinga web server in this case is overkill.

The people who will probably find this useful are the web programmers, whoare developing their own web-based software. That is, they are writing actual computer programs thatonly work when run on a web server, and want to test it before deploying it to their website.If you don't fall into this category of people, chances are that installing your own web server is justgoing to waste your time and increase your workload. (Please note that you do not need to do thiseven if you design your website directly in HTML. Writing HTML is not web programming. SeeWhat is HTML? What is PHP?for more information.)

Download XAMPP

Go to the XAMPP website and download XAMPP. Although this tutorialonly deals with the installation of XAMPP on Windows, there are also packages available for Mac OS X and Linuxif you have those systems.

Although the main page displays the package with the latest version of PHP, if you need an earlier one,click the link that leads to 'other versions', which will allow you to download a package with a differentPHP version. This allows you to get one that matches what your web host is using for your site.This will hopefully make your test environment more similar to that of your live site.

Note that XAMPP includes adatabasesoftware called 'MariaDB', which is (loosely speaking) just MySQL under a different name, so if you see wordslike 'MariaDB' instead of 'MySQL', don't worry. They are, for most purposes, the same thing.

Installing XAMPP

  1. After you download the package, doubleclick it to install it.

  2. If your computer has antivirus softwarerunning, you may get a dialog box saying something like 'It seems you have an antivirus running. In some cases, this mayslow down or interfere [with] the installation of the software.'

    In my case, I simply clicked the 'Yes' button to allow it to continue. If you click 'No',the installation aborts. Note that it's generally not a good idea to disable your antivirus when installingsoftware, since that's actually the time you really need your antivirus. (It's like having air bags installedin your car, but you remove them before you take the car out for a drive.)

  3. On modern versions of Windows (Vista, 7, 8, 8.1 and 10), you will get another dialog box with amessage warning you that Windows' User Account Control (UAC) will prevent you from using somefeatures of XAMPP if you install into 'C:Program Files' (or 'C:Program Files (x86)'), and toavoid doing so.

    Click 'OK'. Don't worry. We will install to 'c:xampp' which will avoid those problems. I personallydo not like to disable UAC, since it has its benefits.

  4. A dialog box with a welcome message will appear. Click 'Next'.

  5. The next dialog box, with a sub-heading of 'Select components', allows you to choose the programsthat you want to install.

    By default, everything is selected. It's up to you what you want to install. I normally uncheck the 'MercuryMail Server' and 'Fake Sendmail' (since I don't send mail in my local test programs), 'Tomcat' (sinceI don't run Java Servlets and Java Server Pages), 'FileZilla FTP Server' (since this is my own computer, itwill be silly to FTPto it just to copy files from one directory to the next) and 'Webalizer' (I don't needweb statistics;I'm the only visitor on that machine so I know exactly how many people visit the site and which pageshe goes to; I even know his name).

    When you're done selecting, click 'Next'.

  6. The next screen will let you change where to install the software. I suggest leaving itat 'c:xampp'. That is, do not install it to 'c:Program Files' or'c:Program Files (x86)' or you may face innumerable problems in the future, partlydue to Windows' UAC, and partly due to some software's inability to handle directory namesthat have spaces in them (which 'Program Files' obviously has).

    Click 'Next'.

  7. The next dialog box, with a sub-heading of 'Bitnami for XAMPP', will offer to let you knowmore about the installer program itself. (Note: this refers to thesetup utility,not Apache, PHP, Perl or MySQL.)

    Uncheck the box 'Learn more about Bitnami for XAMPP' (unless you actually want to learnabout the installer), then click 'Next'. (Note that this guide assumes that you have uncheckedthat box. I have no idea what additional screens are displayed, if any, if that box remains ticked.)

  8. In the dialog box that has the sub-heading 'Ready to Install', click 'Next'.

  9. While installing, depending on your version of Windows and whether the Windows Firewall is enabled onyour computer, you may get a dialog box, as depicted in the following picture. The exactappearance may differ, depending on the version of Windows you are using (mine is Windows 7),but the message should basically say something like it is blocking some features of the 'Apache HTTP Server'.

    Take your time to read the message (don't panic and click blindly). Since I don't intend to letanyone outside my computer and own network access the web server, I unchecked the 'Public networks'option and put a tick in the 'Private networks' box instead. You should make your own decision on this,and click the 'Allow access' button when you're done. Note that if you uncheck everything, you are probablyblocking the web server from accepting connections from anywhere, which will defeat the purpose ofinstalling the program.

    The installer will then add firewall rules that will allow the server to accept connections.As a result, your computer is now less secure: with these rules, the web server can be accessedby anyone on what Windows deems to be the same network as you (in the case of the 'private networks' option)or by anyone on the Internet or the same network (in the case of the 'public networks' choice). To protect your machine,you may want to keep the computer disconnected from the Internet and any network when the server is running.

    In the future, when you no longer want to have a server installed on your computer,you can delete the firewall rules that were just created. On Windows 7, type 'windows firewall'into the start menu, click the 'Windows Firewall with Advanced Security' entry that appears, click the'Inbound Rules' in the left column to load them into the right side, and delete all the rules for 'Apache HTTP Server'.

  10. Uncheck 'Do you want to start the Control Panel now?' and click 'Finish'.

Solving Compatibility Issues

If you have another web server installed, such as Microsoft's IIS, the Apache web server will not be ableto respond to HTTP requests at the default port (port 80) since IIS may already be in control of it.Note that it may not be obvious that you have another server installed. For example, Windows 10 Pro comes with IIS,and if you did not set up your own machine, it is possible that it was installed when Windows 10 was set up for you.

To solve this, you have to stop the other server from 'binding' port 80. For IIS, this can be done byrunning Services from the Start menu, stopping the 'World Wide Web Publishing Service', and settingthe 'Startup type' field of that service to 'Disabled'. Note that this will probably stop IIS fromworking altogether (although I'm not sure). For other software, look into their options / settingsto see if there's a way to make it use some other port, or find some way to terminate the program.

Starting and Stopping Apache and MySQL

To start up Apache and MySQL, type 'xampp' into your start menu. A list of start menu items containing theword 'xampp' will appear. Click 'XAMPP Control Panel'.

You will get a dialog box with two country flags the first time you run it. This is to allow you to select the languageXAMPP uses. Choose either the US flag (the flag on the left in the version of XAMPP I installed) or theGerman one for English or German respectively, and click 'Save'. (Yes, it makes no sense to show a pictureof a flag for a language, supposedly in a language-agnostic fashion, and then put the word 'Save' on thebutton. You might as well just display the name of the language in the same tongue as that word. If peoplecan read the word on the button, they can read the names of the languages.)

Once you do this, the XAMPP Control Panel will appear (see below).

The Control Panel allows you to start and stop the various modules you have installed.

To start Apache, click the 'Start' button that is on the same line as the word 'Apache'. Once the server is running,the word 'Apache' will be highlighted in green and some numbers (their process ids, which are justnumbers used internally by Windows to identify running programs) will be displayed in the 'PID(s)' column.The 'Port(s)' column will also show which ports the server is able to monitor. It should show '80, 443'. Nod32 fix v2 1 nsane exe. If itdoesn't show '80', it means that you have another web server running on your computer that is in control of that port.See the Solving CompatibilityIssues section above for information on what to do.

Next, click the 'Start' button for MySQL (if you have installed that). If this is the first time youare starting up MySQL, you may get a message from Windows Firewall asking whether to allow this.As before, I uncheck the 'Public networks' option and select the 'Private networks' box since itsuits my purposes. Whatever you choose, when you're done with your selection, click 'Allow access'.

Note that the firewall rules for both MySQL and Apache can be accessed from Windows Firewallas mentionedearlier. If you change your mind about the rules you set (whether 'private' or 'public' networks or both),you can simply stop the two modules in the XAMPP Control Panel, delete the relevant rules in the 'Inbound Rules'section of the Firewall, then start the modules again. You will then get the same firewall dialog box as earlierand you can redo your selection. For those who can't locate the MySQL rules, they are listed as 'mysqld' in theInbound Rules section.

Once successfully started, the 'MySQL' word in the XAMPP Control Panel will also be highlighted in green.

Whenever you are done with Apache and MySQL, you can terminate them by clicking the 'Stop' button ontheir respective lines. And of course after you do that, you can quit XAMPP by clicking the 'Quit' button.

For those who are wondering why PHP and Perl do not have their own entries, those programs will beinvoked by Apache as and when needed. (They don't run all the time; they are started only when thereis a PHP or Perl program to process.)

How to Configure Apache

Mysql

Unlike a pristineinstallation of Apache, where you have to do things like enable support forserver side includes,PHP and Perl manually, the XAMPP package has all these things already pre-configured. As such,you don't need to do anything special to enable them. In other words, your task of getting Apache towork on your computer is done.

However, should you ever need to adjust any of the settings in the server, the configuration filecan be accessed by clicking the 'Config' button in the Apache line of the XAMPP Control Panel,and 'Apache (httpd.conf)' in the menu that pops up. The Windows Notepad editor will openwith the configuration file loaded, and you can manually adjust the settings as needed.

How to Configure PHP

Similarly, the PHP bundled in XAMPP is already configured to work with MySQL so you don't have todo it yourself the way you would if you were toinstallMySQL and PHP separately.

In addition, it is also already set up to display all error messages in your browser,which is very useful on a development machine so that you get immediate notification of problemswhen you are testing your program. (Configuring things this way is of course not really desirable ona machine accessible by others on the Internet, but as I mentioned above, this setup is not meantfor such use.)

You can still tweak the PHP settings, if you wish, by clicking the 'Config' button in the Apacheline of the XAMPP Control Panel, and then selecting 'PHP (php.ini)' in the pop-up menu.

Where to Put Your Website Files

If you have accepted the default location for XAMPP (that is, 'c:xampp'), you can place your website filesin 'c:xampphtdocs'. After installation, there is a lot of rubbish in that folder,all of which you can delete. The aforesaid 'rubbish' basically function as the XAMPP welcome pagewith advertising links to the Bitnami installers. I tend to simply delete everything in that directorybefore putting my own files there. If you have installed the Webalizer web statistics module, you shouldprobably avoid deleting the 'webalizer' folder that is there. (Note that even if you did not choose to installWebalizer, there will still be a placeholder 'webalizer' directory, but it will be empty and youcan freely remove it.)

To delete the files, just open that folder, select the files you don't want, right click your mouse button,and hit 'Delete'. (You can open that folder by clicking the Windows start menu button, typing 'c:xampphtdocs'and hitting ENTER.)

Any HTML or PHP file you want to 'publish' on your web server should be copied into that same folder (ie,'c:xampphtdocs'). In fact, since everything is on your local computer, you can simply create, edit and savefiles directly in that directory if you like. So, for example, if you put a file called 'whatever.html' in that folder,you can access it as 'http://localhost/whatever.html' in your web browser.

If you have a Perl script that you want to run, put it into 'c:xamppcgi-bin' instead. Notice I said'c:xamppcgi-bin' and not 'c:xampphtdocscgi-bin'. For example, if you put a Perl script called'something.pl' in 'c:xamppcgi-bin', it can be referenced with a URL of'http://localhost/cgi-bin/something.pl'.

As implied earlier, you can access the website on your server by typing 'http://localhost/' intoyour web browser. Alternatively, you can also use 'http://127.0.0.1/'. Both 'localhost' and '127.0.0.1'refer to your own computer.

Testing Your Web Server

After you have deleted the default XAMPP files in the htdocs directory, you can test your server installationby creating a file with the following content and saving it as 'index.php' in that folder.

<?php
phpinfo();
?>

Then type 'http://localhost/' in your browser. You should see a page of information (one that is probably moreuseful and informative than the XAMPP default page that you deleted earlier) about your server installation,including the versions of the Apache, PHP, MySQL and how they are configured.

Note: if you were reluctant to delete the default XAMPP files, but still want this information,save the file as some other name, eg, 'test.php'. Then access it in your browser as'http://localhost/test.php'.

Conclusion

That's it. You can now write and test your web programs on your local installation of Apache without worryingabout those programs affecting visitors at your real website.

Copyright © 2016-2020 Christopher Heng. All rights reserved.
Get more free tips and articles like this,on web design, promotion, revenue and scripting, from https://www.thesitewizard.com/.

Do you find this article useful? You can learn of new articles and scripts that are published onthesitewizard.comby subscribing to the RSS feed. Simply point your RSS feed reader or a browser that supports RSS feeds athttps://www.thesitewizard.com/thesitewizard.xml.You can read more about how to subscribe toRSS site feeds from my RSS FAQ.

This article is copyrighted. Please do not reproduce or distribute this article in whole or part, in any form.

It will appear on your page as:


Copyright © 2016-2020 Christopher Heng. All rights reserved.
thesitewizard™, thefreecountry™ and HowToHaven™ are trademarks of Christopher Heng.
This page was last updated on 4 February 2020.

    Search