Download & Extend

warning: fopen(/tmp/) [0function.fopen0]: failed to open stream: Is a directory in .../feedapi_imagegrabber.module on line 526

Project:FeedAPI ImageGrabber
Version:6.x-1.0
Component:Code
Category:support request
Priority:normal
Assigned:publicmind
Status:closed (fixed)

Issue Summary

warning: fopen(/tmp/) [0function.fopen0]: failed to open stream: Is a directory in /home/path/to/module/feedapi_imagegrabber/feedapi_imagegrabber.module on line 526.

When I run cron and pull in new feed items I get that error above.

The module appears to be working, but that warning appears. What does it mean?

Comments

#1

Can you provide some more details:

1) web server
2) OS
3) PHP version and whether safe mode is enabled.
4) which user you are setting the cron for, does the user have write access to the temp directory?

you can look here for more details on reasons for warnings produced by fopen.

#2

can you tell me the feed url you were parsing?

#3

Try this.

http://pipes.yahoo.com/pipes/pipe.run?_id=3jqQ6rfF3RGvTD3CrbQIDg&_render...

It's happening for all feeds, though.

#4

Assigned to:Anonymous» publicmind

I did not get any such warning:

http://ganesha.codespry.com/nitin/drupal/feed-item/881

may be you should try the new rc1 release.

I think the warning you were getting was because of the following tags on their pages:
Only local images are allowed.
now the src of the Only local images are allowed. tag is actually not an image. The new release will be able to handle this.

Leave your response.

#5

the link went missing from the last post..

<div img src="//secure-us.imrworldwide.com/cgi-bin/m?ci=us-abcwls&amp;cg=0&cc=1" alt=""/></div>

this is what I found on their page.

#6

I am unable to pull any images from my first test feed, although I am pretty sure there should be a few coming through.
On this page for example
http://www.nasa.gov/mission_pages/kepler/news/keplerm-20090413.html
There is one picture that I would expect to fit my criteria. Every page access in my feed (28 in my trial) produces 2 error messages in the log as follows:

file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /usr/www/users/equinox/foundonmars/sites/all/modules/feedapi_imagegrabber/feedapi_imagegrabber.module on line 443.

file_get_contents(http://www.nasa.gov/mission_pages/kepler/news/keplerm-20090413.html) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /usr/www/users/equinox/foundonmars/sites/all/modules/feedapi_imagegrabber/feedapi_imagegrabber.module on line 443.

Will try a different feed source.

#7

It seems like your PHP safe mode is on which disallows the URL access from file_get_contents(). You will face the same problem if you will use the Common Syndication Parser in FeedAPI.

Try disabling the safe mode if you can, it will do the trick i guess.

#8

Using Drupal's system info, it would appear that my safe mode is off. Screen segment attached. I have no indication that Common Syndication Parser is failing, no errors and output on this simple feed is what I would expect. Sorry to involve you in deciphering my server configuration, but the second screen shot shows a php configuration called allow URL, I know next to nothing of these parameters but wondered if this might have something to do with it?

AttachmentSize
safemode.jpg 30.72 KB
allowurl.jpg 38.75 KB

#9

I think this might be the problem, because when I checked my PHP info, it has the allow_url_fopen as "ON". Why don't you try toggling it and report back?

regards

#10

What file would I edit to make that change?

#11

You will have to edit the php configuration file i.e. php.ini .

Change the following line:
allow_url_fopen = Off
to
allow_url_fopen = On

#12

Status:active» fixed

Success!
And the results are awesome! Thank you so much - my feeds are worldclass now. Great module.

http://foundonmars.com/feed-item/390

FYI: I made the change to php by adding this line within my .htaccess

#
# Apache/PHP/Drupal settings:
#
# Allow URL Open for imagegrabber on newsfeeds
  php_flag allow_url_fopen on

#13

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here