Previous Thread
Next Thread
Print Thread
Rate Thread
#284213 03/12/2005 11:26 PM
Joined: Mar 2005
Posts: 12
Newbie
Newbie
Offline
Joined: Mar 2005
Posts: 12
I'm not sure if I'm suppose to be posting in here or not since I'm not a developer.
We just had the Image Size Restriction Mod installed on our fresh upgrade of threads 6.5 and it seems to snag the over sized pictures fine.
But...it also seems to literally hang while in transition (meaning when the users hits the submit button) on any post while posting an image. Even images small enough to clear the restriction.

I posted a couple of test images looking for an error, and after roughly 8 minutes of waiting for the process, it went through and I copied this off the top of the preview page.

[:"red"]Warning: getimagesize(http://www.championtannery.com/photos/hawk.jpg) [function.getimagesize]: failed to open stream: HTTP request failed! ÔÜþ¿ORÜÜþ¿ÄN1 in /home/.sites/28/site1/web/ubbthreads/checkimages.php on line 88 [/]

Any suggestions? I feel like I'm hounding our host to death so I thought I'd come here first.
Thanks people

Sponsored Links
Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
you mean this mod?

https://www.ubbdev.com/forum/showflat.php/Number/124272


I think the problem is that getimagesize() expects a valid path into the filesystem, so most probably you should use something like:

getimagesize('/home/whoever/public_html/images/filename');

this line here

$imagesunique[] = "http" . $out[$n]['2'] . "." . $out[$n]['3'];


may need to actually be rewritten to I would send Anno a PM

234234 #284215 03/13/2005 12:30 AM
Joined: Mar 2005
Posts: 12
Newbie
Newbie
Offline
Joined: Mar 2005
Posts: 12
Yeah, that's the one scroungr, thanks.
If that part of the script had to be re-written, wouldn't it have been brought up before, or why did you say that?

Your dealing with an idiot here, sorry.


Jim
Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
I usually handle getimagsize using a path on the server... you can use it remotely but its dependent on the server you are on..

234234 #284217 03/13/2005 12:58 AM
Joined: Mar 2005
Posts: 12
Newbie
Newbie
Offline
Joined: Mar 2005
Posts: 12
I made a generic log in in case one of you cared to look it over. The post saying I did so, seems to be gone.
Did you delete it?

Sponsored Links
Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
not I I would like to see the error log to see exactly what it says though

Joined: Mar 2005
Posts: 12
Newbie
Newbie
Offline
Joined: Mar 2005
Posts: 12
http://www.predatormastersforums.com/ubbthreads/ubbthreads.php

Leaving a link to the front door with admin rights makes me a little nervous. I wondered if you's pulled em for some reason. Here it is again.

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
no the errorlog for the php which should be in the directory where you ran the script if the you have it turned on.. it gives alot of useful info and can be attached here..

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
make a test.php file and put this in it

<?php
$alpha = getimagesize('http://www.foxnews.com/images/156920/14_28_031205_nichols7.jpg');
print_r($alpha);
?>

see what you get if that fails your particular server does not have the image module in php installed

Joined: Mar 2005
Posts: 12
Newbie
Newbie
Offline
Joined: Mar 2005
Posts: 12
ok, I'll have to get it from my webmaster since I steer clear of the directorys. lol
I appreciate your replys.

Sponsored Links
Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
actually do what I said last with the test.php file.. you can also put phpinfo(); in that test file and see exactly which modules are loaded...

Joined: Mar 2005
Posts: 12
Newbie
Newbie
Offline
Joined: Mar 2005
Posts: 12
Can do...
I'll give it a whirl, thanks.

Joined: Mar 2005
Posts: 11
Newbie
Newbie
Offline
Joined: Mar 2005
Posts: 11
I am taking over helping Predatormasters problem on the Check Image size function. I have run the test file on there system and on my system and get an error on there system and mine works fine. it must be in the PHP config. They currently have 5.0.3 and on my test site also do. I am going to check both configs and see what might be different, any advice on where it could be, or what might prevent the getimagesize(function) to not work. Thanks in advance.

Thsi is an error message that it gives.
Warning: getimagesize(http://test.haastylcalls.com/test.jpg) [function.getimagesize]: failed to open stream: HTTP request failed! >>@(ã#@(¥HÍÿ¿®0@4Ëÿ¿ ¥H\Ëÿ¿fH@XËÿ¿(¥HÍÿ¿>>@(ã#@(¥HÍÿ¿ù&@ in /home/.sites/28/site1/web/test.php on line 2

Also it does have GD installed, but I found out getimagsize does not depend on it, getimagesize has been around from ver3 to ver5 of php. From Vers 4.3.10 offered url images to be checked for size. Like I said it works on two different site now, just not PM site. Either a config issue or network problem? Any Ideas?


Last edited by Elkaholic; 03/18/2005 12:03 AM.
Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
IF the image module in PHP is not loaded getimagesize() won;t work.

Joined: Mar 2005
Posts: 11
Newbie
Newbie
Offline
Joined: Mar 2005
Posts: 11
Sorry as I stated above the server does have GD working, here is the URl for the phpinfo file, see for yourself, maybe you can tell whats up. PM PHP Info
Also the test link
PM Test getimagesize

Here is a test link on my site for comparison. It works on my site!

Other Test getimagesize

Also another link to a site where we have chated about this with Anno Anno Conversation

I think the problem is elsewhere, in the config of PHP or in the Server Config, but can not find it. Still looking though.

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
okay you are right.. nothing is jumping out at me... the only difference is that yu are running pgp 5.03 and I am still running 4.3.10..


I am enclosing a GD Test program I use from time to time to test alot of the functions in the image package.. load it into the main html directory and run it like http://www.yourdomain.com/gdtest

just make sure to chmod the output dirctory to 777

let me know what happens
Attachments
126427-gd-test1.zip (0 Bytes, 7 downloads)

Joined: Mar 2005
Posts: 11
Newbie
Newbie
Offline
Joined: Mar 2005
Posts: 11
Thanks, will do. I also found out it will work on local files and or local url's but nothing outside the network, do you happen to know if getimagesize uses a different port. seems to be that the stream is lost once getimagesize is called, then no image information is returned. I think the host provider is looking into the logs and network settings.

Thanks again for your help.

I am not trying to contradict what you were saying, but I think getimagesize does not need GD to function. An example would be that I have a local machine with Apache for win32 and PHP 5.0 for win32 and no gd installed, when I run that same test file it returns the image array just fine, no matter where the image is. That said just trying to figure that one out, just curious. Anno also said it was not needed? So do you think is, I am guessing you do. No big deal just thought I would see if anybody knew something about it.

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
no the GD libraries should be but the point is php must be configured with the image module. which it is since I examined the phpinfo()

like to use calendar functions like JDDayOfWeek() then you need php configured with the calendar module

heres what php.net says about it..

[] PHP is not limited to creating just HTML output. It can also be used to create and manipulate image files in a variety of different image formats, including gif, png, jpg, wbmp, and xpm. Even more convenient, PHP can output image streams directly to a browser. You will need to compile PHP with the GD library of image functions for this to work. GD and PHP may also require other libraries, depending on which image formats you want to work with.

You can use the image functions in PHP to get the size of JPEG, GIF, PNG, SWF, TIFF and JPEG2000 images.

Note: Read requirements section about how to expand image capabilities to read, write and modify images and to read meta data of pictures taken by digital cameras.

Requirements

If you have the GD library (available at http://www.boutell.com/gd/) you will also be able to create and manipulate images.

The format of images you are able to manipulate depend on the version of GD you install, and any other libraries GD might need to access those image formats. Versions of GD older than gd-1.6 support GIF format images, and do not support PNG, where versions greater than gd-1.6 and less than gd-2.0.28 support PNG, not GIF. GIF support was re-enabled in gd-2.0.28.

Note: Since PHP 4.3 there is a bundled version of the GD lib. This bundled version has some additional features like alpha blending, and should be used in preference to the external library since its codebase is better maintained and more stable.

You may wish to enhance GD to handle more image formats.

To enable GD-support configure PHP --with-gd[=DIR], where DIR is the GD base install directory. To use the recommended bundled version of the GD library (which was first bundled in PHP 4.3.0), use the configure option --with-gd. GD library requires libpng and libjpeg to compile.

In Windows, you'll include the GD2 DLL php_gd2.dll as an extension in php.ini. The GD1 DLL php_gd.dll was removed in PHP 4.3.2. Also note that the preferred truecolor image functions, such as imagecreatetruecolor(), require GD2.

Note: To enable exif support in Windows, php_mbstring.dll must be loaded prior to php_exif.dll in php.ini.

To disable GD support in PHP 3 add --without-gd to your configure line.

Enhance the capabilities of GD to handle more image formats by specifying the --with-XXXX configure switch to your PHP configure line.
[/]

http://us3.php.net/manual/en/ref.image.php

Last edited by scroungr; 03/18/2005 7:09 PM.
Joined: Mar 2005
Posts: 11
Newbie
Newbie
Offline
Joined: Mar 2005
Posts: 11
Thanks again, I do like all the functions that are available and lib for php. I am now working with the Host to try some configuration issues. It works with local url's but anything outside the server itself it generates errors. Could be a firewall issue or a PHP config issue.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Posts: 70
Joined: January 2007
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)