Make WordPress Core

Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#2599 closed defect (bug) (invalid)

Non-PHP-as-CGI servers never send Trackbacks

Reported by: markjaquith Owned by:
Milestone: Priority: high
Severity: major Version: 2.0.2
Component: Administration Keywords:
Focuses: Cc:

Description (last modified by masquerade)

I am submitting this ticket for "thermoman" in #wordpress because the new forum account he signed up for did now grant him access to Trac. What follows it the report he mailed to me.


Running PHP not as cgi causes a bug preventing execute-pings.php
ever being called -> No Trackbacks are ever sent to other blogs.


Sending Pings/Trackbacks to other blogs are handled by calling

This URL is to be called on almost every page in the admin section
via the admin-footer.php file:

if ( (substr(php_sapi_name(), 0, 3) == 'cgi') && spawn_pinger() ) {
   echo '<iframe id="pingcheck" src="' . get_settings('siteurl')
       .'/wp-admin/execute-pings.php?time=' . time() . '"

When you're running Apache with mod_php then the above block is never
being executed since the first condition in the if statement will be
false resulting in _not_ considering (and executing) the second
condition (spawn_pinger).

no cgi -> no IFRAME, no spawn_pinger() -> no trackbacks being sent

When fixing this you should also have a look at spawn_pinger() in

spawn_pinger() only returns a value if php is running as cgi.
When apache is running mod_php the function returns no value. This has
to be fixed, too.


Comment out the 'if ( ...)' check in execute-pings.php so the iframe
is called on every page in the admin section regardless or apache
running php as cgi or not.

Change History (3)

#1 @masquerade
16 years ago

  • Description modified (diff)
  • Resolution set to invalid
  • Status changed from new to closed

Pinging works fine on non-cgi, the above code is actually a hack to make it work on CGI, on mod_php servers this is unneccessary because it would spawn the pinger twice. See write_post() for when it is originally called.

If you can't actually send trackbacks (which I highly doubt, I'm guessing you looked at the code and jumped to conclusions), feel free to reopen with something more helpful than this.

#2 @masquerade
16 years ago

I was close :D

#3 @Nazgul
15 years ago

  • Milestone 2.1 deleted
Note: See TracTickets for help on using tickets.