Problem with ImageMagick path.... Problem with ImageMagick path....
 

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

Problem with ImageMagick path....

Started by jlandi, May 08, 2005, 04:26:02 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jlandi

OOPs wrong forum, could a mod or admin move this..... You would think I would know how these forum things work  ;)

OK, I tried to search for the issue but I can't find anything.

I installed coppermine and everything works GREAT using GD2.x  I have modified my PHP.ini file to allow large uploads but would like to use ImageMagick instead of GD2.x. This is where things go wrong.

First I located ImageMagick "convert", it's located here

-bash-2.05b$ whereis convert
convert: /usr/bin/convert /usr/share/man/man1/convert.1.gz


I login and change "Files and thumbnails advanced settings" to
Method for resizing images      ImageMagick
Path to ImageMagick 'convert' utility (example /usr/bin/X11/)  /usr/bin/
Command line options for ImageMagick  -antialias


Here is what happens next when I try and upload an image.

Image info :

Name test.gif
format gif
size 11.8k
size599x161


Now when I try to upload a image using ImageMagick I get the following errors:

Successful Uploads
1 uploads were successful.

Please click 'Continue' to add the files to albums.

USER:
------------------
Array
(
    [ID] => 5a0714add806e8c0b538488364bc5dae
    [am] => 1
    [search] => ###ffff
    [liv] => Array
        (
            [0] => 33
            [1] => 8
            [2] => 9
            [3] => 11
            [4] => 10
        )

)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_group] => 1
    [user_active] => YES
    [user_name] => ******
    [user_password] => ********
    [user_lastvisit] => 2005-05-08 08:48:17
    [user_regdate] => 2005-04-13 21:35:26
    [user_group_list] =>
    [user_email] =>
    [user_website] => www.fpsadmin.com
    [user_location] => Rhode Island
    [user_interests] =>
    [user_occupation] => site owner
    [user_actkey] =>
    [disk_max] => 0
    [disk_min] => 0
    [can_rate_pictures] => 1
    [can_send_ecards] => 1
    [ufc_max] => 3
    [ufc_min] => 3
    [custom_user_upload] => 0
    [num_file_upload] => 5
    [num_URI_upload] => 3
    [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] => 3
    [group_quota] => 0
    [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) = '***'
    [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 < 1115565673
    [5] => SELECT * FROM cpg132_banned WHERE ip_addr='68.1.187.79' OR ip_addr='68.1.187.79' OR user_id=1
)

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

==========================
POST :
------------------
Array
(
    [URI_array] => Array
        (
            [0] =>
            [1] =>
            [2] =>
        )

    [control] => phase_1
)

==========================
VERSION INFO :
------------------
PHP version: 4.3.10 - OK
------------------
mySQL version: 3.23.58
------------------
Coppermine version: 1.3.2
==========================
Module: gd
------------------
GD Support enabled
GD Version bundled (2.0.28 compatible)
FreeType Support enabled
FreeType Linkage with freetype
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
==========================
Module: mysql
------------------
Active Persistent Links 0
Active Links 1
Client API version 3.23.58
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib/mysql -lmysqlclient 
==========================
Module: zlib
------------------
ZLib Support enabled
Compiled Version 1.2.0.7
Linked Version 1.2.0.7
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | On | 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 | .:/php/includes:/usr/share/php | .:/php/includes:/usr/share/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 | 60 | 60
max_input_time | 60 | 60
upload_max_filesize | 100M | 100M
post_max_size | 8M | 8M
==========================
Page generated in 0.044 seconds - 6 queries in 0.001 seconds - Album set :


Press continue

Now my thumbnail is broken, I choose a name and gallery and press continue again and receive the following:

The previous file could not be placed.

You have successfully placed all the files.


With the following debug info:

USER:
------------------
Array
(
    [ID] => 5a0714add806e8c0b538488364bc5dae
    [am] => 1
    [search] => ###ffff
    [liv] => Array
        (
            [0] => 33
            [1] => 8
            [2] => 9
            [3] => 11
            [4] => 10
        )

)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_group] => 1
    [user_active] => YES
    [user_name] => ********
    [user_password] => ********
    [user_lastvisit] => 2005-05-08 08:48:17
    [user_regdate] => 2005-04-13 21:35:26
    [user_group_list] =>
    [user_email] =>
    [user_website] => www.fpsadmin.com
    [user_location] => Rhode Island
    [user_interests] =>
    [user_occupation] => site owner
    [user_actkey] =>
    [disk_max] => 0
    [disk_min] => 0
    [can_rate_pictures] => 1
    [can_send_ecards] => 1
    [ufc_max] => 3
    [ufc_min] => 3
    [custom_user_upload] => 0
    [num_file_upload] => 5
    [num_URI_upload] => 3
    [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] => 3
    [group_quota] => 0
    [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) = '****'
    [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 < 1115565974
    [5] => SELECT * FROM cpg132_banned WHERE ip_addr='68.1.187.79' OR ip_addr='68.1.187.79' OR user_id=1
    [6] => SELECT category FROM cpg132_albums WHERE aid='9'
)

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

==========================
POST :
------------------
Array
(
    [album] => 9
    [title] => test
    [caption] => test
    [keywords] =>
    [control] => phase_2
    [unique_ID] => 45c778f3
)

==========================
VERSION INFO :
------------------
PHP version: 4.3.10 - OK
------------------
mySQL version: 3.23.58
------------------
Coppermine version: 1.3.2
==========================
Module: gd
------------------
GD Support enabled
GD Version bundled (2.0.28 compatible)
FreeType Support enabled
FreeType Linkage with freetype
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
==========================
Module: mysql
------------------
Active Persistent Links 0
Active Links 1
Client API version 3.23.58
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib/mysql -lmysqlclient 
==========================
Module: zlib
------------------
ZLib Support enabled
Compiled Version 1.2.0.7
Linked Version 1.2.0.7
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | On | 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 | .:/php/includes:/usr/share/php | .:/php/includes:/usr/share/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 | 60 | 60
max_input_time | 60 | 60
upload_max_filesize | 100M | 100M
post_max_size | 8M | 8M
==========================
Page generated in 0.047 seconds - 7 queries in 0.001 seconds - Album set :


Notice: Undefined index: user1 in /home/virtual/site13/fst/var/www/html/gallery/upload.php on line 2146

Notice: Undefined index: user2 in /home/virtual/site13/fst/var/www/html/gallery/upload.php on line 2147

Notice: Undefined index: user3 in /home/virtual/site13/fst/var/www/html/gallery/upload.php on line 2148

Notice: Undefined index: user4 in /home/virtual/site13/fst/var/www/html/gallery/upload.php on line 2149

Notice: Undefined index: OS in /home/virtual/site13/fst/var/www/html/gallery/include/picmgmt.inc.php on line 157

Warning: shell_exec(): Cannot execute using backquotes in Safe Mode in /home/virtual/site13/fst/var/www/html/gallery/include/picmgmt.inc.php on line 171



I assume this has something to do with my ImageMagick path but what am I doing wrong...

Thanks for any help and I hope I included any info that someone could use to help.

Joachim Müller

set method for file uploads to "Single file uploads only" in the groups panel for all relevant groups, with debug mode turned on for everyone to get a more detailed error message.

jlandi

will try that tonight, and post the results

Thanks

jlandi

ok, recieved these errors:

Critical error
The file 'albums/userpics/test~0.gif' can't be inserted in the album

Error executing ImageMagick - Return value: 127

Cmd line :
/usr/bin/convert -quality 80 -antialias -geometry 100x17 'albums/userpics/test~0.gif' 'albums/userpics/thumb_test~0.gif'


The convert program said:


File: /home/virtual/site13/fst/var/www/html/gallery/db_input.php - Line: 304


Notice: Undefined index: user1 in /home/virtual/site13/fst/var/www/html/gallery/db_input.php on line 202

Notice: Undefined index: user2 in /home/virtual/site13/fst/var/www/html/gallery/db_input.php on line 203

Notice: Undefined index: user3 in /home/virtual/site13/fst/var/www/html/gallery/db_input.php on line 204

Notice: Undefined index: user4 in /home/virtual/site13/fst/var/www/html/gallery/db_input.php on line 205

Notice: Undefined index: width in /home/virtual/site13/fst/var/www/html/gallery/db_input.php on line 300

Notice: Undefined index: height in /home/virtual/site13/fst/var/www/html/gallery/db_input.php on line 300

Notice: Undefined index: OS in /home/virtual/site13/fst/var/www/html/gallery/include/picmgmt.inc.php on line 157

Warning: shell_exec(): Cannot execute using backquotes in Safe Mode in /home/virtual/site13/fst/var/www/html/gallery/include/picmgmt.inc.php on line 171


USER:
------------------
Array
(
    [ID] => c48faa7f30094872e3b7d9b50a4d4fc3
    [am] => 1
)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_group] => 1
    [user_active] => YES
    [user_name] => *******
    [user_password] => ********
    [user_lastvisit] => 2005-05-10 07:07:32
    [user_regdate] => 2005-04-13 21:35:26
    [user_group_list] =>
    [user_email] =>
    [user_website] => www.fpsadmin.com
    [user_location] => Rhode Island
    [user_interests] =>
    [user_occupation] => site owner
    [user_actkey] =>
    [disk_max] => 0
    [disk_min] => 0
    [can_rate_pictures] => 1
    [can_send_ecards] => 1
    [ufc_max] => 0
    [ufc_min] => 0
    [custom_user_upload] => 0
    [num_file_upload] => 5
    [num_URI_upload] => 3
    [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] => 0
    [group_quota] => 0
    [can_see_all_albums] => 1
    [group_id] => 1
    [groups] => Array
        (
            [1] => 1
        )

)

==========================
Queries:
------------------
Array
(
   
  • => 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) = '**'
        [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 < 1115726996
        [5] => SELECT * FROM cpg132_banned WHERE ip_addr='70.213.39.225' OR ip_addr='70.213.39.225' OR user_id=1
        [6] => SELECT category FROM cpg132_albums WHERE aid='9'
    )

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

    ==========================
    POST :
    ------------------
    Array
    (
        [album] => 9
        [MAX_FILE_SIZE] => 9216000
        [title] => test
        [caption] => test
        [keywords] =>
        [event] => picture
    )

    ==========================
    VERSION INFO :
    ------------------
    PHP version: 4.3.10 - OK
    ------------------
    mySQL version: 3.23.58
    ------------------
    Coppermine version: 1.3.2
    ==========================
    Module: gd
    ------------------
    GD Support enabled
    GD Version bundled (2.0.28 compatible)
    FreeType Support enabled
    FreeType Linkage with freetype
    GIF Read Support enabled
    GIF Create Support enabled
    JPG Support enabled
    PNG Support enabled
    WBMP Support enabled
    XBM Support enabled
    ==========================
    Module: mysql
    ------------------
    Active Persistent Links 0
    Active Links 1
    Client API version 3.23.58
    MYSQL_MODULE_TYPE external
    MYSQL_SOCKET /var/lib/mysql/mysql.sock
    MYSQL_INCLUDE -I/usr/include/mysql
    MYSQL_LIBS -L/usr/lib/mysql -lmysqlclient 
    ==========================
    Module: zlib
    ------------------
    ZLib Support enabled
    Compiled Version 1.2.0.7
    Linked Version 1.2.0.7
    ==========================
    Server restrictions (safe mode)?
    ------------------
    Directive | Local Value | Master Value
    safe_mode | On | 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 | .:/php/includes:/usr/share/php | .:/php/includes:/usr/share/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 | 60 | 60
    max_input_time | 60 | 60
    upload_max_filesize | 100M | 100M
    post_max_size | 8M | 8M
    ==========================
    Page generated in 0.074 seconds - 7 queries in 0.002 seconds - Album set :

Nibbler


jlandi

Based on my whereis and the path it returns what should the path be?


Tranz


jlandi

 ??? My host tells me it's /usr/bin/  ???


jlandi

Update:
The path was correct the local domain was running in safe mode while the main server was no. I turned safe mode off for that domain and all is working now.