Announcement

Collapse
No announcement yet.

why does basic counter reset itself?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • George L
    replied
    nevermind.. mysql counter -> http://vbulletin.com/forum/showthrea...threadid=26527

    Leave a comment:


  • George L
    replied
    Originally posted by The Prohacker
    That can depend on your server configuration, usually 666 will do, but sometimes depending on apache usually you have to chmod 777, its worth a try if your on a dedicated server, so its not a big insecurity....

    [edit]

    I would also not suggest you install this on your anime forums, because of their high usage, this scirpt can run up your cpu and hdd usage horribly. For it to work effectivly, you would want it to not only log the hit, but also the IP, so only one hit is recorded per IP, you would want to do this with MySql of course...

    [/edit]
    yeah just messing around trying to learn some php

    for now my dual p3 866, 768mb server can handle the load hehe

    next step is learning to put that into a mysql database

    Leave a comment:


  • The Prohacker
    replied
    That can depend on your server configuration, usually 666 will do, but sometimes depending on apache usually you have to chmod 777, its worth a try if your on a dedicated server, so its not a big insecurity....

    [edit]

    I would also not suggest you install this on your anime forums, because of their high usage, this scirpt can run up your cpu and hdd usage horribly. For it to work effectivly, you would want it to not only log the hit, but also the IP, so only one hit is recorded per IP, you would want to do this with MySql of course...

    [/edit]
    Last edited by The Prohacker; Sun 26 Aug '01, 3:33pm.

    Leave a comment:


  • George L
    replied
    i chmodded it to 666 isn't that sufficient?

    Leave a comment:


  • The Prohacker
    replied
    Make sure counterfile.txt is chmod'd 777, other than that it works just fine:
    www.virix.com.kg/counter/

    Leave a comment:


  • George L
    started a topic why does basic counter reset itself?

    why does basic counter reset itself?

    okay i put a basic counter on my vb forums, i placed this in phpinclude template
    PHP Code:
    $counterfile "counterfile.txt";
    if(!(
    $fp = @fopen($counterfile,"r"))) die ("cannot open counter file");
    $thecounter = (int) fread($fp20);
    fclose($fp);
    $thecounter++;
    $fp fopen($counterfile"w");
    fwrite($fp $thecounter);
    fclose($fp); 
    and referenced in my footer template

    $thecounter

    works for a while but resets itself ???

    would changing to
    PHP Code:
    fread($fp1024*1024); 
    help?
    Last edited by George L; Sun 26 Aug '01, 1:52pm.

Related Topics

Collapse

  • gbrain
    Proxy IP Header
    by gbrain
    Hi, does this still work in V5 or was this feature removed .

    We just upgraded from 4 to 5 and I included this section but it does not seem to be working any more ?

    thanks...
    Sun 25 Jan '15, 8:11am
Working...
X