Lines 330-335
PHP_INI_BEGIN()
Link Here
|
330 |
STD_PHP_INI_ENTRY("default_charset", SAPI_DEFAULT_CHARSET, PHP_INI_ALL, OnUpdateString, default_charset, sapi_globals_struct,sapi_globals) |
330 |
STD_PHP_INI_ENTRY("default_charset", SAPI_DEFAULT_CHARSET, PHP_INI_ALL, OnUpdateString, default_charset, sapi_globals_struct,sapi_globals) |
331 |
STD_PHP_INI_ENTRY("default_mimetype", SAPI_DEFAULT_MIMETYPE, PHP_INI_ALL, OnUpdateString, default_mimetype, sapi_globals_struct,sapi_globals) |
331 |
STD_PHP_INI_ENTRY("default_mimetype", SAPI_DEFAULT_MIMETYPE, PHP_INI_ALL, OnUpdateString, default_mimetype, sapi_globals_struct,sapi_globals) |
332 |
STD_PHP_INI_ENTRY("error_log", NULL, PHP_INI_ALL, OnUpdateString, error_log, php_core_globals, core_globals) |
332 |
STD_PHP_INI_ENTRY("error_log", NULL, PHP_INI_ALL, OnUpdateString, error_log, php_core_globals, core_globals) |
|
|
333 |
STD_PHP_INI_ENTRY("error_log_facility", NULL, PHP_INI_ALL, OnUpdateString, error_log_facility, php_core_globals, core_globals) |
333 |
STD_PHP_INI_ENTRY("extension_dir", PHP_EXTENSION_DIR, PHP_INI_SYSTEM, OnUpdateStringUnempty, extension_dir, php_core_globals, core_globals) |
334 |
STD_PHP_INI_ENTRY("extension_dir", PHP_EXTENSION_DIR, PHP_INI_SYSTEM, OnUpdateStringUnempty, extension_dir, php_core_globals, core_globals) |
334 |
STD_PHP_INI_ENTRY("gpc_order", "GPC", PHP_INI_ALL, OnUpdateStringUnempty, gpc_order, php_core_globals, core_globals) |
335 |
STD_PHP_INI_ENTRY("gpc_order", "GPC", PHP_INI_ALL, OnUpdateStringUnempty, gpc_order, php_core_globals, core_globals) |
335 |
STD_PHP_INI_ENTRY("include_path", PHP_INCLUDE_PATH, PHP_INI_ALL, OnUpdateStringUnempty, include_path, php_core_globals, core_globals) |
336 |
STD_PHP_INI_ENTRY("include_path", PHP_INCLUDE_PATH, PHP_INI_ALL, OnUpdateStringUnempty, include_path, php_core_globals, core_globals) |
Lines 377-387
PHPAPI void php_log_err(char *log_messag
Link Here
|
377 |
char error_time_str[128]; |
378 |
char error_time_str[128]; |
378 |
struct tm tmbuf; |
379 |
struct tm tmbuf; |
379 |
time_t error_time; |
380 |
time_t error_time; |
|
|
381 |
int facility = LOG_LOCAL0; |
380 |
|
382 |
|
381 |
/* Try to use the specified logging location. */ |
383 |
/* Try to use the specified logging location. */ |
382 |
if (PG(error_log) != NULL) { |
384 |
if (PG(error_log) != NULL) { |
383 |
#ifdef HAVE_SYSLOG_H |
385 |
#ifdef HAVE_SYSLOG_H |
|
|
386 |
if (PG(error_log_facility) != NULL) { |
387 |
if (!strcmp(PG(error_log_facility), "LOCAL0")) { |
388 |
facility = LOG_LOCAL0; |
389 |
} |
390 |
else if (!strcmp(PG(error_log_facility), "LOCAL1")) { |
391 |
facility = LOG_LOCAL1; |
392 |
} |
393 |
else if (!strcmp(PG(error_log_facility), "LOCAL2")) { |
394 |
facility = LOG_LOCAL2; |
395 |
} |
396 |
else if (!strcmp(PG(error_log_facility), "LOCAL3")) { |
397 |
facility = LOG_LOCAL3; |
398 |
} |
399 |
else if (!strcmp(PG(error_log_facility), "LOCAL4")) { |
400 |
facility = LOG_LOCAL4; |
401 |
} |
402 |
else if (!strcmp(PG(error_log_facility), "LOCAL5")) { |
403 |
facility = LOG_LOCAL5; |
404 |
} |
405 |
else if (!strcmp(PG(error_log_facility), "LOCAL6")) { |
406 |
facility = LOG_LOCAL6; |
407 |
} |
408 |
else if (!strcmp(PG(error_log_facility), "LOCAL7")) { |
409 |
facility = LOG_LOCAL7; |
410 |
} |
411 |
} |
384 |
if (!strcmp(PG(error_log), "syslog")) { |
412 |
if (!strcmp(PG(error_log), "syslog")) { |
|
|
413 |
openlog ("php", LOG_CONS | LOG_PID , facility); |
385 |
php_syslog(LOG_NOTICE, "%.500s", log_message); |
414 |
php_syslog(LOG_NOTICE, "%.500s", log_message); |
386 |
return; |
415 |
return; |
387 |
} |
416 |
} |