- Timestamp:
- Jul 30, 2010, 9:31:50 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20100621/ippMonitor/raw/getimage.php
r28043 r28794 11 11 // global $PSCONFIG 12 12 13 13 14 ### these need to be set to the correct locations!! 14 15 $MISSING = "missing.png"; … … 20 21 } 21 22 22 23 23 putenv("PSCONFDIR=$PSCONFDIR"); 24 24 putenv("PSCONFIG=$PSCONFIG"); … … 28 28 29 29 if ($debug) { 30 echo "DEBUG1<br>"; 30 31 echo "args: $args<br>"; 31 32 echo "path: $PATH<br>"; 32 33 echo "perl: $PERLLIB<br>"; 33 34 echo "bindir: $BINDIR<br>"; 35 echo "site=$SITE<br>\n"; 34 36 } 35 37 36 #$basename may contain filename@filerule38 // $basename may contain filename@filerule 37 39 $basename = $_GET[name]; 40 if ($basename == "noimage.noimage") { 41 $file = fopen ("noimage.png", "r");//$MISSING? 42 if ($file && !$debug) { 43 # do I need to use image/jpg? can I modify this to image/png, etc, based on the type? 44 header ('Content-Type: image/jpg'); 45 fpassthru ($file); 46 } 47 exit (); 48 } 38 49 $filerule = $_GET[rule]; 39 50 $camera = $_GET[camera]; … … 43 54 44 55 if ($debug) { 56 echo "DEBUG2<br>"; 45 57 echo "basename: $basename<br>"; 46 58 echo "filerule: $filerule<br>"; … … 64 76 65 77 if ($debug) { 66 exec ("which ipp_filename.pl", $output, $status); 67 echo "which ipp_filename.pl output:<br>"; 78 echo "DEBUG3<br>"; 79 $output = array(); 80 exec ("which $BINDIR/ipp_filename.pl", $output, $status); 81 echo "which $BINDIR/ipp_filename.pl output:<br>"; 68 82 for ($i = 0; $i < count($output); $i++) { 69 83 echo "output $i: $output[$i]<br>"; … … 71 85 echo "status: $status<br>"; 72 86 87 $output = array(); 73 88 exec ("whoami", $output, $status); 74 89 echo "which whoami output:<br>"; … … 79 94 } 80 95 81 exec ("ipp_filename.pl --site=$SITE --basename $basename --filerule $filerule --camera $camera --class_id $class_id", $output, $status); 96 /* --site=$SITE */ 97 $output = array(); 98 exec ("ipp_filename.pl --site=$SITE --basename $basename --filerule $filerule --camera $camera --class_id $class_id 2> /tmp/errors", $output, $status); 82 99 83 100 # use these to check the environment … … 91 108 92 109 if ($debug) { 110 echo "DEBUG4<br>"; 111 echo "Command = ipp_filename.pl --site=$SITE --basename $basename --filerule $filerule --camera $camera --class_id $class_id<br>\n"; 93 112 echo "basename: $basename<br>"; 94 113 for ($i = 0; $i < count($output); $i++) { 95 114 echo "output $i: $output[$i]<br>"; 96 115 } 97 echo "output: $output[0]<br>";98 116 echo "status: $status<br>"; 99 117 echo "filename: $filename<br>";
Note:
See TracChangeset
for help on using the changeset viewer.
