Hi,

I got this critical error sudenly on my site. The site is already running for a year, but I think my provider changed settings.
They turned safemode on.

warning: require_once() [function.require-once]: open_basedir restriction in effect. File(/usr/share/pear/links.inc) is not within the allowed path(s): (/:/tmp:/usr/local/lib/php/) in /home/public_html/modules/links/links.module on line 14. 
warning: include_once() [function.include-once]: open_basedir restriction in effect. File(/usr/share/pear/links_views.inc) is not within the allowed path(s): (/:/tmp:/usr/local/lib/php/) in /home/public_html/modules/links/links.module on line 16.

I see here a patch for the file.inc:http://drupal.org/node/4410#comment-37959. Could something like this also work for links?

Thanks in advance for going into this!
Greetings,
Martijn

Comments

summit’s picture

Hi,

After looking thoroughly through the forum I have been able to solve this error by changing the heading of links.module to:

require_once(drupal_get_path('module', 'links') .'/links.inc');
if (module_exists('views')) {
  include_once(drupal_get_path('module', 'links') .'/links_views.inc');
  }

I have no time to file a patch, but I think it is important enough to post my solution.
Greetings,
Martijn