Jump to content
View in the app

A better way to browse. Learn more.

The Uniform Server Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Proposed Improved PHPINFO() with Loaded Extensions information

Featured Replies

Purpose is to improve the native phpinfo() function to something a bit more specialized.

  • Assumed %top% to be UniServer Root Installation folder/directory

  1. Replace code in file %top%\home\admin\www\phpinfo.php with:
  2. <?php
    /**************************************************************************\
    	Contributors:
    		http://nevstokes.com/blog/2009/06/23/a-better-phpinfo/
    		http://www.page2pagepro.com/a-better-phpinfo/
    \**************************************************************************/
    
    $options = array('CONFIGURATION', 'ENVIRONMENT', 'MODULES', 'EXTENSIONS', 'VARIABLES', 'GENERAL', 'CREDITS', 'LICENSE', 'ALL');
    $display = (empty($_GET['display']) || !in_array(strtoupper($_GET['display']), $options)) ? 'ALL' : strtoupper($_GET['display']);
    
    $navigation = array();
    
    foreach($options as $key=>$value) {
    	$navigation[] = ($value != $display) ? '<a href="' . $_SERVER['SCRIPT_NAME'] . '?display=' . $value . '">' . $value . '</a>' : '<strong>' . $value . '</strong>';
    }
    
    ob_start();
    
    switch($display) {
    	case 'CONFIGURATION':		
    		phpinfo(INFO_CONFIGURATION);
    		break;
    
    	case 'ENVIRONMENT':
    		phpinfo(INFO_ENVIRONMENT);
    		break;
    
    	case 'MODULES':
    		phpinfo(INFO_MODULES);
    		break;
    
    	case 'VARIABLES':
    		phpinfo(INFO_VARIABLES);
    		break;
    
    	case 'GENERAL':
    		phpinfo(INFO_GENERAL);
    		break;
    
    	case 'EXTENSIONS':
    	case 'CREDITS':
    		phpinfo(INFO_CREDITS);
    		break;
    
    	case 'LICENSE':
    		phpinfo(INFO_LICENSE);
    		break;
    
    	case 'ALL': default:
    		phpinfo();
    		break;
    }
    
    $content = ob_get_clean();
    
    if (($display) == 'EXTENSIONS') {
    	$str = '<body><div class="center">';
    	$content = substr($content, 0, strpos("$content$str", $str)+strlen($str));
    	ob_start();
    	echo '<h2>Overview</h2>'.PHP_EOL;
    	echo '<table border="0" cellpadding="3" width="600">'.PHP_EOL;
    	echo '<tr><td class="e">Extensions</td><td class="v">'.PHP_EOL;
    	$exts = array();
    	foreach (get_loaded_extensions() as $ext) {
    		$exts[] = $ext;
    	}
    	echo implode(', ', $exts).PHP_EOL;
    	echo '</td></tr></table><br />'.PHP_EOL;
    	echo '<h2>Details</h2>'.PHP_EOL;
    	echo '<table border="0" cellpadding="3" width="600">'.PHP_EOL;
    	foreach ($exts as $ext) {
    		echo '<tr><td class="e">'.$ext.'</td><td class="v">';
    			$funcs = array();
    			foreach (get_extension_funcs($ext) as $func) {
    				$funcs[] = $func;
    			}
    			echo implode(', ', $funcs).PHP_EOL;
    		echo '</td></tr>'.PHP_EOL;
    	}
    	echo '</table><br />'.PHP_EOL;
    	echo '</div></body></html>'.PHP_EOL;
    	$content .= ob_get_contents();
    	ob_end_clean();		
    }
    
    echo str_replace('<body>', '</body><body><div class="center options"><p>' . implode(' | ', $navigation) .'</p></div>', $content);
    ?>


  3. Code is found with syntax-highlighting (Geshi) at Page2PagePro.com

Please let me know if you have any other additions to this project.

 

Thanx!

Yep! Excellent feature, tested on 5 Series will add with minor changes (menu lower case)

 

All the best

Ric :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.