coppermine-gallery.com/forum

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: bit bit spears on August 14, 2004, 11:17:37 AM

Title: watermark script not working anymore
Post by: bit bit spears on August 14, 2004, 11:17:37 AM
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?
Title: Re: watermark script not working anymore
Post by: Nibbler on August 14, 2004, 03:47:52 PM
Path to IM has changed ?
Title: Re: watermark script not working anymore
Post by: bit bit spears on August 14, 2004, 05:12:58 PM
is that what error code 127 means?

that it cannot access imagemagick?
Title: Re: watermark script not working anymore
Post by: kegobeer on August 14, 2004, 05:30:55 PM
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.