Imagemagick

#1
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.
 

Tony

Well-Known Member
#2
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.
 

Tony

Well-Known Member
#4
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
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...
 

Tony

Well-Known Member
#6
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");
 

mistwang

LiteSpeed Staff
#7
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
I am asking again what does not work about it. You have yet to explain that.
vBulletin does not recognize the path /usr/bin/ when on Litespeed, does not generate CAPTCHA images (displays a broken image).
 

Tony

Well-Known Member
#9
vBulletin does not recognize the path /usr/bin/ when on Litespeed, does not generate CAPTCHA images (displays a broken image).
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.
 
#11
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.
 

mistwang

LiteSpeed Staff
#13
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.
 
Top