Пример #1
0
    print "   Apache SSL port = " . get_apache_ssl_port() . " In use by this server\n";
}
if (!apache_running() && get_apache_tracker() != "free" && ssl_enabled()) {
    print "   Apache SSL port = " . get_apache_ssl_port() . " Undefined!\n";
}
if (!apache_running() && get_apache_tracker() != "free" && !ssl_enabled()) {
    print "   Apache SSL port = " . get_apache_ssl_port() . " Undefined!\n";
}
if (apache_running() && get_apache_tracker() != "free" && !ssl_enabled()) {
    print "   Apache SSL port = " . get_apache_ssl_port() . " SSL Not enabled free to use\n";
}
if (port_in_use(get_apache_ssl_port()) && get_apache_tracker() == "free") {
    print "   Apache SSL port = " . get_apache_ssl_port() . " In use by another program.\n";
}
if (!port_in_use(get_apache_ssl_port()) && get_apache_tracker() == "free") {
    print "   Apache SSL port = " . get_apache_ssl_port() . " Is free to use\n";
}
//=== MySQL port
if (mysql_running() && get_mysql_tracker() != "free") {
    print "   MySQL port      = " . get_mysql_port() . " In use by this server\n";
}
if (!mysql_running() && get_mysql_tracker() != "free") {
    print "   MySQL port      = " . get_mysql_port() . " Undefined!\n";
}
if (port_in_use(get_mysql_port()) && get_mysql_tracker() == "free") {
    print "   MySQL port      = " . get_mysql_port() . " In use by another program.\n";
}
if (!port_in_use(get_mysql_port()) && get_mysql_tracker() == "free") {
    print "   MySQL port      = " . get_mysql_port() . " Is free to use.\n";
}
print "\n\n";
Пример #2
0
include_once "../main/includes/functions.php";
run_location_tracker();
// Have servers moved if moved update configuration
print "\n";
//=== If no parameters passed use defaults from config.inc.php
if ($argc == 2) {
    // Was a parameter passed
    $information = $argv[1];
    // yes:
} else {
    exit;
    // no: Give up
}
$mysql_port = get_mysql_port();
$apache_port = get_apache_port();
$ssl_port = get_apache_ssl_port();
//=== Display Admin Panel in browser ==========================================
if ($information == 1) {
    $command = "start http://localhost:{$apache_port}/apanel/";
    // display index page
    exec($command, $dummy, $return);
    // run command
    exit;
}
//=== Display phpMyAdmin in browser ==========================================
if ($information == 2) {
    $command = "start http://localhost:{$apache_port}/apanel/phpmyadmin/";
    // display index page
    exec($command, $dummy, $return);
    // run command
    exit;
Пример #3
0
print " #--------------------------------------------------------------------------------------------#\n\n";
//# == Var used
$avoid1 = '135';
# Avoid this port
$avoid2 = '445';
# Avoid this port
// Old and proposed new
$Apache_port_old = get_apache_port();
# Server port
$Apache_port = $Apache_port_old + 1;
# New Server port
# Avoid these ports
if ($Apache_port == $avoid1 || $Apache_port == $avoid2) {
    $Apache_port = $Apache_port + 1;
}
$Apache_ssl_port_old = get_apache_ssl_port();
# SSL Server port
$Apache_ssl_port = $Apache_ssl_port_old + 1;
# New SSL Server port
# Avoid these ports
if ($Apache_ssl_port == $avoid1 || $Apache_ssl_port == $avoid2) {
    $Apache_ssl_port = $Apache_ssl_port + 1;
}
$Apache_name_old = get_apache_exe();
# Apache executable name
# New Apache executable name
if (preg_match("/([a-zA-Z]+)(\\d*)(\\.exe)/", $Apache_name_old, $matches)) {
    $Apache_name = $matches[1] . ($matches[2] + 1) . $matches[3];
}
$Apache_service_name_old = $us_apache_service_name;
# Apache original service name