Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Ping mit PHP

Empfohlene Antworten

Moin,

ich möchte mit einem PHP Script einen Ping startet um zu gucken ob mein Ventriloserver online ist.

Wie führe ich über php einen ping aus (script wird dann auf einem linux debian server laufen) und wie ermittle ich das ergebnis ?

danke,

<?php

$Meldung=exec("ping -n 1 web.de", $RueckgabeProgramm, $RueckgabeStatus);

echo$Meldung,

	"<br><br>";

if($RueckgabeStatus==0)

{

	echo"<font color=\"green\">Ping erfolgreich</font>";

}

else

{

	echo"<font color=\"red\">Ping nicht erfolgreich</font>";

}

?>

das script funktioniert - nur nicht auf meinem debian :(

www.4insiders.net/testping.php

rechte sind auf lesen/schreiben/ausführen für alle gesetzt. und ich bekomme halt keine fehlermeldung :(

ist nen vserver auf den ich root rechte habe . perl ist verfügbar ob im safe mod läuft weiß ich jetzt nicht

/var/www/empty//ping: Permission denied

das finde ich im error.log

[Knight']/var/www/empty//ping: Permission denied

das finde ich im error.log

Der Pfad /var/www/empty wird üblicherweise von Confixx genutzt. Für die Rückgabe von Programmen sowie als Pfad zur ausführung von Programmen wird dieser Pfad genutzt, solange der Safemode eingeschaltet ist.

Evtl. kann hier ein Absoluter Pfad wie carstenj schon geschrieben hat helfen, das weiss ich selber nicht so genau. Aber solltest du Conifxx auf deinem Server fahren, dann solltest du mal den Safemode ausschalten.

direkte pfadangabe bringt nix .. wo stelle ich den safemod aus ?

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.