*

Recent

Author Topic: Warning (file not found) in stats counter  (Read 5314 times)

bad wolf

  • Newbie
  • *
  • Posts: 2
  • Force: +0/-0
Warning (file not found) in stats counter
« on: August 17, 2009, 04:18:58 PM »
I have just downloaded this script for the first time. Everything has been going along fine, but I ran into this warning when I logged into my site for the first time;
Total Games: 0
Total Users: 1
Total Categories: 2
Total Comments: 0
Total Hits:
Warning: include(/public_html/tournamentcity/includes/counter.php) [function.include]: failed to open stream: No such file or directory in /home/ocv/public_html/tournamentcity/templates/default/footer.php on line 59

Warning: include() [function.include]: Failed opening '/public_html/tournamentcity/includes/counter.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ocv/public_html/tournamentcity/templates/default/footer.php on line 59

Users Online: 2872

Its also reading 2872 users online. I could only wish I had that many visitors to any of my sites at the same time-LOL
  Does any one know what I will need to do to fix this problem?

kurt

  • Developer
  • Hero Member
  • ******
  • Posts: 634
  • Force: +16/-1
Re: Warning (file not found) in stats counter
« Reply #1 on: August 17, 2009, 04:35:04 PM »
Hmmmm strange. I just checked to make sure that the file counter.php is in the zip file, and it is. The file is easy to make though, here are the contents

Code: [Select]


<?php
$count_my_page 
= ("hitcounter.txt");
$hits file($count_my_page);
$hits[0] ++;
$fp fopen($count_my_page "w");
fputs($fp "$hits[0]");
fclose($fp);
echo 
$hits[0];
?>




It will also need a file named hitcounter.txt with the simple contents of 1 line with the number 0 as the only thing in it. The script will change that as visitors come.

The number of users online problem that some servers have is addressed in another thread already, here

http://freearcadescript.net/forums/index.php/topic,215.0.html


Be warned though, it may affect other things running on your server.

Let me know how it goes.


Edited in:
Almost forgot, the files mentioned above need to be in the folder /includes

« Last Edit: August 17, 2009, 04:49:14 PM by Mr. Cashew »

bad wolf

  • Newbie
  • *
  • Posts: 2
  • Force: +0/-0
Re: Warning (file not found) in stats counter
« Reply #2 on: August 17, 2009, 05:06:31 PM »
Well I gave that a shot and nothing changed. There seems to be a problem on line 59 in footer.php
 Here is the code I have at that line;

Total Hits: <?php include ("$directorypath/includes/counter.php"); ?><br />

I no nothing about coding but I have an idea that I need to write $directorypath differently. What do you think?

kurt

  • Developer
  • Hero Member
  • ******
  • Posts: 634
  • Force: +16/-1
Re: Warning (file not found) in stats counter
« Reply #3 on: August 17, 2009, 05:40:46 PM »
directory path is one of the settings in your admin panel. It usually reads something along the lines of

/home/ocv/public_html/

but going by what you wrote earilier it looks like you set up the arcade script in a subfolder so it might need to be written as

/home/ocv/public_html/tournamentcity/

If the files are already there, it might be that it needs to have the permissions set to 777 as well. What's the URL to your site so I can take a look at it?