Index: trunk/ippMonitor/raw/getimage.php
===================================================================
--- trunk/ippMonitor/raw/getimage.php	(revision 10595)
+++ trunk/ippMonitor/raw/getimage.php	(revision 10963)
@@ -1,6 +1,8 @@
 <?php
 
-# $IMAGEDIR = "/data/alala/eugene/swtests/pantasks/";
-$CONFIGDIR = "/data/alala/eugene/src/panstarrs/ipp/config/ipprc.config";
+### these need to be set to the correct locations!!
+$PERLLIB = "/home/kiawe/eugene/psconfig/dev.linux/lib";
+$BINDIR = "/home/kiawe/eugene/psconfig/dev.linux/bin";
+$SITE = "/home/kiawe/eugene/.ipprc";
 $MISSING = "missing.png";
 
@@ -11,10 +13,25 @@
 }
 
-$basename = $_GET[name];
+$basename = escapeshellarg($_GET[name]);
 $basename = str_replace ('..','',$basename);
 
-$filename = system ("ipp_datapath.pl --site=$CONFIGDIR $IMAGEDIR", $status);
+putenv("PERL5LIB=$PERLLIB:");
+$PATH = getenv("PATH");
+putenv("PATH=$BINDIR:$PATH");
+
+exec ("ipp_datapath.pl --site=$SITE $basename", $output, $status);
+
+$filename = $output[0];
 if ($status) {
   $filename = $MISSING;
+}
+
+if (0) {
+  echo "basename: $basename<br>";
+  echo "result:   $result<br>";
+  echo "output:   $output[0]<br>";
+  echo "status:   $status<br>";
+  echo "filename: $filename<br>";
+  exit ();
 }
 
