<?php

header('Content-type: application/json');
# setup php session
session_start();
if (!isset($_SESSION['count'])) {
    $_SESSION['count'] = 0;
} else {
    $_SESSION['count']++;
}
if (!sizeof($_REQUEST)) {
    session_write_close();
    require_once "../mail.php";
    $msg = "[PHP code received no \$_REQUEST] Possibly total upload file size exceeded limit.\nLimit is currently set to " . ini_get('post_max_size') . ".\n";
    error_mail($msg . "Error occured in calculate calculate_1.\n");
    $results = array("error" => $msg . "Please contact the administrators via feedback if you feel this is in error or if you have need to process total file sizes greater than this limit.\n");
    $results['_status'] = 'failed';
    echo json_encode($results);
    exit;
}
$do_logoff = 0;
$window = "";
if (isset($_REQUEST['_window'])) {
    $window = $_REQUEST['_window'];
}
if (!isset($_SESSION[$window])) {
    $_SESSION[$window] = array("logon" => "", "project" => "");
}
if ($_REQUEST["_logon"] != $_SESSION[$window]['logon']) {
    $do_logoff = 1;
    unset($_SESSION[$window]['logon']);
Exemple #2
0
<?php

header('Content-type: application/json');
# setup php session
session_start();
if (!isset($_SESSION['count'])) {
    $_SESSION['count'] = 0;
} else {
    $_SESSION['count']++;
}
if (!sizeof($_REQUEST)) {
    session_write_close();
    require_once "../mail.php";
    $msg = "[PHP code received no \$_REQUEST] Possibly total upload file size exceeded limit.\nLimit is currently set to " . ini_get('post_max_size') . ".\n";
    error_mail($msg . "Error occured in tools align.\n");
    $results = array("error" => $msg . "Please contact the administrators via feedback if you feel this is in error or if you have need to process total file sizes greater than this limit.\n");
    $results['_status'] = 'failed';
    echo json_encode($results);
    exit;
}
$do_logoff = 0;
$window = "";
if (isset($_REQUEST['_window'])) {
    $window = $_REQUEST['_window'];
}
if (!isset($_SESSION[$window])) {
    $_SESSION[$window] = array("logon" => "", "project" => "");
}
if ($_REQUEST["_logon"] != $_SESSION[$window]['logon']) {
    $do_logoff = 1;
    unset($_SESSION[$window]['logon']);
<?php

header('Content-type: application/json');
# setup php session
session_start();
if (!isset($_SESSION['count'])) {
    $_SESSION['count'] = 0;
} else {
    $_SESSION['count']++;
}
if (!sizeof($_REQUEST)) {
    session_write_close();
    require_once "../mail.php";
    $msg = "[PHP code received no \$_REQUEST] Possibly total upload file size exceeded limit.\nLimit is currently set to " . ini_get('post_max_size') . ".\n";
    error_mail($msg . "Error occured in admin sysuserslist.\n");
    $results = array("error" => $msg . "Please contact the administrators via feedback if you feel this is in error or if you have need to process total file sizes greater than this limit.\n");
    $results['_status'] = 'failed';
    echo json_encode($results);
    exit;
}
$do_logoff = 0;
$window = "";
if (isset($_REQUEST['_window'])) {
    $window = $_REQUEST['_window'];
}
if (!isset($_SESSION[$window])) {
    $_SESSION[$window] = array("logon" => "", "project" => "");
}
if ($_REQUEST["_logon"] != $_SESSION[$window]['logon']) {
    $do_logoff = 1;
    unset($_SESSION[$window]['logon']);
Exemple #4
0
<?php

header('Content-type: application/json');
# setup php session
session_start();
if (!isset($_SESSION['count'])) {
    $_SESSION['count'] = 0;
} else {
    $_SESSION['count']++;
}
if (!sizeof($_REQUEST)) {
    session_write_close();
    require_once "../mail.php";
    $msg = "[PHP code received no \$_REQUEST] Possibly total upload file size exceeded limit.\nLimit is currently set to " . ini_get('post_max_size') . ".\n";
    error_mail($msg . "Error occured in tools filetest.\n");
    $results = array("error" => $msg . "Please contact the administrators via feedback if you feel this is in error or if you have need to process total file sizes greater than this limit.\n");
    $results['_status'] = 'failed';
    echo json_encode($results);
    exit;
}
$do_logoff = 0;
$window = "";
if (isset($_REQUEST['_window'])) {
    $window = $_REQUEST['_window'];
}
if (!isset($_SESSION[$window])) {
    $_SESSION[$window] = array("logon" => "", "project" => "");
}
if ($_REQUEST["_logon"] != $_SESSION[$window]['logon']) {
    $do_logoff = 1;
    unset($_SESSION[$window]['logon']);
Exemple #5
0
<?php

header('Content-type: application/json');
# setup php session
session_start();
if (!isset($_SESSION['count'])) {
    $_SESSION['count'] = 0;
} else {
    $_SESSION['count']++;
}
if (!sizeof($_REQUEST)) {
    session_write_close();
    require_once "../mail.php";
    $msg = "[PHP code received no \$_REQUEST] Possibly total upload file size exceeded limit.\nLimit is currently set to " . ini_get('post_max_size') . ".\n";
    error_mail($msg . "Error occured in tools center.\n");
    $results = array("error" => $msg . "Please contact the administrators via feedback if you feel this is in error or if you have need to process total file sizes greater than this limit.\n");
    $results['_status'] = 'failed';
    echo json_encode($results);
    exit;
}
$do_logoff = 0;
$window = "";
if (isset($_REQUEST['_window'])) {
    $window = $_REQUEST['_window'];
}
if (!isset($_SESSION[$window])) {
    $_SESSION[$window] = array("logon" => "", "project" => "");
}
if ($_REQUEST["_logon"] != $_SESSION[$window]['logon']) {
    $do_logoff = 1;
    unset($_SESSION[$window]['logon']);
Exemple #6
0
function jobcancel($jobs, $error_json_exit = false)
{
    $GLOBALS['lasterror'] = "";
    $GLOBALS['lastnotice'] = "";
    global $use_db;
    global $db_errors;
    $appconfig = json_decode(file_get_contents("/home/abhishek/Desktop/GenApp/abhishektest/appconfig.json"), true);
    if (!isset($appconfig['resources'])) {
        $GLOBALS['lasterror'] = "Internal error: could not find resource configuration information in appconfig.json";
        require_once "mail.php";
        error_mail("[joblog.php jobcancel()] " . $GLOBALS['lasterror']);
        return false;
    }
    if (!db_connect($error_json_exit)) {
        $GLOBALS['lasterror'] = $db_errors;
        return false;
    }
    $context = new ZMQContext();
    $zmq_socket = $context->getSocket(ZMQ::SOCKET_PUSH, 'abhishektest udp pusher');
    $zmq_socket->connect("tcp://" . $appconfig['messaging']['zmqhostip'] . ":" . $appconfig['messaging']['zmqport']);
    // $udp_socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
    $runs = $use_db->abhishektest->running->find(array("_id" => array('$in' => $jobs)));
    $fjobs = array_flip($jobs);
    $projectdirs = array();
    $tokillparent = array();
    $tokill = array();
    $kjobs = array();
    foreach ($runs as $v) {
        $uuid = $v['_id'];
        $job = $use_db->abhishektest->jobs->findOne(array("_id" => $uuid));
        $pids = $v['pid'];
        foreach ($pids as $k2 => $v2) {
            if ($v2['pid'] < 2) {
                require_once "mail.php";
                error_mail("[joblog.php jobcancel()] invalid pid for kill! " . $v2['pid']);
            } else {
                $where = $v2['where'];
                if ($v2['what'] == "parent") {
                    if (!isset($tokillparent[$where])) {
                        $tokillparent[$where] = array($v2['pid']);
                    } else {
                        $tokillparent[$where][] = $v2['pid'];
                    }
                } else {
                    if (!isset($tokill[$where])) {
                        $tokill[$where] = array($v2['pid']);
                    } else {
                        $tokill[$where][] = $v2['pid'];
                    }
                }
            }
        }
        unset($fjobs[$uuid]);
        $kjobs[$uuid] = true;
        // send messages also if running about "cancelled"
        // also manually clear job locks and push update to jobs as in jobrun.php
        if (!logjobupdate("cancelled", true, $error_json_exit, $uuid)) {
        }
        logstoprunning();
        $zmq_socket->send(json_encode(array("_uuid" => $uuid, "Notice" => "This job has been cancelled by user request", "_cancel" => "true", "_status" => "cancelled")));
        // $jsonmsg = json_encode( array( "_uuid" => $uuid,
        //                               "Notice" => "This job has been cancelled by user request",
        //                               "_status" => "cancelled" ) );
        // socket_sendto( $udp_socket, $jsonmsg, strlen( $jsonmsg ), 0, $appconfig['messaging'][ 'udphostip' ], $appconfig['messaging']['udpport'] );
        if (getprojectdir($uuid)) {
            $projectdirs[$GLOBALS['getprojectdir']] = true;
        }
    }
    foreach ($tokill as $k => $v) {
        if (!isset($appconfig['resources'][$k])) {
            $GLOBALS['lasterror'] .= "Resource {$k} missing from resource configuration information in appconfig.json";
            require_once "mail.php";
            error_mail("[joblog.php jobcancel()] " . $GLOBALS['lasterror']);
        } else {
            $kill = $appconfig['resources'][$k] . " /var/www/html/abhishektest/util/ga_killprocs.pl /var/www/html/abhishektest/log {$k} all " . implode(' ', $v);
            ob_start();
            exec($kill, $execout);
            ob_end_clean();
        }
    }
    foreach ($tokillparent as $k => $v) {
        if (!isset($appconfig['resources'][$k])) {
            $GLOBALS['lasterror'] .= "Resource {$k} missing from resource configuration information in appconfig.json";
            require_once "mail.php";
            error_mail("[joblog.php jobcancel()] " . $GLOBALS['lasterror']);
        } else {
            $kill = $appconfig['resources'][$k] . " /var/www/html/abhishektest/util/ga_killprocs.pl /var/www/html/abhishektest/log {$k} child " . implode(' ', $v);
            ob_start();
            exec($kill, $execout);
            ob_end_clean();
        }
    }
    foreach ($projectdirs as $k => $v) {
        clearprojectlock($k);
    }
    $msgs = count($kjobs) ? "Job id" . (count($kjobs) > 1 ? "s " : " ") . implode(",", array_keys($kjobs)) . " cancelled." : "";
    $msgs .= count($fjobs) ? "\nNotice; Job id" . (count($fjobs) > 1 ? "s " : " ") . implode(",", array_keys($fjobs)) . " not running so not cancelled." : "";
    $GLOBALS['lastnotice'] = $msgs;
    return true;
}
<?php

header('Content-type: application/json');
# setup php session
session_start();
if (!isset($_SESSION['count'])) {
    $_SESSION['count'] = 0;
} else {
    $_SESSION['count']++;
}
if (!sizeof($_REQUEST)) {
    session_write_close();
    require_once "../mail.php";
    $msg = "[PHP code received no \$_REQUEST] Possibly total upload file size exceeded limit.\nLimit is currently set to " . ini_get('post_max_size') . ".\n";
    error_mail($msg . "Error occured in simulate simulate_1.\n");
    $results = array("error" => $msg . "Please contact the administrators via feedback if you feel this is in error or if you have need to process total file sizes greater than this limit.\n");
    $results['_status'] = 'failed';
    echo json_encode($results);
    exit;
}
$do_logoff = 0;
$window = "";
if (isset($_REQUEST['_window'])) {
    $window = $_REQUEST['_window'];
}
if (!isset($_SESSION[$window])) {
    $_SESSION[$window] = array("logon" => "", "project" => "");
}
if ($_REQUEST["_logon"] != $_SESSION[$window]['logon']) {
    $do_logoff = 1;
    unset($_SESSION[$window]['logon']);
<?php

header('Content-type: application/json');
# setup php session
session_start();
if (!isset($_SESSION['count'])) {
    $_SESSION['count'] = 0;
} else {
    $_SESSION['count']++;
}
if (!sizeof($_REQUEST)) {
    session_write_close();
    require_once "../mail.php";
    $msg = "[PHP code received no \$_REQUEST] Possibly total upload file size exceeded limit.\nLimit is currently set to " . ini_get('post_max_size') . ".\n";
    error_mail($msg . "Error occured in sys_config sys_file_manager.\n");
    $results = array("error" => $msg . "Please contact the administrators via feedback if you feel this is in error or if you have need to process total file sizes greater than this limit.\n");
    $results['_status'] = 'failed';
    echo json_encode($results);
    exit;
}
$do_logoff = 0;
$window = "";
if (isset($_REQUEST['_window'])) {
    $window = $_REQUEST['_window'];
}
if (!isset($_SESSION[$window])) {
    $_SESSION[$window] = array("logon" => "", "project" => "");
}
if ($_REQUEST["_logon"] != $_SESSION[$window]['logon']) {
    $do_logoff = 1;
    unset($_SESSION[$window]['logon']);
<?php

header('Content-type: application/json');
# setup php session
session_start();
if (!isset($_SESSION['count'])) {
    $_SESSION['count'] = 0;
} else {
    $_SESSION['count']++;
}
if (!sizeof($_REQUEST)) {
    session_write_close();
    require_once "../mail.php";
    $msg = "[PHP code received no \$_REQUEST] Possibly total upload file size exceeded limit.\nLimit is currently set to " . ini_get('post_max_size') . ".\n";
    error_mail($msg . "Error occured in admin jobintegritycheck.\n");
    $results = array("error" => $msg . "Please contact the administrators via feedback if you feel this is in error or if you have need to process total file sizes greater than this limit.\n");
    $results['_status'] = 'failed';
    echo json_encode($results);
    exit;
}
$do_logoff = 0;
$window = "";
if (isset($_REQUEST['_window'])) {
    $window = $_REQUEST['_window'];
}
if (!isset($_SESSION[$window])) {
    $_SESSION[$window] = array("logon" => "", "project" => "");
}
if ($_REQUEST["_logon"] != $_SESSION[$window]['logon']) {
    $do_logoff = 1;
    unset($_SESSION[$window]['logon']);
<?php

header('Content-type: application/json');
# setup php session
session_start();
if (!isset($_SESSION['count'])) {
    $_SESSION['count'] = 0;
} else {
    $_SESSION['count']++;
}
if (!sizeof($_REQUEST)) {
    session_write_close();
    require_once "../mail.php";
    $msg = "[PHP code received no \$_REQUEST] Possibly total upload file size exceeded limit.\nLimit is currently set to " . ini_get('post_max_size') . ".\n";
    error_mail($msg . "Error occured in admin jobmonitor.\n");
    $results = array("error" => $msg . "Please contact the administrators via feedback if you feel this is in error or if you have need to process total file sizes greater than this limit.\n");
    $results['_status'] = 'failed';
    echo json_encode($results);
    exit;
}
$do_logoff = 0;
$window = "";
if (isset($_REQUEST['_window'])) {
    $window = $_REQUEST['_window'];
}
if (!isset($_SESSION[$window])) {
    $_SESSION[$window] = array("logon" => "", "project" => "");
}
if ($_REQUEST["_logon"] != $_SESSION[$window]['logon']) {
    $do_logoff = 1;
    unset($_SESSION[$window]['logon']);
Exemple #11
0
                     $makedir = $target;
                     if (!mkdir($makedir, 0777, true)) {
                         $cont = ob_get_contents();
                         ob_end_clean();
                         $results["error"] = "Could not create directory " . $makedir . " " . $cont;
                         error_mail("sys_files.php\n" . "during delete make needed directories mkdir\n" . print_r($results, true) . "\n" . print_r(error_get_last(), true));
                         echo json_encode($results);
                         exit;
                     }
                     chmod($makedir, 0775);
                 }
                 if (!rename($file, "{$deldir}/{$file}")) {
                     $cont = ob_get_contents();
                     ob_end_clean();
                     $results["error"] = "Could not rename {$file} to {$deldir}/{$file} " . $cont;
                     error_mail("sys_files.php\n" . "during delete move file\n" . print_r($results, true) . "\n" . print_r(error_get_last(), true));
                     echo json_encode($results);
                     exit;
                 }
             }
             ob_end_clean();
             echo json_encode($dosend);
             exit;
         }
     }
     $results["error"] = "not yet";
     echo json_encode($results);
     exit;
 } else {
     getDirectory($is_spec_fc_dir);
 }
Exemple #12
0
<?php

header('Content-type: application/json');
# setup php session
session_start();
if (!isset($_SESSION['count'])) {
    $_SESSION['count'] = 0;
} else {
    $_SESSION['count']++;
}
if (!sizeof($_REQUEST)) {
    session_write_close();
    require_once "../mail.php";
    $msg = "[PHP code received no \$_REQUEST] Possibly total upload file size exceeded limit.\nLimit is currently set to " . ini_get('post_max_size') . ".\n";
    error_mail($msg . "Error occured in build build_1.\n");
    $results = array("error" => $msg . "Please contact the administrators via feedback if you feel this is in error or if you have need to process total file sizes greater than this limit.\n");
    $results['_status'] = 'failed';
    echo json_encode($results);
    exit;
}
$do_logoff = 0;
$window = "";
if (isset($_REQUEST['_window'])) {
    $window = $_REQUEST['_window'];
}
if (!isset($_SESSION[$window])) {
    $_SESSION[$window] = array("logon" => "", "project" => "");
}
if ($_REQUEST["_logon"] != $_SESSION[$window]['logon']) {
    $do_logoff = 1;
    unset($_SESSION[$window]['logon']);
Exemple #13
0
<?php

header('Content-type: application/json');
# setup php session
session_start();
if (!isset($_SESSION['count'])) {
    $_SESSION['count'] = 0;
} else {
    $_SESSION['count']++;
}
if (!sizeof($_REQUEST)) {
    session_write_close();
    require_once "../mail.php";
    $msg = "[PHP code received no \$_REQUEST] Possibly total upload file size exceeded limit.\nLimit is currently set to " . ini_get('post_max_size') . ".\n";
    error_mail($msg . "Error occured in analyze analyze_1.\n");
    $results = array("error" => $msg . "Please contact the administrators via feedback if you feel this is in error or if you have need to process total file sizes greater than this limit.\n");
    $results['_status'] = 'failed';
    echo json_encode($results);
    exit;
}
$do_logoff = 0;
$window = "";
if (isset($_REQUEST['_window'])) {
    $window = $_REQUEST['_window'];
}
if (!isset($_SESSION[$window])) {
    $_SESSION[$window] = array("logon" => "", "project" => "");
}
if ($_REQUEST["_logon"] != $_SESSION[$window]['logon']) {
    $do_logoff = 1;
    unset($_SESSION[$window]['logon']);
<?php

header('Content-type: application/json');
# setup php session
session_start();
if (!isset($_SESSION['count'])) {
    $_SESSION['count'] = 0;
} else {
    $_SESSION['count']++;
}
if (!sizeof($_REQUEST)) {
    session_write_close();
    require_once "../mail.php";
    $msg = "[PHP code received no \$_REQUEST] Possibly total upload file size exceeded limit.\nLimit is currently set to " . ini_get('post_max_size') . ".\n";
    error_mail($msg . "Error occured in interact interact_2.\n");
    $results = array("error" => $msg . "Please contact the administrators via feedback if you feel this is in error or if you have need to process total file sizes greater than this limit.\n");
    $results['_status'] = 'failed';
    echo json_encode($results);
    exit;
}
$do_logoff = 0;
$window = "";
if (isset($_REQUEST['_window'])) {
    $window = $_REQUEST['_window'];
}
if (!isset($_SESSION[$window])) {
    $_SESSION[$window] = array("logon" => "", "project" => "");
}
if ($_REQUEST["_logon"] != $_SESSION[$window]['logon']) {
    $do_logoff = 1;
    unset($_SESSION[$window]['logon']);
<?php

header('Content-type: application/json');
# setup php session
session_start();
if (!isset($_SESSION['count'])) {
    $_SESSION['count'] = 0;
} else {
    $_SESSION['count']++;
}
if (!sizeof($_REQUEST)) {
    session_write_close();
    require_once "../mail.php";
    $msg = "[PHP code received no \$_REQUEST] Possibly total upload file size exceeded limit.\nLimit is currently set to " . ini_get('post_max_size') . ".\n";
    error_mail($msg . "Error occured in tools data_interpolation.\n");
    $results = array("error" => $msg . "Please contact the administrators via feedback if you feel this is in error or if you have need to process total file sizes greater than this limit.\n");
    $results['_status'] = 'failed';
    echo json_encode($results);
    exit;
}
$do_logoff = 0;
$window = "";
if (isset($_REQUEST['_window'])) {
    $window = $_REQUEST['_window'];
}
if (!isset($_SESSION[$window])) {
    $_SESSION[$window] = array("logon" => "", "project" => "");
}
if ($_REQUEST["_logon"] != $_SESSION[$window]['logon']) {
    $do_logoff = 1;
    unset($_SESSION[$window]['logon']);