Results 1 to 11 of 11
  1. #1

    Unhappy How detect paths of ImageMagick and test ImageMagick?

    I buy some webhosts from various hosting providers.
    I installed vBulletin on one host and ImageMagick do not work. Hosting provider said ImageMagick is installed. Also I checked phpinfo and sow it is really installed.
    But ImageMagick still do not work!

    So, I need anything to detect real ImageMagick paths, status, components.
    and also I need anything to test ImageMagick if it works or not.

    Please give me any recommendation and testing tools.

  2. #2
    Join Date
    Oct 2004
    Location
    Kerala, India
    Posts
    4,750
    Path to imagemagick binary would be any of these,

    /usr/bin/mogrify
    /usr/bin/convert
    /usr/local/bin/convert
    David | www.cliffsupport.com
    Affordable Server Management Solutions sales AT cliffsupport DOT com
    CliffWebManager | Access WHM from iPhone and Android

  3. #3
    Quote Originally Posted by david510 View Post
    Path to imagemagick binary would be any of these,

    /usr/bin/mogrify
    /usr/bin/convert
    /usr/local/bin/convert
    I tested with vbulletin but, no one works

  4. #4
    Join Date
    Apr 2002
    Location
    Auckland - New Zealand
    Posts
    1,572
    You could detect with a perl script if you can run perl scripts,

    Code:
    #!/usr/bin/perl
    print "content-type:text/html\n\n";
    system('/usr/bin/whereis convert');
    This will output something like

    convert: /usr/bin/convert /usr/local/bin/convert /usr/share/man/man1/convert.1.gz

    The path in this example is either /usr/bin or /usr/local/bin

  5. #5
    Join Date
    Dec 2002
    Location
    chica go go
    Posts
    11,858
    If neither of those work, have you tried switching to GD yet? It might be also be possible that the path to convert is being blocked by an open_basedir restriction, or the php shell_exec(), or system() functions being disabled. At which point, you should just switch to gd since it doesn't depend on executing a binary.

  6. #6
    Quote Originally Posted by Dotable Steve View Post
    You could detect with a perl script if you can run perl scripts,

    Code:
    #!/usr/bin/perl
    print "content-type:text/html\n\n";
    system('/usr/bin/whereis convert');
    This will output something like

    convert: /usr/bin/convert /usr/local/bin/convert /usr/share/man/man1/convert.1.gz

    The path in this example is either /usr/bin or /usr/local/bin
    Thank you, but how do I run this perl script?

    Quote Originally Posted by ub3r View Post
    If neither of those work, have you tried switching to GD yet? It might be also be possible that the path to convert is being blocked by an open_basedir restriction, or the php shell_exec(), or system() functions being disabled. At which point, you should just switch to gd since it doesn't depend on executing a binary.
    Yes, GD works, but I need ImageMagick, as GD is too weak.

  7. #7
    Join Date
    Dec 2002
    Location
    chica go go
    Posts
    11,858
    Have you actually had people get around a GD-based captcha?

    put the perl script in your cgi-bin.

  8. #8
    Quote Originally Posted by ub3r View Post
    Have you actually had people get around a GD-based captcha?

    put the perl script in your cgi-bin.
    Yes, now people are using GD. vBulletin has option you can use ImageMagick or GD. As I sead GD is very weak: don't support many image formats and do not transform images well.

    put the perl script in your cgi-bin
    well, I can put it cgi-bin, but what must be extension? test.perl ? and how do I run it?

  9. #9
    Join Date
    Dec 2002
    Location
    chica go go
    Posts
    11,858
    test.pl chmod 755, access via browser.

  10. #10
    So, I execute file http://www.mydomain.com/cgi-bin/test.pl
    and get result:

    convert: /usr/local/bin/convert /usr/man/man1/convert.1

    Is here any mistake? what does it mean?

  11. #11
    Join Date
    Feb 2005
    Location
    Australia
    Posts
    5,842
    It means your path to imagemagick is /usr/local/bin (already suggested to you in posts #2 and #4).

    To verify that it's working, you could adapt your perl script like this:
    Code:
    #!/usr/bin/perl
    print "content-type:text/html\n\n";
    system("/usr/local/bin/convert -resize '50x50' path/to/existing/image path/to/new/thumbnail 2>&1");
    system('ls path/to/new/thumbnail');
    It should create a new thumbnail image, or show you an error message. (Replace the "path/to" stuff with your real paths, obviously).
    Chris

    "Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •