![]() |
Installing GD
Hi, I'm wondering why I get this error.
I'm using a thumbnail class, and it requires GD. I've checked my php.ini and it's already including the php_gd2.dll extention, and I've checked that it exists in the extention folder. So why doesn't it work? :S I use WAMP btw. |
What is the exact error that you're getting? Check with
phpinfo() that the GD module has (or hasn't) been loaded. |
Quote:
Actually it said this: Quote:
Anyways, I've gotten this error: Quote:
|
Are the extensions in php.ini pointing to the correct location?
Are you editing the correct php.ini file? (For me: C:\wamp\Apache2\bin) |
php.ini(in C:\wamp\Apache2\bin)
Quote:
Quote:
|
Btw, this is the thing that is giving the errormsg:
PHP Code:
|
Remove the semicolon from the beginning of that line in your php.ini.
|
Okey! It's working now :D
But now I got this: Quote:
PHP Code:
|
Your JPEG will be too large, no doubt. Or you may be stuck in a loop.
|
Yea but isn't there any way to remove the limit?
Cause some of the images that I need to resize is 4mb-7mb, and that's why I need to resize them, cause they're 2000+ px in width, takes ALOT of time to load!! |
Your current memory (RAM) limit is set to 8MB, you can change the limit using the
memory_limit in your php.ini file. Set it to "numberM", for example 50M would be 50 Megabytes of RAM. |
Ah, I found it ;)
Thanks :D |
Okey, so I had to change this to 120M to be able to view those images.
A simple question, if I were to put up this script on a webhotel, would this be sucking alot of bandwidth? And if it does, would it be better if I were to simply load all the 2000px in width-pictures with no resizing? |
It would not use much bandwidth, but it would be a killer for server resources if needed to be run on the fly... all the time!
How large are the images? 120Mb seems huge, but is definitely plausable. The program isn't storing large amounts of files in arrays is it? |
Okey, the images are around 5-7mb each.
I use this script: http://www.gen-x-design.com/projects...bnailer-class/ Together with an own gallery class. It doesn't store files in an array, it just prints the images out.. eh, you can view the gallery here(without thumbnail script): www.cumulustidning.se/bildbank/index.php It's in swe though, but I think you can find your way around.. |
5-7mb would imply 5-7mb of memory used to manipulate the images. Thus you shouldn't need 120mb of memory available!
Sounds like some bad variable usage if your using that much memory. |
This class comes in both PHP 4 and 5 flavors, but I highly recommend the PHP 5 version, due to the “__destruct()” function that became available in version 5. This helps ensure that you do not inadvertently create memory leaks by forgetting to call the “destruct()” function explicitly, like you must in the PHP 4 version of this script.If you're using PHP4, are you explicitly calling the destruct method? |
Oh, no I haven't called it.. I'll change it and come back to you asap.
Thanks |
Nope it still uses 120.. :S
|
Ok please:
1) Add PHP Code:
2) Before and After every image resize, use the function above and echo the output of it. This should give an indicator of where the problems within your script are. Note: I mean the script you are using to run the class that resizes the image. |
| All times are GMT. The time now is 08:34 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0