[solved] segmentation fault

#1
i have a very simple php file making an EXEC call...which creates file /tmp/vbOxXdeL


works:
/usr/local/lsws/fcgi-bin/lsphp5 /home/file.php

does not work:
domain.com/file.php

note: the above "works" if done through port 8080 through apache


php snippet:
PHP:
<?php
$command = "/usr/local/bin/convert '/home/user/html/images/regimage/backgrounds/background2.jpg' -resize 201x61! -swirl 23 -rotate 180 -font '/home/user/html/images/regimage/fonts/HECK.TTF' -pointsize 32 -fill 'rgb(62,195,134)' -annotate 0x0+10+37 v -font '/home/user/html/images/regimage/fonts/HECK.TTF' -pointsize 32 -fill 'rgb(62,195,134)' -annotate 0x0+42+45 B -font '/home/user/html/images/regimage/fonts/HECK.TTF' -pointsize 32 -fill 'rgb(62,195,134)' -annotate 0x0+71+45 u -font '/home/user/html/images/regimage/fonts/HECK.TTF' -pointsize 32 -fill 'rgb(62,195,134)' -annotate 0x0+100+45 l -font '/home/user/html/images/regimage/fonts/HECK.TTF' -pointsize 32 -fill 'rgb(62,195,134)' -annotate 0x0+125+41 l -font '/home/user/html/images/regimage/fonts/HECK.TTF' -pointsize 32 -fill 'rgb(62,195,134)' -annotate 0x0+160+40 e -font '/home/user/html/images/regimage/fonts/HECK.TTF' -pointsize 32 -fill 'rgb(62,195,134)' -annotate 0x0+185+34 t -font '/home/user/html/images/regimage/fonts/HECK.TTF' -pointsize 32 -fill 'rgb(62,195,134)' -annotate 0x0+213+43 i -font '/home/user/html/images/regimage/fonts/HECK.TTF' -pointsize 32 -fill 'rgb(62,195,134)' -annotate 0x0+241+47 n -flatten -stroke black -strokewidth 1 -fill none -draw 'rectangle 0,60 200,0' -depth 8 PNG:'/tmp/vbOxXdeL' 2>&1";

exec($command);

?>

Error:
Code:
2011-11-06 05:15:45.609 [STDERR] sh: line 1: 18818 Segmentation fault      (core dumped) /usr/local/bin/convert '/home/user/html/images/regimage/backgrounds/background2.jpg' -resize 201x61! -swirl 23 -rotate 180 -font '/home/user/html/images/regimage/fonts/HECK.TTF' -pointsize 32 -fill 'rgb(62,195,134)' -annotate 0x0+10+37 v -font '/home/user/html/images/regimage/fonts/HECK.TTF' -pointsize 32 -fill 'rgb(62,195,134)' -annotate 0x0+42+45 B -font '/home/user/html/images/regimage/fonts/HECK.TTF' -pointsize 32 -fill 'rgb(62,195,134)' -annotate 0x0+71+45 u -font '/home/user/html/images/regimage/fonts/HECK.TTF' -pointsize 32 -fill 'rgb(62,195,134)' -annotate 0x0+100+45 l -font '/home/user/html/images/regimage/fonts/HECK.TTF' -pointsize 32 -fill 'rgb(62,195,134)' -annotate 0x0+125+41 l -font '/home/user/html/images/regimage/fonts/HECK.TTF' -pointsize 32 -fill 'rgb(62,195,134)' -annotate 0x0+160+40 e -font '/home/user/html/images/regimage/fonts/HECK.TTF' -pointsize 32 -fill 'rgb(62,195,134)' -annotate 0x0+185+34 t -font '/home/user/html/images/regimage/fonts/HECK.TTF' -pointsize 32 -fill 'rgb(62,195,134)' -annotate 0x0+213+43 i -font '/home/user/html/images/regimage/fonts/HECK.TTF' -pointsize 32 -fill 'rgb(62,195,134)' -annotate 0x0+241+47 n -flatten -stroke black -strokewidth 1 -fill none -draw 'rectangle 0,60 200,0' -depth 8 PNG:'/tmp/vbOxXdeL' 2>&1
 
Last edited:
#2
problem solved.

raised

Memory Soft Limit (bytes) - 1250M
Memory Hard Limit (bytes) - 1500M

imagemagick would not work with ANYTHING less than that.
 
Top