• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 813
  • Last Modified:

PHP getimagesize returns nothing?

the following call to getimagesize has worked for years.
nothing has changed that i know of.

below the two lines of code is the results of the debugging echo statement
(this is used in a larger context, but excerpted to just the essence)

can someone spot what is wrong or suggest additional debugging?    THANK YOU!

	  $ImgSize = @getimagesize($ImageURL);
	  echo "\n\n<!-- $ImageURL; $ImgSize = {$ImgSize[0]} / {$ImgSize[1]}  / {$ImgSize[3]}; [".count($ImgSize)."] -->\n\n";

<!-- http://blogs.salemnews.com/ashorething/wp-content/uploads/2011/06/brink.jpg;  =  /   / ; [1] -->

Open in new window

  • 2
1 Solution
Ray PaseurCommented:
For starters, let's try data and message visualization.  Remove the @ from the function call.  Use var_dump() to print out the contents $ImageURL and $ImgSize.  Please post those here along with any messages you get.

In my test case NTF,DNF:

<?php // RAY_temp_willsherwood.php 2013-10-11

$url = 'http://blogs.salemnews.com/ashorething/wp-content/uploads/2011/06/brink.jpg';
$dat = getimagesize($url);
var_dump($url, $dat);

Open in new window

willsherwoodAuthor Commented:
perfect - thanks!
here was the answer:
URL file-access is disabled in the server configuration

evidently the server parameter changed recently!

always appreciate your patient help!!
Ray PaseurCommented:
Great!  Glad you found the culprit ;-)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now