For both thumbnail and full-node views, I'm getting the following errors with emfield-5.x-1.2 and Drupal Core 5.10:
warning: file_get_contents(http://s289.photobucket.com/albums/ll218/Rblue93yj/?action=view¤t=...) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/theunpav/public_html/jjusa/modules/emfield/contrib/image_ncck/providers/photobucket.inc on line 118.
and
warning: file_get_contents(http://s289.photobucket.com/albums/ll218/Rblue93yj/?action=view¤t=...) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/theunpav/public_html/jjusa/modules/emfield/contrib/image_ncck/providers/photobucket.inc on line 118.
Seems like this error gets thrown when Photobucket can't find the image... I also see "This image for video has been deleted or removed" placeholder displayed by Photobucket on my full-node View.
Any ideas how to fix this error?
I found a related thread at http://drupal.org/node/210191 which covers Picasa module, so perhaps a similar fix could be found for Embedded Media Field as well?
Comments
Comment #1
aaron commentedHmmm... We could use the cURL option, although that would require that library to be installed (which it may not be on many hosts). Would probably be better to use @file_get_contents. Can you try adding that on line 118 and testing? I'll put that in the next time I work on the module, but probably won't have time to test it right away. Setting to critical to remind myself, as it's easy enough to fix, if that solution works.
Comment #2
krisvannest commentedWould be glad to test, but I'm a little out of my league programming-wise so would need some guidance... here's the code for lines #112-#120 as found in modules/emfield/contrib/image_ncck/providers/photobucket.inc:
So just let know if you want me to replace the $html = file_get_contents($url); in line #118 with $html = @file_get_contents($url); (basically add an "@" there) and I'll test it out, but I wasn't sure if that's all I would have to change, etc?
Thx KV
Comment #3
PHP NOOB commentedComment #4
PHP NOOB commentedi'm not familair with using @ from my experience. so i cant help you there
but, all cases of a forward slash while using preg_match or preg_match_all have to be prefixed with a back slash or
you end up with "unknown modifier"
i believe you already answered your problem:
quote "Seems like this error gets thrown when Photobucket can't find the image... I also see "This image for video has been deleted or removed" placeholder displayed by Photobucket on my full-node View."
Comment #5
jtjones23 commentedI'm getting the same error as krisvannest using 5.x-1.3. But, I only get this error when attempting to add multiple images to one page. If I uncheck multiple values, the photobucket image displays just fine.
--John
Drupal 5.16
PHP 5.2.9
Comment #6
jtjones23 commentedStill getting this error..any ideas?