Welcome to Geeklog, Anonymous Monday, January 30 2023 @ 10:37 am EST

Geeklog Forums

Google Adsense 403 Forbidden Error


djsnake210

Anonymous
Hey,
I tried putting google adsense into a block and I'm receving the 403 error:

Forbidden
You don't have permission to access /[path_to_geeklog]/admin/block.php on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
--------------------------------------------------------------------------------
Apache/1.3.37 Server at www.officialwindberdogrun.com Port 80

I'm guessing this is a server side issue, but the admins for my web hosting can't seem to figure it out. Is this something I might be able to change through my cpanel or does anyone know what I should tell the host admins that they need to look into? any help would be greatly appreciated.
 Quote

Status: offline

1000ideen

Forum User
Full Member
Registered: 08/04/03
Posts: 1298
Did it work within a story or static page?
 Quote

djsnake210

Anonymous
It won't let me add the code to stories or static pages either. I can add normal content just fine though.
 Quote

Status: offline

1000ideen

Forum User
Full Member
Registered: 08/04/03
Posts: 1298
As it is simple JavaScript it should work in a static page. Does it show errors?
 Quote

djsnake210

Anonymous
I just did a little more troubleshooting and found out that it's anytime I try to use javascripting. The error I get is the 403 Forbidden Error. White page that tells me that I don't have access to these files (admin/block.php, admin/static.php, admin/story.php).
 Quote

Status: offline

djsnake210

Forum User
Newbie
Registered: 04/03/07
Posts: 11
as a troubleshooting measure i installed a different cms (i know i know... like i said it was for troubleshooting) and tried to add the google adsense script to a block and got the same results, so it is definitely server side. my question is has anyone else ran into this with their hosting and are there any thoughts in how this can be resolved? any help would be really greatly appreciated.
 Quote

Status: offline

1000ideen

Forum User
Full Member
Registered: 08/04/03
Posts: 1298
It doesn`t make much sense at all. Are you shure that the access rights are o.k. for the webspace and within Geeklog? Can you see the pages without google code?

Maybe you test it by writing a simple HTML file and insert the Google code?
 Quote

djsnake210

Anonymous
thanks for the troubleshooting idea... I created a basic html page and put the code in and it worked fine, so that's telling me it's not a problem with javascript, it's a problem with javascript inside of php i guess. I can see all the other pages / blocks etc fine. in fact when i try to create a new block with this code i get the forbidden error, but if i hit back, take out the javascript code, and type in anything else and it ok it works fine. that's the part that has me really stumped.
i doublechecked all of the access rights and everything looks good.
 Quote

Status: offline

1000ideen

Forum User
Full Member
Registered: 08/04/03
Posts: 1298
Sounds really strange. Usually there is no problem with JavaScript and Geeklog. So it must be something specific with your setup or server. You are using the normal 'professional' theme?
 Quote

Status: offline

djsnake210

Forum User
Newbie
Registered: 04/03/07
Posts: 11
yeah i'm using the professional theme. I figured as much that it's something in the setup on the server since it's any javascript, any cms, and the script works fine when i go through a different webhost. do u know anything in the server setup that would cause this? it's apache v1.3.3.7 (unix), MySQL 4.1.21-standard, PHP 5.0.4, PERL 5.8.7. I tried adding the ebay javascript for their affiliate program and it won't work either. maybe best advice is just to switch hosts?
 Quote

Status: offline

djsnake210

Forum User
Newbie
Registered: 04/03/07
Posts: 11
well i even went the route of manually installing geeklog and it still had no different of a result (the original install was done by fantastico). still getting the 403 forbidden error. what makes it worse is the tech support hasn't even responded in over 2 days. i've been updating the help ticket with the stuff i've done to no avail. it looks like i'm going to be changing hosts. am i a special case (i know how most people would answer that... lol)?
 Quote

Status: offline

1000ideen

Forum User
Full Member
Registered: 08/04/03
Posts: 1298
Changing hosts may be a good solution. Hosts usually can`t help with questions on the fantastico programmes.

What is worse is that they don`t understand that communication with the customer is a positive not negative thing.
 Quote

Status: offline

djsnake210

Forum User
Newbie
Registered: 04/03/07
Posts: 11
i first want to say that i 100% agree with your comment about communication... well said. now... onto the topic...i found a workaround for this. i can add the javascript directly to the .thtml file where i need it to go. here is an example of adding it to the bottom of the right blocks (rightblocks.thtml) but keeping it within the border:

<!-- Start of Right Blocks -->
<td class="block-outerborder-right">
<div style="background:transparent; width:1px; height:1px;"></div>
</td>
<td class="block-featured-right" style="vertical-align:top;">
<div class="block-bg-right">
{geeklog_blocks}
<div class="block-bg-spreader"></div>
</div>
[enter javascript]
</td>
<!--</td></tr></table>-->
<!--If you want the splash, uncomment the last line. If you want no splash, make sure it is commented out.-->

the only problem with this is the javascript needs to either be the top block or the bottom block, but atleast it's there (although not technically in a block). i hit the host admins up to see if there might be a setting on the apache server that doesn't allow java / javascripts to be added to MySQL databases since i wasn't even able to manually add the script into the database, but i haven't heard word back from them yet. i hope this helps someone else out there that might run into the same problem.
 Quote

Status: offline

xucaen

Forum User
Junior
Registered: 01/08/06
Posts: 24
Quote by: djsnake210
i found a workaround for this. i can add the javascript directly to the .thtml file where i need it to go. here is an example of adding it to the bottom of the right blocks (rightblocks.thtml) but keeping it within the border:


I had this same problem. Here is how I solved it: I created a function in lib-custom.php that returns the line of javascript enclosed in <script> tags. Then add the block as a php block.

 Quote

All times are EST. The time is now 10:37 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content