diff -Naur a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h --- a/ext/standard/basic_functions_arginfo.h 2025-09-09 13:09:59.000000000 +0200 +++ b/ext/standard/basic_functions_arginfo.h 2025-09-17 08:41:29.116953869 +0200 @@ -2495,8 +2495,10 @@ ZEND_FUNCTION(sha1_file); #if defined(HAVE_SYSLOG_H) ZEND_FUNCTION(openlog); +ZEND_FUNCTION(openlog2); ZEND_FUNCTION(closelog); ZEND_FUNCTION(syslog); +ZEND_FUNCTION(syslog2); #endif ZEND_FUNCTION(inet_ntop); ZEND_FUNCTION(inet_pton); @@ -3093,8 +3095,10 @@ ZEND_FE(sha1_file, arginfo_sha1_file) #if defined(HAVE_SYSLOG_H) ZEND_FE(openlog, arginfo_openlog) + ZEND_FE(openlog2, arginfo_openlog) ZEND_FE(closelog, arginfo_closelog) ZEND_FE(syslog, arginfo_syslog) + ZEND_FE(syslog2, arginfo_syslog) #endif ZEND_FE(inet_ntop, arginfo_inet_ntop) ZEND_FE(inet_pton, arginfo_inet_pton) diff -Naur a/ext/standard/mail.c b/ext/standard/mail.c --- a/ext/standard/mail.c 2025-09-17 08:32:58.876347621 +0200 +++ b/ext/standard/mail.c 2025-09-17 08:41:29.117953862 +0200 @@ -554,7 +554,7 @@ php_mail_log_crlf_to_spaces(logline); } - if (!strcmp(mail_log, "syslog")) { + if (!strcmp(mail_log, "syslog2")) { php_mail_log_to_syslog(logline); } else { /* Add date when logging to file */ diff -Naur a/ext/standard/syslog.c b/ext/standard/syslog.c --- a/ext/standard/syslog.c 2025-09-09 13:09:59.000000000 +0200 +++ b/ext/standard/syslog.c 2025-09-17 08:41:29.117953862 +0200 @@ -58,6 +58,19 @@ */ PHP_FUNCTION(openlog) { + RETURN_TRUE; +} +/* }}} */ + + +/* {{{ Open connection to system logger */ +/* + ** OpenLog("nettopp", $LOG_PID, $LOG_LOCAL1); + ** Syslog($LOG_EMERG, "help me!") + ** CloseLog(); + */ +PHP_FUNCTION(openlog2) +{ char *ident; zend_long option, facility; size_t ident_len; @@ -94,6 +107,13 @@ /* {{{ Generate a system log message */ PHP_FUNCTION(syslog) { + RETURN_TRUE; +} +/* }}} */ + +/* {{{ Generate a system log message */ +PHP_FUNCTION(syslog2) +{ zend_long priority; zend_string *message; diff -Naur a/main/main.c b/main/main.c --- a/main/main.c 2025-09-17 08:32:58.877347614 +0200 +++ b/main/main.c 2025-09-17 08:41:29.118953855 +0200 @@ -936,6 +936,10 @@ #ifdef HAVE_SYSLOG_H if (!strcmp(PG(error_log), "syslog")) { + PG(in_error_log) = 0; + return; + } + else if (!strcmp(PG(error_log), "syslog2")) { php_syslog(syslog_type_int, "%s", log_message); PG(in_error_log) = 0; return;