Give the gift of Drupal. All merchandise is 50% off through 2016.
In the instructions below, we will cover the following:
- Installing XAMPP
- Installing Drupal 6.x
- Installing Sun/Oracle Java 1.5 or higher
- Installing Apache Solr 1.3 or higher
Apache HTTP, MySQL, and PHP (along with Perl or Python) are such a popular software stack that is often bundled together into XAMPP.
This installation guide assumes the user is using XAMPP for Apache, MySQL and PHP. Running the Drupal Toolkit on XAMPP distribution works well for developing environments, but is not best suited for production environments.
- Navigate to http://sourceforge.net/projects/xampp/files/XAMPP%20Windows/1.7/
Note: XAMPP 1.8 contains PHP 5.4.4 which is not currently supported so XAMPP 1.7 version has to be downloaded
- Click on “xampp-win32-1.7.0-installer.exe” to download the EXE file and follow the instructions.
- Keep note of important directories used by XAMPP, which should be listed on the same web page, as this will be useful when configuring Apache, MySQL, and PHP
After installing XAMPP, check the status of each component by navigating to: http://localhost/xampp. Make sure to enable a firewall program and pay attention to security advice and tips, such as those from Apache: http://httpd.apache.org/docs/2.0/misc/security_tips.html
Troubleshooting Port already in use situation:
Web servers usually run on port 80 for HTTP and may also use port 443 for HTTPS. Therefore, running multiple web servers is not suggested. In addition, some applications, for ease of communication, tend to use these ports, as they are not typically not blocked by network firewalls or NAT.
The most common problem is with Skype on Windows. Therefore, if Skype is installed, turn off the setting in the Skype preferences to prevent Skype from listening on port 80 and 443:
- Open Skype
- Click the Tools menu and select Options
- Click the Advanced tab, and click the Connection tab that slides underneath
- Make sure the checkbox for "Use port 80 and 443 as an alternatives..." is unchecked
- Click the Save
- Restart Skype to make the change effective
To enable curl library with XAMPP we need to modify the php.ini files in our xampp folder.
- Locate the following files:
Uncomment the following line on your
php.inifile by removing the semicolon:
- Restart your Apache server
- Check your phpinfo if curl was properly enabled.
Open the PHP configuration file in
C:\xampp\php\php.ini for editing.
- Enable MySQL extensions by uncommenting the lines for "mysql" and "mysqli"
- mysql (original MySQL extension)
- mysqli (an improved connector for newer MySQL installations)
These lines should look like:
Uncommenting involves simply removing the comment semi-colon ";" from the beginning of a line.
- Set the user-level session storage handler
session.save_handler = user
- Turn off the current cache limiter
session.cache_limiter = nocache
- Set the PHP error reporting level
error_reporting = E_ALL & ~E_NOTICE
- Turn PHP "safe-mode" off
safe_mode = off
- Increase the PHP execution time
max_execution_time = 90
- Increase PHP memory limit
memory_limit = 64M
The default PHP maximum execution time and memory limit settings are too low for the Drupal Toolkit on most machines. Depending on your system, you may want to increase these levels even more than the suggested amounts above.
Changing these settings in the PHP configuration file will make them global for all PHP applications. To restrict these settings to the Drupal intance, edit the
.htaccess file inside root of Drupal directory.
Some of the configuration settings can only be set from the configuration file.
For more information, consult the table available at: http://php.net/manual/pl/ini.list.php.
For the meaning of the column entitled "Changeable", see: http://php.net/manual/en/configuration.changes.modes.php.
The PHP installer should automatically configure Apache configuration file, but if it does not, then manually edit the file. See the section "Configuring Apache" for how to locate the Apache configuration file (http.conf). Then, append the following lines to the end of the file, making sure to change the paths to the appropriate path, if not using XAMPP.
# PHP Configuration for Apache ScriptAlias /php/ "c:/xampp/php/" # Add PHP type AddType text/html php # Load PHP modules LoadModule php5_module "c:/xampp/php/php5apache2_2.dll" LoadModule php5_module "c:/xampp/php/php5apache2.dll" LoadModule php5_module "c:/xampp/php/php5apache.dll" # Handle PHP Action application/x-httpd-php "c:/xampp/php/php-cgi.exe" # PHP Configuration PHPIniDir "c:/xampp/php/"
Also, modify the following line, changing:
<IfModule dir_module> DirectoryIndex index.html </IfModule>
To the following:
<IfModule dir_module> DirectoryIndex index.html index.php </IfModule>
Open the Apache HTTP configuration in
C:\xampp\apache\conf\httpd.conf for editing.
- Enable Mod Rewrite by uncommenting the line for "mod_rewrite". This line should look like:
#LoadModule rewrite_module modules/mod_rewrite.so
Uncommenting involves simply removing the comment hash "#" from the beginning of a line.
- Optional Step: Enable the use of "Clean URLs", replacing URLs such as http://www.example.com?q=node/1 with http://www.example.com/node/1
and allowing web pages to be accessed by the latter URL.
To do this, ensure that the "Directory" or "Location" used by Drupal has permission to override Apache configuration settings by using Apache's "AllowOverride" directive, such as in either of the following:
<Directory [directory]> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> <Location [location]> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all </Location>
The value of
[directory]is typically the server root for web documents
It is the path to the directory within the file system for the server root. If installing Drupal at the base root of the server or any directory underneath that root, setting this to the web documents root will suffice.
The value of
[location]is either the path to a directory beginning at the server root or the path of an alias. If "Directory" is not used, setting this to "
/" will suffice.
Read the Apache HTTP documentation for more information about the use of
<Location>. The important thing is that "
AllowOverride" is set to "
All" for the Drupal or root or any of its parent directories.
Note that it is possible that there are multiple lines commented out (beginning with a hashmark "#" character) between the opening and closing
<Location>tags. What is important here is only that the AllowOverride directive should be set to "All" and not "None".
You can find more information all about this settings in Clean URLs manual page of the Drupal Installation Guide at: http://drupal.org/node/15365.
Restart Apache server to reflect the changes.
Java is a necessary prerequisite for Apache Solr, which is required for search, indexing, and many other features of the Drupal Toolkit.
Before installing, you may want to check if your system has Java already installed. To check, open your system command line/prompt or terminal and type the following:
If Java is installed, it should respond with some detailed information about the version of Java installed, such as:
Java(TM) SE Runtime Environment (build 1.6.0_16-b01) Java HotSpot(TM) 64-Bit Server VM (build 14.2-b01, mixed mode)
If Java is not installed, the command line/prompt or terminal will likely respond with statement that a bad or incorrect command has been entered or that the system is unable to execute a program named "
java" because none exists.
Java can be downloaded from: http://www.java.com/en/download/manual.jsp
On this web page, scroll down to the windows section and choose a desired package to download. Next to each link to download a package, you will find a link for instructions on how to install it.
Installing Apache Solr
Apache Solr is a powerful full-text and faceted search server with a list of features, such as highlighting, caching, replication, and a web administration interface.
Solr is a Java application that runs within a servlet container, such as Apache Tomcat or Jetty. The easiest and fastest way to get Solr up and running is to simply download the application and run it with the embedded version of Jetty:
- Download Solr 1.3 from: http://wiki.apache.org/solr/Solr1.3
- Follow instructions in: http://drupal.org/node/1359598 to install solr on windows.
Installing Drupal and the Drupal Toolkit
- Go to: http://drupal.org/project/xc_installation and download 6.x-1.2 by clicking on zip file
- Extract the archive to a directory accessible to the web server
Say, the contents are extracted into
Note: There is a directory within the archive that contains all the Drupal files. If you simply extract the archive to the web server root, you will have to access Drupal by that directory.
For example, simply extracting results in this:
With this, Drupal would be accessed as follows: http://localhost/xc_installation-6.x-1.2.
Depending on your site, it may be better to extract the contents on the "xc_installation-6.x-1.2" folder within the archive to the root of the web server.
Resulting in this:
With this, Drupal would be accessed directly: http://localhost
The rest of this documentation assumes that you have extracted to a directory named "
xc_installation" on the web server root.
- Copy the default settings file to create a new settings file
The default settings file should be located in:
Copy this to create:
- Set up permissions for the files directory and settings file
Prior to installing Drupal, the "files" directory, and the newly created settings file (settings.php) should be set to allow all users to have read and write access, so that the web server can modify those files.
The "files" directory is located at:
The settings file is located at:
For security, after the Drupal installation is complete, the settings file should be set back to only allow specific users access. However, the "files" directory should remain accessible to all users.
On Windows, file permissions should not be an issue. However, if a warning appears during installation, then:
- Right-click the settings.php and select to edit properties
- In the file properties window, select the "Sharing" tab (this may be somewhat different depending on the version of Windows)
- Give all users access to the file
- Setup Drupal database
Create a SQL database for Drupal to use. In XAMPP, there is a popular tool called phpMyAdmin which makes it easier to create and browse the Drupal database right from your web browser.
To access phpMyAdmin from the XAMPP control within the web browser:
- Navigate to: http://localhost/xampp
- In the "Tools" section on the left sidebar, click "phpMyAdmin"
If this is not available, try navigating directly to: http://localhost/phpmyadmin
From phpMyAdmin, follow these instructions:
- If necessary, enter the "root" username and password to access the server administration page
- In a section called "MySQL localhost", type the name of the database in a box labeled "Create new database". The recommended name is "drupal" (without quotes).
- Navigate to: http://localhost/xc_installation/install.php
- Run the Drupal installation process
- Choose “Extensible catalog Demo site” and Submit the page
- Enter database information in this page. According to this documentation.
- Database: drupal
- User: root
- Password: <empty>
If you changed above information then enter the ones you gave while creating database.
- Enter site information - remember the username and password that you enter here. This will be used to login into Drupal Toolkit.
- Submit the form. Once submitted, Drupal is set up. Continue to install the Drupal Toolkit.