Difference between revisions of "Configuring a XAMPP server for joomla development"

From Joomla! Documentation

(Created page with "{{RightTOC}} == Introduction == XAMPP is an easy-to-install package that bundles the Apache web server, PHP, XDEBUG, and the MySql database. This allows you to create the enviro...")

At this point, XAMPP is installed successfully. Notice the "Loaded Configuration File" which is highlighted in the screenshot above. We will be editing this file in the next section to configure XDebug.

At this point, XAMPP is installed successfully. Notice the "Loaded Configuration File" which is highlighted in the screenshot above. We will be editing this file in the next section to configure XDebug.

Introduction

XAMPP is an easy-to-install package that bundles the Apache web server, PHP, XDEBUG, and the MySql database. This allows you to create the environment you need to run Joomla! on your local machine. The latest version of XAMPP is available at the XAMPP web site. Downloads are available for Linux, Windows, Mac OS X and Solaris. Download the package for your platform.

Important Note Regarding XAMPP and Skype: Apache and Skype both use port 80 as an alternative for incoming connections. If you use Skype, go into the Tools-Options-Advanced-Connection panel and deselect the "Use 80 and 443 as alternatives for incoming connections" option. If Apache starts as a service, it will take 80 before Skype starts and you will not see a problem. But, to be safe, disable the option in Skype.

Update

As of August 5, 2010, XDebug has been updated (to version 2.1) which fixes some important bugs (for example, watching local variables for nesting functions). The latest XAMPP package (1.7.3) now includes this new version of XDebug. If you just want to update XDebug, you can download the latest module from [1]. There is a handy website that tells you which XDebug binary you need, depending on your phpinfo() information here. To use it, you just copy the output of your phpinfo() display and paste it into the form on the site.

Installation on Windows

Installation for Windows is very simple. You can use the XAMPP installer executable (for example, "xampp-win32-1.7.3-installer.exe"). Detailed installation instructions for Windows are available here.

For Windows, it is recommended to install XAMPP in "c:\xampp" (not in "c:\program files"). If you do this, your Joomla! (and any other local web site folders) will go into the folder "c:\xampp\htdocs". (By convention, all web content goes under the "htdocs" folder.)

If you have multiple http servers (like IIS) you can change the xampp listening port. In <xamppDir>\apache\conf\httpd.conf, modify the line Listen 80 to Listen [portnumber] (ex: "Listen 8080").

Installation on Linux

Install xammp

Open Terminal and enter:

sudo tar xvfz xampp-linux-1.7.7.tar.gz -C /opt

(replace xampp-linux-1.7.7.tar.gz with the version of xammp you downloaded). It has been reported that the MYSQL database of xampp 1.7.4 does not work with Joomla 1.5.22

Download the file: "PHP Remote Debugging Client" for "Linux (x86)" Extract the content of the file on your computer, this compressed file contains several folders with version numbers ex: 4.4, 5.0, 5.1 ... 5.3 and so forth, get in the folder with the higher version number or the one that works for you, then manually copy the file "xdebug.so" to the following location, overwrite if needed

/opt/lampp/lib/php/extensions/no-debug-non-zts-20090626/

Remember this location could be different on your computer

Installation on Mac OS X

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.

Once the file has finished downloading, just open the disk image, and drag the XAMPP folder to the "Applications" folder alias.

To start the server, open "XAMPP Control.app" and press the start button next to Apache.

A Little Troubleshooting

Many Mac users have a little difficulty at this stage when trying to set up another instance of Apache on their machine. If you cannot start XAMPP's Apache, you have two options:You can change the listening port of XAMPP. In \Applications\XAMPP\xamppfiles\etc\httpd.conf, modify the line that says, "Listen 80" to Listen [portNumber]. E.g.:

Listen 8080

You can change the listening port of the pre-installed Apache server. In finder, go to "/etc" (CMD+SHIFT+G); from here you will be able to navigate through the normally hidden Apache files. Find the folder labeled Apache2, and edit the "http.conf" file. Modify the line that says, "Listen 80" to Listen [portNumber]. E.g.:

Listen 8080

Note: If you choose to change the port of the pre-installed Apache server, you may need to restart your computer for changes to take effect. You will also have to authenticate as an administrator to change these files.

Test XAMPP Installation

Once XAMPP is installed and you have started the Apache service with the XAMPP Control Panel tool, you can test it by opening your browser and navigating to "http://localhost". You should see the XAMPP welcome screen similar to the one below.

Select the link called "phpinfo()" in the left-hand menu. This will display a long screen of information about the PHP configuration, as shown below.

At this point, XAMPP is installed successfully. Notice the "Loaded Configuration File" which is highlighted in the screenshot above. We will be editing this file in the next section to configure XDebug.