Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: watermark script not working anymore  (Read 2913 times)

0 Members and 1 Guest are viewing this topic.

bit bit spears

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 240
    • TangibleBrit.com
watermark script not working anymore
« 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:
Code: [Select]
<?
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?
Logged

Nibbler

  • Guest
Re: watermark script not working anymore
« Reply #1 on: August 14, 2004, 03:47:52 pm »

Path to IM has changed ?
Logged

bit bit spears

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 240
    • TangibleBrit.com
Re: watermark script not working anymore
« Reply #2 on: August 14, 2004, 05:12:58 pm »

is that what error code 127 means?

that it cannot access imagemagick?
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: watermark script not working anymore
« Reply #3 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.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 14 queries.