Trackback Spam

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
vinman
Regular
Posts: 16
Joined: Thu Apr 13, 2006 9:47 pm

Trackback Spam

Post by vinman »

I've been getting deluged with spam. I don't understand how it is being done, or what it is accomplishing, if anything at all. How is this
trackback spam being sent and from where? And how does it come from different ips all within a short period of time?

[2006-04-17 19:34:35] - [MODERATE: Auto-moderation after X days] - [#26, Name "this is very good", E-Mail "", URL "http://www.msn.com/", User-Agent "Opera/6.04 (Windows 2000; U) [en]", IP 58.140.215.243] - [related source]
[2006-04-17 19:44:59] - [MODERATE: Auto-moderation after X days] - [#3, Name "this is very good", E-Mail "", URL "http://www.msn.com/", User-Agent "Mozilla/4.0 (compatible; MSIE 5.01; Windows 95)", IP 219.252.67.13] - [this is related article]
[2006-04-17 20:43:35] - [MODERATE: Auto-moderation after X days] - [#19, Name "this is very good", E-Mail "", URL "http://www.msn.com/", User-Agent "Opera/6.02 (Windows 2000; U) [en]", IP 60.248.35.77] - [related source]
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Trackback Spam

Post by garvinhicking »

You can configure your spamblock plugin to filter by those www.msn.com URLs or by authorname...also read http://blog.s9y.org/archives/122-Spambl ... ments.html

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/
vinman
Regular
Posts: 16
Joined: Thu Apr 13, 2006 9:47 pm

Re: Trackback Spam

Post by vinman »

Garvin,
would this update work with 0.7.1 (since I am unable to update) ?


quote="garvinhicking"]You can configure your spamblock plugin to filter by those www.msn.com URLs or by authorname...also read http://blog.s9y.org/archives/122-Spambl ... ments.html

Regards,
Garvin[/quote]
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Trackback Spam

Post by garvinhicking »

Hi!

Using Serendipity 0.7.1 is actually a bit dangerous as there are some security issues which have been fixed in 0.8.5.

And no, you cannot use it with serendipity 0.7.1 - this is technically long outdated, since 0.7.1 is nearly 1.5 years old.

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/
vinman
Regular
Posts: 16
Joined: Thu Apr 13, 2006 9:47 pm

Post by vinman »

ok, I'll give it one more shot.

But please, if I edit the smarty templates, what is the code to
use to embed s9y on my default.php page?

Is it a php include?

default.php is main page in root directory

serendipity is installed in a subdirectory

I've been searching the forums and I've seen a lot of different things,
but no clear answer on what to do.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

The embed way doesn't really change. You still just need to include the s9y index.php framework before any of your other page calls, and then use ob_start(), ob_get_contents() to put the s9y content into your site.

Sadly I am too short on time to offer you to do it for you. But the docs on s9y.org (http://www.s9y.org/123.html) is frankly quite clear about it...

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/
vinman
Regular
Posts: 16
Joined: Thu Apr 13, 2006 9:47 pm

Post by vinman »

Garvin,
Again, I figured I would give it another shot, this time doing a fresh install. Still getting blank page.

Default.php in root directory contains this code on the top:

<?php
require("serendipity_wrapper.php");
?>

Down further where I want the content is:


<?php
echo $serendipity_contents; // Print the variable
?>


I created a wrapper file in the root directory

<?php
ob_start();
chdir("/www/mysite/htdocs/serendipity");
require("index.php");
chdir("/www/mysite/htdocs");
$serendipity_contents = ob_get_contents();
ob_end_clean();
?>


When I load default.php I just get a BLANK PAGE

I have followed the instructions on your link...please tell me what
I am doing wrong if anything
Thank you
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

A blank page usually indicates a PHP fatal error. Please lookup your Apache and PHP error logfiles.

Your mechanism and code itself looks sane to me!

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/
vinman
Regular
Posts: 16
Joined: Thu Apr 13, 2006 9:47 pm

Post by vinman »

Absolutely nothing in the logs.

I'm giving up.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

You did enable error_reporting and display_errors via php.ini or .htaccess?

What happens if you do not use ob_end_clean()?

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/
vinman
Regular
Posts: 16
Joined: Thu Apr 13, 2006 9:47 pm

Post by vinman »

Garvin,
Ok, I got something going on now, but I'm doing something wrong.

Take a look at

www.cybermidi.com/a.php

There are 2 instances of Serendipity now running. Close but no cigar.

Here's the code and setup

1. a.php in root directory contains

Code: Select all

require("/www/c/mysite/htdocs/serendipity/wrapper.php");
at top of file. Where I want the news to show up, I put in:

Code: Select all

<?php 
echo $serendipity_contents; // Print the variable 
?> 
wrapper.php in serendipity directory contains:

Code: Select all

<?php
  //ob_start();
chdir('/www/c/mysite/htdocs/serendipity/'); 
  require("index.php");
chdir('/www/c/mysite/htdocs/'); 
  $serendipity_contents = ob_get_contents();
 // ob_end_clean();
?>
In configuration, I checked serendipity is embeded, and
index file is wrapper.php

Please tell me what I'm doing wrong. Two instances showing, and the links take me out of the embedding. But it's now showing something at least. I will visit your wishlist
to compensate you for your help.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Okay, I think we're getting close.

The reason why you get duplicate content is because I told you to omit the "ob_end_clean()" command. Usually if you put this, the content is in $serendipity_contents and no output is made when ob_end_clean() is called. So if it is not called, the output is once shown PLUS it's put into the variable and output' later on.

If you now just replace this in your wrapper.php

Code: Select all

$serendipity_contents = ob_get_contents();
with

Code: Select all

$serendipity_contents = ob_get_clean();
does it then give you a blank page again?

The second problem with being turned to different pages should come from your .htaccess file in the serendipity directory. it seems to point the DirectoryIndex to /serendipity/index.php, but it should point to /a.php instead! Also if you use mod_rewrite, those also need to point to that file. Usually if you specify the "indexFile" option in s9y configuration, the .htaccess should reflect this. Or maybe you forgot to properly specify the "indexFile" to "a.php"?

Also, you should be aware that your "a.php" file should be copied into the same directory than serendipity is installed in! You can just make a copy of that file and place it there, and you can have it in your document root as well.

Hope that helps us a bit further. Of course your wishlist-visiation would be very welcome, though don't feel pushed to do that. :)

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/
vinman
Regular
Posts: 16
Joined: Thu Apr 13, 2006 9:47 pm

Post by vinman »

Garvin,
Back to a blank page.

a.php is the same as before and it was copied to the serendipity directory.

serendipity/wrapper.php is

<?php

chdir('/www/mysite/htdocs/serendipity/');
require("index.php");
chdir('/www/c/htdocs/');
$serendipity_contents = ob_get_clean();
//ob_end_clean();
?>

I tried both leaving end clean and commenting is out.

htaccess seems fine. I set indexfile to a.php and the htaccess
file is:

# BEGIN s9y
ErrorDocument 404 /serendipity/a.php
DirectoryIndex /serendipity/a.php

RewriteEngine On
RewriteBase /serendipity/
RewriteRule ^(archives/([0-9]+)-[0-9a-z\.\_!;,\+\-]+\.html) a.php?/$1 [NC,L,QSA]
RewriteRule ^(authors/([0-9]+)-[0-9a-z\.\_!;,\+\-]+) a.php?/$1 [NC,L,QSA]
RewriteRule ^(feeds/categories/([0-9;]+)-[0-9a-z\.\_!;,\+\-]+\.rss) a.php?/$1 [NC,L,QSA]
RewriteRule ^(feeds/authors/([0-9]+)-[0-9a-z\.\_!;,\+\-]+\.rss) a.php?/$1 [NC,L,QSA]
RewriteRule ^(categories/([0-9;]+)-[0-9a-z\.\_!;,\+\-]+) a.php?/$1 [NC,L,QSA]
RewriteRule ^archives([/A-Za-z0-9]+)\.html a.php?url=/archives/$1.html [NC,L,QSA]
RewriteRule ^([0-9]+)[_\-][0-9a-z_\-]*\.html a.php?url=$1-article.html [L,NC,QSA]
RewriteRule ^feeds/(.*) a.php?url=/feeds/$1 [L,QSA]
RewriteRule ^unsubscribe/(.*)/([0-9]+) a.php?url=/unsubscribe/$1/$2 [L,QSA]
RewriteRule ^approve/(.*)/(.*)/([0-9]+) a.php?url=approve/$1/$2/$3 [L,QSA]
RewriteRule ^delete/(.*)/(.*)/([0-9]+) a.php?url=delete/$1/$2/$3 [L,QSA]
RewriteRule ^(admin|entries)(/.+)? a.php?url=admin/ [L,QSA]
RewriteRule ^archive/? a.php?url=/archive [L,QSA]
RewriteRule ^(index|atom[0-9]*|rss|b2rss|b2rdf).(rss|rdf|rss2|xml) rss.php?file=$1&ext=$2
RewriteRule ^(plugin|plugin)/(.*) a.php?url=$1/$2 [L,QSA]
RewriteRule ^search/(.*) a.php?url=/search/$1 [L,QSA]
RewriteRule ^(serendipity\.css|serendipity_admin\.css) a.php?url=/$1 [L,QSA]
RewriteRule ^index\.(html?|php.+) a.php?url=index.html [L,QSA]
RewriteRule ^htmlarea/(.*) htmlarea/$1 [L,QSA]
RewriteRule (.*\.html?) a.php?url=/$1 [L,QSA]


Just blank
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

In your wrapper.php the "ob_start" at the top is missing. Write it like this:

Code: Select all

<?php
ob_start();
chdir('/www/mysite/htdocs/serendipity/');
require("index.php");
chdir('/www/c/htdocs/');
$serendipity_contents = ob_get_clean();
?> 
If that does not work: Which PHP version are you using?

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/
vinman
Regular
Posts: 16
Joined: Thu Apr 13, 2006 9:47 pm

Post by vinman »

still blank

php is the latest, 5
Post Reply