WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I upgraded to Wordpress 3.2 and my server from php4 to php5 and now my site outputs this error;

Warning: getimagesize() [function.getimagesize]: URL file-access is disabled in the server configuration in /homepages/35/d289582498/htdocs/wp-content/themes/NovatorixFullArchive_Version1.4/novatorix/index.php on line 98 Warning: getimagesize(http://itsadcoi.com/wp-content/uploads/2011/04/head1.png) [function.getimagesize]: failed to open stream: no suitable wrapper could be found in /homepages/35/d289582498/htdocs/wp-content/themes/NovatorixFullArchive_Version1.4/novatorix/index.php on line 98

This is what's on line 98 as the error is stating; list($width, $height, $type, $attr) = getimagesize($logo_url);

How Can I fix it?

share|improve this question

closed as too localized by Chip Bennett, toscho Jul 15 '12 at 23:07

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Did someone edit the WordPress core files on your site? – Jeremy Jared Nov 7 '11 at 2:06
No, I just updated versions. It appears right above the top menu nav – Arnold Nov 7 '11 at 3:24
I think this is too localized. It is a combination of PHP configuration (allow_url_fopen) and, likely, a poorly-coded Theme. – Chip Bennett Feb 15 '12 at 14:24
up vote 1 down vote accepted

Is your theme compatible with the new version of WP? May be that it uses a deprecated function name somewhere.

But I've had updates go wrong previously. The only thing that eventually sorted it out was to re-upload all the files of the new version using FTP, and overwriting what was there. Won't have impact on your theme or other data, it just overwrites the core.

share|improve this answer

It doesn't sound like a WordPress problem. There's a lot of sloppy PHP code out there that relied on security holes that were present in PHP4 but closed in PHP5, It sounds like your theme is using some of these - in particular URL file access, which was enabled by default in PHP4, and disabled by default in PHP5.

If you have access to the php.ini settings, you can change those settings. I believe the commands to use would be:

allow_url_fopen = 1;
allow_url_include = 1;

... but be sure you know what you're doing, from a security standpoint before making those changes.

A better fix would be just tweaking your theme to use the path to the image you're trying to get, rather than the url.

share|improve this answer
I think this is right, given the error message: RL file-access is disabled in the server configuration. – Chip Bennett Feb 15 '12 at 14:24

Not the answer you're looking for? Browse other questions tagged or ask your own question.