Closed (fixed)
Project:
Revision Moderation
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Feb 2007 at 10:50 UTC
Updated:
5 Mar 2007 at 16:29 UTC
On some restrictive servers / installations (like mine), on installation, this module throws this error:
* warning: %v%v() [function.%v]: open_basedir restriction in effect. File(/revision_moderation_actions.inc) is not within the allowed path(s): (/var/www/vhosts/myserver.org/httpdocs:/tmp) in /var/www/vhosts/myserver.org/httpdocs/modules/workflow/revision_moderation/revision_moderation.module on line 11.
* warning: %v%v() [function.%v]: failed to open stream: Operation not permitted in /var/www/vhosts/myserver.org/httpdocs/modules/workflow/revision_moderation/revision_moderation.module on line 11.
* warning: %v%v() [function.include]: Failed opening 'revision_moderation_actions.inc' for inclusion (include_path='.:') in /var/www/vhosts/myserver.org/httpdocs/modules/workflow/revision_moderation/revision_moderation.module on line 11.
Cause:
insecure way of file inclusion.
your way if including files is correct in files ending on *.php, but for *.modules, you need to do it this way.
Fix:
change lines 11-13 from:
if (module_exist('actions')) {
include_once('revision_moderation_actions.inc');
}
to:
if (module_exist('actions')) {
include_once(drupal_get_path('module', 'revision_moderation') .'/revision_moderation_actions.inc');
}
Maybe this helps.
Comments
Comment #1
webchickAwesome, thanks for the fix!
Comment #2
monktbd commented