Download | Plain Text | Line Numbers
diff -Naur php-5.3.6.orig/ext/standard/basic_functions.c php-5.3.6/ext/standard/basic_functions.c
--- php-5.3.6.orig/ext/standard/basic_functions.c 2011-02-08 17:29:34.000000000 +0100
+++ php-5.3.6/ext/standard/basic_functions.c 2011-03-22 16:38:03.000000000 +0100
@@ -2481,6 +2481,12 @@
ZEND_ARG_INFO(0, facility)
ZEND_END_ARG_INFO()
+ZEND_BEGIN_ARG_INFO(arginfo_openlog2, 0)
+ ZEND_ARG_INFO(0, ident)
+ ZEND_ARG_INFO(0, option)
+ ZEND_ARG_INFO(0, facility)
+ZEND_END_ARG_INFO()
+
ZEND_BEGIN_ARG_INFO(arginfo_closelog, 0)
ZEND_END_ARG_INFO()
@@ -2488,6 +2494,11 @@
ZEND_ARG_INFO(0, priority)
ZEND_ARG_INFO(0, message)
ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO(arginfo_syslog2, 0)
+ ZEND_ARG_INFO(0, priority)
+ ZEND_ARG_INFO(0, message)
+ZEND_END_ARG_INFO()
#endif
/* }}} */
/* {{{ type.c */
@@ -3228,7 +3239,9 @@
/* functions from syslog.c */
#ifdef HAVE_SYSLOG_H
PHP_FE(openlog, arginfo_openlog)
+ PHP_FE(openlog2, arginfo_openlog2)
PHP_FE(syslog, arginfo_syslog)
+ PHP_FE(syslog2, arginfo_syslog2)
PHP_FE(closelog, arginfo_closelog)
PHP_DEP_FE(define_syslog_variables, arginfo_define_syslog_variables)
#endif
diff -Naur php-5.3.6.orig/ext/standard/php_ext_syslog.h php-5.3.6/ext/standard/php_ext_syslog.h
--- php-5.3.6.orig/ext/standard/php_ext_syslog.h 2011-01-01 03:19:59.000000000 +0100
+++ php-5.3.6/ext/standard/php_ext_syslog.h 2011-03-22 16:37:24.000000000 +0100
@@ -33,7 +33,9 @@
PHP_MSHUTDOWN_FUNCTION(syslog);
PHP_FUNCTION(openlog);
+PHP_FUNCTION(openlog2);
PHP_FUNCTION(syslog);
+PHP_FUNCTION(syslog2);
PHP_FUNCTION(closelog);
PHP_FUNCTION(define_syslog_variables);
diff -Naur php-5.3.6.orig/ext/standard/syslog.c php-5.3.6/ext/standard/syslog.c
--- php-5.3.6.orig/ext/standard/syslog.c 2011-01-01 03:19:59.000000000 +0100
+++ php-5.3.6/ext/standard/syslog.c 2011-03-22 16:36:49.000000000 +0100
@@ -222,6 +222,20 @@
*/
PHP_FUNCTION(openlog)
{
+ RETURN_TRUE;
+}
+/* }}} */
+
+
+/* {{{ proto bool openlog(string ident, int option, int facility)
+ Open connection to system logger */
+/*
+ ** OpenLog("nettopp", $LOG_PID, $LOG_LOCAL1);
+ ** Syslog($LOG_EMERG, "help me!")
+ ** CloseLog();
+ */
+PHP_FUNCTION(openlog2)
+{
char *ident;
long option, facility;
int ident_len;
@@ -260,6 +274,15 @@
Generate a system log message */
PHP_FUNCTION(syslog)
{
+ RETURN_TRUE;
+}
+/* }}} */
+
+
+/* {{{ proto bool syslog(int priority, string message)
+ Generate a system log message */
+PHP_FUNCTION(syslog2)
+{
long priority;
char *message;
int message_len;