php.de

Zurück   php.de > Webentwicklung > PHP Einsteiger > PHP Tipps 2004

 
 
LinkBack Themen-Optionen Thema bewerten
Alt 26.08.2004, 19:50  
Gast
 
Beiträge: n/a
Standard Counter zeigt nach ca. 2-3 Stunden fehler an

Also ich habe einen User Online Rekord Counter!
Dieser funktioniert so ca. 2-3 Stunden super, dann kommt aber immer ne Fehlermeldung!

Zitat:
Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (11) in /home/stats/public_html/text.php on line 6

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/stats/public_html/text.php on line 7

Warning: mysql_query(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (11) in /home/stats/public_html/text.php on line 15

Warning: mysql_query(): A link to the server could not be established in /home/stats/public_html/text.php on line 15

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/stats/public_html/text.php on line 17

Warning: mysql_close(): no MySQL-Link resource supplied in /home/stats/public_html/text.php on line 50

Visits heute
Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (11) in /home/stats/public_html/text.php on line 6

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/stats/public_html/text.php on line 7

Warning: mysql_query(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (11) in /home/stats/public_html/text.php on line 15

Warning: mysql_query(): A link to the server could not be established in /home/stats/public_html/text.php on line 15

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/stats/public_html/text.php on line 17

Warning: mysql_close(): no MySQL-Link resource supplied in /home/stats/public_html/text.php on line 50

User Online
Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (11) in /home/stats/public_html/text.php on line 6

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/stats/public_html/text.php on line 7

Warning: mysql_query(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (11) in /home/stats/public_html/text.php on line 15

Warning: mysql_query(): A link to the server could not be established in /home/stats/public_html/text.php on line 15

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/stats/public_html/text.php on line 17

Warning: mysql_close(): no MySQL-Link resource supplied in /home/stats/public_html/text.php on line 50

Online Rekord
Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (11) in /home/stats/public_html/text.php on line 6

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/stats/public_html/text.php on line 7

Warning: mysql_query(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (11) in /home/stats/public_html/text.php on line 15

Warning: mysql_query(): A link to the server could not be established in /home/stats/public_html/text.php on line 15

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/stats/public_html/text.php on line 17

Warning: mysql_close(): no MySQL-Link resource supplied in /home/stats/public_html/text.php on line 50
Aber immer so nach ca. 2-3 Stunden! vorher funzt alles super!!

Hier is der komplette aktuelle Quellcode der counter.php

Zitat:
<?php

ob_start();

include('http://stats.gaming2.net/text.php?show=useronline&id=940'); // z.B. http://www.g2-stats.de/acc/count.php

$user_online = ob_get_contents();
ob_end_clean();

// pfad zur datei, die den tageshöchststand speichert
$p_daycounter='counter_day.log';

if (!file_exists($p_daycounter))
{ $fh=fopen($p_daycounter, 'w'); fwrite($fh, date("d.m.y").'#0'); fclose($fh); }

//neuer Teil nur echt von bLaSpHeMy :X

$data = explode('#',file_get_contents($p_daycounter));

if($user_online > $data[1])
{
$fh=fopen($p_daycounter, 'w');
fwrite($fh, date("d.m.y").'#'.$user_online);
fclose($fh);

$daycounter = $user_online;
$daycounterdate = 'Today';
}
else
{
$daycounter = $data[1];
$daycounterdate = $data[0];
}

// ausgabe der besucherdaten
echo 'Online Rekord '.$daycounter;

?>
Wenn der fehler da is, lad ich einfach die "counter_day.log" neu hoch und es funzt wieder ne gewisse Zeit... woran liegt das??

Bitte helft mir!!
 
Sponsor Mitteilung
PHP Code Flüsterer

Registriert seit: 21.08.2005
Beiträge: 4682
PHP-Kenntnisse:
Fortgeschritten

Alt 26.08.2004, 19:57  
Gast
 
Beiträge: n/a
Standard

Fällt dir was auf ?

Die Fehler beziehen sich auf fehlschlagende MySQL-Befehle, obwohl in deinem Script nichts von MySQL kommt, der Fehler scheint somit in der Datei zu liegen, die du includest !
 
Alt 26.08.2004, 20:08  
Gast
 
Beiträge: n/a
Standard

Also ich include : http://stats.gaming2.net/text.php?sh...ronline&id=940

Des is ein rankingsystem mit Besucherzähler dabei!
Der besucherzähler von gaming2 funzt aber super!?!
 
 


Themen-Optionen
Thema bewerten
Thema bewerten:

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are an
Gehe zu

Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
bitte hilfe! mysql fehler meldung: basicx PHP Tipps 2008 2 22.07.2008 16:36
Counter Script bringt Fehler Almond PHP Tipps 2006 6 13.06.2006 10:03
[Erledigt] Counter script, kleiner OOP fehler? PHP-Fortgeschrittene 10 30.11.2005 22:34
ein counter - und berechnungen netti PHP Tipps 2005-2 11 24.10.2005 21:03
Seite wird nicht angezeigt, untersch. Fehler bei IE/FF/Safar PHP-Fortgeschrittene 19 31.05.2005 14:52
Blöder MySQL Fehler PHP Tipps 2005 3 15.05.2005 03:14
Fehlermeldung - aber kein fehler... Tschuu HTML, Usability und Barrierefreiheit 16 14.03.2005 15:56
Counter funktioniert, aber trotzdem wird Fehler gezeigt ... PHP Tipps 2005 4 07.03.2005 17:56
Counter für registrierte user PHP Tipps 2004-2 3 26.12.2004 11:32
[Erledigt] mysql fehler PHP Tipps 2004 2 03.11.2004 00:32
Hilfe ich finde den Fehler nicht! PHP Tipps 2004 2 07.10.2004 17:40
array_push nur in begrenzter Anzahl ausführen ? PHP Tipps 2004 2 07.09.2004 09:05
mysql_real_escape_string - Fehler Schaelle Datenbanken 0 03.07.2004 23:32
[Erledigt] Fehler bei Counter (T_LNUMBER) PHP Tipps 2004 2 20.06.2004 11:11
Problem mit einem Counter JeeZ PHP Tipps 2004 6 18.06.2004 13:36

Besucher kamen über folgende Suchanfragen bei Google auf diese Seite
mysql_query(): 6 is not a valid mysql-link resource in, warning: mysql_select_db(): 2 is not a valid mysql-link resource, fehler warning: mysql_query(): supplied argument is not a valid mysql-link resource in, warning: mysql_select_db(): 3 is not a valid mysql-link, warning: mysql_select_db(): 3 is not a valid mysql-link resource, warning: mysql_close(): 2 is not a valid mysql-link resource in, warning: mysql_close(): 3 is not a valid mysql-link resource in, php warning: mysql_query(): 6 is not a valid mysql-link resource in, \can\'t connect to local mysql server through socket \'/var/run/mysqld/mysqld.sock\' (11)\

Alle Zeitangaben in WEZ +1. Es ist jetzt 17:26 Uhr.




Powered by vBulletin® Version 3.7.2 (Deutsch)
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
Aprilia-Forum, Aquaristik-Forum, Liebeskummer-Forum, Zierfisch-Forum, Geizkragen-Forum

Creative Commons License
Dieser Inhalt ist unter einer Creative Commons-Lizenz lizenziert.