counter for webpage not working

Post your Click counter digestion problems here
Post Reply
bams
Posts: 6
Joined: Thu Jul 12, 2012 6:59 pm

counter for webpage not working

Post by bams »

Script URL: http://localhost/counter/counter.php?page=test
Version of script: got it from counter14.zip
Hosting company: NA
URL of phpinfo.php: NA
URL of session_test.php: NA
What terms did you try when SEARCHING for a solution:

Write your message below:

Hi,

I am working in a small firm, wanted to put up a counter for a video web page. I am using IIS as web server on my laptop, installed php 5.4 and uploaded counter.

I changed permissions to the counter folder, tried checking if php works. Still I am not able to make it work. I am a DBA and not familiar with these stuff, can you help me?

This is my web page
http://localhost/test/test.html
---CODE----
<!DOCTYPE html>
<html>
<body>
<script language="Javascript" src="http://localhost/counter/counter.php?page=test">
<!--
//-->
</script>
<a href="video.html">Click here to view video</a>
</body>
</html>

In IIS, the counter folder is place in c:\inetpub\wwwroot. It contains
04/03/2012 01:04 AM 4,470 counter.php
03/03/2012 08:45 PM 492 index.htm
13/07/2012 02:21 AM <DIR> logs
04/03/2012 01:32 AM 15,664 readme.htm

Thanks
Bams
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Re: counter for webpage not working

Post by Klemen »

Is PHP installed and working on your server?

What do you see if you open this page in your browser:
http://localhost/counter/counter.php?page=test
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
bams
Posts: 6
Joined: Thu Jul 12, 2012 6:59 pm

Re: counter for webpage not working

Post by bams »

Hi

I get page cannot be displayed! I downloaded php 5.4 and extracted it to a directory. Double clicked on php.exe

Is there more steps to do?

Thanks
Bams
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Re: counter for webpage not working

Post by Klemen »

Yep, the server needs to be configured to recognize and use PHP.

Unfortunately we don't provide PHP installation/configuration help here, but you should be able to find many tutorials on the internet:
www.google.com/search?q=install+PHP+on+IIS

Once you get PHP working on your server it should be relatively easy to setup PHP scripts as well.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
bams
Posts: 6
Joined: Thu Jul 12, 2012 6:59 pm

Re: counter for webpage not working

Post by bams »

Hi Klemen,

Thanks a lot, your guidance was very very helpful. I am able to get the count now.

It's working now!!

Thanks
Bams
bams
Posts: 6
Joined: Thu Jul 12, 2012 6:59 pm

Re: counter for webpage not working

Post by bams »

Hi Klemen,

I have couple of more questions to your great code. :-)

1. Is PHP a freeware?
2. Can the text file handle simultaneous logins, if so how will it handle the etxt file?

Thanks
Bams
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Re: counter for webpage not working

Post by Klemen »

Hi,

1. Yes, PHP is free and so are the script on my website.

2. Latest version is written to handle multiple simultaneous users as best as it can (very reliable from my tests), but if you have a lot of visitors you might want to use a script with a MySQL database instead (not available at my website).
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
bams
Posts: 6
Joined: Thu Jul 12, 2012 6:59 pm

Re: counter for webpage not working

Post by bams »

Hi Klemen,

Thanks a lot for you quick reply.

My question is how many users can simutaneously access the web page, so the count on the text is updated correctly. Could you please be appropriate?

Where can I find the latest version, what is the version number?

Thanks
Bams
bams
Posts: 6
Joined: Thu Jul 12, 2012 6:59 pm

Re: counter for webpage not working

Post by bams »

Hi Klemen,

Also could you let me know how to write to a MySQL table with your code?

Thanks
Bams
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Re: counter for webpage not working

Post by Klemen »

How many users? It depends on your server and is impossible for me to say. I tested it on the busy phpjunkyard.com server and it worked without problems.

The latest version is the one that can be currently downloaded from the www.phpjunkyard.com website.

I'm afraid I'm not able to help with customizing for MySQL, this is out of the scope of my support.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply