safe mode and passthru

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

    safe mode and passthru

    Hi There.

    I seem to be getting some inconsistent results when using passthru()
    in safe mode. They appear to be related to the fact that passthru
    should treat all command arguments as one single argument when safe
    mode is on. Everything works just fine on my MacOS X webserver (
    Apache 1.3.29 with PHP 4.3.6 ). But on my Linux Enterprise 3.0
    production server (running Apache 2.0.46 with PHP 4.3.2) things are
    different.

    Here are the argument(s) that passthru hands to my command when safe
    mode is off:

    rrdtool args: graph - --start -3600 --end N --width 300 --height 75
    --lower-limit 0 --rigid --title BaBarCM2 Grid Load last hour
    --vertical-label Load/Procs
    DEF:load_one=/u2/ganglia/rrds/BaBarCM2/__SummaryInfo__/load_one.rrd:su m:AVERAGE
    DEF:proc_run=/u2/ganglia/rrds/BaBarCM2/__SummaryInfo__/proc_run.rrd:su m:AVERAGE
    DEF:cpu_num=/u2/ganglia/rrds/BaBarCM2/__SummaryInfo__/cpu_num.rrd:sum :AVERAGE
    DEF:num_nodes=/u2/ganglia/rrds/BaBarCM2/__SummaryInfo__/cpu_num.rrd:num :AVERAGE
    AREA:load_one#C CCCCC:1-min Load LINE2:num_nodes #00FF00:Nodes
    LINE2:cpu_num#F F0000:CPUs LINE2:proc_run# 0000FF:Running Processes

    And this is what passthru hands to my command when safe mode is on:

    rrdtool args: graph - --start -3600 --end N --width 300 --height 75
    --lower-limit 0 --rigid --title 'BaBarCM2 Grid Load last hour'
    --vertical-label 'Load/Procs'
    DEF:'load_one'= '/u2/ganglia/rrds/BaBarCM2/__SummaryInfo__/load_one.rrd':' sum':AVERAGE
    DEF:'proc_run'= '/u2/ganglia/rrds/BaBarCM2/__SummaryInfo__/proc_run.rrd':' sum':AVERAGE
    DEF:'cpu_num'='/u2/ganglia/rrds/BaBarCM2/__SummaryInfo__/cpu_num.rrd':'s um':AVERAGE
    DEF:'num_nodes' ='/u2/ganglia/rrds/BaBarCM2/__SummaryInfo__/cpu_num.rrd':'n um':AVERAGE
    AREA:'load_one' #CCCCCC:'1-min Load' LINE2:'num_node s'#00FF00:'Node s'
    LINE2:'cpu_num' #FF0000:'CPUs' LINE2:'proc_run '#0000FF:'Runni ng
    Processes'

    The quotes are still there. Why am I not getting consistent behaviour
    on both platforms? Is this a bug in php 4.3.2 or 4.3.6???

    ----
    yemi@slac.stanf ord.edu
Working...