Page 1 of 1

'Successfully added' links don't exist

Posted: Thu Aug 09, 2007 7:27 pm
by ObscureWarumono
Script URL: room304.shattered-serenity.net/ccount/
Version of script: 1.1
Hosting company: Surpass Hosting
URL of phpinfo.php: ?
URL of session_test.php: ?
What terms did you try when SEARCHING for a solution: 'Admin panel', 'Clicks', 'Links', read the README and tutorial provided

Hello!
Just when I thought I had this figured out, I ran into a problem.. I'm trying to count clicks on the 'Preview' link of a layout, and it doesn't seem to be working even after doing a CHMOD on the php scripts (not doing this gave me an error message before, but that part is fixed).
The page with the link on it is: http://room304.shattered-serenity.net/l ... yspace.php
The page I'm linking to and counting clicks on is: http://room304.shattered-serenity.net/l ... eview.html


Everything seems to work okay, and I even get this message..
New link successfully added!
A new link with ID 1 has been successfully added.
To count clicks on this link use this URL:
http://room304.shattered-serenity.net/c ... k.php?id=1
instead of the old one:
http://room304.shattered-serenity.net/l ... eview.html

..when I add the link.

However, when I 'Click to continue", the link isn't shown in the admin panel. Instead I get:
Link statistics
Not counting any links. Use the form below to add new links to be counted.


I added the Javascript code between the <head> and </head> tags, and am pretty sure I'm using the right codes to display the number of counts (currently showing up as 'undefined'). When I click on the link http://room304.shattered-serenity.net/c ... k.php?id=1, it says that ID doesn't exist. Can you please tell me what might be wrong?

Thanks for reading, and any help is greatly appreciated! ^_^

Posted: Fri Aug 10, 2007 8:08 am
by Klemen
Your clicks.txt file seems empty, check on your server if it really is. Try adding a new link and see if it remains empty?

Could be a problem with clicks.txt file permissions, is chmod set to 666?

Also upload phpinfo.php to your server and post a link here. You will find phpinfo.php in the "READ THIS BEFORE POSTING A NEW QUESTION" post.

Posted: Sat Aug 11, 2007 6:53 am
by ObscureWarumono
clicks.txt is empty, stays that way even after adding a new link, and chmod is set to 666.

The phpinfo link is
http://room304.shattered-serenity.net/c ... hpinfo.php

Posted: Sat Aug 11, 2007 9:12 am
by Klemen
If CHMOD is correct it's possible your host doesn't allow writing to files (phpinfo doesn't show any errors though). Try uploading this file to the ccount folder, open in browser and paste the results you get:
http://www.phpjunkyard.com/extras/ids_test.zip

Posted: Thu Aug 16, 2007 6:06 am
by ObscureWarumono
http://room304.shattered-serenity.net/c ... s_test.php
I got..

The ids.txt file is not writable
Reading file... the value is set to: 0
Changing the value to: 1
Ok, trying to read again...the value is set to: 1
Works fine!

Posted: Mon Aug 27, 2007 10:34 am
by Klemen
That's funny - it shows the file as not writable, but you can still write to it? Not really sure what to tell you here, you can try asking your host why files chmoded to 666 show up as "not writable" in php.

Posted: Mon Sep 03, 2007 6:12 am
by ObscureWarumono
Ah, okay. Maybe they'll know what's going on with it, especially if I give a link to the thread of the steps we tried. Hopefully I'll get it working if the host can somehow change a setting, or do something different if there's any hidden option.

Thanks so much for your help and time! ^-^