Adsense with HTML Nugget Problem

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
vavai
Regular
Posts: 37
Joined: Thu Mar 01, 2007 12:43 am
Location: Bekasi-West Java-Indonesia
Contact:

Adsense with HTML Nugget Problem

Post by vavai »

I have a problem while trying to place Google Adsense on my site. The problem is

Code: Select all

"Forbidden. You don't have permission to access /serendipity_admin.php on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. 
everytime I try to save/update a HTML Nugget.

I have no problem to display Adsense plugin in sidebar, but I need another ads type (ie : referrer or adsense search). I try with HTML Nugget on Page or standard HTML Nugget and paste my adsense code, but it didn't success.

Is there any trouble with my JS, my permission access or another problem ?

Here is my blog : http://www.vavai.com and http://www.vavai.com/blog/index.php

I've tried search this forum with search key "Adsense" and try some solutions but it's quite dificult to me to find an exact solution.

Any help would be appreciated...
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Adsense with HTML Nugget Problem

Post by garvinhicking »

Hi!

It seems your provider is using mod_security to block words like "<script>" from your host. So you're unable to post any HTML to the blog that contains '<script>'. That's a very effective filtering, but it also prevents you to properly use your blog, so you'll need to talk about your provider that you can't use the blog with that kind of restriction.

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
vavai
Regular
Posts: 37
Joined: Thu Mar 01, 2007 12:43 am
Location: Bekasi-West Java-Indonesia
Contact:

Adsense with HTML Nugget Problem

Post by vavai »

Thanks Garvin. That's why I proud to use S9y, because the author very active and have a quick response to any question. Nice. :-).

I'll try to talk to my provider about this matter, but, if code has blocked with "mod_security", why my adsense plugin running perfectly ?

Is there another Serendipity adsense plugin which provide adsense for Referrals, for content and for search ? I think some hack for HTML Nugget on Page fit with this requirement.

I know, my problem just a little things and HTML Nugget quite enough for this matter (if I have no problem with my provider), but I'm very happy if that's plugin make an easy way to including adsense code to our Serendipity blog.

I have no capability to do this due to myknowledge about HTML and PHP , so if anyone have another easy way to include adsense code, I will very happy.

Thanks.
/* Muhammad Rivai Andargini */
/* Migrasi Windows-Linux : http://www.vavai.com/index.php */
/* Blog Vavai : http://www.vavai.com/blog/index.php */
/* Bridge Blogging : http://www.vavai.net */
vavai
Regular
Posts: 37
Joined: Thu Mar 01, 2007 12:43 am
Location: Bekasi-West Java-Indonesia
Contact:

Adsense with HTML Nugget Problem [solved]

Post by vavai »

Solved !

Thanks Garvin. I have not call my provider yet, because I think it will need a long time to get a solution from provider :-), but with your information, I try to disable mod_security. I found an interesting article here .

I change a .htaccess file and including this code :

Code: Select all

SecFilterEngine Off
SecFilterScanPOST Off
so, the .htaccessfile will looks like :

Code: Select all

# BEGIN s9y
DirectoryIndex /index.php
php_value session.use_trans_sid 0
php_value register_globals off
SecFilterEngine Off
SecFilterScanPOST Off
<Files *.tpl.php>
    deny from all
</Files>

<Files *.tpl>
    deny from all
</Files>

<Files *.sql>
    deny from all
</Files>

<Files *.inc.php>
    deny from all
</Files>

<Files *.db>
    deny from all
</Files>

# END s9y
Another way is removing an Apache module or disabling from CPanel, but changing .htaccess file seems an easy way to do.

After that, I try to use HTML Nugget and HTML Nugget for Page and it seems running out perfectly.

Thanks.
/* Muhammad Rivai Andargini */
/* Migrasi Windows-Linux : http://www.vavai.com/index.php */
/* Blog Vavai : http://www.vavai.com/blog/index.php */
/* Bridge Blogging : http://www.vavai.net */
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Adsense with HTML Nugget Problem [solved]

Post by garvinhicking »

Hi!

Perfect, many thanks for documenting that here.

In fact I think it worked for you before, because your provider might only recently have installed mod_security!

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply