[wp-trac] [WordPress Trac] #26772: Permalinks settings page is blank as access to phpinfo() is denied

WordPress Trac noreply at wordpress.org
Thu Jan 9 21:46:08 UTC 2014


#26772: Permalinks settings page is blank as access to phpinfo() is denied
----------------------------+------------------------------
 Reporter:  harmr           |       Owner:
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Administration  |     Version:
 Severity:  normal          |  Resolution:
 Keywords:                  |
----------------------------+------------------------------

Comment (by harmr):

 in order to apply this fix, the code would have to be changed from

 {{{
 } elseif ( function_exists('phpinfo') ) {
                 ob_start();
                 phpinfo(8);
                 $phpinfo = ob_get_clean();
                 if ( false !== strpos($phpinfo, $mod) )
                         return true;
 }
 }}}
 to

 {{{
 } elseif ( function_exists('phpinfo') ) {
         $disabled_functions = explode(',', ini_get('disable_functions'));
         foreach ($disabled as $disableFunction) {
                 $is_disabled[] = trim($disableFunction);
         }
         if (!in_array('phpinfo',$is_disabled)) {
                 ob_start();
                 phpinfo(8);
                 $phpinfo = ob_get_clean();
                 if ( false !== strpos($phpinfo, $mod) )
                         return true;
         }
 }
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/26772#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list