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 
PNG Counter Installation  XML
Forum Index » Support Forum
Author Message
ET
Graduate

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

I was noticing that the instructions for PNG counter are sadly lacking - Here are some tips and suggestions

Amber has previously pointed these out

Explanation of Chmod File Permissions:
http://proxy2.de/forum/viewtopic.php?p=10072&highlight=#10072

How to change File Permissions from the CPanel:
http://proxy2.de/forum/viewtopic.php?p=10713&highlight=#10713

The Counter:
http://proxy2.de/forum/viewtopic.php?t=3924

On the next post - I'll include the "Readme" that I developed from notes I've made over time after installing the script.

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

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

Requirements:

- PHP + GD 1.6 or higher (PNG Support)

Installation:

1) Create counter directory (It can be any name you choose)
& upload the following files into that new counter directory
- config.inc.php
- counter.php
- phpinfo.php
- demo.php
- error.png

2) Create a new directory inside the counter directory named digits
*** (it must have the name "digits") ***
Upload the folders with the digit images inside the digits directory
-- you only need to upload the folders for the images
that you want to use - there is no need to load all --

3) Decide now whether you want to use the flat file method for the png counter or to use MySQL database.
*** You need to have some knowledge about creating your own database name and tables to use MySQL. ***

a) If you decide to use the flat files continue at step #4 - 5
b) If you want to create a MySQL database, jump to step #6

4) Create a new directory in the counter directory named pages and upload the count.txt file into the "pages" directory.

5) You will need to change the write permissions on the directory
and on the count.txt
- pages (chmod) 777 (drwxrwxrwx) (the directory)
- \ - count.txt (chmod) 666 (-rw-rw-rw) (the file)

Now Jump to Step #9

========

+++ To Create the SQL Database +++
This process may vary from server to server and webhost to webhost.

6) Create and Name a new database in the MySQL admin section.

6a) Using Notepad or text editor, create a file named "counter.txt" and insert the following information:



6b) Save your new counter.txt file on your harddrive for uploading into your newly created database.

6c) Enter into your new database which is currently empty (only has a name) and you should find an option or browse function that allows you to upload or import table information. Use this feature to find your counter.txt on your harddrive and click "upload" or "import" or "go"
** different systems have different names for loading the table information so I can't give you a definite description on this process.

6d) Once you have uploaded the counter.txt file - you should now have a basic db_table that has two fields. One field is pages and one field is count.

7) Adjust your config.inc.php files to allow the system access into the MySQL database.

change these lines:

*** Note - On $CFG['dbhost'] - my system would not allow me to use the host's server address and default port - you may need to use the localhost function in some situations.
Leave all the other settings in config.inc.php (below this portion) alone until you know that you have the files working correctly.

In the file counter.php

should be changed to



8) After making these database changes to the config.inc.php & counter.php files, save (and upload) the changes. Now type the whole url of the config.inc.php (e.g. http://mywebsite.com/counter/config.inc.php ) file to run the file in your browser online to check for errors. If no errors show up on that page, then move to step 9.

### If MySQL fails to work for you ###
8a) If your attempts to use the database fail, you can always revert back to the text files in the pages directory (see steps 4 & 5) by changing the following line back to false:

in the config.inc.php

And revert back to

in the counter.php - Then saving/loading them back over the earlier changes.

=======

9) Try the demo.php page (e.g. http://mywebsite.com/counter/demo.php )
On the first try, you should see "error" on the page. You should also see a list of the digit folders that are linked to the demo. Once you click on one of those links, you should begin to see the digits accruing as you change from one style to the next.

10) Once you have the demo.php page functioning, you know that you are ready to start adding your counter to your other pages.

Usage:

vars:

page --> the name of the page you want to track

digit --> the digit set from the digits directory

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



Hi ET

I'm new to using PHP etc on websites - previously just kept things very simple but thought I'd like to try PHP so chose to try to create a page with PNG Counter 1.0 on it.

I've followed your steps & in step 3 I decided to use flat files as I've never used MySQL.

I did step 4 but for Step 5 I do not know how to change the write permissions - or even what they are!!!

Please could you help me out. I use WS_FTP95 to upload my files.
It would be much appreciated.

Cheers Tim
Anonymous



Hi

Maybe someone/anyone can help me?

I'm using WS_FTP95 LE to upload my files.
To try & change the write permissions I have left clicked on thge folder named "pages" & then right clicked on it & a list of options appears - I click on chmod (UNIX) and a small box appears. I tick all the boxes to change to 777.

But then a message in red appears in the log window saying "550 could not change perms on pages: No such file or directory. ! Chmod failed. It may not be supported on remote host".

I have also tried to do this using ACE FTP 3 Freeware & I get the same message.

Can anyone help?? Please!!
Carbonize
Master
[Avatar]

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

Might be worth speaking to your hosts about it. Is the folder in question in your cgi-bin?

Carbonize
I am not the maker of the Advanced Guestbook

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



No I haven't put the counter files in my cgi-bin folder. I've just uploaded them like any other file or folder. My cgi-bin folder is empty.
Anonymous



Hi, ok I've read over this and I bunch went through a bunch of pages to hopefully be able to find my answer to this but I havent been able to find it.

ok, I downloaded the zip file for the pngcounter and then uploaded that to 2 of my host, one is payed and the other is free, I extracted all the files and the files had permissions set to 600 for everything so heres the files I changed to 644

config.inc.php
counter.php
demo.php
error.png

I changed pages to 777, digits to 755, and docs to 755

and then within the pages I changed count.txt to 666

within the digits page, I change the folder permissions to 755 for a and aseg and changed the permissions to the pictures in those folders to 644.

now... once I changed all of them, I went to the demo.php pages and whenever I would try out a different counter (the counters I allowed permission to) it would say counter as the alternate text, but the digits wouldnt appear.. I think it could do with all the permission changing but I at least had to do that so I could open up the pages in both of my servers.

you can see the demo.php page here

any help with getting this working would be really appricated, I dont know much about setting up a mysql database/table, but I have phpmyadmin and if someone could help me with that it would be really cool too.. I would just like to get these working .. please
Anonymous



ok.. well sorry if this sounds mean or anything, but why host this script if you dont have any kind of help for it? have any of you tried this scripted and actually got it to work? I followed everything it says in this thread, and everything within the actually files I downloaded with the zip folder and still nothing...

if you got this script from another site could you please point me in that direction so I could see if I find my answers there?

thanks if you can help me this time...
Anonymous



I've followed the steps that you have layed out, but I get an error from the counter.php and it says "Fatal error: Call to undefined function: imagecreate() in /home/jonathan/public_html/counter/counter.php on line 178"

Any help would be gladly helpfull. Thanks



webmaster@jonathankirkey.com
Anonymous



How do I set the counter to change the number that shows up?
amber222
Graduate

Joined: 07/05/2004 21:13:07
Messages: 586
Offline

For the textfile method, the count files are located in the Pages directory.

For the database method, it's the Counter table. Use PhpMyAdmin to edit the data.
Anonymous



I'm using the file method and when I edit the index file in the pages directory it resets to it's previous setting.

And I have no idea how to set up the MySQL. I know how to create the databases but don't know how to create the databases
amber222
Graduate

Joined: 07/05/2004 21:13:07
Messages: 586
Offline

It's the count.txt file.
motorhead85021
Newbie

Joined: 18/05/2006 22:59:25
Messages: 2
Offline

Worst.
Script.
Ever.
Carbonize
Master
[Avatar]

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

motorhead85021 wrote:Worst.
Script.
Ever.

So write a better one youself and share it like the maker of this script has.

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum