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 »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • open_basedir restriction
Pages: [1]

Author Topic: open_basedir restriction  (Read 3362 times)

kafmil

  • I’m new here
  • *
  • Posts: 12
  • Karma: 1
  • CiviCRM version: 4.1
  • CMS version: Drupal 7
  • MySQL version: 5.095
  • PHP version: 5.2.17
open_basedir restriction
July 08, 2012, 10:48:09 pm
On the Settings - Addresses configuration page I am getting the following errors.

Code: [Select]
Warning: is_dir(): open_basedir restriction in effect. File(/usr/share/pear/CRM/Utils/Address) is not within the allowed path(s): (list_of_allowed_paths) in CRM_Utils_System::listIncludeFiles() (line 1386 of /path_to_drupal_root/sites/all/modules/civicrm/CRM/Utils/System.php).
Warning: is_dir(): open_basedir restriction in effect. File(/usr/share/php/CRM/Utils/Address) is not within the allowed path(s): (list_of_allowed_paths) in CRM_Utils_System::listIncludeFiles() (line 1386 of /path_to_drupal_root/sites/all/modules/civicrm/CRM/Utils/System.php).

I have tried adding /usr/share/pear/CRM/ to open_basedir with no luck, which makes some sense as it isn't an actual directory. The directory is actually /path_to_drupal_root/sites/all/modules/civicrm/CRM/Utils/Address. If I disable open_basedir the page works, which makes me think that CivicRM is able to figure out that /usr/share/pear/CRM/ isn't a real directory and correct itself to find the real directory.

I want to keep my open_basedir restrictions in place. So far it seems that I can turn off displaying errors in Logging and Errors in drupal and the problem is hidden away, I can save the config page and it all seems to work OK. I am wondering if there is a proper solution to this issue. I am running:
Drupal 7.14
CiviCRM 4.1.3
Centos 6 VDS

Upperholme

  • Administrator
  • Ask me questions
  • *****
  • Posts: 568
  • Karma: 8
    • MC3
  • CiviCRM version: 4.x
  • CMS version: Drupal 6.x/7.x, Wordpress, Joomla
Re: open_basedir restriction
March 05, 2013, 02:34:11 am
I'm just seeing this same issue now on a site that I've recently moved to a new server. Did you ever find out the cause of the issue, and the solution?
Graham Mitchell
http://mc3.coop

awasson

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 7
  • Living in a world of Drupal / CiviCRM
    • My Company: Luna Design
  • CiviCRM version: Latest
  • CMS version: Drupal 6/7/8
  • MySQL version: 5.x
  • PHP version: 5.3.x
Re: open_basedir restriction
June 05, 2013, 03:08:23 pm
I've received the same warning on the sites I've updated to CiviCRM 4.3.x from 4.2.x. For now I have removed that restriction (set to none) but I too would like a definitive answer.
My CiviCRM Extension Workshop: https://github.com/awasson

terryr

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
  • CiviCRM version: 4.3.3
  • CMS version: Drupal 7
  • MySQL version: MariaDB 5.5
  • PHP version: 5.4
Re: open_basedir restriction
June 12, 2013, 09:46:56 pm
Try adding /usr/share/pear/ to open_basedir in php.ini (without the 'CRM').  Worked for me.

Terry

awasson

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 7
  • Living in a world of Drupal / CiviCRM
    • My Company: Luna Design
  • CiviCRM version: Latest
  • CMS version: Drupal 6/7/8
  • MySQL version: 5.x
  • PHP version: 5.3.x
Re: open_basedir restriction
June 12, 2013, 10:06:35 pm
Thanks Terry, I'll give that a try.

Andrew
My CiviCRM Extension Workshop: https://github.com/awasson

MarkDQ

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: 4.6.0
  • CMS version: Drupal 7.35
  • MySQL version: 5.5.41
  • PHP version: 5.4.38
Re: open_basedir restriction
March 18, 2015, 09:08:39 am
Quote from: terryr on June 12, 2013, 09:46:56 pm
Try adding /usr/share/pear/ to open_basedir in php.ini (without the 'CRM').  Worked for me.
Adding /usr/share/pear did not help for me!

The hosting support informs that the directory /CRM/Utils/Address does not exist.

After adding, this is the warning:

Warning: is_dir(): open_basedir restriction in effect.
File(/usr/share/pear/CRM/Utils/Address) is not within the allowed path(s):
(/var/www/htdocs/slaap-apneu/:/tmp/:/var/tmp/:/var/lib/php5:/usr/share/php/:/usr/share/pear/)
in CRM_Utils_System::listIncludeFiles()
(regel 1735 van /var/www/htdocs/slaap-apneu/public/sites/all/modules/civicrm/CRM/Utils/System.php).
« Last Edit: March 18, 2015, 03:07:44 pm by MarkDQ »

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: open_basedir restriction
March 18, 2015, 09:27:45 am
You don't have the folder /var/www/htdocs/slaap-apneu/public/sites/all/modules/civicrm/CRM/Utils/Address ?

Then you have another issue on your install, because it should
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

MarkDQ

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: 4.6.0
  • CMS version: Drupal 7.35
  • MySQL version: 5.5.41
  • PHP version: 5.4.38
Re: open_basedir restriction
March 18, 2015, 10:10:46 am
Quote from: xavier on March 18, 2015, 09:27:45 am
You don't have the folder /var/www/htdocs/slaap-apneu/public/sites/all/modules/civicrm/CRM/Utils/Address ?
Then you have another issue on your install, because it should

The hosting company (shared hosting) informs that the file /usr/share/pear/CRM/Utils/Address does not exist,
there is no directory /CRM/Utils/Address in /usr/share/pear/

The directory you are mentioning exists:
/var/www/htdocs/slaap-apneu/public/sites/all/modules/civicrm/CRM/Utils/Address
« Last Edit: March 18, 2015, 11:07:00 am by MarkDQ »

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: open_basedir restriction
April 04, 2015, 11:36:42 pm
Not sure why it's searching at the wrong path, you'll have to investigate, but il tools like a conflict with other modules that are using pear too (and the one in the standard shared folder)
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • open_basedir restriction

This forum was archived on 2017-11-26.