Nee hands-on assistance with GD.0.28 setup Nee hands-on assistance with GD.0.28 setup
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Nee hands-on assistance with GD.0.28 setup

Started by JustinofOz, September 12, 2004, 06:00:31 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JustinofOz

Following up on my last regarding uploading .gif images. On your advice I managed to persuade the server to upgrade the version of GD to GD.0.28 (Latest Ver.), and the reply was recieved this morning by emil:

QuoteGD version

GD 2.0.28 is installed in /usr/local/bin
Jacky
OnSmart Network
www.onsmart.net

Ticket Details
=========
Ticket ID: UBQ-99521
Tracking URL: http://www.onsmart.net/support/index.php?_a=tickets&_m=viewmain&email22=justin.will@bigpond.com&ticketkey22=179767
Department: Support
Created On: 06 Sep 2004 08:24 AM
Last Update: 10 Sep 2004 06:14 AM
Status: Open

<ticket no="UBQ-99521"/>

Upon recieving this I proceeded to alter the config to:

Method for resizing images:   Image Magick
Path to ImageMagick 'convert' utility (example /usr/bin/X11/):   ( I typed in: /usr/local/bin/)
Command line options for ImageMagick: -antialias

I also tried: /usr/local/bin/convert

I get the message that the file upload was successful, however the image appears only as a square box with an "X". I went on to attempt to place the image and got the message that the placement was unsuccessful.

My gallery is situated at: http://williamsuniversal.com/Copermine/cpg132/index.php
I have created a user named: tester with the password:  test
The user is an administrator and has an album. The image to upload is located at: C:\WINDOWS\Desktop\WU1-7.gif
I have enabled debug mode for: yes admin only
I have also made the necessary changes to the code as given by Kegobeer in the thread.
Your assistance would be much appreciated.


USER:
------------------
Array
(
   [ID] => 432ee5aa6aa8f3cde4848b56d60b2373
   [am] => 1
   [theme] => fruity
   [liv] => Array
       (
           [0] => 30
           [1] => 42
           [2] => 32
           [3] => 45
           [4] => 44
       )

   [uid] => 1
   [sort] => ta
)

==========================
USER DATA:
------------------
Array
(
   [user_id] => 1
   [user_group] => 1
   [user_active] => YES
   [user_name] => JustinofOz
   [user_password] => ********
   [user_lastvisit] => 2004-09-11 22:59:45
   [user_regdate] => 2004-09-02 21:51:16
   [user_group_list] =>
   [user_email] =>
   [user_website] => http://www.WilliamsUniversal.com
   [user_location] => Banora Point Nthn. NSW Australia
   [user_interests] => Arts, writing, Social commentary, Current affairs, Sport, Recreation. fAVOURED RADIO: All Things Considered (NPR News); ABC News; BBC News; DW Radio
   [user_occupation] => Retired
   [user_actkey] =>
   [disk_max] => 2024
   [disk_min] => 2024
   [can_rate_pictures] => 1
   [can_send_ecards] => 1
   [ufc_max] => 1
   [ufc_min] => 1
   [custom_user_upload] => 1
   [num_file_upload] => 10
   [num_URI_upload] => 10
   [can_post_comments] => 1
   [can_upload_pictures] => 1
   [can_create_albums] => 1
   [has_admin_access] => 1
   [pub_upl_need_approval] => 0
   [priv_upl_need_approval] => 0
   [group_name] => Administrators
   [upload_form_config] => 1
   [group_quota] => 2024
   [can_see_all_albums] => 1
   [group_id] => 1
   [groups] => Array
       (
           [1] => 1
       )

)

==========================
Queries:
------------------
Array
(
   [0] => SELECT extension, mime, content FROM cpg132_filetypes;
   [1] => SELECT * FROM cpg132_users WHERE user_id='1'AND user_active = 'YES' AND user_password != '' AND BINARY MD5(user_password) = '1fc8b96d43c895d7aeeb895db7838b09'
   [2] => SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, MAX(num_URI_upload) as num_URI_upload, MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, MAX(can_create_albums) as can_create_albums, MAX(has_admin_access) as has_admin_access, MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as  priv_upl_need_approval FROM cpg132_usergroups WHERE group_id in (1)
   [3] => SELECT group_name FROM  cpg132_usergroups WHERE group_id= 1
   [4] => DELETE FROM cpg132_banned WHERE expiry < 1094959473
   [5] => SELECT * FROM cpg132_banned WHERE ip_addr='144.138.100.12' OR ip_addr='144.138.100.12' OR user_id=1
   [6] => SELECT category FROM cpg132_albums WHERE aid='20'
)

==========================
GET :
------------------
Array
(
)

==========================
POST :
------------------
Array
(
   [album] => 20
   [title] => TEST
   [caption] =>
   [keywords] =>
   [control] => phase_2
   [unique_ID] => 7dac7932
)

==========================
VERSION INFO :
------------------
PHP version: 4.3.8 - OK
------------------
mySQL version: 4.0.20-standard
------------------
Coppermine version: 1.3.2
==========================
Module: gd
------------------
GD Support enabled
GD Version bundled (2.0.23 compatible)
FreeType Support enabled
FreeType Linkage with freetype
GIF Read Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
==========================
Module: mysql
------------------
Active Persistent Links 2
Active Links 3
Client API version 4.0.20
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib -lmysqlclient  
==========================
Module: zlib
------------------
ZLib Support enabled
Compiled Version 1.1.4
Linked Version 1.1.4
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | Off | Off
safe_mode_exec_dir | no value | no value
safe_mode_gid | Off | Off
safe_mode_include_dir | no value | no value
safe_mode_exec_dir | no value | no value
sql.safe_mode | Off | Off
disable_functions | no value | no value
file_uploads | On | On
include_path | .:/usr/lib/php:/usr/local/lib/php | .:/usr/lib/php:/usr/local/lib/php
open_basedir | no value | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | no value | no value
sendmail_path | /usr/sbin/sendmail -t -i | /usr/sbin/sendmail -t -i
SMTP | localhost | localhost
smtp_port | 25 | 25
==========================
Size and Time
------------------
Directive | Local Value | Master Value
max_execution_time | 30 | 30
max_input_time | -1 | -1
upload_max_filesize | 20M | 20M
post_max_size | 55M | 55M
==========================
Page generated in 0.099 seconds - 7 queries in 0.002 seconds - Album set :


kegobeer

Well, since you're using ImageMagick my mod doesn't even apply.  ImageMagick has always been able to handle GIFs, it was just GD that didn't have GIF support.  Try switching to GD2 in config.

If you use ImageMagick, you'll have to ask your host where it's located and enter the correct path in config.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

JustinofOz

#2
Should I replace the file with your mod with the original?

The location of GD as given by the server is: /usr/local/bin

The error gave me a file and line number, which I found to be referencing the following code:
// JPEG and PNG only are allowed with GD
            } elseif ($imginfo[2] != GIS_JPG && $imginfo[2] != GIS_PNG && ($CONFIG['thumb_method'] == 'gd1' || $CONFIG['thumb_method'] == 'gd2')) {
                @unlink($uploaded_pic);
                cpg_die(ERROR, $lang_errors['gd_file_type_err'], __FILE__, __LINE__, true);


Is there something I need to do here?

kegobeer

I don't think you understand how GD works.  PHP has GD commands built into it, and it knows where the GD library is located.  You (the end user) don't need to know where it's located.  ImageMagick, on the other hand, has no commands built into PHP, so you have to do all image conversion using the command line.

When you did this:

QuoteUpon recieving this I proceeded to alter the config to:

Method for resizing images:   Image Magick
Path to ImageMagick 'convert' utility (example /usr/bin/X11/):   ( I typed in: /usr/local/bin/)
Command line options for ImageMagick: -antialias

you told Coppermine to use ImageMagick to resize your images, and that the convert utility is located in /usr/local/bin.  "Path to ImageMagick 'convert' utility" is exactly that, which isn't related to GD at all.

What that means to you: You select GD2 as the method to resize images in the config settings.  If your host has done everything correctly, you will now have the ability to use GD and create GIF images.  You also need to follow the instructions in my mod (http://forum.coppermine-gallery.net/index.php?topic=9407.0) to the letter.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

JustinofOz

Thank you Kegobeer for your detailed information. You are correct, I have difficulty understanding some things about programs such as this and php etcccc. It takes someone like you who can understand and who is willing to pass down the info to those of us who don't.

I must get an animated gif uploadable facility available for my members. Thank you again.

kegobeer

I think the next release of GD will have rudimentary animated GIF support, but there isn't any kind of timeline for it.  I haven't seen any web gallery software that handles animated GIFs, otherwise I'd recommend one for you.

Once you mod Coppermine, the animated GIFs may work.  The fullsize pictures should be animated (it's just a straight file transfer), but the thumbnails and intermediate images wouldn't be.  I'm not sure if GD would choke on an animated GIF or if it would just use the first frame.  If it chokes, you could have your members email you their animated GIFs, and you could create the thumbs and intermediate images yourself, then FTP them to your site.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

JustinofOz

Have made all the mods as given, and tried to upload, still got the following error:

QuoteWhen using the GD image library allowed image types are only JPEG and PNG.

File: /home/williams/public_html/Copermine/cpg132/db_input.php - Line: 285


kegobeer

Looks like I missed a file: db_input.php.  Whoops!

In db_input.php:

Find:

global $CONFIG, $lang_bad_words, $queries;

After, add:

// Check for GIF create support >= GD v2.0.28
$gifsupport = 0;
if ($CONFIG['thumb_method'] == 'gd2') {
    $gdinfo = gd_info();
    $gifsupport = $gdinfo["GIF Create Support"];
}

Find:

} elseif ($imginfo[2] != GIS_JPG && $imginfo[2] != GIS_PNG && ($CONFIG['thumb_method'] == 'gd1' || $CONFIG['thumb_method'] == 'gd2')) {

Replace with:

} elseif ($imginfo[2] != GIS_JPG && $imginfo[2] != GIS_PNG && ($CONFIG['thumb_method'] == 'gd1' || ($CONFIG['thumb_method'] == 'gd2' && !$gifsupport))) {


Please report back if any other files give you errors.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots