Skype: theneemtreegroup
Phone: (Australian callers) 02-8003-4624
(international callers) +61-2-8003-4624
Email: http://neemtree.com.au/contact
Developing Drupal using XAMPP
Using XAMPP to create a full featured Drupal development workspace. I used the following to create a multi-site, mail enabled, flexible, development environment on MS Windows XP:
1. Install XAMPP Lite
This should result in the following folder strucure:

You can test the XAMPP install by starting it and then browsing to http://localhost.

If you see the following then you have successfully installed XAMPP:

2. Configure XAMPP to enable multi-sites and clean URLs
- Edit C:\xampplite\apache\conf\extra\httpd-vhosts.conf (I usually make a backup of all edited files called [filename].original) by appending the following to the end of the file:
# theneemies _ NameVirtualHost 127.0.0.1:80 <VirtualHost 127.0.0.1:80> DocumentRoot "C:/xampplite/htdocs" ServerName localhost:80 </VirtualHost> <VirtualHost sandbox.local:80> DocumentRoot "C:/xampplite/htdocs/drupal6" ServerName sandbox.local ServerAlias <a href="http://www.site1.local" title="www.site1.local">www.site1.local</a>, <a href="http://www.site2.local" title="www.site2.local">www.site2.local</a>, randwick.local </VirtualHost> # _ theneemies
- Include the domain names you've listed in httpd.conf in C:\WINDOWS\system32\drivers\etc\hosts:
127.0.0.1 localhost 127.0.0.1 randwick.local 127.0.0.1 sandbox.local
- Edit C:\xampplite\apache\conf\httpd.conf by uncommenting (remove the leading #)
LoadModule rewrite_module modules/mod_rewrite.so. - Configure Drupal for multi-site by creating the folders randwick.local and sandbox.local within C:\xampplite\htdocs\drupal6. The result should be C:\xampplite\htdocs\drupal6\randwick.local and C:\xampplite\htdocs\drupal6\sandbox.local folders.
- Restart XAMPP for your changes to take effect:
- You should see the XAMPP splash page when viewing http://localhost and the Drupal install page when viewing http://sandbox.local. Install Drupal and ensure that clean URLs are working.
2. Install and configure Stunnel to send emails using your GMail account.
- Edit C:\xampplite\apache\bin\php.ini:
; theneemies (uncomment this line) _ extension=php_smtp.dll ; _ theneemies ... [mail function] ; For Win32 only. SMTP = localhost smtp_port = 25 ; For Win32 only. sendmail_from = admin@sandbox.local ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). sendmail_path = "C:\xampplite\sendmail\sendmail.exe -t";
- Edit C:\Program Files\stunnel\stunnel.conf and replace with:
cert = stunnel.pem socket = l:TCP_NODELAY=1 socket = r:TCP_NODELAY=1 debug = 7 output = stunnel.log client = yes [smtpg] accept = 127.0.0.1:25 connect = smtp.gmail.com:465
- Edit C:\xampplite\sendmail\sendmail.ini to use your GMail account:
[sendmail] ; you must change mail.mydomain.com to your smtp server, ; or to IIS's "pickup" directory. (generally C:\Inetpub\mailroot\Pickup) ; emails delivered via IIS's pickup directory cause sendmail to ; run quicker, but you won't get error messages back to the calling ; application. smtp_server=localhost ; smtp port (normally 25) smtp_port=25 ; the default domain for this server will be read from the registry ; this will be appended to email addresses when one isn't provided ; if you want to override the value in the registry, uncomment and modify default_domain=gmail.com ; log smtp errors to error.log (defaults to same directory as sendmail.exe) ; uncomment to enable logging ;error_logfile=error.log ; create debug log as debug.log (defaults to same directory as sendmail.exe) ; uncomment to enable debugging ;debug_logfile=debug.log ; if your smtp server requires authentication, modify the following two lines auth_username=[youremail]@gmail.com auth_password=[yourpassword]
- Start Stunnel, restart XAMPP, and use Drupal to send an email (send a notification when creating a new user, the new user should receive an email).















Comments
I've wondered for ages how to go about sending drupal mail from XAMP. Good stuff!
Post new comment