Hi, I am new to php and to these forums, and I'm having trouble with the getimagesize funtion of php. I am using php 4.3.5 on OpenBSD 3.5 which uses a chrooted apache+php.
If I have a simple php script like:
<?php
list($img_width, $img_height) = @getimagesize("http://my.image.url/image.jpg");
print "width: ".$img_width." _- height: ".$img_height."\n";
?>
I can run the script fine from the command line (as in: "php myscript.php") and get the image size returned correctly. However, if I run the script through apache (i.e. view it in my web browser) blank values are printed for the image dimensions.
I had to set
allow_url_fopen = On
in my php.ini but that only made it work from the command line php processor, not through apache.
Does anyone know what is hapenning (and better: how to make this work as it should)?
Thanks,
-Rob