Changeset 81 in svn
- Timestamp:
- 2006-06-18T01:04:54Z (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.0/xcache.c
r74 r81 12 12 #include "ext/standard/info.h" 13 13 #include "ext/standard/md5.h" 14 #include "ext/standard/php_math.h" 14 15 #include "zend_extensions.h" 15 16 #include "SAPI.h" … … 1788 1789 PHP_INI_END() 1789 1790 /* }}} */ 1791 static int xc_config_long_disp(char *name, char *default_value) /* {{{ */ 1792 { 1793 char *value; 1794 char buf[100]; 1795 1796 if (cfg_get_string(name, &value) != SUCCESS) { 1797 sprintf(buf, "%s (default)", default_value); 1798 php_info_print_table_row(2, name, buf); 1799 } 1800 else { 1801 php_info_print_table_row(2, name, value); 1802 } 1803 1804 return SUCCESS; 1805 } 1806 /* }}} */ 1807 #define xc_config_hash_disp xc_config_long_disp 1790 1808 /* {{{ PHP_MINFO_FUNCTION(xcache) */ 1791 1809 static PHP_MINFO_FUNCTION(xcache) 1792 1810 { 1811 char buf[100]; 1812 char *ptr; 1813 1793 1814 php_info_print_table_start(); 1794 1815 php_info_print_table_header(2, "XCache Support", (xc_php_size || xc_var_size) ? "enabled" : "disabled"); 1795 1816 php_info_print_table_row(2, "Version", XCACHE_VERSION); 1796 1817 php_info_print_table_row(2, "Modules Built", XCACHE_MODULES); 1797 php_info_print_table_row(2, "Readonly Protection", xc_readonly_protection ? "enabled" : "N/A"); 1798 php_info_print_table_row(2, "Opcode Cache", xc_php_size ? "enabled" : "disabled"); 1799 php_info_print_table_row(2, "Variable Cache", xc_var_size ? "enabled" : "disabled"); 1818 php_info_print_table_row(2, "Readonly Protection", xc_readonly_protection ? "enabled" : "N/A or disabled"); 1819 1820 if (xc_php_size) { 1821 ptr = _php_math_number_format(xc_php_size, 0, '.', ','); 1822 sprintf(buf, "enabled, %s bytes, %d split(s), with %d slots each", ptr, xc_php_hcache.size, xc_php_hentry.size); 1823 php_info_print_table_row(2, "Opcode Cache", buf); 1824 efree(ptr); 1825 } 1826 else { 1827 php_info_print_table_row(2, "Opcode Cache", "disabled"); 1828 } 1829 if (xc_var_size) { 1830 ptr = _php_math_number_format(xc_var_size, 0, '.', ','); 1831 sprintf(buf, "enabled, %s bytes, %d split(s), with %d slots each", ptr, xc_var_hcache.size, xc_var_hentry.size); 1832 php_info_print_table_row(2, "Variable Cache", buf); 1833 efree(ptr); 1834 } 1835 else { 1836 php_info_print_table_row(2, "Variable Cache", "disabled"); 1837 } 1800 1838 #ifdef HAVE_XCACHE_COVERAGER 1801 1839 php_info_print_table_row(2, "Coverage Dumper", XG(coveragedumper) && xc_coveragedump_dir && xc_coveragedump_dir[0] ? "enabled" : "disabled"); 1802 1840 #endif 1803 1841 php_info_print_table_end(); 1842 1843 php_info_print_table_start(); 1844 php_info_print_table_header(2, "Directive ", "Value"); 1845 xc_config_long_disp("xcache.size", "0"); 1846 xc_config_hash_disp("xcache.count", "1"); 1847 xc_config_hash_disp("xcache.slots", "8K"); 1848 1849 xc_config_long_disp("xcache.var_size", "0"); 1850 xc_config_hash_disp("xcache.var_count", "1"); 1851 xc_config_hash_disp("xcache.var_slots", "8K"); 1852 php_info_print_table_end(); 1853 1804 1854 DISPLAY_INI_ENTRIES(); 1805 1855 } … … 1857 1907 return SUCCESS; 1858 1908 } 1909 /* }}} */ 1859 1910 static int xc_config_long(long *p, char *name, char *default_value) /* {{{ */ 1860 1911 {
Note: See TracChangeset
for help on using the changeset viewer.