index.php? 403 forbidden

Post your Click counter digestion problems here
Post Reply
xonie
Posts: 5
Joined: Tue Jul 17, 2007 10:42 pm

index.php? 403 forbidden

Post by xonie »

Script URL: http://www.karrtorpcentrum.se/ccount11/
Version of script:1.1
Hosting company:
URL of phpinfo.php:http://www.karrtorp.se/info.php
URL of session_test.php:
What terms did you try when SEARCHING for a solution:

Write your message below:


Hi,

I can login to the script (pass= 4dm1n) but when I add a link I get a 403 forbidden message on index.php? which is werid since index.php works fine.
I have no idea on how to proceed...

I'd appreciate all help!!
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Not sure what the problem is, try uploading the:
1. phpinfo.php
2. session_test files
3. this file:
http://www.phpjunkyard.com/extras/post_test.zip

And place link to all three here.
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
xonie
Posts: 5
Joined: Tue Jul 17, 2007 10:42 pm

Post by xonie »

hi,

I've uploaded the post files:

http://www.karrtorpcentrum.se/ccount11/post.php
http://www.karrtorpcentrum.se/ccount11/post2.php

the phpinfo file is it the same as:

http://www.karrtorpcentrum.se/info.php

and I don't know what the session_test thing is?
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

xonie wrote:and I don't know what the session_test thing is?
See post with the subject "READ THIS BEFORE POSTING A NEW QUESTION!!"
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
xonie
Posts: 5
Joined: Tue Jul 17, 2007 10:42 pm

Post by xonie »

I'm really sorry! I must've missed it.

Here's the missing ones:

http://www.karrtorpcentrum.se/ccount11/phpinfo.php
http://www.karrtorpcentrum.se/ccount11/session_test.php
http://www.karrtorpcentrum.se/ccount11/ ... _test2.php

I've only tried chmoding the folder to 777 but that's it (I'm new at php).
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Looks fine. Try this:

1. open index.php in a plain text editor (Notepad)
2. DELETE all instances of code

Code: Select all

?<?php echo strip_tags (SID)?>
Should be several times inside the index.php file.
3. save, upload to the server
4. close ALL broswer windows and try if it helped
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
xonie
Posts: 5
Joined: Tue Jul 17, 2007 10:42 pm

Post by xonie »

Ok done.
Except the SID in this part:

<td algin=\"center\" valgin=\"center\" class=\"first\"><a href=\"index.php?".SID."&action=remove&id=$id\" onclick=\"return doconfirm('Are you sure you want to remove link ID $id? This cannot be undone!');\"><img src=\"delete.gif\" height=\"14\" width=\"16\" border=\"0\" alt=\"Remove this link\"></a>
<a href=\"index.php?".SID."&action=reset&id=$id\" onclick=\"return doconfirm('Are you sure you want to reset clicks for link ID $id to 0? This cannot be undone!');\"><img src=\"reset.gif\" height=\"14\" width=\"16\" border=\"0\" alt=\"Reset number of clicks to 0\"></a></td>

because I wasn't sure I should

So now I received a new error...
When I submit a link I get this:

Warning: filesize() [function.filesize]: Stat failed for http://www.karrtorpcentrum.se/ccount11/ids.txt (errno=2 - No such file or directory) in /home/karrtorp/public_html/ccount11/index.php on line 179

Warning: fread() [function.fread]: Length parameter must be greater than 0. in /home/karrtorp/public_html/ccount11/index.php on line 179

Warning: fopen(http://www.karrtorpcentrum.se/ccount11/ids.txt) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections. in /home/karrtorp/public_html/ccount11/index.php on line 183
Can't open the id file (http://www.karrtorpcentrum.se/ccount11/ids.txt) for reading!



I have uploaded a write and read.php both say ids.txt is write and readable

http://www.karrtorpcentrum.se/ccount11/write.php
http://www.karrtorpcentrum.se/ccount11/read.php


Again, the password is 4dm1n if you want to submit a link and see what happens...
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

In settings.php what setting have you got for logfile and idfile? Should be exactly like this:

Code: Select all

// Name of the log file
$settings['logfile']="clicks.txt";

// Name of the file where last ID number is stored
$settings['idfile']="ids.txt";
I think you have

Code: Select all

// Name of the log file
$settings['logfile']="http://www.karrtorpcentrum.se/ccount11/clicks.txt";

// Name of the file where last ID number is stored
$settings['idfile']="http://www.karrtorpcentrum.se/ccount11/ids.txt";
which is wrong, these mustn't be URLs.

As for deleting just delete this EXACT code, nothing more:

Code: Select all

?<?php echo strip_tags (SID)?>
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
xonie
Posts: 5
Joined: Tue Jul 17, 2007 10:42 pm

Post by xonie »

Thank you!
It's working perfectly now!!
Post Reply