Can't get ImageMagick to work - file path problem? Can't get ImageMagick to work - file path problem?
 

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

Can't get ImageMagick to work - file path problem?

Started by plaskey, June 02, 2005, 05:58:20 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

plaskey

Hi all!

A little background:  I am running Coppermine for the first time on a virtual dedicated server (a hosting service where I have full control over a (virtual) remote server.  The server is running redhat Linux 9.  I have Coppermine up and running but the server only has GD1 installed.  The quality of images created with this version is pretty poor, even with jpeg quality set to 100%.  I am also unable to rotate images.  I tried building and installing GD2, without success.  Next, I switched to ImageMagick.  I was able to build and install IM on the server and it seems to run from the command line.  I cannot get it to work correctly from Coppermine, however.  I have verified and reverified the permissions on my ablums, ablums/edit and albums/userpics directories (all 777).  I have also verified the path to convert (/usr/local/bin/).  From what I have seen, it looks like the server is set up with some odd symlinks to various directories.  The problem may be that the user that Coppermine is running as cannot find files in the right path.  I don't know how to fix it, though.

I am fairly confident that IM is working.  Can anyone help me get IM working with Coppermine?

My URL is:
http://www.danielsbarmitzvah.net

I set up Coppermine for single file uploads and debug.  Here are the results.

The Errors:
Critical error
The file 'albums/userpics/logo.jpg' can't be inserted in the album

Error executing ImageMagick - Return value: 127
Cmd line :
/usr/local/bin/convert -quality 100 -antialias -geometry 96x100 'albums/userpics/logo.jpg' 'albums/userpics/thumb_logo.jpg'

The convert program said:


File: /home/httpd/vhosts/danielsbarmitzvah.net/httpdocs/db_input.php - Line: 305

Notice: Undefined index: user1 in /home/httpd/vhosts/danielsbarmitzvah.net/httpdocs/db_input.php on line 203

Notice: Undefined index: user2 in /home/httpd/vhosts/danielsbarmitzvah.net/httpdocs/db_input.php on line 204

Notice: Undefined index: user3 in /home/httpd/vhosts/danielsbarmitzvah.net/httpdocs/db_input.php on line 205

Notice: Undefined index: user4 in /home/httpd/vhosts/danielsbarmitzvah.net/httpdocs/db_input.php on line 206

Notice: Undefined index: width in /home/httpd/vhosts/danielsbarmitzvah.net/httpdocs/db_input.php on line 301

Notice: Undefined index: height in /home/httpd/vhosts/danielsbarmitzvah.net/httpdocs/db_input.php on line 301

Notice: Undefined index: OS in /home/httpd/vhosts/danielsbarmitzvah.net/httpdocs/include/picmgmt.inc.php on line 157

Warning: Cannot execute using backquotes in safe mode in /home/httpd/vhosts/danielsbarmitzvah.net/httpdocs/include/picmgmt.inc.php on line 171



Debug Info:

USER:
------------------
Array
(
    [ID] => c1a91ab1ff4d0809f7bfc9410c287ed5
    [am] => 1
    [liv] => Array
        (
            [0] => 88
        )

)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_group] => 1
    [user_active] => YES
    [user_name] => admin
    [user_password] => ********
    [user_lastvisit] => 2005-06-02 07:36:02
    [user_regdate] => 2005-06-01 18:59:25
    [user_group_list] =>
    [user_email] =>
    [user_website] =>
    [user_location] => Santa Rosa, California, USA
    [user_interests] =>
    [user_occupation] =>
    [user_actkey] =>
    [disk_max] => 4000000
    [disk_min] => 4000000
    [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] => 4000000
    [can_see_all_albums] => 1
    [group_id] => 1
    [groups] => Array
        (
            [1] => 1
        )

)

==========================
Queries:
------------------
Array
(
    [0] => SELECT extension, mime, content FROM cpg133_filetypes;
    [1] => SELECT * FROM cpg133_users WHERE user_id='1'AND user_active = 'YES' AND user_password != '' AND BINARY MD5(user_password) = 'd36a6a7e6b4731f27e5e0722fbcb58a7'
    [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 cpg133_usergroups WHERE group_id in (1)
    [3] => SELECT group_name FROM  cpg133_usergroups WHERE group_id= 1
    [4] => DELETE FROM cpg133_banned WHERE expiry < '2005-06-02 08:31:57'
    [5] => SELECT * FROM cpg133_banned WHERE ip_addr='12.149.141.14' OR ip_addr='12.149.141.14' OR user_id=1
    [6] => SELECT category FROM cpg133_albums WHERE aid='10'
)

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

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

==========================
VERSION INFO :
------------------
PHP version: 4.2.2 - OK
------------------
mySQL version: 3.23.58
------------------
Coppermine version: 1.3.3
==========================
Module: gd
------------------
module doesn't exist
==========================
Module: mysql
------------------
module doesn't exist
==========================
Module: zlib
------------------
module doesn't exist
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value |  |  |  |  |  |  |  |  |  |  |  |
disable_functions | no value | no value
file_uploads | 1 | 1
include_path | .:/usr/share/pear | .:/usr/share/pear
open_basedir | /home/httpd/vhosts/danielsbarmitzvah.net/httpdocs:/tmp |
==========================
email
------------------
Directive | Local Value | Master Value |  |  |  |  |  |  |  |
==========================
Size and Time
------------------
Directive | Local Value | Master Value
max_execution_time | 30 | 30 |  |  |  |  |  |
==========================
Page generated in 0.064 seconds - 7 queries in 0.002 seconds - Album set :


PHP Info:
PHP Version 4.2.2

System Linux rh9.eng.sw.ru 2.4.20-019stab030.1.777-smp #1 SMP Wed Jul 30 18:47:25 MSD 2003 i686 i686 i386 GNU/Linux
Build Date Aug 16 2003 18:17:55
Configure Command './configure' '--host=i686-pc-linux-gnu' '--build=i686-pc-linux-gnu' '--target=i386-redhat-linux' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--enable-force-cgi-redirect' '--disable-debug' '--enable-pic' '--disable-rpath' '--enable-inline-optimization' '--with-bz2' '--with-db3' '--with-curl' '--with-dom=/usr' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-ttf' '--with-gdbm' '--with-gettext' '--with-ncurses' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-regex=system' '--with-xml' '--with-expat-dir=/usr' '--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-discard-path' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--without-oci8' '--with-pear=/usr/share/pear' '--with-imap=shared' '--with-imap-ssl' '--with-kerberos=/usr/kerberos' '--with-ldap=shared' '--with-mysql=shared,/usr' '--with-pgsql=shared' '--with-snmp=shared,/usr' '--with-snmp=shared' '--enable-ucd-snmp-hack' '--with-unixODBC=shared' '--enable-memory-limit' '--enable-bcmath' '--enable-shmop' '--enable-versioning' '--enable-calendar' '--enable-dbx' '--enable-dio' '--enable-mcal' '--with-apxs2=/usr/sbin/apxs'
Server API Apache 2.0 Filter
Virtual Directory Support disabled
Configuration File (php.ini) Path /etc/php.ini
Scan this dir for additional .ini files /etc/php.d
additional .ini files parsed /etc/php.d/imap.ini,
/etc/php.d/mysql.ini,
/etc/php.d/ldap.ini,
/etc/php.d/odbc.ini,
/etc/php.d/pgsql.ini,
/etc/php.d/snmp.ini
Debug Build no
Thread Safety disabled

________________________________________
Configuration
PHP Core
Directive Local Value Master Value
allow_call_time_pass_reference On On
allow_url_fopen 1 1
always_populate_raw_post_data 0 0
arg_separator.input & &
arg_separator.output & &
asp_tags Off Off
auto_append_file no value no value
auto_prepend_file no value no value
browscap no value no value
default_charset no value no value
default_mimetype text/html text/html
define_syslog_variables Off Off
disable_functions no value no value
display_errors On On
display_startup_errors Off Off
doc_root no value no value
enable_dl On On
error_append_string no value no value
error_log no value no value
error_prepend_string no value no value
error_reporting 2039 2039
expose_php On On
extension_dir /usr/lib/php4 /usr/lib/php4
file_uploads 1 1
gpc_order GPC GPC
highlight.bg #FFFFFF #FFFFFF
highlight.comment #FF9900 #FF9900
highlight.default #0000CC #0000CC
highlight.html #000000 #000000
highlight.keyword #006600 #006600
highlight.string #CC0000 #CC0000
html_errors On On
ignore_user_abort Off Off
implicit_flush Off Off
include_path .:/usr/share/pear .:/usr/share/pear
log_errors Off Off
magic_quotes_gpc On On
magic_quotes_runtime Off Off
magic_quotes_sybase Off Off
max_execution_time 30 30
memory_limit 8M 8M
open_basedir /home/httpd/vhosts/danielsbarmitzvah.net/httpdocs:/tmp

Tranz


kegobeer

http://risearch.org/cgi-bin/forum/forum.cgi/2/271.htm
http://rekudos.net/amavis-stats/node/view/131

This is a safe mode issue with exec and the location of your ImageMagick binaries.

http://www.ozzu.com/ftopic42228.html

You may have success if you do this:

QuoteIi) Include the following line in your php.ini: safe_mode_exec_dir = c:\ImageMagick (or wherever you have installed it).
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