Index: trunk/ippMonitor/INSTALL
===================================================================
--- trunk/ippMonitor/INSTALL	(revision 41728)
+++ trunk/ippMonitor/INSTALL	(revision 41730)
@@ -23,17 +23,27 @@
 # The value also needs to match the PATH entry in ~/ippconfig/ippmonitor.config
 
-# Choose an appropriate psconfig (must exist and match PATH in ~/ippconfig/ippmonitor.config)"
-# It also must be built for the same O/S as the install machine"
-# for example:"
+# Choose an appropriate psconfig (must exist and match PATH in ~/ippconfig/ippmonitor.config)
+# It also must be built for the same O/S as the install machine
+# for example:
 psconfig ipp-20210708-gentoo
 
 # run psconfigure to generate Makefile and raw/site.php 
-# $CZARPLOTDIR and $METRICSPLOTDIR will be generated a link in the same folder as ippMonitor  
-psconfigure --htdocs /var/www/localhost/htdocs --site ~/ippconfig/ippmonitor.config
+# DO NOT check site.php into the svn tree 
+# $CZARPLOTDIR and $METRICSPLOTDIR will be generated as links in the same folder as ippMonitor  
+# the structure of the names for these two directories are defined in Makefile.in 
+psconfigure --htdocs /var/www/localhost/htdocs --wwwbin /var/www/localhost/wwwbin --site ~/ippconfig/ippmonitor.config 
 
-# copy these files and modify them (CCL removed CZARPLOTDIR)
+## NOTES:
+## psconfigure defines the --prefix and related options based on the psconfig system
+## The --wwwbin option sets the location of the ippMonitor scripts.  
+## If not specified here, this defaults to $prefix/wwwbin.  
+## In order to keep the development and operational systems distinct, it is useful to assign the wwwbin under /var/www
+## For an initial installation, you may need to create /var/www/localhost/wwwbin
+
+# Copy these files and modify them.
+# config.dat is used to generate the site.php file installed in the htdocs location
 cp config.dat.in config.dat
 
-# for running czarpool.pl, 
+# czarconfig.xml is used by czarpool.pl
 cp czartool/czarconfig.xml.in czartool/czarconfig.xml
 
@@ -42,8 +52,4 @@
 make
 
-# then set gnuplot path for czartool_plots and ippMetrics in ippMonitor dir
-# <path>/var/www/localhost/htdocs/ippMonitor/czartool_plots</path> 
-# <savelocation>/var/www/localhost/htdocs/ippMonitor/ippMetrics</savelocation>
-
 # czarpoll.pl and roboczar.pl should be launched within 'screen' processes, traditionally
 # named CzarPoll and Roboczar
Index: trunk/ippMonitor/Makefile.in
===================================================================
--- trunk/ippMonitor/Makefile.in	(revision 41728)
+++ trunk/ippMonitor/Makefile.in	(revision 41730)
@@ -7,5 +7,5 @@
 RAW     = raw
 SCRIPTS = scripts
-DESTBIN = @BINDIR@
+DESTBIN = @WWWBIN@
 DESTWWW = @HTDOCS@/ippMonitor
 CZARPLOTDIR = /export/@HOST2@.0/ipp/czartool_plots
Index: trunk/ippMonitor/configure.tcsh
===================================================================
--- trunk/ippMonitor/configure.tcsh	(revision 41728)
+++ trunk/ippMonitor/configure.tcsh	(revision 41730)
@@ -16,4 +16,5 @@
 set prefix  = ""
 set bindir  = ""
+set wwwbin  = ""
 set libdir  = ""
 set datadir = ""
@@ -92,4 +93,12 @@
    endif
    breaksw;
+  case --wwwbin*
+   if ("$1" == "--wwwbin") then
+     shift
+     set wwwbin = $1
+   else
+     set wwwbin = `echo $1 | tr = ' ' | awk '{print $2}'`
+   endif
+   breaksw;
   case --libdir*
    if ("$1" == "--libdir") then
@@ -139,4 +148,5 @@
 echo "prefix: $prefix"
 echo "bindir: $bindir"
+echo "wwwbin: $wwwbin"
 echo "libdir: $libdir"
 echo "datadir:$datadir"
@@ -160,4 +170,10 @@
 endif
 
+# BINDIR holds the output binary files
+if ("$wwwbin" == "") then
+  if ("$prefix" == "") goto usage
+  set wwwbin = $prefix/wwwbin
+endif
+
 # LIBDIR set the install lib directory
 if ("$libdir" == "") then
@@ -182,12 +198,14 @@
 # convert Makefile.in to Makefile:
 if (-e Makefile) mv -f Makefile Makefile~
-cat Makefile.in | sed "s|@HTDOCS@|$htdocs|" > tmp.1
+cat Makefile.in | sed "s|@HTDOCS@|$htdocs|"    > tmp.1
 cat tmp.1       | sed "s|@HOST2@|$hostname2|"  > tmp.2
-cat tmp.2       | sed "s|@BINDIR@|$bindir|" > Makefile
-rm -f tmp.2
+cat tmp.2       | sed "s|@BINDIR@|$bindir|"    > tmp.1
+cat tmp.1       | sed "s|@WWWBIN@|$wwwbin|"    > Makefile
+rm -f tmp.1 tmp.2 
 
 # convert raw/site.php.in to raw/site.php
 if (-e raw/site.php) mv -f raw/site.php raw/site.php~
-cat raw/site.php.in | sed "s|@BINDIR@|$bindir|"  > tmp.2
+cat raw/site.php.in | sed "s|@BINDIR@|$bindir|"  > tmp.1
+cat tmp.1           | sed "s|@WWWBIN@|$wwwbin|"  > tmp.2
 cat tmp.2           | sed "s|@LIBDIR@|$libdir|"  > tmp.1
 cat tmp.1           | sed "s|@PERLLIB@|$libdir|" > tmp.2
@@ -232,5 +250,6 @@
   --useMDB2              use MDB2 interface instead of DB
 
-  --bindir=DIR           user executables [PREFIX/bin/$ARCH] 
+  --bindir=DIR           IPP main executables [PREFIX/bin] 
+  --wwwbin=DIR           ippMonitor executables [PREFIX/wwwbin] 
   --libdir=DIR           object code libraries [PREFIX/lib/$ARCH]
   --datadir=DIR          read-only architecture-independent data [PREFIX/share]
Index: trunk/ippMonitor/raw/cleanTmpDirectory.php
===================================================================
--- trunk/ippMonitor/raw/cleanTmpDirectory.php	(revision 41728)
+++ trunk/ippMonitor/raw/cleanTmpDirectory.php	(revision 41730)
@@ -14,17 +14,20 @@
 
 
-exec("find /tmp -user apache", $output, $status);
+echo "This function has been deprecated (EAM 2021.07.28)\n";
 
-echo "<html><body>\n";
-echo "Cleaning /tmp file (removing all files belonging to user apache)<br><br>\n";
-$count = 0;
-foreach ($output as $key => $value) {
-  echo "Deleting [$value]<br>\n";
-  exec("rm -f $value");
-  $count++;
+if (0) {
+   exec("find /tmp -user apache", $output, $status);
+
+   echo "<html><body>\n";
+   echo "Cleaning /tmp file (removing all files belonging to user apache)<br><br>\n";
+   $count = 0;
+   foreach ($output as $key => $value) {
+     echo "Deleting [$value]<br>\n";
+     exec("rm -f $value");
+     $count++;
+   }
+   echo "<br>/tmp cleaned ($count files were deleted)<br>\n";
 }
-echo "<br>/tmp cleaned ($count files were deleted)<br>\n";
 echo "</body></html>\n";
-
 
 menu_end();
Index: trunk/ippMonitor/raw/columns_in_db.php
===================================================================
--- trunk/ippMonitor/raw/columns_in_db.php	(revision 41728)
+++ trunk/ippMonitor/raw/columns_in_db.php	(revision 41730)
@@ -117,5 +117,5 @@
 		     );
 
-echo "<b>This script does not do anything but showing the current columns in the various db tables</b><br/><br/>";
+echo "<b>This script does not do anything but show the current columns in the various db tables</b><br/><br/>";
 
 foreach ($tableNames as $tIndex => $tableName) {
Index: trunk/ippMonitor/raw/czartool_exposures.php
===================================================================
--- trunk/ippMonitor/raw/czartool_exposures.php	(revision 41728)
+++ trunk/ippMonitor/raw/czartool_exposures.php	(revision 41730)
@@ -9,5 +9,5 @@
 
 $PATH = getenv("PATH");
-putenv("PATH=$BINDIR:$PATH");
+putenv("PATH=$WWWBIN:$BINDIR:$PATH");
 
 $LD_LIBRARY_PATH = getenv("LD_LIBRARY_PATH");
Index: trunk/ippMonitor/raw/czartool_ipptopsps.php
===================================================================
--- trunk/ippMonitor/raw/czartool_ipptopsps.php	(revision 41728)
+++ trunk/ippMonitor/raw/czartool_ipptopsps.php	(revision 41730)
@@ -16,5 +16,5 @@
 
 $PATH = getenv("PATH");
-putenv("PATH=$BINDIR:$PATH");
+putenv("PATH=$WWWBIN:$BINDIR:$PATH");
 
 $LD_LIBRARY_PATH = getenv("LD_LIBRARY_PATH");
Index: trunk/ippMonitor/raw/czartool_labels.php
===================================================================
--- trunk/ippMonitor/raw/czartool_labels.php	(revision 41728)
+++ trunk/ippMonitor/raw/czartool_labels.php	(revision 41730)
@@ -15,5 +15,5 @@
 
 $PATH = getenv("PATH");
-putenv("PATH=$BINDIR:$PATH");
+putenv("PATH=$WWWBIN:$BINDIR:$PATH");
 
 $LD_LIBRARY_PATH = getenv("LD_LIBRARY_PATH");
@@ -203,4 +203,5 @@
 
 // status table at top
+// XXX hard-wired path: BAD
 exec("svnversion /data/ippc64.1/ippitc/ippMonitor", $svnversion);
 $phpversion = phpversion();
Index: trunk/ippMonitor/raw/czartool_servers.php
===================================================================
--- trunk/ippMonitor/raw/czartool_servers.php	(revision 41728)
+++ trunk/ippMonitor/raw/czartool_servers.php	(revision 41730)
@@ -27,5 +27,5 @@
 
 $PATH = getenv("PATH");
-putenv("PATH=$BINDIR:$PATH");
+putenv("PATH=$WWWBIN:$BINDIR:$PATH");
 
 $LD_LIBRARY_PATH = getenv("LD_LIBRARY_PATH");
Index: trunk/ippMonitor/raw/getimage.php
===================================================================
--- trunk/ippMonitor/raw/getimage.php	(revision 41728)
+++ trunk/ippMonitor/raw/getimage.php	(revision 41730)
@@ -20,5 +20,5 @@
 putenv("PERL5LIB=$PERLLIB:");
 $PATH = getenv("PATH");
-putenv("PATH=$BINDIR:$PATH");
+putenv("PATH=$WWWBIN:$BINDIR:$PATH");
 putenv("NEB_SERVER=$NEB_SERVER");
 
Index: trunk/ippMonitor/raw/getlog.php
===================================================================
--- trunk/ippMonitor/raw/getlog.php	(revision 41728)
+++ trunk/ippMonitor/raw/getlog.php	(revision 41730)
@@ -15,5 +15,5 @@
 putenv("PERL5LIB=$PERLLIB:");
 $PATH = getenv("PATH");
-putenv("PATH=$BINDIR:$PATH");
+putenv("PATH=$WWWBIN:$BINDIR:$PATH");
 
 # echo "args: $args<br>";
Index: trunk/ippMonitor/raw/histogram.php
===================================================================
--- trunk/ippMonitor/raw/histogram.php	(revision 41728)
+++ trunk/ippMonitor/raw/histogram.php	(revision 41730)
@@ -408,5 +408,5 @@
 //Get environment
 $PATH = getenv("PATH");
-putenv("PATH=$BINDIR:$PATH");
+putenv("PATH=$WWWBIN:$BINDIR:$PATH");
 $LD_LIBRARY_PATH = getenv("LD_LIBRARY_PATH");
 putenv("LD_LIBRARY_PATH=$LIBDIR:$LD_LIBRARY_PATH");
Index: trunk/ippMonitor/raw/ipp.php
===================================================================
--- trunk/ippMonitor/raw/ipp.php	(revision 41728)
+++ trunk/ippMonitor/raw/ipp.php	(revision 41730)
@@ -829,9 +829,10 @@
     global $NEB_SERVER;
     global $BINDIR;
+    global $WWWBIN;
     global $SITE;
     putenv("PERL5LIB=$PERLLIB:");
 
     $PATH = getenv("PATH");
-    putenv("PATH=$BINDIR:$PATH");
+    putenv("PATH=$WWWBIN:$BINDIR:$PATH");
     putenv("NEB_SERVER=$NEB_SERVER");
 
Index: trunk/ippMonitor/raw/plotHistogram.php
===================================================================
--- trunk/ippMonitor/raw/plotHistogram.php	(revision 41728)
+++ trunk/ippMonitor/raw/plotHistogram.php	(revision 41730)
@@ -17,5 +17,5 @@
 
 $PATH = getenv("PATH");
-putenv("PATH=$BINDIR:$PATH");
+putenv("PATH=$WWWBIN:$BINDIR:$PATH");
 
 $LD_LIBRARY_PATH = getenv("LD_LIBRARY_PATH");
Index: trunk/ippMonitor/raw/scatterPlot.php
===================================================================
--- trunk/ippMonitor/raw/scatterPlot.php	(revision 41728)
+++ trunk/ippMonitor/raw/scatterPlot.php	(revision 41730)
@@ -17,5 +17,5 @@
 
 $PATH = getenv("PATH");
-putenv("PATH=$BINDIR:$PATH");
+putenv("PATH=$WWWBIN:$BINDIR:$PATH");
 
 $LD_LIBRARY_PATH = getenv("LD_LIBRARY_PATH");
Index: trunk/ippMonitor/raw/show_log.php
===================================================================
--- trunk/ippMonitor/raw/show_log.php	(revision 41728)
+++ trunk/ippMonitor/raw/show_log.php	(revision 41730)
@@ -11,5 +11,5 @@
 putenv("PERL5LIB=$PERLLIB:");
 $PATH = getenv("PATH");
-putenv("PATH=$BINDIR:$PATH");
+putenv("PATH=$WWWBIN:$BINDIR:$PATH");
 
 $basename = $_GET[basename];
Index: trunk/ippMonitor/raw/site.php.in
===================================================================
--- trunk/ippMonitor/raw/site.php.in	(revision 41728)
+++ trunk/ippMonitor/raw/site.php.in	(revision 41730)
@@ -8,6 +8,10 @@
 $PERLLIB    = "@PERLLIB@";
 $BINDIR     = "@BINDIR@";
+$WWWBIN     = "@WWWBIN@";
 $LIBDIR     = "@LIBDIR@";
 $SITE       = "@SITE@";
+
+// $BINDIR : general IPP code needed by ippMonitor
+// $WWWBIN : ippMonitor programs in scripts are installed here
 
 $DBI     = "@DBI@";
Index: trunk/ippMonitor/raw/skycellplot.php
===================================================================
--- trunk/ippMonitor/raw/skycellplot.php	(revision 41728)
+++ trunk/ippMonitor/raw/skycellplot.php	(revision 41730)
@@ -18,5 +18,5 @@
 
 $PATH = getenv("PATH");
-putenv("PATH=$BINDIR:$PATH");
+putenv("PATH=$WWWBIN:$BINDIR:$PATH");
 
 $LD_LIBRARY_PATH = getenv("LD_LIBRARY_PATH");
Index: trunk/ippMonitor/raw/skyplot.php
===================================================================
--- trunk/ippMonitor/raw/skyplot.php	(revision 41728)
+++ trunk/ippMonitor/raw/skyplot.php	(revision 41730)
@@ -28,5 +28,5 @@
 
 $PATH = getenv("PATH");
-putenv("PATH=$BINDIR:$PATH");
+putenv("PATH=$WWWBIN:$BINDIR:$PATH");
 
 $LD_LIBRARY_PATH = getenv("LD_LIBRARY_PATH");
