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) »
  • Odd Error when Switching Site Home Directory
Pages: [1]

Author Topic: Odd Error when Switching Site Home Directory  (Read 2312 times)

FredJones

  • Guest
Odd Error when Switching Site Home Directory
October 28, 2008, 11:43:17 am
I have a CiviCRM 2.0.5 with Drupal 5.12 on a dedicated Red Hat server. We have a testing version installed in a subdir of our main site:

$civicrm_root = '/var/www/vhosts/MAIN.org/httpdocs/somedir/dev.dev/sites/all/modules/civicrm';

and this works fine (without clean URLs of course).

We now set up an alternative domain name (a .net name) for this testing site and I copied the entire site into its own vhost directory, so I wanted to set the civicrm root correctly to be this:

$civicrm_root = '/var/www/vhosts/MAIN.net/httpdocs/sites/all/modules/civicrm';

Now If I leave the original civicrm_root setting alone (meaning the top one above) then I see

Code: [Select]
Oops! - The path for including CiviCRM code files is not set properly.
Most likely there is an error in the civicrm_root setting in your CiviCRM settings file (sites/default/civicrm.settings.php).

» civicrm_root is currently set to: .

Yes, nothing is there at the end. Note that the files are still in /var/www/vhosts/MAIN.org/httpdocs/somedir/dev.dev/ and in fact the site there http://MAIN.org/somedir/dev.dev/ also still works fine, including CiviCRM.

Anyhow, aside from that error, the rest of the site works.  Now if I make the root clearly wrong by adding an X at the beginning then I see:

Code: [Select]
Oops! - The path for including CiviCRM code files is not set properly.
Most likely there is an error in the civicrm_root setting in your CiviCRM settings file (sites/default/civicrm.settings.php).

» civicrm_root is currently set to: /Xvar/www/vhosts/MAIN.org/httpdocs/somedir/dev.dev/sites/all/modules/civicrm.

which is a bit better. If, however, I use the directory which I want to use, i.e.:

$civicrm_root = '/var/www/vhosts/MAIN.net/httpdocs/sites/all/modules/civicrm';

then I get a blank screen in my browser--no output whatsoever.

This is a bit perplexing--the file permissions I believe are the same, but even if they weren't I don't think that explains the blank screen.

Any ideas?

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Odd Error when Switching Site Home Directory
October 30, 2008, 07:18:39 am
Can you check Administer CiviCRM → Global Settings → Directories on both sites to see whether there aren’t any custom path overrides?

It’s a bit hard to guess without the actual PHP error, so your best bet is to get the server logs from your hosting provider and see what exact error blanks the screen.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

FredJones

  • Guest
Re: Odd Error when Switching Site Home Directory
November 06, 2008, 07:21:05 am
Thanks for the response. Your hunch was along the right lines. There was no error in the logs and I couldn't get to any CiviCRM screens on the new site to check anything so I used some old fashioned debugging (really old fashioned style) until I found that the crash was in the create directory procedure--I searched the DB and found in the domains table where those dirs were defined, and updated the DB directly and then it worked.

I'm still puzzled why it failed, b/c those same directories (and they are absolute references) work on the other site on the same server. Seems like it's a user permissions issue but I thought that both sites work run as the Apache user.

Anyhow, I got it to work. Thanks

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Odd Error when Switching Site Home Directory
November 06, 2008, 09:34:52 am
Quote from: FredJones on November 06, 2008, 07:21:05 am
I'm still puzzled why it failed, b/c those same directories (and they are absolute references) work on the other site on the same server. Seems like it's a user permissions issue but I thought that both sites work run as the Apache user.

First, even if Apache is running as, say, the www-data user, the scripts may be running through suPHP (i.e., as their owner). Second, open_basedir might be in effect.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

FredJones

  • Guest
Re: Odd Error when Switching Site Home Directory
November 06, 2008, 09:49:28 am
ah, makes sense. Thank you very much.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Odd Error when Switching Site Home Directory

This forum was archived on 2017-11-26.