News:

CPG Release 1.6.28
added submissions from {406man}
cleaned up a few PHP (8.4) deprecations
fixed PHP deprecation in calendar
removed security vulnerability
(please upgrade when possible)

Main Menu

Error executing ImageMagick - Return value: 127

Started by outerverse, October 02, 2003, 02:22:32 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

outerverse

I've been having this problem with Copppermine 1.1d for PHP-Nuke for quite some time.  After talking with my webhost and verifying ImageMagick's path, I still have this error keep poping up.  Also, after checking NukeCops, I've seen that other 1.1d users are having this problem.

I really need to use ImageMagick simply because GD2.X can't create GIF images, and my users use GIF mainly.

The picture 'modules/coppermine/albums/userpics/z.gif' can't be inserted in the album

Error executing ImageMagick - Return value: 127


Also, this message is given for ALL image extensions and not just GIF.

moorey

Ok just a few questions to help you along the way (I don't know the exact solution):

- Are you using Windows server?
- Is the userpics folder's permission set to 777 just to test?
- If the file animated gif? I realise you said it's a problem for other extensions as well

Error 127 is usually related to these issues. Also, do you have permission to run IM?

outerverse

- Linux (RedHat 7.3)
- Already set to 777
- No animation

I should have permission, dunno why my host would install it on my domain and not geive permission.

kegobeer

Please post the results of a phpinfo script on your site.  Also, turn debug mode on and post that.

I'm thinking that you might have an open_basedir restriction in effect.

Do you have any problems using gd to upload images?
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

outerverse

Quotephpinfo()
System
Linux box3.fuitadnet.com 2.4.18-27.7.x #1 Fri Mar 14 06:44:53 EST 2003 i686

Build Date
May 29 2003 18:35:28

Configure Command
'./configure' 'i386-redhat-linux' '--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' '--prefix=/usr' '--with-config-file-path=/etc' '--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=shared' '--with-ncurses' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-mm' '--with-openssl' '--with-png' '--with-pspell' '--with-regex=system' '--with-xml' '--with-expat-dir=/usr' '--enable-xslt=shared' '--with-xslt-sablot=shared,/usr' '--with-sablot-js=shared,/usr' '--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-debugger' '--enable-exif' '--with-pear=/usr/share/pear' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets' '--enable-discard-path' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--without-oci8' '--with-imap=shared' '--with-imap-ssl' '--with-mcrypt=shared' '--with-mhash=shared' '--with-kerberos=/usr/kerberos' '--with-ldap=shared' '--enable-sysvsem=shared' '--enable-sysvshm=shared' '--enable-ftp=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-mbstring' '--with-apxs=/usr/sbin/apxs'

Server API
Apache

Virtual Directory Support
disabled

Configuration File (php.ini) Path
/usr/local/Zend/etc/php.ini

PHP API
20020918

PHP Extension
20020429

Zend Extension
20021010

Debug Build
no

Thread Safety
disabled

Registered PHP Streams
php, http, ftp, https, ftps, compress.bzip2, compress.zlib

Coppermine
The picture 'modules/coppermine/albums/userpics/langrisser_2.gif' can't be inserted in the album

Error executing ImageMagick - Return value: 127


Cmd line :
/home/virtual/black-blade.net/usr/X11R6/binconvert -quality 80 -antialias -geometry 65x100 'modules/coppermine/albums/userpics/langrisser_2.gif' 'modules/coppermine/albums/userpics/thumb_langrisser_2.gif'



The convert program said:



File: /home/virtual/site73/fst/var/www/html/modules/coppermine/db_input.php - Line: 302



Warning: shell_exec(): Cannot execute using backquotes in Safe Mode in /home/virtual/site73/fst/var/www/html/modules/coppermine/include/picmgmt.inc.php on line 141

Coppermine Debug Info
USER:
Array
(
    [ID] => 5f6813e6d48eb68ef54c83fd9a7938c4
    [am] => 1
    [liv] => Array
        (
           
  • => 1
  • [1] => 2
            )

        [search] => Fero
    )

     
    GET :
    Array
    (
        [name] => coppermine
        [file] => db_input
    )

     
    POST :
    Array
    (
        [event] => picture
        [album] => 2
        [MAX_FILE_SIZE] => 1048576
        [title] => Langrisser Elf - Revision 2
        [caption] => Test
        [keywords] =>
        [user1] =>
        [user2] =>
        [user3] =>
        [user4] =>
    )
I see one problem that poped up while running in Debug.  SafeMode.  I have the silly_safe_mode switch turned on.  I'm going to ask my host to turn off SafeMode.

With GD...No problems other than it doesn't create GIFs.

kegobeer

Safe mode will definitely stop Imagemagick from working.  AFAIK, silly safe mode won't work for Imagemagick, just cpg.
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

gtroll

From the old board posted by mitirapa Sat Apr 12, 2003 3:11 pm    Post subject: Fix for imagemagick use
1- verify in the config page if you don't forget the last / or \..
example: C:\ImageMagick\
or /usr/bin/X11/

2- edit picmgmt.inc.php on line 126 replace:

$cur_dir = substr(dirname(__FILE__),0, -8);
$src_file =   '"'.$cur_dir.'\\'.strtr($src_file, '/', '\\').'"';
$im_dest_file = str_replace('%', '%%', ('"'.$cur_dir.'\\'.strtr($dest_file, '/', '\\').'"'));

By

$cur_dir = "";
$src_file =   '"'.strtr($src_file, '/', '\\').'"';
$im_dest_file = str_replace('%', '%%', ('"'.strtr($dest_file, '/', '\\').'"'));


3- edit picmgmtbatch.inc.php on line 129 replace:

$cur_dir = substr(dirname(__FILE__),0, -8);
$src_file =   '"'.$cur_dir.'\\'.strtr($src_file, '/', '\\').'"';
$im_dest_file = str_replace('%', '%%', ('"'.$cur_dir.'\\'.strtr($dest_file, '/', '\\').'"'));

By

$cur_dir = "";
$src_file =   '"'.strtr($src_file, '/', '\\').'"';
$im_dest_file = str_replace('%', '%%', ('"'.strtr($dest_file, '/', '\\').'"'));

outerverse

Didn't work with silly_safe_mode, so I'm going to get Safe Mode turned off and will retry.

outerverse

Thanks fellows!  Getting Safe Mode turned off FINALLY did the trick!