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) »
  • CiviCRM tries to install in main domain dir, not sub-domain
Pages: [1]

Author Topic: CiviCRM tries to install in main domain dir, not sub-domain  (Read 2219 times)

boftx

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6.20
  • MySQL version: 5.2
  • PHP version: 5.2
CiviCRM tries to install in main domain dir, not sub-domain
March 26, 2011, 08:42:37 pm
My main domain, www.example.com is a Drupal site install in /home/user/public_html and I have a sub-domain site somesub.example.com installed under /home/user/public_html/somesub

I do not have or want CiviCRM to run under www.example.com.  I did the normal wget and untar in this dir:
/home/user/public_html/somesub/sites/all/modules and created a new database and user for CiviCRM

Every time I run the installer it tells me I need to have write permissions of /home/user/public_html/sites/default instead of in the somesub tree.

This is my 4th CiviCRM install for testing purposes and I have never seen this problem, even though all of my other installs have been on sub-domains. The only difference that I can think of is that this is the first time I have done this on a sub-domain of a domain that already has a Drupal install on it. The sub-domain install of Drupal is working fine.

Any thoughts?

Edit: This is running on Bluehost with a standard cPanle Drupal install if that helps.
« Last Edit: March 26, 2011, 08:46:31 pm by boftx »

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: CiviCRM tries to install in main domain dir, not sub-domain
March 27, 2011, 12:06:31 am
Hmm - I have hit this a few times lately - I just installed into /default & then copied the files from there into my subdir & edited it after that. I don't know if it's a new problem or not as I can't recall my last round of installs
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

boftx

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6.20
  • MySQL version: 5.2
  • PHP version: 5.2
Re: CiviCRM tries to install in main domain dir, not sub-domain
March 27, 2011, 12:12:00 am
I tried doing that, but I get nothing but page not found errors when clicking on any CiviCRM link in the admin bar. All of the links have "instal" in them. I even tried putting a copy of civicrm.settings.php in both default dirs.

This will be a severe show stopper for me unless I can prove conclusively that it will not occur with the top domain does not have a Drupal install. At least then I can create an account with a non-published domain, so to speak, and then create all my sub-domains under that with a different domain name, if that makes sense.

One interesting point, the CiviCRM root path variable was correctly set, but all other paths in civicrm.settings.php were pointing to the top domain directory tree.

Very frustrating. At least I'm not the only one to have seen this.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: CiviCRM tries to install in main domain dir, not sub-domain
March 27, 2011, 12:13:35 am
If you have gotten as far as having the admin menu it sounds pretty close!

Try entering the url yourdomain/civicrm/menu/rebuild
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

boftx

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6.20
  • MySQL version: 5.2
  • PHP version: 5.2
Re: CiviCRM tries to install in main domain dir, not sub-domain
March 27, 2011, 12:18:58 am
Thanks for the tip, I'll give that a go and see what happens. Will probably be tomorrow. Don't tell anyone but I really do sleep once in a while. :)

boftx

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6.20
  • MySQL version: 5.2
  • PHP version: 5.2
Re: CiviCRM tries to install in main domain dir, not sub-domain
March 27, 2011, 05:37:37 pm
I tried again, then ran into problems with database constraints.

I finally got things going by creating a new database and importing my backup from another site that I was moving over manually and not using the phpMySQL import tool. Trying to use that always gave me permission errors. Doing from the command line as a user given full rights on the database worked.

One thing of note, when trying to do a clean install not only was the civicrm.settings.php file in the wrong place, along with the files/civicrm directiory, but the CIVICRM_UF_BASEURL value was being set to the location of the install script.

Overall, I think there is a problem when trying to install onto a subdomain of a site that already has a Drupal install on the top domain. I'll test this more thouroughly when I have time and another account to play with.

NOTE: if you are moving a CiviCRM install from one location to another as I did, be sure to edit Config.IDS.ini accordingly or else you will see errors about missing XML files.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: CiviCRM tries to install in main domain dir, not sub-domain
March 28, 2011, 03:21:20 am
You can just delete Config.IDS.ini and it will be regenerated correctly, actually. As long as the values in civicrm.settings.php are correct.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

yktdan

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 3.4.2
  • CMS version: Drupal 6.22
  • MySQL version: 5.0.91
  • PHP version: 5.2.9
Re: CiviCRM tries to install in main domain dir, not sub-domain
April 10, 2011, 07:44:20 am
The following code is wrong (insufficient) for finding the right subdirectory.
global $crmPath;
$crmPath = dirname ( dirname( $_SERVER['SCRIPT_FILENAME'] ) );
require_once $crmPath.'/CRM/Utils/System.php';

So presumably I could set $_SERVER['SCRIPT_FILENAME'] somewhere and not modify the code, but this is not documented.

Above is nonsense - can't modify the $_SERVER except by moving where the php install script is located.
« Last Edit: April 11, 2011, 07:27:58 am by yktdan »

yktdan

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 3.4.2
  • CMS version: Drupal 6.22
  • MySQL version: 5.0.91
  • PHP version: 5.2.9
Re: CiviCRM tries to install in main domain dir, not sub-domain
April 10, 2011, 07:58:23 pm
A little more info.

I am installing in a subdirectory the is a complete D6.20 install. The root directory is a D7 install and I get a message about trying to install the wrong version of civicrm.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: CiviCRM tries to install in main domain dir, not sub-domain
April 11, 2011, 02:19:57 am
CiviCRM has problems with a setup like this. I would suggest you find an alternative way to install, such as a subdomain, and then you can always migrate your install afterward to your preferred location.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

boftx

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6.20
  • MySQL version: 5.2
  • PHP version: 5.2
Re: CiviCRM tries to install in main domain dir, not sub-domain
April 11, 2011, 02:41:21 am
Wht I've done on a new account is create a new domain to act as a placeholder so to speak on top, then put all the real domains under the main directory.

This is ugly and more expensive, but it works for now. But this really needs to be fixed.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: CiviCRM tries to install in main domain dir, not sub-domain
April 11, 2011, 07:54:29 am

would be great if someone can take a look and come up with a patch for the installer that addresses this issue.

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • CiviCRM tries to install in main domain dir, not sub-domain

This forum was archived on 2017-11-26.