Installing Drupal on WinHost servers

Discussion in 'Third-party applications' started by Ray, Aug 27, 2010.

  1. Ray


    I tested two versions of Drupal, one is version 7 and the other is version 6.19. Technically Drupal version 7 will install on our server but it is not fully compatible. The reason being is that Drupal uses the mail() function just like WordPress to send out email. The mail() funciton is set to look for the web servers local smtp service to relay out email. This will fail because the web servers smtp service has been disabled. A web application will have to specify the same SMTP server your email client will use (i.e and also past the SMTP authentication. To get Drupal to use SMTP authentication you will need to download the addon module from its site and install it with your Drupal application. Currently at this time, the SMTP module is not compatible with Drupal version 7 and it is only compatible with Drupal version 6. Therefore, the only version that is truly compatible with our system is Drupal version 6.

    Navigate to the Drupal website and download the Drupal application to your personal computer.

    At this time it is also recommended that you setup the MySQL database in your Winhost control panel. You will need to know MySQL server name, database name, MySQL DB login, and the MySQL DB password.

    Installation Instructions

    1. Download and uncompress Drupal on your local machine.

    2. Navigate to the folder Sites/Default. Inside that folder you will see default.settings.php. Copy that file and save it on the same folder with the name settings.php. Although the contents inside it are the same, Drupal will need both of these files when it runs its installation procedure.

    3. Navigate to the folder Sites/All. Create a folder named Modules. This will hold the SMTP module that will help Drupal use SMTP authentication.

    4. Create a web.config file within root level of the Drupal application. I have attached to this thread the elements that will have to be in this web.config file. If you already have a web.config file setup, you will need to make sure you create and integrate the elements into existing web.config file. This can prove to be tricky; hence I suggest you upload Drupal as its own application. If you do not want to load Drupal on the root, you can upload it to a subfolder. Bear in mind that the web.config file still have to exist in the Drupal application. To get the latest copy of the web.config file for Drupal refer to this link.

    5. Once the file is uploaded call on your Drupal application from the browser. As an example and assuming you uploaded Drupal on your root you will use

    6. Follow the instructions to install Drupal.

    7. The Database Configuration screen will prompt you to input your database information. Input your Database Name, the db login and password. Click on the Advanced Options link and type the MySQL server name. The Database port number can be left blank. It will default to the MySQL port of 3306. I suggest you define the table prefix. This will help avoid any future conflicts.

    8. On the Configure Site you will input all the necessary fields. This is not server specific you can define input the fields' base on your own requirements.

    9. On the last page when you have completed the installation, you will get an error that states that the mail() function does not work. You can ignore this for now and you will need to install the SMTP module so that your Drupal application can send out email.

    From here you can log into your site and configure some settings. Once you are ready, log out and close your browser and we can go on ahead installing the SMTP module for Drupal.

    Installing SMTP Module for Drupal.

    1. Download the SMTP module using this link to your local computer. I downloaded the Developement Release version 6.x-1.x

    2. Next you will need to download the PHPMailer form this link. There are two versions you can download. The newest version is version 5.1, however according to Drupal's documentation the SMTP module only supports version 2.2.1. I tested both and both worked and I ended up using PHPMailer version 5.1. for php5_6/

    3. Uncompress the SMTP module on your local computer. Once it is uncompressed navigate to the SMTP folder. Inside create the folder PHPMailer. You will upload the PHPMailer component in this folder.

    4. Connect to the web server using FTP. In your Drupal appplication navigate to Sites/All and create the folder Modules. Within the Modules folder create the folder SMTP.

    5. Upload all the SMTP module files and folders into the folder Sites/All/Modules/SMTP.

    6. Once you uploaded the SMTP module navigate back to the SMTP folder and go into the PHPmailer folder. Upload the PHPMailer components into the folder.

    7. Pull up your Drupal applicaton on the browser and log in as the administrator.

    8. Go to Administer/Modules. Scroll down to the bottom of the page an you will see the module for SMTP Authentication Support. Check the box to enable it and save the configuration.

    9. Go back to the Administer page and scroll down the bottom of the page. You should now see SMTP Authentication Support. When you go into this page, you will see an option to turn On or Off the module. Make sure you set it to 'On' and input all the SMTP server setting. Leave the SMTP backup server blank. Input the full email address for the SMTP authentication and the password to that POP account. Make sure you keep encrypted protocol to 'No'. The SMTP server does not support encrypted connection. If you are using Google's email server then you will set this to 'Yes' since Goolge requires encrypted connection.

    10. Save the configuration and you are now done with the Drupal installation.

    Drupal has many other features and modules which I have not tested. However, the guidelines provided is the base guidelines to get Drupal installed and sending out email through our SMTP server. The rest of the configuration will be base on your own business needs and requirements.
    Last edited by a moderator: Oct 14, 2015
  2. Can't get Drupal working... "No such file or directory" error


    I just tried to follow your guide and got stuck on step 5. Step 1-3 were easy. In step 4, I copied the web.config content without changes from the link to the drupal site. Then I uploaded all the files and folders to the same location as the Winhostdefault.htm file on the server using FileZilla FTP. I then tried navigating to the main url, and I get this error:

    Warning: require_once(./includes/ [function.require-once]: failed to open stream: No such file or directory in E:\web\valkyrie\index.php on line 15

    Fatal error: require_once() [function.require]: Failed opening required './includes/' (include_path='.;C:\PHP\pear') in E:\web\valkyrie\index.php on line 15

    I checked to see that PHP is working and I am able to see the PHPInfo page, so I don't think that's it.

    My guess is a permissions problem, but trying to change file permissions to 755 on all files and folders fails, I'm assuming that changing permissions doesn't work on IIS...

    Last edited by a moderator: Oct 14, 2015
  3. Ray


    What version of Drupal are you installing? I do not see a error message when I pull up your site. Did you fix the problem?
  4. db Error during/after install

    After install, my drupal site has this error:
    user warning: Table 'mydrupalDB.blocks' doesn't exist query: SELECT DISTINCT b.* FROM blocks b LEFT JOIN blocks_roles r ON b.module = r.module AND = WHERE b.theme = 'garland' AND b.status = 1 AND (r.rid IN (2) OR r.rid IS NULL) ORDER BY b.region, b.weight, b.module in myuserpath\drupal\modules\block\block.module on line 433.

    Any clues?
  5. Ray


    Did you load any modules to Drupal. I couldn't test every module for drupal and some may not work on a Windows platform. Plus are you sure you ran the script to create all the tables, SP's, and triggers in your database? Was there any errors?
  6. If the install didn't work, I'd recommend you re-try it.

    Delete all the Drupal files, clean out your database, and then try it out again.
  7. In step 7 of the directions, what is the MySQL server name?
  8. Ray


    That is going to be in your Winhost control panel. Log into your Winhost control panel and go to the Site Manager for that site account. Click on the Button MySQL and you will see the MySQL server name.
    Last edited by a moderator: Oct 14, 2015
  9. Thanks, I see it in there. Another (hopefully) simple question, with the basic account I'm allowed 1 mySQL database of 100mb, when I create a mySQL database, I assign the quota, any reason not to make it 100MB?
  10. Ray


    No, we just give our customers the option to make it smaller if they need to (such as testing).
  11. same thing for me. Drupal 6.19

    you can see the error here: -- (if you don't specify the index.php file you'll end up on the Winhost welcome page)
    Last edited by a moderator: Oct 14, 2015
  12. Ray


    I suspect that one of your files may have gotten corrupted during upload. Try deleting everything on your root and reupload all the Drupal files again to your root.
  13. I think it has something to do with installing in the root directory. I created a subdirectory, moved the files into there and was able to complete the installation.

    from the directions:

    Does the web.config from need edited? You mentioned "I have attached to this thread the elements that will have to be in this web.config file." but wasn't sure what that meant.
  14. Ray


    It looks like the path in the install.php file is making it go out of your root.


    If you remove the "./" on all the "require_once()" function it will find the folder "include" in your root.

    This is a pain in the butt since there are several require_once call in the install.php.

    The easiest way is to place the Drupal app in a subfolder.
  15. Drupal 7 SMTP needs PHP extensions

    I was able to successfully load Drupal 7 and bring up the pages. I found I needed SMTP support for email (like when a new user is created) and I loaded the SMTP Authentication Support module but I found that it needs the PHP ereg extension loaded to work and this is not currently in the Winhost PHP. Also if I want to use SSL for the emails (like for using Google as the SMTP server) I need the SSL extensions in PHP which they are not.
    Any chance of getting this to happen? I started using Winhost because I was using .NET but I've decided to move over to the Open Source side and would like to stay with Winhost but I can't if it doesn't address some of these obvious needs.
    Last edited by a moderator: Oct 14, 2015

Share This Page