Compare commits

...
Author SHA1 Message Date
SVN Migration 9f5cbd22c8 This commit was manufactured by cvs2svn to create tag 'php_4_3_8'. 2004-07-13 13:15:36 +00:00
Ilia Alshanetsky ccfe4bf736 4.3.8 patches. 2004-07-13 13:15:35 +00:00
Derick Rethans aa72ed1ce7 - Fixed typo 2004-07-13 12:59:59 +00:00
Derick Rethans a64b0ae39d - Create a branch PHP_4_3_7 based on php 4.3.7 to form 4.3.8
- Updated version numbers in branch
2004-07-13 12:58:34 +00:00
SVN Migration 1bd95d5fd3 This commit was manufactured by cvs2svn to create branch 'PHP_4_3_7'. 2004-06-02 13:25:47 +00:00
Ilia Alshanetsky 2053bc60d2 Prepare for 4.3.7 release. 2004-06-02 13:25:45 +00:00
Ilia Alshanetsky 25f5ea0398 MFH: No need to NULL terminate manually, snprintf() does it for us already. 2004-06-01 21:05:33 +00:00
Ilia Alshanetsky 1618452e53 MFH: Fixed bug #28597 (xmlrpc_encode_request() incorrectly encodes chars in
200-210 range).
2004-06-01 20:16:18 +00:00
Andrei Zmievski 307eedeffe *** empty log message *** 2004-06-01 16:55:55 +00:00
Ard Biesheuvel aad180c93f #28569 2004-06-01 01:12:01 +00:00
Ard Biesheuvel b38423c7f6 MFH: Fixed bug #28569 (connection id is not thread safe) 2004-06-01 00:52:22 +00:00
Ilia Alshanetsky f62069244a MFH: Added missing argument check. 2004-05-31 21:01:38 +00:00
Pierre Joye 6aecc4c6d6 - Missing ';' 2004-05-31 20:59:57 +00:00
Ard Biesheuvel a8d2d22d9b Fix build 2004-05-31 08:33:43 +00:00
Ilia Alshanetsky 8f5c250266 MFH: Fixed memory leak on ifx_error(). 2004-05-30 18:58:49 +00:00
Ilia Alshanetsky 8ee3553aa4 MFH: Fixed bug #28564 (Problem building informix as a shared extension). 2004-05-30 17:57:37 +00:00
Brad House 12e1c89041 Manually check for egrep 2004-05-30 14:33:16 +00:00
Ilia Alshanetsky 40329bff38 MFH: Fixed bug #28311 (Transparency detection code is off by 1). 2004-05-28 13:47:26 +00:00
Stefan Esser b9d3aafe55 MFH 2004-05-28 13:38:19 +00:00
Stefan Esser 7966bb1186 MFH 2004-05-28 11:33:42 +00:00
Ilia Alshanetsky 5e2f6ea744 MFH: Turn off session.auto_start to prevent test failures. 2004-05-26 18:23:23 +00:00
Ilia Alshanetsky 354eff7e1e MFH: Prevent test failure when fi_FI locale is not available. 2004-05-26 18:18:19 +00:00
Ilia Alshanetsky 9a5f0ef61a Fixed test failure due to incorrect library check. 2004-05-26 18:08:32 +00:00
Wez Furlong df0d52bd78 Fix build 2004-05-26 12:29:56 +00:00
Derick Rethans baed8167d6 - MFH: Fixed bug #28523 (Typo in ext/sockets/sockets.c) 2004-05-26 06:54:00 +00:00
Stefan Esser 47b6b1e28a MFH 2004-05-25 22:13:10 +00:00
Brad House a063cc2956 PHP_SETUP_OPENSSL is NOT SNMP_SHARED_LIBADD, it's MCVE_SHARED_LIBADD
requires AC_PROG_EGREP when you phpize
2004-05-25 17:05:57 +00:00
Ilia Alshanetsky 5e5de1960f Back to dev. 2004-05-25 13:52:04 +00:00
Ilia Alshanetsky 893aee30e8 Prepare for 4.3.7RC1. 2004-05-25 13:02:53 +00:00
Pierre Joye 30b2af9511 - MFH: Fix #28506, negative angle returns "random arcs"
while (s < 0) s += 360 is used now
2004-05-24 20:03:08 +00:00
Ilia Alshanetsky 03edfa1677 MFH: Fixed bug #28508 (Do not make hypot() available if not supported by
libc).
2004-05-24 17:02:31 +00:00
Wez Furlong 1a9d759fc4 BFN 2004-05-23 11:05:17 +00:00
Wez Furlong b8a8640846 MFH: Bugfix for #23220: IIS messes up SSL shutdown 2004-05-23 10:43:15 +00:00
Stefan Esser e384ab1666 MFH. 2004-05-23 10:15:24 +00:00
Edin Kadribasic c50ef2e715 The other bit of MFH 2004-05-21 21:00:19 +00:00
Timm Friebe f17eff3a6c - MFH: Fixed bug #28354 2004-05-21 20:30:44 +00:00
Timm Friebe e7e54fccac - MFH: Fixed TSRM build 2004-05-21 19:39:01 +00:00
Derick Rethans 9c488ef4f2 - MFH: Fixed TSRM problem in latest commit. 2004-05-21 08:16:26 +00:00
Derick Rethans 5a3baf610b - MFH: Fixed bug #28456 (Problem with enclosed / in uploaded files). 2004-05-21 08:14:24 +00:00
Ilia Alshanetsky 9dd0472573 MFH: Fixed stream leak on error. 2004-05-20 23:38:05 +00:00
Ilia Alshanetsky 900eaa32f3 MFH: Free vars before calling E_ERROR. 2004-05-20 00:11:33 +00:00
Ilia Alshanetsky 8635889231 MFH: Fixed possible memory leak. 2004-05-18 23:27:03 +00:00
Ilia Alshanetsky c0cea96139 MFH: Fixed command line escaping routines for win32. 2004-05-18 13:43:33 +00:00
Edin Kadribasic 45fa60d315 MFH 2004-05-18 12:17:40 +00:00
Ilia Alshanetsky b7479f6c29 MFH: Correct output. 2004-05-17 20:59:07 +00:00
Derick Rethans 27c3401da5 - MFH: Document the smtp_post setting in php.ini* 2004-05-17 16:31:14 +00:00
Marcus Boerger 8761f766d4 MFH: Fix printf with floats 2004-05-16 21:20:30 +00:00
Timm Friebe 22214bc11e - MFH: Fixed auto-conversion from long to double when LONG_MAX /
LONG_MIN where overflown
2004-05-16 20:36:41 +00:00
Ilia Alshanetsky 5eaf82b6eb MFH: Do not allocate error buffer at the start of every request. 2004-05-16 15:34:56 +00:00
SVN Migration f93672da8e This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-05-16 14:48:46 +00:00
Ilia Alshanetsky 7be44d2b6d MFH: Added missing safe_mode & open_basedir checks. 2004-05-16 14:38:26 +00:00
Brad House e864dc5b13 update config.m4 for libmonetra 4.0 compatability.
Library no longer has MCVE_ symbols, the header file has #define\'s to
convert MCVE_ -> M_ to reflect the Monetra name change from MCVE.
More updates to follow.
2004-05-16 03:01:38 +00:00
Ilia Alshanetsky 41da69f20f MFH: Fixed possible memory leak inside popen(). 2004-05-14 16:12:06 +00:00
Ilia Alshanetsky 879cbe7961 MFH: Fixed bug #28386 (wordwrap() wraps lines 1 character too soon). 2004-05-13 17:44:33 +00:00
SVN Migration 739846a6a8 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-05-13 17:44:24 +00:00
Ilia Alshanetsky e5d7aef143 MFH: Make isapi more compatible with apache sapis as far as the creation
$_COOKIE super-global and various $_SERVER values.
2004-05-13 17:21:42 +00:00
Edin Kadribasic 47692de95f Make curl compile with the latest win32 libcurl 2004-05-13 16:54:45 +00:00
Ilia Alshanetsky 6be3e2d751 MFH: Skip session tests if session.save_path is not writable. 2004-05-13 12:53:49 +00:00
Ilia Alshanetsky e69edbeac2 MFH: Fixed various possible memory leaks. 2004-05-12 20:17:21 +00:00
Ilia Alshanetsky 86b31b56de MFH: Fixed bug #28374 (Possible unterminated loop inside
_php_pgsql_trim_message()).
2004-05-12 16:49:56 +00:00
Wez Furlong efb6da662d Avoid Bug #28363 by not seeking if we don't have a read buffer 2004-05-12 10:46:30 +00:00
Ilia Alshanetsky 7f8bbde609 MFH: Make vprintf() and printf() return the length of the string printed. 2004-05-11 19:51:50 +00:00
Ilia Alshanetsky 338de41cf9 MFH: Fixed bug #28355 (glob() does not return error on Linux when it does
not have permission to open the directory).
2004-05-11 13:34:31 +00:00
Ilia Alshanetsky 139deb5ddb MFH: Fixed crash inside cpdf_place_inline_image() when working with
truecolor images.
2004-05-10 22:13:39 +00:00
Marcus Boerger 6d859da0da MFH Decouple NAN and INF 2004-05-10 07:25:11 +00:00
Ilia Alshanetsky 8f242bb48b Added missing upgrade bit. 2004-05-10 02:19:22 +00:00
Marcus Boerger 7afbc02392 BFN 2004-05-10 02:12:17 +00:00
Marcus Boerger e3aa91d3f3 MFH Fix problems with c mode 2004-05-10 01:47:51 +00:00
Ilia Alshanetsky 8838b0f114 MFH: Fixed bug #28289 (incorrect resolving of relative paths by glob() in
windows).
2004-05-09 19:01:27 +00:00
Ilia Alshanetsky 349514ed2d MFH:
Upgrade bundled GD library to 2.0.23.
Fixed bug #28175 (build problem for people using FreeType 2.1.0-2.1.2).
2004-05-09 17:34:02 +00:00
Sara Golemon d676db7541 MFH: if statement logic would never eval to false. 2004-05-08 06:01:11 +00:00
Ard Biesheuvel b7c800e6fb MFH: fixed unregistered pointer juggling bug 2004-05-07 15:17:12 +00:00
Uwe Schindler ba9faa42a0 Security fix: Put '\0' string termination before loop 2004-05-03 12:22:54 +00:00
Stefan Esser 164703f306 MFH 2004-05-02 10:17:36 +00:00
Marcus Boerger a9d700c5c7 MFH Bugfix #28229 (PATCH run-tests tripped up by spaces in names) 2004-04-30 17:54:45 +00:00
Greg Beaver a750e94013 MFH fix included files and put error messages in PEAR_Downloader where they are needed 2004-04-30 16:37:41 +00:00
Ilia Alshanetsky bbf5e08fa3 MFH: Fixed bug #28228 (number_format() does not allow empty decimal
separator).
2004-04-30 13:26:06 +00:00
SVN Migration 1be1a0b472 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-04-30 13:26:02 +00:00
Greg Beaver 072961be7b MFH update to begin process for next release (release is not imminent) 2004-04-30 02:09:01 +00:00
Greg Beaver 9f7829fb47 MFH fix 1186: notice in PEAR_Common undeclared $_packageName 2004-04-30 02:05:47 +00:00
Ilia Alshanetsky 80dfa0ba37 MFH: Fixed bug #28196 (missing error constants in cURL extension). 2004-04-29 16:25:54 +00:00
Sara Golemon d1be87446b MFH Don't strip off those []s, it'll only create problems in wrappers and elsewhere. 2004-04-27 19:28:21 +00:00
Sara Golemon 4c9527044b MFH BugFix 28187 parse_url does not handle scheme://[0123:4567::89]:12345/etc style IPv6 embedded address URLs 2004-04-27 19:21:36 +00:00
Ilia Alshanetsky 7de0f803d1 MFH: Removed C++ style comments. 2004-04-27 17:34:05 +00:00
Ilia Alshanetsky 208a735a85 MFH: Fixed bug #28184 (C++ comments in GD library sources). 2004-04-27 14:59:25 +00:00
Derick Rethans 58466f957f - Fixed bug #28147 (Crash with drawing anti-aliased lines) 2004-04-25 19:43:30 +00:00
Derick Rethans 06fd453fb9 Reorder NEWS 2004-04-23 18:20:39 +00:00
Rasmus Lerdorf 2d9549455d bug #27810 from Joe Orton 2004-04-23 17:51:39 +00:00
Ilia Alshanetsky 7aa63c6209 MFH: Fixed bug #28087 (Do not force mysql.trace_mode to 0 on every request) 2004-04-23 17:04:36 +00:00
Marcus Boerger bc594f1506 BFN 2004-04-22 22:53:18 +00:00
Ilia Alshanetsky b5d2a4aa12 MFH: Fixed possible crash inside pg_copy_(to|from) function if delimiter is
more then 1 character long.
2004-04-22 00:32:07 +00:00
Ilia Alshanetsky a20b67c30f Correct news entry order. 2004-04-21 00:12:12 +00:00
Ilia Alshanetsky 1aad1b4291 MFH:
Fixed possible memory leaks.
	Prevent shm_attach() from destroying non-shm resources.
2004-04-21 00:11:30 +00:00
Frank M. Kromann 6fc504ce16 mssql related fixes 2004-04-20 23:54:20 +00:00
Frank M. Kromann b24de2d58a MFH: Fix #28007. Compile fails when the SHORT type is undefined (older versions of FreeTDS) 2004-04-20 23:37:26 +00:00
Frank M. Kromann 4c5521ad81 MFH: Fix problem getting return value from stored procedure when it returns multiple results 2004-04-20 23:31:39 +00:00
Wez Furlong 808dee23d7 news! 2004-04-19 13:37:43 +00:00
Wez Furlong 4c722bee9c MFH: timeout duration too long in liveness checks for sockets.
Fixes Bug #28055
2004-04-19 12:43:26 +00:00
Derick Rethans 19db79ff1d - Fix for bug #28042 (greek letters in html to entitity mapping not correct) 2004-04-17 23:07:27 +00:00
Uwe Schindler e3727d1061 MFH: set Sybase default APPNAME to ("PHP " PHP_VERSION) 2004-04-16 16:28:01 +00:00
Ilia Alshanetsky 43d81b700a MFH: Fixed test failure if session.use_trans_sid is enabled. 2004-04-15 13:37:58 +00:00
Ilia Alshanetsky a6ea6cc87c Fixed bug #27995 (imagefilltoborder() stops the fill process prematurely).
# Already in PHP5
2004-04-14 22:40:16 +00:00
Ilia Alshanetsky 9f6f2471f0 Back to dev. 2004-04-14 16:39:03 +00:00
Ilia Alshanetsky 90adf3ec54 Prepare for 4.3.6 2004-04-14 15:00:36 +00:00
Edin Kadribasic de83567151 News update 2004-04-14 14:51:24 +00:00
Ilia Alshanetsky c6af3e463a MFH: Fixed bug #27963 (Session lifetime setting may leak between requests). 2004-04-13 18:23:10 +00:00
Derick Rethans 09d9532952 - MFH: Add default fontpath for win98/xp 2004-04-12 21:43:19 +00:00
Greg Beaver 4e9e5c1913 re-organize as per PEAR-Core discussion 2004-04-09 07:43:52 +00:00
SVN Migration 9a9864a0e9 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-04-09 07:38:49 +00:00
foobar 065d0986aa fix typo 2004-04-08 23:56:45 +00:00
foobar 8a088529c9 PHP_ADD_LIBPATH checks that the path is not /usr/lib.. 2004-04-08 23:54:10 +00:00
Andi Gutmans 908f37b08b - News 2004-04-08 21:23:31 +00:00
Derick Rethans ea2fa14acb - Added missing CEST zone 2004-04-08 19:21:46 +00:00
Ilia Alshanetsky ebf7a4f847 Back to dev. 2004-04-08 19:15:13 +00:00
Ilia Alshanetsky 46d273a2b9 4.3.6RC3 2004-04-08 19:13:58 +00:00
Ilia Alshanetsky 4293672558 Prepare news file for release. 2004-04-08 12:42:29 +00:00
Ilia Alshanetsky f5865d02d0 Missing news entries. 2004-04-07 22:44:07 +00:00
Edin Kadribasic cf3d459815 Merged wrongly s/#ifdef/#if/ 2004-04-07 22:31:29 +00:00
Edin Kadribasic fcfe6ff818 MFH: Allow compilation with gdlib 1.8 2004-04-07 22:28:29 +00:00
Ilia Alshanetsky 88b30630b2 Removed test for a problem inside the GD library. 2004-04-07 20:52:44 +00:00
Adam Dickmeiss 9d4bd52adf Fixed bug #27803 (YAZ lib path) 2004-04-07 19:37:22 +00:00
foobar bf45f6d5ba MFH: Revert the patch to "fix" #27664 and added more informal error msg. 2004-04-07 13:56:48 +00:00
Greg Beaver 76c42836b2 developer -> lead for cellog 2004-04-07 00:29:46 +00:00
Greg Beaver fd4dea3500 MFH 2004-04-06 23:22:16 +00:00
Greg Beaver c1134d6bb9 change release date 2004-04-06 22:09:05 +00:00
Derick Rethans 9166d10260 - Update NEWS with fugbix. 2004-04-06 18:12:03 +00:00
Rob Richards fa843198d4 Fix Bug #27769 crash using domxml_xmltree 2004-04-06 17:56:11 +00:00
foobar e5a94e640e update credits 2004-04-06 10:10:41 +00:00
foobar 3a95b4b173 rtd 2004-04-06 09:38:27 +00:00
Ilia Alshanetsky 8a6f9ab5c0 Back to dev. 2004-04-05 15:43:52 +00:00
Ilia Alshanetsky 9a87c59f72 Prepare for 4.3.6RC2 2004-04-05 15:34:37 +00:00
Ilia Alshanetsky 831caad432 Restore wddx tests, without the troublesome date conversions. 2004-04-05 14:10:19 +00:00
Moriyoshi Koizumi 0ef09b9609 - MFH(r-1.49): Let it work safely 2004-04-04 19:23:43 +00:00
Moriyoshi Koizumi df1e5064e7 - Remove test, as it's never worked as expected. 2004-04-04 19:19:45 +00:00
Ilia Alshanetsky ad63c6c086 MFH: Fixed a bug that prevented building of the GD extension against
external GD lib 1.X.
2004-04-04 18:00:23 +00:00
Derick Rethans 8d802f10f0 - MFH: Fixed comment and double 0 2004-04-04 12:45:34 +00:00
Derick Rethans 6c192034a2 - MFH: One more test for DST bugs. 2004-04-04 12:43:17 +00:00
SVN Migration 3bab4824f0 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-04-04 12:42:14 +00:00
Marcus Boerger 951f80976b MFH: Add comment 2004-04-04 12:31:38 +00:00
Ard Biesheuvel 0e00c049c7 MFH: gcc-2.95/sparc test 2004-04-04 10:24:09 +00:00
Derick Rethans e85ca0efce - Fixed bug #27849 (configure craps out on trivial syntax error). 2004-04-03 17:23:14 +00:00
Greg Beaver 56c1fec8d8 MFH
fixed #534 for real (remove notice if state=stable doesn't exist, and use "none" for stable version number)
2004-04-03 15:56:11 +00:00
Ard Biesheuvel 4b1deca2e1 2nd try for glibc2.2/sparc64 2004-04-03 12:37:45 +00:00
Ard Biesheuvel c40ac6b268 Changed test to include returning HUGE_VAL as well (intended to resolve #27830) 2004-04-03 09:46:20 +00:00
Greg Beaver 8e07a4fd52 MFH
fix Bug #937 throwError() treats every call as static
fix Bug #964 PEAR_ERROR_EXCEPTION causes fatal error
2004-04-03 06:28:48 +00:00
Greg Beaver 5336ad6dbd MFH fix #534: pear search doesn't list unstable releases 2004-04-03 06:09:27 +00:00
Greg Beaver e1fa70df9a not devel any more 2004-04-03 00:42:14 +00:00
Ilia Alshanetsky 85923625fe Fixed bug #27730. 2004-04-02 16:54:44 +00:00
Derick Rethans de9e6e1f1b - Fixed unintialized variables. 2004-04-02 09:33:49 +00:00
Ilia Alshanetsky b145f87d40 MFH: Fixed reversed condition for error reporting. 2004-04-01 22:05:38 +00:00
Ilia Alshanetsky f579d02059 Back to dev. 2004-04-01 21:48:32 +00:00
Ilia Alshanetsky 2058fec25b Prepare for 4.3.6RC1. 2004-04-01 20:51:34 +00:00
Derick Rethans 6c63a9e153 - Fixed bug #27780 (strtotime(+1 xxx) returns a wrong date/time) 2004-04-01 20:35:41 +00:00
Ilia Alshanetsky 4de55b50dc Revert patch for bug #27782. 2004-04-01 19:07:02 +00:00
Ilia Alshanetsky bbdbfa8563 Bug fixing news & test for bug #27819. 2004-04-01 17:49:21 +00:00
Derick Rethans cc5e0df571 - MFH: Fixed bug #27822 (is_resource() returns TRUE for closed resources) 2004-04-01 08:56:33 +00:00
SVN Migration d528916296 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-04-01 08:54:45 +00:00
Ilia Alshanetsky 0cd7e11430 Bug fixing news. 2004-03-31 23:27:40 +00:00
Ilia Alshanetsky 772523e4a8 MFH: Fixed bug #27809 (ftp_systype returns null on some ftp servers). 2004-03-31 20:44:04 +00:00
Hartmut Holzgraefe 5f1a942add MFH 2004-03-31 17:59:28 +00:00
Ilia Alshanetsky ddbc35b39c MFH: Fixed bug #27802 (default number of children to 8 when
PHP_FCGI_CHILDREN is not defined).
2004-03-31 17:01:45 +00:00
Ard Biesheuvel ea3c36078c MFH 2004-03-31 10:31:43 +00:00
Ilia Alshanetsky 24e9c2b3ff MFH: Fixed bug #27782 (Wrong behaviour of next(), prev() and each()). 2004-03-30 19:09:10 +00:00
SVN Migration 6241abce94 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-03-30 19:08:44 +00:00
Frank M. Kromann 53b5689016 MFH: Fix for #27764. Get return value from a stored procedure not returning any result sets 2004-03-30 17:54:38 +00:00
Stanislav Malyshev 7eed89deb7 Disabled calling dtors on tsrm_shutdown - calling dtors in tsrm_shutdown makes
modules registering TSRM ids to crash, if they have dtors,
since the module is unloaded before tsrm_shutdown is called.
Can be re-enabled after tsrm_free_id is implemented.
2004-03-30 16:54:20 +00:00
Ilia Alshanetsky 06f91140fe Bug fixing news. 2004-03-30 13:43:53 +00:00
Wez Furlong 0825bb2386 Fix for Bug #27762: SCO Openserver doesn't have S_ISSOCK
Possible side effect from this is that CLI scripts run from inetd won't
realize that stdin/stdout are sockets.  But thats not our problem.
2004-03-30 11:04:32 +00:00
Marcus Boerger 64fe4952b6 MFH: NAN==NAN doest work (Ard) 2004-03-29 23:26:32 +00:00
Ilia Alshanetsky 96b2eaca0d MFH: Removed extra spaces that cause the test to fail. 2004-03-29 21:57:54 +00:00
Wez Furlong ffe1113b3d Fix for Bug #26757: session.save_path default is bogus for win32
Based on a patch found in the bug report.
Concept approved by Ilia.
2004-03-29 21:28:47 +00:00
Ilia Alshanetsky db9a8f2f5e Bug fixing news. 2004-03-29 19:35:19 +00:00
Marcus Boerger 6efb1b369c MFH: Found a NAN/INF solution that should be portable everywhere(?) 2004-03-29 19:03:59 +00:00
Frank M. Kromann 538a818db0 MFH: Fix for #27743. Make sure Money types are converted and returned correct 2004-03-29 18:33:13 +00:00
Ilia Alshanetsky 9934670186 MFH: Synchronized bundled GD library with GD 2.0.22. 2004-03-29 18:21:00 +00:00
Ilia Alshanetsky 89206cfca4 MFH: Fixed bug #27731 (error_reporting() inside @ block fails to set
error_reporting level).
2004-03-29 00:52:20 +00:00
Ilia Alshanetsky cb8e1f16ee Fixed build. 2004-03-29 00:27:17 +00:00
Ilia Alshanetsky 1af4d7724f Fixed bug #27732 (Fixed compilation bug inside php_sab_info.h). 2004-03-29 00:09:34 +00:00
Marcus Boerger 7e941eefe8 MFH: Improve portability (idea by Ard) 2004-03-28 21:50:01 +00:00
Rasmus Lerdorf 885e837b2a - Merge whitespace and trivial changes from HEAD back to the branch so the
diff between HEAD and PHP_4_3 only shows feature changes
- Fix test case for bug #27719 (TZ=EST means no DST so the test was wrong)
2004-03-28 14:57:32 +00:00
Marcus Boerger 6a3fc10b05 MFH: Add new #undef's 2004-03-27 01:53:18 +00:00
Marcus Boerger e96b4d55bd BFN 2004-03-27 01:48:04 +00:00
Marcus Boerger 5188dd875f Fixed bug #27687 (Bug Adding Default Charset to 'text/*' Content-Type Header 2004-03-27 01:45:44 +00:00
Marcus Boerger 6f431d5d6d MFH: Move defines to proper location 2004-03-27 01:41:46 +00:00
Marcus Boerger 4e78551db1 Touch after .c 2004-03-27 01:28:00 +00:00
Marcus Boerger 9de151b2ce BFN 2004-03-27 01:18:40 +00:00
Marcus Boerger 91786ab7a5 MFH: bugfix #27646 2004-03-27 01:17:07 +00:00
SVN Migration 0bf404dbeb This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-03-27 00:50:42 +00:00
Derick Rethans e566c744d1 - MFH: Fix for bug #27717. 2004-03-26 22:14:35 +00:00
Ard Biesheuvel a96a6a2b7f Alignment fix 2004-03-26 20:53:09 +00:00
Ard Biesheuvel f51237d726 MFH 2004-03-26 20:07:34 +00:00
Ard Biesheuvel b1061c7443 MFH: Calculate pow(long,long) in a way that works on 64-bit platforms 2004-03-26 20:01:53 +00:00
Derick Rethans 5d3a542a08 - COmmit the test, not the diff 2004-03-26 19:50:45 +00:00
Ilia Alshanetsky 20c0fb5e9c MFH: Fixed bug #27664 (--disable-cli doesn't force --without-pear). 2004-03-26 19:48:53 +00:00
Derick Rethans e89ac09125 - Add test for #27719 2004-03-26 19:44:18 +00:00
Rasmus Lerdorf 94728f7301 The 2am offset was a bad choice as this hour doesn't necessarily exist
on a DST switch.  So use 4am instead.  Fixes bug #27719
2004-03-26 19:29:31 +00:00
Ilia Alshanetsky e65f145d46 Bug fixing news. 2004-03-26 19:07:49 +00:00
Ilia Alshanetsky 2986565c79 MFH: Fixes to allow curl extension to compile against libcurl 7.11.1 2004-03-26 19:04:17 +00:00
Ilia Alshanetsky e2088baab4 Back to dev. 2004-03-25 14:14:21 +00:00
Ilia Alshanetsky 3263cdd42e Go with 4.3.5 2004-03-25 13:57:01 +00:00
Ilia Alshanetsky c6a2f0628d Prepare NEWS file for 4.3.5 release. 2004-03-23 19:53:27 +00:00
Frank M. Kromann 39dc110f91 MFH Fix for #26589. Crash when selecting many columns of type Money 2004-03-19 18:47:02 +00:00
Greg Beaver a3b179d916 MFH update to 1.3.1dev 2004-03-19 03:16:45 +00:00
Greg Beaver 84b6a9dfb3 MFH new PEAR_ErrorStack and tests 2004-03-19 00:55:53 +00:00
SVN Migration c6b98d3891 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-03-19 00:48:40 +00:00
Ilia Alshanetsky 8621923a5e Back to dev. 2004-03-18 18:02:42 +00:00
Ilia Alshanetsky c096e54196 Go for PHP 4.3.5RC4 2004-03-18 17:17:25 +00:00
Ilia Alshanetsky 663841fd31 MFH: Fixed bug #27633 (Incorrect EOL translation by ftp_get() in ASCII
mode).
2004-03-18 17:15:47 +00:00
Uwe Schindler 02ab9ce41d hint to raise stacksize (bug #27231) 2004-03-18 13:37:41 +00:00
Ard Biesheuvel 442c6c9c6f Added myself 2004-03-18 10:55:35 +00:00
Ilia Alshanetsky 5df1e69be1 MFH: Fixed bug #27300 (Improved regex for pg_convert()). 2004-03-18 01:35:50 +00:00
Pierre Joye f7226bcc2d - Add entry, crash in imagecolortransparent 2004-03-17 17:26:13 +00:00
Pierre Joye 0b9b69be38 - MFH (crash in imagecolortransparent with invalid color index) 2004-03-17 17:25:24 +00:00
Ilia Alshanetsky 5888fd4024 MFH: Fixed bug #27498 (bogus safe_mode error on nonexistent directories for
chdir() and opendir() functions).
2004-03-16 23:23:26 +00:00
Ilia Alshanetsky 1b2b9a6a0d MFH:
Fixed bug #27580 (pre-initialization errors in ap2 handler are not
	being written to vhost error log).
	Stop using depreciated and ignored APLOG_NOERRNO directive.
	Make file not found & directory as script invocation error messages
	more descriptive.
2004-03-16 22:38:17 +00:00
Stanislav Malyshev a207ace664 MFH registry fixes:
fix off-by-one in registry per-dir values
add IniFilePath value for setting php.ini path via registry
2004-03-16 18:27:55 +00:00
Stanislav Malyshev 38b637bdfc MFH: export session globals 2004-03-16 18:21:02 +00:00
Ilia Alshanetsky a96582f13b MFH: Fixed bug #27600 (GCC 3.0.4 does not like __attribute__ directive). 2004-03-16 16:38:00 +00:00
Ilia Alshanetsky 8cf790dea1 MFH: Fixed bug #27559 (Corrected open_basedir resolving logic). 2004-03-16 00:32:09 +00:00
Jay Smith e58b48e89c MFH: Fixed bug #27291 (get_browser matches browscap.ini patterns
incorrectly).
2004-03-15 21:27:01 +00:00
Frank M. Kromann 210d34a088 MFH: Fix for #27594. Comuted columns does not return a column source 2004-03-15 19:45:39 +00:00
Rasmus Lerdorf ed5a974ab0 Forgot to add NEWS entries for these 2004-03-15 18:20:16 +00:00
Jon Parise bb7f2e4210 MFH 1.243:
Fixed crash in php_ini_scanned_files() when no additional INI files were
actually parsed.
2004-03-15 16:39:53 +00:00
foobar 31b2848051 BFN 2004-03-15 16:07:57 +00:00
Zeev Suraski 5ebe7edcb3 Add misisng library path 2004-03-15 10:04:12 +00:00
Ilia Alshanetsky ed68bc6095 Bug fixing news. 2004-03-14 20:12:17 +00:00
Sascha Schumann 6a9e52543b Renaming cvsclean target -- IRIX make seems to ignore the .PHONY target. 2004-03-14 17:43:46 +00:00
foobar f1c31423d7 reorder 2004-03-14 10:45:51 +00:00
Pierre Joye 441dc97d75 - missing restoreAlphaBleding declaration 2004-03-14 00:46:45 +00:00
Pierre Joye 8378373527 - entry for fix #27582 2004-03-13 23:41:00 +00:00
Pierre Joye d76514d892 - MFH bug #27582 (imagefilltoborder crashes) 2004-03-13 23:36:29 +00:00
SVN Migration 2bbfddb533 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-03-13 23:22:57 +00:00
Greg Beaver 85e5585a1c oops 2004-03-13 18:29:29 +00:00
Greg Beaver e6840ed921 fix #1008: safe mode raises warning
fix register_argc_argv in pear.bat
2004-03-13 17:34:36 +00:00
Sara Golemon cb20f5cafe BFN 2004-03-12 21:49:01 +00:00
Ilia Alshanetsky a95a14cebf MFH: Add checks of return values from user callback functions. 2004-03-12 17:43:17 +00:00
Rasmus Lerdorf 8b9cc5ba81 MFH
getopt() doesn't work if variables_order does not include "S" because it
  only looks in $_SERVER for argv.  So, if we don't find argv in $_SERVER
  fall back to looking in the global symbol table where register_argc_argv
  would have put it.
2004-03-12 17:42:09 +00:00
Rasmus Lerdorf 259a07f733 Fix/workaround for http://bugs.php.net/27533 2004-03-12 17:27:55 +00:00
Ilia Alshanetsky a9674113d1 MFH: Fixed bug #22127 (Invalid response code when force-cgi-redirect safety
mechanism is triggered).
2004-03-12 14:07:14 +00:00
Sara Golemon 168786cfcf Test getaddrinfo() for brokenness. Pretend it doesn't exist if it misbehaves. 2004-03-12 00:16:38 +00:00
Sara Golemon 3f43cfbb6a BFN 2004-03-11 18:44:26 +00:00
Moriyoshi Koizumi 93578a5789 - MFH (r-1.212): Revert ini setting patch as I notified in... 2004-03-10 20:56:07 +00:00
Rasmus Lerdorf 89eaec22b5 Make curl_setopt($ch,CURLOPT_RETURNTRANSFER,0) reset the RETURNTRANSFER to
stdout as is implied in the documentation.  Currently it simply does
absolutely nothing and there is no way to reset it to stdout.
2004-03-09 17:06:53 +00:00
foobar a99c6916f3 test for bug #27457 2004-03-09 14:20:14 +00:00
SVN Migration 30c8d9b166 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-03-09 14:19:51 +00:00
foobar 5a6d9048e5 order 2004-03-09 12:52:08 +00:00
Ilia Alshanetsky 0e9275fb37 MFH: Fixed bug #27530 (broken http auth when safe_mode is on and PCRE is
disabled).
2004-03-09 02:24:20 +00:00
Ard Biesheuvel b08b041503 Possible fix for #27408 (wordsize/alignment issue) 2004-03-08 18:52:40 +00:00
Ilia Alshanetsky 9c340ef86f MFH: Fixed bug #27424 (headers missing on flush() in apache 2 SAPIs). 2004-03-08 03:16:13 +00:00
Marcus Boerger baf702a009 MFH: recognize db-4.2.x 2004-03-08 00:01:03 +00:00
Ilia Alshanetsky 65ab4040fc MFH: Fixed bug #27421 (mbstring.func_overload should be system ini setting) 2004-03-06 19:30:35 +00:00
Ilia Alshanetsky c3d0c735b8 MFH: Fixed bug #27460 (base64_decode() does not handle extra padding). 2004-03-06 19:06:12 +00:00
Ilia Alshanetsky 1a5342e468 MFH: Fixed bug #27505 (htmlentities() does not handle BIG5 correctly). 2004-03-06 18:35:53 +00:00
Ilia Alshanetsky eeaaaf7fce Fixed bug #27437 (wrong freetype include inside GD library). 2004-03-06 18:26:06 +00:00
Pierre Joye 5dd18df5eb - Add #27238 entry 2004-03-06 17:47:16 +00:00
Pierre Joye 6deb70d17d - MFH #27238 fix (ilia ok) 2004-03-06 17:41:31 +00:00
Sara Golemon 5babe27344 MFH: Don't rely on ANSI tmpfile(), use the streams layer instead, it'll deal with platform issues. 2004-03-04 22:29:23 +00:00
Christian Stocker ac4adcc2f7 MFH (fix a linefeed problem, if more than one configureoption) 2004-03-04 13:38:10 +00:00
Derick Rethans 46e793d8dc - MFH: Fixed bug #27443 (defined() returns wrong type). 2004-03-01 08:11:46 +00:00
SVN Migration cc2149097f This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-03-01 08:07:26 +00:00
Anil Madhavapeddy cdb852e21f MFH 'pear install -R' fix, ilia@ ok 2004-02-29 15:59:18 +00:00
Ilia Alshanetsky c18cbd0f35 MFH: Remove unused variable. 2004-02-28 22:59:03 +00:00
Ilia Alshanetsky 40fe027642 MFH: Memory allocation check. 2004-02-28 21:00:40 +00:00
Greg Beaver 2184a5a584 MFH 2004-02-27 02:27:12 +00:00
foobar b2f06ce507 Remove bogus test: see bug #20993 2004-02-26 01:07:32 +00:00
foobar 80553d8fc7 typofix 2004-02-26 00:13:02 +00:00
Ilia Alshanetsky 5b4eeb628c MFH: Handle situation where feof() occurs before the HTTP header is
retrieved.
2004-02-26 00:03:57 +00:00
Ilia Alshanetsky 2af0c3bbdf MFH:
Fixed bug #21760 (Use of uninitialized pointer inside php_read()).
	Fixed 3 possible crashes due to integer overflow or invalid user input
	inside the sockets extension.
2004-02-25 22:12:03 +00:00
foobar d4e86c36ed MFH: Test for bug #27395 2004-02-25 18:54:33 +00:00
SVN Migration fe4a118383 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-02-25 18:54:16 +00:00
foobar ada04f382d MFH: ZTS build fix 2004-02-25 13:20:31 +00:00
foobar e1505662ad MFH: Fixed bug #27384 (unpack() misbehaves with 1 char string). (GeorgeS) 2004-02-25 12:36:24 +00:00
Ilia Alshanetsky 3766f870d4 MFH: Fixed bug #27383 (Potential crash inside fopen_wrapper, while parsing
response code).
2004-02-24 21:53:57 +00:00
Christian Stocker e4c30e6b89 fix for bug 27349 "Invalid parsing of CDATA sections in XSL templates" 2004-02-24 14:26:27 +00:00
foobar 9543e9c111 MFH: - Fixed bug #26005 (Random "cannot change the session ini settings" errors). 2004-02-24 08:49:41 +00:00
Ilia Alshanetsky d0551c2a7c MFH: Fixed bug #27341 (HEAD requests fail to return data). 2004-02-23 19:50:47 +00:00
foobar 66df106383 MFH: fixed bug #27337 (missing sapi_shutdown()) 2004-02-23 19:15:05 +00:00
Christian Stocker 4c6e92bdb8 skip test, if no XSLT support is compiled in 2004-02-23 10:33:51 +00:00
Derick Rethans b2732089f2 - MFH: Fixed bug #27354 (Modulus operator crashes PHP). 2004-02-22 20:07:17 +00:00
SVN Migration 8e8f8ece29 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-02-22 20:04:31 +00:00
Ilia Alshanetsky 7275b5a177 MFH: wbmp conversion warning fix. 2004-02-22 18:03:24 +00:00
Sara Golemon 5f0305e605 MFH 2004-02-21 19:37:59 +00:00
Sara Golemon 2a0e69c111 MFH: long is not always 32-bit 2004-02-20 21:09:08 +00:00
Greg Beaver 74c2e50253 stupid oversight, no 4.2 dep 2004-02-20 17:17:04 +00:00
Pierre Joye cb915e0498 - Update to DB-1.6.0 2004-02-20 15:38:29 +00:00
SVN Migration 3379ffa7ed This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-02-20 15:36:25 +00:00
Pierre Joye 0053324a83 - 1.3b6=>1.3 stable, prepare stable release 2004-02-20 15:33:59 +00:00
Ilia Alshanetsky a0c001aa70 MFH: missing safe_mode & open_basedir checks. 2004-02-20 01:09:25 +00:00
Greg Beaver 7b6a710bd0 MFH 2004-02-19 15:55:37 +00:00
Ilia Alshanetsky 221d4b346b MFH: Fixed possible resource/memory leak. 2004-02-19 02:20:14 +00:00
foobar 1e60e670ba MFH: emalloc -> safe_emalloc 2004-02-19 02:13:39 +00:00
foobar fdec1ab00e MFH: improve error message 2004-02-19 01:54:44 +00:00
Ilia Alshanetsky 1aac6063a4 MFH: Fixed bug #27295 (memory leak inside sscanf()). 2004-02-18 19:49:17 +00:00
SVN Migration 0808ccd417 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-02-18 19:48:14 +00:00
foobar 61c00477b4 MFH 2004-02-18 00:01:05 +00:00
SVN Migration 9ea8c7ddd4 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-02-18 00:00:37 +00:00
Ilia Alshanetsky d6cc9d4f01 MFH: Fixed bug #27293 (two crashes inside image2wbmp()). 2004-02-17 21:30:57 +00:00
Ard Biesheuvel c07cd30cd0 Really disallow persistent connections if ini option is set 2004-02-17 20:57:26 +00:00
foobar c9af2f28e2 - Fixed bug #26753 (zend_fetch_list_dtor_id() does not check NULL strings). 2004-02-17 10:39:17 +00:00
foobar ea54e26972 MFH 2004-02-16 17:44:55 +00:00
foobar 0ac2170517 typofix :) 2004-02-16 17:42:22 +00:00
Ilia Alshanetsky bd6b53c1d8 MFH: Fixed bug #27278 (*printf() functions treat arguments as if passed by
reference).
2004-02-16 17:09:52 +00:00
foobar ca90ec2cac MFH 2004-02-16 16:51:23 +00:00
SVN Migration 91abce9917 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-02-16 16:50:54 +00:00
Sergey Kartashoff 4cc252ca16 - A fix to make UDM_LIMIT_DATE work was applied. Thanks to
d.rousseau at nnx.com
2004-02-16 16:40:27 +00:00
Ilia Alshanetsky 1ed5d89106 Back to dev. 2004-02-16 16:03:35 +00:00
Ilia Alshanetsky c262cf962c Go with RC3 2004-02-16 15:34:16 +00:00
Ilia Alshanetsky 8e510ef9b9 Bug fixing news. 2004-02-16 15:15:22 +00:00
Ilia Alshanetsky 1aaadf3ca3 MFH: Better gmp fix. 2004-02-16 15:13:49 +00:00
Derick Rethans ca98ed755c - Update news too 2004-02-16 14:29:31 +00:00
Derick Rethans 2fe16812bd - MFH: Fixed zero bytes memory allocation when no extra ini files are found in
the --with-config-file-scan-dir specified directory. (Eric Colinet, Derick)
2004-02-16 14:29:07 +00:00
Pierre Joye a300b68b08 - DB 1.6RC6 2004-02-15 23:07:30 +00:00
Pierre Joye b9d98f0098 - remove DB 1.6RC1 2004-02-15 23:06:56 +00:00
Ard Biesheuvel deb89ce2f4 CS/WS 2004-02-15 20:47:21 +00:00
Ard Biesheuvel 405101d10d MFH 2004-02-15 18:45:56 +00:00
Ard Biesheuvel bc11725188 MFH reverted fix for #26777 2004-02-15 18:43:46 +00:00
Ilia Alshanetsky 938e964beb MFH: Fixed bug #27258 (moved FPE check to correct location).
Fixed several possible FPE.
2004-02-15 17:23:11 +00:00
Timm Friebe 49118556bb - Fixed bug #26407 (Result set fetching broken around transactions) 2004-02-15 10:55:55 +00:00
Timm Friebe 47d30e40e4 - Changed initialization of function arguments to message handler
# Hopefully fixes bug #27157 (Compile Failure on Solaris 8), user does
# not know how to use patch and therefore couldn't verify this works.
2004-02-15 10:38:57 +00:00
Greg Beaver 4135978add re-add as binary 2004-02-14 20:30:31 +00:00
Greg Beaver 86bdf2b049 remove in order to re-add binary 2004-02-14 20:29:45 +00:00
Greg Beaver 1d6cca1b2f MFH 2004-02-14 20:29:10 +00:00
Ard Biesheuvel 1e12ed5e1a BFN 2004-02-13 10:51:02 +00:00
Ard Biesheuvel 6fe6810c8a Fixed bug #27235 (NUMERIC x.0 field returns empty string on 0)
CS/WS
# MFB not necessary, bug doesn't apply to HEAD
2004-02-13 10:43:24 +00:00
Stefan Esser 408c183013 MFH 2004-02-12 18:36:57 +00:00
SVN Migration cdb4683c30 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-02-12 14:09:54 +00:00
foobar 3a6eb48e1e BFN 2004-02-12 01:35:49 +00:00
foobar 2706fda4a6 MFH: ws fix 2004-02-12 01:32:40 +00:00
foobar fafe8a19b8 MFH: - Fixed bug #23467 (Showing incorrect Time Zone)
# patch by scottmacvicar at ntlworld dot com
2004-02-12 01:29:13 +00:00
Marcus Boerger 69eaab8aac MFH: Bug #27104 CLI/CGI SAPI module variable name conflict 2004-02-11 22:00:38 +00:00
Ilia Alshanetsky 6035439314 MFH: 'Touch' the file to make sure re2c is not needed. 2004-02-11 17:32:41 +00:00
Ilia Alshanetsky 79ed81e971 Fixed bug #27183 (userland stream wrapper segfaults on stream_write). 2004-02-11 17:09:09 +00:00
Ilia Alshanetsky ca53f68729 MFH: Fixed bug #26862 (ob_flush() followed by output_reset_rewrite_vars()
may result in data loss).
2004-02-11 17:00:56 +00:00
SVN Migration 2b66aa860f This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-02-11 17:00:49 +00:00
Ilia Alshanetsky 17cef37fd1 MFH: fixed a compilation error. 2004-02-11 16:53:03 +00:00
Ilia Alshanetsky fa2f1ac2a4 Back to dev tree (forgot to restore versions). 2004-02-11 16:49:24 +00:00
Ilia Alshanetsky a9e21b0a18 MFH: Win32 build fix. 2004-02-11 14:52:34 +00:00
Ilia Alshanetsky 353b838a13 MFH:
Fixed win32 build.
	Added missing headers needed for wait().
	Removed duplicate signal.h header.
2004-02-10 17:44:44 +00:00
Ilia Alshanetsky a68c033bf9 MFH: Fixed bug #26653 (open_basedir incorrectly resolved on win32). 2004-02-10 16:09:56 +00:00
foobar 8c7af900cf typos 2004-02-10 02:00:02 +00:00
Ilia Alshanetsky 8e46f4b273 MFH: Fixed bug #26758 (FastCGI exits immediately with status 255). 2004-02-10 00:30:03 +00:00
Ilia Alshanetsky 86337bac18 MFH: Fixed bug #27026 (Added cgi.nph that allows forcing of the Status: 200
header that is not normally needed).
2004-02-10 00:03:44 +00:00
Ilia Alshanetsky 125d5a2b73 MFH: Fixed bug #27196 (Missing content_length initialization in apache 2
sapis).
2004-02-09 23:28:48 +00:00
Frank M. Kromann de23ffbee3 Delay creation of exec handle til it's needed 2004-02-09 17:58:24 +00:00
Ilia Alshanetsky 6af73a9f5e MFH: Fixed bug #27172 (Possible floating point exception in gmp_powm()). 2004-02-09 04:28:07 +00:00
Ilia Alshanetsky df8c668559 Bug fixing news. 2004-02-09 04:08:25 +00:00
Ilia Alshanetsky c346be31a1 MFH: Fixed bug #27175 (tzset() is not being called by PHP on startup). 2004-02-09 04:05:56 +00:00
foobar a360d7d794 MFH: fixed bug #27171 2004-02-07 19:15:09 +00:00
Ilia Alshanetsky a9b6b75a02 MFH: Fixed possible memory leak with INI values. 2004-02-06 03:08:39 +00:00
Ilia Alshanetsky fa8c24ff7a MFH: Fixed bug #27135 (Possible crash inside mb_strlen()).
# Patch by Moriyoshi
2004-02-06 02:28:38 +00:00
foobar fb4f76e78d MFH: emalloc -> safe_emalloc 2004-02-05 12:19:32 +00:00
Antony Dovgal f261a8f571 MFH:
fix bug #27149
2004-02-05 08:30:17 +00:00
Ilia Alshanetsky 5bffdef46d MFH: Parse command line ini directives passed using -d before -i, to ensure
correct settings output.
2004-02-04 22:49:55 +00:00
Ilia Alshanetsky d48d599294 Go with RC2 2004-02-03 14:47:29 +00:00
Ilia Alshanetsky 2b637a2c03 RC2 news bit. 2004-02-03 14:46:32 +00:00
Ilia Alshanetsky e26531e7c3 MFH: Fixed possible overflow. 2004-02-03 14:44:17 +00:00
Antony Dovgal 55142148ad MFH (making oci8 able to compile with Oracle 10) 2004-02-03 14:22:34 +00:00
Andrey Hristov b9147e80a6 typo fix 2004-02-02 22:43:06 +00:00
Moriyoshi Koizumi 96338f74c5 MFH(r-1.153): POSIX / ISO compliancy.
# this commit is granted by Ilia.
2004-02-01 19:56:16 +00:00
Ilia Alshanetsky 0bf4ee95b6 MFH: Apache 2 portion of the fix for bug #25753. 2004-01-29 15:18:37 +00:00
Ilia Alshanetsky 697102558f Fix for a possible crash in fgetcsv(). (Patch by Moriyoshi Koizumi) 2004-01-29 14:35:34 +00:00
foobar e5a2da9811 typofix 2004-01-29 03:21:22 +00:00
Ilia Alshanetsky 1ca21fdf96 MFH: Fixed bug #27007 (missing connection closure when connect fails in
pgsql)
2004-01-29 02:55:33 +00:00
Ilia Alshanetsky 66fee7dd46 MFH: Fixed bug #27037 (fixed possible crash in apache2handler output code). 2004-01-29 02:18:17 +00:00
Sara Golemon f62beb8487 BFN 2004-01-29 00:11:41 +00:00
Sara Golemon 25d980f23c This should not have been an INI_ALL directive. 2004-01-29 00:09:26 +00:00
Ilia Alshanetsky 33d0cdb426 MFH: Fixed bug #27011 (64bit int/long confusion in preg_match*() functions) 2004-01-28 21:49:15 +00:00
foobar 99bcc186f6 BFN 2004-01-28 19:26:44 +00:00
Rasmus Lerdorf e596539840 If we have a text/html file with the executable bit set, we load up the
current ini, but if php's xbithack option is not set we forgot to restore
the previous ini settings potentially leaking ini settings from one request
to the next.  Closes bug #25753 and a few others.
2004-01-28 17:42:20 +00:00
Martin Kraemer 0a00d25a28 Bug fix: Images would be broken on big-endian machines because the putc
function wrote the first (instead of "the low order") byte. That resulted
in unexpected zero bytes.
2004-01-28 16:27:42 +00:00
Ilia Alshanetsky 6467ac57d6 Bug fixing news. 2004-01-28 01:43:59 +00:00
Ilia Alshanetsky dd4d0ba050 MFH: Fixed bug #27058 (crash in sybase_connect() with 2 arguments). 2004-01-28 01:43:55 +00:00
Ilia Alshanetsky 7afa3484c0 MFH: Fixed bug #27056 (ints used instead of longs inside some GD functions) 2004-01-28 01:38:15 +00:00
Marcus Boerger d525845531 still version 4 here 2004-01-27 01:24:17 +00:00
Marcus Boerger ce983dad77 Use RPM variables
# as discussed with ilia
2004-01-27 00:32:35 +00:00
Antony Dovgal 5e8bee0b4d MFH 2004-01-26 14:04:22 +00:00
Marcus Boerger 4e151b1c7d MFH 2004-01-26 08:38:38 +00:00
SVN Migration ca47777e5f This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-01-26 08:37:24 +00:00
Pierre Joye 0ffeb8f5cd MFH, I'm done 2004-01-26 01:37:13 +00:00
Pierre Joye 195dcc7eda - MFH 2004-01-26 01:34:03 +00:00
Pierre Joye c28909f9d9 MFH 2004-01-26 01:26:47 +00:00
Moriyoshi Koizumi 2667855bad BFN 2004-01-26 00:30:42 +00:00
Moriyoshi Koizumi 3887735c4c - MFH(r-1.3): Suppress a compiler warning by a rather useless typecasting. 2004-01-26 00:27:54 +00:00
Moriyoshi Koizumi 056bb1ad7c - MFH(r-1.2): Fix bug #26699 (mbstring doesn't identify "binary" as a valid encoding name) 2004-01-26 00:21:57 +00:00
foobar 50f57d6cbb MFH: - Fixed bug #27040 (passing an array of form-fields to CURLOPT_POSTFIELDS does not work). 2004-01-26 00:18:25 +00:00
Ilia Alshanetsky 074b68fe73 A better bug description, for people without the official Ilia decoder
ring.
2004-01-26 00:15:10 +00:00
Ilia Alshanetsky bb0973e294 bug fixing news. 2004-01-25 23:55:43 +00:00
Pierre Joye 223398e0fa MFH 2004-01-25 23:54:49 +00:00
Pierre Joye aef84ceb00 MFH 2004-01-25 23:42:43 +00:00
Pierre Joye 55f2a16d01 - 2004 (c) 2004-01-25 23:35:02 +00:00
Pierre Joye 65fa341a3e - year++; 2004-01-25 23:20:01 +00:00
Pierre Joye 643b271bea - wassup... really add Mail-1.1.2 2004-01-25 23:04:55 +00:00
Pierre Joye 3b61fc5389 - Update: HTTP-1.2.2 Mail-1.1.2 DB-1.6.0RC1 2004-01-25 23:00:11 +00:00
Pierre Joye 8a67145847 - Prepare 4.3.5, remove old archives 2004-01-25 22:58:50 +00:00
Ilia Alshanetsky cef2c74845 sybase_ct extension fixes and improvements by Timm Friebe. 2004-01-25 20:43:32 +00:00
Timm Friebe 202500193d - MFH 2004-01-25 20:14:05 +00:00
foobar 6505875c9a MFH: typofix 2004-01-23 07:02:54 +00:00
foobar c49fdf4dd8 Nuke unused variable 2004-01-22 03:25:37 +00:00
foobar ed53d131ea MFH 2004-01-21 22:50:32 +00:00
SVN Migration 8bb1db38f8 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-01-21 22:48:29 +00:00
Ard Biesheuvel 29f088a033 Fixed bug #26968 (Segfault with Interbase module built as shared) 2004-01-21 10:12:17 +00:00
Marcus Boerger a081107225 Add these files to the actual package 2004-01-21 07:19:07 +00:00
Marcus Boerger d16b06c185 Make this thing actually work again
# look at changelog
# pdf shouldn't be a default extension in this script it's seldom available
2004-01-21 06:58:04 +00:00
foobar c1b09a29f2 MFH 2004-01-21 05:04:50 +00:00
foobar 7b25877fec MFH: - Fixed bug #26973 (*printf() + modifier broken) 2004-01-21 04:00:47 +00:00
foobar 27959e82ec MFH 2004-01-21 03:59:05 +00:00
foobar c74a480546 MFH 2004-01-21 03:49:26 +00:00
SVN Migration 935ed0d844 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-01-21 03:49:16 +00:00
Ilia Alshanetsky bfc284dfb5 MFH: Fixed bug #26974 (rename() doesn't check the destination file against
safe_mode/open_basedir).
2004-01-21 02:33:22 +00:00
Antony Dovgal 92deeac732 fix savelob() to make it possible to write data at the beginning of LOB 2004-01-20 11:37:17 +00:00
foobar 6e22b67233 MFH: Fixed bug #26969 (shared openssl build fails) 2004-01-20 01:11:40 +00:00
Marcus Boerger 31f10bc418 Correct license 2004-01-19 19:58:57 +00:00
Marcus Boerger 331b6605c3 Fix a memleak 2004-01-19 19:57:17 +00:00
foobar e902399d15 - Fixed bug #26381 (rand() without srand() doesn't work with certain php.ini)
# This was no prob in PHP5, some memory corruption / leaks, whatever fixed
# in ZE2 but not in ZE1?
2004-01-19 19:07:08 +00:00
Ilia Alshanetsky 90583839db Bug fixing news. 2004-01-19 18:42:07 +00:00
Ilia Alshanetsky bdfe271088 MFH: Fixed bug #26967 (make various file operations return FALSE on error). 2004-01-19 18:40:45 +00:00
foobar fe2eb8697f BFN 2004-01-19 17:45:26 +00:00
Moriyoshi Koizumi d8d8abeee8 - MFH(r-1.3): Turn off mbstring.func_overload as this test uses plain strlen()
for comparison.
2004-01-19 16:54:22 +00:00
Ilia Alshanetsky 5207463590 MFH: Added fgetcsv() tests. 2004-01-19 03:55:44 +00:00
SVN Migration fc6aba5bea This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-01-19 03:55:30 +00:00
foobar f22177b7e4 MFH: Moved php_srand() call into php_rand(). 2004-01-19 03:16:04 +00:00
foobar 633a7470d1 MFH: - Fixed bug #26949 (rand(min,max) always returns min when ZTS enabled) 2004-01-19 02:31:19 +00:00
Ilia Alshanetsky 17d0b30415 Corrections for various fgetcsv() issues. 2004-01-18 18:46:32 +00:00
foobar 12d27576f3 MFH: Fixed bug #26923 (ext/imap: pam and crypt libraries missing when build as shared) 2004-01-17 00:01:06 +00:00
foobar 0b74da4a4a MFH: - Fixed bug #26937 (Warning in xml.c) 2004-01-16 19:12:46 +00:00
Ilia Alshanetsky 09f6f3244b Added Antony Dovgal as OCI8 maintainer. 2004-01-16 16:46:59 +00:00
foobar 5f19e3c747 BFN 2004-01-16 11:27:00 +00:00
Ilia Alshanetsky 936b7e8e82 MFH: Fixed Bug #26927 (preg_quote() does not escape \0). 2004-01-16 02:31:26 +00:00
SVN Migration 41904eb4b2 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-01-16 02:29:51 +00:00
Marcus Boerger baa7c1746e Add missing fd creation 2004-01-15 21:28:37 +00:00
Antony Dovgal f9ee999b71 MFH: fix bug #26892 2004-01-15 15:14:41 +00:00
foobar 28686f683f Fix overflow 2004-01-15 06:09:43 +00:00
Ilia Alshanetsky fea2f6e689 MFH: Fixed bug #26909 (crash in imap_mime_header_decode() when no encoding is
used).
2004-01-15 00:36:09 +00:00
Wez Furlong cbc8c32567 Probable fix for:
Bug #25575 stream_set_blocking with STDIN doesnt block
2004-01-14 14:54:14 +00:00
Wez Furlong 70e26f8ebc Fixed bug #26772 (fgets returns NULL instead of FALSE). (Wez) 2004-01-14 14:31:27 +00:00
Ilia Alshanetsky a6dcd940b5 MFH: Fixed bug #26878 (problem with multiple references to the same variable
with different types).
2004-01-13 23:31:46 +00:00
SVN Migration a8202c83d3 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-01-13 23:11:32 +00:00
foobar a5952e9c8b BFN 2004-01-13 19:00:17 +00:00
foobar 4da78a716c MFH: - Fixed bug #26896 (ext/ftp does not work as shared extension) 2004-01-13 18:59:08 +00:00
Derick Rethans e41bc6906c - Fixed year in version notices 2004-01-13 09:13:44 +00:00
Ilia Alshanetsky 1f0fe33edb Back to dev. 2004-01-12 15:10:17 +00:00
Ilia Alshanetsky 422dfcaf3e Set release date. 2004-01-12 14:31:27 +00:00
Ilia Alshanetsky 0f7556a1b8 Go with 4.3.5RC1 2004-01-12 14:30:23 +00:00
Ilia Alshanetsky bea9ba8fc2 MFH: Fixed bug #26864 (pg_(update|delete) ignore PGSQL_DML_EXEC option). 2004-01-11 21:18:29 +00:00
foobar 3b61552cd7 MFH: test for bug #26869 2004-01-11 14:00:07 +00:00
SVN Migration 77e02d2e30 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-01-11 13:59:49 +00:00
Ilia Alshanetsky 9058adacc8 MFH: Fixed bug #26847 (memory leak in mail() when to/subject contain only
spaces).
2004-01-09 01:35:58 +00:00
foobar ab99e92450 MFH: Added missing constants (bug #26831) 2004-01-08 01:02:03 +00:00
foobar b539f500fc BFN 2004-01-07 23:51:10 +00:00
Ard Biesheuvel a85cfe5b14 MFH: Let DB handle NULL params, fixes bug #26777 2004-01-07 09:44:21 +00:00
Ilia Alshanetsky f7aef14323 MFH: 64 bit stuff. 2004-01-06 00:56:10 +00:00
Georg Richter 8ea0a2c1c8 s/2003/2004 :) 2004-01-05 14:42:26 +00:00
Ilia Alshanetsky 7f529a8361 Fixed compile warnings.
Fixed crash in crack_closedict();
Switched from zend_error() to php_error_docref();
2004-01-04 20:01:07 +00:00
Edin Kadribasic 9a0060e27c BFN 2004-01-03 23:33:01 +00:00
Edin Kadribasic 90f72e11bf More proper news format. 2004-01-03 21:45:47 +00:00
Edin Kadribasic c0d963299a MFH: cli overrides php.ini and switches output buffering off. 2004-01-03 21:36:18 +00:00
Ilia Alshanetsky cc6dd2f296 MFH: s/then/than/ 2004-01-03 00:50:01 +00:00
Ilia Alshanetsky 1fc017d8a3 MFH: Fixed bug #26752 (Silent unterminated loop when length parameter for
fgets(), fread() and fgetss() is 0).
2004-01-02 00:58:15 +00:00
Derick Rethans aa288c1f7a - MFH: Fixed bug #26751 (PHP can't find the MySQL socket on a case sensitive
file system).
2003-12-31 11:28:39 +00:00
Ilia Alshanetsky f899afbfca Boundry check. 2003-12-28 19:31:48 +00:00
Marcus Boerger f9279a6b81 Fixed Bug #25329 sqlite_create_function with method and reference to $this 2003-12-27 22:20:55 +00:00
Ilia Alshanetsky 3cee600ed8 GD news 2003-12-25 22:33:50 +00:00
Ilia Alshanetsky a0c6c4f59f MFH: Synchronized bundled GD library with GD 2.0.17 2003-12-25 22:33:03 +00:00
Ilia Alshanetsky f2307f1623 Bug fixing news. 2003-12-25 18:58:30 +00:00
Ilia Alshanetsky e03bd905ad MFH: Fixed Bug #26703 (Certain characters inside strings incorrectly
treated as keywords).
2003-12-25 18:57:30 +00:00
SVN Migration 03db21ee2c This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-12-25 18:57:27 +00:00
Ilia Alshanetsky 9235a5d001 MFH: Fixed bug #26707 (Incorrect error for disabled functions/classes).
# Direct MFH of the patch in PHP 5.0 cannot be used because that would
# require the change of API. So we'll need to make do with a one time
# (small) memory leak on startup when disable_functions and/or classes are
# used.
2003-12-24 16:43:23 +00:00
Ilia Alshanetsky 2a7a76c93e MFH: Make test work with PostgreSQL 7.4 2003-12-23 17:33:16 +00:00
Marcus Boerger 1fe64c5ffb Add inifile handler in windows build too. 2003-12-23 13:42:12 +00:00
Moriyoshi Koizumi eb74b414a8 Oops. 2003-12-23 11:06:42 +00:00
Moriyoshi Koizumi 0fa2ebc0f2 Fix fgetcsv()'s null line handling.
# Thanks Takeshi Nakamura for reporting this bug.
2003-12-23 11:02:26 +00:00
Ilia Alshanetsky 160852eaf0 Fixed memory leak. 2003-12-22 21:03:54 +00:00
Rob Richards 338a796166 define LIBXML_THREAD_ENABLED 2003-12-22 16:51:50 +00:00
Ilia Alshanetsky ba634aacd4 MFH: Define INADDR_NONE for systems that don't have it (apparently solaris) 2003-12-22 16:00:54 +00:00
Ilia Alshanetsky 437a1e90c9 MFH: Missing bit for bug #26625. 2003-12-22 15:56:52 +00:00
Wez Furlong c8dbe95e7a Fix Bug #25597 pfsockopen crashes when recycling a persistent list entry. 2003-12-20 20:24:36 +00:00
Antony Dovgal f8fa606849 add .cvsignore to oci8/tests 2003-12-19 17:02:03 +00:00
Antony Dovgal 60cd2d0604 add test 2003-12-19 17:01:24 +00:00
Pierre Joye 9349ad79ff - MFH 1.3b5 release tag 2003-12-19 13:55:45 +00:00
Ilia Alshanetsky 6aeafbd611 MFH: Check correction 2003-12-19 13:50:01 +00:00
Ilia Alshanetsky 4f3b9cd691 MFH: Fixed bug #26667 (Added safety checks to ip2long()). 2003-12-19 13:33:57 +00:00
Moriyoshi Koizumi 348078406d MFH(r-1.206): Fixed bug #26639 (mb_convert_variables() clutters variables beyond the references) 2003-12-18 09:52:51 +00:00
SVN Migration f9bc86556e This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-12-18 09:50:21 +00:00
foobar d7d8388543 wet 2003-12-17 21:10:23 +00:00
Marcus Boerger 7e950b6a31 MFH: Fix warning 2003-12-17 09:08:37 +00:00
Marcus Boerger 98dc115fab MFH: Fix warnings 2003-12-17 09:02:07 +00:00
Andrei Zmievski 1c9c0f592c Umm, let's not enable NO_RECURSE by default. The matches on some
patterns can be more than twice as slow as before.
# Maybe we should add a --disable-pcre-stack-recursion compile option
2003-12-16 22:14:55 +00:00
Andrei Zmievski bf93051fff Fix function name. 2003-12-16 21:55:22 +00:00
Andrei Zmievski fc3db427b2 - Upgraded library to version 4.5
- Define NO_RECURSE to avoid stack problems.
- Moved contents of RINIT hook to MINIT and removed RINIT.
- Removed a couple of extraneous files.
2003-12-16 21:52:14 +00:00
Marcus Boerger f3543b425f MFH: Fix winbuild 2003-12-16 21:41:57 +00:00
foobar 6741fc0883 MFH: fix compile warnings 2003-12-16 21:00:36 +00:00
Derick Rethans cf2b96f84b - MFH memleak fix from rev 1.50 2003-12-16 19:59:58 +00:00
Sara Golemon 49e7c1eb7a MFH: Fail loudly. This is too often reported as a "bug". 2003-12-16 19:45:35 +00:00
Ilia Alshanetsky 1018001888 ZTS fix. 2003-12-16 17:23:27 +00:00
Ilia Alshanetsky 4d2cdc8224 MFH: Fixed Bug #26625 (pg_convert sets NULL incorrectly for character data
types).
2003-12-16 01:00:45 +00:00
Ilia Alshanetsky 4ae82d2189 MFH: Fixed bug #26635 (fixed look up for fonts in the current directory
w/ZTS)
2003-12-15 20:34:57 +00:00
Andrei Zmievski 0e6a306e68 *** empty log message *** 2003-12-15 19:35:34 +00:00
Ilia Alshanetsky a4935ca741 Fixed bug #26634 & added test case. 2003-12-15 18:53:26 +00:00
foobar 162fb6f465 BFN 2003-12-15 01:18:46 +00:00
foobar f72080cb48 MFH: Fix from Michael Sisolak (destructors weren't always properly called) 2003-12-15 01:14:54 +00:00
Marcus Boerger e0eaa22d19 BFN 2003-12-14 22:20:55 +00:00
Marcus Boerger 046da9b906 MFH: Synch (as far as possible) and fix #26304 2003-12-14 22:20:05 +00:00
Christian Stocker 3d3d33c018 fix for bug #26595 "`XSLT_NAMESPACE' undeclared" 2003-12-13 11:36:14 +00:00
Ilia Alshanetsky 76a19ecdf8 More fgetcsv() fixes. 2003-12-13 01:44:24 +00:00
Ilia Alshanetsky 09d6b582ae For BC reasons we need to do ltrim() on csv entries. 2003-12-12 19:25:33 +00:00
Ilia Alshanetsky e61a8d577c MFH: Fixed bug #26604 (Apache2 SAPIs implicitly disable Keep-Alive). (Ilia) 2003-12-12 17:19:18 +00:00
Uwe Schindler 8c0e3568a9 remove revision tag from module version entry 2003-12-12 16:21:44 +00:00
foobar cdbfc6a8fb MFH: Fixed bug #26461 (-lssl missing from LIBS) 2003-12-12 05:20:24 +00:00
foobar 5a7f4ada80 generated, ignored files should not be in CVS.. 2003-12-12 05:05:34 +00:00
Greg Beaver bf7636d282 MFH 2003-12-12 00:04:17 +00:00
Greg Beaver 9973b97212 fix error message, it shouldn't attempt to display a version if none is installed 2003-12-11 23:55:03 +00:00
Greg Beaver e5b8ff2641 remove obsolete parameters to constructor 2003-12-11 23:54:39 +00:00
Greg Beaver 6d227b5775 MFH 2003-12-11 23:46:55 +00:00
foobar d5a0cf3575 reword 2003-12-11 23:14:55 +00:00
Andrei Zmievski 30f6668c7d Implement getopt2() method and keep BC for getopt(). 2003-12-11 19:28:25 +00:00
Greg Beaver 5f32f2e6a1 MFH fix #391, PHP 5 reference fix 2003-12-11 16:08:19 +00:00
Edin Kadribasic aade4a6069 Mention new pgsql libs 2003-12-11 12:58:17 +00:00
Edin Kadribasic 45b85c504b Standard header file locations 2003-12-11 10:06:39 +00:00
Edin Kadribasic 2d5754d69f Nuke unused local vars 2003-12-11 10:06:12 +00:00
Moriyoshi Koizumi 10b70c23ae This file is automagically generated in the custom build process on win32. 2003-12-11 08:40:30 +00:00
Moriyoshi Koizumi 1ceef81ac8 Eliminate compiler warnings. 2003-12-10 17:44:12 +00:00
Moriyoshi Koizumi f26881fdc0 Eliminate compiler warnings. 2003-12-10 17:36:05 +00:00
Moriyoshi Koizumi 2f7e889009 DOS line endings... 2003-12-10 17:26:24 +00:00
Moriyoshi Koizumi 6119dad1ec Fix win32 build. 2003-12-10 17:25:40 +00:00
Moriyoshi Koizumi a450efff4e MFH(1.4): Remove leftover 2003-12-10 17:10:05 +00:00
foobar ceda30930a MFH: Fixed bug #26565 (strtotime("this month") resolving to the wrong month) 2003-12-10 14:09:44 +00:00
Pierre Joye 1729d3ca75 - Fix pecl installer
package::info() _must_ be called with PECL in mind
  There should be other issues, more later.
2003-12-09 20:51:49 +00:00
foobar 4115b9aa6c MFH: Fixed bug #26564 (ncurses5 has headers in PREFIX/include/ncurses/) 2003-12-09 20:33:22 +00:00
Ard Biesheuvel 1303e186e5 Fix build 2003-12-08 10:01:11 +00:00
Ard Biesheuvel 7ba00c2563 Corrected ibase_close() fix 2003-12-08 09:46:07 +00:00
Sergey Kartashoff 112bc3df71 - A bug in Udm_Hash32 function was fixed. 2003-12-08 08:24:59 +00:00
Moriyoshi Koizumi 318fc44c8a MFH(r-1.45): Avoid using non-portable test syntax. 2003-12-08 07:18:46 +00:00
Moriyoshi Koizumi 6771367c95 Those casts are really necessary.
# Heads up; please be careful using is*() functions. The function of that kind
# takes an integer value as its argument and expects the value to be range of
# 0-255 as a parameter. So if you pass a plain char value to it, the char
# value will be converted implicitly to an integer value of the range
# -128 ~ 127, which will end up with an unwanted result, most likely with
# non-ASCII characters. This has been considered to be a big flaw in the
# specification of the ctype functions. However, the malfunction is not
# reproducible with the recent versions of the GNU C library because it is
# made to deal with such exceptional cases, while Microsoft's C library
# and several standard C libraries of BSD origin aren't.
#
# See also bug #10896, #12127, #18318, and #21689.
#
2003-12-07 21:55:16 +00:00
foobar 7999d1a384 BFN 2003-12-07 17:02:26 +00:00
foobar 82321ff0d4 MFH: Fix for bug #26548: Malformed HTTP dates in headers 2003-12-07 16:53:30 +00:00
Stanislav Malyshev da74ef221f fix potential buffer overrun 2003-12-07 12:57:26 +00:00
Greg Beaver 2c28506fcf MFH 2003-12-07 00:31:50 +00:00
Greg Beaver 592380ac7c MFH last 2 commits 2003-12-07 00:11:45 +00:00
Greg Beaver a4c86a50bb MFH 2003-12-06 23:52:44 +00:00
Greg Beaver d28971a2b6 MFH 2003-12-06 23:44:23 +00:00
Greg Beaver 9b225deeb2 MFH 2003-12-06 22:19:53 +00:00
Greg Beaver 3f5a393d9c MFH 2003-12-06 22:14:49 +00:00
Greg Beaver 2361a14e0f MFH 2003-12-06 22:08:58 +00:00
Ilia Alshanetsky 5d7f648f83 Fixed memory corruption occuring in fgetcsv() on certain files. 2003-12-06 22:07:00 +00:00
Greg Beaver f766cea8af MFH 2003-12-06 21:54:06 +00:00
Greg Beaver 6cdf895b62 getting ready for both packages to be released 2003-12-06 21:47:54 +00:00
Marcus Boerger 60661a012b Update error/warning messages 2003-12-06 21:28:07 +00:00
Marcus Boerger b93038396e MFH: Do not dynamically load the extension in skipif 2003-12-06 20:46:48 +00:00
foobar 12defebcf0 No maintainer for oci8 / oracle 2003-12-06 16:28:19 +00:00
SVN Migration 8e0820820a This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-12-06 06:06:51 +00:00
Andrei Zmievski 087326527e Remove erroneous array_shift(). The args passed to Getopt are supposed
to be without leading command name anyway. This has been the rule since
the first release.
2003-12-05 21:57:01 +00:00
Rob Richards 5061d1ca32 Fix bug #26531: get_elements_by_tag_name() wildcard fails 2003-12-05 19:21:05 +00:00
Moriyoshi Koizumi 7f504d30ea MFH 2003-12-04 22:53:38 +00:00
Moriyoshi Koizumi 0479203e55 MFH: it'd be a bad idea to make subpackages dependent on the php build system. 2003-12-04 22:50:54 +00:00
foobar ee840f1ff6 MFH: Only add 'install-modules' into install targets when there are such
modules to install
2003-12-04 15:59:04 +00:00
foobar 580d5e80b5 MFH: Fix for "make install" with empty INSTALL_IT 2003-12-04 13:42:25 +00:00
foobar 8c4361d2f1 MFH: Fix compile with c++ (bug #26519) 2003-12-04 12:45:32 +00:00
Uwe Schindler c6e131f9a4 Fix bug #25916: get_browser() -> PHP Fatal error: Nesting level too deep - recursive dependency? 2003-12-04 08:56:07 +00:00
foobar 83bec74173 BFN 2003-12-04 06:37:14 +00:00
Ilia Alshanetsky a1f00c0bae MFH: Typo fix. 2003-12-04 00:14:50 +00:00
Ilia Alshanetsky ed54147a4b MFH: Test case for bug #24773. 2003-12-03 23:00:36 +00:00
Ilia Alshanetsky e4b49f2de7 MFH: Remove unnecessary casts. 2003-12-03 22:51:54 +00:00
Moriyoshi Koizumi b8cd29330d MFH(r-1.71): Possible fix for bug #26391 (parse_url() destroys strings
that contain a character in range of 0x80-0xff)
# I couldn't reproduce it with Panther though.
2003-12-03 20:59:12 +00:00
Moriyoshi Koizumi a4d189ed94 BFN 2003-12-03 19:33:25 +00:00
Rob Richards 53d0e56f42 require libxml 2.5.11 for threaded error handling
certain cases crash unlocking libxml mutex with earlier versions
2003-12-03 12:30:02 +00:00
Frank M. Kromann 37871089e1 set freed pointer to null to avoid reuse 2003-12-02 18:37:50 +00:00
Rob Richards 396074e1cc Fix bug 26443: No errror reporting for Errors in the domxml extension 2003-12-02 15:09:31 +00:00
Ilia Alshanetsky da55f714a9 MFH: Optimize substr_replace 2003-12-01 23:21:25 +00:00
foobar 8d025a62fb MFH: ws fixes 2003-12-01 16:40:59 +00:00
foobar 74540e51a7 MFH: - Fixed bug #26488 (Missing declaration of CRTSCTS in ext/dio/dio.c) 2003-12-01 16:38:23 +00:00
Rob Richards 1592b88645 Fix bug #26443: No errror reporting for Errors in the domxml extension 2003-12-01 16:19:15 +00:00
foobar 9dfae5b28d MFH 2003-12-01 16:12:42 +00:00
foobar bdf9ed31c0 MFH 2003-12-01 14:01:49 +00:00
Greg Beaver cd5ef04293 MFH: bugfixes 2003-12-01 00:21:21 +00:00
foobar 67674a77c7 BFN 2003-11-30 09:39:48 +00:00
Wez Furlong 8633a4fb0e Fix:
#26467 flock does not force wouldblock argument to be passed by reference
Thanks to Manuel Lemos
2003-11-29 20:48:49 +00:00
Ilia Alshanetsky 7efed1c11d Bug fixing news. 2003-11-29 19:06:45 +00:00
Ilia Alshanetsky e0f235787c MFH: Fixed bug #26463 (Incorrect handling of semicolons after heredoc) 2003-11-29 19:05:59 +00:00
SVN Migration ac05068dd2 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-11-29 19:05:15 +00:00
Ilia Alshanetsky ee1077aad0 MFH: Fixed a memory leak when tokenizing scripts with heredoc. 2003-11-29 18:22:46 +00:00
Greg Beaver 6c22098068 add dependency on xml extension - we need it for every installation/package function 2003-11-29 17:54:39 +00:00
Greg Beaver de3937a88f MFH Bug #324 2003-11-29 16:39:31 +00:00
foobar 5f4df19833 MFH: - fixed Bug #26462 (phpize + ext/bcmath -> compile error) 2003-11-29 13:35:33 +00:00
foobar cfeec1e72b BFN 2003-11-29 12:10:14 +00:00
foobar c77e4951c5 - Fixed bug #26447 (--with-openssl=shared causes compile errors).NEWS 2003-11-29 12:08:03 +00:00
Wez Furlong 5f0729c281 fix zts build... 2003-11-29 12:02:40 +00:00
foobar 1525e15d4f MFH 2003-11-29 07:16:16 +00:00
Ilia Alshanetsky 4c86e3b2bf Bug fixing news & corrections. 2003-11-29 04:50:03 +00:00
Ilia Alshanetsky 680dd335bc Added missing skip conditon. 2003-11-29 04:47:40 +00:00
Ilia Alshanetsky 575bd9e537 MFH: Fixed bug #26458 (var_dump(), var_export(), debug_zval_dump() not
binary safe for array keys).
2003-11-29 04:43:11 +00:00
SVN Migration f8fed9d571 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-11-29 04:43:07 +00:00
Sara Golemon 6aa5175259 MFH 2003-11-29 03:41:09 +00:00
foobar fe4e7d7b43 MFH 2003-11-29 02:29:05 +00:00
SVN Migration 188d80b7cf This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-11-29 02:28:50 +00:00
Christian Stocker 04a57e2f54 add xml files for bug26384.phpt 2003-11-29 00:53:34 +00:00
Christian Stocker 68d477c66a enhanced bug-26384-fix. It now only does an DocCopy, if xsl:key was
found in xslt-document by default.
2003-11-29 00:43:38 +00:00
Wez Furlong 5fd7263f01 Probable fix for #25575; STDIN/STDOUT/STDERR streams not registered
as network sockets when PHP run from x?inetd.
2003-11-28 22:48:31 +00:00
Wez Furlong f93c6a6a13 Fix for bug #25939; feof not working correctly for sockets.
Possibly also fixes #23220; warnings issued by fgets on ssl sockets.
2003-11-28 22:11:34 +00:00
Greg Beaver c878f2708e odd merge conflict fixed 2003-11-28 20:07:14 +00:00
Ilia Alshanetsky c16bbec898 Fixed bug #26440 (MFH missing context options). 2003-11-28 18:51:14 +00:00
Ilia Alshanetsky 91f0d18894 MFH: More memory leak fixes for stream contexts. 2003-11-28 18:33:18 +00:00
Ilia Alshanetsky ead22712c9 Bug fixing news. 2003-11-28 18:15:23 +00:00
Rob Richards 405fcde229 Fix for bug #26446: domxml_open_file() returns an empty error-Array 2003-11-28 17:39:25 +00:00
Wez Furlong e1823b67c2 MFH: Fix for Bug #25664; calling ITypeInfo::Invoke with bogus params. 2003-11-28 17:14:12 +00:00
Ilia Alshanetsky 37f824c02a MFH: Fixed a memory leak. 2003-11-28 00:00:34 +00:00
foobar b3f36ce142 BFN 2003-11-27 23:18:13 +00:00
foobar ed1af8a375 MFH: - Fixed bug #26438 (error in thttpd SAPI installation) 2003-11-27 23:04:49 +00:00
Ilia Alshanetsky 19d34e9304 MFH: Removed dead code.
# This fixes memory corruption reported by valgrind.
2003-11-27 01:08:51 +00:00
Greg Beaver 6f718d420d MFH Bug #293 2003-11-26 15:11:19 +00:00
Ard Biesheuvel a844072181 Fix crash bug reported by jani/ilia 2003-11-26 14:04:56 +00:00
foobar 3a09eb44cf MFH: On error do not leave content_type_dup unitialized. 2003-11-26 00:33:48 +00:00
Ilia Alshanetsky 67ba3f4c30 MFH: Fixed bug #25963 (PostgreSQL error message include \n characters). 2003-11-25 22:23:54 +00:00
Ilia Alshanetsky bbbf8effb4 Replace fopen() inside domxml_xslt_process() with streams code to prevent
a possible crash and enforce safe_mode & open_basedir restrictions.

Revert workaround for bug #26384, which is due to a bug in libxslt.
Christian will commit a better workaround shortly.
2003-11-25 16:05:18 +00:00
foobar 16f65cff5b MFH: for regression..this works in PHP 4 2003-11-25 09:22:09 +00:00
SVN Migration d20c4bc95a This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-11-25 09:20:57 +00:00
foobar 34c2d8f7a2 MFH: - Fixed bug #26376 (typo in ext/odbc/config.m4: DBMaker test fails) 2003-11-25 08:08:30 +00:00
Ilia Alshanetsky bbd07ddfff Fixed bug #26384 (crash inside domxslt->process() due to a double free). 2003-11-25 02:19:47 +00:00
foobar 3f5a2f35e6 MFH: Fix build for other archs than x86. 2003-11-24 16:10:17 +00:00
Ilia Alshanetsky 5354a79497 MFH: Fixed bug #26355 (flock() doesn't initialize the wouldblock argument) 2003-11-24 01:43:59 +00:00
Rob Richards 27298684b2 fix default recovery mode 2003-11-22 14:43:08 +00:00
Moriyoshi Koizumi d038c0e046 BFN 2003-11-22 13:40:39 +00:00
Moriyoshi Koizumi d95ee6d92a MFH(r-1.98): Fixed bug #26194 (iconv() not properly defined with libiconv). 2003-11-22 13:38:46 +00:00
Rasmus Lerdorf d3e82a6876 Compile fix 2003-11-22 00:55:29 +00:00
Hartmut Holzgraefe a8e94dd8c3 removed ext/standard/tests/time/bug26320.phpt 2003-11-19 16:44:50 +00:00
Hartmut Holzgraefe c3b2390ea8 MFH 2003-11-19 16:40:01 +00:00
SVN Migration 90957978ab This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-11-19 16:37:51 +00:00
Hartmut Holzgraefe 06659b28ba MFH 2003-11-19 16:22:10 +00:00
SVN Migration 894f2c9be2 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-11-19 16:19:29 +00:00
Ilia Alshanetsky c85bca1758 MFH: Fixed bug #26309 (Fixed argument parsing for imageftbbox()). 2003-11-19 15:50:05 +00:00
Ilia Alshanetsky 12b32d871f MFH: Fixed bug #26285 (escapeshellarg() uses wrong quotes on windows). 2003-11-19 15:34:36 +00:00
foobar 02ca709afd MFH: - Fixed bug #26267 (gmp_random() leaks memory and does not produce random numbers) 2003-11-19 04:44:24 +00:00
foobar 4ffec49140 Fix build 2003-11-19 00:10:03 +00:00
foobar 460d1dfaeb MFH: fixed parameters for gmp_random() 2003-11-18 10:28:34 +00:00
Ilia Alshanetsky 5e6d8ed2d1 MFH: Fixed Bug #25694 (round() and number_format() give inconsistent
results).
2003-11-18 02:50:50 +00:00
SVN Migration 79c6c1efbe This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-11-18 02:50:42 +00:00
Frank M. Kromann ffa0515b59 Fix for bug #25817
Check for a return value from a stored procedure right after fetching rows
2003-11-17 20:53:28 +00:00
foobar 69796efc37 MFH: - Fixed bug #26253 (ext/tokenizer: build as shared extension fails) 2003-11-17 19:32:05 +00:00
Greg Beaver d6541cb740 MFH 2003-11-17 06:07:44 +00:00
Greg Beaver f0b9f4beca fix bug #248 MFH 2003-11-17 05:57:40 +00:00
Greg Beaver 7765e06ef7 fix bug #249 MFH 2003-11-17 05:47:51 +00:00
Frank M. Kromann 6e105b5751 MFH Fix win32 compilation. 2003-11-15 05:44:02 +00:00
Ard Biesheuvel 52e0410d8e Fix the fix [ibase_trans()] 2003-11-14 10:38:41 +00:00
Moriyoshi Koizumi c30dfcbd20 MFH(r-1.10): ctime (#10) may differ on several filesystems. 2003-11-14 09:01:47 +00:00
foobar 176f804d75 MFH 2003-11-14 03:21:15 +00:00
Ilia Alshanetsky 7d60c49e0e MFH: Fixed bug #26235 (yp_first/yp_next do not specify correct key length). 2003-11-14 00:32:40 +00:00
Marcus Boerger c4871a7329 MFH: Proto fixes (Friedhelm Betz <holliwell|gmx.net>) 2003-11-13 19:09:24 +00:00
foobar 0d260304dc MFH 2003-11-13 14:18:02 +00:00
Marcus Boerger 61a601cb12 BFN 2003-11-13 09:00:48 +00:00
Marcus Boerger 26d3d83a4d MFH Bugfix #25794: Cannot open existing hash db3 file with write 2003-11-13 08:59:17 +00:00
Marcus Boerger 6d124bfc5e BFN 2003-11-12 22:58:00 +00:00
Marcus Boerger 10a18840da MFH Bugfix #26216: ("getimagesize(): stream does not support seeking" when
using remote files)
2003-11-12 22:56:09 +00:00
Stefan Esser e58611c0c7 Fix odd increments to repair the boundary checks. 2003-11-12 22:34:34 +00:00
Sergey Kartashoff d71244b42b - A WORDINFO calculation in mnogosearch extension was fixed 2003-11-12 07:52:57 +00:00
Ilia Alshanetsky c26e78f88a Fixed bug #26201 (crash in ibase_trans() on invalid link handle). 2003-11-12 03:05:24 +00:00
Ilia Alshanetsky b5fb634af4 MFH: Fixed bug #26198 (strtotime() handling of M/F Y date format). 2003-11-12 02:58:38 +00:00
SVN Migration 5bc3f3656a This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-11-12 02:55:04 +00:00
Rui Hirokawa 13a5ff7119 fixed compilation warning. (patched by Joe Orton) 2003-11-11 22:18:24 +00:00
Ilia Alshanetsky 8d9bd14c18 MFH: Compiler warning fix (patch by Joe Orton). 2003-11-11 20:04:19 +00:00
Moriyoshi Koizumi c47c73519e MFH(r-1.204): Compiler warning fix (patch by Joe Orton). 2003-11-11 19:57:48 +00:00
Ilia Alshanetsky 174f14c76b Fixed bug #26168 (shtool availability check in phpize). 2003-11-10 04:33:57 +00:00
Ilia Alshanetsky bafccc7dbf MFH: Fixed bug #26176 (Fixed handling of numeric keys in INI files). 2003-11-10 04:12:50 +00:00
Derick Rethans 7b1f6c319e - Expose the base64 functions to external extensions on windows. 2003-11-09 20:30:15 +00:00
Sergey Kartashoff a5a3d7b657 - Mnogosearch extension wsa updated to include mnogosearch-3.2.16 features. 2003-11-08 14:39:15 +00:00
Marcus Boerger 10b71e08e1 MFH (#26056: Warnings while compiling exif.c) 2003-11-08 14:16:14 +00:00
Moriyoshi Koizumi 869f61fcf8 touch 2003-11-08 04:45:18 +00:00
Wez Furlong fa90d82b27 Fix shared/pecl build for extensions that rely on mbstring... 2003-11-08 01:09:11 +00:00
Frank M. Kromann c3fd539306 Reverting. New features are not supposed to go into the 4.3 branch 2003-11-08 00:33:58 +00:00
Ilia Alshanetsky eae45bec5c Fixed bug #26003 (Make fgetcsv() binary safe). (Ilia) 2003-11-07 21:40:47 +00:00
Ilia Alshanetsky 812f7748a6 Bug fixing news. 2003-11-06 20:34:57 +00:00
Frank M. Kromann 58a2f7d6a9 Getting rid of c++ style comments 2003-11-06 16:49:53 +00:00
Rui Hirokawa 2dabb19a5a bug fixed: name parameter of multipart form was not converted into internal encoding when mbstring.encoding_translation is on. 2003-11-06 15:41:37 +00:00
Sascha Schumann e08feebfd5 WS 2003-11-06 14:31:14 +00:00
Sascha Schumann aa359d95e3 Fix a format string
Nuke a sprintf (slooow)

And embed the charset as part of the hashed details (persistent conn key),
because the function otherwise happily returns incompatible connections.
(e.g. US7ASCII vs. UTF8; the client-side charset is not alterable once a
 connection has been established.)
2003-11-06 14:27:34 +00:00
Frank M. Kromann 02b56d1709 Adding new features from ming 0.3a. 2003-11-06 07:29:02 +00:00
Uwe Schindler 202d0cb224 remove unix crap 2003-11-05 08:32:34 +00:00
Sascha Schumann 7aa8ca5e6f Forgot to add that.. 2003-11-05 08:05:31 +00:00
Moriyoshi Koizumi 95e990757d BFN 2003-11-05 04:32:15 +00:00
Moriyoshi Koizumi 9e1dd60032 Fixed bug #26128 (mbstring prints out wrong information on phpinfo()) 2003-11-05 04:28:00 +00:00
Moriyoshi Koizumi e2cce3325b *** empty log message *** 2003-11-05 04:24:54 +00:00
Ilia Alshanetsky 40ffe5ed82 MFH: Fixed bug #26113 (remove leftover local file when ftp_get/ftp_nb_get
fails).
2003-11-04 20:56:56 +00:00
Ilia Alshanetsky 5958582185 Bug fixing news. 2003-11-04 20:40:31 +00:00
foobar b564d1f137 BFN 2003-11-04 13:23:44 +00:00
Uwe Schindler b828a3c43c SunONE servers 2003-11-04 09:02:01 +00:00
foobar bd5b1ff74f MFH: - limit writing of field data to field len + 1
This fixed many memory overrun errors which appeared
       in several scripts when writing a record.

by: Uwe Steinmann <steinm@php.net>
2003-11-04 06:09:19 +00:00
foobar e246ca1ef6 MFH: Possible fix for bug #26103 2003-11-04 05:15:55 +00:00
SVN Migration b6752a1393 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-11-04 05:15:20 +00:00
Ilia Alshanetsky 00203d2968 MFH: Fixed bug #26097 (gdImageColorClosestAlpha() returns incorrect
results).
2003-11-04 01:56:07 +00:00
Ilia Alshanetsky 038e99660f Bug fixing news 2003-11-04 01:40:22 +00:00
Ilia Alshanetsky ed5212ca70 MFH: Fixed bug #25581 (getimagesize () return incorrect values on bitmap
(os2) files).
2003-11-04 01:38:33 +00:00
Ilia Alshanetsky 7dc3d8bd0e MFH: Fixed bug #26042 (memory leak if mcrypt_generic_deinit() is not called
after every mcrypt_generic_init() call).
2003-11-04 01:32:40 +00:00
foobar 701b075782 cosmetics 2003-11-03 23:16:28 +00:00
Edin Kadribasic 0fff37b01a Fix tsrm build 2003-11-02 23:14:18 +00:00
Ilia Alshanetsky 3af4920403 back to dev. 2003-11-02 23:12:02 +00:00
Ilia Alshanetsky d6bb1fd35a Go with 4.3.4 2003-11-02 22:15:05 +00:00
Ilia Alshanetsky 94f7723659 Prepare NEWS file for 4.3.4 release. 2003-11-02 21:56:26 +00:00
Uwe Schindler 571ca7f26e this is not needed 2003-11-01 23:56:58 +00:00
Sascha Schumann 3d08aea7da not really adequate here 2003-11-01 22:34:02 +00:00
Uwe Schindler 4c9381c538 news update 2003-11-01 12:50:48 +00:00
Greg Beaver bc087095be ack 2003-11-01 05:18:55 +00:00
Greg Beaver 61e6878898 might as well, someone will try it someday 2003-11-01 05:17:40 +00:00
Greg Beaver 43209b4bf6 rework some odd code 2003-11-01 05:16:04 +00:00
Greg Beaver ca763cac46 PATH_SEPARATOR is very handy 2003-11-01 05:14:11 +00:00
Greg Beaver 43cf3d6f66 MFH all fixes found by unit tests 2003-11-01 05:07:55 +00:00
Uwe Schindler 005dfa3c04 MFH 2003-10-31 17:32:04 +00:00
Uwe Schindler 112c1def73 Send correct default content type from php.ini not static text/html (important for other charsets than iso-8859-1) 2003-10-31 12:17:43 +00:00
Greg Beaver 9c1611188c MFH #171 2003-10-31 04:55:00 +00:00
foobar 1406239f9a Fix "bug" #26039 2003-10-31 01:28:11 +00:00
Uwe Schindler 0958e5a5cb Fix ZTS build #2 2003-10-30 01:05:25 +00:00
Moriyoshi Koizumi ac0a394ffa A bit pickier about platform. 2003-10-29 21:58:33 +00:00
Moriyoshi Koizumi d80b742e44 BFN 2003-10-29 21:56:16 +00:00
Moriyoshi Koizumi 227088c36b MFH(r-1.131): This check's always necessary. 2003-10-29 21:51:22 +00:00
Moriyoshi Koizumi 09529af3b0 A possible fix for bug #26026.
# Actually a revisit of the patch on 1.112, mysteriously backed out on 1.119.
2003-10-29 18:46:40 +00:00
Frank M. Kromann e8a8dac741 Adding missing TSRMLS_CC to fix zts build 2003-10-29 17:37:10 +00:00
Ilia Alshanetsky 0bf7c7781c Back to dev. 2003-10-29 14:03:29 +00:00
Ilia Alshanetsky f03caa7b35 Go with RC3 release. 2003-10-29 13:18:12 +00:00
Frank M. Kromann 84eb811be9 Fix typo in parameter 2003-10-29 05:34:21 +00:00
foobar 86da4546de MFH 2003-10-28 15:24:16 +00:00
Moriyoshi Koizumi 9006d8e97b Remove test because the problem won't be fixed for 4.x releases. 2003-10-27 18:14:04 +00:00
Moriyoshi Koizumi e189a15dbf Fix VPATH build (patch by Joe Orton <jorton at redhat dot com>) 2003-10-27 17:50:07 +00:00
Moriyoshi Koizumi 88ccac85f3 No need to have ze2 specific tests in this branch. 2003-10-26 16:27:40 +00:00
Moriyoshi Koizumi f22b3a19cf Prevent leaks in the overload extension that occur in some special cases. 2003-10-26 16:10:07 +00:00
Rui Hirokawa 78f795af80 revert my previous patch. 2003-10-26 07:47:42 +00:00
Moriyoshi Koizumi 4b18e8086a Remove just unnecessary leftovers 2003-10-26 03:42:27 +00:00
Moriyoshi Koizumi 73b34fff94 Backport some patch already in HEAD to assure backwards compatibility 2003-10-26 03:41:19 +00:00
Rui Hirokawa dc04255655 fixed windows build. 2003-10-25 12:41:54 +00:00
Rui Hirokawa c254e0f3ee mbfilter is replaced with libmbfl to maintain the licence compatibility. mbregex.[ch] is moved to mbregex/ for the same reason. 2003-10-25 11:58:46 +00:00
Rui Hirokawa dca5128c58 name/value in multipart/form-date will be converted into internal encoding when mbstring.encoding_translation is On. 2003-10-25 10:30:51 +00:00
Moriyoshi Koizumi 64ee4a850e Add test case for bug #25831 2003-10-25 04:43:47 +00:00
foobar 8ff5296643 hrm 2003-10-24 22:44:41 +00:00
Ilia Alshanetsky 9a24af562c MFH: Fixed bug #25955 (Compile failure on MacOSX 10.3 (Panther)). 2003-10-24 17:51:03 +00:00
Greg Beaver e943420bbb MFH 2003-10-24 05:35:42 +00:00
Greg Beaver 4608fd6e3f MFH #25174 2003-10-24 05:34:16 +00:00
Ilia Alshanetsky 370a9e6266 News & test regarding bug #25922 2003-10-22 23:48:48 +00:00
SVN Migration 59835d886b This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-10-22 23:42:56 +00:00
Moriyoshi Koizumi 17a411d422 typo 2003-10-21 02:22:55 +00:00
Moriyoshi Koizumi 393dfba684 Add regression test for bug #25900 2003-10-21 02:21:29 +00:00
Ilia Alshanetsky 6d369a51c8 Back to dev. 2003-10-20 16:58:56 +00:00
Moriyoshi Koizumi 9decf616c9 MFH(r-1.4): Fix typo 2003-10-20 16:10:00 +00:00
Ilia Alshanetsky f4d96cee48 RC2 is a go. 2003-10-20 16:08:17 +00:00
Tomas V.V.Cox afd5493707 MFH for 4.3.4RC2 2003-10-20 15:51:46 +00:00
Ilia Alshanetsky 7df5e203c6 Bug fixing news. 2003-10-20 15:45:56 +00:00
Rob Richards 36478058f4 Fix bug #25900 (document->get_elements_by_tag_name with default xmlns) 2003-10-20 15:43:02 +00:00
Moriyoshi Koizumi fe871be5ca MFH(r-1.108): Fix compiler warnings 2003-10-20 15:42:10 +00:00
Ilia Alshanetsky 25679a60c7 MFH: Fixed bug #25918 (Possible crash in mime_content_type()). 2003-10-20 14:37:02 +00:00
Ilia Alshanetsky afd9e80cb1 MFH: Fixed bug #25923 (mail() modifies the to & subject arguments). 2003-10-20 14:22:10 +00:00
Ilia Alshanetsky 2361e1e342 MFH: Fixed bug #25895 (Incorrect detection of safe_mode limited ini options) 2003-10-20 01:59:48 +00:00
Wez Furlong e41125d052 chech -> check 2003-10-18 09:44:12 +00:00
Uwe Schindler 5be79b203b new SunONE server 2003-10-17 21:57:45 +00:00
Rob Richards 9c4b602ee2 Fix bug #25888 (Crash of php.exe when xpath_eval of a namespace)
memleak fix in domxml_node_name
keep blanks loading document fix
2003-10-17 15:56:06 +00:00
Sascha Schumann 27879d0f0d Fix comment 2003-10-17 11:09:49 +00:00
Ilia Alshanetsky 800b1765ae MFH: Fixed formatting issues (patch by: Joe Orton) 2003-10-17 02:21:37 +00:00
foobar 0e93bfdbc3 - Fixed the real reason for build problems: dos eols 2003-10-16 14:24:59 +00:00
foobar 7b7543afad - Fixed ZTS build (Nuked extra TSRMLS_FETCH) 2003-10-16 09:08:42 +00:00
foobar 4bd822a180 - config.w32.h is in main/ not ext/standard.. 2003-10-16 04:50:03 +00:00
Ilia Alshanetsky 35e0567b62 MFH: Do not strip trailing spaces. 2003-10-16 04:24:13 +00:00
Ilia Alshanetsky 4191d2bde1 MFH: Fixed bug #25777 (Do not rtrim() of text fields fetched from mssql). 2003-10-15 03:32:18 +00:00
Wez Furlong ef14bdb691 Don't forget to check for tzset... 2003-10-15 00:19:30 +00:00
Wez Furlong 69cfb62619 Fix bug #25825. tzset() was not called when resetting the TZ env var.
In addition, fix a slight error (made by sniper!) which would trigger
tzset() to be called for any env var beginning with TZ, and not just
TZ itself.
2003-10-15 00:14:37 +00:00
Sascha Schumann adfb56c304 Embed date of last modification 2003-10-14 08:11:18 +00:00
Ilia Alshanetsky f335d5447e MFH: Fixed bug #25836 (last key of multi-dimensional array passed via GPC
not being escaped when magic_quotes_gpc is on).
2003-10-14 03:48:09 +00:00
Wez Furlong ef89c82c02 Unintialized variable fix from Joe Orton. 2003-10-13 11:47:05 +00:00
Wez Furlong 4c28ca442f Fix uninitialized value.
Patch from Joe Orton.
2003-10-13 11:42:22 +00:00
Derick Rethans 3a63f098bd - Email address change 2003-10-13 09:30:53 +00:00
Ilia Alshanetsky c0ddfe89e2 MFH: Fixed bug #25800 (parse_url() could not parse urls with empty port). 2003-10-13 04:28:34 +00:00
Ilia Alshanetsky da62e960e2 MFH: Remove sendmail patch check. 2003-10-13 04:15:25 +00:00
foobar d0d3b02de7 BFN 2003-10-12 23:49:34 +00:00
Vlad Krupin 2ce3e8cdec MFH fix for 25558 in case there is ever another 4.3 release. 2003-10-12 01:09:28 +00:00
Ilia Alshanetsky 2a1bfae434 Fixed bug #25814 (Make flock() return correct value when 3rd argument is
used).

# This bug is 4.3.X specific, no need to MFB into 5.X tree.
2003-10-10 01:38:02 +00:00
Ilia Alshanetsky ac534dbf37 MFH: Fixed bug #25746 (Do not bail out when unable to chdir original dir on
systems with broken getcwd()).
2003-10-09 02:59:03 +00:00
Wez Furlong 2aeb246874 Don't forget these EOF flags either... 2003-10-08 11:22:47 +00:00
foobar 18a2f7bab4 - Reverted the 'fix' for bug #25494
# Can we now get peace on internals@ about this stupid issue?
2003-10-08 11:16:22 +00:00
Wez Furlong 8b2def80d0 Backport from HEAD; set EOF marker after each read attempt to avoid it
being stuck in the on position.
Partial "fix" for #25649.
2003-10-08 10:58:28 +00:00
foobar f0ae93e466 - Fixed bug #25780 (MFH: ext/session: invalid session.cookie_lifetime causes crash in win32). 2003-10-08 10:25:39 +00:00
Moriyoshi Koizumi 21616c7854 MFH(r-1.174): Better fix for bug #25758 2003-10-08 01:52:07 +00:00
Ilia Alshanetsky 116956cc64 MFH: Fixed bug #25758 (var_export does not escape ' & \ inside array keys) 2003-10-08 01:17:12 +00:00
SVN Migration 2dd02323c0 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-10-08 01:16:45 +00:00
Marcus Boerger a85a72e29a MFH: Bugfix #25770 Segfault with PHP and bison 1.875 2003-10-07 10:04:51 +00:00
foobar 7492d02cb2 BFN 2003-10-07 09:59:50 +00:00
Corne' Cornelius 52d5dd4da5 MFH: - Fixed bug #18534 (ifx_close() leaves open session)
MFH: - (ifx_do_close) Added
2003-10-07 09:36:41 +00:00
Ilia Alshanetsky 16ab834b5e MFH: Cleaned up previous patch. 2003-10-07 00:36:27 +00:00
Ard Biesheuvel 1b60fa245e Fix typo 2003-10-07 00:11:03 +00:00
foobar c057fc931a MFH: - Fixed bug #25764 (ldap_get_option() crashes with unbinded ldap link) 2003-10-06 23:34:16 +00:00
foobar 10243d019d MFH: ws fix 2003-10-06 23:31:03 +00:00
Ilia Alshanetsky a13710455c MFH: Fixed clobbering of the source array, when merging complex
multi-dimensional arrays. Bug reported by Lukas Smith.
2003-10-05 19:37:06 +00:00
Sergey Kartashoff cfac03af3c - README in mnogosearch extension is updated 2003-10-04 09:43:49 +00:00
Greg Beaver 39894c69cd MFH fix PHP notice in rare case 2003-10-04 03:58:53 +00:00
foobar 59d28ed4df MFH: - Fixed bug #25752 (ext/ncurses: ncurses.h instead of curses.h with BSD). 2003-10-04 01:04:54 +00:00
foobar e2cf657294 MFH: ws fix 2003-10-04 00:43:31 +00:00
Moriyoshi Koizumi d18b7a533a BFN 2003-10-03 23:30:14 +00:00
Ilia Alshanetsky 9308d262d0 MFH: More ZTS stuff. 2003-10-03 18:05:50 +00:00
Moriyoshi Koizumi ad791c135c MFH(r-1.5, r-1.5, r-1.4): Specify full path to cat for mb_send_mail() tests 2003-10-03 17:07:50 +00:00
Moriyoshi Koizumi 48900111a8 MFH(r-1.1): Add regression test for bug #25745 2003-10-03 17:01:45 +00:00
SVN Migration 61e4791abe This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-10-03 16:59:45 +00:00
Moriyoshi Koizumi 9b708216d5 BFN 2003-10-03 15:54:06 +00:00
Moriyoshi Koizumi f692aeb36b MFH(r-1.28): Fixed bug #25745 (ctype functions don't deal with non-ascii characters properly) 2003-10-03 15:53:47 +00:00
Ilia Alshanetsky 3a867aad64 MFH: Fixed bug #25744 (make ZTS build of ext/sybase compile) 2003-10-03 13:03:47 +00:00
foobar e4a63807a1 MFH 2003-10-03 05:48:17 +00:00
SVN Migration 1a92434b06 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-10-03 05:47:08 +00:00
foobar 2dfed48c99 MFH: Aligned configure help texts. 2003-10-03 05:26:30 +00:00
foobar 1c2b48e0ca MFH 2003-10-03 04:29:24 +00:00
Moriyoshi Koizumi fea1d6c1fb MFH: Alignment fix 2003-10-03 01:13:56 +00:00
Moriyoshi Koizumi a754abdc5f MFH(r-1.1): Add a test case for bug #25708 2003-10-02 22:50:46 +00:00
SVN Migration a56a817706 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-10-02 22:50:29 +00:00
Moriyoshi Koizumi e547d66316 MFH(r-1.252): Fixed bug #25708 (extract($GLOBALS, EXTR_REFS) mangles $GLOBALS) 2003-10-02 22:22:15 +00:00
Frank M. Kromann d6f18bd5f3 FrontBase uses ws2_win32 lib now 2003-10-02 18:48:47 +00:00
Frank M. Kromann 6d0d0172f3 Fixing type cast 2003-10-02 18:48:18 +00:00
foobar e2e0cfb6fa MFH 2003-10-02 14:55:58 +00:00
foobar ec1d763fd2 Removed extra [] 2003-10-02 14:09:12 +00:00
foobar d88229acba strawberry fields.. 2003-10-02 14:03:17 +00:00
Moriyoshi Koizumi eb00f1dd54 Add some description to the help text 2003-10-02 10:59:38 +00:00
Moriyoshi Koizumi adec65bea6 MFH(r-1.15): Alignment fix 2003-10-02 10:48:16 +00:00
Moriyoshi Koizumi a82bc1b50c MFH(r-1.55): Alignment fix 2003-10-02 10:48:02 +00:00
Moriyoshi Koizumi 7620efc274 Forgot to commit this one. 2003-10-02 10:10:52 +00:00
Moriyoshi Koizumi 45775e2029 Silly typo 2003-10-02 08:05:06 +00:00
Moriyoshi Koizumi 46eecba03b BFN 2003-10-02 08:04:11 +00:00
Moriyoshi Koizumi 6e6732ae6a Fix for a regex bug that leads into an infinite loop due to optimization
failure when the pattern is ".*" and both MULTILINE and SINGLELINE options are
specified.
# This bug was already squashed in HEAD, as it adopts an alternative
# implementation.
2003-10-02 08:01:14 +00:00
Moriyoshi Koizumi 9c33e3d3ce MFH(r-1.46): fix php_regex_encoding() so it can handle two additional encoding
names mbfilter supports by default. (Patch by Seiji Masugata)
2003-10-02 07:50:19 +00:00
Moriyoshi Koizumi fff1d6a533 BFN 2003-10-02 07:01:24 +00:00
Moriyoshi Koizumi ab2ba0f49f Fixed bug #25707 (html_entity_decode over-decodes &amp;lt;)
# note: not MFH stuff
2003-10-02 07:00:56 +00:00
SVN Migration bda27d167f This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-10-02 06:57:22 +00:00
Ilia Alshanetsky edff9053e8 MFH: Fixed bug #25701 (On flush() set headers_sent in apache2handler) 2003-10-02 03:24:43 +00:00
foobar 60d11d734c MFH: fix for bug #25719 2003-10-02 00:35:31 +00:00
Andrei Zmievski 5e9a4ecc0e Make sure to clear out the refcount. 2003-10-01 23:13:04 +00:00
Andrei Zmievski 0d59c975a0 @- Made $argc and $argv always available as globals in CLI. No more
@  silliness. (Andrei)
2003-10-01 21:24:19 +00:00
foobar 6db270f8fc MFH 2003-10-01 02:54:39 +00:00
Ilia Alshanetsky a11f040979 MFH: Always prefer user specified paths over the default /usr /usr/local. 2003-09-30 22:38:29 +00:00
foobar e2a74cf344 MFH: Fixed bug #25703 (openssl checks failed) 2003-09-30 18:08:57 +00:00
Moriyoshi Koizumi 89dde23f32 Move entry to the right place 2003-09-30 04:24:18 +00:00
Greg Beaver a07e4ef2ff MFH better #45 fix 2003-09-30 02:57:28 +00:00
Moriyoshi Koizumi a60b5db89e BFN 2003-09-30 00:41:56 +00:00
Moriyoshi Koizumi 85bffe131e MFH: Fixed bug #25669 (eregi() with non-ascii characters) 2003-09-30 00:41:00 +00:00
Ilia Alshanetsky 361aa7dd32 Back to dev. 2003-09-30 00:35:52 +00:00
Ilia Alshanetsky e5b50cede5 4.3.4RC1 is a go. 2003-09-29 23:48:16 +00:00
Ilia Alshanetsky b5b29e267e MFH: More NaN & INF handling fixes. 2003-09-29 23:44:17 +00:00
Greg Beaver d632dba1ef MFH 2003-09-29 17:43:16 +00:00
Greg Beaver 4704bb7186 MFH #45, whitespace, bug in return of install() 2003-09-29 17:38:37 +00:00
Pierre Joye b1eafc6a75 - Upgrade DB to 1.5.0RC2 2003-09-29 14:49:18 +00:00
Pierre Joye c2a66c59c6 MFH 4.3.4RC1 2003-09-29 14:06:44 +00:00
Stanislav Malyshev cb9b99262e allow realpath() for win32 non-ZTS 2003-09-29 14:04:16 +00:00
Stanislav Malyshev 480e8dd7fc Have realpath now 2003-09-29 13:57:43 +00:00
Stanislav Malyshev f1b478c291 add realpath for Win32 non-ZTS 2003-09-29 13:57:03 +00:00
Moriyoshi Koizumi a23dfb3b11 MFH(r-1.399): simplification 2003-09-29 02:23:52 +00:00
Ilia Alshanetsky 5646e5f747 MFH: Fixed Bug #25665 (var_dump() hangs on Nan and INF). 2003-09-29 01:09:36 +00:00
Tal Peer ee9deb187a MFH 2003-09-28 13:37:59 +00:00
foobar 806c28b5c2 MFH 2003-09-27 20:54:00 +00:00
SVN Migration 8103e07a23 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-09-27 18:48:49 +00:00
Sara Golemon de85bccf03 MFH BugFix# 25671 subarray corruption in str_replace 2003-09-26 18:00:00 +00:00
Moriyoshi Koizumi 18557cba09 MFH(r-1.45): repatch fixes for the problem that was reported at php-dev@php.gr.jp (#884) 2003-09-26 17:47:10 +00:00
Moriyoshi Koizumi 2fb568e65e Fix typo 2003-09-26 16:33:58 +00:00
Moriyoshi Koizumi 94f05e60c2 Fix typo 2003-09-26 11:06:39 +00:00
Hartmut Holzgraefe 2bf4ba798f MFH 2003-09-26 10:13:35 +00:00
foobar 0d6bac093d MFH 2003-09-26 09:56:57 +00:00
SVN Migration f17845f9bd This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-09-26 09:56:25 +00:00
foobar 40a1c4b4f4 MFH 2003-09-25 14:53:58 +00:00
Ilia Alshanetsky 283476972f MFH: Fixed bug #25070 (Don't forget to unlock session files on win32 before
closing them).
2003-09-24 23:39:22 +00:00
Ilia Alshanetsky 8acd0a3835 MFH: Fixed bug #25293 (Output correct EOL to error_log) 2003-09-24 23:22:32 +00:00
foobar 925a3b6ba8 - Fixed bug #25648 (xslt_set_encoding() being not detected correctly) 2003-09-24 22:55:59 +00:00
foobar 149d034a81 MFH: use pkg-config if available for openssl setup 2003-09-24 14:31:18 +00:00
foobar b485c4f26c BEFH 2003-09-24 08:28:26 +00:00
Ilia Alshanetsky db8d5a7fb0 Bug fixing news. 2003-09-24 02:30:16 +00:00
Ilia Alshanetsky ee3c85162f MFH: Specify full path for the cat utility for mbstring e-mail tests.
MFH: Previously made fixes to tests that address bug #25635
2003-09-24 02:29:15 +00:00
foobar ccc0fb6122 MFH: Fixed bug #24402 (Compile failure with gettext 0.12.x) 2003-09-24 02:08:48 +00:00
foobar d18b757655 MFH: basic gettext test 2003-09-24 00:44:23 +00:00
Ilia Alshanetsky 08604e5d44 MFH: Fixed bug #25636 (SNMP Session not closed on success). 2003-09-23 18:26:10 +00:00
foobar ce2f1ce4bc MFH: Removed unnecessary ssl.h include 2003-09-23 16:04:55 +00:00
Wez Furlong 872948f21a "Fix" for bug #25614.
The openssl_pkey_get_public() doesn't work as advertized in the docs; it can't
get a public key from a private key (because a key is a key), but would return
the private key anyway.  The function was originally designed to get the public
key from a certificate.
2003-09-23 14:52:28 +00:00
SVN Migration 491cf63bab This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-09-23 10:06:20 +00:00
foobar 675a41bee2 MFH: - Fixed bug #25604 (HAVE_SNMP_PARSE_OID undefined with phpize build) 2003-09-23 08:16:47 +00:00
Rui Hirokawa 5714f48f4c removed unnessesary null byte (patched by komura). 2003-09-23 02:54:28 +00:00
Ilia Alshanetsky 05331829c6 MFH: string format stuff. 2003-09-22 23:28:09 +00:00
Ilia Alshanetsky 258d90d101 MFH: String formating. 2003-09-22 04:18:39 +00:00
Sascha Schumann 8d28cb5737 Major bug fix upgrade to the bundled libfcgi
A delta between libfcgi 2.2.2 and 2.4.1-SNAP has been applied to the
source.  Shane's impersonation, putenv and exit->return improvements
have been carried over.  One of Shane's changes caused the first process
to hang after one request.  The modification has been deactived (os_win32.c).

These changes together with a patch to mod_fastcgi, make Apache/mod_fastcgi
and PHP work under Win32.  It was basically unusable before that.
2003-09-21 22:08:17 +00:00
foobar c1a998a604 MFH: typo fix in error message 2003-09-21 15:40:28 +00:00
Sascha Schumann ca4d592e11 Avoid zero-length keys which result in a spinning process 2003-09-20 16:09:41 +00:00
Sascha Schumann 42d1578fb4 Fix potential buffer overrun 2003-09-20 12:44:13 +00:00
foobar 36e88551eb MFH 2003-09-20 03:22:54 +00:00
Ilia Alshanetsky fea99094df MFH: Fixed bug #25583 (Incorrect handling of paths starting with / on win32
inside glob() function).
2003-09-20 02:52:45 +00:00
Ilia Alshanetsky 5b3a654f07 Revert previous patch. 2003-09-20 02:08:12 +00:00
Ilia Alshanetsky 0e09bbae14 Bug fixing news. 2003-09-20 01:41:45 +00:00
Ilia Alshanetsky 3fcd022dc5 MFH: Fixed bug #25583 (Incorrect handling of absolute path without drive). 2003-09-20 01:41:18 +00:00
Derick Rethans 66ac209938 MFH: - Fixed typo 2003-09-19 12:24:48 +00:00
foobar bbbf1df01d Make sure phpize/php-config are build 2003-09-19 05:35:21 +00:00
Ilia Alshanetsky 3857aa4f7d MFH: Fixed bug #25570 (Possible crash in apache2handler when zend_bailout
called outside of zend_try {} block).
2003-09-19 00:44:58 +00:00
Rob Richards b4bed3fd88 fix some threading issues
fix mem leaks in append_child with attribute nodes
2003-09-17 19:34:42 +00:00
foobar 776587fdac --enable-track-vars does not exist 2003-09-17 05:28:42 +00:00
Ilia Alshanetsky d0d8c4a6a3 MFH: Fixed bug #25106 (Added more stringent checks on bzopen() mode). 2003-09-15 23:49:41 +00:00
Marcus Boerger 353dd2444a MFH: Test for bug #25547 2003-09-15 20:40:56 +00:00
SVN Migration 472aaf3f50 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-09-15 20:30:33 +00:00
foobar 186e6dc1ba crap removal 2003-09-15 04:13:41 +00:00
Ilia Alshanetsky 46afe5a792 MFH: Fixed bug #25530 (checkdate incorrectly handles floats) 2003-09-15 00:08:05 +00:00
Sara Golemon 99ab17375d MFH(r-1.147): Fix Bug #25525 ldap_explode_dn() crashes when passed invalid params 2003-09-13 17:31:25 +00:00
Ilia Alshanetsky 6d36221995 When opening file for write, it may not exist. 2003-09-12 04:53:39 +00:00
foobar 2dadbe3855 MFH: - Fixed bug #25504 (pcre_match_all() crashes when passed only 2 parameters) 2003-09-12 01:32:38 +00:00
foobar a11e7affc8 BFN 2003-09-11 23:51:27 +00:00
foobar fbed1b901c MFH: - Fixed bug #25483 (ext/informix: bogus -469 error from ifx_query()) 2003-09-11 23:51:14 +00:00
foobar 75d44d8c07 fff 2003-09-11 18:16:18 +00:00
Jay Smith 491347fba6 Fixed bug #25494 (array_merge allowing "false" as argument (silent when
non-array is passed))
# Now throws E_NOTICE for non-array args as per Ilia's suggestion.
2003-09-11 17:28:27 +00:00
foobar b2a44d9327 MFH: - Fixed bug #25463 (ext/cpdf: compile failure with bundled GD) 2003-09-11 15:26:53 +00:00
Ilia Alshanetsky 3e59eb2be9 MFH: Fixed bug #25316 (Possible infinite loop inside _php_stream_write()). 2003-09-11 05:07:47 +00:00
Ilia Alshanetsky 32f67e7664 MFH: Cleanup r1.76 patch 2003-09-11 04:46:31 +00:00
foobar 010213e4ca wtf is w/ZTS? (for users? :) 2003-09-11 02:00:52 +00:00
Hartmut Holzgraefe 6afa7b45ef MFH 2003-09-11 01:45:02 +00:00
Stefan Roehrich 6e1032c30d MFH: Fix for bug #23488 zlib.output_compression overrides vary header.
It was already fixed for ob_gzhandler (#24827).
2003-09-10 08:49:46 +00:00
foobar 70c3e3e95f buf -> bug 2003-09-10 01:28:34 +00:00
foobar c290f39e3b - Fixed bug #25385 (ob_gzhandler(): typo in sapi_add_header_ex() call) 2003-09-10 01:23:38 +00:00
Ilia Alshanetsky b0fe9422e4 #if -> #ifdef 2003-09-10 01:03:41 +00:00
Ilia Alshanetsky 2f695ba37d MFH: Fixed bug #25429 (fix copying of stdin using copy() function) 2003-09-10 00:59:46 +00:00
Ilia Alshanetsky 72e5f9d395 MFH: Fixed bug #14049 (realpath() w/ZTS returns invalid results for non-existent
paths)
2003-09-10 00:22:20 +00:00
foobar 1ba3c62c8b BFN 2003-09-09 21:47:20 +00:00
foobar e56b9397d9 MFH: runtime apache version 2003-09-09 21:42:57 +00:00
Melvyn Sopacua 4aacd42826 Fix testcases, failing with 'America/New_York' vs. 'US/Eastern' systems
and fallback to POSIX-style. The fallback is based on tzset(3)  manpage [1]
for these systems and may apply to past and future unknowns as well.

Affected systems:   4.4BSD

Possible problem:   OSF

Proposed solution:  leave testcase as is, and if OSF systems start
                    failing during next qa-cycle, always use POSIX style in
                    testcases and add portability note to docs.

# [1] If the TZ environment variable does not specify a tzfile(5)-format
#     file and cannot be interpreted as a direct specification, UTC is
#     used.
2003-09-09 21:31:51 +00:00
Sara Golemon ac848809b5 BFN 25294 2003-09-09 21:20:07 +00:00
Sara Golemon 3f585ac923 MFH(r-1.91) Fix Bug #25294 LIST/NLST can cause segfault because ftp->data not cleaned properly 2003-09-09 21:15:20 +00:00
foobar f7972bc8be BFN 2003-09-09 19:58:06 +00:00
Melvyn Sopacua cd8ba5af5b Fix #23326: Attributes via append_child not supported
Add testcase
2003-09-09 19:43:45 +00:00
foobar fc787ac20f BFN 2003-09-09 19:27:56 +00:00
foobar 72cafaaabf MFH: - Fixed bug #25211 (image.c compile failure with AIX) 2003-09-09 19:27:41 +00:00
foobar 968eb65b01 BFN 2003-09-08 22:51:53 +00:00
foobar c872775134 BFN 2003-09-08 22:44:58 +00:00
Sara Golemon 55ec6edbfb BFN Bug#25314 2003-09-08 22:43:08 +00:00
Ilia Alshanetsky 7a06046d74 MFH: Fixed bug #25333 (Possible body corruption & crash in win32 mail()). 2003-09-08 22:37:51 +00:00
Sara Golemon 9761587fc6 Bug #25314 ASCII mode transfers behaving like binary when initiated from windows. 2003-09-08 22:32:33 +00:00
foobar 65b33edeee MFH: revert JIS addition 2003-09-08 22:19:56 +00:00
Moriyoshi Koizumi 62b4710d9e MFH(r-1.66): fix build in VC++7. 2003-09-08 21:01:37 +00:00
Ilia Alshanetsky e60d220d5c MFH: Re-enable sendmail binary check, now with parameter detection. 2003-09-08 20:15:43 +00:00
foobar e8d32e9779 MFH: - Fixed bug #25424 (ext/informix: lvarchar not supported in win32 build) 2003-09-08 15:07:43 +00:00
foobar 32505ff927 - nuke warning about MSVCRT in debug build 2003-09-08 14:09:40 +00:00
foobar 5bda30d1bb - fix the mcve addition, removed unused project (gd_bundled) 2003-09-08 14:08:46 +00:00
foobar 40bc834210 MFH: Fix for bug #25295 2003-09-08 13:15:44 +00:00
foobar 24f458a004 - MFH: build problems fix with CLI 2003-09-08 13:10:34 +00:00
Marcus Boerger aa405f4114 MFH: Allow to search for section FILE with 2nd parameter (found by Derick) 2003-09-07 23:50:25 +00:00
foobar 13e0c93f0c BFN 2003-09-06 23:57:40 +00:00
Marcus Boerger 9ec1245550 MFH: Bugfix #25404 2003-09-06 15:31:14 +00:00
foobar aa1c8bdee5 really sync 2003-09-04 16:46:46 +00:00
Jon Parise 0934056575 MFH 1.176: Register the TYPEMODEL constant from c-client's mail.h. 2003-09-04 07:48:30 +00:00
foobar f59a6aceea MFH 2003-09-03 22:54:13 +00:00
Ard Biesheuvel 28dabfb7a6 MFH WS 2003-09-03 22:07:31 +00:00
foobar bd5f18bdf7 MFH 2003-09-03 16:41:12 +00:00
SVN Migration 95c6f3e8a0 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-09-03 16:40:53 +00:00
foobar 1f2cc89995 sync 2003-09-03 16:26:50 +00:00
foobar d20b3d0ed5 MFH: - Fixed bug #25378 (Invalid data passed to unserialize() causes segfault) 2003-09-03 16:26:42 +00:00
Ard Biesheuvel 94e8d2ec62 MFH Test correct binding of 16-bit NUMERIC parameters 2003-09-03 15:25:03 +00:00
Ard Biesheuvel d5bb4753c8 MFH Fix binding of 16-bit NUMERIC parameters 2003-09-03 15:22:24 +00:00
Sascha Schumann 8ab1c72867 Fixed FastCGI being unable to bind to a specific IP 2003-09-03 14:56:11 +00:00
foobar bfb188eff5 MFH: - Fixed bug #25372 (sscanf() does not work with %X) 2003-09-03 11:55:30 +00:00
Sascha Schumann cbb59ee1b0 Update documentation, -b ip:port works 2003-09-03 08:24:17 +00:00
Sascha Schumann b02ce8bdc7 fix heuristic: if someone passed "-b IP:port", this check would
falsely recognize the parameter as defining only a port.
2003-09-03 08:14:14 +00:00
Sascha Schumann 4d98201217 centralize cflags 2003-09-03 08:07:51 +00:00
foobar 189fe6e665 - Added JISX0208=1 and USE_GD_JISX0208 defines 2003-09-03 05:28:10 +00:00
Sascha Schumann 20a35aa472 enable re2c check for self-contained extensions 2003-09-02 19:42:03 +00:00
Sascha Schumann 889eb2234e provide RE2C to external extensions 2003-09-02 19:33:52 +00:00
Sascha Schumann b4a6c9fe75 fetch fd correctly in fastcgi case 2003-09-02 16:16:12 +00:00
Ard Biesheuvel b1e3eaacaf MFH: Don't choke on repeated fetch() after result is exhausted 2003-09-02 15:35:11 +00:00
Sascha Schumann 2457ddb3ba implement get_fd/force_http_10 methods for CGI SAPI 2003-09-02 11:23:57 +00:00
Sascha Schumann e225eee248 nuke unused var 2003-09-02 11:15:14 +00:00
Stanislav Malyshev 1c65d69485 ws 2003-09-02 10:33:18 +00:00
Stanislav Malyshev 1eb9a119af fix typo 2003-09-02 10:21:02 +00:00
Stanislav Malyshev 7651ed0925 don't report errors if asked not to report 2003-09-02 09:17:09 +00:00
foobar 901af0e106 MFH: - Fixed bug #25348 ("make install" fails with --enable-short-tags). 2003-09-02 01:30:13 +00:00
foobar b485be88da MFH: - Fixed bug #25343 (is_dir() gives warning on FreeBSD). 2003-09-02 01:23:21 +00:00
foobar 7c728e6b9e BFNHR 2003-09-01 23:02:46 +00:00
Sara Golemon 049eaa886a BFN leak in gethostbynamel 2003-09-01 22:40:47 +00:00
Sara Golemon a2f21f3e8c Plug leak when invalid domain name provided. 2003-09-01 22:37:46 +00:00
foobar 4ac705885e MFH 2003-09-01 16:25:23 +00:00
Stanislav Malyshev 5f003af4d4 The sendmail_path executable check breaks setups that use parameters
for sendmail - including the default setup - so I'm disabling it for now.
2003-09-01 08:18:31 +00:00
Ilia Alshanetsky 6ce26891e8 MFH: Make sure that ftp->data is nulled after it's freed. This may fix bug
#25294 & bug #25296.
2003-08-31 21:09:14 +00:00
Sergey Kartashoff 3d9aed8039 - mnogosearch extension updated to compile with mnogosearch-3.2.15
- a new UDM_PARAM_SEARCH_RESULTS mnogosearch API command added to limit
  maximum number of search results
2003-08-31 06:58:58 +00:00
foobar c298c075f4 BFN 2003-08-30 22:01:49 +00:00
foobar 84c5c7da97 MFH 2003-08-30 11:01:46 +00:00
foobar 17d5386bb3 MFH 2003-08-30 10:57:59 +00:00
foobar 5fdef05cb0 stupid winblows 2003-08-30 10:50:52 +00:00
Sascha Schumann ce4fbe580d Never overwrite .c files when re2c does not exist. 2003-08-30 07:29:55 +00:00
Rob Richards 9f8be37c4e fix case for include 2003-08-29 20:50:52 +00:00
Rob Richards bf26b9a7e1 fix builds using libxml 2.5.10+ 2003-08-29 17:36:34 +00:00
Rob Richards c23ec177d5 workaround for bug #25268. libxslt issue with xsl:key 2003-08-29 15:29:24 +00:00
foobar 1a283a6c42 BFN 2003-08-29 14:41:08 +00:00
foobar ca64fae35d header sync 2003-08-29 14:22:13 +00:00
Sascha Schumann 485cba185b MFH
Fix a segfault which occured when using a storage format not capable
of expressing references (e.g. WDDX) and deserializing a session variable
whose name conflicted with an existing symbol in the global scope.

PR: #25307
Submitted by: Jani Taskinen
Speling fixes: me
2003-08-29 12:35:15 +00:00
foobar 43eddf7a58 MFH 2003-08-29 09:05:27 +00:00
foobar 5896ff7e80 fix build 2003-08-29 00:53:16 +00:00
Andrey Hristov 0767e6f1e2 MFH : str is string not a long 2003-08-28 21:09:21 +00:00
Andrey Hristov 4f2153fd14 format string fix and \n at the end of the message is not needed 2003-08-28 20:29:13 +00:00
Andrey Hristov 8edac7234d format string fixes 2003-08-28 20:27:55 +00:00
Andrey Hristov b767129303 \n at the end of the message is not needed 2003-08-28 20:26:32 +00:00
Andrey Hristov 6d57013b3e format string fix 2003-08-28 20:25:31 +00:00
Ilia Alshanetsky f137ee87f7 One more warning fix. 2003-08-28 20:05:24 +00:00
Ilia Alshanetsky fa55a5a826 Compiler warning fixes. 2003-08-28 20:01:37 +00:00
Ilia Alshanetsky 0be182e1ba MFH: Compiler warning fixes. 2003-08-28 19:18:57 +00:00
Ilia Alshanetsky c3757b1f05 MFH: Fixed format error. 2003-08-28 17:56:51 +00:00
Ilia Alshanetsky 21af3e8c4e Fixed format errors & warning. 2003-08-28 17:54:03 +00:00
Ilia Alshanetsky 4df567fe9d MFH: Fixed format bug 2003-08-28 17:49:08 +00:00
Sascha Schumann 1c662bee50 format string fix 2003-08-28 17:34:30 +00:00
Sascha Schumann e7f085d84b fix error message 2003-08-28 17:16:01 +00:00
Rasmus Lerdorf fc12da950c Fix the build
The DOS line endings in this file caused buildconf to build a broken
configure script on fbsd
2003-08-28 17:14:29 +00:00
foobar 1f27563128 sync with HEAD 2003-08-28 16:31:51 +00:00
foobar e2782d9e1d MFH: some emalloc() -> safe_emalloc() fixes 2003-08-28 16:28:27 +00:00
foobar 3782f21222 - Fixed bug #23682 (sybase_query() and multiple result sets: not returning first row set) 2003-08-28 16:16:59 +00:00
Stefan Roehrich bc24daedc3 MFH: Fixed bug #25218 ("deflate" compressed pages had a gzip header, which
should only be sent with "gzip" compressed pages).
2003-08-28 16:05:17 +00:00
Sascha Schumann 41c1ea1b05 fix format strings 2003-08-28 16:04:18 +00:00
Sascha Schumann 415df9168f fix format strings 2003-08-28 15:54:35 +00:00
Sascha Schumann e98926be3f add PHP_ATTRIBUTE_FORMAT to more functions
# uncovers a nice number of incorrect format strings
2003-08-28 15:52:15 +00:00
Sascha Schumann 488f26359a fix format (long port) 2003-08-28 15:15:35 +00:00
Sascha Schumann e5cc26627a Use ZEND_GCC_VERSION and ZEND_ATTRIBUTE_MALLOC 2003-08-28 14:48:34 +00:00
foobar 619d34b7f8 remove dos line feeds.. 2003-08-28 14:36:50 +00:00
foobar 58fa31451a - Made MCVE extension available on win32.
# requires libmcve 3.2.2 (http://www.mcve.com)
2003-08-28 14:34:15 +00:00
foobar 4942844edb missing entries 2003-08-28 14:25:12 +00:00
foobar f4d7971b7f missing .cvsignore 2003-08-28 14:08:44 +00:00
Stanislav Malyshev ab9ceb9526 Null dtor so that extensions won't be unloaded prematurely by list
destruction
2003-08-28 11:34:51 +00:00
Moriyoshi Koizumi 9e07fed96e MFH(r-1.25): add further check for "#include MACRO" style syntax 2003-08-28 06:05:13 +00:00
Sascha Schumann 0ea4d57d56 MFH automatic format checks 2003-08-28 05:25:26 +00:00
Ilia Alshanetsky 77005be687 MFH: Fixed bug #25109 (Possible crash when fetching field names in pgsql) 2003-08-28 00:33:48 +00:00
Ilia Alshanetsky aef886e34c MFH: mail.c r1.74 2003-08-27 23:53:31 +00:00
foobar b21f1582dd - Backported several improvements/cleanups for the build/configure stuff.
. PEAR dependancies checked during configure
  . OpenSSL config moved from configure.in to ext/openssl/config0.m4
    (and also improved the PHP_OPENSSL_SETUP macro a bit)
  + Some other minor issues
2003-08-27 17:57:32 +00:00
Sascha Schumann f8f72bd52e Use INSTALL to install build files 2003-08-27 13:55:24 +00:00
Ilia Alshanetsky 7cd06f5088 MFH: Prevent a crash when expand_filepath() fails. 2003-08-27 01:10:25 +00:00
foobar db7baa737f BFN 2003-08-26 02:52:39 +00:00
foobar bb83f93954 MFH: - Fixed bug #25166 (WDDX serializer handler missing in win32). (Jani) 2003-08-26 02:51:21 +00:00
foobar 008b424ee9 More crap from previous commits 2003-08-26 02:16:23 +00:00
foobar 720d3804fc Fix typo 2003-08-26 02:15:19 +00:00
foobar 9d61de0ec9 MFH: - Fixed crash bug when non-existing save/serializer handler is used 2003-08-26 02:05:53 +00:00
Sascha Schumann 16f3c4b7fb Use $(INSTALL_DATA) instead of cp 2003-08-26 00:03:33 +00:00
Ilia Alshanetsky 65c28b0cc6 zero-size BLOB fetch fix went into 4.3.3 2003-08-25 23:53:10 +00:00
foobar c0edbc5eee MFH 2003-08-25 23:24:42 +00:00
Sara Golemon a170be820e BFN 2003-08-25 22:28:31 +00:00
Sara Golemon 652147def5 MFH(r-1.61) Bugfix#25239 Closing control stream while data stream is open violates RFC959 section 2.3 2003-08-25 22:26:37 +00:00
Ilia Alshanetsky 343a1f081c Added place-holder for 4.3.4 2003-08-24 20:51:52 +00:00
Ilia Alshanetsky c82c3a41b4 No RC1 just yet :) 2003-08-24 20:46:36 +00:00
Ilia Alshanetsky e2ee8d0edb Back to dev 2003-08-24 20:43:19 +00:00
Ilia Alshanetsky d702e37902 Fixed typo. 2003-08-24 19:44:47 +00:00
Ilia Alshanetsky e0d22f195b Set 4.3.3 version bit. 2003-08-24 19:30:16 +00:00
Ilia Alshanetsky 88004a6208 Prepare NEWS file for 4.3.3 release. 2003-08-24 19:24:39 +00:00
Ilia Alshanetsky a2a30ca7d3 MFH: Fixed bug #25127 (reset memory_limit before terminating the request) 2003-08-22 20:02:11 +00:00
Jon Parise d7264e744d MFH configure.in:1.460, filestat.c:1.125:
Fix disk_total_space() and disk_free_space() under FreeBSD.
2003-08-22 05:11:31 +00:00
Ard Biesheuvel 7f04983ed3 MFH Fix false warning on zero-size BLOB fetch (introduced in RC3) 2003-08-20 23:01:32 +00:00
Brad House ac99c5ab03 allow destructor to clean up connection data 2003-08-20 19:43:07 +00:00
Ilia Alshanetsky 60097c2661 MFH: Fixed bug #25170 (Problem with generation of random numbers on solaris) 2003-08-20 16:40:46 +00:00
foobar 72f98037f4 MFH: - Fixed bug #25163 (OSX: phpize has to use glibtoolize instead) 2003-08-20 08:16:18 +00:00
foobar 6465017e05 MFH 2003-08-20 08:15:42 +00:00
Marcus Boerger f75ae95c8f MFH: Add test for #25145 2003-08-19 22:50:38 +00:00
SVN Migration 26ff74d670 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-08-19 22:47:31 +00:00
Moriyoshi Koizumi b34666a014 MFH(r-1.189): more accurate fix for bug #25140 2003-08-19 14:49:39 +00:00
Moriyoshi Koizumi d8bbff45c1 Revert the last patch. This patch should not be included in the forthcoming
release.
2003-08-19 14:32:10 +00:00
Derick Rethans 39a8fc274a - MFH: Fix for bug #25140 (mb_convert_encoding returns FALSE when it tries to
convert empty string)
2003-08-19 08:34:51 +00:00
SVN Migration b6006ed2fc This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-08-19 08:29:58 +00:00
Ilia Alshanetsky 4ceecd3e5e RC5 not RC4 2003-08-18 14:04:30 +00:00
Ilia Alshanetsky ab74b63ff2 Back to dev 2003-08-18 14:02:28 +00:00
Pierre Joye 3214d963ec - MFH 2003-08-18 13:28:38 +00:00
Ilia Alshanetsky 6bacb29c98 RC4 is a go 2003-08-18 12:27:01 +00:00
foobar 339427de12 fix typo 2003-08-17 21:27:55 +00:00
Ard Biesheuvel f1dd5c2406 MFH Fixed leak in _php_ibase_bind() 2003-08-17 16:43:49 +00:00
Ard Biesheuvel bb4ea41589 MFH 2003-08-17 16:40:26 +00:00
Ard Biesheuvel c5a669caa6 MFH 2003-08-17 15:01:07 +00:00
Ard Biesheuvel cee27dd710 MFH 2003-08-17 13:26:13 +00:00
foobar 879fb489f3 made some entries more meaningful for users.. 2003-08-17 05:57:10 +00:00
Ilia Alshanetsky 1ab01b470b BFN 2003-08-16 23:05:19 +00:00
Ard Biesheuvel e25d006476 MFH Fixed bug #24224 2003-08-16 20:12:43 +00:00
Ard Biesheuvel 2732fbadbe MFH 2003-08-16 20:10:51 +00:00
Ard Biesheuvel 418cada107 MFH 2003-08-16 20:05:36 +00:00
Ard Biesheuvel 850a158531 MFH Fixed bug #18744 2003-08-16 17:11:25 +00:00
foobar 4282e55dfe ws fix 2003-08-15 18:47:02 +00:00
foobar 05a0c36072 fix typo 2003-08-15 18:42:11 +00:00
Derick Rethans 05ae3f22ab - Fix library path problems 2003-08-14 20:12:51 +00:00
Ilia Alshanetsky 903275e887 MFH: Fixed bug #25093 (Various leaks due to non-freed queries) 2003-08-14 17:49:48 +00:00
Marcus Boerger 88b48b5376 MFH: Don't test other functionality than wddx here. 2003-08-14 17:25:17 +00:00
Ilia Alshanetsky 88e0b419f2 Set RC4 date 2003-08-14 14:38:50 +00:00
Ilia Alshanetsky 33d7423950 MFH: Fixed bug #25081 (odbc_fetch_array() may mangle numeric fields). 2003-08-14 14:37:33 +00:00
Ilia Alshanetsky 30c26df348 MFH: Fixed bug #25084 (Make refer check not dependant on register_globals) 2003-08-14 01:32:02 +00:00
Ilia Alshanetsky cadd668aac MFH: missing skip condition. 2003-08-14 00:54:42 +00:00
Ilia Alshanetsky b2c85181d0 MFH: Fixed a possible crash due to invalid handling of assert ini options. 2003-08-14 00:38:21 +00:00
Brian France 7da8651511 Reverted part of the last patch. It changed -prefer-pic to -prefer-non-pic.
Now back to -prefer-pic
2003-08-14 00:24:25 +00:00
foobar 22aab1e328 MFH: boolean (not long) 2003-08-13 23:39:03 +00:00
Edin Kadribasic 919f53ee51 Added standard location for the headers 2003-08-13 23:02:57 +00:00
Brian France 3b2cf9ddef Fixed two translit so they don't remove underscores 2003-08-13 22:50:34 +00:00
Tomas V.V.Cox 3f11a2a6a8 1.2b5 becomes 1.2 final, no more changes 2003-08-13 22:32:28 +00:00
Vlad Krupin 2725d3534f MFH adding win32 support 2003-08-13 20:59:44 +00:00
SVN Migration 48c975a333 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-08-13 18:57:20 +00:00
Moriyoshi Koizumi fe042a90b9 MFH(r-1.96): Slight improvement. Hope this will make some difference. 2003-08-13 18:22:17 +00:00
foobar fab70dea69 Be a bit more wordy.. 2003-08-13 18:16:00 +00:00
Ilia Alshanetsky 7b1548e798 BFN 2003-08-13 16:14:08 +00:00
Ard Biesheuvel e084903eab Fixed crash in _php_ibase_error() after request shutdown (also fixes #7014) 2003-08-13 13:27:36 +00:00
foobar 3f71921c58 MFH 2003-08-13 10:40:56 +00:00
foobar 806f9145de MFH 2003-08-13 09:48:32 +00:00
Ilia Alshanetsky bd3cb846c0 MFH: Don't forget to flush() buffers for -w -s 2003-08-13 02:01:59 +00:00
foobar 9356017daa MFH: revert previous commit 2003-08-13 01:37:58 +00:00
Ilia Alshanetsky 351a686a7c MFH: Fixed bug #20896 (-s -w modes with php-cli cause php to hang). 2003-08-13 01:30:39 +00:00
Ard Biesheuvel 61c05dfc9f Fixed bug #23936 (fail to select and fetch) MFH 2003-08-13 01:28:32 +00:00
foobar 553fb5a3be MFH 2003-08-13 01:24:48 +00:00
Ilia Alshanetsky 35f457c92e Fix compile warning (unused variable) 2003-08-12 15:04:52 +00:00
foobar b855ab0dd4 MFH: fix test results (negative indices are not strings anymore) 2003-08-11 23:56:18 +00:00
Marcus Boerger 238aa7baee BFN 2003-08-11 20:24:58 +00:00
Marcus Boerger 46174f8ac8 BFN 2003-08-11 20:19:50 +00:00
Marcus Boerger 379040771d MFH: Bugfix 21918 2003-08-11 20:19:19 +00:00
SVN Migration 37a02a3984 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-08-11 20:14:26 +00:00
Marcus Boerger 575b38ee2f MFH: Bugfix #25044 2003-08-11 19:40:52 +00:00
Ilia Alshanetsky 977ec5eb4a MFH: Fixed bug #22245 (References inside $_SESSION not being handled). 2003-08-11 19:21:22 +00:00
Marcus Boerger 064cab8ac8 Add Ard as interbase maintainer 2003-08-11 18:54:57 +00:00
Ilia Alshanetsky d5fe19eb92 MFH: Fixed bug #22947 (Ack() inside win32/sendmail.c may stall in certain
situations). (Ilia)
2003-08-11 18:08:35 +00:00
Ilia Alshanetsky c2eb068c8a MFH: Fixed bug #25037 (Possible infinite loop inside SendText()) 2003-08-11 16:38:08 +00:00
Ilia Alshanetsky efc550eea3 MFH: Fixed bug #21957 (serialize() mangles objects with __sleep). 2003-08-11 04:57:55 +00:00
SVN Migration 3f54dd40b6 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-08-11 03:22:25 +00:00
foobar 7c0dd1251c MFH: fix compile warning 2003-08-11 02:08:32 +00:00
foobar 0d8beb77f6 MFH: nuked unused variable 2003-08-11 01:57:10 +00:00
foobar 1cab24458b MFH: fix compile warnings about unused variables 2003-08-11 01:55:14 +00:00
foobar cfc97c7d71 MFH: moved RINIT(crypt) stuff to crypt() itself. 2003-08-11 00:53:26 +00:00
foobar 30f1001553 MFH: - Fixed bug #25007 (rand() & mt_rand() seed RNG every call). 2003-08-11 00:43:32 +00:00
Ilia Alshanetsky 92d3c2a08e MFH: timeout fix 2003-08-09 23:15:19 +00:00
Ilia Alshanetsky 9cfcbd137b MFH: fixed test 2003-08-09 21:00:53 +00:00
Ilia Alshanetsky b74daafbcd MFH: Fixed bug #24897 (inconsistent behavior of shuffle() &
array_multisort())
2003-08-09 20:50:25 +00:00
SVN Migration af01cf787d This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-08-09 20:49:01 +00:00
foobar 6da25bdae8 MFH 2003-08-09 18:43:58 +00:00
Ilia Alshanetsky 6ffa3e1780 MFH: test correction 2003-08-09 18:40:53 +00:00
Ilia Alshanetsky ff35f925b7 BFN 2003-08-09 16:49:08 +00:00
Ilia Alshanetsky 6b0aaabc98 MFH: Added/improved tests for bugs 24142, 24063, 24951, 24980 2003-08-09 16:48:30 +00:00
Ilia Alshanetsky e60da236ae MFH: Do not assume array contains numeric values. 2003-08-09 16:47:21 +00:00
SVN Migration d58f597885 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-08-09 16:44:34 +00:00
Ilia Alshanetsky a25742e18f MFH: Detection of buggy compiler (gcc) 2003-08-09 16:13:47 +00:00
foobar b75c57e521 MFH 2003-08-09 15:46:48 +00:00
foobar 77a22a2835 BFN 2003-08-09 15:41:09 +00:00
foobar 0690aff6b5 - Fix possible crashes if PHP is linked with external libexpat and also
the bundled one is compiled in.
2003-08-09 14:26:40 +00:00
Derick Rethans f877a76a0e - MFH: Memleak fix 2003-08-09 11:22:40 +00:00
Moriyoshi Koizumi 605563c0a8 Test updates. 2003-08-09 06:14:51 +00:00
Moriyoshi Koizumi b2a7d2ed4e MFH(r-1.186): fix wrong behaviour under ZTS that was inconsistent with the
behaviour under non-ZTS
2003-08-09 06:12:41 +00:00
Ilia Alshanetsky b2bd6e465c MFH: Fixed bug #24980 (array_reduce() uses first element as default running
total).
2003-08-08 23:54:25 +00:00
Ilia Alshanetsky ceb065f9eb MFH: Fixed bug #24951 (ob_flush() needlessly destroys output handler). 2003-08-08 23:44:04 +00:00
Ilia Alshanetsky c2302046dd MFH: Avoid a round() bug that occurs due to over optimization of C code by
gcc.
2003-08-08 23:42:10 +00:00
Marcus Boerger bd6bd53646 Bugfix #24063 2003-08-08 20:23:07 +00:00
Ilia Alshanetsky c95bd4ad87 BFN 2003-08-08 13:55:06 +00:00
Ilia Alshanetsky 1167e85cf3 MFH: Fixed bug #24977 (Revert mysql_select_db optimization) 2003-08-08 13:36:44 +00:00
Ilia Alshanetsky 77225b912f MFH: Fixed bug #24909 (Bad random numbers with ZTS builds on Solaris) 2003-08-08 13:34:52 +00:00
foobar aa3a1426e8 correct version 2003-08-08 12:39:11 +00:00
Masaki Fujimoto 0072a36646 BFN 2003-08-08 11:44:25 +00:00
SVN Migration cecfd0ace4 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-08-08 10:52:51 +00:00
Ilia Alshanetsky d7409a9797 RC4 (hopefully it'll actually be the final) 2003-08-07 18:42:40 +00:00
Moriyoshi Koizumi 1560aabbaf MFH(r-1.10): Tru64 requires TZ values be POSIX styled 2003-08-07 17:46:40 +00:00
Ilia Alshanetsky 6ff7c1cedf RC3 is a go. 2003-08-07 17:42:02 +00:00
Zeev Suraski 6c7394101b Remove 'proto' from internal functions 2003-08-07 16:44:11 +00:00
Zeev Suraski c4845a8b65 Another broken prototype 2003-08-07 16:03:05 +00:00
Zeev Suraski 728ca44dff Fix prototype 2003-08-07 16:02:04 +00:00
Zeev Suraski 1af7f512bc That's slightly more accurate 2003-08-07 15:50:18 +00:00
Ilia Alshanetsky 07ff7f16c7 MFH: Fixed bug #24839 (& -> &amp; in php credits) 2003-08-07 15:41:43 +00:00
Ilia Alshanetsky bfcbf4bc19 BFN 2003-08-07 15:37:54 +00:00
Ilia Alshanetsky 69322ae43b MFH: Fixed bug #21958 (workaround for unusual realpath() on AIX & Tru64). 2003-08-07 15:32:37 +00:00
foobar 2dea730e08 MFH: dlfcn.h not found in solaris when using forte cc 2003-08-07 12:05:00 +00:00
Ilia Alshanetsky 84cc58d013 MFH: Fixed bug #24958 (Incorrect handling of 404s) 2003-08-06 22:34:20 +00:00
Moriyoshi Koizumi 165a1d62c8 Add missing NLS entry for German. 2003-08-06 21:59:42 +00:00
Vlad Krupin d5fba05f61 Fix for bug 23463. Dbase2 is not supported.
AFAICT, no newer versions of dbase, even those use
version byte as a bitmask will ever have it <3.
2003-08-06 19:01:08 +00:00
Pierre Joye 9868377fa0 - HTTP 1.2.1 2003-08-06 07:59:09 +00:00
Pierre Joye c25ed56914 - Remove old http 2003-08-06 07:58:16 +00:00
Tomas V.V.Cox a6aef8844f Added Mirror.php to PHP_4_3 branch 2003-08-06 02:13:05 +00:00
Tomas V.V.Cox 7d96d95a5e MFH for RC3 2003-08-06 01:58:30 +00:00
SVN Migration 79ff9f2fa3 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-08-05 23:22:09 +00:00
Brian France 79f338488e added include config.h so shared extensions builds work correctly 2003-08-05 20:54:43 +00:00
Ilia Alshanetsky 7c70a8f8c2 MFH: Fixed bug #18291 (escapeshellcmd() can now handle quoted arguments) 2003-08-05 20:16:47 +00:00
Ilia Alshanetsky 1e76a63719 MFH: Fixed bug #17414 (pthreads bug workaround). 2003-08-05 20:05:17 +00:00
foobar 29c92b6d91 MFH: fixed typos 2003-08-05 16:02:41 +00:00
Ilia Alshanetsky 7ec8b0bcba MFH: memory leak fix 2003-08-05 13:34:20 +00:00
foobar 370eecd336 correct blame :) 2003-08-05 12:36:57 +00:00
foobar f89eae47f2 BFN 2003-08-05 12:35:14 +00:00
foobar 3d598476ec MFH: - Fixed bug #21611 (version_compare() does not support "p" suffix) 2003-08-05 12:34:49 +00:00
Moriyoshi Koizumi b7d673db52 MFH(r-1.2): putenv() should be put here as well. 2003-08-05 12:29:41 +00:00
foobar e3d9b17e53 BFN 2003-08-05 11:22:24 +00:00
foobar dfba9a0ab0 MFH 2003-08-05 11:19:35 +00:00
foobar 47e16d8ad6 MFH: - Fixed bug #24936 (ext/fdf is not linked properly when compiled as shared extension). (Jani) 2003-08-05 11:17:25 +00:00
Ilia Alshanetsky f3618527a6 MFH: remove useless variable when mbstring is not used. 2003-08-05 01:01:40 +00:00
Edin Kadribasic ad2fa621bd Sync to LICENSE file in the distro 2003-08-04 22:30:04 +00:00
Sascha Schumann f2565109ea don't overwrite script_path_translated if no PATH_TRANSLATED was received 2003-08-04 19:05:05 +00:00
Ilia Alshanetsky b1a7a8d572 BFN 2003-08-04 17:15:06 +00:00
Ilia Alshanetsky 519c152527 MFH: Fixed bug #23104 (hash position of static arrays not being reset) 2003-08-04 17:14:16 +00:00
foobar 2e783c4dac MFH: Typo fixes 2003-08-04 14:36:52 +00:00
Uwe Schindler e95fbd1f2c MFH 2003-08-04 12:46:38 +00:00
Uwe Schindler fa40ecfec1 MFH 2003-08-03 19:31:13 +00:00
Moriyoshi Koizumi be27697628 MFH(r-1.3): disable the test temporarily because "-d" flags in the command
line doesn't take effect under CGI mode. (See the relevant portion of
cgi_main.c that begins at line 996)
2003-08-03 13:59:48 +00:00
Uwe Schindler 86842904be MFH 2003-08-03 11:23:25 +00:00
Ilia Alshanetsky 2556aa7b2a MFH: Fixed bug #24177 (Status not set correctly after flush() in Apache 2) 2003-08-02 18:30:22 +00:00
Ilia Alshanetsky 9f7f4f5bb8 MFH: Fixed bug #22072 (Apache2 sapis do not detect aborted connections) 2003-08-01 20:21:21 +00:00
Ilia Alshanetsky 85f4e2b191 MFH: Preserve exit status for non-php execution modes. 2003-08-01 16:53:03 +00:00
Ilia Alshanetsky e945608fa4 MFH: Fixed bug #23509 (exit code lost when exit() called from
register_shutdown_function())
2003-08-01 12:29:48 +00:00
foobar d892bf5333 MFH 2003-08-01 11:24:20 +00:00
foobar d3b271d04f hothothot 2003-08-01 10:08:57 +00:00
Ilia Alshanetsky 498c4ce19d Fixed bug #24871 (methods misidentified as constructors) 2003-08-01 02:17:31 +00:00
Ilia Alshanetsky 6f53bb90e4 Added skip condition 2003-08-01 02:15:56 +00:00
Ilia Alshanetsky e57d86daef MFH: Fixed bug #24883 (variables created through register_globals, ignore
gpc_order and variables_order).
2003-07-31 23:00:21 +00:00
Ilia Alshanetsky b050f6e430 MFH: Fixed bug #22154 (Possible crash when memory_limit is reached and
output buffering in addition to session.use_trans_sid is used).
2003-07-31 19:48:05 +00:00
foobar 8caea61bd3 MFH 2003-07-30 21:57:02 +00:00
Ilia Alshanetsky 8b2dc6853a BFN 2003-07-30 17:57:19 +00:00
Ilia Alshanetsky 02a1624d22 MFH: Fixed bug #24873 (incorrect handling of / inside open_basedir) 2003-07-30 17:55:21 +00:00
Ilia Alshanetsky c09cdb4a07 MFH: Fixed bug #23792 (8 bit graphics don't rotate properly) 2003-07-30 17:34:23 +00:00
Ilia Alshanetsky 2e870b76c6 Revert fix for bug #22836 2003-07-30 16:12:32 +00:00
foobar 687e73c7af MFH 2003-07-30 14:09:52 +00:00
Ilia Alshanetsky 71be643056 Set proper php4 sources tag 2003-07-30 13:21:15 +00:00
Ilia Alshanetsky e975382a82 Restore version. 2003-07-30 13:20:50 +00:00
Ilia Alshanetsky 35a8ad18a9 4.3.3RC2 is a go 2003-07-30 13:01:59 +00:00
Ilia Alshanetsky 349a98d388 MFH: persistent streams patch 2003-07-29 18:26:59 +00:00
Ilia Alshanetsky c65fd57a24 Test case & news for bug #22836. 2003-07-29 17:54:15 +00:00
foobar b459ec5cdb BFN 2003-07-29 11:20:39 +00:00
foobar e187fad2d1 MFZE2: made each() binary safe for keys 2003-07-29 11:19:47 +00:00
foobar 8182575647 past tense plus full name :) 2003-07-29 11:05:17 +00:00
Stefan Roehrich f9938a3e9a # Forgot NEWS entry for openssl change (rev. 1.52.2.15). 2003-07-29 09:40:04 +00:00
Ilia Alshanetsky ca50da933e MFH: Fixed a double free bug when freeing persistent streams. 2003-07-28 18:57:49 +00:00
Ilia Alshanetsky f43b7faec5 Backport virtual_realpath() from PHP5. This fixes a memory leak that would
occur inside every virtual_realpath() call.
2003-07-28 18:35:34 +00:00
Ilia Alshanetsky ba533a91c4 MFH: Make pclose() respect references. 2003-07-28 14:42:56 +00:00
foobar ae171ce2d2 MFH 2003-07-28 10:44:59 +00:00
Zeev Suraski 97662dc30e Fix nameclash with NSAPI API 2003-07-28 07:28:55 +00:00
Ilia Alshanetsky fc8b10cf71 MFH: Fixed bug #13142 (strtotime not handling "M d H:i:s Y" format) 2003-07-28 04:02:55 +00:00
SVN Migration a6901dc7ba This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-07-28 04:01:33 +00:00
Ilia Alshanetsky 7297a2b02e MFH: Fixed bug #24557 (make fclose() respect refcount on the resource). 2003-07-27 18:46:03 +00:00
Ilia Alshanetsky a4d484b478 MFH: Fixed bug #24827 (ob_gzhandler overrides Vary header) 2003-07-27 18:16:47 +00:00
Marcus Boerger d3399f8f25 MFH: Do show skipif's info 2003-07-27 16:59:04 +00:00
foobar 5b1dd1818c some missing static with internal funcs. 2003-07-25 12:45:05 +00:00
foobar 04e9bdd516 MFH 2003-07-25 12:16:04 +00:00
Edin Kadribasic f5c49771df Export symbols needed for shared extensions. 2003-07-25 11:27:39 +00:00
foobar 7759a36327 Fix BFN, this was really MY patch that fixed it. :-p 2003-07-25 09:47:06 +00:00
Harrie Hazewinkel fb51a889f4 Adding bugfix. 2003-07-25 07:36:42 +00:00
Harrie Hazewinkel facd6c20c8 Bug 24760 fix, in which the port number when non-default is not handled
correctly and ends up as the default port. This seems to be caused by
some buffer overflow where the port number is assign zero, even though
it it is not assigned to the port variable.
Fix was reported and a fix proposed by "chuck+php at 2003 dot snew dot com"

(Bugfixing branch)
2003-07-25 07:32:39 +00:00
Moriyoshi Koizumi 5e0da82b7f MFH(r-1.168): fix run-test.php so it can correctly handle skip conditions. 2003-07-25 05:52:26 +00:00
Jason Greene 9dbbc057c5 MFH: fix for #24629 2003-07-25 01:50:09 +00:00
foobar 886184c38e keep the style.. 2003-07-24 19:58:30 +00:00
Uwe Schindler 3da82597bb revert the shitty whitespace patch... 2003-07-24 19:16:25 +00:00
Uwe Schindler c2de8f4282 put $Id:...$ in readme 2003-07-24 17:46:57 +00:00
Ilia Alshanetsky 0ea41bf2b1 MFH:
When encountering a test that users GET/POST make run-tests.php
  use CGI sapi if it is avaliable.
  If CLI sapi is not avaliable print a clear error when make test
  is executed.
2003-07-24 17:45:15 +00:00
Uwe Schindler 7e3fa7bd59 MFH: Possibility to use php4_execute to display server error pages or directory listing pages 2003-07-24 17:42:40 +00:00
Wez Furlong cf9cec3562 BFN 2003-07-24 15:25:14 +00:00
Wez Furlong e680c28694 MFH: Fix for #24629 2003-07-24 15:23:14 +00:00
foobar 8db0c60f58 BFN 2003-07-24 10:50:49 +00:00
foobar fba6b0da53 MFH 2003-07-24 10:42:17 +00:00
foobar 916627208c MFH 2003-07-24 10:25:34 +00:00
SVN Migration 8da6929e93 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-07-24 10:25:16 +00:00
foobar 385db5abbd MFH 2003-07-24 10:13:44 +00:00
SVN Migration fd4d2df3e6 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-07-24 10:13:18 +00:00
foobar 7076a84b83 - No OnUpdateLong in this branch. 2003-07-24 09:15:05 +00:00
Zeev Suraski 957fcfac4b MFH fix for bug #19613 2003-07-24 08:04:20 +00:00
foobar 77ec263329 MFH: missing cvs Id tags, proto fixes 2003-07-24 02:53:46 +00:00
foobar d496c5f4a5 - MFH: Sync to HEAD (TSRMLS_FETCH() nukes, pval -> zval, php_error_docref) 2003-07-24 02:47:11 +00:00
foobar 372fe3128c nitpicking again :) 2003-07-24 01:56:06 +00:00
Ilia Alshanetsky ff8670e601 MFH: zlib fix 2003-07-24 00:03:51 +00:00
Wez Furlong 451deb0101 Fix this test, at least for Tru 64 where 1 second it just too small an
interval for the test to succeed.
2003-07-23 21:48:50 +00:00
Ilia Alshanetsky b278b99605 MFH: Fixed GLOB_ONLYDIR to work on GNU libc based system. 2003-07-23 21:41:53 +00:00
Ilia Alshanetsky 1d5ca2f45e BFN 2003-07-23 16:56:05 +00:00
Ilia Alshanetsky fc0799f0ca MFH: Removed unused variables. 2003-07-23 16:54:54 +00:00
Ilia Alshanetsky 3a43c4124f MFH: Fixed bug #24752 (Unhandled "uniqueidentifier" field type) 2003-07-23 16:53:38 +00:00
Ilia Alshanetsky d197a131db MFH: Fixed #24609 (segfault when using replace node across different docs)
Patch by: Rob Richards

# This patch somehow did not make it into 4.3.X, so on Rob's request in am
# MFHing it in.
2003-07-23 16:44:27 +00:00
Ilia Alshanetsky 7be9dcd263 BFN 2003-07-23 16:07:00 +00:00
Ilia Alshanetsky 117395ed23 MFH:
Fixed bug #23798 (Spaces were not being stripped from Bcc header)
Fixed bug #24663 (\n. sequences were not being escaped)
2003-07-23 16:03:27 +00:00
Pierre Joye 7d40544703 MFH (test #24594) 2003-07-23 15:37:47 +00:00
Pierre Joye 064e743014 MFH (#24594) 2003-07-23 15:37:14 +00:00
SVN Migration 701da1fa4d This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-07-23 00:17:30 +00:00
Marcus Boerger 224e070c74 MFH: The value might be a null pointer 2003-07-22 22:06:05 +00:00
Ilia Alshanetsky c1dc317791 BFN 2003-07-22 16:07:01 +00:00
Ilia Alshanetsky add133a4c6 MFH: r1.196: mysql_fixes 2003-07-22 16:06:09 +00:00
Zeev Suraski 383d813dd9 Fix potential crash (zend_hash_get_current_key_ex() doesn't touch the string arguments if
the key is not a string!)
2003-07-22 15:46:48 +00:00
Edin Kadribasic 9a53d1b4fe New curl lib needs additional libs to link (#24725) 2003-07-22 12:34:38 +00:00
Sascha Schumann 2fe43e8af8 fix typo, shorten line 2003-07-22 01:39:52 +00:00
Ilia Alshanetsky f55e1330d5 BFN + proper credit for session bug fix. 2003-07-22 01:35:02 +00:00
Ilia Alshanetsky 9e09a7c02b MFH: r1.165 safe_mode patch 2003-07-22 01:32:21 +00:00
Sascha Schumann 07b9f0c1d5 Proper fix for #24592
The core issue is that undefined variables are refcounted (refcount != 0)
while is_ref is still set to 0.  I don't know whether this is a bug in
the engine, but is it not the first time this irregularity has caused
problems for the session extension.

The irregularity confused ZEND_SET_SYMBOL_WITH_LENGTH which then did
the wrong thing WRT null values.

Fortunately, nulls can simply be ignored in this case, thus the old
code is restored and a new condition is added.
2003-07-22 01:10:30 +00:00
Ilia Alshanetsky 61fc0ba6b2 MFH: Fixed bug #24592 (Possible crash in session extnsion, with NULL values). 2003-07-21 21:49:52 +00:00
SVN Migration 10bb058051 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-07-21 21:47:53 +00:00
Uwe Schindler 7ba06d0145 some code cleanups 2003-07-21 14:20:30 +00:00
foobar 1b48b07ee4 nitpicking right from the start.. :) 2003-07-21 14:03:42 +00:00
Ilia Alshanetsky e941298e55 MFH: Fixed bug #24560 (parse_url() incorrectly handling certain file://
based schemas).
2003-07-21 13:37:10 +00:00
foobar be2763d13d expat upgrade news 2003-07-21 08:43:27 +00:00
foobar ef440f1b4e - Upgraded bundled Expat library to 1.95.6 (Jani)
# Fixes bug #20442 (and possibly others not reported to us)
2003-07-21 08:42:49 +00:00
foobar d990e2881b MFH 2003-07-21 08:27:47 +00:00
foobar 0c4cf5aff2 - CURLOPT_ENCODING is always defined, check the version instead. 2003-07-20 15:19:39 +00:00
foobar 38b3ef790b MFH: missing CVS Id tags and license headers 2003-07-20 10:54:03 +00:00
foobar fd7bb0b3da extra period :) 2003-07-19 15:37:08 +00:00
Moriyoshi Koizumi 2298aaef75 BFN 2003-07-19 15:11:12 +00:00
foobar 123a5c20d8 MFH 2003-07-18 12:29:54 +00:00
foobar d60fc0981b MFH: test case for bug #24573 2003-07-18 12:25:09 +00:00
SVN Migration 70491a7ea0 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-07-18 12:24:50 +00:00
foobar 0b49f0bea0 BFN 2003-07-18 12:19:17 +00:00
foobar 33108da1d0 BFN 2003-07-18 09:28:53 +00:00
Sergey Kartashoff 1674a79e11 - UDM_PARAM_SORT_ORDER has been added in Udm_Set_Agent_Param while
using with mnogosearch-3.2.14+ to set order of search results.
2003-07-18 09:15:09 +00:00
Sergey Kartashoff 6f581e803c - Coredump in Udm_Find was fixed. 2003-07-18 08:48:34 +00:00
foobar 9c7d125108 removed the extra CVS Id tag. 2003-07-18 01:40:50 +00:00
foobar 5fc1090dbe MFH: Fixed bug #24640 (var_export and var_dump can not output large float). (Marcus) 2003-07-18 01:37:44 +00:00
Marcus Boerger 2057041621 BFN 2003-07-17 22:23:16 +00:00
Marcus Boerger 3cadadee34 MFH 2003-07-17 22:14:44 +00:00
SVN Migration 660d1fe292 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-07-17 21:02:45 +00:00
Marcus Boerger d3cc1a3186 MFH: Fix handling of empty settings 2003-07-16 20:56:06 +00:00
Sebastian Bergmann 274237f4d2 MFH: /libpath directives for zlib 2003-07-16 14:50:26 +00:00
foobar 602241f936 bfn 2003-07-16 08:47:49 +00:00
foobar 7880b84ba7 MFH: Fixed bug #22690 (ob_start() broken with create_function() callbacks). (Marcus) 2003-07-16 08:45:31 +00:00
foobar e9c4ca1b61 MFH 2003-07-16 06:04:01 +00:00
foobar c0bc7b6c80 MFH: this is internal function -> static 2003-07-16 05:47:56 +00:00
foobar 0934f19c69 MFH 2003-07-16 05:46:46 +00:00
foobar 41441e017a MFH 2003-07-16 05:16:49 +00:00
foobar 1277a79544 Update credits. 2003-07-16 05:15:07 +00:00
foobar ce527f42cd Fix the credits (partial MFH) 2003-07-16 05:14:35 +00:00
foobar edb801394b MFH 2003-07-16 04:54:55 +00:00
foobar c40e1cbbfc MFH 2003-07-16 00:39:33 +00:00
SVN Migration faff0dbd45 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-07-16 00:38:55 +00:00
Uwe Schindler dff2f35098 MFH: safe mode fix 2003-07-15 22:19:23 +00:00
Uwe Schindler 261429dc52 MFH: Make virtual() an alias for nsapi_virtual() -- better for docs/naming in future 2003-07-15 17:31:03 +00:00
Hartmut Holzgraefe 2db6b7e8f1 MFH 2003-07-15 17:28:54 +00:00
Hartmut Holzgraefe 9aa1cce146 MFH 2003-07-15 17:05:03 +00:00
foobar 8c766b9670 MFH 2003-07-15 07:06:52 +00:00
Edin Kadribasic 0777e6062c BFN 2003-07-14 23:25:24 +00:00
Edin Kadribasic 8d4a2eabb8 Fixed bug #24949. 2003-07-14 23:20:01 +00:00
foobar 2a836845c8 MFH 2003-07-14 16:23:28 +00:00
foobar 5c4f19b7c5 - Sync with HEAD. (php_error -> php_error_docref, proto fixes, code cleanup) 2003-07-14 16:13:30 +00:00
foobar 63a8f46dda Bump year to 2003 2003-07-14 16:02:32 +00:00
foobar 3d972fcc0e Year update 2003-07-14 15:59:18 +00:00
Rui Hirokawa d69e7b6d04 fixed a typo. 2003-07-14 13:31:44 +00:00
Wez Furlong f0623f78eb less WTF factor 2003-07-14 10:43:51 +00:00
foobar 2891206718 MFH 2003-07-14 03:58:59 +00:00
Moriyoshi Koizumi c4ab6c2cad MFH: fixed leaks that occurs if the third parameter already contains a valid
value.
2003-07-13 19:46:39 +00:00
Stefan Roehrich 56b4205f38 MFH: fixed certificate version, serial number not always 0. 2003-07-13 10:13:24 +00:00
SVN Migration 35b40bdb2a This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-07-13 08:03:47 +00:00
Rui Hirokawa 63289837ae added strict detection mode in mb_detect_encoding to detect corrupted byte sequence. 2003-07-13 07:34:28 +00:00
Martin Jansen 439596bce5 * MFH 2003-07-12 15:18:02 +00:00
Moriyoshi Koizumi f725d7b180 MFH(r-1.393): fixed bug #24556 2003-07-12 09:33:58 +00:00
foobar 933ef3298a MFH 2003-07-11 07:49:10 +00:00
Frank M. Kromann 16b3e1e406 Sync protos with HEAD 2003-07-11 06:04:43 +00:00
Frank M. Kromann d560e58711 Allow the use of both ming 0.2a and 0.3a (API\s changed) 2003-07-11 05:54:45 +00:00
foobar 29a8e606f3 BFN 2003-07-11 04:32:31 +00:00
foobar b4f086b52a BFN 2003-07-11 04:30:40 +00:00
foobar cf33623715 BFN 2003-07-11 04:24:37 +00:00
foobar 894e2f15f0 MFH: Fixed bug #21074 (Apache2: "ErrorDocument xxx /error.php" broken). 2003-07-11 04:24:11 +00:00
foobar e7175cbecf MFH: Fixed bug #17291 (mssql_query does not update get_last_message) (patch by: mgruetzner at rw3 dot com) 2003-07-11 02:08:38 +00:00
foobar 241945e11f MFH: sync 2003-07-11 01:57:39 +00:00
foobar 1aecd0f1ff MFH: Use the proper way to get the max requests per child. 2003-07-10 22:45:34 +00:00
foobar 9cb84b6351 MFH: Fixed bug #24563 (preg_match() crashes PHP under Apache2) 2003-07-10 16:09:43 +00:00
Frank M. Kromann cc68ee790e Adding missing compression paramters to output functions 2003-07-10 05:07:46 +00:00
foobar e786476701 MFH: revert previous patch, it was not correct. 2003-07-10 01:40:10 +00:00
foobar a48ac52a7d MFH: Fix crash bug 2003-07-10 01:17:46 +00:00
foobar 9e33cdb499 MFH: Fixed bug #11924 (ibase_query() and ibase_execute() mangled passed parameters) 2003-07-10 00:17:40 +00:00
Pierre Joye 5de9ca91cb - MFH 2003-07-10 00:11:11 +00:00
foobar f2d8bb4c38 Fixed bug #24519 (aggregate_methods_by_list() does not increment refcount) 2003-07-09 23:16:21 +00:00
Frank M. Kromann bd719279db oops. fix spelling 2003-07-09 22:38:36 +00:00
Frank M. Kromann 4f16113988 Adding missing MSSQL Server ini settings 2003-07-09 22:36:28 +00:00
Jay Smith fb79cfb853 MFH: - fixed bug #24548 (get_browser() does not return platform) 2003-07-09 18:51:18 +00:00
Brad House 1a0e3b62e2 bugfixes: typecasting issues. don't assume long and int are the same size, as they are not on 64bit architectures. New CONSTANTS were not cast at all yet. MC_TTID was cast as a long, when it should have been a MCVE_int64 (normally long long). 2003-07-09 13:48:33 +00:00
Edin Kadribasic af30033599 How did this get uppercased ;) 2003-07-09 11:08:51 +00:00
Edin Kadribasic b6c6a8db3a For Pierre-Alain Joye. 2003-07-09 11:07:27 +00:00
Pierre Joye 07b70c743c - MFH 2003-07-09 10:43:01 +00:00
Pierre Joye ca7ad2ff2c - MFH 2003-07-09 10:38:22 +00:00
Pierre Joye 79e4f5a47f - MFH 2003-07-08 20:39:46 +00:00
foobar 2be22abf64 MFH 2003-07-08 14:13:10 +00:00
Sergey Kartashoff 2fafe59ed2 - Output of UDM_PARAM_WORDINFO_ALL was fixed 2003-07-08 14:00:58 +00:00
foobar 3687e5e953 MFH: - Fixed bug #24537 (apache2 compile missed include directories) 2003-07-08 13:54:14 +00:00
Sergey Kartashoff 4c1c759343 - Udm_Find function is fixed to be compatible with mnogosearch-3.2.13 2003-07-08 13:27:30 +00:00
Derick Rethans ef32b131ce - MFH: Fixed email addresses 2003-07-08 09:44:34 +00:00
Wez Furlong 792645aa6f update activescript info 2003-07-08 09:12:00 +00:00
Wez Furlong 8055bab946 Fix leak when loading constants from a type-library. 2003-07-08 09:10:42 +00:00
Sascha Schumann 19928d2509 grep -E -> egrep 2003-07-08 05:35:48 +00:00
Brad House c0f72d9fac update mcve ext from HEAD. Sync with libmcve-3.2 functionality 2003-07-08 03:16:39 +00:00
foobar 77b6cdb7dd Missing entries 2003-07-07 22:51:27 +00:00
foobar f71e66e50d MFH 2003-07-07 22:51:16 +00:00
Moriyoshi Koizumi 71461f74b2 MFH(r-1.9): updated test so it won't fail if the extension has been built with
libiconv
2003-07-06 21:45:00 +00:00
Moriyoshi Koizumi dfbeb6b786 oops again.. 2003-07-06 21:12:59 +00:00
Moriyoshi Koizumi 3e1affd647 MFH(r-1.22, r-1.90, r-1.18): avoid miscellaneous conflicts between glibc's
iconv and libiconv.
2003-07-06 21:11:51 +00:00
Moriyoshi Koizumi 1ba9226cb5 MFH(r-1.17): added missing includes 2003-07-06 18:09:21 +00:00
Jon Parise 7f2c03ed0e Upgrade the bundled Mail package to 1.1.1 (1.1.0 was a bit broken). 2003-07-05 21:47:09 +00:00
Hartmut Holzgraefe 251b1ad96b MFH 2003-07-04 15:07:56 +00:00
Hartmut Holzgraefe c8e7bc0542 MFH 2003-07-04 14:40:22 +00:00
SVN Migration ab3957bda7 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-07-04 14:38:08 +00:00
Pierre Joye 5320379dc0 - Fix broken installer 2003-07-04 11:04:07 +00:00
Sascha Schumann f6b36353a6 Quote all instances of ) when used in case..esac constructs
Some m4 versions appear to drop these when certain macros are used
recursively.
2003-07-03 22:54:07 +00:00
Frank M. Kromann e5523b4954 Change fetch functions and protos so they make more sense.
fetch_row or fetch_assoc should  not take the optional parameter
2003-07-03 16:47:10 +00:00
Moriyoshi Koizumi de9f401877 MFH(r-1.56): added missing protos 2003-07-03 15:39:51 +00:00
Marcus Boerger 46fd530566 MFH: Fix open mode (noticed by FutureQuest, Inc.) 2003-07-03 11:23:27 +00:00
Uwe Schindler b6b4369972 fix typo 2003-07-02 22:40:13 +00:00
Moriyoshi Koizumi 3aeaad418f MFH(r-1.4, r-1.2): s/cvs/csv/ 2003-07-02 17:09:26 +00:00
foobar b2bedbf40e BFN 2003-07-02 14:05:44 +00:00
Uwe Schindler 62ef1e2857 Prevent user from making nested PHP requests with virtual() 2003-07-02 13:37:39 +00:00
Pierre Joye 0d03073c89 - tabs... 2003-07-02 11:33:35 +00:00
Pierre Joye 1ebbe4d551 - MFH 2003-07-02 11:24:52 +00:00
Pierre Joye 1d14341231 - MFH 2003-07-02 10:38:09 +00:00
Sascha Schumann b4c03fb0a9 Always store temporary information in LDFLAGS
This also avoids use of PHP_RUN_ONCE which caused some config.m4s to fail.
2003-07-02 03:03:41 +00:00
foobar 9eeb62c4a3 MFH: Be more verbose about what is installed (and in CGI case, WHERE) 2003-07-02 02:48:16 +00:00
Ilia Alshanetsky 116f2fa00a MFH: crash fix 2003-07-02 02:04:22 +00:00
Sascha Schumann d6fbae0c27 Fix install-sapi dependency - it should depend on OVERALL_TARGET, of course. 2003-07-02 01:06:29 +00:00
Sascha Schumann 6c37499531 Make PHP_CHECK_LIBRARY use PHP_EVAL_LIBLINE which automatically
eliminates /usr/lib references
2003-07-01 23:54:44 +00:00
foobar 7a92fe4c4c MFH: Separate CGI install from install-sapi. 2003-07-01 17:03:55 +00:00
foobar 986b654098 MFH 2003-07-01 16:20:53 +00:00
foobar ef7c1af78d MFH: Added --help to phpize 2003-07-01 15:55:27 +00:00
foobar 2a8c1bb255 MFH 2003-07-01 13:34:04 +00:00
Corne' Cornelius ef2d599f45 - Removed unlink() from php_intifx_create_blob() and replaced with a php_copy_file() 2003-07-01 12:37:12 +00:00
Corne' Cornelius 627c9515b1 - Fxied bug in php_intifx_init_blob_infile() where blob.loc_loctype wasn't set 2003-07-01 10:56:17 +00:00
Edin Kadribasic fc846109ba Some more cvs cleanup 2003-07-01 08:10:33 +00:00
Edin Kadribasic 5775569f18 Touch 2003-07-01 08:08:43 +00:00
Sascha Schumann 55b41157cf properly restart syscalls 2003-07-01 05:28:53 +00:00
Sascha Schumann 5ba98ed5d3 MFH
(jason) Prevent lines following the version output from confusing
the version test
2003-07-01 04:25:32 +00:00
foobar 69e0f3bf48 MFH: Fixed bug #24025 (Can not build with shared ldap support) 2003-07-01 00:02:29 +00:00
Shane Caraveo 97422095ed MFH 2003-06-30 21:10:33 +00:00
Marcus Boerger 40acbc1ea5 MFH: Do not test postgres settings 2003-06-30 18:00:55 +00:00
Sergey Kartashoff 94a9447396 - A memory leaks at UdmCatPath and UdmCatList functions have been fixed. 2003-06-30 17:44:20 +00:00
foobar 8229beefa4 MFH 2003-06-30 17:30:47 +00:00
SVN Migration 6a62b9d5b7 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-06-30 17:30:17 +00:00
foobar bf6c5ff7c1 minor correction. :) 2003-06-30 13:37:43 +00:00
Andrei Zmievski e6177356ec *** empty log message *** 2003-06-30 13:28:20 +00:00
Ilia Alshanetsky 53b384c01d MFH: fix for bug #24063 2003-06-30 01:05:02 +00:00
SVN Migration b66f3b08bb This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-06-30 01:03:22 +00:00
Edin Kadribasic 92e30ad3df Fixed win32 build 2003-06-30 00:44:03 +00:00
Edin Kadribasic 17e89935c4 Winsock2 doesn't seem to work in PHP_4_3 2003-06-29 23:59:20 +00:00
Edin Kadribasic 04ced9d63d Fixed CVS screw-up leftovers 2003-06-29 23:49:39 +00:00
Edin Kadribasic 555173a263 MFH: extensions like imap need this exported 2003-06-29 23:29:49 +00:00
foobar 54391bb2ca reorder 2003-06-29 23:02:33 +00:00
Shane Caraveo ea0f710586 stuff 2003-06-29 21:37:11 +00:00
Shane Caraveo 5a2899b78e MFH
renable -b option (removed when longopts were added)
dissable -b on windows due to fastcgi lib bug
close stdin on linux when using socket server (bug 23664)
2003-06-29 20:45:53 +00:00
Shane Caraveo f26cc7bcd4 MFH
fix bug http://bugs.php.net/bug.php?id=24009
also do not use APPL_PHYSICAL_PATH as DOCUMENT_ROOT under IIS, it's
different depending on IIS configuration.  Code works fine without it, that
was just an attempt at a shortcut.
2003-06-29 20:09:56 +00:00
Pierre Joye 08bc2cde18 - Sync from head (DB 1.5RC1) 2003-06-29 19:42:57 +00:00
SVN Migration a5d361d9c4 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-06-29 19:40:14 +00:00
Ilia Alshanetsky 96d4171df7 Fixed bug #24340 (basename failure win32 with containing both \ and /) 2003-06-29 15:36:10 +00:00
foobar fd2aaa768a MFH: Fixed bug #24363 (plain "./configure && make install" failed) 2003-06-29 06:04:04 +00:00
foobar 24f73838f2 Note about PCRE upgrade 2003-06-29 02:08:16 +00:00
Andrei Zmievski 2b97f7ce7b - Added a new parameter to preg_match_* functions that can be used to
specify the offset to start matching from.
- Added support for named subpatterns.
2003-06-29 00:08:30 +00:00
Martin Jansen e7e577e05d * MFH: Silence warning 2003-06-28 18:15:35 +00:00
Sascha Schumann 52bdfd3dca Fix snprintf test.
C99 allows for the Single Unix Spec semantics which prescribe a return
value of -1 for n == 0 which is treated as an encoding error.
This reenables use of snprintf on Solaris at least.

Relevant excerpts from ection 7.19.6.5:

    Description

    [..] If n is zero, nothing is written, and s may be a null pointer. [..]

    Returns

    The snprintf function returns the number of characters that would have been
    written had n been sufficiently large, not counting the terminating null
    character, or a negative value if an encoding error occurred.

Single Unix Spec:

http://www.opengroup.org/onlinepubs/007908799/xsh/fprintf.html
2003-06-28 12:29:07 +00:00
Rui Hirokawa 0e29833fc7 deleted code for debuging. 2003-06-28 11:00:37 +00:00
Rui Hirokawa 92c07fbccc Fixed corruption of multibyte character including 0x5c as second
byte in multipart/form-data.
2003-06-28 08:51:05 +00:00
Ilia Alshanetsky bc3d6e90fa MFH: Added missing handling of dateTime 2003-06-28 06:59:31 +00:00
SVN Migration 056e268cb3 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-06-28 06:55:48 +00:00
Sascha Schumann 50eb9f576a Serialize headers for systems with low IOV_MAX (e.g. Solaris) 2003-06-27 18:40:55 +00:00
foobar 0db5048d6a MFH 2003-06-27 16:42:51 +00:00
Sebastian Bergmann eed604dce5 libpcre 4.X needs POSIX_MALLOC_THRESHOLD to be defined. 2003-06-27 16:42:49 +00:00
Sara Golemon 97b55a966d Plug the last (hopefully) of the PHP4 context leaks. This one regarding notifier->ptr 2003-06-27 16:16:46 +00:00
Andrei Zmievski 8d5a034c9d Upgrading PCRE library to version 4.3 2003-06-27 14:47:55 +00:00
Sascha Schumann de6e5e315d undefine macros before defining them 2003-06-27 07:43:05 +00:00
Sascha Schumann 8a44b6f251 Try to link the getaddrinfo test, so that one can disable it using
-Dgetaddrinfo=NO_getaddrinfo.
2003-06-27 07:07:03 +00:00
Sara Golemon e6770d6361 Plug *half* a leak in context notifiers.
We still need a check and zval_ptr_dtor(&context->notifier->ptr); in the
php_stream_context_free function, but since ptr is supposed to be a general
purpose container we need to define how that will be done.
2003-06-27 03:40:55 +00:00
Sara Golemon e5d8e11306 MFH: Plug memory leaks when freeing contexts (particularly options) 2003-06-27 01:46:30 +00:00
Sara Golemon 821b603ec2 MFH streamsfuncs.c r-1.22 2003-06-27 01:32:26 +00:00
Sascha Schumann 34363d77db MFH Don't add -L/usr/lib 2003-06-27 00:37:53 +00:00
Sascha Schumann 7a8260d5e0 Eliminate need for automake/aclocal 2003-06-27 00:19:26 +00:00
foobar 1f1d49bbd6 Fixed bug #24261 2003-06-26 18:06:46 +00:00
Pierre Joye 0e82616ea6 - reapply the fix about binary safe write mode (fix multiple sapi bug) 2003-06-26 14:38:04 +00:00
Pierre Joye 9a68a887f0 - MFH 2003-06-26 08:45:51 +00:00
foobar f2b405924d - Crap removal. 2003-06-25 23:09:12 +00:00
Ilia Alshanetsky eee7417f1f Missing bit of the previous patch. 2003-06-25 18:06:56 +00:00
Ilia Alshanetsky db48c076a6 Added sqlite_single_query() function
Fixed a typo in sqlite_array_query() that prevented the acceptance of the
decode_binary parameter.
2003-06-25 17:02:56 +00:00
SVN Migration 5a15aee0e0 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-06-25 16:59:25 +00:00
Edin Kadribasic d67afcc9c1 Fixed win32 build 2003-06-25 13:21:54 +00:00
Sascha Schumann b09f475602 make ze1/ze2 coexist 2003-06-25 13:00:46 +00:00
foobar c4e6c0aa83 BFN 2003-06-24 18:00:13 +00:00
Ilia Alshanetsky e459214613 MFH: Fixed bug #24312 (base64_decode() does not skip 0xF0-0xFF characters) 2003-06-24 15:26:10 +00:00
SVN Migration 3dbe3deb64 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-06-24 15:23:18 +00:00
Ilia Alshanetsky 701c81c7d1 MFH: typo fix. 2003-06-24 14:36:18 +00:00
Ilia Alshanetsky 557fd9b7a3 MFH: Fixed bug #24313 (file_exist() warning on non-existent files when
open_basedir is used).
2003-06-24 13:44:57 +00:00
Sascha Schumann ae3de7f0c0 Test commit 2003-06-24 01:03:07 +00:00
Ilia Alshanetsky 43b0c8adea Fixed a crash inside sqlite_array_query() when invalid query
is specified.
2003-06-23 19:30:42 +00:00
Pierre Joye c70f036024 - MFH packages 2003-06-22 20:11:27 +00:00
Ilia Alshanetsky d74a72d580 MFH: Fixed bug #24284 (Fixed memory leak inside pg_ping()) 2003-06-22 16:48:16 +00:00
Marcus Boerger 40d758b019 MFH: Fix possible SEGV 2003-06-22 15:55:31 +00:00
Wez Furlong b390e0ebf1 Don't raise two warnings when connection attempt failed. 2003-06-22 10:07:20 +00:00
Harrie Hazewinkel ab2ea18cb5 Applying the contributed patch of Johan hanne.
The patch enables control on the way the values are returned
into the PHP script, instaed of always strings. Also the type
of the value is now returned when configured to do so.
This enables better management scripts to do more automatic
processing and value calculations.
2003-06-21 21:50:01 +00:00
SVN Migration ea33b2824e This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-06-21 13:50:44 +00:00
Derick Rethans 140e562446 - MFH: Test for bug #17115 2003-06-21 12:05:45 +00:00
Ilia Alshanetsky 9209328fd3 Fixed bug #24253 (missing variables when register_globals is on)
Fixed a memory leak when more then 1 E|S flag is passed to gpc_order.
Fixed a memory leak when variables_order is not set and gpc_order has S|s
flag.
Optimized out duplicate parsing of the variables order string.
2003-06-20 17:00:16 +00:00
Sara Golemon 35938e4d90 MFH (r-1.391) When skipping blank searchvals we should advance the corresponding replace hash as well 2003-06-20 15:44:48 +00:00
Ilia Alshanetsky 316d124ec4 Added missing safe_mode checks 2003-06-19 22:18:58 +00:00
Wez Furlong b1f59b4703 Tidy up getaddrinfo() code so that it can handle broken ipv6 stacks and only
returns TCP addresses for TCP and UDP addresses for UDP requests respectively.

Also, when a connect call "returns" EINPROGRESS and the full timeout limit
has not yet been reached, retry the select with the remaining time interval.
This is a potential fix for Bug #21653.

# Note: atm, the fix is Linux specific; will do some more work to make this
# portable at the weekend.
2003-06-19 22:11:39 +00:00
Ilia Alshanetsky 08ce3d0ed5 MFH (possible streams crash) 2003-06-19 16:43:41 +00:00
Ilia Alshanetsky e39472c606 MFH: Fixed memory leak, when invalid context is specified. 2003-06-19 16:35:29 +00:00
Ilia Alshanetsky 3924c1eabf Fixed a possible crash in parse_context_options() 2003-06-19 16:10:37 +00:00
Marcus Boerger 929ab8b529 MFH: Allow the extension to reside elsewhere 2003-06-19 15:48:18 +00:00
Ilia Alshanetsky da55120b84 MFH: Fixed a crash inside php_imagettftext_common(); 2003-06-19 15:48:09 +00:00
foobar b1c0e42d00 - Added the 'header'. These 4.3.3RCx sections will be combined for the
final release, 4.3.3. just added them now to keep better track on changes
  between the RCs.
2003-06-18 23:24:13 +00:00
Pierre Joye b694edc23d MFH 2003-06-18 22:32:04 +00:00
foobar 0fe951a702 - Go to RC2-dev. 2003-06-18 22:04:41 +00:00
foobar 4cf62ff62c Correct version info. 2003-06-18 22:02:28 +00:00
foobar c6647fc0bf - Go with PHP 4.3.3RC1 2003-06-18 21:59:59 +00:00
foobar 50b17c0f7d This broke more than fixed. Fixes e.g. max_input_time. 2003-06-18 21:58:07 +00:00
foobar a0853a17ed MFH: Fixed bug #24231: ext/sybase_ct could not be build as shared 2003-06-18 18:29:04 +00:00
Rob Richards 35888b62f4 Fix for bug #24219 segfault during resource destruction
Used bug fix to optimize free_doc routine
2003-06-18 17:43:34 +00:00
Ilia Alshanetsky 6b74250915 MFH 2003-06-18 15:19:28 +00:00
Rasmus Lerdorf 1269ac0661 variables_order needs to include S for both of these to work 2003-06-17 22:32:51 +00:00
Ilia Alshanetsky a2f0a9c380 MFH: Handle numeric keys passed via GPC 2003-06-17 17:15:16 +00:00
Pierre Joye 434926a39e MFH,(4.3.3RC1) 2003-06-17 17:13:19 +00:00
foobar 4ccbb1b867 BFN 2003-06-17 15:53:33 +00:00
Ilia Alshanetsky 02af1ac144 MFH 2003-06-17 14:13:25 +00:00
Ilia Alshanetsky 1b747da374 MFH 2003-06-17 13:59:56 +00:00
Ilia Alshanetsky f82e06d4f8 MFH 2003-06-17 13:38:38 +00:00
Ilia Alshanetsky 7812b45b36 MFH: Fixed bug #24223 (missing variable initialization in bundled gd) 2003-06-17 13:37:57 +00:00
Ilia Alshanetsky 09c034c096 BFN 2003-06-17 13:20:54 +00:00
Ilia Alshanetsky 7473ff4698 Fixed bug #24220 (range() didn't handle numeric strings correctly) 2003-06-17 13:20:18 +00:00
SVN Migration 03468f3079 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-06-17 13:19:21 +00:00
foobar 138a1157ee MFH: Fixed bug #24207: phpize wrong exit code 2003-06-16 21:44:54 +00:00
foobar a63c981d70 broken caps-lock/shift key 2003-06-16 21:38:07 +00:00
Sara Golemon 9888224208 BFN 24210 2003-06-16 20:22:23 +00:00
Sara Golemon 33ba2503c6 MFH (r-1.14) Bug #24210 : assume misspelled (and thereby not found during configure) 2003-06-16 20:17:13 +00:00
foobar a9eea29b84 MFH 2003-06-16 20:00:11 +00:00
Ilia Alshanetsky c21de1dbe5 MFH: Fixed bug #24208 2003-06-16 19:25:06 +00:00
Sascha Schumann 6b8d3f6b01 Simplify/fix logging 2003-06-16 19:11:44 +00:00
Moriyoshi Koizumi e2ff71d2dd MFH(r-1.1): added test case for bug #24208 2003-06-16 19:10:48 +00:00
SVN Migration 36097f68a0 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-06-16 19:10:13 +00:00
Sascha Schumann 20088e34b5 Remove cast which hides a bug in the code. 2003-06-16 19:05:37 +00:00
Derick Rethans ad24ef01de - MFH: Added test for bug #24142 2003-06-16 17:50:49 +00:00
SVN Migration 304a39c793 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-06-16 17:50:08 +00:00
Ilia Alshanetsky 338ad09a44 Bug fixing news. 2003-06-16 17:43:11 +00:00
Ilia Alshanetsky 015712b9f1 MFH: Fixed bug #24150 (crash in imap_fetch_overview() &
imap_rfc822_write_address())
2003-06-16 17:42:04 +00:00
Ilia Alshanetsky 11cb016d39 MFH: Fixed bug #24198 (Invalid recursion detection in array_merge_recurcive()) 2003-06-16 17:37:15 +00:00
SVN Migration 327e5834d5 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-06-16 17:35:17 +00:00
Ilia Alshanetsky c984c80a7d Hopefully fix win32 build 2003-06-16 12:33:52 +00:00
Daniela Mariaschi fe43729707 proto fixes ibase_rollback and ibase_commit 2003-06-16 10:47:35 +00:00
Ilia Alshanetsky 54cee9cd1f MFH: compiler warnings 2003-06-16 03:07:08 +00:00
foobar ad98994e4a missing entries, cleanup 2003-06-15 21:59:03 +00:00
Marcus Boerger 87c57062c4 Remove that old thing 2003-06-14 19:27:01 +00:00
Edin Kadribasic 180e604534 Fixed win32 build 2003-06-14 18:51:17 +00:00
Sergey Kartashoff 47f2fb1832 @- Mnogosearch extension updated. Now can compile with mnogosearch-3.2.11+
- Mnogosearch extension updated. Now can compile with mnogosearch-3.2.11+
2003-06-14 18:45:26 +00:00
Daniela Mariaschi 96d9102630 MFH: Added IBASE_REC_VERSION/IBASE_REC_NO_VERSION transaction constants 2003-06-14 17:46:33 +00:00
Ilia Alshanetsky f6f08969d1 Bug fixing news 2003-06-14 15:09:26 +00:00
Ilia Alshanetsky 676b4c0362 MFH: Fixed bug #24007 (Problem with register_globals & arrays) 2003-06-14 15:08:37 +00:00
foobar a789f6bb85 MFH 2003-06-14 14:33:11 +00:00
foobar 1e71ec7613 MFH 2003-06-14 12:58:18 +00:00
Frank M. Kromann b3af6c9da5 Updating email address 2003-06-14 03:37:30 +00:00
foobar 0ce220d77a it rains here.. 2003-06-13 14:56:37 +00:00
Ilia Alshanetsky dc1f25d6fb proto 2003-06-13 14:56:23 +00:00
Andrey Hristov e8c057e33f proto fixes 2003-06-13 14:53:13 +00:00
Ilia Alshanetsky 80c568bb30 Bug fixing news. 2003-06-13 14:47:11 +00:00
Ilia Alshanetsky e6b637cd72 MFH:
Fixed bug #24161 (No timeout value for imap functions)
	Fixed bug #22505 (Allow imap_sort() and imap_search() to specify a charset)
2003-06-13 14:45:36 +00:00
Andrey Hristov 10228f3bb8 proto fix
and ws
2003-06-13 14:40:01 +00:00
Sascha Schumann e783c0b5a1 Fix test 2003-06-13 09:17:52 +00:00
foobar 626f3de608 MFH, fixed the test (second session init produces a notices) 2003-06-13 09:16:49 +00:00
Marcus Boerger 4cc45a7ba9 MFH: Bugfix #2397: dba_open locking error with db3 2003-06-12 19:55:16 +00:00
Ilia Alshanetsky 1c7f16c742 MFH: Fixed bug #24155 (gdImageRotate270 incorrectly use x parameter for y axis) 2003-06-12 19:33:19 +00:00
SVN Migration 60211ee3b3 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-06-12 19:31:45 +00:00
Andrei Zmievski 68accfe5c1 test 2003-06-12 13:56:03 +00:00
Andrey Hristov 3f824c7e1e proto fixes 2003-06-12 12:51:53 +00:00
Andrey Hristov ab037ed242 proto fixes 2003-06-12 12:37:03 +00:00
Andrey Hristov 4aec010451 proto fixes 2003-06-12 12:28:30 +00:00
Andrey Hristov 9f97891939 proto fixes 2003-06-12 12:23:10 +00:00
Andrey Hristov 9c9b10f047 proto fixes 2003-06-12 11:55:01 +00:00
Andrey Hristov 5f4e664e8b proto fixes 2003-06-12 11:34:31 +00:00
Andrey Hristov 220a5cb89f proto fixes 2003-06-12 10:24:43 +00:00
Andrey Hristov 2cf200c493 proto fixes 2003-06-12 10:03:39 +00:00
Derick Rethans d042cecbd9 - HTTP Request Types are case-sensitive 2003-06-12 08:33:45 +00:00
Ilia Alshanetsky cfc8c7a95e MFH: Added missing safe_mode/open_basedir checks. 2003-06-12 01:47:28 +00:00
Ilia Alshanetsky 6c7e5d9c18 MFH: proto fix 2003-06-11 02:16:49 +00:00
Andrey Hristov 3fdf998703 proto fixes 2003-06-10 14:46:00 +00:00
Sascha Schumann babbbb048b MFH E_NOTICE 2003-06-10 03:57:16 +00:00
Wez Furlong 36c9f3116e BFN 2003-06-09 17:04:57 +00:00
Moriyoshi Koizumi 451f0b2d07 MFH(r-1.137): fixed trivial typo 2003-06-09 08:12:03 +00:00
Edin Kadribasic da10d61faa Fix for #24022 2003-06-09 00:59:08 +00:00
foobar b4aeccba6d the blame..:) 2003-06-09 00:25:26 +00:00
Ilia Alshanetsky c60c1258e2 Fixed compile warnings. 2003-06-08 23:42:47 +00:00
Georg Richter cef32b1e2f fixed a bug in libmysql 2003-06-07 16:14:04 +00:00
Georg Richter 06d67f822b fixed mysql bug #564
(see http://bugs.mysql.com/bug.php?id=564)
2003-06-07 16:12:09 +00:00
foobar 97da8ca6bb hrm.. 2003-06-06 19:30:46 +00:00
Georg Richter 11a765e77d fixed bug 24060 2003-06-06 19:13:10 +00:00
Georg Richter 52dbb39ecd fixed #24060 2003-06-06 18:50:46 +00:00
Sascha Schumann 92b1fecc92 Refine error description 2003-06-06 12:21:26 +00:00
foobar 18c269209d BFN 2003-06-06 12:18:30 +00:00
foobar 808fc0a0bf MFH 2003-06-06 11:10:14 +00:00
SVN Migration 5e852417dd This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-06-06 11:09:56 +00:00
foobar 677375c0d1 ws 2003-06-06 08:11:38 +00:00
foobar 33a47baa0f MFH 2003-06-06 06:17:11 +00:00
Ilia Alshanetsky a788378ce2 Fix compile warnings (mostly MFH from 5.0 branch) 2003-06-05 23:48:17 +00:00
foobar d3728b5fff WS 2003-06-05 05:07:15 +00:00
foobar 79dc4f7a0c BFN 2003-06-05 05:06:57 +00:00
foobar a32672c1c5 Hopefully this list grows.. 2003-06-05 04:47:07 +00:00
foobar a384966f76 MFH: fix regex issues with apache2handler 2003-06-05 04:15:03 +00:00
Andrei Zmievski fd5d1094d3 Fix a couple of aggregation bugs:
- Needed to add a reference to a function when copying (#23574)
- Due to pecularity of ZE1 object zvals could be re-used, so we always
  set the new class entry explicitly.
2003-06-04 18:57:53 +00:00
Ilia Alshanetsky a4ff44794c Updated the todo to reflect the current situation. 2003-06-04 15:03:29 +00:00
Ilia Alshanetsky e2d057bd2c MFH (dupe macro) 2003-06-04 14:58:33 +00:00
Moriyoshi Koizumi 90eb73bb9d BFN updates 2003-06-04 14:53:31 +00:00
Moriyoshi Koizumi d6245c9e69 MFH(r-1.38): fixed base64_encode() integer overflow issue pointed out in TODO_SEGFAULTS 2003-06-04 14:42:04 +00:00
Moriyoshi Koizumi e99d47a3aa MFH(r-1.87): fixed ob_iconv_handler() type mismatch issue on 64bit platforms. 2003-06-04 14:29:53 +00:00
foobar 89e4c87e57 cleanup + BFN 2003-06-04 05:54:18 +00:00
foobar 8f50a67b87 MFH: no c++ comments and extra tabs. 2003-06-04 05:46:18 +00:00
foobar 269a3ad5ad Fix build 2003-06-04 05:30:45 +00:00
Sascha Schumann 533c499b44 Don't corrupt data during request body handling 2003-06-04 05:28:00 +00:00
Sascha Schumann 39f801b957 Don't return CRLF from broken clients 2003-06-04 05:13:41 +00:00
Ilia Alshanetsky 17d28abb62 MFH 2003-06-04 00:22:30 +00:00
Sascha Schumann 9fbee0b347 clean up macros 2003-06-04 00:01:00 +00:00
Ilia Alshanetsky e83404fea2 GD stuff 2003-06-03 23:57:59 +00:00
Ilia Alshanetsky 1a65bf61a8 MFH (Syncronize bunbled GD with gd 2.0.14) 2003-06-03 23:55:15 +00:00
Ilia Alshanetsky 6443fb2581 MFH (Last set of integer overflow checks.) 2003-06-03 23:42:49 +00:00
Ilia Alshanetsky 2112f46885 MFH: Integer overflow checks. 2003-06-03 23:23:25 +00:00
Edin Kadribasic 074aa05880 BFN: Make Jani happy 2003-06-03 14:47:03 +00:00
Edin Kadribasic 9afa0f3249 Fixed bug #23733.
#HAVE_OCI8_SHARED_MODE is more trouble than its worth.
2003-06-03 12:46:47 +00:00
Hartmut Holzgraefe 3b8f0741cb MFH 2003-06-03 11:07:40 +00:00
Edin Kadribasic 4f75f3bef1 MFH (bugfix #23902 by Shane). 2003-06-03 10:08:17 +00:00
Rasmus Lerdorf 28f4501f0a Fix a couple of closing folding tags 2003-06-03 05:41:49 +00:00
Ilia Alshanetsky 47acdced4c Bug fixing news. 2003-06-03 00:07:20 +00:00
Ilia Alshanetsky b2cf9fe953 MFH: Fixed bug #23912 (Invalid CSS in phpinfo() output) 2003-06-03 00:06:14 +00:00
Rob Richards 1505f6af03 Fix for 64 bit platforms (by Joe Orton) 2003-06-02 18:58:48 +00:00
Holger Zimmermann 35659b625f Merged with main trunk 1.53/1.5. 2003-06-02 17:14:10 +00:00
Daniela Mariaschi 5482637876 MFH: Fixed numeric/decimal +/-(x,y) +/-(x,0)
for all platforms
2003-06-02 12:59:20 +00:00
Derick Rethans 24e91108ba - MFH: Test for bug #23951 2003-06-02 11:13:00 +00:00
SVN Migration b130f77b94 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-06-02 11:12:26 +00:00
Uwe Schindler 84ebb3ae39 MFH: Messages for newer servers. 2003-06-01 21:45:26 +00:00
Uwe Schindler aa9d7d766e MFH: Update of README for newer servers; apache-similar functions nsapi_request_headers and nsapi_response_headers with apache_* aliases; hide authorization-header in save mode. 2003-06-01 21:15:52 +00:00
Rasmus Lerdorf 0718a54934 A very minor thing, but we should still make a note of this change. 2003-05-31 17:37:55 +00:00
Moriyoshi Koizumi b0884491ae MFH(r-1.231): CGI SAPI should honour this setting (arg_separator.input) 2003-05-31 17:02:01 +00:00
Uwe Schindler 2da81fefb8 zend_alter_ini_entry now with PHP_INI_USER 2003-05-31 15:32:38 +00:00
Marcus Boerger 651d262d43 Fix the fix 2003-05-31 15:10:03 +00:00
Marcus Boerger 22a9c4d448 Use ZE1 notation as expected result 2003-05-31 14:50:10 +00:00
Marcus Boerger b44ea85296 MFH: Synch latest fixes 2003-05-31 12:59:20 +00:00
Marcus Boerger 951e64a4bc This is needed though 2003-05-31 12:37:44 +00:00
Marcus Boerger 19081305e1 Showing info/warning once is enough 2003-05-31 12:13:15 +00:00
Marcus Boerger f189957991 MFH: make use of safe_estrdup 2003-05-31 10:24:15 +00:00
Georg Richter fb7f9eb420 suggestion by Wez :) 2003-05-31 06:54:53 +00:00
foobar 9085f883ad Re-add this entry 2003-05-31 03:03:00 +00:00
Marcus Boerger fe95410380 Reapply this one, too. 2003-05-31 02:31:10 +00:00
foobar 7ccfa69750 missed this one.. 2003-05-31 02:20:25 +00:00
Marcus Boerger 0b0a331e63 Reapply long opts 2003-05-31 02:20:08 +00:00
foobar 5a28c6dd94 BFN 2003-05-31 02:10:14 +00:00
foobar 8506ee1bfe - Re-added the FD lexer patch.
# Marcus is going to add the long-opts patches back in after this.
2003-05-31 01:37:45 +00:00
Ilia Alshanetsky 7cd254b070 Bug fixing news. 2003-05-31 00:34:14 +00:00
Ilia Alshanetsky 931f3abe4e MFH: Fixed bug #23913 (make rename() work across partitions on *nix) 2003-05-31 00:33:06 +00:00
Uwe Schindler 873f321cf7 Disable virtual() if zlib.output_compression is turned on. Better detection of ns-httpdXX.dll 2003-05-30 23:39:04 +00:00
Moriyoshi Koizumi 24a42bb761 Sync with head (r-1.153) 2003-05-30 22:33:43 +00:00
foobar 4168763049 Info about the improved NSAPI module 2003-05-30 21:40:13 +00:00
foobar 84707a7504 Cleanup, missing entries, BFN 2003-05-30 20:31:37 +00:00
Georg Richter 881414e0af better to test next time with the right version :) 2003-05-30 19:16:58 +00:00
Marcus Boerger d1cbbf62c9 MFH: Fix handling of ini settings 2003-05-30 17:50:06 +00:00
Derick Rethans 59b59d2651 - Added a "DEBUG" qualifier to 'php -v's version output, and made the CGI
version statement look the same as the CLI version. (Derick)
2003-05-30 17:03:10 +00:00
Moriyoshi Koizumi 1447af9522 MFH(r-1.152): refined the bz2 section as per Sascha's suggestion 2003-05-30 16:15:38 +00:00
Moriyoshi Koizumi 376c94c239 MFH(r-1.151): fixed a little typo. No germany.. 2003-05-30 15:33:06 +00:00
Ilia Alshanetsky b617f54d34 Bug fixing news. 2003-05-30 14:46:19 +00:00
Ilia Alshanetsky 4e38d42183 MFH (fix for bug #23898) 2003-05-30 14:45:20 +00:00
Moriyoshi Koizumi 5966ec08a9 I love dots too 2003-05-30 14:17:16 +00:00
Ilia Alshanetsky f7f36b4f37 MFH 2003-05-30 14:09:21 +00:00
Moriyoshi Koizumi 05e3f11ac5 BFN 2003-05-30 13:57:20 +00:00
Moriyoshi Koizumi be18fcec6b MFH(r-1.67): fixed bug #23894 (sprintf() decimal specifiers problem) 2003-05-30 13:50:09 +00:00
Moriyoshi Koizumi 0bf1fb6f19 MFH(r-1.1): added test case for bug #23894 2003-05-30 13:48:26 +00:00
SVN Migration 7bef1c1f2a This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-05-30 13:48:15 +00:00
Ilia Alshanetsky 77763cee25 Bug fixing news. 2003-05-30 13:20:55 +00:00
Ilia Alshanetsky 01d848075a MFH 2003-05-30 13:20:17 +00:00
Uwe Schindler f9f0c83b30 virtual() now works under windows, too 2003-05-30 13:15:04 +00:00
Georg Richter 90952aae2d fixed #23779 (CLIENT_LOCAL_FILES with open_basedir) 2003-05-30 13:00:17 +00:00
Marcus Boerger fab2534381 MFH: Add php_uname() to output 2003-05-30 12:42:17 +00:00
Adam Dickmeiss ea8eefdf72 Prevent yaz from logging unless yaz.log_file is set 2003-05-30 09:46:01 +00:00
Edin Kadribasic ae7fadf900 Nuke the rest of headers-sent code 2003-05-29 23:57:27 +00:00
Uwe Schindler c97e3bac2a fix of incomplete windows fix 2003-05-29 21:05:06 +00:00
Hartmut Holzgraefe 63130ca782 MFH 2003-05-29 20:24:00 +00:00
Uwe Schindler b653dfe7ba Changes for compilation on windows 2003-05-29 20:13:15 +00:00
Sascha Schumann 33d844496f fix prototype 2003-05-29 17:39:00 +00:00
Sascha Schumann 39267c2bf9 Always send a new session cookie upon regenerating id 2003-05-29 16:19:56 +00:00
Marcus Boerger 5430f7efa9 MFH-Update 2003-05-29 15:42:45 +00:00
Marcus Boerger f01b062a06 MFH: --style switches 2003-05-29 15:41:52 +00:00
Marcus Boerger db81c3d979 MFH: new switches and --style switches 2003-05-29 15:28:01 +00:00
Sascha Schumann 092b805de5 Fix VPATH builds 2003-05-29 14:55:07 +00:00
Marcus Boerger 2ab7673bb0 MFH ini file support 2003-05-29 14:24:10 +00:00
Marcus Boerger ee11982bcb MFH: ini file support 2003-05-29 14:16:25 +00:00
Marcus Boerger e0c3093711 MFH
@Changed exif extension to consider php.ini option magic_quotes_runtime. (Marcus)
2003-05-29 14:12:08 +00:00
Dan Kalowsky 7de28bdc6a ODBC standards compliance is a good thing.
# Should be MFB'd, but my PHP5 is drastically different right now..
2003-05-29 12:34:38 +00:00
Uwe Schindler c5ec799b2d MFH. 2003-05-29 12:29:50 +00:00
Uwe Schindler 3ae99689f7 MFH: php.ini values in magnus/obj.conf; virtual() similar to apache;... 2003-05-29 12:27:39 +00:00
foobar 210ce6796f Added the header for 4.3.3 2003-05-29 01:28:14 +00:00
Rasmus Lerdorf 9a9b55e60b I see no reason not to allow people to set the timeout on a mysql_connect
from inside a script with ini_set().  We allow user-settable timeouts on
other socket connections so having this as a system-settable only
directive doesn't make much sense to me.
2003-05-28 16:18:14 +00:00
foobar 2dc7873362 MFH 2003-05-28 14:12:04 +00:00
Wez Furlong 1ebb0b0785 On win32, always open in binary mode unless they asked for text mode using 't'.
This solves a number of apparent BC breaks that resulted from the move from
fopen() to open().
2003-05-28 10:15:00 +00:00
Hartmut Holzgraefe 01fa930e6b MFH 2003-05-28 09:45:22 +00:00
Hartmut Holzgraefe 28ce738ce7 MFH
@fdf crash with ZTS builds fixed (see Bug #14877)
2003-05-28 09:42:48 +00:00
SVN Migration c49dfb1007 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-05-28 09:35:46 +00:00
Pierre Joye 96559baede MFH 2003-05-28 01:52:45 +00:00
foobar 858c75805f There is no point using php_error_docref in MINIT. 2003-05-27 17:24:09 +00:00
Adam Dickmeiss f5b3d65f07 Fix close of log file. 2003-05-27 09:50:49 +00:00
foobar b5c6ea479d Nuke the php_header() call here. Fixes the rest of #14409. 2003-05-26 23:21:08 +00:00
Marcus Boerger 9990a0a301 MFH: In CLI log errors always 2003-05-26 23:07:09 +00:00
Moriyoshi Koizumi 43eda262be MFH(r-1.8): changed the test so it would not fail on some old platforms. 2003-05-26 22:16:40 +00:00
Melvyn Sopacua 9bc15253ad Make LC_MESSAGES available, for platforms that don't have it natively,
when gettext is compiled in.
2003-05-26 20:56:01 +00:00
Wez Furlong 5303587494 Plug a leak - noticed by Ilia. 2003-05-26 19:01:45 +00:00
Derick Rethans 33bed67b99 - Fixed a bug in reporting start-up errors with the CLI: No HTTP header shall
be shown.
2003-05-26 18:33:20 +00:00
Derick Rethans 3d3416d10e MFH: Typo 2003-05-26 09:46:34 +00:00
foobar 02c184dce8 MFH 2003-05-26 04:01:12 +00:00
SVN Migration 89f2c54773 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-05-26 03:55:09 +00:00
foobar 36e9a1582f BFN 2003-05-26 03:48:22 +00:00
Ilia Alshanetsky bd955dcb81 MFB 2003-05-26 02:00:37 +00:00
Shane Caraveo 653717b72c http://bugs.php.net/bug.php?id=14409
in the shell, if we get a filename on the commandline, never use stdin.
This fixes '\>php nonexistent.php'
will MTH once I get 5 building properly
2003-05-25 19:22:25 +00:00
Shane Caraveo 67ebb942b6 http://bugs.php.net/bug.php?id=23800
change the default for those who cannot
this was actually done a long time ago, but got reverted along the way
2003-05-25 18:35:18 +00:00
Marcus Boerger d9cf9e37fb MFH: speling 2003-05-24 12:00:59 +00:00
Wez Furlong 976f0d8303 Adjust error message to encourage people with apparently broken IPV6 systems to
build PHP without IPV6 support.
2003-05-24 03:15:53 +00:00
Marcus Boerger 7b514da372 Executing tests once is enough 2003-05-23 22:36:20 +00:00
Sara Golemon a0a3b47001 BFN 23765 2003-05-23 21:42:35 +00:00
Sara Golemon 97dd56a974 Bug#23765 File upload handler should not care about case sensitivity of header values. 2003-05-23 21:37:16 +00:00
Marcus Boerger 14fc7fa96c MFH: Make this a warning 2003-05-23 20:56:33 +00:00
Marcus Boerger 1a7e7165a7 MFH: Add warning level for tests. 2003-05-23 20:55:57 +00:00
Wez Furlong bdcd417ad6 Avoid greedy reads on FIFOs 2003-05-23 15:27:09 +00:00
Wez Furlong b3171064fd Fix Bug #23770: Odd output from file_get_contents().
php_stream_copy_to_mem couldn't handle the case when the read returned less
than chunk_size/4 bytes (except when it was the last chunk read).
2003-05-23 11:10:34 +00:00
Ilia Alshanetsky 31fe8c5c16 MFH 2003-05-23 02:42:22 +00:00
foobar 1c0ff3c97e MFH 2003-05-23 00:00:11 +00:00
SVN Migration 2e48996c64 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-05-22 23:59:38 +00:00
foobar 0ae1d743e6 fix the generated file. 2003-05-22 22:35:37 +00:00
Wez Furlong befce57664 Add --force so release package building works 2003-05-22 00:26:02 +00:00
foobar db082e4215 - This branch is now PHP 4.3.3-dev. (no more RCs!) 2003-05-21 23:31:20 +00:00
foobar a7290240a2 Go with PHP 4.3.2RC4 2003-05-21 23:22:01 +00:00
Jay Smith 6fee33722d MFH 2003-05-21 23:08:27 +00:00
Ilia Alshanetsky cb87994fcd Fixed bug #23744 2003-05-21 22:54:38 +00:00
foobar 961b1151c0 BFN 2003-05-21 22:37:01 +00:00
foobar a335bb813d MFH: Fixed bug #23738 (ifx_copy_blob() crash). (Jani) 2003-05-21 22:36:46 +00:00
foobar 0840b0ccf0 BFN 2003-05-21 21:57:58 +00:00
Ilia Alshanetsky 237bf7a69c MFH 2003-05-21 17:04:19 +00:00
Rasmus Lerdorf 022d058ce1 Revert bogus commit 2003-05-21 17:00:57 +00:00
Sander Roobol 5aaa0bcf64 MFH (ob_gzhandler and zlib.output_compression should send a Content-Length
header if the length of the complete compressed output is known)
2003-05-21 16:07:33 +00:00
Wez Furlong f41f376213 Allow win32 people to fopen($filename, 'rt') to explicitly chose text-mode
files again.

The functionality was accidentally dropped when we introduced our own fopen
mode string parser.
2003-05-21 12:02:55 +00:00
Zeev Suraski cbd712e8c9 Fix typo 2003-05-21 10:23:31 +00:00
Zeev Suraski b831413ba7 Remove php_stream_open_wrapper_as_file_handle, it was fd-patch specific 2003-05-21 10:19:03 +00:00
Zeev Suraski 2127840893 Revert PHP part of the fd patch 2003-05-21 09:34:21 +00:00
Marcus Boerger 2e34a6a9a6 MFH: This depends on libc and CPU used 2003-05-21 07:24:28 +00:00
Sascha Schumann f851db2531 readd essential line for multiple sessions inside one request 2003-05-21 02:33:13 +00:00
Ilia Alshanetsky 5d900b5171 MFH 2003-05-21 00:57:48 +00:00
foobar 25fcdb4304 BFN 2003-05-21 00:36:50 +00:00
Marcus Boerger b92cc3d806 MFH 2003-05-21 00:35:29 +00:00
Frank M. Kromann 09ddabb35e Fix for bug 23402. Crash when mssql?bind was used incorrectly 2003-05-21 00:06:41 +00:00
Marcus Boerger 4cb2b8e1fe MFH: Fix test (ssen by Dan Torop) 2003-05-20 22:28:29 +00:00
Wez Furlong 8eb3233f82 Implement socket liveness checking for SSL streams when recycling via
pfsockopen.
2003-05-20 22:14:47 +00:00
Sascha Schumann 8b4ff89345 Make error messages less ambiguous 2003-05-20 21:01:42 +00:00
Wez Furlong abd2b78275 Make fread() non-greedy for socket based streams 2003-05-20 20:47:39 +00:00
Sascha Schumann 67631ea57c Defensive programming 2003-05-20 20:01:54 +00:00
Andrei Zmievski 12ce650f03 MFH 2003-05-20 18:12:07 +00:00
Wez Furlong 549625a4c7 Touch and remove WS added by last touch.... 2003-05-20 16:53:58 +00:00
Wez Furlong 5ce5b396f7 Touch files 2003-05-20 16:53:24 +00:00
Sascha Schumann bddbce404f Better reinitialize session_status unconditionally 2003-05-20 14:20:14 +00:00
Sascha Schumann 4557989eff initialize err 2003-05-20 12:45:35 +00:00
Sascha Schumann 0f4b4c82de Fix use of ZEND_EXTERN_MODULE_GLOBALS which mysteriously includes a
trailing semicolon.

Also add a do {} while (0) construct in php_session.h
2003-05-20 12:38:04 +00:00
Moriyoshi Koizumi a9a7057448 Revisit the braindead patch only for this branch
# this behaviour is fixed in the php5 branch
2003-05-20 07:34:08 +00:00
Ilia Alshanetsky 5defe2dd7c MFH 2003-05-20 00:37:13 +00:00
Wez Furlong 1a6d970f7e Much better fix for refcount issues with contexts, and fix a leak in context
value storage.
2003-05-20 00:21:57 +00:00
Marcus Boerger 75144252c0 MFH: Fix Test (2nd time) 2003-05-20 00:10:01 +00:00
Wez Furlong cedd7ef4bf Fix refcounting problem with contexts.
Also, potentially fix stream_set_timeout issues on SSL streams.
2003-05-19 23:27:49 +00:00
Wez Furlong 9efa05b7c7 Fix persistent stream recycling within the same request.
function foo()
{
	$s = pfsockopen("localhost", "80");
	var_dump($s);
}
foo(); foo();
2003-05-19 22:55:56 +00:00
Marcus Boerger c00b313bee MFH: Fix protos 2003-05-19 22:53:35 +00:00
Marcus Boerger 8725a3147d MFH: Fix Test 2003-05-19 22:17:05 +00:00
Marcus Boerger d66fa199b4 MFH 2003-05-19 21:50:06 +00:00
Derick Rethans b3251de43f - Add alias for easier transition 2003-05-19 17:45:50 +00:00
foobar 2cab62fdc4 BFN 2003-05-19 14:20:28 +00:00
foobar 596b08b9a1 MFH: Fixed bug #23539 (curl_exec() produces strange results). (daniel@haxx.se) 2003-05-19 14:19:33 +00:00
Moriyoshi Koizumi 52c6a66274 MFH(r-1.86): fixed bug #23683 2003-05-19 13:27:05 +00:00
foobar ebfb3cb678 MFH 2003-05-19 13:14:06 +00:00
Wez Furlong 60434f91bd Add sanity check to buildconf to prevent it from being run in our released
packages.
2003-05-19 11:45:02 +00:00
foobar 396e830e72 BFN 2003-05-19 07:18:40 +00:00
Shane Caraveo 331f905e8a MFH
continuation on bugfix #13757
make argv/argc *and* query_string work correctly when running cgi in shell
2003-05-19 06:46:50 +00:00
Ilia Alshanetsky 3987509ac3 MFH 2003-05-19 04:57:08 +00:00
Shane Caraveo 818412a4a9 MFH
bugfix #13757 - passing query string on command line when run from shell
2003-05-19 03:40:53 +00:00
Sascha Schumann 45a703d3f1 Move awk detection before config.m4 inclusion 2003-05-19 01:42:13 +00:00
Sascha Schumann 55a52eb920 Use $AWK instead of awk, fixes build issue on Solaris with old-style ext 2003-05-19 01:33:29 +00:00
foobar e53ca2b5dd mfh 2003-05-18 14:55:56 +00:00
Marcus Boerger 86ce37ce21 MFH: Enable bundled submodules when enabling module 2003-05-18 12:36:34 +00:00
Marcus Boerger 68eef6b9f4 Update 2003-05-18 12:13:53 +00:00
Marcus Boerger dd866fdd82 MFH: Fix test (for now - need EXPECTF/EXPECTREGEX) 2003-05-18 12:10:15 +00:00
Marcus Boerger f53160138e Fix unserialize (commit later) 2003-05-18 12:04:52 +00:00
Marcus Boerger 9719a22ff8 Fix unserialize 2003-05-18 12:04:34 +00:00
Zeev Suraski 6a966b79d7 binary compat for 64-bit platforms shouldn't matter much as they were
fairly broken to begin with
2003-05-18 10:22:16 +00:00
Zeev Suraski 8dfb69ebca Restore binary compatibility with 4.3.0 2003-05-18 10:16:57 +00:00
Moriyoshi Koizumi ae30c7f4ab And this is needed indeed 2003-05-17 20:07:00 +00:00
Moriyoshi Koizumi eeb43eb1eb oops 2003-05-17 20:04:35 +00:00
Moriyoshi Koizumi c2660ef64a Fixed the test so it won't fail under safe mode 2003-05-17 20:00:46 +00:00
Moriyoshi Koizumi 41278da02f MFH(r-1.225): fixed bug #23669
# When the script is launched with the "Action" directive,
# PATH_TRANSLATED is then populated to indicate the virtual location of
# the script, and both REDIRECT_URL / PATH_INFO are set to the virtual URI.
# Otherwise, REDIRECT_URL may take an arbitrary value instead of the actual
# URI, which cannot be relied upon at all.
2003-05-17 18:55:23 +00:00
Georg Richter d76c684cef move to pecl 2003-05-17 15:11:17 +00:00
Georg Richter cf43cddba9 move to pecl 2003-05-17 15:06:02 +00:00
Georg Richter ac88c9cabd added ext/mysqli for PHP4. This version doesn't support OO-function calls 2003-05-17 14:15:58 +00:00
Marcus Boerger 444959cd81 Mail too 2003-05-17 11:32:22 +00:00
Wez Furlong 0ee4b1dd48 Fix segfault 2003-05-17 09:34:12 +00:00
Sascha Schumann 8053881211 protect against further surprises by initializing all zend_file_handle's 2003-05-17 08:06:53 +00:00
Sascha Schumann 0c376684c7 Initialize all zend_file_handle instances properly 2003-05-17 07:55:18 +00:00
Sara Golemon bab2866e21 Bug #14369. ftp extension allows circumvention of safe_mode restrictions 2003-05-17 04:20:12 +00:00
Sara Golemon f026645177 Bugfix 23654. If subject is an array and it contains other arrays, we want to pass those subarrays through unchanged rather than attempt to convert them to string. 2003-05-16 23:24:55 +00:00
Moriyoshi Koizumi d36a62dd0e MFH(r-1.43): fixed a syntax highlighter problem that happens when output buffering is turned on 2003-05-16 23:08:47 +00:00
Sascha Schumann a9930145fe MFH 2003-05-16 22:33:15 +00:00
Masaki Fujimoto 98e4c9aef4 - mbstring.h is no more needed 2003-05-16 20:33:18 +00:00
foobar eaeff2e939 typo fixing 2003-05-16 20:20:06 +00:00
Wez Furlong 67391df6f0 No typo... its tmpnam in one place, tempnam in another...
/home/wez/packages/imap-2002b/c-client/osdep.c:287:
the use of `tmpnam' is dangerous, better use `mkstemp'
2003-05-16 20:12:46 +00:00
Moriyoshi Koizumi b484bc253a Moved initialisation code to the proper place. 2003-05-16 19:28:17 +00:00
Wez Furlong 54c83ce7a3 Fix memory leak in the COM extension.
Patch from Michael Sisolak <msisolak at yahoo dot com>
2003-05-16 19:20:18 +00:00
Derick Rethans 37142b284f - Fixed bug #23661: mysql_fetch_array gives no warning on an invalid
result_type
2003-05-16 19:07:57 +00:00
Wez Furlong 217a213a5d Stronger validation of parameters to ob_start(). 2003-05-16 19:06:37 +00:00
foobar 9233c937ae We do not have to add entries for bugs that are introcuded between RCs.. 2003-05-16 15:30:57 +00:00
Ilia Alshanetsky c4690101a3 Bug fixing news. 2003-05-16 15:15:29 +00:00
Ilia Alshanetsky 129d6e940f MFH 2003-05-16 15:13:57 +00:00
Derick Rethans c8c6b2141e - Fix speling:
/dat/dev/php/php-4.3.2RC3/ext/mysql/libmysql/my_tempnam.c:115: the use of
  `tempnam' is dangerous, better use `mkstemp'
2003-05-16 15:03:45 +00:00
Moriyoshi Koizumi 97a0b51739 MFH(r-1.2): copy'n'paste failure 2003-05-16 06:25:12 +00:00
Moriyoshi Koizumi ee135e463c MFH(r-1.1): added test case for bug #23650 2003-05-16 06:21:57 +00:00
Moriyoshi Koizumi a5c040170c MFH(r-1.381): fixed bug #23650 2003-05-16 06:21:39 +00:00
SVN Migration 8e2ddfb9df This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-05-16 06:20:24 +00:00
Sascha Schumann 2c84b8acb8 forgot that 2003-05-16 06:16:16 +00:00
Ilia Alshanetsky 1fdb920299 Fixed proto 2003-05-16 01:09:10 +00:00
Moriyoshi Koizumi c1a6b4530b MFH(r-1.6): fixed test so it won't fail with the output_handler enabled 2003-05-15 19:20:55 +00:00
foobar daacfa367b - Now this is 4.3.2RC4-dev..hopefully we won't need it. :) 2003-05-15 18:50:48 +00:00
foobar 73d041e231 Bumb version. 2003-05-15 18:46:20 +00:00
foobar 5faf455502 fix this test for release.. 2003-05-15 18:36:59 +00:00
foobar 35fb4f2c20 better not confuse people with this test.. 2003-05-15 17:50:29 +00:00
Sascha Schumann 6c3f316db8 MFH 2003-05-15 16:55:21 +00:00
Sascha Schumann 3837327f43 MFH 2003-05-15 16:43:29 +00:00
foobar d568d3877a Added missing bracket. 2003-05-15 14:47:00 +00:00
Sascha Schumann 99515d905c MFH 2003-05-15 13:33:52 +00:00
foobar e06424afc7 wrapped the lines to be max. 80 chars as some people still use antique.. 2003-05-15 12:48:15 +00:00
foobar 1a5e210004 my back hurts.. 2003-05-15 12:28:46 +00:00
Sascha Schumann e1818aae0a Avoid using a stream which has already been freed 2003-05-15 12:01:01 +00:00
Ilia Alshanetsky 01aef58899 Bug fixing news. 2003-05-15 02:27:11 +00:00
Ilia Alshanetsky 670d72a64b MFH 2003-05-15 02:25:59 +00:00
Wez Furlong 0a837f8064 Better be sure to spell it out... 2003-05-14 19:10:27 +00:00
Wez Furlong 8307e2c329 4, not 3 :) 2003-05-14 19:10:02 +00:00
Wez Furlong 5c48a21bcc Avoid warning about casting as FD when including. This fixes the
fopencookie/userstream/include test.

Add label for new selectable descriptor cast mode.
2003-05-14 18:38:01 +00:00
foobar 39d03d8ab6 MFH 2003-05-14 18:23:41 +00:00
Moriyoshi Koizumi e674b5c6a4 MFH: reverted the patch for the PATH_TRANSLATE issue 2003-05-14 18:19:57 +00:00
foobar 395123dcc8 Added test case for bug #23624 2003-05-14 15:01:31 +00:00
Edin Kadribasic b484523d7f Credits update 2003-05-14 13:40:49 +00:00
Daniela Mariaschi 22e9844842 MFH: better fix bug #20641.
Overflow numeric/deciaml datatype on NT
2003-05-14 08:26:34 +00:00
Marcus Boerger 6dfca30ec9 Update 2003-05-14 06:42:21 +00:00
Marcus Boerger fd0b71760e MFH: Enable db<n> builds configured with --with-uniquename 2003-05-14 06:22:58 +00:00
Sascha Schumann 862edc6aae Fix file_get_contents segfault on empty file 2003-05-14 01:08:47 +00:00
Moriyoshi Koizumi fcffe5b582 MFH(r-1.4, r-1.4, r-1.5, r-1.4, r-1.4, r-1.4): fixed tests so they won't fail
in correct situations
2003-05-14 00:37:45 +00:00
Ilia Alshanetsky 32131681f7 Fixed a memory leak when -h flag is used. 2003-05-14 00:11:01 +00:00
foobar 2cd08683c8 - Fixed bug #23584 (error line numbers off by one when using #!php).
# already fixed in php5
2003-05-14 00:05:12 +00:00
Sascha Schumann 0e47b9242d Readd fd 0-2 protection, so that users cannot close them 2003-05-13 23:51:57 +00:00
Sascha Schumann 4066bd0a17 Supply STDIN/OUT/ERR_FILENO directly, instead of opening them through
stdio's fdopen.
2003-05-13 23:44:35 +00:00
Sascha Schumann bbf39825e1 Use POSIX IO here, mainly to fix interactive mode.
This also fixes a possible cpu-time hog bug where a file would consist
of "#" and nothing else.
2003-05-13 23:36:38 +00:00
Sascha Schumann 7017cc588c Use and supply zend_open func 2003-05-13 23:09:27 +00:00
foobar 057d36b789 MFH 2003-05-13 22:10:27 +00:00
Ilia Alshanetsky b811d30a74 MFH 2003-05-13 22:09:30 +00:00
foobar 8530516f40 reorder 2003-05-13 22:05:34 +00:00
Marcus Boerger 987d9aff6c MFH: Fix this test 2003-05-13 20:39:08 +00:00
Moriyoshi Koizumi 1a241fc6f6 made it slightly descriptive 2003-05-13 19:41:46 +00:00
Moriyoshi Koizumi a0a0ff10a4 BFN 2003-05-13 19:40:29 +00:00
Moriyoshi Koizumi ecf62dc44e MFH(r-1.112, r-1.18): fixed bug #23610 2003-05-13 19:38:04 +00:00
Sascha Schumann cfeebdf8c5 MFH 2003-05-13 18:48:18 +00:00
Christian Stocker cd1def8074 fix possible segfault 2003-05-13 14:42:23 +00:00
Adam Dickmeiss 99af37d2c8 Fix problem with yaz_record in array mode, when record is unavailable. 2003-05-13 11:05:59 +00:00
Sascha Schumann 10f2defb04 Ensure that we don't close a random fd
fchdir(0)                                       Err#20 ENOTDIR
close(0)                                        = 0
2003-05-13 02:25:29 +00:00
Ilia Alshanetsky d80e0fc48c MFH 2003-05-13 01:58:16 +00:00
Wez Furlong a159c212c4 BFN! 2003-05-13 00:21:50 +00:00
Wez Furlong 3b2f0b8ac4 Fix erroneous error status when attempting to use stream_select() on an SSL
stream.  As a by-product, this also fixes Bug #22238, stream_select() clobbers
read buffer for pipes.
2003-05-13 00:18:27 +00:00
Wez Furlong 6c0ee68f07 Probable fix for #23567 - pfsockopen returns dead connection.
# Just need to verify under win32
2003-05-12 23:44:48 +00:00
Moriyoshi Koizumi 46756f8caa MFH(r-1.175, r-1.53): applied the right fix for bug #23016 2003-05-12 13:31:16 +00:00
Ilia Alshanetsky 38beab8a1e ifdef away win32 only variables. 2003-05-12 04:05:54 +00:00
Sascha Schumann c53c056477 MFH 2003-05-12 01:29:41 +00:00
Sascha Schumann 6db735215a MFH 2003-05-12 01:03:47 +00:00
Moriyoshi Koizumi 52c52c1c3d MFH(r-1.228): fixed bug #22463 and bug #23581 2003-05-11 06:39:42 +00:00
Moriyoshi Koizumi 7d4a198992 MFH(r-1.1, r-1.1): added test cases for bug #22463 and bug #23581 2003-05-11 06:35:11 +00:00
SVN Migration 794994bfb5 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-05-11 06:33:36 +00:00
Moriyoshi Koizumi 1df318632d Fixed bug #23016 2003-05-10 20:55:44 +00:00
Rasmus Lerdorf b8af95533a Need to add the kerberos include dir here (fixes compile problem on RH9) 2003-05-10 17:11:33 +00:00
Sascha Schumann f695e50683 MFH 2003-05-10 16:49:53 +00:00
Hartmut Holzgraefe 4b3a23efa9 removing the crashbug on windows 2003-05-09 13:55:44 +00:00
Pierre Joye ad07d32fc7 MFH 2003-05-09 12:17:07 +00:00
Hartmut Holzgraefe 48ef3a2f55 MFH 2003-05-09 09:56:51 +00:00
Edin Kadribasic eafad14638 Reverting my last patch because user reports it does not help
solve the problem. (bug #23504)

# I cannot reproduce this myself so reverting the patch
# is probably the best thing to do at this point.
2003-05-09 09:08:09 +00:00
Ilia Alshanetsky 6503178113 MFH 2003-05-09 01:10:24 +00:00
Moriyoshi Koizumi a678dd0832 MFH(r-1.84): added "&euro;" support for htmlentities() and html_entity_decode() 2003-05-08 15:44:32 +00:00
Edin Kadribasic f601dff0c2 Fix for bug #23504. Read per_dir configuration before trying to open the
the php file for execution.
2003-05-08 09:19:44 +00:00
Ilia Alshanetsky 9acdb6b6c8 MFH 2003-05-08 01:23:36 +00:00
Sara Golemon e29c2b0872 MFH(r-1.72) 2003-05-07 20:32:28 +00:00
Moriyoshi Koizumi 96d9074817 MFH(r-1.16): possible fix for bug #23455 (patch by rrichards@digarc.com) 2003-05-07 14:12:57 +00:00
Sascha Schumann c959028440 update 2003-05-06 23:53:33 +00:00
foobar 8902f7fc3f update 2003-05-06 23:43:13 +00:00
Sascha Schumann b0fdf62d3c update 2003-05-06 23:26:09 +00:00
Rasmus Lerdorf c03591bbc0 Remind people that sending in their qa info may contain sensitive data. 2003-05-06 20:22:17 +00:00
Sascha Schumann 2b2187ea33 MFH 2003-05-06 19:18:07 +00:00
Marcus Boerger ee1f22f64e Change of roles 2003-05-06 15:07:09 +00:00
Sascha Schumann b790692180 Eliminate fsync calls which apply to files, not sockets.
Also disable the Win32 socket shutdown procedure for non-Win32 systems.

closesocket has quite different semantics on Win32 which requires
a certain shutdown procedure as outlined here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/shutdown_2.asp
2003-05-06 14:39:31 +00:00
Sascha Schumann 62f0ea7954 Real fix for open() issue on Solaris 2003-05-06 13:18:38 +00:00
Sascha Schumann 648355a4cb When HAVE_BROKEN_GETCWD is in effect, open() will be called, so we need
to include unistd.h.
2003-05-06 13:06:53 +00:00
Sascha Schumann cf6352e82f Move persistent into ZEND_DEBUG section 2003-05-06 11:53:33 +00:00
Sascha Schumann b70f5ce50c Drop some TSRMLS_FETCH which are not used according to gcc 2003-05-06 11:52:11 +00:00
Sascha Schumann 09d0f92e05 Fix URL reading 2003-05-06 11:04:42 +00:00
Sascha Schumann 4e340d5e6c fix typo 2003-05-06 10:15:59 +00:00
Sascha Schumann 5696b0327f improve portability 2003-05-06 10:14:39 +00:00
Marcus Boerger ea7f0f7314 MFH 2003-05-06 09:34:20 +00:00
Marcus Boerger 97807d68e9 MFH new test layout 2003-05-06 01:26:21 +00:00
Daniela Mariaschi 908f56d375 MFH 2003-05-05 22:45:32 +00:00
Marcus Boerger decda2cb0e Bugfix #22367 2003-05-05 22:36:16 +00:00
Ilia Alshanetsky 83dbc17647 MFH 2003-05-05 22:21:37 +00:00
Ilia Alshanetsky 70369b3888 MFH 2003-05-05 19:57:40 +00:00
Moriyoshi Koizumi 314d0c288f MFH(r-1.81): added links to HTML entity resources 2003-05-05 19:51:16 +00:00
Wez Furlong 246300a60c Avoid potential segfault when preparing an SSL stream. 2003-05-05 16:30:04 +00:00
Christian Stocker 98baae88df xmlInitParser() at MINIT for better thread-safety (by Rob) 2003-05-05 14:46:49 +00:00
Christian Stocker 1e6865b38e Set the doc property to NULL if no parent is available (by Rob Richards) 2003-05-05 12:55:23 +00:00
Thies C. Arntzen 42e19bdbd7 fixed FMR 2003-05-05 12:17:03 +00:00
Sebastian Bergmann 44049a7e62 MFH: Add test case for bug #23489. 2003-05-05 10:17:14 +00:00
SVN Migration cbab7fcfea This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-05-05 10:16:05 +00:00
Moriyoshi Koizumi 727d97a95e Credit Jay's name 2003-05-04 19:34:52 +00:00
Ilia Alshanetsky ae6840dc31 MFH 2003-05-04 19:10:07 +00:00
Ilia Alshanetsky eef36a86dc Bug fixing news. 2003-05-04 18:42:19 +00:00
Ilia Alshanetsky 8eac6854f5 MFH 2003-05-04 18:41:37 +00:00
SVN Migration 2645704e4d This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-05-04 18:41:03 +00:00
Marcus Boerger de8c0e5070 BFN: #23162 2003-05-04 18:29:05 +00:00
Moriyoshi Koizumi c52b97c89f MFH(r-1.174): fixed an issue that zend-multibyte's behaviour doesn't reflect the change to mbstring.internal_encoding ini setting. 2003-05-04 13:12:26 +00:00
Moriyoshi Koizumi f63177b075 MFH(r-1.379,r-1.1): real fix and a test case for bug #22008 2003-05-04 12:45:12 +00:00
SVN Migration d1ae16818e This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-05-04 12:44:37 +00:00
Moriyoshi Koizumi 50e6fc68f4 BFN 2003-05-04 11:52:44 +00:00
Moriyoshi Koizumi ef2bc94ac4 MFH(r-1.378): a quick fix for bug #22008 2003-05-04 11:46:23 +00:00
Moriyoshi Koizumi 7a80b64960 MFH(r-1.109): added missing sanity check 2003-05-04 11:22:00 +00:00
Marcus Boerger 825c107f2b Fix test 2003-05-02 23:27:46 +00:00
Sascha Schumann 89cd013bd6 Rework text 2003-05-02 18:25:39 +00:00
Moriyoshi Koizumi 9d0951f2d7 MFH(r-1.80): fixed bug #23449 2003-05-02 11:01:00 +00:00
Thies C. Arntzen 8a5297e61c @ - Fixed bug #23376 OCINewDescriptor 2003-05-02 08:43:25 +00:00
Sara Golemon 631112ec2f MFH(r-1.227) 2003-05-02 01:05:16 +00:00
foobar c0b58291d2 MFH: - Fixed bug #22580 (ext/odbc compile failure with dbmaker) 2003-05-02 00:40:35 +00:00
foobar 6d9c0036b7 MFH: - Fixed bug #23427 (compile failure with GD 1.8.3) 2003-05-01 23:50:25 +00:00
Ilia Alshanetsky f4a30e483c MFH 2003-05-01 21:08:47 +00:00
Sascha Schumann 19e8346959 cleanup 2003-05-01 20:50:26 +00:00
Wez Furlong c3d353867a Really fix dll linkage, and fix TSRMLS usage. 2003-05-01 10:44:18 +00:00
Wez Furlong 8062aa164a MFH: Fix odbc_fetch_(array|object) for UnixODBC. 2003-04-30 23:33:18 +00:00
Ilia Alshanetsky 79577fadf9 MFH 2003-04-30 21:54:04 +00:00
Frank M. Kromann 458bcdc77e Fixing bit support. Bug #23324 2003-04-30 21:52:06 +00:00
Moriyoshi Koizumi d99e16a9be another oops. (sync with HEAD) 2003-04-30 16:32:15 +00:00
Moriyoshi Koizumi 2c1983f352 MFH(r-1.5): really fix the test 2003-04-30 16:31:01 +00:00
Rasmus Lerdorf f183abfd6a Fix gdCacheDelete() crashes in the bundled gd library 2003-04-30 16:23:59 +00:00
Wez Furlong c3a1a51f83 Fix leak in "php -m". 2003-04-30 13:07:18 +00:00
Wez Furlong c4e23fff2b Really fix the leak in the branch... 2003-04-30 11:12:03 +00:00
Wez Furlong 6454f5c3f2 MFH: Fix memory leak and enable for IBM DB2. 2003-04-30 10:46:43 +00:00
foobar 08a657f8fa MFH 2003-04-30 10:42:37 +00:00
foobar fb950ce0d5 BFN 2003-04-30 10:40:08 +00:00
foobar 034d61dbaa MFH: - Fixed bug #23371 (configure falsely detects c-client using SSL) 2003-04-30 10:35:06 +00:00
foobar 5edbe423b7 MFH 2003-04-30 10:23:06 +00:00
foobar 3220d2d769 MFH: compile fixes for < 9.2 oracle 2003-04-30 10:20:14 +00:00
Sascha Schumann 2bc6223a5f MFH fix for solaris find breakage 2003-04-30 07:08:32 +00:00
Ilia Alshanetsky 63693db502 MFH 2003-04-30 00:47:20 +00:00
Ilia Alshanetsky a2c87335ea MFH 2003-04-30 00:37:40 +00:00
Wez Furlong 87eaeb5363 Fix win32 build of shared openssl extension. 2003-04-29 13:48:06 +00:00
Moriyoshi Koizumi c7ae114bdf MFH(r-1.4): fixed typo 2003-04-29 13:06:12 +00:00
Moriyoshi Koizumi 968ed87454 MFH(r-1.3): fixed bogus skip condition 2003-04-29 13:04:57 +00:00
Moriyoshi Koizumi 886f9faaf3 dot 2003-04-28 23:39:15 +00:00
Ilia Alshanetsky f15b229e55 MFH 2003-04-28 22:42:36 +00:00
Wez Furlong 2878b23b14 BFN 2003-04-28 22:38:50 +00:00
Sascha Schumann d6302ef69d Fix Content-Encoding header lacking CRLF 2003-04-28 22:06:54 +00:00
foobar 1823f4748c - Change the version to 4.3.2-RC3-dev
# This should have been RC2-dev before..
# (if it was plain RC, we could not so easily know what versions people
# are testing from snapshots, for example)
2003-04-28 21:19:03 +00:00
foobar 7c495e9250 - Bumb the version to 4.3.2-RC2 2003-04-28 21:11:47 +00:00
foobar fcc7633bd0 MFH 2003-04-28 21:00:41 +00:00
Sascha Schumann 77d490c8fa usage fix 2003-04-28 19:42:30 +00:00
Derick Rethans 3005a78fbf - MFH 2003-04-28 18:53:46 +00:00
Moriyoshi Koizumi 7be8abe541 Removed bizarre tests for disgusting bugs which have kept annoying us.
- bug #22367 (http://bugs.php.net/22367)
 - bug #22510 (http://bugs.php.net/22510)
 - bug #22592 (http://bugs.php.net/22592)
2003-04-28 18:51:47 +00:00
Derick Rethans 427e27cc74 - MFH 2003-04-28 18:47:57 +00:00
Sascha Schumann f007536147 # on working disk again
reverting code, moving to correct branch
2003-04-28 16:18:34 +00:00
Sascha Schumann cf0b1ab2e3 # disk going bad, rescuing data
improve php_url_encode a bit
2003-04-28 15:17:00 +00:00
Moriyoshi Koizumi 302dc219c1 MFH(r-1.336): added missing sanity check in fgetcsv()
Partly synchronised indents with HEAD
# please merge CS fixes to branches too, or leave them as is :(
2003-04-28 15:11:14 +00:00
Wez Furlong 7aef25bc38 MFH: Fix for #23340; fopen on multiple urls from the same server crashes. 2003-04-28 14:41:54 +00:00
foobar 12e61e2ac4 MFH 2003-04-28 07:31:00 +00:00
Marcus Boerger 0371773312 MFH fix 2003-04-27 17:20:12 +00:00
Zeev Suraski fd913127ab This caused more mess than good, revert to the way it was in 4.3.0... 2003-04-27 16:35:53 +00:00
Stanislav Malyshev bb56953b8d fix TSRM 2003-04-27 16:18:01 +00:00
Stanislav Malyshev 5762d24683 Fix very nasty bug - session cookie kills one of the cookies
set before it on certain non-Apache SAPIs.
# for example, this code:
# <?
# setcookie("abc", 1);
# setcookie("def", 2);
# session_start();
# ?>
# would output only 'def' cookie on CGI and ISAPI
2003-04-27 16:02:44 +00:00
Wez Furlong 71a63bc126 Fix the lack of SSL certificate verification support for ssl:// sockets and
https:// streams.

This code is essential for people writing secure applications in order to avoid
man-in-the-middle attacks, and is thus regarded as a bug fix.

It is, however, optional; you need to explicitly turn on the verification
functionality, as it depends on you to specify your trusted certificate chain.

This sample demonstrates a secured https:// request, making use of the CA
bundle provided by curl:

<?php
$ctx = stream_context_create();
// Turn on verification
stream_context_set_option($ctx, "ssl", "verify_peer", true);
// Set the CA bundle (trusted certificate chain)
stream_context_set_option($ctx, "ssl", "cafile",
	"/usr/local/share/curl/curl-ca-bundle.crt");
$fp = fopen("https://www.zend.com", "rb", false, $ctx);
?>

This sample demonstrates how to roll your own https:// request, and specify a
certificate to use for authentication; the local_cert and passphrase options
will also work for fopen().

<?php
$ctx = stream_context_create();
stream_context_set_option($ctx, "ssl", "verify_peer", true);
stream_context_set_option($ctx, "ssl", "cafile",
	"/usr/local/share/curl/curl-ca-bundle.crt");

// set local cert.  it MUST be a PEM encoded file containing the certificate
// AND your private key.  It can also contain the certificate chain of issuers.
stream_context_set_option($ctx, "ssl", "local_cert", "/path/to/my/cert.pem");
stream_context_set_option($ctx, "ssl", "passphrase", "secret!");

// Set the common name that we are expecting; PHP will perform limited wildcard
// matching.  If the CN does not match this, the connection attempt will fail.
// The value to specify will always be the same as the Host: header you specify.
stream_context_set_option($ctx, "ssl", "CN_match", "secure.sample.domain");

$ssl = fsockopen("ssl://secure.sample.domain", 443, $errno, $errstr, 10, $ctx);

if ($ssl) {
	fwrite($ssl, "GET / HTTP/1.0\r\nHost: secure.sample.domain\r\n\r\n");
	fpassthru($ssl);
}

?>
2003-04-26 21:34:49 +00:00
Ilia Alshanetsky 582c2462ad MFH 2003-04-25 22:00:17 +00:00
foobar fd55fc78f4 MFH: compile fixes for AIX/HPUX 2003-04-25 21:31:49 +00:00
foobar 0fe880b867 MFH 2003-04-25 18:11:42 +00:00
Moriyoshi Koizumi 95c2ba883a MFH(r-1.172): moved copyright notice to the better place 2003-04-25 17:40:28 +00:00
Moriyoshi Koizumi fb743a3e27 MFH(r-1.171): added a bogus copyright notice 2003-04-25 17:35:30 +00:00
foobar 56fa94a6c0 MFH 2003-04-25 15:43:35 +00:00
SVN Migration 7756f1b7f2 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-04-25 15:43:29 +00:00
foobar be525968af MFH 2003-04-25 10:53:31 +00:00
foobar 2e3222d165 BFN 2003-04-25 10:15:17 +00:00
foobar 973651ae3b BFN 2003-04-25 09:00:00 +00:00
foobar 071b885744 MFH: Fixed bug #23099 (ext/interbase: "libgds.so: undefined reference to 'crypt'") 2003-04-25 08:59:00 +00:00
foobar bedd024310 MFH 2003-04-25 08:54:09 +00:00
foobar dd14eb51d4 MFH 2003-04-25 08:33:59 +00:00
SVN Migration caf1b545b8 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-04-25 08:33:26 +00:00
foobar bf0d23f985 MFH 2003-04-25 08:10:23 +00:00
Ilia Alshanetsky 1f433956b0 emalloc -> safe_emalloc 2003-04-25 00:59:03 +00:00
Ilia Alshanetsky d949f9d912 emalloc -> safe_emalloc 2003-04-25 00:50:31 +00:00
David Hill 8f7009f7f2 minor compiler incompatability fixes 2003-04-24 18:25:47 +00:00
Wez Furlong 2e4f176a6d Potential fix for problems during registration 2003-04-24 13:52:16 +00:00
Ilia Alshanetsky 694f5ed4de emalloc -> safe_emalloc 2003-04-24 01:42:09 +00:00
Marcus Boerger b882dbf5b9 MFH Synch: shutdown and ini defaults 2003-04-23 22:53:17 +00:00
foobar 982458f908 MFH 2003-04-23 08:55:09 +00:00
Ilia Alshanetsky 48e938368e emalloc -> safe_emalloc 2003-04-23 02:37:29 +00:00
Rasmus Lerdorf 9a57fc8cab &039; which is a single-quote may also come in as &39; I see no reason
not to handle both in html_entity_decode()
2003-04-22 20:44:55 +00:00
Sascha Schumann 0117c206d6 Drop php_info_print_table_row_ex from the 4.3 branch 2003-04-22 03:27:01 +00:00
Ilia Alshanetsky 0be78cd2b4 emalloc -> safe_emalloc. 2003-04-22 01:38:36 +00:00
Moriyoshi Koizumi 304409e520 MFH(r-1.136): the feature is less relevant to encoding conversion indeed 2003-04-21 19:07:50 +00:00
foobar 545b4cff3b MFH: Fixed bug #23198 2003-04-21 17:53:59 +00:00
Sascha Schumann 1719d0062c MFH 2003-04-21 01:09:33 +00:00
Sascha Schumann 1dafae56b9 MFH 2003-04-19 18:35:51 +00:00
Ilia Alshanetsky 720d8fdddc MFH (pcre sanity check) 2003-04-19 18:12:07 +00:00
Ilia Alshanetsky 2fa3048632 MFH 2003-04-19 18:10:58 +00:00
Ilia Alshanetsky 8b02b1eb7e MFH 2003-04-19 17:45:55 +00:00
Sascha Schumann c34c7433eb MFH 2003-04-19 17:41:12 +00:00
Marcus Boerger 2eb11eae36 MFH: The env-var TEST_PHP_EXECUTABLE is needed in tests 2003-04-19 17:23:11 +00:00
Moriyoshi Koizumi c629ac4600 MFH(r-1.135, r-1.268): made phpinfo() / gd_info() indicate availability of
JIS feature
2003-04-19 07:45:45 +00:00
Moriyoshi Koizumi a743a6dee6 MFH(r-1.134): fixed help text alignment 2003-04-19 07:16:06 +00:00
Sascha Schumann 460aba89f8 Don't spill our (PHP) HAVE_PGSQL/MYSQL into the mnogo header(s) 2003-04-19 05:10:35 +00:00
Sascha Schumann c465c5a3eb remove useless prototype 2003-04-19 05:09:52 +00:00
Rui Hirokawa 18144dffe9 added an option to support japanese encoding conversion in bundled gd. 2003-04-19 04:13:01 +00:00
Ilia Alshanetsky f896c7eeae MFH 2003-04-18 00:20:36 +00:00
foobar 74348caba2 MFH 2003-04-17 23:20:58 +00:00
Jay Smith bd62bcf18b MFH: fix some segfaults in some pg_lo_* functions 2003-04-17 16:55:56 +00:00
foobar 42c98ab6c8 touch 2003-04-17 02:46:02 +00:00
Ilia Alshanetsky 0ec69ef808 Integer overflow stuff. 2003-04-16 23:57:56 +00:00
Ilia Alshanetsky 59a1c7dcf5 safe_emalloc() and few other integer overflow fixes. 2003-04-16 23:49:45 +00:00
foobar c8e2b9ebfe BFN 2003-04-16 23:45:11 +00:00
Ilia Alshanetsky aac21de8ae Bug fixing news. 2003-04-16 23:32:20 +00:00
Ilia Alshanetsky db59a7414e MFH 2003-04-16 23:31:39 +00:00
Moriyoshi Koizumi dd6c7bb240 MFH(r-1.226, r-1.24, r-1.99, r-1.68): fixed implicit cast issue 2003-04-16 22:57:15 +00:00
Moriyoshi Koizumi e486cb60bc BFN 2003-04-16 21:13:28 +00:00
Moriyoshi Koizumi 9500c0c776 MFH(r-1.9): fixed bug #19795 2003-04-16 21:11:04 +00:00
Moriyoshi Koizumi 68cde46c9f MFH(r-1.10): fixed typo 2003-04-16 20:03:43 +00:00
Moriyoshi Koizumi 4c37bb0be8 MFH(r-1.137): compiler warning fix & possible 64bit fix 2003-04-16 19:19:13 +00:00
Marcus Boerger 3859a66d14 update 2003-04-16 19:17:27 +00:00
Marcus Boerger 486af716be safe_emalloc() 2003-04-16 19:14:29 +00:00
Marcus Boerger c0bffe6dcf MFH: prepare for safe_emalloc 2003-04-16 19:12:10 +00:00
Marcus Boerger b4b0bd3a69 Correcting fix for safe_emalloc 2003-04-16 18:25:35 +00:00
Marcus Boerger ae8c6a816a Use safe_emalloc but as macro until the function is fixed 2003-04-16 18:20:27 +00:00
Moriyoshi Koizumi e8713cc150 MFH(r-1.136): fixed bug #23080 2003-04-16 17:32:41 +00:00
Sascha Schumann e533fe138b fix two uninitialized reads 2003-04-16 13:44:05 +00:00
Sascha Schumann aa6e7433bc MFH 2003-04-16 13:37:54 +00:00
Sascha Schumann 90bb834ed1 Accessing "stream" after freeing it is not a good idea
==32692== Invalid read of size 4
==32692==    at 0x80CAFB3: _php_stream_free (/home/sas/src/php4/main/streams.c:395)
==32692==    by 0x80CE096: _php_stream_cast (/home/sas/src/php4/main/streams.c:2244)
==32692==    by 0x80CEDD4: _php_stream_open_wrapper_as_file (/home/sas/src/php4/main/streams.c:2684)
==32692==    by 0x80C1C6E: php_fopen_wrapper_for_zend (/home/sas/src/php4/main/main.c:761)
==32692==    Address 0x414487EC is 44 bytes inside a block of size 116 free'd
==32692==    at 0x401622FB: free (vg_clientfuncs.c:182)
==32692==    by 0x80DB337: _efree (/home/sas/src/php4/Zend/zend_alloc.c:265)
==32692==    by 0x80CAFAF: _php_stream_free (/home/sas/src/php4/main/streams.c:393)
==32692==    by 0x80CE096: _php_stream_cast (/home/sas/src/php4/main/streams.c:2244)
2003-04-16 12:55:21 +00:00
Sascha Schumann 86f292bc00 MFH 2003-04-16 12:44:54 +00:00
Jan Lehnardt f251532caa - MFH 2003-04-16 12:05:43 +00:00
Sascha Schumann 72a2ec5d85 MFH 2003-04-16 09:21:45 +00:00
Sascha Schumann 9ba9ff7b17 Simplify use of this header in external apps 2003-04-16 09:12:37 +00:00
Sascha Schumann 856b482bab add missing check 2003-04-16 05:23:21 +00:00
foobar 38cb520533 MFH 2003-04-16 02:24:53 +00:00
foobar 8e9b151720 MFH 2003-04-16 02:19:25 +00:00
foobar d720b0c631 missing dot. :) 2003-04-16 01:52:47 +00:00
Ilia Alshanetsky ee957ac447 Bug fixing news. 2003-04-16 01:08:11 +00:00
Ilia Alshanetsky b6972e5890 MFH 2003-04-16 01:07:20 +00:00
Ilia Alshanetsky e25f73df9c Bug fixes. 2003-04-16 00:59:44 +00:00
Ilia Alshanetsky e28bc16c5b MFH 2003-04-16 00:58:53 +00:00
foobar f95c4cb8bb BFN 2003-04-15 04:27:24 +00:00
Shane Caraveo 1ee0cac2d9 fix http://bugs.php.net/bug.php?id=22004
use Sascha's suggestion, works the same, likely better :)
2003-04-15 04:14:21 +00:00
Shane Caraveo 5c19a5499b fix http://bugs.php.net/bug.php?id=22004 2003-04-15 04:01:48 +00:00
Ilia Alshanetsky fb9e0bb965 Bug fixing news. 2003-04-15 01:34:54 +00:00
Ilia Alshanetsky 1a97d39a61 Fixed bug #23201 (set_file_buffer() crashes with stdio streams).
#Already in PHP 5.0 no need for MFH
2003-04-15 01:30:59 +00:00
Ilia Alshanetsky 9e37e7adfb MFH 2003-04-15 01:00:00 +00:00
Marcus Boerger 5c4dca7424 MFH: Fixed Bug #23188 CDB databases created with 'c' mode do not work. 2003-04-14 21:53:42 +00:00
Ilia Alshanetsky 5e0efd3caa bug fixing news. 2003-04-14 13:56:30 +00:00
Ilia Alshanetsky d346b4ba9b MFH 2003-04-14 13:55:53 +00:00
Jesus M. Castagnetto 31071bdd6c Updating the PHP_4_3 branch with the fix for bug #2306. 2003-04-14 12:37:59 +00:00
Masaki Fujimoto 12e8ae3adb - fixed bug-id 2003-04-14 05:29:22 +00:00
foobar 49f3b54810 style 2003-04-14 01:52:45 +00:00
Marcus Boerger e2fdfb6c19 MFH: make it static 2003-04-13 20:31:16 +00:00
Marcus Boerger dcdaf1e9a0 Inform abot.. 2003-04-13 20:27:45 +00:00
Marcus Boerger 7f5ff80c86 MFH: reenable dba_popen 2003-04-13 20:16:14 +00:00
Sascha Schumann 171aaf4e8d MFH 2003-04-13 20:14:08 +00:00
Marcus Boerger 9cc234e979 MFH: persistent stream closing 2003-04-13 20:13:34 +00:00
Sascha Schumann 500cf0a542 MFH bison 1.875b patch 2003-04-13 20:10:32 +00:00
SVN Migration b724a873e9 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-04-13 19:50:29 +00:00
Moriyoshi Koizumi c77c03b751 MFH 2003-04-12 22:29:14 +00:00
Moriyoshi Koizumi bbd9c931b0 MFH(r-1.141): strip_tags() is also binary-safe now.
# the change was already MFHed.
2003-04-12 21:30:47 +00:00
Stig Bakken 7bfabbae52 MFH 2003-04-11 23:48:39 +00:00
Wez Furlong c6db0221c4 BFN. 2003-04-11 11:12:14 +00:00
Wez Furlong e1a54c8d10 MFH: Fix for Bug #23069 2003-04-11 11:10:39 +00:00
Derick Rethans 3cba4261fa - MFH: proto fix 2003-04-11 09:54:39 +00:00
Ilia Alshanetsky 39c03bc2c5 segv fix. 2003-04-11 02:41:26 +00:00
Ilia Alshanetsky 22e0811f2c MFH 2003-04-11 02:40:28 +00:00
Christian Stocker d7a3529ead comment xmlMemoryDump() out (only needed for debugging) 2003-04-10 13:11:00 +00:00
Christian Stocker 7241d18de1 MFH.
- Fixed memleaks in domxml_doc_add_root, domxml_xslt_stylesheet
  and domxml_xslt_stylesheet_doc
- Completed implementation of domxml_doc_imported_node.
2003-04-10 12:46:11 +00:00
Stanislav Malyshev bf5d11b44e MFH path_translated 2003-04-10 11:35:07 +00:00
Ilia Alshanetsky 9ee32440ad MFH 2003-04-10 04:35:51 +00:00
Ilia Alshanetsky 729d43f733 More integer overflows. 2003-04-10 03:27:34 +00:00
Ilia Alshanetsky 0c0482d59c MFH (fix of Win32 build by Sebastian Bergmann) 2003-04-10 02:11:20 +00:00
Marcus Boerger 00366c63fc MFH 2003-04-09 20:36:44 +00:00
Marcus Boerger d8d9e16711 MFH: cli/ini/html_errors/info (they are related) 2003-04-09 20:27:55 +00:00
Rasmus Lerdorf a86c9bbd24 Oops, there is no _FORM auto-global. We changed this to _REQUEST ages ago. 2003-04-09 17:45:38 +00:00
Derick Rethans cb9a33bc14 - MFH: html output for Zend Extension version strings 2003-04-09 15:22:45 +00:00
Edin Kadribasic 9b0239178c Fixed bug #22521.
HAVE_OCI8_SHARED_MODE causes segfaults on startup on many configurations.
2003-04-09 12:00:54 +00:00
Christian Stocker 1a3e5a816b fixed some memleaks when using attribute nodes (Rob Richards) 2003-04-09 07:33:19 +00:00
Ilia Alshanetsky ff21c392f3 MFH 2003-04-09 01:55:56 +00:00
Marcus Boerger 99637508f9 MFH: erroneous newline at start 2003-04-08 23:04:36 +00:00
Christian Stocker c48e8e5116 MFH (fixes memleaks in element->get_elements_by_tagname & document->get_elements_by_tagname) 2003-04-08 19:30:46 +00:00
Christian Stocker 9b9ec7ad1e Fixes/Additions done for domxml 2003-04-08 18:41:38 +00:00
Christian Stocker d7f0682135 Big Patch with a lot of mem-leak fixes
- Attribute nodes are freed/generated correctly
- xsltstylesheets are freed correctly
- xpathregister doesn't leak anymore
- parser/xsltglobals cleanup at MSHUTDOWN
- Added DomDocument->free() for removing documents during script-time
2003-04-08 18:26:50 +00:00
Ilia Alshanetsky aa6810479e exif reminder 2003-04-08 00:22:37 +00:00
Ilia Alshanetsky 84e44e9759 Bug fixing news. 2003-04-08 00:20:08 +00:00
Ilia Alshanetsky e49440bb73 MFH 2003-04-08 00:19:29 +00:00
foobar 4f45925b23 BFN 2003-04-07 22:52:46 +00:00
foobar be8da1111e BFN 2003-04-06 22:42:38 +00:00
foobar 2527cce052 MFH: Fixed bug #23071 (when DST in effect, date("T") crashed PHP) 2003-04-06 22:37:58 +00:00
Moriyoshi Koizumi 18939dd676 MFH(r-1.5): improved zmemcheck macro so it displays the size of each memory
block too.
2003-04-06 18:40:46 +00:00
Moriyoshi Koizumi 1a645aa637 MFH(r-1.4): improved readability of zmemcheck output 2003-04-06 18:12:36 +00:00
Moriyoshi Koizumi 8b67ff4348 MFH(r-1.2) 2003-04-06 17:54:31 +00:00
SVN Migration 3a9322c32a This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-04-06 17:53:18 +00:00
Marcus Boerger c8ff4f2262 MFH: version collating 2003-04-05 20:49:09 +00:00
foobar d9fe90785e MFH 2003-04-05 17:47:17 +00:00
foobar a4fe7b11ee MFH 2003-04-05 17:34:04 +00:00
Ilia Alshanetsky 863a441fba GD news. 2003-04-05 17:24:48 +00:00
Ilia Alshanetsky edea55ecd7 MFH (gd upgrade). 2003-04-05 17:24:16 +00:00
Marcus Boerger bdd3fbf67a MFH: Include ldd output 2003-04-05 12:19:56 +00:00
Sascha Schumann 55c86cbdb9 MFH 2003-04-05 11:40:40 +00:00
Sascha Schumann 4bfdbfb167 MFH 2003-04-05 11:22:44 +00:00
Moriyoshi Koizumi 6ccaefd48d MFH: added check for struct cmsghdr. now sockets extension can be built
under cygwin
2003-04-04 18:40:38 +00:00
foobar fdee9fe213 MFH: Fixed bug #22944 (--with-java "make install" fails) 2003-04-04 17:43:13 +00:00
foobar 8e6f5fe353 Fix bug #23048, CURLOPT_ENCODING is not always available 2003-04-04 16:18:15 +00:00
Moriyoshi Koizumi aa00851aa4 MFH(r-1.135): fixed memleak in socket_select() 2003-04-04 14:18:31 +00:00
Moriyoshi Koizumi 2b85acd861 Sorry, forgot these ones 2003-04-04 09:15:18 +00:00
Moriyoshi Koizumi 004746d842 renumbering 2003-04-04 09:13:28 +00:00
Moriyoshi Koizumi 216784bcc3 segfault busting news
replacing one tab to 4 spaces
2003-04-04 09:11:28 +00:00
Moriyoshi Koizumi 1cdedb63bd MFH(r-1.55): added missing sanity check, which was causing segfault. 2003-04-04 09:07:02 +00:00
Ilia Alshanetsky 49f0382490 MFH 2003-04-04 01:34:08 +00:00
Ilia Alshanetsky 50f76f501c Notes about various possible integer overflows in bundled gd library. 2003-04-04 01:17:35 +00:00
Ilia Alshanetsky 1525ff177f More gd stuff. 2003-04-04 00:44:34 +00:00
Ilia Alshanetsky 2ea7d06455 Fixed segv as well as info about new segvs in gd. 2003-04-04 00:29:37 +00:00
Ilia Alshanetsky f5ea07ce61 MFH 2003-04-04 00:16:54 +00:00
foobar ce99003ae1 MFH 2003-04-03 23:10:17 +00:00
Sascha Schumann 0200c77d7e one in socket_select 2003-04-03 20:07:40 +00:00
Sascha Schumann 4033fe903d augment summary with fixes which predate the list 2003-04-03 19:46:26 +00:00
Sascha Schumann 4849145b66 add chunk_split 2003-04-03 19:33:55 +00:00
Sascha Schumann bfaf2a8f36 another one fixed, a new one found 2003-04-03 19:21:50 +00:00
Sascha Schumann f8b07fbbac MFH 2003-04-03 19:19:25 +00:00
Sascha Schumann 08abb7213c fix 2003-04-03 18:55:54 +00:00
Sascha Schumann f31d157ce7 update regarding dbase extension 2003-04-03 18:52:35 +00:00
Sascha Schumann 868602b5ab Update - we purged the full list\! 2003-04-03 18:22:14 +00:00
Sascha Schumann 5d420d7bb7 MFH 2003-04-03 18:19:52 +00:00
Sascha Schumann 50d2474660 MFH 2003-04-03 18:10:41 +00:00
Rasmus Lerdorf 92cc078907 Clean up the parameter handling here 2003-04-03 15:57:30 +00:00
Derick Rethans fe93cf1b9a - CS 2003-04-03 06:21:21 +00:00
Moriyoshi Koizumi 7333bc8f82 Unable to reproduce.. 2003-04-03 01:04:13 +00:00
Moriyoshi Koizumi 9f8701ac58 segfault busting news 2003-04-03 01:01:35 +00:00
Moriyoshi Koizumi 55c5c4b362 MFH(r-1.117): fixed segfault in xml_parser_create() 2003-04-03 01:01:09 +00:00
Ilia Alshanetsky 51f2ad15f4 Bug fixing news. 2003-04-03 00:56:45 +00:00
Ilia Alshanetsky f4dd99e8b8 Fixed bug #23004 (When ftp_close() is called, sent QUIT to the ftp server) 2003-04-03 00:55:45 +00:00
Moriyoshi Koizumi 485c71abf7 MFH(r-1.152): fixed memleak in output buffering facility 2003-04-03 00:51:14 +00:00
Moriyoshi Koizumi c8948bf677 Removed i18n_convert() from the entries because that is an alias for
mb_convert_encoding()
2003-04-03 00:20:15 +00:00
Rasmus Lerdorf 77102efc79 Update 2003-04-03 00:16:51 +00:00
Moriyoshi Koizumi e64002e9ef MFH(r-1.38): fixed segfault in mb_ereg_match() 2003-04-03 00:15:58 +00:00
Moriyoshi Koizumi 043a1f5b36 MFH(r-1.37): fixed lots of crashes in mbregex 2003-04-03 00:05:01 +00:00
Rasmus Lerdorf bb0637213f Negative precision makes no sense, so check for that, but let the memory
manager error out on huge non-negative precision args
2003-04-02 23:50:41 +00:00
Rasmus Lerdorf b3ac7b808d Fix unregister_tick_function crash 2003-04-02 23:09:39 +00:00
Rasmus Lerdorf ae3616fba8 Get rid of bogus dtors 2003-04-02 22:06:46 +00:00
Rasmus Lerdorf 50c22695cd Fix the setlocale() segfault 2003-04-02 21:31:52 +00:00
foobar 7a5badecbf BFN 2003-04-02 17:35:23 +00:00
Edin Kadribasic 21390b3bf6 BFN 2003-04-02 12:38:43 +00:00
Edin Kadribasic 95ee73b7bf MFH 2003-04-02 12:36:36 +00:00
foobar 086a4fda17 MFH. (See bug #21995) 2003-04-02 11:42:16 +00:00
Christian Stocker e131b99b2a Patch for Bug #22774 by Rob Richards 2003-04-02 10:30:05 +00:00
Marcus Boerger 7dab648426 MFH 'auto' 2003-04-02 08:34:56 +00:00
Ilia Alshanetsky cd2968d0db MFH 2003-04-02 00:25:57 +00:00
Jay Smith 930347763b @- Fixed bug #23009 (pg_select with timestamp). (Marcus, Jay)
MFH
2003-04-02 00:00:09 +00:00
Jay Smith 1548b1ebf4 MFH 2003-04-01 23:28:18 +00:00
Rasmus Lerdorf 7e8039ef0d Arbitrarily limit array_pad() to only do 1 million elements at a time.
Probably still too high, but it solves the segfault for now.
2003-04-01 21:44:47 +00:00
Sascha Schumann d1c0cc7f47 s/0/FAILURE/ 2003-04-01 19:15:47 +00:00
Sascha Schumann d484c0ebf8 Fix an uninitialised read for ob_start(array()) 2003-04-01 19:13:40 +00:00
Rasmus Lerdorf 8ff4b67307 Argh!!! I guess nobody has ever looked at this code. 2003-04-01 19:10:35 +00:00
Rasmus Lerdorf 14aa0e7495 Fix exif crashes 2003-04-01 18:47:01 +00:00
Rasmus Lerdorf bf0c1962d9 Update (not fixed in HEAD because the API for this function needs to
change in PHP5.  It is moronic the way it is now)
2003-04-01 18:26:14 +00:00
Rasmus Lerdorf 724429c759 Ok, really fix socket_iovec_alloc() this time 2003-04-01 18:12:24 +00:00
foobar 00d6a6d8c2 BFN 2003-04-01 15:38:40 +00:00
foobar 5d5755af7c MFH: Fixed bug #22987 (missing perror() check in configure) 2003-04-01 15:36:21 +00:00
Sascha Schumann f373bcafd3 more insight re. ob_start bug 2003-04-01 13:02:46 +00:00
Sascha Schumann 91fb452012 The ob_start issue is reproducible. 2003-04-01 12:54:48 +00:00
Sascha Schumann 6e84cdacd1 editing 2003-04-01 12:43:45 +00:00
Sascha Schumann b5da4730a3 Overview of open issues and how to reproduce 2003-04-01 12:38:35 +00:00
Moriyoshi Koizumi 2726272b68 MFH(r-1.170): fixed crash in mb_convert_encoding() that occurs when a void
array is passed as the third parameter.
# thanks Sascha
2003-04-01 11:50:31 +00:00
Sascha Schumann 9b8fbc368c fix VPATH builds 2003-04-01 10:16:50 +00:00
Sascha Schumann ac125fa07f MFH register_shutdown_function fix 2003-04-01 10:03:19 +00:00
Sascha Schumann 1f4e9b8eb7 No need for shtool 2003-04-01 08:05:39 +00:00
Sascha Schumann 5e0a6b43fc Fix segfault in flock() 2003-04-01 07:53:05 +00:00
Sara Golemon 640dc6721c MFH(r1.71) Bug #22962 2003-04-01 06:23:22 +00:00
foobar 086c418737 BFN & houshold 2003-03-31 23:29:30 +00:00
foobar 21a600c569 MFH: Fixed bug #22989 (sendmail not found by configure) 2003-03-31 23:21:56 +00:00
Brian France 5555498304 Fixes the problem where argv and argc are not populated unless S
is in the variables_order, even if register_argc_argv is on.
2003-03-31 21:24:59 +00:00
Moriyoshi Koizumi dd426eb391 MFH(r-1.161): fixed proto to sync with the documentation 2003-03-31 20:37:15 +00:00
Moriyoshi Koizumi 6ec674deb7 MFH(r-1.10): rearranged search order for the magic file to avoid further
confusions
2003-03-31 19:49:37 +00:00
David Hill 8e15876ed5 Changing parsedate to be reentrant using pure_parse (Dave) 2003-03-31 14:40:46 +00:00
Sander Roobol ec0b8b8639 MFH remove bogus test 2003-03-31 14:34:50 +00:00
David Hill e98163546d Correcting checking of flex version (Dave) 2003-03-31 14:01:55 +00:00
foobar 666d9dea2c cleanup 2003-03-31 08:49:30 +00:00
Sascha Schumann c334a7fe0b MFH TS issue, noticed by Sebastian Bergmann 2003-03-31 05:39:45 +00:00
Sascha Schumann 1f0a9a2c0c MFH 2003-03-31 03:24:45 +00:00
Ilia Alshanetsky 42f35b8783 Bug fixing news. 2003-03-30 20:48:48 +00:00
Ilia Alshanetsky 334da52d65 MFH 2003-03-30 20:48:14 +00:00
Sascha Schumann 9daf234fef MFH 2003-03-30 18:36:46 +00:00
Rasmus Lerdorf a6072a2b76 No point calling the RSHUTDOWN hook here unless we are actually going
to do something in it.
2003-03-30 18:05:40 +00:00
Moriyoshi Koizumi bb4a3f979b MFH 2003-03-29 16:18:11 +00:00
Moriyoshi Koizumi 651808e3dd MFH(r-1.223): CS & WS fixes 2003-03-29 16:14:41 +00:00
Moriyoshi Koizumi ecc0759032 MFH(r-1.436): improved bison check; now configure accepts 1.28, 1.35 and 1.75
only.
2003-03-29 15:56:25 +00:00
Moriyoshi Koizumi e9a6358d8d MFH: fixed test cases so it wouldn't be failed in case register_globals=on 2003-03-29 07:14:26 +00:00
Derick Rethans 80ba3f416f MFH 2003-03-28 21:08:58 +00:00
Moriyoshi Koizumi c4521dfb2f MFH(r-1.222): do the right fix.. 2003-03-28 18:25:01 +00:00
Moriyoshi Koizumi b7875715ce MFH(r-1.221): fixed bug #22773 2003-03-28 17:55:08 +00:00
Harald Radi ff65578160 fix #22899
invoke is called twice
2003-03-27 19:56:09 +00:00
Shane Caraveo ce2edd18c7 MFH 2003-03-27 17:57:58 +00:00
Edin Kadribasic f85ea33a98 BFN 2003-03-27 13:32:45 +00:00
Edin Kadribasic 9ff0a9f23e Fixed bug #22083. 2003-03-27 13:29:59 +00:00
foobar d9e4d36c48 MFH 2003-03-27 13:16:34 +00:00
Rasmus Lerdorf 15d4bfd607 Make sure we never pass a negative arg to emalloc
(once again, this API needs to be fixed, so this is just for 4.3)
2003-03-25 19:26:18 +00:00
Sebastian Bergmann b7cfe4b5a6 MFH 2003-03-25 17:18:24 +00:00
Rasmus Lerdorf f461ad12fb Restrict this function to a max of 65k io vectors to avoid weird
overflows.  Purely an arbitrary number.  This API needs cleaning up,
but it would break BC and I don't want to do that in 4.3.
2003-03-25 15:54:26 +00:00
Ilia Alshanetsky db230015b8 MFH 2003-03-25 15:35:27 +00:00
Martin Jansen 1ce0aca43e * MFH 2003-03-25 14:41:38 +00:00
foobar 1c0de7be96 MFH: Made "--with-pear" "--disable-all"-aware. Plus some cosmetics fixes. 2003-03-25 13:43:56 +00:00
Edin Kadribasic ec127efd14 php_fbsql.dll hasn't been successfully built at least from 4.1.x.
Related to #22859.
2003-03-25 10:19:44 +00:00
foobar 64e2082f39 - MFH: not pretty name (bug #22853) 2003-03-25 01:38:50 +00:00
Ilia Alshanetsky 86306178c5 MFH 2003-03-25 01:34:39 +00:00
Edin Kadribasic a5274daf1f Patch by Nathan Fredrickson <nathan@silverorange.com>:
Remove unneeded library from the link stage and add a couple of missing
defines which are part of libintl.
2003-03-24 21:46:58 +00:00
Moriyoshi Koizumi f8ff0d2cb4 MFH: fixed bug #22834 (compile failure due to ugly implicit casts) 2003-03-24 21:22:57 +00:00
Moriyoshi Koizumi 5f0e06e89c NFN 2003-03-24 19:42:20 +00:00
Rasmus Lerdorf e120dab4f2 Fix arg list segfault 2003-03-24 19:28:58 +00:00
Moriyoshi Koizumi 1d71c7b86e MFH(r-1.1): oops... 2003-03-24 19:25:14 +00:00
Moriyoshi Koizumi 88bbfc9975 MFH(initial): added test cases for new functionality 2003-03-24 19:22:18 +00:00
SVN Migration 9c617f52f6 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-03-24 19:21:21 +00:00
Moriyoshi Koizumi 5945ba1c6d MFH(r-1.76): added koi8-r, cp866, and cp1251 support for htmlentities()
Patch by Antony Dovgal <tony2001 at phpclub dot net>
2003-03-24 19:15:16 +00:00
Ilia Alshanetsky c89afb6539 MFH 2003-03-24 15:21:57 +00:00
Ilia Alshanetsky b544c99344 Bug fixing news. 2003-03-24 14:54:52 +00:00
foobar bb0a9b3208 MFH 2003-03-24 11:21:26 +00:00
foobar 718d337c64 blah.. 2003-03-24 10:59:47 +00:00
Uwe Schindler 25dc000e41 PHP_WIN32 included 2003-03-24 10:33:47 +00:00
foobar 1f77ab10fc MFH: Fixed bug #18640 properly 2003-03-24 10:18:16 +00:00
Wez Furlong ceed7b9d77 MFH curl detection when multiple installations exist 2003-03-23 18:16:12 +00:00
Moriyoshi Koizumi 7ebc888513 MFH(r-1.7): added some compiler check 2003-03-23 01:45:28 +00:00
Moriyoshi Koizumi 06b796783c MFH(r-1.5): fixed win32 build with non-SBCS locale settings. 2003-03-22 23:45:20 +00:00
Shane Caraveo cecc66d17b MFH 2003-03-22 18:54:56 +00:00
Christian Stocker c479e904dd fix for bug #22786 ("Crash when trying to call DomAttribute's set_namespace method") 2003-03-20 09:43:09 +00:00
Wez Furlong 893c567e35 Fix for persistent stream shutdown in debug builds. 2003-03-20 00:55:58 +00:00
Wez Furlong 6aecc88543 This little fragment didn't get merged from head... 2003-03-19 19:27:52 +00:00
foobar 7480c6ac91 MFH 2003-03-19 16:53:25 +00:00
foobar b5930ec988 BFN 2003-03-19 08:23:02 +00:00
foobar 2f47425d71 MFH: Fixed bug #22775 (Fatal errors exit with status 0 with CGI/CLI) 2003-03-19 08:22:35 +00:00
Wez Furlong a0b0182016 Fix my fix.
# The perils of manual merging :/
2003-03-19 01:34:38 +00:00
Wez Furlong ea59c6262d Manual merge of persistent stream sanity check from php5. 2003-03-19 00:18:12 +00:00
Wez Furlong 4a8de5c704 Manual merge of the persistent plain file streams code.
See http://news.php.net/article.php?group=php.cvs&article=19680 for
more information.
2003-03-18 23:39:31 +00:00
Marcus Boerger 8c86b7e323 MFH 2003-03-18 22:43:00 +00:00
Wez Furlong c51569c3b6 WS Fix: I forgot to apply Q} to my comment. 2003-03-18 22:25:02 +00:00
foobar aef81e78a0 MFH: fix for bug #22765 2003-03-18 17:31:55 +00:00
Wez Furlong ca552c2618 Avoid using FILE* unless we have to. 2003-03-18 16:39:06 +00:00
Wez Furlong 55b4052887 BFN 2003-03-18 15:21:33 +00:00
Wez Furlong 217d3e39c6 Fix my 64-bit casting fix.
MFH Fix for #22721 - poor performance for file() on systems without mmap
support.
2003-03-18 14:41:46 +00:00
foobar a6c9ed61a6 BFN 2003-03-18 02:15:22 +00:00
foobar fdc6b229a6 MFH: Fixed bug #22751 (Compile error in gdcache when external libgd is used) 2003-03-18 02:14:22 +00:00
foobar 0b4182d8ad BFN 2003-03-18 01:26:16 +00:00
foobar afa7fa58d7 MFH: Fix for bug #22672 2003-03-18 01:24:57 +00:00
Ilia Alshanetsky de93525d7d MFH 2003-03-17 22:26:51 +00:00
Ilia Alshanetsky c2c3eaf5a7 MFH 2003-03-17 18:47:29 +00:00
Ilia Alshanetsky 768f515afc Bug fixing news. 2003-03-17 18:33:30 +00:00
foobar 7ae1572b39 MFH 2003-03-17 15:56:31 +00:00
foobar af3950d196 BFN 2003-03-17 15:19:30 +00:00
Wez Furlong 03777d2784 MFH Fix for Bug #21310 2003-03-17 13:50:23 +00:00
foobar 25e8d3215d MFH 2003-03-17 12:43:36 +00:00
foobar ba7b405913 Note about apache2 change 2003-03-17 10:00:46 +00:00
foobar 183f99038a MFH: - Fixed bug #22709 (crash within interbase when database unavailable) 2003-03-16 00:38:51 +00:00
Marcus Boerger 388607dc2d MFH bugfix #21751 2003-03-16 00:03:27 +00:00
Moriyoshi Koizumi 273d7623a6 MFH: added test for bug #22592 2003-03-15 23:37:53 +00:00
SVN Migration 15703e7fb8 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-03-15 23:37:18 +00:00
Wez Furlong 37aafafc7d 64 bit fixes 2003-03-15 13:25:38 +00:00
foobar c4db6427f4 MFH 2003-03-15 00:45:44 +00:00
foobar 03188dfd50 MFH: "allow_webdav_methods" does not exist / is not needed anymore 2003-03-15 00:26:43 +00:00
foobar bac7bb82b0 MFH: No c++ comments 2003-03-14 17:50:02 +00:00
foobar d4a01a8524 MFH: no c++ comments 2003-03-14 17:40:55 +00:00
Moriyoshi Koizumi 2fdf127a6f MFH: fixed typo 2003-03-14 17:14:08 +00:00
Derick Rethans 9f2cd8d5f2 - Explain that it is interbase related (Thanks to Andrey) 2003-03-14 13:01:29 +00:00
Derick Rethans f7c7e4cadb - BFN 2003-03-14 11:51:31 +00:00
Daniela Mariaschi ff9fc7aa3f reverting to 1.8.4.1 2003-03-14 10:47:58 +00:00
Daniela Mariaschi 688f6d1b9d MFH 2003-03-13 23:21:49 +00:00
foobar 7cd06114f1 BFN shortening 2003-03-13 22:54:48 +00:00
Edin Kadribasic 6659396dc6 Document removal of gd1 support on windows. 2003-03-13 22:32:16 +00:00
Edin Kadribasic 5dc55d66fc Drop support for php_gd.dll (gd1).
The default build (gd.dsp) is now bundled gd2.
2003-03-13 22:23:10 +00:00
Edin Kadribasic 156ab40baa Disable building of apache2filter (obsoleted by handler). 2003-03-13 22:03:20 +00:00
Daniela Mariaschi 05afcba8e7 Numeric/decimal datatype overflow on Win32
Fixed bug #20641
2003-03-13 22:02:10 +00:00
Edin Kadribasic f38526321b Make apache2 handler produce php4apache2.dll which should work as a
drop in replacement for the filter. Remove max_request_per_child from
minfo() since that function is not exported by win32 version of apache2
lib.
2003-03-13 22:01:43 +00:00
Martin Jansen 288d19ae0a * Also fix #21845 in the release branch.
# This is *no* complete MFH, I just applied the patch in the other branch.
2003-03-13 21:10:26 +00:00
Sara Golemon 779cc0f8d4 BFN 2003-03-13 20:25:01 +00:00
Jay Smith 0af96031de MFH 2003-03-13 18:51:53 +00:00
Ilia Alshanetsky 84dcdc880f Bug fixing news. 2003-03-13 18:16:21 +00:00
Ilia Alshanetsky 57a32b2825 MFH 2003-03-13 18:15:39 +00:00
foobar 690439a295 MFH 2003-03-13 17:27:40 +00:00
Sara Golemon d03df22d4c MFH (Bug 21534) 2003-03-13 16:18:10 +00:00
foobar 4730528a95 We should get this out before April.. 2003-03-12 22:36:30 +00:00
foobar 1ab395eed3 - Backup to 4.3.2RC 2003-03-12 22:21:25 +00:00
foobar 9ea0fff51d - Bump the version to RC1. 2003-03-12 22:18:22 +00:00
Stefan Esser 60963ffe6c MFH 2003-03-12 12:01:01 +00:00
Ilia Alshanetsky 22e1885d29 MFH 2003-03-12 04:46:15 +00:00
foobar 900584ec7f MFH 2003-03-12 04:30:01 +00:00
foobar b1d3a4d6cd MFH 2003-03-12 04:16:31 +00:00
foobar bdaed8f51a MFH 2003-03-12 02:26:58 +00:00
foobar 367c917d80 MFH 2003-03-12 01:10:01 +00:00
Ilia Alshanetsky 062a5863c0 MFH (XBM patch by Marcus Börger) 2003-03-12 01:02:41 +00:00
SVN Migration 0a2f05f09b This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-03-12 00:51:04 +00:00
foobar 16106bd1f7 OnUpdateLong is only in php5/HEAD. (oops! :) 2003-03-11 17:22:31 +00:00
Moriyoshi Koizumi 2185951cbb Fixed bug #22634 (broken cygwin build) 2003-03-11 16:53:28 +00:00
foobar 06c9c4d205 BFN 2003-03-11 03:12:37 +00:00
foobar 8a3bd41416 MFH: - Fixed bug #20715 (odbc could not be compiled as shared extension) 2003-03-11 03:11:52 +00:00
Sascha Schumann 3aced8a7d4 fix sizeof(size_t) > sizeof(uint) issue 2003-03-11 02:32:29 +00:00
foobar e21f147cb9 BFN 2003-03-11 02:13:00 +00:00
foobar ff33d897d5 MFH: Fixed bug #22616 (Wrong order of -lssl and -lcrypto with IMAP) 2003-03-11 02:12:17 +00:00
Sascha Schumann bb30c3ad73 reverting jani's non-sense commits 2003-03-11 01:50:18 +00:00
foobar 9f34a5beca MFH 2003-03-10 23:13:03 +00:00
Ilia Alshanetsky 05ce493547 Bug fixing news. 2003-03-10 19:09:22 +00:00
Ilia Alshanetsky bfa3967c70 MFH 2003-03-10 19:07:49 +00:00
David Hill a9cf0f46fc fixing missed int to long with zend_parse_parameters 2003-03-10 15:57:07 +00:00
foobar cddddbe04c - MFH: use shtool mkdir always. 2003-03-10 14:33:10 +00:00
David Hill 9ec2c33e9d 64-bit corrections to parameters to OnUpdateInt Bug #20994 (Dave)
@64-bit corrections to parameters to OnUpdateInt Bug #20994 (Dave)
2003-03-10 13:35:36 +00:00
foobar 4648e756a9 - MFH: apache2handler sapi module
- Changed apache2filter to use --with-apxs2filter
2003-03-10 03:17:04 +00:00
Shane Caraveo 9dfd6c8779 fix line endings in file 2003-03-10 02:40:19 +00:00
Shane Caraveo 95987aedb2 fix using stdin. This was already fixed in php5. 2003-03-10 02:35:59 +00:00
foobar 4f7a06cf66 MFH 2003-03-10 02:17:06 +00:00
foobar 8c92d6574c no c++ comments.. 2003-03-10 02:10:18 +00:00
Shane Caraveo d1c5e9706f line endings on win32 made the var_dump'ed string 4 bytes longer. this should work on all platforms. 2003-03-10 01:23:10 +00:00
Shane Caraveo 4fc121ad7f splitting on whitespace will be different depending on platform, so be specific with the line ending. 2003-03-10 01:10:52 +00:00
Shane Caraveo 58c67323da make test happy by adding missing functions to avoid warnings, taken from user_stream.c 2003-03-10 00:14:11 +00:00
Derick Rethans f27049afb6 - No C++ comments! (Patch by Magnus) 2003-03-09 19:15:16 +00:00
Uwe Schindler da7b2d970d Changes for iPlanet Webserver 6 2003-03-09 12:08:36 +00:00
Derick Rethans a758078ce5 - MFH: Fixed a bug in GD's truecolor TTF handling. 2003-03-08 18:28:08 +00:00
Stefan Esser 20c9225f64 MFH 2003-03-08 15:24:47 +00:00
foobar 2492aba147 MFH: Fix for bug #22473 2003-03-07 18:58:34 +00:00
foobar cc44d7c3d6 Added note about the 64bit fixes 2003-03-07 18:41:42 +00:00
Uwe Schindler c138b63720 credits update 2003-03-07 17:08:06 +00:00
Ilia Alshanetsky e34d5dd3e8 Bug fixing news. 2003-03-07 14:08:54 +00:00
Ilia Alshanetsky 52967f54b9 MFH 2003-03-07 14:08:06 +00:00
David Hill 45a1a3037a 64-bit correction to variables passed to zend_parse_parameters
@64-bit correction to variables passed to zend_parse_parameters (Dave)
2003-03-07 13:42:30 +00:00
foobar f760f7b6b3 MFH 2003-03-07 06:18:27 +00:00
foobar 67b6b9781f MFH 2003-03-07 04:32:49 +00:00
Stefan Esser 5f142e88fb MFH 2003-03-06 20:59:27 +00:00
Moriyoshi Koizumi 011ea824da MFH 2003-03-06 19:37:32 +00:00
foobar 94e6ceec58 MFH 2003-03-06 16:29:15 +00:00
SVN Migration d391faffe6 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-03-06 16:29:06 +00:00
foobar 41ab6de3aa I was bored.. 2003-03-05 18:48:04 +00:00
Ilia Alshanetsky 7559d17ec1 Bug fixing news. 2003-03-05 17:03:03 +00:00
Ilia Alshanetsky 2cc9d8537f MFH 2003-03-05 17:00:25 +00:00
Ilia Alshanetsky 98c17e6cee GD news. 2003-03-05 16:24:05 +00:00
Ilia Alshanetsky 9b8cdd7fe9 MFH 2003-03-05 16:19:18 +00:00
SVN Migration 66736faf95 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-03-05 16:19:09 +00:00
foobar d63aa79f79 MFH 2003-03-05 16:12:41 +00:00
Ilia Alshanetsky 52e84a5f0b MFH 2003-03-05 16:08:21 +00:00
Ilia Alshanetsky 68679a9d0e Synchronized bundled gd with gd 2.0.11 (bug fixes).
MFH
  1) Use Zend allocation macros instead of native allocation functions.
  2) Better error reporting mechanism.
  3) Some style fixes, which allow easier code synchronization & maintenance.
2003-03-05 16:04:20 +00:00
Corne' Cornelius 81b97d6f8e - MFH: 1.88 2003-03-05 13:20:44 +00:00
Corne' Cornelius f42ff6e563 - MFH: 1.87 2003-03-05 09:39:53 +00:00
Moriyoshi Koizumi 3c0d44c580 MFH: added missing phpinfo entry (Russian support) 2003-03-05 06:16:54 +00:00
Wez Furlong c106213d5c Fix some signed/unsigned issues with read() and SSL_read() return values.
Allow SSL_connect() to retry for non-blocking sockets.
Correctly declare the char as unsigned for php_stream_getc(), as per
fgetc() semantics.
2003-03-05 01:28:45 +00:00
Moriyoshi Koizumi e46f133a2b MFH: Added a test case for bug #22510 2003-03-04 19:52:48 +00:00
SVN Migration 668d8f88c1 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-03-04 19:52:23 +00:00
foobar 3dece9cd5c MFH 2003-03-04 19:00:11 +00:00
Moriyoshi Koizumi 26cb6a8d20 MFH: 64bit fix 2003-03-04 17:20:27 +00:00
Moriyoshi Koizumi a8b620a91f MFH: 64bit long fix 2003-03-04 17:14:56 +00:00
Ilia Alshanetsky 802a410834 MFH 2003-03-04 16:35:02 +00:00
Ilia Alshanetsky ed2ea558a8 Bug fixing news. 2003-03-04 16:22:00 +00:00
Ilia Alshanetsky e32ebf58c7 MFH 2003-03-04 16:20:51 +00:00
Ilia Alshanetsky 276a43792c Compiler warning fix. 2003-03-04 16:20:24 +00:00
Ilia Alshanetsky 114afad93d MFH 2003-03-04 16:09:17 +00:00
foobar 47ea35f85b adding news entry for disable_classes addition 2003-03-04 14:24:48 +00:00
Christian Stocker 161db1b519 make it really W3C compatible (unlink node, when in tree...) 2003-03-04 13:29:18 +00:00
Edin Kadribasic 8d2773e188 Update credits. 2003-03-03 21:56:51 +00:00
Edin Kadribasic 03ab5315d5 BFN 2003-03-03 21:30:19 +00:00
Edin Kadribasic 17479b8a0f Enabled mcrypt_generic_deinit() on windows (#22520) 2003-03-03 21:23:48 +00:00
Harald Radi 9c4f6365b8 MFH: adding disable_classes ini directive 2003-03-03 01:54:29 +00:00
Harald Radi fc25077468 MFH: adding placeholder for the new disable_classes directive 2003-03-03 01:31:48 +00:00
foobar 3e983d2bc6 MFH 2003-03-02 18:52:37 +00:00
foobar 3daa76dd25 MFH 2003-03-02 18:51:10 +00:00
foobar 5ae27dbe85 MFH: fix bug #22485 2003-03-02 18:47:54 +00:00
Ilia Alshanetsky 095595dd61 New function news. 2003-03-02 14:38:54 +00:00
Pierre Joye d33ceff2a5 Update credits 2003-03-01 01:16:00 +00:00
Pierre Joye 61dd954da2 MFH imageistruecolor, imagesavealpha 2003-03-01 01:15:47 +00:00
Rasmus Lerdorf 70432e3bef @- Crash bug fix. If config-file-scan-dir is set and contains .ini files
but there is no top php.ini file, we would get a segfault.  (Rasmus)
2003-02-28 20:44:47 +00:00
Moriyoshi Koizumi 18e06aefee Was actually an ucwords() problem... 2003-02-28 13:32:46 +00:00
foobar 659a5ca923 BFN 2003-02-28 10:23:05 +00:00
Hartmut Holzgraefe dcb20d8fd6 MFphp5 2003-02-28 08:43:51 +00:00
foobar 488f38424e BFN 2003-02-28 07:35:58 +00:00
foobar 7323b80041 - MFH: Fixed bug #22312 (crash on failed connection when curl_getinfo() was called).
(Phil Oleson <poleson@verio.net>)
2003-02-28 07:35:11 +00:00
Hartmut Holzgraefe a14adbcafe MFphp5 2003-02-28 06:51:31 +00:00
Ilia Alshanetsky 0570451948 MFH 2003-02-27 20:38:22 +00:00
Ilia Alshanetsky c1170b27fc Bug fixing news. 2003-02-27 16:42:42 +00:00
Ilia Alshanetsky 01ad5f9b94 MFH 2003-02-27 16:41:44 +00:00
Sascha Schumann 97301cbc36 MFH 2003-02-27 10:07:59 +00:00
Corne' Cornelius 92600eeb76 - MFH: Segfault in ifx_errormsg() 2003-02-27 09:00:52 +00:00
Rasmus Lerdorf a731bd9f44 Get rid of an unnecessary syscall on non-Windows. We don't need two
setitimer() calls here in order to reset the timer.
2003-02-26 22:17:35 +00:00
Hartmut Holzgraefe af2589e943 MFphp5 2003-02-26 17:38:03 +00:00
Moriyoshi Koizumi 6b0adb932b BFN: the fix was actually done by Ilia. 2003-02-25 18:56:53 +00:00
Moriyoshi Koizumi 4308ba9e42 MFH(r1.72): int / long change
Fixed bug #22301 (htmlspecialchars crashes on Tru64)
2003-02-25 18:51:21 +00:00
Ilia Alshanetsky 87b3063593 MFH 2003-02-25 16:26:55 +00:00
SVN Migration 6d4e490ae1 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-02-25 16:21:01 +00:00
foobar 2fa25b8799 MFH 2003-02-25 11:48:57 +00:00
foobar 35839a5f96 BFN 2003-02-25 11:25:00 +00:00
foobar 0f88e33c05 MFH: Fixed bug #21224 (apache configure fails when using --enable-versioning) 2003-02-25 11:23:24 +00:00
foobar ee5fe8f38d BFN 2003-02-25 09:46:24 +00:00
foobar 2c486990c6 MFH: Fixed bug #20256 (snprintf() not defined on some systems) 2003-02-25 09:45:47 +00:00
foobar cf2fe4d2da MFH: typofix 2003-02-25 07:41:05 +00:00
Corne' Cornelius c3b452be51 MFH 2003-02-25 07:09:11 +00:00
Corne' Cornelius 1a920b4b19 MFH: 1.30 2003-02-25 06:56:28 +00:00
foobar e964bb3779 BFN 2003-02-25 06:37:18 +00:00
foobar fd5f2b33a9 MFH: Fixed bug #14245 ('make install' fails on AIX when using --with-apxs). 2003-02-25 06:36:21 +00:00
foobar 3d8e6218ef MFH 2003-02-25 04:37:08 +00:00
Ilia Alshanetsky f713b0d8b0 Bug fixing news. 2003-02-25 04:21:26 +00:00
Ilia Alshanetsky c0eb65d6be MFH 2003-02-25 04:20:44 +00:00
Ilia Alshanetsky 71d140e992 MFH (fix for crash in gdImageCopyMergeGray()). 2003-02-25 03:53:22 +00:00
Moriyoshi Koizumi 1cabc773e4 MFH: made fgetss() binary safe too 2003-02-24 22:48:39 +00:00
Moriyoshi Koizumi 6708c4d24d MFH: made strip_tags() binary safe 2003-02-24 22:47:12 +00:00
Ilia Alshanetsky c663066261 Bug fixing news. 2003-02-24 19:42:38 +00:00
Ilia Alshanetsky f19bd6bf3f MFH 2003-02-24 19:41:40 +00:00
Moriyoshi Koizumi 033bea7a29 MFH: added test case for bug #22367 2003-02-24 19:38:33 +00:00
SVN Migration 5112f925df This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-02-24 19:37:28 +00:00
Harald Radi 152bcb4e6d fix memleak and wrong refcounting 2003-02-24 18:30:20 +00:00
Moriyoshi Koizumi c6a8a1bf04 MFH 2003-02-24 16:56:25 +00:00
Moriyoshi Koizumi ea23f45b36 MFH(r1.74): fixed an signed / unsigned issue 2003-02-24 16:30:14 +00:00
Moriyoshi Koizumi e0217033e4 MFH(r1.73): style fix 2003-02-24 16:19:44 +00:00
foobar 1e8876bdad MFH: Possible fix for #22259 + part 1/2 for fixing AIX DSO bug 2003-02-24 16:16:57 +00:00
foobar f49b5760eb - Removing pointless tests. (both of these will be fixed in PHP 5)
# We don't need to get any test reports about these anymore
# for PHP_4_3 branch since these won't be fixed in 4.3.x.
2003-02-24 16:04:05 +00:00
foobar f89ebf69bf MFH 2003-02-24 15:12:11 +00:00
foobar c96af79b53 no c++ comments 2003-02-24 08:26:49 +00:00
Corne' Cornelius 3df90156fd - MFH: Fixed ifx_errormsg() Segfault 2003-02-24 07:45:59 +00:00
foobar 0c52aed751 MFH 2003-02-24 04:37:15 +00:00
foobar a9a4668b92 MFH: fixed compile warning 2003-02-24 03:27:16 +00:00
Ilia Alshanetsky bb2f10122c Bug fixing news. 2003-02-24 03:18:26 +00:00
Ilia Alshanetsky 1544debc9f MFH 2003-02-24 03:15:54 +00:00
SVN Migration 240b4d18e3 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-02-24 03:13:26 +00:00
foobar 49664eb29a BFN 2003-02-24 01:31:24 +00:00
George Schlossnagle e7155c5f3d MFH fix for 19919 2003-02-24 01:29:54 +00:00
Rasmus Lerdorf fc069fb51b open_basedir fixes from David Saez 2003-02-23 22:03:54 +00:00
Stig Bakken 18843133b8 * MFH: upgrading XML_Parser to 1.0.1 2003-02-23 11:05:17 +00:00
SVN Migration ef667d12e1 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-02-23 11:03:39 +00:00
foobar b8547bbff0 Fixed bug #22356 (Do not add empty -I flags). 2003-02-23 09:36:47 +00:00
foobar 51eac9d194 MFH 2003-02-23 08:14:34 +00:00
foobar a4ef92e0ec BFN 2003-02-23 07:35:57 +00:00
foobar ca2cd45607 MFH: - Fixed bug #22376 (wrong httpd.conf modified when using INSTALL_ROOT) 2003-02-23 07:34:32 +00:00
foobar b79c07099f MFH 2003-02-23 02:40:07 +00:00
SVN Migration a9b5596a02 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-02-23 02:39:52 +00:00
Wez Furlong 935a58c3a2 Correct a bug number - thanks to Philip... 2003-02-22 20:51:13 +00:00
Wez Furlong 753e0cf3dd Squashed those ugly bugs! 2003-02-22 11:30:06 +00:00
Wez Furlong bd55197721 Miscellaneous streams fixes, including probable fixes for:
Bug #21131 (fopen with 'a+' and rewind() doesn't work)
Bug #21713 (include remote files leaks temporary files + descriptors on Solaris)
Bug #21185 (move_uploaded_file() does not ignore open_basedir as it should)
Bug #22362 (combinations of fwrite(), fread() and fseek() produce unexpected results)
2003-02-22 02:43:58 +00:00
foobar 1abd496ccf fixed headers and cleaned up a bit 2003-02-21 10:42:01 +00:00
foobar a3ad6e8426 ZTS build fixes, style and ws fixes 2003-02-21 06:49:56 +00:00
foobar 193021f8f6 MFH 2003-02-21 06:49:36 +00:00
foobar fd2483fe83 MFH: ZTS build fixes 2003-02-21 06:46:55 +00:00
foobar 040839d34b Fix ZTS build 2003-02-21 04:58:09 +00:00
Moriyoshi Koizumi 3f67551437 BFN 2003-02-20 17:57:54 +00:00
Moriyoshi Koizumi 80aadb9e77 MFH(r1.165): Fixed bug #22330 (overloaded strrpos() weirdness) 2003-02-20 17:54:10 +00:00
Corne' Cornelius 395e90b16b @- Added Input Descriptor Binding to Informix driver. (Corne')
- Added Input Descriptor Binding
  . (php_intifx_init_blob) Added
  . (php_intifx_init_blob_inmem) Added
  . (php_intifx_init_blob_infile) Added
  . (php_intifx_release_blob) Added
  . (php_intifx2_free_blob) Removed
  . (php_intifx_create_tmpfile) Removed bid parameter
  . (php_intifx_alloc_ibind) Added
  . (php_intifx_preparse) Added
  . (php_intifx_count_descriptors) Added
  . (ifx_free_blob) Added as le_idresult resource destructor
  . (php_intifx_create_blob) Changed: added call to php_intifx_init_blob() and
                             removed blob initilisation in function
  . (php_intifx_copy_blob) Changed: added call to php_intifx_init_blob() and
                           removed blob initilisation in function
  . (php_intifx_update_blob) Changed mempy() to use lob_bufsize instead of loc_size
                             Changed filename to be memcpy() instead of creating
                             new file
  . (PHP ifx_query) Changed: added input descriptor binding
  . (PHP ifx_prepare) Changed: added input descriptor binding
  . (PHP ifx_do) Chagned: added input descriptor binding
  . (PHP ifx_fetch_row) Changed the way blobs are accessed/init'd from
                        Ifx_Result->res_id[]
2003-02-20 12:09:21 +00:00
Corne' Cornelius be563c3140 #- Changed sizes of char[] in IFX_RES: connecid, cursorid, descrpid, statemid
from 16 to 32 to prevents possible overflow
2003-02-20 11:57:29 +00:00
Harald Radi 41f25857bb fixing bugs #22295, #22218 and #22162 (duplicates) 2003-02-20 11:34:26 +00:00
Sascha Schumann f63d9b778f merge minor differences from head 2003-02-20 08:32:41 +00:00
foobar 8ea1d52d7a style fix 2003-02-20 07:14:23 +00:00
foobar c511afe310 BFN 2003-02-20 07:12:02 +00:00
foobar 77e48a2801 MFH: Fixed bug: #22306 (pg_lo_seek($h, 0, PGSQL_SEEK_SET) succeeds but returns false) 2003-02-20 07:10:48 +00:00
Sascha Schumann 9220edbf14 update 2003-02-20 06:55:35 +00:00
Sascha Schumann 8d9da24365 MFH general urlencoding
MFH session_regenerate_id, a change which is as important as the former one
2003-02-20 06:24:08 +00:00
foobar fdc6323b34 MFH 2003-02-20 06:17:11 +00:00
foobar 92d2462660 BFN 2003-02-20 05:36:54 +00:00
foobar c61f4fe7b3 MFH: - Fixed bug #22299 (gethostbyname() crash with non-existing domain on MacOSX) 2003-02-20 05:35:18 +00:00
Ilia Alshanetsky 7de39b3377 Bug fixing news. 2003-02-20 00:35:42 +00:00
Ilia Alshanetsky 3d67565aed MFH 2003-02-20 00:34:24 +00:00
foobar accaef402b BFN 2003-02-20 00:15:55 +00:00
foobar e7b71d3932 dirent.h needs to be included always. 2003-02-19 18:45:03 +00:00
Marc Boeren 157ab1fd10 MFH: Fix for bug #22221 2003-02-19 16:52:05 +00:00
Harald Radi 5a6bacea03 MFH 2003-02-19 16:17:34 +00:00
Harald Radi d39c73dba2 remove php5ts workspace from PHP_4_3 branch 2003-02-19 11:04:54 +00:00
Sascha Schumann 614a83e555 some improvements 2003-02-19 11:01:38 +00:00
foobar fd631013d9 MFH: prevent conflicts with other libraries (e.g. libc-client) 2003-02-19 09:28:37 +00:00
Moriyoshi Koizumi fe2506a5ff MFH: fix incorrect TSRMLS_CC 2003-02-19 08:12:25 +00:00
foobar 5f2c98c566 MFH: avoiding problems.. 2003-02-19 06:35:57 +00:00
Ilia Alshanetsky c2176e0843 Bug fixing news. 2003-02-19 00:50:36 +00:00
Ilia Alshanetsky eb4e27f356 MFH 2003-02-19 00:49:38 +00:00
Moriyoshi Koizumi 25eff603b1 BFN 2003-02-18 18:15:44 +00:00
Moriyoshi Koizumi 2c09220992 MFH(r1.359): Fixed bug #21708 2003-02-18 18:14:32 +00:00
Moriyoshi Koizumi c85abb1789 BFN 2003-02-18 15:26:20 +00:00
Moriyoshi Koizumi 42bf45cee1 MFH(r1.307): Fixed bug #21689 2003-02-18 15:22:46 +00:00
foobar e2c593c928 Sanity check to prevent errors in other extensions tests. 2003-02-17 22:44:47 +00:00
foobar d3f8b43799 MFH 2003-02-17 18:16:49 +00:00
foobar 9c6c9f8fcd Bump up the version. 2003-02-17 00:02:11 +00:00
Anil Madhavapeddy 5f607a11a9 MFH 2003-02-16 01:32:30 +00:00
foobar 3a2a0b1c4c - Remove all of it.
# Ian, this was really unnecessary..
2003-02-15 22:20:55 +00:00
Ian Holsman f6cf0fce5c After short discussion, the #php.bugs mob decided that we don't want
this in PHP_4_3 branch. At least as long as it doesn't work as well
    (or preferrably better :) than the apache2filter SAPI does.

    So please remove it from the branch for now..

    --Jani
2003-02-15 22:16:03 +00:00
foobar 6809236f2b BFN 2003-02-15 20:42:49 +00:00
Stig Bakken 5c988b679e * import PEAR 1.0.1 2003-02-15 20:28:54 +00:00
foobar ad54620a27 MFH: Fix for bug #22220 2003-02-15 20:23:12 +00:00
Moriyoshi Koizumi 4382065fad B.F.N. 2003-02-15 20:00:03 +00:00
Moriyoshi Koizumi b298ce0dd0 MFH(r1.155): Fixed bug #22234 2003-02-15 19:59:26 +00:00
Moriyoshi Koizumi af1432d9a8 B.F.N. 2003-02-15 16:00:20 +00:00
Moriyoshi Koizumi 68b0858da6 MFH(r1.65): Fixed bug #22227
MFH: Added test case for bug #22227
2003-02-15 15:59:13 +00:00
SVN Migration e572e41cff This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-02-15 15:57:32 +00:00
Wez Furlong f133f366e2 bug fixed. 2003-02-15 15:16:58 +00:00
Moriyoshi Koizumi 37a4fa83fb MFH: added test case for bug #22231 2003-02-15 15:15:45 +00:00
SVN Migration ac73fa6482 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-02-15 15:15:15 +00:00
Wez Furlong f695a4c3b6 MFH: Fix for Bug #21809 (select() never times out during socket shutdown) 2003-02-15 15:11:57 +00:00
Edin Kadribasic 9c90d59fc0 Option -b needs an argument. This fixes #22229.
# Note -b still seems to be broken:
# sapi/cgi/php -b 4444
# Status: 404
# Content-type: text/html
# X-Powered-By: PHP/4.3.1-dev
#
# No input file specified.
2003-02-15 13:26:05 +00:00
Ian Holsman dd15de6bda alternate apache2 SAPI. 2003-02-15 05:49:31 +00:00
Moriyoshi Koizumi d98f4b5a6a Slight fix for consistency 2003-02-14 19:48:57 +00:00
Marcus Boerger ba0a3f5673 MFH: xbm improvements 2003-02-14 19:46:21 +00:00
Moriyoshi Koizumi 7ad4a8f0b5 BFN 2003-02-14 19:44:02 +00:00
Moriyoshi Koizumi e62a2145bb Fixed wrong commit: s/&/*/ 2003-02-14 19:07:38 +00:00
Moriyoshi Koizumi 6d47746e5a MFH(r1.358): Fixed a str_replace() bug similar to bug #22224 2003-02-14 19:00:43 +00:00
Moriyoshi Koizumi c81a6322c1 MFH(r1.357): Fixed bug #22224
MFH: Added test case for the bug
2003-02-14 18:44:51 +00:00
SVN Migration 36bc1fb617 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-02-14 18:42:37 +00:00
foobar fdd1cf4772 Added missing $Id$ tag 2003-02-14 14:38:01 +00:00
foobar 20156b84eb - MFH, do not add libcrypt if crypt() is provided by libc. 2003-02-14 01:27:42 +00:00
Sara Golemon 261860cfec Buf #22052 More casual efree()ing causing segfaults 2003-02-13 22:18:20 +00:00
Wez Furlong c6fa04834c Fix for Bug #22199 (fputs() + fgets() destroys readbuffer for non-seekable streams). 2003-02-13 21:03:25 +00:00
foobar 9b4f865e5d MFH 2003-02-13 20:58:41 +00:00
foobar b3140b0218 typofix 2003-02-13 20:08:52 +00:00
Sara Golemon 4a27c8a032 MFH(Bug 22059, ftp.c-r1.77) 2003-02-13 19:51:02 +00:00
Ilia Alshanetsky faaaabb640 MFH 2003-02-13 19:07:55 +00:00
SVN Migration 8b9c2fbc66 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-02-13 19:07:21 +00:00
foobar bed6a98112 MFH 2003-02-13 18:50:44 +00:00
SVN Migration 5d0e8a70bb This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-02-13 18:49:58 +00:00
Shane Caraveo 40e365b239 MFH 2003-02-13 18:21:23 +00:00
Wez Furlong 45894683e9 MFH: Another IS_SLASH fix. 2003-02-13 17:37:17 +00:00
Wez Furlong 26d4841366 MFH: relative path fix for win32 2003-02-13 17:32:41 +00:00
Ilia Alshanetsky 7fd1152dea Bug fixing news. 2003-02-13 17:27:28 +00:00
Ilia Alshanetsky c2187f4f17 MFH 2003-02-13 17:26:02 +00:00
SVN Migration 10198da7d0 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-02-13 17:25:32 +00:00
foobar 66aa7f76d8 altering history.. 2003-02-13 17:00:28 +00:00
Harald Radi 4fb6c33182 add missing include 2003-02-13 16:48:44 +00:00
Wez Furlong 6f8da6f3b3 MFH: clarify error message 2003-02-13 14:43:19 +00:00
Wez Furlong 398b912ca5 partial MFH: avoid problems with auto_detect_line_endings. 2003-02-13 13:42:31 +00:00
Wez Furlong ffb1961064 MFH: cli should be allowed to use chroot() function. 2003-02-13 13:37:05 +00:00
Uwe Steinmann 991af2d2f0 - Some functions with objects as its parameters didn't recognize them
as such
2003-02-13 10:56:50 +00:00
foobar 7c5adc1bb8 MFH 2003-02-13 07:48:00 +00:00
foobar 2413a30578 MFH 2003-02-13 07:19:15 +00:00
foobar 840d327139 - MFH: improved jpeg 2000 and wbmp support for getimagesize() 2003-02-13 07:16:55 +00:00
foobar 8ea2a50279 clean.. 2003-02-13 05:45:01 +00:00
Sascha Schumann 69a24f699d MFH 2003-02-13 02:30:54 +00:00
Sascha Schumann ac9dd33e9a MFH 2003-02-13 02:25:35 +00:00
Wez Furlong 9ebca1715b Fixed that one... 2003-02-13 01:27:13 +00:00
Wez Furlong fa0e1a6363 MFH: Fix for Bug #21815 2003-02-13 01:23:39 +00:00
Sara Golemon c6b71544a4 Reverting earlier patch to reintroduce buggy behavior (yes, you heard that right) of filtered http streams in favor of
performance.  This has little consequence given limited filter support in 4.3 branch.  Filters will be redesigned in
5.0 release. For more information see Wez, Ilia, or myself.
2003-02-13 00:42:06 +00:00
Ilia Alshanetsky 7e94fe102c Bug fixing news. 2003-02-12 20:45:52 +00:00
Ilia Alshanetsky 8879087461 MFH 2003-02-12 20:44:26 +00:00
foobar 11260dc9d7 MFH 2003-02-12 17:09:47 +00:00
foobar 4a7e9488dd MFH 2003-02-12 16:19:08 +00:00
foobar 53532f9ec2 add blame tag 2003-02-12 16:03:48 +00:00
Ilia Alshanetsky 263c27f1ea Bug fixing news. 2003-02-12 14:59:54 +00:00
Ilia Alshanetsky b1593177fd MFH 2003-02-12 14:58:30 +00:00
foobar 983479603c MFH 2003-02-12 04:39:30 +00:00
SVN Migration cbd263dafe This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-02-12 04:38:31 +00:00
foobar 75efe4efbb MFH: Moved from HEAD :) 2003-02-12 04:08:50 +00:00
foobar fcace76909 MFH 2003-02-12 04:05:33 +00:00
foobar 4fc8d5412d MFH: Use $(INSTALL) for installing shared extensions. 2003-02-12 03:25:29 +00:00
foobar 7a7c43c72b MFH 2003-02-12 03:15:04 +00:00
Moriyoshi Koizumi 9c7635228f MFH: reverted my patch & applying a new patch by Stefan Esser 2003-02-11 23:30:13 +00:00
Ilia Alshanetsky 0aa95a722a Bug fixing news. 2003-02-11 22:59:39 +00:00
Ilia Alshanetsky 35ae0bfaa2 MFH 2003-02-11 22:57:50 +00:00
foobar 552da2b7f2 MFH 2003-02-11 21:11:51 +00:00
foobar 10c80a1344 fugbix news 2003-02-11 15:50:32 +00:00
foobar 948c33ba88 MFH 2003-02-11 03:24:56 +00:00
foobar ed36254fcc Moved one entry from HEAD here.. 2003-02-11 03:08:10 +00:00
foobar 4b541216e3 fugbix news 2003-02-11 02:45:28 +00:00
foobar 532ec10636 MFH: - Fixed bug: #21549 (problem with Ingres II persistent connections) 2003-02-11 02:43:25 +00:00
Sascha Schumann 01f0478750 MFH 2003-02-11 02:35:34 +00:00
Moriyoshi Koizumi c8d4018067 MFH: fixed zlib.output_compression 2003-02-11 02:26:37 +00:00
Sascha Schumann 04e25c59f7 MFH BUFF check 2003-02-11 02:25:48 +00:00
Frank M. Kromann b99ce6c644 Bug #20426. Convert SMALLDATETIME correct 2003-02-11 01:23:49 +00:00
Sascha Schumann eb09c03ae1 MFH prefix ps_module changes 2003-02-11 01:16:03 +00:00
Sascha Schumann 55d7aa9142 MFH, fully selfcontained, my risk 2003-02-11 01:00:59 +00:00
foobar 9d20219f73 dots..I love ya.. 2003-02-11 00:11:59 +00:00
Moriyoshi Koizumi 5173670675 MFH: fixed possible buffer overflow in 64bit systems 2003-02-10 20:13:36 +00:00
Moriyoshi Koizumi d4a0d6f6a5 dot dot dot.. 2003-02-10 19:55:39 +00:00
Moriyoshi Koizumi 8aa0debb6e Fixed typo 2003-02-10 19:52:56 +00:00
Sara Golemon 4b5fb9c99b Bug 22141 2003-02-10 19:47:04 +00:00
Sara Golemon d631657862 Partial MFH. Deprecated BM algo for str_replace can hang execution. See Bug#22141 2003-02-10 19:37:27 +00:00
Melvyn Sopacua 385729ef2a Make sure we're not buffering stuff 2003-02-10 18:49:02 +00:00
foobar 984380543e - MFH: libtool upgrade to 1.4.3
# For some reason those other files were not up-to-date in this branch..
2003-02-10 17:12:17 +00:00
Harald Radi e9d17fba59 18 times the speed of light 2003-02-10 00:58:07 +00:00
Harald Radi e7609d54be fixed memleak 2003-02-10 00:45:15 +00:00
foobar af8557850b MFH 2003-02-10 00:22:20 +00:00
foobar 3df73b303e MFH (ws fixes, but merged to ease any fix patch merging) 2003-02-09 23:48:59 +00:00
foobar b7e4606a73 MFH 2003-02-09 23:30:08 +00:00
foobar 8fc9bfc66e MFH: Fixed _SERVER[] variables, memleaks 2003-02-09 23:27:50 +00:00
foobar 4b2f06a0fa sex with punctuation mark.. 2003-02-09 22:56:47 +00:00
Kai Schroeder 77e3df17cc fix for #17928 2003-02-09 21:42:31 +00:00
Sascha Schumann 6cfa5ae855 MFH 0/-1 changes 2003-02-09 21:28:49 +00:00
Ilia Alshanetsky 7ec507dec2 Bug fixing news. 2003-02-09 20:51:16 +00:00
foobar fd66d44562 MFH 2003-02-09 19:58:18 +00:00
foobar 50ac9e5aef MFH: fixed compile failures when ZLIB/PCRE are compiled as shared in same
build.
2003-02-09 19:10:32 +00:00
foobar ac4554b8c8 MFH 2003-02-09 18:47:30 +00:00
foobar 2cd330b733 MFH: Fix for bug #22131 2003-02-09 14:59:29 +00:00
Kai Schroeder 33db0681c8 newlines changed 2003-02-09 13:26:00 +00:00
Kai Schroeder ddd2ce19ec getopt() is currently not available on Windows 2003-02-09 13:23:10 +00:00
Kai Schroeder f1f5996447 there are no symlinks on Windows 2003-02-09 13:20:34 +00:00
SVN Migration 215e66b8d6 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-02-09 13:20:18 +00:00
Kai Schroeder d956ec06f2 is_executable() does not exist on Windows 2003-02-09 13:18:13 +00:00
Kai Schroeder 24bbf22171 die() to skip second message 2003-02-09 12:34:07 +00:00
Kai Schroeder 9675190c46 MSVC's mktime() does not examine the existence of a daylight-saving-time zone 2003-02-09 12:28:31 +00:00
Derick Rethans eef3cdf70b - Whitespace fixes 2003-02-09 12:14:31 +00:00
Kai Schroeder bdde9d0aa2 test for mktime() 2003-02-09 12:11:01 +00:00
Kai Schroeder 2108d66d2b Windows does not support dates prior to midnight, January 1, 1970 2003-02-09 12:09:42 +00:00
Kai Schroeder 1306b02625 skip for Windows (does not support dates prior to midnight, January 1, 1970) 2003-02-09 12:07:42 +00:00
Kai Schroeder 7cb5be80be Windows doesn't know timezone CET 2003-02-09 12:05:58 +00:00
Frank M. Kromann bcf2e083cc cleanup variable initializations 2003-02-09 09:40:56 +00:00
Frank M. Kromann ed7d034849 Fixing coredump when no php.ini file is used 2003-02-09 08:32:54 +00:00
Yasuo Ohgaki f834ec6410 MFH 2003-02-09 07:50:31 +00:00
Frank M. Kromann 7ce83ed0ca DBFLT4 is not defined in FreeTDS. Needed for real data types 2003-02-09 07:49:34 +00:00
Frank M. Kromann f9712217d8 Fixing autodetect of FreeTDS 2003-02-09 07:48:40 +00:00
Yasuo Ohgaki e54ec4b8d2 MFH 2003-02-09 07:24:36 +00:00
Frank M. Kromann 7145b24e59 Bug #21707 problem with real 2003-02-09 07:18:27 +00:00
Frank M. Kromann 2b51649f74 Fixing build with GD 2.0.11 2003-02-09 06:27:08 +00:00
Frank M. Kromann a0a0428b34 Adding missing HAVE_GD_STRINGFTEX define 2003-02-09 06:26:45 +00:00
Frank M. Kromann 1ae32f0c2d Adding some missing defines to enable functions.
Fixing bug #22130
2003-02-09 05:47:06 +00:00
Sascha Schumann afaecf4140 MFH 2003-02-08 18:59:38 +00:00
Marcus Boerger 16add2cb7a MFH: manpage for this version 2003-02-08 15:27:33 +00:00
Pierre Joye 2475dbc759 MFH:
Add gdImageEllipse
Replace gdImageFilledEllipse by a new function (backported from
the new phpgd)
the new gdImageFilledEllipse fix bug bug #22103 (ellipse part)
2003-02-08 08:54:11 +00:00
Sara Golemon bc517aaa2a MFH(r-1.59) 2003-02-08 01:36:52 +00:00
SVN Migration 9547f33a8e This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-02-07 22:12:03 +00:00
Dan Kalowsky 8d1923852a Patch for Bug #21279 submitted by ernani@php.net 2003-02-07 02:58:31 +00:00
Sara Golemon 90175ea1d8 MFH(r-1.51) 2003-02-06 22:23:36 +00:00
foobar c6f204ab79 MFH 2003-02-06 16:21:24 +00:00
foobar 55090ad3f8 fugbix news 2003-02-06 15:29:27 +00:00
foobar 2e9cafa7e5 MFH: - Fixed bug #22088 (array_shift() leaves next index to be +1 too much) 2003-02-06 15:28:28 +00:00
foobar c9d1212cf2 MFH 2003-02-06 15:24:08 +00:00
foobar be72d3fe1b MFH 2003-02-06 15:05:19 +00:00
SVN Migration f3627d1d8d This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-02-06 15:04:54 +00:00
Andrey Hristov 6cd12c25ee added entry for memory_get_usage(). 2003-02-06 14:36:58 +00:00
Andrey Hristov 3d913d6143 Backporting memory_get_usage() from HEAD.
As far as the code is small there won't be any problems.
2003-02-06 14:34:07 +00:00
Sara Golemon f757c17b2f FMH(r-1.49/r-1.50) 2003-02-04 21:39:50 +00:00
foobar bf496a03cf reorder the bug fixes (reverse #). added missing bug fixing news 2003-02-04 19:07:09 +00:00
Sara Golemon d558e94c93 MFH(r-1.48) (Bug#13551) 2003-02-04 19:02:02 +00:00
Ilia Alshanetsky a6a0ae3e74 Bug fixing news. 2003-02-04 18:35:55 +00:00
Ilia Alshanetsky 16f626702d MFH 2003-02-04 18:34:10 +00:00
foobar bdfee70cec Added missing bugfix news entry. 2003-02-04 10:10:25 +00:00
Ilia Alshanetsky b6813a0898 MFH 2003-02-03 22:48:35 +00:00
Ilia Alshanetsky aa55dcf8f5 MFH 2003-02-03 21:24:48 +00:00
Ilia Alshanetsky d92f023f4d MFH 2003-02-03 20:56:28 +00:00
foobar a51420ddc8 MFH: Fix bug: #22035 (EXTRA_LDFLAGS for AIX not quite right) 2003-02-03 17:35:39 +00:00
foobar 90dce5bec5 fugbix news 2003-02-03 17:01:16 +00:00
foobar ef6658864a MFH: Fixed bug: #21998 (array_pop() did not reset the current array position) 2003-02-03 16:58:08 +00:00
Moriyoshi Koizumi af4be723b2 MFH: fixed proto 2003-02-03 16:54:38 +00:00
foobar d4223acfed MFH 2003-02-03 16:52:15 +00:00
Moriyoshi Koizumi e7a663d137 MFH: fixed test case for mb_strpos() 2003-02-03 16:17:29 +00:00
foobar 01ef5c86f1 MFH 2003-02-03 13:08:19 +00:00
foobar 34c712bae0 MFH: Fixed bug: #22011 (-n must ignore all ini files) 2003-02-03 12:25:47 +00:00
foobar 93ca6a350e MFH 2003-02-03 11:45:55 +00:00
Giuseppe Tanzilli 008dc0c248 Fix sapi/servlet build on Unix 2003-02-03 09:04:09 +00:00
foobar bfd4ad90ed MFH: added test for bug #21998 2003-02-03 06:44:21 +00:00
SVN Migration 06049c7753 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-02-03 06:43:09 +00:00
Sara Golemon 98f4eed1d4 MFH(r-1.50/r-1.51) 2003-02-03 03:47:00 +00:00
Ilia Alshanetsky 1baeaf9201 MFH 2003-02-02 23:09:40 +00:00
Ilia Alshanetsky e2b1618571 MFH 2003-02-02 20:27:01 +00:00
Zeev Suraski f70be2a9a7 Fix phpinfo() display of Zend extensions 2003-02-02 15:51:37 +00:00
Marcus Boerger c1e7c349c5 MFH: Change DBM detection order 2003-02-01 22:19:31 +00:00
Marcus Boerger 692fc9d24a MFH: include file handling and dbm fixes 2003-02-01 19:01:13 +00:00
Melvyn Sopacua 6b0b91474a MFH: Bug #21892 (links to apache2 install instructions missing) 2003-02-01 11:21:14 +00:00
Ilia Alshanetsky 43e6623c3d MFH 2003-01-31 22:27:28 +00:00
Marcus Boerger 13e162eb04 MFH: Version info 2003-01-31 20:10:11 +00:00
Marcus Boerger 05e397b330 MFH: Shared dba requires at least db-3.3 2003-01-31 20:07:23 +00:00
Frank M. Kromann 283efd226d Rename script.
Add check for CLI version
2003-01-31 18:50:41 +00:00
Melvyn Sopacua 4be86f6c14 "The ugly patch"
Make mcrypt compile, when we finally are free of -ltdl. Bug #20926.

# There's a variant, with a config option, but that's an ugly word(tm)
2003-01-31 15:06:45 +00:00
Moriyoshi Koizumi 56107bb783 MFH: fixed a mb_send_mail() bug.
# sorry for mixing WS fix
2003-01-31 14:28:44 +00:00
foobar 49ad4ad943 Moved from HEAD. 2003-01-31 14:23:56 +00:00
foobar 3744c31519 MFH all changes as requested by Maxim. 2003-01-31 14:21:19 +00:00
Sascha Schumann 34c7b71a89 MFH obsolete warning 2003-01-31 07:47:10 +00:00
Frank M. Kromann fcb3b7d6b9 Wrapper script to execute ext_skel on WIn32 2003-01-31 01:01:51 +00:00
Frank M. Kromann a7851234a7 Allow extensions to be loaded on win32 2003-01-31 01:01:06 +00:00
Frank M. Kromann 79dcd3c4cf Adding Win32 project file 2003-01-31 01:00:42 +00:00
Marcus Boerger e7605bb420 MFH: revert partly 2003-01-30 21:38:15 +00:00
Sascha Schumann 6eb3a0ff12 Partial MFH: Fix sticky eof issue, and avoid calling system stat macro 2003-01-30 21:11:29 +00:00
foobar 856dafbe36 MFH: fix bug: #21945 (zts build failed) 2003-01-30 19:30:34 +00:00
Marcus Boerger c4ba0d56d2 MFH: Allow to link against chosen modules correctly 2003-01-30 18:31:36 +00:00
Ilia Alshanetsky 998c64cc5d MFH 2003-01-29 19:33:56 +00:00
Edin Kadribasic 81586fed7d MFH 2003-01-29 15:42:43 +00:00
foobar d2549b91aa ordered all bug fixes by the number :) 2003-01-29 08:08:25 +00:00
foobar 5e63f36507 news entries for new options in phpize and php-config 2003-01-29 03:26:15 +00:00
Harald Radi 9f2275ec67 fix warnings 2003-01-29 00:59:54 +00:00
Harald Radi c23bb9ce4f ilia pointet me to a thread on php-dev saying that
Co(Un)Initialize should be called per thread
2003-01-29 00:46:31 +00:00
Harald Radi 339702a044 fix for bug #20282 (and propably some of the
other com bugs)

#credits also go to tzm.de for sponsoring me
2003-01-29 00:10:01 +00:00
Harald Radi bd731f1ed3 moved to php4/main 2003-01-28 23:46:13 +00:00
Harald Radi 309e5aacc1 somehow the module shutdown order got reversed since 4.3.0,
thus the CoInitialize / CoUninitialize calles are more sane here
than in the basic functions module.
2003-01-28 23:45:02 +00:00
foobar 67acb0fa9e fugbix news 2003-01-28 17:57:51 +00:00
Ilia Alshanetsky 6d7d365d3c Fixed compile warning. 2003-01-28 17:46:47 +00:00
Ilia Alshanetsky 63610854d5 Bug fixing news. 2003-01-28 16:36:50 +00:00
Ilia Alshanetsky 827b79d6c1 MFH 2003-01-28 16:34:41 +00:00
Derick Rethans b7010976f0 - Fix includes 2003-01-28 16:05:07 +00:00
Ilia Alshanetsky 6faa5e5bc4 Fixed compiler warning. 2003-01-28 16:02:33 +00:00
foobar 03caef107a - MFH: Fixed bug #13561 (--without-pear prevents install of php-config, phpize)
- MFH: Added --ldflags option to php-config
- MFH: Added --clean option to phpize
2003-01-28 15:02:08 +00:00
foobar 8650dda505 MFH: Typo fix 2003-01-28 15:00:15 +00:00
Edin Kadribasic 35876e07b3 MFH 2003-01-28 14:19:12 +00:00
SVN Migration 0cb305a4f8 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-01-28 10:59:13 +00:00
Edin Kadribasic 17c7216ee0 MFH 2003-01-28 10:54:17 +00:00
foobar 5a0738d82d MFH: typo fixes 2003-01-28 06:56:42 +00:00
foobar beed320140 MFH: typo fix 2003-01-28 06:52:33 +00:00
Marcus Boerger 97ab5eb4d4 MFH 2003-01-28 06:27:19 +00:00
Frank M. Kromann 694406816b Fix the setting of computer name and processor type for php_uname() on Win32 2003-01-28 05:01:46 +00:00
Ilia Alshanetsky 96f815aa74 MFH (scandir patch). 2003-01-28 01:51:26 +00:00
foobar 12e5f25ced MFH 2003-01-28 01:00:42 +00:00
SVN Migration 3835ea2241 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-01-28 00:42:55 +00:00
Marcus Boerger b5b59b7ee6 MFH: --without-flatfile, Berkeley DB version check 2003-01-28 00:12:19 +00:00
Edin Kadribasic 169ce6948d MFH: Fixed bug #21597 (made glob() understand Windows paths). 2003-01-27 16:32:48 +00:00
Andrey Hristov ed8ccb2911 MFH 2003-01-27 16:22:33 +00:00
foobar b36e230373 revert previous commit 2003-01-27 12:44:56 +00:00
foobar 956681d54a MFH: use grep -E instead of egrep. the latter is not defined by POSIX anymore 2003-01-27 11:33:47 +00:00
Moriyoshi Koizumi 736588313d MFH: test update 2003-01-27 01:16:34 +00:00
Marcus Boerger f660a474af MFH: Part 2, forgot the '@' 2003-01-26 17:23:00 +00:00
Marcus Boerger c8ee823db0 MFH: Simplify 2003-01-26 17:18:24 +00:00
Sander Roobol 39d29d68b2 MFH (well... it's not really an MFH... but who cares :) 2003-01-26 09:20:12 +00:00
Shane Caraveo 842fa7a716 MFH
fix broken build by adding scandir and alphasort
2003-01-26 01:46:40 +00:00
Shane Caraveo 839512558f MFH
fix bug 21261
    putenv on some platforms requires we provide the memory
    cleanup env parsing logic
fix bug 21367
    missed optargs in a previous patch
2003-01-25 22:02:45 +00:00
Ilia Alshanetsky f142761ab8 MFH 2003-01-25 21:15:41 +00:00
Marcus Boerger 375f71522b MFH: The builtin version was always used even if configured otherwise. 2003-01-25 19:51:05 +00:00
Marcus Boerger 2fb7ff2f43 MFH: Bug #21751: Part one never let this happen again... 2003-01-25 19:50:04 +00:00
Ilia Alshanetsky d5b75a2768 MFH 2003-01-25 18:55:40 +00:00
Ilia Alshanetsky 2a4f59ce8f MFH 2003-01-25 00:26:34 +00:00
Dan Kalowsky 0d29b1ef72 busted by the style police... 2003-01-24 22:49:22 +00:00
Dan Kalowsky 306918850b Patch for bug #21844 2003-01-24 22:43:42 +00:00
Ilia Alshanetsky 6695acbd23 MFH 2003-01-24 19:24:01 +00:00
Ilia Alshanetsky 3871b272fd MFH 2003-01-24 19:16:28 +00:00
foobar a630f7cf1d MFH: Fix bug #21795, Undeclared statement in oci8.c (OCI_ATTR_STATEMENT) 2003-01-24 17:51:40 +00:00
Ilia Alshanetsky 98536a9d8b MFH (memory leak in quota functions). 2003-01-24 17:10:40 +00:00
foobar eb15881a94 MFH: typofix 2003-01-24 10:13:16 +00:00
foobar 9aea9970bb MFH: Fix potential problem for 64-bit architectures. 2003-01-24 10:00:18 +00:00
foobar 7ce609a045 figbug news 2003-01-24 09:54:30 +00:00
foobar 8d5ade4cef MFH: Fixed bug: #20857, snmpset() fails 2003-01-24 09:53:16 +00:00
Derick Rethans 8e5d7f67ef - MFH: memleak 2003-01-24 08:50:59 +00:00
foobar 1c3f186c11 Remove unused GET/POST entries 2003-01-24 05:56:03 +00:00
foobar cea7bd34ca MFH 2003-01-23 16:30:07 +00:00
foobar 6cd646e939 MFH 2003-01-23 06:42:51 +00:00
foobar e506353517 Enable building with freetype 2.1.3 2003-01-23 06:22:42 +00:00
foobar c7c6ddf6e1 MFH 2003-01-23 05:33:19 +00:00
foobar 0eb7973e96 fugbix news 2003-01-23 05:20:34 +00:00
foobar 1d6714eea4 MFH: Added test for bug: #21513 2003-01-23 03:29:22 +00:00
SVN Migration 5849307944 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-01-23 03:28:42 +00:00
Frank M. Kromann e2dd22e13f adding missing zlib.lib and path to bindlib 2003-01-22 20:12:47 +00:00
Ilia Alshanetsky 4bbff1f82d MFH 2003-01-22 19:53:40 +00:00
Moriyoshi Koizumi ba1e0fbf46 MFH: reverted the wrong patch 2003-01-21 22:09:55 +00:00
Moriyoshi Koizumi d78df15074 MFH: fixed a mb_regex_replace() bug 2003-01-21 22:04:28 +00:00
Moriyoshi Koizumi 77821ecb75 MFH: fixed mb_ereg_search() segfault 2003-01-21 19:32:18 +00:00
foobar 8fdf6abb81 MFH: Fixed bug: #21698, httpd.conf not modified with "make install" 2003-01-21 06:03:16 +00:00
Edin Kadribasic 2070287f64 MFH 2003-01-21 03:04:38 +00:00
SVN Migration 35382136b4 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-01-21 02:46:08 +00:00
Moriyoshi Koizumi 875814b68b MFH: fixed bug #21758 2003-01-20 16:46:34 +00:00
foobar 591b6e7d59 MFH 2003-01-20 10:39:39 +00:00
Moriyoshi Koizumi d3a2e6852c MFH: fixed bug #21744 2003-01-19 12:56:26 +00:00
SVN Migration 65b0cbbfeb This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-01-19 11:32:55 +00:00
Moriyoshi Koizumi 95122f3209 MFH: added test case for bug #21730 2003-01-18 21:21:32 +00:00
Moriyoshi Koizumi 16670b2d42 MFH: fixed bug #21726 and #21730 2003-01-18 21:20:47 +00:00
Ilia Alshanetsky 6c7c785e9d MFH 2003-01-18 20:49:02 +00:00
SVN Migration 14b549692e This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-01-18 19:02:22 +00:00
foobar 4affc10629 MFH: Fix bug: #21687, imap extension does not include gss authentication mechanism 2003-01-18 07:01:11 +00:00
Sascha Schumann 6b398307a3 MFH POST fixes 2003-01-17 19:11:38 +00:00
Derick Rethans eb8f7ccead - MFH: Fixed a bug that made that no newline was displayed when there was no
value for a row.
2003-01-17 18:12:38 +00:00
Ilia Alshanetsky 2ed8d327b8 MFH 2003-01-16 21:18:59 +00:00
Edin Kadribasic f7b9d75e18 MFH: recent fixes to number_format() 2003-01-16 13:21:54 +00:00
Ilia Alshanetsky 5295f6e657 MFH 2003-01-16 02:54:07 +00:00
Harald Radi eaa9026f2d removing this stuff from the php 4.3 branch 2003-01-15 21:52:29 +00:00
Sascha Schumann 5360b2e876 MFH 2003-01-15 21:20:05 +00:00
foobar 55f12ed0bb MFH: handle ERANGE from strtol properly 2003-01-15 15:53:34 +00:00
Sascha Schumann 18d55a08b3 MFH 2003-01-15 11:32:31 +00:00
Sascha Schumann 29db4eaa2c MFH 1.150 2003-01-15 11:29:05 +00:00
Sascha Schumann 9c9d4b2177 MFH 1.161 2003-01-15 11:28:25 +00:00
foobar 0c51c2b3dc Fixed the bad MFH 2003-01-15 09:31:41 +00:00
Sebastian Bergmann 6a547ff74b MFH: zlib build fix 2003-01-15 09:10:56 +00:00
Ilia Alshanetsky a21aa4991d MFH 2003-01-15 00:52:20 +00:00
Edin Kadribasic a97cbb59e2 Bugfixing news 2003-01-14 14:49:41 +00:00
Edin Kadribasic 3ae6ab890d Made bind_textdomain_codeset() available on windows (fixes #21525). 2003-01-14 14:45:16 +00:00
foobar 7bd89a17dd Fixed bug: #21543, Informix version detection fails 2003-01-13 23:31:33 +00:00
Moriyoshi Koizumi 18a5dc440f MFH
# The typo I made in the previous commit log is not intentional :)
2003-01-13 19:21:44 +00:00
Moriyoshi Koizumi c7050f9f93 MFH 2003-01-12 23:57:20 +00:00
SVN Migration 093b043bca This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-01-12 23:56:05 +00:00
Frank M. Kromann 57a3edd204 MFH 2003-01-12 06:29:33 +00:00
Frank M. Kromann a712b3f5f4 MFH 2003-01-12 03:17:44 +00:00
Ilia Alshanetsky 0ec6f5f3e9 MFH 2003-01-11 23:50:59 +00:00
Ilia Alshanetsky debdc829df MFH 2003-01-11 23:07:13 +00:00
Christian Stocker 4214d95e6f Throw error if object is not a XML_DOCUMENT_NODE 2003-01-10 18:05:02 +00:00
Ilia Alshanetsky 5eaeb31845 MFH 2003-01-10 02:00:52 +00:00
Ilia Alshanetsky 2c92e3f983 Bug fixing news. 2003-01-10 01:17:03 +00:00
Ilia Alshanetsky e566262369 MFH 2003-01-09 23:09:41 +00:00
Frank M. Kromann 6ea06ad338 MFH 2003-01-09 22:36:02 +00:00
Ilia Alshanetsky 8fb3f4a199 MFH 2003-01-09 22:34:27 +00:00
Sara Golemon e1c35b0f16 MFH 2003-01-09 22:29:02 +00:00
Ilia Alshanetsky 0faa05d744 MFH 2003-01-09 16:54:15 +00:00
Sebastian Bergmann 82e8134fc6 MFH: Revert config.w32.h.in -> config.w32.h build step. 2003-01-09 16:52:14 +00:00
foobar 70e5f19ff8 MFH: Fix bug #21511 2003-01-09 16:38:28 +00:00
SVN Migration 5cd68e4606 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-01-09 15:44:50 +00:00
Frank M. Kromann 7917d26b57 MFH 2003-01-09 08:28:19 +00:00
Ilia Alshanetsky 0cc6d8fccf MFH 2003-01-09 03:33:44 +00:00
Frank M. Kromann ab84d192be MFH 2003-01-08 23:21:42 +00:00
Ilia Alshanetsky 73bf754530 MFH 2003-01-08 18:11:58 +00:00
Ilia Alshanetsky d20ee838f0 Bug fixing news. 2003-01-08 15:01:59 +00:00
Georg Richter c687f71c5a fixed bug 21498 2003-01-08 11:15:12 +00:00
Ilia Alshanetsky 8994f31b03 MFH 2003-01-08 02:44:50 +00:00
Ilia Alshanetsky 7a16fdbd27 MFH 2003-01-08 00:44:58 +00:00
Edin Kadribasic 4978b31363 Bugfix #17098 in the branch 2003-01-07 15:28:13 +00:00
Edin Kadribasic 20a2136350 MFH:
Fixed bug #17098 (make Apache aware that PHP scripts represent dynamic data
and should not be cached). Fix suggested by daniel.eckl@gmx.de.
2003-01-07 15:23:45 +00:00
Edin Kadribasic 2dfed948a1 Bugfixing news 2003-01-07 11:26:03 +00:00
Edin Kadribasic 8b5cb40c24 Fixed bug #21442 (Crash of mail() on Windows when the first parameter
is empty).
2003-01-07 11:20:50 +00:00
Frank M. Kromann 1d819f780c MFH 2003-01-07 05:20:42 +00:00
Ilia Alshanetsky 296bc367dc MFH 2003-01-07 03:53:56 +00:00
Ilia Alshanetsky 794f365e4e Changed perror() to php_error_docref(), fixed bug #21309.
Made extension use ZE memory allocation wrappers, fixed a memory leak in
ftp_mkdir.
Removed duplicate ftp_syst() call inside ftp_systype().

# A larger patch with CS fixes will be applied to HEAD shortly.
2003-01-07 02:21:58 +00:00
Ilia Alshanetsky d9afe5c129 MFH 2003-01-06 22:16:30 +00:00
SVN Migration 6c44faecfd This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-01-06 22:13:04 +00:00
Ilia Alshanetsky 544be4d557 MFH 2003-01-06 21:43:50 +00:00
Georg Richter 9a2babf4b6 fixed a missing & (Thx to Sebastian Bergmann 2003-01-06 14:12:40 +00:00
Edin Kadribasic b89acbbc31 Bugfixing news. 2003-01-06 10:53:35 +00:00
Edin Kadribasic b37cbba31d Fixed bug #20503 (imagesetbrush() availability on windows). 2003-01-06 10:42:10 +00:00
Christian Stocker 562fa5b78f - fix crash in domxml_node_insert_before() (by Lukas Schröder) 2003-01-06 10:00:34 +00:00
Christian Stocker 1fcbd36e6d partly MFH from 1.288 (Fixed segfault, when trying to add a node to itself) 2003-01-06 08:48:38 +00:00
Edin Kadribasic 7be4d4640a Mention gif read-only support on windows. 2003-01-06 01:49:17 +00:00
Edin Kadribasic 7802d1e61c MFH: Added missing flags and .c files for gif read support on Windows. 2003-01-06 01:44:50 +00:00
Ilia Alshanetsky 65029af613 Bug fixing news. 2003-01-06 00:49:24 +00:00
Ilia Alshanetsky f600d3e481 MFH 2003-01-06 00:47:47 +00:00
Derick Rethans ada8f84019 - MFH (Fix for bug #21435) 2003-01-05 21:11:39 +00:00
Edin Kadribasic 73cac507ad Made xslt_set_encoding() available on windows (bug #20640). 2003-01-05 13:52:21 +00:00
Edin Kadribasic 063c192a12 Fixed ZTS build. 2003-01-05 13:02:02 +00:00
Ilia Alshanetsky b2576fd44f MFH 2003-01-05 04:29:35 +00:00
Marcus Boerger 48c8f7c55b MFH 2003-01-04 19:53:53 +00:00
Marcus Boerger b05115978c Fix ZTS-ZE2 (After Cygwin now for the rest) 2003-01-04 19:51:46 +00:00
Marcus Boerger bb74381c49 Fix ZTS-ZE2 build 2003-01-04 19:42:37 +00:00
Marcus Boerger dc8e2ab453 MFH: Fix ZTS-ZE2 build 2003-01-04 19:21:22 +00:00
Derick Rethans c71f17295c - MFH: Fixed bug #21232 (Unresolved references to PQsetnonblocking). (Patch by
Floyd <floyd@studiodust.com>)
2003-01-04 12:34:27 +00:00
Alex Waugh 4033a44b95 MFH 2003-01-03 22:07:05 +00:00
Derick Rethans 6f533a3d8a - Fix docrefs 2003-01-03 21:32:24 +00:00
Derick Rethans 1bfe97474f - Remove broken lines (due to MFH) 2003-01-03 18:57:37 +00:00
Ilia Alshanetsky ae6d79eae3 MFH (fix for bug #21267 & memory leak fix on reidrects). 2003-01-03 17:19:46 +00:00
Derick Rethans 71a5313fc5 - MFH for bug #21311 2003-01-03 12:31:13 +00:00
Derick Rethans 7daca337be Bugfixing news 2003-01-03 09:19:49 +00:00
Moriyoshi Koizumi da497ecb88 Updated the test so it reflects the recent change on iconv.c 2003-01-03 05:15:54 +00:00
Moriyoshi Koizumi 655a3126a2 Fixed shift-out sequence unawareness issue 2003-01-03 05:13:11 +00:00
Moriyoshi Koizumi ae0519643e MFH 2003-01-03 05:12:06 +00:00
foobar f01f0ff5e0 Group these entries a bit to make NEWS easier to read. 2003-01-03 00:05:07 +00:00
Ilia Alshanetsky 8e64a1c73f Bug fixing news. 2003-01-02 19:52:18 +00:00
Ilia Alshanetsky c4fc154089 MFH 2003-01-02 19:50:37 +00:00
SVN Migration de38a0eca4 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-01-02 19:49:31 +00:00
Ilia Alshanetsky da85b57c61 MFH 2003-01-02 19:21:53 +00:00
Derick Rethans 514996363e *** empty log message *** 2003-01-02 17:58:57 +00:00
Derick Rethans 4e4a4036cf - MFH: Fix warnings on UnixWare 2003-01-02 13:31:30 +00:00
Derick Rethans 680e256d17 - MFH: Fix "make test" when CC was set to something with a parameter 2003-01-02 13:01:53 +00:00
Derick Rethans a50d3f2029 - MFH: Fix tests if Zend Optimizer is loaded 2003-01-01 12:44:47 +00:00
SVN Migration 8c761c73ad This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-01-01 12:44:00 +00:00
Wez Furlong f8721992dd Workaround a bug in glibc 2.2.9x and later that causes it not to seek to EOF
for stdio streams opened with a mode of "a+".
2003-01-01 09:55:38 +00:00
Ilia Alshanetsky 525bb0ed7e MFH 2002-12-31 18:54:38 +00:00
Ilia Alshanetsky fe18a0e9b1 Added bug fix entries. 2002-12-31 18:39:31 +00:00
Sebastian Bergmann ec46829b38 MFH: Bump year. 2002-12-31 16:37:36 +00:00
Sebastian Bergmann 03d440e1c0 MFH: Bump year. 2002-12-31 16:27:40 +00:00
Marcus Boerger a412c510d4 Do it manually after problems with the commit message 2002-12-31 12:12:30 +00:00
Wez Furlong ac07cbb0ca MFH: Fix for 21304 (gzopen not reporting errors, "a" mode broken). 2002-12-31 11:43:02 +00:00
Ilia Alshanetsky ce2ae19703 MFH 2002-12-31 00:05:19 +00:00
Ilia Alshanetsky ca8772a059 MFH 2002-12-30 19:41:00 +00:00
Marcus Boerger 23a44e86ce MFH: (configure problems & db4 sub module
@- Improved dba extension (Marcus)
@
  . Added support for internal error handling of Berkeley db libraries.
@
  . Disallow Berkeley db versions 4.1.0 to 4.1.24 due to locking problems.
@
  . Disallow linkage of Berkeley db submodules against libraries with
@
    different major version.
@
  . Disallow configuring of more than one Berkeley db handler.
2002-12-30 19:13:45 +00:00
Ilia Alshanetsky 5c5c577359 MFH 2002-12-30 18:29:25 +00:00
SVN Migration 15675d6f49 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2002-12-30 17:42:56 +00:00
Ilia Alshanetsky 4cb293e5a1 MFH 2002-12-30 16:43:31 +00:00
Ilia Alshanetsky c3e88c6d59 MFH 2002-12-30 15:35:55 +00:00
Moriyoshi Koizumi d39471b761 WS 2002-12-30 15:04:36 +00:00
Moriyoshi Koizumi ddcf71c483 just MFH 2002-12-30 15:03:27 +00:00
Moriyoshi Koizumi 28624bb7f6 MFH: Ilia's patch for bug #21268 (session_decode() returned FALSE on success) 2002-12-30 13:56:28 +00:00
Derick Rethans d74b967c9e - MFH: Align mssql comment and clarify DBA handler selection 2002-12-30 09:23:33 +00:00
Edin Kadribasic cdb8029c39 Live goes on :) 2002-12-27 22:11:40 +00:00
Ilia Alshanetsky 8ef253d9dc MFH 2002-12-27 04:47:45 +00:00
Andrei Zmievski d91ac3b7b8 Go with 4.3.0. 2002-12-27 04:07:19 +00:00
08f7cfae71 Update. 2002-12-27 04:02:52 +00:00
dd734b5a5d update 2002-12-27 04:00:09 +00:00
Sterling Hughes d8b14bd700 mfh 2002-12-27 03:22:42 +00:00
Andrei Zmievski 4e395f36af MFH 2002-12-27 03:22:13 +00:00
Edin Kadribasic b9ad07ca0b MFB:
Mention the fact that zlib extension is now built-in in win32 distro.
2002-12-27 03:17:17 +00:00
Georg Richter 6497cc956c ISO-8601 bug, typo 2002-12-27 00:21:17 +00:00
Ilia Alshanetsky ee3e6f12ae MFH 2002-12-27 00:09:35 +00:00
Derick Rethans 4f7f46d0b8 All on one line 2002-12-26 23:41:59 +00:00
Derick Rethans 991ca2274f - update credits 2002-12-26 23:39:51 +00:00
Georg Richter b72ea915ab added Wez, Ilia and myself 2002-12-26 23:36:57 +00:00
Wez Furlong 055f1f483e MFH: get_meta_tags() stream leak 2002-12-26 22:36:21 +00:00
Georg Richter a493c51949 fixed some compiler warnings when using external libmysqlclient 4.x 2002-12-26 13:47:59 +00:00
Edin Kadribasic 45cb9dc7b1 Made ZLIB extension built in on Windows. Fixes #21139.
# Approved by the release master.
# Will merge this patch into HEAD a bit later.
2002-12-26 13:27:08 +00:00
George Schlossnagle 45f5605f38 mfh (bug #21177) 2002-12-25 21:14:55 +00:00
Derick Rethans 6c3558c2ac - MFH: Test for bug #21182 2002-12-25 20:11:38 +00:00
SVN Migration 0dd36fd9f5 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2002-12-25 20:08:37 +00:00
Moriyoshi Koizumi d07f529652 Fixed bug #21182 2002-12-25 20:00:12 +00:00
Stefan Esser cb6d34ee25 MFH 2002-12-24 23:50:21 +00:00
Stefan Esser 00cc762934 MFH 2002-12-24 23:30:51 +00:00
Melvyn Sopacua 409f64d09d MFH: crash fix in glob() with no results 2002-12-24 15:04:10 +00:00
Stefan Esser 5367710045 MFH 2002-12-23 08:51:16 +00:00
Stefan Esser e5343487ac MFH: fix compile error with IRIX compiler 2002-12-23 08:43:13 +00:00
Edin Kadribasic f0e94729bf Ignore the new name of the binary built. Allows cvsclean to work again
in sapi/cgi.
2002-12-23 03:34:23 +00:00
Wez Furlong 673dee58ad fpos_t should have been off_t.
Noticed by Philip Olson.
2002-12-23 02:55:29 +00:00
Ilia Alshanetsky 9b16b3d7b8 MFH 2002-12-22 20:58:27 +00:00
Ilia Alshanetsky 51a711b609 MFH (fix for bug #21146).
# Approved by Andrei
2002-12-22 19:45:21 +00:00
Moriyoshi Koizumi 022e5db8ec MFH: php_error => php_error_docref 2002-12-22 19:16:42 +00:00
Moriyoshi Koizumi a29eb8c1d2 MFH: WS fix 2002-12-22 19:06:29 +00:00
Moriyoshi Koizumi c16bb3d7c9 MFH 2002-12-22 19:03:14 +00:00
Wez Furlong aaba243f41 MFH fix for Bug #21131 2002-12-22 18:21:55 +00:00
SVN Migration 41226129d7 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2002-12-22 18:06:28 +00:00
Wez Furlong 17384705d3 MFH:
A Simple fix for Bug #12360 (fsockopen timeout doesn't work).

Analysis:
On systems with HAVE_GETADDRINFO and IPV6 support, php_hostconnect would
attempt to connect to each possible address that matched the requested IP.

If the remote host:port combination are dropping packets this would cause the
first connection to timeout (after waiting for the full timeout duration).

PHP would then attempt the second address and wait the full duration again.

Solution:
If the first connection attempt times out, abort the connection loop.
2002-12-22 13:58:41 +00:00
Stig Bakken 5e489050e1 MFH 2002-12-22 01:43:20 +00:00
Frank M. Kromann 4100b87e38 MFH 2002-12-21 22:44:38 +00:00
Edin Kadribasic 5f6f1ab107 Updated list of bundled windows extensions compiled by
Christoph Grottolo <cg@gordimer.net>
2002-12-21 22:16:35 +00:00
Edin Kadribasic de713235ed Reflect recent changes to the build process. 2002-12-21 22:03:46 +00:00
Moriyoshi Koizumi 6e2cd3fcfe MFH: Made auth information inaccessible under safe mode 2002-12-21 21:52:41 +00:00
Melvyn Sopacua b686c05f3b There won't be a warning/fix on this, so remove the test 2002-12-21 21:01:26 +00:00
Ilia Alshanetsky 174f00fe03 Bug fixing news 2002-12-21 20:36:14 +00:00
Ilia Alshanetsky 4f1947c729 MFH 2002-12-21 20:34:36 +00:00
Andrei Zmievski 50c811c210 *** empty log message *** 2002-12-21 20:11:05 +00:00
Andrei Zmievski 614614c89e Make PHP_AUTH_* variables not available in safe mode under Apache. Patch by
Philip Olson.
2002-12-21 20:09:09 +00:00
Derick Rethans 4de8da30d0 - Fix typo 2002-12-21 17:46:32 +00:00
Melvyn Sopacua 2e23a75ff4 Skip the test, until a proper descision is made 2002-12-21 16:54:07 +00:00
Andrei Zmievski 02a5c36cb9 Back to -dev. 2002-12-21 01:34:15 +00:00
Andrei Zmievski f380b6b5da Go with RC4. 2002-12-21 01:30:20 +00:00
Andrei Zmievski 641bf4653a MFH 2002-12-21 01:20:32 +00:00
Marcus Boerger fd7b8ff912 MFH: as discussed 2002-12-20 20:25:19 +00:00
Stefan Esser 4dd722e870 MFH 2002-12-20 19:37:45 +00:00
Frank M. Kromann 25e38548cb MFH 2002-12-20 18:41:19 +00:00
Frank M. Kromann d8f5916a72 MFH 2002-12-20 17:39:30 +00:00
Marcus Boerger b27ae49ada Avoid compiler warnings 2002-12-20 17:03:37 +00:00
Andrei Zmievski 7c9dd72b76 MFH 2002-12-20 16:47:15 +00:00
Marcus Boerger 95b4b3ea3e MFH 2002-12-20 16:37:44 +00:00
Moriyoshi Koizumi 2615ec3dee MFH 2002-12-20 15:52:49 +00:00
Sterling Hughes e4871a4a2c mfh 2002-12-20 15:45:53 +00:00
Edin Kadribasic 0dbe08cba2 Make sure cli install dir is created before trying to install in it. 2002-12-20 10:04:55 +00:00
Ilia Alshanetsky f81e612976 MFH 2002-12-20 03:44:41 +00:00
Melvyn Sopacua 2e828c812c Fix libtool detection 2002-12-20 00:25:56 +00:00
Wez Furlong 3748fb07e8 MFH fix for bug #21077.
(proc_open problems with BSD)
2002-12-19 20:34:34 +00:00
Edin Kadribasic 251c2a2383 Making windows build system changes according to proposal:
http://news.php.net/article.php?group=php.dev&article=92682
2002-12-19 18:11:58 +00:00
Ilia Alshanetsky 6cf87a7740 MFH 2002-12-19 17:07:24 +00:00
Edin Kadribasic 83638d2232 Making build system changes according to proposal:
http://news.php.net/article.php?group=php.dev&article=92682
2002-12-19 16:55:57 +00:00
Moriyoshi Koizumi af69bece5b MFH 2002-12-19 15:29:38 +00:00
Edin Kadribasic 58637340e8 Removed libtool library from link which is no longer needed. This fixes
windows build.
2002-12-19 10:37:45 +00:00
Edin Kadribasic a3d0b7e43f Reverted previous patch as suggested by Andi. (reopening #20539). 2002-12-19 00:11:32 +00:00
Moriyoshi Koizumi 07391c8f28 MFH 2002-12-18 23:08:22 +00:00
Moriyoshi Koizumi 90741703de MFH: added a test case for bug #20539 2002-12-18 22:55:16 +00:00
SVN Migration a962c4e340 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2002-12-18 22:54:35 +00:00
Frank M. Kromann 20da71fb75 MFH 2002-12-18 07:06:36 +00:00
Derick Rethans e8295e70af - MFH 2002-12-17 19:08:01 +00:00
Moriyoshi Koizumi 8954a0486c MFH: iconv extension is no longer experimental 2002-12-17 13:34:23 +00:00
Marcus Boerger c36139bd55 MFH 2002-12-16 17:53:15 +00:00
Marcus Boerger 41335dc90f MFH 2002-12-16 15:54:04 +00:00
Ilia Alshanetsky 33ccce8047 MFH 2002-12-16 15:44:06 +00:00
Ilia Alshanetsky 5b71dbb4e2 MFH (memory leak). 2002-12-16 15:30:51 +00:00
Marcus Boerger 375cf41b62 MFH: that silly dot 2002-12-16 14:55:26 +00:00
Marcus Boerger f142b06770 MFH 2002-12-16 14:48:20 +00:00
Derick Rethans e88e587c30 - Fix typo 2002-12-16 09:11:15 +00:00
Derick Rethans 15c23426d8 - Update NEWS 2002-12-16 09:10:17 +00:00
Derick Rethans bd59a23e0a - Fix bug #21039
#- This is somewhat of a hack, and thus I will not merge it to HEAD, as
#  I've lots of other commits waiting for that.
2002-12-16 09:03:11 +00:00
Marcus Boerger ddc78bc5c0 MFH 2002-12-14 19:53:52 +00:00
Marcus Boerger 8cd8c85017 MFH: bugfix: #21010 2002-12-14 17:50:57 +00:00
foobar d88973feba Fixed bug: #20995 2002-12-14 09:32:49 +00:00
Melvyn Sopacua 5410ce07eb MFH 2002-12-13 18:46:14 +00:00
SVN Migration 4e855de5ae This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2002-12-13 18:40:40 +00:00
Vlad Krupin 9053c5eadd MFH fix for bug 19727 2002-12-13 16:54:49 +00:00
Marcus Boerger 016d0be3e0 MFH 2002-12-13 13:34:37 +00:00
Marcus Boerger 97b8a7cd4d MFH 2002-12-13 12:06:00 +00:00
Stig Bakken 37f5e2f175 MFH 2002-12-13 02:22:41 +00:00
Stig Bakken 40ebc2a27b MFH 2002-12-13 02:14:26 +00:00
Moriyoshi Koizumi 80f831e167 Forgot to prepend "SKIP" 2002-12-12 21:44:27 +00:00
Moriyoshi Koizumi 7e85b2bdde MFH 2002-12-12 21:42:51 +00:00
SVN Migration 6cd84e1a15 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2002-12-12 21:42:18 +00:00
Stefan Esser f65be7ff50 MFH: finally?! correct 2002-12-12 21:31:57 +00:00
Ilia Alshanetsky 7095c25d75 MFH 2002-12-12 21:17:55 +00:00
Ilia Alshanetsky 7df75cd38f MFH 2002-12-12 18:51:02 +00:00
Ilia Alshanetsky 58613036fb Fixed ZTS build. 2002-12-12 18:36:44 +00:00
Wez Furlong 27cdd59feb Fix some issues with the return value from pclose and proc_close,
and bogus seek-on-pipe warnings when used with fpassthru.
2002-12-12 17:44:48 +00:00
Ilia Alshanetsky 9baa62f093 MFH 2002-12-12 16:14:07 +00:00
Wez Furlong e651db5cf1 MFH more entropy "fix" 2002-12-12 15:51:11 +00:00
Ilia Alshanetsky 0314da12d0 MFH 2002-12-12 14:52:09 +00:00
Wez Furlong 4789b8eb3b Collect streams related changes into one place, as requested by Jani. 2002-12-12 14:39:07 +00:00
Marcus Boerger e549631cee MFH 2002-12-12 14:16:16 +00:00
Ilia Alshanetsky 5d0ac38b24 MFH 2002-12-12 13:52:37 +00:00
Wez Furlong a50bd94a0e MFH #20936 fix 2002-12-12 13:46:29 +00:00
Moriyoshi Koizumi fc410b16fc MFH 2002-12-12 13:46:10 +00:00
Ilia Alshanetsky e730be9eec MFH 2002-12-12 13:45:34 +00:00
SVN Migration a55180af39 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2002-12-12 13:38:20 +00:00
Moriyoshi Koizumi 21f011822d MFH: Fixed bug #20934 (htmlspecialchars returns latin1 from UTF-8) 2002-12-12 13:27:17 +00:00
Marcus Boerger 9e7b94e7c1 MFH 2002-12-12 13:23:28 +00:00
Marcus Boerger 16eac635ae MFH: ws, php_error_docref, typeconversion for cygwin 2002-12-12 13:21:25 +00:00
Marcus Boerger 41ffdb4fc4 MFH 2002-12-12 13:14:40 +00:00
Edin Kadribasic 508a9c3ebd Fixed bug #20485 (added flags to windows build to compile DOM/XSLT). 2002-12-12 10:09:17 +00:00
Ilia Alshanetsky a840f429e7 MFH (make imagecreatefromxpm() unavailable when bundled GD is used) 2002-12-11 23:30:23 +00:00
Ilia Alshanetsky 359a28fc69 MFH 2002-12-11 22:37:35 +00:00
Derick Rethans ebb708b068 - Make it also work when you press enter instead of typing 'y' 2002-12-11 20:10:57 +00:00
Ilia Alshanetsky d6fed23482 MFH 2002-12-11 20:08:02 +00:00
Andrei Zmievski 27c7538eb2 Back to -dev. 2002-12-11 18:57:24 +00:00
Andrei Zmievski 9aee6dce1a Go for RC3. 2002-12-11 18:52:20 +00:00
Ilia Alshanetsky 9147eae986 MFH 2002-12-11 17:39:42 +00:00
SVN Migration be0abad331 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2002-12-11 17:38:29 +00:00
Ilia Alshanetsky 47fa22b5cf MFH 2002-12-11 16:49:27 +00:00
foobar b85d1443b7 MFH 2002-12-11 15:16:29 +00:00
foobar afae8d98c5 MFH 2002-12-11 14:45:46 +00:00
foobar 373784fb86 missing file 2002-12-11 14:43:04 +00:00
Rui Hirokawa 51b63d6b5a fixed lack of variable initialization bug. 2002-12-11 14:41:09 +00:00
Marcus Boerger 6003d9ad36 MFH 2002-12-11 10:37:53 +00:00
Edin Kadribasic 120f6a9bf2 MFH: Fix for #20539 (patch by Moriyoshi Koizumi). 2002-12-11 10:29:07 +00:00
foobar 9ba824a27a MFH 2002-12-11 08:54:22 +00:00
foobar ccde6eef9c MFH: fix from 3.23.54 2002-12-11 08:52:17 +00:00
foobar 93f50df68d MFH: Fix for bug #20928 2002-12-11 08:42:07 +00:00
Ilia Alshanetsky 4cc3aa052d MFH 2002-12-11 02:51:26 +00:00
Ilia Alshanetsky b9c7ee9733 MFH 2002-12-11 00:32:37 +00:00
Marcus Boerger 0b3d1b1e47 MFH 2002-12-10 23:03:24 +00:00
Wez Furlong bd77e7d0f8 No longer experimental. 2002-12-10 22:20:55 +00:00
Wez Furlong 5d9bc065f5 Fix proto and avoid potential segfault on an error. 2002-12-10 22:04:44 +00:00
Stefan Esser 147e4bc66f MFH 2002-12-10 20:19:13 +00:00
Marcus Boerger d71fc18027 MFH 2002-12-10 20:12:38 +00:00
Ilia Alshanetsky 065b04628f MFH 2002-12-10 18:01:33 +00:00
Edin Kadribasic b2131fd973 Fix ZTS build. 2002-12-10 16:56:23 +00:00
Ilia Alshanetsky 507b8cd4ba Fix for bug #20831. 2002-12-10 16:37:48 +00:00
foobar 3fbd4431f9 MFH: added the version check 2002-12-10 16:34:48 +00:00
Edin Kadribasic 12cbd70562 Improve UNC path detection. 2002-12-10 16:18:59 +00:00
Ilia Alshanetsky c69e47414c MFH 2002-12-10 15:59:17 +00:00
Stefan Esser e085d9bccb MFH 2002-12-10 15:41:39 +00:00
Ilia Alshanetsky a7047d2243 MFH 2002-12-10 15:37:33 +00:00
Marcus Boerger a984c1329f MFH 2002-12-10 14:35:36 +00:00
Ilia Alshanetsky db403663f7 MFH 2002-12-10 00:10:37 +00:00
foobar 75a30c7233 MFH 2002-12-09 19:16:12 +00:00
Ilia Alshanetsky fdc3a171dc MFH 2002-12-09 18:45:37 +00:00
Wez Furlong f57ac2fa05 Centralize the fopencookie test. 2002-12-09 18:28:03 +00:00
Wez Furlong b2a98beaee No need to compile this code if curl streams are not enabled, which they
cannot be in 4.3 (configure option is disabled and they don't work yet anyway).
2002-12-09 18:25:37 +00:00
Marcus Boerger 753450e21e MFH: '-' modifier (bug #20282, #20858) 2002-12-09 18:07:23 +00:00
Melvyn Sopacua c81b7d7156 MFH: fix make install target on Cygwin 2002-12-09 17:25:01 +00:00
Wez Furlong f116d23398 MFH: fopencookie for BSD patch 2002-12-09 16:22:06 +00:00
Edin Kadribasic 0d9704fa7b Fixed crash in socket_read on windows #20894 (patch by Wez Furlong). 2002-12-09 11:29:31 +00:00
Wez Furlong 5650d9fdd1 Fix for bug #20831; include() from UNC paths does not work. 2002-12-09 10:34:32 +00:00
Timm Friebe da3e324e7f - MFH 2002-12-08 15:40:18 +00:00
Ilia Alshanetsky 7cf0a8601a MFH 2002-12-07 16:16:09 +00:00
Ilia Alshanetsky e2e2111b1c MFH 2002-12-07 16:06:40 +00:00
foobar 55320820ba Bug fixes for new stuff do not belong in NEWS.. 2002-12-07 12:12:24 +00:00
Sander Roobol 9af1962986 MFH 2002-12-07 11:21:52 +00:00
Frank M. Kromann 675d254b15 MFH 2002-12-07 06:05:52 +00:00
Ilia Alshanetsky 9901a6f0cd MFH 2002-12-07 00:48:21 +00:00
Frank M. Kromann 3a70279b7d MFH 2002-12-06 22:57:47 +00:00
Ilia Alshanetsky ae635f837b MFH 2002-12-06 17:46:40 +00:00
SVN Migration e8fe75a589 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2002-12-06 17:46:27 +00:00
Ilia Alshanetsky 14dbf42db8 MFH 2002-12-06 17:36:25 +00:00
Sebastian Bergmann 5c29f19331 MFH 2002-12-06 06:09:44 +00:00
Ilia Alshanetsky c185f97956 MFH 2002-12-06 06:08:21 +00:00
Stig Bakken 1652d1f3b4 MFH 2002-12-06 00:10:40 +00:00
Ilia Alshanetsky 02f9791e19 Fixed memory leaks inside heb_number_to_chars(). 2002-12-05 23:19:03 +00:00
Marcus Boerger a27d6d90ec MFH 2002-12-05 23:19:02 +00:00
Ilia Alshanetsky 89d758c378 MFH 2002-12-05 22:46:40 +00:00
Marcus Boerger 335786915a MFH 2002-12-05 22:15:37 +00:00
Marcus Boerger c8ac633540 MFH 2002-12-05 21:09:19 +00:00
Marcus Boerger 81b7c2abc1 MFH: both the check and php_error in the comment 2002-12-05 21:02:02 +00:00
Marcus Boerger a2aed8eff2 MFH 2002-12-05 20:42:05 +00:00
Marcus Boerger e931611837 MFH 2002-12-05 20:14:09 +00:00
Ilia Alshanetsky 898b8673ed MFH 2002-12-05 20:05:20 +00:00
Marcus Boerger 58d49c3af9 MFH 2002-12-05 20:02:21 +00:00
SVN Migration dcfe521fce This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2002-12-05 20:01:20 +00:00
Marcus Boerger 434d35cf62 MFH 2002-12-05 19:50:40 +00:00
Derick Rethans 6cf9a9015d MFH:
- Renamed snmpv3_* to snmp3_*
- Conversion to php_error_docref
- Whitespace fixes
2002-12-05 19:33:43 +00:00
Marcus Boerger 11eb34e8ee MFH: Remove unnecessary code here 2002-12-05 15:52:35 +00:00
foobar 4eccd8094e MFH 2002-12-05 15:46:41 +00:00
Marcus Boerger f3fba1ee12 MFH: swc & zlib\nMFH: return FALSE 2002-12-05 12:47:22 +00:00
Marcus Boerger 802968443e Fix aggregation with ZE2 in PHP4.3\n#I will not MFB it since aggregation should move to ZEndEngine 2002-12-05 12:44:21 +00:00
Marcus Boerger d50bdd0a16 MFH 2002-12-05 11:38:13 +00:00
Ilia Alshanetsky 80960e148b MFH (build fix, when xpm support is not avaliable). 2002-12-04 23:43:06 +00:00
Ilia Alshanetsky fcbde2dad4 MFH 2002-12-04 21:07:10 +00:00
SVN Migration 9f85f6d66a This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2002-12-04 21:04:08 +00:00
Ilia Alshanetsky 5ed73ea30b Fixed a typo. 2002-12-04 17:31:23 +00:00
Ilia Alshanetsky 2cf6676651 MFH 2002-12-04 17:29:57 +00:00
Ilia Alshanetsky 2e2e65b576 MFH (truecolor fixes + gdImageTrueColorToPalette() fix). 2002-12-04 17:28:55 +00:00
Moriyoshi Koizumi ebcfd99797 Forgot to merge this part 2002-12-04 17:12:20 +00:00
Moriyoshi Koizumi 3d4145a7e3 MFH 2002-12-04 17:02:20 +00:00
SVN Migration fb93430ba6 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2002-12-04 17:01:08 +00:00
Moriyoshi Koizumi ba122bc645 MFH: bug fix news 2002-12-04 16:54:59 +00:00
Moriyoshi Koizumi 6e8529a62b MFH: fixed segfaults in array_walk() when keys are passed to cb by reference 2002-12-04 16:44:24 +00:00
Sebastian Bergmann 680d2326a6 MFH 2002-12-04 08:34:24 +00:00
Sebastian Bergmann a6673450df MFH 2002-12-04 08:28:05 +00:00
Frank M. Kromann af51b8fd42 MFH
# Changed php_error() to php_error_docref()
2002-12-03 19:39:54 +00:00
Ilia Alshanetsky 4c1ca75177 MFH 2002-12-03 19:25:55 +00:00
Frank M. Kromann d58428d3bd MFH
# Changed php_error() to php_error_docref()
2002-12-03 19:19:45 +00:00
Frank M. Kromann 03a87edd97 MFH
# Bug #19370
# Allow stored procedures to return multiple results.
2002-12-03 18:59:38 +00:00
Frank M. Kromann 5454f01e04 MFH
# Bug #17593
# Make sure any pending data is released from the server when freeing the result
2002-12-03 18:07:57 +00:00
Edin Kadribasic d88510d0b9 MFH: Allocating enough memory to hold values.
Fix crash when certan stored procedures was called. This caused
     the free_result function to free memory not yet allocated.
2002-12-03 16:09:14 +00:00
Moriyoshi Koizumi bfd27eda54 MFH: fixed leaks in array_walk() 2002-12-03 15:02:55 +00:00
foobar fd65c1661b MFH: Need these libraries for static build 2002-12-03 11:34:33 +00:00
foobar bdf7cdd073 MFH: Fixed build with iPlanet LDAP SDK 5.x 2002-12-03 09:36:31 +00:00
Jason Greene e0018cc874 MFH 2002-12-03 05:46:53 +00:00
Ilia Alshanetsky 314c4c6874 MFH 2002-12-02 07:03:37 +00:00
Ilia Alshanetsky 9ea095c41c MFH 2002-12-02 06:45:57 +00:00
Ilia Alshanetsky 3da7a2c23e MFH 2002-12-02 06:35:51 +00:00
Shane Caraveo f4e68f2504 MFH 2002-12-02 05:25:55 +00:00
Shane Caraveo dab83e9889 MFH 2002-12-02 02:21:01 +00:00
Shane Caraveo e1b7458984 MFH 2002-12-01 23:30:22 +00:00
Shane Caraveo c16d330371 MFH 2002-12-01 23:15:31 +00:00
Frank M. Kromann 8963c524d7 MFH 2002-11-30 21:52:36 +00:00
Ilia Alshanetsky 77b9675c4b MFH 2002-11-30 19:13:28 +00:00
Marcus Boerger bd45fa6a8f MFH: Bug #20433 2002-11-30 18:39:31 +00:00
Christian Stocker 31ee5eca0d MFH (fixed big bad memory leak in xpath objects.) 2002-11-30 10:52:04 +00:00
Moriyoshi Koizumi c5bcca7bab MFH 2002-11-29 18:35:17 +00:00
Sander Roobol 1ec334a99f MFH 2002-11-29 18:05:22 +00:00
Yasuo Ohgaki 073788340b MFH 2002-11-29 17:19:05 +00:00
Derick Rethans 0d90cd59dc - Fix memleak (patch by Oleg.Roitburd@lycos-europe.com)
#- I don't merge this to HEAD right away, as my current development tree
#  has a lot of modifications, of course I did this change there too.
2002-11-29 15:57:39 +00:00
Martin Kraemer fd52bf2bd8 Portability: In C sources, do not use C++ comments 2002-11-29 14:07:28 +00:00
Wez Furlong 61463cbc2a Take this out of here so that the dir can be pruned on checkout. 2002-11-29 13:39:29 +00:00
Christian Stocker f902cf4675 MFH
fix for bug #20389  (no trailing slash in configure option)
2002-11-29 13:32:50 +00:00
Martin Kraemer 9f83137631 Portability fixes (MFH) 2002-11-29 11:15:43 +00:00
Christian Stocker 7c811718a7 MFH
relative xpath queries are already possible
  (use $ctx->xpath_eval($xpath,$contextnode) )
2002-11-29 08:30:05 +00:00
Ilia Alshanetsky 5d51f8ee55 MFH 2002-11-28 14:14:06 +00:00
Sterling Hughes fe3200ed07 MFH 2002-11-27 20:32:26 +00:00
Frank M. Kromann 8c16118248 MFH 2002-11-27 18:54:54 +00:00
Andrei Zmievski b2e297ed27 Back to -dev 2002-11-27 18:53:04 +00:00
Andrei Zmievski 2ebb360d0e Update version to RC2. 2002-11-27 18:51:00 +00:00
Sterling Hughes cc2abd5275 fix memleak 2002-11-27 18:35:43 +00:00
Ilia Alshanetsky 4ec67e7df3 MFH 2002-11-27 06:20:37 +00:00
Frank M. Kromann 3033a27023 MFH 2002-11-27 04:07:02 +00:00
Marcus Boerger ed264ac576 MFH: remove comment 2002-11-27 02:43:21 +00:00
Marcus Boerger 0394a52b81 MFH: Canon fix 2002-11-27 02:38:37 +00:00
Stig Bakken 5301c168e4 MFH 2002-11-27 01:01:25 +00:00
Frank M. Kromann 5ec97e6b22 Convert 0D 0D 0A line breaks to 0D 0A 2002-11-27 00:40:13 +00:00
Frank M. Kromann 3bd2828386 MFH 2002-11-27 00:36:14 +00:00
Stig Bakken 3cc7a5f2a8 MFH 2002-11-26 23:18:08 +00:00
Moriyoshi Koizumi b71f73322a MFH: improved the error reporting portion of array_walk() 2002-11-26 22:14:11 +00:00
Moriyoshi Koizumi 8f73c27ca6 MFH: prevent too many error reports from being displayed 2002-11-26 21:54:33 +00:00
Stig Bakken 1fc6e75705 MFH 2002-11-26 21:53:43 +00:00
Moriyoshi Koizumi 974e2188cc MFH: Fixed incorrect error messages of array_walk() 2002-11-26 21:35:52 +00:00
Stig Bakken aae2d28e7f MFH 2002-11-26 18:24:30 +00:00
Christian Stocker 106c57d48f MFH (Fix for Bug #20639 DomElement->get_elements_by_tagname() doesn't work) 2002-11-26 15:39:13 +00:00
SVN Migration 7801f96096 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2002-11-26 12:06:00 +00:00
Yasuo Ohgaki a5d3a242d1 MFH 2002-11-26 02:15:58 +00:00
Stig Bakken 1800daed83 MFH 2002-11-26 01:34:31 +00:00
Stig Bakken 1fc9449e0d MFH 2002-11-26 01:33:36 +00:00
Stig Bakken 9ebf68f5f8 MFH 2002-11-25 23:52:56 +00:00
Ilia Alshanetsky 33b0617d99 Set serialize_handler to php to prevent test failures. 2002-11-25 23:19:19 +00:00
Ilia Alshanetsky e9b28977a5 MFH (fixed a compile failure when --with-xpm-dir is used). 2002-11-25 23:12:15 +00:00
Stefan Esser c15ae34535 MFH 2002-11-25 22:58:26 +00:00
Ilia Alshanetsky 529bfcae52 MFH 2002-11-25 22:01:46 +00:00
Rui Hirokawa d70ac295c4 simplified and a bug fixed in korean encoding conversion table. 2002-11-25 15:23:01 +00:00
Moriyoshi Koizumi d15c493713 Added a further test on mb_parse_str() 2002-11-24 19:48:17 +00:00
Moriyoshi Koizumi 07bec98624 Fixed mb_parse_str() bug pointed out by Yasuo. 2002-11-24 19:21:58 +00:00
foobar f389c07436 fix typo (; instead of :) 2002-11-24 05:14:17 +00:00
Derick Rethans fb90dd014c - MFH: Adjust tests for removed old_function() in Zend Engine 2 2002-11-23 22:08:40 +00:00
Marcus Boerger 3a90b70eac MFH 2002-11-23 21:12:31 +00:00
Marcus Boerger d4cfbfd310 MFH
#This includes the " to ' change but not the added settings which 4.3
#doesn't have.
2002-11-23 17:50:37 +00:00
Moriyoshi Koizumi cd8d0410fd Fixed tab positions
# a bit too late to be notified :)
2002-11-23 11:26:13 +00:00
Moriyoshi Koizumi 2c95d3c427 MFH (imagecolordeallocate() fix) 2002-11-23 05:20:43 +00:00
Marcus Boerger 4c85a6c5ba Fix memleak in debug mode 2002-11-23 01:17:39 +00:00
Marcus Boerger a623b65a98 MFH: Testing default behaviour 2002-11-23 00:56:21 +00:00
SVN Migration 5bc9ba45bf This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2002-11-23 00:54:05 +00:00
Rui Hirokawa b4664a5796 fixed some bugs in korean encoding conversion. 2002-11-22 23:37:17 +00:00
Ilia Alshanetsky e7a0f547f8 Added missing declaration. 2002-11-22 22:30:38 +00:00
Ilia Alshanetsky 2ec9fdbe8d MFH 2002-11-22 21:52:59 +00:00
Stefan Esser 293086db3f MFH 2002-11-22 19:35:43 +00:00
Marcus Boerger 435d875a02 MFH 2002-11-22 15:53:01 +00:00
Edin Kadribasic 14d6306385 MFH: Avoid possible buffer overflow. 2002-11-22 15:47:44 +00:00
Marcus Boerger 8ae87f8762 MFH 2002-11-22 15:13:10 +00:00
Edin Kadribasic 9e7f020233 Don't send default http status (200) (Thanks to Sascha Schumann for idea). 2002-11-22 13:50:40 +00:00
Stefan Esser 45bf902713 MFH: sha1() test 2002-11-22 11:04:10 +00:00
Edin Kadribasic 837d371f50 MFH: Fixed bug #19207 by adding cgi.rfc2616_headers config directive. 2002-11-22 10:16:36 +00:00
Sander Roobol 0debfe1163 MFH
@Made bcmath extension thread safe. (Sander)
2002-11-22 09:27:08 +00:00
Ilia Alshanetsky 3652c75a5d MFH 2002-11-22 00:09:30 +00:00
SVN Migration 8d9de08fc9 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2002-11-22 00:08:58 +00:00
Ilia Alshanetsky 78d474a58e MFH 2002-11-21 23:51:57 +00:00
Melvyn Sopacua 07b7ac10b6 MFH Fix bug #20518 2002-11-21 23:33:01 +00:00
Melvyn Sopacua 08fa24dd93 test for bug #20518 2002-11-21 23:31:45 +00:00
SVN Migration 47d920fd66 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2002-11-21 23:27:39 +00:00
Moriyoshi Koizumi af153a37f0 MFH (added missing mb_internal_encoding()) 2002-11-21 18:19:27 +00:00
Moriyoshi Koizumi e6c6bdc2d9 MFH (removed unnecessary \n) 2002-11-21 17:36:57 +00:00
Marcus Boerger 594e183737 MFH 2002-11-21 16:50:55 +00:00
Rui Hirokawa 2832208fc5 mbstring is supporting CJK + some other encodings. 2002-11-21 16:21:33 +00:00
Rui Hirokawa 769be40253 fixed incorrect encoding conversion in korean. 2002-11-21 16:18:17 +00:00
Sander Roobol c31d9b7850 MFH 2002-11-21 16:16:58 +00:00
Sander Roobol 6e9a4ec6e6 MFH 2002-11-21 15:25:51 +00:00
SVN Migration 179effddf3 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2002-11-21 15:24:46 +00:00
Moriyoshi Koizumi 6c0b8b370b Fixed yet another mb_parse_str() bug
# This is reported by Ilia. Thanks!
2002-11-21 14:51:26 +00:00
Hartmut Holzgraefe 7f6afc578c MFH 2002-11-21 10:53:18 +00:00
foobar 82ac093b6b MFH, as requested by georg 2002-11-20 23:01:02 +00:00
Derick Rethans 20c0cd2a88 - MFH: Add an error message to the ini handlers 2002-11-20 17:49:57 +00:00
Ilia Alshanetsky caa461e493 MFH 2002-11-20 16:08:36 +00:00
SVN Migration 558795b066 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2002-11-20 15:56:57 +00:00
Ilia Alshanetsky 755958ac16 MFH 2002-11-20 06:53:33 +00:00
SVN Migration 00beb9dbce This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2002-11-20 06:48:59 +00:00
Wez Furlong 5302361ece Be pedantic with the return value 2002-11-19 21:11:03 +00:00
Wez Furlong f96922968f Add this test for gzreading non-compressed data. 2002-11-19 20:13:24 +00:00
Wez Furlong 26a1202ee0 Remove a memset I added while debugging 2002-11-19 20:04:15 +00:00
Wez Furlong 915c446634 Resolve some problems with zlib streams, mostly related to opening the
stream with an invalid mode.
There still seem to be some issues when reading from non-compressed files.
Investigation continues.
2002-11-19 18:34:55 +00:00
Moriyoshi Koizumi be66394313 MFH 2002-11-19 16:57:18 +00:00
SVN Migration 6eee55fde4 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2002-11-19 16:56:44 +00:00
Edin Kadribasic 8a86509e4b Update Credits 2002-11-19 15:11:33 +00:00
Derick Rethans 610e0c36ec - MFH 2002-11-19 14:54:45 +00:00
SVN Migration dbaedcda20 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2002-11-19 14:53:32 +00:00
Edin Kadribasic 7c79b7026b MFH (Fix for linking warnings on windows). 2002-11-19 14:53:11 +00:00
Derick Rethans 248fcb16be - Fix safemode relating pear install problems 2002-11-19 14:43:42 +00:00
Marcus Boerger cda63e432c MFH 2002-11-19 14:13:40 +00:00
Derick Rethans bc6120892a - MFH: Cybermut removal 2002-11-19 10:12:52 +00:00
Derick Rethans 5eae9a11dd - MFH 2002-11-19 08:21:38 +00:00
Stig Bakken 89f833b5d0 MFH 2002-11-19 02:23:28 +00:00
Edin Kadribasic 8ab3132acb MFH (fix windows build) 2002-11-19 01:07:09 +00:00
Moriyoshi Koizumi b35690c4b9 MFH (binary mode fix) 2002-11-18 21:23:11 +00:00
Moriyoshi Koizumi d1245e43e4 MFH (fixed possible leaks) 2002-11-18 21:16:24 +00:00
Marcus Boerger 98bd51e9ad MFH
-Added colordepth for png
-Added tests for width/heidth for unsigned/signed problems
2002-11-18 16:55:35 +00:00
Marcus Boerger 8455b5b0c1 MFH: Added colordepth for png\n 2002-11-18 16:53:04 +00:00
SVN Migration 29ec528c42 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2002-11-18 16:51:03 +00:00
Marcus Boerger abe964d237 Fixing unsigned/signed problems (and i thought about it before...)\n 2002-11-18 15:50:49 +00:00
Derick Rethans 7a974d0ef1 - MFH 2002-11-18 15:46:01 +00:00
Ilia Alshanetsky 33b6f2a71a Fix bug #20442. 2002-11-18 13:30:18 +00:00
Derick Rethans 4b6f7554c0 - Remove e*() memory function calls from the branch 2002-11-18 13:00:52 +00:00
Wez Furlong bfaac17306 wb -> r+b 2002-11-18 12:43:00 +00:00
Edin Kadribasic 4f0b31cf5d MFH (fribidi is not available on windows yet). 2002-11-18 12:16:59 +00:00
Wez Furlong d7ded80028 Amend info about mbstring enabled by default (no longer true). 2002-11-18 11:53:11 +00:00
Wez Furlong 2c11564d0a MFH other temp file mode fixes and Id tag. 2002-11-18 11:50:36 +00:00
Wez Furlong d6ee6ce580 Remove redundant info line (all wrappers are listed near the start of
the phpinfo page).
2002-11-18 11:03:38 +00:00
foobar 941047121f MFH; Fixed bug: #20458 (--with-qtdom=shared broken) 2002-11-18 05:06:45 +00:00
foobar 72b7ea5d77 MFH: Added error message if browscap location is not set in php.ini 2002-11-18 03:24:33 +00:00
Ilia Alshanetsky 59a18f6a83 MFH 2002-11-18 03:16:45 +00:00
foobar d708e20b12 MFH 2002-11-18 00:43:48 +00:00
Wez Furlong 81bf1d581d Add missing Id tag. 2002-11-17 23:16:45 +00:00
Wez Furlong 463ccd8283 Revise stream shutdown procedure. 2002-11-17 23:08:40 +00:00
Ilia Alshanetsky d9e33dbaec MFH 2002-11-17 22:53:35 +00:00
Ilia Alshanetsky 9831d1492d MFH 2002-11-17 21:58:12 +00:00
Ilia Alshanetsky cb228e9002 MFH 2002-11-17 20:19:28 +00:00
Derick Rethans 48099d9569 - Fix memory problem for real this time. 2002-11-17 19:40:38 +00:00
Wez Furlong 0b717a898b s/off64t/off64_t/ 2002-11-17 19:28:57 +00:00
Wez Furlong 8a19278ac8 Fix fopencookie detection for newer versions of glibc.
The GNU people strike again with their useless docs; fopencookie does NOT
use "fpos_t *" as documented :/
Additionally, it appears that the the libio layer buffers in chunks of 8KB,
so our test needs to exploit this in order to function correctly.
Thanks to Derick for doing some groundwork.
2002-11-17 19:14:49 +00:00
Zeev Suraski 241a5e6798 MFH - unify error_reporting handling through the INI subsystem 2002-11-17 13:32:44 +00:00
Derick Rethans 21c8c2ba44 - Fix memory allocation problem in bundled GD (reported by Brian Havard) 2002-11-17 13:10:36 +00:00
Marcus Boerger b59c0d1274 MFH: Conversion fix by Michael Mauch 2002-11-17 09:28:56 +00:00
Wez Furlong 3d4fe01bb6 Avoid a potential double fclose(). 2002-11-17 01:06:31 +00:00
Ilia Alshanetsky da110d3f59 Fix compile warning. 2002-11-17 00:11:19 +00:00
Wez Furlong 01a12a109a Remove debugging printf 2002-11-17 00:08:42 +00:00
Ilia Alshanetsky f201adbbdb MFH 2002-11-17 00:07:33 +00:00
Marcus Boerger 416fb87dff MFH: Force float for the float test 2002-11-16 23:47:30 +00:00
Wez Furlong 8d2075dd85 initialize this member so that it doesn't segfault on shutdown... 2002-11-16 23:35:30 +00:00
Wez Furlong 03851bac05 php_stream_fopen_tmpfile now uses php_open_temporary_file rather than
tmpfile().
tmpfile() under win32 will try to use the root directory; the default
IIS settings prohibit access to the root directory, which renders tmpfile()
useless.
PHP's tmpfile() streams are correctly cleaned up and unlinked when closed
(or at request shutdown).  However, if the stream is cast and passed to
a third party library, the temporary file may linger.
This is unfortunate, since streams uses this process internally for handling
the casting of user-streams.
--> some more work is needed on this, but this can be done more easily under
Linux.
2002-11-16 22:59:55 +00:00
Wez Furlong 4ef373153a Change "wb" -> "r+b" for win32.
The difference is staggering - I've spent hours tracking this down.
It should probably be made the same for all platforms.
2002-11-16 22:52:22 +00:00
Marcus Boerger 854c4614e9 MFH 2002-11-16 17:30:10 +00:00
Ilia Alshanetsky a5f2931544 MFH 2002-11-16 17:26:48 +00:00
Marcus Boerger b17bfef199 MFH: Make getimagesize more robust against corrupt files 2002-11-16 17:03:49 +00:00
Wez Furlong f06e6a7802 This is not needed here. 2002-11-16 16:13:25 +00:00
Wez Furlong 32733912f1 Remove debugging line... 2002-11-16 11:40:07 +00:00
Wez Furlong c52b6d3fc0 Make include/require of user-streams work on systems without fopencookie. 2002-11-16 11:39:36 +00:00
Sebastian Bergmann f6534cb075 MFH 2002-11-16 08:32:11 +00:00
Stig Bakken 1574ad43b2 MFH 2002-11-15 23:21:42 +00:00
Marcus Boerger 6e05f972a1 MFH: When --enable-dba is used then include builtin modules unless
--without-xxx is not used.
2002-11-15 21:30:51 +00:00
Marcus Boerger af3aa7d9fc MFH: Added test for bug 14383 2002-11-15 16:45:57 +00:00
Marcus Boerger 037483602a MFH: simplify and show skip reason 2002-11-15 16:43:43 +00:00
Marcus Boerger 9ba6732230 MFH: show correct result 2002-11-15 16:42:04 +00:00
Marcus Boerger d190f54321 MFH: new syntax 2002-11-15 16:40:30 +00:00
Marcus Boerger 608a52b9b9 MFH: info about handler used and use flatfile if available 2002-11-15 16:39:36 +00:00
Marcus Boerger 8a185f8107 MFH: deprecate ext/db 2002-11-15 16:37:51 +00:00
Ilia Alshanetsky f6fec8adf1 Revert of previous patch ad requested by Andi. 2002-11-15 16:36:59 +00:00
Moriyoshi Koizumi d7ac826f89 MFH 2002-11-15 16:36:23 +00:00
Ilia Alshanetsky d88ac3a972 MFH (symlinks + ZTS). 2002-11-15 16:34:54 +00:00
Marcus Boerger aaf5c39690 MFH: SKIP and INFO result from --SKIPIF-- 2002-11-15 16:34:07 +00:00
Moriyoshi Koizumi 07e278c9d4 MFH.
# thanks Jani
2002-11-15 16:30:53 +00:00
Moriyoshi Koizumi f48a7e5f78 MFH 2002-11-15 16:29:03 +00:00
Marcus Boerger 16ea198a13 MFH
-Allow skip in upper letters.
-Add 'info' result to --SKIPIF-- -> see following dba commits
2002-11-15 16:13:10 +00:00
Moriyoshi Koizumi 1e219b65bf MFH 2002-11-15 15:59:57 +00:00
SVN Migration ec36147dbf This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2002-11-15 15:59:08 +00:00
Moriyoshi Koizumi e31196d184 MFH 2002-11-15 15:35:22 +00:00
Moriyoshi Koizumi cea50a67e1 MFH 2002-11-15 14:55:07 +00:00
Moriyoshi Koizumi 41a0f1c59b MFH 2002-11-15 14:50:33 +00:00
Marcus Boerger 9c5c168394 MFH: Only show the first results 2002-11-15 14:48:55 +00:00
Marcus Boerger 0f5232c5d2 Correction
#Why does it mix up things again?...i do not know
2002-11-15 14:27:37 +00:00
Moriyoshi Koizumi a920cec9aa MFH 2002-11-15 14:27:12 +00:00
Marcus Boerger dd68136bd9 MFH: Show Zend version 2002-11-15 14:24:20 +00:00
Marcus Boerger 174c207381 MFH: Showing memleaks for a memleak test is a good idea 2002-11-15 11:57:50 +00:00
Marcus Boerger f16e2e6650 MFH: Fix segfaults (check ext/domxml/tests/domxml002.phpt) 2002-11-15 11:07:34 +00:00
Derick Rethans bbcb203900 - MFH: removed restore_connection_defaults for pconnects (discussed on
php-dev@)
       bug #19529 closed
       bug #12513 reopened
2002-11-15 10:44:23 +00:00
Sander Roobol 40e65a119d MFH 2002-11-15 10:39:19 +00:00
foobar e58c52ae7e MFH 2002-11-15 07:23:26 +00:00
foobar bd49c212c3 clean the mess.. 2002-11-15 07:18:20 +00:00
Moriyoshi Koizumi 03222e4d82 MFH 2002-11-15 02:18:12 +00:00
Andrei Zmievski 54e893af56 MFH 2002-11-15 00:33:18 +00:00
Stig Bakken 07075670c3 MFH 2002-11-14 23:26:27 +00:00
Moriyoshi Koizumi a6df543348 MFH 2002-11-14 23:08:54 +00:00
Stig Bakken 857e1a6b30 MFH 2002-11-14 22:51:21 +00:00
Moriyoshi Koizumi 05eadd933c MFH 2002-11-14 22:40:11 +00:00
SVN Migration 4c5cf3125f This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2002-11-14 22:38:44 +00:00
Marcus Boerger 1fe950b9a6 MFH: Test updates 2002-11-14 22:08:30 +00:00
Marcus Boerger 54a2a9dd13 Correct last update
# i don't know why but somehow my files were mixed up or i cannot read
# anylonger - however it seems it's time to go sleeping now
2002-11-14 22:02:07 +00:00
Marcus Boerger 6df2d4c33c Add info: Add magic_quotes_runtime support 2002-11-14 21:53:12 +00:00
Marcus Boerger 5555b1c3a8 MFH: magic_quotes_runtime support is needed to have ext/dba being
superset of deprectaed ext/db
2002-11-14 21:52:22 +00:00
Moriyoshi Koizumi fcc8f8fbd0 MFH 2002-11-14 21:35:18 +00:00
Andrei Zmievski 2827407d43 MFH 2002-11-14 21:17:00 +00:00
Andrei Zmievski d9d34ae282 MFH 2002-11-14 21:09:47 +00:00
SVN Migration e3718c88b2 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2002-11-14 21:09:42 +00:00
Marcus Boerger 4bab2c1afd MFH: Add magic_quotes_runtime which affects several tests 2002-11-14 21:03:22 +00:00
Melvyn Sopacua 7ad332abf8 MFH plus typo fix 2002-11-14 20:57:09 +00:00
Marcus Boerger 4b7ea20437 MFH: Only set the overwrites once (keep this in sync as long as possible) 2002-11-14 20:20:47 +00:00
Andrei Zmievski ea17af230a Back to 4.3.0-dev. 2002-11-14 19:16:30 +00:00
Ilia Alshanetsky ab37eae5cb MFH (disable safe_mode for test). 2002-11-14 18:38:25 +00:00
Marcus Boerger 1019c662a5 Missed that 2002-11-14 17:22:26 +00:00
Andrei Zmievski f16941595a Fix version. 2002-11-14 17:03:36 +00:00
Andrei Zmievski 46d3edd8c1 Go for RC1. 2002-11-14 16:47:03 +00:00
Stefan Esser 81cd0ebfa0 MFH 2002-11-14 16:40:27 +00:00
Ilia Alshanetsky 516eacd03f MFH (zts compile warning). 2002-11-14 16:33:18 +00:00
Ilia Alshanetsky df34134534 MFH (fic for bug #20423). 2002-11-14 16:21:15 +00:00
Marcus Boerger a022fb30d0 Info about gd changes 2002-11-14 14:57:23 +00:00
Marcus Boerger ded0b2efba MFH:
Fix locking behaviour: On some systems read during write is permitted but
most libraries are not capable of that. GDBM is system dependant so there
we only test  that we do not deadlock.
2002-11-14 14:40:43 +00:00
Marcus Boerger f3ba6741ec MFH: Info about closed bugs 2002-11-14 14:39:53 +00:00
Wez Furlong ed84676c15 Add note about shortcomings of this test. 2002-11-14 14:25:36 +00:00
Ilia Alshanetsky bcaf766768 MFH (skip conditions for tests) 2002-11-14 14:19:03 +00:00
Ilia Alshanetsky 5386b85b15 MFH (compile warning fix). 2002-11-14 14:06:49 +00:00
Wez Furlong d32b02e1ca MFB 2002-11-14 13:52:39 +00:00
Ilia Alshanetsky dde44ae7b2 Bug fix news. 2002-11-14 13:52:17 +00:00
Ilia Alshanetsky b12880ce40 MFH (fix for bug #19689). 2002-11-14 13:45:43 +00:00
Ilia Alshanetsky c60242c944 MFH (parse_url bug). 2002-11-14 13:44:24 +00:00
Edin Kadribasic 65995b5c4f MFH (fixes unix build of mbstring) 2002-11-14 13:37:26 +00:00
SVN Migration a8bb6a9eca This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2002-11-14 12:20:37 +00:00
Derick Rethans b391a7a372 - Fixed bug #20424 (stream_get_meta_data craches on a normal file stream).
(Derick, Wez)
2002-11-14 10:52:45 +00:00
James Cox 4a15ca11e7 MFH.. 2002-11-14 02:07:37 +00:00
James Cox cb8e121ca9 MFH 2002-11-14 01:57:20 +00:00
foobar 6caa25e9f6 MFH 2002-11-14 01:56:06 +00:00
foobar 6c46b47b75 Fixed bug: #20414, shared build did not work 2002-11-14 00:20:24 +00:00
Edin Kadribasic c03f73a3b3 Made mbstring compile on windows again. 2002-11-13 23:01:17 +00:00
Edin Kadribasic d483bd4ecc MFH (relly disable compilation of mbstring) 2002-11-13 21:38:57 +00:00
Edin Kadribasic 57c012b007 MFH (mbstring defines commented out to allow defining them elsewhere). 2002-11-13 21:37:27 +00:00
Stig Bakken 2eced40646 MFH: remove debug output 2002-11-13 20:38:24 +00:00
Derick Rethans 1102505d22 - MFH: moved ext/cybermut to PECL 2002-11-13 19:41:54 +00:00
SVN Migration e6659bd69f This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2002-11-13 16:30:51 +00:00
1776 changed files with 117431 additions and 138810 deletions

No files matched your search

+285
View File
@@ -0,0 +1,285 @@
define dump_bt
set $t = $arg0
while $t
printf "[0x%08x] ", $t
if $t->function_state.function->common.function_name
printf "%s() ", $t->function_state.function->common.function_name
else
printf "??? "
end
if $t->op_array != 0
printf "%s:%d ", $t->op_array->filename, $t->opline->lineno
end
set $t = $t->prev_execute_data
printf "\n"
end
end
document dump_bt
dumps the current execution stack. usage: dump_bt executor_globals.current_execute_data
end
define printzv
set $ind = 0
____printzv $arg0 0
end
document printzv
prints content of zval
end
define ____printzv
set $zvalue = $arg0
if $zvalue->type == 0
set $typename = "NULL"
end
if $zvalue->type == 1
set $typename = "long"
end
if $zvalue->type == 2
set $typename = "double"
end
if $zvalue->type == 3
set $typename = "string"
end
if $zvalue->type == 4
set $typename = "array"
end
if $zvalue->type == 5
set $typename = "object"
end
if $zvalue->type == 6
set $typename = "bool"
end
if $zvalue->type == 7
set $typename = "resource"
end
if $zvalue->type == 8
set $typename = "constant"
end
if $zvalue->type == 9
set $typename = "const_array"
end
printf "[0x%08x] ", $zvalue
if $zvalue == executor_globals.uninitialized_zval_ptr
printf "*uninitialized* "
end
printf "(refcount=%d) %s: ", $zvalue->refcount, $typename
if $zvalue->type == 1
printf "%ld", $zvalue->value.lval
end
if $zvalue->type == 2
printf "%lf", $zvalue->value.dval
end
if $zvalue->type == 3
printf "\"%s\"(%d)", $zvalue->value.str.val, $zvalue->value.str.len
end
if $zvalue->type == 4
if ! $arg1
printf "{\n"
set $ind = $ind + 1
____print_ht $zvalue->value.ht
set $ind = $ind - 1
set $i = $ind
while $i > 0
printf " "
set $i = $i - 1
end
printf "}"
end
end
if $zvalue->type == 5
if ! $arg1
printf "(prop examination disabled due to a gdb bug)"
# set $ht = $zvalue->value.obj.handlers->get_properties($zvalue)
# printf "{\n"
# set $ind = $ind + 1
# ____print_ht $ht
# set $ind = $ind - 1
# set $i = $ind
# while $i > 0
# printf " "
# set $i = $i - 1
# end
# printf "}"
end
end
if $zvalue->type == 6
if $zvalue->lval
printf "true"
else
printf "false"
end
end
if $zvalue->type == 7
printf "#%d", $zvalue->value.lval
end
printf "\n"
end
define ____print_ht
set $ht = $arg0
set $p = $ht->pListHead
while $p != 0
set $zval = *(struct _zval_struct **)$p->pData
set $i = $ind
while $i > 0
printf " "
set $i = $i - 1
end
if $p->nKeyLength > 0
printf "\"%s\" => ", $p->arKey
else
printf "%d => ", $p->h
end
____printzv $zval 1
set $p = $p->pListNext
end
end
define print_ht
set $ind = 1
printf "[0x%08x] {\n", $arg0
____print_ht $arg0
printf "}\n"
end
document print_ht
dumps elements of HashTable made of zval
end
define printzn
set $ind = 0
set $znode = $arg0
if $znode->op_type == 1
set $optype = "IS_CONST"
end
if $znode->op_type == 2
set $optype = "IS_TMP_VAR"
end
if $znode->op_type == 4
set $optype = "IS_VAR"
end
if $znode->op_type == 8
set $optype = "IS_UNUSED"
end
printf "[0x%08x] %s", $znode, $optype
if $znode->op_type == 1
printf ": "
____printzv &$znode->u.constant
end
if $znode->op_type == 2
printf ": "
set $tvar = (union _temp_variable *)((char *)executor_globals.current_execute_data->Ts + $znode->u.var)
____printzv ((union _temp_variable *)$tvar)->tmp_var
end
if $znode->op_type == 4
printf ": "
set $tvar = (union _temp_variable *)((char *)executor_globals.current_execute_data->Ts + $znode->u.var)
____printzv *$tvar->var.ptr_ptr
end
if $znode->op_type == 8
printf "\n"
end
end
document printzn
print type and content of znode.
usage: printzn &opline->op1
end
define printzops
printf "op1 => "
printzn &execute_data->opline.op1
printf "op2 => "
printzn &execute_data->opline.op2
printf "result => "
printzn &execute_data->opline.result
end
document printzops
dump operands of the current opline
end
define zmemcheck
set $p = alloc_globals.head
set $stat = "?"
set $total_size = 0
if $arg0 != 0
set $not_found = 1
else
set $not_found = 0
end
printf " block size status file:line\n"
printf "-------------------------------------------------------------------------------\n"
while $p
set $aptr = $p + sizeof(struct _zend_mem_header) + sizeof(align_test)
if $arg0 == 0 || (void *)$aptr == (void *)$arg0
if $p->magic == 0x7312f8dc
set $stat = "OK"
end
if $p->magic == 0x99954317
set $stat = "FREED"
end
if $p->magic == 0xfb8277dc
set $stat = "CACHED"
end
set $filename = strrchr($p->filename, '/')
if !$filename
set $filename = $p->filename
else
set $filename = $filename + 1
end
printf " 0x%08x ", $aptr
if $p->size == sizeof(struct _zval_struct) && ((struct _zval_struct *)$aptr)->type >= 0 && ((struct _zval_struct *)$aptr)->type < 10
printf "ZVAL?(%-2d) ", $p->size
else
printf "%-9d ", $p->size
end
set $total_size = $total_size + $p->size
printf "%-06s %s:%d", $stat, $filename, $p->lineno
if $p->orig_filename
set $orig_filename = strrchr($p->orig_filename, '/')
if !$orig_filename
set $orig_filename = $p->orig_filename
else
set $orig_filename = $orig_filename + 1
end
printf " <= %s:%d\n", $orig_filename, $p->orig_lineno
else
printf "\n"
end
if $arg0 != 0
set $p = 0
set $not_found = 0
else
set $p = $p->pNext
end
else
set $p = $p->pNext
end
end
if $not_found
printf "no such block that begins at 0x%08x.\n", $aptr
end
if $arg0 == 0
printf "-------------------------------------------------------------------------------\n"
printf " total: %d bytes\n", $total_size
end
end
document zmemcheck
show status of a memory block.
usage: zmemcheck [ptr].
if ptr is 0, all blocks will be listed.
end
+7316
View File
File diff suppressed because it is too large. Load diff
+17 -8
View File
@@ -31,6 +31,11 @@ EXTENSION: aolserver
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: activescript
PRIMARY MAINTAINER: Wez Furlong <wez@php.net>
MAINTENANCE: Odd Fixes
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: apache
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
MAINTENANCE: Maintained
@@ -45,6 +50,10 @@ EXTENSION: cgi
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: cli
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: fhttpd
MAINTENANCE: Unknown
STATUS: Unknown
@@ -54,8 +63,9 @@ MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: nsapi
MAINTENANCE: Unknown
STATUS: Unknown
PRIMARY MAINTAINER: Uwe Schindler <thetaphi@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: phttpd
MAINTENANCE: Unknown
@@ -89,7 +99,7 @@ STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: dba
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
PRIMARY MAINTAINER: Marcus Börger <helly@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
@@ -126,7 +136,7 @@ STATUS: Experimental
SINCE: 4.0.2
-------------------------------------------------------------------------------
EXTENSION: interbase
PRIMARY MAINTAINER: Jouni Ahto <jouni.ahto@exdec.fi>
PRIMARY MAINTAINER: Jouni Ahto <jouni.ahto@exdec.fi>, Ard Biesheuvel <ard@ard.nu>
MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
@@ -166,7 +176,7 @@ MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: oci8
PRIMARY MAINTAINER: Thies C. Arntzen <thies@thieso.net>
PRIMARY MAINTAINER: Antony Dovgal <tony2001@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
@@ -177,8 +187,7 @@ STATUS: Working
COMMENT: Working
-------------------------------------------------------------------------------
EXTENSION: oracle
PRIMARY MAINTAINER: Thies C. Arntzen <thies@thieso.net>
MAINTENANCE: Maintained
MAINTENANCE: Orphaned
STATUS: Working
COMMENT: Using the new OCI8 driver is encouraged where possible.
-------------------------------------------------------------------------------
@@ -330,7 +339,7 @@ MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: mcrypt
PRIMARY MAINTAINER: Derick Rethans <d.rethans@jdimedia.nl>
PRIMARY MAINTAINER: Derick Rethans <derick@derickrethans.nl>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
+5
View File
@@ -8,6 +8,11 @@ up to date instructions in the online manual, located here:
http://www.php.net/manual/en/install.apache.php
For Apache 2, instructions and up-to-date information regarding it's
support status, is available here:
http://www.php.net/manual/en/install.apache2.php
It is strongly recommended that you read the manual page before going
further. However, for the impatient, here is a quick set of steps that
will build PHP as (first) a dynamic Apache module (DSO) for Apache 1.3.x
+5
View File
@@ -1,3 +1,8 @@
#
# Zend
#
$(builddir)/zend_language_scanner.lo: $(builddir)/zend_language_parser.h
$(builddir)/zend_ini_scanner.lo: $(builddir)/zend_ini_parser.h
+26 -16
View File
@@ -7,20 +7,24 @@ COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(PHP_FRAMEWORK
all: $(all_targets)
@echo
@echo "Build complete."
@echo "(It is safe to ignore warnings about tempnam and tmpnam)."
@echo
build-modules: $(PHP_MODULES)
libphp4.la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
-@$(LIBTOOL) --silent --mode=install cp libphp4.la $(phptempdir)/libphp4.la >/dev/null 2>&1
libs/libphp4.bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
$(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp4.so
install: $(install_targets)
install: $(all_targets) $(install_targets)
install-sapi: libphp4.la
@echo "Installing PHP SAPI module"
-@$(LIBTOOL) --silent --mode=install cp libphp4.la $(phptempdir)/libphp4.la >/dev/null 2>&1
install-sapi: $(OVERALL_TARGET)
@echo "Installing PHP SAPI module: $(PHP_SAPI)"
-@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
-@if test ! -r $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME); then \
for i in 0.0.0 0.0 0; do \
@@ -34,10 +38,10 @@ install-sapi: libphp4.la
install-modules: build-modules
@test -d modules && \
$(mkinstalldirs) $(INSTALL_ROOT)$(EXTENSION_DIR) && \
echo "Installing shared extensions: $(INSTALL_ROOT)$(EXTENSION_DIR)/" && \
rm -f modules/*.la && \
cp modules/* $(INSTALL_ROOT)$(EXTENSION_DIR) >/dev/null 2>&1 || true
$(mkinstalldirs) $(INSTALL_ROOT)$(EXTENSION_DIR)
@echo "Installing shared extensions: $(INSTALL_ROOT)$(EXTENSION_DIR)/"
@rm -f modules/*.la >/dev/null 2>&1
@$(INSTALL) modules/* $(INSTALL_ROOT)$(EXTENSION_DIR)
install-tester:
@echo "Installing regression tester: $(INSTALL_ROOT)$(PEAR_INSTALLDIR)/"
@@ -46,15 +50,21 @@ install-tester:
install-su: install-pear install-tester
test: $(SAPI_CLI_PATH)
@TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
TEST_PHP_SRCDIR=$(top_srcdir) \
CC=$(CC) \
$(top_builddir)/$(SAPI_CLI_PATH) -d 'open_basedir=' -d 'safe_mode=0' $(top_srcdir)/run-tests.php $(TESTS)
test:
-@if test -x $(SAPI_CLI_PATH) && test ! -z $(SAPI_CLI_PATH); then \
TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
TEST_PHP_SRCDIR=$(top_srcdir) \
CC="$(CC)" \
$(top_builddir)/$(SAPI_CLI_PATH) -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' $(top_srcdir)/run-tests.php $(TESTS); \
else \
echo "ERROR: Cannot run tests without CLI sapi."; \
fi
clean:
find . -name \*.lo -o -name \*.o | xargs rm -f
find . -name \*.la -o -name \*.a | xargs rm -f
find . -name \*.lo | xargs rm -f
find . -name \*.o | xargs rm -f
find . -name \*.la | xargs rm -f
find . -name \*.a | xargs rm -f
find . -name \*.so | xargs rm -f
find . -name .libs -a -type d|xargs rm -rf
rm -f libphp4.la $(SAPI_CLI_PATH) $(OVERALL_TARGET) modules/* libs/*
+986 -67
View File
File diff suppressed because it is too large. Load diff
+8 -2
View File
@@ -37,7 +37,7 @@ Note though that you might get little response, if your patch is
too hard to review.
If you would like change/add many lines, it is better to ask module
maintainer and/or php-dev@lists.php.net, or pear-dev@lists.php.net if
maintainer and/or internals@lists.php.net, or pear-dev@lists.php.net if
you are patching PEAR. Official module maintainers can be found in
EXTENSIONS file in PHP source.
@@ -79,7 +79,7 @@ Check list for submitting patch
Where to send your patch?
-------------------------
If you are patching C source, send the patch to php-dev@lists.php.net.
If you are patching C source, send the patch to internals@lists.php.net.
If you are patching a module, you should also send the patch to the
maintainer. Official module maintainers are listed in EXTENSION file
in source.
@@ -88,6 +88,11 @@ If you are patching PEAR, send the patch to pear-dev@lists.php.net.
Please add the prefix "[PATCH]" to your email subject and make sure
to include the patch as a MIME attachment even if it is short.
NOTE: only MIME attachments of type 'text/*' are accepted. The
easiest way to acclomplish this, is to make the extension
'.txt'.
Test scripts should be included in the same email.
Explain what has been fixed/added/changed by your patch.
@@ -118,4 +123,5 @@ commit log. If your patch affects end-users, a brief description
and your name might be added to the NEWS file.
Thank you for submitting patch for PHP!
+6 -7
View File
@@ -43,7 +43,6 @@ global
(DONE ?)
* Use arg_separator.input to implode args in the CGI sapi extension
and arg_separator.input to explode in php_build_argv(). (DONE?)
* Implement flush feature suitable for nested output buffers.
For PHP 5.0.0
* bundle and use curl lib for fopen wrapper.
@@ -67,6 +66,7 @@ global
* find a better way to implement script timeouts. SIGVTALRM is used
by some POSIX threads implementations (i.e. OpenBSD) and is not
available in ZTS mode.
* Implement flush feature suitable for nested output buffers.
documentation
@@ -80,11 +80,11 @@ documentation
ext/bz2
-------
* Add ini setting for decompression buffer size. The default 4k is to small
for big files and takes ages to decompress. However, 40k which perform
quite good with big files may be to much under certain environments as
default setting. There should be consideren different default sizes for
different SAPIS (e.g. apache and cli).
* Add an ini directive to specify the size of decompression buffer.
The default 4k is too small for large files and also requires much time
for decompression. 40k is suitable for such files, however it may be too
much under certain environments. There should be appropriate default
settings for the various SAPI modules (e.g. apache and cli).
ext/curl
--------
@@ -158,7 +158,6 @@ ext/standard
basename()
dirname()
strrpos()
strip_tags()
ext/wddx
--------
-3
View File
@@ -1,3 +0,0 @@
- clean up .cvsignores
- purge Makefile.ins and replace PHP_EXTENSION in config.m4s
with appropiate calls to PHP_NEW_EXTENSION
+114
View File
@@ -0,0 +1,114 @@
This is an overview over existing segfaults in the current PHP source
tree.
Fixed:
mb_convert_encoding (Moriyoshi)
socket_iovec_alloc (Rasmus)
exif_imagetype,exif_thumbnail (Rasmus)
dbase_open (Rasmus)
array_pad (Rasmus)
setlocale (Rasmus)
unregister_tick_function (Rasmus)
bcsub (Rasmus)
str_repeat (Ilia)
imagecopyresized (Ilia)
mhash_keygen_s2k (Ilia)
bundled gd (Ilia)
mb_ereg, mb_ereg_match, mb_eregi, mb_split (Moriyoshi)
xml_parser_create (Moriyoshi)
ob_start (Sascha)
imagecreate/-truecolor (Sascha)
flock (Sascha)
register_shutdown_function (Sascha)
mb_strcut('', [number greater than the length of first arg]) (Moriyoshi)
ext/exif, ext/dba (Marcus)
php_base64_encode (Moriyoshi)
Open:
the dbase extension (1)
socket_select (2)
pack (3)
(1) heap corruption, mostly visible in malloc-related calls. Whether you see
this or not might depend on your libc/compiler. Hard to track down,
because the result of the corruption might be quite delayed.
Reproducable with glibc-2.3/gcc 3.2.2 by:
cat <<X | php do_crash
dbase_add_record
dbase_close
dbase_create
dbase_delete_record
dbase_get_record
dbase_get_record_with_names
dbase_numfields
dbase_numrecords
dbase_open
X
(2) heap corruption, dies in efree()/execute()
Methodology
1. Use a plain PHP_4_3 tree
2. Use the config.nice from ammendment 1.
3. Download the test script from:
<URL:http://schumann.cx/do_crash.txt>
4a. Use the scripts funcparse.awk/genfunclist.sh from phpdoc/scripts
for creating a plain text function list. Feed that list to
the script. Avoid calls like pcntl_fork. Manually remove functions
which take too long to finish/eat up all memory.
4b. For testing a single function, echo the name of the function to
the script like this:
echo dbase_open | php do_crash.txt
(3) multiple integer overflows, ex. pack("d4294967297", 2);
Amendment 1.
CFLAGS='-O0 -g' \
'../src/php4/configure' \
'--enable-pcntl' \
'--enable-shmop' \
'--enable-sysvsem' \
'--enable-sysvshm' \
'--enable-wddx' \
'--enable-yp' \
'--enable-filepro' \
'--enable-ftp' \
'--enable-dba' \
'--enable-dbase' \
'--enable-dio' \
'--enable-exif' \
'--enable-mbstring' \
'--enable-mbregex' \
'--enable-sockets' \
'--enable-bcmath' \
'--enable-calendar' \
'--enable-pcntl' \
'--enable-shmop' \
'--enable-sysvsem' \
'--enable-sysvshm' \
'--enable-wddx' \
'--enable-yp' \
'--enable-filepro' \
'--enable-ftp' \
'--enable-dba' \
'--enable-dbase' \
'--enable-dio' \
'--enable-exif' \
'--enable-mbstring' \
'--enable-mbregex' \
'--enable-sockets' \
'--enable-bcmath' \
'--enable-calendar' \
"$@"
+12 -1
View File
@@ -157,7 +157,16 @@ TSRM_API void tsrm_shutdown(void)
int j;
next_p = p->next;
for (j=0; j<id_count; j++) {
for (j=0; j<p->count; j++) {
/* Disabled - calling dtors in tsrm_shutdown makes
modules registering TSRM ids to crash, if they have
dtors, since the module is unloaded before tsrm_shutdown
is called. Can be re-enabled after tsrm_free_id is
implemented.
if (resource_types_table && resource_types_table[j].dtor) {
resource_types_table[j].dtor(p->storage[j], &p->storage);
}
*/
free(p->storage[j]);
}
free(p->storage);
@@ -181,6 +190,7 @@ TSRM_API void tsrm_shutdown(void)
#if defined(GNUPTH)
pth_kill();
#elif defined(PTHREADS)
pthread_setspecific(tls_key, 0);
pthread_key_delete(tls_key);
#elif defined(TSRM_WIN32)
TlsFree(tls_key);
@@ -481,6 +491,7 @@ TSRM_API void tsrm_mutex_free(MUTEX_T mutexp)
if (mutexp) {
#ifdef TSRM_WIN32
DeleteCriticalSection(mutexp);
free(mutexp);
#elif defined(NETWARE)
NXMutexFree(mutexp);
#elif defined(GNUPTH)
+3 -2
View File
@@ -95,14 +95,15 @@ dnl For the thread implementations, we always use --with-*
dnl to maintain consistency
AC_ARG_WITH(tsrm-pth,
[ --with-tsrm-pth[=pth-config] Use GNU Pth.],[
[ --with-tsrm-pth[=pth-config]
Use GNU Pth.],[
TSRM_PTH=$withval
],[
TSRM_PTH=no
])
AC_ARG_WITH(tsrm-st,
[ --with-tsrm-st],[
[ --with-tsrm-st Use SGI's State Threads],[
TSRM_ST=$withval
],[
TSRM_ST=no
+1
View File
@@ -3,6 +3,7 @@
#define HAVE_UTIME 1
#define HAVE_ALLOCA 1
#define HAVE_REALPATH 1
#include <malloc.h>
#include <stdlib.h>
+1 -1
View File
@@ -22,7 +22,7 @@
#ifndef __GNUC__
# ifndef HAVE_ALLOCA_H
# ifdef _AIX
#pragma alloca
#pragma alloca
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 4 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2002 The PHP Group |
| Copyright (c) 1997-2003 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 |
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 4 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2002 The PHP Group |
| Copyright (c) 1997-2003 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 |
+63 -50
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 4 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2002 The PHP Group |
| Copyright (c) 1997-2003 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 |
@@ -92,7 +92,7 @@ static int php_check_dots(const char *element, int n)
(len >= 2 && !php_check_dots(element, len))
#define IS_DIRECTORY_CURRENT(element, len) \
(len == 1 && ptr[0] == '.')
(len == 1 && element[0] == '.')
#elif defined(NETWARE)
/* NetWare has strtok() (in LibC) and allows both slashes in paths, like Windows --
@@ -111,12 +111,12 @@ static int php_check_dots(const char *element, int n)
#ifndef IS_DIRECTORY_UP
#define IS_DIRECTORY_UP(element, len) \
(len == 2 && memcmp(element, "..", 2) == 0)
(len == 2 && element[0] == '.' && element[1] == '.')
#endif
#ifndef IS_DIRECTORY_CURRENT
#define IS_DIRECTORY_CURRENT(element, len) \
(len == 1 && ptr[0] == '.')
(len == 1 && element[0] == '.')
#endif
/* define this to check semantics */
@@ -303,7 +303,10 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
return (0);
#if !defined(TSRM_WIN32) && !defined(NETWARE)
if (IS_ABSOLUTE_PATH(path, path_length)) {
/* cwd_length can be 0 when getcwd() fails.
* This can happen under solaris when a dir does not have read permissions
* but *does* have execute permissions */
if (IS_ABSOLUTE_PATH(path, path_length) || (state->cwd_length < 1)) {
if (use_realpath && realpath(path, resolved_path)) {
path = resolved_path;
path_length = strlen(path);
@@ -363,58 +366,64 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
}
ptr = tsrm_strtok_r(path_copy, TOKENIZER_STRING, &tok);
while (ptr) {
ptr_length = strlen(ptr);
if (state->cwd_length > 0 || IS_ABSOLUTE_PATH(path, path_length)) {
ptr = tsrm_strtok_r(path_copy, TOKENIZER_STRING, &tok);
while (ptr) {
ptr_length = strlen(ptr);
if (IS_DIRECTORY_UP(ptr, ptr_length)) {
char save;
if (IS_DIRECTORY_UP(ptr, ptr_length)) {
char save;
save = DEFAULT_SLASH;
save = DEFAULT_SLASH;
#define PREVIOUS state->cwd[state->cwd_length - 1]
while (IS_ABSOLUTE_PATH(state->cwd, state->cwd_length) &&
!IS_SLASH(PREVIOUS)) {
save = PREVIOUS;
PREVIOUS = '\0';
state->cwd_length--;
}
while (IS_ABSOLUTE_PATH(state->cwd, state->cwd_length) &&
!IS_SLASH(PREVIOUS)) {
save = PREVIOUS;
PREVIOUS = '\0';
state->cwd_length--;
}
if (!IS_ABSOLUTE_PATH(state->cwd, state->cwd_length)) {
state->cwd[state->cwd_length++] = save;
state->cwd[state->cwd_length] = '\0';
} else {
PREVIOUS = '\0';
state->cwd_length--;
}
} else if (!IS_DIRECTORY_CURRENT(ptr, ptr_length)) {
state->cwd = (char *) realloc(state->cwd, state->cwd_length+ptr_length+1+1);
if (!IS_ABSOLUTE_PATH(state->cwd, state->cwd_length)) {
state->cwd[state->cwd_length++] = save;
state->cwd[state->cwd_length] = '\0';
} else {
PREVIOUS = '\0';
state->cwd_length--;
}
} else if (!IS_DIRECTORY_CURRENT(ptr, ptr_length)) {
state->cwd = (char *) realloc(state->cwd, state->cwd_length+ptr_length+1+1);
#ifdef TSRM_WIN32
/* Windows 9x will consider C:\\Foo as a network path. Avoid it. */
if ((state->cwd[state->cwd_length-1]!='\\' && state->cwd[state->cwd_length-1]!='/') ||
IsDBCSLeadByte(state->cwd[state->cwd_length-2])) {
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
}
/* Windows 9x will consider C:\\Foo as a network path. Avoid it. */
if ((state->cwd[state->cwd_length-1]!='\\' && state->cwd[state->cwd_length-1]!='/') ||
IsDBCSLeadByte(state->cwd[state->cwd_length-2])) {
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
}
#elif defined(NETWARE)
/* If the token is a volume name, it will have colon at the end -- so, no slash before it */
if (ptr[ptr_length-1] != ':') {
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
}
/* If the token is a volume name, it will have colon at the end -- so, no slash before it */
if (ptr[ptr_length-1] != ':') {
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
}
#else
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
#endif
memcpy(&state->cwd[state->cwd_length], ptr, ptr_length+1);
state->cwd_length += ptr_length;
memcpy(&state->cwd[state->cwd_length], ptr, ptr_length+1);
state->cwd_length += ptr_length;
}
ptr = tsrm_strtok_r(NULL, TOKENIZER_STRING, &tok);
}
ptr = tsrm_strtok_r(NULL, TOKENIZER_STRING, &tok);
}
if (state->cwd_length == COPY_WHEN_ABSOLUTE(state->cwd)) {
state->cwd = (char *) realloc(state->cwd, state->cwd_length+1+1);
state->cwd[state->cwd_length] = DEFAULT_SLASH;
state->cwd[state->cwd_length+1] = '\0';
state->cwd_length++;
if (state->cwd_length == COPY_WHEN_ABSOLUTE(state->cwd)) {
state->cwd = (char *) realloc(state->cwd, state->cwd_length+1+1);
state->cwd[state->cwd_length] = DEFAULT_SLASH;
state->cwd[state->cwd_length+1] = '\0';
state->cwd_length++;
}
} else {
state->cwd = (char *) realloc(state->cwd, path_length+1);
memcpy(state->cwd, path, path_length+1);
state->cwd_length = path_length;
}
if (verify_path && verify_path(state)) {
@@ -477,19 +486,23 @@ CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path
CWD_API char *virtual_realpath(const char *path, char *real_path TSRMLS_DC)
{
cwd_state new_state;
int retval;
char *retval;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
retval = virtual_file_ex(&new_state, path, NULL, 1);
if (!retval) {
if (virtual_file_ex(&new_state, path, NULL, 1)==0) {
int len = new_state.cwd_length>MAXPATHLEN-1?MAXPATHLEN-1:new_state.cwd_length;
memcpy(real_path, new_state.cwd, len);
real_path[len] = '\0';
return real_path;
retval = real_path;
} else {
retval = NULL;
}
return NULL;
CWD_STATE_FREE(&new_state);
return retval;
}
CWD_API int virtual_filepath_ex(const char *path, char **filepath, verify_path_func verify_path TSRMLS_DC)
+30 -5
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 4 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2002 The PHP Group |
| Copyright (c) 1997-2003 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 |
@@ -41,6 +41,10 @@
#include <unistd.h>
#endif
#if defined(__osf__) || defined(_AIX)
#include <errno.h>
#endif
#ifdef TSRM_WIN32
#include "readdir.h"
#include <sys/utime.h>
@@ -57,10 +61,10 @@ typedef unsigned short mode_t;
* to account for volume name that is unique to NetWare absolute paths
*/
#define COPY_WHEN_ABSOLUTE(path) 2
#define IS_ABSOLUTE_PATH(path, len) \
(len >= 2 && isalpha(path[0]) && path[1] == ':')
#define IS_UNC_PATH(path, len) \
(len >= 2 && IS_SLASH(path[0]) && IS_SLASH(path[1]))
#define IS_ABSOLUTE_PATH(path, len) \
(len >= 2 && ((isalpha(path[0]) && path[1] == ':') || IS_UNC_PATH(path, len)))
#elif defined(NETWARE)
#ifdef HAVE_DIRENT_H
@@ -155,6 +159,25 @@ CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC);
CWD_API int virtual_access(const char *pathname, int mode TSRMLS_DC);
#endif
/* On AIX & Tru64 when a file does not exist realpath() returns
* NULL, and sets errno to ENOENT. Unlike in other libc implementations
* the destination is not filled and remains undefined. Therefor, we
* must populate it manually using strcpy as done on systems with no
* realpath() function.
*/
#if defined(__osf__) || defined(_AIX)
static char *php_realpath_hack(char *src, char *dest)
{
char *ret;
if ((ret = realpath(src, dest)) == NULL && errno == ENOENT) {
return strcpy(dest, src);
} else {
return ret;
}
}
#endif
#if HAVE_UTIME
CWD_API int virtual_utime(const char *filename, struct utimbuf *buf TSRMLS_DC);
#endif
@@ -196,8 +219,6 @@ typedef struct _virtual_cwd_globals {
#define VCWD_STAT(path, buff) virtual_stat(path, buff TSRMLS_CC)
#if !defined(TSRM_WIN32) && !defined(NETWARE)
#define VCWD_LSTAT(path, buff) virtual_lstat(path, buff TSRMLS_CC)
#else
#define VCWD_LSTAT(path, buff) virtual_lstat(path, buff TSRMLS_CC)
#endif
#define VCWD_UNLINK(path) virtual_unlink(path TSRMLS_CC)
#define VCWD_MKDIR(pathname, mode) virtual_mkdir(pathname, mode TSRMLS_CC)
@@ -234,7 +255,11 @@ typedef struct _virtual_cwd_globals {
#define VCWD_ACCESS(pathname, mode) access(pathname, mode)
#ifdef HAVE_REALPATH
#if defined(__osf__) || defined(_AIX)
#define VCWD_REALPATH(path, real_path) php_realpath_hack(path, real_path)
#else
#define VCWD_REALPATH(path, real_path) realpath(path, real_path)
#endif
#else
#define VCWD_REALPATH(path, real_path) strcpy(real_path, path)
#endif
+10 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 4 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2002 The PHP Group |
| Copyright (c) 1997-2003 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 |
@@ -359,4 +359,13 @@ TSRM_API int shmctl(int key, int cmd, struct shmid_ds *buf) {
return -1;
}
}
TSRM_API char *realpath(char *orig_path, char *buffer)
{
int ret = GetFullPathName(orig_path, _MAX_PATH, buffer, NULL);
if(!ret || ret > _MAX_PATH) {
return NULL;
}
return buffer;
}
#endif
+2 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 4 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2002 The PHP Group |
| Copyright (c) 1997-2003 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 |
@@ -101,4 +101,5 @@ TSRM_API void *shmat(int key, const void *shmaddr, int flags);
TSRM_API int shmdt(const void *shmaddr);
TSRM_API int shmctl(int key, int cmd, struct shmid_ds *buf);
TSRM_API char *realpath(char *orig_path, char *buffer);
#endif
-10143
View File
File diff suppressed because it is too large. Load diff
-186
View File
@@ -1,186 +0,0 @@
// $Header$
// FlexLexer.h -- define interfaces for lexical analyzer classes generated
// by flex
// Copyright (c) 1993 The Regents of the University of California.
// All rights reserved.
//
// This code is derived from software contributed to Berkeley by
// Kent Williams and Tom Epperly.
//
// Redistribution and use in source and binary forms with or without
// modification are permitted provided that: (1) source distributions retain
// this entire copyright notice and comment, and (2) distributions including
// binaries display the following acknowledgement: ``This product includes
// software developed by the University of California, Berkeley and its
// contributors'' in the documentation or other materials provided with the
// distribution and in all advertising materials mentioning features or use
// of this software. 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 ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
// WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
// This file defines FlexLexer, an abstract class which specifies the
// external interface provided to flex C++ lexer objects, and yyFlexLexer,
// which defines a particular lexer class.
//
// If you want to create multiple lexer classes, you use the -P flag
// to rename each yyFlexLexer to some other xxFlexLexer. You then
// include <FlexLexer.h> in your other sources once per lexer class:
//
// #undef yyFlexLexer
// #define yyFlexLexer xxFlexLexer
// #include <FlexLexer.h>
//
// #undef yyFlexLexer
// #define yyFlexLexer zzFlexLexer
// #include <FlexLexer.h>
// ...
#ifndef FLEXLEXER_H
// Never included before - need to define base class.
#define FLEXLEXER_H
#include <iostream.h>
extern "C++" {
struct yy_buffer_state;
typedef int yy_state_type;
class FlexLexer {
public:
virtual ~FlexLexer() { }
const char* YYText() { return yytext; }
int YYLeng() { return yyleng; }
virtual void
yy_switch_to_buffer( struct yy_buffer_state* new_buffer ) = 0;
virtual struct yy_buffer_state*
yy_create_buffer( istream* s, int size ) = 0;
virtual void yy_delete_buffer( struct yy_buffer_state* b ) = 0;
virtual void yyrestart( istream* s ) = 0;
virtual int yylex() = 0;
// Call yylex with new input/output sources.
int yylex( istream* new_in, ostream* new_out = 0 )
{
switch_streams( new_in, new_out );
return yylex();
}
// Switch to new input/output streams. A nil stream pointer
// indicates "keep the current one".
virtual void switch_streams( istream* new_in = 0,
ostream* new_out = 0 ) = 0;
int lineno() const { return yylineno; }
int debug() const { return yy_flex_debug; }
void set_debug( int flag ) { yy_flex_debug = flag; }
protected:
char* yytext;
int yyleng;
int yylineno; // only maintained if you use %option yylineno
int yy_flex_debug; // only has effect with -d or "%option debug"
};
}
#endif
#if defined(yyFlexLexer) || ! defined(yyFlexLexerOnce)
// Either this is the first time through (yyFlexLexerOnce not defined),
// or this is a repeated include to define a different flavor of
// yyFlexLexer, as discussed in the flex man page.
#define yyFlexLexerOnce
class yyFlexLexer : public FlexLexer {
public:
// arg_yyin and arg_yyout default to the cin and cout, but we
// only make that assignment when initializing in yylex().
yyFlexLexer( istream* arg_yyin = 0, ostream* arg_yyout = 0 );
virtual ~yyFlexLexer();
void yy_switch_to_buffer( struct yy_buffer_state* new_buffer );
struct yy_buffer_state* yy_create_buffer( istream* s, int size );
void yy_delete_buffer( struct yy_buffer_state* b );
void yyrestart( istream* s );
virtual int yylex();
virtual void switch_streams( istream* new_in, ostream* new_out );
protected:
virtual int LexerInput( char* buf, int max_size );
virtual void LexerOutput( const char* buf, int size );
virtual void LexerError( const char* msg );
void yyunput( int c, char* buf_ptr );
int yyinput();
void yy_load_buffer_state();
void yy_init_buffer( struct yy_buffer_state* b, istream* s );
void yy_flush_buffer( struct yy_buffer_state* b );
int yy_start_stack_ptr;
int yy_start_stack_depth;
int* yy_start_stack;
void yy_push_state( int new_state );
void yy_pop_state();
int yy_top_state();
yy_state_type yy_get_previous_state();
yy_state_type yy_try_NUL_trans( yy_state_type current_state );
int yy_get_next_buffer();
istream* yyin; // input source for default LexerInput
ostream* yyout; // output sink for default LexerOutput
struct yy_buffer_state* yy_current_buffer;
// yy_hold_char holds the character lost when yytext is formed.
char yy_hold_char;
// Number of characters read into yy_ch_buf.
int yy_n_chars;
// Points to current character in buffer.
char* yy_c_buf_p;
int yy_init; // whether we need to initialize
int yy_start; // start state number
// Flag which is used to allow yywrap()'s to do buffer switches
// instead of setting up a fresh yyin. A bit of a hack ...
int yy_did_buffer_switch_on_eof;
// The following are not always needed, but may be depending
// on use of certain flex features (like REJECT or yymore()).
yy_state_type yy_last_accepting_state;
char* yy_last_accepting_cpos;
yy_state_type* yy_state_buf;
yy_state_type* yy_state_ptr;
char* yy_full_match;
int* yy_full_state;
int yy_full_lp;
int yy_lp;
int yy_looking_for_trail_begin;
int yy_more_flag;
int yy_more_len;
int yy_more_offset;
int yy_prev_more_offset;
};
#endif
-56
View File
@@ -1,56 +0,0 @@
--------------------------------------------------------------------
The Zend Engine License, version 2.00
Copyright (c) 1999-2002 Zend Technologies Ltd. All rights reserved.
--------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
modification, is permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
3. The names "Zend" and "Zend Engine" must not be used to endorse
or promote products derived from this software without prior
permission from Zend Technologies Ltd. For written permission,
please contact license@zend.com.
4. Zend Technologies Ltd. may publish revised and/or new versions
of the license from time to time. Each version will be given a
distinguishing version number.
Once covered code has been published under a particular version
of the license, you may always continue to use it under the
terms of that version. You may also choose to use such covered
code under the terms of any subsequent version of the license
published by Zend Technologies Ltd. No one other than Zend
Technologies Ltd. has the right to modify the terms applicable
to covered code created under this License.
5. Redistributions of any form whatsoever must retain the following
acknowledgment:
"This product includes the Zend Engine, freely available at
http://www.zend.com"
6. All advertising materials mentioning features or use of this
software must display the following acknowledgment:
"The Zend Engine is freely available at http://www.zend.com"
THIS SOFTWARE IS PROVIDED BY ZEND TECHNOLOGIES LTD. ``AS IS'' AND
ANY EXPRESSED 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 ZEND
TECHNOLOGIES LTD. 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.
--------------------------------------------------------------------
-51
View File
@@ -1,51 +0,0 @@
## Process this file with automake to produce Makefile.in -*- makefile -*-
#CLEANFILES = zend_language_parser.c zend_language_parser.h zend_language_scanner.c zend_language_parser.output zend_ini_parser.c zend_ini_parser.h zend_ini_scanner.c zend_ini_parser.output
AUTOMAKE_OPTIONS=foreign
noinst_LTLIBRARIES=libZend.la
libZend_la_SOURCES=\
zend_language_parser.y zend_language_scanner.l \
zend_ini_parser.y zend_ini_scanner.l \
zend_alloc.c zend_compile.c zend_constants.c zend_dynamic_array.c \
zend_execute.c zend_execute_API.c zend_highlight.c zend_llist.c \
zend_opcode.c zend_operators.c zend_ptr_stack.c zend_stack.c \
zend_variables.c zend.c zend_API.c zend_extensions.c zend_hash.c \
zend_list.c zend_indent.c zend_builtin_functions.c zend_sprintf.c \
zend_ini.c zend_qsort.c zend_objects.c zend_object_handlers.c \
zend_object_API.c
libZend_la_LDFLAGS =
libZend_la_LIBADD = @ZEND_EXTRA_LIBS@
# automake isn't too clever about "non-standard" use of lex and yacc
$(libZend_la_OBJECTS): zend_language_parser.h
zend_ini_scanner.lo: zend_ini_parser.h
# Language parser/scanner rules
zend_language_scanner.c: $(srcdir)/zend_language_scanner.l
$(LEX) -Pzend -S$(srcdir)/flex.skl -o$@ -i $(srcdir)/zend_language_scanner.l
zend_language_parser.h: zend_language_parser.c
zend_language_parser.c: $(srcdir)/zend_language_parser.y
$(YACC) -p zend -v -d $(srcdir)/zend_language_parser.y -o zend_language_parser.c
# INI parser/scanner rules
zend_ini_parser.c: $(srcdir)/zend_ini_parser.y
$(YACC) -p ini_ -v -d $(srcdir)/zend_ini_parser.y -o zend_ini_parser.c
zend_ini_scanner.c: $(srcdir)/zend_ini_scanner.l
$(LEX) -Pini_ -S$(srcdir)/flex.skl -o$@ -i $(srcdir)/zend_ini_scanner.l
zend_ini_parser.h: zend_ini_parser.c
depend:
zend_execute.lo: $(srcdir)/zend_execute.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) $(INLINE_CFLAGS) -c $(srcdir)/zend_execute.c
-193
View File
@@ -1,193 +0,0 @@
Creating an object
------------------
Object can be created in the following ways:
1. As a result of a function call. E.g.:
$foo = create_new_foo("parameter");
$foo->run();
The function should create a new zval, create new object and get the
handle for it, set handle and handler table as needed. Note that the
handle is the only ID of the object, so it should be enough to
identify it.
2. Overriding create_object handler for class. E.g.:
$foo = new Java("some.Class.here", "parameter");
$foo->run();
The create_object handler function should create a new zval, create
new object and get the handle for it, set handle and handler table as
needed, and also provide constructor method that would handle
constructor call. The get_constructor handler table entry should be
used for that. Do not rely class entry's constructor, unless you refer
to it from get_constructor handler.
Object maintenance
------------------
The handlers add_ref and del_ref are called when a new zval referring
to the object is created. This does not create a new object - both
zvals still refer to the same object.
clone_obj handler should create a new object, identical to an old one,
but being a separate entity.
delete_obj should destroy an object, all references to it become
invalid.
Object access - read
--------------------
read_property is used to read object's property. This value is not
meant to be changed. The handler returns zval * with the value.
Object access - write
---------------------
write_property is used to directly write object's property by
name. This handler is used to assign property variables or to change them
in operations like += or ++ (unless get_property_zval_ptr is also set).
get_property_zval_ptr is used to obtain pointer to modifyable zval for
operations like += or ++. This should be used only if your object model
stores properties as real zval's that can be modified from outside.
Otherwise this handler should be NULL and the engine will use
read_property and write_property instead.
get_property_ptr is used to obtain zval ** for future writing to
it. If your object properties are stored as zval*, return real place
where the property is stored. If the aren't, the best way is to create
proxy object and handle it via get and set methods (see below).
This method is meant to be used for send-by-reference and assign-by-reference
use of object properties. If you don;t want to implement property
referencing for your objects, you can set this handler to NULL.
get and set handlers are used when engine needs to access the object
as a value. E.g., in the following situation:
$foo =& $obj->bar;
$foo = 1;
if $foo is an object (e.g., proxy object from get_property_ptr) it
would be accessed using write handler.
Object access - method call
---------------------------
get_method handler is used to find method description by name. It
should set right type, function name and parameter mask for the
method. If the type is ZEND_OVERLOADED_FUNCTION, the method would be
called via call_method handler, otherwise it would be called with
standard Zend means.
get_constructor performs the same function as get_method, but for the
object constructor.
call_method handler is used to perform method call. Parameters are
passed like to any other Zend internal function.
Object - comparison
-------------------
Objects can be compared via compare_objects handler. This is used with
== operation, === compares objects by handles, i.e., return true if
and only if it's really the same object. Note that objects from
different object types (i.e., having different handlers) can not be
compared.
Objects - reflection
--------------------
get_class_name is used to retrieve class name of the object. No other
reflection functions are currently implemented.
Objects - data structures and handlers
---------------------------------------
The object is represented by the following structure:
struct _zend_object_value {
zend_object_handle handle;
zend_object_handlers *handlers;
};
handle is an ID of the object among the objects of the same type (not
class!). The type of the object and how it behaves is determined by
the handler table.
typedef struct _zend_object_handlers {
zend_object_add_ref_t add_ref;
zend_object_del_ref_t del_ref;
zend_object_delete_obj_t delete_obj;
zend_object_clone_obj_t clone_obj;
zend_object_read_property_t read_property;
zend_object_write_property_t write_property;
zend_object_get_property_ptr_t get_property_ptr;
zend_object_get_property_zval_ptr_t get_property_zval_ptr;
zend_object_get_t get;
zend_object_set_t set;
zend_object_has_property_t has_property;
zend_object_unset_property_t unset_property;
zend_object_get_properties_t get_properties;
zend_object_get_method_t get_method;
zend_object_call_method_t call_method;
zend_object_get_constructor_t get_constructor;
zend_object_get_class_entry_t get_class_entry;
zend_object_get_class_name_t get_class_name;
zend_object_compare_t compare_objects;
} zend_object_handlers;
See zend_object_handlers.h for prototypes. All objects are passed as zval's.
Handlers explained:
add_ref - called when a copy of the object handle is created.
del_ref - called when a copy of the object handle is destroyed.
delete_obj - called when an object needs to be destroyed.
clone_obj - called when a new object identical to an old one should be
created (unlike Zend Engine 1, this never happens unless explicitly
asked for).
read_property - returns zval *, containing the value of the
property. Is used when value of the property should be retrieved for
reading.
write_property - assigns value to certain property of the object.
get_property_zval_ptr - retrieves zval** for being directly modified by
the engine. If your properties are not zval's, don't define it.
get_property_ptr - retrieves zval** for the property of the value, to
be used for read and write. If object properties are not zval's
natively, this method should create and return proxy object for use
with get and set methods.
get - retrieves zval* for object contents. To be used mainly with
proxy objects from get_property_ptr, but also may be used for
convert_to_* functions.
set - sets value for object contents. To be used mainly with
proxy objects from get_property_ptr.
has_property - checks if the object has certain property set.
unset_property - removes value for the property of the object
get_method - retrieves description of the method
call_method - calls the method (parameters should be put on stack like
for any other PHP internal function).
get_constructor - get description for the object constructor method
get_class_entry - should return the class entry
get_class_name - get the name of the class the object belongs to
compare_objects - compares if two objects are equal
-136
View File
@@ -1,136 +0,0 @@
Revamped object model using object handles
===========================================
Background
----------
In the Zend Engine 1.0 (and its predecessor the PHP 3 scripting
engine) the object model's design is that instantiated objects are
language values. This means that when programmers are performing
operations, such variable assignment and passing parameters to
functions, objects are handled very similarly to the way other
primitive types are handled such as integers and strings.
Semantically this means that the whole object is being copied. The
approach Java takes is different where one refers to objects by handle
and not by value (one can think of a handle as an objects' ID).
Need
----
Unfortunately, the approach taken up to now has severely limited the
Zend Engine's object oriented model, both feature and simplicity
wise. One of the main problems with the former approach is that object
instantiation and duplication is very hard to control, a problem which
can not only lead to inefficient development but also often to strange
run-time behavior. Changing the object model to a handle oriented
model will allow the addressing of many needs such as destructors,
de-referencing method return values, tight control of object
duplication and more.
Overview
--------
The proposed object model is very much influenced by the Java
model. In general, when you create a new object you will be getting a
handle to the object instead of the object itself. When this handle is
sent to functions, assigned and copied it is only the handle which is
copied/sent/assigned. The object itself is never copied nor
duplicated. This results in all handles of this object to always point
at the same object making it a very consistent solution and saving
unnecessary duplication and confusing behavior.
Functionality
-------------
After this change the basic use of objects will be almost identical to
previous versions of the scripting engine. However, you won't bump
into awkward and confusing copying & destructing of objects. In order
to create and use a new object instance you will do the following:
$object = new MyClass(); $object->method();
The previous code will assign $object the handle of a new instance of
the class MyClass and call one of its methods.
Consider the following code:
1 class MyClass
2 {
3 function setMember($value)
4 {
5 $this->member = $value;
6 }
7
8 function getMember()
9 {
10 return $this->member;
11 }
12 }
13
14 function foo($obj)
15 {
16 $obj->setMember("foo");
17 }
18
19 $object = new MyClass();
20 $object->setMember("bar");
21 foo($object);
22 print $object->getMember();
Without the new Java-like handles, at line 20 the objects' data member
member is set to the string value of "bar". Because of the internal
representation of objects in the Zend Engine 1.0, the object is marked
as a reference, and when it is sent by value to the function foo, it
is duplicated (!). Therefore, the call to foo() on line 21 will
result in the $obj->setMember("foo") call being called on a duplicate
of $object. Line 22 will then result in "bar" being printed.
This is how the scripting engine has worked until today. Most
developers are probably unaware of the fact that they aren't always
talking to the same object but often duplicates; others may have
realized this can usually be solved by always passing objects by
reference (unless a replica is actually desired, which is uncommon).
The new object model will allow for a much more intuitive
implementation of the code. On line 21, the object's handle (ID) is
passed to foo() by value. Inside foo(), the object is fetched
according to this handle and, therefore, the setMember() method is
called on the originally instantiated object and not a copy. Line 22
will therefore result in "foo" being printed. This approach gives
developers tighter control of when objects are created and duplicated.
An additional not-as-important benefit is that the object handle will
be passed to foo() by value, which most probably will also save
unnecessary duplication of the value containing the ID itself and thus
additionally improving run-time performance.
This was just a simple description of why the new object model solves
awkward behavior and makes object handling much easier, intuitive and
efficient. The importance of this change goes far beyond what is
mentioned in this section as you will see in further sections which
describe new features with a majority of them being based on this
change.
Compatibility Notes
--------------------
Many PHP programmers aren't even aware of the copying quirks of the
current object model and, therefore, there is a relatively good chance
that the amount of PHP applications that will work out of the box or
after a very small amount of modifications would be high.
To simplify migration, version 2.0 will support an optional
'auto-clone' feature, which will perform a cloning of the object
whenever it would have been copied in version 1.0. Optionally, it
will also be possible to request that the engine will emit an E_NOTICE
message whenever such an automatic clone occurs, in order to allow
developers to gradually migrate to the version 2.0-style behavior
(without automatic clones).
Dependencies
------------
The new object model is not dependent on other features. Many of the
other Zend Engine 2.0 features, such as the $foo->bar()->barbara()
syntax, destructors and others completely rely on this new object
model.
-169
View File
@@ -1,169 +0,0 @@
Title: Zend 2.0 Namespaces
Version: $Revision$
Status: draft
Maintainer: Stig S. Bakken <ssb@fast.no>
Created: 2001-09-08
Modified: 2001-09-08
1. Background/Need
==================
PHP and Zend 1.0 have come to a point where a lot of reusable code is
being written; from simple functions and classes to entire application
frameworks. It is becoming increasingly difficult to avoid symbol
name collisions with the current scoping methods.
The symbol scopes available in Zend 1.0 are the global scope, the
class scope and the function scope. All scopes but classes may
contain variables, only the class and global scopes may contain
functions, while only the global scope may contain constants and
classes. This means that all of Zend 1.0's scoping methods are
inherently limited for solving symbol name collision problems.
2. Overview
===========
Namespaces in Zend 2.0 provide a way to manage the symbol collision
problem by making it possible to define multiple symbol tables able to
contain all types of symbols. Zend will get the notion of a current
namespace, defaulting to the current global one. The current name
space may be changed on a file-by-file basis. Symbols in other name
spaces than the current one may be referenced using a new namespace
operator. It will be possible to "import" symbols from one namespace
into another.
3. Functionality
================
3.1. Namespace Syntax
=====================
The namespace operator ":" is used to refer to symbols in other
namespaces than the current one:
Class: Namespace:class
Function: Namespace:function
Static method: Namespace:class::method
Variable: $Namespace:variable
Constant: Namespace:CONSTANT
Class variable: $Namespace:class::variable
To refer to symbols in the global namespace, symbols are prefixed with
only the namespace operator:
Class: :class
Function: :function
Static method: :class::method
Variable: $:variable
Constant: :CONSTANT
Class variable: $:class::variable
Note: $:variable will effectively be just another syntax for
$GLOBALS['variable'].
A namespace may have a name containing a ":", it is always the last
":" character in the symbol qualifier that is the actual namespace
operator:
Class: Name:Space:class
Function: Name:Space:function
Static method: Name:Space:class::method
Variable: $Name:Space:variable
Constant: Name:Space:CONSTANT
Class variable: $Name:Space:class::variable
(Here, the ":" between "Name" and "Space" is part of the name, it is
the one after "Space" that is the namespace operator.)
3.2. Defining Namespaces
========================
Individual files may define a namespace that will apply to the entire
file. If no "namespace" operator occurs in the file, it will be in
the global namespace:
1 namespace HTML;
2
3 class Form {
4 function Form() {
5 // constructor
6 }
7 // ...
8 }
Or with the "nested" name syntax:
1 namespace HTML:Form;
2
3 class Image {
4 var $src;
5 function Image($src) {
6 $this->src = $src;
7 }
8 // ...
9 }
Code executed within the "HTML" namespace may refer to the Form class
as just "Form". Code executed from within other namespaces has to
refer to it as "HTML:Form". The "namespace" statement must occur
before any other statements in the file.
# [ssb 2001-09-08]:
# Should it be possible to "add" symbols to a namespace by including a
# second file with the same namespace statement?
3.3. Importing Symbols
======================
It is possible to import symbols from another namespace into the
current one with the "import" statement:
import * from HTML; // all symbols
import Form from HTML; // single symbols
import Form,Table from HTML; // multiple symbols
There is a potential for name clashes between symols of different
types that have the same qualifier syntax. These are resolved in this
order: class, function, constant.
Optionally, the symbol type may be explicitly given to import (as
"class", "function", "variable" or "constant"):
import class Form from HTML;
And finally, you may import all symbols of a given type:
import constant * from HTML:Table;
The namespace with its symbols must already be defined before using
"import".
4. Compatibility Notes
======================
Old code that does not take advantage of namespaces will run without
modifications.
5. Dependencies
===============
The class variable syntax depends on this class variables being
implemented in the new ZE2 object model.
6. Acknowledgements
===================
Andi Gutmans <andi@zend.com> and Zeev Suraski <zeev@zend.com> for
initial ZE2 namespaces proposal
Dean Hall <php@apt7.com> for the initial symbol qualification syntax
-72
View File
@@ -1,72 +0,0 @@
Title: Loose type requirements for functions
Version: $Revision$
Status: draft
Maintainer: Brian Moon <brianm@dealnews.com>
Created: 2001-09-17
Modified: 2001-09-17
1. Background/Need
==================
Many internal function of PHP will reject parameters because of their
type (the array and variable function come to mind). For userland
this is not an easy task as there is no uniform way to do it. An
addition to the engine for requiring loose types would allow
delevopers to know that the data passed to their functions is of the
correct type and reduce the need for duplicating the same code in
every function to check for the type of data.
2. Overview
===========
Loose typing mostly means evaluating the contents of the variable and
not the type of the variable itself. The requirements for this would
and should work much like several of the is_* functions do now.
The typing of parameters would be optional and those not typed would
simply continue to be treated as they are now.
3. Functionality
================
3.1. Allowed Types
==================
Only loose types should be needed to ensure the data is usable by the
function. Duplicating the functionallity of is_scalar, is_resource,
is_array and is_object should give developers all the information they
need to use a variable correctly.
3.2. Syntax
===========
The current function syntax should be expanded to allow typing of
variables inline in a C style.
function foo ($var){
}
could be changed to require an array such as:
function foo (array $var){
}
3.3. Errors
===========
Mis-matches in type should be reported as fatal errors and should halt
the execution of a script as that function can not be run and code
following could not reliably run.
4. Compatibility Notes
======================
Old code that does not take advantage of this will run without
modifications.
-107
View File
@@ -1,107 +0,0 @@
Title: Delegation
(a/k/a. Object-Based Inheritance)
Version: $Revision$
Status: draft
Maintainer: Sebastian Bergmann <sb@sebastian-bergmann.de>
Dynamic Delegation
Syntax / Example
<?php
class aDelegatee {
function doSomething() {
echo 'hubu';
}
}
class anotherDelegatee {
function doSomething() {
echo 'tubu';
}
}
class Foo {
delegatee $bar;
function setDelegatee($delegatee) {
$this->delegatee = $delegatee;
}
}
$foo = new Foo;
$foo->setDelegatee(new aDelegatee);
$foo->doSomething(); /* prints "hubu" */
$foo->setDelegatee(new anotherDelegatee);
$foo->doSomething(); /* prints "tubu" */
?>
Semantics / Synopsis
The "Foo" class may use all methods available in "$bar" as if they
where locally defined or inherited from a superclass. The essential
difference is that by assigning another object to "$bar" it is
possible to dynamically switch between different implementations for
these methods.
Fixed Delegation
Syntax / Example
<?php
class aDelegatee {
function doSomething() {
echo 'hubu';
}
}
class Foo {
final delegatee $bar = new aDelegatee;
}
$foo = new Foo;
$foo->doSomething(); /* prints "hubu" */
?>
Semantics / Synopsis
The "Foo" class may use all methods available in "$bar" as if they
where locally defined or inherited from a superclass. The difference
to the dynamic delegation is that once the delegatee object is set,
it cannot be changed.
Default Delegation
Syntax / Example
<?php
class Foo {
function __delegate($name, $parameters = array()) {
echo $name;
}
}
$foo = new Foo;
$foo->bar(); /* prints "bar" */
?>
Semantics / Synopsis
If a class has a __delegate() method, it is called whenever a
method on an object of this class is called that is
* Not defined in the class.
* Not provided by a delegatee object.
The __delegate() method is called with the name and parameters
of the method call.
This supersedes / obsoletes similar functionality introduced in
Zend Engine 1 by ext/overload.
-749
View File
@@ -1,749 +0,0 @@
Changes in the Zend Engine 2.0
* New Object Model.
The Zend Engine's handling of objects has been completely
changed in order to allow for new features, but also to increase
its performance.
Objects were handled in previous versions like primitive types
(for instance integers and strings). The drawback of this method
is, that semantically the whole object was copied when a
variable was assigned or parameters were passed to a method. The
new approach refers to objects by handle and not by value (one
can think of a handle as an object's ID).
Many PHP programmers aren't even aware of the copying quirks of
the old object model and, therefore, there is a relatively good
chance that the amount of PHP applications that will work out of
the box or after a very small amount of modifications would be
high.
* Private and Protected Members.
The Zend Engine 2.0 introduces private and protected member variables.
Note that for performance reasons no error message is emitted in
case of an illegal access to a private or protectecd member variable.
Example:
<?php
class MyClass {
private $Hello = "Hello, World!\n";
protected $Bar = "Hello, Foo!\n";
protected $Foo = "Hello, Bar!\n";
function printHello() {
print "MyClass::printHello() ".$this->Hello;
print "MyClass::printHello() ".$this->Bar;
print "MyClass::printHello() ".$this->Foo;
}
}
class MyClass2 extends MyClass {
protected $Foo;
function printHello() {
MyClass::printHello(); /* Should print */
print "MyClass2::printHello() ".$this->Hello; /* Shouldn't print out anything */
print "MyClass2::printHello() ".$this->Bar; /* Shouldn't print (not declared)*/
print "MyClass2::printHello() ".$this->Foo; /* Should print */
}
}
$obj = new MyClass();
print $obj->Hello; /* Shouldn't print out anything */
print $obj->Bar; /* Shouldn't print out anything */
print $obj->Foo; /* Shouldn't print out anything */
$obj->printHello(); /* Should print */
$obj = new MyClass2();
print $obj->Hello; /* Shouldn't print out anything */
print $obj->Bar; /* Shouldn't print out anything */
print $obj->Foo; /* Shouldn't print out anything */
$obj->printHello();
?>
Protected member variables can be accessed in classes extending the class
they are declared in, whereas private member variables can only be accessed
by the class they belong to.
Note: Protected member variables have to be declared in every class they
are used!
* Object Cloning.
The Zend Engine 1.0 offered no way a user could decide what copy
constructor to run when an object is duplicated. During
duplication, the Zend Engine 1.0 did a bitwise copy making an
identical replica of all the object's properties.
Creating a copy of an object with fully replicated properties is
not always the wanted behavior. A good example of the need for
copy constructors, is if you have an object which represents a
GTK window and the object holds the resource of this GTK window,
when you create a duplicate you might want to create a new
window with the same properties and have the new object hold the
resource of the new window. Another example is if your object
holds a reference to another object which it uses and when you
replicate the parent object you want to create a new instance of
this other object so that the replica has its own separate copy.
An object copy is created by calling the object's __clone()
method.
Example:
<?php
$copy_of_object = $object->__clone();
?>
When the developer asks to create a new copy of an object, the
Zend Engine will check if a __clone() method has been defined or
not. If not, it will call a default __clone() which will copy
all of the object's properties. If a __clone() method is
defined, then it will be responsible to set the necessary
properties in the created object. For convenience, the engine
will supply a function that imports all of the properties from
the source object, so that they can start with a by-value
replica of the source object, and only override properties that
need to be changed. [The function hasn't been implemented yet]
Example:
<?php
class MyCloneable {
static $id = 0;
function MyCloneable() {
$this->id = self::$id++;
}
function __clone() {
$this->name = $that->name;
$this->address = 'New York';
$this->id = self::$id++;
}
}
$obj = new MyCloneable();
$obj->name = 'Hello';
$obj->address = 'Tel-Aviv';
print $obj->id . "\n";
$obj = $obj->__clone();
print $obj->id . "\n";
print $obj->name . "\n";
print $obj->address . "\n";
?>
* Nested classes (namespaces).
The Zend Engine 1.0 provided only three scopes: the global
scope, the class scope and the function scope. All scopes but
classes could contain variables, only the class and global
scopes could contain functions, while only the global scope
could contain constants and classes. This means that all of the
Zend Engine 1.0's scoping methods were inherently limited for
solving symbol name collision problems.
The Zend Engine 2.0 introduces the concept of nested classes
to solve the symbol collision problem by making it possible to
define multiple symbol tables able to contain all types of
symbols. The Zend Engine is aware of a current class,
defaulting to the global scope. Each class can contain it's
own set of constants, functions and static variables. In order
to access a class's local symbols you can use the self:: class
accessor, for example, you can do self::$my_static_name = "Hello".
You can also use the class's name such as
MyClass::$my_static_name = "Hello". With both constants and
functions, if you don't specify a class context the current class
will be searched first and if the search fails then the global
scope will be searched. If you want to force PHP to only check the
global scope you can use the main:: accessor. For example,
main::strlen() to make sure you're calling the strlen() in the main
scope. You will only need to worry about this if you are defining
methods which have the same name as global functions. For
constants you can use the same notation such as self::MY_CONSTANT
or main::MY_CONSTANT.
Sometimes you will not want to access constants, functions or classes
via the class accessor (i.e. MyClass::) because you use them very
often and are an extremely slow typist. In this case, you can import
functions, classes and constants from classes with the import keyword.
It's quite self explanatory and there are a few examples below.
* Classes may contain classes.
Example:
<?php
class DB::MySQL {
var $host = '';
function db_connect($user) {
print "Connecting to MySQL database '$this->host' as $user\n";
}
}
class DB::Oracle {
var $host = 'localhost';
function db_connect($user) {
print "Connecting to Oracle database '$this->host' as $user\n";
}
}
$MySQL_obj = new DB::MySQL();
$MySQL_obj->db_connect('Susan');
$Oracle_obj = new DB::Oracle();
$Oracle_obj->db_connect('Barbara');
?>
* Classes may contain constants.
Example:
<?php
class foo {
const hey = 'hello';
}
print foo::hey;
?>
* Current namespace's symbol tables are searched first for
constants and functions.
Example:
The following code prints "foobar", not "foo", because
the class constant overrides the "global" constant of
the same name.
<?php
define('foo', 'bar');
class FooClass {
const foo = 'foobar';
function printFoo() {
print foo;
}
}
?>
* In the scope of a function, the current namespace is that
of the containing class/namespace.
Example:
<?php
class FooClass {
function foo() {
$this->bar();
bar();
}
function bar() {
print "foobar\n";
}
}
$obj = new FooClass;
$obj->foo();
$obj->foo();
?>
This prints "foobar" two times, since a bar() method exists
in the current namespace.
* It is possible to "import" symbols from one namespace into
another.
Example:
<?php
class MyClass {
class MyClass2 {
function hello() {
print "Hello, World in MyClass2\n";
}
}
function hello() {
print "Hello, World\n";
}
}
import function hello, class MyClass2 from MyClass;
MyClass2::hello();
hello();
?>
Example:
<?php
class MyOuterClass {
class MyInnerClass {
function func1() {
print "func1()\n";
}
function func2() {
print "func2()\n";
}
}
}
import class * from MyOuterClass;
import function func2 from MyOuterClass::MyInnerClass;
MyInnerClass::func1();
func2();
?>
Example:
<?php
class MyOuterClass {
const Hello = "Hello, World\n";
}
import const Hello from MyOuterClass;
print Hello;
?>
Old code that does not take advantage of namespaces will run
without modifications.
* Unified Constructors.
The Zend Engine allows developers to declare constructor methods
for classes. Classes which have a constructor method call this
method on each newly-created object, so it is suitable for any
initialization that the object may need before it can be used.
With the Zend Engine 1.0, constructor methods were class methods
that had the same name as the class itself. Since it is very
common to call parent constructors from derived classes, the way
the Zend Engine 1.0 worked made it a bit cumbersome to move
classes around in a large class hierarchy. If a class is moved
to reside under a different parent, the constructor name of that
parent changes as well, and the code in the derived class that
calls the parent constructor has to be modified.
The Zend Engine 2.0 introduces a standard way of declaring
constructor methods by calling them by the name __construct().
Example:
<?php
class BaseClass {
function __construct() {
print "In BaseClass constructor\n";
}
}
class SubClass extends BaseClass {
function __construct() {
parent::__construct();
print "In SubClass constructor\n";
}
}
$obj = new BaseClass();
$obj = new SubClass();
?>
For backwards compatibility, if the Zend Engine 2.0 cannot find
a __construct() function for a given class, it will search for
the old-style constructor function, by the name of the class.
Effectively, it means that the only case that would have
compatibility issues is if the class had a method named
__construct() which was used for different semantics.
* Destructors.
Having the ability to define destructors for objects can be very
useful. Destructors can log messages for debugging, close
database connections and do other clean-up work.
No mechanism for object destructors existed in the Zend Engine
1.0, although PHP had already support for registering functions
which should be run on request shutdown.
The Zend Engine 2.0 introduces a destructor concept similar to
that of other object-oriented languages, such as Java: When the
last reference to an object is destroyed the object's
destructor, which is a class method name __destruct() that
recieves no parameters, is called before the object is freed
from memory.
Example:
<?php
class MyDestructableClass {
function __construct() {
print "In constructor\n";
$this->name = 'MyDestructableClass';
}
function __destruct() {
print 'Destroying ' . $this->name . "\n";
}
}
$obj = new MyDestructableClass();
?>
Like constructors, parent destructors will not be called
implicitly by the engine. In order to run a parent destructor,
one would have to explicitly call parent::__destruct() in the
destructor body.
* Exceptions.
The Zend Engine 1.0 had no exception handling. The Zend Engine 2.0
introduces a exception model similar to that of other programming
languages.
Example:
<?php
class MyException {
function __construct($exception) {
$this->exception = $exception;
}
function Display() {
print "MyException: $this->exception\n";
}
}
class MyExceptionFoo extends MyException {
function __construct($exception) {
$this->exception = $exception;
}
function Display() {
print "MyException: $this->exception\n";
}
}
try {
throw new MyExceptionFoo('Hello');
}
catch (MyException $exception) {
$exception->Display();
}
?>
Old code that has no user-defined functions 'catch', 'throw' and
'try' will run without modifications.
* Dereferencing objects returned from functions.
Example:
<?php
class Circle {
function draw() {
print "Circle\n";
}
}
class Square {
function draw() {
print "Square\n";
}
}
function ShapeFactoryMethod($shape) {
switch ($shape) {
case 'Circle': return new Circle();
case 'Square': return new Square();
}
}
ShapeFactoryMethod('Circle')->draw();
ShapeFactoryMethod('Square')->draw();
?>
* Static member variables of static classes can now be
initialized.
Example:
<?php
class foo {
static $my_static = 5;
}
print foo::$my_static;
?>
* Static methods (TBD)
* static function variables
statics are now treated at compile-time which allows developers
to assign variables to statics by reference. This change also
greatly improves their performance but means that indirect
references to statics will not work anymore.
* Parameters that are passed by reference to a function
may now have default values.
Example:
<?php
function my_function(&$var = null) {
if ($var === null) {
die('$var needs to have a value');
}
}
?>
* Built-In Backtracing.
Example:
<?php
$backtrace = debug_backtrace();
foreach ($backtrace as $step) {
if (!empty($step['args'])) {
foreach ($step['args'] as $arg) {
$args = isset($args) ? $args . ', ' : '';
$args .= var_export($arg, true);
}
} else {
$args = '';
}
$args = str_replace(array("\n", ',)'), array('', ')'), $args);
printf(
"%s%s(%s) [%s:%s]\n",
isset($step['class']) ? $step['class'] . '::' : '',
$step['function'],
$args,
$step['file'],
$step['line']
);
}
?>
* __autoload(). TBD.
* Method calls and property accesses can be overloaded
by class methods __call(), __get() and __set().
__get() and __set() Example:
<?php
class Setter {
public $n;
public $x = array('a' => 1, 'b' => 2, 'c' => 3);
function __get($nm) {
print "Getting [$nm]\n";
if(isset($this->x[$nm])) {
$r = $this->x[$nm];
print "Returning: $r\n";
return $r;
} else {
print "Nothing!\n";
}
}
function __set($nm, $val) {
print "Setting [$nm] to $val\n";
if(isset($this->x[$nm])) {
$this->x[$nm] = $val;
print "OK!\n";
} else {
print "Not OK!\n";
}
}
}
$foo = new Setter();
$foo->n = 1;
$foo->a = 100;
$foo->a++;
$foo->z++;
var_dump($foo);
?>
__call() Example:
<?php
class Caller {
var $x = array(1, 2, 3);
function __call($m, $a) {
print "Method $m called:\n";
var_dump($a);
return $this->x;
}
}
$foo = new Caller();
$a = $foo->test(1, '2', 3.4, true);
var_dump($a);
?>
Changes in the Zend Engine 1.0
The Zend Engine was designed from the ground up for increased speed,
reduced memory consumption and more reliable execution. We dare say
it meets all of these goals and does so pretty well. Beyond that,
there are several improvements in the language engine features:
* References support.
$foo = &$a; would make $foo and $a be two names to the same
variable. This works with arrays as well, on either side; e.g.,
$foo = &$a[7]; would make $foo and $a[7] be two names to the
same variable. Changing one would change the other and vice
versa.
* Object overloading support.
This feature allows various OO libraries to use the OO notation
of PHP to access their functionality. Right now, no use is made
of that feature, but we'd have a COM module ready by the time
PHP 4.0 is released. A CORBA module would probably follow.
* include() and eval() are now functions, and not statements.
That means they return a value. The default return value from
include() and eval() is 1, so that you can do if (include())
without further coding. The return value may be changed by
returning a value from the global scope of the included file or
the evaluated string. For example, if 'return 7;' is executed in
the global scope of foo.inc, include('foo.inc') would evaluate
to 7.
* Automatic resource deallocation.
Several people have been bitten by the fact that PHP 3.0 had no
concept of reference counting. The Zend Engine adds full
reference counting for every value in the system, including
resources. As soon as a resource is no longer referenced from
any variable, it is automatically destroyed to save memory and
resources. The most obvious example for the advantage in this is
a loop that has an SQL query inside it, something like '$result
= sql_query(...);'. In PHP 3.0, every iteration resulted in
another SQL result-set allocated in the memory, and all of the
result sets weren't destroyed until the end of the script's
execution. With the Zend Engine, as soon as we overwrite an old
result set with a new one, the old result set which is no longer
referenced, is destroyed.
* Full support for nesting arrays and objects within each other,
in as many levels as you want.
* true and false are now constants of type boolean.
Comparing any other value to them would convert that value to a
boolean first, and conduct the comparison later. That means, for
example, that 5==true would evaluate to true (in PHP 3.0, true
was nothing but a constant for the integer value of 1, so
5==true was identical to 5==1, which was false).
* Runtime binding of function names.
This complex name has a simple explanation - you can now call
functions before they're declared!
* Added here-docs support.
* Added foreach.
Two syntaxes supported:
foreach(array_expr as $val) statement
foreach(array_expr as $key => $val) statement
* A true unset() implementation.
A variable or element that is unset(), is now sent to oblivion
in its entirely, no trace remains from it.
* Output buffering support.
Use ob_start() to begin output buffering, ob_end_flush() to end
buffering and send out the buffered contents, ob_end_clean() to
end buffering without sending the buffered contents, and
ob_get_contents() to retreive the current contents of the output
buffer. Header information (header(), content type, cookies) are
not buffered. By turning on output buffering, you can
effectively send header information all throughout your file,
regardless of whether you've emitted body output or not.
* Full variable reference within quoted strings:
${expr} - full indirect reference support for scalar
variables
{variable} - full variable support
For example:
$foo[5]['bar'] = 'foobar';
print "{$foo[5]["bar"]}"; // would print "foobar"
* Ability to call member functions of other classes from within
member functions or from the global scope.
You can now, for example, override a parent function with a
child function, and call the parent function from it.
* Runtime information for classes (class name, parent, available
functions, etc.).
* Much more efficient syntax highlighter - runs much quicker,
performs more reliably, and generates much tighter HTML.
* A full-featured debugger has been integrated with the language
(supports breakpoints, expression evaluation, step-in/over,
function call backtrace, and more).
The Zend Engine claims 100% compatability with the engine of PHP
3.0, and is shamelessly lying about it. Here's why:
* Static variable initializers only accept scalar values
(in PHP 3.0 they accepted any valid expression). The impact
should be somewhere in between void and non existent, since
initializing a static variable with anything but a simple
static value makes no sense at all.
* The scope of break and continue is local to that of an
include()'d file or an eval()'d string. The impact should
be somewhat smaller of the one above.
* The return statement no longer works from a require()'d file. It
hardly worked in PHP 3.0, so the impact should be fairly small. If
you want this functionality - use include() instead.
* unset() is no longer a function, but a statement.
* The following letter combination is not supported within
encapsulated strings: "{$". If you have a string that includes
this letter combination, for example, print "{$somevar"; (which
printed the letter { and the contents of the variable $somevar in
PHP 3.0), it will result in a parse error with the Zend Engine.
In this case, you would have to change the code to print
"\{$somevar"; This incompatability is due to the full variable
reference within quoted strings feature added in the Zend
Engine.
-510
View File
@@ -1,510 +0,0 @@
# Microsoft Developer Studio Project File - Name="Zend" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=Zend - Win32 Release_inline
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "Zend.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "Zend.mak" CFG="Zend - Win32 Release_inline"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "Zend - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "Zend - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE "Zend - Win32 Release_inline" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "Zend - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDebug" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug" /D "_LIB" /D "Zend_EXPORTS" /D ZEND_DEBUG=0 /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /FR /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x40d /d "NDebug"
# ADD RSC /l 0x40d /d "NDebug"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_Debug" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_Debug" /D "_LIB" /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D ZEND_DEBUG=1 /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c
# ADD BASE RSC /l 0x40d /d "_Debug"
# ADD RSC /l 0x40d /d "_Debug"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
# PROP BASE Use_MFC 0
# PROP BASE Output_Dir "Zend___Win32_Release_inline"
# PROP BASE Intermediate_Dir "Zend___Win32_Release_inline"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Output_Dir "Release_inline"
# PROP Intermediate_Dir "Release_inline"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug" /D "_LIB" /D "Zend_EXPORTS" /D ZEND_DEBUG=0 /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /FR /FD /c
# SUBTRACT BASE CPP /YX
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug" /D "_LIB" /D "Zend_EXPORTS" /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D ZEND_DEBUG=0 /D "ZEND_WIN32_FORCE_INLINE" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /FR /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x40d /d "NDebug"
# ADD RSC /l 0x40d /d "NDebug"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ENDIF
# Begin Target
# Name "Zend - Win32 Release"
# Name "Zend - Win32 Debug"
# Name "Zend - Win32 Release_inline"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\zend.c
# End Source File
# Begin Source File
SOURCE=.\zend_alloc.c
# End Source File
# Begin Source File
SOURCE=.\zend_API.c
# End Source File
# Begin Source File
SOURCE=.\zend_builtin_functions.c
# End Source File
# Begin Source File
SOURCE=.\zend_compile.c
# End Source File
# Begin Source File
SOURCE=.\zend_constants.c
# End Source File
# Begin Source File
SOURCE=.\zend_execute.c
# End Source File
# Begin Source File
SOURCE=.\zend_execute_API.c
# End Source File
# Begin Source File
SOURCE=.\zend_extensions.c
# End Source File
# Begin Source File
SOURCE=.\zend_hash.c
# End Source File
# Begin Source File
SOURCE=.\zend_highlight.c
# End Source File
# Begin Source File
SOURCE=.\zend_indent.c
# End Source File
# Begin Source File
SOURCE=.\zend_ini.c
# End Source File
# Begin Source File
SOURCE=.\zend_ini_parser.c
# End Source File
# Begin Source File
SOURCE=.\zend_ini_scanner.c
# End Source File
# Begin Source File
SOURCE=".\zend_language_parser.c"
# End Source File
# Begin Source File
SOURCE=".\zend_language_scanner.c"
# End Source File
# Begin Source File
SOURCE=.\zend_list.c
# End Source File
# Begin Source File
SOURCE=.\zend_llist.c
# End Source File
# Begin Source File
SOURCE=.\zend_objects.c
# End Source File
# Begin Source File
SOURCE=.\zend_objects_API.c
# End Source File
# Begin Source File
SOURCE=.\zend_opcode.c
# End Source File
# Begin Source File
SOURCE=.\zend_operators.c
# End Source File
# Begin Source File
SOURCE=.\zend_ptr_stack.c
# End Source File
# Begin Source File
SOURCE=.\zend_qsort.c
# End Source File
# Begin Source File
SOURCE=.\zend_sprintf.c
# End Source File
# Begin Source File
SOURCE=.\zend_stack.c
# End Source File
# Begin Source File
SOURCE=.\zend_variables.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\FlexLexer.h
# End Source File
# Begin Source File
SOURCE=.\zend.h
# End Source File
# Begin Source File
SOURCE=.\zend_alloc.h
# End Source File
# Begin Source File
SOURCE=.\zend_API.h
# End Source File
# Begin Source File
SOURCE=.\zend_builtin_functions.h
# End Source File
# Begin Source File
SOURCE=.\zend_compile.h
# End Source File
# Begin Source File
SOURCE=.\zend_config.w32.h
# End Source File
# Begin Source File
SOURCE=.\zend_constants.h
# End Source File
# Begin Source File
SOURCE=.\zend_errors.h
# End Source File
# Begin Source File
SOURCE=.\zend_execute.h
# End Source File
# Begin Source File
SOURCE=.\zend_extensions.h
# End Source File
# Begin Source File
SOURCE=.\zend_fast_cache.h
# End Source File
# Begin Source File
SOURCE=.\zend_globals.h
# End Source File
# Begin Source File
SOURCE=.\zend_hash.h
# End Source File
# Begin Source File
SOURCE=.\zend_highlight.h
# End Source File
# Begin Source File
SOURCE=.\zend_indent.h
# End Source File
# Begin Source File
SOURCE=.\zend_ini.h
# End Source File
# Begin Source File
SOURCE=".\zend_language_parser.h"
# End Source File
# Begin Source File
SOURCE=".\zend_language_scanner.h"
# End Source File
# Begin Source File
SOURCE=.\zend_list.h
# End Source File
# Begin Source File
SOURCE=.\zend_llist.h
# End Source File
# Begin Source File
SOURCE=.\zend_modules.h
# End Source File
# Begin Source File
SOURCE=.\zend_operators.h
# End Source File
# Begin Source File
SOURCE=.\zend_ptr_stack.h
# End Source File
# Begin Source File
SOURCE=.\zend_qsort.h
# End Source File
# Begin Source File
SOURCE=.\zend_stack.h
# End Source File
# Begin Source File
SOURCE=.\zend_variables.h
# End Source File
# End Group
# Begin Group "Parsers"
# PROP Default_Filter "y"
# Begin Source File
SOURCE=.\zend_ini_parser.y
!IF "$(CFG)" == "Zend - Win32 Release"
!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
# Begin Custom Build
InputDir=.
InputPath=.\zend_ini_parser.y
BuildCmds= \
bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y
"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend_ini_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
!ENDIF
# End Source File
# Begin Source File
SOURCE=".\zend_language_parser.y"
!IF "$(CFG)" == "Zend - Win32 Release"
# Begin Custom Build
InputDir=.
InputPath=".\zend_language_parser.y"
BuildCmds= \
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
# Begin Custom Build
InputDir=.
InputPath=".\zend_language_parser.y"
BuildCmds= \
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
# Begin Custom Build
InputDir=.
InputPath=".\zend_language_parser.y"
BuildCmds= \
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ENDIF
# End Source File
# End Group
# Begin Group "Scanners"
# PROP Default_Filter "l"
# Begin Source File
SOURCE=.\flex.skl
# End Source File
# Begin Source File
SOURCE=.\zend_ini_scanner.l
!IF "$(CFG)" == "Zend - Win32 Release"
!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
# Begin Custom Build
InputPath=.\zend_ini_scanner.l
"zend_ini_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.c zend_ini_scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
!ENDIF
# End Source File
# Begin Source File
SOURCE=".\zend_language_scanner.l"
!IF "$(CFG)" == "Zend - Win32 Release"
# Begin Custom Build
InputPath=".\zend_language_scanner.l"
"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -i -Pzend -ozend_language_scanner.c zend_language_scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
# Begin Custom Build
InputPath=".\zend_language_scanner.l"
"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -i -Pzend -ozend_language_scanner.c zend_language_scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
# Begin Custom Build
InputPath=".\zend_language_scanner.l"
"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -i -Pzend -ozend_language_scanner.c zend_language_scanner.l
# End Custom Build
!ENDIF
# End Source File
# End Group
# Begin Group "Text Files"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\ZEND_BUGS
# End Source File
# Begin Source File
SOURCE=.\ZEND_CHANGES
# End Source File
# Begin Source File
SOURCE=.\ZEND_TODO
# End Source File
# End Group
# Begin Group "Resources"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\zend.ico
# End Source File
# End Group
# End Target
# End Project
-232
View File
@@ -1,232 +0,0 @@
dnl
dnl $Id$
dnl
dnl This file contains Zend specific autoconf functions.
dnl
AC_DEFUN(LIBZEND_BISON_CHECK,[
if test "$YACC" != "bison -y"; then
AC_MSG_WARN(You will need bison if you want to regenerate the Zend parser.)
else
AC_MSG_CHECKING(bison version)
set `bison --version| grep 'GNU Bison' | cut -d ' ' -f 4 | sed -e 's/\./ /'`
if test "${1}" = "1" -a "${2}" -lt "28"; then
AC_MSG_WARN(You will need bison 1.28 if you want to regenerate the Zend parser (found ${1}.${2}).)
fi
AC_MSG_RESULT(${1}.${2} (ok))
fi
])
AC_DEFUN(LIBZEND_BASIC_CHECKS,[
AC_REQUIRE([AC_PROG_YACC])
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_PROG_CC_C_O])
AC_REQUIRE([AC_PROG_LEX])
AC_REQUIRE([AC_HEADER_STDC])
AC_REQUIRE([AC_PROG_LIBTOOL])
LIBZEND_BISON_CHECK
dnl Ugly hack to get around a problem with gcc on AIX.
if test "$CC" = "gcc" -a "$ac_cv_prog_cc_g" = "yes" -a \
"`uname -sv`" = "AIX 4"; then
CFLAGS=`echo $CFLAGS | sed -e 's/-g//'`
fi
dnl Hack to work around a Mac OS X cpp problem
dnl Known versions needing this workaround are 5.3 and 5.4
if test "$ac_cv_prog_gcc" = "yes" -a "`uname -s`" = "Rhapsody"; then
CPPFLAGS="$CPPFLAGS -traditional-cpp"
fi
AC_CHECK_HEADERS(
limits.h \
malloc.h \
string.h \
unistd.h \
stdarg.h \
sys/types.h \
sys/time.h \
signal.h \
unix.h \
dlfcn.h)
AC_TYPE_SIZE_T
AC_TYPE_SIGNAL
AC_CHECK_LIB(dl, dlopen, [LIBS="-ldl $LIBS"])
AC_CHECK_FUNC(dlopen,[AC_DEFINE(HAVE_LIBDL, 1,[ ])])
dnl
dnl Ugly hack to check if dlsym() requires a leading underscore in symbol name.
dnl
AC_MSG_CHECKING([whether dlsym() requires a leading underscore in symbol names])
_LT_AC_TRY_DLOPEN_SELF([
AC_MSG_RESULT(no)
], [
AC_MSG_RESULT(yes)
AC_DEFINE(DLSYM_NEEDS_UNDERSCORE, 1, [Define if dlsym() requires a leading underscore in symbol names. ])
], [
AC_MSG_RESULT(no)
], [])
dnl This is required for QNX and may be some BSD derived systems
AC_CHECK_TYPE( uint, unsigned int )
AC_CHECK_TYPE( ulong, unsigned long )
dnl Checks for library functions.
AC_FUNC_VPRINTF
AC_FUNC_MEMCMP
AC_FUNC_ALLOCA
AC_CHECK_FUNCS(memcpy strdup getpid kill strtod strtol finite fpclass)
AC_ZEND_BROKEN_SPRINTF
AC_CHECK_FUNCS(finite isfinite isinf isnan)
ZEND_FP_EXCEPT
])
AC_DEFUN(LIBZEND_ENABLE_DEBUG,[
AC_ARG_ENABLE(debug,
[ --enable-debug Compile with debugging symbols],[
ZEND_DEBUG=$enableval
],[
ZEND_DEBUG=no
])
])
AC_DEFUN(LIBZEND_OTHER_CHECKS,[
AC_ARG_ENABLE(experimental-zts,
[ --enable-experimental-zts This will most likely break your build],[
ZEND_EXPERIMENTAL_ZTS=$enableval
],[
ZEND_EXPERIMENTAL_ZTS=no
])
AC_ARG_ENABLE(inline-optimization,
[ --disable-inline-optimization If building zend_execute.lo fails, try
this switch.],[
ZEND_INLINE_OPTIMIZATION=$enableval
],[
ZEND_INLINE_OPTIMIZATION=yes
])
AC_ARG_ENABLE(memory-limit,
[ --enable-memory-limit Compile with memory limit support. ], [
ZEND_MEMORY_LIMIT=$enableval
],[
ZEND_MEMORY_LIMIT=no
])
AC_MSG_CHECKING(whether to enable thread-safety)
AC_MSG_RESULT($ZEND_EXPERIMENTAL_ZTS)
AC_MSG_CHECKING(whether to enable inline optimization for GCC)
AC_MSG_RESULT($ZEND_INLINE_OPTIMIZATION)
AC_MSG_CHECKING(whether to enable a memory limit)
AC_MSG_RESULT($ZEND_MEMORY_LIMIT)
AC_MSG_CHECKING(whether to enable Zend debugging)
AC_MSG_RESULT($ZEND_DEBUG)
if test "$ZEND_DEBUG" = "yes"; then
AC_DEFINE(ZEND_DEBUG,1,[ ])
echo " $CFLAGS" | grep ' -g' >/dev/null || DEBUG_CFLAGS="-g"
if test "$CFLAGS" = "-g -O2"; then
CFLAGS=-g
fi
test -n "$GCC" && DEBUG_CFLAGS="$DEBUG_CFLAGS -Wall"
test -n "$GCC" && test "$USE_MAINTAINER_MODE" = "yes" && \
DEBUG_CFLAGS="$DEBUG_CFLAGS -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations"
else
AC_DEFINE(ZEND_DEBUG,0,[ ])
fi
test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLAGS $DEBUG_CFLAGS"
if test "$ZEND_EXPERIMENTAL_ZTS" = "yes"; then
AC_DEFINE(ZTS,1,[ ])
CFLAGS="$CFLAGS -DZTS"
LIBZEND_CPLUSPLUS_CHECKS
fi
if test "$ZEND_MEMORY_LIMIT" = "yes"; then
AC_DEFINE(MEMORY_LIMIT, 1, [Memory limit])
else
AC_DEFINE(MEMORY_LIMIT, 0, [Memory limit])
fi
changequote({,})
if test -n "$GCC" && test "$ZEND_INLINE_OPTIMIZATION" != "yes"; then
INLINE_CFLAGS=`echo $ac_n "$CFLAGS $ac_c" | sed s/-O[0-9s]*//`
else
INLINE_CFLAGS="$CFLAGS"
fi
changequote([,])
AC_C_INLINE
AC_SUBST(INLINE_CFLAGS)
dnl test and set the alignment define for ZEND_MM
dnl this also does the logarithmic test for ZEND_MM.
AC_MSG_CHECKING(for MM alignment and log values)
AC_TRY_RUN([
#include <stdio.h>
typedef union _mm_align_test {
void *ptr;
double dbl;
long lng;
} mm_align_test;
#if (defined (__GNUC__) && __GNUC__ >= 2)
#define ZEND_MM_ALIGNMENT (__alignof__ (mm_align_test))
#else
#define ZEND_MM_ALIGNMENT (sizeof(mm_align_test))
#endif
int main()
{
int i = ZEND_MM_ALIGNMENT;
int zeros = 0;
FILE *fp;
while (i & ~0x1) {
zeros++;
i = i >> 1;
}
fp = fopen("conftest.zend", "w");
fprintf(fp, "%d %d\n", ZEND_MM_ALIGNMENT, zeros);
fclose(fp);
exit(0);
}
], [
LIBZEND_MM_ALIGN=`cat conftest.zend | cut -d ' ' -f 1`
LIBZEND_MM_ALIGN_LOG2=`cat conftest.zend | cut -d ' ' -f 2`
AC_DEFINE_UNQUOTED(ZEND_MM_ALIGNMENT, $LIBZEND_MM_ALIGN, [ ])
AC_DEFINE_UNQUOTED(ZEND_MM_ALIGNMENT_LOG2, $LIBZEND_MM_ALIGN_LOG2, [ ])
])
AC_MSG_RESULT(done)
])
AC_DEFUN(LIBZEND_CPLUSPLUS_CHECKS,[
])
-258
View File
@@ -1,258 +0,0 @@
# Microsoft Developer Studio Generated Dependency File, included by ZendCore.mak
.\zend_alloc.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_compile.h"\
".\zend_config.w32.h"\
".\zend_execute.h"\
".\zend_llist.h"\
".\zend_ptr_stack.h"\
".\zend_stack.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_globals.h"\
".\zend_hash.h"\
.\alloca.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_config.w32.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_hash.h"\
.\zend_compile.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_compile.h"\
".\zend_config.w32.h"\
".\zend_execute.h"\
".\zend_llist.h"\
".\zend_modules.h"\
".\zend_operators.h"\
".\zend_ptr_stack.h"\
".\zend_stack.h"\
".\zend_variables.h"\
".\zend.h"\
".\zend_API.h"\
".\zend_errors.h"\
".\zend_globals.h"\
".\zend_hash.h"\
".\zend_ini.h"\
.\zend_constants.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_config.w32.h"\
".\zend_constants.h"\
".\zend_operators.h"\
".\zend_variables.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_hash.h"\
.\zend_execute.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_compile.h"\
".\zend_config.w32.h"\
".\zend_constants.h"\
".\zend_execute.h"\
".\zend_llist.h"\
".\zend_modules.h"\
".\zend_operators.h"\
".\zend_ptr_stack.h"\
".\zend_stack.h"\
".\zend_variables.h"\
".\zend.h"\
".\zend_API.h"\
".\zend_errors.h"\
".\zend_globals.h"\
".\zend_hash.h"\
".\zend_ini.h"\
.\zend_highlight.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_compile.h"\
".\zend_config.w32.h"\
".\zend_execute.h"\
".\zend_highlight.h"\
".\zend_llist.h"\
".\zend_ptr_stack.h"\
".\zend_stack.h"\
".\zend_language_parser.tab.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_globals.h"\
".\zend_hash.h"\
.\zend_llist.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_config.w32.h"\
".\zend_llist.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_hash.h"\
.\zend_opcode.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_compile.h"\
".\zend_config.w32.h"\
".\zend_execute.h"\
".\zend_llist.h"\
".\zend_modules.h"\
".\zend_operators.h"\
".\zend_ptr_stack.h"\
".\zend_stack.h"\
".\zend_variables.h"\
".\zend.h"\
".\zend_API.h"\
".\zend_errors.h"\
".\zend_globals.h"\
".\zend_hash.h"\
".\zend_ini.h"\
.\zend_operators.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_compile.h"\
".\zend_config.w32.h"\
".\zend_execute.h"\
".\zend_llist.h"\
".\zend_operators.h"\
".\zend_ptr_stack.h"\
".\zend_stack.h"\
".\zend_variables.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_globals.h"\
".\zend_hash.h"\
.\zend_ptr_stack.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_config.w32.h"\
".\zend_ptr_stack.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_hash.h"\
.\zend_stack.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_config.w32.h"\
".\zend_stack.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_hash.h"\
.\zend_variables.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_compile.h"\
".\zend_config.w32.h"\
".\zend_constants.h"\
".\zend_execute.h"\
".\zend_llist.h"\
".\zend_modules.h"\
".\zend_ptr_stack.h"\
".\zend_stack.h"\
".\zend_variables.h"\
".\zend.h"\
".\zend_API.h"\
".\zend_errors.h"\
".\zend_globals.h"\
".\zend_hash.h"\
".\zend_ini.h"\
".\zend_list.h"\
.\zend.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_config.w32.h"\
".\zend_operators.h"\
".\zend_variables.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_hash.h"\
.\zend_API.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_compile.h"\
".\zend_config.w32.h"\
".\zend_constants.h"\
".\zend_execute.h"\
".\zend_llist.h"\
".\zend_modules.h"\
".\zend_operators.h"\
".\zend_ptr_stack.h"\
".\zend_stack.h"\
".\zend_variables.h"\
".\zend.h"\
".\zend_API.h"\
".\zend_errors.h"\
".\zend_globals.h"\
".\zend_hash.h"\
".\zend_ini.h"\
".\zend_list.h"\
.\zend_hash.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_config.w32.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_hash.h"\
.\zend_ini.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_config.w32.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_hash.h"\
".\zend_ini.h"\
!IF "$(CFG)" == "ZendCore - Win32 Release"
!ELSEIF "$(CFG)" == "ZendCore - Win32 Debug"
!ENDIF
!IF "$(CFG)" == "ZendCore - Win32 Release"
!ELSEIF "$(CFG)" == "ZendCore - Win32 Debug"
!ENDIF
!IF "$(CFG)" == "ZendCore - Win32 Release"
!ELSEIF "$(CFG)" == "ZendCore - Win32 Debug"
!ENDIF
!IF "$(CFG)" == "ZendCore - Win32 Release"
!ELSEIF "$(CFG)" == "ZendCore - Win32 Debug"
!ENDIF
-691
View File
@@ -1,691 +0,0 @@
# Microsoft Developer Studio Project File - Name="ZendTS" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=ZendTS - Win32 Release_TSDbg
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "ZendTS.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "ZendTS.mak" CFG="ZendTS - Win32 Release_TSDbg"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "ZendTS - Win32 Release_TS" (based on "Win32 (x86) Static Library")
!MESSAGE "ZendTS - Win32 Debug_TS" (based on "Win32 (x86) Static Library")
!MESSAGE "ZendTS - Win32 Release_TS_inline" (based on "Win32 (x86) Static Library")
!MESSAGE "ZendTS - Win32 Release_TSDbg" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
# PROP BASE Use_MFC 0
# PROP BASE Output_Dir "Release_TS"
# PROP BASE Intermediate_Dir "Release_TS"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Output_Dir "Release_TS"
# PROP Intermediate_Dir "Release_TS"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDebug_TS" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x40d /d "NDebug_TS"
# ADD RSC /l 0x40d /d "NDebug_TS"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
# PROP BASE Use_MFC 0
# PROP BASE Output_Dir "Debug_TS"
# PROP BASE Intermediate_Dir "Debug_TS"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Output_Dir "Debug_TS"
# PROP Intermediate_Dir "Debug_TS"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_Debug_TS" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_Debug_TS" /D ZEND_DEBUG=1 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c
# ADD BASE RSC /l 0x40d /d "_Debug_TS"
# ADD RSC /l 0x40d /d "_Debug_TS"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TS_inline"
# PROP BASE Use_MFC 0
# PROP BASE Output_Dir "ZendTS___Win32_Release_TS_inline"
# PROP BASE Intermediate_Dir "ZendTS___Win32_Release_TS_inline"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Output_Dir "Release_TS_inline"
# PROP Intermediate_Dir "Release_TS_inline"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "WIN32" /D "_MBCS" /D ZEND_DEBUG=0 /FR /FD /c
# SUBTRACT BASE CPP /YX
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D "ZEND_WIN32_FORCE_INLINE" /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x40d /d "NDebug_TS"
# ADD RSC /l 0x40d /d "NDebug_TS"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
# PROP BASE Use_MFC 0
# PROP BASE Output_Dir "ZendTS___Win32_Release_TSDbg"
# PROP BASE Intermediate_Dir "ZendTS___Win32_Release_TSDbg"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Output_Dir "Release_TSDbg"
# PROP Intermediate_Dir "Release_TSDbg"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
# SUBTRACT BASE CPP /YX
# ADD CPP /nologo /MD /W3 /GX /Zi /Od /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x40d /d "NDebug_TS"
# ADD RSC /l 0x40d /d "NDebug_TS"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ENDIF
# Begin Target
# Name "ZendTS - Win32 Release_TS"
# Name "ZendTS - Win32 Debug_TS"
# Name "ZendTS - Win32 Release_TS_inline"
# Name "ZendTS - Win32 Release_TSDbg"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\zend.c
# End Source File
# Begin Source File
SOURCE=.\zend_alloc.c
# End Source File
# Begin Source File
SOURCE=.\zend_API.c
# End Source File
# Begin Source File
SOURCE=.\zend_builtin_functions.c
# End Source File
# Begin Source File
SOURCE=.\zend_compile.c
# End Source File
# Begin Source File
SOURCE=.\zend_constants.c
# End Source File
# Begin Source File
SOURCE=.\zend_dynamic_array.c
# End Source File
# Begin Source File
SOURCE=.\zend_execute.c
# End Source File
# Begin Source File
SOURCE=.\zend_execute_API.c
# End Source File
# Begin Source File
SOURCE=.\zend_extensions.c
# End Source File
# Begin Source File
SOURCE=.\zend_hash.c
# End Source File
# Begin Source File
SOURCE=.\zend_highlight.c
# End Source File
# Begin Source File
SOURCE=.\zend_indent.c
# End Source File
# Begin Source File
SOURCE=.\zend_ini.c
# End Source File
# Begin Source File
SOURCE=.\zend_ini_parser.c
# End Source File
# Begin Source File
SOURCE=.\zend_ini_scanner.c
# End Source File
# Begin Source File
SOURCE=".\zend_language_parser.c"
# End Source File
# Begin Source File
SOURCE=".\zend_language_scanner.c"
# End Source File
# Begin Source File
SOURCE=.\zend_list.c
# End Source File
# Begin Source File
SOURCE=.\zend_llist.c
# End Source File
# Begin Source File
SOURCE=.\zend_mm.c
# End Source File
# Begin Source File
SOURCE=.\zend_object_handlers.c
# End Source File
# Begin Source File
SOURCE=.\zend_objects.c
# End Source File
# Begin Source File
SOURCE=.\zend_objects_API.c
# End Source File
# Begin Source File
SOURCE=.\zend_opcode.c
# End Source File
# Begin Source File
SOURCE=.\zend_operators.c
# End Source File
# Begin Source File
SOURCE=.\zend_ptr_stack.c
# End Source File
# Begin Source File
SOURCE=.\zend_qsort.c
# End Source File
# Begin Source File
SOURCE=.\zend_sprintf.c
# End Source File
# Begin Source File
SOURCE=.\zend_stack.c
# End Source File
# Begin Source File
SOURCE=.\zend_ts_hash.c
# End Source File
# Begin Source File
SOURCE=.\zend_variables.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\FlexLexer.h
# End Source File
# Begin Source File
SOURCE=.\zend.h
# End Source File
# Begin Source File
SOURCE=.\zend_alloc.h
# End Source File
# Begin Source File
SOURCE=.\zend_API.h
# End Source File
# Begin Source File
SOURCE=.\zend_builtin_functions.h
# End Source File
# Begin Source File
SOURCE=.\zend_compile.h
# End Source File
# Begin Source File
SOURCE=.\zend_config.w32.h
# End Source File
# Begin Source File
SOURCE=.\zend_constants.h
# End Source File
# Begin Source File
SOURCE=.\zend_dynamic_array.h
# End Source File
# Begin Source File
SOURCE=.\zend_errors.h
# End Source File
# Begin Source File
SOURCE=.\zend_execute.h
# End Source File
# Begin Source File
SOURCE=.\zend_execute_locks.h
# End Source File
# Begin Source File
SOURCE=.\zend_extensions.h
# End Source File
# Begin Source File
SOURCE=.\zend_fast_cache.h
# End Source File
# Begin Source File
SOURCE=.\zend_globals.h
# End Source File
# Begin Source File
SOURCE=.\zend_globals_macros.h
# End Source File
# Begin Source File
SOURCE=.\zend_hash.h
# End Source File
# Begin Source File
SOURCE=.\zend_highlight.h
# End Source File
# Begin Source File
SOURCE=.\zend_indent.h
# End Source File
# Begin Source File
SOURCE=.\zend_ini.h
# End Source File
# Begin Source File
SOURCE=.\zend_ini_parser.h
# End Source File
# Begin Source File
SOURCE=.\zend_ini_scanner.h
# End Source File
# Begin Source File
SOURCE=.\zend_istdiostream.h
# End Source File
# Begin Source File
SOURCE=".\zend_language_parser.h"
# End Source File
# Begin Source File
SOURCE=".\zend_language_scanner.h"
# End Source File
# Begin Source File
SOURCE=.\zend_list.h
# End Source File
# Begin Source File
SOURCE=.\zend_llist.h
# End Source File
# Begin Source File
SOURCE=.\zend_mm.h
# End Source File
# Begin Source File
SOURCE=.\zend_modules.h
# End Source File
# Begin Source File
SOURCE=.\zend_object_handlers.h
# End Source File
# Begin Source File
SOURCE=.\zend_objects.h
# End Source File
# Begin Source File
SOURCE=.\zend_objects_API.h
# End Source File
# Begin Source File
SOURCE=.\zend_operators.h
# End Source File
# Begin Source File
SOURCE=.\zend_ptr_stack.h
# End Source File
# Begin Source File
SOURCE=.\zend_qsort.h
# End Source File
# Begin Source File
SOURCE=.\zend_stack.h
# End Source File
# Begin Source File
SOURCE=.\zend_ts_hash.h
# End Source File
# Begin Source File
SOURCE=.\zend_variables.h
# End Source File
# End Group
# Begin Group "Parsers"
# PROP Default_Filter "y"
# Begin Source File
SOURCE=.\zend_ini_parser.y
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
# Begin Custom Build
InputDir=.
InputPath=.\zend_ini_parser.y
BuildCmds= \
bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y
"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend_ini_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
# Begin Custom Build
InputDir=.
InputPath=.\zend_ini_parser.y
BuildCmds= \
bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y
"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend_ini_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TS_inline"
# Begin Custom Build
InputDir=.
InputPath=.\zend_ini_parser.y
BuildCmds= \
bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y
"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend_ini_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
# Begin Custom Build
InputDir=.
InputPath=.\zend_ini_parser.y
BuildCmds= \
bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y
"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend_ini_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ENDIF
# End Source File
# Begin Source File
SOURCE=".\zend_language_parser.y"
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
# Begin Custom Build
InputDir=.
InputPath=".\zend_language_parser.y"
BuildCmds= \
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
# Begin Custom Build
InputDir=.
InputPath=".\zend_language_parser.y"
BuildCmds= \
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TS_inline"
# Begin Custom Build
InputDir=.
InputPath=".\zend_language_parser.y"
BuildCmds= \
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
# Begin Custom Build
InputDir=.
InputPath=".\zend_language_parser.y"
BuildCmds= \
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ENDIF
# End Source File
# End Group
# Begin Group "Scanners"
# PROP Default_Filter "l"
# Begin Source File
SOURCE=.\flex.skl
# End Source File
# Begin Source File
SOURCE=.\zend_ini_scanner.l
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
# Begin Custom Build
InputPath=.\zend_ini_scanner.l
"zend_ini_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.c zend_ini_scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
# Begin Custom Build
InputPath=.\zend_ini_scanner.l
"zend_ini_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.c zend_ini_scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TS_inline"
# Begin Custom Build
InputPath=.\zend_ini_scanner.l
"zend_ini_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.c zend_ini_scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
# Begin Custom Build
InputPath=.\zend_ini_scanner.l
"zend_ini_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.c zend_ini_scanner.l
# End Custom Build
!ENDIF
# End Source File
# Begin Source File
SOURCE=".\zend_language_scanner.l"
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
# Begin Custom Build
InputPath=".\zend_language_scanner.l"
"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -B -i -Sflex.skl -Pzend -ozend_language_scanner.c zend_language_scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
# Begin Custom Build
InputPath=".\zend_language_scanner.l"
"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -B -i -Sflex.skl -Pzend -ozend_language_scanner.c zend_language_scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TS_inline"
# Begin Custom Build
InputPath=".\zend_language_scanner.l"
"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -B -i -Sflex.skl -Pzend -ozend_language_scanner.c zend_language_scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
# Begin Custom Build
InputPath=".\zend_language_scanner.l"
"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -B -i -Sflex.skl -Pzend -ozend_language_scanner.c zend_language_scanner.l
# End Custom Build
!ENDIF
# End Source File
# End Group
# Begin Group "Text Files"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\LICENSE
# End Source File
# Begin Source File
SOURCE=.\ZEND_BUGS
# End Source File
# Begin Source File
SOURCE=.\ZEND_CHANGES
# End Source File
# End Group
# Begin Group "Resources"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\zend.ico
# End Source File
# End Group
# End Target
# End Project
-81
View File
@@ -1,81 +0,0 @@
#define ZEND_API
#define ZEND_DLEXPORT
#define ZEND_DLIMPORT
#ifndef NETWARE
@TOP@
#endif
#undef uint
#undef ulong
/* Define if you want to enable memory limit support */
#define MEMORY_LIMIT 0
#ifndef NETWARE
@BOTTOM@
#endif
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_IEEEFP_H
# include <ieeefp.h>
#endif
#ifdef HAVE_STRING_H
# include <string.h>
#else
# include <strings.h>
#endif
#if ZEND_BROKEN_SPRINTF
int zend_sprintf(char *buffer, const char *format, ...);
#else
# define zend_sprintf sprintf
#endif
#include <math.h>
#ifdef HAVE_ISNAN
#define zend_isnan(a) isnan(a)
#elif defined(NAN)
#define zend_isnan(a) (((a)==NAN)?1:0)
#elif defined(HAVE_FPCLASS)
#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
#else
#define zend_isnan(a) 0
#endif
#ifdef HAVE_ISINF
#define zend_isinf(a) isinf(a)
#elif defined(INFINITY)
/* Might not work, but is required by ISO C99 */
#define zend_isinf(a) (((a)==INFINITY)?1:0)
#elif defined(HAVE_FPCLASS)
#define zend_isinf(a) ((fpclass(a) == FP_PINF) || (fpclass(a) == FP_NINF))
#else
#define zend_isinf(a) 0
#endif
#ifdef HAVE_FINITE
#define zend_finite(a) finite(a)
#elif defined(HAVE_ISFINITE) || defined(isfinite)
#define zend_finite(a) isfinite(a)
#elif defined(fpclassify)
#define zend_finite(a) ((fpclassify((a))!=FP_INFINITE&&fpclassify((a))!=FP_NAN)?1:0)
#else
#define zend_finite(a) (zend_isnan(a) ? 0 : zend_isinf(a) ? 0 : 1)
#endif
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
-47
View File
@@ -1,47 +0,0 @@
dnl $Id$
dnl
dnl This file contains local autoconf functions.
AC_DEFUN(ZEND_FP_EXCEPT,[
AC_CACHE_CHECK(whether fp_except is defined, ac_cv_type_fp_except,[
AC_TRY_COMPILE([
#include <floatingpoint.h>
],[
fp_except x = (fp_except) 0;
],[
ac_cv_type_fp_except=yes
],[
ac_cv_type_fp_except=no
],[
ac_cv_type_fp_except=no
])])
if test "$ac_cv_type_fp_except" = "yes"; then
AC_DEFINE(HAVE_FP_EXCEPT, 1, [whether floatingpoint.h defines fp_except])
fi
])
dnl
dnl Check for broken sprintf()
dnl
AC_DEFUN(AC_ZEND_BROKEN_SPRINTF,[
AC_CACHE_CHECK(whether sprintf is broken, ac_cv_broken_sprintf,[
AC_TRY_RUN([main() {char buf[20];exit(sprintf(buf,"testing 123")!=11); }],[
ac_cv_broken_sprintf=no
],[
ac_cv_broken_sprintf=yes
],[
ac_cv_broken_sprintf=no
])
])
if test "$ac_cv_broken_sprintf" = "yes"; then
ac_result=1
else
ac_result=0
fi
AC_DEFINE_UNQUOTED(ZEND_BROKEN_SPRINTF, $ac_result, [Whether sprintf is broken])
])
AC_DEFUN(AM_SET_LIBTOOL_VARIABLE,[
LIBTOOL='$(SHELL) $(top_builddir)/libtool $1'
])
-43
View File
@@ -1,43 +0,0 @@
# Makefile to generate build tools
#
# Standard usage:
# make -f build.mk
#
# Written by Sascha Schumann
#
# $Id$
LT_TARGETS = ltmain.sh ltconfig
config_h_in = zend_config.h.in
makefile_am_files = Makefile.am
makefile_in_files = $(makefile_am_files:.am=.in)
makefile_files = $(makefile_am_files:e.am=e)
targets = $(makefile_in_files) $(LT_TARGETS) configure $(config_h_in)
all: $(targets)
clean:
rm -f $(targets)
$(LT_TARGETS):
rm -f $(LT_TARGETS)
libtoolize --automake $(AMFLAGS) -f
$(makefile_in_files): $(makefile_am_files)
automake -a -i $(AMFLAGS) $(makefile_files)
aclocal.m4: configure.in acinclude.m4
aclocal
$(config_h_in): configure.in acconfig.h
# explicitly remove target since autoheader does not seem to work
# correctly otherwise (timestamps are not updated)
@rm -f $@
autoheader
configure: aclocal.m4 configure.in
autoconf
-33
View File
@@ -1,33 +0,0 @@
#!/bin/sh
case "$1" in
--copy)
automake_flags=--copy
shift
;;
esac
libtoolize --force --automake $automake_flags
mv aclocal.m4 aclocal.m4.old 2>/dev/null
aclocal
if cmp aclocal.m4.old aclocal.m4 > /dev/null 2>&1; then
echo "buildconf: keeping ${1}aclocal.m4"
mv aclocal.m4.old aclocal.m4
else
echo "buildconf: created or modified ${1}aclocal.m4"
fi
autoheader
automake --add-missing --include-deps $automake_flags
mv configure configure.old 2>/dev/null
autoconf
if cmp configure.old configure > /dev/null 2>&1; then
echo "buildconf: keeping ${1}configure"
mv configure.old configure
else
echo "buildconf: created or modified ${1}configure"
fi
-45
View File
@@ -1,45 +0,0 @@
dnl $Id$
dnl Process this file with autoconf to produce a configure script.
AC_INIT(zend.c)
AM_INIT_AUTOMAKE(zend, 0.80A, nodefine)
AM_CONFIG_HEADER(zend_config.h)
AM_SANITY_CHECK
AM_MAINTAINER_MODE
AC_PROG_CC
AM_PROG_LEX
AM_PROG_CC_STDC
ZEND_VERSION=$VERSION
dnl We want this one before the checks, so the checks can modify CFLAGS.
test -z "$CFLAGS" && auto_cflags=1
sinclude(Zend.m4)
LIBZEND_BASIC_CHECKS
AM_PROG_LIBTOOL
if test "$enable_debug" != "yes"; then
AM_SET_LIBTOOL_VARIABLE([--silent])
fi
dnl
dnl Check for /usr/pkg/{lib,include} which is where NetBSD puts binary
dnl and source packages. This should be harmless on other OSs.
dnl
if test -d /usr/pkg/include -a -d /usr/pkg/lib ; then
CFLAGS="$CFLAGS -I/usr/pkg/include"
LDFLAGS="$LDFLAGS -L/usr/pkg/lib"
fi
LIBZEND_ENABLE_DEBUG
LIBZEND_OTHER_CHECKS
ZEND_EXTRA_LIBS="$LIBS"
LIBS=""
AC_SUBST(ZEND_EXTRA_LIBS)
AC_OUTPUT(Makefile)
# Local Variables:
# tab-width: 4
# End:
-1633
View File
File diff suppressed because it is too large. Load diff
-339
View File
@@ -1,339 +0,0 @@
Example 1: A singleton (static members)
=======================================
<?php
class Counter {
var $counter = 0;
function increment_and_print()
{
print ++$this->counter;
print "\n";
}
}
class SingletonCounter {
static $m_instance = NULL;
function Instance()
{
if (self::$m_instance == NULL) {
self::$m_instance = new Counter();
}
return self::$m_instance;
}
}
SingletonCounter::Instance()->increment_and_print();
SingletonCounter::Instance()->increment_and_print();
SingletonCounter::Instance()->increment_and_print();
?>
Example 2: Factory method (derefencing objects returned from functions)
=======================================================================
<?php
class Circle {
function draw()
{
print "Circle\n";
}
}
class Square {
function draw()
{
print "Square\n";
}
}
function ShapeFactoryMethod($shape)
{
switch ($shape) {
case "Circle":
return new Circle();
case "Square":
return new Square();
}
}
ShapeFactoryMethod("Circle")->draw();
ShapeFactoryMethod("Square")->draw();
?>
Example 3: Nested class
=======================
<?php
class Database {
class MySQL {
var $host = "";
function db_connect($user) {
print "Connecting to MySQL database '$this->host' as $user\n";
}
}
class Oracle {
var $host = "localhost";
function db_connect($user) {
print "Connecting to Oracle database '$this->host' as $user\n";
}
}
}
$MySQL_obj = new Database::MySQL();
$MySQL_obj->db_connect("John");
$Oracle_obj = new Database::Oracle();
$Oracle_obj->db_connect("Mark");
unset($MySQL_obj);
unset($Oracle_obj);
?>
Example 3: Nested class suitable for a PEAR like hierarchy
==========================================================
<?php
class DB::MySQL {
var $host = "";
function db_connect($user) {
print "Connecting to MySQL database '$this->host' as $user\n";
}
}
class DB::Oracle {
var $host = "localhost";
function db_connect($user) {
print "Connecting to Oracle database '$this->host' as $user\n";
}
}
$MySQL_obj = new DB::MySQL();
$MySQL_obj->db_connect("Susan");
$Oracle_obj = new DB::Oracle();
$Oracle_obj->db_connect("Barbara");
?>
Example 4: Class constants and class scope
==========================================
<?php
class ErrorCodes {
const FATAL = "Fatal error\n";
const WARNING = "Warning\n";
const INFO = "Informational message\n";
function print_fatal_error_codes()
{
print "FATAL = " . FATAL;
print "self::FATAL = " . self::FATAL;
}
}
/* Call the static function and move into the ErrorCodes scope */
ErrorCodes::print_fatal_error_codes();
?>
Example 5: Regular object method using both local and global functions
======================================================================
<?php
class HelloWorld {
const HELLO_WORLD = "Hello, World!\n";
function get_hello_world()
{
return HELLO_WORLD;
}
function length_of_hello_world()
{
$str = $this->get_hello_world();
return strlen($str);
}
}
$obj = new HelloWorld();
print "length_of_hello_world() = " . $obj->length_of_hello_world();
print "\n";
?>
Example 6: Multiple derefencing of objects returned from methods
================================================================
<?php
class Name {
function Name($_name)
{
$this->name = $_name;
}
function display()
{
print $this->name;
print "\n";
}
}
class Person {
function Person($_name, $_address)
{
$this->name = new Name($_name);
}
function getName()
{
return $this->name;
}
}
$person = new Person("John", "New York");
$person->getName()->display();
?>
Example 7: Exception handling
=============================
<?
class MyException {
function MyException($_error) {
$this->error = $_error;
}
function getException()
{
return $this->error;
}
}
function ThrowException()
{
throw new MyException("'This is an exception!'");
}
try {
} catch (MyException $exception) {
print "There was an exception: " . $exception->getException();
print "\n";
}
try {
ThrowException();
} catch (MyException $exception) {
print "There was an exception: " . $exception->getException();
print "\n";
}
?>
Example 8: __clone()
===================
<?
class MyCloneable {
static $id = 0;
function MyCloneable()
{
$this->id = self::$id++;
}
function __clone()
{
$this->name = $that->name;
$this->address = "New York";
$this->id = self::$id++;
}
}
$obj = new MyCloneable();
$obj->name = "Hello";
$obj->address = "Tel-Aviv";
print $obj->id;
print "\n";
$obj = $obj->__clone();
print $obj->id;
print "\n";
print $obj->name;
print "\n";
print $obj->address;
print "\n";
?>
Example 9: Unified constructors
===============================
<?
class BaseClass {
function __construct()
{
print "In BaseClass constructor\n";
}
}
class SubClass extends BaseClass {
function __construct()
{
parent::__construct();
print "In SubClass constructor\n";
}
}
$obj = new BaseClass();
$obj = new SubClass();
?>
Example 10: Destructors
=======================
<?php
class MyDestructableClass {
function __construct()
{
print "In constructor\n";
$this->name = "MyDestructableClass";
}
function __destruct()
{
print "Destroying " . $this->name . "\n";
}
}
$obj = new MyDestructableClass();
?>
-951
View File
@@ -1,951 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include "zend.h"
#include "zend_extensions.h"
#include "zend_modules.h"
#include "zend_constants.h"
#include "zend_list.h"
#include "zend_API.h"
#include "zend_builtin_functions.h"
#include "zend_ini.h"
#ifdef ZTS
# define GLOBAL_FUNCTION_TABLE &global_main_class.function_table
# define GLOBAL_CLASS_TABLE &global_main_class.class_table
# define GLOBAL_CONSTANTS_TABLE &global_main_class.constants_table
# define GLOBAL_AUTO_GLOBALS_TABLE global_auto_globals_table
#else
# define GLOBAL_FUNCTION_TABLE CG(function_table)
# define GLOBAL_CLASS_TABLE CG(class_table)
# define GLOBAL_AUTO_GLOBALS_TABLE CG(auto_globals)
#endif
#if defined(ZEND_WIN32) && ZEND_DEBUG
BOOL WINAPI IsDebuggerPresent(VOID);
#endif
/* true multithread-shared globals */
ZEND_API zend_class_entry *zend_standard_class_def = NULL;
ZEND_API int (*zend_printf)(const char *format, ...);
ZEND_API zend_write_func_t zend_write;
ZEND_API FILE *(*zend_fopen)(const char *filename, char **opened_path);
ZEND_API void (*zend_block_interruptions)(void);
ZEND_API void (*zend_unblock_interruptions)(void);
ZEND_API void (*zend_ticks_function)(int ticks);
ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
void (*zend_on_timeout)(int seconds TSRMLS_DC);
static void (*zend_message_dispatcher_p)(long message, void *data);
static int (*zend_get_configuration_directive_p)(char *name, uint name_length, zval *contents);
#ifdef ZTS
ZEND_API int compiler_globals_id;
ZEND_API int executor_globals_id;
ZEND_API int alloc_globals_id;
zend_class_entry global_main_class;
HashTable *global_auto_globals_table;
#endif
ZEND_API zend_utility_values zend_uv;
ZEND_API zval zval_used_for_init; /* True global variable */
/* version information */
static char *zend_version_info;
static uint zend_version_info_length;
#define ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998-2002 Zend Technologies\n"
#define PRINT_ZVAL_INDENT 4
static void print_hash(HashTable *ht, int indent)
{
zval **tmp;
char *string_key;
HashPosition iterator;
ulong num_key;
uint str_len;
int i;
for (i=0; i<indent; i++) {
ZEND_PUTS(" ");
}
ZEND_PUTS("(\n");
indent += PRINT_ZVAL_INDENT;
zend_hash_internal_pointer_reset_ex(ht, &iterator);
while (zend_hash_get_current_data_ex(ht, (void **) &tmp, &iterator) == SUCCESS) {
for (i=0; i<indent; i++) {
ZEND_PUTS(" ");
}
ZEND_PUTS("[");
switch (zend_hash_get_current_key_ex(ht, &string_key, &str_len, &num_key, 0, &iterator)) {
case HASH_KEY_IS_STRING:
ZEND_PUTS(string_key);
break;
case HASH_KEY_IS_LONG:
zend_printf("%ld", num_key);
break;
}
ZEND_PUTS("] => ");
zend_print_zval_r(*tmp, indent+PRINT_ZVAL_INDENT);
ZEND_PUTS("\n");
zend_hash_move_forward_ex(ht, &iterator);
}
indent -= PRINT_ZVAL_INDENT;
for (i=0; i<indent; i++) {
ZEND_PUTS(" ");
}
ZEND_PUTS(")\n");
}
ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_copy)
{
if (expr->type==IS_STRING) {
*use_copy = 0;
return;
}
switch (expr->type) {
case IS_NULL:
expr_copy->value.str.len = 0;
expr_copy->value.str.val = empty_string;
break;
case IS_BOOL:
if (expr->value.lval) {
expr_copy->value.str.len = 1;
expr_copy->value.str.val = estrndup("1", 1);
} else {
expr_copy->value.str.len = 0;
expr_copy->value.str.val = empty_string;
}
break;
case IS_RESOURCE:
expr_copy->value.str.val = (char *) emalloc(sizeof("Resource id #")-1 + MAX_LENGTH_OF_LONG);
expr_copy->value.str.len = sprintf(expr_copy->value.str.val, "Resource id #%ld", expr->value.lval);
break;
case IS_ARRAY:
expr_copy->value.str.len = sizeof("Array")-1;
expr_copy->value.str.val = estrndup("Array", expr_copy->value.str.len);
break;
case IS_OBJECT:
expr_copy->value.str.val = (char *) emalloc(sizeof("Object id #")-1 + MAX_LENGTH_OF_LONG);
expr_copy->value.str.len = sprintf(expr_copy->value.str.val, "Object id #%ld", (long)expr->value.obj.handle);
#if 0
/* FIXME: This might break BC for some people */
expr_copy->value.str.len = sizeof("Object")-1;
expr_copy->value.str.val = estrndup("Object", expr_copy->value.str.len);
#endif
break;
case IS_DOUBLE:
*expr_copy = *expr;
zval_copy_ctor(expr_copy);
zend_locale_sprintf_double(expr_copy ZEND_FILE_LINE_CC);
break;
default:
*expr_copy = *expr;
zval_copy_ctor(expr_copy);
convert_to_string(expr_copy);
break;
}
expr_copy->type = IS_STRING;
*use_copy = 1;
}
ZEND_API int zend_print_zval(zval *expr, int indent)
{
return zend_print_zval_ex(zend_write, expr, indent);
}
ZEND_API int zend_print_zval_ex(zend_write_func_t write_func, zval *expr, int indent)
{
zval expr_copy;
int use_copy;
zend_make_printable_zval(expr, &expr_copy, &use_copy);
if (use_copy) {
expr = &expr_copy;
}
if (expr->value.str.len==0) { /* optimize away empty strings */
if (use_copy) {
zval_dtor(expr);
}
return 0;
}
write_func(expr->value.str.val, expr->value.str.len);
if (use_copy) {
zval_dtor(expr);
}
return expr->value.str.len;
}
ZEND_API void zend_print_zval_r(zval *expr, int indent)
{
zend_print_zval_r_ex(zend_write, expr, indent);
}
ZEND_API void zend_print_zval_r_ex(zend_write_func_t write_func, zval *expr, int indent)
{
switch(expr->type) {
case IS_ARRAY:
ZEND_PUTS("Array\n");
if (++expr->value.ht->nApplyCount>1) {
ZEND_PUTS(" *RECURSION*");
expr->value.ht->nApplyCount--;
return;
}
print_hash(expr->value.ht, indent);
expr->value.ht->nApplyCount--;
break;
case IS_OBJECT:
{
zend_object *object = Z_OBJ_P(expr);
if (++object->properties->nApplyCount>1) {
ZEND_PUTS(" *RECURSION*");
object->properties->nApplyCount--;
return;
}
zend_printf("%s Object\n", object->ce->name);
print_hash(object->properties, indent);
object->properties->nApplyCount--;
break;
}
default:
zend_print_variable(expr);
break;
}
}
static FILE *zend_fopen_wrapper(const char *filename, char **opened_path)
{
if (opened_path) {
*opened_path = estrdup(filename);
}
return fopen(filename, "rb");
}
static void register_standard_class(void)
{
zend_standard_class_def = malloc(sizeof(zend_class_entry));
zend_standard_class_def->type = ZEND_INTERNAL_CLASS;
zend_standard_class_def->name_length = sizeof("stdClass") - 1;
zend_standard_class_def->name = zend_strndup("stdClass", zend_standard_class_def->name_length);
zend_standard_class_def->parent = NULL;
zend_hash_init_ex(&zend_standard_class_def->default_properties, 0, NULL, ZVAL_PTR_DTOR, 1, 0);
zend_hash_init_ex(&zend_standard_class_def->private_properties, 0, NULL, ZVAL_PTR_DTOR, 1, 0);
zend_hash_init_ex(&zend_standard_class_def->protected_properties, 0, NULL, ZVAL_PTR_DTOR, 1, 0);
zend_standard_class_def->static_members = (HashTable *) malloc(sizeof(HashTable));
zend_hash_init_ex(zend_standard_class_def->static_members, 0, NULL, ZVAL_PTR_DTOR, 1, 0);
zend_hash_init_ex(&zend_standard_class_def->constants_table, 0, NULL, ZVAL_PTR_DTOR, 1, 0);
zend_hash_init_ex(&zend_standard_class_def->class_table, 10, NULL, ZEND_CLASS_DTOR, 1, 0);
zend_hash_init_ex(&zend_standard_class_def->function_table, 0, NULL, ZEND_FUNCTION_DTOR, 1, 0);
zend_standard_class_def->constructor = NULL;
zend_standard_class_def->destructor = NULL;
zend_standard_class_def->clone = NULL;
zend_standard_class_def->handle_function_call = NULL;
zend_standard_class_def->handle_property_get = NULL;
zend_standard_class_def->handle_property_set = NULL;
zend_standard_class_def->refcount = 1;
zend_hash_add(GLOBAL_CLASS_TABLE, "stdclass", sizeof("stdclass"), &zend_standard_class_def, sizeof(zend_class_entry *), NULL);
}
static void zend_set_default_compile_time_values(TSRMLS_D)
{
/* default compile-time values */
CG(asp_tags) = 0;
CG(short_tags) = 1;
CG(allow_call_time_pass_reference) = 1;
CG(extended_info) = 0;
}
#ifdef ZTS
static void compiler_globals_ctor(zend_compiler_globals *compiler_globals TSRMLS_DC)
{
zend_function tmp_func;
zend_class_entry tmp_class;
compiler_globals->compiled_filename = NULL;
compiler_globals->function_table = &compiler_globals->main_class.function_table;
zend_hash_init_ex(compiler_globals->function_table, 100, NULL, ZEND_FUNCTION_DTOR, 1, 0);
zend_hash_copy(compiler_globals->function_table, GLOBAL_FUNCTION_TABLE, NULL, &tmp_func, sizeof(zend_function));
compiler_globals->class_table = &compiler_globals->main_class.class_table;
zend_hash_init_ex(compiler_globals->class_table, 10, NULL, ZEND_CLASS_DTOR, 1, 0);
zend_hash_copy(compiler_globals->class_table, GLOBAL_CLASS_TABLE, (copy_ctor_func_t) zend_class_add_ref, &tmp_class, sizeof(zend_class_entry *));
zend_set_default_compile_time_values(TSRMLS_C);
CG(interactive) = 0;
compiler_globals->auto_globals = (HashTable *) malloc(sizeof(HashTable));
zend_hash_init_ex(compiler_globals->auto_globals, 8, NULL, NULL, 1, 0);
zend_hash_copy(compiler_globals->auto_globals, global_auto_globals_table, NULL, NULL, sizeof(void *) /* empty element */);
}
static void compiler_globals_dtor(zend_compiler_globals *compiler_globals TSRMLS_DC)
{
if (compiler_globals->function_table != GLOBAL_FUNCTION_TABLE) {
zend_hash_destroy(compiler_globals->function_table);
}
if (compiler_globals->class_table != GLOBAL_CLASS_TABLE) {
zend_hash_destroy(compiler_globals->class_table);
}
if (compiler_globals->auto_globals != global_auto_globals_table) {
zend_hash_destroy(compiler_globals->auto_globals);
free(compiler_globals->auto_globals);
}
}
static void executor_globals_ctor(zend_executor_globals *executor_globals TSRMLS_DC)
{
zend_startup_constants(TSRMLS_C);
zend_copy_constants(EG(zend_constants), GLOBAL_CONSTANTS_TABLE);
zend_init_rsrc_plist(TSRMLS_C);
EG(lambda_count)=0;
EG(user_error_handler) = NULL;
EG(user_exception_handler) = NULL;
EG(in_execution) = 0;
EG(current_execute_data) = NULL;
}
static void executor_globals_dtor(zend_executor_globals *executor_globals TSRMLS_DC)
{
zend_shutdown_constants(TSRMLS_C);
zend_destroy_rsrc_list(&EG(persistent_list) TSRMLS_CC);
zend_ini_shutdown(TSRMLS_C);
}
static void zend_new_thread_end_handler(THREAD_T thread_id TSRMLS_DC)
{
zend_copy_ini_directives(TSRMLS_C);
zend_ini_refresh_caches(ZEND_INI_STAGE_STARTUP TSRMLS_CC);
}
#endif
static void alloc_globals_ctor(zend_alloc_globals *alloc_globals_p TSRMLS_DC)
{
start_memory_manager(TSRMLS_C);
}
static void alloc_globals_dtor(zend_alloc_globals *alloc_globals_p TSRMLS_DC)
{
shutdown_memory_manager(0, 1 TSRMLS_CC);
}
#ifdef __FreeBSD__
/* FreeBSD floating point precision fix */
#include <floatingpoint.h>
#endif
static void scanner_globals_ctor(zend_scanner_globals *scanner_globals_p TSRMLS_DC)
{
scanner_globals_p->c_buf_p = (char *) 0;
scanner_globals_p->init = 1;
scanner_globals_p->start = 0;
scanner_globals_p->current_buffer = NULL;
scanner_globals_p->yy_in = NULL;
scanner_globals_p->yy_out = NULL;
scanner_globals_p->_yy_more_flag = 0;
scanner_globals_p->_yy_more_len = 0;
scanner_globals_p->yy_start_stack_ptr = 0;
scanner_globals_p->yy_start_stack_depth = 0;
scanner_globals_p->yy_start_stack = 0;
}
void zend_init_opcodes_handlers();
int zend_startup(zend_utility_functions *utility_functions, char **extensions, int start_builtin_functions)
{
#ifdef ZTS
zend_compiler_globals *compiler_globals;
zend_executor_globals *executor_globals;
void ***tsrm_ls;
#ifdef ZTS
extern ZEND_API ts_rsrc_id ini_scanner_globals_id;
extern ZEND_API ts_rsrc_id language_scanner_globals_id;
#else
extern zend_scanner_globals ini_scanner_globals;
extern zend_scanner_globals language_scanner_globals;
#endif
ts_allocate_id(&alloc_globals_id, sizeof(zend_alloc_globals), (ts_allocate_ctor) alloc_globals_ctor, (ts_allocate_dtor) alloc_globals_dtor);
#else
alloc_globals_ctor(&alloc_globals TSRMLS_CC);
#endif
#ifdef __FreeBSD__
/* FreeBSD floating point precision fix */
fpsetmask(0);
#endif
zend_startup_extensions_mechanism();
/* Set up utility functions and values */
zend_error_cb = utility_functions->error_function;
zend_printf = utility_functions->printf_function;
zend_write = (zend_write_func_t) utility_functions->write_function;
zend_fopen = utility_functions->fopen_function;
if (!zend_fopen) {
zend_fopen = zend_fopen_wrapper;
}
zend_message_dispatcher_p = utility_functions->message_handler;
zend_block_interruptions = utility_functions->block_interruptions;
zend_unblock_interruptions = utility_functions->unblock_interruptions;
zend_get_configuration_directive_p = utility_functions->get_configuration_directive;
zend_ticks_function = utility_functions->ticks_function;
zend_on_timeout = utility_functions->on_timeout;
zend_compile_file = compile_file;
zend_execute = execute;
zend_init_opcodes_handlers();
/* set up version */
zend_version_info = strdup(ZEND_CORE_VERSION_INFO);
zend_version_info_length = sizeof(ZEND_CORE_VERSION_INFO)-1;
#ifndef ZTS
GLOBAL_FUNCTION_TABLE = &compiler_globals.main_class.function_table;
GLOBAL_CLASS_TABLE = &compiler_globals.main_class.class_table;
#endif
GLOBAL_AUTO_GLOBALS_TABLE = (HashTable *) malloc(sizeof(HashTable));
zend_hash_init_ex(GLOBAL_FUNCTION_TABLE, 100, NULL, ZEND_FUNCTION_DTOR, 1, 0);
zend_hash_init_ex(GLOBAL_CLASS_TABLE, 10, NULL, ZEND_CLASS_DTOR, 1, 0);
register_standard_class();
zend_hash_init_ex(&module_registry, 50, NULL, ZEND_MODULE_DTOR, 1, 0);
zend_init_rsrc_list_dtors();
/* This zval can be used to initialize allocate zval's to an uninit'ed value */
zval_used_for_init.is_ref = 0;
zval_used_for_init.refcount = 1;
zval_used_for_init.type = IS_NULL;
#ifdef ZTS
zend_hash_init_ex(GLOBAL_CONSTANTS_TABLE, 20, NULL, ZEND_CONSTANT_DTOR, 1, 0);
zend_hash_init_ex(GLOBAL_AUTO_GLOBALS_TABLE, 8, NULL, NULL, 1, 0);
ts_allocate_id(&compiler_globals_id, sizeof(zend_compiler_globals), (ts_allocate_ctor) compiler_globals_ctor, (ts_allocate_dtor) compiler_globals_dtor);
ts_allocate_id(&executor_globals_id, sizeof(zend_executor_globals), (ts_allocate_ctor) executor_globals_ctor, (ts_allocate_dtor) executor_globals_dtor);
ts_allocate_id(&language_scanner_globals_id, sizeof(zend_scanner_globals), (ts_allocate_ctor) scanner_globals_ctor, NULL);
ts_allocate_id(&ini_scanner_globals_id, sizeof(zend_scanner_globals), (ts_allocate_ctor) scanner_globals_ctor, NULL);
compiler_globals = ts_resource(compiler_globals_id);
executor_globals = ts_resource(executor_globals_id);
tsrm_ls = ts_resource_ex(0, NULL);
compiler_globals_dtor(compiler_globals, tsrm_ls);
*compiler_globals->function_table = *GLOBAL_FUNCTION_TABLE;
*compiler_globals->class_table = *GLOBAL_CLASS_TABLE;
compiler_globals->auto_globals = GLOBAL_AUTO_GLOBALS_TABLE;
zend_hash_destroy(executor_globals->zend_constants);
*executor_globals->zend_constants = *GLOBAL_CONSTANTS_TABLE;
#else
zend_hash_init_ex(CG(auto_globals), 8, NULL, NULL, 1, 0);
scanner_globals_ctor(&ini_scanner_globals TSRMLS_CC);
scanner_globals_ctor(&language_scanner_globals TSRMLS_CC);
zend_startup_constants();
zend_set_default_compile_time_values(TSRMLS_C);
EG(user_error_handler) = NULL;
EG(user_exception_handler) = NULL;
#endif
zend_register_standard_constants(TSRMLS_C);
#ifndef ZTS
zend_init_rsrc_plist(TSRMLS_C);
#endif
if (start_builtin_functions) {
zend_startup_builtin_functions(TSRMLS_C);
}
zend_ini_startup(TSRMLS_C);
#ifdef ZTS
tsrm_set_new_thread_end_handler(zend_new_thread_end_handler);
#endif
return SUCCESS;
}
#ifdef ZTS
/* Unlink the global (r/o) copies of the class, function and constant tables,
* and use a fresh r/w copy for the startup thread
*/
void zend_post_startup(TSRMLS_D)
{
zend_compiler_globals *compiler_globals = ts_resource(compiler_globals_id);
zend_executor_globals *executor_globals = ts_resource(executor_globals_id);
*GLOBAL_FUNCTION_TABLE = *compiler_globals->function_table;
*GLOBAL_CLASS_TABLE = *compiler_globals->class_table;
*GLOBAL_CONSTANTS_TABLE = *executor_globals->zend_constants;
compiler_globals_ctor(compiler_globals, tsrm_ls);
executor_globals_ctor(executor_globals, tsrm_ls);
}
#endif
void zend_shutdown(TSRMLS_D)
{
#ifdef ZEND_WIN32
zend_shutdown_timeout_thread();
#endif
#ifndef ZTS
zend_destroy_rsrc_list(&EG(persistent_list) TSRMLS_CC);
#endif
zend_destroy_rsrc_list_dtors();
zend_hash_graceful_reverse_destroy(&module_registry);
#ifndef ZTS
/* In ZTS mode these are freed by compiler_globals_dtor() */
zend_hash_destroy(GLOBAL_FUNCTION_TABLE);
zend_hash_destroy(GLOBAL_CLASS_TABLE);
#endif
zend_hash_destroy(GLOBAL_AUTO_GLOBALS_TABLE);
free(GLOBAL_AUTO_GLOBALS_TABLE);
zend_shutdown_extensions(TSRMLS_C);
free(zend_version_info);
#ifndef ZTS
zend_shutdown_constants();
#endif
}
void zend_set_utility_values(zend_utility_values *utility_values)
{
zend_uv = *utility_values;
zend_uv.import_use_extension_length = strlen(zend_uv.import_use_extension);
}
/* this should be compatible with the standard zenderror */
void zenderror(char *error)
{
zend_error(E_PARSE, error);
}
BEGIN_EXTERN_C()
ZEND_API void _zend_bailout(char *filename, uint lineno)
{
TSRMLS_FETCH();
if (!EG(bailout_set)) {
zend_output_debug_string(1, "%s(%d) : Bailed out without a bailout address!", filename, lineno);
exit(-1);
}
CG(unclean_shutdown) = 1;
CG(in_compilation) = EG(in_execution) = 0;
EG(current_execute_data) = NULL;
longjmp(EG(bailout), FAILURE);
}
END_EXTERN_C()
void zend_append_version_info(zend_extension *extension)
{
char *new_info;
uint new_info_length;
new_info_length = sizeof(" with v, by \n")
+ strlen(extension->name)
+ strlen(extension->version)
+ strlen(extension->copyright)
+ strlen(extension->author);
new_info = (char *) malloc(new_info_length+1);
sprintf(new_info, " with %s v%s, %s, by %s\n", extension->name, extension->version, extension->copyright, extension->author);
zend_version_info = (char *) realloc(zend_version_info, zend_version_info_length+new_info_length+1);
strcat(zend_version_info, new_info);
zend_version_info_length += new_info_length;
free(new_info);
}
ZEND_API char *get_zend_version()
{
return zend_version_info;
}
void zend_activate(TSRMLS_D)
{
init_compiler(TSRMLS_C);
init_executor(TSRMLS_C);
startup_scanner(TSRMLS_C);
}
void zend_activate_modules(TSRMLS_D)
{
zend_hash_apply(&module_registry, (apply_func_t) module_registry_request_startup TSRMLS_CC);
}
void zend_deactivate_modules(TSRMLS_D)
{
EG(opline_ptr) = NULL; /* we're no longer executing anything */
zend_try {
zend_hash_apply(&module_registry, (apply_func_t) module_registry_cleanup TSRMLS_CC);
} zend_end_try();
}
void zend_deactivate(TSRMLS_D)
{
/* we're no longer executing anything */
EG(opline_ptr) = NULL;
EG(active_symbol_table) = NULL;
zend_try {
shutdown_scanner(TSRMLS_C);
} zend_end_try();
/* shutdown_executor() takes care of its own bailout handling */
shutdown_executor(TSRMLS_C);
zend_try {
shutdown_compiler(TSRMLS_C);
} zend_end_try();
zend_try {
zend_ini_deactivate(TSRMLS_C);
} zend_end_try();
}
BEGIN_EXTERN_C()
ZEND_API void zend_message_dispatcher(long message, void *data)
{
if (zend_message_dispatcher_p) {
zend_message_dispatcher_p(message, data);
}
}
END_EXTERN_C()
ZEND_API int zend_get_configuration_directive(char *name, uint name_length, zval *contents)
{
if (zend_get_configuration_directive_p) {
return zend_get_configuration_directive_p(name, name_length, contents);
} else {
return FAILURE;
}
}
#define ZEND_ERROR_BUFFER_SIZE 1024
ZEND_API void zend_error(int type, const char *format, ...)
{
va_list args;
zval ***params;
zval *retval;
zval *z_error_type, *z_error_message, *z_error_filename, *z_error_lineno, *z_context;
char *error_filename;
uint error_lineno;
zval *orig_user_error_handler;
TSRMLS_FETCH();
/* Obtain relevant filename and lineno */
switch (type) {
case E_CORE_ERROR:
case E_CORE_WARNING:
error_filename = NULL;
error_lineno = 0;
break;
case E_PARSE:
case E_COMPILE_ERROR:
case E_COMPILE_WARNING:
case E_ERROR:
case E_NOTICE:
case E_WARNING:
case E_USER_ERROR:
case E_USER_WARNING:
case E_USER_NOTICE:
if (zend_is_compiling(TSRMLS_C)) {
error_filename = zend_get_compiled_filename(TSRMLS_C);
error_lineno = zend_get_compiled_lineno(TSRMLS_C);
} else if (zend_is_executing(TSRMLS_C)) {
error_filename = zend_get_executed_filename(TSRMLS_C);
error_lineno = zend_get_executed_lineno(TSRMLS_C);
} else {
error_filename = NULL;
error_lineno = 0;
}
break;
default:
error_filename = NULL;
error_lineno = 0;
break;
}
if (!error_filename) {
error_filename = "Unknown";
}
va_start(args, format);
/* if we don't have a user defined error handler */
if (!EG(user_error_handler)) {
zend_error_cb(type, error_filename, error_lineno, format, args);
} else switch (type) {
case E_ERROR:
case E_PARSE:
case E_CORE_ERROR:
case E_CORE_WARNING:
case E_COMPILE_ERROR:
case E_COMPILE_WARNING:
/* The error may not be safe to handle in user-space */
zend_error_cb(type, error_filename, error_lineno, format, args);
break;
default:
/* Handle the error in user space */
ALLOC_INIT_ZVAL(z_error_message);
ALLOC_INIT_ZVAL(z_error_type);
ALLOC_INIT_ZVAL(z_error_filename);
ALLOC_INIT_ZVAL(z_error_lineno);
ALLOC_INIT_ZVAL(z_context);
z_error_message->value.str.val = (char *) emalloc(ZEND_ERROR_BUFFER_SIZE);
#ifdef HAVE_VSNPRINTF
z_error_message->value.str.len = vsnprintf(z_error_message->value.str.val, ZEND_ERROR_BUFFER_SIZE, format, args);
if (z_error_message->value.str.len > ZEND_ERROR_BUFFER_SIZE-1) {
z_error_message->value.str.len = ZEND_ERROR_BUFFER_SIZE-1;
}
#else
strncpy(z_error_message->value.str.val, format, ZEND_ERROR_BUFFER_SIZE);
/* This is risky... */
/* z_error_message->value.str.len = vsprintf(z_error_message->value.str.val, format, args); */
#endif
z_error_message->type = IS_STRING;
z_error_type->value.lval = type;
z_error_type->type = IS_LONG;
if (error_filename) {
z_error_filename->value.str.len = strlen(error_filename);
z_error_filename->value.str.val = estrndup(error_filename, z_error_filename->value.str.len);
z_error_filename->type = IS_STRING;
}
z_error_lineno->value.lval = error_lineno;
z_error_lineno->type = IS_LONG;
z_context->value.ht = EG(active_symbol_table);
z_context->type = IS_ARRAY;
ZVAL_ADDREF(z_context); /* we don't want this one to be freed */
params = (zval ***) emalloc(sizeof(zval **)*5);
params[0] = &z_error_type;
params[1] = &z_error_message;
params[2] = &z_error_filename;
params[3] = &z_error_lineno;
params[4] = &z_context;
orig_user_error_handler = EG(user_error_handler);
EG(user_error_handler) = NULL;
if (call_user_function_ex(CG(function_table), NULL, orig_user_error_handler, &retval, 5, params, 1, NULL TSRMLS_CC)==SUCCESS) {
zval_ptr_dtor(&retval);
} else {
/* The user error handler failed, use built-in error handler */
zend_error_cb(type, error_filename, error_lineno, format, args);
}
EG(user_error_handler) = orig_user_error_handler;
efree(params);
zval_ptr_dtor(&z_error_message);
zval_ptr_dtor(&z_error_type);
zval_ptr_dtor(&z_error_filename);
zval_ptr_dtor(&z_error_lineno);
if (ZVAL_REFCOUNT(z_context) == 2) {
FREE_ZVAL(z_context);
}
break;
}
va_end(args);
if (type == E_PARSE) {
EG(exit_status) = 255;
zend_init_compiler_data_structures(TSRMLS_C);
}
}
ZEND_API void zend_output_debug_string(zend_bool trigger_break, char *format, ...)
{
#if ZEND_DEBUG
va_list args;
va_start(args, format);
# ifdef ZEND_WIN32
{
char output_buf[1024];
vsnprintf(output_buf, 1024, format, args);
OutputDebugString(output_buf);
OutputDebugString("\n");
if (trigger_break && IsDebuggerPresent()) {
DebugBreak();
}
}
# else
vfprintf(stderr, format, args);
fprintf(stderr, "\n");
# endif
va_end(args);
#endif
}
ZEND_API int zend_execute_scripts(int type TSRMLS_DC, zval **retval, int file_count, ...)
{
va_list files;
int i;
zend_file_handle *file_handle;
zend_op_array *orig_op_array = EG(active_op_array);
zval *local_retval=NULL;
va_start(files, file_count);
for (i=0; i<file_count; i++) {
file_handle = va_arg(files, zend_file_handle *);
if (!file_handle) {
continue;
}
EG(active_op_array) = zend_compile_file(file_handle, ZEND_INCLUDE TSRMLS_CC);
zend_destroy_file_handle(file_handle TSRMLS_CC);
if (EG(active_op_array)) {
EG(return_value_ptr_ptr) = retval ? retval : &local_retval;
zend_execute(EG(active_op_array) TSRMLS_CC);
if (EG(exception)) {
#if 1 /* support set_exception_handler() */
if (EG(user_exception_handler)) {
zval *orig_user_exception_handler;
zval ***params, *retval2;
params = (zval ***)emalloc(sizeof(zval **));
params[0] = &EG(exception);
orig_user_exception_handler = EG(user_exception_handler);
if (call_user_function_ex(CG(function_table), NULL, orig_user_exception_handler, &retval2, 1, params, 1, NULL TSRMLS_CC) == SUCCESS) {
if (retval2 != NULL) {
zval_ptr_dtor(&retval2);
}
} else {
zval_ptr_dtor(&EG(exception));
EG(exception) = NULL;
zend_error(E_ERROR, "Uncaught exception!");
}
efree(params);
zval_ptr_dtor(&EG(exception));
EG(exception) = NULL;
} else {
zval_ptr_dtor(&EG(exception));
EG(exception) = NULL;
zend_error(E_ERROR, "Uncaught exception!");
}
if (retval == NULL && *EG(return_value_ptr_ptr) != NULL) {
zval_ptr_dtor(EG(return_value_ptr_ptr));
local_retval = NULL;
}
#else
zval_ptr_dtor(&EG(exception));
zend_error(E_ERROR, "Uncaught exception!");
#endif
} else if (!retval) {
zval_ptr_dtor(EG(return_value_ptr_ptr));
local_retval = NULL;
}
destroy_op_array(EG(active_op_array));
efree(EG(active_op_array));
} else if (type==ZEND_REQUIRE) {
va_end(files);
EG(active_op_array) = orig_op_array;
return FAILURE;
}
}
va_end(files);
EG(active_op_array) = orig_op_array;
return SUCCESS;
}
#define COMPILED_STRING_DESCRIPTION_FORMAT "%s(%d) : %s"
ZEND_API char *zend_make_compiled_string_description(char *name TSRMLS_DC)
{
char *cur_filename;
int cur_lineno;
char *compiled_string_description;
if (zend_is_compiling(TSRMLS_C)) {
cur_filename = zend_get_compiled_filename(TSRMLS_C);
cur_lineno = zend_get_compiled_lineno(TSRMLS_C);
} else if (zend_is_executing(TSRMLS_C)) {
cur_filename = zend_get_executed_filename(TSRMLS_C);
cur_lineno = zend_get_executed_lineno(TSRMLS_C);
} else {
cur_filename = "Unknown";
cur_lineno = 0;
}
compiled_string_description = emalloc(sizeof(COMPILED_STRING_DESCRIPTION_FORMAT)+strlen(name)+strlen(cur_filename)+MAX_LENGTH_OF_LONG);
sprintf(compiled_string_description, COMPILED_STRING_DESCRIPTION_FORMAT, cur_filename, cur_lineno, name);
return compiled_string_description;
}
void free_estring(char **str_p)
{
efree(*str_p);
}
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
*/
-588
View File
@@ -1,588 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
#ifndef ZEND_H
#define ZEND_H
#define ZEND_VERSION "2.0.0-alpha3"
#define ZEND_ENGINE_2
#ifdef __cplusplus
#define BEGIN_EXTERN_C() extern "C" {
#define END_EXTERN_C() }
#else
#define BEGIN_EXTERN_C()
#define END_EXTERN_C()
#endif
#include <stdio.h>
/*
* general definitions
*/
#ifdef ZEND_WIN32
# include "zend_config.w32.h"
# define ZEND_PATHS_SEPARATOR ';'
#elif defined(NETWARE)
# include "zend_config.nw.h"
# include "acconfig.h"
#elif defined(__riscos__)
# include "zend_config.h"
# define ZEND_PATHS_SEPARATOR ';'
#else
# include "zend_config.h"
# define ZEND_PATHS_SEPARATOR ':'
#endif
#ifdef ZEND_WIN32
/* Only use this macro if you know for sure that all of the switches values
are covered by its case statements */
#define EMPTY_SWITCH_DEFAULT_CASE() \
default: \
__assume(0); \
break;
#else
#define EMPTY_SWITCH_DEFAULT_CASE()
#endif
/* all HAVE_XXX test have to be after the include of zend_config above */
#ifdef HAVE_UNIX_H
# include <unix.h>
#endif
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#endif
#ifdef HAVE_DLFCN_H
# include <dlfcn.h>
#endif
#if HAVE_MACH_O_DYLD_H
#include <mach-o/dyld.h>
/* MH_BUNDLE loading functions for Mac OS X / Darwin */
void *zend_mh_bundle_load (char* bundle_path);
int zend_mh_bundle_unload (void *bundle_handle);
void *zend_mh_bundle_symbol(void *bundle_handle, const char *symbol_name);
const char *zend_mh_bundle_error(void);
#endif /* HAVE_MACH_O_DYLD_H */
#if defined(HAVE_LIBDL)
# ifndef RTLD_LAZY
# define RTLD_LAZY 1 /* Solaris 1, FreeBSD's (2.1.7.1 and older) */
# endif
# ifndef RTLD_GLOBAL
# define RTLD_GLOBAL 0
# endif
# define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL)
# define DL_UNLOAD dlclose
# if defined(DLSYM_NEEDS_UNDERSCORE)
# define DL_FETCH_SYMBOL(h,s) dlsym((h), "_" s)
# else
# define DL_FETCH_SYMBOL dlsym
# endif
# define DL_ERROR dlerror
# define DL_HANDLE void *
# define ZEND_EXTENSIONS_SUPPORT 1
#elif defined(HAVE_MACH_O_DYLD_H)
# define DL_LOAD(libname) zend_mh_bundle_load(libname)
# define DL_UNLOAD(handle) zend_mh_bundle_unload(handle)
# define DL_FETCH_SYMBOL(h,s) zend_mh_bundle_symbol(h,s)
# define DL_ERROR zend_mh_bundle_error
# define DL_HANDLE void *
# define ZEND_EXTENSIONS_SUPPORT 1
#elif defined(ZEND_WIN32)
# define DL_LOAD(libname) LoadLibrary(libname)
# define DL_FETCH_SYMBOL GetProcAddress
# define DL_UNLOAD FreeLibrary
# define DL_HANDLE HMODULE
# define ZEND_EXTENSIONS_SUPPORT 1
#else
# define DL_HANDLE void *
# define ZEND_EXTENSIONS_SUPPORT 0
#endif
#if HAVE_ALLOCA_H && !defined(_ALLOCA_H)
# include <alloca.h>
#endif
/* AIX requires this to be the first thing in the file. */
#ifndef __GNUC__
# ifndef HAVE_ALLOCA_H
# ifdef _AIX
#pragma alloca
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
# endif
# endif
# endif
#endif
#if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2)) && !(defined(ZTS) && defined(ZEND_WIN32)) && !(defined(ZTS) && defined(NETWARE))
# define do_alloca(p) alloca(p)
# define free_alloca(p)
#else
# define do_alloca(p) emalloc(p)
# define free_alloca(p) efree(p)
#endif
#if ZEND_DEBUG
#define ZEND_FILE_LINE_D char *__zend_filename, uint __zend_lineno
#define ZEND_FILE_LINE_DC , ZEND_FILE_LINE_D
#define ZEND_FILE_LINE_ORIG_D char *__zend_orig_filename, uint __zend_orig_lineno
#define ZEND_FILE_LINE_ORIG_DC , ZEND_FILE_LINE_ORIG_D
#define ZEND_FILE_LINE_RELAY_C __zend_filename, __zend_lineno
#define ZEND_FILE_LINE_RELAY_CC , ZEND_FILE_LINE_RELAY_C
#define ZEND_FILE_LINE_C __FILE__, __LINE__
#define ZEND_FILE_LINE_CC , ZEND_FILE_LINE_C
#define ZEND_FILE_LINE_EMPTY_C NULL, 0
#define ZEND_FILE_LINE_EMPTY_CC , ZEND_FILE_LINE_EMPTY_C
#define ZEND_FILE_LINE_ORIG_RELAY_C __zend_orig_filename, __zend_orig_lineno
#define ZEND_FILE_LINE_ORIG_RELAY_CC , ZEND_FILE_LINE_ORIG_RELAY_C
#else
#define ZEND_FILE_LINE_D
#define ZEND_FILE_LINE_DC
#define ZEND_FILE_LINE_ORIG_D
#define ZEND_FILE_LINE_ORIG_DC
#define ZEND_FILE_LINE_RELAY_C
#define ZEND_FILE_LINE_RELAY_CC
#define ZEND_FILE_LINE_C
#define ZEND_FILE_LINE_CC
#define ZEND_FILE_LINE_EMPTY_C
#define ZEND_FILE_LINE_EMPTY_CC
#define ZEND_FILE_LINE_ORIG_RELAY_C
#define ZEND_FILE_LINE_ORIG_RELAY_CC
#endif /* ZEND_DEBUG */
#ifdef ZTS
#define ZTS_V 1
#else
#define ZTS_V 0
#endif
#include "zend_errors.h"
#include "zend_alloc.h"
#include "zend_types.h"
#ifdef HAVE_LIMITS_H
# include <limits.h>
#endif
#ifndef LONG_MAX
#define LONG_MAX 2147483647L
#endif
#ifndef LONG_MIN
#define LONG_MIN (- LONG_MAX - 1)
#endif
#undef SUCCESS
#undef FAILURE
#define SUCCESS 0
#define FAILURE -1 /* this MUST stay a negative number, or it may affect functions! */
#include "zend_hash.h"
#include "zend_ts_hash.h"
#include "zend_llist.h"
#define INTERNAL_FUNCTION_PARAMETERS int ht, zval *return_value, zval *this_ptr, int return_value_used TSRMLS_DC
#define INTERNAL_FUNCTION_PARAM_PASSTHRU ht, return_value, this_ptr, return_value_used TSRMLS_CC
/*
* zval
*/
typedef struct _zval_struct zval;
typedef struct _zend_class_entry zend_class_entry;
typedef struct _zend_object {
zend_class_entry *ce;
HashTable *properties;
int in_get:1;
int in_set:1;
} zend_object;
typedef unsigned int zend_object_handle;
typedef struct _zend_object_value zend_object_value;
#include "zend_object_handlers.h"
struct _zend_object_value {
zend_object_handle handle;
zend_object_handlers *handlers;
};
typedef union _zvalue_value {
long lval; /* long value */
double dval; /* double value */
struct {
char *val;
zend_uint len;
} str;
HashTable *ht; /* hash table value */
/* struct {
zend_class_entry *ce;
HashTable *properties;
} obj;
*/
zend_object_value obj;
} zvalue_value;
struct _zval_struct {
/* Variable information */
zvalue_value value; /* value */
zend_uint refcount;
zend_uchar type; /* active type */
zend_uchar is_ref;
};
typedef struct _zend_function_entry {
char *fname;
void (*handler)(INTERNAL_FUNCTION_PARAMETERS);
unsigned char *func_arg_types;
} zend_function_entry;
typedef struct _zend_property_reference {
int type; /* read, write or r/w */
zval *object;
zend_llist *elements_list;
} zend_property_reference;
typedef struct _zend_overloaded_element {
int type; /* array offset or object proprety */
zval element;
} zend_overloaded_element;
/* excpt.h on Digital Unix 4.0 defines function_table */
#undef function_table
/* A lot of stuff needs shifiting around in order to include zend_compile.h here */
union _zend_function;
struct _zend_class_entry {
char type;
char *name;
zend_uint name_length;
struct _zend_class_entry *parent;
int refcount;
zend_bool constants_updated;
HashTable function_table;
HashTable default_properties;
HashTable private_properties; /* This is only needed at compile-time */
HashTable protected_properties; /* This is only needed at compile-time */
HashTable class_table;
HashTable *static_members;
HashTable constants_table;
zend_function_entry *builtin_functions;
union _zend_function *constructor;
union _zend_function *destructor;
union _zend_function *clone;
union _zend_function *__get;
union _zend_function *__set;
union _zend_function *__call;
/* handlers */
zend_object_value (*create_object)(zend_class_entry *class_type TSRMLS_DC);
/* old handlers */
void (*handle_function_call)(INTERNAL_FUNCTION_PARAMETERS, zend_property_reference *property_reference);
zval (*handle_property_get)(zend_property_reference *property_reference);
int (*handle_property_set)(zend_property_reference *property_reference, zval *value);
};
typedef struct _zend_utility_functions {
void (*error_function)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
int (*printf_function)(const char *format, ...);
int (*write_function)(const char *str, uint str_length);
FILE *(*fopen_function)(const char *filename, char **opened_path);
void (*message_handler)(long message, void *data);
void (*block_interruptions)(void);
void (*unblock_interruptions)(void);
int (*get_configuration_directive)(char *name, uint name_length, zval *contents);
void (*ticks_function)(int ticks);
void (*on_timeout)(int seconds TSRMLS_DC);
} zend_utility_functions;
typedef struct _zend_utility_values {
char *import_use_extension;
uint import_use_extension_length;
zend_bool html_errors;
} zend_utility_values;
typedef int (*zend_write_func_t)(const char *str, uint str_length);
#undef MIN
#undef MAX
#define MAX(a, b) (((a)>(b))?(a):(b))
#define MIN(a, b) (((a)<(b))?(a):(b))
#define ZEND_STRL(str) (str), (sizeof(str)-1)
#define ZEND_STRS(str) (str), (sizeof(str))
#define ZEND_NORMALIZE_BOOL(n) \
((n) ? (((n)>0) ? 1 : -1) : 0)
/* data types */
#define IS_NULL 0
#define IS_LONG 1
#define IS_DOUBLE 2
#define IS_STRING 3
#define IS_ARRAY 4
#define IS_OBJECT 5
#define IS_BOOL 6
#define IS_RESOURCE 7
#define IS_CONSTANT 8
#define IS_CONSTANT_ARRAY 9
/* Special data type to temporarily mark large numbers */
#define FLAG_IS_BC 10 /* for parser internal use only */
/* Ugly hack to support constants as static array indices */
#define IS_CONSTANT_INDEX 0x80
/* overloaded elements data types */
#define OE_IS_ARRAY (1<<0)
#define OE_IS_OBJECT (1<<1)
#define OE_IS_METHOD (1<<2)
/* Argument passing types */
#define BYREF_NONE 0
#define BYREF_FORCE 1
#define BYREF_ALLOW 2
#define BYREF_FORCE_REST 3
int zend_startup(zend_utility_functions *utility_functions, char **extensions, int start_builtin_functions);
void zend_shutdown(TSRMLS_D);
#ifdef ZTS
void zend_post_startup(TSRMLS_D);
#endif
void zend_set_utility_values(zend_utility_values *utility_values);
BEGIN_EXTERN_C()
ZEND_API void _zend_bailout(char *filename, uint lineno);
END_EXTERN_C()
#define zend_bailout() _zend_bailout(__FILE__, __LINE__)
#define zend_try \
{ \
jmp_buf orig_bailout; \
zend_bool orig_bailout_set=EG(bailout_set); \
\
EG(bailout_set) = 1; \
memcpy(&orig_bailout, &EG(bailout), sizeof(jmp_buf)); \
if (setjmp(EG(bailout))==0)
#define zend_catch \
else
#define zend_end_try() \
memcpy(&EG(bailout), &orig_bailout, sizeof(jmp_buf)); \
EG(bailout_set) = orig_bailout_set; \
}
#define zend_first_try EG(bailout_set)=0; zend_try
ZEND_API char *get_zend_version(void);
ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_copy);
ZEND_API int zend_print_zval(zval *expr, int indent);
ZEND_API int zend_print_zval_ex(zend_write_func_t write_func, zval *expr, int indent);
ZEND_API void zend_print_zval_r(zval *expr, int indent);
ZEND_API void zend_print_zval_r_ex(zend_write_func_t write_func, zval *expr, int indent);
ZEND_API void zend_output_debug_string(zend_bool trigger_break, char *format, ...);
#if ZEND_DEBUG
#define Z_DBG(expr) (expr)
#else
#define Z_DBG(expr)
#endif
ZEND_API extern char *empty_string;
ZEND_API void free_estring(char **str_p);
#define STR_FREE(ptr) if (ptr && ptr!=empty_string) { efree(ptr); }
#define STR_FREE_REL(ptr) if (ptr && ptr!=empty_string) { efree_rel(ptr); }
#define STR_REALLOC(ptr, size) \
if (ptr!=empty_string) { \
ptr = (char *) erealloc(ptr, size); \
} else { \
ptr = (char *) emalloc(size); \
memset(ptr, 0, size); \
}
/* output support */
#define ZEND_WRITE(str, str_len) zend_write((str), (str_len))
#define ZEND_PUTS(str) zend_write((str), strlen((str)))
#define ZEND_PUTC(c) zend_write(&(c), 1), (c)
BEGIN_EXTERN_C()
extern ZEND_API int (*zend_printf)(const char *format, ...);
extern ZEND_API zend_write_func_t zend_write;
extern ZEND_API FILE *(*zend_fopen)(const char *filename, char **opened_path);
extern ZEND_API void (*zend_block_interruptions)(void);
extern ZEND_API void (*zend_unblock_interruptions)(void);
extern ZEND_API void (*zend_ticks_function)(int ticks);
extern ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
extern void (*zend_on_timeout)(int seconds TSRMLS_DC);
ZEND_API void zend_error(int type, const char *format, ...);
void zenderror(char *error);
/* The following #define is used for code duality in PHP for Engine 1 & 2 */
#define ZEND_STANDARD_CLASS_DEF_PTR zend_standard_class_def
extern ZEND_API zend_class_entry *zend_standard_class_def;
extern ZEND_API zend_utility_values zend_uv;
extern ZEND_API zval zval_used_for_init;
END_EXTERN_C()
#define ZEND_UV(name) (zend_uv.name)
#define HANDLE_BLOCK_INTERRUPTIONS() if (zend_block_interruptions) { zend_block_interruptions(); }
#define HANDLE_UNBLOCK_INTERRUPTIONS() if (zend_unblock_interruptions) { zend_unblock_interruptions(); }
BEGIN_EXTERN_C()
ZEND_API void zend_message_dispatcher(long message, void *data);
END_EXTERN_C()
ZEND_API int zend_get_configuration_directive(char *name, uint name_length, zval *contents);
/* Messages for applications of Zend */
#define ZMSG_FAILED_INCLUDE_FOPEN 1L
#define ZMSG_FAILED_REQUIRE_FOPEN 2L
#define ZMSG_FAILED_HIGHLIGHT_FOPEN 3L
#define ZMSG_MEMORY_LEAK_DETECTED 4L
#define ZMSG_MEMORY_LEAK_REPEATED 5L
#define ZMSG_LOG_SCRIPT_NAME 6L
#define ZVAL_ADDREF(pz) (++(pz)->refcount)
#define ZVAL_DELREF(pz) (--(pz)->refcount)
#define ZVAL_REFCOUNT(pz) ((pz)->refcount)
#define INIT_PZVAL(z) \
(z)->refcount = 1; \
(z)->is_ref = 0;
#define INIT_ZVAL(z) z = zval_used_for_init;
#define ALLOC_INIT_ZVAL(zp) \
ALLOC_ZVAL(zp); \
INIT_ZVAL(*zp);
#define MAKE_STD_ZVAL(zv) \
ALLOC_ZVAL(zv); \
INIT_PZVAL(zv);
#define PZVAL_IS_REF(z) ((z)->is_ref)
#define SEPARATE_ZVAL(ppzv) \
{ \
zval *orig_ptr = *(ppzv); \
\
if (orig_ptr->refcount>1) { \
orig_ptr->refcount--; \
ALLOC_ZVAL(*(ppzv)); \
**(ppzv) = *orig_ptr; \
zval_copy_ctor(*(ppzv)); \
(*(ppzv))->refcount=1; \
(*(ppzv))->is_ref = 0; \
} \
}
#define SEPARATE_ZVAL_IF_NOT_REF(ppzv) \
if (!PZVAL_IS_REF(*ppzv)) { \
SEPARATE_ZVAL(ppzv); \
}
#define SEPARATE_ZVAL_TO_MAKE_IS_REF(ppzv) \
if (!PZVAL_IS_REF(*ppzv)) { \
SEPARATE_ZVAL(ppzv); \
(*(ppzv))->is_ref = 1; \
}
#define COPY_PZVAL_TO_ZVAL(zv, pzv) \
(zv) = *(pzv); \
if ((pzv)->refcount>1) { \
zval_copy_ctor(&(zv)); \
(pzv)->refcount--; \
} else { \
FREE_ZVAL(pzv); \
} \
INIT_PZVAL(&(zv));
#define REPLACE_ZVAL_VALUE(ppzv_dest, pzv_src, copy) { \
int is_ref, refcount; \
\
SEPARATE_ZVAL_IF_NOT_REF(ppzv_dest); \
is_ref = (*ppzv_dest)->is_ref; \
refcount = (*ppzv_dest)->refcount; \
zval_dtor(*ppzv_dest); \
**ppzv_dest = *pzv_src; \
if (copy) { \
zval_copy_ctor(*ppzv_dest); \
} \
(*ppzv_dest)->is_ref = is_ref; \
(*ppzv_dest)->refcount = refcount; \
}
#define ZEND_MAX_RESERVED_RESOURCES 4
#endif /* ZEND_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

-1426
View File
File diff suppressed because it is too large. Load diff
-431
View File
@@ -1,431 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
| Andrei Zmievski <andrei@php.net> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_API_H
#define ZEND_API_H
#include "zend_modules.h"
#include "zend_list.h"
#include "zend_fast_cache.h"
#include "zend_operators.h"
#include "zend_variables.h"
#include "zend_execute.h"
BEGIN_EXTERN_C()
#define ZEND_FN(name) zif_##name
#define ZEND_NAMED_FUNCTION(name) void name(INTERNAL_FUNCTION_PARAMETERS)
#define ZEND_FUNCTION(name) ZEND_NAMED_FUNCTION(ZEND_FN(name))
#define ZEND_NAMED_FE(zend_name, name, arg_types) { #zend_name, name, arg_types },
#define ZEND_FE(name, arg_types) ZEND_NAMED_FE(name, ZEND_FN(name), arg_types)
#define ZEND_FALIAS(name, alias, arg_types) ZEND_NAMED_FE(name, ZEND_FN(alias), arg_types)
#define ZEND_STATIC_FE(name, impl_name, arg_types) { name, impl_name, arg_types },
/* Name macros */
#define ZEND_MODULE_STARTUP_N(module) zm_startup_##module
#define ZEND_MODULE_SHUTDOWN_N(module) zm_shutdown_##module
#define ZEND_MODULE_ACTIVATE_N(module) zm_activate_##module
#define ZEND_MODULE_DEACTIVATE_N(module) zm_deactivate_##module
#define ZEND_MODULE_INFO_N(module) zm_info_##module
/* Declaration macros */
#define ZEND_MODULE_STARTUP_D(module) int ZEND_MODULE_STARTUP_N(module)(INIT_FUNC_ARGS)
#define ZEND_MODULE_SHUTDOWN_D(module) int ZEND_MODULE_SHUTDOWN_N(module)(SHUTDOWN_FUNC_ARGS)
#define ZEND_MODULE_ACTIVATE_D(module) int ZEND_MODULE_ACTIVATE_N(module)(INIT_FUNC_ARGS)
#define ZEND_MODULE_DEACTIVATE_D(module) int ZEND_MODULE_DEACTIVATE_N(module)(SHUTDOWN_FUNC_ARGS)
#define ZEND_MODULE_INFO_D(module) void ZEND_MODULE_INFO_N(module)(ZEND_MODULE_INFO_FUNC_ARGS)
#define ZEND_GET_MODULE(name) \
ZEND_DLEXPORT zend_module_entry *get_module(void) { return &name##_module_entry; }
#define ZEND_BEGIN_MODULE_GLOBALS(module_name) \
typedef struct _zend_##module_name##_globals {
#define ZEND_END_MODULE_GLOBALS(module_name) \
} zend_##module_name##_globals;
#ifdef ZTS
#define ZEND_DECLARE_MODULE_GLOBALS(module_name) \
ts_rsrc_id module_name##_globals_id;
#define ZEND_EXTERN_MODULE_GLOBALS(module_name) \
extern ts_rsrc_id module_name##_globals_id;
#define ZEND_INIT_MODULE_GLOBALS(module_name, globals_ctor, globals_dtor) \
ts_allocate_id(&module_name##_globals_id, sizeof(zend_##module_name##_globals), (ts_allocate_ctor) globals_ctor, (ts_allocate_dtor) globals_dtor);
#else
#define ZEND_DECLARE_MODULE_GLOBALS(module_name) \
zend_##module_name##_globals module_name##_globals;
#define ZEND_EXTERN_MODULE_GLOBALS(module_name) \
extern zend_##module_name##_globals module_name##_globals;
#define ZEND_INIT_MODULE_GLOBALS(module_name, globals_ctor, globals_dtor) \
globals_ctor(&module_name##_globals);
#endif
#define INIT_CLASS_ENTRY(class_container, class_name, functions) INIT_OVERLOADED_CLASS_ENTRY(class_container, class_name, functions, NULL, NULL, NULL)
#define INIT_OVERLOADED_CLASS_ENTRY(class_container, class_name, functions, handle_fcall, handle_propget, handle_propset) \
{ \
class_container.name = strdup(class_name); \
class_container.name_length = sizeof(class_name)-1; \
class_container.builtin_functions = functions; \
class_container.constructor = NULL; \
class_container.destructor = NULL; \
class_container.clone = NULL; \
class_container.create_object = NULL; \
class_container.handle_function_call = handle_fcall; \
class_container.handle_property_get = handle_propget; \
class_container.handle_property_set = handle_propset; \
}
int zend_next_free_module(void);
ZEND_API int zend_get_parameters(int ht, int param_count, ...);
ZEND_API int _zend_get_parameters_array(int ht, int param_count, zval **argument_array TSRMLS_DC);
ZEND_API int zend_get_parameters_ex(int param_count, ...);
ZEND_API int _zend_get_parameters_array_ex(int param_count, zval ***argument_array TSRMLS_DC);
#define zend_get_parameters_array(ht, param_count, argument_array) \
_zend_get_parameters_array(ht, param_count, argument_array TSRMLS_CC)
#define zend_get_parameters_array_ex(param_count, argument_array) \
_zend_get_parameters_array_ex(param_count, argument_array TSRMLS_CC)
/* Parameter parsing API -- andrei */
#define ZEND_PARSE_PARAMS_QUIET 1<<1
ZEND_API int zend_parse_parameters(int num_args TSRMLS_DC, char *type_spec, ...);
ZEND_API int zend_parse_parameters_ex(int flags, int num_args TSRMLS_DC, char *type_spec, ...);
ZEND_API char *zend_zval_type_name(zval *arg);
/* End of parameter parsing API -- andrei */
int zend_register_functions(zend_function_entry *functions, HashTable *function_table, int type TSRMLS_DC);
void zend_unregister_functions(zend_function_entry *functions, int count, HashTable *function_table TSRMLS_DC);
ZEND_API int zend_register_module(zend_module_entry *module_entry);
ZEND_API zend_class_entry *zend_register_internal_class(zend_class_entry *class_entry TSRMLS_DC);
ZEND_API zend_class_entry *zend_register_internal_class_ex(zend_class_entry *class_entry, zend_class_entry *parent_ce, char *parent_name TSRMLS_DC);
ZEND_API zend_module_entry *zend_get_module(int module_number);
ZEND_API int zend_disable_function(char *function_name, uint function_name_length TSRMLS_DC);
ZEND_API void zend_wrong_param_count(TSRMLS_D);
ZEND_API zend_bool zend_is_callable(zval *callable, zend_bool syntax_only, char **callable_name);
ZEND_API char *zend_get_module_version(char *module_name);
ZEND_API zend_class_entry *zend_get_class_entry(zval *zobject);
#define getThis() (this_ptr)
#define WRONG_PARAM_COUNT ZEND_WRONG_PARAM_COUNT()
#define WRONG_PARAM_COUNT_WITH_RETVAL(ret) ZEND_WRONG_PARAM_COUNT_WITH_RETVAL(ret)
#define ARG_COUNT(dummy) (ht)
#define ZEND_NUM_ARGS() (ht)
#define ZEND_WRONG_PARAM_COUNT() { zend_wrong_param_count(TSRMLS_C); return; }
#define ZEND_WRONG_PARAM_COUNT_WITH_RETVAL(ret) { zend_wrong_param_count(TSRMLS_C); return ret; }
#ifndef ZEND_WIN32
#define DLEXPORT
#endif
ZEND_API int zend_startup_module(zend_module_entry *module);
#define array_init(arg) _array_init((arg) ZEND_FILE_LINE_CC)
#define object_init(arg) _object_init((arg) ZEND_FILE_LINE_CC TSRMLS_CC)
#define object_init_ex(arg, ce) _object_init_ex((arg), (ce) ZEND_FILE_LINE_CC TSRMLS_CC)
#define object_and_properties_init(arg, ce, properties) _object_and_properties_init((arg), (ce), (properties) ZEND_FILE_LINE_CC TSRMLS_CC)
ZEND_API int _array_init(zval *arg ZEND_FILE_LINE_DC);
ZEND_API int _object_init(zval *arg ZEND_FILE_LINE_DC TSRMLS_DC);
ZEND_API int _object_init_ex(zval *arg, zend_class_entry *ce ZEND_FILE_LINE_DC TSRMLS_DC);
ZEND_API int _object_and_properties_init(zval *arg, zend_class_entry *ce, HashTable *properties ZEND_FILE_LINE_DC TSRMLS_DC);
/* no longer supported */
ZEND_API int add_assoc_function(zval *arg, char *key, void (*function_ptr)(INTERNAL_FUNCTION_PARAMETERS));
ZEND_API int add_assoc_long_ex(zval *arg, char *key, uint key_len, long n);
ZEND_API int add_assoc_null_ex(zval *arg, char *key, uint key_len);
ZEND_API int add_assoc_bool_ex(zval *arg, char *key, uint key_len, int b);
ZEND_API int add_assoc_resource_ex(zval *arg, char *key, uint key_len, int r);
ZEND_API int add_assoc_double_ex(zval *arg, char *key, uint key_len, double d);
ZEND_API int add_assoc_string_ex(zval *arg, char *key, uint key_len, char *str, int duplicate);
ZEND_API int add_assoc_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, int duplicate);
ZEND_API int add_assoc_zval_ex(zval *arg, char *key, uint key_len, zval *value);
#define add_assoc_long(__arg, __key, __n) add_assoc_long_ex(__arg, __key, strlen(__key)+1, __n)
#define add_assoc_null(__arg, __key) add_assoc_null_ex(__arg, __key, strlen(__key) + 1)
#define add_assoc_bool(__arg, __key, __b) add_assoc_bool_ex(__arg, __key, strlen(__key)+1, __b)
#define add_assoc_resource(__arg, __key, __r) add_assoc_resource_ex(__arg, __key, strlen(__key)+1, __r)
#define add_assoc_double(__arg, __key, __d) add_assoc_double_ex(__arg, __key, strlen(__key)+1, __d)
#define add_assoc_string(__arg, __key, __str, __duplicate) add_assoc_string_ex(__arg, __key, strlen(__key)+1, __str, __duplicate)
#define add_assoc_stringl(__arg, __key, __str, __length, __duplicate) add_assoc_stringl_ex(__arg, __key, strlen(__key)+1, __str, __length, __duplicate)
#define add_assoc_zval(__arg, __key, __value) add_assoc_zval_ex(__arg, __key, strlen(__key)+1, __value)
/* unset() functions are only suported for legacy modules and null() functions should be used */
#define add_assoc_unset(__arg, __key) add_assoc_null_ex(__arg, __key, strlen(__key) + 1)
#define add_index_unset(__arg, __key) add_index_null(__arg, __key)
#define add_next_index_unset(__arg) add_next_index_null(__arg)
#define add_property_unset(__arg, __key) add_property_null(__arg, __key)
ZEND_API int add_index_long(zval *arg, uint idx, long n);
ZEND_API int add_index_null(zval *arg, uint idx);
ZEND_API int add_index_bool(zval *arg, uint idx, int b);
ZEND_API int add_index_resource(zval *arg, uint idx, int r);
ZEND_API int add_index_double(zval *arg, uint idx, double d);
ZEND_API int add_index_string(zval *arg, uint idx, char *str, int duplicate);
ZEND_API int add_index_stringl(zval *arg, uint idx, char *str, uint length, int duplicate);
ZEND_API int add_index_zval(zval *arg, uint index, zval *value);
ZEND_API int add_next_index_long(zval *arg, long n);
ZEND_API int add_next_index_null(zval *arg);
ZEND_API int add_next_index_bool(zval *arg, int b);
ZEND_API int add_next_index_resource(zval *arg, int r);
ZEND_API int add_next_index_double(zval *arg, double d);
ZEND_API int add_next_index_string(zval *arg, char *str, int duplicate);
ZEND_API int add_next_index_stringl(zval *arg, char *str, uint length, int duplicate);
ZEND_API int add_next_index_zval(zval *arg, zval *value);
ZEND_API int add_get_assoc_string_ex(zval *arg, char *key, uint key_len, char *str, void **dest, int duplicate);
ZEND_API int add_get_assoc_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, void **dest, int duplicate);
#define add_get_assoc_string(__arg, __key, __str, __dest, __duplicate) add_get_assoc_string_ex(__arg, __key, strlen(__key)+1, __str, __dest, __duplicate)
#define add_get_assoc_stringl(__arg, __key, __str, __length, __dest, __duplicate) add_get_assoc_stringl_ex(__arg, __key, strlen(__key)+1, __str, __length, __dest, __duplicate)
ZEND_API int add_get_index_long(zval *arg, uint idx, long l, void **dest);
ZEND_API int add_get_index_double(zval *arg, uint idx, double d, void **dest);
ZEND_API int add_get_index_string(zval *arg, uint idx, char *str, void **dest, int duplicate);
ZEND_API int add_get_index_stringl(zval *arg, uint idx, char *str, uint length, void **dest, int duplicate);
ZEND_API int add_property_long_ex(zval *arg, char *key, uint key_len, long l);
ZEND_API int add_property_null_ex(zval *arg, char *key, uint key_len);
ZEND_API int add_property_bool_ex(zval *arg, char *key, uint key_len, int b);
ZEND_API int add_property_resource_ex(zval *arg, char *key, uint key_len, long r);
ZEND_API int add_property_double_ex(zval *arg, char *key, uint key_len, double d);
ZEND_API int add_property_string_ex(zval *arg, char *key, uint key_len, char *str, int duplicate);
ZEND_API int add_property_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, int duplicate);
ZEND_API int add_property_zval_ex(zval *arg, char *key, uint key_len, zval *value);
#define add_property_long(__arg, __key, __n) add_property_long_ex(__arg, __key, strlen(__key)+1, __n)
#define add_property_null(__arg, __key) add_property_null_ex(__arg, __key, strlen(__key) + 1)
#define add_property_bool(__arg, __key, __b) add_property_bool_ex(__arg, __key, strlen(__key)+1, __b)
#define add_property_resource(__arg, __key, __r) add_property_resource_ex(__arg, __key, strlen(__key)+1, __r)
#define add_property_double(__arg, __key, __d) add_property_double_ex(__arg, __key, strlen(__key)+1, __d)
#define add_property_string(__arg, __key, __str, __duplicate) add_property_string_ex(__arg, __key, strlen(__key)+1, __str, __duplicate)
#define add_property_stringl(__arg, __key, __str, __length, __duplicate) add_property_stringl_ex(__arg, __key, strlen(__key)+1, __str, __length, __duplicate)
#define add_property_zval(__arg, __key, __value) add_property_zval_ex(__arg, __key, strlen(__key)+1, __value)
ZEND_API int call_user_function(HashTable *function_table, zval **object_pp, zval *function_name, zval *retval_ptr, int param_count, zval *params[] TSRMLS_DC);
ZEND_API int call_user_function_ex(HashTable *function_table, zval **object_pp, zval *function_name, zval **retval_ptr_ptr, int param_count, zval **params[], int no_separation, HashTable *symbol_table TSRMLS_DC);
ZEND_API int zend_set_hash_symbol(zval *symbol, char *name, int name_length,
zend_bool is_ref, int num_symbol_tables, ...);
#define add_method(arg, key, method) add_assoc_function((arg), (key), (method))
ZEND_API ZEND_FUNCTION(display_disabled_function);
#if ZEND_DEBUG
#define CHECK_ZVAL_STRING(z) \
if ((z)->value.str.val[ (z)->value.str.len ] != '\0') zend_error(E_WARNING, "String is not zero-terminated (%s)", (z)->value.str.val);
#define CHECK_ZVAL_STRING_REL(z) \
if ((z)->value.str.val[ (z)->value.str.len ] != '\0') zend_error(E_WARNING, "String is not zero-terminated (%s) (source: %s:%d)", (z)->value.str.val ZEND_FILE_LINE_RELAY_CC);
#else
#define CHECK_ZVAL_STRING(z)
#define CHECK_ZVAL_STRING_REL(z)
#endif
#define ZVAL_RESOURCE(z, l) { \
(z)->type = IS_RESOURCE; \
(z)->value.lval = l; \
}
#define ZVAL_BOOL(z, b) { \
(z)->type = IS_BOOL; \
(z)->value.lval = b; \
}
#define ZVAL_NULL(z) { \
(z)->type = IS_NULL; \
}
#define ZVAL_LONG(z, l) { \
(z)->type = IS_LONG; \
(z)->value.lval = l; \
}
#define ZVAL_DOUBLE(z, d) { \
(z)->type = IS_DOUBLE; \
(z)->value.dval = d; \
}
#define ZVAL_STRING(z, s, duplicate) { \
char *__s=(s); \
(z)->value.str.len = strlen(__s); \
(z)->value.str.val = (duplicate?estrndup(__s, (z)->value.str.len):__s); \
(z)->type = IS_STRING; \
}
#define ZVAL_STRINGL(z, s, l, duplicate) { \
char *__s=(s); int __l=l; \
(z)->value.str.len = __l; \
(z)->value.str.val = (duplicate?estrndup(__s, __l):__s); \
(z)->type = IS_STRING; \
}
#define ZVAL_EMPTY_STRING(z) { \
(z)->value.str.len = 0; \
(z)->value.str.val = empty_string; \
(z)->type = IS_STRING; \
}
#define ZVAL_FALSE(z) ZVAL_BOOL(z, 0)
#define ZVAL_TRUE(z) ZVAL_BOOL(z, 1)
#define RETVAL_RESOURCE(l) ZVAL_RESOURCE(return_value, l)
#define RETVAL_BOOL(b) ZVAL_BOOL(return_value, b)
#define RETVAL_NULL() ZVAL_NULL(return_value)
#define RETVAL_LONG(l) ZVAL_LONG(return_value, l)
#define RETVAL_DOUBLE(d) ZVAL_DOUBLE(return_value, d)
#define RETVAL_STRING(s, duplicate) ZVAL_STRING(return_value, s, duplicate)
#define RETVAL_STRINGL(s, l, duplicate) ZVAL_STRINGL(return_value, s, l, duplicate)
#define RETVAL_EMPTY_STRING() ZVAL_EMPTY_STRING(return_value)
#define RETVAL_FALSE ZVAL_BOOL(return_value, 0)
#define RETVAL_TRUE ZVAL_BOOL(return_value, 1)
#define RETURN_RESOURCE(l) { RETVAL_RESOURCE(l); return; }
#define RETURN_BOOL(b) { RETVAL_BOOL(b); return; }
#define RETURN_NULL() { RETVAL_NULL(); return;}
#define RETURN_LONG(l) { RETVAL_LONG(l); return; }
#define RETURN_DOUBLE(d) { RETVAL_DOUBLE(d); return; }
#define RETURN_STRING(s, duplicate) { RETVAL_STRING(s, duplicate); return; }
#define RETURN_STRINGL(s, l, duplicate) { RETVAL_STRINGL(s, l, duplicate); return; }
#define RETURN_EMPTY_STRING() { RETVAL_EMPTY_STRING(); return; }
#define RETURN_FALSE { RETVAL_FALSE; return; }
#define RETURN_TRUE { RETVAL_TRUE; return; }
#define SET_VAR_STRING(n, v) { \
{ \
zval *var; \
ALLOC_ZVAL(var); \
ZVAL_STRING(var, v, 0); \
ZEND_SET_GLOBAL_VAR(n, var); \
} \
}
#define SET_VAR_STRINGL(n, v, l) { \
{ \
zval *var; \
ALLOC_ZVAL(var); \
ZVAL_STRINGL(var, v, l, 0); \
ZEND_SET_GLOBAL_VAR(n, var); \
} \
}
#define SET_VAR_LONG(n, v) { \
{ \
zval *var; \
ALLOC_ZVAL(var); \
ZVAL_LONG(var, v); \
ZEND_SET_GLOBAL_VAR(n, var); \
} \
}
#define SET_VAR_DOUBLE(n, v) { \
{ \
zval *var; \
ALLOC_ZVAL(var); \
ZVAL_DOUBLE(var, v); \
ZEND_SET_GLOBAL_VAR(n, var); \
} \
}
#define ZEND_SET_SYMBOL(symtable, name, var) \
{ \
char *_name = (name); \
\
ZEND_SET_SYMBOL_WITH_LENGTH(symtable, _name, strlen(_name)+1, var, 1, 0); \
}
#define ZEND_SET_SYMBOL_WITH_LENGTH(symtable, name, name_length, var, _refcount, _is_ref) \
{ \
zval **orig_var; \
\
if (zend_hash_find(symtable, (name), (name_length), (void **) &orig_var)==SUCCESS \
&& PZVAL_IS_REF(*orig_var)) { \
(var)->refcount = (*orig_var)->refcount; \
(var)->is_ref = 1; \
\
if (_refcount) { \
(var)->refcount += _refcount-1; \
} \
zval_dtor(*orig_var); \
**orig_var = *(var); \
FREE_ZVAL(var); \
} else { \
(var)->is_ref = _is_ref; \
if (_refcount) { \
(var)->refcount = _refcount; \
} \
zend_hash_update(symtable, (name), (name_length), &(var), sizeof(zval *), NULL); \
} \
}
#define ZEND_SET_GLOBAL_VAR(name, var) \
ZEND_SET_SYMBOL(&EG(symbol_table), name, var)
#define ZEND_SET_GLOBAL_VAR_WITH_LENGTH(name, name_length, var, _refcount, _is_ref) \
ZEND_SET_SYMBOL_WITH_LENGTH(&EG(symbol_table), name, name_length, var, _refcount, _is_ref)
#define HASH_OF(p) ((p)->type==IS_ARRAY ? (p)->value.ht : (((p)->type==IS_OBJECT ? Z_OBJ_HT_P(p)->get_properties((p) TSRMLS_CC) : NULL)))
#define ZVAL_IS_NULL(z) ((z)->type==IS_NULL)
/* For compatibility */
#define ZEND_MINIT ZEND_MODULE_STARTUP_N
#define ZEND_MSHUTDOWN ZEND_MODULE_SHUTDOWN_N
#define ZEND_RINIT ZEND_MODULE_ACTIVATE_N
#define ZEND_RSHUTDOWN ZEND_MODULE_DEACTIVATE_N
#define ZEND_MINFO ZEND_MODULE_INFO_N
#define ZEND_MINIT_FUNCTION ZEND_MODULE_STARTUP_D
#define ZEND_MSHUTDOWN_FUNCTION ZEND_MODULE_SHUTDOWN_D
#define ZEND_RINIT_FUNCTION ZEND_MODULE_ACTIVATE_D
#define ZEND_RSHUTDOWN_FUNCTION ZEND_MODULE_DEACTIVATE_D
#define ZEND_MINFO_FUNCTION ZEND_MODULE_INFO_D
END_EXTERN_C()
#endif /* ZEND_API_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
-752
View File
@@ -1,752 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include "zend.h"
#include "zend_alloc.h"
#include "zend_globals.h"
#include "zend_fast_cache.h"
#ifdef HAVE_SIGNAL_H
# include <signal.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include "zend_mm.h"
#ifndef ZTS
ZEND_API zend_alloc_globals alloc_globals;
#endif
#ifdef ZEND_MM
#define ZEND_DISABLE_MEMORY_CACHE 1
#else
#define ZEND_DISABLE_MEMORY_CACHE 0
#endif
#ifdef ZEND_MM
#define ZEND_DO_MALLOC(size) zend_mm_alloc(&AG(mm_heap), size)
#define ZEND_DO_FREE(ptr) zend_mm_free(&AG(mm_heap), ptr)
#define ZEND_DO_REALLOC(ptr, size) zend_mm_realloc(&AG(mm_heap), ptr, size)
#elif defined(ZEND_WIN32)
#define ZEND_DO_MALLOC(size) (AG(memory_heap) ? HeapAlloc(AG(memory_heap), HEAP_NO_SERIALIZE, size) : malloc(size))
#define ZEND_DO_FREE(ptr) (AG(memory_heap) ? HeapFree(AG(memory_heap), HEAP_NO_SERIALIZE, ptr) : free(ptr))
#define ZEND_DO_REALLOC(ptr, size) (AG(memory_heap) ? HeapReAlloc(AG(memory_heap), HEAP_NO_SERIALIZE, ptr, size) : realloc(ptr, size))
#else
#define ZEND_DO_MALLOC(size) malloc(size)
#define ZEND_DO_FREE(ptr) free(ptr)
#define ZEND_DO_REALLOC(ptr, size) realloc(ptr, size)
#endif
#if ZEND_DEBUG
# define END_MAGIC_SIZE sizeof(long)
static long mem_block_end_magic = MEM_BLOCK_END_MAGIC;
#else
# define END_MAGIC_SIZE 0
#endif
# if MEMORY_LIMIT
# if ZEND_DEBUG
#define CHECK_MEMORY_LIMIT(s, rs) _CHECK_MEMORY_LIMIT(s, rs, __zend_filename, __zend_lineno)
# else
#define CHECK_MEMORY_LIMIT(s, rs) _CHECK_MEMORY_LIMIT(s, rs, NULL, 0)
# endif
#define _CHECK_MEMORY_LIMIT(s, rs, file, lineno) { AG(allocated_memory) += rs;\
if (AG(memory_limit)<AG(allocated_memory)) {\
if ((AG(memory_limit)+1048576)<AG(allocated_memory)) { \
/* failed to handle this gracefully, exit() */ \
exit(1); \
} \
if (!AG(memory_exhausted)) { \
if (!file) { \
zend_error(E_ERROR,"Allowed memory size of %d bytes exhausted (tried to allocate %d bytes)", AG(memory_limit), s); \
} else { \
zend_error(E_ERROR,"Allowed memory size of %d bytes exhausted at %s:%d (tried to allocate %d bytes)", AG(memory_limit), file, lineno, s); \
} \
AG(memory_exhausted)=1; \
} \
} \
}
# endif
#ifndef CHECK_MEMORY_LIMIT
#define CHECK_MEMORY_LIMIT(s, rs)
#endif
#define REMOVE_POINTER_FROM_LIST(p) \
if (p==AG(head)) { \
AG(head) = p->pNext; \
} else { \
p->pLast->pNext = p->pNext; \
} \
if (p->pNext) { \
p->pNext->pLast = p->pLast; \
}
#define ADD_POINTER_TO_LIST(p) \
p->pNext = AG(head); \
if (AG(head)) { \
AG(head)->pLast = p; \
} \
AG(head) = p; \
p->pLast = (zend_mem_header *) NULL;
#define DECLARE_CACHE_VARS() \
unsigned int real_size; \
unsigned int cache_index
#define REAL_SIZE(size) ((size+7) & ~0x7)
#define CALCULATE_REAL_SIZE_AND_CACHE_INDEX(size) \
real_size = REAL_SIZE(size); \
cache_index = real_size >> 3;
#define SIZE real_size
#define CACHE_INDEX cache_index
ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
zend_mem_header *p;
DECLARE_CACHE_VARS();
TSRMLS_FETCH();
CALCULATE_REAL_SIZE_AND_CACHE_INDEX(size);
if (!ZEND_DISABLE_MEMORY_CACHE && (CACHE_INDEX < MAX_CACHED_MEMORY) && (AG(cache_count)[CACHE_INDEX] > 0)) {
p = AG(cache)[CACHE_INDEX][--AG(cache_count)[CACHE_INDEX]];
#if ZEND_DEBUG
p->filename = __zend_filename;
p->lineno = __zend_lineno;
p->orig_filename = __zend_orig_filename;
p->orig_lineno = __zend_orig_lineno;
p->magic = MEM_BLOCK_START_MAGIC;
p->reported = 0;
/* Setting the thread id should not be necessary, because we fetched this block
* from this thread's cache
*/
AG(cache_stats)[CACHE_INDEX][1]++;
memcpy((((char *) p) + sizeof(zend_mem_header) + MEM_HEADER_PADDING + size), &mem_block_end_magic, sizeof(long));
#endif
p->cached = 0;
p->size = size;
return (void *)((char *)p + sizeof(zend_mem_header) + MEM_HEADER_PADDING);
} else {
#if ZEND_DEBUG
if (CACHE_INDEX<MAX_CACHED_MEMORY) {
AG(cache_stats)[CACHE_INDEX][0]++;
}
#endif
p = (zend_mem_header *) ZEND_DO_MALLOC(sizeof(zend_mem_header) + MEM_HEADER_PADDING + SIZE + END_MAGIC_SIZE);
}
HANDLE_BLOCK_INTERRUPTIONS();
if (!p) {
fprintf(stderr,"FATAL: emalloc(): Unable to allocate %ld bytes\n", (long) size);
#if ZEND_DEBUG && defined(HAVE_KILL) && defined(HAVE_GETPID)
kill(getpid(), SIGSEGV);
#else
exit(1);
#endif
HANDLE_UNBLOCK_INTERRUPTIONS();
return (void *)p;
}
p->cached = 0;
#if ZEND_DEBUG || !defined(ZEND_MM)
ADD_POINTER_TO_LIST(p);
#endif
p->size = size; /* Save real size for correct cache output */
#if ZEND_DEBUG
p->filename = __zend_filename;
p->lineno = __zend_lineno;
p->orig_filename = __zend_orig_filename;
p->orig_lineno = __zend_orig_lineno;
p->magic = MEM_BLOCK_START_MAGIC;
p->reported = 0;
# ifdef ZTS
p->thread_id = tsrm_thread_id();
# endif
memcpy((((char *) p) + sizeof(zend_mem_header) + MEM_HEADER_PADDING + size), &mem_block_end_magic, sizeof(long));
#endif
#if MEMORY_LIMIT
CHECK_MEMORY_LIMIT(size, SIZE);
if (AG(allocated_memory) > AG(allocated_memory_peak)) {
AG(allocated_memory_peak) = AG(allocated_memory);
}
#endif
HANDLE_UNBLOCK_INTERRUPTIONS();
return (void *)((char *)p + sizeof(zend_mem_header) + MEM_HEADER_PADDING);
}
ZEND_API void _efree(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
zend_mem_header *p = (zend_mem_header *) ((char *)ptr - sizeof(zend_mem_header) - MEM_HEADER_PADDING);
DECLARE_CACHE_VARS();
TSRMLS_FETCH();
#if defined(ZTS) && TSRM_DEBUG
if (p->thread_id != tsrm_thread_id()) {
tsrm_error(TSRM_ERROR_LEVEL_ERROR, "Memory block allocated at %s:(%d) on thread %x freed at %s:(%d) on thread %x, ignoring",
p->filename, p->lineno, p->thread_id,
__zend_filename, __zend_lineno, tsrm_thread_id());
return;
}
#endif
CALCULATE_REAL_SIZE_AND_CACHE_INDEX(p->size);
#if ZEND_DEBUG
if (!_mem_block_check(ptr, 1 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC)) {
return;
}
memset(ptr, 0x5a, p->size);
#endif
if (!ZEND_DISABLE_MEMORY_CACHE
&& (CACHE_INDEX < MAX_CACHED_MEMORY) && (AG(cache_count)[CACHE_INDEX] < MAX_CACHED_ENTRIES)) {
AG(cache)[CACHE_INDEX][AG(cache_count)[CACHE_INDEX]++] = p;
p->cached = 1;
#if ZEND_DEBUG
p->magic = MEM_BLOCK_CACHED_MAGIC;
#endif
return;
}
HANDLE_BLOCK_INTERRUPTIONS();
#if ZEND_DEBUG || !defined(ZEND_MM)
REMOVE_POINTER_FROM_LIST(p);
#endif
#if MEMORY_LIMIT
AG(allocated_memory) -= SIZE;
#endif
ZEND_DO_FREE(p);
HANDLE_UNBLOCK_INTERRUPTIONS();
}
ZEND_API void *_ecalloc(size_t nmemb, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
void *p;
int final_size = size*nmemb;
HANDLE_BLOCK_INTERRUPTIONS();
p = _emalloc(final_size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
if (!p) {
HANDLE_UNBLOCK_INTERRUPTIONS();
return (void *) p;
}
memset(p, 0, final_size);
HANDLE_UNBLOCK_INTERRUPTIONS();
return p;
}
ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
zend_mem_header *p;
zend_mem_header *orig;
DECLARE_CACHE_VARS();
TSRMLS_FETCH();
if (!ptr) {
return _emalloc(size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
}
p = orig = (zend_mem_header *) ((char *)ptr-sizeof(zend_mem_header)-MEM_HEADER_PADDING);
#if defined(ZTS) && TSRM_DEBUG
if (p->thread_id != tsrm_thread_id()) {
void *new_p;
tsrm_error(TSRM_ERROR_LEVEL_ERROR, "Memory block allocated at %s:(%d) on thread %x reallocated at %s:(%d) on thread %x, duplicating",
p->filename, p->lineno, p->thread_id,
__zend_filename, __zend_lineno, tsrm_thread_id());
new_p = _emalloc(size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
memcpy(new_p, ptr, p->size);
return new_p;
}
#endif
CALCULATE_REAL_SIZE_AND_CACHE_INDEX(size);
HANDLE_BLOCK_INTERRUPTIONS();
#if ZEND_DEBUG || !defined(ZEND_MM)
REMOVE_POINTER_FROM_LIST(p);
#endif
p = (zend_mem_header *) ZEND_DO_REALLOC(p, sizeof(zend_mem_header)+MEM_HEADER_PADDING+SIZE+END_MAGIC_SIZE);
if (!p) {
if (!allow_failure) {
fprintf(stderr,"FATAL: erealloc(): Unable to allocate %ld bytes\n", (long) size);
#if ZEND_DEBUG && HAVE_KILL && HAVE_GETPID
kill(getpid(), SIGSEGV);
#else
exit(1);
#endif
}
#if ZEND_DEBUG || !defined(ZEND_MM)
ADD_POINTER_TO_LIST(orig);
#endif
HANDLE_UNBLOCK_INTERRUPTIONS();
return (void *)NULL;
}
#if ZEND_DEBUG || !defined(ZEND_MM)
ADD_POINTER_TO_LIST(p);
#endif
#if ZEND_DEBUG
p->filename = __zend_filename;
p->lineno = __zend_lineno;
p->magic = MEM_BLOCK_START_MAGIC;
memcpy((((char *) p) + sizeof(zend_mem_header) + MEM_HEADER_PADDING + size), &mem_block_end_magic, sizeof(long));
#endif
#if MEMORY_LIMIT
CHECK_MEMORY_LIMIT(size - p->size, SIZE - REAL_SIZE(p->size));
if (AG(allocated_memory) > AG(allocated_memory_peak)) {
AG(allocated_memory_peak) = AG(allocated_memory);
}
#endif
p->size = size;
HANDLE_UNBLOCK_INTERRUPTIONS();
return (void *)((char *)p+sizeof(zend_mem_header)+MEM_HEADER_PADDING);
}
ZEND_API char *_estrdup(const char *s ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
int length;
char *p;
length = strlen(s)+1;
HANDLE_BLOCK_INTERRUPTIONS();
p = (char *) _emalloc(length ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
if (!p) {
HANDLE_UNBLOCK_INTERRUPTIONS();
return (char *)NULL;
}
HANDLE_UNBLOCK_INTERRUPTIONS();
memcpy(p, s, length);
return p;
}
ZEND_API char *_estrndup(const char *s, uint length ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
char *p;
HANDLE_BLOCK_INTERRUPTIONS();
p = (char *) _emalloc(length+1 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
if (!p) {
HANDLE_UNBLOCK_INTERRUPTIONS();
return (char *)NULL;
}
HANDLE_UNBLOCK_INTERRUPTIONS();
memcpy(p, s, length);
p[length] = 0;
return p;
}
ZEND_API char *zend_strndup(const char *s, uint length)
{
char *p;
p = (char *) malloc(length+1);
if (!p) {
return (char *)NULL;
}
if (length) {
memcpy(p, s, length);
}
p[length] = 0;
return p;
}
ZEND_API int zend_set_memory_limit(unsigned int memory_limit)
{
#if MEMORY_LIMIT
TSRMLS_FETCH();
AG(memory_limit) = memory_limit;
return SUCCESS;
#else
return FAILURE;
#endif
}
ZEND_API void start_memory_manager(TSRMLS_D)
{
AG(head) = NULL;
#if MEMORY_LIMIT
AG(memory_limit) = 1<<30; /* ridiculous limit, effectively no limit */
AG(allocated_memory) = 0;
AG(memory_exhausted) = 0;
AG(allocated_memory_peak) = 0;
#endif
#if ZEND_ENABLE_FAST_CACHE
memset(AG(fast_cache_list_head), 0, sizeof(AG(fast_cache_list_head)));
#endif
#if !ZEND_DISABLE_MEMORY_CACHE
memset(AG(cache_count), 0, sizeof(AG(cache_count)));
#endif
#ifdef ZEND_MM
zend_mm_startup(&AG(mm_heap), 256*1024);
#elif defined(ZEND_WIN32)
AG(memory_heap) = HeapCreate(HEAP_NO_SERIALIZE, 256*1024, 0);
#endif
#if ZEND_DEBUG
memset(AG(cache_stats), 0, sizeof(AG(cache_stats)));
memset(AG(fast_cache_stats), 0, sizeof(AG(fast_cache_stats)));
#endif
}
ZEND_API void shutdown_memory_manager(int silent, int clean_cache TSRMLS_DC)
{
zend_mem_header *p, *t;
#if ZEND_DEBUG
int had_leaks = 0;
#endif
#if defined(ZEND_MM) && !ZEND_DEBUG
if (clean_cache) {
zend_mm_shutdown(&AG(mm_heap));
return;
}
#elif defined(ZEND_WIN32) && !ZEND_DEBUG
if (clean_cache && AG(memory_heap)) {
HeapDestroy(AG(memory_heap));
return;
}
#endif
#if ZEND_ENABLE_FAST_CACHE
{
zend_fast_cache_list_entry *fast_cache_list_entry, *next_fast_cache_list_entry;
unsigned int fci;
for (fci=0; fci<MAX_FAST_CACHE_TYPES; fci++) {
fast_cache_list_entry = AG(fast_cache_list_head)[fci];
while (fast_cache_list_entry) {
next_fast_cache_list_entry = fast_cache_list_entry->next;
efree(fast_cache_list_entry);
fast_cache_list_entry = next_fast_cache_list_entry;
}
AG(fast_cache_list_head)[fci] = NULL;
}
}
#endif /* ZEND_ENABLE_FAST_CACHE */
#if !ZEND_DISABLE_MEMORY_CACHE
if (1 || clean_cache) {
unsigned int i, j;
zend_mem_header *ptr;
for (i=1; i<MAX_CACHED_MEMORY; i++) {
for (j=0; j<AG(cache_count)[i]; j++) {
ptr = (zend_mem_header *) AG(cache)[i][j];
#if MEMORY_LIMIT
AG(allocated_memory) -= REAL_SIZE(ptr->size);
#endif
REMOVE_POINTER_FROM_LIST(ptr);
ZEND_DO_FREE(ptr);
}
AG(cache_count)[i] = 0;
}
}
#endif /* !ZEND_DISABLE_MEMORY_CACHE */
#if ZEND_DEBUG || !defined(ZEND_MM)
p = AG(head);
t = AG(head);
while (t) {
if (!t->cached) {
#if ZEND_DEBUG
if (!t->cached && !t->reported) {
zend_mem_header *iterator;
int total_leak=0, total_leak_count=0;
had_leaks = 1;
if (!silent) {
zend_message_dispatcher(ZMSG_MEMORY_LEAK_DETECTED, t);
}
t->reported = 1;
for (iterator=t->pNext; iterator; iterator=iterator->pNext) {
if (!iterator->cached
&& iterator->filename==t->filename
&& iterator->lineno==t->lineno) {
total_leak += iterator->size;
total_leak_count++;
iterator->reported = 1;
}
}
if (!silent && total_leak_count>0) {
zend_message_dispatcher(ZMSG_MEMORY_LEAK_REPEATED, (void *) (long) (total_leak_count));
}
}
#endif
#if MEMORY_LIMIT
AG(allocated_memory) -= REAL_SIZE(t->size);
#endif
p = t->pNext;
REMOVE_POINTER_FROM_LIST(t);
ZEND_DO_FREE(t);
t = p;
} else {
t = t->pNext;
}
}
#if MEMORY_LIMIT
AG(memory_exhausted)=0;
AG(allocated_memory_peak) = 0;
#endif
#if (ZEND_DEBUG)
do {
zval display_memory_cache_stats;
int i, j;
if (clean_cache) {
/* we're shutting down completely, don't even touch the INI subsystem */
break;
}
if (zend_get_configuration_directive("display_memory_cache_stats", sizeof("display_memory_cache_stats"), &display_memory_cache_stats)==FAILURE) {
break;
}
if (!atoi(display_memory_cache_stats.value.str.val)) {
break;
}
fprintf(stderr, "Memory cache statistics\n"
"-----------------------\n\n"
"[zval, %2ld]\t\t%d / %d (%.2f%%)\n"
"[hash, %2ld]\t\t%d / %d (%.2f%%)\n",
(long) sizeof(zval),
AG(fast_cache_stats)[ZVAL_CACHE_LIST][1], AG(fast_cache_stats)[ZVAL_CACHE_LIST][0]+AG(fast_cache_stats)[ZVAL_CACHE_LIST][1],
((double) AG(fast_cache_stats)[ZVAL_CACHE_LIST][1] / (AG(fast_cache_stats)[ZVAL_CACHE_LIST][0]+AG(fast_cache_stats)[ZVAL_CACHE_LIST][1]))*100,
(long) sizeof(HashTable),
AG(fast_cache_stats)[HASHTABLE_CACHE_LIST][1], AG(fast_cache_stats)[HASHTABLE_CACHE_LIST][0]+AG(fast_cache_stats)[HASHTABLE_CACHE_LIST][1],
((double) AG(fast_cache_stats)[HASHTABLE_CACHE_LIST][1] / (AG(fast_cache_stats)[HASHTABLE_CACHE_LIST][0]+AG(fast_cache_stats)[HASHTABLE_CACHE_LIST][1]))*100);
for (i=0; i<MAX_CACHED_MEMORY; i+=2) {
fprintf(stderr, "[%2d, %2d]\t\t", i, i+1);
for (j=0; j<2; j++) {
fprintf(stderr, "%d / %d (%.2f%%)\t\t",
AG(cache_stats)[i+j][1], AG(cache_stats)[i+j][0]+AG(cache_stats)[i+j][1],
((double) AG(cache_stats)[i+j][1] / (AG(cache_stats)[i+j][0]+AG(cache_stats)[i+j][1]))*100);
}
fprintf(stderr, "\n");
}
} while (0);
#endif
#endif
#if defined(ZEND_MM) && ZEND_DEBUG
if (clean_cache) {
zend_mm_shutdown(&AG(mm_heap));
return;
}
#elif defined(ZEND_WIN32) && ZEND_DEBUG
if (clean_cache && AG(memory_heap)) {
HeapDestroy(AG(memory_heap));
return;
}
#endif
}
#if ZEND_DEBUG
void zend_debug_alloc_output(char *format, ...)
{
char output_buf[256];
va_list args;
va_start(args, format);
vsprintf(output_buf, format, args);
va_end(args);
#ifdef ZEND_WIN32
OutputDebugString(output_buf);
#else
fprintf(stderr, "%s", output_buf);
#endif
}
ZEND_API int _mem_block_check(void *ptr, int silent ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
zend_mem_header *p = (zend_mem_header *) ((char *)ptr - sizeof(zend_mem_header) - MEM_HEADER_PADDING);
int no_cache_notice=0;
int valid_beginning=1;
int had_problems=0;
long end_magic;
if (silent==2) {
silent = 1;
no_cache_notice = 1;
}
if (silent==3) {
silent = 0;
no_cache_notice = 1;
}
if (!silent) {
zend_message_dispatcher(ZMSG_LOG_SCRIPT_NAME, NULL);
zend_debug_alloc_output("---------------------------------------\n");
zend_debug_alloc_output("%s(%d) : Block 0x%0.8lX status:\n" ZEND_FILE_LINE_RELAY_CC, (long) p);
if (__zend_orig_filename) {
zend_debug_alloc_output("%s(%d) : Actual location (location was relayed)\n" ZEND_FILE_LINE_ORIG_RELAY_CC);
}
zend_debug_alloc_output("%10s\t","Beginning: ");
}
switch (p->magic) {
case MEM_BLOCK_START_MAGIC:
if (!silent) {
zend_debug_alloc_output("OK (allocated on %s:%d, %d bytes)\n", p->filename, p->lineno, p->size);
}
break; /* ok */
case MEM_BLOCK_FREED_MAGIC:
if (!silent) {
zend_debug_alloc_output("Freed\n");
had_problems = 1;
} else {
return _mem_block_check(ptr, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
}
break;
case MEM_BLOCK_CACHED_MAGIC:
if (!silent) {
if (!no_cache_notice) {
zend_debug_alloc_output("Cached (allocated on %s:%d, %d bytes)\n", p->filename, p->lineno, p->size);
had_problems = 1;
}
} else {
if (!no_cache_notice) {
return _mem_block_check(ptr, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
}
}
break;
default:
if (!silent) {
zend_debug_alloc_output("Overrun (magic=0x%0.8lX, expected=0x%0.8lX)\n", p->magic, MEM_BLOCK_START_MAGIC);
} else {
return _mem_block_check(ptr, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
}
had_problems = 1;
valid_beginning = 0;
break;
}
memcpy(&end_magic, (((char *) p)+sizeof(zend_mem_header)+MEM_HEADER_PADDING+p->size), sizeof(long));
if (valid_beginning && (end_magic != MEM_BLOCK_END_MAGIC)) {
char *overflow_ptr, *magic_ptr=(char *) &mem_block_end_magic;
int overflows=0;
int i;
if (silent) {
return _mem_block_check(ptr, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
}
had_problems = 1;
overflow_ptr = (char *) &end_magic;
for (i=0; i<sizeof(long); i++) {
if (overflow_ptr[i]!=magic_ptr[i]) {
overflows++;
}
}
zend_debug_alloc_output("%10s\t", "End:");
zend_debug_alloc_output("Overflown (magic=0x%0.8lX instead of 0x%0.8lX)\n", end_magic, MEM_BLOCK_END_MAGIC);
zend_debug_alloc_output("%10s\t","");
if (overflows>=sizeof(long)) {
zend_debug_alloc_output("At least %d bytes overflown\n", sizeof(long));
} else {
zend_debug_alloc_output("%d byte(s) overflown\n", overflows);
}
} else if (!silent) {
zend_debug_alloc_output("%10s\t", "End:");
if (valid_beginning) {
zend_debug_alloc_output("OK\n");
} else {
zend_debug_alloc_output("Unknown\n");
}
}
if (had_problems) {
int foo = 5;
foo += 1;
}
if (!silent) {
zend_debug_alloc_output("---------------------------------------\n");
}
return ((!had_problems) ? 1 : 0);
}
ZEND_API void _full_mem_check(int silent ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
zend_mem_header *p;
int errors=0;
TSRMLS_FETCH();
p = AG(head);
zend_debug_alloc_output("------------------------------------------------\n");
zend_debug_alloc_output("Full Memory Check at %s:%d\n" ZEND_FILE_LINE_RELAY_CC);
while (p) {
if (!_mem_block_check((void *)((char *)p + sizeof(zend_mem_header) + MEM_HEADER_PADDING), (silent?2:3) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC)) {
errors++;
}
p = p->pNext;
}
zend_debug_alloc_output("End of full memory check %s:%d (%d errors)\n" ZEND_FILE_LINE_RELAY_CC, errors);
zend_debug_alloc_output("------------------------------------------------\n");
}
#endif
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
-141
View File
@@ -1,141 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_ALLOC_H
#define ZEND_ALLOC_H
#include <stdio.h>
#include "../TSRM/TSRM.h"
#include "zend_globals_macros.h"
#include "zend_mm.h"
#define MEM_BLOCK_START_MAGIC 0x7312F8DCL
#define MEM_BLOCK_END_MAGIC 0x2A8FCC84L
#define MEM_BLOCK_FREED_MAGIC 0x99954317L
#define MEM_BLOCK_CACHED_MAGIC 0xFB8277DCL
typedef struct _zend_mem_header {
#if ZEND_DEBUG
long magic;
char *filename;
uint lineno;
int reported;
char *orig_filename;
uint orig_lineno;
# ifdef ZTS
THREAD_T thread_id;
# endif
#endif
#if ZEND_DEBUG || !defined(ZEND_MM)
struct _zend_mem_header *pNext;
struct _zend_mem_header *pLast;
#endif
unsigned int size:31;
unsigned int cached:1;
} zend_mem_header;
typedef union _align_test {
void *ptr;
double dbl;
long lng;
} align_test;
#define MAX_CACHED_MEMORY 11
#define MAX_CACHED_ENTRIES 256
#define PRE_INIT_CACHE_ENTRIES 32
#if (defined (__GNUC__) && __GNUC__ >= 2)
#define PLATFORM_ALIGNMENT (__alignof__ (align_test))
#else
#define PLATFORM_ALIGNMENT (sizeof(align_test))
#endif
#define MEM_HEADER_PADDING (((PLATFORM_ALIGNMENT-sizeof(zend_mem_header))%PLATFORM_ALIGNMENT+PLATFORM_ALIGNMENT)%PLATFORM_ALIGNMENT)
BEGIN_EXTERN_C()
ZEND_API char *zend_strndup(const char *s, unsigned int length);
ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
ZEND_API void _efree(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
ZEND_API void *_ecalloc(size_t nmemb, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
ZEND_API char *_estrdup(const char *s ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
ZEND_API char *_estrndup(const char *s, unsigned int length ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
/* Standard wrapper macros */
#define emalloc(size) _emalloc((size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
#define efree(ptr) _efree((ptr) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
#define ecalloc(nmemb, size) _ecalloc((nmemb), (size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
#define erealloc(ptr, size) _erealloc((ptr), (size), 0 ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
#define erealloc_recoverable(ptr, size) _erealloc((ptr), (size), 1 ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
#define estrdup(s) _estrdup((s) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
#define estrndup(s, length) _estrndup((s), (length) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
/* Relay wrapper macros */
#define emalloc_rel(size) _emalloc((size) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
#define efree_rel(ptr) _efree((ptr) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
#define ecalloc_rel(nmemb, size) _ecalloc((nmemb), (size) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
#define erealloc_rel(ptr, size) _erealloc((ptr), (size), 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
#define erealloc_recoverable_rel(ptr, size) _erealloc((ptr), (size), 1 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
#define estrdup_rel(s) _estrdup((s) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
#define estrndup_rel(s, length) _estrndup((s), (length) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
/* Selective persistent/non persistent allocation macros */
#define pemalloc(size, persistent) ((persistent)?malloc(size):emalloc(size))
#define pefree(ptr, persistent) ((persistent)?free(ptr):efree(ptr))
#define pecalloc(nmemb, size, persistent) ((persistent)?calloc((nmemb), (size)):ecalloc((nmemb), (size)))
#define perealloc(ptr, size, persistent) ((persistent)?realloc((ptr), (size)):erealloc((ptr), (size)))
#define perealloc_recoverable(ptr, size, persistent) ((persistent)?realloc((ptr), (size)):erealloc_recoverable((ptr), (size)))
#define pestrdup(s, persistent) ((persistent)?strdup(s):estrdup(s))
#define safe_estrdup(ptr) ((ptr)?(estrdup(ptr)):(empty_string))
#define safe_estrndup(ptr, len) ((ptr)?(estrndup((ptr), (len))):(empty_string))
ZEND_API int zend_set_memory_limit(unsigned int memory_limit);
ZEND_API void start_memory_manager(TSRMLS_D);
ZEND_API void shutdown_memory_manager(int silent, int clean_cache TSRMLS_DC);
#if ZEND_DEBUG
ZEND_API int _mem_block_check(void *ptr, int silent ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
ZEND_API void _full_mem_check(int silent ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
void zend_debug_alloc_output(char *format, ...);
#define mem_block_check(ptr, silent) _mem_block_check(ptr, silent ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
#define full_mem_check(silent) _full_mem_check(silent ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
#else
#define mem_block_check(type, ptr, silent)
#define full_mem_check(silent)
#endif
END_EXTERN_C()
#endif
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
File diff suppressed because it is too large. Load diff
-26
View File
@@ -1,26 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_BUILTIN_FUNCTIONS_H
#define ZEND_BUILTIN_FUNCTIONS_H
int zend_startup_builtin_functions(TSRMLS_D);
#endif /* ZEND_BUILTIN_FUNCTIONS_H */
-3088
View File
File diff suppressed because it is too large. Load diff
-723
View File
@@ -1,723 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_COMPILE_H
#define ZEND_COMPILE_H
#include "zend.h"
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#endif
#include "zend_llist.h"
#define DEBUG_ZEND 0
#define FREE_PNODE(znode) zval_dtor(&znode->u.constant);
#define FREE_OP(Ts, op, should_free) if (should_free) zval_dtor(should_free);
#define SET_UNUSED(op) (op).op_type = IS_UNUSED
#define INC_BPC(op_array) if (CG(interactive)) { ((op_array)->backpatch_count++); }
#define DEC_BPC(op_array) if (CG(interactive)) { ((op_array)->backpatch_count--); }
#define HANDLE_INTERACTIVE() if (CG(interactive)) { execute_new_code(TSRMLS_C); }
typedef struct _zend_op_array zend_op_array;
typedef struct _zend_op zend_op;
typedef struct _znode {
int op_type;
zend_llist *throw_list; /* Try and save this space later on */
union {
zval constant;
zend_uint var;
zend_uint opline_num; /* Needs to be signed */
zend_op_array *op_array;
zend_class_entry *previously_active_class_entry; /* Used at compile-time */
zend_op *jmp_addr;
struct {
zend_uint var; /* dummy */
zend_uint type;
} EA;
} u;
} znode;
typedef struct _zend_execute_data zend_execute_data;
#define ZEND_OPCODE_HANDLER_ARGS zend_execute_data *execute_data, zend_op_array *op_array TSRMLS_DC
#define ZEND_OPCODE_HANDLER_ARGS_PASSTHRU execute_data, op_array TSRMLS_CC
typedef int (*opcode_handler_t) (ZEND_OPCODE_HANDLER_ARGS);
extern opcode_handler_t zend_opcode_handlers[512];
struct _zend_op {
opcode_handler_t handler;
znode result;
znode op1;
znode op2;
ulong extended_value;
uint lineno;
zend_uchar opcode;
};
typedef struct _zend_brk_cont_element {
int cont;
int brk;
int parent;
} zend_brk_cont_element;
struct _zend_op_array {
zend_uchar type; /* MUST be the first element of this struct! */
zend_uchar *arg_types; /* MUST be the second element of this struct! */
char *function_name; /* MUST be the third element of this struct! */
zend_class_entry *scope; /* MUST be the fourth element of this struct! */
zend_bool is_static; /* MUST be the fifth element of this struct! */
zend_uint *refcount;
zend_op *opcodes;
zend_uint last, size;
zend_uint T;
zend_brk_cont_element *brk_cont_array;
zend_uint last_brk_cont;
zend_uint current_brk_cont;
/* static variables support */
HashTable *static_variables;
zend_op *start_op;
int backpatch_count;
zend_bool return_reference;
zend_bool done_pass_two;
zend_bool uses_this;
char *filename;
void *reserved[ZEND_MAX_RESERVED_RESOURCES];
};
typedef struct _zend_internal_function {
zend_uchar type; /* MUST be the first element of this struct! */
zend_uchar *arg_types; /* MUST be the second element of this struct! */
char *function_name; /* MUST be the third element of this struct! */
zend_class_entry *scope; /* MUST be the fourth element of this struct! */
zend_bool is_static; /* MUST be the fifth element of this struct! */
void (*handler)(INTERNAL_FUNCTION_PARAMETERS);
} zend_internal_function;
typedef union _zend_function {
zend_uchar type; /* MUST be the first element of this struct! */
struct {
zend_uchar type; /* never used */
zend_uchar *arg_types;
char *function_name;
zend_class_entry *scope;
zend_bool is_static;
} common;
zend_op_array op_array;
zend_internal_function internal_function;
} zend_function;
typedef struct _zend_function_state {
HashTable *function_symbol_table;
zend_function *function;
void *reserved[ZEND_MAX_RESERVED_RESOURCES];
} zend_function_state;
typedef struct _zend_switch_entry {
znode cond;
int default_case;
int control_var;
} zend_switch_entry;
typedef struct _list_llist_element {
znode var;
zend_llist dimensions;
znode value;
} list_llist_element;
typedef struct _zend_file_handle {
zend_uchar type;
char *filename;
char *opened_path;
union {
int fd;
FILE *fp;
} handle;
zend_bool free_filename;
} zend_file_handle;
union _temp_variable;
struct _zend_execute_data {
struct _zend_op *opline;
zend_function_state function_state;
zend_function *fbc; /* Function Being Called */
zend_function *fbc_constructor;
zend_op_array *op_array;
zval *object;
union _temp_variable *Ts;
zend_bool original_in_execution;
zend_class_entry *calling_scope;
struct _zend_execute_data *prev_execute_data;
};
#define EX(element) execute_data.element
#define IS_CONST (1<<0)
#define IS_TMP_VAR (1<<1)
#define IS_VAR (1<<2)
#define IS_UNUSED (1<<3) /* Unused variable */
#define EXT_TYPE_UNUSED (1<<0)
#include "zend_globals.h"
BEGIN_EXTERN_C()
void init_compiler(TSRMLS_D);
void shutdown_compiler(TSRMLS_D);
void zend_init_compiler_data_structures(TSRMLS_D);
extern ZEND_API zend_op_array *(*zend_compile_file)(zend_file_handle *file_handle, int type TSRMLS_DC);
void zend_activate(TSRMLS_D);
void zend_deactivate(TSRMLS_D);
void zend_activate_modules(TSRMLS_D);
void zend_deactivate_modules(TSRMLS_D);
ZEND_API int lex_scan(zval *zendlval TSRMLS_DC);
void startup_scanner(TSRMLS_D);
void shutdown_scanner(TSRMLS_D);
ZEND_API char *zend_set_compiled_filename(char *new_compiled_filename TSRMLS_DC);
ZEND_API void zend_restore_compiled_filename(char *original_compiled_filename TSRMLS_DC);
ZEND_API char *zend_get_compiled_filename(TSRMLS_D);
ZEND_API int zend_get_compiled_lineno(TSRMLS_D);
#ifdef ZTS
const char *zend_get_zendtext(TSRMLS_D);
int zend_get_zendleng(TSRMLS_D);
#endif
/* parser-driven code generators */
void zend_do_binary_op(zend_uchar op, znode *result, znode *op1, znode *op2 TSRMLS_DC);
void zend_do_unary_op(zend_uchar op, znode *result, znode *op1 TSRMLS_DC);
void zend_do_binary_assign_op(zend_uchar op, znode *result, znode *op1, znode *op2 TSRMLS_DC);
void zend_do_assign(znode *result, znode *variable, znode *value TSRMLS_DC);
void zend_do_assign_ref(znode *result, znode *lvar, znode *rvar TSRMLS_DC);
void fetch_simple_variable(znode *result, znode *varname, int bp TSRMLS_DC);
void fetch_simple_variable_ex(znode *result, znode *varname, int bp, zend_uchar op TSRMLS_DC);
void zend_do_indirect_references(znode *result, znode *num_references, znode *variable TSRMLS_DC);
void zend_do_fetch_static_variable(znode *varname, znode *static_assignment, int fetch_type TSRMLS_DC);
void zend_do_fetch_global_variable(znode *varname, znode *static_assignment, int fetch_type TSRMLS_DC);
void fetch_array_begin(znode *result, znode *varname, znode *first_dim TSRMLS_DC);
void fetch_array_dim(znode *result, znode *parent, znode *dim TSRMLS_DC);
void fetch_string_offset(znode *result, znode *parent, znode *offset TSRMLS_DC);
void zend_do_fetch_static_member(znode *class_znode TSRMLS_DC);
void zend_do_print(znode *result, znode *arg TSRMLS_DC);
void zend_do_echo(znode *arg TSRMLS_DC);
typedef int (*unary_op_type)(zval *, zval *);
ZEND_API unary_op_type get_unary_op(int opcode);
ZEND_API void *get_binary_op(int opcode);
void zend_do_while_cond(znode *expr, znode *close_bracket_token TSRMLS_DC);
void zend_do_while_end(znode *while_token, znode *close_bracket_token TSRMLS_DC);
void zend_do_do_while_begin(TSRMLS_D);
void zend_do_do_while_end(znode *do_token, znode *expr_open_bracket, znode *expr TSRMLS_DC);
void zend_do_if_cond(znode *cond, znode *closing_bracket_token TSRMLS_DC);
void zend_do_if_after_statement(znode *closing_bracket_token, unsigned char initialize TSRMLS_DC);
void zend_do_if_end(TSRMLS_D);
void zend_do_for_cond(znode *expr, znode *second_semicolon_token TSRMLS_DC);
void zend_do_for_before_statement(znode *cond_start, znode *second_semicolon_token TSRMLS_DC);
void zend_do_for_end(znode *second_semicolon_token TSRMLS_DC);
void zend_do_pre_incdec(znode *result, znode *op1, zend_uchar op TSRMLS_DC);
void zend_do_post_incdec(znode *result, znode *op1, zend_uchar op TSRMLS_DC);
void zend_do_begin_variable_parse(TSRMLS_D);
void zend_do_end_variable_parse(int type, int arg_offset TSRMLS_DC);
void zend_check_writable_variable(znode *variable);
void zend_do_free(znode *op1 TSRMLS_DC);
void zend_do_init_string(znode *result TSRMLS_DC);
void zend_do_add_char(znode *result, znode *op1, znode *op2 TSRMLS_DC);
void zend_do_add_string(znode *result, znode *op1, znode *op2 TSRMLS_DC);
void zend_do_add_variable(znode *result, znode *op1, znode *op2 TSRMLS_DC);
void zend_do_begin_function_declaration(znode *function_token, znode *function_name, int is_method, int return_reference, int is_static TSRMLS_DC);
void zend_do_end_function_declaration(znode *function_token TSRMLS_DC);
void zend_do_receive_arg(zend_uchar op, znode *var, znode *offset, znode *initialization, zend_uchar pass_type TSRMLS_DC);
int zend_do_begin_function_call(znode *function_name TSRMLS_DC);
void zend_do_begin_method_call(znode *left_bracket TSRMLS_DC);
void zend_do_begin_dynamic_function_call(znode *function_name TSRMLS_DC);
void do_fetch_class(znode *result, znode *class_entry, znode *class_name TSRMLS_DC);
void do_fetch_class_name(znode *result, znode *class_entry, znode *class_name, zend_bool case_sensitive TSRMLS_DC);
void zend_do_begin_class_member_function_call(znode *class_name, znode *function_name TSRMLS_DC);
void zend_do_end_function_call(znode *function_name, znode *result, znode *argument_list, int is_method, int is_dynamic_fcall TSRMLS_DC);
void zend_do_return(znode *expr, int do_end_vparse TSRMLS_DC);
void zend_do_try(znode *try_token TSRMLS_DC);
void zend_do_begin_catch(znode *try_token, znode *catch_class, znode *catch_var, zend_bool first_catch TSRMLS_DC);
void zend_do_end_catch(znode *try_token TSRMLS_DC);
void zend_do_throw(znode *expr TSRMLS_DC);
ZEND_API int do_bind_function(zend_op *opline, HashTable *function_table, HashTable *class_table, int compile_time);
ZEND_API int do_bind_class(zend_op *opline, HashTable *function_table, HashTable *class_table);
ZEND_API int do_bind_inherited_class(zend_op *opline, HashTable *function_table, HashTable *class_table, zend_class_entry *parent_ce);
void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce);
void zend_do_early_binding(TSRMLS_D);
void zend_do_pass_param(znode *param, zend_uchar op, int offset TSRMLS_DC);
void zend_do_boolean_or_begin(znode *expr1, znode *op_token TSRMLS_DC);
void zend_do_boolean_or_end(znode *result, znode *expr1, znode *expr2, znode *op_token TSRMLS_DC);
void zend_do_boolean_and_begin(znode *expr1, znode *op_token TSRMLS_DC);
void zend_do_boolean_and_end(znode *result, znode *expr1, znode *expr2, znode *op_token TSRMLS_DC);
void zend_do_brk_cont(zend_uchar op, znode *expr TSRMLS_DC);
void zend_do_switch_cond(znode *cond TSRMLS_DC);
void zend_do_switch_end(znode *case_list TSRMLS_DC);
void zend_do_case_before_statement(znode *case_list, znode *case_token, znode *case_expr TSRMLS_DC);
void zend_do_case_after_statement(znode *result, znode *case_token TSRMLS_DC);
void zend_do_default_before_statement(znode *case_list, znode *default_token TSRMLS_DC);
void zend_do_begin_class_declaration(znode *class_token, znode *class_name, znode *parent_class_name TSRMLS_DC);
void zend_do_end_class_declaration(znode *class_token TSRMLS_DC);
void zend_do_declare_property(znode *var_name, znode *value, int declaration_type TSRMLS_DC);
void zend_do_fetch_property(znode *result, znode *object, znode *property TSRMLS_DC);
void zend_do_push_object(znode *object TSRMLS_DC);
void zend_do_pop_object(znode *object TSRMLS_DC);
void zend_do_begin_new_object(znode *new_token, znode *class_type TSRMLS_DC);
void zend_do_end_new_object(znode *result, znode *new_token, znode *argument_list TSRMLS_DC);
void zend_do_fetch_constant(znode *result, znode *constant_container, znode *constant_name, int mode TSRMLS_DC);
void zend_do_shell_exec(znode *result, znode *cmd TSRMLS_DC);
void zend_do_init_array(znode *result, znode *expr, znode *offset, zend_bool is_ref TSRMLS_DC);
void zend_do_add_array_element(znode *result, znode *expr, znode *offset, zend_bool is_ref TSRMLS_DC);
void zend_do_add_static_array_element(znode *result, znode *offset, znode *expr);
void zend_do_list_init(TSRMLS_D);
void zend_do_list_end(znode *result, znode *expr TSRMLS_DC);
void zend_do_add_list_element(znode *element TSRMLS_DC);
void zend_do_new_list_begin(TSRMLS_D);
void zend_do_new_list_end(TSRMLS_D);
void zend_do_cast(znode *result, znode *expr, int type TSRMLS_DC);
void zend_do_include_or_eval(int type, znode *result, znode *op1 TSRMLS_DC);
void zend_do_unset(znode *variable TSRMLS_DC);
void zend_do_isset_or_isempty(int type, znode *result, znode *variable TSRMLS_DC);
void zend_do_is_class(znode *result, znode *expr, znode *class_znode, int type TSRMLS_DC);
void zend_do_foreach_begin(znode *foreach_token, znode *array, znode *open_brackets_token, znode *as_token, int variable TSRMLS_DC);
void zend_do_foreach_cont(znode *value, znode *key, znode *as_token TSRMLS_DC);
void zend_do_foreach_end(znode *foreach_token, znode *open_brackets_token TSRMLS_DC);
void zend_do_declare_begin(TSRMLS_D);
void zend_do_declare_stmt(znode *var, znode *val TSRMLS_DC);
void zend_do_declare_end(znode *declare_token TSRMLS_DC);
void zend_do_end_heredoc(TSRMLS_D);
void zend_do_exit(znode *result, znode *message TSRMLS_DC);
void zend_do_begin_silence(znode *strudel_token TSRMLS_DC);
void zend_do_end_silence(znode *strudel_token TSRMLS_DC);
void zend_do_begin_qm_op(znode *cond, znode *qm_token TSRMLS_DC);
void zend_do_qm_true(znode *true_value, znode *qm_token, znode *colon_token TSRMLS_DC);
void zend_do_qm_false(znode *result, znode *false_value, znode *qm_token, znode *colon_token TSRMLS_DC);
void zend_do_extended_info(TSRMLS_D);
void zend_do_extended_fcall_begin(TSRMLS_D);
void zend_do_extended_fcall_end(TSRMLS_D);
void zend_do_ticks(TSRMLS_D);
void zend_do_begin_import(TSRMLS_D);
void zend_do_import(int type, znode *what TSRMLS_DC);
void zend_do_end_import(znode *import_from TSRMLS_DC);
ZEND_API void function_add_ref(zend_function *function);
#define INITIAL_OP_ARRAY_SIZE 64
/* helper functions in zend_language_scanner.l */
ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type TSRMLS_DC);
ZEND_API zend_op_array *compile_string(zval *source_string, char *filename TSRMLS_DC);
ZEND_API zend_op_array *compile_filename(int type, zval *filename TSRMLS_DC);
ZEND_API int zend_execute_scripts(int type TSRMLS_DC, zval **retval, int file_count, ...);
ZEND_API int open_file_for_scanning(zend_file_handle *file_handle TSRMLS_DC);
ZEND_API void init_op_array(zend_op_array *op_array, zend_uchar type, int initial_ops_size TSRMLS_DC);
ZEND_API void destroy_op_array(zend_op_array *op_array);
ZEND_API void zend_destroy_file_handle(zend_file_handle *file_handle TSRMLS_DC);
ZEND_API void zend_file_handle_dtor(zend_file_handle *fh);
ZEND_API void destroy_zend_function(zend_function *function);
ZEND_API void destroy_zend_class(zend_class_entry **pce);
void zend_class_add_ref(zend_class_entry **ce);
#define ZEND_FUNCTION_DTOR (void (*)(void *)) destroy_zend_function
#define ZEND_CLASS_DTOR (void (*)(void *)) destroy_zend_class
zend_op *get_next_op(zend_op_array *op_array TSRMLS_DC);
void init_op(zend_op *op TSRMLS_DC);
int get_next_op_number(zend_op_array *op_array);
int print_class(zend_class_entry *class_entry TSRMLS_DC);
void print_op_array(zend_op_array *op_array, int optimizations);
int pass_two(zend_op_array *op_array TSRMLS_DC);
zend_brk_cont_element *get_next_brk_cont_element(zend_op_array *op_array);
ZEND_API zend_bool zend_is_compiling(TSRMLS_D);
ZEND_API char *zend_make_compiled_string_description(char *name TSRMLS_DC);
int zend_register_auto_global(char *name, uint name_len TSRMLS_DC);
int zendlex(znode *zendlval TSRMLS_DC);
#define ZEND_NOP 0
#define ZEND_ADD 1
#define ZEND_SUB 2
#define ZEND_MUL 3
#define ZEND_DIV 4
#define ZEND_MOD 5
#define ZEND_SL 6
#define ZEND_SR 7
#define ZEND_CONCAT 8
#define ZEND_BW_OR 9
#define ZEND_BW_AND 10
#define ZEND_BW_XOR 11
#define ZEND_BW_NOT 12
#define ZEND_BOOL_NOT 13
#define ZEND_BOOL_XOR 14
#define ZEND_IS_IDENTICAL 15
#define ZEND_IS_NOT_IDENTICAL 16
#define ZEND_IS_EQUAL 17
#define ZEND_IS_NOT_EQUAL 18
#define ZEND_IS_SMALLER 19
#define ZEND_IS_SMALLER_OR_EQUAL 20
#define ZEND_CAST 21
#define ZEND_QM_ASSIGN 22
#define ZEND_ASSIGN_ADD 23
#define ZEND_ASSIGN_SUB 24
#define ZEND_ASSIGN_MUL 25
#define ZEND_ASSIGN_DIV 26
#define ZEND_ASSIGN_MOD 27
#define ZEND_ASSIGN_SL 28
#define ZEND_ASSIGN_SR 29
#define ZEND_ASSIGN_CONCAT 30
#define ZEND_ASSIGN_BW_OR 31
#define ZEND_ASSIGN_BW_AND 32
#define ZEND_ASSIGN_BW_XOR 33
#define ZEND_PRE_INC 34
#define ZEND_PRE_DEC 35
#define ZEND_POST_INC 36
#define ZEND_POST_DEC 37
#define ZEND_ASSIGN 38
#define ZEND_ASSIGN_REF 39
#define ZEND_ECHO 40
#define ZEND_PRINT 41
#define ZEND_JMP 42
#define ZEND_JMPZ 43
#define ZEND_JMPNZ 44
#define ZEND_JMPZNZ 45
#define ZEND_JMPZ_EX 46
#define ZEND_JMPNZ_EX 47
#define ZEND_CASE 48
#define ZEND_SWITCH_FREE 49
#define ZEND_BRK 50
#define ZEND_CONT 51
#define ZEND_BOOL 52
#define ZEND_INIT_STRING 53
#define ZEND_ADD_CHAR 54
#define ZEND_ADD_STRING 55
#define ZEND_ADD_VAR 56
#define ZEND_BEGIN_SILENCE 57
#define ZEND_END_SILENCE 58
#define ZEND_INIT_FCALL_BY_NAME 59
#define ZEND_DO_FCALL 60
#define ZEND_DO_FCALL_BY_NAME 61
#define ZEND_RETURN 62
#define ZEND_RECV 63
#define ZEND_RECV_INIT 64
#define ZEND_SEND_VAL 65
#define ZEND_SEND_VAR 66
#define ZEND_SEND_REF 67
#define ZEND_NEW 68
#define ZEND_JMP_NO_CTOR 69
#define ZEND_FREE 70
#define ZEND_INIT_ARRAY 71
#define ZEND_ADD_ARRAY_ELEMENT 72
#define ZEND_INCLUDE_OR_EVAL 73
#define ZEND_UNSET_VAR 74
#define ZEND_UNSET_DIM_OBJ 75
#define ZEND_FE_RESET 77
#define ZEND_FE_FETCH 78
#define ZEND_EXIT 79
/* the following 18 opcodes are 6 groups of 3 opcodes each, and must
* remain in that order!
*/
#define ZEND_FETCH_R 80
#define ZEND_FETCH_DIM_R 81
#define ZEND_FETCH_OBJ_R 82
#define ZEND_FETCH_W 83
#define ZEND_FETCH_DIM_W 84
#define ZEND_FETCH_OBJ_W 85
#define ZEND_FETCH_RW 86
#define ZEND_FETCH_DIM_RW 87
#define ZEND_FETCH_OBJ_RW 88
#define ZEND_FETCH_IS 89
#define ZEND_FETCH_DIM_IS 90
#define ZEND_FETCH_OBJ_IS 91
#define ZEND_FETCH_FUNC_ARG 92
#define ZEND_FETCH_DIM_FUNC_ARG 93
#define ZEND_FETCH_OBJ_FUNC_ARG 94
#define ZEND_FETCH_UNSET 95
#define ZEND_FETCH_DIM_UNSET 96
#define ZEND_FETCH_OBJ_UNSET 97
#define ZEND_FETCH_DIM_TMP_VAR 98
#define ZEND_FETCH_CONSTANT 99
/* Hole - 100 */
#define ZEND_EXT_STMT 101
#define ZEND_EXT_FCALL_BEGIN 102
#define ZEND_EXT_FCALL_END 103
#define ZEND_EXT_NOP 104
#define ZEND_TICKS 105
#define ZEND_SEND_VAR_NO_REF 106
#define ZEND_CATCH 107
#define ZEND_THROW 108
#define ZEND_FETCH_CLASS 109
#define ZEND_CLONE 110
#define ZEND_INIT_CTOR_CALL 111
#define ZEND_INIT_METHOD_CALL 112
#define ZEND_INIT_STATIC_METHOD_CALL 113
#define ZEND_ISSET_ISEMPTY_VAR 114
#define ZEND_ISSET_ISEMPTY_DIM_OBJ 115
#define ZEND_IMPORT_FUNCTION 116
#define ZEND_IMPORT_CLASS 117
#define ZEND_IMPORT_CONST 118
#define ZEND_ASSIGN_ADD_OBJ 121
#define ZEND_ASSIGN_SUB_OBJ 122
#define ZEND_ASSIGN_MUL_OBJ 123
#define ZEND_ASSIGN_DIV_OBJ 124
#define ZEND_ASSIGN_MOD_OBJ 125
#define ZEND_ASSIGN_SL_OBJ 126
#define ZEND_ASSIGN_SR_OBJ 127
#define ZEND_ASSIGN_CONCAT_OBJ 128
#define ZEND_ASSIGN_BW_OR_OBJ 129
#define ZEND_ASSIGN_BW_AND_OBJ 130
#define ZEND_ASSIGN_BW_XOR_OBJ 131
#define ZEND_PRE_INC_OBJ 132
#define ZEND_PRE_DEC_OBJ 133
#define ZEND_POST_INC_OBJ 134
#define ZEND_POST_DEC_OBJ 135
#define ZEND_ASSIGN_OBJ 136
#define ZEND_MAKE_VAR 137
#define ZEND_IS_CLASS 138
#define ZEND_DECLARE_CLASS 139
#define ZEND_DECLARE_INHERITED_CLASS 140
#define ZEND_DECLARE_FUNCTION 141
/* end of block */
/* global/local fetches */
#define ZEND_FETCH_GLOBAL 0
#define ZEND_FETCH_LOCAL 1
#define ZEND_FETCH_STATIC 2
#define ZEND_FETCH_STATIC_MEMBER 3
/* class fetches */
#define ZEND_FETCH_CLASS_DEFAULT 0
#define ZEND_FETCH_CLASS_SELF 1
#define ZEND_FETCH_CLASS_PARENT 2
#define ZEND_FETCH_CLASS_MAIN 3
/* variable parsing type (compile-time) */
#define ZEND_PARSED_MEMBER (1<<0)
#define ZEND_PARSED_METHOD_CALL (1<<1)
#define ZEND_PARSED_STATIC_MEMBER (1<<2)
#define ZEND_PARSED_FUNCTION_CALL (1<<3)
#define ZEND_PARSED_VARIABLE (1<<4)
/* unset types */
#define ZEND_UNSET_REG 0
/* var status for backpatching */
#define BP_VAR_R 0
#define BP_VAR_W 1
#define BP_VAR_RW 2
#define BP_VAR_IS 3
#define BP_VAR_NA 4 /* if not applicable */
#define BP_VAR_FUNC_ARG 5
#define BP_VAR_UNSET 6
#define ZEND_INTERNAL_FUNCTION 1
#define ZEND_USER_FUNCTION 2
#define ZEND_OVERLOADED_FUNCTION 3
#define ZEND_EVAL_CODE 4
#define ZEND_INTERNAL_CLASS 1
#define ZEND_USER_CLASS 2
#define ZEND_EVAL (1<<0)
#define ZEND_INCLUDE (1<<1)
#define ZEND_INCLUDE_ONCE (1<<2)
#define ZEND_REQUIRE (1<<3)
#define ZEND_REQUIRE_ONCE (1<<4)
#define ZEND_ISSET (1<<0)
#define ZEND_ISEMPTY (1<<1)
#define ZEND_CT (1<<0)
#define ZEND_RT (1<<1)
#define ZEND_HANDLE_FILENAME 0
#define ZEND_HANDLE_FD 1
#define ZEND_HANDLE_FP 2
#define ZEND_HANDLE_STDIOSTREAM 3
#define ZEND_HANDLE_FSTREAM 4
#define ZEND_FETCH_STANDARD 0
#define ZEND_FETCH_ADD_LOCK 1
#define ZEND_MEMBER_FUNC_CALL 1<<0
#define ZEND_ARG_SEND_BY_REF (1<<0)
#define ZEND_ARG_COMPILE_TIME_BOUND (1<<1)
#define AI_USE_PTR(ai) \
if ((ai).ptr_ptr) { \
(ai).ptr = *((ai).ptr_ptr); \
(ai).ptr_ptr = &((ai).ptr); \
} else { \
(ai).ptr = NULL; \
}
/* Lost In Stupid Parentheses */
#define ARG_SHOULD_BE_SENT_BY_REF(offset, conduct_check, arg_types) \
( \
conduct_check \
&& arg_types \
&& \
( \
( \
offset<=arg_types[0] \
&& arg_types[offset]==BYREF_FORCE \
) \
|| ( \
offset>=arg_types[0] \
&& arg_types[arg_types[0]]==BYREF_FORCE_REST \
) \
) \
)
#define ZEND_RETURN_VAL 0
#define ZEND_RETURN_REF 1
END_EXTERN_C()
#define ZEND_CLONE_FUNC_NAME "__clone"
#define ZEND_CONSTRUCTOR_FUNC_NAME "__construct"
#define ZEND_DESTRUCTOR_FUNC_NAME "__destruct"
#define ZEND_GET_FUNC_NAME "__get"
#define ZEND_SET_FUNC_NAME "__set"
#define ZEND_CALL_FUNC_NAME "__call"
#endif /* ZEND_COMPILE_H */
-79
View File
@@ -1,79 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_CONFIG_NW_H
#define ZEND_CONFIG_NW_H
#include <string.h>
#include <float.h>
typedef unsigned long ulong;
typedef unsigned int uint;
#define HAVE_ALLOCA 1
#define HAVE_LIMITS_H 1
/* #include <malloc.h> */
#define HAVE_STRING_H 1
#undef HAVE_KILL
#define HAVE_GETPID 1
/* #define HAVE_ALLOCA_H 1 */
#define HAVE_MEMCPY 1
#define HAVE_STRDUP 1
#define HAVE_SYS_TYPES_H 1
/* #define HAVE_STDIOSTR_H 1 */
#define HAVE_CLASS_ISTDIOSTREAM
#define istdiostream stdiostream
#define HAVE_STDARG_H 1
#define HAVE_DLFCN_H 1
/* #define HAVE_LIBDL 1 */
#define HAVE_SNPRINTF 1
#define HAVE_VSNPRINTF 1
/*
#define snprintf _snprintf
#define vsnprintf _vsnprintf
#define zend_isinf(a) 0
#define zend_finite(x) _finite(x)
#define zend_isnan(x) _isnan(x)
*/
#define zend_sprintf sprintf
/* This will cause the compilation process to be MUCH longer, but will generate
* a much quicker PHP binary
*/
/*
#undef inline
#ifdef ZEND_WIN32_FORCE_INLINE
# define inline __forceinline
#else
# define inline
#endif
*/
/*
#define zend_finite(A) _finite(A)
#define zend_isnan(A) _isnan(A)
*/
#endif /* ZEND_CONFIG_NW_H */
-93
View File
@@ -1,93 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_CONFIG_W32_H
#define ZEND_CONFIG_W32_H
#define HAVE_ALLOCA 1
#define HAVE_LIMITS_H 1
#define _CRTDBG_MAP_ALLOC
#include <malloc.h>
#include <stdlib.h>
#include <crtdbg.h>
#include <string.h>
#include <windows.h>
#include <float.h>
typedef unsigned long ulong;
typedef unsigned int uint;
#undef HAVE_KILL
#define HAVE_GETPID 1
/* #define HAVE_ALLOCA_H 1 */
#define HAVE_MEMCPY 1
#define HAVE_STRDUP 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_STDIOSTR_H 1
#define HAVE_CLASS_ISTDIOSTREAM
#define istdiostream stdiostream
#define HAVE_STDARG_H 1
#define HAVE_SNPRINTF 1
#define HAVE_VSNPRINTF 1
#define snprintf _snprintf
#define vsnprintf _vsnprintf
#define zend_isinf(a) 0
#define zend_finite(x) _finite(x)
#define zend_isnan(x) _isnan(x)
#define zend_sprintf sprintf
/* This will cause the compilation process to be MUCH longer, but will generate
* a much quicker PHP binary
*/
#undef inline
#ifdef ZEND_WIN32_FORCE_INLINE
# define inline __forceinline
#else
# define inline
#endif
#define zend_finite(A) _finite(A)
#define zend_isnan(A) _isnan(A)
#ifdef LIBZEND_EXPORTS
# define ZEND_API __declspec(dllexport)
#else
# define ZEND_API __declspec(dllimport)
#endif
#define ZEND_DLEXPORT __declspec(dllexport)
#define ZEND_DLIMPORT __declspec(dllimport)
/* 0x00200000L is MB_SERVICE_NOTIFICATION, which is only supported under Windows NT
* (and requires _WIN32_WINNT to be defined, which prevents the resulting executable
* from running under Windows 9x
* Windows 9x should silently ignore it, so it's being used here directly
*/
#ifndef MB_SERVICE_NOTIFICATION
#define MB_SERVICE_NOTIFICATION 0x00200000L
#endif
#define ZEND_SERVICE_MB_STYLE (MB_TOPMOST|MB_SERVICE_NOTIFICATION)
#endif /* ZEND_CONFIG_W32_H */
-273
View File
@@ -1,273 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include "zend.h"
#include "zend_constants.h"
#include "zend_variables.h"
#include "zend_operators.h"
#include "zend_globals.h"
void free_zend_constant(zend_constant *c)
{
if (!(c->flags & CONST_PERSISTENT)) {
zval_dtor(&c->value);
}
free(c->name);
}
void copy_zend_constant(zend_constant *c)
{
c->name = zend_strndup(c->name, c->name_len);
if (!(c->flags & CONST_PERSISTENT)) {
zval_copy_ctor(&c->value);
}
}
void zend_copy_constants(HashTable *target, HashTable *source)
{
zend_constant tmp_constant;
zend_hash_copy(target, source, (copy_ctor_func_t) copy_zend_constant, &tmp_constant, sizeof(zend_constant));
}
static int clean_non_persistent_constant(zend_constant *c TSRMLS_DC)
{
if (c->flags & CONST_PERSISTENT) {
return EG(full_tables_cleanup) ? 0 : ZEND_HASH_APPLY_STOP;
} else {
return EG(full_tables_cleanup) ? 1 : ZEND_HASH_APPLY_REMOVE;
}
}
static int clean_module_constant(zend_constant *c, int *module_number TSRMLS_DC)
{
if (c->module_number == *module_number) {
return 1;
} else {
return 0;
}
}
void clean_module_constants(int module_number TSRMLS_DC)
{
zend_hash_apply_with_argument(EG(zend_constants), (apply_func_arg_t) clean_module_constant, (void *) &module_number TSRMLS_CC);
}
int zend_startup_constants(TSRMLS_D)
{
EG(zend_constants) = &CG(main_class).constants_table;
if (zend_hash_init(EG(zend_constants), 20, NULL, ZEND_CONSTANT_DTOR, 1)==FAILURE) {
return FAILURE;
}
return SUCCESS;
}
void zend_register_standard_constants(TSRMLS_D)
{
REGISTER_MAIN_LONG_CONSTANT("E_ERROR", E_ERROR, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_WARNING", E_WARNING, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_PARSE", E_PARSE, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_NOTICE", E_NOTICE, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_CORE_ERROR", E_CORE_ERROR, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_CORE_WARNING", E_CORE_WARNING, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_COMPILE_ERROR", E_COMPILE_ERROR, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_COMPILE_WARNING", E_COMPILE_WARNING, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_USER_ERROR", E_USER_ERROR, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_USER_WARNING", E_USER_WARNING, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_USER_NOTICE", E_USER_NOTICE, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_ALL", E_ALL, CONST_PERSISTENT | CONST_CS);
/* true/false constants */
{
zend_constant c;
c.value.type = IS_BOOL;
c.flags = CONST_PERSISTENT;
c.module_number = 0;
c.name = zend_strndup(ZEND_STRL("TRUE"));
c.name_len = sizeof("TRUE");
c.value.value.lval = 1;
c.value.type = IS_BOOL;
zend_register_constant(&c TSRMLS_CC);
c.name = zend_strndup(ZEND_STRL("FALSE"));
c.name_len = sizeof("FALSE");
c.value.value.lval = 0;
c.value.type = IS_BOOL;
zend_register_constant(&c TSRMLS_CC);
c.name = zend_strndup(ZEND_STRL("ZEND_THREAD_SAFE"));
c.name_len = sizeof("ZEND_THREAD_SAFE");
c.value.value.lval = ZTS_V;
c.value.type = IS_BOOL;
zend_register_constant(&c TSRMLS_CC);
c.name = zend_strndup(ZEND_STRL("NULL"));
c.name_len = sizeof("NULL");
c.value.type = IS_NULL;
zend_register_constant(&c TSRMLS_CC);
}
}
int zend_shutdown_constants(TSRMLS_D)
{
zend_hash_destroy(EG(zend_constants));
return SUCCESS;
}
void clean_non_persistent_constants(TSRMLS_D)
{
if (EG(full_tables_cleanup)) {
zend_hash_apply(EG(zend_constants), (apply_func_t) clean_non_persistent_constant TSRMLS_CC);
} else {
zend_hash_reverse_apply(EG(zend_constants), (apply_func_t) clean_non_persistent_constant TSRMLS_CC);
}
}
ZEND_API void zend_register_long_constant(char *name, uint name_len, long lval, int flags, int module_number TSRMLS_DC)
{
zend_constant c;
c.value.type = IS_LONG;
c.value.value.lval = lval;
c.flags = flags;
c.name = zend_strndup(name, name_len);
c.name_len = name_len;
c.module_number = module_number;
zend_register_constant(&c TSRMLS_CC);
}
ZEND_API void zend_register_double_constant(char *name, uint name_len, double dval, int flags, int module_number TSRMLS_DC)
{
zend_constant c;
c.value.type = IS_DOUBLE;
c.value.value.dval = dval;
c.flags = flags;
c.name = zend_strndup(name, name_len);
c.name_len = name_len;
c.module_number = module_number;
zend_register_constant(&c TSRMLS_CC);
}
ZEND_API void zend_register_stringl_constant(char *name, uint name_len, char *strval, uint strlen, int flags, int module_number TSRMLS_DC)
{
zend_constant c;
c.value.type = IS_STRING;
c.value.value.str.val = strval;
c.value.value.str.len = strlen;
c.flags = flags;
c.name = zend_strndup(name, name_len);
c.name_len = name_len;
c.module_number = module_number;
zend_register_constant(&c TSRMLS_CC);
}
ZEND_API void zend_register_string_constant(char *name, uint name_len, char *strval, int flags, int module_number TSRMLS_DC)
{
zend_register_stringl_constant(name, name_len, strval, strlen(strval), flags, module_number TSRMLS_CC);
}
ZEND_API int zend_get_constant(char *name, uint name_len, zval *result TSRMLS_DC)
{
zend_constant *c;
char *lookup_name;
int retval = 1;
if (zend_hash_find(EG(zend_constants), name, name_len+1, (void **) &c) == FAILURE) {
lookup_name = do_alloca(name_len+1);
memcpy(lookup_name, name, name_len+1);
zend_str_tolower(lookup_name, name_len);
if (zend_hash_find(EG(zend_constants), lookup_name, name_len+1, (void **) &c)==SUCCESS) {
if ((c->flags & CONST_CS) && memcmp(c->name, name, name_len)!=0) {
retval=0;
}
} else {
retval=0;
}
free_alloca(lookup_name);
}
if (retval) {
*result = c->value;
zval_copy_ctor(result);
}
return retval;
}
ZEND_API int zend_register_constant(zend_constant *c TSRMLS_DC)
{
char *lowercase_name;
int ret = SUCCESS;
#if 0
printf("Registering constant for module %d\n", c->module_number);
#endif
lowercase_name = do_alloca(c->name_len);
memcpy(lowercase_name, c->name, c->name_len);
if (!(c->flags & CONST_CS)) {
zend_str_tolower(lowercase_name, c->name_len);
}
if (zend_hash_add(EG(zend_constants), lowercase_name, c->name_len, (void *) c, sizeof(zend_constant), NULL)==FAILURE) {
free(c->name);
if (!(c->flags & CONST_PERSISTENT)) {
zval_dtor(&c->value);
}
zend_error(E_NOTICE,"Constant %s already defined", lowercase_name);
ret = FAILURE;
}
free_alloca(lowercase_name);
return ret;
}
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
-64
View File
@@ -1,64 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_CONSTANTS_H
#define ZEND_CONSTANTS_H
#include "zend_globals.h"
#define CONST_CS (1<<0) /* Case Sensitive */
#define CONST_PERSISTENT (1<<1) /* Persistent */
typedef struct _zend_constant {
zval value;
int flags;
char *name;
uint name_len;
int module_number;
} zend_constant;
#define REGISTER_LONG_CONSTANT(name, lval, flags) zend_register_long_constant((name), sizeof(name), (lval), (flags), module_number TSRMLS_CC)
#define REGISTER_DOUBLE_CONSTANT(name, dval, flags) zend_register_double_constant((name), sizeof(name), (dval), (flags), module_number TSRMLS_CC)
#define REGISTER_STRING_CONSTANT(name, str, flags) zend_register_string_constant((name), sizeof(name), (str), (flags), module_number TSRMLS_CC)
#define REGISTER_STRINGL_CONSTANT(name, str, len, flags) zend_register_stringl_constant((name), sizeof(name), (str), (len), (flags), module_number TSRMLS_CC)
#define REGISTER_MAIN_LONG_CONSTANT(name, lval, flags) zend_register_long_constant((name), sizeof(name), (lval), (flags), 0 TSRMLS_CC)
#define REGISTER_MAIN_DOUBLE_CONSTANT(name, dval, flags) zend_register_double_constant((name), sizeof(name), (dval), (flags), 0 TSRMLS_CC)
#define REGISTER_MAIN_STRING_CONSTANT(name, str, flags) zend_register_string_constant((name), sizeof(name), (str), (flags), 0 TSRMLS_CC)
#define REGISTER_MAIN_STRINGL_CONSTANT(name, str, len, flags) zend_register_stringl_constant((name), sizeof(name), (str), (len), (flags), 0 TSRMLS_CC)
void clean_module_constants(int module_number TSRMLS_DC);
void free_zend_constant(zend_constant *c);
int zend_startup_constants(TSRMLS_D);
int zend_shutdown_constants(TSRMLS_D);
void zend_register_standard_constants(TSRMLS_D);
void clean_non_persistent_constants(TSRMLS_D);
ZEND_API int zend_get_constant(char *name, uint name_len, zval *result TSRMLS_DC);
ZEND_API void zend_register_long_constant(char *name, uint name_len, long lval, int flags, int module_number TSRMLS_DC);
ZEND_API void zend_register_double_constant(char *name, uint name_len, double dval, int flags, int module_number TSRMLS_DC);
ZEND_API void zend_register_string_constant(char *name, uint name_len, char *strval, int flags, int module_number TSRMLS_DC);
ZEND_API void zend_register_stringl_constant(char *name, uint name_len, char *strval, uint strlen, int flags, int module_number TSRMLS_DC);
ZEND_API int zend_register_constant(zend_constant *c TSRMLS_DC);
void zend_copy_constants(HashTable *target, HashTable *sourc);
void copy_zend_constant(zend_constant *c);
#define ZEND_CONSTANT_DTOR (void (*)(void *)) free_zend_constant
#endif
-62
View File
@@ -1,62 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include "zend.h"
typedef struct _dynamic_array {
char *array;
unsigned int element_size;
unsigned int current;
unsigned int allocated;
} dynamic_array;
ZEND_API int zend_dynamic_array_init(dynamic_array *da, unsigned int element_size, unsigned int size)
{
da->element_size = element_size;
da->allocated = size;
da->current = 0;
da->array = (char *) emalloc(size*element_size);
if (da->array == NULL) {
return 1;
}
return 0;
}
ZEND_API void *zend_dynamic_array_push(dynamic_array *da)
{
if (da->current == da->allocated) {
da->allocated *= 2;
da->array = (char *) erealloc(da->array, da->allocated*da->element_size);
}
return (void *)(da->array+(da->current++)*da->element_size);
}
ZEND_API void *zend_dynamic_array_pop(dynamic_array *da)
{
return (void *)(da->array+(--(da->current))*da->element_size);
}
ZEND_API void *zend_dynamic_array_get_element(dynamic_array *da, unsigned int index)
{
if (index >= da->current) {
return NULL;
}
return (void *)(da->array+index*da->element_size);
}
-38
View File
@@ -1,38 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_DYNAMIC_ARRAY_H
#define ZEND_DYNAMIC_ARRAY_H
typedef struct _dynamic_array {
char *array;
unsigned int element_size;
unsigned int last_used;
unsigned int allocated;
} dynamic_array;
BEGIN_EXTERN_C()
ZEND_API int zend_dynamic_array_init(dynamic_array *da);
ZEND_API void *zend_dynamic_array_push(dynamic_array *da);
ZEND_API void *zend_dynamic_array_pop(dynamic_array *da);
ZEND_API void *zend_dynamic_array_get_element(dynamic_array *da, unsigned int index);
END_EXTERN_C()
#endif /* ZEND_DYNAMIC_ARRAY_H */
-40
View File
@@ -1,40 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_ERRORS_H
#define ZEND_ERRORS_H
#define E_ERROR (1<<0L)
#define E_WARNING (1<<1L)
#define E_PARSE (1<<2L)
#define E_NOTICE (1<<3L)
#define E_CORE_ERROR (1<<4L)
#define E_CORE_WARNING (1<<5L)
#define E_COMPILE_ERROR (1<<6L)
#define E_COMPILE_WARNING (1<<7L)
#define E_USER_ERROR (1<<8L)
#define E_USER_WARNING (1<<9L)
#define E_USER_NOTICE (1<<10L)
#define E_ALL (E_ERROR | E_WARNING | E_PARSE | E_NOTICE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE)
#define E_CORE (E_CORE_ERROR | E_CORE_WARNING)
#endif /* ZEND_ERRORS_H */
-3832
View File
File diff suppressed because it is too large. Load diff
-167
View File
@@ -1,167 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_EXECUTE_H
#define ZEND_EXECUTE_H
#include "zend_compile.h"
#include "zend_hash.h"
#include "zend_variables.h"
#include "zend_operators.h"
typedef union _temp_variable {
zval tmp_var;
struct {
zval **ptr_ptr;
zval *ptr;
} var;
struct {
zval tmp_var; /* a dummy */
union {
struct {
zval *str;
zend_uint offset;
} str_offset;
zend_property_reference overloaded_element;
} data;
unsigned char type;
zend_class_entry *class_entry;
} EA;
} temp_variable;
BEGIN_EXTERN_C()
ZEND_API extern void (*zend_execute)(zend_op_array *op_array TSRMLS_DC);
void init_executor(TSRMLS_D);
void shutdown_executor(TSRMLS_D);
ZEND_API void execute(zend_op_array *op_array TSRMLS_DC);
ZEND_API int zend_is_true(zval *op);
static inline void safe_free_zval_ptr(zval *p)
{
TSRMLS_FETCH();
if (p!=EG(uninitialized_zval_ptr)) {
FREE_ZVAL(p);
}
}
ZEND_API int zend_lookup_class(char *name, int name_length, zend_class_entry ***ce TSRMLS_DC);
ZEND_API int zend_eval_string(char *str, zval *retval_ptr, char *string_name TSRMLS_DC);
static inline int i_zend_is_true(zval *op)
{
int result;
switch (op->type) {
case IS_NULL:
result = 0;
break;
case IS_LONG:
case IS_BOOL:
case IS_RESOURCE:
result = (op->value.lval?1:0);
break;
case IS_DOUBLE:
result = (op->value.dval ? 1 : 0);
break;
case IS_STRING:
if (op->value.str.len == 0
|| (op->value.str.len==1 && op->value.str.val[0]=='0')) {
result = 0;
} else {
result = 1;
}
break;
case IS_ARRAY:
result = (zend_hash_num_elements(op->value.ht)?1:0);
break;
case IS_OBJECT:
/* OBJ-TBI */
result = 1;
break;
default:
result = 0;
break;
}
return result;
}
ZEND_API int zval_update_constant(zval **pp, void *arg TSRMLS_DC);
/* dedicated Zend executor functions - do not use! */
static inline void zend_ptr_stack_clear_multiple(TSRMLS_D)
{
void **p = EG(argument_stack).top_element-2;
int delete_count = (ulong) *p;
EG(argument_stack).top -= (delete_count+2);
while (--delete_count>=0) {
zval_ptr_dtor((zval **) --p);
}
EG(argument_stack).top_element = p;
}
static inline int zend_ptr_stack_get_arg(int requested_arg, void **data TSRMLS_DC)
{
void **p = EG(argument_stack).top_element-2;
int arg_count = (ulong) *p;
if (requested_arg>arg_count) {
return FAILURE;
}
*data = (p-arg_count+requested_arg-1);
return SUCCESS;
}
void execute_new_code(TSRMLS_D);
/* services */
ZEND_API char *get_active_function_name(TSRMLS_D);
ZEND_API char *zend_get_executed_filename(TSRMLS_D);
ZEND_API uint zend_get_executed_lineno(TSRMLS_D);
ZEND_API zend_bool zend_is_executing(TSRMLS_D);
ZEND_API void zend_set_timeout(long seconds);
ZEND_API void zend_unset_timeout(TSRMLS_D);
ZEND_API void zend_timeout(int dummy);
#ifdef ZEND_WIN32
void zend_init_timeout_thread();
void zend_shutdown_timeout_thread();
#define WM_REGISTER_ZEND_TIMEOUT (WM_USER+1)
#define WM_UNREGISTER_ZEND_TIMEOUT (WM_USER+2)
#endif
#define zendi_zval_copy_ctor(p) zval_copy_ctor(&(p))
#define zendi_zval_dtor(p) zval_dtor(&(p))
#define active_opline (*EG(opline_ptr))
void zend_assign_to_variable_reference(znode *result, zval **variable_ptr_ptr, zval **value_ptr_ptr, temp_variable *Ts TSRMLS_DC);
#define IS_OVERLOADED_OBJECT 1
#define IS_STRING_OFFSET 2
END_EXTERN_C()
#endif /* ZEND_EXECUTE_H */
-992
View File
@@ -1,992 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include <stdio.h>
#include <signal.h>
#include "zend.h"
#include "zend_compile.h"
#include "zend_execute.h"
#include "zend_API.h"
#include "zend_ptr_stack.h"
#include "zend_constants.h"
#include "zend_extensions.h"
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
ZEND_API void (*zend_execute)(zend_op_array *op_array TSRMLS_DC);
#ifdef ZEND_WIN32
#include <process.h>
/* true global */
static WNDCLASS wc;
static HWND timeout_window;
static HANDLE timeout_thread_event;
static DWORD timeout_thread_id;
static int timeout_thread_initialized=0;
#endif
#if ZEND_DEBUG
static void (*original_sigsegv_handler)(int);
static void zend_handle_sigsegv(int dummy)
{
fflush(stdout);
fflush(stderr);
if (original_sigsegv_handler==zend_handle_sigsegv) {
signal(SIGSEGV, original_sigsegv_handler);
} else {
signal(SIGSEGV, SIG_DFL);
}
{
TSRMLS_FETCH();
fprintf(stderr, "SIGSEGV caught on opcode %d on opline %d of %s() at %s:%d\n\n",
active_opline->opcode,
active_opline-EG(active_op_array)->opcodes,
get_active_function_name(TSRMLS_C),
zend_get_executed_filename(TSRMLS_C),
zend_get_executed_lineno(TSRMLS_C));
}
if (original_sigsegv_handler!=zend_handle_sigsegv) {
original_sigsegv_handler(dummy);
}
}
#endif
static void zend_extension_activator(zend_extension *extension TSRMLS_DC)
{
if (extension->activate) {
extension->activate();
}
}
static void zend_extension_deactivator(zend_extension *extension TSRMLS_DC)
{
if (extension->deactivate) {
extension->deactivate();
}
}
static int is_not_internal_function(zend_function *function TSRMLS_DC)
{
if (function->type == ZEND_INTERNAL_FUNCTION) {
return EG(full_tables_cleanup) ? 0 : ZEND_HASH_APPLY_STOP;
} else {
return EG(full_tables_cleanup) ? 1 : ZEND_HASH_APPLY_REMOVE;
}
}
static int is_not_internal_class(zend_class_entry **ce TSRMLS_DC)
{
if ((*ce)->type == ZEND_INTERNAL_CLASS) {
return EG(full_tables_cleanup) ? 0 : ZEND_HASH_APPLY_STOP;
} else {
return EG(full_tables_cleanup) ? 1 : ZEND_HASH_APPLY_REMOVE;
}
}
void init_executor(TSRMLS_D)
{
INIT_ZVAL(EG(uninitialized_zval));
/* trick to make uninitialized_zval never be modified, passed by ref, etc. */
EG(uninitialized_zval).refcount++;
INIT_ZVAL(EG(error_zval));
EG(uninitialized_zval_ptr)=&EG(uninitialized_zval);
EG(error_zval_ptr)=&EG(error_zval);
zend_ptr_stack_init(&EG(arg_types_stack));
/* destroys stack frame, therefore makes core dumps worthless */
#if 0&&ZEND_DEBUG
original_sigsegv_handler = signal(SIGSEGV, zend_handle_sigsegv);
#endif
EG(return_value_ptr_ptr) = NULL;
EG(symtable_cache_ptr) = EG(symtable_cache)-1;
EG(symtable_cache_limit)=EG(symtable_cache)+SYMTABLE_CACHE_SIZE-1;
EG(no_extensions)=0;
EG(function_table) = CG(function_table);
EG(class_table) = CG(class_table);
EG(in_execution) = 0;
zend_ptr_stack_init(&EG(argument_stack));
zend_hash_init(&EG(symbol_table), 50, NULL, ZVAL_PTR_DTOR, 0);
{
zval *globals;
ALLOC_ZVAL(globals);
globals->refcount=1;
globals->is_ref=1;
globals->type = IS_ARRAY;
globals->value.ht = &EG(symbol_table);
zend_hash_update(&EG(symbol_table), "GLOBALS", sizeof("GLOBALS"), &globals, sizeof(zval *), NULL);
}
EG(active_symbol_table) = &EG(symbol_table);
zend_llist_apply(&zend_extensions, (llist_apply_func_t) zend_extension_activator TSRMLS_CC);
EG(opline_ptr) = NULL;
EG(garbage_ptr) = 0;
zend_hash_init(&EG(included_files), 5, NULL, NULL, 0);
EG(ticks_count) = 0;
EG(user_error_handler) = NULL;
zend_ptr_stack_init(&EG(user_error_handlers));
zend_ptr_stack_init(&EG(user_exception_handlers));
EG(orig_error_reporting) = EG(error_reporting);
zend_objects_store_init(&EG(objects_store), 1024);
EG(full_tables_cleanup) = 0;
#ifdef ZEND_WIN32
EG(timed_out) = 0;
#endif
EG(exception) = NULL;
EG(scope) = NULL;
EG(main_class_ptr) = &CG(main_class);
CG(main_class).static_members = &EG(symbol_table);
EG(current_execute_data) = NULL;
EG(This) = NULL;
EG(float_separator)[0] = '.';
}
void shutdown_executor(TSRMLS_D)
{
zend_try {
zend_objects_store_call_destructors(&EG(objects_store) TSRMLS_CC);
zend_ptr_stack_destroy(&EG(arg_types_stack));
while (EG(symtable_cache_ptr)>=EG(symtable_cache)) {
zend_hash_destroy(*EG(symtable_cache_ptr));
efree(*EG(symtable_cache_ptr));
EG(symtable_cache_ptr)--;
}
zend_llist_apply(&zend_extensions, (llist_apply_func_t) zend_extension_deactivator TSRMLS_CC);
zend_hash_destroy(&EG(symbol_table));
while (EG(garbage_ptr)--) {
if (EG(garbage)[EG(garbage_ptr)]->refcount==1) {
zval_ptr_dtor(&EG(garbage)[EG(garbage_ptr)]);
}
}
zend_ptr_stack_destroy(&EG(argument_stack));
/* Destroy all op arrays */
if (EG(full_tables_cleanup)) {
zend_hash_apply(EG(function_table), (apply_func_t) is_not_internal_function TSRMLS_CC);
zend_hash_apply(EG(class_table), (apply_func_t) is_not_internal_class TSRMLS_CC);
} else {
zend_hash_reverse_apply(EG(function_table), (apply_func_t) is_not_internal_function TSRMLS_CC);
zend_hash_reverse_apply(EG(class_table), (apply_func_t) is_not_internal_class TSRMLS_CC);
}
} zend_end_try();
zend_try {
clean_non_persistent_constants(TSRMLS_C);
} zend_end_try();
/* The regular list must be destroyed after the main symbol table,
* op arrays, and constants are destroyed.
*/
zend_destroy_rsrc_list(&EG(regular_list) TSRMLS_CC);
zend_try {
#if ZEND_DEBUG
signal(SIGSEGV, original_sigsegv_handler);
#endif
zend_hash_destroy(&EG(included_files));
if (EG(user_error_handler)) {
zval_dtor(EG(user_error_handler));
FREE_ZVAL(EG(user_error_handler));
}
if (EG(user_exception_handler)) {
zval_dtor(EG(user_exception_handler));
FREE_ZVAL(EG(user_exception_handler));
}
zend_ptr_stack_clean(&EG(user_error_handlers), ZVAL_DESTRUCTOR, 1);
zend_ptr_stack_destroy(&EG(user_error_handlers));
zend_ptr_stack_clean(&EG(user_exception_handlers), ZVAL_DESTRUCTOR, 1);
zend_ptr_stack_destroy(&EG(user_exception_handlers));
EG(error_reporting) = EG(orig_error_reporting);
zend_objects_store_destroy(&EG(objects_store));
} zend_end_try();
}
ZEND_API char *get_active_function_name(TSRMLS_D)
{
if (!zend_is_executing(TSRMLS_C)) {
return NULL;
}
switch(EG(function_state_ptr)->function->type) {
case ZEND_USER_FUNCTION: {
char *function_name = ((zend_op_array *) EG(function_state_ptr)->function)->function_name;
if (function_name) {
return function_name;
} else {
return "main";
}
}
break;
case ZEND_INTERNAL_FUNCTION:
return ((zend_internal_function *) EG(function_state_ptr)->function)->function_name;
break;
default:
return NULL;
}
}
ZEND_API char *zend_get_executed_filename(TSRMLS_D)
{
if (EG(active_op_array)) {
return EG(active_op_array)->filename;
} else {
return "[no active file]";
}
}
ZEND_API uint zend_get_executed_lineno(TSRMLS_D)
{
if (EG(opline_ptr)) {
return active_opline->lineno;
} else {
return 0;
}
}
ZEND_API zend_bool zend_is_executing(TSRMLS_D)
{
return EG(in_execution);
}
ZEND_API void _zval_ptr_dtor(zval **zval_ptr ZEND_FILE_LINE_DC)
{
#if DEBUG_ZEND>=2
printf("Reducing refcount for %x (%x): %d->%d\n", *zval_ptr, zval_ptr, (*zval_ptr)->refcount, (*zval_ptr)->refcount-1);
#endif
(*zval_ptr)->refcount--;
if ((*zval_ptr)->refcount==0) {
zval_dtor(*zval_ptr);
safe_free_zval_ptr(*zval_ptr);
} else if ((*zval_ptr)->refcount == 1) {
(*zval_ptr)->is_ref = 0;
}
}
ZEND_API int zend_is_true(zval *op)
{
return i_zend_is_true(op);
}
#include "../TSRM/tsrm_strtok_r.h"
ZEND_API int zval_update_constant(zval **pp, void *arg TSRMLS_DC)
{
zval *p = *pp;
zend_bool inline_change = (zend_bool) (unsigned long) arg;
zval const_value;
if (p->type == IS_CONSTANT) {
int refcount;
SEPARATE_ZVAL(pp);
p = *pp;
refcount = p->refcount;
if (strchr(p->value.str.val, ':')) {
char *cur, *temp;
char *last;
zend_class_entry **ce;
zval **value;
last = tsrm_strtok_r(p->value.str.val, ":", &temp);
if (zend_lookup_class(last, strlen(last), &ce TSRMLS_CC) == FAILURE) {
zend_error(E_ERROR, "Undefined class '%s'", last);
}
last = tsrm_strtok_r(NULL, ":", &temp);
for(;;) {
cur = tsrm_strtok_r(NULL, ":", &temp);
if (!cur) {
break;
}
if (zend_hash_find(&(*ce)->class_table, last, strlen(last)+1, (void **)&ce) == FAILURE) {
zend_error(E_ERROR, "Undefined sub-class '%s'", last);
}
last = cur;
}
if (zend_hash_find(&(*ce)->constants_table, last, strlen(last)+1, (void **) &value) == FAILURE) {
zend_error(E_ERROR, "Undefined class constant '%s'", last);
}
const_value = **value;
zval_copy_ctor(&const_value);
if (inline_change) {
STR_FREE(p->value.str.val);
}
*p = const_value;
} else {
if (!zend_get_constant(p->value.str.val, p->value.str.len, &const_value TSRMLS_CC)) {
zend_error(E_NOTICE, "Use of undefined constant %s - assumed '%s'",
p->value.str.val,
p->value.str.val);
p->type = IS_STRING;
if (!inline_change) {
zval_copy_ctor(p);
}
} else {
if (inline_change) {
STR_FREE(p->value.str.val);
}
*p = const_value;
}
}
INIT_PZVAL(p);
p->refcount = refcount;
} else if (p->type == IS_CONSTANT_ARRAY) {
zval **element;
char *str_index;
uint str_index_len;
ulong num_index;
SEPARATE_ZVAL(pp);
p = *pp;
p->type = IS_ARRAY;
/* First go over the array and see if there are any constant indices */
zend_hash_internal_pointer_reset(p->value.ht);
while (zend_hash_get_current_data(p->value.ht, (void **) &element)==SUCCESS) {
if (!(Z_TYPE_PP(element) & IS_CONSTANT_INDEX)) {
zend_hash_move_forward(p->value.ht);
continue;
}
Z_TYPE_PP(element) &= ~IS_CONSTANT_INDEX;
if (zend_hash_get_current_key_ex(p->value.ht, &str_index, &str_index_len, &num_index, 0, NULL)!=HASH_KEY_IS_STRING) {
zend_hash_move_forward(p->value.ht);
continue;
}
if (!zend_get_constant(str_index, str_index_len-1, &const_value TSRMLS_CC)) {
zend_error(E_NOTICE, "Use of undefined constant %s - assumed '%s'", str_index, str_index);
zend_hash_move_forward(p->value.ht);
continue;
}
if (const_value.type == IS_STRING && const_value.value.str.len == str_index_len-1 &&
!strncmp(const_value.value.str.val, str_index, str_index_len)) {
/* constant value is the same as its name */
zval_dtor(&const_value);
zend_hash_move_forward(p->value.ht);
continue;
}
switch (const_value.type) {
case IS_STRING:
zend_hash_update(p->value.ht, const_value.value.str.val, const_value.value.str.len+1, element, sizeof(zval *), NULL);
(*element)->refcount++;
break;
case IS_LONG:
zend_hash_index_update(p->value.ht, const_value.value.lval, element, sizeof(zval *), NULL);
(*element)->refcount++;
break;
}
zend_hash_del(p->value.ht, str_index, str_index_len);
zval_dtor(&const_value);
}
zend_hash_apply_with_argument(p->value.ht, (apply_func_arg_t) zval_update_constant, (void *) 1 TSRMLS_CC);
}
return 0;
}
int call_user_function(HashTable *function_table, zval **object_pp, zval *function_name, zval *retval_ptr, int param_count, zval *params[] TSRMLS_DC)
{
zval ***params_array = (zval ***) emalloc(sizeof(zval **)*param_count);
int i;
int ex_retval;
zval *local_retval_ptr;
for (i=0; i<param_count; i++) {
params_array[i] = &params[i];
}
ex_retval = call_user_function_ex(function_table, object_pp, function_name, &local_retval_ptr, param_count, params_array, 1, NULL TSRMLS_CC);
if (local_retval_ptr) {
COPY_PZVAL_TO_ZVAL(*retval_ptr, local_retval_ptr);
} else {
INIT_ZVAL(*retval_ptr);
}
efree(params_array);
return ex_retval;
}
int call_user_function_ex(HashTable *function_table, zval **object_pp, zval *function_name, zval **retval_ptr_ptr, int param_count, zval **params[], int no_separation, HashTable *symbol_table TSRMLS_DC)
{
int i;
zval **original_return_value;
HashTable *calling_symbol_table;
zend_function_state *original_function_state_ptr;
zend_op_array *original_op_array;
zend_op **original_opline_ptr;
zval *orig_free_op1, *orig_free_op2;
int (*orig_unary_op)(zval *result, zval *op1);
int (*orig_binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC);
zval function_name_copy;
zend_class_entry *current_scope;
zend_class_entry *calling_scope = NULL;
zval *current_this;
zend_execute_data execute_data;
/* Initialize execute_data */
EX(fbc) = NULL;
EX(object) = NULL;
EX(Ts) = NULL;
EX(op_array) = NULL;
EX(opline) = NULL;
*retval_ptr_ptr = NULL;
if (function_name->type==IS_ARRAY) { /* assume array($obj, $name) couple */
zval **tmp_object_ptr, **tmp_real_function_name;
if (zend_hash_index_find(function_name->value.ht, 0, (void **) &tmp_object_ptr)==FAILURE) {
return FAILURE;
}
if (zend_hash_index_find(function_name->value.ht, 1, (void **) &tmp_real_function_name)==FAILURE) {
return FAILURE;
}
function_name = *tmp_real_function_name;
SEPARATE_ZVAL_IF_NOT_REF(tmp_object_ptr);
object_pp = tmp_object_ptr;
(*object_pp)->is_ref = 1;
}
if (object_pp && !*object_pp) {
object_pp = NULL;
}
if (object_pp) {
/* TBI!! new object handlers */
if (Z_TYPE_PP(object_pp) == IS_OBJECT) {
if (!IS_ZEND_STD_OBJECT(**object_pp)) {
zend_error(E_WARNING, "Cannot use call_user_function on overloaded objects");
return FAILURE;
}
function_table = &Z_OBJCE_PP(object_pp)->function_table;
EX(object) = *object_pp;
calling_scope = Z_OBJCE_PP(object_pp);
} else if (Z_TYPE_PP(object_pp) == IS_STRING) {
zend_class_entry **ce;
char *lc_class;
int found;
lc_class = estrndup(Z_STRVAL_PP(object_pp), Z_STRLEN_PP(object_pp));
zend_str_tolower(lc_class, Z_STRLEN_PP(object_pp));
found = zend_lookup_class(lc_class, Z_STRLEN_PP(object_pp), &ce TSRMLS_CC);
efree(lc_class);
if (found == FAILURE)
return FAILURE;
function_table = &(*ce)->function_table;
calling_scope = *ce;
object_pp = NULL;
} else
return FAILURE;
}
if (function_name->type!=IS_STRING) {
return FAILURE;
}
function_name_copy = *function_name;
zval_copy_ctor(&function_name_copy);
zend_str_tolower(function_name_copy.value.str.val, function_name_copy.value.str.len);
original_function_state_ptr = EG(function_state_ptr);
if (zend_hash_find(function_table, function_name_copy.value.str.val, function_name_copy.value.str.len+1, (void **) &EX(function_state).function)==FAILURE) {
zval_dtor(&function_name_copy);
return FAILURE;
}
zval_dtor(&function_name_copy);
for (i=0; i<param_count; i++) {
zval *param;
if (EX(function_state).function->common.arg_types
&& i<EX(function_state).function->common.arg_types[0]
&& EX(function_state).function->common.arg_types[i+1]==BYREF_FORCE
&& !PZVAL_IS_REF(*params[i])) {
if ((*params[i])->refcount>1) {
zval *new_zval;
if (no_separation) {
return FAILURE;
}
ALLOC_ZVAL(new_zval);
*new_zval = **params[i];
zval_copy_ctor(new_zval);
new_zval->refcount = 1;
(*params[i])->refcount--;
*params[i] = new_zval;
}
(*params[i])->refcount++;
(*params[i])->is_ref = 1;
param = *params[i];
} else if (*params[i] != &EG(uninitialized_zval)) {
(*params[i])->refcount++;
param = *params[i];
} else {
ALLOC_ZVAL(param);
*param = **(params[i]);
INIT_PZVAL(param);
}
zend_ptr_stack_push(&EG(argument_stack), param);
}
zend_ptr_stack_n_push(&EG(argument_stack), 2, (void *) (long) param_count, NULL);
EG(function_state_ptr) = &EX(function_state);
current_scope = EG(scope);
EG(scope) = calling_scope;
current_this = EG(This);
if (object_pp) {
EG(This) = *object_pp;
if (!PZVAL_IS_REF(EG(This))) {
EG(This)->refcount++; /* For $this pointer */
} else {
zval *this_ptr;
ALLOC_ZVAL(this_ptr);
*this_ptr = *EG(This);
INIT_PZVAL(this_ptr);
zval_copy_ctor(this_ptr);
EG(This) = this_ptr;
}
} else {
EG(This) = NULL;
}
EX(prev_execute_data) = EG(current_execute_data);
EG(current_execute_data) = &execute_data;
if (EX(function_state).function->type == ZEND_USER_FUNCTION) {
calling_symbol_table = EG(active_symbol_table);
if (symbol_table) {
EG(active_symbol_table) = symbol_table;
} else {
ALLOC_HASHTABLE(EG(active_symbol_table));
zend_hash_init(EG(active_symbol_table), 0, NULL, ZVAL_PTR_DTOR, 0);
}
original_return_value = EG(return_value_ptr_ptr);
original_op_array = EG(active_op_array);
EG(return_value_ptr_ptr) = retval_ptr_ptr;
EG(active_op_array) = (zend_op_array *) EX(function_state).function;
original_opline_ptr = EG(opline_ptr);
orig_free_op1 = EG(free_op1);
orig_free_op2 = EG(free_op2);
orig_unary_op = EG(unary_op);
orig_binary_op = EG(binary_op);
zend_execute(EG(active_op_array) TSRMLS_CC);
if (!symbol_table) {
zend_hash_destroy(EG(active_symbol_table));
FREE_HASHTABLE(EG(active_symbol_table));
}
EG(active_symbol_table) = calling_symbol_table;
EG(active_op_array) = original_op_array;
EG(return_value_ptr_ptr)=original_return_value;
EG(opline_ptr) = original_opline_ptr;
EG(free_op1) = orig_free_op1;
EG(free_op2) = orig_free_op2;
EG(unary_op) = orig_unary_op;
EG(binary_op) = orig_binary_op;
} else {
ALLOC_INIT_ZVAL(*retval_ptr_ptr);
((zend_internal_function *) EX(function_state).function)->handler(param_count, *retval_ptr_ptr, (object_pp?*object_pp:NULL), 1 TSRMLS_CC);
INIT_PZVAL(*retval_ptr_ptr);
}
zend_ptr_stack_clear_multiple(TSRMLS_C);
EG(function_state_ptr) = original_function_state_ptr;
if (EG(This)) {
zval_ptr_dtor(&EG(This));
}
EG(scope) = current_scope;
EG(This) = current_this;
EG(current_execute_data) = EX(prev_execute_data); \
return SUCCESS;
}
ZEND_API int zend_lookup_class(char *name, int name_length, zend_class_entry ***ce TSRMLS_DC)
{
zval **args[1];
zval *autoload_function;
zval *class_name;
zval *retval_ptr;
int retval;
if (EG(scope)) {
if (zend_hash_find(&EG(scope)->class_table, name, name_length+1, (void **) ce) == SUCCESS) {
return SUCCESS;
}
}
if (zend_hash_find(EG(class_table), name, name_length+1, (void **) ce) == SUCCESS) {
return SUCCESS;
}
MAKE_STD_ZVAL(autoload_function);
ZVAL_STRINGL(autoload_function, "__autoload", sizeof("__autoload")-1, 1);
MAKE_STD_ZVAL(class_name);
ZVAL_STRINGL(class_name, name, name_length, 1);
args[0] = &class_name;
retval = call_user_function_ex(EG(function_table), NULL, autoload_function, &retval_ptr, 1, args, 0, NULL TSRMLS_CC);
zval_ptr_dtor(&autoload_function);
zval_ptr_dtor(&class_name);
if (retval == FAILURE) {
return FAILURE;
}
if (EG(exception)) {
zend_error(E_ERROR, "__autoload threw an exception");
}
/* If an exception is thrown retval_ptr will be NULL but we bailout before we reach this point */
zval_ptr_dtor(&retval_ptr);
return zend_hash_find(EG(class_table), name, name_length + 1, (void **) ce);
}
ZEND_API int zend_eval_string(char *str, zval *retval_ptr, char *string_name TSRMLS_DC)
{
zval pv;
zend_op_array *new_op_array;
zend_op_array *original_active_op_array = EG(active_op_array);
zend_function_state *original_function_state_ptr = EG(function_state_ptr);
zend_uchar original_handle_op_arrays;
int retval;
if (retval_ptr) {
pv.value.str.len = strlen(str)+sizeof("return ;")-1;
pv.value.str.val = emalloc(pv.value.str.len+1);
strcpy(pv.value.str.val, "return ");
strcat(pv.value.str.val, str);
strcat(pv.value.str.val, " ;");
} else {
pv.value.str.len = strlen(str);
pv.value.str.val = estrndup(str, pv.value.str.len);
}
pv.type = IS_STRING;
/*printf("Evaluating '%s'\n", pv.value.str.val);*/
original_handle_op_arrays = CG(handle_op_arrays);
CG(handle_op_arrays) = 0;
new_op_array = compile_string(&pv, string_name TSRMLS_CC);
CG(handle_op_arrays) = original_handle_op_arrays;
if (new_op_array) {
zval *local_retval_ptr=NULL;
zval **original_return_value_ptr_ptr = EG(return_value_ptr_ptr);
zend_op **original_opline_ptr = EG(opline_ptr);
EG(return_value_ptr_ptr) = &local_retval_ptr;
EG(active_op_array) = new_op_array;
EG(no_extensions)=1;
zend_execute(new_op_array TSRMLS_CC);
if (local_retval_ptr) {
if (retval_ptr) {
COPY_PZVAL_TO_ZVAL(*retval_ptr, local_retval_ptr);
} else {
zval_ptr_dtor(&local_retval_ptr);
}
} else {
if (retval_ptr) {
INIT_ZVAL(*retval_ptr);
}
}
EG(no_extensions)=0;
EG(opline_ptr) = original_opline_ptr;
EG(active_op_array) = original_active_op_array;
EG(function_state_ptr) = original_function_state_ptr;
destroy_op_array(new_op_array);
efree(new_op_array);
EG(return_value_ptr_ptr) = original_return_value_ptr_ptr;
retval = SUCCESS;
} else {
retval = FAILURE;
}
zval_dtor(&pv);
return retval;
}
void execute_new_code(TSRMLS_D)
{
zend_op *opline, *end;
zend_op *ret_opline;
zval *local_retval=NULL;
if (!CG(interactive)
|| CG(active_op_array)->backpatch_count>0
|| CG(active_op_array)->function_name
|| CG(active_op_array)->type!=ZEND_USER_FUNCTION) {
return;
}
ret_opline = get_next_op(CG(active_op_array) TSRMLS_CC);
ret_opline->opcode = ZEND_RETURN;
ret_opline->op1.op_type = IS_CONST;
INIT_ZVAL(ret_opline->op1.u.constant);
SET_UNUSED(ret_opline->op2);
if (!CG(active_op_array)->start_op) {
CG(active_op_array)->start_op = CG(active_op_array)->opcodes;
}
opline=CG(active_op_array)->start_op;
end=CG(active_op_array)->opcodes+CG(active_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) {
opline->op2.u.constant.is_ref = 1;
opline->op2.u.constant.refcount = 2;
}
opline++;
}
EG(return_value_ptr_ptr) = &local_retval;
EG(active_op_array) = CG(active_op_array);
zend_execute(CG(active_op_array) TSRMLS_CC);
if (local_retval) {
zval_ptr_dtor(&local_retval);
}
CG(active_op_array)->last--; /* get rid of that ZEND_RETURN */
CG(active_op_array)->start_op = CG(active_op_array)->opcodes+CG(active_op_array)->last;
}
ZEND_API void zend_timeout(int dummy)
{
TSRMLS_FETCH();
zend_error(E_ERROR, "Maximum execution time of %d second%s exceeded",
EG(timeout_seconds), EG(timeout_seconds) == 1 ? "" : "s");
if (zend_on_timeout) {
zend_on_timeout(EG(timeout_seconds) TSRMLS_CC);
}
}
#ifdef ZEND_WIN32
static LRESULT CALLBACK zend_timeout_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message) {
case WM_DESTROY:
PostQuitMessage(0);
break;
case WM_REGISTER_ZEND_TIMEOUT:
/* wParam is the thread id pointer, lParam is the timeout amount in seconds */
if (lParam==0) {
KillTimer(timeout_window, wParam);
} else {
SetTimer(timeout_window, wParam, lParam*1000, NULL);
}
break;
case WM_UNREGISTER_ZEND_TIMEOUT:
/* wParam is the thread id pointer */
KillTimer(timeout_window, wParam);
break;
case WM_TIMER: {
#ifdef ZTS
void ***tsrm_ls;
tsrm_ls = ts_resource_ex(0, &wParam);
if (!tsrm_ls) {
/* Thread died before receiving its timeout? */
break;
}
#endif
KillTimer(timeout_window, wParam);
EG(timed_out) = 1;
}
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
return 0;
}
static unsigned __stdcall timeout_thread_proc(void *pArgs)
{
MSG message;
wc.style=0;
wc.lpfnWndProc = zend_timeout_WndProc;
wc.cbClsExtra=0;
wc.cbWndExtra=0;
wc.hInstance=NULL;
wc.hIcon=NULL;
wc.hCursor=NULL;
wc.hbrBackground=(HBRUSH)(COLOR_BACKGROUND + 5);
wc.lpszMenuName=NULL;
wc.lpszClassName = "Zend Timeout Window";
if (!RegisterClass(&wc)) {
return -1;
}
timeout_window = CreateWindow(wc.lpszClassName, wc.lpszClassName, 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, NULL, NULL);
SetEvent(timeout_thread_event);
while (GetMessage(&message, NULL, 0, 0)) {
SendMessage(timeout_window, message.message, message.wParam, message.lParam);
if (message.message == WM_QUIT) {
break;
}
}
DestroyWindow(timeout_window);
UnregisterClass(wc.lpszClassName, NULL);
return 0;
}
void zend_init_timeout_thread()
{
timeout_thread_event = CreateEvent(NULL, FALSE, FALSE, NULL);
_beginthreadex(NULL, 0, timeout_thread_proc, NULL, 0, &timeout_thread_id);
WaitForSingleObject(timeout_thread_event, INFINITE);
}
void zend_shutdown_timeout_thread()
{
if (!timeout_thread_initialized) {
return;
}
PostThreadMessage(timeout_thread_id, WM_QUIT, 0, 0);
}
#endif
/* This one doesn't exists on QNX */
#ifndef SIGPROF
#define SIGPROF 27
#endif
void zend_set_timeout(long seconds)
{
TSRMLS_FETCH();
EG(timeout_seconds) = seconds;
#ifdef ZEND_WIN32
if (timeout_thread_initialized==0 && InterlockedIncrement(&timeout_thread_initialized)==1) {
/* We start up this process-wide thread here and not in zend_startup(), because if Zend
* is initialized inside a DllMain(), you're not supposed to start threads from it.
*/
zend_init_timeout_thread();
}
PostThreadMessage(timeout_thread_id, WM_REGISTER_ZEND_TIMEOUT, (WPARAM) GetCurrentThreadId(), (LPARAM) seconds);
#else
# ifdef HAVE_SETITIMER
{
struct itimerval t_r; /* timeout requested */
sigset_t sigset;
t_r.it_value.tv_sec = seconds;
t_r.it_value.tv_usec = t_r.it_interval.tv_sec = t_r.it_interval.tv_usec = 0;
setitimer(ITIMER_PROF, &t_r, NULL);
signal(SIGPROF, zend_timeout);
sigemptyset(&sigset);
sigaddset(&sigset, SIGPROF);
sigprocmask(SIG_UNBLOCK, &sigset, NULL);
}
# endif
#endif
}
void zend_unset_timeout(TSRMLS_D)
{
#ifdef ZEND_WIN32
PostThreadMessage(timeout_thread_id, WM_UNREGISTER_ZEND_TIMEOUT, (WPARAM) GetCurrentThreadId(), (LPARAM) 0);
#else
# ifdef HAVE_SETITIMER
{
struct itimerval no_timeout;
no_timeout.it_value.tv_sec = no_timeout.it_value.tv_usec = no_timeout.it_interval.tv_sec = no_timeout.it_interval.tv_usec = 0;
setitimer(ITIMER_PROF, &no_timeout, NULL);
}
# endif
#endif
}
-32
View File
@@ -1,32 +0,0 @@
#ifndef ZEND_EXECUTE_LOCKS_H
#define ZEND_EXECUTE_LOCKS_H
#define PZVAL_LOCK(z) zend_pzval_lock_func(z)
static inline void zend_pzval_lock_func(zval *z)
{
z->refcount++;
}
#define PZVAL_UNLOCK(z) zend_pzval_unlock_func(z TSRMLS_CC)
static inline void zend_pzval_unlock_func(zval *z TSRMLS_DC)
{
z->refcount--;
if (!z->refcount) {
z->refcount = 1;
z->is_ref = 0;
EG(garbage)[EG(garbage_ptr)++] = z;
}
}
static inline void zend_clean_garbage(TSRMLS_D)
{
while (EG(garbage_ptr)) {
zval_ptr_dtor(&EG(garbage)[--EG(garbage_ptr)]);
}
}
#define SELECTIVE_PZVAL_LOCK(pzv, pzn) if (!((pzn)->u.EA.type & EXT_TYPE_UNUSED)) { PZVAL_LOCK(pzv); }
#endif /* ZEND_EXECUTE_LOCKS_H */
-279
View File
@@ -1,279 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include "zend_extensions.h"
ZEND_API zend_llist zend_extensions;
static int last_resource_number;
int zend_load_extension(char *path)
{
#if ZEND_EXTENSIONS_SUPPORT
DL_HANDLE handle;
zend_extension *new_extension;
zend_extension_version_info *extension_version_info;
handle = DL_LOAD(path);
if (!handle) {
#ifndef ZEND_WIN32
fprintf(stderr, "Failed loading %s: %s\n", path, DL_ERROR());
#else
fprintf(stderr, "Failed loading %s\n", path);
#endif
return FAILURE;
}
extension_version_info = (zend_extension_version_info *) DL_FETCH_SYMBOL(handle, "extension_version_info");
new_extension = (zend_extension *) DL_FETCH_SYMBOL(handle, "zend_extension_entry");
if (!extension_version_info || !new_extension) {
fprintf(stderr, "%s doesn't appear to be a valid Zend extension\n", path);
return FAILURE;
}
/* allow extension to proclaim compatibility with any Zend version */
if (extension_version_info->zend_extension_api_no != ZEND_EXTENSION_API_NO &&(!new_extension->api_no_check || new_extension->api_no_check(ZEND_EXTENSION_API_NO) != SUCCESS)) {
if (extension_version_info->zend_extension_api_no > ZEND_EXTENSION_API_NO) {
fprintf(stderr, "%s requires Zend Engine API version %d.\n"
"The Zend Engine API version %d which is installed, is outdated.\n\n",
new_extension->name,
extension_version_info->zend_extension_api_no,
ZEND_EXTENSION_API_NO);
DL_UNLOAD(handle);
return FAILURE;
} else if (extension_version_info->zend_extension_api_no < ZEND_EXTENSION_API_NO) {
fprintf(stderr, "%s requires Zend Engine API version %d.\n"
"The Zend Engine API version %d which is installed, is newer.\n"
"Contact %s at %s for a later version of %s.\n\n",
new_extension->name,
extension_version_info->zend_extension_api_no,
ZEND_EXTENSION_API_NO,
new_extension->author,
new_extension->URL,
new_extension->name);
DL_UNLOAD(handle);
return FAILURE;
}
} else if (ZTS_V!=extension_version_info->thread_safe) {
fprintf(stderr, "Cannot load %s - it %s thread safe, whereas Zend %s\n",
new_extension->name,
(extension_version_info->thread_safe?"is":"isn't"),
(ZTS_V?"is":"isn't"));
DL_UNLOAD(handle);
return FAILURE;
} else if (ZEND_DEBUG!=extension_version_info->debug) {
fprintf(stderr, "Cannot load %s - it %s debug information, whereas Zend %s\n",
new_extension->name,
(extension_version_info->debug?"contains":"does not contain"),
(ZEND_DEBUG?"does":"does not"));
DL_UNLOAD(handle);
return FAILURE;
}
return zend_register_extension(new_extension, handle);
#else
fprintf(stderr, "Extensions are not supported on this platform.\n");
return FAILURE;
#endif
}
int zend_register_extension(zend_extension *new_extension, DL_HANDLE handle)
{
#if ZEND_EXTENSIONS_SUPPORT
zend_extension extension;
extension = *new_extension;
extension.handle = handle;
zend_extension_dispatch_message(ZEND_EXTMSG_NEW_EXTENSION, &extension);
zend_llist_add_element(&zend_extensions, &extension);
/*fprintf(stderr, "Loaded %s, version %s\n", extension.name, extension.version);*/
#endif
return SUCCESS;
}
static void zend_extension_shutdown(zend_extension *extension TSRMLS_DC)
{
#if ZEND_EXTENSIONS_SUPPORT
if (extension->shutdown) {
extension->shutdown(extension);
}
#endif
}
static int zend_extension_startup(zend_extension *extension)
{
#if ZEND_EXTENSIONS_SUPPORT
if (extension->startup) {
if (extension->startup(extension)!=SUCCESS) {
return 1;
}
zend_append_version_info(extension);
}
#endif
return 0;
}
int zend_startup_extensions_mechanism()
{
/* Startup extensions mechanism */
zend_llist_init(&zend_extensions, sizeof(zend_extension), (void (*)(void *)) zend_extension_dtor, 1);
last_resource_number = 0;
return SUCCESS;
}
int zend_startup_extensions()
{
zend_llist_apply_with_del(&zend_extensions, (int (*)(void *)) zend_extension_startup);
return SUCCESS;
}
void zend_shutdown_extensions(TSRMLS_D)
{
zend_llist_apply(&zend_extensions, (llist_apply_func_t) zend_extension_shutdown TSRMLS_CC);
zend_llist_destroy(&zend_extensions);
}
void zend_extension_dtor(zend_extension *extension)
{
#if ZEND_EXTENSIONS_SUPPORT && !ZEND_DEBUG
if (extension->handle) {
DL_UNLOAD(extension->handle);
}
#endif
}
static void zend_extension_message_dispatcher(zend_extension *extension, int num_args, va_list args TSRMLS_DC)
{
int message;
void *arg;
if (!extension->message_handler || num_args!=2) {
return;
}
message = va_arg(args, int);
arg = va_arg(args, void *);
extension->message_handler(message, arg);
}
ZEND_API void zend_extension_dispatch_message(int message, void *arg)
{
TSRMLS_FETCH();
zend_llist_apply_with_arguments(&zend_extensions, (llist_apply_with_args_func_t) zend_extension_message_dispatcher TSRMLS_CC, 2, message, arg);
}
ZEND_API int zend_get_resource_handle(zend_extension *extension)
{
if (last_resource_number<ZEND_MAX_RESERVED_RESOURCES) {
extension->resource_number = last_resource_number;
return last_resource_number++;
} else {
return -1;
}
}
ZEND_API zend_extension *zend_get_extension(char *extension_name)
{
zend_llist_element *element;
for (element = zend_extensions.head; element; element = element->next) {
zend_extension *extension = (zend_extension *) element->data;
if (!strcmp(extension->name, extension_name)) {
return extension;
}
}
return NULL;
}
/*
* Support for dynamic loading of MH_BUNDLEs on Darwin / Mac OS X
*
*/
#if HAVE_MACH_O_DYLD_H
void *zend_mh_bundle_load(char* bundle_path)
{
NSObjectFileImage bundle_image;
NSModule bundle_handle;
NSSymbol bundle_init_nssymbol;
void (*bundle_init)(void);
if (NSCreateObjectFileImageFromFile(bundle_path, &bundle_image) != NSObjectFileImageSuccess) {
return NULL;
}
bundle_handle = NSLinkModule(bundle_image, bundle_path, NSLINKMODULE_OPTION_PRIVATE);
NSDestroyObjectFileImage(bundle_image);
/* call the init function of the bundle */
bundle_init_nssymbol = NSLookupSymbolInModule(bundle_handle, "__init");
if (bundle_init_nssymbol != NULL) {
bundle_init = NSAddressOfSymbol(bundle_init_nssymbol);
bundle_init();
}
return bundle_handle;
}
int zend_mh_bundle_unload(void *bundle_handle)
{
NSSymbol bundle_fini_nssymbol;
void (*bundle_fini)(void);
/* call the fini function of the bundle */
bundle_fini_nssymbol = NSLookupSymbolInModule(bundle_handle, "__fini");
if (bundle_fini_nssymbol != NULL) {
bundle_fini = NSAddressOfSymbol(bundle_fini_nssymbol);
bundle_fini();
}
return (int) NSUnLinkModule(bundle_handle, NULL);
}
void *zend_mh_bundle_symbol(void *bundle_handle, const char *symbol_name)
{
NSSymbol symbol;
symbol = NSLookupSymbolInModule(bundle_handle, symbol_name);
return NSAddressOfSymbol(symbol);
}
const char *zend_mh_bundle_error(void)
{
/* Witness the state of the art error reporting */
return NULL;
}
#endif /* HAVE_MACH_O_DYLD_H */
-116
View File
@@ -1,116 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_EXTENSIONS_H
#define ZEND_EXTENSIONS_H
#include "zend_compile.h"
#define ZEND_EXTENSION_API_NO 90021012
typedef struct _zend_extension_version_info {
int zend_extension_api_no;
char *required_zend_version;
unsigned char thread_safe;
unsigned char debug;
} zend_extension_version_info;
typedef struct _zend_extension zend_extension;
/* Typedef's for zend_extension function pointers */
typedef int (*startup_func_t)(zend_extension *extension);
typedef void (*shutdown_func_t)(zend_extension *extension);
typedef void (*activate_func_t)(void);
typedef void (*deactivate_func_t)(void);
typedef void (*message_handler_func_t)(int message, void *arg);
typedef void (*op_array_handler_func_t)(zend_op_array *op_array);
typedef void (*statement_handler_func_t)(zend_op_array *op_array);
typedef void (*fcall_begin_handler_func_t)(zend_op_array *op_array);
typedef void (*fcall_end_handler_func_t)(zend_op_array *op_array);
typedef void (*op_array_ctor_func_t)(zend_op_array *op_array);
typedef void (*op_array_dtor_func_t)(zend_op_array *op_array);
struct _zend_extension {
char *name;
char *version;
char *author;
char *URL;
char *copyright;
startup_func_t startup;
shutdown_func_t shutdown;
activate_func_t activate;
deactivate_func_t deactivate;
message_handler_func_t message_handler;
op_array_handler_func_t op_array_handler;
statement_handler_func_t statement_handler;
fcall_begin_handler_func_t fcall_begin_handler;
fcall_end_handler_func_t fcall_end_handler;
op_array_ctor_func_t op_array_ctor;
op_array_dtor_func_t op_array_dtor;
int (*api_no_check)(int api_no);
void *reserved2;
void *reserved3;
void *reserved4;
void *reserved5;
void *reserved6;
void *reserved7;
void *reserved8;
DL_HANDLE handle;
int resource_number;
};
ZEND_API int zend_get_resource_handle(zend_extension *extension);
ZEND_API void zend_extension_dispatch_message(int message, void *arg);
#define ZEND_EXTMSG_NEW_EXTENSION 1
#define ZEND_EXTENSION() \
ZEND_EXT_API zend_extension_version_info extension_version_info = { ZEND_EXTENSION_API_NO, ZEND_VERSION, ZTS_V, ZEND_DEBUG }
#define STANDARD_ZEND_EXTENSION_PROPERTIES NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, -1
#define COMPAT_ZEND_EXTENSION_PROPERTIES NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, -1
ZEND_API extern zend_llist zend_extensions;
void zend_extension_dtor(zend_extension *extension);
ZEND_API int zend_load_extension(char *path);
ZEND_API int zend_register_extension(zend_extension *new_extension, DL_HANDLE handle);
void zend_append_version_info(zend_extension *extension);
int zend_startup_extensions_mechanism(void);
int zend_startup_extensions(void);
void zend_shutdown_extensions(TSRMLS_D);
ZEND_API zend_extension *zend_get_extension(char *extension_name);
#endif /* ZEND_EXTENSIONS_H */
-140
View File
@@ -1,140 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_FAST_CACHE_H
#define ZEND_FAST_CACHE_H
#ifndef ZEND_ENABLE_FAST_CACHE
# if ZEND_DEBUG
# define ZEND_ENABLE_FAST_CACHE 0
# else
# define ZEND_ENABLE_FAST_CACHE 0
# endif
#endif
typedef struct _zend_fast_cache_list_entry {
struct _zend_fast_cache_list_entry *next;
} zend_fast_cache_list_entry;
#define MAX_FAST_CACHE_TYPES 4
#define ZVAL_CACHE_LIST 0
#define HASHTABLE_CACHE_LIST 1
#if ZEND_ENABLE_FAST_CACHE
#include "zend_globals.h"
#include "zend_globals_macros.h"
#include "zend_alloc.h"
#if ZEND_DEBUG
# define RECORD_ZVAL_CACHE_HIT(fc_type) AG(fast_cache_stats)[fc_type][1]++;
# define RECORD_ZVAL_CACHE_MISS(fc_type) AG(fast_cache_stats)[fc_type][0]++;
#else
# define RECORD_ZVAL_CACHE_HIT(fc_type)
# define RECORD_ZVAL_CACHE_MISS(fc_type)
#endif
#define ZEND_FAST_ALLOC(p, type, fc_type) \
{ \
TSRMLS_FETCH(); \
\
if (((p) = (type *) AG(fast_cache_list_head)[fc_type])) { \
AG(fast_cache_list_head)[fc_type] = ((zend_fast_cache_list_entry *) AG(fast_cache_list_head)[fc_type])->next; \
RECORD_ZVAL_CACHE_HIT(fc_type); \
} else { \
(p) = (type *) emalloc(sizeof(type)); \
RECORD_ZVAL_CACHE_MISS(fc_type); \
} \
}
#define ZEND_FAST_FREE(p, fc_type) \
{ \
TSRMLS_FETCH(); \
\
((zend_fast_cache_list_entry *) (p))->next = (zend_fast_cache_list_entry *) AG(fast_cache_list_head)[fc_type]; \
AG(fast_cache_list_head)[fc_type] = (zend_fast_cache_list_entry *) (p); \
}
#define ZEND_FAST_ALLOC_REL(p, type, fc_type) \
ZEND_FAST_ALLOC(p, type, fc_type)
#define ZEND_FAST_FREE_REL(p, fc_type) \
ZEND_FAST_FREE(p, fc_type)
#else /* !ZEND_ENABLE_FAST_CACHE */
#define ZEND_FAST_ALLOC(p, type, fc_type) \
(p) = (type *) emalloc(sizeof(type))
#define ZEND_FAST_FREE(p, fc_type) \
efree(p)
#define ZEND_FAST_ALLOC_REL(p, type, fc_type) \
(p) = (type *) emalloc_rel(sizeof(type))
#define ZEND_FAST_FREE_REL(p, fc_type) \
efree_rel(p)
#endif /* ZEND_ENABLE_FAST_CACHE */
/* fast cache for zval's */
#define ALLOC_ZVAL(z) \
ZEND_FAST_ALLOC(z, zval, ZVAL_CACHE_LIST)
#define FREE_ZVAL(z) \
ZEND_FAST_FREE(z, ZVAL_CACHE_LIST)
#define ALLOC_ZVAL_REL(z) \
ZEND_FAST_ALLOC_REL(z, zval, ZVAL_CACHE_LIST)
#define FREE_ZVAL_REL(z) \
ZEND_FAST_FREE_REL(z, ZVAL_CACHE_LIST)
/* fast cache for HashTables */
#define ALLOC_HASHTABLE(ht) \
ZEND_FAST_ALLOC(ht, HashTable, HASHTABLE_CACHE_LIST)
#define FREE_HASHTABLE(ht) \
ZEND_FAST_FREE(ht, HASHTABLE_CACHE_LIST)
#define ALLOC_HASHTABLE_REL(ht) \
ZEND_FAST_ALLOC_REL(ht, HashTable, HASHTABLE_CACHE_LIST)
#define FREE_HASHTABLE_REL(ht) \
ZEND_FAST_FREE_REL(ht, HASHTABLE_CACHE_LIST)
#endif /* ZEND_FAST_CACHE_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
-270
View File
@@ -1,270 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_GLOBALS_H
#define ZEND_GLOBALS_H
#include <setjmp.h>
#include "zend_globals_macros.h"
#include "zend_stack.h"
#include "zend_ptr_stack.h"
#include "zend_hash.h"
#include "zend_llist.h"
#include "zend_fast_cache.h"
#include "zend_objects.h"
#include "zend_objects_API.h"
/* Define ZTS if you want a thread-safe Zend */
/*#undef ZTS*/
#ifdef ZTS
BEGIN_EXTERN_C()
ZEND_API extern int compiler_globals_id;
ZEND_API extern int executor_globals_id;
ZEND_API extern int alloc_globals_id;
END_EXTERN_C()
#endif
#define SYMTABLE_CACHE_SIZE 32
#include "zend_compile.h"
/* excpt.h on Digital Unix 4.0 defines function_table */
#undef function_table
typedef struct _zend_declarables {
zval ticks;
} zend_declarables;
struct _zend_compiler_globals {
zend_stack bp_stack;
zend_stack switch_cond_stack;
zend_stack foreach_copy_stack;
zend_stack object_stack;
zend_stack declare_stack;
zend_class_entry *active_class_entry;
zval active_ce_parent_class_name;
/* variables for list() compilation */
zend_llist list_llist;
zend_llist dimension_llist;
zend_stack list_stack;
zend_stack function_call_stack;
char *compiled_filename;
int zend_lineno;
int comment_start_line;
char *heredoc;
int heredoc_len;
zend_op_array *active_op_array;
zend_class_entry main_class;
HashTable *function_table; /* function symbol table */
HashTable *class_table; /* class table */
HashTable filenames_table;
HashTable *auto_globals;
zend_bool in_compilation;
zend_bool short_tags;
zend_bool asp_tags;
zend_bool allow_call_time_pass_reference;
zend_declarables declarables;
/* For extensions support */
zend_bool extended_info; /* generate extension information for debugger/profiler */
zend_bool handle_op_arrays; /* run op_arrays through op_array handlers */
zend_bool unclean_shutdown;
zend_bool ini_parser_unbuffered_errors;
zend_llist open_files;
zend_llist *throw_list;
long catch_begin;
struct _zend_ini_parser_param *ini_parser_param;
int interactive;
zend_bool in_clone_method;
zend_bool increment_lineno;
zend_llist import_commands;
};
struct _zend_executor_globals {
zval **return_value_ptr_ptr;
zval uninitialized_zval;
zval *uninitialized_zval_ptr;
zval error_zval;
zval *error_zval_ptr;
zend_function_state *function_state_ptr;
zend_ptr_stack arg_types_stack;
/* symbol table cache */
HashTable *symtable_cache[SYMTABLE_CACHE_SIZE];
HashTable **symtable_cache_limit;
HashTable **symtable_cache_ptr;
zend_op **opline_ptr;
HashTable *active_symbol_table;
HashTable symbol_table; /* main symbol table */
HashTable included_files; /* files already included */
jmp_buf bailout;
int error_reporting;
int orig_error_reporting;
int exit_status;
zend_op_array *active_op_array;
HashTable *function_table; /* function symbol table */
HashTable *class_table; /* class table */
HashTable *zend_constants; /* constants table */
zend_class_entry *scope;
zend_class_entry *main_class_ptr;
zval *This;
long precision;
int ticks_count;
zend_bool in_execution;
zend_bool bailout_set;
zend_bool full_tables_cleanup;
/* for extended information support */
zend_bool no_extensions;
#ifdef ZEND_WIN32
zend_bool timed_out;
#endif
HashTable regular_list;
HashTable persistent_list;
zend_ptr_stack argument_stack;
zval *free_op1, *free_op2;
int (*unary_op)(zval *result, zval *op1);
int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC);
zval *garbage[2];
int garbage_ptr;
zval *user_error_handler;
zval *user_exception_handler;
zend_ptr_stack user_error_handlers;
zend_ptr_stack user_exception_handlers;
/* timeout support */
int timeout_seconds;
int lambda_count;
HashTable *ini_directives;
zend_objects_store objects_store;
zval *exception;
struct _zend_execute_data *current_execute_data;
/* locale stuff */
char float_separator[1];
void *reserved[ZEND_MAX_RESERVED_RESOURCES];
};
#include "zend_mm.h"
struct _zend_alloc_globals {
zend_mem_header *head; /* standard list */
void *cache[MAX_CACHED_MEMORY][MAX_CACHED_ENTRIES];
unsigned int cache_count[MAX_CACHED_MEMORY];
void *fast_cache_list_head[MAX_FAST_CACHE_TYPES];
#ifdef ZEND_WIN32
HANDLE memory_heap;
#endif
#if ZEND_DEBUG
/* for performance tuning */
int cache_stats[MAX_CACHED_MEMORY][2];
int fast_cache_stats[MAX_FAST_CACHE_TYPES][2];
#endif
#if MEMORY_LIMIT
unsigned int memory_limit;
unsigned int allocated_memory;
unsigned int allocated_memory_peak;
unsigned char memory_exhausted;
#endif
#ifdef ZEND_MM
zend_mm_heap mm_heap;
#endif
};
struct _zend_scanner_globals {
FILE *yy_in;
FILE *yy_out;
int yy_leng;
char *yy_text;
struct yy_buffer_state *current_buffer;
char *c_buf_p;
int init;
int start;
int lineno;
char _yy_hold_char;
int yy_n_chars;
int _yy_did_buffer_switch_on_eof;
int _yy_last_accepting_state; /* Must be of the same type as yy_state_type,
* if for whatever reason it's no longer int!
*/
char *_yy_last_accepting_cpos;
int _yy_more_flag;
int _yy_more_len;
int yy_start_stack_ptr;
int yy_start_stack_depth;
int *yy_start_stack;
};
#endif /* ZEND_GLOBALS_H */
-109
View File
@@ -1,109 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_GLOBALS_MACROS_H
#define ZEND_GLOBALS_MACROS_H
typedef struct _zend_compiler_globals zend_compiler_globals;
typedef struct _zend_executor_globals zend_executor_globals;
typedef struct _zend_alloc_globals zend_alloc_globals;
typedef struct _zend_scanner_globals zend_scanner_globals;
/* Compiler */
#ifdef ZTS
# define CG(v) TSRMG(compiler_globals_id, zend_compiler_globals *, v)
BEGIN_EXTERN_C()
int zendparse(void *compiler_globals);
END_EXTERN_C()
#else
# define CG(v) (compiler_globals.v)
extern ZEND_API struct _zend_compiler_globals compiler_globals;
int zendparse(void);
#endif
/* Executor */
#ifdef ZTS
# define EG(v) TSRMG(executor_globals_id, zend_executor_globals *, v)
#else
# define EG(v) (executor_globals.v)
extern ZEND_API zend_executor_globals executor_globals;
#endif
/* Memory Manager */
#ifdef ZTS
# define AG(v) TSRMG(alloc_globals_id, zend_alloc_globals *, v)
#else
# define AG(v) (alloc_globals.v)
extern ZEND_API zend_alloc_globals alloc_globals;
#endif
/* Language Scanner */
#ifdef ZTS
# define LANG_SCNG(v) TSRMG(language_scanner_globals_id, zend_scanner_globals *, v)
extern ZEND_API ts_rsrc_id language_scanner_globals_id;
#else
# define LANG_SCNG(v) (language_scanner_globals.v)
extern ZEND_API zend_scanner_globals language_scanner_globals;
#endif
/* INI Scanner */
#ifdef ZTS
# define INI_SCNG(v) TSRMG(ini_scanner_globals_id, zend_scanner_globals *, v)
extern ZEND_API ts_rsrc_id ini_scanner_globals_id;
#else
# define INI_SCNG(v) (ini_scanner_globals.v)
extern ZEND_API zend_scanner_globals ini_scanner_globals;
#endif
/* For limited downwards source compatibility */
#define CLS_FETCH()
#define ELS_FETCH()
#define ALS_FETCH()
#define PLS_FETCH()
#define SLS_FETCH()
#define CLS_D
#define ELS_D
#define ALS_D
#define PLS_D
#define SLS_D
#define CLS_DC
#define ELS_DC
#define ALS_DC
#define PLS_DC
#define SLS_DC
#define CLS_C
#define ELS_C
#define ALS_C
#define PLS_C
#define SLS_C
#define CLS_CC
#define ELS_CC
#define ALS_CC
#define PLS_CC
#define SLS_CC
#endif /* ZEND_GLOBALS_MACROS_H */
-1324
View File
File diff suppressed because it is too large. Load diff
-274
View File
@@ -1,274 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_HASH_H
#define ZEND_HASH_H
#include <sys/types.h>
#include "zend.h"
#define HASH_KEY_IS_STRING 1
#define HASH_KEY_IS_LONG 2
#define HASH_KEY_NON_EXISTANT 3
#define HASH_UPDATE (1<<0)
#define HASH_ADD (1<<1)
#define HASH_NEXT_INSERT (1<<2)
#define HASH_DEL_KEY 0
#define HASH_DEL_INDEX 1
typedef ulong (*hash_func_t)(char *arKey, uint nKeyLength);
typedef int (*compare_func_t)(const void *, const void * TSRMLS_DC);
typedef void (*sort_func_t)(void *, size_t, register size_t, compare_func_t TSRMLS_DC);
typedef void (*dtor_func_t)(void *pDest);
typedef void (*copy_ctor_func_t)(void *pElement);
struct _hashtable;
typedef struct bucket {
ulong h; /* Used for numeric indexing */
uint nKeyLength;
void *pData;
void *pDataPtr;
struct bucket *pListNext;
struct bucket *pListLast;
struct bucket *pNext;
struct bucket *pLast;
char arKey[1]; /* Must be last element */
} Bucket;
typedef struct _hashtable {
uint nTableSize;
uint nTableMask;
uint nNumOfElements;
ulong nNextFreeElement;
Bucket *pInternalPointer; /* Used for element traversal */
Bucket *pListHead;
Bucket *pListTail;
Bucket **arBuckets;
dtor_func_t pDestructor;
zend_bool persistent;
unsigned char nApplyCount;
zend_bool bApplyProtection;
#if ZEND_DEBUG
int inconsistent;
#endif
} HashTable;
typedef Bucket* HashPosition;
BEGIN_EXTERN_C()
/* startup/shutdown */
ZEND_API int _zend_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent ZEND_FILE_LINE_DC);
ZEND_API int _zend_hash_init_ex(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection ZEND_FILE_LINE_DC);
ZEND_API void zend_hash_destroy(HashTable *ht);
ZEND_API void zend_hash_clean(HashTable *ht);
#define zend_hash_init(ht, nSize, pHashFunction, pDestructor, persistent) _zend_hash_init((ht), (nSize), (pHashFunction), (pDestructor), (persistent) ZEND_FILE_LINE_CC)
#define zend_hash_init_ex(ht, nSize, pHashFunction, pDestructor, persistent, bApplyProtection) _zend_hash_init_ex((ht), (nSize), (pHashFunction), (pDestructor), (persistent), (bApplyProtection) ZEND_FILE_LINE_CC)
/* additions/updates/changes */
ZEND_API int zend_hash_add_or_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag);
#define zend_hash_update(ht, arKey, nKeyLength, pData, nDataSize, pDest) \
zend_hash_add_or_update(ht, arKey, nKeyLength, pData, nDataSize, pDest, HASH_UPDATE)
#define zend_hash_add(ht, arKey, nKeyLength, pData, nDataSize, pDest) \
zend_hash_add_or_update(ht, arKey, nKeyLength, pData, nDataSize, pDest, HASH_ADD)
ZEND_API int zend_hash_quick_add_or_update(HashTable *ht, char *arKey, uint nKeyLength, ulong h, void *pData, uint nDataSize, void **pDest, int flag);
#define zend_hash_quick_update(ht, arKey, nKeyLength, h, pData, nDataSize, pDest) \
zend_hash_quick_add_or_update(ht, arKey, nKeyLength, h, pData, nDataSize, pDest, HASH_UPDATE)
#define zend_hash_quick_add(ht, arKey, nKeyLength, h, pData, nDataSize, pDest) \
zend_hash_quick_add_or_update(ht, arKey, nKeyLength, h, pData, nDataSize, pDest, HASH_ADD)
ZEND_API int zend_hash_index_update_or_next_insert(HashTable *ht, ulong h, void *pData, uint nDataSize, void **pDest, int flag);
#define zend_hash_index_update(ht, h, pData, nDataSize, pDest) \
zend_hash_index_update_or_next_insert(ht, h, pData, nDataSize, pDest, HASH_UPDATE)
#define zend_hash_next_index_insert(ht, pData, nDataSize, pDest) \
zend_hash_index_update_or_next_insert(ht, 0, pData, nDataSize, pDest, HASH_NEXT_INSERT)
ZEND_API int zend_hash_add_empty_element(HashTable *ht, char *arKey, uint nKeyLength);
#define ZEND_HASH_APPLY_KEEP 0
#define ZEND_HASH_APPLY_REMOVE 1<<0
#define ZEND_HASH_APPLY_STOP 1<<1
typedef struct _zend_hash_key {
char *arKey;
uint nKeyLength;
ulong h;
} zend_hash_key;
typedef int (*apply_func_t)(void *pDest TSRMLS_DC);
typedef int (*apply_func_arg_t)(void *pDest, void *argument TSRMLS_DC);
typedef int (*apply_func_args_t)(void *pDest, int num_args, va_list args, zend_hash_key *hash_key);
ZEND_API void zend_hash_graceful_destroy(HashTable *ht);
ZEND_API void zend_hash_graceful_reverse_destroy(HashTable *ht);
ZEND_API void zend_hash_apply(HashTable *ht, apply_func_t apply_func TSRMLS_DC);
ZEND_API void zend_hash_apply_with_argument(HashTable *ht, apply_func_arg_t apply_func, void * TSRMLS_DC);
ZEND_API void zend_hash_apply_with_arguments(HashTable *ht, apply_func_args_t apply_func, int, ...);
/* This function should be used with special care (in other words,
* it should usually not be used). When used with the ZEND_HASH_APPLY_STOP
* return value, it assumes things about the order of the elements in the hash.
* Also, it does not provide the same kind of reentrancy protection that
* the standard apply functions do.
*/
ZEND_API void zend_hash_reverse_apply(HashTable *ht, apply_func_t apply_func TSRMLS_DC);
/* Deletes */
ZEND_API int zend_hash_del_key_or_index(HashTable *ht, char *arKey, uint nKeyLength, ulong h, int flag);
#define zend_hash_del(ht, arKey, nKeyLength) \
zend_hash_del_key_or_index(ht, arKey, nKeyLength, 0, HASH_DEL_KEY)
#define zend_hash_index_del(ht, h) \
zend_hash_del_key_or_index(ht, NULL, 0, h, HASH_DEL_INDEX)
ZEND_API ulong zend_get_hash_value(HashTable *ht, char *arKey, uint nKeyLength);
/* Data retreival */
ZEND_API int zend_hash_find(HashTable *ht, char *arKey, uint nKeyLength, void **pData);
ZEND_API int zend_hash_quick_find(HashTable *ht, char *arKey, uint nKeyLength, ulong h, void **pData);
ZEND_API int zend_hash_index_find(HashTable *ht, ulong h, void **pData);
/* Misc */
ZEND_API int zend_hash_exists(HashTable *ht, char *arKey, uint nKeyLength);
ZEND_API int zend_hash_index_exists(HashTable *ht, ulong h);
ZEND_API ulong zend_hash_next_free_element(HashTable *ht);
/* traversing */
ZEND_API int zend_hash_move_forward_ex(HashTable *ht, HashPosition *pos);
ZEND_API int zend_hash_move_backwards_ex(HashTable *ht, HashPosition *pos);
ZEND_API int zend_hash_get_current_key_ex(HashTable *ht, char **str_index, uint *str_length, ulong *num_index, zend_bool duplicate, HashPosition *pos);
ZEND_API int zend_hash_get_current_key_type_ex(HashTable *ht, HashPosition *pos);
ZEND_API int zend_hash_get_current_data_ex(HashTable *ht, void **pData, HashPosition *pos);
ZEND_API void zend_hash_internal_pointer_reset_ex(HashTable *ht, HashPosition *pos);
ZEND_API void zend_hash_internal_pointer_end_ex(HashTable *ht, HashPosition *pos);
#define zend_hash_move_forward(ht) \
zend_hash_move_forward_ex(ht, NULL)
#define zend_hash_move_backwards(ht) \
zend_hash_move_backwards_ex(ht, NULL)
#define zend_hash_get_current_key(ht, str_index, num_index, duplicate) \
zend_hash_get_current_key_ex(ht, str_index, NULL, num_index, duplicate, NULL)
#define zend_hash_get_current_key_type(ht) \
zend_hash_get_current_key_type_ex(ht, NULL)
#define zend_hash_get_current_data(ht, pData) \
zend_hash_get_current_data_ex(ht, pData, NULL)
#define zend_hash_internal_pointer_reset(ht) \
zend_hash_internal_pointer_reset_ex(ht, NULL)
#define zend_hash_internal_pointer_end(ht) \
zend_hash_internal_pointer_end_ex(ht, NULL)
/* Copying, merging and sorting */
ZEND_API void zend_hash_copy(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size);
ZEND_API void zend_hash_merge(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size, int overwrite);
ZEND_API void zend_hash_merge_ex(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, uint size, zend_bool (*pReplaceOrig)(void *orig, void *p_new));
ZEND_API int zend_hash_sort(HashTable *ht, sort_func_t sort_func, compare_func_t compare_func, int renumber TSRMLS_DC);
ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t compar, zend_bool ordered TSRMLS_DC);
ZEND_API int zend_hash_minmax(HashTable *ht, compare_func_t compar, int flag, void **pData TSRMLS_DC);
ZEND_API int zend_hash_num_elements(HashTable *ht);
ZEND_API int zend_hash_rehash(HashTable *ht);
/*
* DJBX33A (Daniel J. Bernstein, Times 33 with Addition)
*
* This is Daniel J. Bernstein's popular `times 33' hash function as
* posted by him years ago on comp.lang.c. It basically uses a function
* like ``hash(i) = hash(i-1) * 33 + str[i]''. This is one of the best
* known hash functions for strings. Because it is both computed very
* fast and distributes very well.
*
* The magic of number 33, i.e. why it works better than many other
* constants, prime or not, has never been adequately explained by
* anyone. So I try an explanation: if one experimentally tests all
* multipliers between 1 and 256 (as RSE did now) one detects that even
* numbers are not useable at all. The remaining 128 odd numbers
* (except for the number 1) work more or less all equally well. They
* all distribute in an acceptable way and this way fill a hash table
* with an average percent of approx. 86%.
*
* If one compares the Chi^2 values of the variants, the number 33 not
* even has the best value. But the number 33 and a few other equally
* good numbers like 17, 31, 63, 127 and 129 have nevertheless a great
* advantage to the remaining numbers in the large set of possible
* multipliers: their multiply operation can be replaced by a faster
* operation based on just one shift plus either a single addition
* or subtraction operation. And because a hash function has to both
* distribute good _and_ has to be very fast to compute, those few
* numbers should be preferred and seems to be the reason why Daniel J.
* Bernstein also preferred it.
*
*
* -- Ralf S. Engelschall <rse@engelschall.com>
*/
static inline ulong zend_inline_hash_func(char *arKey, uint nKeyLength)
{
register ulong hash = 5381;
/* variant with the hash unrolled eight times */
for (; nKeyLength >= 8; nKeyLength -= 8) {
hash = ((hash << 5) + hash) + *arKey++;
hash = ((hash << 5) + hash) + *arKey++;
hash = ((hash << 5) + hash) + *arKey++;
hash = ((hash << 5) + hash) + *arKey++;
hash = ((hash << 5) + hash) + *arKey++;
hash = ((hash << 5) + hash) + *arKey++;
hash = ((hash << 5) + hash) + *arKey++;
hash = ((hash << 5) + hash) + *arKey++;
}
switch (nKeyLength) {
case 7: hash = ((hash << 5) + hash) + *arKey++; /* fallthrough... */
case 6: hash = ((hash << 5) + hash) + *arKey++; /* fallthrough... */
case 5: hash = ((hash << 5) + hash) + *arKey++; /* fallthrough... */
case 4: hash = ((hash << 5) + hash) + *arKey++; /* fallthrough... */
case 3: hash = ((hash << 5) + hash) + *arKey++; /* fallthrough... */
case 2: hash = ((hash << 5) + hash) + *arKey++; /* fallthrough... */
case 1: hash = ((hash << 5) + hash) + *arKey++; break;
case 0: break;
EMPTY_SWITCH_DEFAULT_CASE()
}
return hash;
}
ZEND_API ulong zend_hash_func(char *arKey, uint nKeyLength);
#if ZEND_DEBUG
/* debug */
void zend_hash_display_pListTail(HashTable *ht);
void zend_hash_display(HashTable *ht);
#endif
END_EXTERN_C()
#define ZEND_INIT_SYMTABLE(ht) \
ZEND_INIT_SYMTABLE_EX(ht, 2, 0)
#define ZEND_INIT_SYMTABLE_EX(ht, n, persistent) \
zend_hash_init(ht, n, NULL, ZVAL_PTR_DTOR, persistent)
#endif /* ZEND_HASH_H */
-247
View File
@@ -1,247 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include "zend.h"
#include "zend_language_parser.h"
#include "zend_compile.h"
#include "zend_highlight.h"
#include "zend_ptr_stack.h"
#include "zend_globals.h"
ZEND_API void zend_html_putc(char c)
{
switch (c) {
case '\n':
ZEND_PUTS("<br />");
break;
case '<':
ZEND_PUTS("&lt;");
break;
case '>':
ZEND_PUTS("&gt;");
break;
case '&':
ZEND_PUTS("&amp;");
break;
case ' ':
ZEND_PUTS("&nbsp;");
break;
case '\t':
ZEND_PUTS("&nbsp;&nbsp;&nbsp;&nbsp;");
break;
default:
ZEND_PUTC(c);
break;
}
}
ZEND_API void zend_html_puts(const char *s, uint len TSRMLS_DC)
{
const char *ptr=s, *end=s+len;
while (ptr<end) {
if (*ptr==' ') {
/* Series of spaces should be displayed as &nbsp;'s
* whereas single spaces should be displayed as a space
*/
if ((ptr+1) < end && *(ptr+1)==' ') {
do {
zend_html_putc(*ptr);
} while ((++ptr < end) && (*ptr==' '));
} else {
ZEND_PUTC(*ptr);
ptr++;
}
} else {
zend_html_putc(*ptr++);
}
}
}
ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini TSRMLS_DC)
{
zval token;
int token_type;
char *last_color = syntax_highlighter_ini->highlight_html;
char *next_color;
int in_string=0;
zend_printf("<code>");
zend_printf("<font color=\"%s\">\n", last_color);
/* highlight stuff coming back from zendlex() */
token.type = 0;
while ((token_type=lex_scan(&token TSRMLS_CC))) {
switch (token_type) {
case T_INLINE_HTML:
next_color = syntax_highlighter_ini->highlight_html;
break;
case T_COMMENT:
next_color = syntax_highlighter_ini->highlight_comment;
break;
case T_OPEN_TAG:
case T_OPEN_TAG_WITH_ECHO:
next_color = syntax_highlighter_ini->highlight_default;
break;
case T_CLOSE_TAG:
next_color = syntax_highlighter_ini->highlight_default;
break;
case T_CONSTANT_ENCAPSED_STRING:
next_color = syntax_highlighter_ini->highlight_string;
break;
case '"':
next_color = syntax_highlighter_ini->highlight_string;
in_string = !in_string;
break;
case T_WHITESPACE:
zend_html_puts(LANG_SCNG(yy_text), LANG_SCNG(yy_leng) TSRMLS_CC); /* no color needed */
token.type = 0;
continue;
break;
default:
if (token.type==0) {
next_color = syntax_highlighter_ini->highlight_keyword;
} else {
if (in_string) {
next_color = syntax_highlighter_ini->highlight_string;
} else {
next_color = syntax_highlighter_ini->highlight_default;
}
}
break;
}
if (last_color != next_color) {
if (last_color != syntax_highlighter_ini->highlight_html) {
zend_printf("</font>");
}
last_color = next_color;
if (last_color != syntax_highlighter_ini->highlight_html) {
zend_printf("<font color=\"%s\">", last_color);
}
}
switch (token_type) {
case T_END_HEREDOC:
zend_html_puts(token.value.str.val, token.value.str.len TSRMLS_CC);
break;
default:
zend_html_puts(LANG_SCNG(yy_text), LANG_SCNG(yy_leng) TSRMLS_CC);
break;
}
if (token.type == IS_STRING) {
switch (token_type) {
case T_OPEN_TAG:
case T_OPEN_TAG_WITH_ECHO:
case T_CLOSE_TAG:
case T_WHITESPACE:
case T_COMMENT:
break;
default:
efree(token.value.str.val);
break;
}
} else if (token_type == T_END_HEREDOC) {
zend_bool has_semicolon=(strchr(token.value.str.val, ';')?1:0);
efree(token.value.str.val);
if (has_semicolon) {
/* the following semicolon was unput(), ignore it */
lex_scan(&token TSRMLS_CC);
}
}
token.type = 0;
}
if (last_color != syntax_highlighter_ini->highlight_html) {
zend_printf("</font>\n");
}
zend_printf("</font>\n");
zend_printf("</code>");
}
ZEND_API void zend_strip(TSRMLS_D)
{
zval token;
int token_type;
token.type = 0;
while ((token_type=lex_scan(&token TSRMLS_CC))) {
switch (token_type) {
case T_COMMENT:
token.type = 0;
continue;
case T_WHITESPACE:
if (token.type) {
putchar(' ');
token.type = 0;
}
continue;
}
switch (token_type) {
case 349:
break;
default: {
char c, *ptr=LANG_SCNG(yy_text), *end=LANG_SCNG(yy_text)+LANG_SCNG(yy_leng);
while (ptr<end) {
c = *ptr++;
putchar(c);
}
}
break;
}
if (token.type == IS_STRING) {
switch (token_type) {
case T_OPEN_TAG:
case T_OPEN_TAG_WITH_ECHO:
case T_CLOSE_TAG:
case T_WHITESPACE:
case T_COMMENT:
break;
default:
efree(token.value.str.val);
break;
}
} else if (token_type == T_END_HEREDOC) {
zend_bool has_semicolon=(strchr(token.value.str.val, ';')?1:0);
efree(token.value.str.val);
if (has_semicolon) {
/* the following semicolon was unput(), ignore it */
lex_scan(&token TSRMLS_CC);
}
}
token.type = 0;
}
}
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
-52
View File
@@ -1,52 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_HIGHLIGHT_H
#define ZEND_HIGHLIGHT_H
#define HL_COMMENT_COLOR "#FF8000" /* orange */
#define HL_DEFAULT_COLOR "#0000BB" /* blue */
#define HL_HTML_COLOR "#000000" /* black */
#define HL_STRING_COLOR "#DD0000" /* red */
#define HL_BG_COLOR "#FFFFFF" /* white */
#define HL_KEYWORD_COLOR "#007700" /* green */
typedef struct _zend_syntax_highlighter_ini {
char *highlight_html;
char *highlight_comment;
char *highlight_default;
char *highlight_string;
char *highlight_keyword;
} zend_syntax_highlighter_ini;
BEGIN_EXTERN_C()
ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini TSRMLS_DC);
ZEND_API void zend_strip(TSRMLS_D);
ZEND_API int highlight_file(char *filename, zend_syntax_highlighter_ini *syntax_highlighter_ini TSRMLS_DC);
ZEND_API int highlight_string(zval *str, zend_syntax_highlighter_ini *syntax_highlighter_ini, char *str_name TSRMLS_DC);
ZEND_API void zend_html_putc(char c);
ZEND_API void zend_html_puts(const char *s, uint len TSRMLS_DC);
END_EXTERN_C()
extern zend_syntax_highlighter_ini syntax_highlighter_ini;
#endif
-147
View File
@@ -1,147 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
/* This indenter doesn't really work, it's here for no particular reason. */
#include "zend.h"
#include "zend_language_parser.h"
#include "zend_compile.h"
#include "zend_indent.h"
#define zendtext LANG_SCNG(yy_text)
#define zendleng LANG_SCNG(yy_leng)
static void handle_whitespace(int *emit_whitespace)
{
unsigned char c;
int i;
for (c=0; c<128; c++) {
if (emit_whitespace[c]>0) {
for (i=0; i<emit_whitespace[c]; i++) {
zend_write((char *) &c, 1);
}
}
}
memset(emit_whitespace, 0, sizeof(int)*256);
}
ZEND_API void zend_indent()
{
zval token;
int token_type;
int in_string=0;
int nest_level=0;
int emit_whitespace[256];
int i;
TSRMLS_FETCH();
memset(emit_whitespace, 0, sizeof(int)*256);
/* highlight stuff coming back from zendlex() */
token.type = 0;
while ((token_type=lex_scan(&token TSRMLS_CC))) {
switch (token_type) {
case T_INLINE_HTML:
zend_write(LANG_SCNG(yy_text), LANG_SCNG(yy_leng));
break;
case T_WHITESPACE: {
token.type = 0;
/* eat whitespace, emit newlines */
for (i=0; i<LANG_SCNG(yy_leng); i++) {
emit_whitespace[(unsigned char) LANG_SCNG(yy_text)[i]]++;
}
continue;
}
break;
case '"':
in_string = !in_string;
/* break missing intentionally */
default:
if (token.type==0) {
/* keyword */
switch(token_type) {
case ',':
ZEND_PUTS(", ");
goto dflt_printout;
break;
case '{':
nest_level++;
if (emit_whitespace['\n']>0) {
ZEND_PUTS(" {\n");
memset(emit_whitespace, 0, sizeof(int)*256);
} else {
ZEND_PUTS("{");
}
break;
case '}':
nest_level--;
if (emit_whitespace['\n']==0) {
ZEND_PUTS("\n");
}
for (i=0; i<nest_level; i++) {
ZEND_PUTS(" ");
}
goto dflt_printout;
break;
dflt_printout:
default:
if (emit_whitespace['\n']>0) {
for (i=0; i<emit_whitespace['\n']; i++) {
ZEND_PUTS("\n");
}
memset(emit_whitespace, 0, sizeof(int)*256);
for (i=0; i<nest_level; i++) {
ZEND_PUTS(" ");
}
} else {
handle_whitespace(emit_whitespace);
}
zend_write(LANG_SCNG(yy_text), LANG_SCNG(yy_leng));
break;
}
} else {
handle_whitespace(emit_whitespace);
if (in_string) {
zend_write(LANG_SCNG(yy_text), LANG_SCNG(yy_leng));
/* a part of a string */
} else {
zend_write(LANG_SCNG(yy_text), LANG_SCNG(yy_leng));
}
}
break;
}
if (token.type == IS_STRING) {
switch (token_type) {
case T_OPEN_TAG:
case T_CLOSE_TAG:
case T_WHITESPACE:
break;
default:
efree(token.value.str.val);
break;
}
}
token.type = 0;
}
}
-26
View File
@@ -1,26 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_INDENT_H
#define ZEND_INDENT_H
ZEND_API void zend_indent(void);
#endif /* ZEND_INDENT_H */
-509
View File
@@ -1,509 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include "zend.h"
#include "zend_qsort.h"
#include "zend_API.h"
#include "zend_ini.h"
#include "zend_alloc.h"
#include "zend_operators.h"
static HashTable *registered_zend_ini_directives;
#define NO_VALUE_PLAINTEXT "no value"
#define NO_VALUE_HTML "<i>no value</i>"
/*
* hash_apply functions
*/
static int zend_remove_ini_entries(zend_ini_entry *ini_entry, int *module_number TSRMLS_DC)
{
if (ini_entry->module_number == *module_number) {
return 1;
} else {
return 0;
}
}
static int zend_restore_ini_entry_cb(zend_ini_entry *ini_entry, int stage TSRMLS_DC)
{
if (ini_entry->modified) {
if (ini_entry->on_modify) {
ini_entry->on_modify(ini_entry, ini_entry->orig_value, ini_entry->orig_value_length, ini_entry->mh_arg1, ini_entry->mh_arg2, ini_entry->mh_arg3, stage TSRMLS_CC);
}
efree(ini_entry->value);
ini_entry->value = ini_entry->orig_value;
ini_entry->value_length = ini_entry->orig_value_length;
ini_entry->modified = 0;
ini_entry->orig_value = NULL;
ini_entry->orig_value_length = 0;
}
return 0;
}
/*
* Startup / shutdown
*/
ZEND_API int zend_ini_startup(TSRMLS_D)
{
registered_zend_ini_directives = (HashTable *) malloc(sizeof(HashTable));
EG(ini_directives) = registered_zend_ini_directives;
if (zend_hash_init_ex(registered_zend_ini_directives, 100, NULL, NULL, 1, 0)==FAILURE) {
return FAILURE;
}
return SUCCESS;
}
ZEND_API int zend_ini_shutdown(TSRMLS_D)
{
zend_hash_destroy(EG(ini_directives));
return SUCCESS;
}
ZEND_API int zend_ini_deactivate(TSRMLS_D)
{
zend_hash_apply_with_argument(EG(ini_directives), (apply_func_arg_t) zend_restore_ini_entry_cb, (void *) ZEND_INI_STAGE_DEACTIVATE TSRMLS_CC);
return SUCCESS;
}
#ifdef ZTS
ZEND_API int zend_copy_ini_directives(TSRMLS_D)
{
zend_ini_entry ini_entry;
EG(ini_directives) = (HashTable *) malloc(sizeof(HashTable));
if (zend_hash_init_ex(EG(ini_directives), registered_zend_ini_directives->nNumOfElements, NULL, NULL, 1, 0)==FAILURE) {
return FAILURE;
}
zend_hash_copy(EG(ini_directives), registered_zend_ini_directives, NULL, &ini_entry, sizeof(zend_ini_entry));
zend_ini_refresh_caches(ZEND_INI_STAGE_STARTUP TSRMLS_CC);
return SUCCESS;
}
#endif
static int ini_key_compare(const void *a, const void *b TSRMLS_DC)
{
Bucket *f;
Bucket *s;
f = *((Bucket **) a);
s = *((Bucket **) b);
if (f->nKeyLength==0 && s->nKeyLength==0) { /* both numeric */
return ZEND_NORMALIZE_BOOL(f->nKeyLength - s->nKeyLength);
} else if (f->nKeyLength==0) { /* f is numeric, s is not */
return -1;
} else if (s->nKeyLength==0) { /* s is numeric, f is not */
return 1;
} else { /* both strings */
return zend_binary_strcasecmp(f->arKey, f->nKeyLength, s->arKey, s->nKeyLength);
}
}
ZEND_API void zend_ini_sort_entries(TSRMLS_D)
{
zend_hash_sort(EG(ini_directives), zend_qsort, ini_key_compare, 0 TSRMLS_CC);
}
/*
* Registration / unregistration
*/
ZEND_API int zend_register_ini_entries(zend_ini_entry *ini_entry, int module_number TSRMLS_DC)
{
zend_ini_entry *p = ini_entry;
zend_ini_entry *hashed_ini_entry;
zval default_value;
while (p->name) {
p->module_number = module_number;
if (zend_hash_add(registered_zend_ini_directives, p->name, p->name_length, p, sizeof(zend_ini_entry), (void **) &hashed_ini_entry)==FAILURE) {
zend_unregister_ini_entries(module_number TSRMLS_CC);
return FAILURE;
}
if ((zend_get_configuration_directive(p->name, p->name_length, &default_value))==SUCCESS) {
if (!hashed_ini_entry->on_modify
|| hashed_ini_entry->on_modify(hashed_ini_entry, default_value.value.str.val, default_value.value.str.len, hashed_ini_entry->mh_arg1, hashed_ini_entry->mh_arg2, hashed_ini_entry->mh_arg3, ZEND_INI_STAGE_STARTUP TSRMLS_CC)==SUCCESS) {
hashed_ini_entry->value = default_value.value.str.val;
hashed_ini_entry->value_length = default_value.value.str.len;
}
} else {
if (hashed_ini_entry->on_modify) {
hashed_ini_entry->on_modify(hashed_ini_entry, hashed_ini_entry->value, hashed_ini_entry->value_length, hashed_ini_entry->mh_arg1, hashed_ini_entry->mh_arg2, hashed_ini_entry->mh_arg3, ZEND_INI_STAGE_STARTUP TSRMLS_CC);
}
}
p++;
}
return SUCCESS;
}
ZEND_API void zend_unregister_ini_entries(int module_number TSRMLS_DC)
{
zend_hash_apply_with_argument(registered_zend_ini_directives, (apply_func_arg_t) zend_remove_ini_entries, (void *) &module_number TSRMLS_CC);
}
static int zend_ini_refresh_cache(zend_ini_entry *p, int stage TSRMLS_DC)
{
if (p->on_modify) {
p->on_modify(p, p->value, p->value_length, p->mh_arg1, p->mh_arg2, p->mh_arg3, stage TSRMLS_CC);
}
return 0;
}
ZEND_API void zend_ini_refresh_caches(int stage TSRMLS_DC)
{
zend_hash_apply_with_argument(EG(ini_directives), (apply_func_arg_t) zend_ini_refresh_cache, (void *)(long) stage TSRMLS_CC);
}
ZEND_API int zend_alter_ini_entry(char *name, uint name_length, char *new_value, uint new_value_length, int modify_type, int stage)
{
zend_ini_entry *ini_entry;
char *duplicate;
TSRMLS_FETCH();
if (zend_hash_find(EG(ini_directives), name, name_length, (void **) &ini_entry)==FAILURE) {
return FAILURE;
}
if (!(ini_entry->modifyable & modify_type)) {
return FAILURE;
}
duplicate = estrndup(new_value, new_value_length);
if (!ini_entry->on_modify
|| ini_entry->on_modify(ini_entry, duplicate, new_value_length, ini_entry->mh_arg1, ini_entry->mh_arg2, ini_entry->mh_arg3, stage TSRMLS_CC)==SUCCESS) {
if (!ini_entry->modified) {
ini_entry->orig_value = ini_entry->value;
ini_entry->orig_value_length = ini_entry->value_length;
} else { /* we already changed the value, free the changed value */
efree(ini_entry->value);
}
ini_entry->value = duplicate;
ini_entry->value_length = new_value_length;
ini_entry->modified = 1;
} else {
efree(duplicate);
}
return SUCCESS;
}
ZEND_API int zend_restore_ini_entry(char *name, uint name_length, int stage)
{
zend_ini_entry *ini_entry;
TSRMLS_FETCH();
if (zend_hash_find(EG(ini_directives), name, name_length, (void **) &ini_entry)==FAILURE) {
return FAILURE;
}
zend_restore_ini_entry_cb(ini_entry, stage TSRMLS_CC);
return SUCCESS;
}
ZEND_API int zend_ini_register_displayer(char *name, uint name_length, void (*displayer)(zend_ini_entry *ini_entry, int type))
{
zend_ini_entry *ini_entry;
if (zend_hash_find(registered_zend_ini_directives, name, name_length, (void **) &ini_entry)==FAILURE) {
return FAILURE;
}
ini_entry->displayer = displayer;
return SUCCESS;
}
/*
* Data retrieval
*/
ZEND_API long zend_ini_long(char *name, uint name_length, int orig)
{
zend_ini_entry *ini_entry;
TSRMLS_FETCH();
if (zend_hash_find(EG(ini_directives), name, name_length, (void **) &ini_entry)==SUCCESS) {
if (orig && ini_entry->modified) {
return (ini_entry->orig_value ? strtol(ini_entry->orig_value, NULL, 0) : 0);
} else if (ini_entry->value) {
return strtol(ini_entry->value, NULL, 0);
}
}
return 0;
}
ZEND_API double zend_ini_double(char *name, uint name_length, int orig)
{
zend_ini_entry *ini_entry;
TSRMLS_FETCH();
if (zend_hash_find(EG(ini_directives), name, name_length, (void **) &ini_entry)==SUCCESS) {
if (orig && ini_entry->modified) {
return (double) (ini_entry->orig_value ? strtod(ini_entry->orig_value, NULL) : 0.0);
} else if (ini_entry->value) {
return (double) strtod(ini_entry->value, NULL);
}
}
return 0.0;
}
ZEND_API char *zend_ini_string(char *name, uint name_length, int orig)
{
zend_ini_entry *ini_entry;
TSRMLS_FETCH();
if (zend_hash_find(EG(ini_directives), name, name_length, (void **) &ini_entry)==SUCCESS) {
if (orig && ini_entry->modified) {
return ini_entry->orig_value;
} else {
return ini_entry->value;
}
}
return "";
}
static void zend_ini_displayer_cb(zend_ini_entry *ini_entry, int type)
{
if (ini_entry->displayer) {
ini_entry->displayer(ini_entry, type);
} else {
char *display_string;
uint display_string_length;
if (type==ZEND_INI_DISPLAY_ORIG && ini_entry->modified) {
if (ini_entry->orig_value) {
display_string = ini_entry->orig_value;
display_string_length = ini_entry->orig_value_length;
} else {
if (zend_uv.html_errors) {
display_string = NO_VALUE_HTML;
display_string_length = sizeof(NO_VALUE_HTML)-1;
} else {
display_string = NO_VALUE_PLAINTEXT;
display_string_length = sizeof(NO_VALUE_PLAINTEXT)-1;
}
}
} else if (ini_entry->value && ini_entry->value[0]) {
display_string = ini_entry->value;
display_string_length = ini_entry->value_length;
} else {
if (zend_uv.html_errors) {
display_string = NO_VALUE_HTML;
display_string_length = sizeof(NO_VALUE_HTML)-1;
} else {
display_string = NO_VALUE_PLAINTEXT;
display_string_length = sizeof(NO_VALUE_PLAINTEXT)-1;
}
}
ZEND_WRITE(display_string, display_string_length);
}
}
ZEND_INI_DISP(zend_ini_boolean_displayer_cb)
{
int value;
if (type==ZEND_INI_DISPLAY_ORIG && ini_entry->modified) {
value = (ini_entry->orig_value ? atoi(ini_entry->orig_value) : 0);
} else if (ini_entry->value) {
value = atoi(ini_entry->value);
} else {
value = 0;
}
if (value) {
ZEND_PUTS("On");
} else {
ZEND_PUTS("Off");
}
}
ZEND_INI_DISP(zend_ini_color_displayer_cb)
{
char *value;
if (type==ZEND_INI_DISPLAY_ORIG && ini_entry->modified) {
value = ini_entry->orig_value;
} else if (ini_entry->value) {
value = ini_entry->value;
} else {
value = NULL;
}
if (value) {
if (zend_uv.html_errors) {
zend_printf("<font style=\"color: %s\">%s</font>", value, value);
} else {
ZEND_PUTS(value);
}
} else {
if (zend_uv.html_errors) {
ZEND_PUTS(NO_VALUE_HTML);
} else {
ZEND_PUTS(NO_VALUE_PLAINTEXT);
}
}
}
ZEND_INI_DISP(display_link_numbers)
{
char *value;
if (type==ZEND_INI_DISPLAY_ORIG && ini_entry->modified) {
value = ini_entry->orig_value;
} else if (ini_entry->value) {
value = ini_entry->value;
} else {
value = NULL;
}
if (value) {
if (atoi(value)==-1) {
ZEND_PUTS("Unlimited");
} else {
zend_printf("%s", value);
}
}
}
/* Standard message handlers */
ZEND_API ZEND_INI_MH(OnUpdateBool)
{
zend_bool *p;
#ifndef ZTS
char *base = (char *) mh_arg2;
#else
char *base;
base = (char *) ts_resource(*((int *) mh_arg2));
#endif
p = (zend_bool *) (base+(size_t) mh_arg1);
*p = (zend_bool) atoi(new_value);
return SUCCESS;
}
ZEND_API ZEND_INI_MH(OnUpdateInt)
{
long *p;
#ifndef ZTS
char *base = (char *) mh_arg2;
#else
char *base;
base = (char *) ts_resource(*((int *) mh_arg2));
#endif
p = (long *) (base+(size_t) mh_arg1);
*p = zend_atoi(new_value, new_value_length);
return SUCCESS;
}
ZEND_API ZEND_INI_MH(OnUpdateReal)
{
double *p;
#ifndef ZTS
char *base = (char *) mh_arg2;
#else
char *base;
base = (char *) ts_resource(*((int *) mh_arg2));
#endif
p = (double *) (base+(size_t) mh_arg1);
*p = strtod(new_value, NULL);
return SUCCESS;
}
ZEND_API ZEND_INI_MH(OnUpdateString)
{
char **p;
#ifndef ZTS
char *base = (char *) mh_arg2;
#else
char *base;
base = (char *) ts_resource(*((int *) mh_arg2));
#endif
p = (char **) (base+(size_t) mh_arg1);
*p = new_value;
return SUCCESS;
}
ZEND_API ZEND_INI_MH(OnUpdateStringUnempty)
{
char **p;
#ifndef ZTS
char *base = (char *) mh_arg2;
#else
char *base;
base = (char *) ts_resource(*((int *) mh_arg2));
#endif
if (new_value && !new_value[0]) {
return FAILURE;
}
p = (char **) (base+(size_t) mh_arg1);
*p = new_value;
return SUCCESS;
}
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
-199
View File
@@ -1,199 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_INI_H
#define ZEND_INI_H
#define ZEND_INI_USER (1<<0)
#define ZEND_INI_PERDIR (1<<1)
#define ZEND_INI_SYSTEM (1<<2)
#define ZEND_INI_ALL (ZEND_INI_USER|ZEND_INI_PERDIR|ZEND_INI_SYSTEM)
#ifndef XtOffsetOf
# if defined(CRAY) || (defined(__arm) && !defined(LINUX))
# ifdef __STDC__
# define XtOffset(p_type, field) _Offsetof(p_type, field)
# else
# ifdef CRAY2
# define XtOffset(p_type, field) \
(sizeof(int)*((unsigned int)&(((p_type)NULL)->field)))
# else /* !CRAY2 */
# define XtOffset(p_type, field) ((unsigned int)&(((p_type)NULL)->field))
# endif /* !CRAY2 */
# endif /* __STDC__ */
# else /* ! (CRAY || __arm) */
# define XtOffset(p_type, field) \
((long) (((char *) (&(((p_type)NULL)->field))) - ((char *) NULL)))
# endif /* !CRAY */
# ifdef offsetof
# define XtOffsetOf(s_type, field) offsetof(s_type, field)
# else
# define XtOffsetOf(s_type, field) XtOffset(s_type*, field)
# endif
#endif
typedef struct _zend_ini_entry zend_ini_entry;
#define ZEND_INI_MH(name) int name(zend_ini_entry *entry, char *new_value, uint new_value_length, void *mh_arg1, void *mh_arg2, void *mh_arg3, int stage TSRMLS_DC)
#define ZEND_INI_DISP(name) void name(zend_ini_entry *ini_entry, int type)
struct _zend_ini_entry {
int module_number;
int modifyable;
char *name;
uint name_length;
ZEND_INI_MH((*on_modify));
void *mh_arg1;
void *mh_arg2;
void *mh_arg3;
char *value;
uint value_length;
char *orig_value;
uint orig_value_length;
int modified;
void (*displayer)(zend_ini_entry *ini_entry, int type);
};
ZEND_API int zend_ini_startup(TSRMLS_D);
ZEND_API int zend_ini_shutdown(TSRMLS_D);
ZEND_API int zend_ini_deactivate(TSRMLS_D);
ZEND_API int zend_copy_ini_directives(TSRMLS_D);
ZEND_API void zend_ini_sort_entries(TSRMLS_D);
ZEND_API int zend_register_ini_entries(zend_ini_entry *ini_entry, int module_number TSRMLS_DC);
ZEND_API void zend_unregister_ini_entries(int module_number TSRMLS_DC);
ZEND_API void zend_ini_refresh_caches(int stage TSRMLS_DC);
ZEND_API int zend_alter_ini_entry(char *name, uint name_length, char *new_value, uint new_value_length, int modify_type, int stage);
ZEND_API int zend_restore_ini_entry(char *name, uint name_length, int stage);
ZEND_API void display_ini_entries(zend_module_entry *module);
ZEND_API long zend_ini_long(char *name, uint name_length, int orig);
ZEND_API double zend_ini_double(char *name, uint name_length, int orig);
ZEND_API char *zend_ini_string(char *name, uint name_length, int orig);
ZEND_API int zend_ini_register_displayer(char *name, uint name_length, void (*displayer)(zend_ini_entry *ini_entry, int type));
ZEND_API ZEND_INI_DISP(zend_ini_boolean_displayer_cb);
ZEND_API ZEND_INI_DISP(zend_ini_color_displayer_cb);
ZEND_API ZEND_INI_DISP(display_link_numbers);
#define ZEND_INI_BEGIN() static zend_ini_entry ini_entries[] = {
#define ZEND_INI_END() { 0, 0, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, 0, 0, NULL } };
#define ZEND_INI_ENTRY3_EX(name, default_value, modifyable, on_modify, arg1, arg2, arg3, displayer) \
{ 0, modifyable, name, sizeof(name), on_modify, arg1, arg2, arg3, default_value, sizeof(default_value)-1, NULL, 0, 0, displayer },
#define ZEND_INI_ENTRY3(name, default_value, modifyable, on_modify, arg1, arg2, arg3) \
ZEND_INI_ENTRY3_EX(name, default_value, modifyable, on_modify, arg1, arg2, arg3, NULL)
#define ZEND_INI_ENTRY2_EX(name, default_value, modifyable, on_modify, arg1, arg2, displayer) \
ZEND_INI_ENTRY3_EX(name, default_value, modifyable, on_modify, arg1, arg2, NULL, displayer)
#define ZEND_INI_ENTRY2(name, default_value, modifyable, on_modify, arg1, arg2) \
ZEND_INI_ENTRY2_EX(name, default_value, modifyable, on_modify, arg1, arg2, NULL)
#define ZEND_INI_ENTRY1_EX(name, default_value, modifyable, on_modify, arg1, displayer) \
ZEND_INI_ENTRY3_EX(name, default_value, modifyable, on_modify, arg1, NULL, NULL, displayer)
#define ZEND_INI_ENTRY1(name, default_value, modifyable, on_modify, arg1) \
ZEND_INI_ENTRY1_EX(name, default_value, modifyable, on_modify, arg1, NULL)
#define ZEND_INI_ENTRY_EX(name, default_value, modifyable, on_modify, displayer) \
ZEND_INI_ENTRY3_EX(name, default_value, modifyable, on_modify, NULL, NULL, NULL, displayer)
#define ZEND_INI_ENTRY(name, default_value, modifyable, on_modify) \
ZEND_INI_ENTRY_EX(name, default_value, modifyable, on_modify, NULL)
#ifdef ZTS
#define STD_ZEND_INI_ENTRY(name, default_value, modifyable, on_modify, property_name, struct_type, struct_ptr) \
ZEND_INI_ENTRY2(name, default_value, modifyable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr##_id)
#define STD_ZEND_INI_ENTRY_EX(name, default_value, modifyable, on_modify, property_name, struct_type, struct_ptr, displayer) \
ZEND_INI_ENTRY2_EX(name, default_value, modifyable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr##_id, displayer)
#define STD_ZEND_INI_BOOLEAN(name, default_value, modifyable, on_modify, property_name, struct_type, struct_ptr) \
ZEND_INI_ENTRY3_EX(name, default_value, modifyable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr##_id, NULL, zend_ini_boolean_displayer_cb)
#else
#define STD_ZEND_INI_ENTRY(name, default_value, modifyable, on_modify, property_name, struct_type, struct_ptr) \
ZEND_INI_ENTRY2(name, default_value, modifyable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr)
#define STD_ZEND_INI_ENTRY_EX(name, default_value, modifyable, on_modify, property_name, struct_type, struct_ptr, displayer) \
ZEND_INI_ENTRY2_EX(name, default_value, modifyable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr, displayer)
#define STD_ZEND_INI_BOOLEAN(name, default_value, modifyable, on_modify, property_name, struct_type, struct_ptr) \
ZEND_INI_ENTRY3_EX(name, default_value, modifyable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr, NULL, zend_ini_boolean_displayer_cb)
#endif
#define INI_INT(name) zend_ini_long((name), sizeof(name), 0)
#define INI_FLT(name) zend_ini_double((name), sizeof(name), 0)
#define INI_STR(name) zend_ini_string((name), sizeof(name), 0)
#define INI_BOOL(name) ((zend_bool) INI_INT(name))
#define INI_ORIG_INT(name) zend_ini_long((name), sizeof(name), 1)
#define INI_ORIG_FLT(name) zend_ini_double((name), sizeof(name), 1)
#define INI_ORIG_STR(name) zend_ini_string((name), sizeof(name), 1)
#define INI_ORIG_BOOL(name) ((zend_bool) INI_ORIG_INT(name))
#define REGISTER_INI_ENTRIES() zend_register_ini_entries(ini_entries, module_number TSRMLS_CC)
#define UNREGISTER_INI_ENTRIES() zend_unregister_ini_entries(module_number TSRMLS_CC)
#define DISPLAY_INI_ENTRIES() display_ini_entries(zend_module)
#define REGISTER_INI_DISPLAYER(name, displayer) zend_ini_register_displayer((name), sizeof(name), displayer)
#define REGISTER_INI_BOOLEAN(name) REGISTER_INI_DISPLAYER(name, zend_ini_boolean_displayer_cb)
/* Standard message handlers */
ZEND_API ZEND_INI_MH(OnUpdateBool);
ZEND_API ZEND_INI_MH(OnUpdateInt);
ZEND_API ZEND_INI_MH(OnUpdateReal);
ZEND_API ZEND_INI_MH(OnUpdateString);
ZEND_API ZEND_INI_MH(OnUpdateStringUnempty);
#define ZEND_INI_DISPLAY_ORIG 1
#define ZEND_INI_DISPLAY_ACTIVE 2
#define ZEND_INI_STAGE_STARTUP (1<<0)
#define ZEND_INI_STAGE_SHUTDOWN (1<<1)
#define ZEND_INI_STAGE_ACTIVATE (1<<2)
#define ZEND_INI_STAGE_DEACTIVATE (1<<3)
#define ZEND_INI_STAGE_RUNTIME (1<<4)
/* INI parsing engine */
typedef void (*zend_ini_parser_cb_t)(zval *arg1, zval *arg2, int callback_type, void *arg);
int zend_parse_ini_file(zend_file_handle *fh, zend_bool unbuffered_errors, zend_ini_parser_cb_t ini_parser_cb, void *arg);
#define ZEND_INI_PARSER_ENTRY 1
#define ZEND_INI_PARSER_SECTION 2
typedef struct _zend_ini_parser_param {
zend_ini_parser_cb_t ini_parser_cb;
void *arg;
} zend_ini_parser_param;
#endif /* ZEND_INI_H */
-235
View File
@@ -1,235 +0,0 @@
%{
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
#define DEBUG_CFG_PARSER 0
#include "zend.h"
#include "zend_API.h"
#include "zend_ini.h"
#include "zend_constants.h"
#include "zend_ini_scanner.h"
#include "zend_extensions.h"
#if WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <winbase.h>
#endif
#define YYSTYPE zval
#ifdef ZTS
#define YYPARSE_PARAM tsrm_ls
#define YYLEX_PARAM tsrm_ls
#endif
#define ZEND_INI_PARSER_CB (CG(ini_parser_param))->ini_parser_cb
#define ZEND_INI_PARSER_ARG (CG(ini_parser_param))->arg
int ini_lex(zval *ini_lval TSRMLS_DC);
#ifdef ZTS
int ini_parse(void *arg);
#else
int ini_parse(void);
#endif
zval yylval;
#ifndef ZTS
extern int ini_lex(zval *ini_lval TSRMLS_DC);
extern FILE *ini_in;
extern void init_cfg_scanner(void);
#endif
void zend_ini_do_op(char type, zval *result, zval *op1, zval *op2)
{
int i_result;
int i_op1, i_op2;
char str_result[MAX_LENGTH_OF_LONG];
i_op1 = atoi(op1->value.str.val);
free(op1->value.str.val);
if (op2) {
i_op2 = atoi(op2->value.str.val);
free(op2->value.str.val);
} else {
i_op2 = 0;
}
switch (type) {
case '|':
i_result = i_op1 | i_op2;
break;
case '&':
i_result = i_op1 & i_op2;
break;
case '~':
i_result = ~i_op1;
break;
case '!':
i_result = !i_op1;
break;
default:
i_result = 0;
break;
}
result->value.str.len = zend_sprintf(str_result, "%d", i_result);
result->value.str.val = (char *) malloc(result->value.str.len+1);
memcpy(result->value.str.val, str_result, result->value.str.len);
result->value.str.val[result->value.str.len] = 0;
result->type = IS_STRING;
}
void zend_ini_get_constant(zval *result, zval *name)
{
zval z_constant;
TSRMLS_FETCH();
if (zend_get_constant(name->value.str.val, name->value.str.len, &z_constant TSRMLS_CC)) {
/* z_constant is emalloc()'d */
convert_to_string(&z_constant);
result->value.str.val = zend_strndup(z_constant.value.str.val, z_constant.value.str.len);
result->value.str.len = z_constant.value.str.len;
result->type = z_constant.type;
zval_dtor(&z_constant);
free(name->value.str.val);
} else {
*result = *name;
}
}
static void ini_error(char *str)
{
char *error_buf;
int error_buf_len;
char *currently_parsed_filename;
TSRMLS_FETCH();
currently_parsed_filename = zend_ini_scanner_get_filename(TSRMLS_C);
error_buf_len = 128+strlen(currently_parsed_filename); /* should be more than enough */
error_buf = (char *) emalloc(error_buf_len);
sprintf(error_buf, "Error parsing %s on line %d\n", currently_parsed_filename, zend_ini_scanner_get_lineno(TSRMLS_C));
if (CG(ini_parser_unbuffered_errors)) {
#ifdef PHP_WIN32
MessageBox(NULL, error_buf, "PHP Error", MB_OK|MB_TOPMOST|0x00200000L);
#else
fprintf(stderr, "PHP: %s", error_buf);
#endif
} else {
zend_error(E_CORE_WARNING, error_buf);
}
efree(error_buf);
}
int zend_parse_ini_file(zend_file_handle *fh, zend_bool unbuffered_errors, zend_ini_parser_cb_t ini_parser_cb, void *arg)
{
int retval;
zend_ini_parser_param ini_parser_param;
TSRMLS_FETCH();
ini_parser_param.ini_parser_cb = ini_parser_cb;
ini_parser_param.arg = arg;
CG(ini_parser_param) = &ini_parser_param;
if (zend_ini_open_file_for_scanning(fh TSRMLS_CC)==FAILURE) {
return FAILURE;
}
CG(ini_parser_unbuffered_errors) = unbuffered_errors;
retval = ini_parse(TSRMLS_C);
zend_ini_close_file(fh TSRMLS_CC);
if (retval==0) {
return SUCCESS;
} else {
return FAILURE;
}
}
%}
%pure_parser
%token TC_STRING
%token TC_ENCAPSULATED_STRING
%token SECTION
%token CFG_TRUE
%token CFG_FALSE
%left '|' '&'
%right '~' '!'
%%
statement_list:
statement_list statement
| /* empty */
;
statement:
TC_STRING '=' string_or_value {
#if DEBUG_CFG_PARSER
printf("'%s' = '%s'\n", $1.value.str.val, $3.value.str.val);
#endif
ZEND_INI_PARSER_CB(&$1, &$3, ZEND_INI_PARSER_ENTRY, ZEND_INI_PARSER_ARG);
free($1.value.str.val);
free($3.value.str.val);
}
| TC_STRING { ZEND_INI_PARSER_CB(&$1, NULL, ZEND_INI_PARSER_ENTRY, ZEND_INI_PARSER_ARG); free($1.value.str.val); }
| SECTION { ZEND_INI_PARSER_CB(&$1, NULL, ZEND_INI_PARSER_SECTION, ZEND_INI_PARSER_ARG); free($1.value.str.val); }
| '\n'
;
string_or_value:
expr { $$ = $1; }
| TC_ENCAPSULATED_STRING { $$ = $1; }
| CFG_TRUE { $$ = $1; }
| CFG_FALSE { $$ = $1; }
| '\n' { $$.value.str.val = strdup(""); $$.value.str.len=0; $$.type = IS_STRING; }
| '\0' { $$.value.str.val = strdup(""); $$.value.str.len=0; $$.type = IS_STRING; }
;
expr:
constant_string { $$ = $1; }
| expr '|' expr { zend_ini_do_op('|', &$$, &$1, &$3); }
| expr '&' expr { zend_ini_do_op('&', &$$, &$1, &$3); }
| '~' expr { zend_ini_do_op('~', &$$, &$2, NULL); }
| '!' expr { zend_ini_do_op('!', &$$, &$2, NULL); }
| '(' expr ')' { $$ = $2; }
;
constant_string:
TC_STRING { zend_ini_get_constant(&$$, &$1); }
;
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
-12
View File
@@ -1,12 +0,0 @@
#ifndef _ZEND_INI_SCANNER_H
#define _ZEND_INI_SCANNER_H
BEGIN_EXTERN_C()
int zend_ini_scanner_get_lineno(TSRMLS_D);
char *zend_ini_scanner_get_filename(TSRMLS_D);
int zend_ini_open_file_for_scanning(zend_file_handle *fh TSRMLS_DC);
void zend_ini_close_file(zend_file_handle *fh TSRMLS_DC);
int ini_lex(zval *ini_lval TSRMLS_DC);
END_EXTERN_C()
#endif /* _ZEND_INI_SCANNER_H */
-234
View File
@@ -1,234 +0,0 @@
%{
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#define yyleng SCNG(yy_leng)
#define yytext SCNG(yy_text)
#define yytext_ptr SCNG(yy_text)
#define yyin SCNG(yy_in)
#define yyout SCNG(yy_out)
#define yy_last_accepting_state SCNG(_yy_last_accepting_state)
#define yy_last_accepting_cpos SCNG(_yy_last_accepting_cpos)
#define yy_more_flag SCNG(_yy_more_flag)
#define yy_more_len SCNG(_yy_more_len)
#include <errno.h>
#include "zend.h"
#include "zend_globals.h"
#include "zend_ini_parser.h"
#include "zend_ini_scanner.h"
#undef YYSTYPE
#define YYSTYPE zval
#define YY_DECL int ini_lex(zval *ini_lval TSRMLS_DC)
/* Globals Macros */
#define SCNG INI_SCNG
#ifdef ZTS
ZEND_API ts_rsrc_id ini_scanner_globals_id;
#else
ZEND_API zend_scanner_globals ini_scanner_globals;
#endif
static char *ini_filename;
void init_ini_scanner(TSRMLS_D)
{
SCNG(lineno)=1;
}
int zend_ini_scanner_get_lineno(TSRMLS_D)
{
return SCNG(lineno);
}
char *zend_ini_scanner_get_filename(TSRMLS_D)
{
return ini_filename;
}
int zend_ini_open_file_for_scanning(zend_file_handle *fh TSRMLS_DC)
{
FILE *fp;
switch (fh->type) {
case ZEND_HANDLE_FP:
fp = fh->handle.fp;
break;
case ZEND_HANDLE_FILENAME:
fp = zend_fopen(fh->filename, NULL);
fh->type = ZEND_HANDLE_FP;
break;
default:
return FAILURE;
}
init_ini_scanner(TSRMLS_C);
yyin = fp;
yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE TSRMLS_CC) TSRMLS_CC);
ini_filename = fh->filename;
return SUCCESS;
}
void zend_ini_close_file(zend_file_handle *fh TSRMLS_DC)
{
switch (fh->type) {
case ZEND_HANDLE_FP:
fclose(fh->handle.fp);
break;
}
}
%}
NEWLINE ("\r"|"\n"|"\r\n")
%option noyywrap
%%
<INITIAL>[ ]*("true"|"on"|"yes")[ ]* {
ini_lval->value.str.val = zend_strndup("1", 1);
ini_lval->value.str.len = 1;
ini_lval->type = IS_STRING;
return CFG_TRUE;
}
<INITIAL>[ ]*("false"|"off"|"no"|"none")[ ]* {
ini_lval->value.str.val = zend_strndup("", 0);
ini_lval->value.str.len = 0;
ini_lval->type = IS_STRING;
return CFG_FALSE;
}
<INITIAL>[[][^[]+[\]][ ]*{NEWLINE}? {
/* SECTION */
/* eat trailng and spaces ] */
while (yyleng>0 && (yytext[yyleng-1]=='\n' || yytext[yyleng-1]=='\r' || yytext[yyleng-1]==']' || yytext[yyleng-1]==' ')) {
yyleng--;
yytext[yyleng]=0;
}
SCNG(lineno)++;
/* eat leading [ */
yytext++;
yyleng--;
ini_lval->value.str.val = zend_strndup(yytext, yyleng);
ini_lval->value.str.len = yyleng;
ini_lval->type = IS_STRING;
return SECTION;
}
<INITIAL>["][^\n\r"]*["] {
/* ENCAPSULATED TC_STRING */
/* eat trailing " */
yytext[yyleng-1]=0;
/* eat leading " */
yytext++;
ini_lval->value.str.val = zend_strndup(yytext, yyleng - 2);
ini_lval->value.str.len = yyleng - 2;
ini_lval->type = IS_STRING;
return TC_ENCAPSULATED_STRING;
}
<INITIAL>[&|~()!] {
return yytext[0];
}
<INITIAL>[^=\n\r\t;|&~()!"]+ {
/* STRING */
register int i;
/* eat trailing whitespace */
for (i=yyleng-1; i>=0; i--) {
if (yytext[i]==' ' || yytext[i]=='\t') {
yytext[i]=0;
yyleng--;
} else {
break;
}
}
/* eat leading whitespace */
while (yytext[0]) {
if (yytext[0]==' ' || yytext[0]=='\t') {
yytext++;
yyleng--;
} else {
break;
}
}
if (yyleng!=0) {
ini_lval->value.str.val = zend_strndup(yytext, yyleng);
ini_lval->value.str.len = yyleng;
ini_lval->type = IS_STRING;
return TC_STRING;
} else {
/* whitespace */
}
}
<INITIAL>[=\n] {
if (yytext[0] == '\n') {
SCNG(lineno)++;
}
return yytext[0];
}
<INITIAL>{NEWLINE} {
SCNG(lineno)++;
return '\n';
}
<INITIAL>[;][^\r\n]*{NEWLINE}? {
/* comment */
SCNG(lineno)++;
return '\n';
}
<INITIAL>[ \t] {
/* eat whitespace */
}
<INITIAL>. {
#if DEBUG
php_error(E_NOTICE,"Unexpected character on line %d: '%s' (ASCII %d)\n", yylineno, yytext, yytext[0]);
#endif
}
<<EOF>> {
yy_delete_buffer(YY_CURRENT_BUFFER TSRMLS_CC);
yyterminate();
}
-15
View File
@@ -1,15 +0,0 @@
#ifndef _ZEND_STDIOSTREAM
#define _ZEND_STDIOSTREAM
#if defined(ZTS) && !defined(HAVE_CLASS_ISTDIOSTREAM)
class istdiostream : public istream
{
private:
stdiobuf _file;
public:
istdiostream (FILE* __f) : istream(), _file(__f) { init(&_file); }
stdiobuf* rdbuf()/* const */ { return &_file; }
};
#endif
#endif
-852
View File
@@ -1,852 +0,0 @@
%{
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
/*
* LALR shift/reduce conflicts and how they are resolved:
*
* - 2 shift/reduce conflicts due to the dangeling elseif/else ambiguity. Solved by shift.
* - 1 shift/reduce conflict due to arrays within encapsulated strings. Solved by shift.
* - 1 shift/reduce conflict due to objects within encapsulated strings. Solved by shift.
*
*/
#include "zend_compile.h"
#include "zend.h"
#include "zend_list.h"
#include "zend_globals.h"
#include "zend_API.h"
#define YYERROR_VERBOSE
#define YYSTYPE znode
#ifdef ZTS
# define YYPARSE_PARAM tsrm_ls
# define YYLEX_PARAM tsrm_ls
#endif
%}
%pure_parser
%expect 4
%left T_INCLUDE T_INCLUDE_ONCE T_EVAL T_REQUIRE T_REQUIRE_ONCE
%left ','
%left T_LOGICAL_OR
%left T_LOGICAL_XOR
%left T_LOGICAL_AND
%right T_PRINT
%left '=' T_PLUS_EQUAL T_MINUS_EQUAL T_MUL_EQUAL T_DIV_EQUAL T_CONCAT_EQUAL T_MOD_EQUAL T_AND_EQUAL T_OR_EQUAL T_XOR_EQUAL T_SL_EQUAL T_SR_EQUAL
%left '?' ':'
%left T_BOOLEAN_OR
%left T_BOOLEAN_AND
%left '|'
%left '^'
%left '&'
%nonassoc T_IS_EQUAL T_IS_NOT_EQUAL T_IS_IDENTICAL T_IS_NOT_IDENTICAL
%nonassoc '<' T_IS_SMALLER_OR_EQUAL '>' T_IS_GREATER_OR_EQUAL
%left T_SL T_SR
%left '+' '-' '.'
%left '*' '/' '%'
%right '!' '~' T_INC T_DEC T_INT_CAST T_DOUBLE_CAST T_STRING_CAST T_ARRAY_CAST T_OBJECT_CAST T_BOOL_CAST T_UNSET_CAST '@'
%right '['
%nonassoc T_NEW T_IS_CLASS
%token T_EXIT
%token T_IF
%left T_ELSEIF
%left T_ELSE
%left T_ENDIF
%token T_LNUMBER
%token T_DNUMBER
%token T_STRING
%token T_STRING_VARNAME
%token T_VARIABLE
%token T_NUM_STRING
%token T_INLINE_HTML
%token T_CHARACTER
%token T_BAD_CHARACTER
%token T_ENCAPSED_AND_WHITESPACE
%token T_CONSTANT_ENCAPSED_STRING
%token T_ECHO
%token T_DO
%token T_WHILE
%token T_ENDWHILE
%token T_FOR
%token T_ENDFOR
%token T_FOREACH
%token T_ENDFOREACH
%token T_DECLARE
%token T_ENDDECLARE
%token T_IS_CLASS
%token T_AS
%token T_SWITCH
%token T_ENDSWITCH
%token T_CASE
%token T_DEFAULT
%token T_BREAK
%token T_CONTINUE
%token T_FUNCTION
%token T_CONST
%token T_RETURN
%token T_TRY
%token T_CATCH
%token T_THROW
%token T_USE
%token T_GLOBAL
%token T_STATIC
%token T_PRIVATE
%token T_PROTECTED
%token T_VAR
%token T_UNSET
%token T_ISSET
%token T_EMPTY
%token T_CLASS
%token T_EXTENDS
%token T_OBJECT_OPERATOR
%token T_DOUBLE_ARROW
%token T_LIST
%token T_ARRAY
%token T_CLASS_C
%token T_FUNC_C
%token T_LINE
%token T_FILE
%token T_COMMENT
%token T_ML_COMMENT
%token T_OPEN_TAG
%token T_OPEN_TAG_WITH_ECHO
%token T_CLOSE_TAG
%token T_WHITESPACE
%token T_START_HEREDOC
%token T_END_HEREDOC
%token T_DOLLAR_OPEN_CURLY_BRACES
%token T_CURLY_OPEN
%token T_PAAMAYIM_NEKUDOTAYIM
%token T_IMPORT T_FROM
%% /* Rules */
start:
top_statement_list
;
top_statement_list:
top_statement_list { zend_do_extended_info(TSRMLS_C); } top_statement { HANDLE_INTERACTIVE(); }
| /* empty */
;
top_statement:
statement
| function_declaration_statement { zend_do_early_binding(TSRMLS_C); }
| class_declaration_statement
;
inner_statement_list:
inner_statement_list { zend_do_extended_info(TSRMLS_C); } inner_statement { HANDLE_INTERACTIVE(); }
| /* empty */
;
inner_statement:
statement
| function_declaration_statement
| class_declaration_statement
;
statement:
unticked_statement { zend_do_ticks(TSRMLS_C); }
;
unticked_statement:
'{' inner_statement_list '}'
| T_IF '(' expr ')' { zend_do_if_cond(&$3, &$4 TSRMLS_CC); } statement { zend_do_if_after_statement(&$4, 1 TSRMLS_CC); } elseif_list else_single { zend_do_if_end(TSRMLS_C); }
| T_IF '(' expr ')' ':' { zend_do_if_cond(&$3, &$4 TSRMLS_CC); } inner_statement_list { zend_do_if_after_statement(&$4, 1 TSRMLS_CC); } new_elseif_list new_else_single T_ENDIF ';' { zend_do_if_end(TSRMLS_C); }
| T_WHILE '(' { $1.u.opline_num = get_next_op_number(CG(active_op_array)); } expr ')' { zend_do_while_cond(&$4, &$5 TSRMLS_CC); } while_statement { zend_do_while_end(&$1, &$5 TSRMLS_CC); }
| T_DO { $1.u.opline_num = get_next_op_number(CG(active_op_array)); zend_do_do_while_begin(TSRMLS_C); } statement T_WHILE '(' { $5.u.opline_num = get_next_op_number(CG(active_op_array)); } expr ')' ';' { zend_do_do_while_end(&$1, &$5, &$7 TSRMLS_CC); }
| T_FOR
'('
for_expr
';' { zend_do_free(&$3 TSRMLS_CC); $4.u.opline_num = get_next_op_number(CG(active_op_array)); }
for_expr
';' { zend_do_extended_info(TSRMLS_C); zend_do_for_cond(&$6, &$7 TSRMLS_CC); }
for_expr
')' { zend_do_free(&$9 TSRMLS_CC); zend_do_for_before_statement(&$4, &$7 TSRMLS_CC); }
for_statement { zend_do_for_end(&$7 TSRMLS_CC); }
| T_SWITCH '(' expr ')' { zend_do_switch_cond(&$3 TSRMLS_CC); } switch_case_list { zend_do_switch_end(&$6 TSRMLS_CC); }
| T_BREAK ';' { zend_do_brk_cont(ZEND_BRK, NULL TSRMLS_CC); }
| T_BREAK expr ';' { zend_do_brk_cont(ZEND_BRK, &$2 TSRMLS_CC); }
| T_CONTINUE ';' { zend_do_brk_cont(ZEND_CONT, NULL TSRMLS_CC); }
| T_CONTINUE expr ';' { zend_do_brk_cont(ZEND_CONT, &$2 TSRMLS_CC); }
| T_RETURN ';' { zend_do_return(NULL, 0 TSRMLS_CC); }
| T_RETURN expr_without_variable ';' { zend_do_return(&$2, 0 TSRMLS_CC); }
| T_RETURN variable ';' { zend_do_return(&$2, 1 TSRMLS_CC); }
| T_GLOBAL global_var_list ';'
| T_STATIC static_var_list ';'
| T_ECHO echo_expr_list ';'
| T_INLINE_HTML { zend_do_echo(&$1 TSRMLS_CC); }
| expr ';' { zend_do_free(&$1 TSRMLS_CC); }
| T_USE use_filename ';' { zend_error(E_COMPILE_ERROR,"use: Not yet supported. Please use include_once() or require_once()"); zval_dtor(&$2.u.constant); }
| T_UNSET '(' unset_variables ')' ';'
| T_FOREACH '(' variable T_AS { zend_do_foreach_begin(&$1, &$3, &$2, &$4, 1 TSRMLS_CC); } w_variable foreach_optional_arg ')' { zend_do_foreach_cont(&$6, &$7, &$4 TSRMLS_CC); } foreach_statement { zend_do_foreach_end(&$1, &$2 TSRMLS_CC); }
| T_FOREACH '(' expr_without_variable T_AS { zend_do_foreach_begin(&$1, &$3, &$2, &$4, 0 TSRMLS_CC); } w_variable foreach_optional_arg ')' { zend_do_foreach_cont(&$6, &$7, &$4 TSRMLS_CC); } foreach_statement { zend_do_foreach_end(&$1, &$2 TSRMLS_CC); }
| T_DECLARE { $1.u.opline_num = get_next_op_number(CG(active_op_array)); zend_do_declare_begin(TSRMLS_C); } '(' declare_list ')' declare_statement { zend_do_declare_end(&$1 TSRMLS_CC); }
| ';' /* empty statement */
| T_TRY { zend_do_try(&$1 TSRMLS_CC); } '{' inner_statement_list '}'
T_CATCH '(' catch_or_import_class_entry T_VARIABLE ')' { zend_do_begin_catch(&$1, &$8, &$9, 1 TSRMLS_CC); } '{' inner_statement_list '}' { zend_do_end_catch(&$1 TSRMLS_CC); }
additional_catches
| T_THROW expr ';' { zend_do_throw(&$2 TSRMLS_CC); }
| T_IMPORT { zend_do_begin_import(TSRMLS_C); } import_rule T_FROM catch_or_import_class_entry { zend_do_end_import(&$5 TSRMLS_CC); } ';'
;
import_rule:
'*' { zend_do_import(T_FUNCTION, NULL TSRMLS_CC); zend_do_import(T_CLASS, NULL TSRMLS_CC); zend_do_import(T_CONST, NULL TSRMLS_CC); }
| import_commands
;
import_commands:
import_commands ',' import_command
| import_command
;
import_command:
T_FUNCTION T_STRING { zend_do_import(T_FUNCTION, &$2 TSRMLS_CC); }
| T_CLASS T_STRING { zend_do_import(T_CLASS, &$2 TSRMLS_CC); }
| T_CONST T_STRING { zend_do_import(T_CONST, &$2 TSRMLS_CC); }
| T_FUNCTION '*' { zend_do_import(T_FUNCTION, NULL TSRMLS_CC); }
| T_CLASS '*' { zend_do_import(T_CLASS, NULL TSRMLS_CC); }
| T_CONST '*' { zend_do_import(T_CONST, NULL TSRMLS_CC); }
;
additional_catches:
non_empty_additional_catches
| /* empty */
;
non_empty_additional_catches:
non_empty_additional_catches T_CATCH '(' catch_or_import_class_entry T_VARIABLE ')' { zend_do_begin_catch(&$2, &$4, &$5, 0 TSRMLS_CC); } '{' inner_statement_list '}' { zend_do_end_catch(&$2 TSRMLS_CC); }
| T_CATCH '(' catch_or_import_class_entry T_VARIABLE ')' { zend_do_begin_catch(&$1, &$3, &$4, 0 TSRMLS_CC); } '{' inner_statement_list '}' { zend_do_end_catch(&$1 TSRMLS_CC); }
;
unset_variables:
unset_variable
| unset_variables ',' unset_variable
;
unset_variable:
variable { zend_do_end_variable_parse(BP_VAR_UNSET, 0 TSRMLS_CC); zend_do_unset(&$1 TSRMLS_CC); }
;
use_filename:
T_CONSTANT_ENCAPSED_STRING { $$ = $1; }
| '(' T_CONSTANT_ENCAPSED_STRING ')' { $$ = $2; }
;
function_declaration_statement:
unticked_function_declaration_statement { zend_do_ticks(TSRMLS_C); }
;
class_declaration_statement:
unticked_class_declaration_statement { zend_do_ticks(TSRMLS_C); }
;
unticked_function_declaration_statement:
T_FUNCTION { $1.u.opline_num = CG(zend_lineno); } is_reference T_STRING { zend_do_begin_function_declaration(&$1, &$4, 0, $3.op_type, 0 TSRMLS_CC); }
'(' parameter_list ')' '{' inner_statement_list '}' { zend_do_end_function_declaration(&$1 TSRMLS_CC); }
;
unticked_class_declaration_statement:
T_CLASS declaration_class_name extends_from '{' { zend_do_begin_class_declaration(&$1, &$2, &$3 TSRMLS_CC); } class_statement_list '}' { zend_do_end_class_declaration(&$1 TSRMLS_CC); }
;
extends_from:
/* empty */ { $$.op_type = IS_UNUSED; }
| T_EXTENDS catch_or_import_class_entry { $$ = $2; }
;
declaration_class_name:
| parse_class_name_entry T_STRING { do_fetch_class_name(&$$, &$1, &$2, 0 TSRMLS_CC); }
| T_STRING { $$ = $1; zend_str_tolower($$.u.constant.value.str.val, $$.u.constant.value.str.len); }
;
foreach_optional_arg:
/* empty */ { $$.op_type = IS_UNUSED; }
| T_DOUBLE_ARROW w_variable { $$ = $2; }
;
for_statement:
statement
| ':' inner_statement_list T_ENDFOR ';'
;
foreach_statement:
statement
| ':' inner_statement_list T_ENDFOREACH ';'
;
declare_statement:
statement
| ':' inner_statement_list T_ENDDECLARE ';'
;
declare_list:
T_STRING '=' static_scalar { zend_do_declare_stmt(&$1, &$3 TSRMLS_CC); }
| declare_list ',' T_STRING '=' static_scalar { zend_do_declare_stmt(&$3, &$5 TSRMLS_CC); }
;
switch_case_list:
'{' case_list '}' { $$ = $2; }
| '{' ';' case_list '}' { $$ = $3; }
| ':' case_list T_ENDSWITCH ';' { $$ = $2; }
| ':' ';' case_list T_ENDSWITCH ';' { $$ = $3; }
;
case_list:
/* empty */ { $$.op_type = IS_UNUSED; }
| case_list T_CASE expr case_separator { zend_do_extended_info(TSRMLS_C); zend_do_case_before_statement(&$1, &$2, &$3 TSRMLS_CC); } inner_statement_list { zend_do_case_after_statement(&$$, &$2 TSRMLS_CC); $$.op_type = IS_CONST; }
| case_list T_DEFAULT case_separator { zend_do_extended_info(TSRMLS_C); zend_do_default_before_statement(&$1, &$2 TSRMLS_CC); } inner_statement_list { zend_do_case_after_statement(&$$, &$2 TSRMLS_CC); $$.op_type = IS_CONST; }
;
case_separator:
':'
| ';'
;
while_statement:
statement
| ':' inner_statement_list T_ENDWHILE ';'
;
elseif_list:
/* empty */
| elseif_list T_ELSEIF '(' expr ')' { zend_do_if_cond(&$4, &$5 TSRMLS_CC); } statement { zend_do_if_after_statement(&$5, 0 TSRMLS_CC); }
;
new_elseif_list:
/* empty */
| new_elseif_list T_ELSEIF '(' expr ')' ':' { zend_do_if_cond(&$4, &$5 TSRMLS_CC); } inner_statement_list { zend_do_if_after_statement(&$5, 0 TSRMLS_CC); }
;
else_single:
/* empty */
| T_ELSE statement
;
new_else_single:
/* empty */
| T_ELSE ':' inner_statement_list
;
parameter_list:
non_empty_parameter_list
| /* empty */
;
non_empty_parameter_list:
T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$1, 0 TSRMLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; INIT_PZVAL(&$$.u.constant); zend_do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE TSRMLS_CC); }
| '&' T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$2, 0 TSRMLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; INIT_PZVAL(&$$.u.constant); zend_do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_FORCE TSRMLS_CC); }
| '&' T_VARIABLE '=' static_scalar { znode tmp; fetch_simple_variable(&tmp, &$2, 0 TSRMLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; INIT_PZVAL(&$$.u.constant); zend_do_receive_arg(ZEND_RECV_INIT, &tmp, &$$, &$4, BYREF_FORCE TSRMLS_CC); }
| T_CONST T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$2, 0 TSRMLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; INIT_PZVAL(&$$.u.constant); zend_do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE TSRMLS_CC); }
| T_VARIABLE '=' static_scalar { znode tmp; fetch_simple_variable(&tmp, &$1, 0 TSRMLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; INIT_PZVAL(&$$.u.constant); zend_do_receive_arg(ZEND_RECV_INIT, &tmp, &$$, &$3, BYREF_NONE TSRMLS_CC); }
| non_empty_parameter_list ',' T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$3, 0 TSRMLS_CC); $$=$1; $$.u.constant.value.lval++; zend_do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE TSRMLS_CC); }
| non_empty_parameter_list ',' '&' T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$4, 0 TSRMLS_CC); $$=$1; $$.u.constant.value.lval++; zend_do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_FORCE TSRMLS_CC); }
| non_empty_parameter_list ',' '&' T_VARIABLE '=' static_scalar { znode tmp; fetch_simple_variable(&tmp, &$4, 0 TSRMLS_CC); $$=$1; $$.u.constant.value.lval++; zend_do_receive_arg(ZEND_RECV_INIT, &tmp, &$$, &$6, BYREF_FORCE TSRMLS_CC); }
| non_empty_parameter_list ',' T_CONST T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$4, 0 TSRMLS_CC); $$=$1; $$.u.constant.value.lval++; zend_do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE TSRMLS_CC); }
| non_empty_parameter_list ',' T_VARIABLE '=' static_scalar { znode tmp; fetch_simple_variable(&tmp, &$3, 0 TSRMLS_CC); $$=$1; $$.u.constant.value.lval++; zend_do_receive_arg(ZEND_RECV_INIT, &tmp, &$$, &$5, BYREF_NONE TSRMLS_CC); }
;
function_call_parameter_list:
non_empty_function_call_parameter_list { $$ = $1; }
| /* empty */ { $$.u.constant.value.lval = 0; }
;
non_empty_function_call_parameter_list:
expr_without_variable { $$.u.constant.value.lval = 1; zend_do_pass_param(&$1, ZEND_SEND_VAL, $$.u.constant.value.lval TSRMLS_CC); }
| variable { $$.u.constant.value.lval = 1; zend_do_pass_param(&$1, ZEND_SEND_VAR, $$.u.constant.value.lval TSRMLS_CC); }
| '&' w_variable { $$.u.constant.value.lval = 1; zend_do_pass_param(&$2, ZEND_SEND_REF, $$.u.constant.value.lval TSRMLS_CC); }
| non_empty_function_call_parameter_list ',' expr_without_variable { $$.u.constant.value.lval=$1.u.constant.value.lval+1; zend_do_pass_param(&$3, ZEND_SEND_VAL, $$.u.constant.value.lval TSRMLS_CC); }
| non_empty_function_call_parameter_list ',' variable { $$.u.constant.value.lval=$1.u.constant.value.lval+1; zend_do_pass_param(&$3, ZEND_SEND_VAR, $$.u.constant.value.lval TSRMLS_CC); }
| non_empty_function_call_parameter_list ',' '&' w_variable { $$.u.constant.value.lval=$1.u.constant.value.lval+1; zend_do_pass_param(&$4, ZEND_SEND_REF, $$.u.constant.value.lval TSRMLS_CC); }
;
global_var_list:
global_var_list ',' global_var { zend_do_fetch_global_variable(&$3, NULL, ZEND_FETCH_GLOBAL TSRMLS_CC); }
| global_var { zend_do_fetch_global_variable(&$1, NULL, ZEND_FETCH_GLOBAL TSRMLS_CC); }
;
global_var:
T_VARIABLE { $$ = $1; }
| '$' r_variable { $$ = $2; }
| '$' '{' expr '}' { $$ = $3; }
;
static_var_list:
static_var_list ',' T_VARIABLE { zend_do_fetch_static_variable(&$3, NULL, ZEND_FETCH_STATIC TSRMLS_CC); }
| static_var_list ',' T_VARIABLE '=' static_scalar { zend_do_fetch_static_variable(&$3, &$5, ZEND_FETCH_STATIC TSRMLS_CC); }
| T_VARIABLE { zend_do_fetch_static_variable(&$1, NULL, ZEND_FETCH_STATIC TSRMLS_CC); }
| T_VARIABLE '=' static_scalar { zend_do_fetch_static_variable(&$1, &$3, ZEND_FETCH_STATIC TSRMLS_CC); }
;
class_statement_list:
class_statement_list class_statement
| /* empty */
;
class_statement:
class_variable_declaration ';'
| class_constant_declaration ';'
| is_static T_FUNCTION { $2.u.opline_num = CG(zend_lineno); } is_reference T_STRING { zend_do_begin_function_declaration(&$2, &$5, 1, $4.op_type, $1.u.constant.value.lval TSRMLS_CC); } '('
parameter_list ')' '{' inner_statement_list '}' { zend_do_end_function_declaration(&$2 TSRMLS_CC); }
| T_CLASS T_STRING extends_from '{' { zend_do_begin_class_declaration(&$1, &$2, &$3 TSRMLS_CC); } class_statement_list '}' { zend_do_end_class_declaration(&$1 TSRMLS_CC); }
;
is_static:
T_STATIC { $$.u.constant.value.lval = 1; }
| /* empty */ { $$.u.constant.value.lval = 0; }
;
is_reference:
/* empty */ { $$.op_type = ZEND_RETURN_VAL; }
| '&' { $$.op_type = ZEND_RETURN_REF; }
;
class_variable_declaration:
class_variable_declaration ',' T_VARIABLE { zend_do_declare_property(&$3, NULL, $1.op_type TSRMLS_CC); }
| class_variable_declaration ',' T_VARIABLE '=' static_scalar { zend_do_declare_property(&$3, &$5, $1.op_type TSRMLS_CC); }
| class_declaration_type T_VARIABLE { $$ = $1; zend_do_declare_property(&$2, NULL, $1.op_type TSRMLS_CC); }
| class_declaration_type T_VARIABLE '=' static_scalar { $$ = $1; zend_do_declare_property(&$2, &$4, $1.op_type TSRMLS_CC); }
;
class_declaration_type:
T_VAR { $$.op_type = T_VAR; }
| T_STATIC { $$.op_type = T_STATIC; }
| T_PRIVATE { $$.op_type = T_PRIVATE; }
| T_PROTECTED { $$.op_type = T_PROTECTED; }
;
class_constant_declaration:
| T_CONST ',' T_STRING '=' static_scalar { zend_do_declare_property(&$3, &$5, T_CONST TSRMLS_CC); }
| T_CONST T_STRING '=' static_scalar { zend_do_declare_property(&$2, &$4, T_CONST TSRMLS_CC); }
;
echo_expr_list:
| echo_expr_list ',' expr { zend_do_echo(&$3 TSRMLS_CC); }
| expr { zend_do_echo(&$1 TSRMLS_CC); }
;
for_expr:
/* empty */ { $$.op_type = IS_CONST; $$.u.constant.type = IS_BOOL; $$.u.constant.value.lval = 1; }
| non_empty_for_expr { $$ = $1; }
;
non_empty_for_expr:
non_empty_for_expr ',' { zend_do_free(&$1 TSRMLS_CC); } expr { $$ = $4; }
| expr { $$ = $1; }
;
expr_without_variable:
T_LIST '(' { zend_do_list_init(TSRMLS_C); } assignment_list ')' '=' expr { zend_do_list_end(&$$, &$7 TSRMLS_CC); }
| variable '=' expr { zend_check_writable_variable(&$$); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_assign(&$$, &$1, &$3 TSRMLS_CC); }
| variable '=' '&' variable { zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_assign_ref(&$$, &$1, &$4 TSRMLS_CC); }
| variable '=' '&' T_NEW new_class_entry { zend_check_writable_variable(&$$); zend_do_extended_fcall_begin(TSRMLS_C); zend_do_begin_new_object(&$4, &$5 TSRMLS_CC); } ctor_arguments { zend_do_end_new_object(&$3, &$4, &$7 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_assign_ref(&$$, &$1, &$3 TSRMLS_CC); }
| T_NEW new_class_entry { zend_do_extended_fcall_begin(TSRMLS_C); zend_do_begin_new_object(&$1, &$2 TSRMLS_CC); } ctor_arguments { zend_do_end_new_object(&$$, &$1, &$4 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
| variable T_PLUS_EQUAL expr { zend_check_writable_variable(&$$); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_ADD, &$$, &$1, &$3 TSRMLS_CC); }
| variable T_MINUS_EQUAL expr { zend_check_writable_variable(&$$); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_SUB, &$$, &$1, &$3 TSRMLS_CC); }
| variable T_MUL_EQUAL expr { zend_check_writable_variable(&$$); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_MUL, &$$, &$1, &$3 TSRMLS_CC); }
| variable T_DIV_EQUAL expr { zend_check_writable_variable(&$$); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_DIV, &$$, &$1, &$3 TSRMLS_CC); }
| variable T_CONCAT_EQUAL expr { zend_check_writable_variable(&$$); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_CONCAT, &$$, &$1, &$3 TSRMLS_CC); }
| variable T_MOD_EQUAL expr { zend_check_writable_variable(&$$); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_MOD, &$$, &$1, &$3 TSRMLS_CC); }
| variable T_AND_EQUAL expr { zend_check_writable_variable(&$$); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_BW_AND, &$$, &$1, &$3 TSRMLS_CC); }
| variable T_OR_EQUAL expr { zend_check_writable_variable(&$$); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_BW_OR, &$$, &$1, &$3 TSRMLS_CC); }
| variable T_XOR_EQUAL expr { zend_check_writable_variable(&$$); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_BW_XOR, &$$, &$1, &$3 TSRMLS_CC); }
| variable T_SL_EQUAL expr { zend_check_writable_variable(&$$); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_SL, &$$, &$1, &$3 TSRMLS_CC); }
| variable T_SR_EQUAL expr { zend_check_writable_variable(&$$); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_SR, &$$, &$1, &$3 TSRMLS_CC); }
| rw_variable T_INC { zend_do_post_incdec(&$$, &$1, ZEND_POST_INC TSRMLS_CC); }
| T_INC rw_variable { zend_do_pre_incdec(&$$, &$2, ZEND_PRE_INC TSRMLS_CC); }
| rw_variable T_DEC { zend_do_post_incdec(&$$, &$1, ZEND_POST_DEC TSRMLS_CC); }
| T_DEC rw_variable { zend_do_pre_incdec(&$$, &$2, ZEND_PRE_DEC TSRMLS_CC); }
| expr T_BOOLEAN_OR { zend_do_boolean_or_begin(&$1, &$2 TSRMLS_CC); } expr { zend_do_boolean_or_end(&$$, &$1, &$4, &$2 TSRMLS_CC); }
| expr T_BOOLEAN_AND { zend_do_boolean_and_begin(&$1, &$2 TSRMLS_CC); } expr { zend_do_boolean_and_end(&$$, &$1, &$4, &$2 TSRMLS_CC); }
| expr T_LOGICAL_OR { zend_do_boolean_or_begin(&$1, &$2 TSRMLS_CC); } expr { zend_do_boolean_or_end(&$$, &$1, &$4, &$2 TSRMLS_CC); }
| expr T_LOGICAL_AND { zend_do_boolean_and_begin(&$1, &$2 TSRMLS_CC); } expr { zend_do_boolean_and_end(&$$, &$1, &$4, &$2 TSRMLS_CC); }
| expr T_LOGICAL_XOR expr { zend_do_binary_op(ZEND_BOOL_XOR, &$$, &$1, &$3 TSRMLS_CC); }
| expr '|' expr { zend_do_binary_op(ZEND_BW_OR, &$$, &$1, &$3 TSRMLS_CC); }
| expr '&' expr { zend_do_binary_op(ZEND_BW_AND, &$$, &$1, &$3 TSRMLS_CC); }
| expr '^' expr { zend_do_binary_op(ZEND_BW_XOR, &$$, &$1, &$3 TSRMLS_CC); }
| expr '.' expr { zend_do_binary_op(ZEND_CONCAT, &$$, &$1, &$3 TSRMLS_CC); }
| expr '+' expr { zend_do_binary_op(ZEND_ADD, &$$, &$1, &$3 TSRMLS_CC); }
| expr '-' expr { zend_do_binary_op(ZEND_SUB, &$$, &$1, &$3 TSRMLS_CC); }
| expr '*' expr { zend_do_binary_op(ZEND_MUL, &$$, &$1, &$3 TSRMLS_CC); }
| expr '/' expr { zend_do_binary_op(ZEND_DIV, &$$, &$1, &$3 TSRMLS_CC); }
| expr '%' expr { zend_do_binary_op(ZEND_MOD, &$$, &$1, &$3 TSRMLS_CC); }
| expr T_SL expr { zend_do_binary_op(ZEND_SL, &$$, &$1, &$3 TSRMLS_CC); }
| expr T_SR expr { zend_do_binary_op(ZEND_SR, &$$, &$1, &$3 TSRMLS_CC); }
| '+' expr { $1.u.constant.value.lval=0; $1.u.constant.type=IS_LONG; $1.op_type = IS_CONST; INIT_PZVAL(&$1.u.constant); zend_do_binary_op(ZEND_ADD, &$$, &$1, &$2 TSRMLS_CC); }
| '-' expr { $1.u.constant.value.lval=0; $1.u.constant.type=IS_LONG; $1.op_type = IS_CONST; INIT_PZVAL(&$1.u.constant); zend_do_binary_op(ZEND_SUB, &$$, &$1, &$2 TSRMLS_CC); }
| '!' expr { zend_do_unary_op(ZEND_BOOL_NOT, &$$, &$2 TSRMLS_CC); }
| '~' expr { zend_do_unary_op(ZEND_BW_NOT, &$$, &$2 TSRMLS_CC); }
| expr T_IS_IDENTICAL expr { zend_do_binary_op(ZEND_IS_IDENTICAL, &$$, &$1, &$3 TSRMLS_CC); }
| expr T_IS_NOT_IDENTICAL expr { zend_do_binary_op(ZEND_IS_NOT_IDENTICAL, &$$, &$1, &$3 TSRMLS_CC); }
| expr T_IS_EQUAL expr { zend_do_binary_op(ZEND_IS_EQUAL, &$$, &$1, &$3 TSRMLS_CC); }
| expr T_IS_NOT_EQUAL expr { zend_do_binary_op(ZEND_IS_NOT_EQUAL, &$$, &$1, &$3 TSRMLS_CC); }
| expr '<' expr { zend_do_binary_op(ZEND_IS_SMALLER, &$$, &$1, &$3 TSRMLS_CC); }
| expr T_IS_SMALLER_OR_EQUAL expr { zend_do_binary_op(ZEND_IS_SMALLER_OR_EQUAL, &$$, &$1, &$3 TSRMLS_CC); }
| expr '>' expr { zend_do_binary_op(ZEND_IS_SMALLER, &$$, &$3, &$1 TSRMLS_CC); }
| expr T_IS_GREATER_OR_EQUAL expr { zend_do_binary_op(ZEND_IS_SMALLER_OR_EQUAL, &$$, &$3, &$1 TSRMLS_CC); }
| expr T_IS_CLASS is_class_expr { zend_do_is_class(&$$, &$1, &$3, 0 TSRMLS_CC); }
| '(' expr ')' { $$ = $2; }
| expr '?' { zend_do_begin_qm_op(&$1, &$2 TSRMLS_CC); }
expr ':' { zend_do_qm_true(&$4, &$2, &$5 TSRMLS_CC); }
expr { zend_do_qm_false(&$$, &$7, &$2, &$5 TSRMLS_CC); }
| internal_functions_in_yacc { $$ = $1; }
| T_INT_CAST expr { zend_do_cast(&$$, &$2, IS_LONG TSRMLS_CC); }
| T_DOUBLE_CAST expr { zend_do_cast(&$$, &$2, IS_DOUBLE TSRMLS_CC); }
| T_STRING_CAST expr { zend_do_cast(&$$, &$2, IS_STRING TSRMLS_CC); }
| T_ARRAY_CAST expr { zend_do_cast(&$$, &$2, IS_ARRAY TSRMLS_CC); }
| T_OBJECT_CAST expr { zend_do_cast(&$$, &$2, IS_OBJECT TSRMLS_CC); }
| T_BOOL_CAST expr { zend_do_cast(&$$, &$2, IS_BOOL TSRMLS_CC); }
| T_UNSET_CAST expr { zend_do_cast(&$$, &$2, IS_NULL TSRMLS_CC); }
| T_EXIT exit_expr { zend_do_exit(&$$, &$2 TSRMLS_CC); }
| '@' { zend_do_begin_silence(&$1 TSRMLS_CC); } expr { zend_do_end_silence(&$1 TSRMLS_CC); $$ = $3; }
| scalar { $$ = $1; }
| T_ARRAY '(' array_pair_list ')' { $$ = $3; }
| '`' encaps_list '`' { zend_do_shell_exec(&$$, &$2 TSRMLS_CC); }
| T_PRINT expr { zend_do_print(&$$, &$2 TSRMLS_CC); }
;
function_call:
T_STRING '(' { $2.u.opline_num = zend_do_begin_function_call(&$1 TSRMLS_CC); }
function_call_parameter_list
')' { zend_do_end_function_call(&$1, &$$, &$4, 0, $2.u.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); }
| parse_class_entry static_or_variable_string '(' { zend_do_extended_fcall_begin(TSRMLS_C); zend_do_begin_class_member_function_call(&$1, &$2 TSRMLS_CC); }
function_call_parameter_list
')' { zend_do_end_function_call(&$2, &$$, &$5, 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
| variable_without_objects '(' { zend_do_end_variable_parse(BP_VAR_R, 0 TSRMLS_CC); zend_do_begin_dynamic_function_call(&$1 TSRMLS_CC); }
function_call_parameter_list ')'
{ zend_do_end_function_call(&$1, &$$, &$4, 0, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
;
parse_class_entry:
parse_class_entry T_STRING T_PAAMAYIM_NEKUDOTAYIM { do_fetch_class(&$$, &$1, &$2 TSRMLS_CC); }
| T_STRING T_PAAMAYIM_NEKUDOTAYIM { do_fetch_class(&$$, NULL, &$1 TSRMLS_CC); }
;
parse_class_name_entry:
parse_class_name_entry T_STRING T_PAAMAYIM_NEKUDOTAYIM { do_fetch_class_name(&$$, &$1, &$2, 0 TSRMLS_CC); }
| T_STRING T_PAAMAYIM_NEKUDOTAYIM { $$ = $1; zend_str_tolower($$.u.constant.value.str.val, $$.u.constant.value.str.len); }
;
catch_or_import_class_entry:
parse_class_entry T_STRING { do_fetch_class(&$$, &$1, &$2 TSRMLS_CC); }
| T_STRING { do_fetch_class(&$$, NULL, &$1 TSRMLS_CC); }
;
new_class_entry:
parse_class_entry static_or_variable_string { do_fetch_class(&$$, &$1, &$2 TSRMLS_CC); }
| static_or_variable_string { do_fetch_class(&$$, NULL, &$1 TSRMLS_CC); }
;
static_or_variable_string:
T_STRING { $$ = $1; }
| r_variable_without_static_member { $$ = $1; }
;
is_class_expr:
parse_class_entry T_STRING { do_fetch_class(&$$, &$1, &$2 TSRMLS_CC); }
| T_STRING { do_fetch_class(&$$, NULL, &$1 TSRMLS_CC); }
;
exit_expr:
/* empty */ { memset(&$$, 0, sizeof(znode)); $$.op_type = IS_UNUSED; }
| '(' ')' { memset(&$$, 0, sizeof(znode)); $$.op_type = IS_UNUSED; }
| '(' expr ')' { $$ = $2; }
;
ctor_arguments:
/* empty */ { $$.u.constant.value.lval=0; }
| '(' function_call_parameter_list ')' { $$ = $2; }
;
common_scalar:
T_LNUMBER { $$ = $1; }
| T_DNUMBER { $$ = $1; }
| T_CONSTANT_ENCAPSED_STRING { $$ = $1; }
| T_LINE { $$ = $1; }
| T_FILE { $$ = $1; }
| T_CLASS_C { $$ = $1; }
| T_FUNC_C { $$ = $1; }
;
static_scalar: /* compile-time evaluated scalars */
common_scalar { $$ = $1; }
| T_STRING { zend_do_fetch_constant(&$$, NULL, &$1, ZEND_CT TSRMLS_CC); }
| '+' static_scalar { $$ = $2; }
| '-' static_scalar { zval minus_one; minus_one.type = IS_LONG; minus_one.value.lval = -1; mul_function(&$2.u.constant, &$2.u.constant, &minus_one TSRMLS_CC); $$ = $2; }
| T_ARRAY '(' static_array_pair_list ')' { $$ = $3; $$.u.constant.type = IS_CONSTANT_ARRAY; }
| parse_class_name_entry T_STRING { zend_do_fetch_constant(&$$, &$1, &$2, ZEND_CT TSRMLS_CC); }
;
scalar:
T_STRING { zend_do_fetch_constant(&$$, NULL, &$1, ZEND_RT TSRMLS_CC); }
| T_STRING_VARNAME { $$ = $1; }
| parse_class_entry T_STRING { zend_do_fetch_constant(&$$, &$1, &$2, ZEND_RT TSRMLS_CC); }
| common_scalar { $$ = $1; }
| '"' encaps_list '"' { $$ = $2; }
| '\'' encaps_list '\'' { $$ = $2; }
| T_START_HEREDOC encaps_list T_END_HEREDOC { $$ = $2; zend_do_end_heredoc(TSRMLS_C); }
;
static_array_pair_list:
/* empty */ { $$.op_type = IS_CONST; INIT_PZVAL(&$$.u.constant); array_init(&$$.u.constant); }
| non_empty_static_array_pair_list possible_comma { $$ = $1; }
;
possible_comma:
/* empty */
| ','
;
non_empty_static_array_pair_list:
non_empty_static_array_pair_list ',' static_scalar T_DOUBLE_ARROW static_scalar { zend_do_add_static_array_element(&$$, &$3, &$5); }
| non_empty_static_array_pair_list ',' static_scalar { zend_do_add_static_array_element(&$$, NULL, &$3); }
| static_scalar T_DOUBLE_ARROW static_scalar { $$.op_type = IS_CONST; INIT_PZVAL(&$$.u.constant); array_init(&$$.u.constant); zend_do_add_static_array_element(&$$, &$1, &$3); }
| static_scalar { $$.op_type = IS_CONST; INIT_PZVAL(&$$.u.constant); array_init(&$$.u.constant); zend_do_add_static_array_element(&$$, NULL, &$1); }
;
expr:
r_variable { $$ = $1; }
| expr_without_variable { $$ = $1; }
;
r_variable:
variable { zend_do_end_variable_parse(BP_VAR_R, 0 TSRMLS_CC); $$ = $1; }
;
w_variable:
variable { zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); $$ = $1; }
{ zend_check_writable_variable(&$$); }
;
rw_variable:
variable { zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); $$ = $1; }
{ zend_check_writable_variable(&$$); }
;
r_variable_without_static_member:
variable_without_objects { zend_do_end_variable_parse(BP_VAR_R, 0 TSRMLS_CC); $$ = $1; }
;
variable:
base_variable_without_objects T_OBJECT_OPERATOR { zend_do_push_object(&$1 TSRMLS_CC); }
object_property { zend_do_push_object(&$4 TSRMLS_CC); } method_or_not variable_properties
{ zend_do_pop_object(&$$ TSRMLS_CC); $$.u.EA.type = $1.u.EA.type | ($7.u.EA.type ? $7.u.EA.type : $6.u.EA.type); }
| base_variable_without_objects { $$ = $1; }
;
variable_properties:
variable_properties variable_property { $$.u.EA.type = $2.u.EA.type; }
| /* empty */ { $$.u.EA.type = 0; }
;
variable_property:
T_OBJECT_OPERATOR object_property { zend_do_push_object(&$2 TSRMLS_CC); } method_or_not { $$.u.EA.type = $4.u.EA.type; }
;
method_or_not:
'(' { zend_do_pop_object(&$1 TSRMLS_CC); zend_do_begin_method_call(&$1 TSRMLS_CC); }
function_call_parameter_list ')'
{ zend_do_end_function_call(&$1, &$$, &$3, 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);
zend_do_push_object(&$$ TSRMLS_CC); $$.u.EA.type = ZEND_PARSED_METHOD_CALL; }
| /* empty */ { $$.u.EA.type = ZEND_PARSED_MEMBER; }
;
variable_without_objects:
reference_variable { $$ = $1; }
| simple_indirect_reference reference_variable { zend_do_indirect_references(&$$, &$1, &$2 TSRMLS_CC); }
;
static_member:
parse_class_entry variable_without_objects { $$ = $2; zend_do_fetch_static_member(&$1 TSRMLS_CC); }
;
base_variable_without_objects:
reference_variable { $$ = $1; $$.u.EA.type = ZEND_PARSED_VARIABLE; }
| simple_indirect_reference reference_variable { zend_do_indirect_references(&$$, &$1, &$2 TSRMLS_CC); $$.u.EA.type = ZEND_PARSED_VARIABLE; }
| static_member { $$ = $1; $$.u.EA.type = ZEND_PARSED_STATIC_MEMBER; }
| function_call { zend_do_begin_variable_parse(TSRMLS_C); $$ = $1; $$.u.EA.type = ZEND_PARSED_FUNCTION_CALL; }
;
reference_variable:
reference_variable '[' dim_offset ']' { fetch_array_dim(&$$, &$1, &$3 TSRMLS_CC); }
| reference_variable '{' expr '}' { fetch_string_offset(&$$, &$1, &$3 TSRMLS_CC); }
| compound_variable { zend_do_begin_variable_parse(TSRMLS_C); fetch_simple_variable(&$$, &$1, 1 TSRMLS_CC); }
;
compound_variable:
T_VARIABLE { $$ = $1; }
| '$' '{' expr '}' { $$ = $3; }
;
dim_offset:
/* empty */ { $$.op_type = IS_UNUSED; }
| expr { $$ = $1; }
;
object_property:
object_dim_list { $$ = $1; }
| variable_without_objects { zend_do_end_variable_parse(BP_VAR_R, 0 TSRMLS_CC); } { znode tmp_znode; zend_do_pop_object(&tmp_znode TSRMLS_CC); zend_do_fetch_property(&$$, &tmp_znode, &$1 TSRMLS_CC);}
;
object_dim_list:
object_dim_list '[' dim_offset ']' { fetch_array_dim(&$$, &$1, &$3 TSRMLS_CC); }
| object_dim_list '{' expr '}' { fetch_string_offset(&$$, &$1, &$3 TSRMLS_CC); }
| variable_name { znode tmp_znode; zend_do_pop_object(&tmp_znode TSRMLS_CC); zend_do_fetch_property(&$$, &tmp_znode, &$1 TSRMLS_CC);}
;
variable_name:
T_STRING { $$ = $1; }
| '{' expr '}' { $$ = $2; }
;
simple_indirect_reference:
'$' { $$.u.constant.value.lval = 1; }
| simple_indirect_reference '$' { $$.u.constant.value.lval++; }
;
assignment_list:
assignment_list ',' assignment_list_element
| assignment_list_element
;
assignment_list_element:
variable { zend_do_add_list_element(&$1 TSRMLS_CC); }
| T_LIST '(' { zend_do_new_list_begin(TSRMLS_C); } assignment_list ')' { zend_do_new_list_end(TSRMLS_C); }
| /* empty */ { zend_do_add_list_element(NULL TSRMLS_CC); }
;
array_pair_list:
/* empty */ { zend_do_init_array(&$$, NULL, NULL, 0 TSRMLS_CC); }
| non_empty_array_pair_list possible_comma { $$ = $1; }
;
non_empty_array_pair_list:
non_empty_array_pair_list ',' expr T_DOUBLE_ARROW expr { zend_do_add_array_element(&$$, &$5, &$3, 0 TSRMLS_CC); }
| non_empty_array_pair_list ',' expr { zend_do_add_array_element(&$$, &$3, NULL, 0 TSRMLS_CC); }
| expr T_DOUBLE_ARROW expr { zend_do_init_array(&$$, &$3, &$1, 0 TSRMLS_CC); }
| expr { zend_do_init_array(&$$, &$1, NULL, 0 TSRMLS_CC); }
| non_empty_array_pair_list ',' expr T_DOUBLE_ARROW '&' w_variable { zend_do_add_array_element(&$$, &$6, &$3, 1 TSRMLS_CC); }
| non_empty_array_pair_list ',' '&' w_variable { zend_do_add_array_element(&$$, &$4, NULL, 1 TSRMLS_CC); }
| expr T_DOUBLE_ARROW '&' w_variable { zend_do_init_array(&$$, &$4, &$1, 1 TSRMLS_CC); }
| '&' w_variable { zend_do_init_array(&$$, &$2, NULL, 1 TSRMLS_CC); }
;
encaps_list:
encaps_list encaps_var { zend_do_end_variable_parse(BP_VAR_R, 0 TSRMLS_CC); zend_do_add_variable(&$$, &$1, &$2 TSRMLS_CC); }
| encaps_list T_STRING { zend_do_add_string(&$$, &$1, &$2 TSRMLS_CC); }
| encaps_list T_NUM_STRING { zend_do_add_string(&$$, &$1, &$2 TSRMLS_CC); }
| encaps_list T_ENCAPSED_AND_WHITESPACE { zend_do_add_string(&$$, &$1, &$2 TSRMLS_CC); }
| encaps_list T_CHARACTER { zend_do_add_char(&$$, &$1, &$2 TSRMLS_CC); }
| encaps_list T_BAD_CHARACTER { zend_do_add_string(&$$, &$1, &$2 TSRMLS_CC); }
| encaps_list '[' { $2.u.constant.value.lval = (long) '['; zend_do_add_char(&$$, &$1, &$2 TSRMLS_CC); }
| encaps_list ']' { $2.u.constant.value.lval = (long) ']'; zend_do_add_char(&$$, &$1, &$2 TSRMLS_CC); }
| encaps_list '{' { $2.u.constant.value.lval = (long) '{'; zend_do_add_char(&$$, &$1, &$2 TSRMLS_CC); }
| encaps_list '}' { $2.u.constant.value.lval = (long) '}'; zend_do_add_char(&$$, &$1, &$2 TSRMLS_CC); }
| encaps_list T_OBJECT_OPERATOR { znode tmp; $2.u.constant.value.lval = (long) '-'; zend_do_add_char(&tmp, &$1, &$2 TSRMLS_CC); $2.u.constant.value.lval = (long) '>'; zend_do_add_char(&$$, &tmp, &$2 TSRMLS_CC); }
| /* empty */ { zend_do_init_string(&$$ TSRMLS_CC); }
;
encaps_var:
T_VARIABLE { zend_do_begin_variable_parse(TSRMLS_C); fetch_simple_variable(&$$, &$1, 1 TSRMLS_CC); }
| T_VARIABLE '[' { zend_do_begin_variable_parse(TSRMLS_C); } encaps_var_offset ']' { fetch_array_begin(&$$, &$1, &$4 TSRMLS_CC); }
| T_VARIABLE T_OBJECT_OPERATOR T_STRING { zend_do_begin_variable_parse(TSRMLS_C); fetch_simple_variable(&$2, &$1, 1 TSRMLS_CC); zend_do_fetch_property(&$$, &$2, &$3 TSRMLS_CC); }
| T_DOLLAR_OPEN_CURLY_BRACES expr '}' { zend_do_begin_variable_parse(TSRMLS_C); fetch_simple_variable(&$$, &$2, 1 TSRMLS_CC); }
| T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '[' expr ']' '}' { zend_do_begin_variable_parse(TSRMLS_C); fetch_array_begin(&$$, &$2, &$4 TSRMLS_CC); }
| T_CURLY_OPEN variable '}' { $$ = $2; }
;
encaps_var_offset:
T_STRING { $$ = $1; }
| T_NUM_STRING { $$ = $1; }
| T_VARIABLE { fetch_simple_variable(&$$, &$1, 1 TSRMLS_CC); }
;
internal_functions_in_yacc:
T_ISSET '(' isset_variables ')' { $$ = $3; }
| T_EMPTY '(' variable ')' { zend_do_isset_or_isempty(ZEND_ISEMPTY, &$$, &$3 TSRMLS_CC); }
| T_INCLUDE expr { zend_do_include_or_eval(ZEND_INCLUDE, &$$, &$2 TSRMLS_CC); }
| T_INCLUDE_ONCE expr { zend_do_include_or_eval(ZEND_INCLUDE_ONCE, &$$, &$2 TSRMLS_CC); }
| T_EVAL '(' expr ')' { zend_do_include_or_eval(ZEND_EVAL, &$$, &$3 TSRMLS_CC); }
| T_REQUIRE expr { zend_do_include_or_eval(ZEND_REQUIRE, &$$, &$2 TSRMLS_CC); }
| T_REQUIRE_ONCE expr { zend_do_include_or_eval(ZEND_REQUIRE_ONCE, &$$, &$2 TSRMLS_CC); }
;
isset_variables:
variable { zend_do_isset_or_isempty(ZEND_ISSET, &$$, &$1 TSRMLS_CC); }
| isset_variables ',' { zend_do_boolean_and_begin(&$1, &$2 TSRMLS_CC); } variable { znode tmp; zend_do_isset_or_isempty(ZEND_ISSET, &tmp, &$4 TSRMLS_CC); zend_do_boolean_and_end(&$$, &$1, &tmp, &$2 TSRMLS_CC); }
;
%%
-41
View File
@@ -1,41 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_SCANNER_H
#define ZEND_SCANNER_H
typedef struct _zend_lex_state {
YY_BUFFER_STATE buffer_state;
int state;
FILE *in;
uint lineno;
char *filename;
} zend_lex_state;
void zend_fatal_scanner_error(char *);
BEGIN_EXTERN_C()
int zend_compare_file_handles(zend_file_handle *fh1, zend_file_handle *fh2);
ZEND_API void zend_save_lexical_state(zend_lex_state *lex_state TSRMLS_DC);
ZEND_API void zend_restore_lexical_state(zend_lex_state *lex_state TSRMLS_DC);
ZEND_API int zend_prepare_string_for_scanning(zval *str, char *filename TSRMLS_DC);
END_EXTERN_C()
#endif
File diff suppressed because it is too large. Load diff
-367
View File
@@ -1,367 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
/* resource lists */
#include "zend.h"
#include "zend_list.h"
#include "zend_API.h"
#include "zend_globals.h"
ZEND_API int le_index_ptr;
/* true global */
static HashTable list_destructors;
ZEND_API int zend_list_insert(void *ptr, int type)
{
int index;
zend_rsrc_list_entry le;
TSRMLS_FETCH();
le.ptr=ptr;
le.type=type;
le.refcount=1;
index = zend_hash_next_free_element(&EG(regular_list));
zend_hash_index_update(&EG(regular_list), index, (void *) &le, sizeof(zend_rsrc_list_entry), NULL);
return index;
}
ZEND_API int _zend_list_delete(int id TSRMLS_DC)
{
zend_rsrc_list_entry *le;
if (zend_hash_index_find(&EG(regular_list), id, (void **) &le)==SUCCESS) {
/* printf("del(%d): %d->%d\n", id, le->refcount, le->refcount-1); */
if (--le->refcount<=0) {
return zend_hash_index_del(&EG(regular_list), id);
} else {
return SUCCESS;
}
} else {
return FAILURE;
}
}
ZEND_API void *_zend_list_find(int id, int *type TSRMLS_DC)
{
zend_rsrc_list_entry *le;
if (zend_hash_index_find(&EG(regular_list), id, (void **) &le)==SUCCESS) {
*type = le->type;
return le->ptr;
} else {
*type = -1;
return NULL;
}
}
ZEND_API int _zend_list_addref(int id TSRMLS_DC)
{
zend_rsrc_list_entry *le;
if (zend_hash_index_find(&EG(regular_list), id, (void **) &le)==SUCCESS) {
/* printf("add(%d): %d->%d\n", id, le->refcount, le->refcount+1); */
le->refcount++;
return SUCCESS;
} else {
return FAILURE;
}
}
ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type)
{
int rsrc_id;
rsrc_id = zend_list_insert(rsrc_pointer, rsrc_type);
if (rsrc_result) {
rsrc_result->value.lval = rsrc_id;
rsrc_result->type = IS_RESOURCE;
}
return rsrc_id;
}
ZEND_API void *zend_fetch_resource(zval **passed_id TSRMLS_DC, int default_id, char *resource_type_name, int *found_resource_type, int num_resource_types, ...)
{
int id;
int actual_resource_type;
void *resource;
va_list resource_types;
int i;
if (default_id==-1) { /* use id */
if (!passed_id) {
if (resource_type_name) {
zend_error(E_WARNING, "%s(): no %s resource supplied", get_active_function_name(TSRMLS_C), resource_type_name);
}
return NULL;
} else if ((*passed_id)->type != IS_RESOURCE) {
if (resource_type_name) {
zend_error(E_WARNING, "%s(): supplied argument is not a valid %s resource", get_active_function_name(TSRMLS_C), resource_type_name);
}
return NULL;
}
id = (*passed_id)->value.lval;
} else {
id = default_id;
}
resource = zend_list_find(id, &actual_resource_type);
if (!resource) {
if (resource_type_name) {
zend_error(E_WARNING, "%s(): %d is not a valid %s resource", get_active_function_name(TSRMLS_C), id, resource_type_name);
}
return NULL;
}
va_start(resource_types, num_resource_types);
for (i=0; i<num_resource_types; i++) {
if (actual_resource_type == va_arg(resource_types, int)) {
va_end(resource_types);
if (found_resource_type) {
*found_resource_type = actual_resource_type;
}
return resource;
}
}
va_end(resource_types);
if (resource_type_name) {
zend_error(E_WARNING, "%s(): supplied resource is not a valid %s resource", get_active_function_name(TSRMLS_C), resource_type_name);
}
return NULL;
}
void list_entry_destructor(void *ptr)
{
zend_rsrc_list_entry *le = (zend_rsrc_list_entry *) ptr;
zend_rsrc_list_dtors_entry *ld;
TSRMLS_FETCH();
if (zend_hash_index_find(&list_destructors, le->type, (void **) &ld)==SUCCESS) {
switch (ld->type) {
case ZEND_RESOURCE_LIST_TYPE_STD:
if (ld->list_dtor) {
(ld->list_dtor)(le->ptr);
}
break;
case ZEND_RESOURCE_LIST_TYPE_EX:
if (ld->list_dtor_ex) {
ld->list_dtor_ex(le TSRMLS_CC);
}
break;
EMPTY_SWITCH_DEFAULT_CASE()
}
} else {
zend_error(E_WARNING,"Unknown list entry type in request shutdown (%d)", le->type);
}
}
void plist_entry_destructor(void *ptr)
{
zend_rsrc_list_entry *le = (zend_rsrc_list_entry *) ptr;
zend_rsrc_list_dtors_entry *ld;
TSRMLS_FETCH();
if (zend_hash_index_find(&list_destructors, le->type, (void **) &ld)==SUCCESS) {
switch (ld->type) {
case ZEND_RESOURCE_LIST_TYPE_STD:
if (ld->plist_dtor) {
(ld->plist_dtor)(le->ptr);
}
break;
case ZEND_RESOURCE_LIST_TYPE_EX:
if (ld->plist_dtor_ex) {
ld->plist_dtor_ex(le TSRMLS_CC);
}
break;
EMPTY_SWITCH_DEFAULT_CASE()
}
} else {
zend_error(E_WARNING,"Unknown persistent list entry type in module shutdown (%d)", le->type);
}
}
int zend_init_rsrc_list(TSRMLS_D)
{
if (zend_hash_init(&EG(regular_list), 0, NULL, list_entry_destructor, 0)==SUCCESS) {
EG(regular_list).nNextFreeElement=1; /* we don't want resource id 0 */
return SUCCESS;
} else {
return FAILURE;
}
}
int zend_init_rsrc_plist(TSRMLS_D)
{
return zend_hash_init_ex(&EG(persistent_list), 0, NULL, plist_entry_destructor, 1, 0);
}
void zend_destroy_rsrc_list(HashTable *ht TSRMLS_DC)
{
zend_hash_graceful_reverse_destroy(ht);
}
static int clean_module_resource(zend_rsrc_list_entry *le, int *resource_id TSRMLS_DC)
{
if (le->type == *resource_id) {
return 1;
} else {
return 0;
}
}
static int zend_clean_module_rsrc_dtors_cb(zend_rsrc_list_dtors_entry *ld, int *module_number TSRMLS_DC)
{
if (ld->module_number == *module_number) {
zend_hash_apply_with_argument(&EG(regular_list), (apply_func_arg_t) clean_module_resource, (void *) &(ld->resource_id) TSRMLS_CC);
zend_hash_apply_with_argument(&EG(persistent_list), (apply_func_arg_t) clean_module_resource, (void *) &(ld->resource_id) TSRMLS_CC);
return 1;
} else {
return 0;
}
}
void zend_clean_module_rsrc_dtors(int module_number TSRMLS_DC)
{
zend_hash_apply_with_argument(&list_destructors, (apply_func_arg_t) zend_clean_module_rsrc_dtors_cb, (void *) &module_number TSRMLS_CC);
}
ZEND_API int zend_register_list_destructors(void (*ld)(void *), void (*pld)(void *), int module_number)
{
zend_rsrc_list_dtors_entry lde;
#if 0
printf("Registering destructors %d for module %d\n", list_destructors.nNextFreeElement, module_number);
#endif
lde.list_dtor=(void (*)(void *)) ld;
lde.plist_dtor=(void (*)(void *)) pld;
lde.list_dtor_ex = lde.plist_dtor_ex = NULL;
lde.module_number = module_number;
lde.resource_id = list_destructors.nNextFreeElement;
lde.type = ZEND_RESOURCE_LIST_TYPE_STD;
lde.type_name = NULL;
if (zend_hash_next_index_insert(&list_destructors, (void *) &lde, sizeof(zend_rsrc_list_dtors_entry), NULL)==FAILURE) {
return FAILURE;
}
return list_destructors.nNextFreeElement-1;
}
ZEND_API int zend_register_list_destructors_ex(rsrc_dtor_func_t ld, rsrc_dtor_func_t pld, char *type_name, int module_number)
{
zend_rsrc_list_dtors_entry lde;
#if 0
printf("Registering destructors %d for module %d\n", list_destructors.nNextFreeElement, module_number);
#endif
lde.list_dtor = NULL;
lde.plist_dtor = NULL;
lde.list_dtor_ex = ld;
lde.plist_dtor_ex = pld;
lde.module_number = module_number;
lde.resource_id = list_destructors.nNextFreeElement;
lde.type = ZEND_RESOURCE_LIST_TYPE_EX;
lde.type_name = type_name;
if (zend_hash_next_index_insert(&list_destructors, (void *) &lde, sizeof(zend_rsrc_list_dtors_entry), NULL)==FAILURE) {
return FAILURE;
}
return list_destructors.nNextFreeElement-1;
}
ZEND_API int zend_fetch_list_dtor_id(char *type_name)
{
zend_rsrc_list_dtors_entry *lde;
HashPosition pos;
zend_hash_internal_pointer_reset_ex(&list_destructors, &pos);
while (zend_hash_get_current_data_ex(&list_destructors, (void **)&lde, &pos) == SUCCESS) {
if (strcmp(type_name, lde->type_name) == 0) {
#if 0
printf("Found resource id %d for resource type %s\n", (*lde).resource_id, type_name);
#endif
return lde->resource_id;
}
zend_hash_move_forward_ex(&list_destructors, &pos);
}
return 0;
}
int zend_init_rsrc_list_dtors(void)
{
int retval;
retval = zend_hash_init(&list_destructors, 50, NULL, NULL, 1);
list_destructors.nNextFreeElement=1; /* we don't want resource type 0 */
return retval;
}
void zend_destroy_rsrc_list_dtors(void)
{
zend_hash_destroy(&list_destructors);
}
char *zend_rsrc_list_get_rsrc_type(int resource TSRMLS_DC)
{
zend_rsrc_list_dtors_entry *lde;
int rsrc_type;
if (!zend_list_find(resource, &rsrc_type))
return NULL;
if (zend_hash_index_find(&list_destructors, rsrc_type, (void **) &lde)==SUCCESS) {
return lde->type_name;
} else {
return NULL;
}
}
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
-111
View File
@@ -1,111 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_LIST_H
#define ZEND_LIST_H
#include "zend_hash.h"
#include "zend_globals.h"
BEGIN_EXTERN_C()
#define ZEND_RESOURCE_LIST_TYPE_STD 1
#define ZEND_RESOURCE_LIST_TYPE_EX 2
typedef struct _zend_rsrc_list_entry {
void *ptr;
int type;
int refcount;
} zend_rsrc_list_entry;
typedef void (*rsrc_dtor_func_t)(zend_rsrc_list_entry *rsrc TSRMLS_DC);
#define ZEND_RSRC_DTOR_FUNC(name) void name(zend_rsrc_list_entry *rsrc TSRMLS_DC)
typedef struct _zend_rsrc_list_dtors_entry {
/* old style destructors */
void (*list_dtor)(void *);
void (*plist_dtor)(void *);
/* new style destructors */
rsrc_dtor_func_t list_dtor_ex;
rsrc_dtor_func_t plist_dtor_ex;
char *type_name;
int module_number;
int resource_id;
unsigned char type;
} zend_rsrc_list_dtors_entry;
#define register_list_destructors(ld, pld) zend_register_list_destructors((void (*)(void *))ld, (void (*)(void *))pld, module_number);
ZEND_API int zend_register_list_destructors(void (*ld)(void *), void (*pld)(void *), int module_number);
ZEND_API int zend_register_list_destructors_ex(rsrc_dtor_func_t ld, rsrc_dtor_func_t pld, char *type_name, int module_number);
void list_entry_destructor(void *ptr);
void plist_entry_destructor(void *ptr);
void zend_clean_module_rsrc_dtors(int module_number TSRMLS_DC);
int zend_init_rsrc_list(TSRMLS_D);
int zend_init_rsrc_plist(TSRMLS_D);
void zend_destroy_rsrc_list(HashTable *ht TSRMLS_DC);
int zend_init_rsrc_list_dtors(void);
void zend_destroy_rsrc_list_dtors(void);
ZEND_API int zend_list_insert(void *ptr, int type);
ZEND_API int _zend_list_addref(int id TSRMLS_DC);
ZEND_API int _zend_list_delete(int id TSRMLS_DC);
ZEND_API void *_zend_list_find(int id, int *type TSRMLS_DC);
#define zend_list_addref(id) _zend_list_addref(id TSRMLS_CC)
#define zend_list_delete(id) _zend_list_delete(id TSRMLS_CC)
#define zend_list_find(id, type) _zend_list_find(id, type TSRMLS_CC)
ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type);
ZEND_API void *zend_fetch_resource(zval **passed_id TSRMLS_DC, int default_id, char *resource_type_name, int *found_resource_type, int num_resource_types, ...);
ZEND_API char *zend_rsrc_list_get_rsrc_type(int resource TSRMLS_DC);
ZEND_API int zend_fetch_list_dtor_id(char *type_name);
extern ZEND_API int le_index_ptr; /* list entry type for index pointers */
#define ZEND_VERIFY_RESOURCE(rsrc) \
if (!rsrc) { \
RETURN_NULL(); \
}
#define ZEND_FETCH_RESOURCE(rsrc, rsrc_type, passed_id, default_id, resource_type_name, resource_type) \
rsrc = (rsrc_type) zend_fetch_resource(passed_id TSRMLS_CC, default_id, resource_type_name, NULL, 1, resource_type); \
ZEND_VERIFY_RESOURCE(rsrc);
#define ZEND_FETCH_RESOURCE2(rsrc, rsrc_type, passed_id, default_id, resource_type_name, resource_type1, resource_type2) \
rsrc = (rsrc_type) zend_fetch_resource(passed_id TSRMLS_CC, default_id, resource_type_name, NULL, 2, resource_type1, resource_type2); \
ZEND_VERIFY_RESOURCE(rsrc);
#define ZEND_REGISTER_RESOURCE(rsrc_result, rsrc_pointer, rsrc_type) \
zend_register_resource(rsrc_result, rsrc_pointer, rsrc_type);
#define ZEND_GET_RESOURCE_TYPE_ID(le_id, le_type_name) \
if (le_id == 0) { \
le_id = zend_fetch_list_dtor_id(le_type_name); \
}
END_EXTERN_C()
#endif
-308
View File
@@ -1,308 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include "zend.h"
#include "zend_llist.h"
#include "zend_qsort.h"
ZEND_API void zend_llist_init(zend_llist *l, size_t size, llist_dtor_func_t dtor, unsigned char persistent)
{
l->head = NULL;
l->tail = NULL;
l->count = 0;
l->size = size;
l->dtor = dtor;
l->persistent = persistent;
}
ZEND_API void zend_llist_add_element(zend_llist *l, void *element)
{
zend_llist_element *tmp = pemalloc(sizeof(zend_llist_element)+l->size-1, l->persistent);
tmp->prev = l->tail;
tmp->next = NULL;
if (l->tail) {
l->tail->next = tmp;
} else {
l->head = tmp;
}
l->tail = tmp;
memcpy(tmp->data, element, l->size);
++l->count;
}
ZEND_API void zend_llist_prepend_element(zend_llist *l, void *element)
{
zend_llist_element *tmp = pemalloc(sizeof(zend_llist_element)+l->size-1, l->persistent);
tmp->next = l->head;
tmp->prev = NULL;
if (l->head) {
l->head->prev = tmp;
} else {
l->tail = tmp;
}
l->head = tmp;
memcpy(tmp->data, element, l->size);
++l->count;
}
#define DEL_LLIST_ELEMENT(current, l) \
if ((current)->prev) {\
(current)->prev->next = (current)->next;\
} else {\
(l)->head = (current)->next;\
}\
if ((current)->next) {\
(current)->next->prev = (current)->prev;\
} else {\
(l)->tail = (current)->prev;\
}\
if ((l)->dtor) {\
(l)->dtor((current)->data);\
}\
pefree((current), (l)->persistent);\
--l->count;
ZEND_API void zend_llist_del_element(zend_llist *l, void *element, int (*compare)(void *element1, void *element2))
{
zend_llist_element *current=l->head;
zend_llist_element *next;
while (current) {
next = current->next;
if (compare(current->data, element)) {
DEL_LLIST_ELEMENT(current, l);
break;
}
current = next;
}
}
ZEND_API void zend_llist_destroy(zend_llist *l)
{
zend_llist_element *current=l->head, *next;
while (current) {
next = current->next;
if (l->dtor) {
l->dtor(current->data);
}
pefree(current, l->persistent);
current = next;
}
l->count = 0;
}
ZEND_API void zend_llist_clean(zend_llist *l)
{
zend_llist_destroy(l);
l->head = l->tail = NULL;
}
ZEND_API void *zend_llist_remove_tail(zend_llist *l)
{
zend_llist_element *old_tail;
void *data;
if ((old_tail = l->tail)) {
if (l->tail->prev) {
l->tail->prev->next = NULL;
}
data = old_tail->data;
l->tail = l->tail->prev;
if (l->dtor) {
l->dtor(data);
}
pefree(old_tail, l->persistent);
--l->count;
return data;
}
return NULL;
}
ZEND_API void zend_llist_copy(zend_llist *dst, zend_llist *src)
{
zend_llist_element *ptr;
zend_llist_init(dst, src->size, src->dtor, src->persistent);
ptr = src->head;
while (ptr) {
zend_llist_add_element(dst, ptr->data);
ptr = ptr->next;
}
}
ZEND_API void zend_llist_apply_with_del(zend_llist *l, int (*func)(void *data))
{
zend_llist_element *element, *next;
element=l->head;
while (element) {
next = element->next;
if (func(element->data)) {
DEL_LLIST_ELEMENT(element, l);
}
element = next;
}
}
ZEND_API void zend_llist_apply(zend_llist *l, llist_apply_func_t func TSRMLS_DC)
{
zend_llist_element *element;
for (element=l->head; element; element=element->next) {
func(element->data TSRMLS_CC);
}
}
ZEND_API void zend_llist_sort(zend_llist *l, llist_compare_func_t comp_func TSRMLS_DC)
{
size_t i;
zend_llist_element **elements;
zend_llist_element *element, **ptr;
if (l->count <= 0) {
return;
}
elements = (zend_llist_element **) emalloc(l->count * sizeof(zend_llist_element *));
ptr = &elements[0];
for (element=l->head; element; element=element->next) {
*ptr++ = element;
}
zend_qsort(elements, l->count, sizeof(zend_llist_element *), (compare_func_t) comp_func TSRMLS_CC);
l->head = elements[0];
elements[0]->prev = NULL;
for (i = 1; i < l->count; i++) {
elements[i]->prev = elements[i-1];
elements[i-1]->next = elements[i];
}
elements[i-1]->next = NULL;
l->tail = elements[i-1];
efree(elements);
}
ZEND_API void zend_llist_apply_with_argument(zend_llist *l, llist_apply_with_arg_func_t func, void *arg TSRMLS_DC)
{
zend_llist_element *element;
for (element=l->head; element; element=element->next) {
func(element->data, arg TSRMLS_CC);
}
}
ZEND_API void zend_llist_apply_with_arguments(zend_llist *l, llist_apply_with_args_func_t func TSRMLS_DC, int num_args, ...)
{
zend_llist_element *element;
va_list args;
va_start(args, num_args);
for (element=l->head; element; element=element->next) {
func(element->data, num_args, args TSRMLS_CC);
}
va_end(args);
}
ZEND_API int zend_llist_count(zend_llist *l)
{
return l->count;
}
ZEND_API void *zend_llist_get_first_ex(zend_llist *l, zend_llist_position *pos)
{
zend_llist_position *current = pos ? pos : &l->traverse_ptr;
*current = l->head;
if (*current) {
return (*current)->data;
} else {
return NULL;
}
}
ZEND_API void *zend_llist_get_last_ex(zend_llist *l, zend_llist_position *pos)
{
zend_llist_position *current = pos ? pos : &l->traverse_ptr;
*current = l->tail;
if (*current) {
return (*current)->data;
} else {
return NULL;
}
}
ZEND_API void *zend_llist_get_next_ex(zend_llist *l, zend_llist_position *pos)
{
zend_llist_position *current = pos ? pos : &l->traverse_ptr;
if (*current) {
*current = (*current)->next;
if (*current) {
return (*current)->data;
}
}
return NULL;
}
ZEND_API void *zend_llist_get_prev_ex(zend_llist *l, zend_llist_position *pos)
{
zend_llist_position *current = pos ? pos : &l->traverse_ptr;
if (*current) {
*current = (*current)->prev;
if (*current) {
return (*current)->data;
}
}
return NULL;
}
-77
View File
@@ -1,77 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_LLIST_H
#define ZEND_LLIST_H
typedef struct _zend_llist_element {
struct _zend_llist_element *next;
struct _zend_llist_element *prev;
char data[1]; /* Needs to always be last in the struct */
} zend_llist_element;
typedef void (*llist_dtor_func_t)(void *);
typedef int (*llist_compare_func_t)(const zend_llist_element *, const zend_llist_element * TSRMLS_DC);
typedef void (*llist_apply_with_args_func_t)(void *data, int num_args, va_list args TSRMLS_DC);
typedef void (*llist_apply_with_arg_func_t)(void *data, void *arg TSRMLS_DC);
typedef void (*llist_apply_func_t)(void * TSRMLS_DC);
typedef struct _zend_llist {
zend_llist_element *head;
zend_llist_element *tail;
size_t count;
size_t size;
llist_dtor_func_t dtor;
unsigned char persistent;
zend_llist_element *traverse_ptr;
} zend_llist;
typedef zend_llist_element* zend_llist_position;
BEGIN_EXTERN_C()
ZEND_API void zend_llist_init(zend_llist *l, size_t size, llist_dtor_func_t dtor, unsigned char persistent);
ZEND_API void zend_llist_add_element(zend_llist *l, void *element);
ZEND_API void zend_llist_prepend_element(zend_llist *l, void *element);
ZEND_API void zend_llist_del_element(zend_llist *l, void *element, int (*compare)(void *element1, void *element2));
ZEND_API void zend_llist_destroy(zend_llist *l);
ZEND_API void zend_llist_clean(zend_llist *l);
ZEND_API void *zend_llist_remove_tail(zend_llist *l);
ZEND_API void zend_llist_copy(zend_llist *dst, zend_llist *src);
ZEND_API void zend_llist_apply(zend_llist *l, llist_apply_func_t func TSRMLS_DC);
ZEND_API void zend_llist_apply_with_del(zend_llist *l, int (*func)(void *data));
ZEND_API void zend_llist_apply_with_argument(zend_llist *l, llist_apply_with_arg_func_t func, void *arg TSRMLS_DC);
ZEND_API void zend_llist_apply_with_arguments(zend_llist *l, llist_apply_with_args_func_t func TSRMLS_DC, int num_args, ...);
ZEND_API int zend_llist_count(zend_llist *l);
ZEND_API void zend_llist_sort(zend_llist *l, llist_compare_func_t comp_func TSRMLS_DC);
/* traversal */
ZEND_API void *zend_llist_get_first_ex(zend_llist *l, zend_llist_position *pos);
ZEND_API void *zend_llist_get_last_ex(zend_llist *l, zend_llist_position *pos);
ZEND_API void *zend_llist_get_next_ex(zend_llist *l, zend_llist_position *pos);
ZEND_API void *zend_llist_get_prev_ex(zend_llist *l, zend_llist_position *pos);
#define zend_llist_get_first(l) zend_llist_get_first_ex(l, NULL)
#define zend_llist_get_last(l) zend_llist_get_last_ex(l, NULL)
#define zend_llist_get_next(l) zend_llist_get_next_ex(l, NULL)
#define zend_llist_get_prev(l) zend_llist_get_prev_ex(l, NULL)
END_EXTERN_C()
#endif /* ZEND_LLIST_H */
-320
View File
@@ -1,320 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include "zend.h"
#include "zend_mm.h"
#if WIN32|WINNT
# ifndef inline
# define inline __inline
# endif
#endif
#define ZEND_MM_FREE_BLOCK 0
#define ZEND_MM_USED_BLOCK 1
#ifndef MAX
#define MAX(a, b) (((a)>(b))?(a):(b))
#endif
#ifndef ZEND_MM_ALIGNMENT
#define ZEND_MM_ALIGNMENT 8
#define ZEND_MM_ALIGNMENT_LOG2 3
#endif
#define ZEND_MM_ALIGNMENT_MASK ~(ZEND_MM_ALIGNMENT-1)
#define ZEND_MM_BUCKET_INDEX(true_size) (true_size >> ZEND_MM_ALIGNMENT_LOG2)
#define ZEND_MM_GET_FREE_LIST_BUCKET(index, free_list_bucket) \
if (index < ZEND_MM_NUM_BUCKETS) { \
free_list_bucket = &heap->free_buckets[index]; \
} else { \
/* This size doesn't exist */ \
free_list_bucket = &heap->free_buckets[0]; \
}
/* Aligned header size */
#define ZEND_MM_ALIGNED_SIZE(size) ((size + ZEND_MM_ALIGNMENT - 1) & ZEND_MM_ALIGNMENT_MASK)
#define ZEND_MM_ALIGNED_HEADER_SIZE ZEND_MM_ALIGNED_SIZE(sizeof(zend_mm_block))
#define ZEND_MM_ALIGNED_FREE_HEADER_SIZE ZEND_MM_ALIGNED_SIZE(sizeof(zend_mm_free_block))
#define ZEND_MM_ALIGNED_SEGMENT_SIZE ZEND_MM_ALIGNED_SIZE(sizeof(zend_mm_segment))
/* Memory calculations */
#define ZEND_MM_BLOCK_AT(blk, offset) ((zend_mm_block *) (((char *) (blk))+(offset)))
#define ZEND_MM_DATA_OF(p) ((void *) (((char *) (p))+ZEND_MM_ALIGNED_HEADER_SIZE))
#define ZEND_MM_HEADER_OF(blk) ZEND_MM_BLOCK_AT(blk, -(int)ZEND_MM_ALIGNED_HEADER_SIZE)
/* Debug output */
#define ZEND_MM_DEBUG(stmt)
static inline void zend_mm_add_to_free_list(zend_mm_heap *heap, zend_mm_free_block *mm_block)
{
zend_mm_free_block **free_list_bucket;
size_t index = ZEND_MM_BUCKET_INDEX(mm_block->size);
ZEND_MM_GET_FREE_LIST_BUCKET(index, free_list_bucket);
mm_block->next_free_block = *free_list_bucket;
mm_block->prev_free_block = NULL;
*free_list_bucket = mm_block;
if (mm_block->next_free_block) {
mm_block->next_free_block->prev_free_block = mm_block;
}
}
static inline void zend_mm_remove_from_free_list(zend_mm_heap *heap, zend_mm_free_block *mm_block)
{
if (mm_block->prev_free_block) {
mm_block->prev_free_block->next_free_block = mm_block->next_free_block;
} else {
zend_mm_free_block **free_list_bucket;
size_t index = ZEND_MM_BUCKET_INDEX(mm_block->size);
ZEND_MM_GET_FREE_LIST_BUCKET(index, free_list_bucket);
*free_list_bucket = mm_block->next_free_block;
}
if (mm_block->next_free_block) {
mm_block->next_free_block->prev_free_block = mm_block->prev_free_block;
}
}
static inline void zend_mm_create_new_free_block(zend_mm_heap *heap, zend_mm_block *mm_block, size_t true_size)
{
int remaining_size;
zend_mm_free_block *new_free_block;
/* calculate sizes */
remaining_size = mm_block->size - true_size;
if (remaining_size < ZEND_MM_ALIGNED_FREE_HEADER_SIZE) {
/* keep best_fit->size as is, it'll include this extra space */
return;
}
/* prepare new free block */
mm_block->size = true_size;
new_free_block = (zend_mm_free_block *) ZEND_MM_BLOCK_AT(mm_block, mm_block->size);
new_free_block->type = ZEND_MM_FREE_BLOCK;
new_free_block->size = remaining_size;
new_free_block->prev_size = true_size;
/* update the next block's prev_size */
ZEND_MM_BLOCK_AT(new_free_block, new_free_block->size)->prev_size = new_free_block->size;
/* add the new free block to the free list */
zend_mm_add_to_free_list(heap, new_free_block);
return;
}
zend_bool zend_mm_add_memory_block(zend_mm_heap *heap, size_t block_size)
{
/* We need to make sure that block_size is big enough for the minimum segment size */
zend_mm_free_block *mm_block;
zend_mm_block *guard_block;
zend_mm_segment *segment;
/* align block size downwards */
block_size = block_size & ZEND_MM_ALIGNMENT_MASK;
segment = (zend_mm_segment *) malloc(block_size);
if (!segment) {
return 1;
}
/* fprintf(stderr, "Allocating segment %X\n", segment); */
segment->next_segment = heap->segments_list;
heap->segments_list = segment;
block_size -= ZEND_MM_ALIGNED_SEGMENT_SIZE;
mm_block = (zend_mm_free_block *) ((char *) segment + ZEND_MM_ALIGNED_SEGMENT_SIZE);
mm_block->size = block_size - ZEND_MM_ALIGNED_FREE_HEADER_SIZE; /* keep one guard block in the end */
mm_block->type = ZEND_MM_FREE_BLOCK;
mm_block->prev_size = 0; /* Size is always at least ZEND_MM_ALIGNED_HEADER_SIZE big (>0) so 0 is OK */
/* setup guard block */
guard_block = ZEND_MM_BLOCK_AT(mm_block, mm_block->size);
guard_block->type = ZEND_MM_USED_BLOCK;
guard_block->size = ZEND_MM_ALIGNED_FREE_HEADER_SIZE;
guard_block->prev_size = mm_block->size;
ZEND_MM_DEBUG(("Setup guard block at 0x%0.8X\n", guard_block));
zend_mm_add_to_free_list(heap, mm_block);
return 0;
}
/* Notes:
* - This function may alter the block_sizes values to match platform alignment
* - This function does *not* perform sanity checks on the arguments
*/
zend_bool zend_mm_startup(zend_mm_heap *heap, size_t block_size)
{
heap->block_size = block_size;
heap->segments_list = NULL;
memset(heap->free_buckets, 0, sizeof(heap->free_buckets));
return zend_mm_add_memory_block(heap, block_size);
}
void zend_mm_shutdown(zend_mm_heap *heap)
{
zend_mm_segment *segment = heap->segments_list;
zend_mm_segment *prev;
while (segment) {
prev = segment;
segment = segment->next_segment;
/* fprintf(stderr, "Freeing segment %X\n", prev);*/
free(prev);
}
heap->segments_list = NULL;
}
void *zend_mm_alloc(zend_mm_heap *heap, size_t size)
{
size_t true_size;
zend_mm_free_block *p, *best_fit=NULL;
zend_mm_free_block **free_list_bucket;
size_t index;
/* The max() can probably be optimized with an if() which checks more specific cases */
true_size = MAX(ZEND_MM_ALIGNED_SIZE(size)+ZEND_MM_ALIGNED_HEADER_SIZE, ZEND_MM_ALIGNED_FREE_HEADER_SIZE);
index = ZEND_MM_BUCKET_INDEX(true_size);
if (index < ZEND_MM_NUM_BUCKETS) {
ZEND_MM_GET_FREE_LIST_BUCKET(index, free_list_bucket);
while (free_list_bucket != &heap->free_buckets[ZEND_MM_NUM_BUCKETS]) {
if (*free_list_bucket) {
best_fit = *free_list_bucket;
goto zend_mm_finished_searching_for_block;
}
free_list_bucket++;
}
}
for (p = heap->free_buckets[0]; p; p = p->next_free_block) {
if (p->size == true_size) {
best_fit = p;
break;
}
if ((p->size > true_size) && (!best_fit || (best_fit->size > p->size))) { /* better fit */
best_fit = p;
}
}
zend_mm_finished_searching_for_block:
if (!best_fit) {
if (true_size > (heap->block_size - ZEND_MM_ALIGNED_SEGMENT_SIZE - ZEND_MM_ALIGNED_FREE_HEADER_SIZE)) {
/* Make sure we add a memory block which is big enough */
zend_mm_add_memory_block(heap, true_size + ZEND_MM_ALIGNED_SEGMENT_SIZE + ZEND_MM_ALIGNED_FREE_HEADER_SIZE);
} else {
zend_mm_add_memory_block(heap, heap->block_size);
}
return zend_mm_alloc(heap, size);
}
/* mark as used */
best_fit->type = ZEND_MM_USED_BLOCK;
/* remove from free list */
zend_mm_remove_from_free_list(heap, best_fit);
zend_mm_create_new_free_block(heap, (zend_mm_block *) best_fit, true_size);
return ZEND_MM_DATA_OF(best_fit);
}
void zend_mm_free(zend_mm_heap *heap, void *p)
{
zend_mm_block *mm_block = ZEND_MM_HEADER_OF(p);
zend_mm_block *prev_block, *next_block;
if (mm_block->type!=ZEND_MM_USED_BLOCK) {
/* error */
return;
}
next_block = ZEND_MM_BLOCK_AT(mm_block, mm_block->size);
/* merge with previous block if empty */
if (mm_block->prev_size != 0
&& (prev_block=ZEND_MM_BLOCK_AT(mm_block, -(int)mm_block->prev_size))->type == ZEND_MM_FREE_BLOCK) {
zend_mm_remove_from_free_list(heap, (zend_mm_free_block *) prev_block);
prev_block->size += mm_block->size;
mm_block = prev_block;
next_block->prev_size = mm_block->size;
}
/* merge with the next block if empty */
if (next_block->type == ZEND_MM_FREE_BLOCK) {
mm_block->size += next_block->size;
zend_mm_remove_from_free_list(heap, (zend_mm_free_block *) next_block);
next_block = ZEND_MM_BLOCK_AT(mm_block, mm_block->size); /* recalculate */
next_block->prev_size = mm_block->size;
}
mm_block->type = ZEND_MM_FREE_BLOCK;
zend_mm_add_to_free_list(heap, (zend_mm_free_block *) mm_block);
}
void *zend_mm_realloc(zend_mm_heap *heap, void *p, size_t size)
{
zend_mm_block *mm_block = ZEND_MM_HEADER_OF(p);
zend_mm_block *next_block;
size_t true_size = MAX(ZEND_MM_ALIGNED_SIZE(size)+ZEND_MM_ALIGNED_HEADER_SIZE, ZEND_MM_ALIGNED_FREE_HEADER_SIZE);
if (true_size <= mm_block->size) {
zend_mm_create_new_free_block(heap, mm_block, true_size);
/* We don't yet merge this free block with the following one */
return p;
}
next_block = ZEND_MM_BLOCK_AT(mm_block, mm_block->size);
if (next_block->type != ZEND_MM_FREE_BLOCK || (mm_block->size + next_block->size < true_size)) {
void *ptr;
ptr = zend_mm_alloc(heap, size);
memcpy(ptr, p, mm_block->size - ZEND_MM_ALIGNED_HEADER_SIZE);
zend_mm_free(heap, p);
return ptr;
}
zend_mm_remove_from_free_list(heap, (zend_mm_free_block *) next_block);
mm_block->size += next_block->size;
/* update the next block's prev_size */
ZEND_MM_BLOCK_AT(mm_block, mm_block->size)->prev_size = mm_block->size;
zend_mm_create_new_free_block(heap, mm_block, true_size);
return p;
}
-63
View File
@@ -1,63 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef _ZEND_MM_H
#define _ZEND_MM_H
#include <sys/types.h>
#include "zend_types.h"
/* Define this to enable Zend MM */
#define ZEND_MM
/* mm block type */
typedef struct _zend_mm_block {
unsigned int size : 31;
unsigned int type : 1;
size_t prev_size;
} zend_mm_block;
typedef struct _zend_mm_free_block {
unsigned int size : 31;
unsigned int type : 1;
size_t prev_size;
struct _zend_mm_free_block *prev_free_block;
struct _zend_mm_free_block *next_free_block;
} zend_mm_free_block;
typedef struct _zend_mm_segment {
struct _zend_mm_segment *next_segment;
} zend_mm_segment;
#define ZEND_MM_NUM_BUCKETS 64
typedef struct _zend_mm_heap {
zend_mm_segment *segments_list;
size_t block_size;
zend_mm_free_block *free_buckets[ZEND_MM_NUM_BUCKETS];
} zend_mm_heap;
zend_bool zend_mm_startup(zend_mm_heap *heap, size_t block_size);
void zend_mm_shutdown(zend_mm_heap *heap);
void *zend_mm_alloc(zend_mm_heap *heap, size_t size);
void zend_mm_free(zend_mm_heap *heap, void *p);
void *zend_mm_realloc(zend_mm_heap *heap, void *p, size_t size);
#endif /* _ZEND_MM_H */
-88
View File
@@ -1,88 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef MODULES_H
#define MODULES_H
#include "zend.h"
#define INIT_FUNC_ARGS int type, int module_number TSRMLS_DC
#define INIT_FUNC_ARGS_PASSTHRU type, module_number TSRMLS_CC
#define SHUTDOWN_FUNC_ARGS int type, int module_number TSRMLS_DC
#define SHUTDOWN_FUNC_ARGS_PASSTHRU type, module_number TSRMLS_CC
#define ZEND_MODULE_INFO_FUNC_ARGS zend_module_entry *zend_module TSRMLS_DC
#define ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU zend_module TSRMLS_CC
ZEND_API extern unsigned char first_arg_force_ref[];
ZEND_API extern unsigned char second_arg_force_ref[];
ZEND_API extern unsigned char third_arg_force_ref[];
#define ZEND_MODULE_API_NO 20020429
#ifdef ZTS
#define USING_ZTS 1
#else
#define USING_ZTS 0
#endif
#define STANDARD_MODULE_HEADER sizeof(zend_module_entry), ZEND_MODULE_API_NO, ZEND_DEBUG, USING_ZTS
#define STANDARD_MODULE_PROPERTIES_EX 0, 0, 0, NULL, 0
#define STANDARD_MODULE_PROPERTIES \
NULL, NULL, STANDARD_MODULE_PROPERTIES_EX
#define NO_VERSION_YET NULL
#define MODULE_PERSISTENT 1
#define MODULE_TEMPORARY 2
typedef struct _zend_module_entry zend_module_entry;
struct _zend_module_entry {
unsigned short size;
unsigned int zend_api;
unsigned char zend_debug;
unsigned char zts;
char *name;
zend_function_entry *functions;
int (*module_startup_func)(INIT_FUNC_ARGS);
int (*module_shutdown_func)(SHUTDOWN_FUNC_ARGS);
int (*request_startup_func)(INIT_FUNC_ARGS);
int (*request_shutdown_func)(SHUTDOWN_FUNC_ARGS);
void (*info_func)(ZEND_MODULE_INFO_FUNC_ARGS);
char *version;
int (*global_startup_func)(void);
int (*global_shutdown_func)(void);
int globals_id;
int module_started;
unsigned char type;
void *handle;
int module_number;
};
extern ZEND_API HashTable module_registry;
void module_destructor(zend_module_entry *module);
int module_registry_cleanup(zend_module_entry *module TSRMLS_DC);
int module_registry_request_startup(zend_module_entry *module TSRMLS_DC);
#define ZEND_MODULE_DTOR (void (*)(void *)) module_destructor
#endif
-499
View File
@@ -1,499 +0,0 @@
#include "zend.h"
#include "zend_globals.h"
#include "zend_variables.h"
#include "zend_API.h"
#include "zend_objects.h"
#include "zend_objects_API.h"
#include "zend_object_handlers.h"
#define DEBUG_OBJECT_HANDLERS 0
/*
__X accessors explanation:
if we have __get and property that is not part of the properties array is
requested, we call __get handler. If it fails, we return uninitialized.
if we have __set and property that is not part of the properties array is
set, we call __set handler. If it fails, we do not change the array.
for both handlers above, when we are inside __get/__set, no further calls for
__get/__set for these objects will be made, to prevent endless recursion and
enable accessors to change properties array.
if we have __call and method which is not part of the class function table is
called, we cal __call handler.
*/
static HashTable *zend_std_get_properties(zval *object TSRMLS_DC)
{
zend_object *zobj;
zobj = Z_OBJ_P(object);
return zobj->properties;
}
static zval *zend_std_call_getter(zval *object, zval *member TSRMLS_DC)
{
zval **call_args[1];
zval *retval = NULL;
zval __get_name;
int call_result;
/* __get handler is called with two arguments:
property name
return value for the object (by reference)
it should return whether the call was successfull or not
*/
INIT_PZVAL(&__get_name);
ZVAL_STRINGL(&__get_name, ZEND_GET_FUNC_NAME, sizeof(ZEND_GET_FUNC_NAME)-1, 0);
call_args[0] = &member;
/* go call the __get handler */
call_result = call_user_function_ex(NULL,
&object,
&__get_name,
&retval,
1, call_args,
0, NULL TSRMLS_CC);
/*
call_result is if call_user_function gone OK.
retval returns the value that is received
*/
if (call_result == FAILURE) {
zend_error(E_ERROR, "Could not call __get handler for class %s", Z_OBJCE_P(object)->name);
return NULL;
}
retval->refcount--;
return retval;
}
static int zend_std_call_setter(zval *object, zval *member, zval *value TSRMLS_DC)
{
zval **call_args[2];
zval *retval = NULL;
zval __set_name;
int call_result;
int ret;
/* __set handler is called with two arguments:
property name
value to be set
it should return whether the call was successfull or not
*/
INIT_PZVAL(&__set_name);
ZVAL_STRINGL(&__set_name, ZEND_SET_FUNC_NAME, sizeof(ZEND_SET_FUNC_NAME)-1, 0);
call_args[0] = &member;
value->refcount++;
call_args[1] = &value;
/* go call the __set handler */
call_result = call_user_function_ex(NULL,
&object,
&__set_name,
&retval,
2, call_args,
0, NULL TSRMLS_CC);
/*
call_result is if call_user_function gone OK.
retval shows if __get method went OK.
*/
if (call_result == FAILURE) {
zend_error(E_ERROR, "Could not call __set handler for class %s", Z_OBJCE_P(object)->name);
return FAILURE;
}
zval_ptr_dtor(&value);
if (retval && zval_is_true(retval)) {
ret = SUCCESS;
} else {
ret = FAILURE;
}
if (retval) {
zval_ptr_dtor(&retval);
}
return ret;
}
zval *zend_std_read_property(zval *object, zval *member, int type TSRMLS_DC)
{
zend_object *zobj;
zval tmp_member;
zval **retval;
zval *rv = NULL;
zobj = Z_OBJ_P(object);
if (member->type != IS_STRING) {
tmp_member = *member;
zval_copy_ctor(&tmp_member);
convert_to_string(&tmp_member);
member = &tmp_member;
}
#if DEBUG_OBJECT_HANDLERS
fprintf(stderr, "Read object #%d property: %s\n", Z_OBJ_HANDLE_P(object), Z_STRVAL_P(member));
#endif
if (zend_hash_find(zobj->properties, Z_STRVAL_P(member), Z_STRLEN_P(member)+1, (void **) &retval) == FAILURE) {
if (zobj->ce->__get && !zobj->in_get) {
/* have getter - try with it! */
zobj->in_get = 1; /* prevent circular getting */
rv = zend_std_call_getter(object, member TSRMLS_CC);
zobj->in_get = 0;
if (rv) {
retval = &rv;
} else {
retval = &EG(uninitialized_zval_ptr);
}
} else {
switch (type) {
case BP_VAR_R:
zend_error(E_NOTICE,"Undefined property: %s", Z_STRVAL_P(member));
/* break missing intentionally */
case BP_VAR_IS:
retval = &EG(uninitialized_zval_ptr);
break;
case BP_VAR_RW:
zend_error(E_NOTICE,"Undefined property: %s", Z_STRVAL_P(member));
/* break missing intentionally */
case BP_VAR_W: {
zval *new_zval = &EG(uninitialized_zval);
new_zval->refcount++;
zend_hash_update(zobj->properties, Z_STRVAL_P(member), Z_STRLEN_P(member)+1, &new_zval, sizeof(zval *), (void **) &retval);
}
break;
EMPTY_SWITCH_DEFAULT_CASE()
}
}
}
if (member == &tmp_member) {
zval_dtor(member);
}
return *retval;
}
static void zend_std_write_property(zval *object, zval *member, zval *value TSRMLS_DC)
{
zend_object *zobj;
zval tmp_member;
zval **variable_ptr;
int setter_done = 0;
zobj = Z_OBJ_P(object);
if (member->type != IS_STRING) {
tmp_member = *member;
zval_copy_ctor(&tmp_member);
convert_to_string(&tmp_member);
member = &tmp_member;
}
if (zend_hash_find(zobj->properties, Z_STRVAL_P(member), Z_STRLEN_P(member)+1, (void **) &variable_ptr) == SUCCESS) {
if(*variable_ptr == value) {
/* if we already have this value there, we don't actually need to do anything */
setter_done = 1;
} else {
/* if we are assigning reference, we shouldn't move it, but instead assign variable
to the same pointer */
if (PZVAL_IS_REF(*variable_ptr)) {
zval_dtor(*variable_ptr); /* old value should be destroyed */
/* To check: can't *variable_ptr be some system variable like error_zval here? */
(*variable_ptr)->type = value->type;
(*variable_ptr)->value = value->value;
zval_copy_ctor(*variable_ptr);
setter_done = 1;
}
}
} else {
if (zobj->ce->__set && !zobj->in_set) {
zobj->in_set = 1; /* prevent circular setting */
if (zend_std_call_setter(object, member, value TSRMLS_CC) != SUCCESS) {
/* for now, just ignore it - __set should take care of warnings, etc. */
}
setter_done = 1;
zobj->in_set = 0;
}
}
if (!setter_done) {
/* if we assign referenced variable, we should separate it */
value->refcount++;
if (PZVAL_IS_REF(value)) {
SEPARATE_ZVAL(&value);
}
zend_hash_update(zobj->properties, Z_STRVAL_P(member), Z_STRLEN_P(member)+1, &value, sizeof(zval *), NULL);
}
if (member == &tmp_member) {
zval_dtor(member);
}
}
static zval **zend_std_get_property_ptr(zval *object, zval *member TSRMLS_DC)
{
zend_object *zobj;
zval tmp_member;
zval **retval;
zobj = Z_OBJ_P(object);
if (member->type != IS_STRING) {
tmp_member = *member;
zval_copy_ctor(&tmp_member);
convert_to_string(&tmp_member);
member = &tmp_member;
}
#if DEBUG_OBJECT_HANDLERS
fprintf(stderr, "Ptr object #%d property: %s\n", Z_OBJ_HANDLE_P(object), Z_STRVAL_P(member));
#endif
if (zend_hash_find(zobj->properties, Z_STRVAL_P(member), Z_STRLEN_P(member)+1, (void **) &retval) == FAILURE) {
zval *new_zval;
if (!zobj->ce->__get) {
/* we don't have getter - will just add it */
new_zval = &EG(uninitialized_zval);
/* zend_error(E_NOTICE, "Undefined property: %s", Z_STRVAL_P(member)); */
new_zval->refcount++;
zend_hash_update(zobj->properties, Z_STRVAL_P(member), Z_STRLEN_P(member)+1, &new_zval, sizeof(zval *), (void **) &retval);
} else {
/* we do have getter - fail and let it try again with usual get/set */
retval = NULL;
}
}
if (member == &tmp_member) {
zval_dtor(member);
}
return retval;
}
static void zend_std_unset_property(zval *object, zval *member TSRMLS_DC)
{
zend_object *zobj;
zval tmp_member;
zobj = Z_OBJ_P(object);
if (member->type != IS_STRING) {
tmp_member = *member;
zval_copy_ctor(&tmp_member);
convert_to_string(&tmp_member);
member = &tmp_member;
}
zend_hash_del(zobj->properties, Z_STRVAL_P(member), Z_STRLEN_P(member)+1);
if (member == &tmp_member) {
zval_dtor(member);
}
}
static void zend_std_call_user_call(INTERNAL_FUNCTION_PARAMETERS)
{
zval ***args;
zend_internal_function *func = (zend_internal_function *)EG(function_state_ptr)->function;
zval method_name, method_args, __call_name;
zval *method_name_ptr, *method_args_ptr;
zval **call_args[2];
zval *method_result_ptr = NULL;
int i, call_result;
args = (zval ***)emalloc(ZEND_NUM_ARGS() * sizeof(zval **));
if (zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args) == FAILURE) {
efree(args);
zend_error(E_ERROR, "Cannot get arguments for __call");
RETURN_FALSE;
}
method_name_ptr = &method_name;
INIT_PZVAL(method_name_ptr);
ZVAL_STRING(method_name_ptr, func->function_name, 0); /* no dup - it's a copy */
method_args_ptr = &method_args;
INIT_PZVAL(method_args_ptr);
array_init(method_args_ptr);
for(i=0; i<ZEND_NUM_ARGS(); i++) {
zval_add_ref(args[i]);
add_next_index_zval(method_args_ptr, *args[i]);
}
efree(args);
INIT_PZVAL(&__call_name);
ZVAL_STRINGL(&__call_name, ZEND_CALL_FUNC_NAME, sizeof(ZEND_CALL_FUNC_NAME)-1, 0);
/* __call handler is called with two arguments:
method name
array of method parameters
*/
call_args[0] = &method_name_ptr;
call_args[1] = &method_args_ptr;
/* go call the __call handler */
call_result = call_user_function_ex(NULL,
&this_ptr,
&__call_name,
&method_result_ptr,
2, call_args,
0, NULL TSRMLS_CC);
/* call_result is if call_user_function gone OK.
method_result_ptr is the true result of the called method
*/
if (method_result_ptr) {
*return_value = *method_result_ptr;
zval_copy_ctor(return_value);
zval_ptr_dtor(&method_result_ptr);
}
if (call_result == FAILURE) {
zend_error(E_ERROR, "Could not call __call handler for class %s", Z_OBJCE_P(this_ptr)->name);
}
/* now destruct all auxiliaries */
zval_dtor(method_args_ptr);
zval_dtor(method_name_ptr);
/* destruct the function also, then - we have allocated it in get_method */
efree(func);
}
static union _zend_function *zend_std_get_method(zval *object, char *method_name, int method_len TSRMLS_DC)
{
zend_object *zobj;
zend_function *func_method;
char *lc_method_name;
lc_method_name = do_alloca(method_len+1);
/* Create a zend_copy_str_tolower(dest, src, src_length); */
memcpy(lc_method_name, method_name, method_len+1);
zend_str_tolower(lc_method_name, method_len);
zobj = Z_OBJ_P(object);
if (zend_hash_find(&zobj->ce->function_table, lc_method_name, method_len+1, (void **)&func_method) == FAILURE) {
if (zobj->ce->__call != NULL) {
zend_internal_function *call_user_call = emalloc(sizeof(zend_internal_function));
call_user_call->type = ZEND_INTERNAL_FUNCTION;
call_user_call->handler = zend_std_call_user_call;
call_user_call->arg_types = NULL;
call_user_call->scope = NULL;
call_user_call->is_static = 0;
call_user_call->function_name = estrndup(method_name, method_len);
free_alloca(lc_method_name);
return (union _zend_function *)call_user_call;
}
zend_error(E_ERROR, "Call to undefined function %s()", method_name);
}
free_alloca(lc_method_name);
return func_method;
}
static union _zend_function *zend_std_get_constructor(zval *object TSRMLS_DC)
{
zend_object *zobj;
zobj = Z_OBJ_P(object);
return zobj->ce->constructor;
}
int zend_compare_symbol_tables_i(HashTable *ht1, HashTable *ht2 TSRMLS_DC);
static int zend_std_compare_objects(zval *o1, zval *o2 TSRMLS_DC)
{
zend_object *zobj1, *zobj2;
zobj1 = Z_OBJ_P(o1);
zobj2 = Z_OBJ_P(o2);
if (zobj1->ce != zobj2->ce) {
return 1; /* different classes */
}
return zend_compare_symbol_tables_i(zobj1->properties, zobj2->properties TSRMLS_CC);
}
static int zend_std_has_property(zval *object, zval *member, int check_empty TSRMLS_DC)
{
zend_object *zobj;
int result;
zval **value;
zval tmp_member;
zobj = Z_OBJ_P(object);
if (member->type != IS_STRING) {
tmp_member = *member;
zval_copy_ctor(&tmp_member);
convert_to_string(&tmp_member);
member = &tmp_member;
}
if (zend_hash_find(zobj->properties, Z_STRVAL_P(member), Z_STRLEN_P(member)+1, (void **)&value) == SUCCESS) {
if (check_empty) {
result = zend_is_true(*value);
} else {
result = (Z_TYPE_PP(value) != IS_NULL);
}
} else {
result = 0;
}
if (member == &tmp_member) {
zval_dtor(member);
}
return result;
}
zend_class_entry *zend_std_object_get_class(zval *object TSRMLS_DC)
{
zend_object *zobj;
zobj = Z_OBJ_P(object);
return zobj->ce;
}
zend_object_handlers std_object_handlers = {
zend_objects_store_add_ref, /* add_ref */
zend_objects_store_del_ref, /* del_ref */
zend_objects_store_delete_obj, /* delete_obj */
zend_objects_clone_obj, /* clone_obj */
zend_std_read_property, /* read_property */
zend_std_write_property, /* write_property */
zend_std_get_property_ptr, /* get_property_ptr */
zend_std_get_property_ptr, /* get_property_zval_ptr */
NULL, /* get */
NULL, /* set */
zend_std_has_property, /* has_property */
zend_std_unset_property, /* unset_property */
zend_std_get_properties, /* get_properties */
zend_std_get_method, /* get_method */
NULL, /* call_method */
zend_std_get_constructor, /* get_constructor */
zend_std_object_get_class, /* get_class_entry */
NULL, /* get_class_name */
zend_std_compare_objects /* compare_objects */
};
-79
View File
@@ -1,79 +0,0 @@
#ifndef ZEND_OBJECT_HANDLERS_H
#define ZEND_OBJECT_HANDLERS_H
union _zend_function;
typedef zval *(*zend_object_read_property_t)(zval *object, zval *member, int type TSRMLS_DC);
/* Used to fetch property from the object, read-only */
typedef void (*zend_object_write_property_t)(zval *object, zval *member, zval *value TSRMLS_DC);
/* Used to set property of the object */
typedef zval **(*zend_object_get_property_ptr_t)(zval *object, zval *member TSRMLS_DC);
/* Used to create pointer to the property of the object, for future r/w access via get/set */
typedef zval **(*zend_object_get_property_zval_ptr_t)(zval *object, zval *member TSRMLS_DC);
/* Used to create pointer to the property of the object, for future direct r/w access */
typedef void (*zend_object_set_t)(zval **property, zval *value TSRMLS_DC);
/* Used to set object value (most probably used in combination with
typedef the result of the get_property_ptr) */
typedef zval* (*zend_object_get_t)(zval *property TSRMLS_DC);
/* Used to get object value (most probably used in combination with
the result of the get_property_ptr or when converting object value to
one of the basic types) */
typedef int (*zend_object_has_property_t)(zval *object, zval *member, int check_empty TSRMLS_DC);
/* Used to check if a property of the object exists */
typedef void (*zend_object_unset_property_t)(zval *object, zval *member TSRMLS_DC);
/* Used to remove a property of the object */
typedef HashTable *(*zend_object_get_properties_t)(zval *object TSRMLS_DC);
/* Used to get hash of the properties of the object, as hash of zval's */
typedef int (*zend_object_call_method_t)(char *method, INTERNAL_FUNCTION_PARAMETERS);
/* Used to call methods */
/* args on stack! */
/* Andi - EX(fbc) (function being called) needs to be initialized already in the INIT fcall opcode so that the parameters can be parsed the right way. We need to add another callback fror this.
*/
typedef union _zend_function *(*zend_object_get_method_t)(zval *object, char *method, int method_len TSRMLS_DC);
typedef union _zend_function *(*zend_object_get_constructor_t)(zval *object TSRMLS_DC);
/* Get method parameter mask - by value/by reference, etc. */
/* Object maintenance/destruction */
typedef void (*zend_object_add_ref_t)(zval *object TSRMLS_DC);
typedef void (*zend_object_del_ref_t)(zval *object TSRMLS_DC);
typedef void (*zend_object_delete_obj_t)(zval *object TSRMLS_DC);
typedef zend_object_value (*zend_object_clone_obj_t)(zval *object TSRMLS_DC);
typedef zend_class_entry *(*zend_object_get_class_entry_t)(zval *object TSRMLS_DC);
typedef int (*zend_object_get_class_name_t)(zval *object, char **class_name, zend_uint *class_name_len, int parent TSRMLS_DC);
typedef int (*zend_object_compare_t)(zval *object1, zval *object2 TSRMLS_DC);
typedef struct _zend_object_handlers {
/* general object functions */
zend_object_add_ref_t add_ref;
zend_object_del_ref_t del_ref;
zend_object_delete_obj_t delete_obj;
zend_object_clone_obj_t clone_obj;
/* individual object functions */
zend_object_read_property_t read_property;
zend_object_write_property_t write_property;
zend_object_get_property_ptr_t get_property_ptr;
zend_object_get_property_zval_ptr_t get_property_zval_ptr;
zend_object_get_t get;
zend_object_set_t set;
zend_object_has_property_t has_property;
zend_object_unset_property_t unset_property;
zend_object_get_properties_t get_properties;
zend_object_get_method_t get_method;
zend_object_call_method_t call_method;
zend_object_get_constructor_t get_constructor;
zend_object_get_class_entry_t get_class_entry;
zend_object_get_class_name_t get_class_name;
zend_object_compare_t compare_objects;
} zend_object_handlers;
extern zend_object_handlers std_object_handlers;
#define IS_ZEND_STD_OBJECT(z) ((z).type == IS_OBJECT && Z_OBJ_HT(z) == &std_object_handlers)
#define HAS_CLASS_ENTRY(z) (Z_OBJ_HT(z)->get_class_entry != NULL)
#endif
-124
View File
@@ -1,124 +0,0 @@
#include "zend.h"
#include "zend_globals.h"
#include "zend_variables.h"
#include "zend_API.h"
static inline void zend_objects_call_destructor(zend_object *object, zend_object_handle handle TSRMLS_DC)
{
if (object->ce->destructor) {
zval *obj;
zval *destructor_func_name;
zval *retval_ptr;
HashTable symbol_table;
MAKE_STD_ZVAL(obj);
obj->type = IS_OBJECT;
obj->value.obj.handle = handle;
obj->value.obj.handlers = &std_object_handlers;
zval_copy_ctor(obj);
/* FIXME: Optimize this so that we use the old_object->ce->destructor function pointer instead of the name */
MAKE_STD_ZVAL(destructor_func_name);
destructor_func_name->type = IS_STRING;
destructor_func_name->value.str.val = estrndup("__destruct", sizeof("__destruct")-1);
destructor_func_name->value.str.len = sizeof("__destruct")-1;
ZEND_INIT_SYMTABLE(&symbol_table);
call_user_function_ex(NULL, &obj, destructor_func_name, &retval_ptr, 0, NULL, 0, &symbol_table TSRMLS_CC);
zend_hash_destroy(&symbol_table);
zval_ptr_dtor(&obj);
zval_ptr_dtor(&destructor_func_name);
if (retval_ptr) {
zval_ptr_dtor(&retval_ptr);
}
}
}
static inline void zend_objects_destroy_object(zend_object *object, zend_object_handle handle TSRMLS_DC)
{
zend_objects_call_destructor(object, handle TSRMLS_CC);
/* Nuke the object */
zend_hash_destroy(object->properties);
FREE_HASHTABLE(object->properties);
efree(object);
}
ZEND_API zend_object_value zend_objects_new(zend_object **object, zend_class_entry *class_type)
{
zend_object_value retval;
TSRMLS_FETCH();
*object = emalloc(sizeof(zend_object));
(*object)->ce = class_type;
retval.handle = zend_objects_store_put(*object, (zend_objects_store_dtor_t) zend_objects_destroy_object, NULL TSRMLS_CC);
retval.handlers = &std_object_handlers;
(*object)->in_get = 0;
(*object)->in_set = 0;
return retval;
}
ZEND_API zend_object *zend_objects_get_address(zval *zobject)
{
TSRMLS_FETCH();
return (zend_object *)zend_object_store_get_object(zobject TSRMLS_CC);
}
ZEND_API zend_object_value zend_objects_clone_obj(zval *zobject TSRMLS_DC)
{
zend_object_value retval;
zend_object *old_object;
zend_object *new_object;
zend_object_handle handle = Z_OBJ_HANDLE_P(zobject);
old_object = zend_objects_get_address(zobject);
retval = zend_objects_new(&new_object, old_object->ce);
if (old_object->ce->clone) {
zval *old_obj;
zval *new_obj;
zval *clone_func_name;
zval *retval_ptr;
HashTable symbol_table;
MAKE_STD_ZVAL(new_obj);
new_obj->type = IS_OBJECT;
new_obj->value.obj = retval;
zval_copy_ctor(new_obj);
MAKE_STD_ZVAL(old_obj);
old_obj->type = IS_OBJECT;
old_obj->value.obj.handle = handle;
old_obj->value.obj.handlers = &std_object_handlers; /* If we reached here than the handlers are standrd */
zval_copy_ctor(old_obj);
/* FIXME: Optimize this so that we use the old_object->ce->clone function pointer instead of the name */
MAKE_STD_ZVAL(clone_func_name);
clone_func_name->type = IS_STRING;
clone_func_name->value.str.val = estrndup("__clone", sizeof("__clone")-1);
clone_func_name->value.str.len = sizeof("__clone")-1;
ALLOC_HASHTABLE(new_object->properties);
zend_hash_init(new_object->properties, 0, NULL, ZVAL_PTR_DTOR, 0);
ZEND_INIT_SYMTABLE(&symbol_table);
ZEND_SET_SYMBOL(&symbol_table, "that", old_obj);
call_user_function_ex(NULL, &new_obj, clone_func_name, &retval_ptr, 0, NULL, 0, &symbol_table TSRMLS_CC);
zend_hash_destroy(&symbol_table);
zval_ptr_dtor(&new_obj);
zval_ptr_dtor(&clone_func_name);
zval_ptr_dtor(&retval_ptr);
} else {
ALLOC_HASHTABLE(new_object->properties);
zend_hash_init(new_object->properties, 0, NULL, ZVAL_PTR_DTOR, 0);
zend_hash_copy(new_object->properties, old_object->properties, (copy_ctor_func_t) zval_add_ref, (void *) NULL /* Not used anymore */, sizeof(zval *));
}
return retval;
}
-10
View File
@@ -1,10 +0,0 @@
#ifndef ZEND_OBJECTS_H
#define ZEND_OBJECTS_H
#include "zend.h"
ZEND_API zend_object_value zend_objects_new(zend_object **object, zend_class_entry *class_type);
ZEND_API zend_object *zend_objects_get_address(zval *object);
ZEND_API zend_object_value zend_objects_clone_obj(zval *object TSRMLS_DC);
#endif /* ZEND_OBJECTS_H */
-263
View File
@@ -1,263 +0,0 @@
#include "zend.h"
#include "zend_globals.h"
#include "zend_variables.h"
#include "zend_API.h"
#include "zend_objects_API.h"
#define ZEND_DEBUG_OBJECTS 0
ZEND_API void zend_objects_store_init(zend_objects_store *objects, zend_uint init_size)
{
objects->object_buckets = (zend_object_store_bucket *) emalloc(init_size * sizeof(zend_object_store_bucket));
objects->top = 1; /* Skip 0 so that handles are true */
objects->size = init_size;
objects->free_list_head = -1;
}
ZEND_API void zend_objects_store_destroy(zend_objects_store *objects)
{
efree(objects->object_buckets);
}
ZEND_API void zend_objects_store_call_destructors(zend_objects_store *objects TSRMLS_DC)
{
zend_uint i = 1;
for (i = 1; i < objects->top ; i++) {
if (objects->object_buckets[i].valid) {
struct _store_object *obj = &objects->object_buckets[i].bucket.obj;
if (obj->dtor) {
objects->object_buckets[i].destructor_called = 1;
obj->dtor(obj->object, i TSRMLS_CC);
}
objects->object_buckets[i].valid = 0;
}
}
}
/* Store objects API */
ZEND_API zend_object_handle zend_objects_store_put(void *object, zend_objects_store_dtor_t dtor, zend_objects_store_clone_t clone TSRMLS_DC)
{
zend_object_handle handle;
struct _store_object *obj;
if (EG(objects_store).free_list_head != -1) {
handle = EG(objects_store).free_list_head;
EG(objects_store).free_list_head = EG(objects_store).object_buckets[handle].bucket.free_list.next;
} else {
if (EG(objects_store).top == EG(objects_store).size) {
EG(objects_store).size <<= 1;
EG(objects_store).object_buckets = (zend_object_store_bucket *) erealloc(EG(objects_store).object_buckets, EG(objects_store).size * sizeof(zend_object_store_bucket));
}
handle = EG(objects_store).top++;
}
obj = &EG(objects_store).object_buckets[handle].bucket.obj;
EG(objects_store).object_buckets[handle].valid = 1;
EG(objects_store).object_buckets[handle].destructor_called = 0;
obj->refcount = 1;
obj->object = object;
obj->dtor = dtor;
obj->clone = clone;
#if ZEND_DEBUG_OBJECTS
fprintf(stderr, "Allocated object id #%d\n", handle);
#endif
return handle;
}
ZEND_API void zend_objects_store_add_ref(zval *object TSRMLS_DC)
{
zend_object_handle handle = Z_OBJ_HANDLE_P(object);
if (!EG(objects_store).object_buckets[handle].valid) {
zend_error(E_ERROR, "Trying to add reference to invalid object");
}
EG(objects_store).object_buckets[handle].bucket.obj.refcount++;
#if ZEND_DEBUG_OBJECTS
fprintf(stderr, "Increased refcount of object id #%d\n", handle);
#endif
}
ZEND_API void zend_objects_store_delete_obj(zval *zobject TSRMLS_DC)
{
zend_object_handle handle = Z_OBJ_HANDLE_P(zobject);
struct _store_object *obj = &EG(objects_store).object_buckets[handle].bucket.obj;
if (!EG(objects_store).object_buckets[handle].valid) {
zend_error(E_ERROR, "Trying to delete invalid object");
}
if (obj->dtor && !EG(objects_store).object_buckets[handle].destructor_called) {
EG(objects_store).object_buckets[handle].destructor_called = 1;
obj->dtor(obj->object, handle TSRMLS_CC);
}
EG(objects_store).object_buckets[handle].valid = 0;
#if ZEND_DEBUG_OBJECTS
fprintf(stderr, "Deleted object id #%d\n", handle);
#endif
}
#define ZEND_OBJECTS_STORE_ADD_TO_FREE_LIST() \
EG(objects_store).object_buckets[handle].bucket.free_list.next = EG(objects_store).free_list_head; \
EG(objects_store).free_list_head = handle; \
EG(objects_store).object_buckets[handle].valid = 0;
ZEND_API void zend_objects_store_del_ref(zval *zobject TSRMLS_DC)
{
zend_object_handle handle = Z_OBJ_HANDLE_P(zobject);
struct _store_object *obj = &EG(objects_store).object_buckets[handle].bucket.obj;
if (--obj->refcount == 0) {
if (EG(objects_store).object_buckets[handle].valid) {
if (!EG(objects_store).object_buckets[handle].destructor_called) {
EG(objects_store).object_buckets[handle].destructor_called = 1;
if (obj->dtor) {
obj->dtor(obj->object, handle TSRMLS_CC);
}
EG(objects_store).object_buckets[handle].valid = 0;
if (obj->refcount == 0) {
ZEND_OBJECTS_STORE_ADD_TO_FREE_LIST();
}
}
}
#if ZEND_DEBUG_OBJECTS
fprintf(stderr, "Deallocated object id #%d\n", handle);
#endif
}
#if ZEND_DEBUG_OBJECTS
else {
fprintf(stderr, "Decreased refcount of object id #%d\n", handle);
}
#endif
}
ZEND_API zend_object_value zend_objects_store_clone_obj(zval *zobject TSRMLS_DC)
{
zend_object_value retval;
void *new_object;
struct _store_object *obj;
zend_object_handle handle = Z_OBJ_HANDLE_P(zobject);
if (!EG(objects_store).object_buckets[handle].valid) {
zend_error(E_ERROR, "Trying to clone invalid object");
}
obj = &EG(objects_store).object_buckets[handle].bucket.obj;
if (obj->clone == NULL) {
zend_error(E_ERROR, "Trying to clone uncloneable object");
}
obj->clone(&obj->object, &new_object TSRMLS_CC);
retval.handle = zend_objects_store_put(new_object, obj->dtor, obj->clone TSRMLS_CC);
retval.handlers = Z_OBJ_HT_P(zobject);
return retval;
}
ZEND_API void *zend_object_store_get_object(zval *zobject TSRMLS_DC)
{
zend_object_handle handle = Z_OBJ_HANDLE_P(zobject);
if (!EG(objects_store).object_buckets[handle].valid) {
zend_error(E_ERROR, "Trying to access invalid object");
return NULL;
}
return EG(objects_store).object_buckets[handle].bucket.obj.object;
}
/* Proxy objects workings */
typedef struct _zend_proxy_object {
zval *object;
zval *property;
} zend_proxy_object;
static zend_object_handlers zend_object_proxy_handlers;
ZEND_API void zend_objects_proxy_dtor(zend_proxy_object *object, zend_object_handle handle TSRMLS_DC)
{
zval_ptr_dtor(&object->object);
zval_ptr_dtor(&object->property);
efree(object);
}
ZEND_API void zend_objects_proxy_clone(zend_proxy_object *object, zend_proxy_object **object_clone TSRMLS_DC)
{
*object_clone = emalloc(sizeof(zend_proxy_object));
(*object_clone)->object = object->object;
(*object_clone)->property = object->property;
zval_add_ref(&(*object_clone)->property);
zval_add_ref(&(*object_clone)->object);
}
ZEND_API zval **zend_object_create_proxy(zval *object, zval *member TSRMLS_DC)
{
zend_proxy_object *pobj = emalloc(sizeof(zend_proxy_object));
zval *retval, **pretval;
pobj->object = object;
pobj->property = member;
zval_add_ref(&pobj->property);
zval_add_ref(&pobj->object);
MAKE_STD_ZVAL(retval);
retval->type = IS_OBJECT;
Z_OBJ_HANDLE_P(retval) = zend_objects_store_put(pobj, (zend_objects_store_dtor_t)zend_objects_proxy_dtor, (zend_objects_store_clone_t)zend_objects_proxy_clone TSRMLS_CC);
Z_OBJ_HT_P(retval) = &zend_object_proxy_handlers;
pretval = emalloc(sizeof(zval *));
*pretval = retval;
return pretval;
}
ZEND_API void zend_object_proxy_set(zval **property, zval *value TSRMLS_DC)
{
zend_proxy_object *probj = zend_object_store_get_object(*property TSRMLS_CC);
if (Z_OBJ_HT_P(probj->object) && Z_OBJ_HT_P(probj->object)->write_property) {
Z_OBJ_HT_P(probj->object)->write_property(probj->object, probj->property, value TSRMLS_CC);
} else {
zend_error(E_WARNING, "Cannot write property of object - no write handler defined");
}
}
ZEND_API zval* zend_object_proxy_get(zval *property TSRMLS_DC)
{
zend_proxy_object *probj = zend_object_store_get_object(property TSRMLS_CC);
if (Z_OBJ_HT_P(probj->object) && Z_OBJ_HT_P(probj->object)->read_property) {
return Z_OBJ_HT_P(probj->object)->read_property(probj->object, probj->property, BP_VAR_R TSRMLS_CC);
} else {
zend_error(E_WARNING, "Cannot read property of object - no read handler defined");
}
return NULL;
}
static zend_object_handlers zend_object_proxy_handlers = {
ZEND_OBJECTS_STORE_HANDLERS,
NULL, /* read_property */
NULL, /* write_property */
NULL, /* get_property_ptr */
NULL, /* get_property_zval_ptr */
zend_object_proxy_get, /* get */
zend_object_proxy_set, /* set */
NULL, /* has_property */
NULL, /* unset_property */
NULL, /* get_properties */
NULL, /* get_method */
NULL, /* call_method */
NULL, /* get_constructor */
NULL, /* get_class_entry */
NULL, /* get_class_name */
NULL /* compare_objects */
};
-49
View File
@@ -1,49 +0,0 @@
#ifndef ZEND_OBJECTS_API_H
#define ZEND_OBJECTS_API_H
#include "zend.h"
typedef void (*zend_objects_store_dtor_t)(void *object, zend_object_handle handle TSRMLS_DC);
typedef void (*zend_objects_store_clone_t)(void *object, void **object_clone TSRMLS_DC);
typedef struct _zend_object_store_bucket {
zend_bool destructor_called;
zend_bool valid;
union _store_bucket {
struct _store_object {
void *object;
zend_objects_store_dtor_t dtor;
zend_objects_store_clone_t clone;
zend_uint refcount;
} obj;
struct {
int next;
} free_list;
} bucket;
} zend_object_store_bucket;
typedef struct _zend_objects_store {
zend_object_store_bucket *object_buckets;
zend_uint top;
zend_uint size;
int free_list_head;
} zend_objects_store;
/* Global store handling functions */
ZEND_API void zend_objects_store_init(zend_objects_store *objects, zend_uint init_size);
ZEND_API void zend_objects_store_call_destructors(zend_objects_store *objects TSRMLS_DC);
ZEND_API void zend_objects_store_destroy(zend_objects_store *objects);
/* Store API functions */
ZEND_API zend_object_handle zend_objects_store_put(void *object, zend_objects_store_dtor_t dtor, zend_objects_store_clone_t clone TSRMLS_DC);
ZEND_API void zend_objects_store_add_ref(zval *object TSRMLS_DC);
ZEND_API void zend_objects_store_del_ref(zval *object TSRMLS_DC);
ZEND_API void zend_objects_store_delete_obj(zval *object TSRMLS_DC);
ZEND_API zend_object_value zend_objects_store_clone_obj(zval *object TSRMLS_DC);
ZEND_API void *zend_object_store_get_object(zval *object TSRMLS_DC);
#define ZEND_OBJECTS_STORE_HANDLERS zend_objects_store_add_ref, zend_objects_store_del_ref, zend_objects_store_delete_obj, zend_objects_store_clone_obj
ZEND_API zval **zend_object_create_proxy(zval *object, zval *member TSRMLS_DC);
#endif /* ZEND_OBJECTS_H */
-425
View File
@@ -1,425 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include <stdio.h>
#include "zend.h"
#include "zend_alloc.h"
#include "zend_compile.h"
#include "zend_extensions.h"
#include "zend_API.h"
static void zend_extension_op_array_ctor_handler(zend_extension *extension, zend_op_array *op_array TSRMLS_DC)
{
if (extension->op_array_ctor) {
extension->op_array_ctor(op_array);
}
}
static void zend_extension_op_array_dtor_handler(zend_extension *extension, zend_op_array *op_array TSRMLS_DC)
{
if (extension->op_array_dtor) {
extension->op_array_dtor(op_array);
}
}
static void op_array_alloc_ops(zend_op_array *op_array)
{
op_array->opcodes = erealloc(op_array->opcodes, (op_array->size)*sizeof(zend_op));
}
void init_op_array(zend_op_array *op_array, zend_uchar type, int initial_ops_size TSRMLS_DC)
{
op_array->type = type;
op_array->backpatch_count = 0;
if (CG(interactive)) {
/* We must avoid a realloc() on the op_array in interactive mode, since pointers to constants
* will become invalid
*/
initial_ops_size = 8192;
}
op_array->refcount = (zend_uint *) emalloc(sizeof(zend_uint));
*op_array->refcount = 1;
op_array->size = initial_ops_size;
op_array->last = 0;
op_array->opcodes = NULL;
op_array_alloc_ops(op_array);
op_array->T = 0;
op_array->function_name = NULL;
op_array->filename = zend_get_compiled_filename(TSRMLS_C);
op_array->arg_types = NULL;
op_array->scope = NULL;
op_array->brk_cont_array = NULL;
op_array->last_brk_cont = 0;
op_array->current_brk_cont = -1;
op_array->static_variables = NULL;
op_array->return_reference = 0;
op_array->done_pass_two = 0;
op_array->uses_this = 0;
op_array->start_op = NULL;
zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_op_array_ctor_handler, op_array TSRMLS_CC);
}
ZEND_API void destroy_zend_function(zend_function *function)
{
switch (function->type) {
case ZEND_USER_FUNCTION:
destroy_op_array((zend_op_array *) function);
break;
case ZEND_INTERNAL_FUNCTION:
/* do nothing */
break;
}
}
ZEND_API void destroy_zend_class(zend_class_entry **pce)
{
zend_class_entry *ce = *pce;
if (--ce->refcount > 0) {
return;
}
switch (ce->type) {
case ZEND_USER_CLASS:
zend_hash_destroy(&ce->default_properties);
zend_hash_destroy(&ce->private_properties);
zend_hash_destroy(&ce->protected_properties);
zend_hash_destroy(ce->static_members);
efree(ce->name);
zend_hash_destroy(&ce->function_table);
FREE_HASHTABLE(ce->static_members);
zend_hash_destroy(&ce->constants_table);
zend_hash_destroy(&ce->class_table);
efree(ce);
break;
case ZEND_INTERNAL_CLASS:
zend_hash_destroy(&ce->default_properties);
zend_hash_destroy(&ce->private_properties);
zend_hash_destroy(&ce->protected_properties);
zend_hash_destroy(ce->static_members);
free(ce->name);
zend_hash_destroy(&ce->function_table);
free(ce->static_members);
zend_hash_destroy(&ce->constants_table);
zend_hash_destroy(&ce->class_table);
free(ce);
break;
}
}
void zend_class_add_ref(zend_class_entry **ce)
{
(*ce)->refcount++;
}
ZEND_API void destroy_op_array(zend_op_array *op_array)
{
zend_op *opline = op_array->opcodes;
zend_op *end = op_array->opcodes+op_array->last;
TSRMLS_FETCH();
if (op_array->static_variables) {
zend_hash_destroy(op_array->static_variables);
FREE_HASHTABLE(op_array->static_variables);
}
if (--(*op_array->refcount)>0) {
return;
}
efree(op_array->refcount);
while (opline<end) {
if (opline->op1.op_type==IS_CONST) {
#if DEBUG_ZEND>2
printf("Reducing refcount for %x 1=>0 (destroying)\n", &opline->op1.u.constant);
#endif
zval_dtor(&opline->op1.u.constant);
}
if (opline->op2.op_type==IS_CONST) {
#if DEBUG_ZEND>2
printf("Reducing refcount for %x 1=>0 (destroying)\n", &opline->op2.u.constant);
#endif
zval_dtor(&opline->op2.u.constant);
}
opline++;
}
efree(op_array->opcodes);
if (op_array->function_name) {
efree(op_array->function_name);
}
if (op_array->arg_types) {
efree(op_array->arg_types);
}
if (op_array->brk_cont_array) {
efree(op_array->brk_cont_array);
}
if (op_array->done_pass_two) {
zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_op_array_dtor_handler, op_array TSRMLS_CC);
}
}
void init_op(zend_op *op TSRMLS_DC)
{
memset(&op->result, 0, sizeof(znode));
op->lineno = CG(zend_lineno);
SET_UNUSED(op->result);
op->extended_value = 0;
memset(&op->op1, 0, sizeof(znode));
memset(&op->op2, 0, sizeof(znode));
}
zend_op *get_next_op(zend_op_array *op_array TSRMLS_DC)
{
zend_uint next_op_num = op_array->last++;
zend_op *next_op;
if (next_op_num >= op_array->size) {
if (CG(interactive)) {
/* we messed up */
zend_printf("Ran out of opcode space!\n"
"You should probably consider writing this huge script into a file!\n");
zend_bailout();
}
op_array->size *= 4;
op_array_alloc_ops(op_array);
}
next_op = &(op_array->opcodes[next_op_num]);
init_op(next_op TSRMLS_CC);
return next_op;
}
int get_next_op_number(zend_op_array *op_array)
{
return op_array->last;
}
zend_brk_cont_element *get_next_brk_cont_element(zend_op_array *op_array)
{
op_array->last_brk_cont++;
op_array->brk_cont_array = erealloc(op_array->brk_cont_array, sizeof(zend_brk_cont_element)*op_array->last_brk_cont);
return &op_array->brk_cont_array[op_array->last_brk_cont-1];
}
static void zend_update_extended_info(zend_op_array *op_array TSRMLS_DC)
{
zend_op *opline = op_array->opcodes, *end=opline+op_array->last;
while (opline<end) {
if (opline->opcode == ZEND_EXT_STMT) {
if (opline+1<end) {
if ((opline+1)->opcode == ZEND_EXT_STMT) {
opline->opcode = ZEND_NOP;
opline++;
continue;
}
if (opline+1<end) {
opline->lineno = (opline+1)->lineno;
}
} else {
opline->opcode = ZEND_NOP;
}
}
opline++;
}
}
static void zend_extension_op_array_handler(zend_extension *extension, zend_op_array *op_array TSRMLS_DC)
{
if (extension->op_array_handler) {
extension->op_array_handler(op_array);
}
}
int pass_two(zend_op_array *op_array TSRMLS_DC)
{
zend_op *opline, *end;
if (op_array->type!=ZEND_USER_FUNCTION && op_array->type!=ZEND_EVAL_CODE) {
return 0;
}
if (CG(extended_info)) {
zend_update_extended_info(op_array TSRMLS_CC);
}
if (CG(handle_op_arrays)) {
zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_op_array_handler, op_array TSRMLS_CC);
}
op_array->opcodes = (zend_op *) erealloc(op_array->opcodes, sizeof(zend_op)*op_array->last);
op_array->size = op_array->last;
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) {
opline->op2.u.constant.is_ref = 1;
opline->op2.u.constant.refcount = 2;
}
switch (opline->opcode) {
case ZEND_JMP:
opline->op1.u.jmp_addr = &op_array->opcodes[opline->op1.u.opline_num];
break;
case ZEND_JMPZ:
case ZEND_JMPNZ:
case ZEND_JMPZ_EX:
case ZEND_JMPNZ_EX:
opline->op2.u.jmp_addr = &op_array->opcodes[opline->op2.u.opline_num];
break;
}
opline->handler = zend_opcode_handlers[opline->opcode];
opline++;
}
op_array->done_pass_two = 1;
return 0;
}
int print_class(zend_class_entry *class_entry TSRMLS_DC)
{
printf("Class %s:\n", class_entry->name);
zend_hash_apply(&class_entry->function_table, (apply_func_t) pass_two TSRMLS_CC);
printf("End of class %s.\n\n", class_entry->name);
return 0;
}
ZEND_API unary_op_type get_unary_op(int opcode)
{
switch(opcode) {
case ZEND_BW_NOT:
return (unary_op_type) bitwise_not_function;
break;
case ZEND_BOOL_NOT:
return (unary_op_type) boolean_not_function;
break;
default:
return (unary_op_type) NULL;
break;
}
}
ZEND_API void *get_binary_op(int opcode)
{
switch (opcode) {
case ZEND_ADD:
case ZEND_ASSIGN_ADD:
return (void *) add_function;
break;
case ZEND_SUB:
case ZEND_ASSIGN_SUB:
return (void *) sub_function;
break;
case ZEND_MUL:
case ZEND_ASSIGN_MUL:
return (void *) mul_function;
break;
case ZEND_DIV:
case ZEND_ASSIGN_DIV:
return (void *) div_function;
break;
case ZEND_MOD:
case ZEND_ASSIGN_MOD:
return (void *) mod_function;
break;
case ZEND_SL:
case ZEND_ASSIGN_SL:
return (void *) shift_left_function;
break;
case ZEND_SR:
case ZEND_ASSIGN_SR:
return (void *) shift_right_function;
break;
case ZEND_CONCAT:
case ZEND_ASSIGN_CONCAT:
return (void *) concat_function;
break;
case ZEND_IS_IDENTICAL:
return (void *) is_identical_function;
break;
case ZEND_IS_NOT_IDENTICAL:
return (void *) is_not_identical_function;
break;
case ZEND_IS_EQUAL:
return (void *) is_equal_function;
break;
case ZEND_IS_NOT_EQUAL:
return (void *) is_not_equal_function;
break;
case ZEND_IS_SMALLER:
return (void *) is_smaller_function;
break;
case ZEND_IS_SMALLER_OR_EQUAL:
return (void *) is_smaller_or_equal_function;
break;
case ZEND_BW_OR:
case ZEND_ASSIGN_BW_OR:
return (void *) bitwise_or_function;
break;
case ZEND_BW_AND:
case ZEND_ASSIGN_BW_AND:
return (void *) bitwise_and_function;
break;
case ZEND_BW_XOR:
case ZEND_ASSIGN_BW_XOR:
return (void *) bitwise_xor_function;
break;
default:
return (void *) NULL;
break;
}
}
File diff suppressed because it is too large. Load diff
-276
View File
@@ -1,276 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_OPERATORS_H
#define ZEND_OPERATORS_H
#include <errno.h>
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
#if 0&&WITH_BCMATH
#include "ext/bcmath/libbcmath/src/bcmath.h"
#endif
#define MAX_LENGTH_OF_LONG 18
#define MAX_LENGTH_OF_DOUBLE 32
ZEND_API int add_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
ZEND_API int sub_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
ZEND_API int mul_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
ZEND_API int div_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
ZEND_API int mod_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
ZEND_API int boolean_xor_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
ZEND_API int boolean_not_function(zval *result, zval *op1 TSRMLS_DC);
ZEND_API int bitwise_not_function(zval *result, zval *op1 TSRMLS_DC);
ZEND_API int bitwise_or_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
ZEND_API int bitwise_and_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
ZEND_API int bitwise_xor_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
ZEND_API int shift_left_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
ZEND_API int shift_right_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
ZEND_API int concat_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
ZEND_API int is_equal_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
ZEND_API int is_identical_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
ZEND_API int is_not_identical_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
ZEND_API int is_not_equal_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
ZEND_API int is_smaller_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
ZEND_API int is_smaller_or_equal_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
ZEND_API int is_class_function(zval *result, zval *op1, zend_class_entry *ce TSRMLS_DC);
static inline zend_bool is_numeric_string(char *str, int length, long *lval, double *dval, zend_bool allow_errors)
{
long local_lval;
double local_dval;
char *end_ptr_long, *end_ptr_double;
int conv_base=10;
if (!length) {
return 0;
}
/* handle hex numbers */
if (length>=2 && str[0]=='0' && (str[1]=='x' || str[1]=='X')) {
conv_base=16;
}
errno=0;
local_lval = strtol(str, &end_ptr_long, conv_base);
if (errno!=ERANGE) {
if (end_ptr_long == str+length) { /* integer string */
if (lval) {
*lval = local_lval;
}
return IS_LONG;
}
} else {
end_ptr_long=NULL;
}
if (conv_base==16) { /* hex string, under UNIX strtod() messes it up */
return 0;
}
errno=0;
local_dval = strtod(str, &end_ptr_double);
if (errno!=ERANGE) {
if (end_ptr_double == str+length) { /* floating point string */
if (! zend_finite(local_dval)) {
/* "inf","nan" and maybe other weird ones */
return 0;
}
if (dval) {
*dval = local_dval;
}
#if 0&&WITH_BCMATH
if (length>16) {
register char *ptr=str, *end=str+length;
while (ptr<end) {
switch(*ptr++) {
case 'e':
case 'E':
/* scientific notation, not handled by the BC library */
return IS_DOUBLE;
break;
default:
break;
}
}
return FLAG_IS_BC;
} else {
return IS_DOUBLE;
}
#else
return IS_DOUBLE;
#endif
}
} else {
end_ptr_double=NULL;
}
if (allow_errors) {
if (end_ptr_double>end_ptr_long && dval) {
*dval = local_dval;
return IS_DOUBLE;
} else if (end_ptr_long && lval) {
*lval = local_lval;
return IS_LONG;
}
}
return 0;
}
ZEND_API int increment_function(zval *op1);
ZEND_API int decrement_function(zval *op2);
BEGIN_EXTERN_C()
ZEND_API void convert_scalar_to_number(zval *op TSRMLS_DC);
ZEND_API void _convert_to_string(zval *op ZEND_FILE_LINE_DC);
ZEND_API void convert_to_long(zval *op);
ZEND_API void convert_to_double(zval *op);
ZEND_API void convert_to_long_base(zval *op, int base);
ZEND_API void convert_to_null(zval *op);
ZEND_API void convert_to_boolean(zval *op);
ZEND_API void convert_to_array(zval *op);
ZEND_API void convert_to_object(zval *op);
ZEND_API void multi_convert_to_long_ex(int argc, ...);
ZEND_API void multi_convert_to_double_ex(int argc, ...);
ZEND_API void multi_convert_to_string_ex(int argc, ...);
ZEND_API int add_char_to_string(zval *result, zval *op1, zval *op2);
ZEND_API int add_string_to_string(zval *result, zval *op1, zval *op2);
#define convert_to_string(op) _convert_to_string((op) ZEND_FILE_LINE_CC)
ZEND_API double zend_string_to_double(const char *number, zend_uint length);
END_EXTERN_C()
ZEND_API int zval_is_true(zval *op);
ZEND_API int compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
ZEND_API int numeric_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
ZEND_API int string_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
ZEND_API void zend_str_tolower(char *str, unsigned int length);
ZEND_API int zend_binary_zval_strcmp(zval *s1, zval *s2);
ZEND_API int zend_binary_zval_strncmp(zval *s1, zval *s2, zval *s3);
ZEND_API int zend_binary_zval_strcasecmp(zval *s1, zval *s2);
ZEND_API int zend_binary_zval_strncasecmp(zval *s1, zval *s2, zval *s3);
ZEND_API int zend_binary_strcmp(char *s1, uint len1, char *s2, uint len2);
ZEND_API int zend_binary_strncmp(char *s1, uint len1, char *s2, uint len2, uint length);
ZEND_API int zend_binary_strcasecmp(char *s1, uint len1, char *s2, uint len2);
ZEND_API int zend_binary_strncasecmp(char *s1, uint len1, char *s2, uint len2, uint length);
ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2);
ZEND_API void zend_compare_symbol_tables(zval *result, HashTable *ht1, HashTable *ht2 TSRMLS_DC);
ZEND_API void zend_compare_arrays(zval *result, zval *a1, zval *a2 TSRMLS_DC);
ZEND_API void zend_compare_objects(zval *result, zval *o1, zval *o2 TSRMLS_DC);
ZEND_API int zend_atoi(const char *str, int str_len);
ZEND_API void zend_locale_sprintf_double(zval *op ZEND_FILE_LINE_DC);
#define convert_to_ex_master(ppzv, lower_type, upper_type) \
if ((*ppzv)->type!=IS_##upper_type) { \
if (!(*ppzv)->is_ref) { \
SEPARATE_ZVAL(ppzv); \
} \
convert_to_##lower_type(*ppzv); \
}
#define convert_to_writable_ex_master(ppzv, lower_type, upper_type) \
if ((*ppzv)->type!=IS_##upper_type) { \
SEPARATE_ZVAL(ppzv); \
convert_to_##lower_type(*ppzv); \
}
#define convert_to_boolean_ex(ppzv) convert_to_ex_master(ppzv, boolean, BOOL)
#define convert_to_long_ex(ppzv) convert_to_ex_master(ppzv, long, LONG)
#define convert_to_double_ex(ppzv) convert_to_ex_master(ppzv, double, DOUBLE)
#define convert_to_string_ex(ppzv) convert_to_ex_master(ppzv, string, STRING)
#define convert_to_array_ex(ppzv) convert_to_ex_master(ppzv, array, ARRAY)
#define convert_to_object_ex(ppzv) convert_to_ex_master(ppzv, object, OBJECT)
#define convert_to_null_ex(ppzv) convert_to_ex_master(ppzv, null, NULL)
#define convert_to_writable_boolean_ex(ppzv) convert_to_writable_ex_master(ppzv, boolean, BOOL)
#define convert_to_writable_long_ex(ppzv) convert_to_writable_ex_master(ppzv, long, LONG)
#define convert_to_writable_double_ex(ppzv) convert_to_writable_ex_master(ppzv, double, DOUBLE)
#define convert_to_writable_string_ex(ppzv) convert_to_writable_ex_master(ppzv, string, STRING)
#define convert_to_writable_array_ex(ppzv) convert_to_writable_ex_master(ppzv, array, ARRAY)
#define convert_to_writable_object_ex(ppzv) convert_to_writable_ex_master(ppzv, object, OBJECT)
#define convert_to_writable_null_ex(ppzv) convert_to_writable_ex_master(ppzv, null, NULL)
#define convert_scalar_to_number_ex(ppzv) \
if ((*ppzv)->type!=IS_LONG && (*ppzv)->type!=IS_DOUBLE) { \
if (!(*ppzv)->is_ref) { \
SEPARATE_ZVAL(ppzv); \
} \
convert_scalar_to_number(*ppzv TSRMLS_CC); \
}
#define Z_LVAL(zval) (zval).value.lval
#define Z_BVAL(zval) ((zend_bool)(zval).value.lval)
#define Z_DVAL(zval) (zval).value.dval
#define Z_STRVAL(zval) (zval).value.str.val
#define Z_STRLEN(zval) (zval).value.str.len
#define Z_ARRVAL(zval) (zval).value.ht
#define Z_OBJ_HANDLE(zval) (zval).value.obj.handle
#define Z_OBJ_HT(zval) (zval).value.obj.handlers
#define Z_OBJ(zval) zend_objects_get_address(&(zval))
#define Z_OBJCE(zval) zend_get_class_entry(&(zval))
#define Z_OBJPROP(zval) Z_OBJ(zval)->properties
#define Z_RESVAL(zval) (zval).value.lval
#define Z_LVAL_P(zval_p) Z_LVAL(*zval_p)
#define Z_BVAL_P(zval_p) Z_BVAL(*zval_p)
#define Z_DVAL_P(zval_p) Z_DVAL(*zval_p)
#define Z_STRVAL_P(zval_p) Z_STRVAL(*zval_p)
#define Z_STRLEN_P(zval_p) Z_STRLEN(*zval_p)
#define Z_ARRVAL_P(zval_p) Z_ARRVAL(*zval_p)
#define Z_OBJ_P(zval_p) Z_OBJ(*zval_p)
#define Z_OBJPROP_P(zval_p) Z_OBJPROP(*zval_p)
#define Z_OBJCE_P(zval_p) Z_OBJCE(*zval_p)
#define Z_RESVAL_P(zval_p) Z_RESVAL(*zval_p)
#define Z_OBJ_HANDLE_P(zval_p) Z_OBJ_HANDLE(*zval_p)
#define Z_OBJ_HT_P(zval_p) Z_OBJ_HT(*zval_p)
#define Z_LVAL_PP(zval_pp) Z_LVAL(**zval_pp)
#define Z_BVAL_PP(zval_pp) Z_BVAL(**zval_pp)
#define Z_DVAL_PP(zval_pp) Z_DVAL(**zval_pp)
#define Z_STRVAL_PP(zval_pp) Z_STRVAL(**zval_pp)
#define Z_STRLEN_PP(zval_pp) Z_STRLEN(**zval_pp)
#define Z_ARRVAL_PP(zval_pp) Z_ARRVAL(**zval_pp)
#define Z_OBJ_PP(zval_pp) Z_OBJ(**zval_pp)
#define Z_OBJPROP_PP(zval_pp) Z_OBJPROP(**zval_pp)
#define Z_OBJCE_PP(zval_pp) Z_OBJCE(**zval_pp)
#define Z_RESVAL_PP(zval_pp) Z_RESVAL(**zval_pp)
#define Z_OBJ_HANDLE_PP(zval_p) Z_OBJ_HANDLE(**zval_p)
#define Z_OBJ_HT_PP(zval_p) Z_OBJ_HT(**zval_p)
#define Z_TYPE(zval) (zval).type
#define Z_TYPE_P(zval_p) Z_TYPE(*zval_p)
#define Z_TYPE_PP(zval_pp) Z_TYPE(**zval_pp)
#endif
Loaded 100 of 1776 files, more files were not shown because too many files have changed in this diff. Show more