[wp-trac] Re: [WordPress Trac] #10011: Use of add_theme_page() causes Wordpress on IIS to crash.

WordPress Trac wp-trac at lists.automattic.com
Thu Jun 4 12:30:00 GMT 2009


#10011: Use of add_theme_page() causes Wordpress on IIS to crash.
--------------------------+-------------------------------------------------
 Reporter:  bforchhammer  |        Type:  defect (bug)
   Status:  new           |    Priority:  normal      
Milestone:  2.8           |   Component:  Plugins     
  Version:  2.7.1         |    Severity:  major       
 Keywords:  needs-patch   |  
--------------------------+-------------------------------------------------

Comment(by bforchhammer):

 Okay, I've tracked it down into
 [http://core.trac.wordpress.org/browser/trunk/wp-admin/menu-
 header.php#L118 menu-header.php] and a `file_exists()` call.

 {{{
 file_exists("E:\Inetpub_Prod\wwwroot/wp-
 content/plugins/E:/Inetpub_Prod/wwwroot/wp-
 content/themes/p2/functions.php");
 }}}

 The path is a combination of `WP_PLUGIN_DIR` and that `__FILE__` variable
 passed to `add_theme_page`; it obviously is quite wrong and
 `file_exists()` should simply return false.

 In our environment however it spins and times out... very strange.

 I've copied the code above into an empty php file and played around with
 it a bit; it seems to timeout as soon as there's a second `e:/` in the
 path; wrong slashes, wrong path, etc. doesn't cause a timeout.

 Could you guys try this on your IIS boxes and check how your server
 reacts?

 It might just be a wrong server setting or php.ini configuration, or maybe
 a PHP/IIS Bug, but maybe WordPress should also do some cleaning up on that
 filename?

 What do you guys think?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10011#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list