[wp-testers] Akismet 1.12 on IIS

Ryan Boren ryan at boren.nu
Wed Dec 21 23:14:33 GMT 2005


On Wed, 2005-12-21 at 15:08 -0800, Ryan Boren wrote:
> On Wed, 2005-12-21 at 17:26 -0500, James Johnson wrote: 
> > I see, thanks for those links.
> > 
> > So what is the correct usage? According mboothby in the ticket Toby linked
> > to the 'old' way to add a management function is to register with
> > basename(__FILE__) and the new way is just plain __FILE__.  Yet the new way
> > breaks on IIS and the ticket you linked to says the opposite, the old way is
> > __FILE__ and the new way should be basename(__FILE__).
> > 
> > Testing on my site tells me that the ticket you link to is correct; using
> > basename(__FILE__) works while the existing __FILE__ does not.  But how does
> > that play with other servers?
> 
> 
> Using basename(__FILE__) can break things.  We need the whole thing so
> that we can get to full path relative to the plugins directory.
> 
> Maybe some debug code would shed some light.  Could those seeing this
> problem add the following somewhere in akismet.php?
> 
> echo 'FILE: ' . __FILE__ . '<br />';
> echo 'basename: ' . basename(__FILE__) . '<br />';
> echo 'plugin_basename: ' . plugin_basename(__FILE__) . '<br />';
> echo 'base plugin base: ' . plugin_basename(basename(__FILE__)) .
> '<br />';
> Ryan


Also, be sure that you don't have both plugins/akismet.php and
plugins/akismet/akismet.php installed. This will cause problems. Install
it in one location only. Using basename(_FILE__) in this situation might
be covering over the fact that akismet is installed in two locations
since basename() strips the akismet/ subdir and makes it look as those
both plugins are located at plugins/akismet.php.

Ryan



More information about the wp-testers mailing list