php forum
php mysql forum
php mysql smarty
 
Topic Options
#284213 - 03/12/05 10:26 PM "Check Image" help
PredatorMasters Offline
Newbie

Registered: 03/12/05
Posts: 12

   "Check Image" help to Del.icio.us Add to del.icio.us
  Digg "Check Image" help Digg it
I'm not sure if I'm suppose to be posting in here or not since I'm not a developer.<br />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.<br />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.<br /><br />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.<br /><br /> [:"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 [/] <br /><br />Any suggestions? I feel like I'm hounding our host to death so I thought I'd come here first.<br />Thanks people <img src="http://www.ubbdev.com/forum/images/graemlins/grin.gif" alt="" />

Top
#284214 - 03/12/05 10:37 PM Re: "Check Image" help [Re: seaman_staines]
scroungr Offline
Old Hand

Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
you mean this mod?<br /><br />http://www.ubbdev.com/forum/showflat.php/Number/124272<br /><br /><br /> I think the problem is that getimagesize() expects a valid path into the filesystem, so most probably you should use something like:<br /><br />getimagesize('/home/whoever/public_html/images/filename');<br /><br />this line here<br /><br /> $imagesunique[] = "http" . $out[$n]['2'] . "." . $out[$n]['3'];<br /><br /><br />may need to actually be rewritten to I would send Anno a PM
_________________________
Couchtomatoe - www.couch-tomatoe.cc
My abilities are for hire for installs, upgrades, custom themes and custom modifications.

Top
#284215 - 03/12/05 11:30 PM Re: "Check Image" help [Re: 234234]
PredatorMasters Offline
Newbie

Registered: 03/12/05
Posts: 12
Yeah, that's the one scroungr, thanks.<br />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?<br /><br />Your dealing with an idiot here, sorry.
_________________________
Jim

Top
#284216 - 03/12/05 11:52 PM Re: "Check Image" help [Re: seaman_staines]
scroungr Offline
Old Hand

Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
I usually handle getimagsize using a path on the server... you can use it remotely but its dependent on the server you are on..
_________________________
Couchtomatoe - www.couch-tomatoe.cc
My abilities are for hire for installs, upgrades, custom themes and custom modifications.

Top
#284217 - 03/12/05 11:58 PM Re: "Check Image" help [Re: 234234]
PredatorMasters Offline
Newbie

Registered: 03/12/05
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. <br />Did you delete it?

Top
#284218 - 03/13/05 12:01 AM Re: "Check Image" help [Re: seaman_staines]
scroungr Offline
Old Hand

Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
not I <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" /> I would like to see the error log to see exactly what it says though <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />
_________________________
Couchtomatoe - www.couch-tomatoe.cc
My abilities are for hire for installs, upgrades, custom themes and custom modifications.

Top
#284219 - 03/13/05 12:04 AM Re: "Check Image" help [Re: 234234]
PredatorMasters Offline
Newbie

Registered: 03/12/05
Posts: 12
http://www.predatormastersforums.com/ubbthreads/ubbthreads.php <br /><br />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.

Top
#284220 - 03/13/05 12:31 AM Re: "Check Image" help [Re: seaman_staines]
scroungr Offline
Old Hand

Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
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..
_________________________
Couchtomatoe - www.couch-tomatoe.cc
My abilities are for hire for installs, upgrades, custom themes and custom modifications.

Top
#284221 - 03/13/05 12:49 AM Re: "Check Image" help [Re: 234234]
scroungr Offline
Old Hand

Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
make a test.php file and put this in it<br /><br /><?php<br />$alpha = getimagesize('http://www.foxnews.com/images/156920/14_28_031205_nichols7.jpg');<br />print_r($alpha);<br />?><br /><br />see what you get if that fails your particular server does not have the image module in php installed
_________________________
Couchtomatoe - www.couch-tomatoe.cc
My abilities are for hire for installs, upgrades, custom themes and custom modifications.

Top
#284222 - 03/13/05 12:50 AM Re: "Check Image" help [Re: 234234]
PredatorMasters Offline
Newbie

Registered: 03/12/05
Posts: 12
ok, I'll have to get it from my webmaster since I steer clear of the directorys. lol<br />I appreciate your replys.

Top
#284223 - 03/13/05 12:54 AM Re: "Check Image" help [Re: seaman_staines]
scroungr Offline
Old Hand

Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
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...
_________________________
Couchtomatoe - www.couch-tomatoe.cc
My abilities are for hire for installs, upgrades, custom themes and custom modifications.

Top
#284224 - 03/13/05 01:00 AM Re: "Check Image" help [Re: 234234]
PredatorMasters Offline
Newbie

Registered: 03/12/05
Posts: 12
Can do...<br />I'll give it a whirl, thanks.

Top
#284225 - 03/17/05 10:25 PM Re: "Check Image" help [Re: seaman_staines]
Elkaholic Offline
Newbie

Registered: 03/14/05
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. <br /> <br />Thsi is an error message that it gives. <br />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 <br /> <br />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? <br /> <br />


Edited by Elkaholic (03/17/05 11:03 PM)

Top
#284226 - 03/18/05 02:56 AM Re: "Check Image" help [Re: jgohring]
scroungr Offline
Old Hand

Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
IF the image module in PHP is not loaded getimagesize() won;t work.
_________________________
Couchtomatoe - www.couch-tomatoe.cc
My abilities are for hire for installs, upgrades, custom themes and custom modifications.

Top
#284227 - 03/18/05 12:23 PM Re: "Check Image" help [Re: 234234]
Elkaholic Offline
Newbie

Registered: 03/14/05
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 <br />Also the test link<br />PM Test getimagesize<br /><br />Here is a test link on my site for comparison. It works on my site!<br /><br />Other Test getimagesize<br /><br />Also another link to a site where we have chated about this with Anno Anno Conversation<br /><br />I think the problem is elsewhere, in the config of PHP or in the Server Config, but can not find it. Still looking though.

Top
#284228 - 03/18/05 04:33 PM Re: "Check Image" help [Re: jgohring]
scroungr Offline
Old Hand

Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
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..<br /><br /><br />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<br /><br />just make sure to chmod the output dirctory to 777<br /><br />let me know what happens


Attachments
126427-gd-test1.zip (3 downloads)

_________________________
Couchtomatoe - www.couch-tomatoe.cc
My abilities are for hire for installs, upgrades, custom themes and custom modifications.

Top
#284229 - 03/18/05 05:36 PM Re: "Check Image" help [Re: 234234]
Elkaholic Offline
Newbie

Registered: 03/14/05
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.<br /><br />Thanks again for your help. <br /><br />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.

Top
#284230 - 03/18/05 06:04 PM Re: "Check Image" help [Re: jgohring]
scroungr Offline
Old Hand

Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
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() <br /> <br />like to use calendar functions like JDDayOfWeek() then you need php configured with the calendar module <br /> <br />heres what php.net says about it.. <br /> <br /> [] 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. <br /> <br />You can use the image functions in PHP to get the size of JPEG, GIF, PNG, SWF, TIFF and JPEG2000 images. <br /> <br /> 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. <br /> <br />Requirements <br /> <br />If you have the GD library (available at http://www.boutell.com/gd/) you will also be able to create and manipulate images. <br /> <br />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. <br /> <br /> 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. <br /> <br />You may wish to enhance GD to handle more image formats. <br /> <br /> 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. <br /> <br /> 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. <br /> <br /> Note: To enable exif support in Windows, php_mbstring.dll must be loaded prior to php_exif.dll in php.ini. <br /> <br />To disable GD support in PHP 3 add --without-gd to your configure line. <br /> <br />Enhance the capabilities of GD to handle more image formats by specifying the --with-XXXX configure switch to your PHP configure line. <br />[/] <br /> <br />http://us3.php.net/manual/en/ref.image.php


Edited by scroungr (03/18/05 06:09 PM)
_________________________
Couchtomatoe - www.couch-tomatoe.cc
My abilities are for hire for installs, upgrades, custom themes and custom modifications.

Top
#284231 - 03/21/05 02:26 PM Re: "Check Image" help [Re: 234234]
Elkaholic Offline
Newbie

Registered: 03/14/05
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.

Top


Moderator:  Gizmo 
Top Posters Last 30 Days
AllenAyres 13
Gizmo 10
willing 2
S7ARBVCK 2
MattUK 1
Kevin H 1
tackaberry 1
Who's Online
1 Registered (Gizmo), 31 Guests and 10 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Noob - need help, or a reality check!
by Gizmo
Yesterday at 03:21 AM
Here I am! Rock me like a Hurricane!
by AllenAyres
09/02/08 03:05 PM
[7.x] Generic Page Outside of forum directory
by Gizmo
08/30/08 05:43 PM
Team UBBDev Rides Again!
by Gizmo
08/28/08 11:45 PM
Multiple Identity Detector
by MattUK
08/28/08 04:10 PM
[7.3.x] ubb.links
by AllenAyres
08/26/08 09:57 AM
Installing FlashChat with 7.3
by Gizmo
08/23/08 05:36 AM
New Mods
Installing FlashChat with 7.3
by Paug
08/23/08 12:14 AM
[7.3.x] ubb.links
by AllenAyres
06/20/08 11:50 PM
[7.2.1] - Naked shoutbox
by sirdude
08/17/07 10:36 PM
[7.x] Generic Page Outside of forum directory
by
01/14/07 10:58 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
Newest Members
veedubb8, twentyseven, Claus1, welcomeback1, Paug
13327 Registered Users

 

 

 
fusionbb message board php hacks