hey something's wrong :o
my hosting comp. recently switched servers, and now instead of displaying an image, this script just gives a "127" error :(!
can you all help?
http://www.tangiblebrit.com/divine/test.php?pid=5788
here is that script's code:
<?
define('IN_COPPERMINE', true);
require('include/init.inc.php');
header('Content-Type: image/jpeg');
header('Content-Disposition: inline; filename=file.jpg');
$pid = $_REQUEST["pid"];
$mode = $_REQUEST["mode"];
$sql = "SELECT * FROM ".$CONFIG['TABLE_PREFIX']."pictures WHERE pid=$pid";
$db = mysql_connect($CONFIG['dbserver'], $CONFIG['dbuser'], $CONFIG['dbpass']);
mysql_select_db($CONFIG['dbname'], $db);
$result = mysql_query($sql, $db);
$row = mysql_fetch_array($result);
$pic_prefix = array(
'thumb' => $CONFIG['thumb_pfx'],
'normal' => $CONFIG['normal_pfx'],
'fullsize' => ''
);
$cmd = "{$CONFIG['impath']}composite -compose over -gravity Southeast \"".realpath("./watermark.png")."\" \"".realpath('./'.$CONFIG["fullpath"].$row["filepath"].$pic_prefix[$mode].$row["filename"])."\" jpg:-";
passthru ($cmd, $output);
echo $output;
?>
it worked fine before the switch, what could have happened?
Path to IM has changed ?
is that what error code 127 means?
that it cannot access imagemagick?
It means file not found. Either your host removed ImageMagick or they put it in a new location. Contact them and they'll give you the new path.