evilrobot's picture

When I try to install CiviCRM 4.6.28 in Drupal 7 nothing seems to happen, the install module page just seems to refresh. So, I then try to procced to the next step as per the CiviCRM wiki which says to go to http://host_name/sites/all/modules/civicrm/install/index.php but Drupal just returns a page not found error.

Now if I go to find the location CiviCRM should be installed to var/www/drupal7/sites/all/modules/ the civicrm directory is infact not created. So I guess it was not installed.

How would I go about trying to figure out why CiviCRM is not installing? Is there an error log I should be able to check when something like this happens?

 

Link to walk through for installing CiviCRM in the Turnkey Linux Drupal 7 Appliance:

https://www.turnkeylinux.org/forum/support/thu-20170727-1527/how-install...

Forum: 
evilrobot's picture

I think I may have spotted the problem. In some of the tutorials I've looked at they say that CiviCRM should be installed to /var/www/html/drupal/sites/all/modules (refered to as Drupal root) where as in Turnkey, Drupal root is apears to be /var/www/drupal7/sites/all/modules

Is this correct? and if so would manually installing CiviCRM work or do I need to extract the file and edit a config file to point it to the correct path for Drupal root?

evilrobot's picture

That was indeed part of the problem. The work around is to install CiviCRM manually.

1 - Uploaded the CiviCRM tar.gz file to /var/www/drupal7/sites/all/modules 

2 - Use tar -xzvf to extract the CiviCRM tar.gz file.

I then followed the instructions here: https://www.rosehosting.com/blog/deploy-civicrm-in-conjunction-with-drup...

3 - Assign propper owenership: chown www-data: -R civicrm/

4 - Make the default directory writable: chmod +w //var/www/html/drupal/sites/default

5 - Login to your Drupal site with Admin permissions: http://your_drupal_site/sites/all/modules/civicrm/install/index.php

The CiviCRM Installer is now visable! I entered in the Drupal and CiviCRM database information and everything is almost good to go.

The only issue now is the CiviCRM Installer is saying that "The user account used by your web-server - www-data - needs to be granted write access to the following directory in order to configure the CiviCRM settings file: //var/www/drupal7/sites/default"

This has me confused because I thought that's what step 4 (listed above) was supposed to do. Any thoughts?

I'll be sure to post a "how to" install CiviCRM in TKL manually if I get this figured out.

evilrobot's picture

To correct the "The user account used by your web-server - www-data - needs to be granted write access to the following directory in order to configure the CiviCRM settings file: //var/www/drupal7/sites/default" message change the permissions of /var/www/drupal7/sites/default to www-data. So step 4 in the post above is clearly wrong, I should have noticed that considering that path to the default folder doesn't exist.

Changing permissions can be done by loging into Webmin and using the file manager to navigate to /var/www/drupal7/sites then: selected the default folder, click on the icon that looks like 2 human busts (if you hold your mouse over it it should display a little popup that says "Chown Selected") A small window will then pop up with 2 fields, one will say "User Name" and the other will say "Group Name" type www-data into both feilds and click on the change button to save the changes. You should now be able to go to http://your_drupal_site/sites/all/modules/civicrm/install/index.php and complete the installation of CiviCRM.

This was just a quick update, I will post a full walkthrough latter when I get a chance.

Jeremy Davis's picture

I've been a bit snowed under trying to push out the last of v14.2.

It sounds like you've pretty much worked it all out though, so good work!

The only thing I noticed was that in one of your paths you have "//var/www/drupal7/sites/default" i.e. double slash at the start. At first I though it was just a typo, but it appears again in your error message, so the typo may well be in your config file?! In some scenarios an extra slash doesn't matter, but in others it will cause issues. Probably best to resolve that.

Look forward to the full write up.

evilrobot's picture

I finished the walk through and put a link to it in the first post, hope that's okay it was pretty long and I thought it would be easier to follow if it had its own topic. It's my first time writting a walk through so hopefully it's clear enough that others can follow it.

As for the path with the double slash, it is written like that in the CiviCRM installer. It goes away once the correct permissions are applied to the default folder in the correct path for Turnkey. So I'm guessing in order to fix the error message properly I'll need to let the developers for CiviCRM know about it because that path doesn't exist in the TKL Drupal 7 Appliance. 

Jeremy Davis's picture

Good idea on a new thread.

From a glance, I think your walk though is great. I reckon it'd actually make the development of a new CivicCRM appliance (to add to our library) relatively straight forward too. I might comment more on that on the thread.

Re the path that doesn't exist, after looking again, I can see exactly what is going on. Sorry that I jumped to an incorrect conclusion before. In previous versions of Debian/Ubuntu, the default www-data path to serve was /var/www. However, many people were hosting software directly in that directory (which can be bad depending on how the software is set up). So in their wisdom, they added a new directory (/var/www/html) and made that the new default. We don't believe that gives any real security advantage and we normally host software within it's own sub-directory anyway.

So when the CivicCRM instructions say "/var/www/html/drupal/sites/all/modules", what they probably should explain is that they are assuming a drupal install dir of /var/www/html/drupal/. TurnKey install Drupal to /var/www/drupal/ (i.e. as per previous defaults). Now that this seems to be becoming more prevalent, perhaps we should consider following the herd (even though we don't think it provides any advantage at all...)

Regarding the double slash, that was actually what sidetracked me. I've just done some research around that and my guess is that it's a typo in the CivicCRM docs. However, it's incidental as Linux interprets multiple slashes in a path as a single slash. The error you got was because of the TurnKey path not matching what CivicCRM assume (as noted above), not the double slash.

Add new comment