safe_mode_exec_dir appears to have no effect

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ian.H

    safe_mode_exec_dir appears to have no effect

    Hi all,

    I've been testing out some configs on this box out of curiousity more than
    anything, but looking at various sites and of course, php.net regarding
    safe_mode_exec_ dir, it appears that if I specify a directory here, that
    binaries within should execute even with safe_mode enabled.

    I copied ImageMagick's mogrify binary to /safeweb/bin and included:


    safe_mode_exec_ dir /safeweb/bin/


    in php.ini. However, this seems to have no effect whatsoever and the
    thumbnail is not created (written within the directory tree permitted by
    open_basedir).

    Has anyone here had a similar problem or know of any solutions /
    workarounds for this? Am I missing something blindingly obvious? Any info
    appreciated =)


    TIA.



    Regards,

    Ian

    --
    Ian.H [Design & Development]
    digiServ Network - Web solutions
    www.digiserv.net | irc.digiserv.ne t | forum.digiserv. net
    Programming, Web design, development & hosting.

  • Tim Van Wassenhove

    #2
    Re: safe_mode_exec_ dir appears to have no effect

    On 2004-01-12, Ian.H <ian@WINDOZEdig iserv.net> wrote:[color=blue]
    > Hi all,
    >
    > I've been testing out some configs on this box out of curiousity more than
    > anything, but looking at various sites and of course, php.net regarding
    > safe_mode_exec_ dir, it appears that if I specify a directory here, that
    > binaries within should execute even with safe_mode enabled.
    >
    > I copied ImageMagick's mogrify binary to /safeweb/bin and included:
    >
    >
    > safe_mode_exec_ dir /safeweb/bin/
    >
    >
    > in php.ini. However, this seems to have no effect whatsoever and the
    > thumbnail is not created (written within the directory tree permitted by
    > open_basedir).
    >
    > Has anyone here had a similar problem or know of any solutions /
    > workarounds for this? Am I missing something blindingly obvious? Any info
    > appreciated =)[/color]

    Have you reloaded/restarted your httpd?

    How do you call the binary, and what does that call return you?


    --

    Comment

    • Ian.H

      #3
      Re: safe_mode_exec_ dir appears to have no effect

      On Mon, 12 Jan 2004 17:26:44 +0000, Tim Van Wassenhove wrote:
      [color=blue][color=green]
      >> I copied ImageMagick's mogrify binary to /safeweb/bin and included:
      >>
      >>
      >> safe_mode_exec_ dir /safeweb/bin/
      >>
      >>
      >> in php.ini. However, this seems to have no effect whatsoever and the
      >> thumbnail is not created (written within the directory tree permitted by
      >> open_basedir).
      >>
      >> Has anyone here had a similar problem or know of any solutions /
      >> workarounds for this? Am I missing something blindingly obvious? Any
      >> info appreciated =)[/color]
      >
      > Have you reloaded/restarted your httpd?[/color]


      Certainly have Tim...

      [color=blue]
      >
      > How do you call the binary, and what does that call return you?[/color]


      exec($_im_cmd);


      I know it works perfectly as expected if I kill safe_mode.. so I know the
      script itself is functioning fine... the dir the thumb images are going in
      are chmodded 0770 so no write permission hassles. Everything works with
      safe_mode disabled.. just the safe_mode_exec_ dir setting doesn't seem to
      matter =\



      Regards,

      Ian

      --
      Ian.H [Design & Development]
      digiServ Network - Web solutions
      www.digiserv.net | irc.digiserv.ne t | forum.digiserv. net
      Programming, Web design, development & hosting.

      Comment

      • Ian.H

        #4
        Re: safe_mode_exec_ dir appears to have no effect

        On Tue, 13 Jan 2004 14:20:27 +0000, Ian.H wrote:
        [color=blue][color=green]
        >> How do you call the binary, and what does that call return you?[/color]
        >
        >
        > exec($_im_cmd);[/color]


        Oops.. I should have added also:


        $_mogrify = '/safeweb/bin/mogrify';
        $_im_cmd = $_mogrify . ' -resize ' . $width . 'x' . $height . '! ' .
        $this->thumbs_dir . 't_' . $image;



        Regards,

        Ian

        --
        Ian.H [Design & Development]
        digiServ Network - Web solutions
        www.digiserv.net | irc.digiserv.ne t | forum.digiserv. net
        Programming, Web design, development & hosting.

        Comment

        Working...