Line 1167 of leech_news.module includes leech_news_parser.inc, but uses a path relative to the module. I don't know the reason it happens, but this does not work on all hosting configurations. For instance, this is the error I was getting:

* warning: _leech_news_parse() [function.-leech-news-parse]: open_basedir restriction in effect. File(/leech_news_parser.inc) is not within the allowed path(s): (/var/www/vhosts/build.domain.com/httpdocs:/tmp) in /var/www/vhosts/build.domain.com/httpdocs/modules/contrib/leech/leech_news/leech_news.module on line 1167.
    * warning: _leech_news_parse(leech_news_parser.inc) [function.-leech-news-parse]: failed to open stream: Operation not permitted in /var/www/vhosts/build.domain.com/httpdocs/modules/contrib/leech/leech_news/leech_news.module on line 1167.
    * warning: _leech_news_parse() [function.include]: Failed opening 'leech_news_parser.inc' for inclusion (include_path='.:') in /var/www/vhosts/build.domain.com/httpdocs/modules/contrib/leech/leech_news/leech_news.module on line 1167.

Using the path relative to the base directory solves the problem:

include_once(drupal_get_path('module', 'leech_news') . '/leech_news_parser.inc');

Looking forward to seeing the module in action! :)

Comments

alex_b’s picture

Where does your drupal installation sit, what is the root directory of your web server and the directory of leech?

matt@antinomia’s picture

Thank you Alex-

This may have something to do with the PHP include_path variable. I've been having issues with other includes as well.

In any case, to answer your questions:

Drupal installation (and root directory) : /var/www/vhosts/build.domain.com/httpdocs
Leech directory: /var/www/vhosts/build.domain.com/httpdocs/modules/contrib/leech

FWIW, I've switched to the Feedparser module, it's a little simpler and addresses my requirements :)

-Matt

alex_b’s picture

Status: Active » Closed (fixed)