Imagemagick

Discussion in 'Install/Configuration' started by avio, Feb 20, 2009.

  1. avio

    avio New Member

    Hi,

    Does anyone have a clue as to how to compile Imagemagick with Litespeed on a cPanel server? I've recompiled PHP using Apache's configuration from the WHM plugin but imagemagick does not seem to work like it does with Apache.

    Any help would be appreciated.

    Thank you.
  2. Tony

    Tony Member

    imagemagick is a binary (/usr/bin/convert) and is never compiled into PHP. On a cPanel server you can run /scripts/installimagemagick to install it.
  3. avio

    avio New Member

    I've already ran that command /scripts/installimagemagick but it does not work on the litespeed webserver.
  4. Tony

    Tony Member

    What does not work about it? It's a binary and lsws has nothing to do with it as it's just a web server. My best guess is you have openbase_dir enabled and there is no access to /usr/bin . So you can either modify the vhost template or remove the protection for that domain to solve it.
  5. avio

    avio New Member

    I've had openbase_dir enabled on apache as well, but it works fine. I know imagemagick is a binary, but it works on Apache 2 and not on Litespeed...
  6. Tony

    Tony Member

    I am asking again what does not work about it. You have yet to explain that.

    Having openbase_dir enabled on Apache does not mean a whole lot if you're not running PHP as an Apache module. If you were running suPHP or FastCGI then you did not have the protection as it's not supported.


    Oh it works fine for us on every machine we have. A user calls it with a system call and it's never done via php directly or by the web server.

    system("/usr/bin/convert commands");
  7. mistwang

    mistwang LiteSpeed Staff

    You can try increase the memory limit for lsphp5 external app.
    Maybe your user were trying to process a large file?
    Also check /usr/local/apache/logs/stderr.log for related errors.
  8. avio

    avio New Member

    vBulletin does not recognize the path /usr/bin/ when on Litespeed, does not generate CAPTCHA images (displays a broken image).
  9. Tony

    Tony Member

    Disable openbase_dir on the account in question vbulletin is unable to access the /usr/bin folder. I can only assume previously your php setup with Apache did not support the directory protection which is why it worked.

    You could also alternatively use GD instead of imagemagick.
  10. mistwang

    mistwang LiteSpeed Staff

    Yes, I think suphp does not honor the open_basedir protection.
  11. avio

    avio New Member

    1. Imagemagick is not being read by vBulletin, it is unable to detect imagemagick. The path is set as /usr/bin/convert

    2. Running command /usr/bin/convert in SSH shows imagemagick is installed.

    3. Switching between Litespeed and Apache, works fine on Apache but not on Litespeed vbulletin is able to generate images and read the /usr/bin/convert path on Apache.

    4. There is no openbase_dir option in litespeed to disable, and I cannot find the vhost to modify and remove manually for the domain name. Disabling it from WHM doesn't make a difference.

    I hope that explains to you what is "not" working. Any further help is appreciated.
  12. anewday

    anewday Moderator

    Perhaps you should PM a temp root login for mistwang to take a look. :)
  13. mistwang

    mistwang LiteSpeed Staff

    I think openbase_dir is the problem, just load a phpinfo() page see if openbase_dir is there?
    You can edit the httpd.conf directly to comment out the openbase_dir configuration for that vhost.
  14. Tony

    Tony Member

    Also worth noting for vbulletin the path they want is /usr/bin not the path to the actual binary.
  15. avio

    avio New Member

    Thank you Tony! That solved it :)

Share This Page