On CiviCRM System Status page I get a permanent error message on the top of the page.

Warning: file_exists(): open_basedir restriction in effect. File(/var/www/clients/client5/web16/websites/default/files/civicrm/persist/contribute/dyn/angular-modules.aa49fb2433945dcf4a451bb96fb1a0e9.js) is not within the allowed path(s): (/var/www/clients/client5/web16/web:/var/www/clients/client5/web16/private:/var/www/clients/client5/web16/tmp:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin) in CRM_Utils_System_DrupalBase->formatResourceUrl() function (/var/www/clients/client5/web16/web/sites/all/modules/civicrm/CRM/Utils/System/DrupalBase.php line 126.).

In CRM_Utils_System_DrupalBase->formatResourceUrl() function, in line 126, I think there is a typo: if I use if (file_exists(DRUPAL_ROOT .'/'. $file)) { the error message disappears. In the original text the '/' is missing: if (file_exists(DRUPAL_ROOT . $file)) {

Is it a bug, or I made some mistake?

  • given lots of sites are not reporting this issue i would tend to assume the latter ;-( maybe a permissions issue on a directory?
    – petednz - fuzion
    Mar 21 '18 at 2:29

Your code path is slightly different from your files path:

code: .../web16/web/sites/...

files: .../web16/websites/...

That looks like a typo - check your directories and resources settings at Administer > System Settings > Directories and Administer > System Settings > Resource URLs

  • wow. sharp eyes.
    – petednz - fuzion
    Mar 21 '18 at 19:10
  • No differences, and the help page shows, that CiviCRM recognizes the correct path with trailing "/".
    – Pál Rudan
    Mar 22 '18 at 8:55
  • Some time later comes an error came up in the same context: there are some _SERVER values missing. The error's reason was that OPcache AND xcache were enabled on the server. After disabling OPcache, those errors disappeared. Perhaps can be this the solution?
    – Pál Rudan
    Apr 2 '18 at 16:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.