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.
- Download and open file /aom/img.php
- copy the function CURL replacement for file_get_contents to the end of the file before ?>
- 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)
- add echo file_get_contents_curl($img); under both lines you have just commented out.
- Save and upload the file.