Opened 15 years ago

Closed 13 years ago

#288 closed defect (wontfix)

Regarding Changeset [174] by niko

Reported by: kim@… Owned by: yermol
Priority: normal Milestone:
Component: Plugin_ImageManager Version:
Severity: normal Keywords:


Im reading through the last days of changes and I noticed this changeset, I might be wrong here, I can look further into this, but I hope you know what youre doing by removing this. On some systems this is crucial for the linux command to return status of the command, when safe_mode is set to ON foe example you dont need it, when its OFF you need it - atleast on my systems.

Ill check my source and get back on this one. Just in case, so that you accually dont break the imagefunctions.

Change History (4)

comment:1 Changed 15 years ago by kim@…

I havnt tested the ImageManager?, since I have my own creation for this - but Im quite used to problems on different servers rearding the EXEC function from PHP. Quick looking at the code of the ImageManager? plugin you would need this to fixed, here is my safe_mode patch for a typical EXEC to work with atleast ImageMagick? :

if(!$this->safe_mode_on()) $exec_postfix = ' 2>&1'; else $exec_postfix = '';
$cmd .= '"'.($this->image) . '" "' . ($filename) . '"' . $exec_postfix;

And you would need to add a function to the Image_Transform_Driver_IM class, namely my little safe_mode detection :

  function safe_mode_on(){
    $v = ini_get('safe_mode');
      return (bool) $v;
    } else if(eregi('off',$v)){
      return false;
    } else if(eregi('on',$v)){
      return true;
    } else if(!$v){
      return false;
    } else {
      return true;

Then we should both be happy.

comment:2 Changed 15 years ago by niko


what 2>&1 does is creating a pipe from errout to stdout right?
so we could get any error-messages from imagemagic.
but actually we don't need this at all - as nothing will be done with retval!

....or am i missing something here?

comment:3 Changed 15 years ago by kim@…

Well, missing and missing... What I know about the code I presented above is that this is the only way it works. This was accually a rather bug problem in our CMS when some of the servers hosting our CMS turned safe_mode on, and this fixed the problem.

You probably have better knowledge of stdout and such than me, but I do know that the above code works and without it atleast our CMS doesnt work, toke me some time to figure it out.

But we might aswell wait and see if others have problems with this, in that case your have the sollution.

comment:4 Changed 13 years ago by gogo

  • Resolution set to wontfix
  • Status changed from new to closed

No further reports. Closing.

Note: See TracTickets for help on using tickets.