HOWTO - Drupal 6 with WinXP, Appache, MySQL with SSL SMTP mail support.

Neutrino Sunset - July 12, 2009 - 03:47

Hi.

These are my notes from a complete WAMP Drupal install. I don't imagine much of it is of great interest, the install guide in this website is pretty good but I did come across a couple of gotchas. Just posting it in case it is of use to anyone, or in case anyone notices something I could do better.

-------------

Install MySql:

Drupal supports both legacy MyIasm and the new InnoDB storage engine, which supports fully acid compliant transactions which are apparently somewhat safer although slightly slower. I'm using version 5.1.36 community editidion with the DB server instance configured with support for both engines.

Once MySql is installed log in and create a DB for use by Drupal.

>mysql

mysql>create database drupal;

Now create a user with access only to this database to be used by Drupal. Replace 'drupal_user' and 'password' with your own preference of course.

mysql>create user 'drupal_user'@'localhost' identified by 'password';

mysql>grant all on 'drupal'.* to 'drupal_user'@'localhost';

mysql>quit

Install Apache:

You do not require the SSL version of Apache in order for Drupal to be able to send emails to an SMTP server using SSL encryption. SSL support is only required in the PHP installation. I'm using Apache 2.2.11 with no SSL support. There are no install notes for this since installing Apache is as simple as running the installer and then navigating to http://localhost to check there is a webpage.

Install PHP:
If you don't install SSL support for PHP you may find yourself hard pressed to find an SMTP server your Drupal site can use.
According to the documentation for PhP 5.2.10 the GD library was removed in version 4.3.2 and you should use the GD2 library instead.
The recommended connector to use for MySql is the new improved MySqli connector. So the extensions to install when installing PHP are:
GD2
MySqli
OpenSSL

Install Drupal:
Installing Drupal mostly consists of unzipping it and moving the entire Drupal folder to a location within the folder published by your webserver, e.g. C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\drupal-6.13

The only other step is to copy sites/all/default.settings.php to sites/all/settings.php you must leave the original default.settings.php file unaltered.

The installation guide indicates that the following PHP settings are required, only the last required setting needs anything to be done, the rest are already set by various config files.

register_globals off //This is the default set in the main PHP config file php.ini in the PHP install directory.

session.save_handler user //This is the default set in the Drupal config file settings.php in sites/default.

safe_mode off //This is set to off by default in php.ini.

session.cache_limiter no_cache //This is set to 'none' in default.settings.php which I guess amounts to the same thing. It seems to work ok at any rate.

error_reporting E_ALL & ~E_NOTICE //The only problematic one. This is set to E_ALL in php.ini and you may not want to change it for everything that uses PHP just to satisfy the demands of Drupal. Drupal comes with its own .htaccess file in the drupal-6.13 directory which adjusts some PHP settings which cannot be adjusted at runtime, this is probably the easiest place to set this option too. However the default Apache config causes this file to be ignored. In order for Drupal's .htaccess file to take effect you need to create a new clause in the main Apache config file httpd.conf and set AllowOverride to All. E.g.

#
# Drupal has its own .htaccessfile AllowOverride All is required to allow it to take effect.
#
<Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/Drupal-6.13">
AllowOverride All
</Directory>

Now that the Drupal supplied .htaccess file can actually take effect locate the IfModule clause in .htaccess that correlates to your Apache and PHP configuration and add this new entry.

php_value error_reporting 6135

Note you cannot use the constants E_ALL & ~E_NOTICE since the .htaccess file is not a PHP file and those constants have no meaning here. I obtained the binary values from the PHP help file.

At this point you must restart the Apache server otherwise after the installation process every link in the Drupal site returns an unprocessed directory listing.

Now navigate to install.php in the Drupal directory and follow the instructions here:

http://drupal.org/getting-started/6/install/run-script

Running the install script results in an error that Drupal cannot send any emails. Ignore this for now.

I then ran cron manually by navigating to cron.php to get rid of a warning message in the admin console.

Download and install the SMTP Authentication Support module.

http://drupal.org/project/smtp

Follow the installation instructions provided.

Activate the module and configure it something like this.

SMTP server: smtp.gmail.com
SMTP backup server:
SMTP port: 465
Use encrytion protocol: SSL

Username: whoever@gmail.com
Password: whatever

All being well you should be up and running. Follow the instructions here to set up the cron job properly.

http://drupal.org/getting-started/6/install/cron

 
 

Drupal is a registered trademark of Dries Buytaert.