I have on a hosting site with Linux, Apache and php 5.2.17 with allow_url_fopen=true, a php page checking the existence of an image with fopen (fopen($_SESSION['IMG_DIR_REL']."/img/img5.jpg", "rb")); I don't use file_exists because it returns "nothing" :-( . The page is on the subdir ./test/ and images on the subdir ./img/ If I access the page with http (http://www.example.com/test/control.php) the fopen works perfectly giving the right presence of images. But if I access the same page with https (https://www.example.com/test/control.php) I got the fopen(https://www.example.com/img/img5.jpg) [function.fopen]: failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden. If I change to fopen (fopen("../img/img5.jpg", "rb")); it works on https. I googled a bit, testing some examples for similar cases but nothing works. Do you have some suggestions? Thanks in advance.