PHP 4.0 Bug #8441: php_syslog undefined
| From: | ler at lerctr dot org | Date: | Wed, 27 Dec 2000 18:47:09 +0000 |
| Subject: | PHP 4.0 Bug #8441: php_syslog undefined | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-42329@lists.php.net to get a copy of this message | ||
From: ler@lerctr.org
Operating system: UnixWare 7.1.1
PHP version: 4.0.4
PHP Bug Type: Apache related
Bug description: php_syslog undefined
When compiling and installing php 4.0.4 on UnixWare 7.1.1
with the UDK (UnixWare/OpenServer Development Kit) 7.1.1b
compiler, using:
$ cat ler.conf
CC="cc -Xb" CFLAGS="-O" ./configure --with-apxs=/usr/internet/apache/bin/apxs \
--enable-safe-mode --enable-calendar --enable-ftp \
--with-gd=/usr/local --with-pgsql=/usr/local/pgsql \
--enable-shmop --enable-sysvsem --enable-sysvshm \
--without-mysql --with-jpeg-dir=/usr/local \
--with-ttf-dir=/usr/local --with-openssl=/usr/local/ssl \
--with-zlib --enable-bcmath
$
as the configure input, apache doesn't start
because it can't find php_syslog.
Looking at the headers and code, I made the following
patch (works for me, may break other stuff.):
$ cat syslog.patch
Index: ext/standard/syslog.c
===================================================================
RCS file: /cvsroot/php/ext/standard/syslog.c,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -c -r1.1.1.2 -r1.2
*** ext/standard/syslog.c 2000/12/23 23:06:07 1.1.1.2
--- ext/standard/syslog.c 2000/12/23 23:58:12 1.2
***************
*** 252,258 ****
* this will cause problems.
*/
! php_syslog((*priority)->value.lval, "%.500s",(*message)->value.str.val);
RETURN_TRUE;
}
/* }}} */
--- 252,258 ----
* this will cause problems.
*/
! syslog((*priority)->value.lval, "%.500s",(*message)->value.str.val);
RETURN_TRUE;
}
/* }}} */
Index: main/php_syslog.h
===================================================================
RCS file: /cvsroot/php/main/php_syslog.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -c -r1.1.1.1 -r1.2
*** main/php_syslog.h 2000/12/23 23:06:20 1.1.1.1
--- main/php_syslog.h 2000/12/23 23:58:12 1.2
***************
*** 12,17 ****
--- 12,19 ----
* defines syslog to std_syslog.
*/
+
+ #ifdef NOTDEF_LER
#ifdef syslog
#ifdef HAVE_STD_SYSLOG
***************
*** 21,29 ****
#undef syslog
#endif
!
#ifndef php_syslog
#define php_syslog syslog
#endif
#endif
--- 23,32 ----
#undef syslog
#endif
! #endif
#ifndef php_syslog
#define php_syslog syslog
#endif
+
#endif
$
--
Edit Bug report at: http://bugs.php.net/?id=8441&edit=1