Hi,
I'm using the image magic for the image crop and resize. when i was uploaded code to my client server and try to upload the image then error log show me message like "
convert not found "
I use the bellow code in my php file to execute
$convertthumb ="convert ".$path.$fileName." -resize ".$widths." -gravity Center ".$userthumb."";
exec("".$convertthumb."");
error log show me the message
[Tue Jun 03 06:12:18 2014] [error] [client] sh: , referer: http://example.com/users/edit-profile-pic
[Tue Jun 03 06:12:18 2014] [error] [client] convert: not found, referer: http://example.com/users/edit-profile-pic
[Tue Jun 03 06:12:18 2014] [error] [client] , referer: http://example.com/users/edit-profile-pic
convert not found
Re: convert not found
You probably need to specify the full path to convert; run this code to see what it is:
Code: Select all
<?php
echo "<pre>";
system("type convert");
echo "</pre>";
//Alternative method
echo "<pre>";
system('which convert',$path); print_r($path);
echo "</pre>";
?>
Re: convert not found
Hi There,
I have run the code and its show me the out put
convert: not found.
Can you please guide me what should I need to activate or enable the convert function.
I have run the code and its show me the out put
convert: not found.
Can you please guide me what should I need to activate or enable the convert function.
Re: convert not found
I would guess Imagemagick is not installed or not correctly installed.
Check with your hosts and see if it is installed and if not; if they will install it for you.
Check with your hosts and see if it is installed and if not; if they will install it for you.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: convert not found
Bonzo wrote:I would guess Imagemagick is not installed or not correctly installed.
Check with your hosts and see if it is installed and if not; if they will install it for you.
Or ask them where it is installed -- get the path to where it is installed and use that before convert as path2/convert
It may be installed but PHP exec() does not know where that is.