Add the following code under the top PHP opening tag of wp-config.php.
<?php
if (!session_id()) {
session_start();
}
...
We can now make use of the $_SESSION[] in WordPress. The reason of putting the session_start() in wp-config.php is because this configuration file will not be overwritten during a WordPress update.
Updated @ 2012-08-02: Please note that their maybe security issue of using the PHP session. For more information, please refer to the following link. PHP $_SESSION variables
For the Drupal registration form, there is no .tpl.php template file for editing the registration form layout. So if you want to add more HTML code around the form, you have to do it on code level.
I found a useful post about modifying the registration form. It make use of the template.php in the theme folder to theme the form. For more information. Please visit Drupal – Custom registration page theme.
Actually configure Postfix or Sendmail for PHP mail() is the same. Both of them run the /usr/sbin/sendmail binary. It is quite confusing if we just look at the name of the binary but this is what Postfix did.
Setting up Sendmail to relay public SMTP server such as Gmail is quite difficult. In the past, i just kept looking for the blog posts in Google and found that people have different ways to setup Sendmail, but not all of them could be repeated successfully in my setup. After so many trials and errors, i made the relay works but i couldn’t fully understand what’s going on in the setup.