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.
Scam Warning
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Lucrian
Registered User
Posts: 10
Joined: Sat Apr 19, 2003 12:20 am
Location: Romania
Contact:

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

Post by Lucrian » Sun Jul 15, 2007 3:44 pm

cyfr wrote:I use dreamhost and I dont think its possible for me to change the php.ini so is there any other way? :(
I'm on DreamHost too and I have the same problem. :(

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 Jul 15, 2007 3:46 pm

As you don't have remote getimagesize available, your only real choices are to convince them to enable it, remove the features that use it, or not use phpBB3.
Moving on, with the wind. | My Corner of the Web

Lucrian
Registered User
Posts: 10
Joined: Sat Apr 19, 2003 12:20 am
Location: Romania
Contact:

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

Post by Lucrian » Sun Jul 15, 2007 4:20 pm

We will try.
For all DreamHost customers, please enter at suggestions page (Web Panel -> Home -> Suggestions), search for allow_url_fopen and VOTE FOR IT.

Sorry if this is offtopic, but we want to use all features from phpBB3 :D

muzik3k
Registered User
Posts: 2
Joined: Fri Jul 20, 2007 3:48 pm

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

Post by muzik3k » Fri Jul 20, 2007 4:00 pm

I know this may seem like a dumb question for most of you guys but im pretty new at this stuff and I cant seem to find the php.ini file anywhere on the directory where my message board is installed.

I am using PHBB 3.0, Can anyone guide me in the right directory to find it? thanks

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 » Fri Jul 20, 2007 4:01 pm

The php.ini file is a server configuration file, so you'll need to your webhost to make any changes in it. Some shared hosting accounts also allow you to upload your own custom ones to your document root.
Moving on, with the wind. | My Corner of the Web

User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34452
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

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

Post by A_Jelly_Doughnut » Fri Jul 20, 2007 5:12 pm

Since this has not been mentioned in the topic, the restriction (on avatars, at least), will be removed in RC4.
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish

muzik3k
Registered User
Posts: 2
Joined: Fri Jul 20, 2007 3:48 pm

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

Post by muzik3k » Fri Jul 20, 2007 9:30 pm

So pretty much for all of us using dreamhost, we are out of luck??

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 » Fri Jul 20, 2007 9:31 pm

There have been some fixes checked in that may help you, but you'll probably have to wait and see :D
Moving on, with the wind. | My Corner of the Web

User avatar
Jhong
Registered User
Posts: 538
Joined: Thu Aug 10, 2006 6:53 pm
Location: In a theme sandwich
Contact:

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

Post by Jhong » Sat Jul 21, 2007 9:55 am

iWisdom wrote:The php.ini file is a server configuration file, so you'll need to your webhost to make any changes in it. Some shared hosting accounts also allow you to upload your own custom ones to your document root.
Just a note -- the custom php.ini usually has to be in the same directory as the calling script -- it doesn't apply recursively (at least, on any hosts I have used, it doesn't).
phpBB<->WordPress Integration: www.wp-united.com

Samuelsan
Registered User
Posts: 15
Joined: Thu Nov 10, 2005 4:02 pm

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

Post by Samuelsan » Sun Jul 22, 2007 8:09 pm

Using this:

Code: Select all

<?php

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

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

?>
Outputs this:

Code: Select all

301
110
1
width="301" height="110"
8
3
image/gif
PHP Information shows:

Code: Select all

allow_url_fopen On
It's on, and getimagesize() works, yet I still get the error, "It was not possible to determine the dimensions of the image". Any ideas?

User avatar
Jhong
Registered User
Posts: 538
Joined: Thu Aug 10, 2006 6:53 pm
Location: In a theme sandwich
Contact:

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

Post by Jhong » Sun Jul 29, 2007 3:17 am

Is the error for the same image (i.e., Google.com)? I found that I got the "Could not determine" error for any URLs that had query strings in them. At that point, I just gave up and have turned the option off.
phpBB<->WordPress Integration: www.wp-united.com

cyb0rg
Registered User
Posts: 177
Joined: Thu Aug 02, 2007 12:03 am

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

Post by cyb0rg » Sun Aug 05, 2007 2:28 am

Ive had it in RC4 :(

Then it went away, now its just happened again.

User avatar
videoarab
Registered User
Posts: 113
Joined: Thu Apr 28, 2005 6:32 pm

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

Post by videoarab » Thu Aug 16, 2007 2:13 am

same issue, using phpBB3 RC4
It was not possible to determine the dimensions of the image.

my php.ini setting:

allow_url_fopen
  • Local Value = On
    Master Value = On


any suggestions / help

peter1234
Registered User
Posts: 2
Joined: Tue Aug 14, 2007 3:40 pm

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

Post by peter1234 » Tue Aug 21, 2007 2:53 pm

Jhong wrote:Many servers have allow_url_fopen switched off.

A quick workaround is to use cURL to fetch the image and check the size. The mod is as follows:
Thanks a lot!!!! This works :D
I wonder why the PHPBB team made it work in PHPBB2 and not in PHPBB3 ?

jstreasures
Registered User
Posts: 1
Joined: Thu Aug 23, 2007 4:41 am
Location: Cedar Rapids, Iowa
Contact:

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

Post by jstreasures » Thu Aug 23, 2007 4:51 am

Jhong wrote:Many servers have allow_url_fopen switched off.

A quick workaround is to use cURL to fetch the image and check the size. The mod is as follows:

OPEN: /includes/message_parser.php

FIND:

Code: Select all

			if ($stats === false)
			{
AFTER, ADD:

Code: Select all

				if (function_exists('curl_exec'))
				{
					$c_img = curl_init();
					$c_timeout = 8; //The timeout, in seconds. You may want to change this
					$c_max_filesize = 64000; //The max file size loaded into memory
					curl_setopt($c_img, CURLOPT_URL, $in);
					curl_setopt($c_img, CURLOPT_RETURNTRANSFER, 1);
					@curl_setopt($c_img, CURLOPT_BUFFERSIZE, $c_max_filesize);
					curl_setopt($c_img, CURLOPT_CONNECTTIMEOUT, $c_timeout);
					curl_setopt($c_img, CURLOPT_FOLLOWLOCATION,1);
					$grabbed_img = @curl_exec($c_img);
					curl_close($c_img); 
					$stats[0] = $stats[1] = false;
					if ($grabbed_img)
					{
						$grabbed_img = @imagecreatefromstring($grabbed_img);
						$stats[1] = @imagesx($grabbed_img);
						$stats[0]= @imagesy($grabbed_img);
						unset($grabbed_img, $c_img);
					}
					if (!$stats[0] || !$stats[1])
					{
						$stats = false;
					}
				}
			}
			if ($stats === false)
			{			
Save the file, and the problem should go away. I've tried hard to choose settings in order to prevent the server loading ahuge image into memory by accident, but it may need some tweaking.
This is the fix that worked for me... simple, easy, and straight forward. Thank you for sharing this work-around!!!

JSTreasures
Men and fish are alot alike... the both get into trouble when they open their mouths!

MidwestAnglers.com

Locked

Return to “[3.0.x] Support Forum”

Who is online

Users browsing this forum: No registered users and 58 guests