ImageMagick on 1and1

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
pbpatil519
Posts: 5
Joined: 2012-06-27T01:33:21-07:00
Authentication code: 13

ImageMagick on 1and1

Post by pbpatil519 »

Hi

I am trying to install Imagemagick on 1and1 server, but facing following error

cc1: out of memory allocating 408 bytes after a total of 61668524 bytes
make[1]: * [wand/wand_libMagickWand_la-mogrify.lo] Error 1
make[1]: Leaving directory `/homepages/39/d389525088/htdocs/imagemagick'
make: * [all] Error 2
(uiserver):u66440623:~/imagemagick > wand/wand_libMagickWand_la-mogrify.lo]

ImageMagick version is - ImageMagick-6.7.7-9
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: ImageMagick on 1and1

Post by magick »

wand/mogrify is a large source module, we may need to break it up. In the mean-time, compile wand/mogrify.c without optimization. It should compile without complaint.
pbpatil519
Posts: 5
Joined: 2012-06-27T01:33:21-07:00
Authentication code: 13

Re: ImageMagick on 1and1

Post by pbpatil519 »

How can I compile ImageMagick without wand/mogrify.c module?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: ImageMagick on 1and1

Post by magick »

No, compile wand/mogrify.c. Just change its optimization level from 2 to say 1 or 0. Changing the optimization level is compiler dependent. For gcc, you might use -O1 or -O0.
pbpatil519
Posts: 5
Joined: 2012-06-27T01:33:21-07:00
Authentication code: 13

Re: ImageMagick on 1and1

Post by pbpatil519 »

I tried with following command but no luck

./configure CFLAGS=-O1 --disable-openmp --prefix=/kunden/homepages/93/d3563895288/htdocs/imagemagick/

It is still giving me the same error.

Also I only needed convert and composite commands no other commands are needed.

if I try following command from SSH it works

/usr/bin/convert -background none -gravity center -font /kunden/homepages/93/d389525088/htdocs/components/com_virtuemart/shop_image/custom_fonts/arialbd.ttf -fill \#000000 -pointsize 80 label:"YOUR TEXT HERE" /kunden/homepages/93/d389525088/htdocs/components/com_virtuemart/shop_image/output/00cfaf813e76c370631c62f36a8749c3_text.png

But if I try same command using php exec function it doesn't work
can you please help me in this.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: ImageMagick on 1and1

Post by magick »

It looks like you need to increase your memory on the system or perhaps remove a system memory limit if its enforced.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: ImageMagick on 1and1

Post by Bonzo »

Have you checked that Imagemagick is not already installed?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: ImageMagick on 1and1

Post by fmw42 »

Bonzo wrote:Have you checked that Imagemagick is not already installed?
As Bonzo said, many ISPs (and presumably 1&1) have a precompiled IM version available typically at /usr/local/bin or /usr/bin.

Ask your ISP if that is the case. Also other 1&1 users have reported that 1&1 have been willing to help in private installs of IM, though I have no direct confirmation.

If you are planning to run IM under PHP, then you can test for the location of an existing IM by using

<?php
echo "<pre>";
system("type -a convert");
echo "</pre>";
?>


or

<?php
echo "<pre>";
system("which -a convert");
echo "</pre>";
?>
pbpatil519
Posts: 5
Joined: 2012-06-27T01:33:21-07:00
Authentication code: 13

Re: ImageMagick on 1and1

Post by pbpatil519 »

Thank you all of you, it was already installed there. But it was a old version and I was trying to install new one, I manage to do so but I have to change the path of all the commands to my hosting root and the folder we created while installing, hope this will not make any difference.
Instead of using /usr/bin/convert this I used /kunden/homepages/93/d389525088/htdocs/imagemagick/bin/convert and this is working perfectly but I don't know this make any difference or not.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: ImageMagick on 1and1

Post by anthony »

magick wrote:wand/mogrify is a large source module, we may need to break it up. In the mean-time, compile wand/mogrify.c without optimization. It should compile without complaint.
IMv7 CLI development is working to break up the mogrify.c module. using "operation.c".
eventually mogrify.c will be a LOT smaller.

It may be however that operation.c will need to be broken up for similar reasons.

UPDATE: or not!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
leiacg
Posts: 1
Joined: 2012-08-02T15:26:01-07:00
Authentication code: 15

Re: ImageMagick on 1and1

Post by leiacg »

Hi,
I had the same problem in 1and1, they told me that I need a dedicated hosting.... but at the end I used their Imagemagick instalation....
it's available at /kunden/usr/bin and although it works correctly on shell, I had problem when I used it via php...
To solve this problem I use this:

putenv("MAGICK_THREAD_LIMIT=1");

I hope it helps someone
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: ImageMagick on 1and1

Post by Bonzo »

I had somebody ask me about the same problem and the answer posted by leiacg worked for them as well.
BlissDirect
Posts: 9
Joined: 2016-05-06T08:44:15-07:00
Authentication code: 1151

Re: ImageMagick on 1and1

Post by BlissDirect »

Hello,

I know this is an old post. But I am using 1and1 shared hosting and nothing is working for me... I see "leiacg" could make it work.

I am working with the customer support team, since a week now. One agent said you can install the imagemagick with the following steps: "https://help.1and1.com/hosting-c37630/w ... 49013.html". After following the steps, I couldn't find anything on phpinfo(). On asking about that, they mentioned- "Upon checking, You have successfully installed the ImageMagick, that will not show up in phpinfo, since this was not installed in our server's backend, this was installed within you're hosting space. You need to use the path where you installed the ImageMagick so you can use it. " But I have no clue, where should I use path?

But when I asked I want to install imagick extension for PHP they said "Please be informed that to enable PECL, you will need to add this extension “extension=php_imagick.dll” to an existing php.ini or create one if you don't have it yet. You will need to add it on a php.ini in a directory where the domain is pointing to. However, please be reminded that not all php directives can be enabled for it might be a limitation on our server." So I decided to create new php.ini file as requested. But when I started adding extension, I couldn't find php_imagick.dll file in any folder and later when I called over the phone one agent said need to have dedicated server.

Today some other support agent replied "It appears you are trying to run a script that utilizes an Imagemagick module which is not installed on our shared hosting service. Please be advised that installation of Imagemagick via SSH will only let you use the commands to execute within SSH. Unfortunately installation of these extension modules will not be possible if root access is needed."

Can somebody help me. I am badly stuck. I have no clue, what is going on! What is the right way of execution..?

Thanks in advance.
Post Reply