[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS /ext/session mod_files.c
iliaa Wed Sep 24 19:39:23 2003 EDT Modified files: (Branch: PHP_4_3) /php-srcNEWS /php-src/ext/sessionmod_files.c Log: MFH: Fixed bug #25070 (Don't forget to unlock session files on win32 before closing them). Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.408 php-src/NEWS:1.1247.2.409 --- php-src/NEWS:1.1247.2.408 Wed Sep 24 19:22:32 2003 +++ php-src/NEWSWed Sep 24 19:39:22 2003 @@ -49,6 +49,8 @@ - Fixed bug #25109 (Possible crash when fetching field names in pgsql). (Ilia) - Fixed bug #25106 (Added more stringent checks on bzopen() mode). (Ilia) - Fixed bug #25218 ("deflate" compressed pages had a gzip header). (Stefan) +- Fixed bug #25070 (Don't forget to unlock session files on win32 before + closing them). (Ilia) - Fixed bug #24402 (Compile failure with gettext 0.12.x). (Jani) - Fixed bug #23326 (ext/domxml: Attributes via append_child not supported). (Melvyn) Index: php-src/ext/session/mod_files.c diff -u php-src/ext/session/mod_files.c:1.83.2.5 php-src/ext/session/mod_files.c:1.83.2.6 --- php-src/ext/session/mod_files.c:1.83.2.5Tue May 20 16:01:54 2003 +++ php-src/ext/session/mod_files.c Wed Sep 24 19:39:22 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: mod_files.c,v 1.83.2.5 2003/05/20 20:01:54 sas Exp $ */ +/* $Id: mod_files.c,v 1.83.2.6 2003/09/24 23:39:22 iliaa Exp $ */ #include "php.h" @@ -124,6 +124,7 @@ static void ps_files_close(ps_files *data) { if (data->fd != -1) { + flock(data->fd, LOCK_UN); close(data->fd); data->fd = -1; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/session mod_files.c
iliaa Wed Sep 24 19:39:15 2003 EDT Modified files: /php-src/ext/sessionmod_files.c Log: Fixed bug #25070 (Don't forget to unlock session files on win32 before closing them). Regions should be locked only briefly and should be unlocked before closing a file or exiting the program. On Win32 locked files that are closed without being explicitly unlocked will be unlocked only when "system resources become avaliable". Index: php-src/ext/session/mod_files.c diff -u php-src/ext/session/mod_files.c:1.91 php-src/ext/session/mod_files.c:1.92 --- php-src/ext/session/mod_files.c:1.91Tue Jun 10 16:03:36 2003 +++ php-src/ext/session/mod_files.c Wed Sep 24 19:39:14 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: mod_files.c,v 1.91 2003/06/10 20:03:36 imajes Exp $ */ +/* $Id: mod_files.c,v 1.92 2003/09/24 23:39:14 iliaa Exp $ */ #include "php.h" @@ -127,6 +127,7 @@ static void ps_files_close(ps_files *data) { if (data->fd != -1) { + flock(data->fd, LOCK_UN); close(data->fd); data->fd = -1; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS /main main.c php.h
iliaa Wed Sep 24 19:22:33 2003 EDT Modified files: (Branch: PHP_4_3) /php-srcNEWS /php-src/main main.c php.h Log: MFH: Fixed bug #25293 (Output correct EOL to error_log) Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.407 php-src/NEWS:1.1247.2.408 --- php-src/NEWS:1.1247.2.407 Wed Sep 24 18:55:58 2003 +++ php-src/NEWSWed Sep 24 19:22:32 2003 @@ -42,6 +42,7 @@ - Fixed bug #25307 (Crash with WDDX serializer). (Sascha, Jani) - Fixed bug #25295 (QNX6: php_ini.c:414: 'alphasort' undeclared). (Jani) - Fixed bug #25294 (ext/ftp: NLST failure leads to crash on exit). (Sara, Rob) +- Fixed bug #25293 (Output correct EOL to error_log). (Ilia) - Fixed bug #25239 (ftp_fopen_wrapper not RFC compliant). (Sara) - Fixed bug #25211 (image.c compile failure with AIX). (Marcus) - Fixed bug #25166 (WDDX serializer handler missing in win32). (Jani) Index: php-src/main/main.c diff -u php-src/main/main.c:1.512.2.46 php-src/main/main.c:1.512.2.47 --- php-src/main/main.c:1.512.2.46 Fri Aug 22 16:02:11 2003 +++ php-src/main/main.c Wed Sep 24 19:22:32 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: main.c,v 1.512.2.46 2003/08/22 20:02:11 iliaa Exp $ */ +/* $Id: main.c,v 1.512.2.47 2003/09/24 23:22:32 iliaa Exp $ */ /* {{{ includes */ @@ -394,7 +394,7 @@ strftime(error_time_str, sizeof(error_time_str), "%d-%b-%Y %H:%M:%S", php_localtime_r(&error_time, &tmbuf)); fprintf(log_file, "[%s] ", error_time_str); fprintf(log_file, "%s", log_message); - fprintf(log_file, "\n"); + fprintf(log_file, "%s", PHP_EOL); fclose(log_file); return; } Index: php-src/main/php.h diff -u php-src/main/php.h:1.178.2.7 php-src/main/php.h:1.178.2.8 --- php-src/main/php.h:1.178.2.7Thu Aug 28 11:52:15 2003 +++ php-src/main/php.h Wed Sep 24 19:22:32 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php.h,v 1.178.2.7 2003/08/28 15:52:15 sas Exp $ */ +/* $Id: php.h,v 1.178.2.8 2003/09/24 23:22:32 iliaa Exp $ */ #ifndef PHP_H #define PHP_H @@ -55,10 +55,16 @@ # define PHPAPI __declspec(dllimport) # endif #define PHP_DIR_SEPARATOR '\\' +#define PHP_EOL "\r\n" #else #define PHPAPI #define THREAD_LS #define PHP_DIR_SEPARATOR '/' +#if defined(__MacOSX__) +#define PHP_EOL "\r" +#else +#define PHP_EOL "\n" +#endif #endif #ifdef NETWARE -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /main main.c php.h
iliaa Wed Sep 24 19:20:49 2003 EDT Modified files: /php-src/main main.c php.h Log: Fixed bug #25293 (Output correct EOL to error_log) Index: php-src/main/main.c diff -u php-src/main/main.c:1.577 php-src/main/main.c:1.578 --- php-src/main/main.c:1.577 Wed Sep 17 20:04:57 2003 +++ php-src/main/main.c Wed Sep 24 19:20:48 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: main.c,v 1.577 2003/09/18 00:04:57 iliaa Exp $ */ +/* $Id: main.c,v 1.578 2003/09/24 23:20:48 iliaa Exp $ */ /* {{{ includes */ @@ -366,7 +366,7 @@ strftime(error_time_str, sizeof(error_time_str), "%d-%b-%Y %H:%M:%S", php_localtime_r(&error_time, &tmbuf)); fprintf(log_file, "[%s] ", error_time_str); fprintf(log_file, "%s", log_message); - fprintf(log_file, "\n"); + fprintf(log_file, "%s", PHP_EOL); fclose(log_file); return; } Index: php-src/main/php.h diff -u php-src/main/php.h:1.198 php-src/main/php.h:1.199 --- php-src/main/php.h:1.198Tue Sep 2 09:05:15 2003 +++ php-src/main/php.h Wed Sep 24 19:20:48 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php.h,v 1.198 2003/09/02 13:05:15 abies Exp $ */ +/* $Id: php.h,v 1.199 2003/09/24 23:20:48 iliaa Exp $ */ #ifndef PHP_H #define PHP_H @@ -55,10 +55,16 @@ # define PHPAPI __declspec(dllimport) # endif #define PHP_DIR_SEPARATOR '\\' +#define PHP_EOL "\r\n" #else #define PHPAPI #define THREAD_LS #define PHP_DIR_SEPARATOR '/' +#if defined(__MacOSX__) +#define PHP_EOL "\r" +#else +#define PHP_EOL "\n" +#endif #endif #ifdef NETWARE -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS /ext/xslt config.m4
sniper Wed Sep 24 18:56:00 2003 EDT Modified files: (Branch: PHP_4_3) /php-srcNEWS /php-src/ext/xslt config.m4 Log: - Fixed bug #25648 (xslt_set_encoding() being not detected correctly) Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.406 php-src/NEWS:1.1247.2.407 --- php-src/NEWS:1.1247.2.406 Wed Sep 24 04:28:26 2003 +++ php-src/NEWSWed Sep 24 18:55:58 2003 @@ -7,6 +7,7 @@ - Fixed crash bug when non-existing save/serializer handler was used. (Jani) - Fixed memory leak in gethostbynamel() if an error occurs. (Sara) - Fixed FastCGI being unable to bind to a specific IP. (Sascha) +- Fixed bug #25648 (xslt_set_encoding() being not detected correctly). (Jani) - Fixed bug #25636 (SNMP Session not closed on success). (Ilia, nesslage[at]mwsc[dot]edu) - Fixed bug #25635 (Make "make tests" to fail due to invalid include_path). (Ilia) Index: php-src/ext/xslt/config.m4 diff -u php-src/ext/xslt/config.m4:1.30.2.2 php-src/ext/xslt/config.m4:1.30.2.3 --- php-src/ext/xslt/config.m4:1.30.2.2 Wed Apr 23 04:55:00 2003 +++ php-src/ext/xslt/config.m4 Wed Sep 24 18:55:59 2003 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.30.2.2 2003/04/23 08:55:00 sniper Exp $ +dnl $Id: config.m4,v 1.30.2.3 2003/09/24 22:55:59 sniper Exp $ dnl dnl +--+ dnl | This is where the magic of the extension reallly is. Depending on what | @@ -56,7 +56,7 @@ if test -z "$XSLT_DIR"; then AC_MSG_ERROR([not found. Please re-install the $XSLT_BACKEND_NAME distribution.]) fi - + if test "$PHP_XSLT_SABLOT" != "no"; then AC_MSG_CHECKING([for sablot-config]) if test -x $XSLT_DIR/bin/sablot-config ; then @@ -132,6 +132,7 @@ PHP_CHECK_LIBRARY(js, JS_GetRuntime, [ PHP_ADD_LIBRARY_WITH_PATH(js, $PHP_SABLOT_JS_DIR/lib, XSLT_SHARED_LIBADD) +PHP_SABLOT_JS_LIBS=-L$PHP_SABLOT_JS_DIR/lib -ljs ], [ AC_MSG_ERROR([libjs not found. Please check config.log for more information.]) ], [ @@ -143,7 +144,7 @@ [ AC_DEFINE(HAVE_SABLOT_SET_ENCODING, 1, [ ]) ], [], [ - -L$XSLT_DIR/lib + -L$XSLT_DIR/lib $PHP_SABLOT_JS_LIBS ]) dnl SablotSetOptions implemented in Sablotron CVS > 2002/10/31 @@ -151,7 +152,7 @@ [ AC_DEFINE(HAVE_SABLOT_GET_OPTIONS, 1, [Whether Sablotron supports SablotGetOptions]) ], [], [ - -L$XSLT_DIR/lib + -L$XSLT_DIR/lib $PHP_SABLOT_JS_LIBS ]) AC_DEFINE(HAVE_SABLOT_BACKEND, 1, [ ]) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) / acinclude.m4
sniper Wed Sep 24 10:31:19 2003 EDT Modified files: (Branch: PHP_4_3) /php-srcacinclude.m4 Log: MFH: use pkg-config if available for openssl setup Index: php-src/acinclude.m4 diff -u php-src/acinclude.m4:1.218.2.27 php-src/acinclude.m4:1.218.2.28 --- php-src/acinclude.m4:1.218.2.27 Wed Sep 3 18:54:13 2003 +++ php-src/acinclude.m4Wed Sep 24 10:31:18 2003 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.218.2.27 2003/09/03 22:54:13 sniper Exp $ +dnl $Id: acinclude.m4,v 1.218.2.28 2003/09/24 14:31:18 sniper Exp $ dnl dnl This file contains local autoconf functions. @@ -1593,65 +1593,86 @@ unset OPENSSL_INCDIR unset OPENSSL_LIBDIR - if test "$PHP_OPENSSL" = "yes"; then -PHP_OPENSSL="/usr/local/ssl /usr/local /usr /usr/local/openssl" + dnl First try to find pkg-config + if test -z "$PKG_CONFIG"; then +AC_PATH_PROG(PKG_CONFIG, pkg-config, no) fi - for i in $PHP_OPENSSL; do -if test -r $i/include/openssl/evp.h; then - OPENSSL_INCDIR=$i/include + dnl If pkg-config is found try using it + if test "$PHP_OPENSSL" = "yes" && test -x "$PKG_CONFIG"; then +if $PKG_CONFIG --atleast-version=0.9.6 openssl; then + found_openssl=yes + OPENSSL_LIBS=`$PKG_CONFIG --libs openssl` + OPENSSL_INCS=`$PKG_CONFIG --cflags-only-I openssl` + OPENSSL_INCDIR=`$PKG_CONFIG --variable=includedir openssl` +else + AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.]) fi -if test -r $i/lib/libssl.a -o -r $i/lib/libssl.$SHLIB_SUFFIX_NAME; then - OPENSSL_LIBDIR=$i/lib + + else + +dnl If pkg-config fails for some reason, revert to the old method +if test "$PHP_OPENSSL" = "yes"; then + PHP_OPENSSL="/usr/local/ssl /usr/local /usr /usr/local/openssl" fi - done - if test -z "$OPENSSL_INCDIR"; then -AC_MSG_ERROR([Cannot find OpenSSL's ]) - fi +for i in $PHP_OPENSSL; do + if test -r $i/include/openssl/evp.h; then +OPENSSL_INCDIR=$i/include + fi + if test -r $i/lib/libssl.a -o -r $i/lib/libssl.$SHLIB_SUFFIX_NAME; then +OPENSSL_LIBDIR=$i/lib + fi +done - if test -z "$OPENSSL_LIBDIR"; then -AC_MSG_ERROR([Cannot find OpenSSL's libraries]) - fi +if test -z "$OPENSSL_INCDIR"; then + AC_MSG_ERROR([Cannot find OpenSSL's ]) +fi + +if test -z "$OPENSSL_LIBDIR"; then + AC_MSG_ERROR([Cannot find OpenSSL's libraries]) +fi - old_CPPFLAGS=$CPPFLAGS - CPPFLAGS=-I$OPENSSL_INCDIR - AC_MSG_CHECKING([for OpenSSL version]) - AC_EGREP_CPP(yes,[ +old_CPPFLAGS=$CPPFLAGS +CPPFLAGS=-I$OPENSSL_INCDIR +AC_MSG_CHECKING([for OpenSSL version]) +AC_EGREP_CPP(yes,[ #include #if OPENSSL_VERSION_NUMBER >= 0x0090600fL yes #endif - ],[ -AC_MSG_RESULT([>= 0.9.6]) - ],[ -AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.]) - ]) - CPPFLAGS=$old_CPPFLAGS +],[ + AC_MSG_RESULT([>= 0.9.6]) +],[ + AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.]) +]) +CPPFLAGS=$old_CPPFLAGS - PHP_CHECK_LIBRARY(crypto, CRYPTO_free, [ -PHP_CHECK_LIBRARY(ssl, SSL_CTX_set_ssl_version, [ - found_openssl=yes +PHP_CHECK_LIBRARY(crypto, CRYPTO_free, [ + PHP_CHECK_LIBRARY(ssl, SSL_CTX_set_ssl_version, [ +found_openssl=yes +OPENSSL_LIBS=-L$OPENSSL_LIBDIR -lcrypto -lssl +OPENSSL_INCS=-I$OPENSSL_INCDIR + ], [ +AC_MSG_ERROR([libssl not found!]) + ],[ +-L$OPENSSL_LIBDIR -lcrypto + ]) ], [ - AC_MSG_ERROR([libssl not found!]) + AC_MSG_ERROR([libcrypto not found!]) ],[ - -L$OPENSSL_LIBDIR -lcrypto + -L$OPENSSL_LIBDIR ]) - ], [ -AC_MSG_ERROR([libcrypto not found!]) - ],[ --L$OPENSSL_LIBDIR - ]) + fi + dnl For apache 1.3.x static build OPENSSL_INCDIR_OPT=-I$OPENSSL_INCDIR AC_SUBST(OPENSSL_INCDIR_OPT) if test "$found_openssl" = "yes"; then -if test -n "$OPENSSL_INCDIR" && test -n "$OPENSSL_LIBDIR"; then - PHP_ADD_INCLUDE($OPENSSL_INCDIR) - PHP_ADD_LIBPATH($OPENSSL_LIBDIR, $1) - PHP_ADD_LIBRARY(crypto,,$1) - PHP_ADD_LIBRARY(ssl,, $1) +if test -n "$OPENSSL_LIBS" && test -n "$OPENSSL_INCS"; then + PHP_EVAL_LIBLINE($OPENSSL_LIBS, $1) + PHP_EVAL_INCLINE($OPENSSL_INCS) fi $2 ifelse([$3],[],,[else $3]) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / acinclude.m4
sniper Wed Sep 24 10:24:18 2003 EDT Modified files: /php-srcacinclude.m4 Log: ws Index: php-src/acinclude.m4 diff -u php-src/acinclude.m4:1.260 php-src/acinclude.m4:1.261 --- php-src/acinclude.m4:1.260 Wed Sep 24 10:22:57 2003 +++ php-src/acinclude.m4Wed Sep 24 10:24:18 2003 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.260 2003/09/24 14:22:57 sniper Exp $ +dnl $Id: acinclude.m4,v 1.261 2003/09/24 14:24:18 sniper Exp $ dnl dnl This file contains local autoconf functions. @@ -1605,58 +1605,58 @@ else - dnl If pkg-config fails for some reason, revert to the old method - if test "$PHP_OPENSSL" = "yes"; then -PHP_OPENSSL="/usr/local/ssl /usr/local /usr /usr/local/openssl" - fi - - for i in $PHP_OPENSSL; do -if test -r $i/include/openssl/evp.h; then - OPENSSL_INCDIR=$i/include -fi -if test -r $i/lib/libssl.a -o -r $i/lib/libssl.$SHLIB_SUFFIX_NAME; then - OPENSSL_LIBDIR=$i/lib +dnl If pkg-config fails for some reason, revert to the old method +if test "$PHP_OPENSSL" = "yes"; then + PHP_OPENSSL="/usr/local/ssl /usr/local /usr /usr/local/openssl" fi - done - if test -z "$OPENSSL_INCDIR"; then -AC_MSG_ERROR([Cannot find OpenSSL's ]) - fi +for i in $PHP_OPENSSL; do + if test -r $i/include/openssl/evp.h; then +OPENSSL_INCDIR=$i/include + fi + if test -r $i/lib/libssl.a -o -r $i/lib/libssl.$SHLIB_SUFFIX_NAME; then +OPENSSL_LIBDIR=$i/lib + fi +done - if test -z "$OPENSSL_LIBDIR"; then -AC_MSG_ERROR([Cannot find OpenSSL's libraries]) - fi +if test -z "$OPENSSL_INCDIR"; then + AC_MSG_ERROR([Cannot find OpenSSL's ]) +fi + +if test -z "$OPENSSL_LIBDIR"; then + AC_MSG_ERROR([Cannot find OpenSSL's libraries]) +fi - old_CPPFLAGS=$CPPFLAGS - CPPFLAGS=-I$OPENSSL_INCDIR - AC_MSG_CHECKING([for OpenSSL version]) - AC_EGREP_CPP(yes,[ +old_CPPFLAGS=$CPPFLAGS +CPPFLAGS=-I$OPENSSL_INCDIR +AC_MSG_CHECKING([for OpenSSL version]) +AC_EGREP_CPP(yes,[ #include #if OPENSSL_VERSION_NUMBER >= 0x0090600fL yes #endif - ],[ -AC_MSG_RESULT([>= 0.9.6]) - ],[ -AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.]) - ]) - CPPFLAGS=$old_CPPFLAGS +],[ + AC_MSG_RESULT([>= 0.9.6]) +],[ + AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.]) +]) +CPPFLAGS=$old_CPPFLAGS - PHP_CHECK_LIBRARY(crypto, CRYPTO_free, [ -PHP_CHECK_LIBRARY(ssl, SSL_CTX_set_ssl_version, [ - found_openssl=yes - OPENSSL_LIBS=-L$OPENSSL_LIBDIR -lcrypto -lssl - OPENSSL_INCS=-I$OPENSSL_INCDIR +PHP_CHECK_LIBRARY(crypto, CRYPTO_free, [ + PHP_CHECK_LIBRARY(ssl, SSL_CTX_set_ssl_version, [ +found_openssl=yes +OPENSSL_LIBS=-L$OPENSSL_LIBDIR -lcrypto -lssl +OPENSSL_INCS=-I$OPENSSL_INCDIR + ], [ +AC_MSG_ERROR([libssl not found!]) + ],[ +-L$OPENSSL_LIBDIR -lcrypto + ]) ], [ - AC_MSG_ERROR([libssl not found!]) + AC_MSG_ERROR([libcrypto not found!]) ],[ - -L$OPENSSL_LIBDIR -lcrypto + -L$OPENSSL_LIBDIR ]) - ], [ -AC_MSG_ERROR([libcrypto not found!]) - ],[ --L$OPENSSL_LIBDIR - ]) fi dnl For apache 1.3.x static build -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / acinclude.m4
sniper Wed Sep 24 10:22:58 2003 EDT Modified files: /php-srcacinclude.m4 Log: - Fixed some compile failures with e.g. RH9 + openssl by making use of pkg-config Index: php-src/acinclude.m4 diff -u php-src/acinclude.m4:1.259 php-src/acinclude.m4:1.260 --- php-src/acinclude.m4:1.259 Wed Sep 3 18:53:21 2003 +++ php-src/acinclude.m4Wed Sep 24 10:22:57 2003 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.259 2003/09/03 22:53:21 sniper Exp $ +dnl $Id: acinclude.m4,v 1.260 2003/09/24 14:22:57 sniper Exp $ dnl dnl This file contains local autoconf functions. @@ -1587,6 +1587,25 @@ unset OPENSSL_INCDIR unset OPENSSL_LIBDIR + dnl First try to find pkg-config + if test -z "$PKG_CONFIG"; then +AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + fi + + dnl If pkg-config is found try using it + if test "$PHP_OPENSSL" = "yes" && test -x "$PKG_CONFIG"; then +if $PKG_CONFIG --atleast-version=0.9.6 openssl; then + found_openssl=yes + OPENSSL_LIBS=`$PKG_CONFIG --libs openssl` + OPENSSL_INCS=`$PKG_CONFIG --cflags-only-I openssl` + OPENSSL_INCDIR=`$PKG_CONFIG --variable=includedir openssl` +else + AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.]) +fi + + else + + dnl If pkg-config fails for some reason, revert to the old method if test "$PHP_OPENSSL" = "yes"; then PHP_OPENSSL="/usr/local/ssl /usr/local /usr /usr/local/openssl" fi @@ -1626,6 +1645,8 @@ PHP_CHECK_LIBRARY(crypto, CRYPTO_free, [ PHP_CHECK_LIBRARY(ssl, SSL_CTX_set_ssl_version, [ found_openssl=yes + OPENSSL_LIBS=-L$OPENSSL_LIBDIR -lcrypto -lssl + OPENSSL_INCS=-I$OPENSSL_INCDIR ], [ AC_MSG_ERROR([libssl not found!]) ],[ @@ -1636,16 +1657,16 @@ ],[ -L$OPENSSL_LIBDIR ]) + fi + dnl For apache 1.3.x static build OPENSSL_INCDIR_OPT=-I$OPENSSL_INCDIR AC_SUBST(OPENSSL_INCDIR_OPT) if test "$found_openssl" = "yes"; then -if test -n "$OPENSSL_INCDIR" && test -n "$OPENSSL_LIBDIR"; then - PHP_ADD_INCLUDE($OPENSSL_INCDIR) - PHP_ADD_LIBPATH($OPENSSL_LIBDIR, $1) - PHP_ADD_LIBRARY(crypto,,$1) - PHP_ADD_LIBRARY(ssl,, $1) +if test -n "$OPENSSL_LIBS" && test -n "$OPENSSL_INCS"; then + PHP_EVAL_LIBLINE($OPENSSL_LIBS, $1) + PHP_EVAL_INCLINE($OPENSSL_INCS) fi $2 ifelse([$3],[],,[else $3]) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/dom document.c
rrichards Wed Sep 24 08:56:38 2003 EDT Modified files: /php-src/ext/domdocument.c Log: fix preserveWhiteSpace on document load Index: php-src/ext/dom/document.c diff -u php-src/ext/dom/document.c:1.26 php-src/ext/dom/document.c:1.27 --- php-src/ext/dom/document.c:1.26 Mon Sep 22 15:11:35 2003 +++ php-src/ext/dom/document.c Wed Sep 24 08:56:37 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: document.c,v 1.26 2003/09/22 19:11:35 rrichards Exp $ */ +/* $Id: document.c,v 1.27 2003/09/24 12:56:37 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -26,6 +26,7 @@ #include "php.h" #if HAVE_LIBXML && HAVE_DOM #include "php_dom.h" +#include typedef struct _idsIterator idsIterator; struct _idsIterator { @@ -1270,8 +1271,12 @@ ctxt->vctxt.error = php_dom_ctx_error; ctxt->vctxt.warning = php_dom_ctx_error; + if (ctxt->sax != NULL) { ctxt->sax->error = php_dom_ctx_error; + if (ctxt->keepBlanks == 0) { + ctxt->sax->ignorableWhitespace = ignorableWhitespace; + } } xmlParseDocument(ctxt); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/openssl/tests bug25614.phpt
wez Wed Sep 24 06:35:20 2003 EDT Modified files: /php-src/ext/openssl/tests bug25614.phpt Log: Fix Index: php-src/ext/openssl/tests/bug25614.phpt diff -u php-src/ext/openssl/tests/bug25614.phpt:1.2 php-src/ext/openssl/tests/bug25614.phpt:1.3 --- php-src/ext/openssl/tests/bug25614.phpt:1.2 Tue Sep 23 12:05:51 2003 +++ php-src/ext/openssl/tests/bug25614.phpt Wed Sep 24 06:35:19 2003 @@ -8,4 +8,4 @@ $pub = openssl_pkey_get_public($priv); ?> --EXPECTF-- -Warning: openssl_pkey_get_public(): Don't know how to get public key from this private key (the documentation lied) %s +Warning: openssl_pkey_get_public(): Don't know how to get public key from this private key %s -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/standard array.c basic_functions.c php_array.h
Wez Furlong wrote: > Should these functions really go into the core? > Perhaps they are better off in an extension (pecl/array_utils ?) > > The names aren't really all that obvious to me either. > > --Wez. Hi Wez, well maybe array_udiff_uassoc() and array_diff_uassoc() are of little need but I added them for completeness to array_udiff() and array_udiff_assoc(). It's easy not to export array_udiff_uassoc() and array_diff_uassoc() and this won't hurt me. However I think that array_udiff() and array_udiff_assoc() are useful. As I stated in my talk to Jani, in 4_3 it is impossible to use array_diff() or array_diff_assoc() on arrays that contain objects. When I started to implement (and implemented) these functions few months ago I had no need of them, I did it for fun. However, month or two ago I faced a case where I needed this functionality but unfortunately it wasn't available so I had to find a way to workaround it. Let me show you a small example : class CPerson { private $priv_member; public $public_member; function CPerson($val) { $this->priv_member = $val; $this->public_member = $val; } static function comp_func_cr($a, $b) { if ($a->priv_member === $b->priv_member) return 0; return ($a->priv_member > $b->priv_member)? 1:-1; } }// class CPerson $a = array( "0.1" => new cr(9), "0.5" => new cr(12), 0 => new cr(23), 1=> new cr(4), 2 => new cr(-15), ); $b = array("0.2" => new cr(9), "0.5" => new cr(22), 0 => new cr( 3), 1=> new cr(4), 2 => new cr(-15), ); ?> In this case $a and $b contain objects. Even more they have private member variables. array_diff() is in no use here since it _cannot_ work with objects well : if I execute array_diff($a, $b) the returned array will contain the elements of $a . So, what to do to make a diff of the two arrays and not to code a function (in PHP) for that by myself? -> Implement core function for that. This functionality goes to 5.0.0 where the object model is better and if core functions can work well with object(s) it will be good and not bad IMO. Using array_udiff() it is easy to diff $a and $b : array_udiff($a, $b, array("cr", "comp_func_cr")); ?> If there are better names for these functions I have nothing against to rename them. I named them this way because of the function usort() that sorts an array by using a callback function. Regards, Andrey P.S. I will appreciate the opinion of Marcus Boerger and Sebastian Bergmann whether these functions are useful or not. However, any other opinions are welcome (this is why i cross-post to internals@) > > - Original Message - > From: "Andrey Hristov" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, September 23, 2003 6:37 PM > Subject: [PHP-CVS] cvs: php-src /ext/standard array.c basic_functions.c > php_array.h > > > >>andrey Tue Sep 23 13:37:29 2003 EDT >> >> Modified files: >>/php-src/ext/standard array.c basic_functions.c php_array.h >> Log: >> 4 new functions : >> array_udiff() >> array_udiff_assoc() >> array_diff_uassoc() >> array_udiff_uassoc() >> They work like array_diff() or array_diff_assoc() but callback > > function(s) > >> can be used to perform the comparisons. For example array_udiff_uassoc() >> expects 2 callbacks are last 2 parameters one is used to compare the > > values > >> of the entries in the arrays the second to compare the keys. >> Class methods are also valid callbacks. Even when the data that should > > be > >> used in the comparison is private or protected then a static method of a >> class should be used (this behaviour can be seen in the regression > > test - > >> 007.phpt). > > -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS
sniper Wed Sep 24 04:28:27 2003 EDT Modified files: (Branch: PHP_4_3) /php-srcNEWS Log: BEFH Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.405 php-src/NEWS:1.1247.2.406 --- php-src/NEWS:1.1247.2.405 Tue Sep 23 22:30:16 2003 +++ php-src/NEWSWed Sep 24 04:28:26 2003 @@ -9,7 +9,7 @@ - Fixed FastCGI being unable to bind to a specific IP. (Sascha) - Fixed bug #25636 (SNMP Session not closed on success). (Ilia, nesslage[at]mwsc[dot]edu) -- Fixed bug #25635 (Make make tests to fail due to invalid include_path). (Ilia) +- Fixed bug #25635 (Make "make tests" to fail due to invalid include_path). (Ilia) - Fixed bug #25604 (HAVE_SNMP_PARSE_OID undefined with phpize build). (Jani) - Fixed bug #25583 (Incorrect handling of paths starting with / on win32 inside glob() function). (Ilia) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php