mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
use snprintf
This commit is contained in:
parent
43aa661c5e
commit
e894206874
2 changed files with 4 additions and 4 deletions
|
@ -212,10 +212,10 @@ PHP_MINFO_FUNCTION(apache)
|
||||||
#endif
|
#endif
|
||||||
sprintf(output_buf, "%d", MODULE_MAGIC_NUMBER);
|
sprintf(output_buf, "%d", MODULE_MAGIC_NUMBER);
|
||||||
php_info_print_table_row(2, "Apache API Version", output_buf);
|
php_info_print_table_row(2, "Apache API Version", output_buf);
|
||||||
sprintf(output_buf, "%s:%u", serv->server_hostname, serv->port);
|
snprintf(output_buf, sizeof(output_buf), "%s:%u", serv->server_hostname, serv->port);
|
||||||
php_info_print_table_row(2, "Hostname:Port", output_buf);
|
php_info_print_table_row(2, "Hostname:Port", output_buf);
|
||||||
#if !defined(WIN32) && !defined(WINNT)
|
#if !defined(WIN32) && !defined(WINNT)
|
||||||
sprintf(output_buf, "%s(%d)/%d", user_name, (int)user_id, (int)group_id);
|
snprintf(output_buf, sizeof(output_buf), "%s(%d)/%d", user_name, (int)user_id, (int)group_id);
|
||||||
php_info_print_table_row(2, "User/Group", output_buf);
|
php_info_print_table_row(2, "User/Group", output_buf);
|
||||||
sprintf(output_buf, "Per Child: %d - Keep Alive: %s - Max Per Connection: %d", max_requests_per_child, serv->keep_alive ? "on":"off", serv->keep_alive_max);
|
sprintf(output_buf, "Per Child: %d - Keep Alive: %s - Max Per Connection: %d", max_requests_per_child, serv->keep_alive ? "on":"off", serv->keep_alive_max);
|
||||||
php_info_print_table_row(2, "Max Requests", output_buf);
|
php_info_print_table_row(2, "Max Requests", output_buf);
|
||||||
|
|
|
@ -410,11 +410,11 @@ PHP_MINFO_FUNCTION(apache)
|
||||||
php_info_print_table_row(2, "Server Administrator", serv->server_admin);
|
php_info_print_table_row(2, "Server Administrator", serv->server_admin);
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf(tmp, "%s:%u", serv->server_hostname, serv->port);
|
snprintf(tmp, sizeof(tmp), "%s:%u", serv->server_hostname, serv->port);
|
||||||
php_info_print_table_row(2, "Hostname:Port", tmp);
|
php_info_print_table_row(2, "Hostname:Port", tmp);
|
||||||
|
|
||||||
#if !defined(WIN32) && !defined(WINNT) && !defined(NETWARE)
|
#if !defined(WIN32) && !defined(WINNT) && !defined(NETWARE)
|
||||||
sprintf(tmp, "%s(%d)/%d", unixd_config.user_name, unixd_config.user_id, unixd_config.group_id);
|
snprintf(tmp, sizeof(tmp), "%s(%d)/%d", unixd_config.user_name, unixd_config.user_id, unixd_config.group_id);
|
||||||
php_info_print_table_row(2, "User/Group", tmp);
|
php_info_print_table_row(2, "User/Group", tmp);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue