| | 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 |
| 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 | } |
| | 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 | |