CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Cannot get CIVICRM to work with IIS
Pages: [1]

Author Topic: Cannot get CIVICRM to work with IIS  (Read 2829 times)

JoopSJ

  • I post occasionally
  • **
  • Posts: 80
  • Karma: 2
Cannot get CIVICRM to work with IIS
January 07, 2008, 11:45:52 am
I think it is a pitty CVICRM is not working with IIS(windows). I also prefer working on Linux etc but it is a fact of life that a lot of people are using windows(IIS) to run their sites.

Drupal now is officially supporting IIS, which I think is a good thing.

I have been struggling for a week now to get CIVICRM going but it's not working.

These a the steps I took:
 
  • First (auto)install failed because the installer stated that the install files weren't in the proper directory. They were, so I commented out the error and continued.
  • The installation went on but somewhere ahlfway I had to correct the civicrm.settings.php file to set the slashes pointing backwards, like described everywere on this forum.
  • Installation continued without any additional error.
  • In Drupal I activated the module and in the menu now the link CiviCrm is presented.
  • Upon selecting the menu I get a lot of PHP errors. It boils down to two thing:

1. CVICRM is trying to build a dir C:/dir/dir/dir , while it shoul be C:\dir\dir\dir
2. At the end of the template/language directory it puts 2 slashes. Als the file to be created shows %%

Here's the warning:

user warning: Smarty error: problem creating directory 'C:/Inetpub/vhosts' in C:\Inetpub\vhosts\mydomain\httpdocs\mydir\sites\all\modules\civicrm\packages\Smarty\Smarty.class.php on line 1095.
warning: Smarty::include(C:\Inetpub\vhosts\mydomain\httpdocs\mydir\files\civicrm\templates_c\en_US\\%%93\938\938D45F8%%Subject.tpl.php) [function.Smarty-include]: failed to open stream: No such file or directory in C:\Inetpub\vhosts\mydomain\httpdocs\mydirsites\all\modules\civicrm\packages\Smarty\Smarty.class.php on line 1265.



I searched trough all the codes to see if i can find where those slashes are generated but cannot find it.

What I'm going to do next:
Uninstall everything, and start all over.
Is there any CIviNinja who can guide trough the proces and answer questions?
I will document everything, maybe it will result in:
"The complete guide to a CIVICRM - IIS install"

Regards
« Last Edit: January 12, 2009, 05:41:39 am by clivesj »

JoopSJ

  • I post occasionally
  • **
  • Posts: 80
  • Karma: 2
Re: CIVICRM to work with IIS - got it working now
January 10, 2008, 03:58:58 am
This is the way I got things working:

1. Oops! Please Correct Your Install Location
This error showed-up while is correct:  Sites/all/modules
I changed sites/all/modules/civicrm/drupal/install/index.php line 22:

if ( strpos( dirname( $_SERVER['SCRIPT_FILENAME'] ), 'sites\all\modules' ) === false )
to
if ( strpos( dirname( $_SERVER['SCRIPT_FILENAME'] ), 'C:\Inetpub\vhosts\mydomain\httpdocs\mydir\sites\all\modules\civicrm\drupal\install' ) === false )
If you are shure the install is in the proper location, you could also comment-out the error warning.
It is obvious that dirname( $_SERVER['SCRIPT_FILENAME'] will always return the full path to the script , so line 22, if left unchanged will always fail.

2. Notice: Undefined index: SERVER_SIGNATURE in…
According sources on the net this error can be disregarded. So I continue the installation.

3. All setting are well and the installer gives a green light, however in the summary the trailing backslash wories me:
Does the webserver know where files are stored? OK (C:\Inetpub\vhosts\mydomain\httpdocs\mydir\sites\all\modules\civicrm\drupal\install/)
I changed line 507 from:
   return dirname($_SERVER['SCRIPT_FILENAME']) . '/'; into
   return dirname($_SERVER['SCRIPT_FILENAME']) . '\\';
Now it shows OK!!
         
4. I hit the button to start the install and all went well except a some PHP error messages because the directories being created by the installer already exsisted (from prev install)

The installer points to drupal now so the CIVICRM module can be enabled.

5. Before enabling the module I'll have a look at sites\default\civicrm_settings.php to check if the paths are set correct:
They show good. Slashes pointing the right way and double slashes in the compiler directory (the second line) is the way it should be.
$civicrm_root = 'C:\Inetpub\vhosts\mydomain\httpdocs\mydir\sites\all\modules\civicrm';
define( 'CIVICRM_TEMPLATE_COMPILEDIR', 'C:\\Inetpub\\vhosts\\mydomain\\httpdocs\\mydir\\files\\civicrm\\templates_c\\' );

6. Now I enabled the module in Drupal and selected the link CiviCRM
The admin page opens but with a lot of Smarty Errors.
I Commented_out smarty errors in core.create_dir_structure.php (as suggested bij Martin on this forum) like this:
if ($_make_new_dir && !file_exists($_new_dir) && !@mkdir($_new_dir, $smarty->_dir_perms) && !is_dir($_new_dir)) {
              //  $smarty->trigger_error("problem creating directory '" . $_new_dir . "'");
             //   return false;


And now the install is complete!!!
« Last Edit: January 10, 2008, 04:01:46 am by clivesj »

bixgomez

  • I’m new here
  • *
  • Posts: 28
  • Karma: 0
Re: Cannot get CIVICRM to work with IIS
December 21, 2008, 11:25:10 am
Hello Clive!

Well, I have experienced the very same problem, on a Windows 2003 server (hosted by Hostek).

Of course, it is nearly a year after your installation, so my install/index.php file is very different than yours.

Have you had similar problems with the latest version, under Drupal 6?

~Richard

JoopSJ

  • I post occasionally
  • **
  • Posts: 80
  • Karma: 2
Re: Cannot get CIVICRM to work with IIS
December 22, 2008, 01:59:43 am
After all, I had to leave IIS!
I installed Apache on my WindowsServer because I encountered additional problems.
I think running CIVI on IIS will still lead to problems, even if you manage to get the thing installed.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Cannot get CIVICRM to work with IIS

This forum was archived on 2017-11-26.