Fix associate-o-matic images not showing

After moving a clients Associate-o-matic store to a new hosting, images have stopped showing. If we attempted to view the image the following error would appear:

Warning: file_get_contents() [function.file-get-contents]:… File(/aom/img.php) is not within the allowed path(s)

Even after updating to the new version of AOM I could not get it  to work. The work around I found is to use cURL intead of file_get_contents();  To do this I followed these simple steps.

  1. Download and open file /aom/img.php
  2. copy the function CURL replacement for file_get_contents to the end of the file before ?>
  3. comment out the line echo file_get_contents($img); (just add # at the start of the line, do this for both instances of the line)
  4. add echo file_get_contents_curl($img); under both lines you have just commented out.
  5. Save and upload the file.

 

 

 

Technorati Tags: , , , ,

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>