It was not possible to determine the dimensions of the image

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Anti-Spam Guide
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
User avatar
Fife Club
Registered User
Posts: 137
Joined: Thu Mar 07, 2002 6:36 pm

Re: It was not possible to determine the dimensions of the image

Post by Fife Club » Tue Feb 05, 2008 3:14 pm

I'm on phpBB3.0 and I get that same error too.

My php settings say that allow_url_fopen is set to On and On, and the code above didn't solve it for me. I can't include images in posts (that are already in existing posts from before the upgrade). What else can be done? Is there something else I can ask the host to check/change?

mrsmiley
Registered User
Posts: 7
Joined: Thu Dec 09, 2004 11:59 pm

Re: It was not possible to determine the dimensions of the image

Post by mrsmiley » Wed Feb 06, 2008 3:29 am

Dreamhost Users:

You CAN edit your PHP.INI file. I had to dig around for this myself, as we were getting the 'not possible' error on signature and avatar images. Too many places to try and custom recode quickly, so I looked for solutions.
That was absolutely brilliant. Worked perfectly.

For those wondering how to create an .htaccess file, click here to go to Dreamhost's support wiki.

tkrupka
Registered User
Posts: 9
Joined: Tue Feb 05, 2008 11:17 am

Re: It was not possible to determine the dimensions of the image

Post by tkrupka » Wed Feb 06, 2008 10:19 am

I'm working with Startlogic.

Ran this:

Code: Select all

<?php

$info = getimagesize("Pemmah_Iroe_02.jpg");

foreach ($info as $key => $value)
{
   echo $value."<br />";
}

?>
I got this back:

Code: Select all

327
200
2
width="327" height="200"
8
3
image/jpeg

Ran this (called out the same folder by name):

Code: Select all

<?php

$info = getimagesize("http://the-jedl-order.com//test/Pemmah_Iroe_02.jpg");

foreach ($info as $key => $value)
{
   echo $value."<br />";
}

?>
I got this back:

Code: Select all

Warning: getimagesize(http://the-jedl-order.com//test/Pemmah_Iroe_02.jpg) [function.getimagesize]: failed to open stream: HTTP request failed! in /hermes/bosweb/web246/b2465/sl.the-jedl/public_html/test/getimagesizeremote.php on line 3

Warning: Invalid argument supplied for foreach() in /hermes/bosweb/web246/b2465/sl.the-jedl/public_html/test/getimagesizeremote.php on line 5

I ran a test of PHP on the server and got this back:

Directive(Local Value/Master Value)
allow_call_time_pass_reference(On/On)
allow_url_fopen (On/On)
allow_url_include(Off/Off)

Any suggestions?

tkrupka
Registered User
Posts: 9
Joined: Tue Feb 05, 2008 11:17 am

Re: It was not possible to determine the dimensions of the image

Post by tkrupka » Thu Feb 07, 2008 9:16 am

Looks like it is a problem with the hosting site. They said that it should work. But, they agree that it isn't and are looking into it.

User avatar
Fife Club
Registered User
Posts: 137
Joined: Thu Mar 07, 2002 6:36 pm

Re: It was not possible to determine the dimensions of the image

Post by Fife Club » Thu Feb 14, 2008 3:19 am

Fife Club wrote:I'm on phpBB3.0 and I get that same error too.

My php settings say that allow_url_fopen is set to On and On, and the code above didn't solve it for me. I can't include images in posts (that are already in existing posts from before the upgrade). What else can be done? Is there something else I can ask the host to check/change?
Again, what exactly am I asking the host to check or change since allow_url_fopen is set to On and On?

Jacksel
Registered User
Posts: 17
Joined: Fri May 25, 2007 10:20 pm
Location: Netherlands

Re: It was not possible to determine the dimensions of the image

Post by Jacksel » Mon Feb 18, 2008 6:21 pm

The mod indicated before did solve the problem of posting images in a topic, but it's still not possible to post an avatar... It's the same as with >>>Ana, it worked before and suddenly stopped working. Am considering just removing those size limits, but I don't really want to... I will if I must...

Jacksel
Registered User
Posts: 17
Joined: Fri May 25, 2007 10:20 pm
Location: Netherlands

Re: It was not possible to determine the dimensions of the image

Post by Jacksel » Wed Feb 20, 2008 4:24 pm

Jacksel wrote:The mod indicated before did solve the problem of posting images in a topic, but it's still not possible to post an avatar... It's the same as with >>>Ana, it worked before and suddenly stopped working. Am considering just removing those size limits, but I don't really want to... I will if I must...
Have found a workaround. If all users enter the size of the image e.g. 100x100 pix it will work. If they don't enter the size, it won't work... Weird, but hey, it works now :ugeek:

marcus0263
Registered User
Posts: 1
Joined: Fri Aug 03, 2007 6:52 pm

Re: It was not possible to determine the dimensions of the image

Post by marcus0263 » Thu Feb 28, 2008 7:50 am

The core question is why is allow_url_fopen required for phpBB3?
This is a problem, why?
Here’s a simple example of why allow_url_fopen is a problem in the real world.

I’ve seen several cases where people wrote a PHP script designed to display a bunch of content on a page with a fixed header and footer. They write it something like this:

And then they run it with something like “http://www.example.com/index.php?page=page5.html”.

All it takes is someone to come along and type “http://www.example.com/index.php?page=h ... script.txt”, and if allow_url_fopen is turned on, PHP will happily run any PHP code contained in evilscript.txt. It could delete all your files, deface your site, attack other servers… whatever.

Moral: allow_url_fopen should *always* be off unless you absolutely need it.
Is there any work on a patch to fix this hole?

lli
Registered User
Posts: 6
Joined: Tue May 01, 2007 8:52 pm
Location: London, UK
Contact:

Re: It was not possible to determine the dimensions of the image

Post by lli » Sat Mar 08, 2008 11:52 pm

I fixed it by putting the allow_url_fopen inside a FilesMatch in the Virtual Server definition, like this, the default virtual server:

Code: Select all

<Directory /var/www/*/web>
    Options +Includes -Indexes
    AllowOverride None
    AllowOverride Indexes AuthConfig Limit FileInfo
    Order allow,deny
    Allow from all
    <Files ~ "^\.ht">
    Deny from all
    </Files>
    <FilesMatch "\.(gif|jpe?g|png)$">
        php_flag allow_url_fopen on
    </FilesMatch>
</Directory>
This was a result of reading bits and pieces on several sites and bolting them together, so thanks to the many people who helped :)

If this doesn't work for you, the

Code: Select all

    <FilesMatch "\.(gif|jpe?g|png)$">
        php_flag allow_url_fopen on
    </FilesMatch>
can go into the virtual server definition for a particular site (or for each site). It could, I suspect, even go into a .htaccess.
Dave

Arkantos Khan
Registered User
Posts: 51
Joined: Wed Jun 29, 2005 5:44 am

Re: It was not possible to determine the dimensions of the image

Post by Arkantos Khan » Tue Apr 01, 2008 4:51 pm

OK, I edited the message_parser.php and now I can post images within the allowed size but... there is a new problem!, I get this ugly thing on the top of the page:

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/message_parser.php on line 315: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3391: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3393: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3394: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3395: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
Any solution?

SLAMA Photography
Registered User
Posts: 5
Joined: Wed Mar 19, 2008 12:16 am

Re: It was not possible to determine the dimensions of the image

Post by SLAMA Photography » Sat Apr 05, 2008 3:23 am

Users browsing this forum: Gigabot [Bot], Google [Bot], Google Adsense [Bot], hewmac06, jazzjester, MSNbot Media, Pit$Bull, ScrapbookSupplies, tucsonsam and 29 guests


30+ people browsing a topic that was started in June 2007.... just wondering if there is a solution on the horizon that us non-coders can actually use?

User avatar
Phil
Former Team Member
Posts: 10403
Joined: Sat Nov 25, 2006 4:11 am
Name: Phil Crumm
Contact:

Re: It was not possible to determine the dimensions of the image

Post by Phil » Sat Apr 05, 2008 4:38 am

That statistic applies to the 3.x Support Forum, not this particular topic. As for a solution, you can try the ones in this thread or create your own thread for us to help you diagnose the exact cause of the problem. In many cases, your host has getimagesize() disabled fully, or just for remote files. In the first case, this error is essentially unavoidable without disabling everything that uses that function, and in the latter the solution is to disable remote avatars.
Moving on, with the wind. | My Corner of the Web

MIX_M@N
Registered User
Posts: 2
Joined: Sun Apr 06, 2008 6:47 pm

Re: It was not possible to determine the dimensions of the image

Post by MIX_M@N » Sun Apr 06, 2008 7:25 pm

Hello,

I have tried all these thing and none of them are working...
Could someone please help me?

I use Zymic Webhosting
http://www.zymic.com/
And what's happening is that I can't put image links in my sig...
It says that the dimensions can't be found...

Like the others, the only solution is to turn of the restrictions... but that could lead to trouble...


Thanks in advance to those who help! :D
------MIX_M@N

Arkantos Khan
Registered User
Posts: 51
Joined: Wed Jun 29, 2005 5:44 am

Re: It was not possible to determine the dimensions of the image

Post by Arkantos Khan » Sun Apr 06, 2008 7:58 pm

I think this is a real big BUG in phpBB3 that demands a definitely fix by the developer team. I can't imagine how they didn't see this failure in the testing and RCs phase of Olympus.

User avatar
Phil
Former Team Member
Posts: 10403
Joined: Sat Nov 25, 2006 4:11 am
Name: Phil Crumm
Contact:

Re: It was not possible to determine the dimensions of the image

Post by Phil » Sun Apr 06, 2008 11:14 pm

As I've explained multiple times, this error message is not a bug in phpBB. The simple fact is, the script uses getimagesize() to get the size of images (obviously). Some hosts have getimagesize() limited to local files only (so it doesn't work on signatures and remote avatars), and some have it completely disabled. If you're interested in what the problem is specifically, just try to run this script.

Code: Select all

<?php

$info = getimagesize('http://www.google.de/intl/de_de/images/logo.gif');

foreach ($info as $key => $value)
{
   echo $value."<br />";
}
?>
You should get a result that is something like

Code: Select all

301
110
1
width="301" height="110"
8
3
image/gif
Anything else indicates getimagesize() is not enabled for remote files. You can use the same script modified for a local image file to see if it is enabled locally. If you don't get a result similar to above, it is also disabled locally.
Moving on, with the wind. | My Corner of the Web

Locked

Return to “[3.0.x] Support Forum”