Function php hiba Segíts.
Hiba: Warning: ssh2_connect() [function.ssh2-connect]: Error starting up SSH connection(-3): Error sending banner to remote host in /var/www/webadmin/adatbazis/funkciok.php on line 133
Warning: ssh2_connect() [function.ssh2-connect]: Unable to connect to 95.140.32.34 in /var/www/webadmin/adatbazis/funkciok.php on line 133
Warning: ssh2_auth_password() expects parameter 1 to be resource, boolean given in /var/www/webadmin/adatbazis/funkciok.php on line 134
Warning: ssh2_exec() expects parameter 1 to be resource, boolean given in /var/www/webadmin/adatbazis/funkciok.php on line 138
Warning: stream_set_blocking(): supplied argument is not a valid stream resource in /var/www/webadmin/adatbazis/funkciok.php on line 139
Warning: stream_get_contents() expects parameter 1 to be resource, boolean given in /var/www/webadmin/adatbazis/funkciok.php on line 141
Warning: fclose(): supplied argument is not a valid stream resource in /var/www/webadmin/adatbazis/funkciok.php on line 153
Warning: ssh2_connect() [function.ssh2-connect]: Error starting up SSH connection(-3): Error sending banner to remote host in /var/www/webadmin/adatbazis/funkciok.php on line 133
Warning: ssh2_connect() [function.ssh2-connect]: Unable to connect to 95.140.32.34 in /var/www/webadmin/adatbazis/funkciok.php on line 133
Warning: ssh2_auth_password() expects parameter 1 to be resource, boolean given in /var/www/webadmin/adatbazis/funkciok.php on line 134
Warning: ssh2_exec() expects parameter 1 to be resource, boolean given in /var/www/webadmin/adatbazis/funkciok.php on line 138
Warning: stream_set_blocking(): supplied argument is not a valid stream resource in /var/www/webadmin/adatbazis/funkciok.php on line 139
Warning: stream_get_contents() expects parameter 1 to be resource, boolean given in /var/www/webadmin/adatbazis/funkciok.php on line 141
Warning: fclose(): supplied argument is not a valid stream resource in /var/www/webadmin/adatbazis/funkciok.php on line 153
■ Warning: ssh2_connect() [function.ssh2-connect]: Unable to connect to 95.140.32.34 in /var/www/webadmin/adatbazis/funkciok.php on line 133
Warning: ssh2_auth_password() expects parameter 1 to be resource, boolean given in /var/www/webadmin/adatbazis/funkciok.php on line 134
Warning: ssh2_exec() expects parameter 1 to be resource, boolean given in /var/www/webadmin/adatbazis/funkciok.php on line 138
Warning: stream_set_blocking(): supplied argument is not a valid stream resource in /var/www/webadmin/adatbazis/funkciok.php on line 139
Warning: stream_get_contents() expects parameter 1 to be resource, boolean given in /var/www/webadmin/adatbazis/funkciok.php on line 141
Warning: fclose(): supplied argument is not a valid stream resource in /var/www/webadmin/adatbazis/funkciok.php on line 153
Warning: ssh2_connect() [function.ssh2-connect]: Error starting up SSH connection(-3): Error sending banner to remote host in /var/www/webadmin/adatbazis/funkciok.php on line 133
Warning: ssh2_connect() [function.ssh2-connect]: Unable to connect to 95.140.32.34 in /var/www/webadmin/adatbazis/funkciok.php on line 133
Warning: ssh2_auth_password() expects parameter 1 to be resource, boolean given in /var/www/webadmin/adatbazis/funkciok.php on line 134
Warning: ssh2_exec() expects parameter 1 to be resource, boolean given in /var/www/webadmin/adatbazis/funkciok.php on line 138
Warning: stream_set_blocking(): supplied argument is not a valid stream resource in /var/www/webadmin/adatbazis/funkciok.php on line 139
Warning: stream_get_contents() expects parameter 1 to be resource, boolean given in /var/www/webadmin/adatbazis/funkciok.php on line 141
Warning: fclose(): supplied argument is not a valid stream resource in /var/www/webadmin/adatbazis/funkciok.php on line 153
<?php
function mysql_kapcsolodas(){
include("adatbazis/beallitasok.php");
mysql_connect($rendszer["mysql"]["kiszolgalo"],$rendszer["mysql"]["felhasznalo"],$rendszer["mysql"]["jelszo"]);
mysql_select_db($rendszer["mysql"]["adatbazis"]);
}
function kiiras($szoveg, $tipus){
if($tipus == 1){
$szin = "#FFCECE";
}elseif($tipus == 2){
$szin = "#DFFFE3";
}
echo("<br /><center><div style=\"padding:5px 5px 5px 5px; background-color:$szin; width:90%;\">
<div style=\"padding:3px 3px 3px 3px; background-color:#FFF; border:dashed 1px; text-align:center;\">
$szoveg
</div>
</div></center><br />");
}
function logolas($szoveg){
//id felhasznalo log ip
if(!$_SESSION["user"]["felhasznalonev"]){
$felhasznalonev = "ismeretlen";
}else{
$felhasznalonev = $_SESSION["user"]["felhasznalonev"];
}
mysql_query("INSERT INTO log (felhasznalo, log, ip) VALUES ('" . $_SESSION["user"]["felhasznalonev"] . "','" . $szoveg . "','" . $_SERVER["REMOTE_ADDR"] . "')");
}
function szervertipus($tipus){
$sql = mysql_query("SELECT * FROM tipusok WHERE rovid='" . $tipus . "'");
$arr = mysql_fetch_assoc($sql);
echo $arr["" . $tipus . ""];
}
function idoszamlalo($datum){
$exp = explode(" ", $datum);
$eleje = $exp["0"];
$vege = $exp["1"];
$exp = explode("-", $eleje);
$exp2 = explode(":", $vege);
$day = $exp["2"];
$month = $exp["1"];
$year = $exp["0"];
$hour = $exp2["0"];
$minute= $exp2["1"];
$second= $exp2["2"];
$calculation = ((mktime ($hour,$minute,$second,$month,$day,$year) - time(void))/3600);
$hours = (int)$calculation;
$day = $hours/24;
$day = explode(".", $day);
$day = $day["0"];
if($hours <= 0){
if($hours > -24){
$hours = explode("-", $hours);
$hours = $hours["1"];
return("<font color=\"red\">lejárt $hours órája</font>");
}else{
return("<font color=\"red\">lejárt $day napja</font>");
}
}elseif($hours <= 24){
return("$hours óra");
}else{
return("$day nap");
}
}
function idoszamlalo2($datum){
$exp = explode(" ", $datum);
$eleje = $exp["0"];
$vege = $exp["1"];
$exp = explode("-", $eleje);
$exp2 = explode(":", $vege);
$day = $exp["2"];
$month = $exp["1"];
$year = $exp["0"];
$hour = $exp2["0"];
$minute= $exp2["1"];
$second= $exp2["2"];
$calculation = ((mktime ($hour,$minute,$second,$month,$day,$year) - time(void))/3600);
$hours = (int)$calculation;
$day = $hours/24;
$day = explode(".", $day);
$day = $day["0"];
if($hours <= 0){
return 0;
}else{
return 1;
}
}
function parancsfuttatas($futip, $futparancs, $futlog){
include("adatbazis/beallitasok.php");
if(!$futip or !$futparancs){
echo("Üresen maradt néhány olyan fontos információ, ami nélkül nem lehet parancsot futtatni!");
}else{
$kapcsolodas = ssh2_connect($futip, 22);
ssh2_auth_password($kapcsolodas,$rendszer["ssh2"]["felhasznalo"],$rendszer["ssh2"]["jelszo"]);
$cmd = "$futparancs";
$parancs = ssh2_exec($kapcsolodas, $cmd);
stream_set_blocking($parancs, true);
$kimenet = stream_get_contents($parancs);
if($futlog == OFF){
return("$kimenet");
}else{
kiiras("$kimenet", 2);
}
if($futlog !== "OFF"){
logolas("$futlog");
}
fclose($parancs);
}
}
?>
SSH
Tudom, hogy egy "kismiska"
Ejj weblabor, kezditek elveszteni a minőséget... (Ezt a fórumra értem csak, a többi 5*:)
off
De az is ha el "offolják" a témát.
Bocsánat az OFF-ért!