IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 43027


Ignore:
Timestamp:
May 19, 2026, 5:16:49 PM (2 months ago)
Author:
eugene
Message:

newer apache no longer allows us to modify the environment, need to pass things like NEB_SERVER via the command line

Location:
branches/eam_branches/ipp-pstamp-20260421/ippMonitor/raw
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-pstamp-20260421/ippMonitor/raw/getimage.php

    r41730 r43027  
    9696/* --site=$SITE */
    9797$output = array();
    98 exec ("ipp_filename.pl --site=$SITE --basename $basename --filerule $filerule --camera $camera --class_id $class_id 2> /tmp/errors", $output, $status);
     98
     99# apache no longer updates env, need to supply these on the command line
     100$myCommand = "perl -I$PERLLIB -I$PERLLIB/perl5 -I$PERLLIB/perl5/site_perl $BINDIR/ipp_filename.pl --site=$SITE --basename $basename --filerule $filerule --camera $camera --class_id $class_id --neb-server $NEB_SERVER";
     101exec ($myCommand, $output, $status);
     102
     103# exec ("ipp_filename.pl --site=$SITE --basename $basename --filerule $filerule --camera $camera --class_id $class_id 2> /tmp/errors", $output, $status);
    99104
    100105# use these to check the environment
  • branches/eam_branches/ipp-pstamp-20260421/ippMonitor/raw/ipp.php

    r42834 r43027  
    865865    global $WWWBIN;
    866866    global $SITE;
    867     putenv("PERL5LIB=$PERLLIB:");
    868 
    869     $PATH = getenv("PATH");
    870     putenv("PATH=$WWWBIN:$BINDIR:$PATH");
    871     putenv("NEB_SERVER=$NEB_SERVER");
    872 
    873     exec ("ipp_filename.pl --site=$SITE --basename $basename --filerule $filerule --camera $camera --class_id $class_id", $output, $status);
     867
     868    # newer versions of apache do not allow the environment to change
     869    # these elements need to be supplied on the command line below
     870    # $PATH = getenv("PATH");
     871    # putenv("PATH=$WWWBIN:$BINDIR:$PATH");
     872    # putenv("NEB_SERVER=$NEB_SERVER");
     873    # putenv("PERL5LIB=$PERLLIB:");
     874
     875    $myCommand = "perl -I$PERLLIB -I$PERLLIB/perl5 -I$PERLLIB/perl5/site_perl $BINDIR/ipp_filename.pl --site=$SITE --basename $basename --filerule $filerule --camera $camera --class_id $class_id --neb-server $NEB_SERVER";
     876    exec ($myCommand, $output, $status);
    874877
    875878    if (0) {
     
    877880      echo "NEB_SERVER: $NEB_SERVER<br>";
    878881      echo "basename: $basename<br>";
     882      echo "myCommand: $myCommand<br>";
    879883      for ($i = 0; $i < count($output); $i++) {
    880884        echo "output $i: $output[$i]<br>";
     
    891895      if ($status == 1) {       
    892896        echo "<b>log file ($filerule, $basename) not found<br></b>\n";
    893         echo "ipp_filename.pl --site=$SITE --basename $basename --filerule $filerule --camera $camera --class_id $class_id<br>";
     897        echo "$BINDIR/ipp_filename.pl --site=$SITE --basename $basename --filerule $filerule --camera $camera --class_id $class_id<br>";
    894898        return;
    895899      } else {
    896900        echo "<b>ipp_filename.pl failure, check configuration<br></b>\n";
    897         echo "ipp_filename.pl --site=$SITE --basename $basename --filerule $filerule --camera $camera --class_id $class_id<br>";
     901        echo "$BINDIR/ipp_filename.pl --site=$SITE --basename $basename --filerule $filerule --camera $camera --class_id $class_id<br>";
    898902        echo "NEB_SERVER: $NEB_SERVER<br>";
    899903        return;
Note: See TracChangeset for help on using the changeset viewer.