#2599 closed defect (bug) (invalid)
Non-PHP-as-CGI servers never send Trackbacks
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | high | |
Severity: | major | Version: | 2.0.2 |
Component: | Administration | Keywords: | |
Focuses: | Cc: |
Description (last modified by )
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.
Summary
Running PHP not as cgi causes a bug preventing execute-pings.php
ever being called -> No Trackbacks are ever sent to other blogs.
Details
Sending Pings/Trackbacks to other blogs are handled by calling
http://yourdomain.tld/wordpress/wp-admin/execute-pings.php
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() . '" style="border:none;width:1px;height:1px;"></iframe>'; }
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
wp-includes/functions.php:
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.
Workaround
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.
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.