mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-11 11:10:49 +00:00
Compare commits
22
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e6c949b9f7 | ||
|
|
8bb1bc55a2 | ||
|
|
0d14f16727 | ||
|
|
98b62b9c93 | ||
|
|
52006e0d05 | ||
|
|
59969e476f | ||
|
|
e144aa3701 | ||
|
|
098a1c5fc2 | ||
|
|
decfea4729 | ||
|
|
a522511289 | ||
|
|
06c41c0a0f | ||
|
|
fe68557b19 | ||
|
|
967a3c99e7 | ||
|
|
3e91a688d8 | ||
|
|
bb50366735 | ||
|
|
71951285e1 | ||
|
|
e400cf0582 | ||
|
|
938a4009cb | ||
|
|
36ba61d731 | ||
|
|
316f3f23ad | ||
|
|
e7bd4ae835 | ||
|
|
716d605938 |
No files matched your search
@@ -2,6 +2,7 @@ PHP 4.0 NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
|
||||
?? ??? 200?, Version 4.0.6
|
||||
- Fixed race in writing session files (Sascha)
|
||||
- Fixed a possible crash in the PHP CGI when no input file is
|
||||
specified (Zeev)
|
||||
- Added is_callable() function that can be used to find out whether
|
||||
@@ -23,6 +24,9 @@ PHP 4.0 NEWS
|
||||
- Added connection error support to mysql_error() and mysql_errno(). (Jason)
|
||||
- Added support to getimagesize to return dimensions of BMP and PSD
|
||||
files. (Derick)
|
||||
- Added heuristic to kill stale IRC connections, message scanner caching, and
|
||||
nickname escaping to IRCG, suppress option to ircg_msg(), and statistics to
|
||||
IRCG phpinfo() output. (Sascha)
|
||||
- Added Japanese multibyte string functions support. (Rui)
|
||||
- Added Mac OS X "\r" line ending support. (Andi, Zend Engine)
|
||||
- Fixed a bug regarding the $PHP_SELF being incorrectly registered when
|
||||
|
||||
+7
-4
@@ -274,7 +274,7 @@ static void zend_extension_op_array_handler(zend_extension *extension, zend_op_a
|
||||
|
||||
int pass_two(zend_op_array *op_array)
|
||||
{
|
||||
zend_op *opline=op_array->opcodes, *end=opline+op_array->last;
|
||||
zend_op *opline, *end;
|
||||
CLS_FETCH();
|
||||
|
||||
if (op_array->type!=ZEND_USER_FUNCTION && op_array->type!=ZEND_EVAL_CODE) {
|
||||
@@ -286,12 +286,15 @@ int pass_two(zend_op_array *op_array)
|
||||
if (CG(handle_op_arrays)) {
|
||||
zend_llist_apply_with_argument(&zend_extensions, (void (*)(void *, void *)) zend_extension_op_array_handler, op_array);
|
||||
}
|
||||
while (opline<end) {
|
||||
if (opline->op1.op_type==IS_CONST) {
|
||||
|
||||
opline = op_array->opcodes;
|
||||
end = opline + op_array->last;
|
||||
while (opline < end) {
|
||||
if (opline->op1.op_type == IS_CONST) {
|
||||
opline->op1.u.constant.is_ref = 1;
|
||||
opline->op1.u.constant.refcount = 2; /* Make sure is_ref won't be reset */
|
||||
}
|
||||
if (opline->op2.op_type==IS_CONST) {
|
||||
if (opline->op2.op_type == IS_CONST) {
|
||||
opline->op2.u.constant.is_ref = 1;
|
||||
opline->op2.u.constant.refcount = 2;
|
||||
}
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@
|
||||
# | Sascha Schumann <sascha@schumann.cx> |
|
||||
# +----------------------------------------------------------------------+
|
||||
#
|
||||
# $Id: buildcheck.sh,v 1.8 2001-05-06 18:51:21 sas Exp $
|
||||
# $Id: buildcheck.sh,v 1.8.2.1 2001-05-12 09:03:58 andi Exp $
|
||||
#
|
||||
|
||||
echo "buildconf: checking installation..."
|
||||
@@ -70,7 +70,7 @@ fi
|
||||
lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'`
|
||||
IFS=.; set $lt_version; IFS=' '
|
||||
|
||||
if test "$1" -gt "1" || test "$2" -ge "4";
|
||||
if test "$1" -gt "1" || test "$2" -gt "3" || (test "$2" = "3" && (test "$3" = "c" || test "$3" -ge "3"))
|
||||
then
|
||||
echo "buildconf: libtool version $lt_pversion (ok)"
|
||||
else
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ dnl ## All of these are normally in the extension directories.
|
||||
dnl ## Diversion 5 is the last one. Here we generate files and clean up.
|
||||
|
||||
dnl ## This is where the version number is changed from now on!
|
||||
AM_INIT_AUTOMAKE(php, 4.0.6-dev, nodefine)
|
||||
AM_INIT_AUTOMAKE(php, 4.0.6RC1, nodefine)
|
||||
|
||||
PHP_VERSION=$VERSION
|
||||
echo "/* automatically generated by configure */" > php_version.h.new
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "php.h"
|
||||
#include "php_ini.h"
|
||||
#include "php_typedef_VARIANT.h"
|
||||
#include "php_VARIANT.h"
|
||||
#include "conversion.h"
|
||||
#include "ext/standard/info.h"
|
||||
|
||||
|
||||
+9
-6
@@ -7,10 +7,13 @@ dnl don't forget to call PHP_EXTENSION(db)
|
||||
# Prefer gdbm, Berkeley DB and ndbm/dbm, in that order
|
||||
AC_DEFUN(AC_PREFERRED_DB_LIB,[
|
||||
AC_CHECK_LIB(gdbm, gdbm_open,[AC_DEFINE(GDBM,1, [Whether you have GDBM]) DBM_TYPE=gdbm; DBM_LIB=-lgdbm],
|
||||
[AC_CHECK_LIB(db, dbm_open,[AC_DEFINE(NDBM,1, [Whether you have NDBM]) DBM_TYPE=ndbm; DBM_LIB=-ldb],
|
||||
[AC_CHECK_LIB(c, dbm_open,[AC_DEFINE(NDBM,1,[ ]) DBM_TYPE=ndbm; DBM_LIB=],
|
||||
[AC_CHECK_LIB(dbm, dbm_open,[AC_DEFINE(NDBM,1,[ ]) DBM_TYPE=ndbm; DBM_LIB=-ldbm],
|
||||
[DBM_TYPE=""])])])])
|
||||
[AC_CHECK_LIB(c, dbm_open,[AC_DEFINE(NDBM,1,[ ]) DBM_TYPE=ndbm; DBM_LIB=],
|
||||
[AC_CHECK_LIB(dbm, dbm_open,[AC_DEFINE(NDBM,1,[ ]) DBM_TYPE=ndbm; DBM_LIB=-ldbm],
|
||||
[AC_CHECK_LIB(db, dbm_open,[AC_DEFINE(NDBM,1, [Whether you have NDBM]) DBM_TYPE=ndbm; DBM_LIB=-ldb],
|
||||
[DBM_TYPE=""])
|
||||
])
|
||||
])
|
||||
])
|
||||
AC_MSG_CHECKING([preferred dbm library])
|
||||
if test "a$DBM_TYPE" = a; then
|
||||
AC_MSG_RESULT(none found)
|
||||
@@ -33,9 +36,9 @@ if test "$PHP_DB" != "no"; then
|
||||
if test "$DBM_LIB" = "-lgdbm"; then
|
||||
AC_CHECK_HEADER(gdbm.h, [ GDBM_INCLUDE="" ], [
|
||||
AC_MSG_RESULT("Try /usr/local/include/gdbm.h");
|
||||
AC_CHECK_HEADER(/usr/local/include/gdbm.h, [ GDBM_INCLUDE="-I/usr/local/include" ],[
|
||||
AC_CHECK_HEADER(/usr/local/include/gdbm.h, [ GDBM_INCLUDE=-I/usr/local/include ],[
|
||||
AC_MSG_RESULT("Try /opt/local/include/gdbm.h");
|
||||
AC_CHECK_HEADER(/opt/local/include/gdbm.h, [ GDBM_INCLUDE="-I/opt/local/include" ],[
|
||||
AC_CHECK_HEADER(/opt/local/include/gdbm.h, [ GDBM_INCLUDE=-I/opt/local/include ],[
|
||||
dnl if in /usr/pkg/include, do not add anything. See above.
|
||||
AC_MSG_RESULT("Try /usr/pkg/include/gdbm.h");
|
||||
AC_CHECK_HEADER(/usr/pkg/include/gdbm.h, [ GDBM_INCLUDE="" ],[
|
||||
|
||||
+3
-3
@@ -8,7 +8,7 @@ AC_DEFUN(PHP_GD_JPEG,[
|
||||
|
||||
if test "$PHP_JPEG_DIR" != "no" -a "$PHP_JPEG_DIR"; then
|
||||
if test "$PHP_JPEG_DIR" = "yes"; then
|
||||
$PHP_JPEG_DIR=/usr/local
|
||||
PHP_JPEG_DIR=/usr/local
|
||||
fi
|
||||
|
||||
AC_CHECK_LIB(jpeg,jpeg_read_header,[
|
||||
@@ -29,7 +29,7 @@ AC_DEFUN(PHP_GD_PNG,[
|
||||
|
||||
if test "$PHP_PNG_DIR" != "no" -a "$PHP_PNG_DIR"; then
|
||||
if test "$PHP_PNG_DIR" = "yes"; then
|
||||
$PHP_PNG_DIR=/usr/local
|
||||
PHP_PNG_DIR=/usr/local
|
||||
fi
|
||||
|
||||
AC_CHECK_LIB(png,png_info_init,[
|
||||
@@ -51,7 +51,7 @@ AC_DEFUN(PHP_GD_XPM,[
|
||||
|
||||
if test "$PHP_XPM_DIR" != "no" -a "$PHP_XPM_DIR"; then
|
||||
if test "$PHP_XPM_DIR" = "yes"; then
|
||||
$PHP_XPM_DIR=/usr/local
|
||||
PHP_XPM_DIR=/usr/local
|
||||
fi
|
||||
|
||||
AC_CHECK_LIB(Xpm,XpmFreeXpmImage, [
|
||||
|
||||
-103
@@ -1,103 +0,0 @@
|
||||
#ifndef _INCLUDED_IMAP_H
|
||||
#define _INCLUDED_IMAP_H
|
||||
|
||||
#if COMPILE_DL
|
||||
#undef HAVE_IMAP
|
||||
#define HAVE_IMAP 1
|
||||
#endif
|
||||
|
||||
#if HAVE_IMAP
|
||||
|
||||
#ifndef PHP_WIN32
|
||||
#include "build-defs.h"
|
||||
#endif
|
||||
|
||||
/* Functions accessable to PHP */
|
||||
extern zend_module_entry imap_module_entry;
|
||||
#define imap_module_ptr &imap_module_entry
|
||||
|
||||
extern PHP_MINIT_FUNCTION(imap);
|
||||
extern PHP_RINIT_FUNCTION(imap);
|
||||
extern PHP_RSHUTDOWN_FUNCTION(imap);
|
||||
PHP_MINFO_FUNCTION(imap);
|
||||
PHP_FUNCTION(imap_open);
|
||||
PHP_FUNCTION(imap_popen);
|
||||
PHP_FUNCTION(imap_reopen);
|
||||
PHP_FUNCTION(imap_num_msg);
|
||||
PHP_FUNCTION(imap_num_recent);
|
||||
PHP_FUNCTION(imap_headers);
|
||||
PHP_FUNCTION(imap_headerinfo);
|
||||
PHP_FUNCTION(imap_rfc822_parse_headers);
|
||||
PHP_FUNCTION(imap_body);
|
||||
PHP_FUNCTION(imap_fetchstructure);
|
||||
PHP_FUNCTION(imap_fetchbody);
|
||||
PHP_FUNCTION(imap_expunge);
|
||||
PHP_FUNCTION(imap_delete);
|
||||
PHP_FUNCTION(imap_undelete);
|
||||
PHP_FUNCTION(imap_check);
|
||||
PHP_FUNCTION(imap_close);
|
||||
PHP_FUNCTION(imap_mail_copy);
|
||||
PHP_FUNCTION(imap_mail_move);
|
||||
PHP_FUNCTION(imap_createmailbox);
|
||||
PHP_FUNCTION(imap_renamemailbox);
|
||||
PHP_FUNCTION(imap_deletemailbox);
|
||||
PHP_FUNCTION(imap_listmailbox);
|
||||
PHP_FUNCTION(imap_scanmailbox);
|
||||
PHP_FUNCTION(imap_subscribe);
|
||||
PHP_FUNCTION(imap_unsubscribe);
|
||||
PHP_FUNCTION(imap_append);
|
||||
PHP_FUNCTION(imap_ping);
|
||||
PHP_FUNCTION(imap_base64);
|
||||
PHP_FUNCTION(imap_qprint);
|
||||
PHP_FUNCTION(imap_8bit);
|
||||
PHP_FUNCTION(imap_binary);
|
||||
PHP_FUNCTION(imap_mailboxmsginfo);
|
||||
PHP_FUNCTION(imap_rfc822_write_address);
|
||||
PHP_FUNCTION(imap_rfc822_parse_adrlist);
|
||||
PHP_FUNCTION(imap_setflag_full);
|
||||
PHP_FUNCTION(imap_clearflag_full);
|
||||
PHP_FUNCTION(imap_sort);
|
||||
PHP_FUNCTION(imap_fetchheader);
|
||||
PHP_FUNCTION(imap_fetchtext);
|
||||
PHP_FUNCTION(imap_uid);
|
||||
PHP_FUNCTION(imap_msgno);
|
||||
PHP_FUNCTION(imap_list);
|
||||
PHP_FUNCTION(imap_list_full);
|
||||
PHP_FUNCTION(imap_listscan);
|
||||
PHP_FUNCTION(imap_lsub);
|
||||
PHP_FUNCTION(imap_lsub_full);
|
||||
PHP_FUNCTION(imap_create);
|
||||
PHP_FUNCTION(imap_rename);
|
||||
PHP_FUNCTION(imap_status);
|
||||
PHP_FUNCTION(imap_bodystruct);
|
||||
PHP_FUNCTION(imap_fetch_overview);
|
||||
PHP_FUNCTION(imap_mail_compose);
|
||||
PHP_FUNCTION(imap_alerts);
|
||||
PHP_FUNCTION(imap_errors);
|
||||
PHP_FUNCTION(imap_last_error);
|
||||
PHP_FUNCTION(imap_mail);
|
||||
PHP_FUNCTION(imap_search);
|
||||
PHP_FUNCTION(imap_utf8);
|
||||
PHP_FUNCTION(imap_utf7_decode);
|
||||
PHP_FUNCTION(imap_utf7_encode);
|
||||
PHP_FUNCTION(imap_mime_header_decode);
|
||||
#else
|
||||
#define imap_module_ptr NULL
|
||||
#endif /* HAVE_IMAP */
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define phpext_imap_ptr imap_module_ptr
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+2
-1
@@ -17,7 +17,8 @@ AC_DEFUN(PHP_LDAP_CHECKS, [
|
||||
])
|
||||
|
||||
PHP_ARG_WITH(ldap,whether to include LDAP support,
|
||||
[ --with-ldap[=DIR] Include LDAP support. DIR is the LDAP base install directory.])
|
||||
[ --with-ldap[=DIR] Include LDAP support. DIR is the LDAP base
|
||||
install directory.])
|
||||
|
||||
if test "$PHP_LDAP" != "no"; then
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ dnl $Id$
|
||||
dnl config.m4 for extension mbstring
|
||||
|
||||
PHP_ARG_ENABLE(mbstring, whether to enable multibyte string support,
|
||||
[ --enable-mbstring Enable multibyte string support])
|
||||
[ --enable-mbstring Enable multibyte string support])
|
||||
|
||||
if test "$PHP_MBSTRING" != "no"; then
|
||||
AC_DEFINE(HAVE_MBSTRING,1,[ ])
|
||||
|
||||
@@ -3,7 +3,8 @@ dnl $Id$
|
||||
dnl
|
||||
|
||||
PHP_ARG_WITH(mcrypt, for mcrypt support,
|
||||
[ --with-mcrypt[=DIR] Include mcrypt support. DIR is the mcrypt install directory.])
|
||||
[ --with-mcrypt[=DIR] Include mcrypt support. DIR is the mcrypt install
|
||||
directory.])
|
||||
|
||||
if test "$PHP_MCRYPT" != "no"; then
|
||||
for i in /usr/local /usr $PHP_MCRYPT; do
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ dnl $Id$
|
||||
dnl config.m4 for extension libming
|
||||
|
||||
PHP_ARG_WITH(ming, whether to include ming support,
|
||||
[ --with-ming[=DIR] Include ming support])
|
||||
[ --with-ming[=DIR] Include ming support])
|
||||
|
||||
if test "$PHP_MING" != "no"; then
|
||||
for i in $PHP_MING /usr/local /usr; do
|
||||
|
||||
@@ -2,8 +2,10 @@ dnl $Source$
|
||||
dnl $Id$
|
||||
|
||||
PHP_ARG_WITH(mnogosearch,for mnoGoSearch support,
|
||||
[ --with-mnogosearch[=DIR] Include mnoGoSearch support. DIR is the mnoGoSearch base
|
||||
install directory, defaults to /usr/local/mnogosearch.])
|
||||
[ --with-mnogosearch[=DIR]
|
||||
Include mnoGoSearch support. DIR is the mnoGoSearch
|
||||
base install directory, defaults to
|
||||
/usr/local/mnogosearch.])
|
||||
|
||||
if test "$PHP_MNOGOSEARCH" != "no"; then
|
||||
|
||||
|
||||
+2
-1
@@ -22,7 +22,8 @@ AC_DEFUN(AC_OCI8_VERSION,[
|
||||
])
|
||||
|
||||
PHP_ARG_WITH(oci8, for Oracle-OCI8 support,
|
||||
[ --with-oci8[=DIR] Include Oracle-oci8 support. Default DIR is ORACLE_HOME.])
|
||||
[ --with-oci8[=DIR] Include Oracle-oci8 support. Default DIR is
|
||||
ORACLE_HOME.])
|
||||
|
||||
if test "$PHP_OCI8" != "no"; then
|
||||
AC_MSG_CHECKING([Oracle Install-Dir])
|
||||
|
||||
+8
-7
@@ -210,9 +210,9 @@ if test -z "$ODBC_TYPE"; then
|
||||
AC_MSG_CHECKING(for Empress support)
|
||||
AC_ARG_WITH(empress,
|
||||
[ --with-empress[=DIR] Include Empress support. DIR is the Empress base
|
||||
install directory, defaults to \$EMPRESSPATH.
|
||||
From PHP4, this option only supports Empress Version
|
||||
8.60 and above],
|
||||
install directory, defaults to \$EMPRESSPATH.
|
||||
From PHP4, this option only supports Empress Version
|
||||
8.60 and above],
|
||||
[
|
||||
PHP_WITH_SHARED
|
||||
if test "$withval" != "no"; then
|
||||
@@ -240,10 +240,11 @@ fi
|
||||
if test -z "$ODBC_TYPE"; then
|
||||
AC_MSG_CHECKING(for Empress local access support)
|
||||
AC_ARG_WITH(empress-bcs,
|
||||
[ --with-empress-bcs[=DIR]Include Empress Local Access support. DIR is the
|
||||
Empress base install directory, defaults to \$EMPRESSPATH.
|
||||
From PHP4, this option only supports Empress Version
|
||||
8.60 and above],
|
||||
[ --with-empress-bcs[=DIR]
|
||||
Include Empress Local Access support. DIR is the
|
||||
Empress base install directory, defaults to
|
||||
\$EMPRESSPATH. From PHP4, this option only supports
|
||||
Empress Version 8.60 and above.],
|
||||
[
|
||||
PHP_WITH_SHARED
|
||||
if test "$withval" != "no"; then
|
||||
|
||||
@@ -22,7 +22,8 @@ AC_DEFUN(AC_ORACLE_VERSION,[
|
||||
])
|
||||
|
||||
PHP_ARG_WITH(oracle, for Oracle-ORACLE support,
|
||||
[ --with-oracle[=DIR] Include Oracle-oci7 support. Default DIR is ORACLE_HOME.])
|
||||
[ --with-oracle[=DIR] Include Oracle-oci7 support. Default DIR is
|
||||
ORACLE_HOME.])
|
||||
|
||||
if test "$PHP_ORACLE" != "no"; then
|
||||
AC_MSG_CHECKING([Oracle Install-Dir])
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
dnl $Id$
|
||||
dnl config.m4 for extension pcre
|
||||
|
||||
dnl By default we'll compile and link against the bundled PCRE library
|
||||
dnl if DIR is supplied, we'll use that for linking
|
||||
|
||||
PHP_ARG_WITH(pcre-regex,whether to include PCRE support,
|
||||
[ --without-pcre-regex Do not include Perl Compatible Regular Expressions
|
||||
support. Use --with-pcre-regex=DIR to specify DIR
|
||||
where PCRE's include and library files are located,
|
||||
if not using bundled library.],yes)
|
||||
|
||||
if test "$PHP_PCRE_REGEX" != "no"; then
|
||||
PHP_EXTENSION(pcre, $ext_shared)
|
||||
if test "$PHP_PCRE_REGEX" = "yes"; then
|
||||
PCRE_LIBADD=pcrelib/libpcre.la
|
||||
PCRE_SHARED_LIBADD=pcrelib/libpcre.la
|
||||
PCRE_SUBDIRS=pcrelib
|
||||
CPPFLAGS="$CPPFLAGS -DSUPPORT_UTF8"
|
||||
PHP_SUBST(PCRE_LIBADD)
|
||||
PHP_SUBST(PCRE_SUBDIRS)
|
||||
AC_DEFINE(HAVE_BUNDLED_PCRE, 1, [ ])
|
||||
PHP_FAST_OUTPUT($ext_builddir/pcrelib/Makefile)
|
||||
LIB_BUILD($ext_builddir/pcrelib,$ext_shared,yes)
|
||||
else
|
||||
test -f $PHP_PCRE_REGEX/pcre.h && PCRE_INCDIR=$PHP_PCRE_REGEX
|
||||
test -f $PHP_PCRE_REGEX/include/pcre.h && PCRE_INCDIR=$PHP_PCRE_REGEX/include
|
||||
|
||||
if test -z "$PCRE_INCDIR"; then
|
||||
AC_MSG_RESULT(Could not find pcre.h in $PHP_PCRE_REGEX)
|
||||
fi
|
||||
|
||||
changequote({,})
|
||||
pcre_major=`grep PCRE_MAJOR $PCRE_INCDIR/pcre.h | sed -e 's/[^0-9]//g'`
|
||||
pcre_minor=`grep PCRE_MINOR $PCRE_INCDIR/pcre.h | sed -e 's/[^0-9]//g'`
|
||||
changequote([,])
|
||||
pcre_minor_length=`echo "$pcre_minor" | wc -c | sed -e 's/[^0-9]//g'`
|
||||
if test "$pcre_minor_length" -eq 2 ; then
|
||||
pcre_minor="$pcre_minor"0
|
||||
fi
|
||||
pcre_version=$pcre_major$pcre_minor
|
||||
if test "$pcre_version" -lt 208; then
|
||||
AC_MSG_ERROR(The PCRE extension requires PCRE library version >= 2.08)
|
||||
fi
|
||||
|
||||
test -f $PHP_PCRE_REGEX/libpcre.a && PCRE_LIBDIR="$PHP_PCRE_REGEX"
|
||||
test -f $PHP_PCRE_REGEX/lib/libpcre.a && PCRE_LIBDIR="$PHP_PCRE_REGEX/lib"
|
||||
|
||||
if test -z "$PCRE_LIBDIR" ; then
|
||||
AC_MSG_ERROR(Could not find libpcre.a in $PHP_PCRE_REGEX)
|
||||
fi
|
||||
|
||||
PHP_ADD_LIBRARY_WITH_PATH(pcre, $PCRE_LIBDIR, PCRE_SHARED_LIBADD)
|
||||
|
||||
PHP_ADD_INCLUDE($PCRE_INCDIR)
|
||||
AC_DEFINE(HAVE_PCRE, 1, [ ])
|
||||
fi
|
||||
fi
|
||||
PHP_SUBST(PCRE_SHARED_LIBADD)
|
||||
|
||||
|
||||
AC_CHECK_FUNC(memmove, [], [AC_DEFINE(USE_BCOPY, 1, [ ])])
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "php.h"
|
||||
#include "php_ini.h"
|
||||
#include "php_typedef_VARIANT.h"
|
||||
#include "php_VARIANT.h"
|
||||
#include "conversion.h"
|
||||
#include "ext/standard/info.h"
|
||||
|
||||
|
||||
@@ -140,18 +140,13 @@ static void ps_files_open(ps_files *data, const char *key)
|
||||
|
||||
#ifdef O_EXCL
|
||||
data->fd = VCWD_OPEN((buf, O_RDWR | O_BINARY));
|
||||
if (data->fd == -1) {
|
||||
if (errno == ENOENT) {
|
||||
data->fd = VCWD_OPEN((buf, O_EXCL | O_RDWR | O_CREAT | O_BINARY, 0600));
|
||||
}
|
||||
} else {
|
||||
flock(data->fd, LOCK_EX);
|
||||
}
|
||||
if (data->fd == -1 && errno == ENOENT)
|
||||
data->fd = VCWD_OPEN((buf, O_EXCL | O_RDWR | O_CREAT | O_BINARY, 0600));
|
||||
#else
|
||||
data->fd = VCWD_OPEN((buf, O_CREAT | O_RDWR | O_BINARY, 0600));
|
||||
#endif
|
||||
if (data->fd != -1)
|
||||
flock(data->fd, LOCK_EX);
|
||||
#endif
|
||||
|
||||
if (data->fd == -1)
|
||||
php_error(E_WARNING, "open(%s, O_RDWR) failed: %m (%d)", buf, errno);
|
||||
|
||||
+5
-5
@@ -87,27 +87,27 @@ php_url *url_parse(char *str)
|
||||
return NULL;
|
||||
}
|
||||
/* no processing necessary on the scheme */
|
||||
if (subs[2].rm_so != -1 && subs[2].rm_so < length) {
|
||||
if (subs[2].rm_so != -1 && subs[2].rm_so <= length) {
|
||||
ret->scheme = estrndup(str + subs[2].rm_so, subs[2].rm_eo - subs[2].rm_so);
|
||||
}
|
||||
|
||||
/* the path to the resource */
|
||||
if (subs[5].rm_so != -1 && subs[5].rm_so < length) {
|
||||
if (subs[5].rm_so != -1 && subs[5].rm_so <= length) {
|
||||
ret->path = estrndup(str + subs[5].rm_so, subs[5].rm_eo - subs[5].rm_so);
|
||||
}
|
||||
|
||||
/* the query part */
|
||||
if (subs[7].rm_so != -1 && subs[7].rm_so < length) {
|
||||
if (subs[7].rm_so != -1 && subs[7].rm_so <= length) {
|
||||
ret->query = estrndup(str + subs[7].rm_so, subs[7].rm_eo - subs[7].rm_so);
|
||||
}
|
||||
|
||||
/* the fragment */
|
||||
if (subs[9].rm_so != -1 && subs[9].rm_so < length) {
|
||||
if (subs[9].rm_so != -1 && subs[9].rm_so <= length) {
|
||||
ret->fragment = estrndup(str + subs[9].rm_so, subs[9].rm_eo - subs[9].rm_so);
|
||||
}
|
||||
|
||||
/* extract the username, pass, and port from the hostname */
|
||||
if (subs[4].rm_so != -1 && subs[4].rm_so < length) {
|
||||
if (subs[4].rm_so != -1 && subs[4].rm_so <= length) {
|
||||
|
||||
int cerr;
|
||||
/* extract username:pass@host:port from regex results */
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ dnl $Id$
|
||||
dnl
|
||||
|
||||
PHP_ARG_WITH(zlib-dir,if the location of ZLIB install directory is defined,
|
||||
[ --with-zlib-dir=<DIR>] Define the location of zlib install directory])
|
||||
[ --with-zlib-dir[=DIR] Define the location of zlib install directory])
|
||||
|
||||
PHP_ARG_WITH(zlib,whether to include ZLIB support,
|
||||
[ --with-zlib[=DIR] Include zlib support (requires zlib >= 1.0.9).
|
||||
|
||||
@@ -1105,6 +1105,9 @@ cygwin* | mingw*)
|
||||
with_gnu_ld=no
|
||||
fi
|
||||
;;
|
||||
openbsd*)
|
||||
with_gnu_ld=no
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
@@ -1402,10 +1405,21 @@ else
|
||||
;;
|
||||
|
||||
openbsd*)
|
||||
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
hardcode_shlibpath_var=no
|
||||
case "$host_os" in
|
||||
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
|
||||
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
;;
|
||||
*)
|
||||
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linkopts'
|
||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||
if [ "`/usr/bin/file /usr/lib/libc.so.* | grep ELF`" != "" ]; then
|
||||
export_dynamic_flag_spec='${wl}-E'
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
os2*)
|
||||
@@ -1439,7 +1453,7 @@ else
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
rhapsody*)
|
||||
rhapsody*|darwin*)
|
||||
archive_cmds='$CC -bundle -undefined suppress -o $lib $libobjs $deplibs $linkopts'
|
||||
hardcode_libdir_flags_spec='-L$libdir'
|
||||
hardcode_direct=yes
|
||||
@@ -1498,9 +1512,7 @@ else
|
||||
|
||||
sysv5*)
|
||||
no_undefined_flag=' -z text'
|
||||
# $CC -shared without GNU ld will not create a library from C++
|
||||
# object files and a static libstdc++, better avoid it by now
|
||||
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
|
||||
archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
|
||||
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
|
||||
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
|
||||
hardcode_libdir_flag_spec=
|
||||
@@ -2021,13 +2033,10 @@ netbsd*)
|
||||
|
||||
openbsd*)
|
||||
version_type=sunos
|
||||
if test "$with_gnu_ld" = yes; then
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
fi
|
||||
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
|
||||
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
deplibs_check_method='pass_all'
|
||||
;;
|
||||
|
||||
os2*)
|
||||
@@ -2053,7 +2062,7 @@ osf3* | osf4* | osf5*)
|
||||
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
|
||||
;;
|
||||
|
||||
rhapsody*)
|
||||
rhapsody*|darwin*)
|
||||
version_type=sunos
|
||||
library_names_spec='${libname}.so'
|
||||
soname_spec='${libname}.so'
|
||||
@@ -2101,7 +2110,7 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
|
||||
soname_spec='${libname}${release}.so$major'
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
case "$host_vendor" in
|
||||
sequent)
|
||||
sco|sequent)
|
||||
file_magic_cmd='/bin/file'
|
||||
deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
|
||||
;;
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@
|
||||
|
||||
/* Undefine if you want stricter XML/SGML compliance by default */
|
||||
/* this disables "<?expression?>" and "<?=expression?>" */
|
||||
#define DEFAULT_SHORT_OPEN_TAG 1
|
||||
#define DEFAULT_SHORT_OPEN_TAG "1"
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
#include "ext/standard/php_assert.h"
|
||||
#include "ext/calendar/php_calendar.h"
|
||||
#include "ext/com/php_COM.h"
|
||||
#include "ext/com/php_typedef_VARIANT.h"
|
||||
#include "ext/com/php_VARIANT.h"
|
||||
#include "ext/ftp/php_ftp.h"
|
||||
#include "ext/standard/reg.h"
|
||||
#include "ext/pcre/php_pcre.h"
|
||||
|
||||
@@ -1,283 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP version 4.0 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.02 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.php.net/license/2_02.txt. |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Author: Sander Steffann (sander@steffann.nl) |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#include "php.h"
|
||||
|
||||
#if HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifndef MAXSYMLINKS
|
||||
#define MAXSYMLINKS 32
|
||||
#endif
|
||||
|
||||
#ifndef S_ISDIR
|
||||
#define S_ISDIR(mode) (((mode)&S_IFMT) == S_IFDIR)
|
||||
#endif
|
||||
|
||||
char *php_realpath(char *path, char resolved_path[]);
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
#define IS_SLASH(p) ((p) == '/' || (p) == '\\')
|
||||
#else
|
||||
#define IS_SLASH(p) ((p) == '/')
|
||||
#endif
|
||||
|
||||
char *php_realpath(char *path, char resolved_path []) {
|
||||
char path_construction[MAXPATHLEN]; /* We build the result in here */
|
||||
char *writepos; /* Position to write next char */
|
||||
|
||||
char path_copy[MAXPATHLEN]; /* A work-copy of the path */
|
||||
char *workpos; /* working position in *path */
|
||||
|
||||
#if !defined(PHP_WIN32)
|
||||
char buf[MAXPATHLEN]; /* Buffer for readlink */
|
||||
int linklength; /* The result from readlink */
|
||||
#endif
|
||||
int linkcount = 0; /* Count symlinks to avoid loops */
|
||||
|
||||
struct stat filestat; /* result from stat */
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
char *temppos; /* position while counting '.' */
|
||||
int dotcount; /* number of '.' */
|
||||
int t; /* counter */
|
||||
#endif
|
||||
|
||||
/* Set the work-position to the beginning of the given path */
|
||||
strcpy(path_copy, path);
|
||||
workpos = path_copy;
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
/* Find out where we start - Windows version */
|
||||
if (IS_SLASH(*workpos)) {
|
||||
/* We start at the root of the current drive */
|
||||
/* Get the current directory */
|
||||
if (V_GETCWD(path_construction, MAXPATHLEN-1) == NULL) {
|
||||
/* Unable to get cwd */
|
||||
resolved_path[0] = 0;
|
||||
return NULL;
|
||||
}
|
||||
/* We only need the first three chars (for example "C:\") */
|
||||
path_construction[3] = 0;
|
||||
workpos++;
|
||||
} else if (workpos[1] == ':') {
|
||||
/* A drive-letter is specified, copy it */
|
||||
strncpy(path_construction, path, 2);
|
||||
strcat(path_construction, "\\");
|
||||
workpos++;
|
||||
workpos++;
|
||||
} else {
|
||||
/* Use the current directory */
|
||||
if (V_GETCWD(path_construction, MAXPATHLEN-1) == NULL) {
|
||||
/* Unable to get cwd */
|
||||
resolved_path[0] = 0;
|
||||
return NULL;
|
||||
}
|
||||
strcat(path_construction, "\\");
|
||||
}
|
||||
#else
|
||||
/* Find out where we start - Unix version */
|
||||
if (*workpos == '/') {
|
||||
/* We start at the root */
|
||||
strcpy(path_construction, "/");
|
||||
workpos++;
|
||||
} else {
|
||||
/* Use the current directory */
|
||||
if (V_GETCWD(path_construction, MAXPATHLEN-1) == NULL) {
|
||||
/* Unable to get cwd */
|
||||
resolved_path[0] = 0;
|
||||
return NULL;
|
||||
}
|
||||
strcat(path_construction, "/");
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Set the next-char-position */
|
||||
writepos = &path_construction[strlen(path_construction)];
|
||||
|
||||
/* Go to the end, then stop */
|
||||
while(*workpos != 0) {
|
||||
/* Strip (back)slashes */
|
||||
while(IS_SLASH(*workpos)) workpos++;
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
/* reset dotcount */
|
||||
dotcount = 0;
|
||||
|
||||
/* Look for .. */
|
||||
if ((workpos[0] == '.') && (workpos[1] != 0)) {
|
||||
/* Windows accepts \...\ as \..\..\, \....\ as \..\..\..\, etc */
|
||||
/* At least Win98 does */
|
||||
|
||||
temppos = workpos;
|
||||
while(*temppos++ == '.') {
|
||||
dotcount++;
|
||||
if (!IS_SLASH(*temppos) && (*temppos != 0) && (*temppos != '.')) {
|
||||
/* This is not a /../ component, but a filename that starts with '.' */
|
||||
dotcount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Go back dotcount-1 times */
|
||||
for (t=0 ; t<(dotcount-1) ; t++) {
|
||||
workpos++; /* move to next '.' */
|
||||
|
||||
/* Can we still go back? */
|
||||
if ((writepos-3) <= path_construction) return NULL;
|
||||
|
||||
/* Go back */
|
||||
writepos--; /* move to '\' */
|
||||
writepos--;
|
||||
while(!IS_SLASH(*writepos)) writepos--; /* skip until previous '\\' */
|
||||
}
|
||||
workpos++;
|
||||
}
|
||||
|
||||
/* No special case */
|
||||
if (dotcount == 0) {
|
||||
/* Append */
|
||||
while(!IS_SLASH(*workpos) && (*workpos != 0)) {
|
||||
*writepos++ = *workpos++;
|
||||
}
|
||||
}
|
||||
|
||||
/* Just one '.', go to next element */
|
||||
if (dotcount == 1) {
|
||||
while(!IS_SLASH(*workpos) && (*workpos != 0)) {
|
||||
*workpos++;
|
||||
}
|
||||
|
||||
/* Avoid double \ in the result */
|
||||
writepos--;
|
||||
}
|
||||
|
||||
/* If it was a directory, append a slash */
|
||||
if (IS_SLASH(*workpos)) {
|
||||
*writepos++ = *workpos++;
|
||||
}
|
||||
*writepos = 0;
|
||||
#else /* defined(PHP_WIN32) */
|
||||
/* Look for .. */
|
||||
if ((workpos[0] == '.') && (workpos[1] != 0)) {
|
||||
if ((workpos[1] == '.') && ((workpos[2] == '/') || (workpos[2] == 0))) {
|
||||
/* One directory back */
|
||||
/* Set pointers to right position */
|
||||
workpos++; /* move to second '.' */
|
||||
workpos++; /* move to '/' */
|
||||
|
||||
/* Only apply .. if not in root */
|
||||
if ((writepos-1) > path_construction) {
|
||||
writepos--; /* move to '/' */
|
||||
while(*--writepos != '/') ; /* skip until previous '/' */
|
||||
}
|
||||
} else {
|
||||
if (workpos[1] == '/') {
|
||||
/* Found a /./ skip it */
|
||||
workpos++; /* move to '/' */
|
||||
|
||||
/* Avoid double / in the result */
|
||||
writepos--;
|
||||
} else {
|
||||
/* No special case, the name just started with a . */
|
||||
/* Append */
|
||||
while((*workpos != '/') && (*workpos != 0)) {
|
||||
*writepos++ = *workpos++;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/* No special case */
|
||||
/* Append */
|
||||
while((*workpos != '/') && (*workpos != 0)) {
|
||||
*writepos++ = *workpos++;
|
||||
}
|
||||
}
|
||||
|
||||
#if HAVE_SYMLINK
|
||||
/* We are going to use path_construction, so close it */
|
||||
*writepos = 0;
|
||||
|
||||
/* Check the current location to see if it is a symlink */
|
||||
if((linklength = readlink(path_construction, buf, MAXPATHLEN)) != -1) {
|
||||
/* Check linkcount */
|
||||
if (linkcount > MAXSYMLINKS) return NULL;
|
||||
|
||||
/* Count this symlink */
|
||||
linkcount++;
|
||||
|
||||
/* Set end of buf */
|
||||
buf[linklength] = 0;
|
||||
|
||||
/* Check for overflow */
|
||||
if ((strlen(workpos) + strlen(buf) + 1) >= MAXPATHLEN) return NULL;
|
||||
|
||||
/* Remove the symlink-component wrom path_construction */
|
||||
writepos--; /* move to '/' */
|
||||
while(*--writepos != '/') ; /* skip until previous '/' */
|
||||
*++writepos = 0; /* end of string after '/' */
|
||||
|
||||
/* If the symlink starts with a '/', empty path_construction */
|
||||
if (*buf == '/') {
|
||||
*path_construction = 0;
|
||||
writepos = path_construction;
|
||||
}
|
||||
|
||||
/* Insert symlink into path_copy */
|
||||
strcat(buf, workpos);
|
||||
strcpy(path_copy, buf);
|
||||
workpos = path_copy;
|
||||
}
|
||||
#endif /* HAVE_SYMLINK */
|
||||
|
||||
/* If it was a directory, append a slash */
|
||||
if (*workpos == '/') {
|
||||
*writepos++ = *workpos++;
|
||||
}
|
||||
*writepos = 0;
|
||||
#endif /* defined(PHP_WIN32) */
|
||||
}
|
||||
|
||||
/* Check if the resolved path is a directory */
|
||||
if (V_STAT(path_construction, &filestat) != 0) {
|
||||
if (errno != ENOENT) return NULL;
|
||||
} else {
|
||||
if (S_ISDIR(filestat.st_mode)) {
|
||||
/* It's a directory, append a / if needed */
|
||||
if (*(writepos-1) != '/') {
|
||||
/* Check for overflow */
|
||||
if ((strlen(workpos) + 2) >= MAXPATHLEN) {
|
||||
return NULL;
|
||||
}
|
||||
*writepos++ = '/';
|
||||
*writepos = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
strcpy(resolved_path, path_construction);
|
||||
return resolved_path;
|
||||
}
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
*/
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
/* automatically generated by configure */
|
||||
/* edit configure.in to change version number */
|
||||
#define PHP_VERSION "4.0.6-dev"
|
||||
#define PHP_VERSION "4.0.6RC1"
|
||||
+35
-13
@@ -65,14 +65,14 @@ require_once "Cache/Error.php";
|
||||
class Cache extends PEAR {
|
||||
|
||||
/**
|
||||
* Disables the caching.
|
||||
* Enables / disables caching.
|
||||
*
|
||||
* TODO: Add explanation what this is good for.
|
||||
*
|
||||
* @var boolean
|
||||
* @access public
|
||||
* @access private
|
||||
*/
|
||||
var $no_cache = false;
|
||||
var $caching = true;
|
||||
|
||||
/**
|
||||
* Garbage collection: probability in seconds
|
||||
@@ -141,6 +141,28 @@ class Cache extends PEAR {
|
||||
$this->garbageCollection();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current caching state.
|
||||
*
|
||||
* @return boolean The current caching state.
|
||||
* @access public
|
||||
*/
|
||||
function getCaching()
|
||||
{
|
||||
return ($this->caching);
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables or disables caching.
|
||||
*
|
||||
* @param boolean The new caching state.
|
||||
* @access public
|
||||
*/
|
||||
function setCaching($state)
|
||||
{
|
||||
$this->caching = $state;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the requested dataset it if exists and is not expired
|
||||
*
|
||||
@@ -150,7 +172,7 @@ class Cache extends PEAR {
|
||||
* @access public
|
||||
*/
|
||||
function get($id, $group = "default") {
|
||||
if ($this->no_cache)
|
||||
if (!$this->caching)
|
||||
return "";
|
||||
|
||||
if ($this->isCached($id, $group) && !$this->isExpired($id, $group))
|
||||
@@ -170,7 +192,7 @@ class Cache extends PEAR {
|
||||
* @access public
|
||||
*/
|
||||
function save($id, $data, $expires = 0, $group = "default") {
|
||||
if ($this->no_cache)
|
||||
if (!$this->caching)
|
||||
return true;
|
||||
|
||||
return $this->extSave($id, $data, "",$expires, $group);
|
||||
@@ -190,7 +212,7 @@ class Cache extends PEAR {
|
||||
* @see getUserdata()
|
||||
*/
|
||||
function extSave($id, $cachedata, $userdata, $expires = 0, $group = "default") {
|
||||
if ($this->no_cache)
|
||||
if (!$this->caching)
|
||||
return true;
|
||||
|
||||
return $this->container->save($id, $cachedata, $expires, $group, $userdata);
|
||||
@@ -205,7 +227,7 @@ class Cache extends PEAR {
|
||||
* @access public
|
||||
*/
|
||||
function load($id, $group = "default") {
|
||||
if ($this->no_cache)
|
||||
if (!$this->caching)
|
||||
return "";
|
||||
|
||||
return $this->container->load($id, $group);
|
||||
@@ -221,7 +243,7 @@ class Cache extends PEAR {
|
||||
* @see extSave()
|
||||
*/
|
||||
function getUserdata($id, $group = "default") {
|
||||
if ($this->no_cache)
|
||||
if (!$this->caching)
|
||||
return "";
|
||||
|
||||
return $this->container->getUserdata($id, $group);
|
||||
@@ -236,7 +258,7 @@ class Cache extends PEAR {
|
||||
* @access public
|
||||
*/
|
||||
function delete($id, $group = "default") {
|
||||
if ($this->no_cache)
|
||||
if (!$this->caching)
|
||||
return true;
|
||||
|
||||
return $this->container->delete($id, $group);
|
||||
@@ -249,7 +271,7 @@ class Cache extends PEAR {
|
||||
* @return integer number of removed datasets
|
||||
*/
|
||||
function flush($group = "") {
|
||||
if ($this->no_cache)
|
||||
if (!$this->caching)
|
||||
return true;
|
||||
|
||||
return $this->container->flush($group);
|
||||
@@ -266,7 +288,7 @@ class Cache extends PEAR {
|
||||
* @access public
|
||||
*/
|
||||
function isCached($id, $group = "default") {
|
||||
if ($this->no_cache)
|
||||
if (!$this->caching)
|
||||
return false;
|
||||
|
||||
return $this->container->isCached($id, $group);
|
||||
@@ -287,7 +309,7 @@ class Cache extends PEAR {
|
||||
* @access public
|
||||
*/
|
||||
function isExpired($id, $group = "default", $max_age = 0) {
|
||||
if ($this->no_cache)
|
||||
if (!$this->caching)
|
||||
return true;
|
||||
|
||||
return $this->container->isExpired($id, $group, $max_age);
|
||||
@@ -317,7 +339,7 @@ class Cache extends PEAR {
|
||||
function garbageCollection($force = false) {
|
||||
static $last_run = 0;
|
||||
|
||||
if ($this->no_cache)
|
||||
if (!$this->caching)
|
||||
return;
|
||||
|
||||
srand((double) microtime() * 1000000);
|
||||
|
||||
@@ -40,6 +40,8 @@ PEAR_FILES = \
|
||||
Cache/Function.php \
|
||||
Cache/Graphics.php \
|
||||
Cache/Output.php \
|
||||
Cache/Error.php \
|
||||
Cache/OutputCompression.php \
|
||||
Cache/Container/db.php \
|
||||
Cache/Container/dbx.php \
|
||||
Cache/Container/file.php \
|
||||
|
||||
@@ -285,7 +285,9 @@ static void php_apache_log_message(char *message)
|
||||
static void php_apache_request_shutdown(void *dummy)
|
||||
{
|
||||
SLS_FETCH();
|
||||
APLS_FETCH();
|
||||
|
||||
AP(in_request)=0;
|
||||
SG(server_context) = NULL; /* The server context (request) is invalid by the time run_cleanups() is called */
|
||||
php_request_shutdown(dummy);
|
||||
}
|
||||
@@ -305,6 +307,7 @@ static int php_apache_sapi_activate(SLS_D)
|
||||
*/
|
||||
block_alarms();
|
||||
register_cleanup(((request_rec *) SG(server_context))->pool, NULL, php_apache_request_shutdown, php_request_shutdown_for_exec);
|
||||
AP(in_request)=1;
|
||||
unblock_alarms();
|
||||
|
||||
/* Override the default headers_only value - sometimes "GET" requests should actually only
|
||||
@@ -446,7 +449,7 @@ static int send_php(request_rec *r, int display_source_mode, char *filename)
|
||||
PLS_FETCH();
|
||||
APLS_FETCH();
|
||||
|
||||
if (r->assbackwards && r->protocol && !strcmp(r->protocol, "INCLUDED")) {
|
||||
if (AP(in_request)) {
|
||||
zend_file_handle fh;
|
||||
|
||||
fh.filename = r->filename;
|
||||
|
||||
@@ -31,6 +31,7 @@ typedef struct {
|
||||
long last_modified;
|
||||
long xbithack;
|
||||
long terminate_child;
|
||||
zend_bool in_request;
|
||||
} php_apache_info_struct;
|
||||
|
||||
extern zend_module_entry apache_module_entry;
|
||||
|
||||
@@ -89,10 +89,19 @@ PHP_INI_BEGIN()
|
||||
PHP_INI_END()
|
||||
|
||||
|
||||
|
||||
static void php_apache_globals_ctor(php_apache_info_struct *apache_globals)
|
||||
{
|
||||
apache_globals->in_request = 0;
|
||||
}
|
||||
|
||||
|
||||
static PHP_MINIT_FUNCTION(apache)
|
||||
{
|
||||
#ifdef ZTS
|
||||
php_apache_info_id = ts_allocate_id(sizeof(php_apache_info_struct), NULL, NULL);
|
||||
php_apache_info_id = ts_allocate_id(sizeof(php_apache_info_struct), php_apache_globals_ctor, NULL);
|
||||
#else
|
||||
php_apache_globals_ctor(&php_apache_info);
|
||||
#endif
|
||||
REGISTER_INI_ENTRIES();
|
||||
return SUCCESS;
|
||||
|
||||
@@ -5,7 +5,7 @@ AC_MSG_CHECKING(for Caudium support)
|
||||
AC_ARG_WITH(caudium,
|
||||
[ --with-caudium=DIR Build PHP as a Pike module for use with Caudium
|
||||
DIR is the Caudium server dir, with the default value
|
||||
/usr/local/caudium/server.],
|
||||
/usr/local/caudium/server.],
|
||||
[
|
||||
if test "$prefix" = "NONE"; then CPREF=/usr/local/; fi
|
||||
if test ! -d $withval ; then
|
||||
|
||||
@@ -3,7 +3,7 @@ dnl ## $Id$ -*- sh -*-
|
||||
RESULT=no
|
||||
AC_MSG_CHECKING(for Zeus ISAPI support)
|
||||
AC_ARG_WITH(isapi,
|
||||
[ --with-isapi=DIR Build PHP as an ISAPI module for use with Zeus.],
|
||||
[ --with-isapi=DIR Build PHP as an ISAPI module for use with Zeus.],
|
||||
[
|
||||
if test "$withval" = "yes"; then
|
||||
ZEUSPATH=/usr/local/zeus # the default
|
||||
|
||||
-113
@@ -1,113 +0,0 @@
|
||||
#include "php.h"
|
||||
|
||||
#ifndef HAVE_STRTOK_R
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Softweyr LLC. All rights reserved.
|
||||
*
|
||||
* strtok_r, from Berkeley strtok
|
||||
* Oct 13, 1998 by Wes Peters <wes@softweyr.com>
|
||||
*
|
||||
* Copyright (c) 1988, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notices, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notices, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
*
|
||||
* This product includes software developed by Softweyr LLC, the
|
||||
* University of California, Berkeley, and its contributors.
|
||||
*
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY SOFTWEYR LLC, THE REGENTS AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SOFTWEYR LLC, THE
|
||||
* REGENTS, OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
||||
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
|
||||
char *
|
||||
strtok_r(char *s, const char *delim, char **last)
|
||||
{
|
||||
char *spanp;
|
||||
int c, sc;
|
||||
char *tok;
|
||||
|
||||
if (s == NULL && (s = *last) == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Skip (span) leading delimiters (s += strspn(s, delim), sort of).
|
||||
*/
|
||||
cont:
|
||||
c = *s++;
|
||||
for (spanp = (char *)delim; (sc = *spanp++) != 0; )
|
||||
{
|
||||
if (c == sc)
|
||||
{
|
||||
goto cont;
|
||||
}
|
||||
}
|
||||
|
||||
if (c == 0) /* no non-delimiter characters */
|
||||
{
|
||||
*last = NULL;
|
||||
return NULL;
|
||||
}
|
||||
tok = s - 1;
|
||||
|
||||
/*
|
||||
* Scan token (scan for delimiters: s += strcspn(s, delim), sort of).
|
||||
* Note that delim must have one NUL; we stop if we see that, too.
|
||||
*/
|
||||
for (;;)
|
||||
{
|
||||
c = *s++;
|
||||
spanp = (char *)delim;
|
||||
do
|
||||
{
|
||||
if ((sc = *spanp++) == c)
|
||||
{
|
||||
if (c == 0)
|
||||
{
|
||||
s = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
char *w = s - 1;
|
||||
*w = '\0';
|
||||
}
|
||||
*last = s;
|
||||
return tok;
|
||||
}
|
||||
}
|
||||
while (sc != 0);
|
||||
}
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
||||
#endif
|
||||
+2
-2
@@ -1875,7 +1875,7 @@ SOURCE=..\win32\time.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\ext\com\typedef_VARIANT.c
|
||||
SOURCE=..\ext\com\VARIANT.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
@@ -1923,7 +1923,7 @@ SOURCE=..\win32\php_registry.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\ext\com\php_typedef_VARIANT.h
|
||||
SOURCE=..\ext\com\php_VARIANT.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
|
||||
Reference in new issue
Block a user