If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
Daily counter 1.1 Output/intallation problems  XML
Forum Index » Support Forum
Author Message
Anonymous



first of all, do this script needs MySQL or does it uses "flatfiles" ( I've searched the archive with keaword daily counter 1.1 and I saw a similiar topic, but didnt found any good answer).
For me, this:
$COUNT_DB["dbName"] = "your_db";
$COUNT_DB["host"] = "localhost";
$COUNT_DB["user"] = "root";
$COUNT_DB["pass"] = "";
(from file config.inc.php)
make me believe I need a database like mysql. If so, I assume I need to fill in my eventual password, the name of the database etc ( maybe someone can explain terms like "root", "localhost" and so on.)
Anyway, I read the readme file for this script, chmod'ed the given files, my server supports php, and all the output on my page is the digits "11"
why? (is there a connection between this output and the daily.txt file?)When I try to run (at my computer) the demo-file demo.php which follows the zipfile, it won't run, why?
I use the php code given in the readme file in a .php site, not html, so thats not a problem.
Hope someone could give me a good explanation on how to get this, in my opinion, great and powerful script, working at my site.
Regards from norway
ET
Graduate

Joined: 21/02/2003 22:17:48
Messages: 179
Offline

If you want to use the flat files - don't fill in the MySQL database information - it can use flat files if you would rather use flat files.

There are some other instructions on Daily Counter that I have added on the forum here if you run a search.

One major problem with the daily counter using the txt files is the fact that it will not reset back to "1" at the beginning of the new day - I have written a fix for that.

If you continue to have problems with the script after running a search for daily count, let me know if you are getting any error notices and what they are.

---------------
Anonymous



Ok, I've gone thru the different scriptfiles and things are starting to go better. I've also did a search for daily count as you said, and it helped a little.

Now, it looks like the script are installed correctly at my site, the table showing total visits, date and visitors today shows up. BUT: when I use the visitors link to see the table containing iformation about visitors IP adress, time and hostname, there is som malfunctions:
The table shows up in the 420*210 size. BUT:
The visitors actual time of visit, ip adr. and host isnt there, only the pre-set titles of the columns ("time, ipadress, host").
So why doesnt the program output the values of the visitors time, ip.adr and host? (I dont get error notices)


I also have another Q:
What do you recommend: MySQL or flatfiles? Whats the advantages and drawbacks with both of them?
As i understand from the file visitors.php, the file creates a file called logfile if you dont use mysql, is that right? Is this a txt file?
What will it contain?: all times, ip adress and host from todays visits, or all visits from day one or none of these suggestions?
Now I use flatfiles.

You said: "One major problem with the daily counter using the txt files is the fact that it will not reset back to "1" at the beginning of the new day - I have written a fix for that"
I believe I need this fix?
Best regards
RFM
ET
Graduate

Joined: 21/02/2003 22:17:48
Messages: 179
Offline

Anonymous wrote:
Now, it looks like the script are installed correctly at my site, the table showing total visits, date and visitors today shows up. BUT: when I use the visitors link to see the table containing iformation about visitors IP adress, time and hostname, there is som malfunctions:
The table shows up in the 420*210 size. BUT:
The visitors actual time of visit, ip adr. and host isnt there, only the pre-set titles of the columns ("time, ipadress, host").
So why doesnt the program output the values of the visitors time, ip.adr and host? (I dont get error notices)


I also have another Q:
What do you recommend: MySQL or flatfiles? Whats the advantages and drawbacks with both of them?

As i understand from the file visitors.php, the file creates a file called logfile if you dont use mysql, is that right? Is this a txt file?
What will it contain?: all times, ip adress and host from todays visits, or all visits from day one or none of these suggestions?
Now I use flatfiles.

You said: "One major problem with the daily counter using the txt files is the fact that it will not reset back to "1" at the beginning of the new day - I have written a fix for that"
I believe I need this fix?


Re: So why doesnt the program output the values of the visitors time, ip.adr and host?


I am assuming that you have the visitor.php and the flat files in the same directory? Make certain that you have the correct file paths typed in for the /* textfile settings */ of the config.inc.php - if you have the visitor.php and the text files all in the same directory, it should pull it right up. If you do not have the visitor.php in the same directory, it needs the correct path information typed into the config.inc.php

What do you recommend: MySQL or flatfiles? Whats the advantages and drawbacks with both of them?
If you get under 1000 hits per day on your site, the flat files are fine The perks with flatfiles is that they are easy to set up and get running - The drawback is that you might miss 5 or 10 counts during the day if two visits hit the site at the exact same time. The perks with MySQL is the speed - the drawbacks are the confusion of creating the tables and making certain that it is working correctly.

As i understand from the file visitors.php, the file creates a file called logfile if you dont use mysql, is that right
The logfile for the flat files is the "ip.txt" file - it writes the data into the file for the amount of time you have requested in the config.inc.php -
for example the above time block (1800) holds it in the file for 30 minutes - and you can see the other numbers listed in my example - the time is based on the total number of seconds.

I believe I need this fix?
The fix is kinda complex in that it involves removing some portions of the original script and inserting the mod elsewhere on the page - so it is not one I can just post on here and feel comfortable that people would understand - I can email it to you -

PS - I had emailed the fixed script to the author (Chi Kien Uong) a month ago, but I don't think he has actually added the mod to the script - I'll double check real quick - if I see it changed in the current download - I'll let you know.

---------------
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

If you opt to use MySQL may I recommend a script called SilverCounter. I used it once and found simple to use.

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
ET
Graduate

Joined: 21/02/2003 22:17:48
Messages: 179
Offline

Okay - I just checked the current dailycounter download and it still does not contain the mod to fix the new day reset. The problem involves the manner that he has the count on the line after the date in the daily.txt and the inability to remove the entire line, so it only replaces the first number in the sequence to 1 - that's fine if you never have more than 9 people visit your site so if you had 99 visitors for the day, the new day would start with 19 or 375 visitors for the day, the new day would start with 175, etc.

My mod wipes out the entire file contents of daily.txt at midnight to start all over.

---------------
Anonymous



Thank you ET! I was so stupid that I forgotten I had all the files in the same directory, so I had wrote the path to the directory in config.inc.php for the textfile settings, and that was the mistake!
Could you please send me the daily count script modification you have made?
Also when I did a search in the archive, I saw that in one of your previous posts, you wrote about another script modification you had made at the animated counter, and here your script enabled the F5 refresh key function which allows users to increase the counter all the time.
I would be very glad if you can send me that script too!
I also appriciate the good information you gave me about mysql and flat files!
Thanks for the time block information!
My email: rmosta@student.umb.no
Anonymous



Anonymous wrote:Thank you ET! I was so stupid that I forgotten I had all the files in the same directory, so I had wrote the path to the directory in config.inc.php for the textfile settings, and that was the mistake!
Could you please send me the daily count script modification you have made?
Also when I did a search in the archive, I saw that in one of your previous posts, you wrote about another script modification you had made at the animated counter, and here your script enabled the F5 refresh key function which allows users to increase the counter all the time.
I would be very glad if you can send me that script too!
I also appriciate the good information you gave me about mysql and flat files!
Thanks for the time block information!
My email: rmosta@student.umb.no


PS: It looks like the script only registered the first time I wisited my site, because if I use other computers with different IP's, it wont log that. Also, it doesnt seems like the update function of the table works, and I think maybe this is the problem related to missing log output? So it doesnt update itself every minute, like it should. As I saw yesterday, this one update in minute function worked then, but apperiantly not now... Where is the error? I really cant understand this.
Also, I of course has the "wont set back to 1 at the new day if more than 10 visits yestaerday". But as I can see I also have trouble with the total visits number: today it went back to one or two visits. Was that because I uploaded config.inc.php again?
There are much errors here....
ET
Graduate

Joined: 21/02/2003 22:17:48
Messages: 179
Offline

When you included the directory path, did you also include that path for your inclusion at the top of each page that you want the counter to use for counting?

I wrote up a basic installation page that should help to explain the installation process. Let me know if you continue to have problems after reading / following those instructions.

http://proxy2.de/forum/viewtopic.php?p=14438#14438

---------------
ET
Graduate

Joined: 21/02/2003 22:17:48
Messages: 179
Offline

Anonymous wrote:Also when I did a search in the archive, I saw that in one of your previous posts, you wrote about another script modification you had made at the animated counter, and here your script enabled the F5 refresh key function which allows users to increase the counter all the time.
I would be very glad if you can send me that script too!

Hoping it all helps -

Okay - the daily counter script is in the mail.

I did not write any mods for the animated counter so I can't help you there.

Good luck

PS - update - the email was returned to me as undeliverable to that address.
The zip file went through my virus scan before being sent - so I guess your end has blocked is as suspect.... sorry!

---------------
Anonymous



Ok, now it finally seems to work correctly.
There are some new Q's I have:
Is it possible to rebuild the script to show weekly/ monthly hits instead of daily hits?
You see, at my webpage it's currently 2-5 visitors a day in average, and for such small numbers, I would get a MUCH better knowing of traffic at my site, with a file/ display containing visitors over a bigger time ( To avoid visit my page every day just to look at 2 visitors ips and hosts at the list)
Could you try to email the the modification you have made at mette.oyvind@c2i.net instead?
Also, I have get myself a mysql database, and I wondered:

If I manage to install the script running with mysql, will there be a logfile where I can see total hits from day one, because, if so, it's not that important to have rebuild the script to "weekly/monthly counter" .
I ask this because I want to see the data, but avoid log onto my computer and connect to internet every day just for see this data.
But, I guess, another way to do this, would be to set an laaaarge value for the block time? If I set block time to one year, would ip.txt contain all ip's, host's and times from the last year?

Do you have any site you recommend for setting up this script to work with mysql, eventually, any site where I can learn to create the tables i need etc.?
ET
Graduate

Joined: 21/02/2003 22:17:48
Messages: 179
Offline

Anonymous wrote:Ok, now it finally seems to work correctly.
There are some new Q's I have:
Is it possible to rebuild the script to show weekly/ monthly hits instead of daily hits?
It is not worth the effort on my part to rewrite this script for that purpose. for that type of information, I use the perl script available from this site called "access stats" - but it requires a cgi-bin


Could you try to email the the modification you have made

I sure can try.

Also, I have get myself a mysql database, and I wondered:

If I manage to install the script running with mysql, will there be a logfile where I can see total hits from day one,
It would start from the point in which you created the tables and converted the traffic to be recorded in the database. However, you could get into your database to modify/look at the total number v. daily number just like you can currently do in the total_visits.txt and the daily.txt files.

I ask this because I want to see the data, but avoid log onto my computer and connect to internet every day just for see this data.
Like stated above, the access stats will allow you to check the information in this manner and it can work in conjunction with the daily counter without any problems.

But, I guess, another way to do this, would be to set an laaaarge value for the block time? If I set block time to one year, would ip.txt contain all ip's, host's and times from the last year?
You could try, but it would kinda defeat its purpose if several different visitors visited your site from the same IP.... The access stats script would do a much better job for you in that area. If you need to stay with php, then I'm betting that there are some php scripts out there that do the same thing.

Do you have any site you recommend for setting up this script to work with mysql, eventually, any site where I can learn to create the tables i need etc.?
I don't know of any sites - I learned by a few costly mistakes on how to create tables - A suggestion would be to use google.com with the keywords - prepare mysql database tables

---------------
Anonymous



ET: the email adress I gave you was my home-adress, and when my father opened the inbox, he deleted your mail as he was sure it was a spam!
I told him explicitly that he should next time ask me so I could
check before anything is deleted. If it's not much extra trouble for you,
can I ask you to do one last attempt to send me the script mod for daily counter?
Sometimes things obviously are'nt easy...
Best regards RFM
ET
Graduate

Joined: 21/02/2003 22:17:48
Messages: 179
Offline

Okay - script has been emailed, for the last time....

---------------
Cosmic
Beginner

Joined: 23/05/2006 11:03:21
Messages: 21
Offline

Carbonize wrote:If you opt to use MySQL may I recommend a script called SilverCounter. I used it once and found simple to use.


Old advice, but I just might take it.
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum