Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-21277

CRM_Utils_System_WordPress::validInstallDir spams log with warnings when open_basedir restriction is in effect

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.23, 4.7.25
    • Fix Version/s: 5.1
    • Component/s: None
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code
    • Verified?:
      No

      Description

      Example of logspam:

      PHP Warning:  file_exists(): open_basedir restriction in effect. File(/var/wp-includes/version.php) is not within the allowed path(s): (/var/www/vhosts/example.org/:/tmp/) in /var/www/vhosts/example.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php on line 471
      PHP message: PHP Warning:  file_exists(): open_basedir restriction in effect. File(/var/www/wp-includes/version.php) is not within the allowed path(s): (/var/www/vhosts/example.org/:/tmp/) in /var/www/vhosts/example.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php on line 471
      PHP message: PHP Warning:  file_exists(): open_basedir restriction in effect. File(/var/www/vhosts/wp-includes/version.php) is not within the allowed path(s): (/var/www/vhosts/example.org/:/tmp/) in /var/www/vhosts/example.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php on line 471
      PHP message: PHP Warning:  file_exists(): open_basedir restriction in effect. File(/var/wp-includes/version.php) is not within the allowed path(s): (/var/www/vhosts/example.org/:/tmp/) in /var/www/vhosts/example.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php on line 471
      PHP message: PHP Warning:  file_exists(): open_basedir restriction in effect. File(/var/www/wp-includes/version.php) is not within the allowed path(s): (/var/www/vhosts/example.org/:/tmp/) in /var/www/vhosts/example.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php on line 471
      PHP message: PHP Warning:  file_exists(): open_basedir restriction in effect. File(/var/www/vhosts/wp-includes/version.php) is not within the allowed path(s): (/var/www/vhosts/example.org/:/tmp/) in /var/www/vhosts/example.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php on line 471

      This makes it very hard to debug actually issues.

      Easy workaround is to suppress warnings from that call to file_exists.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              agileware Agileware
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: