flammy / imagebox

This dokuwiki plugin displays captions in a box drawn around an image.
https://www.dokuwiki.org/plugin:imagebox
GNU General Public License v2.0
5 stars 7 forks source link

Failed to open stream: HTTP request failed! #5

Closed flammy closed 7 years ago

flammy commented 8 years ago

Moved issues from dokuwiki comment section to github:

If PHP Gives you an error similar to the following:

Warning: getimagesize(http://www.mysite.us/sub-domain/wiki/_media/morse-code.png) [function.getimagesize]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/xxxxxx/public_html/sub-domain/wiki/lib/plugins/imagebox/syntax.php on line 52

you can correct this issue by finding the following lines around line 49 in your ../lib/plugins/imagebox/syntax.php-file:

$match['source'] = str_replace(':','/',$match['src']); if($match['src']{0} == ':') $match['source'] = substr($match['source'],1); $gimgs = getImageSize(DOKU_URL.'_media/'.$match['source']);

and replace them with:

$match['source'] = str_replace('_','/',$match['src']); if($match['src']{0} == ':') $match['source'] = substr($match['source'],1); $gimgs = getImageSize(mediaFN(cleanID($match['source'])));

flammy commented 7 years ago

This part of the code does not exist any more.