[wp-hackers] Trackbacks staying in post.to_ping
max at awakers.com
Wed Sep 3 07:24:10 GMT 2008
Dear WordPress hackers, I have the weirdest problem. My trackbacks stay
in the to_ping column. But if I hack in a bit, I can launch them. The
move to the pinged column but did not really ping. When I modify the
code a bit, it works. But they still stay in to_ping for new posts.
Here's my path so far.
Everytime I submit a post with a trackback, it stays in to_post. I
looked in the code and it seems there's some kind of scheduled
wp_schedule_single_event that triggers a general ping fest when there's
a blog post. My earliest to_ping dates from 2008-08-11 08:30:42...
I made a test.php file with the following content:
Then I modified wp-include/comment.php to add some debug info that will
show up on the shell as I run my test.php script:
print "I opened to " . $trackback_url['host'] . " with port " .
$trackback_url['port'] . "\n";
if(!$fs) print "FS Did not succeed\n";
print "I put: $http_request\n";
Now I can see what is being outputted and I give it a shot with
telnetting directly to a test blog I created on wordpress.com
(awakers.wordpress.com) and surprise, it works with telnet but it did
not work with the php code. I also notice that I got <error>0</error> so
deduct that I should see the error message if I get wordpress' answer
via code. I add the following two lines to comment.php
$res = fread($fs,8192);
I am eagerly waiting to see finally what is holding my blog fury back.
HTTP/1.1 200 OK
Date: Wed, 03 Sep 2008 06:50:13 GMT
Content-Type: text/xml; charset=UTF-8
X-hacker: If you're reading this, you should visit automattic.com/jobs
and apply to join the fun, mention this header.
<?xml version="1.0" encoding="utf-8"?>
What?!? I check on the blog and believe it or not, the trackback request
is there. I make another trackback, remove the fread code and it doesn't
work. At this point, I assume that closing the socket without reading
some of it kills the trackback.
So that's where I stand now. The do_all_pings scheduled does not run and
when I run things manually, it needs to read from the socket after it
puts to it.
Here's some info about my setup that might or might not be relevant:
Running CPanel on Centos5.2 under a VMware ESXi server
The ip of the machine is 10.0.0.5 and I'm natting traffic in and out on
required ports 80,443 etc
The router is OpenBSD's PF.
More information about the wp-hackers