Page 1 of 1

getimagesize: what's wrong with this?

Posted: Thu Dec 12, 2013 7:27 am
by simonmlewis

Code: Select all

<?php
list($width, $height, $type, $attr) = getimagesize("/images/logo.jpg");

echo "Width: " .$width. "<br />";
?>
This is hosted on a live server, with read access to the logo.
This is hosted on an .inc file.
But it's not showing anything except Width:

Why not?
The image is in the right place.

Re: getimagesize: what's wrong with this?

Posted: Thu Dec 12, 2013 8:44 am
by Celauran
What is the function returning?

Re: getimagesize: what's wrong with this?

Posted: Thu Dec 12, 2013 8:47 am
by simonmlewis
Nothing whatever on the live.
But locally, with errors on screen:
[text]Warning: getimagesize(/images/logo.jpg): failed to open stream: No such file or directory in C:\xampp\phpMyAdmin\site\includes\a_123.inc on line 2[/text]

Re: getimagesize: what's wrong with this?

Posted: Thu Dec 12, 2013 9:43 am
by simonmlewis
The error log on the live server
[text][Thu Dec 12 15:23:30 2013] [warn] [client 89.168.131.11] mod_fcgid: stderr: PHP Warning: getimagesize(/images/pages/8048794test.jpg): failed to open stream: No such file or directory in /var/www/vhosts/site.co.uk/httpdocs/includes/a_home.inc on line 251, referer: http://www.site.co.uk/home[/text]