Hi,

I can run ./mogrify from a telnet session but when I run from php (see below) I get the following...

ERROR: exec() error: /usr/local/etc/httpd/cgi-bin/ImageMagick-5.4.9/bin/mogrify: Memory allocation failed (unable to allocate cache nexus_info) [Cannot allocate memory].

<?
$cmd = "/usr/local/etc/httpd/cgi-bin/ImageMagick-5.4.9/bin/mogrify -resize 100x100 1500.jpg 2>&1";

exec($cmd, $exec_output, $exec_retval);

if( $exec_retval > 0)
{
print "ERROR: exec() error: $exec_output[0]";
}
else
{
print "Image was resized";
}
?>

    This could easily be a permissions thing. Cannont allocate memory meaning not allowed instead of unable.

      I agree but..

      magick.php is running from a directory with chmod 777.

      Where do you think I should be looking for a permissions issue?

      Thanks.

        Thanks for the suggestion. I just copied mogrify to my test directory and it worked.

        ONE LAST QUESTION ...

        My mogrify is 1.2 Meg. Is that normal? I'm wondering if it can/should be made smaller and if so, how?

        Thanks.

          Write a Reply...