Page 1 of 1

counter for webpage not working

Posted: Thu Jul 12, 2012 7:07 pm
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

Re: counter for webpage not working

Posted: Fri Jul 13, 2012 10:31 am
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

Re: counter for webpage not working

Posted: Sun Jul 15, 2012 5:45 am
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

Re: counter for webpage not working

Posted: Sun Jul 15, 2012 8:15 am
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.

Re: counter for webpage not working

Posted: Mon Jul 23, 2012 4:19 am
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

Re: counter for webpage not working

Posted: Tue Aug 28, 2012 10:38 am
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

Re: counter for webpage not working

Posted: Tue Aug 28, 2012 2:27 pm
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).

Re: counter for webpage not working

Posted: Wed Aug 29, 2012 1:55 am
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

Re: counter for webpage not working

Posted: Wed Aug 29, 2012 11:05 am
by bams
Hi Klemen,

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

Thanks
Bams

Re: counter for webpage not working

Posted: Wed Aug 29, 2012 2:38 pm
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.