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.

Counter Problem, bitte um Hilfe!

Empfohlene Antworten

Veröffentlicht

ich habe bei mir einen counter unter verwendung von WIN NT installiert, der gibt mir jedoch die folgende Fehlermeldung heraus:

Warning: open(/tmp\sess_d85149cf163e3b9143cb6181d19e8a28, O_RDWR) failed: m (2) in c:\programme\apache group\apache\htdocs\counter\counter.php on line 27

Jinx M's simple hit counter thingy.

Weiss jemand was da falsch ist?

Hier ist der counter.php - Script:

<?

##########################################

# #

# Jinx M's Basic Hit Counter #

# #

# www.jinxm.co.uk spam@jinxm.co.uk #

# #

##########################################

###############################################################################################

#

# Although there are probably better ways of doing this, I had to work it out for myself.

# Its a simple script looking at it now, yes, but working out how to do it was a learning

# process for me.

#

# So please, don't pass this script off as your own work or make money out of it in any way.

# If you distribute it, please distributed it along with the readme.txt file.

#

###############################################################################################

#version 1.0

# Righto, get all the variables and stuff from the edit.me file

include ('edit.me');

# set a session ID

session_start();

# This is the bit which adds to the count.txt file

if ($count_what == 'visitors') {

# First it creates a session Id for each visit so that it counts

# visits rather than how many times a page is loaded.

if (!$PHPSESSID) {

$thefile = file("count.txt");

$count = implode("", $thefile);

$count++;

$myfile = fopen("count.txt","w");

fputs($myfile,$count);

fclose($myfile);

}

# done

}

else {

# Else it will count every page load

$thefile = file("count.txt");

$count = implode("", $thefile);

$count++;

$myfile = fopen("count.txt","w");

fputs($myfile,$count);

fclose($myfile);

}

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>

<head>

<title>Text Counter</title>

</head>

<body bgcolor="Black" text="Silver">

Jinx M's simple hit counter thingy.

<p>You have had:

<!-- Now read the count.txt file and print it -->

<!-- You can surround this with HTML like <font> tags or whatever -->

<?

$thefile = file("count.txt");

$count = implode("", $thefile);

# now print either the text version...

if ($print_what == 'text') {

print $count;

}

#else print graphics

else {

$num = strlen ($count);

$i = 0;

while ($i < $num) :

$graphic = substr ($count, $i, 1);

print "<img src=\"$url/$graphic.$ext\" border=\"0\" alt=\"$graphic\">";

$i++;

endwhile;

}

?>

hits.</p>

</body>

</html>

Kann es sein, daß du auf dem Server kein "tmp"-Verzeichnis hast? So wie ich das sehe, kann das Script eigentlich nur die Session nicht öffnen, weil es sie in dem Verzeichnis nicht findet... idR. brauchst du da nur ein Verzeichnis namens tmp anlegen - bei Windows normalerweise direkt auf C!

<FONT COLOR="#a62a2a" SIZE="1">[ 10. Oktober 2001 15:56: Beitrag 1 mal editiert, zuletzt von beetFreeQ ]</font>

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.