summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKalle Sommer Nielsen <kalle@php.net>2008-10-15 18:41:18 +0000
committerKalle Sommer Nielsen <kalle@php.net>2008-10-15 18:41:18 +0000
commite667c25403e782821bf6c4c18ff6dcabdb594c69 (patch)
tree71e319ff670b852d8d78d13cf83a14a2ed01dadf
parentfaadae148b22debe82559e64b569f29ab118716f (diff)
downloadphp-git-e667c25403e782821bf6c4c18ff6dcabdb594c69.tar.gz
[DOC] Remove define_syslog_variables() and define_syslog_variables ini option
-rw-r--r--NEWS2
-rw-r--r--ext/standard/basic_functions.c4
-rw-r--r--ext/standard/basic_functions.h1
-rw-r--r--ext/standard/php_ext_syslog.h1
-rw-r--r--ext/standard/syslog.c86
-rw-r--r--main/main.c2
-rw-r--r--php.ini-dist6
-rw-r--r--php.ini-recommended6
-rwxr-xr-xwin32/build/registersyslog.php1
9 files changed, 3 insertions, 106 deletions
diff --git a/NEWS b/NEWS
index b7026d52f7..152e492cf5 100644
--- a/NEWS
+++ b/NEWS
@@ -24,6 +24,8 @@ PHP NEWS
options. (Pierre)
. Changed get_magic_quotes_gpc(), get_magic_quotes_runtime to always return
false and set_magic_quotes_runtime() to raise an E_CORE_ERROR.
+ . "define_syslog_variables" ini option and define_syslog_variables()
+ (Kalle)
- Removed support for "continue" and "break" operators with non-constant
operands. (Dmitry)
- Removed Freetype 1.x and GD 1.x support from GD extension. (Pierre)
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 0d63a80d55..f0b799e254 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -2886,9 +2886,6 @@ ZEND_END_ARG_INFO()
/* }}} */
/* {{{ syslog.c */
#ifdef HAVE_SYSLOG_H
-static
-ZEND_BEGIN_ARG_INFO(arginfo_define_syslog_variables, 0)
-ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_openlog, 0)
@@ -3702,7 +3699,6 @@ const zend_function_entry basic_functions[] = { /* {{{ */
PHP_FE(openlog, arginfo_openlog)
PHP_FE(syslog, arginfo_syslog)
PHP_FE(closelog, arginfo_closelog)
- PHP_FE(define_syslog_variables, arginfo_define_syslog_variables)
#endif
/* functions from lcg.c */
diff --git a/ext/standard/basic_functions.h b/ext/standard/basic_functions.h
index 2547484ba7..d7e492ca4e 100644
--- a/ext/standard/basic_functions.h
+++ b/ext/standard/basic_functions.h
@@ -200,7 +200,6 @@ typedef struct _php_basic_globals {
zend_bool mt_rand_is_seeded; /* Whether mt_rand() has been seeded */
/* syslog.c */
- int syslog_started;
char *syslog_device;
/* var.c */
diff --git a/ext/standard/php_ext_syslog.h b/ext/standard/php_ext_syslog.h
index 5e5fdc07c2..25fa7d056e 100644
--- a/ext/standard/php_ext_syslog.h
+++ b/ext/standard/php_ext_syslog.h
@@ -35,7 +35,6 @@ PHP_MSHUTDOWN_FUNCTION(syslog);
PHP_FUNCTION(openlog);
PHP_FUNCTION(syslog);
PHP_FUNCTION(closelog);
-PHP_FUNCTION(define_syslog_variables);
#endif
diff --git a/ext/standard/syslog.c b/ext/standard/syslog.c
index fd05b509fd..91896a172d 100644
--- a/ext/standard/syslog.c
+++ b/ext/standard/syslog.c
@@ -105,11 +105,6 @@ PHP_MINIT_FUNCTION(syslog)
PHP_RINIT_FUNCTION(syslog) /* {{{ */
{
- if (INI_INT("define_syslog_variables")) {
- start_syslog(TSRMLS_C);
- } else {
- BG(syslog_started)=0;
- }
BG(syslog_device) = NULL;
return SUCCESS;
}
@@ -134,87 +129,6 @@ PHP_MSHUTDOWN_FUNCTION(syslog) /* {{{ */
}
/* }}} */
-/* {{{ start_syslog
- */
-static void start_syslog(TSRMLS_D)
-{
- /* error levels */
- SET_VAR_LONG("LOG_EMERG", LOG_EMERG); /* system unusable */
- SET_VAR_LONG("LOG_ALERT", LOG_ALERT); /* immediate action required */
- SET_VAR_LONG("LOG_CRIT", LOG_CRIT); /* critical conditions */
- SET_VAR_LONG("LOG_ERR", LOG_ERR);
- SET_VAR_LONG("LOG_WARNING", LOG_WARNING);
- SET_VAR_LONG("LOG_NOTICE", LOG_NOTICE);
- SET_VAR_LONG("LOG_INFO", LOG_INFO);
- SET_VAR_LONG("LOG_DEBUG", LOG_DEBUG);
- /* facility: type of program logging the message */
- SET_VAR_LONG("LOG_KERN", LOG_KERN);
- SET_VAR_LONG("LOG_USER", LOG_USER); /* generic user level */
- SET_VAR_LONG("LOG_MAIL", LOG_MAIL); /* log to email */
- SET_VAR_LONG("LOG_DAEMON", LOG_DAEMON); /* other system daemons */
- SET_VAR_LONG("LOG_AUTH", LOG_AUTH);
-#ifndef NETWARE
- SET_VAR_LONG("LOG_SYSLOG", LOG_SYSLOG);
-#endif
- SET_VAR_LONG("LOG_LPR", LOG_LPR);
-#ifdef LOG_NEWS
- /* No LOG_NEWS on HP-UX */
- SET_VAR_LONG("LOG_NEWS", LOG_NEWS); /* usenet new */
-#endif
-#ifdef LOG_UUCP
- /* No LOG_UUCP on HP-UX */
- SET_VAR_LONG("LOG_UUCP", LOG_UUCP);
-#endif
-#ifdef LOG_CRON
- /* apparently some systems don't have this one */
- SET_VAR_LONG("LOG_CRON", LOG_CRON);
-#endif
-#ifdef LOG_AUTHPRIV
- /* AIX doesn't have LOG_AUTHPRIV */
- SET_VAR_LONG("LOG_AUTHPRIV", LOG_AUTHPRIV);
-#endif
-#if !defined(PHP_WIN32) && !defined(NETWARE)
- SET_VAR_LONG("LOG_LOCAL0", LOG_LOCAL0);
- SET_VAR_LONG("LOG_LOCAL1", LOG_LOCAL1);
- SET_VAR_LONG("LOG_LOCAL2", LOG_LOCAL2);
- SET_VAR_LONG("LOG_LOCAL3", LOG_LOCAL3);
- SET_VAR_LONG("LOG_LOCAL4", LOG_LOCAL4);
- SET_VAR_LONG("LOG_LOCAL5", LOG_LOCAL5);
- SET_VAR_LONG("LOG_LOCAL6", LOG_LOCAL6);
- SET_VAR_LONG("LOG_LOCAL7", LOG_LOCAL7);
-#endif
- /* options */
- SET_VAR_LONG("LOG_PID", LOG_PID);
- SET_VAR_LONG("LOG_CONS", LOG_CONS);
- SET_VAR_LONG("LOG_ODELAY", LOG_ODELAY);
- SET_VAR_LONG("LOG_NDELAY", LOG_NDELAY);
-#ifdef LOG_NOWAIT
- /* BeOS doesn't have LOG_NOWAIT */
- SET_VAR_LONG("LOG_NOWAIT", LOG_NOWAIT);
-#endif
-#ifdef LOG_PERROR
- /* AIX doesn't have LOG_PERROR */
- SET_VAR_LONG("LOG_PERROR", LOG_PERROR); /*log to stderr*/
-#endif
-
- BG(syslog_started)=1;
-}
-/* }}} */
-
-/* {{{ proto void define_syslog_variables(void) U
- Initializes all syslog-related variables */
-PHP_FUNCTION(define_syslog_variables)
-{
- if (zend_parse_parameters_none() == FAILURE) {
- return;
- }
-
- if (!BG(syslog_started)) {
- start_syslog(TSRMLS_C);
- }
-}
-/* }}} */
-
/* {{{ proto bool openlog(string ident, int option, int facility) U
Open connection to system logger */
/*
diff --git a/main/main.c b/main/main.c
index 0dc67777e5..387e54d963 100644
--- a/main/main.c
+++ b/main/main.c
@@ -474,7 +474,6 @@ static PHP_INI_MH(OnChangeMailForceExtra)
/* {{{ PHP_INI
*/
PHP_INI_BEGIN()
- PHP_INI_ENTRY_EX("define_syslog_variables", "0", PHP_INI_ALL, NULL, php_ini_boolean_displayer_cb)
PHP_INI_ENTRY_EX("highlight.comment", HL_COMMENT_COLOR, PHP_INI_ALL, NULL, php_ini_color_displayer_cb)
PHP_INI_ENTRY_EX("highlight.default", HL_DEFAULT_COLOR, PHP_INI_ALL, NULL, php_ini_color_displayer_cb)
PHP_INI_ENTRY_EX("highlight.html", HL_HTML_COLOR, PHP_INI_ALL, NULL, php_ini_color_displayer_cb)
@@ -1935,6 +1934,7 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod
/* Check for deprecated directives */
{
static const char *directives[] = {
+ "define_syslog_variables",
"register_globals",
"register_long_arrays",
"safe_mode",
diff --git a/php.ini-dist b/php.ini-dist
index abf15031db..3f12f869c7 100644
--- a/php.ini-dist
+++ b/php.ini-dist
@@ -648,12 +648,6 @@ default_socket_timeout = 60
;phar.require_hash = On
;phar.cache_list =
-[Syslog]
-; Whether or not to define the various syslog variables (e.g. $LOG_PID,
-; $LOG_CRON, etc.). Turning it off is a good idea performance-wise. In
-; runtime, you can define these variables by calling define_syslog_variables().
-define_syslog_variables = Off
-
[mail function]
; For Win32 only.
SMTP = localhost
diff --git a/php.ini-recommended b/php.ini-recommended
index 3402d04655..b73f85df03 100644
--- a/php.ini-recommended
+++ b/php.ini-recommended
@@ -685,12 +685,6 @@ default_socket_timeout = 60
;phar.require_hash = On
;phar.cache_list =
-[Syslog]
-; Whether or not to define the various syslog variables (e.g. $LOG_PID,
-; $LOG_CRON, etc.). Turning it off is a good idea performance-wise. In
-; runtime, you can define these variables by calling define_syslog_variables().
-define_syslog_variables = Off
-
[mail function]
; For Win32 only.
SMTP = localhost
diff --git a/win32/build/registersyslog.php b/win32/build/registersyslog.php
index db5f459f73..e5aa1d92c0 100755
--- a/win32/build/registersyslog.php
+++ b/win32/build/registersyslog.php
@@ -20,7 +20,6 @@ if (extension_loaded("win32std")) {
reg_set_value($key, "TypesSupported", REG_DWORD, 7) or die("Types");
reg_set_value($key, "EventMessageFile", REG_SZ, $dll) or die("EventMessageFile");
- define_syslog_variables();
syslog(LOG_NOTICE, "Registered PHP Event source");
} else {
echo "Could not register event source\n";