getimagesize is not working on Windows 7 but it is working on XP. When executed first, it returns FALSE, when executed again, it returns nothing.
function ezImage($image,$pad = 5,$width = 0,$resize = 'full',$just = 'center',$border = ''){
...............
...............
...............
$imageInfo = @getimagesize($image);
if (!$imageInfo) {
//remove tempfile for remote images
if ($temp == true) unlink($image);
return false;
}
.............
.............
}
In case of Windows 7, first when it is going inside the getimagesize function it is returning 0, and second time this function gets called it is not returning at all. I have checked the URL $image and it is fine. If I enter the URL directly in the browser, it displays the image immediately.
First execution throws the following warning message:
Warning: getimagesize(http://localhost/metornet/metornet_chart_paxalarm.php?title=MetorNet+Statistics&names%5B%5D=03%2F07%2F12%0A08%3A48+-%0A03%2F07%2F12%0A08%3A49&pax%5B%5D=0&alarms%5B%5D=0&rates%5B%5D=0.0&names%5B%5D=03%2F07%2F12%0A08%3A49+-%0A03%2F07%2F12%0A08%3A50&pax%5B%5D=0&alarms%5B%5D=0&rates%5B%5D=0.0&names%5B%5D=03%2F07%2F12%0A08%3A50+-%0A03%2F07%2F12%0A08%3A51&pax%5B%5D=0&alarms%5B%5D=0&rates%5B%5D=0.0&names%5B%5D=03%2F07%2F12%0A08%3A51+-%0A03%2F07%2F12%0A08%3A52&pax%5B%5D=0&alarms%5B%5D=0&rates%5B%5D=0.0&names%5B%5D=03%2F07%2F12%0A08%3A52+-%0A03%2F07%2F12%0A08%3A53&pax%5B%5D=0&alarms%5B%5D=0&rates%5B%5D=0.0&names%5B%5D=03%2F07%2F12%0A08%3A53+-%0A03%2F07%2F12%0A08%3A54&pax%5B%5D=0&alarms%5B%5D=0&rates%5B%5D=0.0&names%5B%5D=03%2F07%2F12%0A08%3A54+-%0A03%2F07%2F12%0A08%3A55&pax%5B%5D=0&alarms%5B%5D=0&rates%5B%5D=0.0&names%5B%5D=03%2F07%2F12%0A08%3A55+-%0A03%2F07%2F12%0A08%3A56&pax%5B%5D=0&am in C:\Program Files\..\..\Includes\ros_pdf_class\class.ezpdf.php on line 1344
Second execution throws this fatal error:
Fatal error: Maximum execution time of 120 seconds exceeded in C:\Program Files\.. \..\Includes\ros_pdf_class\class.ezpdf.php on line 1344
For some reason in Vista and Windows 7,
localhost/127.0.0.1doesn’t work out of the box. To get it working you have to add this line to the c:\windows\system32\drivers\etc\hosts file:127.0.0.1 localhost.Actually you will find this line in the host file, but it is commented, so you can just uncomment the line.
getimage sizeis working fine with localhost too. Thank you for your valuable comments and suggestion.