The most likely cause I can think of for the problem is the fact that bookcover.php uses file_get_contents() to load images, while most of the rest of VuFind uses the HTTP_Request PEAR library for connections.  Perhaps something on your system is preventing file_get_contents from doing its job – either some configuration setting is preventing PHP’s URL wrappers from doing their job (see the comment at for one possible way this could happen) or perhaps something is wrong with your proxy settings if you are using a proxy server.


Honestly, neither of those possible explanations seems too likely to me – the best way to figure out what’s really happening is probably to do some debugging of the code.  If you edit bookcover.php and find the processImageURL function, you might find it helpful to change the start of the function to something like this:


function processImageURL($url, $cache = true)


    global $localFile;  // this was initialized by fetchFromISBN()


    echo “Trying to load $url …”;

    if ($image = file_get_contents($url)) {

        echo “Success!”


I’ve added some echo statements so you can confirm which image URL VuFind is attempting to load and whether or not the load is successful.  I have also removed the error-suppressing @ from in front of file_get_contents so if it is throwing out error messages, you can actually see them.


Obviously, with these changes in place, you won’t actually be able to view any images in context in VuFind…  but if you go directly to bookcover.php?isn=xxx in your web browser, you should see the debug information displayed there.


Good luck, and if you aren’t able to easily solve the problem yourself using this information, feel free to share any clues you turn up and I’ll do my best to provide more help.


- Demian


From: Valencia, Ernesto []
Sent: Thursday, May 26, 2011 7:01 AM
Subject: [VuFind-General] bookcovers.php (vufind 1.1) support question.





I've recently installed vufind 1.1. For demo and evaluation purposes.


And was hoping someone could help me

get the provider part of bookcovers to work for us.


i've uncommented and added the required settings in our config.ini

But for some reason I cannot get the script to kick off.


I've tried various combinations from the available options and keys /pwds .








I've run a packet sniffer to see if there is any outbound traffic to any of theses providers at execution time and I get nothing

So it seems to me that execution doesn't seem be reaching that portion of the script.


The only way to get a coverimage to load is by manually placing one in images/covers/<size>/<isn>.jpg that corresponds to an entry


Thanks very much in advance for any help you can provide.






ernesto valencia ~ systems librarian

northeastern university libraries

library technology services

boston, ma 02115


617.373.3398 (ph)

617.293.9265 (mobile)