Page 3 of 4

Re: Automatic Thumnail creation doesnt work

Posted: 30 Jul 2008, 16:47
by RichardGase
Hello there.
I spend hole day on this issue. Besides that it's important that for the GD library how php is compiled and how it's written. JPEG and JPG format seems to be not to easy. Only when I do a multi add and upload from without phoca gallery DIR and then create the image and thumbnail it functions with a error! Then you have to stop the autamatic thumbnail creation and set it back again to upload the next picture. Altough it gives a error ONE thumnail and picture ar uploaded correctley. The single upload gives the fatal error line and in the multi upload you get a joomla like error screen. I have some printscreens of this phenomenon, may I could sent them to Phoca if you wish to see them. Maybe this will lead to a solution. I have a workaround now, but it is (to) time consuming. I like your product very much, i think it's worth investing some time in it.

Please let me know if this is any help.

Greetings Richard.

Information from the PHP site: http://nl3.php.net/manual/en/image.installation.php
Installation

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.

Enhance the capabilities of GD to handle more image formats by speci\ying the --with-XXXX configure switch to your PHP configure line.
Supported image formats Image Format Configure Switch
jpeg-6b To enable support for jpeg-6b add --with-jpeg-dir=DIR.
png To enable support for png add --with-png-dir=DIR. Note, libpng requires the zlib library, therefore add --with-zlib-dir[=DIR] to your configure line.
xpm To enable support for xpm add --with-xpm-dir=DIR. If configure is not able to find the required libraries, you may add the path to your X11 libraries.

Note: When compiling PHP with libpng, you must use the same version that was linked with the GD library.

Enhance the capabilities of GD to deal with different fonts by specifying the --with-XXXX configure switch to your PHP configure line.
Supported font libraries Font library Configure Switch
FreeType 1.x To enable support for FreeType 1.x add --with-ttf[=DIR].
FreeType 2 To enable support for FreeType 2 add --with-freetype-dir=DIR.
T1lib To enable support for T1lib (Postscript Type 1 fonts) add --with-t1lib[=DIR].
Native TrueType string function To enable support for native TrueType string function add --enable-gd-native-ttf.


add a note add a note User Contributed Notes
Installation
mike at clove dot com
18-Apr-2008 06:40
jpeg [jpg] file processing doesn't work unless you build php with '--with-jpeg-dir=<path to jpeg library>'.

It still doesn't work unless <path to jpeg library> points to the directory holding the directory holding the library unless libjpeg.<whatever> is in either /usr/lib or /usr/local/lib. For instance, on a mac with libjpeg.a installed via mac ports, you need '/opt/local' rather than '/opt/local/lib'

Re: Automatic Thumnail creation doesnt work

Posted: 31 Jul 2008, 00:19
by RichardGase
Hello Fred,
After a hole day searching for a solution I found something more! It is not only the file size that's important! The the fatal error we experience on line 881 comes because of the PIXEL size of the photo. When you adjust your pixel size to a max of 1024 x ..... Keep the aspect ratio you don't get the fatal error anymore. Then indeed you will see that a thumbnail is made and you will get a fault message that the systems GD library can't handle JPEG's. BUT when you click the link GO BACK TO THE GALLERY you will see that the thumbnail is made like it should. When you upload more than one at a time you have to click the GO BACK... link for each uploaded photo but it will work! So it functions with a small hickup.
All your pics must be pixel downsized to 1024 x .... , so no photo's direct out of the camera can be uploaded. As long as there are pictures in the images/phocagallery directory that exceed the max pixel amount you get the fatal error when you want to do a direct upload from that location.

When a new uploaded photo comes on the second page then the thumbnail creation screen and it's fault message will be there, it seems likes nothing has happend but look into the second page to click the GO BACK TO ... link.
Greetings, Richard

PS I tested some more and 1280x 1707 pixels is also accepted with quality on high, so you wil get a beautiful picture full screen!

Re: Automatic Thumnail creation doesnt work

Posted: 31 Jul 2008, 21:25
by tess63
Many thanks to all of you for helping solve this thumb problem. Simply resizing all the photos to 800 x 600 allows the creation of thumbnails automatically which is much less time consuming than doing it manually. Wish I'd worked it out months ago... :)

Re: Automatic Thumnail creation doesnt work

Posted: 08 Oct 2008, 17:32
by Jan
Hi, all this problems depend on your GD library and RAM... Phoca sends only information into GD library, so GD creates the thumbnails.... see your GD and PHP settings ...

Re: Automatic Thumnail creation doesnt work

Posted: 09 Oct 2008, 12:13
by Jan
Sorry I don't have any idea, I installed xampp so everything was included (no problems there) I have never set some GD settings ... it is here and works...

you should know ... e.g. if all GD functions are here ... see php info, e.g. Go to Joomla! administrator and see Help - Info - PHP info... should know if there are some restriction on php e.g. regarding function ini_set (which can increase a php memory for creating thumbnails, etc...)

Re: Automatic Thumnail creation doesnt work

Posted: 11 Oct 2008, 22:51
by bers
I found a solution on the Joomla forums that solved both the Thumnail creation problem and the Fatal Error: Allowed memory size...exhausted...
The problem was the memory size settings in the index.php files in Joomla.


"Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 6144 bytes) in C:\AppServ\www\joomla-1.0.14\administrator\includes\menubar.html.php on line 463"

Solution:

Added the line: “ini_set('memory_limit','40M');” (make it the second line in the file (just below “<?php”))in the following files:

index.php and the index2.php file in the main Joomla root folder, AND,
to the index.php, index2.php, and the index3.php (if you have a 2 and 3) files under the Administrator folder which is under the root folder

Used FTP (FileZilla) Client: dragged file from rightside to “desktop” on left side; rt clk on desktop>open with Notepad; add line; save; then drag back to original file on rightside and overwrite. You may be able to just right click the file on the rightside (server) and edit. For some reason I have to open it from my local hard drive to edit in Notepad.

the "40M" in the new added line is the memory size limit listed in my php info under Joomla backend "help". You can make it a different number.

After these changes I could now access my "Images" (gallery), upload in frontend, and create thumbnails. :|

Bers

Re: Automatic Thumnail creation doesnt work

Posted: 13 Oct 2008, 12:14
by Jan
It is great if it works for you, but I have no idea how this can change the thumbnail creation, because before thumbnail creation, there is:

Code: Select all

// Try to increase memory
if ($memory < 50) {
   ini_set('memory_limit', '50M');
$memoryLimitChanged = 1;
}
???
please let me know the link to this topic, thank you, Jan

Re: Automatic Thumnail creation doesnt work

Posted: 25 Oct 2008, 15:27
by Jan
maybe there are other problems with GD, maybe there are some other server limits ???

Re: Automatic Thumnail creation doesnt work

Posted: 24 Jan 2009, 23:35
by webansvarlig
This worked for me. I needed to set the limit to 70Mb

Thanks for a great component.

One wish for the future:
The settings page is a bit long and not to organized. Some components uses tabs. Is that a solution?

Re: Automatic Thumnail creation doesnt work

Posted: 26 Jan 2009, 13:47
by bowmen
Hello,

the Thumbnailcreation works fine, but the described error occurs while loading the pictures in the backend.
I know, i have very much pictures in the gallery and in my opinion the mistake is the missing pagination in this pictureview in the backend.

Is there a switch everywhere where I can turn the pagination in the backend pictureview on?

Steffen