"Not authorized" error when trying to add links

Post your Click counter digestion problems here
Post Reply
FlyingPenguins
Posts: 2
Joined: Fri Aug 15, 2008 8:14 am

"Not authorized" error when trying to add links

Post by FlyingPenguins »

Script URL: http://flyingpenguins.byethost15.com/ccount/index.php (ask for password if you need it)
Version of script: latest
Hosting company: Byethost (free account)
URL of phpinfo.php: http://flyingpenguins.byethost15.com/phpinfo.php
URL of session_test.php: http://flyingpenguins.byethost15.com/session_test.php
What terms did you try when SEARCHING for a solution: "not authorized", among others


I am currently using Byethost for a personal web page, and would like to use CCount to find out where my visitors came from and to keep track of the number of downloads. The problem is that when I try to add a link in the CCount panel, I keep getting

Code: Select all

An error occured:
You are not authorized to view this page!
Apparently, many others on this forum have had the same problem; I tried many of the solutions posted in those threads and it didn't work for me, and some are not even possible anymore (dead links from old threads). I also tried adding tmp folders (in a lot of places) but it didn't help.

I'm sure I followed the installation directions properly: images transferred via FTP in binary, text in ASCII, and chmod'ed the 2 files to 666.

Any ideas? Thanks in advance.
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Seems like problems with sessions although the session test file works fine. Not sure what to look for since you never know how servers are setup with these free hosts.

You can try two things:

1. delete

Code: Select all

session_name('CCOUNT');
from the index.php file, close all browser windows and see if that helps.

- OR -

2. you can try changing function

Code: Select all

function checklogin() {
    if (isset($_SESSION['logged']) && $_SESSION['logged'] == 'Y')
    {
        return true;
    }
    else
    {
        error('You are not authorized to view this page!');
    }
} // END checklogin
to

Code: Select all

function checklogin() {
return true;
} // END checklogin
and use some other method to secure the admin panel, for exampel use htaccess to password protect index.php file:
http://www.google.com/search?hl=en&q=ht ... ingle+file
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
FlyingPenguins
Posts: 2
Joined: Fri Aug 15, 2008 8:14 am

Post by FlyingPenguins »

Thanks for replying Klemen.

Somehow CCount has repaired itself without me doing anything (unless you did something to fix it while looking at it :P). I was still getting the 'not authorized' error the day after I made this forum post, but after you replied, it stopped. I'm not sure if the webhost enabled 'safe settings' for PHP for new accounts or something like that.
GearBox99.Com
Posts: 3
Joined: Fri Nov 21, 2008 4:50 pm

Post by GearBox99.Com »

Hey.... i m facing the same problem i did as u told in ur last post... but its stilll have an error... check

www.gearbox99.com/ramp/

if u want passwword Ask me...

plz... tell me whats the problem...
www.GearBox99.Com
GearBox99.Com
Posts: 3
Joined: Fri Nov 21, 2008 4:50 pm

Post by GearBox99.Com »

Oppps..

I think its a magic that if u have any problem then post here nd ur problem will b automatically solved..

my problem is solved tooo....

Thanks.... :)
www.GearBox99.Com
GearBox99.Com
Posts: 3
Joined: Fri Nov 21, 2008 4:50 pm

Post by GearBox99.Com »

Oppps..

I think its a magic that if u have any problem then post here nd ur problem will b automatically solved..

my problem is solved tooo....

Thanks.... :)
www.GearBox99.Com
Beata
Posts: 6
Joined: Sat Jul 11, 2009 11:59 am

You are not autorised.../ login out

Post by Beata »

This error I got after transfering (temporarily) my website to another server and coming back - scripts didn't worked, I uploaded new and managed them again but used keeping this error

It helped me this second advice, but now I am disconected every time from admin by adding link and clicking "continue"
Klemen wrote:
- OR -

2. you can try changing function

Code: Select all

function checklogin() {
    if (isset($_SESSION['logged']) && $_SESSION['logged'] == 'Y')
    {
        return true;
    }
    else
    {
        error('You are not authorized to view this page!');
    }
} // END checklogin
to

Code: Select all

function checklogin() {
return true;
} // END checklogin
and use some other method to secure the admin panel, for exampel use htaccess to password protect index.php file:
http://www.google.com/search?hl=en&q=ht ... ingle+file
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Sessions probably don't work on your server, try checking with your host that PHP sessions work correctly on your server then try the original code.

Also make sure all the required files have correct settings (ids.txt and clicks.txt chmod to 666).
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
djmjg01
Posts: 4
Joined: Sun Jul 04, 2010 11:37 am

Is this topic about 403 error page?

Post by djmjg01 »

Klemmen, I've just download this v.1.3 script n try to test it first, but got a 403 error page. I have CHMOD even to 777, doesnt work too.
I can't do your solution no. 1 and 2 because I don't have index.php. Is this same as counter.php? If yes, I don't find that code to delete in counter.php.
This is my data:
http://moblogger.co.cc/wmtool/PHPcounter
in it you can find
counter.php
phpinfo.php
session_test.php

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

Post by Klemen »

You downloaded HIT counter, this topic is about CCount - CLICK counter which has all the other files.

Are you trying to count hits (number of visits) or number of clicks on a link?

If you are trying to count number of page visits you have the correct script, but you will need to contact your host about this, it's probably a server restriction of some kind.
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