Compare commits

...
Author SHA1 Message Date
SVN Migration 344949dc96 This commit was manufactured by cvs2svn to create tag
'PHP_5_0_dev_before_13561_fix'.
2003-01-28 10:04:18 +00:00
Melvyn Sopacua ac3dc9d95e Fix parse error and edink's fear of bison errors 2003-01-28 10:04:17 +00:00
Zeev Suraski 6155a1fa24 Allow methods in parent classes to call protected methods in derived
classes
2003-01-28 09:44:18 +00:00
foobar 68ffe71a12 fix some typos 2003-01-28 06:56:32 +00:00
foobar c96fe825b8 fix typo 2003-01-28 06:52:09 +00:00
Marcus Boerger 1ab64d2b96 - fix this: els is optional but may not be empty 2003-01-28 06:27:01 +00:00
Frank M. Kromann 0e38fedcd7 Fix the setting of computer name and processor type for php_uname() on Win32 2003-01-28 05:02:12 +00:00
foobar 9a0f98869c - Removed unnecessary makedist.ZendEngine2
- Modified makedist to use php5 CVS module (alias)
2003-01-28 02:49:35 +00:00
Ilia Alshanetsky 2d0f432490 Added scandir() function, which allows quick retrieval of all files &
directories within the specified path and sort the output in alphabetical
or reverse alphabetical order.
2003-01-28 01:48:57 +00:00
38a3f33625 NEWS update 2003-01-28 01:34:15 +00:00
90f9f62665 ChangeLog update 2003-01-28 01:33:49 +00:00
Ilia Alshanetsky d92a1f4dc1 Fixed win32 build (bug #21506).
Fixed a bug that would cause garbage data to appear at the end of the
loaded apache modules list in phpinfo().
2003-01-28 01:25:34 +00:00
foobar 946032f40b - Cleaned up and made less error-prone
- Changed --enable-mime-magic -> --with-mime-magic[=FILE] to allow
  specifying of the file during configure.
2003-01-28 01:00:15 +00:00
Ilia Alshanetsky b9a7918c43 2nd part of Sebastian's patch. 2003-01-28 00:42:54 +00:00
Edin Kadribasic 7c283f80be Adding new files to the project.
# First half of Sebastian's patch, Ilia will commit the second part shortly
2003-01-28 00:32:15 +00:00
Marcus Boerger 2b5a5ca669 - fix "--without-flatfile"
- simplify Berkley DB verison check
2003-01-28 00:10:05 +00:00
Ilia Alshanetsky d59d500af7 Moved the scandir code into it's own files so that it can be used by other
OSes where libc does not have a native scandir() implementation.
2003-01-27 20:39:31 +00:00
Maxim Maletsky e4ec7372e9 This fixes "warning C4101: 'charsetid' : unreferenced local variable" on VC6 2003-01-27 20:05:48 +00:00
Maxim Maletsky 897a708c87 @- Fixed bug #17448 (Print the message when OCI_SUCCESS_WITH_INFO is returned).
(Maxim)
2003-01-27 19:52:11 +00:00
Sara Golemon d0cb097c52 Fix potential buffer overflow. 2003-01-27 19:51:50 +00:00
Ilia Alshanetsky 9bb3dc6903 Removed pointless checks. 2003-01-27 17:22:22 +00:00
Edin Kadribasic c7441b2379 Fixed bug #21597 (made glob() understand windows paths) 2003-01-27 16:29:47 +00:00
Stanislav Malyshev 3a4ace13b4 Replace MAKE_VAR opcode with special 'data' opcode
This opcode is not executeable but only holds data for opcodes
that need more than two arguments (presently only ASSIGN_OBJ and the ilk but
in the future also ASSIGN_DIM)
2003-01-27 15:13:01 +00:00
Uwe Steinmann c375b0b05c - fixed several bugs in hw_document_xx() functions. The macro to access
the document was the same as for a link to the sever.
2003-01-27 09:11:17 +00:00
Sara Golemon 761fa96412 Feature Request #21748. Added function ftp_chmod(). 2003-01-27 02:54:12 +00:00
e9833ff497 ChangeLog update 2003-01-27 01:31:58 +00:00
Moriyoshi Koizumi 6174d2b446 Updated test so it describes the problem more clearly. 2003-01-27 01:15:14 +00:00
Stig Bakken d250e7ba9d * whoops, heritage shows through :) 2003-01-26 23:54:19 +00:00
Sascha Schumann 0ceb4a93b2 Replace snprintf() call using zend_error's capabilities 2003-01-26 23:15:30 +00:00
Marcus Boerger 494bec466b Simplify 2003-01-26 17:17:44 +00:00
Sander Roobol e9d0a58cb0 Fix build 2003-01-26 09:13:31 +00:00
Shane Caraveo 33ad63ef8c normalize CGI variables to the CGI spec
PATH_INFO and PATH_TRANSLATED are correct now
SCRIPT_FILENAME now contains the full path to the script
2003-01-26 03:39:50 +00:00
Shane Caraveo 82f6cef483 Fix broken build by adding scandir and alphasort for win32 2003-01-26 01:39:18 +00:00
436ad07b98 ChangeLog update 2003-01-26 01:32:24 +00:00
Sara Golemon 3ad9839f2f Feature Request #21784 Added: imagecolorallocatealpha (pollita@php.net,jasper@pointless.net) 2003-01-26 01:15:02 +00:00
Shane Caraveo 1a4c82e014 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:01:53 +00:00
Ilia Alshanetsky 8d352d2dd6 Fixed bug #21625 (When scanning a directory for ini files, do so in
alphabetical order. This gives a user a way to control the order in which
the ini files are loaded).
Fixed a bug that would make the code try to read files without an extension
as ini files.
2003-01-25 21:13:00 +00:00
Marcus Boerger 564788b6f5 The builtin version was always used even if configured otherwise. 2003-01-25 19:46:58 +00:00
Marcus Boerger a7d10f8aa4 Bug #21751: Part one never let this happen again... 2003-01-25 19:45:11 +00:00
Ilia Alshanetsky ef021e8964 Removed unneeded code. 2003-01-25 18:55:07 +00:00
Hartmut Holzgraefe 974ff24e80 - mime file parser messages only with mime_magic.debug=On (default: off)
- fix docref URL in startup error messages
- show status in php info, either "enabled" or "..., disabled"
2003-01-25 16:25:37 +00:00
Hartmut Holzgraefe 6a4a858294 preparations for making magic file parser silent 2003-01-25 13:33:29 +00:00
Hartmut Holzgraefe f95759b36a suggesting a plain magic file insteat of a mime one is a bad idea 2003-01-25 10:51:04 +00:00
32d7d07c0e ChangeLog update 2003-01-25 01:31:13 +00:00
Stig Bakken dd22d65e2f * not a real test, just a script for displaying OS_Guess output 2003-01-25 00:45:13 +00:00
Stig Bakken d19bd6f12c * add glibc version detection for Linux 2003-01-25 00:44:41 +00:00
Stig Bakken a46aac36ec * typo 2003-01-25 00:38:00 +00:00
Ilia Alshanetsky efae1b9ace Fixed a typo. 2003-01-25 00:25:32 +00:00
Ilia Alshanetsky 758ea308a9 Fixed compiler warning. 2003-01-25 00:23:03 +00:00
Sascha Schumann 330740f7cd Remove ugly netware hacks from the code 2003-01-24 23:57:32 +00:00
Ilia Alshanetsky e10f20924e Removed unnecessary checks. 2003-01-24 22:58:46 +00:00
Dan Kalowsky b48d709746 Patch for bug #21844 2003-01-24 22:40:38 +00:00
Ilia Alshanetsky 383171b11b Fixed bug #21533 (a rare condition where error can remain undefined and
result in undefined behavior when it is used without being initialized).
2003-01-24 19:23:53 +00:00
Ilia Alshanetsky 417ba55c1f Fixed bug #21865. 2003-01-24 19:15:54 +00:00
foobar 142da0ed58 Fix bug #21795, Undeclared statement in oci8.c (OCI_ATTR_STATEMENT) 2003-01-24 17:51:19 +00:00
Ilia Alshanetsky 6efe008598 Fixed compile warning. 2003-01-24 16:45:34 +00:00
Ilia Alshanetsky d2162b32b1 Fixed compile warning. 2003-01-24 16:39:49 +00:00
Ilia Alshanetsky f163a4d16b Fixed a memory leak.
zend_error -> php_error_docref.
2003-01-24 16:34:20 +00:00
Ilia Alshanetsky 38ad0e9104 zend_error -> php_error_docref. 2003-01-24 16:29:40 +00:00
Ilia Alshanetsky 95bfbfe1c1 Fixed compile warning. 2003-01-24 16:23:11 +00:00
Andrey Hristov 600fce5890 Resolving problem on OSF1 and probably other
64 bit platforms. Thanks for the feedback of Magnus (novell kiruna se).
2003-01-24 13:18:08 +00:00
Andrey Hristov 1d0214bee4 Adding cast. 2003-01-24 12:19:59 +00:00
foobar 4dfc7cc87c - Fixed stupid typo..
# I will test before commit, I will test before commit...
2003-01-24 10:12:55 +00:00
foobar e771bdb23d Fixed bug: #20857, snmpset() fails 2003-01-24 09:52:46 +00:00
foobar 45f1f1711d ws fixes 2003-01-24 09:40:53 +00:00
foobar 84e5fcb5de MFB, removed unused GET/POST entries 2003-01-24 05:56:55 +00:00
Ilia Alshanetsky 4fde1b8de1 zend_error() -> php_error_docref(). 2003-01-24 05:21:08 +00:00
d3319d1b07 ChangeLog update 2003-01-24 01:32:58 +00:00
Moriyoshi Koizumi ad86154d90 Added test case for bug21849.phpt 2003-01-23 23:22:23 +00:00
Sebastian Bergmann 459fb4f319 TODO for PHP 5. 2003-01-23 23:22:01 +00:00
Moriyoshi Koizumi cfbd0bb58a Really fixed the mb issue of mb_ereg_replace()
# my previous patch is somewhat wrong
2003-01-23 20:38:44 +00:00
Moriyoshi Koizumi 3e7b832895 Fixed a mb_ereg_replace() bug; the function was not completely multibyte-safe. 2003-01-23 20:07:39 +00:00
Moriyoshi Koizumi d4f59af5be Fixed typo 2003-01-23 19:31:02 +00:00
Moriyoshi Koizumi 4199484313 Changed the test's file name as per the convention 2003-01-23 19:28:39 +00:00
Moriyoshi Koizumi 8dfb2df649 Renamed the test name as per the convension 2003-01-23 19:21:51 +00:00
Moriyoshi Koizumi 6fc22aa5d9 Test name formatting 2003-01-23 19:07:25 +00:00
Moriyoshi Koizumi 7abc6e4338 Made the test's name more descriptive 2003-01-23 19:00:06 +00:00
Moriyoshi Koizumi 0344311bde Removed pointless checks 2003-01-23 18:48:43 +00:00
Moriyoshi Koizumi 24ae309037 Added test case for bug #21732 2003-01-23 18:22:55 +00:00
Zeev Suraski 76c93412d3 Let the scope propagate to internal functions 2003-01-23 16:40:30 +00:00
foobar e1c985d9a7 Fix bug: #21817 (only enable this if --with-kerberos is used) 2003-01-23 16:29:49 +00:00
Zeev Suraski cee6216c4f Fix .dsp 2003-01-23 09:35:02 +00:00
foobar 9b2525f96e remove this stupid highlight which causes trouble. 2003-01-23 06:42:43 +00:00
foobar 04eca7536c MFB 2003-01-23 06:23:08 +00:00
foobar 895a3a109f Correct default path 2003-01-23 05:33:11 +00:00
foobar 7a93625e4c Fixed bug: #14542, register_shutdown_function() timeout problem 2003-01-23 05:15:42 +00:00
foobar 80923f933d Added test for bug: #21513 2003-01-23 03:28:41 +00:00
ae55ffe7bf ChangeLog update 2003-01-23 01:33:39 +00:00
Ilia Alshanetsky 6bf2ce3429 Removed non-needed code. 2003-01-22 22:07:22 +00:00
Anil Madhavapeddy dea44dfc9a typo 2003-01-22 20:41:28 +00:00
Frank M. Kromann 66ee5dfac2 adding missing zlib.lib and path to bindlib 2003-01-22 20:13:11 +00:00
Ilia Alshanetsky d24148f3d0 Fixed a crash when invalid color is passed to imagepstext(). 2003-01-22 19:53:29 +00:00
Stanislav Malyshev d433a62ef4 some small refinements for get_class_* 2003-01-22 14:55:01 +00:00
Ilia Alshanetsky 72cd67b3ca Fixed bug #21814 (Allow booleans to be used as array keys). 2003-01-22 14:48:30 +00:00
d4d46ac352 ChangeLog update 2003-01-22 01:33:11 +00:00
Moriyoshi Koizumi 812a419019 Oops! wrong patch. Reverted. 2003-01-21 22:09:09 +00:00
Moriyoshi Koizumi ce5df6d949 Fixed mb_ereg_replace() bug (the function has ignored the default option) 2003-01-21 22:03:29 +00:00
Moriyoshi Koizumi da45161bd2 Added test case for bug #21800 2003-01-21 19:38:08 +00:00
Moriyoshi Koizumi 9a723fcb4e Fixed mb_ereg_search() segfault that occurs when the function is called
before a string to be searched is passed by mb_ereg_search_init()
2003-01-21 19:31:07 +00:00
Andrey Hristov bd55130077 increasing readability. 2003-01-21 17:37:59 +00:00
Ilia Alshanetsky dc150fd2ea getParameters -> zend_get_parameters_ex. 2003-01-21 15:27:39 +00:00
Ilia Alshanetsky 8a9e09a44a ARG_COUNT(ht) -> ZEND_NUM_ARGS(). 2003-01-21 14:56:40 +00:00
Stig Bakken 832545d97f * PEAR_Error now supports exceptions when using Zend Engine 2. Set the
error mode to PEAR_ERROR_EXCEPTION to make PEAR_Error throw itself
  as an exception (invoke PEAR errors with raiseError() or throwError()
  just like before).
2003-01-21 13:32:34 +00:00
Sascha Schumann 294e776d95 add sapi_get_target_uid/_gid for obtaining information about the
non-privileged user the web server is running as.  this is useful
for creating shared memory segments which need to be accessed by
the child processes/threads.
2003-01-21 11:03:58 +00:00
foobar 961c9856ef Fixed bug: #21698, httpd.conf not modified with "make install" 2003-01-21 06:02:19 +00:00
Edin Kadribasic ceb597ea1a Added missing warning about experimental nature of sapi/embed. 2003-01-21 02:46:07 +00:00
Pierre Joye 9ad850637e Remove the (c), in the future, can we add PHP Licence terms for the new
functions ?
2003-01-21 02:10:19 +00:00
Pierre Joye 81c68ab8d5 Add credits to my functions (thx for the advice Wez&Ilia :) 2003-01-21 01:49:34 +00:00
88e5482def ChangeLog update 2003-01-21 01:33:07 +00:00
Sterling Hughes d3f04d8ecc fix by phanto to the cloning 2003-01-21 00:00:38 +00:00
Ilia Alshanetsky 053023a71e quota function fixes. Thanks Wez. 2003-01-20 21:28:09 +00:00
Ilia Alshanetsky 20925f97b9 Changed php_error to php_error_docref.
Removed pointless memory allocation checks.
Memory leak fix inside quota functions.
2003-01-20 19:41:58 +00:00
Moriyoshi Koizumi e3e364f77b Fixed bug #21758 2003-01-20 16:45:21 +00:00
Ilia Alshanetsky aa8b1d6db3 Restore php_error -> php_error_docref patch. 2003-01-20 16:15:18 +00:00
Sascha Schumann aca939a0ab test commit 2003-01-20 15:07:20 +00:00
Derick Rethans f1ba2137c0 - Add credits for Magnus 2003-01-20 12:34:07 +00:00
foobar f6cee90129 Add test for png.h 2003-01-20 10:39:29 +00:00
Mark L. Woodward 7eeea7e55d Updated for Msession 1.2.
Includes new APIs
2003-01-20 03:16:24 +00:00
11aebf74bb ChangeLog update 2003-01-20 01:32:16 +00:00
Ilia Alshanetsky 2292a652a6 ZTS fix. 2003-01-19 23:32:22 +00:00
Zeev Suraski 4c8473d619 relabel 2003-01-19 21:37:40 +00:00
Stanislav Malyshev dce8267f35 Restore for now old statics behaviour (so that indirect $$var references would work again). Comprehensive fix will follow later. 2003-01-19 17:25:39 +00:00
Moriyoshi Koizumi dfbfa1a36f Improved the patched part to prevent further potential bugs 2003-01-19 17:23:48 +00:00
Ilia Alshanetsky 2efab7a22a fixed typos 2003-01-19 15:01:34 +00:00
Derick Rethans 5eb912554d - Moved to http://qa.php.net/write-test.php 2003-01-19 14:22:19 +00:00
Harald Radi b51b6f0fbf ini patch to allow 'entry[] = value' entries 2003-01-19 12:18:46 +00:00
Harald Radi 697398e18e ini patch to allow 'entry[] = value' entries 2003-01-19 12:01:38 +00:00
Moriyoshi Koizumi a1e6457561 Fixed bug #21744(21741)
Added test case for the bug
2003-01-19 11:32:54 +00:00
Ilia Alshanetsky 1fe4990bc0 ZTS fixes. 2003-01-19 08:32:26 +00:00
Ilia Alshanetsky 2500199ae3 ZTS fixes. 2003-01-19 04:09:32 +00:00
309697edb2 ChangeLog update 2003-01-19 01:50:24 +00:00
Ilia Alshanetsky fec2af82b8 Changed php_error to php_error_docref.
Make mcal compile with ZE2.
2003-01-19 00:47:03 +00:00
Ilia Alshanetsky 3d8e54f3a2 Changed php_error to php_error_docref. 2003-01-19 00:45:53 +00:00
Derick Rethans add3ec4e0b s/4.4/5.0 2003-01-18 22:33:56 +00:00
Ilia Alshanetsky aebb39b014 Changed php_error to php_error_docref.
Thanks to Marcus Börger for writing a script that significantly simplifies
this process.
2003-01-18 21:31:11 +00:00
Ilia Alshanetsky b2ecf47755 Fixed bug #21732 (Added a sanity check, that prevents parameter mismatch). 2003-01-18 20:48:52 +00:00
Ilia Alshanetsky c794f2c710 Removed pointless memory allocation checks. 2003-01-18 20:27:05 +00:00
Ilia Alshanetsky 984c0918ab Removed pointless memory allocation checks. 2003-01-18 20:10:23 +00:00
Ilia Alshanetsky 71e9f8cdd5 Removed pointless memory allocation checks. 2003-01-18 20:01:46 +00:00
Ilia Alshanetsky 60af5507a5 Changed php_error to php_error_docref. 2003-01-18 19:57:25 +00:00
Ilia Alshanetsky 1ae3c0e66e Removed pointless memory allocation checks.
Changed php_error to php_error_docref.
2003-01-18 19:53:35 +00:00
Ilia Alshanetsky 7cc28802af Changed php_error to php_error_docref. 2003-01-18 19:51:21 +00:00
Ilia Alshanetsky a7b91019e9 Removed pointless memory allocation checks. 2003-01-18 19:49:28 +00:00
Moriyoshi Koizumi a395304c72 Added test case for bug #21094 2003-01-18 19:44:12 +00:00
Ilia Alshanetsky e2868b5788 Removed pointless memory allocation checks. 2003-01-18 19:41:56 +00:00
Ilia Alshanetsky 72b356c1bc Removed pointless memory allocation checks. 2003-01-18 19:28:10 +00:00
Moriyoshi Koizumi 94c25df592 WS 2003-01-18 19:26:01 +00:00
Ilia Alshanetsky b566ad5d1b Changed php_error to php_error_docref. 2003-01-18 19:20:02 +00:00
Marcus Boerger 9d02c2bd56 correct my fault here and documnet the sense of the test 2003-01-18 19:06:29 +00:00
Moriyoshi Koizumi 310397f2ee Fixed typo 2003-01-18 19:02:21 +00:00
Moriyoshi Koizumi 2aa7bf8d8b Added test case for bug #21730 2003-01-18 18:59:27 +00:00
Ilia Alshanetsky a3daf3bbe8 Additional memory allocation fixes by Marcus Börger. 2003-01-18 18:51:12 +00:00
Moriyoshi Koizumi e23fead99f Tons of WS fixes 2003-01-18 18:49:47 +00:00
Ilia Alshanetsky e0654de590 Removed the no longer needed memory allocation checks. 2003-01-18 18:32:19 +00:00
Moriyoshi Koizumi 21b4499953 Fixed bug #21726 and #21730 2003-01-18 18:31:13 +00:00
Andrey Hristov 309ef518fc Renamed get_memory_usage() to memory_get_usage() (per Andi's advice)
This doesn't break any BC.
2003-01-18 15:03:01 +00:00
Wez Furlong 7002a39f97 Fix potential problem for 64-bit architectures. 2003-01-18 14:10:22 +00:00
Derick Rethans 39aa3a5d98 - Fixed memleak in fscanf(). 2003-01-18 13:55:58 +00:00
Derick Rethans a50e9acd8e - Skip test if the function to test is not available
#- Perhaps we need some infrastructure for this...
2003-01-18 13:53:25 +00:00
foobar 83e9f23182 Fix bug: #21687, imap extension does not include gss authentication mechanism 2003-01-18 07:00:47 +00:00
aba4c07be1 ChangeLog update 2003-01-18 01:33:47 +00:00
Harald Radi 46306a3212 export zend_objects_destroy_object()
static inline was meaningless anyways as the function
was only used as a callback handler and was never
called directly
2003-01-17 23:59:15 +00:00
Ilia Alshanetsky 054826b192 Added missing test result. 2003-01-17 23:57:43 +00:00
Moriyoshi Koizumi 0f714bc700 Bump year. 2003-01-17 22:54:47 +00:00
Moriyoshi Koizumi dc4cdaaf1b WS fix 2003-01-17 22:45:23 +00:00
Ilia Alshanetsky 833473d1de Removed pointless checks of array_init() return value. 2003-01-17 21:37:56 +00:00
Harald Radi 5795ed62f4 make std_object_handlers struct available for shared modules 2003-01-17 21:16:12 +00:00
Moriyoshi Koizumi f71ef5e091 Fixed a quoted printable decoder so that it would conform to RFC2045. 2003-01-17 20:00:31 +00:00
Andrey Hristov 6c843d1431 Moved to C style comments.
Last time forgot to convert the header files.
2003-01-17 19:35:13 +00:00
Sascha Schumann ebedf060a5 Fix POST handling once and for all. The daemon now never blocks and handles
uploads of up to 2GB on 32 bit platforms.

Uploads >16KB are put into a file-backed mmap area.

SG(request_info).content_type got corrupted somewhere. As a workaround,
we provide SAPI with a duplicate of the original string.
2003-01-17 18:53:22 +00:00
Marcus Boerger 973c5fa1ec fix jp2 detection and add testfile 2003-01-17 18:51:30 +00:00
Ilia Alshanetsky 169eb85e0a Syncronize bundled GD library with latest GD (2.0.11). 2003-01-17 18:34:07 +00:00
Derick Rethans cce2ffed8a - Fixed a bug that made that no newline was displayed when there was no value
for a row.
2003-01-17 18:07:10 +00:00
Andrey Hristov 7dd7b03aa8 Removed pointless checks around array_init(). 2003-01-17 16:33:01 +00:00
Ilia Alshanetsky fb6517e8ab Fixed memory leaks in imap_get_quota & imap_get_quotaroot.
Removed pointless checks around array_init().
2003-01-17 16:07:39 +00:00
Moriyoshi Koizumi f94cbfe52b Significant speed enhancements. I was underestimating the power of recent
CPUs :)
2003-01-17 09:04:02 +00:00
Sebastian Bergmann 0e178230b2 Move ZEND_ENGINE_2 check to where it is defined. 2003-01-17 06:15:24 +00:00
fc8d5c784d NEWS update 2003-01-17 01:37:02 +00:00
08c11f2931 ChangeLog update 2003-01-17 01:36:11 +00:00
Harald Radi 914cf3c0f8 move the ZE2 check into internal_functions_win32.c 2003-01-16 22:09:58 +00:00
Harald Radi 77f7ae3814 revert previous commit 2003-01-16 22:08:00 +00:00
Harald Radi 76adb58b7a unbreak the build 2003-01-16 21:52:06 +00:00
Ilia Alshanetsky 41092dbd8a Fixed bug #21651 (crash in pdf_open_memory_image() when inserting a
non truecolor image).
2003-01-16 21:18:49 +00:00
Moriyoshi Koizumi 93481ce9b8 Finally fixed a qp encoder bug that line break characters that appear exactly
at the end of the chunk lost in the output.
# I bet no more problems will occur in quoted-printable encoder.
# But I recognised the counterpart is still buggy due to RFC2045-incompliance.
2003-01-16 20:59:07 +00:00
Marcus Boerger 1dabcd4dad - JPEG 2000 support 2003-01-16 19:46:12 +00:00
Marcus Boerger 8958762de6 - corrected error in file detection for very small files
- JPEG 2000 support, mostly Adam Wright <adam@elysium.ltd.uk>
@Enhanced jpeg 2000 support for GetImageSize(). (marcus, Adam Wright)
2003-01-16 19:45:26 +00:00
Harald Radi b1613e16f2 change library name 2003-01-16 18:53:45 +00:00
Harald Radi f390fbb92a update skeleton 2003-01-16 18:46:59 +00:00
Harald Radi 4024425e8e fix path to config.w32.h 2003-01-16 18:25:59 +00:00
Harald Radi dd67c075bc add COM 2003-01-16 18:17:48 +00:00
Harald Radi 7c0e7b4fe8 prevent HEAD + ZE1 builds and add COM 2003-01-16 18:16:50 +00:00
Harald Radi 5aae306f96 for those who prefer to have com as a shared lib 2003-01-16 18:15:44 +00:00
Harald Radi 7f127a22df make layers loadable as self-sustaining php extension
which registeres itself in the rpc framework.
2003-01-16 17:49:22 +00:00
Dan Kalowsky dacf98c86f typo corrected 2003-01-16 16:42:25 +00:00
Dan Kalowsky ae8f64e325 Adding in test ability for WIndows to fetch_objects 2003-01-16 16:27:31 +00:00
Edin Kadribasic d4e143b8be Fixed bug #21648 2003-01-16 13:19:50 +00:00
Sascha Schumann db8b4c6762 Add INI setting session.hash_bits_per_character which enables developers
to choose how session ids are represented, regardless of the hash algorithm.
2003-01-16 07:21:49 +00:00
Ilia Alshanetsky 4e53357e9b Fixed bug #20079 (made ora_logoff return TRUE on success). 2003-01-16 02:53:44 +00:00
7f3b79adc5 ChangeLog update 2003-01-16 01:33:30 +00:00
Ilia Alshanetsky 12d2b01a25 Fixed bug #20933 (isset/empty didn't work when used on string offsets). 2003-01-16 00:44:17 +00:00
Edin Kadribasic 46303d75be Added some missing modules. Removed some that are built in or moved to
ext/rpc.
2003-01-15 22:19:46 +00:00
Sascha Schumann 6f4333c7ae scrap STANDARD_SAPI_MODULE_PROPERTIES; it is causing more harm than good 2003-01-15 21:13:01 +00:00
Andi Gutmans e5afca38b6 - Revert int -> unsigned int change for str.len 2003-01-15 20:35:06 +00:00
Ilia Alshanetsky 1351f42efc More build fixes. 2003-01-15 19:36:13 +00:00
Sascha Schumann 7431b52291 Revert commit which turned the lengths of strings into zend_uint. 2003-01-15 19:10:14 +00:00
Wez Furlong a3a2dcd8a9 Relieve scripts of the burden of ensuring that all pipes are closed prior
to calling proc_close().
Implement proc_get_status(resource $process) which returns an array of
information about a process created with proc_open().
The information includes:
array(
	"command" => string "name of the command",
	"pid" => long process identifier,
	"running" => bool true if the process is still running
	"exitcode" => long exitcode if the process exited
	"signaled" => bool true if the process was signaled
	"termsig" => long signal number if signaled
	"stopped" => bool true if the process is stopped
	"stopsig" => long signal number if stopped
);
2003-01-15 18:54:03 +00:00
Ilia Alshanetsky d4f73f8da6 Fixed a typo. 2003-01-15 17:22:03 +00:00
Sebastian Bergmann be3427e4f0 Define PHP_CAN_SUPPORT_PROC_OPEN. 2003-01-15 16:53:49 +00:00
Sebastian Bergmann 003ea0717e Add proc_open.c to project. 2003-01-15 16:48:46 +00:00
Wez Furlong 1a314027d3 - Move proc_open code to a source file of it's own.
- Tidy up that netware mess by performing a configure check which will
  define the symbol PHP_CAN_SUPPORT_PROC_OPEN if PHP can support proc_open.
- Protected the proc_open specific code with #ifdef PHP_CAN_SUPPORT_PROC_OPEN
  so that user-space scripts can use function_exists and react accordingly.

** Heads Up Win32: You need to add ext/standard/proc_open.c to the DSP and
** #define PHP_CAN_SUPPORT_PROC_OPEN in the w32 config header.
2003-01-15 16:29:00 +00:00
Ilia Alshanetsky ea0f37fc76 Build fixes. 2003-01-15 15:36:28 +00:00
Moriyoshi Koizumi fdf0768d4e Fixed a qp encoder bug that the constructor sometimes fails if
line-breaking mode is off.
2003-01-15 15:05:17 +00:00
Ilia Alshanetsky 475125ac25 Typo fixes. 2003-01-15 14:05:41 +00:00
Ilia Alshanetsky f704ac13a8 Fixed typo. 2003-01-15 14:02:11 +00:00
Ilia Alshanetsky 2b121d0b37 Various corrections. 2003-01-15 13:55:34 +00:00
Ilia Alshanetsky dbe5972a0d Fixed typos. 2003-01-15 13:50:54 +00:00
Ilia Alshanetsky e0e77d7d02 Typo corrections. 2003-01-15 13:48:07 +00:00
Sascha Schumann 0855c0b603 whitespace 2003-01-15 11:30:39 +00:00
Sascha Schumann 4668b7130b whitespace 2003-01-15 11:22:04 +00:00
Yasuo Ohgaki 345ada81c8 Fixed proto 2003-01-15 10:21:15 +00:00
Adam Dickmeiss f8b55fabc5 Fix functions comments (connection resource rather than connection id).
New functions yaz_set_option and yaz_get_option.
Cleanup in yaz_connect.
2003-01-15 08:00:44 +00:00
Adam Dickmeiss 701ab27de7 Fix lib config for the case where YAZ depends on multiple libraries 2003-01-15 07:57:52 +00:00
Ilia Alshanetsky fc9282c183 Kill compile warning. 2003-01-15 03:37:11 +00:00
Ilia Alshanetsky 299614ae16 Newer parameter parsing API. 2003-01-15 03:01:17 +00:00
Ilia Alshanetsky a354531144 Getting rid of the old API parsing code. 2003-01-15 02:54:54 +00:00
Ilia Alshanetsky c2d66fa8bf Changed php_error to php_error_docref.
Made use of the more recent parameter parsing API, zend_get_parameters*.
2003-01-15 02:49:38 +00:00
Ilia Alshanetsky ad42fba9fa Removed pointless checks around array_init() & ZE memory allocation macros.
Changed php_error to php_error_docref.
Dropped getParam* parameter parsing API in favor of zend_get_parameters*.
2003-01-15 02:31:16 +00:00
a34d4dc30e ChangeLog update 2003-01-15 01:34:55 +00:00
Ilia Alshanetsky a63b47cae0 This patch allows cpdf to be compiled in conjunction with ncurses, which was
not possible before due to conflicting defines.
2003-01-15 00:52:06 +00:00
Andi Gutmans c073b76aac - Change "is" to "instanceof" as it explains better what the operator means.
- "is_a" was also appropriate but ugly.
2003-01-14 21:29:23 +00:00
Ilia Alshanetsky e37aee1a34 Porting of patch applied to ext/xmlrpc. 2003-01-14 21:04:47 +00:00
Ilia Alshanetsky a0b3f822f7 Made the code use php_error_docref().
Removed pointless checks around array_init() and emalloc().
Switched to zend_get_parameters_ex() argument parsing API.
2003-01-14 21:02:14 +00:00
Andrey Hristov 05ff5da32b Migrated to C style comments. 2003-01-14 20:24:40 +00:00
Ilia Alshanetsky 74e34d1657 Changed getParameters() to zend_get_parameters_ex(). 2003-01-14 20:07:52 +00:00
Ilia Alshanetsky 1dbf11e1ba Fixed compile warnings. 2003-01-14 20:05:38 +00:00
Ilia Alshanetsky f12a4164a5 One more typo. 2003-01-14 20:02:42 +00:00
Ilia Alshanetsky 44c8927daf Fixed typos. 2003-01-14 19:59:48 +00:00
Moriyoshi Koizumi 3ae7d13bc9 Appended my name to the list of authors 2003-01-14 19:26:00 +00:00
Moriyoshi Koizumi ac66d4481e Test update for new feature 2003-01-14 19:25:10 +00:00
Ilia Alshanetsky cd267a3df4 Switched from old getParse* argument parsing API to a more recent
zend_get_parameters*.
2003-01-14 18:54:44 +00:00
Andrey Hristov 7866f02260 added function get_memory_usage(). available only when PHP is compiled
with --enable-memory-limit
2003-01-14 18:26:47 +00:00
Ilia Alshanetsky 62f7e27141 Fixed compile warning & removed useless variable. 2003-01-14 17:45:31 +00:00
Ilia Alshanetsky 7d14dae0bb Changed php_error to php_error_docref.
Got rid off the ancient getParameters* parameter parsing API.
2003-01-14 17:44:56 +00:00
Moriyoshi Koizumi e5c5412777 Added a new option "force-encode-first" to the quoted-printable encoder
as per Wez's request. If enabled, the encoder forcefully does qp
tranformation on every first character of lines in incoming stream.
2003-01-14 16:42:18 +00:00
Ilia Alshanetsky 4bc247553a Changed php_error() to php_error_docref().
Made pdfdoc retrieval a macro.
2003-01-14 15:15:53 +00:00
Moriyoshi Koizumi bde6801add Made php_quot_print_decode() RFC2045-compliant
# this function is only used in iconv extension and the corresponding
# userland function doesn't use it, so I don't see any BC issue here.
2003-01-14 15:14:11 +00:00
Stanislav Malyshev 5340b204ca fix memory leaks and key size 2003-01-14 15:12:35 +00:00
Edin Kadribasic 45e9f594bb MFB: bind_textdomain_codeset() availability on windows 2003-01-14 14:46:33 +00:00
Ilia Alshanetsky dff55752aa MFZE2 2003-01-14 14:21:45 +00:00
Derick Rethans 4ff9267143 s/gd/gd2 2003-01-14 13:55:00 +00:00
Stanislav Malyshev 67c50ee22a fix warning 2003-01-14 12:27:07 +00:00
Stanislav Malyshev eccc536883 Make add_property_ functions work via write_property handler 2003-01-14 12:15:09 +00:00
Stanislav Malyshev f30f3590a1 ws 2003-01-14 12:13:51 +00:00
Ilia Alshanetsky ad3b2ccec9 Reverting previous patch. 2003-01-14 02:41:47 +00:00
Ilia Alshanetsky 6fb507b53e Changed php_error to php_error_docref().
Removed pointless checks around array_init().
2003-01-14 02:39:10 +00:00
062942c4e9 ChangeLog update 2003-01-14 01:35:54 +00:00
Moriyoshi Koizumi a0be48c109 Fixed small memory leak that occurs when the invalid line length is passed
to the qprint ctor.
2003-01-14 01:27:57 +00:00
Moriyoshi Koizumi 121e625977 Fixed quoted-printable encoder so that it produces RFC2045 complicant
output. As per this specification requirement, the constructor now accepts
three options: binary (boolean), line-len (uint), line-break-chars (string).
2003-01-14 01:23:35 +00:00
foobar cabee3635f Fixed bug: #21543, Informix version detection fails 2003-01-13 23:31:13 +00:00
Frank M. Kromann d07dc0fc4c false should be VT_FALSE 2003-01-13 19:33:10 +00:00
Moriyoshi Koizumi e89bace72c Fixed typoFixed typoFixed typoFixed typoFixed typoFixed typoFixed typoFixed typo 2003-01-13 19:18:18 +00:00
Andrey Hristov 1cdc956637 added array_combine().
Creates an array by using the elements of the first parameter as keys and
the elements of the second as correspoding keys. Error is thrown in case
the arrays has different number of elements. Number of elements 0 is not
valid for both parameters.
2003-01-13 18:12:23 +00:00
Andrey Hristov ffeb57afb5 Modifying TS build.
Migrating to _ex API for hash traversal.
2003-01-13 16:39:16 +00:00
Ilia Alshanetsky 8e7df3fbf1 MFZE2 2003-01-13 16:34:19 +00:00
Edin Kadribasic 60cac99a71 Adjust paths for the new location of ext/rpc/java 2003-01-13 16:07:45 +00:00
Edin Kadribasic f09be34dd3 Adjust paths to the new location java.dsp 2003-01-13 15:15:24 +00:00
Edin Kadribasic 8dbbddfb54 Fix ZTS build here too.
#
# What is the correct location of XMLRPC extension?
# Can the reduntand one be removed then and the build system fixed
# to acommodate that.
2003-01-13 13:39:29 +00:00
Edin Kadribasic 8ef5a3d48e Fixed ZTS build. 2003-01-13 13:36:23 +00:00
Moriyoshi Koizumi 78f527e2b7 Fixed a silly segfault bug caused by lack of strict type checking 2003-01-13 11:00:22 +00:00
Sascha Schumann 726eb90bd5 which is not portable. use our bundled shtool instead. 2003-01-13 10:27:50 +00:00
Moriyoshi Koizumi ab71e2cbaa . Implemented a common filter parameter parsing function.
# For example "base64-encode.line-break-chars=--,base64-decode.blah=foobar"
# will be parsed and splitted into a zval array as
# array(2) {
#   ["base64-encode"]=>
#   array(1) {
#     ["line-break-chars"]=>
#     string(2) "--"
#   }
#   ["base64-decode"]=>
#   array(1) {
#     ["blah"] =>
#     string(6) "foobar"
#   }
# }
. Added automatic line-breaking feature for base64 encode filter. This
  can be turned on by putting a option entry "base64-encode.line-length"
  to the filter parameters.
2003-01-13 10:21:40 +00:00
Derick Rethans 2cbcb743d8 - Fix ZTS build 2003-01-13 08:19:50 +00:00
Andi Gutmans 94e6eb06dd - Don't check if the handle is bogus. We should crash. 2003-01-13 04:55:34 +00:00
aec08c6052 ChangeLog update 2003-01-13 01:34:00 +00:00
Moriyoshi Koizumi 22a6b8f1a4 Added test case for bug #21600 2003-01-12 23:56:04 +00:00
Harald Radi 58d3451c75 fix wrong dereferenciation 2003-01-12 21:59:57 +00:00
Moriyoshi Koizumi 1fec8e3d13 Fixed a bug of the base64 decoder that a sequence of intervening
characters that are supposed to be ignored by the decoder cause output
corruption.
2003-01-12 21:05:22 +00:00
Stanislav Malyshev 33b67ab868 fix inheritance 2003-01-12 18:57:18 +00:00
Stanislav Malyshev 98175957a7 ZE2 compatibility 2003-01-12 18:42:16 +00:00
Stanislav Malyshev 2ae8d124ce Remove handle_property from here too 2003-01-12 17:22:35 +00:00
Stanislav Malyshev d48ffd97d6 RIP handle_* functions. ZE2 will use __ handlers instead.
# Yes, I know this will break some things. I will fix those I can find shortly.
2003-01-12 17:16:07 +00:00
Sebastian Bergmann f37cb1c617 ZTS fixes. 2003-01-12 14:47:18 +00:00
Stanislav Malyshev a7e14749e7 Disable ZE2-incompatible parts
# This should be rewritten for ZE2 anyway...
2003-01-12 14:43:04 +00:00
Stanislav Malyshev 1b355e119e Move Z_OBJ_P here. 2003-01-12 14:39:45 +00:00
Stanislav Malyshev d27b3d3ad9 Remove Z_OBJ - it's internal to Zend objects, no generic function except
those in zend_object_handlers.c should use it.
Add Z_OBJ_HANDLER macro for easy access to handlers
2003-01-12 14:38:54 +00:00
Sebastian Bergmann 24db7f182a ZTS fixes. 2003-01-12 14:25:58 +00:00
Stanislav Malyshev 6cc7ee265c add get_class_name handler 2003-01-12 13:56:51 +00:00
Stanislav Malyshev bcc1e5a74e remove unneeded var 2003-01-12 13:50:17 +00:00
Moriyoshi Koizumi a88173bf86 Fixed infinite loop bug when an invalid quoted-printable escape sequence
appears in the streem.
2003-01-12 13:46:11 +00:00
Stanislav Malyshev 9bba373a17 Use generic handlers instead of Z_OBJ 2003-01-12 13:45:50 +00:00
Moriyoshi Koizumi b1e8631986 Fixed error msg format so it correctly reports the actual filter name 2003-01-12 13:41:35 +00:00
Sascha Schumann c79e780f5c recommending SHA-1 as hash function 2003-01-12 13:26:47 +00:00
Harald Radi 2f7f1dd1b8 #@!$$grml*$% 2003-01-12 13:18:05 +00:00
Harald Radi 13c2254e21 partially revert previous commit and
change zend_modules.h to include
a forward declaration to zend_ini_entry
2003-01-12 13:14:23 +00:00
Sascha Schumann 5a468ce877 sync entries 2003-01-12 13:09:54 +00:00
Sascha Schumann f2f1f94e36 add INI setting session.hash_function
add support for creating session ids using SHA-1
source more entropy for session ids
2003-01-12 13:07:14 +00:00
Sascha Schumann 0b8401bf27 handle ERANGE from strtol properly 2003-01-12 13:05:32 +00:00
Harald Radi 814045bba6 added zend_ini_entry to zend_modules_entry as
discussed with zeev
2003-01-12 13:00:28 +00:00
Harald Radi c37ee2a12a fix 'use of uninitialized variable' warning 2003-01-12 12:57:20 +00:00
Stanislav Malyshev 0ccbd37df7 validate handle 2003-01-12 12:56:04 +00:00
Moriyoshi Koizumi aa41ab285a . Updated quoted-printable filter by a neater implementation.
. Changed emalloc family functions to pemalloc ones for persistent filters.
. Changed base64 and quoted-printable filter names to "convert.base64-encode",
  "convert.base64-decode", "convert.quoted-printable-encode", and
  "convert.quoted-printable-decode" respectively for the consistency that
  may be requested later.
2003-01-12 12:48:13 +00:00
Derick Rethans 46a5371ecd - Update NEWS to show 5.0.0 2003-01-12 12:45:19 +00:00
Zeev Suraski 424e98f4e2 Implemented compatibility mode
To enable - zend2.implicit_clone = on in php.ini or using ini_set()
2003-01-12 12:39:06 +00:00
Jan Lehnardt c98f4e9f32 - fix typo 2003-01-12 11:42:29 +00:00
Sebastian Bergmann 17c1518792 Patch by Giuseppe Tanzilli <g.tanzilli@gruppocsf.com>. 2003-01-12 08:03:18 +00:00
Sebastian Bergmann a142ce729f Patch by Giuseppe Tanzilli <g.tanzilli@gruppocsf.com>. 2003-01-12 08:01:42 +00:00
Frank M. Kromann 874cddd4ae Release skiped results. This will free memory on the server.
Make mssql_execute work for stored procedures with and without returning result sets
2003-01-12 06:28:41 +00:00
091609d661 ChangeLog update 2003-01-12 01:31:51 +00:00
Ilia Alshanetsky c4088ce25b Do not 'convert' double columns to integers after the 1st row in the result
set.
2003-01-11 23:50:37 +00:00
Ilia Alshanetsky 48f2ad4703 Fixed handling of NUMERIC type, when it contains numbers that could
potentially exceed the interger limit.
2003-01-11 23:06:35 +00:00
Moriyoshi Koizumi 7fa0970567 Reverted because correct decision has not been made yet. 2003-01-11 23:05:19 +00:00
Moriyoshi Koizumi dd9b7f25cf This patch is likely to fix win32 build 2003-01-11 22:36:38 +00:00
Moriyoshi Koizumi b66b92e996 Reduced warnings in ZE2 build 2003-01-11 22:32:19 +00:00
Moriyoshi Koizumi dd2ad168e1 Reduced compiler warnings in ZE2 build 2003-01-11 22:17:37 +00:00
Andrey Hristov cd2ce96e03 reverting 2003-01-11 19:37:23 +00:00
Ilia Alshanetsky 8facc65202 Added stripos() & strripos() functions.
Added 3rd parameter (offset) to strrpos().
2003-01-11 17:52:38 +00:00
Andi Gutmans 76c663b321 - Fix typo and whitespace 2003-01-11 17:04:16 +00:00
Derick Rethans 2c44fab3a0 - Ported the zend_execute_internal hook to ZendEngine2. 2003-01-11 16:12:44 +00:00
Derick Rethans 6b7eaaa2c4 - Moving java and dotnet extensions to ext/rpc 2003-01-11 12:23:45 +00:00
Harald Radi c8d19858ac freed reader twice instead of writer and reader 2003-01-11 11:34:43 +00:00
Sebastian Bergmann 213b5abd06 Add missing ,. 2003-01-11 09:51:53 +00:00
Harald Radi 656ccddfce fix build 2003-01-11 08:59:37 +00:00
Sebastian Bergmann 02c1b1d8d2 Leftover. 2003-01-11 06:08:55 +00:00
a0055ba2e5 NEWS update 2003-01-11 01:34:56 +00:00
c5153b24c8 ChangeLog update 2003-01-11 01:34:28 +00:00
Ilia Alshanetsky 973937e7aa Fix the line numbering when the 1st line in the script is #!. 2003-01-11 00:20:50 +00:00
Harald Radi 5fc6842817 this is now implemented by the engine itself 2003-01-10 23:40:12 +00:00
Harald Radi fff34aa3be ext/com is not compatible with ZE2, the ZE2 version is located in
ext/rpc/com
2003-01-10 23:39:09 +00:00
Harald Radi c3867a7c8e HEAD defaults to build with ZE2 now 2003-01-10 23:36:18 +00:00
Frank M. Kromann 16cda12728 Fixing copy and paste errors 2003-01-10 19:33:31 +00:00
Frank M. Kromann c2e7158712 Avoid warnings when running stored procedures returning multiple results
before setting output and return values.
Additional results can be skipped by the optional parameter to mssql_execute
2003-01-10 19:23:36 +00:00
Ilia Alshanetsky 8c3b8d4fe6 MFZE2 2003-01-10 19:18:20 +00:00
Christian Stocker 9234916fc8 Throw error if object is not a XML_DOCUMENT_NODE in domxml_dump_node() 2003-01-10 18:07:36 +00:00
Andrey Hristov 53656f196b skipping unneeded copy 2003-01-10 17:39:10 +00:00
Andrei Zmievski efaa31e940 Automatically register constructor, destructor, and clone function when
class methods are registered.
2003-01-10 14:41:53 +00:00
Wez Furlong cf9f784ecd Fix the number format fix when the number of decimal places is 0.
# Thanks to Edin for his telepathy!
2003-01-10 13:32:24 +00:00
Derick Rethans 0988bc2ee6 - Fixed bug #20155: xmlrpc compile problem with zendengine2 (Path by Jan
Schneider)
@- Fixed bug #20155: xmlrpc compile problem with zendengine2 (Derick, Jan
@  Schneider)
2003-01-10 08:24:55 +00:00
Moriyoshi Koizumi 380928e6bf Reduced compiler warnings 2003-01-10 04:44:21 +00:00
Moriyoshi Koizumi 7ecd3ff91a Reduced compiler warnings 2003-01-10 04:37:26 +00:00
Moriyoshi Koizumi 6a1d69d4ba Added missing cast operators 2003-01-10 04:32:25 +00:00
Ilia Alshanetsky dee2d7fed7 Fixed ImageRotate when rotation angle is 90 degrees, patch by
leon@leonatkinson.com.
2003-01-10 02:00:39 +00:00
dd277cf2c7 ChangeLog update 2003-01-10 01:33:11 +00:00
Stig Bakken 3f09044ba6 * prepare 1.0.1 release 2003-01-10 01:24:56 +00:00
Stig Bakken 4a723721b9 * obey PHP_PEAR_INSTALL_DIR and PHP_PEAR_PHP_BIN environment variables 2003-01-10 01:16:23 +00:00
Stig Bakken 4cf28eb0fc * verbosity fix for cvstag and cvsdiff commands 2003-01-10 01:15:40 +00:00
Stig Bakken 26a472f767 * TODO item 2003-01-10 01:12:23 +00:00
Stig Bakken eaf21d230e * add "cvsdiff" command 2003-01-10 01:11:30 +00:00
Stig Bakken 95255fe5e1 * use getenv() instead of $_ENV[] 2003-01-10 01:11:00 +00:00
Ilia Alshanetsky 5413a66cbb CS fixes 2003-01-09 23:23:32 +00:00
Ilia Alshanetsky 3e5bbba351 Fixed a memory corruption that occurs when an unterminated " is encountered
this bug maybe be related to #21556.
2003-01-09 22:49:18 +00:00
Frank M. Kromann 8e0535bcd5 Adding extended checks for where FreeTDS is installed 2003-01-09 22:35:16 +00:00
Ilia Alshanetsky 9b560970f8 Fixed compiler warnings. 2003-01-09 22:33:43 +00:00
Sara Golemon 4d789b593f Bug #21531 file_exists() and other filestat functions throw errors when in safe mode and file/directory does not exist.
Extended php_checkuid function to add "flags" field via rename to php_checkuid_ex with alias for BC in functions that do want safe mode errors thrown.
2003-01-09 21:57:45 +00:00
Moriyoshi Koizumi 82c6d54517 Fixed typo 2003-01-09 20:23:36 +00:00
Wez Furlong 59e4fdcc10 Implement fprintf() and vfprintf().
Add a couple of tests.
2003-01-09 17:29:31 +00:00
foobar 32eb31719a Fix bug: #21511, config.status warning 2003-01-09 16:37:45 +00:00
Zeev Suraski 66d30a4966 Found some more occurences of that elusive bug... 2003-01-09 16:16:57 +00:00
Zeev Suraski ef6a44d15c Fix one lousy, annoying lurking bug (memory corruption)
Sebastian - try coWiki again please...
2003-01-09 16:10:33 +00:00
Wez Furlong d8fbd1acef Fix Bug #21523 - number_format could cause a memory allocation for a
negative memory size in situations where the sprintf implementation of the
host system generated less decimal places than were requested.

Resolved this issue by making number_format examine the string returned
by spprintf and have it pad to the correct number of decimal places.

Added a test-case based on the bug report; the length of decimal places
required to trigger this bug is sprintf implementation dependent; as the
implementation is now using spprintf (provided by PHP), that number is
78 digits (NDIG - 2).

# I played with the idea of enhancing sprintf to do the equivalent, but
# it was too much effort considering that the precision of floats/doubles
# is not good enough to warrant it.

# This fix could do with some QA from someone else to make sure there are
# no memory bounds problems and then MFH it to PHP_4_3
2003-01-09 15:44:49 +00:00
Zeev Suraski ace55f3251 Unify and make it easy to add code into the broken-string error handler 2003-01-09 15:32:22 +00:00
Stig Bakken f39c0ad2b6 * added debug_backtrace() support to PEAR errors 2003-01-09 15:14:23 +00:00
Stig Bakken 796083b936 * System::which() now checks .exe .bat .cmd and .com on Windows 2003-01-09 15:11:27 +00:00
Stig Bakken 239d203e4a * cleanups 2003-01-09 15:06:14 +00:00
Zeev Suraski 4bab4a7b55 Fix writability checks 2003-01-09 14:46:46 +00:00
Zeev Suraski d35ddb740e Time for an update 2003-01-09 10:03:26 +00:00
Zeev Suraski b817dab206 Fix leak 2003-01-09 09:22:44 +00:00
Frank M. Kromann b33fe2b2c6 Use the correct link when checking for more results on stored procedures 2003-01-09 08:19:41 +00:00
Frank M. Kromann 6660f8ae4e Restire BC for mssql_execute(). This will not break the new feature for handling
multiple results from a single stired procedure.
Adding mssql_free_statement()
2003-01-09 08:00:07 +00:00
Ilia Alshanetsky ef9ba94c8b Fixed bug #21529 (memory corruption by fsockopen()). 2003-01-09 03:33:15 +00:00
Frank M. Kromann 392e5013b4 changed from LVAL to RESVAL macro 2003-01-09 02:44:44 +00:00
7faaf86d3a ChangeLog update 2003-01-09 01:33:21 +00:00
Yasuo Ohgaki ae8db8c608 Adjust config.m4 for new build system and improve lib detection a little 2003-01-09 01:19:26 +00:00
foobar 66fd5008ab Fix the ZTS build. 2003-01-09 00:15:33 +00:00
Moriyoshi Koizumi 59393ef3ad Reimplemented base64 filter to use iconv()-like facility for flexibility.
# I'm leaving the code dirty & ugly prior to the discussion.
2003-01-08 23:44:38 +00:00
Frank M. Kromann 7cd7cad1b5 Changed global data type to avoid problems with initialization 2003-01-08 23:19:54 +00:00
Ilia Alshanetsky 072be90d6f Added support for WBMP images. 2003-01-08 20:36:03 +00:00
Ilia Alshanetsky 17e51c5946 Fixed bug #21518.
Fixed memory in leak ImageCreateFromString().
Fixed a bug that prevented proper identification of WBMP images and thus
prevented ImageCreateFromString() from working on those images.
2003-01-08 18:11:40 +00:00
James Cox 24d034251d cvs is dev not alpha. 2003-01-08 17:30:49 +00:00
Ilia Alshanetsky efcd8a7094 MFZE2 2003-01-08 16:41:47 +00:00
Zeev Suraski ada5c4009e Fix UMR 2003-01-08 13:28:16 +00:00
Georg Richter 5312594a27 fixed bug #21498 2003-01-08 11:00:06 +00:00
Ilia Alshanetsky 2d4a4a99d3 Removed unused variable. 2003-01-08 03:33:00 +00:00
Ilia Alshanetsky a7ac507ade Fixed bug #21499 (more descriptive message in the event of require/include
failure).
2003-01-08 02:44:09 +00:00
72479b90b3 NEWS update 2003-01-08 01:38:00 +00:00
87660b06f4 ChangeLog update 2003-01-08 01:34:57 +00:00
Ilia Alshanetsky 5de9962d50 Fixed bug #21297. The fix also fixes miscalculation of lines numbers by 1
due the previously mentioned bug.
2003-01-08 00:41:53 +00:00
Ilia Alshanetsky ac3e8601ae Version is char ;). 2003-01-08 00:38:36 +00:00
Christian Dickmann 26e393c69f fix default umask(); (thx to Mirco MEEBEY Bauer for bringing this behavior to my attention and testing the patch) 2003-01-07 23:12:06 +00:00
Dan Kalowsky 19b25ca5d2 Version tag for future move to PECL 2003-01-07 23:00:11 +00:00
Dan Kalowsky b89d9db706 Reverting last change as it really doesn't fix longreadlen problems in all
cases.
2003-01-07 22:56:58 +00:00
Moriyoshi Koizumi b064810550 Instances should not be freed in dtor()... 2003-01-07 22:53:42 +00:00
Moriyoshi Koizumi b86a4edeed Made error msg format more consistent 2003-01-07 22:52:24 +00:00
Pierre Joye a9999190c6 Fix line drawed twice (L. Atkinson) 2003-01-07 22:34:00 +00:00
Sara Golemon f4f313ff40 Backout changes between 1.6 and 1.7 2003-01-07 16:43:26 +00:00
Zeev Suraski 6591b9c826 Add missing call 2003-01-07 16:33:28 +00:00
Levi Dixon beb7476ba9 Added support for Shared Data Mode for OCI8_VERSION >= 8.1, which will provide memory savings by sharing common statement data 2003-01-07 15:55:59 +00:00
Edin Kadribasic 0c80cc9d20 #17098 was MFH'ed 2003-01-07 15:27:27 +00:00
Ilia Alshanetsky b1fab873c2 Added a check for availability of PCRE extension needed by test-suite. 2003-01-07 15:21:34 +00:00
Vincent Blavet 7121150e5f * Synchronize with /pear/Archive_Tar/Tar.php 1.5 :
- Add support for long filenames (greater than 99 characters)
  - Add private methods _readLongHeader() and _writeLongHeader()
2003-01-07 15:04:42 +00:00
Ilia Alshanetsky f7513855b3 Fixed ZTS build with ZE2. 2003-01-07 14:34:41 +00:00
Ilia Alshanetsky 928c260c57 ZTS cleanup. 2003-01-07 13:02:43 +00:00
Zeev Suraski e8de102cd6 Fix leaks 2003-01-07 12:11:40 +00:00
Zeev Suraski 651cea08f0 whitespace 2003-01-07 11:37:09 +00:00
Edin Kadribasic 6d55e3456f MFB:
Fixed bug #21442 (Crash of mail() on Windows when the first parameter
is empty).
2003-01-07 11:24:17 +00:00
Zeev Suraski efb9fdf0e6 call dtors on shutdown 2003-01-07 10:33:22 +00:00
Sascha Schumann e180f20e63 tell user which header files could not be found 2003-01-07 09:49:08 +00:00
Moriyoshi Koizumi 346fa499ca Fixed small leak 2003-01-07 08:57:27 +00:00
Frank M. Kromann 1638ddd4c2 Making the mssql extension work when build as a shared object 2003-01-07 05:19:48 +00:00
Ilia Alshanetsky f0de896ed2 Fixed ZTS build. 2003-01-07 03:44:12 +00:00
Ilia Alshanetsky 34e868d451 MFB + CS 2003-01-07 02:47:24 +00:00
Moriyoshi Koizumi b7740a0351 Trivial grammer fix 2003-01-07 01:46:38 +00:00
Moriyoshi Koizumi eed5a6bed0 Implemented quoted-printable stream filter 2003-01-07 01:41:18 +00:00
f8075804a5 NEWS update 2003-01-07 01:36:37 +00:00
0f6db9ef82 ChangeLog update 2003-01-07 01:34:32 +00:00
Sara Golemon 35b1635c81 Add option to stream_get_filters() user-defined fiters vs. all filters, default to user only 2003-01-07 01:02:29 +00:00
Moriyoshi Koizumi 00a36a09e1 Implemented string.base64 stream filter
@- Implemented string.base64 stream filter. (Moriyoshi)
2003-01-07 00:03:25 +00:00
Stefan Esser 58d65abbcb Adding support for anonymous fileuploads (#21450) 2003-01-06 23:51:28 +00:00
Wez Furlong 39848ce35c Fix for Bug #20827: where stat is a macro on Tru64.
Patch from <julien.soula@free.fr>
2003-01-06 23:27:03 +00:00
Ilia Alshanetsky 97dd1e8abf Fixed bug #21453 (improper handling of non-terminated <). 2003-01-06 22:13:03 +00:00
Ilia Alshanetsky 15f7c2c332 Fixed Bug #21443 and related bug #21468. 2003-01-06 21:43:28 +00:00
Dan Kalowsky 86b99ffcf6 Patch for bug #19349 2003-01-06 18:23:55 +00:00
Dan Kalowsky b588e10553 Correction for bug #21279 2003-01-06 18:10:06 +00:00
Moriyoshi Koizumi 4c2d6cfea8 Moved php_quot_print_decode() to quot_print.c so that it can be used
outside the iconv module
2003-01-06 15:47:25 +00:00
Moriyoshi Koizumi d0570815af Added more RFC2047-compliancy check in iconv_mime_decode() 2003-01-06 15:40:22 +00:00
Moriyoshi Koizumi 6f44489b68 Fixed iconv_mime_decode() so that it comforms to RFC2231 2003-01-06 15:35:42 +00:00
Georg Richter 8aeb7f35bc fixed missing & (Thx to Sebastian Bergmann) 2003-01-06 14:13:47 +00:00
Wez Furlong d23d4b366d Make it slightly more obvious that the return value is relative to the length
of the input data.
2003-01-06 14:04:23 +00:00
Wez Furlong 52a3c29e22 Fix for bug #21406; infinite loop during filter flushing. 2003-01-06 14:00:57 +00:00
Edin Kadribasic 3d9c3c6662 MFB:
Fixed bug #20503 (imagesetbrush() availability on windows).
2003-01-06 10:49:52 +00:00
Anantha Kesari H Y b3d80fe441 Removed #ifdef NetWare and made the necessary changes in the directory structure of NetWare. 2003-01-06 10:28:34 +00:00
Anantha Kesari H Y dc8b2e6ddd Header file for PostgreSQL. Moved from netware directory to netware/libpq directory. 2003-01-06 10:27:33 +00:00
Anantha Kesari H Y 4196f7d0c3 This file moved to netware/libpq directory. 2003-01-06 10:24:36 +00:00
Christian Stocker 413053aa75 - get_path forgotten in .h file
- fix crash in domxml_node_insert_before() (by Lukas Schröder)
2003-01-06 09:59:53 +00:00
Anantha Kesari H Y 159f0bcdd8 Added symbols to build PostgreSQL extension for NetWare. 2003-01-06 09:08:55 +00:00
Anantha Kesari H Y 303f888a09 Changes for NetWare makefile. 2003-01-06 09:05:59 +00:00
Anantha Kesari H Y f58016b348 Makefile added newly and modified the header file for NetWare. 2003-01-06 09:05:03 +00:00
Christian Stocker cafc0b2e59 @- Added domxml_node_get_path() (Lukas Schröder)
- Fixed segfault, when trying to add a node to itself.
2003-01-06 08:47:35 +00:00
Anantha Kesari H Y 509b4d39b5 Added #ifdef HAVE_SYSLOG_H around syslog function in the whole file to avoid link failure. 2003-01-06 05:59:17 +00:00
Anantha Kesari H Y e6003eba60 Modified for Netware. 2003-01-06 05:55:46 +00:00
Sara Golemon 999d989aa9 Added string.toupper and string.tolower filters and generalized non-op filter methods 2003-01-06 05:22:06 +00:00
Frank M. Kromann 6b0b7e3f42 Nuke warning, on Win32 build 2003-01-06 04:29:33 +00:00
Frank M. Kromann 01f5c5d6fe enable imageftbbox() and imagefttext() on WIn32 2003-01-06 04:28:49 +00:00
Sara Golemon 42e912da79 Expose stream_filters_hash so that it can be searched by stream_get_filters() 2003-01-06 04:06:40 +00:00
Edin Kadribasic e0ed7e9057 Complete gif readonly support addition by adding missing gd_gif_in.c
file to the project.
2003-01-06 01:39:08 +00:00
b38f1e162c ChangeLog update 2003-01-06 01:34:25 +00:00
Edin Kadribasic 6113d95433 Comment out non ANSI C standard comliant code. Fixes win32 build. 2003-01-06 01:26:14 +00:00
Edin Kadribasic 59b37a5ce4 Fixed win32 build. 2003-01-06 01:08:59 +00:00
Ilia Alshanetsky b52eb8f14a Fixed bug #21445. 2003-01-06 00:47:40 +00:00
Sara Golemon 7dae400063 Fixes to stream_get_wrappers() and stream_get_filters() handle hash table layouts better, plus some picune whitespace fixes 2003-01-05 22:24:49 +00:00
Georg Richter 2fbb9a5247 fixed bug #21435 2003-01-05 20:53:06 +00:00
Sebastian Bergmann c9d9e053f3 Define HAVE_GD_GIF_READ. 2003-01-05 16:32:01 +00:00
Zeev Suraski 968f3f9a12 Remove unnnecessary initialization 2003-01-05 16:11:10 +00:00
Zeev Suraski 19d47d9f6e Initialize lineno using the new infrastructure 2003-01-05 16:10:35 +00:00
Zeev Suraski cf05f34c66 MFZE1 - lineno fix 2003-01-05 16:09:59 +00:00
Sebastian Bergmann b5d97e5ddb Revert config.w32.h.in -> config.w32.h build step per discussion with Zeev. 2003-01-05 15:58:29 +00:00
Zeev Suraski a2b58500b4 Make the .dsp use the php4build build directories 2003-01-05 15:09:11 +00:00
Edin Kadribasic fc03762871 MFB:
Made xslt_set_encoding() available on windows (bug #20640).
2003-01-05 13:54:30 +00:00
Ilia Alshanetsky d5a8bb2d0b Fixed a memory leak in setlocale() & localeconv(). 2003-01-05 04:29:14 +00:00
Sara Golemon 43630e2ac0 Added stream_get_filters(); to list registered filters 2003-01-05 03:24:38 +00:00
baabdbd1ee ChangeLog update 2003-01-05 01:33:04 +00:00
Derick Rethans b816089fbf - Fix some of the netware crap 2003-01-05 00:56:17 +00:00
Derick Rethans e58c221204 - Change Warnings to Notices 2003-01-04 23:55:57 +00:00
Ilia Alshanetsky 5f36ce398e CS fixes. 2003-01-04 23:31:55 +00:00
Marcus Boerger fff1c67b56 Fix ZTS-ZE2 build 2003-01-04 20:06:32 +00:00
Marcus Boerger 6a75a52ad8 better to check for existance first 2003-01-04 19:19:59 +00:00
Marcus Boerger 2705070dd8 Fix ZTS-ZE2 build 2003-01-04 19:18:43 +00:00
Moriyoshi Koizumi 69bb505750 Forgot to include these functions in the list 2003-01-04 18:49:48 +00:00
Derick Rethans 1b5caf3b67 - Fix typo 2003-01-04 18:35:37 +00:00
Moriyoshi Koizumi 0d0127fbfb Fixed cut'n'paste failure 2003-01-04 13:52:54 +00:00
Moriyoshi Koizumi 94ad85107c NEWS update for new iconv functions 2003-01-04 13:45:03 +00:00
Moriyoshi Koizumi b13a6276e1 Added test case for iconv_mime_encode() 2003-01-04 13:39:59 +00:00
Derick Rethans 6439ad7640 - Fixed bug #21232 (Unresolved references to PQsetnonblocking). (Patch by
Floyd <floyd@studiodust.com>)
2003-01-04 12:33:46 +00:00
Martin Jansen 4343df9de2 * Update copyright year to 2003. 2003-01-04 11:56:35 +00:00
a9c558c6d3 NEWS update 2003-01-04 01:34:30 +00:00
c8b2431522 ChangeLog update 2003-01-04 01:32:59 +00:00
Alex Waugh ef8d954a0d Provide alternative for glibc brokenness test when cross compiling 2003-01-03 22:05:12 +00:00
Derick Rethans c175f3545c - Fix docrefs 2003-01-03 21:33:31 +00:00
Derick Rethans 0127c07e45 - Fix typo (patch by Joseph Tate) 2003-01-03 21:30:49 +00:00
Moriyoshi Koizumi cd2b0fe706 Added test case for iconv_mime_decode() 2003-01-03 20:33:53 +00:00
Moriyoshi Koizumi 07dcab60f0 Added test cases for iconv_strpos() and iconv_strrpos() 2003-01-03 20:02:23 +00:00
Moriyoshi Koizumi 006b455c6a Fixed an iconv_strrpos() bug that the function doesn't return accurate
position of last occurrence
2003-01-03 20:01:13 +00:00
Derick Rethans 4d3c4ab45d - Update todo 2003-01-03 19:50:41 +00:00
Derick Rethans 419af9f12a - Removed support for libmcrypt 2.2.x to allow cleaner code. Another reason
to upgrade libmcrypt to a 2.5.x series as the older ones have too much bugs
  to be safely used with PHP.
- Updated macro's, php_errors and parameter parsing.
@- Removed support for libmcrypt 2.2.x to allow cleaner code. Another reason
@  to upgrade libmcrypt to a 2.5.x series as the older ones have too much bugs
@  to be safely used with PHP. (Derick)
2003-01-03 19:49:44 +00:00
Ilia Alshanetsky f99fa7170e Fixed a bug that would cause flock() to never set the 3rd argument.
CS fixes & switched to new parameter parsing API.
2003-01-03 18:33:28 +00:00
Ilia Alshanetsky 71ab7dfccc Fixed a memory leak that occurs if the location specified by redirect header
cannot be opened.
2003-01-03 17:12:35 +00:00
Ilia Alshanetsky c52cdad25a Further fixes related to bug #21267. 2003-01-03 17:05:16 +00:00
Anantha Kesari H Y 2e52c112df Modified for NetWare. 2003-01-03 16:06:02 +00:00
Anantha Kesari H Y c1498d7a15 Modifications for NetWare. 2003-01-03 15:59:02 +00:00
Anantha Kesari H Y 38a319e3c6 New file added for NetWare. 2003-01-03 15:39:43 +00:00
Anantha Kesari H Y 2a8abc7de5 Some existing files modified and a couple of files removed for NetWare. 2003-01-03 15:21:33 +00:00
Anantha Kesari H Y a53ff6ff54 NetWare related changes/modifications. 2003-01-03 15:17:43 +00:00
Anantha Kesari H Y 830298beb8 Modified for NetWare. 2003-01-03 14:37:42 +00:00
Anantha Kesari H Y 32ef849171 Modified for NetWare. 2003-01-03 14:31:31 +00:00
Moriyoshi Koizumi 3149fc7c40 Added offset validity check for iconv_strpos() 2003-01-03 14:29:49 +00:00
Anantha Kesari H Y 9c3f39a074 New file added for NetWare. 2003-01-03 14:24:34 +00:00
Anantha Kesari H Y 90ba724072 Modified for NetWare. 2003-01-03 14:24:07 +00:00
Anantha Kesari H Y 3e2f1526bc A new file added and some old files modified for NetWare. 2003-01-03 12:48:14 +00:00
Edin Kadribasic a1402eebf1 Checking in files for Ananth Kesari <hyanantha@novell.com> 2003-01-03 12:15:36 +00:00
Anantha Kesari H Y ee5884ef39 File modified for NetWare. 2003-01-03 11:53:09 +00:00
Anantha Kesari H Y ad7aa57e27 A few New files added and some old files modified for NetWare. 2003-01-03 11:46:20 +00:00
Anantha Kesari H Y 452389df71 New files added for NetWare. 2003-01-03 11:40:52 +00:00
Anantha Kesari H Y 72a35f8a4b New file added for NetWare. 2003-01-03 11:36:57 +00:00
Anantha Kesari H Y afaf7cc24e File modified for NetWare. 2003-01-03 11:36:24 +00:00
Anantha Kesari H Y f4543e57f4 New file added for NetWare. 2003-01-03 11:12:40 +00:00
Derick Rethans 8f82834a79 - Update this one as well 2003-01-03 10:52:23 +00:00
Derick Rethans 32254e0938 - Remove double "Win32 COM" functions line 2003-01-03 10:48:38 +00:00
Derick Rethans 530e7120b2 - Whitespace 2003-01-03 10:39:22 +00:00
Anantha Kesari H Y 12192da2c4 Modified for NetWare. 2003-01-03 08:34:34 +00:00
Sara Golemon 7b37272381 Added stream_get_wrappers() 2003-01-03 08:02:36 +00:00
Moriyoshi Koizumi f76df0ba1b Added test cases for iconv_strlen() and iconv_substr() 2003-01-03 05:48:51 +00:00
Moriyoshi Koizumi a3330b5ab3 Fixed iconv_mime_decode() so it would give more awareness to stateful codesets 2003-01-03 05:38:50 +00:00
Moriyoshi Koizumi e1dd919204 Fixed infinite loop of iconv_mime_encode() in case the specified line length is too short to contain a proper mime-encoded string 2003-01-03 05:34:05 +00:00
Moriyoshi Koizumi c703ad78d0 Give mo' shift-sequence awareness to iconv_mime_encode 2003-01-03 05:32:13 +00:00
Moriyoshi Koizumi 354a42fd5f More shift-sequence awareness for iconv_substr() 2003-01-03 05:28:25 +00:00
Moriyoshi Koizumi 1f8cee7666 Added missing casting operators 2003-01-03 05:26:44 +00:00
Moriyoshi Koizumi bf48e7bc9f MFB 2003-01-03 05:16:12 +00:00
Moriyoshi Koizumi 6144a7288e MFB: fixed shift-out sequence unawareness issue 2003-01-03 05:14:34 +00:00
Moriyoshi Koizumi f962ba6abb Fixed small leaks in array_map() in case the first parameter is NULL like
array_map(NULL, array(...));
2003-01-03 05:05:12 +00:00
449029d2df ChangeLog update 2003-01-03 01:37:02 +00:00
Harald Radi f1f96c86d1 fixing typo 2003-01-03 00:17:41 +00:00
foobar c74f56611b - Removed entries that are going to 4.3.1
- Grouped the entries a bit.
2003-01-03 00:06:23 +00:00
Stig Bakken 7f41f5d586 * allways fall back to PHP_SYSCONFDIR 2003-01-02 23:48:32 +00:00
Ilia Alshanetsky f65e8488d7 Fixed a small memory leak when a NULL variable is passed to
openssl_csr_sign() as the first argument.
2003-01-02 21:18:59 +00:00
d4f9701392 ChangeLog update 2003-01-02 20:00:47 +00:00
Ilia Alshanetsky 0ff59a1353 Fixed bug #21338 (crash inside html_entity_decode() when "" is passed).
Added test case for the bug.
2003-01-02 19:49:30 +00:00
Ilia Alshanetsky b46352043c Raise required OpenSSL version to 0.9.6. 2003-01-02 19:20:57 +00:00
174f6b6f88 rotate changelog 2003-01-02 18:48:06 +00:00
Derick Rethans b9e54cb693 - Fixed bug #21169: Compile Failure, and lots of warnings on UnixWare 2003-01-02 18:01:10 +00:00
Anantha Kesari H Y 455257974b NetWare related changes/modifications. 2003-01-02 14:29:00 +00:00
Zeev Suraski 895b5fc2b6 Fix .dsp 2003-01-02 14:19:29 +00:00
Zeev Suraski 77208ec4d6 Fix incorrect linkage of access-levels, when using private methods 2003-01-02 13:58:08 +00:00
Derick Rethans da9eb594c6 - Fix warnings on UnixWare 2003-01-02 13:31:10 +00:00
Derick Rethans 19ae16a693 - Fix "make test" when CC was set to something with a parameter 2003-01-02 13:01:33 +00:00
Frank M. Kromann 4da2e804e0 Allow base64 functions to be called from an extension buils as .so/.dll (iconv) 2003-01-01 18:11:18 +00:00
Zeev Suraski 70446a6416 build fixes 2003-01-01 13:26:17 +00:00
Derick Rethans 6197460836 - Fix tests if Zend Optimizer is loaded 2003-01-01 12:43:59 +00:00
Zeev Suraski 9b09ba614d Win32 build fix 2003-01-01 12:38:55 +00:00
Sebastian Bergmann a5f58cd6e5 Add filter.c, user_filters.c. Group stream related sources. 2003-01-01 12:36:43 +00:00
Sebastian Bergmann 0ab3a13612 Fix warnings. 2003-01-01 12:36:06 +00:00
Wez Furlong 97a0102b81 Tidy up 2003-01-01 11:21:40 +00:00
Wez Furlong f58628ca4d Move rot13 filter into a new filters.c source file.
Tidy up some other filter related code.

# win32 -> someone please add user_filters.c and filters.c to the .dsp
2003-01-01 11:04:44 +00:00
Stanislav Malyshev 30dafe2f42 use handler for Z_OBJPROP 2003-01-01 10:57:35 +00:00
Wez Furlong a28eaf64d0 Workaround for glibc 2.2.9x and later "a+" bug that does not seek to EOF for
files fopen()ed with that mode.
2003-01-01 09:58:17 +00:00
Zeev Suraski 57b9b0112d Fix Wez's problem 2003-01-01 09:34:39 +00:00
Moriyoshi Koizumi c4e8b2baab Added various functions that relies on the iconv facility:
iconv_strlen(), iconv_substr(), iconv_strpos(), iconv_strrpos(),
iconv_mime_encode(), iconv_mime_decode()

# hope this be a new year gift for you. Happy new year!
2002-12-31 19:13:16 +00:00
Wez Furlong 350b0bbeac Implement user-space filters.
See ext/standard/tests/file/userfilters.phpt for an example of their use.
2002-12-31 18:39:36 +00:00
Sebastian Bergmann 61ce6bc8f1 Bump year. 2002-12-31 16:18:29 +00:00
Sebastian Bergmann b506f5c8f8 Bump year. 2002-12-31 16:08:15 +00:00
Sebastian Bergmann 2c5d4b8c23 Bump year. 2002-12-31 15:59:15 +00:00
Rasmus Lerdorf f88e29bc0d Fix for bug #21311 2002-12-31 15:18:52 +00:00
Wez Furlong abc4b4bb99 Fix for #21304 (gzopen did not report errors on open; "a" mode broken) 2002-12-31 11:42:15 +00:00
Stanislav Malyshev 8814f36692 fix level of indirection 2002-12-31 09:42:28 +00:00
a6abc8f812 NEWS update 2002-12-31 01:33:05 +00:00
Ilia Alshanetsky 87e598e835 Changed ifdef to if. 2002-12-31 00:10:57 +00:00
Ilia Alshanetsky 87a8b04051 Fix ZTS build. 2002-12-31 00:04:52 +00:00
Ilia Alshanetsky 6f6bc82de7 Fixed bug #21045 (Apache 2 SAPI now supports the mod_php_memory_usage
log variable that allows users to log the memory usage of their PHP scripts).
2002-12-30 23:45:18 +00:00
Ilia Alshanetsky bfea989d21 Bug fixing news. 2002-12-30 19:48:24 +00:00
Ilia Alshanetsky 0acb52fc3b Fixed bug #21228 (broken check for ob_gzhandler).
Fixed a bug that made ob_start return incorrect return value.
2002-12-30 19:39:31 +00:00
Marcus Boerger 67f0a6f6c0 testing default handler should be a separate test 2002-12-30 19:20:11 +00:00
Marcus Boerger 9c2871a673 missing dba entry 2002-12-30 19:18:52 +00:00
Andrei Zmievski 4f8c44b091 Adjust the error message. 2002-12-30 18:30:50 +00:00
Marcus Boerger 33f364b5fc update dba NEWS 2002-12-30 17:58:15 +00:00
Marcus Boerger aa8e5cdde7 -disallow using db-<n> with libraries of different major versions
-disallow using db-4.1 with patch level < 25
-fix db-4.1
-added undocumented DB_FCNTL_LOCKING flag for version 3 and 4
# wow the sleepycat guys answered *very* fast
2002-12-30 17:42:55 +00:00
Stanislav Malyshev 0af3b5a692 Oops, fix it indeed 2002-12-30 17:19:32 +00:00
Stanislav Malyshev 37571334d9 Better check 2002-12-30 17:17:41 +00:00
a5ad437af8 Update. 2002-12-30 16:47:04 +00:00
Ilia Alshanetsky bd19dabefe Fixed bug #21226 (parse_url handling of urls without a path). 2002-12-30 16:42:49 +00:00
Derick Rethans d454becda8 - Whitespace 2002-12-30 15:03:50 +00:00
Derick Rethans eb8b1ac923 - euch 2002-12-30 14:08:25 +00:00
Marcus Boerger 32dda8b0cb ws 2002-12-30 13:09:03 +00:00
Marcus Boerger 4d2f7207c0 Add info function to handlers and return handler info when dba_handlers is
called with optional parameter full_info set true.
2002-12-30 13:07:30 +00:00
Marcus Boerger 426cf8eb57 fix state-machine in cases T_AAAA is not available 2002-12-30 11:59:22 +00:00
Marcus Boerger a213c71735 2nd part of the patch 2002-12-30 11:43:18 +00:00
Marcus Boerger 4b9e8fc899 -better parameter names for DBA_HND macros
-remove unnecessary notice
2002-12-30 11:32:37 +00:00
Derick Rethans e76d0043da - Align mssql comment and clarify DBA handler selection 2002-12-30 08:55:21 +00:00
Ilia Alshanetsky 1f50681813 Fixed bug #21149 (fixed handling of unterminated '['). 2002-12-29 21:02:17 +00:00
Ilia Alshanetsky 88d26985b8 Fixed bug #21267 (opening URLs that result in redirection to a relative
path was failing).
2002-12-29 20:01:33 +00:00
Ilia Alshanetsky c731daeda7 Fixed bug #21268 (session_decode() returned FALSE on success). 2002-12-29 18:50:55 +00:00
Zeev Suraski ac1133d364 Remove bogus ignores 2002-12-29 15:42:55 +00:00
Zeev Suraski 758caa9ba2 Update .dsp's 2002-12-29 15:41:44 +00:00
Marcus Boerger c69d034a87 Added support for db3/db4 error handling/information 2002-12-29 15:32:38 +00:00
Marcus Boerger 9b22813c4d Add a default handler that makes handler parameter to open functions
optional.
@Improved dba extension (Marcus)
@-Made handler parameter of dba_(p)open() optional.
@-Added php.ini option 'dba.default_handler' to specify a default handler.
2002-12-29 15:31:00 +00:00
Sara Golemon 45ff90cb18 Typo. 2002-12-28 19:40:03 +00:00
Sara Golemon 072d5c2575 When scanning for cc: headers, make sure the header is JUST cc: and not bcc: or original-cc: or <anything-printable>cc:
See Bugs # 21036 and # 20707
2002-12-28 19:32:45 +00:00
Sascha Schumann 955b27cd64 Fix order of library additions, so that the imap extension now builds
successfully with static imap/ssl libs.  configure was already failing
before.
2002-12-28 15:33:25 +00:00
Ilia Alshanetsky 8315a525ca Fixed bug #21229 (missing 3rd argument to php_module_startup). 2002-12-28 06:59:24 +00:00
Ilia Alshanetsky 097055a862 Make the version code get the version from the current Apache, rather then
the Apache PHP was compiled against.
2002-12-27 23:05:15 +00:00
Ilia Alshanetsky 648dd88b42 Added apache_get_version() & apache_get_modules() to Apache 1.X & Apache
Hooks sapis.
Made the module listing in Apache 2 not show the '.c' portion, to be
consistent with Apache 1.X.
2002-12-27 22:47:06 +00:00
Ilia Alshanetsky 572394db74 Added MINFO() to Apache 2, which displays the Apache version & all of the
loaded Apache modules.
Added apache_get_version() & apache_get_modules() functions.
2002-12-27 22:02:17 +00:00
Ilia Alshanetsky c955910ea0 Bug fixing news. 2002-12-27 20:23:29 +00:00
Ilia Alshanetsky 967d64ade5 Fixed bug #17098 (make Apache aware that PHP scripts represent dynamic data
and should not be cached). Fix suggested by daniel.eckl@gmx.de.
2002-12-27 19:59:09 +00:00
Stig Bakken ff8adda7c6 * 1.0 release notes 2002-12-27 19:31:56 +00:00
Stig Bakken 25684764cc * added "clear-cache" command 2002-12-27 19:31:37 +00:00
Stig Bakken 1d42e34c1b * 1.0 release 2002-12-27 19:01:19 +00:00
Stig Bakken d63ef03d7b * 1.0 version 2002-12-27 17:19:31 +00:00
Ilia Alshanetsky 22a2636d9d Made DBA tests not dependant on error reporting settings. 2002-12-27 04:46:40 +00:00
c9b374f8e0 Update. 2002-12-27 04:03:10 +00:00
Edin Kadribasic 586f68d820 Mention the fact that zlib extension is now built-in in win32 distro. 2002-12-27 03:16:01 +00:00
Edin Kadribasic a3c2f80d72 Resolved apperent cvs commit confict. 2002-12-27 02:55:37 +00:00
ebe402a9c3 NEWS update 2002-12-27 01:32:47 +00:00
c52bcebc09 ChangeLog update 2002-12-27 01:32:29 +00:00
Ilia Alshanetsky 3283752055 Bug fixing news. 2002-12-27 00:09:13 +00:00
Derick Rethans f3d3dd5bc8 - MFB 2002-12-26 23:45:05 +00:00
Georg Richter 4abcff7631 added Wez, Ilia & myself 2002-12-26 23:38:18 +00:00
Wez Furlong bb640840c3 Remove cruft that opened a stream that was never closed in get_meta_tags().
(probably my fault).
Noticed by Philip Olson
2002-12-26 22:35:00 +00:00
Sterling Hughes 457f22c198 if needle is empty free allocated memory 2002-12-26 20:52:42 +00:00
Sterling Hughes ca67d27fb2 remove memleak 2002-12-26 19:56:44 +00:00
Marcus Boerger 4041d4faed Add missing test for db4 handler 2002-12-26 19:55:06 +00:00
Andrei Zmievski 4121057117 do_inherit_method_check() is supposed to return 0 or 1, not SUCCESS or
FAILURE.
2002-12-26 16:27:59 +00:00
Edin Kadribasic 46219c714d MFB:
Made ZLIB extension built in on Windows. Fixes #21139.
2002-12-26 13:40:32 +00:00
03132bff12 ChangeLog update 2002-12-26 01:33:49 +00:00
George Schlossnagle 190867c800 fixed ws 2002-12-25 21:18:37 +00:00
George Schlossnagle abbf745211 fix for 21177 2002-12-25 20:38:37 +00:00
Derick Rethans b996b32031 - Add test for bug #21182 2002-12-25 20:08:36 +00:00
Ilia Alshanetsky fbcee73c8c Make range operate on the copies of the parameters rather then modify the
actual parameters.
2002-12-25 20:02:03 +00:00
33bdabbee2 ChangeLog update 2002-12-25 01:34:22 +00:00
Stefan Esser 66ebbb5ae1 fix compile warning 2002-12-24 23:46:17 +00:00
Stefan Esser e900f8c97b do correct casting 2002-12-24 23:28:05 +00:00
Ilia Alshanetsky 2e6e0f87dc Removed pointless assignment. 2002-12-24 23:19:54 +00:00
Ilia Alshanetsky 0a2d473df0 The -1 is no longer needed, since it is done automatically by strlcpy(). 2002-12-24 17:33:33 +00:00
Ilia Alshanetsky a747d1f864 Changed strncpy() to strlcpy(). 2002-12-24 17:30:48 +00:00
Ilia Alshanetsky 59b6ffee1e A variety of CS style fixes, which include:
* Changed all argument parsing to use the new zend_parse_parameters()
 * If a function is unavailable due to lack of support for a certain feature,
   do not make the function avaliable, rather then making it print an error
   saying that the functionality offered by the function is not avaliable.
 * Lots of WS fixes all over the file.
 * Change strcpy() to strncpy() to prevent possible buffer overflows.
Fixed a bug in ncurses_pair_content(), 1st parameter was wrong.
Fixed several function prototypes that failed to indicate that functions
accepted arguments by reference.
2002-12-24 17:20:33 +00:00
eb668bcd9b ChangeLog update 2002-12-24 01:31:43 +00:00
Melvyn Sopacua 0764c3101b Verify if gl_pathv is not NULL, which it is, when GLOB_NOMATCH isn't
supported and there are no matches.

# BSDi/Mac OSX are affected.
2002-12-23 18:33:46 +00:00
Stefan Esser 0bb1ff71d6 fix compile error on IRIX 2002-12-23 08:50:05 +00:00
Edin Kadribasic f13ecb9832 MFB:
Ignore the new name of the binary built. Allows cvsclean to work again
in sapi/cgi.
2002-12-23 03:35:38 +00:00
Wez Furlong 05ea039144 MFB: fpos_t -> off_t 2002-12-23 02:56:46 +00:00
d5b8ef54e9 ChangeLog update 2002-12-23 01:33:10 +00:00
Ilia Alshanetsky af55703d52 Fixed various memory leaks.
# Should this be MFHed?
2002-12-22 20:16:37 +00:00
Moriyoshi Koizumi 45f67837e6 Removed "%s" from format strings 2002-12-22 19:51:49 +00:00
Ilia Alshanetsky 0ae3050aa5 Fixed bug #21146. 2002-12-22 19:44:01 +00:00
Moriyoshi Koizumi d70f96550c php_error => php_error_docref 2002-12-22 19:16:09 +00:00
Moriyoshi Koizumi 9b3f810564 WS fix 2002-12-22 19:05:06 +00:00
Moriyoshi Koizumi dcc030f5ef Fixed bug #21144 2002-12-22 19:01:44 +00:00
Wez Furlong c5091eedf1 Forgot to include this in my previous commit for #21131 fix. 2002-12-22 18:06:27 +00:00
Wez Furlong efea12fec5 Fix for Bug #21131: fopen($file, 'a+') would incorrectly assume that
the stream position was at offset 0.
This corrects that assumption by querying the stream for it's position
when it detects the 'a' "flag" in the mode parameter to fopen.
Also added a test for plain files and amended the userstreams test to
take this into account.
2002-12-22 18:05:36 +00:00
Sascha Schumann 20e8bc31f0 (char *) vptr += expr; is refused by the IRIX compiler, so we use
vptr = (char *) vptr + expr; instead.
2002-12-22 16:34:13 +00:00
Sascha Schumann 280f4a4373 'index' is a function name in the C library, do not use it as variable name.
also, cast the 'void *' correctly to a 'char *' for manipulation
instead of an 'int'.
2002-12-22 16:03:28 +00:00
Wez Furlong 90c478664a 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:55:45 +00:00
Melvyn Sopacua e03bccb1ad Delete some security related env variables 2002-12-22 12:48:49 +00:00
f023f6f8fc ChangeLog update 2002-12-22 01:33:28 +00:00
Stig Bakken aded559898 * Windows fix from Edin 2002-12-22 01:32:01 +00:00
Stig Bakken c4ddda3e23 * set default xml-rpc cache ttl to 1 hour 2002-12-22 01:31:13 +00:00
Frank M. Kromann ca4a0cdb8a Create php.exe in cli directory to avoid conflict with the cgi version 2002-12-21 22:43:47 +00:00
Edin Kadribasic 17687a4fff MFB:
Updated list of bundled windows extensions compiled by
Christoph Grottolo <cg@gordimer.net>
2002-12-21 22:19:51 +00:00
Edin Kadribasic 473366d6e7 MFB: Reflect recent changes to the build process. 2002-12-21 22:05:55 +00:00
Moriyoshi Koizumi 9dc6f0c5f2 Made auth information inaccessible under safe mode as discussed in the list 2002-12-21 21:50:28 +00:00
Melvyn Sopacua 2169eb2ccc MFB: There won't be a warning/fix on this, so remove the test 2002-12-21 21:01:52 +00:00
Ilia Alshanetsky 29d507d224 Moved the bug fix news entry to 4.3.0 section, to indicate that it has been
MFHed.
2002-12-21 20:37:17 +00:00
Andrei Zmievski 2feb1cf6d7 MFB. 2002-12-21 20:12:08 +00:00
Ilia Alshanetsky da498edd5e Bug fixing news & range() changes. 2002-12-21 18:06:04 +00:00
Ilia Alshanetsky 98e85ae80b Fixed bug #20987 (no handling for client certificates). 2002-12-21 18:03:46 +00:00
Derick Rethans 16e5459f94 MFB: Fix typo 2002-12-21 17:48:37 +00:00
Melvyn Sopacua 9dc1412e46 MFB: Skip the test, until a proper descision is made 2002-12-21 16:58:23 +00:00
Moriyoshi Koizumi 4456b3274f WS 2002-12-21 06:34:31 +00:00
Moriyoshi Koizumi f4883b916c Added some notes about the brigade bug detection 2002-12-21 06:33:19 +00:00
550aedb63d ChangeLog update 2002-12-21 01:34:00 +00:00
Andrei Zmievski 64ab75c206 *** empty log message *** 2002-12-21 01:11:44 +00:00
Andrei Zmievski ddea2a190f Alias dba_popen() to dba_open() until persistent STDIO streams are
implemented.
2002-12-21 01:09:27 +00:00
Sascha Schumann 76a158a336 test commit 2002-12-20 20:53:10 +00:00
Stefan Esser e4e299614e need more space 2002-12-20 19:37:07 +00:00
Georg Richter d5f02c553b fixed some warning when using external 4.x libs 2002-12-20 18:52:27 +00:00
Frank M. Kromann ad69583ba1 Fixing Win32 build by adding missing libraries 2002-12-20 18:40:31 +00:00
Sara Golemon 13308b5a94 Minor clarification in meaning of bitmask constants
/* PHP_DNS_xx = 1<<(T_xx-1) */
T_CNAME = 5 ergo PHP_DNS_CNAME should be 0x00000010.
T_SOA = 6 ergo PHP_DNS_CNAME should be 0x00000020.
2002-12-20 18:34:56 +00:00
Marcus Boerger efd314e767 -Fix memory handling of persistent dba connections.
-Update tests.
# cdb and flatfile still FAIL for dba_popen since the known streams problem
2002-12-20 17:47:58 +00:00
Frank M. Kromann 710e49a30b Make sure the debug version is created in the right directory 2002-12-20 17:34:34 +00:00
Ilia Alshanetsky 3a4bf3f904 When low & high are the same return an array containing the low value.
Added support for float values and handling of numeric values being passed
as strings.
Added a test case for range().
2002-12-20 17:16:31 +00:00
Marcus Boerger d795243db3 @Make uniqid() parameters optional and allow any prefix length. (Marcus) 2002-12-20 17:06:25 +00:00
Marcus Boerger 8652e8ac27 MFB 2002-12-20 17:04:33 +00:00
Andrei Zmievski c45f76112f At least this problem exposed some leaks.. 2002-12-20 16:45:34 +00:00
Marcus Boerger 26038795f8 -disable uniqid() when required lib functions not available
-emit an error when uniqid() will fail
-make more_entropy parameter default to true for CYGWIN
2002-12-20 16:34:42 +00:00
Moriyoshi Koizumi 740ee5df1c Recommited the patch 2002-12-20 15:51:35 +00:00
Sterling Hughes 3cb16973ef silly error, will MFH 2002-12-20 15:44:51 +00:00
Edin Kadribasic 3c94150191 MFB: Make sure cli install dir is created before trying to install in it. 2002-12-20 10:12:15 +00:00
Andi Gutmans a58e6cc8ad - Add comment in macro and remove some now unneeded code 2002-12-20 08:42:50 +00:00
James Cox 6f6631ad14 testing cvs commit.. 2002-12-20 07:08:47 +00:00
84b107924d ChangeLog update 2002-12-20 01:34:57 +00:00
Ilia Alshanetsky 709681e085 Make IS_ABSOLUTE_PATH use the IS_UNC_PATH macro rather then duplicate the
code in the IS_UNC_PATH macro.
2002-12-20 00:41:41 +00:00
Melvyn Sopacua a4d56067e2 MFB: libtool detection 2002-12-20 00:28:08 +00:00
Wez Furlong 602734c7d9 Correct mistake introduced by my last commit on these files;
*_from_pipe() is for process-pipes created by fopen, not generic pipes
created from proc_open().
Correctly implemented the fifo/pipe check for *_from_file() and it seems
to be working correctly now.
2002-12-19 20:23:50 +00:00
Edin Kadribasic 183ebe3e14 MFB:
Making windows build system changes according to proposal:
http://news.php.net/article.php?group=php.dev&article=92682
2002-12-19 18:30:14 +00:00
Ilia Alshanetsky 594c3808d4 Fixed bug #21098. 2002-12-19 17:06:36 +00:00
Edin Kadribasic d29309eb68 MFB:
Making build system changes according to proposal:
http://news.php.net/article.php?group=php.dev&article=92682
2002-12-19 17:02:40 +00:00
Moriyoshi Koizumi 58037935f6 Appended "\n" as suggested by Derick. 2002-12-19 15:29:09 +00:00
Anantha Kesari H Y c93d64375d NetWare related files added and changes/modifications done for the existing ones. 2002-12-19 11:24:45 +00:00
Anantha Kesari H Y 854721d723 NetWare related changes/modifications. 2002-12-19 11:23:58 +00:00
Anantha Kesari H Y e46b0bfa79 Netware related changes/modifications. 2002-12-19 11:12:04 +00:00
Edin Kadribasic 2fc8358e3a MFB: Remove dependancy on libtool library which is no longer needed. 2002-12-19 10:49:05 +00:00
1a30bfd76c ChangeLog update 2002-12-19 01:33:16 +00:00
Edin Kadribasic ff54f76f71 MFB: Reverted previous patches as suggested by Andi. 2002-12-19 00:13:43 +00:00
Moriyoshi Koizumi d2fa4670dc Prevented test failure caused by LF code variety 2002-12-18 23:06:27 +00:00
Moriyoshi Koizumi fdded38816 Added a test case for bug #20539 2002-12-18 22:54:34 +00:00
Pierre Joye baea3414a3 Fix a crash while using an invalid color with imagesetstyle, see the sample
script in the manual to reproduce it :)
2002-12-18 21:13:21 +00:00
Moriyoshi Koizumi 978340cfa5 An intuitive attempt to hunt the bug. 2002-12-18 19:32:44 +00:00
Moriyoshi Koizumi 1bfa8be474 Added entry for the new feature of array_search() 2002-12-18 16:38:36 +00:00
9e4d2d4594 Update 2002-12-17 19:52:24 +00:00
532ed0edf3 Finally put the changelog back online. 2002-12-17 19:48:17 +00:00
Derick Rethans 8507eb00f6 - Also send reports when there are no failed tests 2002-12-17 19:07:15 +00:00
Frank M. Kromann e93a1a92ec Fixing WIn32 build after adding support for FreeTDS 2002-12-16 22:44:08 +00:00
Frank M. Kromann 5664a358fa Allow the native MSSQL extension to be compiled with FreeTDS on *nix platforms.
This will make the whole MSSAL API available on these platforms.
@Allow compilation of mssql extension on *nix.
2002-12-16 22:26:49 +00:00
Stig Bakken 24975495a7 * fix one missing DIRECTORY_SEPARATOR and a typo 2002-12-16 20:44:50 +00:00
Sergey Kartashoff afa0e1e03e - mnogosearch extension updated to compile with mnogosearch-3.2.8 2002-12-16 19:17:10 +00:00
Marcus Boerger 59656cc706 fix compiler definition tests 2002-12-16 17:52:43 +00:00
Marcus Boerger 50af908f01 fix compiler definition tests 2002-12-16 15:53:46 +00:00
Ilia Alshanetsky 5bad812dad A better, strtok() free implementaion of php_disable_functions(). 2002-12-16 15:43:52 +00:00
Marcus Boerger 2d3b3fd97f fix test 2002-12-16 15:19:57 +00:00
Marcus Boerger 9042a9ddbd Add version check since this will be available since php 4.4. 2002-12-16 15:04:12 +00:00
Marcus Boerger da1a617f6b forgot to remove that dot 2002-12-16 14:54:35 +00:00
Marcus Boerger 5dc4d38204 -Add constant that shows whether or not exif uses mbstring.
-Fix tests
2002-12-16 14:48:00 +00:00
Sascha Schumann e5b86174af CFLAGS_CLEAN was not properly defined 2002-12-16 13:39:27 +00:00
Marcus Boerger 6e055f9a77 change mbstring detection 2002-12-16 09:58:49 +00:00
Derick Rethans d8f86e725a - MFB 2002-12-16 09:11:00 +00:00
Ilia Alshanetsky f620fdbed3 A better memory leak patch. 2002-12-16 07:46:36 +00:00
Marcus Boerger c1be81a84e ws 2002-12-15 18:49:07 +00:00
Marcus Boerger 05436b1378 MFB: gd uses float instead of double 2002-12-15 18:16:11 +00:00
Ilia Alshanetsky cc4748139c Close log file on shutdown. 2002-12-15 07:03:32 +00:00
Ilia Alshanetsky 078dfe8d57 Fixed a memory leak. 2002-12-15 06:44:30 +00:00
Ilia Alshanetsky 11dbaa39d6 MFZE2 2002-12-14 23:56:44 +00:00
Marcus Boerger 16694d3500 Fix build when mbstring is a shared module or dll under windows 2002-12-14 19:53:20 +00:00
Pierre Joye 137beb12ca Do not allow AA if not trueColor (imageantialias does nothing) 2002-12-14 19:23:29 +00:00
Marcus Boerger 9455657a7a Bugfix: #21010 (Here it's maker (manufacturer) instead of marker) 2002-12-14 17:49:19 +00:00
Stefan Esser 75d8056e11 cleanup 2002-12-14 10:45:25 +00:00
foobar c07f7c8df8 MFB: Fix bug #20995 2002-12-14 09:33:37 +00:00
Melvyn Sopacua 43202b5b95 Add testcase for bug #20993 2002-12-13 18:40:39 +00:00
Marcus Boerger ac96f76730 Add missing entry 2002-12-13 12:04:30 +00:00
Marcus Boerger c633abdc7f Fix cli build for cygwin 2002-12-13 10:32:03 +00:00
Marcus Boerger 95c701d328 MFB: ZTS fix by Ilia 2002-12-13 09:17:04 +00:00
Vlad Krupin e969d788bf Fix for bug 19727. dBase5 (at least for windows) seems to allow 1024 fields 2002-12-13 03:09:52 +00:00
Stig Bakken 854b9b9ac1 * update release notes, remove warning 2002-12-13 02:20:33 +00:00
Stig Bakken 3396ace7cb * fix version/date 2002-12-13 02:11:23 +00:00
Stig Bakken 976aef1ccf * introduce php_bin config parameter
* use PHP_PEAR_<PARAM_NAME> environment variables for defaults
  (for example PHP_PEAR_PHP_DIR)
* Windows cleanups
2002-12-13 02:10:23 +00:00
Stig Bakken e5dd8161e6 * _parseArgs bugfix 2002-12-13 02:07:22 +00:00
Moriyoshi Koizumi 92d5faca60 MFB 2002-12-12 21:44:53 +00:00
Moriyoshi Koizumi d679e5d2aa Added a test case for bug #20934 2002-12-12 21:42:17 +00:00
Stefan Esser 7924bf8705 remove extra char in case of binary/money fields 2002-12-12 21:30:39 +00:00
Ilia Alshanetsky 7a282ddcfd Fixed bug #20974 (added missing sanity check). 2002-12-12 21:17:36 +00:00
Melvyn Sopacua 44b7c16b03 Fix for BSD's (possibly others):
Accept system default, for the index. Don't initialize it.
2002-12-12 18:50:26 +00:00
Wez Furlong c5d4e4b321 MFB: popen/pclose and proc_open/proc_close fixes. 2002-12-12 17:51:25 +00:00
Ilia Alshanetsky 2d8945247b Fix a possible E_NOTICE warning message. 2002-12-12 16:14:32 +00:00
Wez Furlong 81c02040f0 Attempt to add more entropy for key generation. 2002-12-12 15:50:11 +00:00
Wez Furlong 3591c3b8e9 MFB streams news 2002-12-12 15:24:00 +00:00
Ilia Alshanetsky 53b333d153 Fixed misspelling of the Greek letter lambda,
noticed by jmartin-php@notamusica.com.
2002-12-12 14:50:58 +00:00
Marcus Boerger c2078cdabf php_error -> php_error_docref conversion fix (noticed by derick) 2002-12-12 14:12:42 +00:00
Ilia Alshanetsky e27f3fc7e1 Bug fixing news. 2002-12-12 13:52:26 +00:00
Moriyoshi Koizumi d0c781cc84 Jani happification 2002-12-12 13:44:18 +00:00
Wez Furlong 1ef74a4f79 Patch for #20936 (openssl: public key handling was broken).
Thanks to <jeroen@derks.it> for the patch.
2002-12-12 13:42:23 +00:00
Ilia Alshanetsky 75c180f242 Fixed bug #20927 and updated the test case for the bug. 2002-12-12 13:38:19 +00:00
Moriyoshi Koizumi 131c47b75d Bug fixing news 2002-12-12 13:31:19 +00:00
Moriyoshi Koizumi 3bbcb0d0dd Fixed bug #20934 (htmlspecialchars returns latin1 from UTF-8) 2002-12-12 13:25:51 +00:00
Marcus Boerger a40ccefd32 php_error -> php_error_docref 2002-12-12 13:08:59 +00:00
Marcus Boerger 53309aace0 SIGIOT may not be defined in cygwin 2002-12-12 12:23:32 +00:00
Marcus Boerger 835c4dedbb typeconversion is needed here for cygwin 2002-12-12 12:18:44 +00:00
Marcus Boerger 26b101dd1b O_ASYNC is not defined in cygwin 2002-12-12 12:15:10 +00:00
Edin Kadribasic 8eb1791790 MFB: DOM/XSLT support in win32 build (bug #20485). 2002-12-12 10:56:33 +00:00
Ilia Alshanetsky 8227141218 GD library news. 2002-12-11 23:11:31 +00:00
Ilia Alshanetsky 20bc6a09e0 Added check for availability of jpeg support. 2002-12-11 22:37:05 +00:00
Ilia Alshanetsky 67aca57c3b Fixed build with non-bundled GD. Hidden the anti-alias functions when
non-bundled GD is used and made imagecreatefromxpm() unavailable because
of a bug in the external GD library.
2002-12-11 22:25:23 +00:00
Pierre Joye 5acfdf3ca1 Fix brightness filter (argument ingnored) 2002-12-11 22:23:51 +00:00
Ilia Alshanetsky a88a99fb9d White space fixes. 2002-12-11 21:55:45 +00:00
Ilia Alshanetsky f4b5f0904b Syncronize bundled gd sources with that of gd 2.0.9, affected functions
are: gdImageBrushApply() & gdImageCopyResized().
2002-12-11 21:52:29 +00:00
Pierre Joye 983d8e5efd Add antialias flag to image structure
Add AA support
2002-12-11 20:47:26 +00:00
Pierre Joye 7ec74f64f9 Add gdImageAAline (antialiased line)
Add AA support for gdImagePolygon
2002-12-11 20:46:52 +00:00
Pierre Joye 221413e5ef Remove double definition of imagesettile
Add imageantiallias
2002-12-11 20:45:47 +00:00
Pierre Joye 4d522e3686 Add imageantialias(im, flag)
Add AA support for bundled imageline
2002-12-11 20:44:44 +00:00
Melvyn Sopacua 4b3b409b48 Add testcase for reported wordwrap bug 2002-12-11 20:22:42 +00:00
Derick Rethans c4342de561 - MFB 2002-12-11 20:13:43 +00:00
Ilia Alshanetsky 2ab549c5f2 Added missing &. 2002-12-11 20:04:23 +00:00
Ilia Alshanetsky c194d9333d Added getopt() test. 2002-12-11 17:38:28 +00:00
Ilia Alshanetsky 30f83207fe Ask the user for their e-mail address so that we can contact them if need be. 2002-12-11 16:49:00 +00:00
Sara Golemon 04d6f6ab50 Renamed bc_powmod to bcpowmod to keep it inline with existing module
functions.  Fixed whitespace problem.
2002-12-11 16:28:16 +00:00
Ilia Alshanetsky 5f9681ff80 Added missing variable to parameter retrieval. 2002-12-11 15:32:35 +00:00
foobar 3fc83fd8e3 - ws fixes
- // -> /* */ (No C++ comments in c code!)
- #if / #else / etc. have to start from first column.
2002-12-11 15:25:39 +00:00
foobar 210effe877 - Some more missing .cvsignore files. 2002-12-11 15:16:05 +00:00
foobar f059f21e96 missing entry 2002-12-11 14:45:42 +00:00
foobar cbb2c5a073 missing file 2002-12-11 14:43:33 +00:00
Rui Hirokawa 3d324676a5 fixed lack of variable initialization bug. 2002-12-11 14:39:37 +00:00
Abdul-Kareem Abo-Namous 089f1b5771 fixed string comparison which brought up a gcc warning. 2002-12-11 14:18:40 +00:00
Marcus Boerger e0c983a013 Warnings and Notices when lock modifiers for dba_(p)open are used wrong.
This finally closes bug #20828 (and i hope it must not be reopened)
2002-12-11 10:37:38 +00:00
Edin Kadribasic f84aff8f5c Fix for #20539 (patch by Moriyoshi Koizumi). 2002-12-11 10:24:02 +00:00
foobar d1d73b1b06 snow..not again.. 2002-12-11 08:54:04 +00:00
foobar 8635af07d5 Fixed bug #20298: LDFLAGS were not passed to the static apache module build 2002-12-11 08:41:45 +00:00
Georg Richter 19a13f29b0 fixed security bug in libmysql 2002-12-11 08:31:56 +00:00
Georg Richter 230f4ebb06 Security fix (merged from 3.23.54) 2002-12-11 08:28:41 +00:00
Ilia Alshanetsky 52d0f1c143 decode variable is only used when mbstring is avaliable. 2002-12-11 07:37:30 +00:00
Ilia Alshanetsky 08e020a870 ZTS fix. 2002-12-11 07:29:51 +00:00
Ilia Alshanetsky dc391673d0 Fixed compiler warning. 2002-12-11 02:51:06 +00:00
Ilia Alshanetsky 533d3273bd Fix ZTS build 2002-12-11 02:30:00 +00:00
Ilia Alshanetsky 9a24983487 On Win32 make PHP treat UNC paths as absolute paths, this should solve bugs
such as #20831. Thanks to Wez Furlong for isolating the problem.
2002-12-11 00:32:33 +00:00
Marcus Boerger a6e9674bfd add missing comment 2002-12-10 22:51:09 +00:00
Marcus Boerger b94e0d9eac LOCK_EX is not allowed in read mode -> try using existing .lck file in read
only mode only when in read mode.
2002-12-10 22:49:33 +00:00
Wez Furlong ac8469bd55 No longer experimental 2002-12-10 22:21:34 +00:00
Wez Furlong 9746be4779 use php_error_docref and tidy up some WS/coding standards. 2002-12-10 22:18:58 +00:00
Marcus Boerger 17117063ce -remove second attempt to close lock file
-default to lock on db file instead on .lck file.
-try to use existing .lck file and only create it on failure (allows ro access)
2002-12-10 22:02:52 +00:00
Marcus Boerger dbf4bcc08b stick to "check <what> <result>" scheme, do not repeat messages and
align messages correctly.
2002-12-10 21:53:02 +00:00
Stefan Esser e5dbcb0890 fixing cut&paste bug 2002-12-10 20:18:25 +00:00
Ilia Alshanetsky 60a5aeef43 Fixed a few compile warnings and one compile error. 2002-12-10 20:16:30 +00:00
Marcus Boerger d1c70a6417 directory values are optional 2002-12-10 20:11:41 +00:00
Marcus Boerger 644bd60d29 remove not wanted skeleton comment and align configure message 2002-12-10 20:09:35 +00:00
Ilia Alshanetsky 2b063828e0 Fixed build with GD 1.8.4 2002-12-10 19:45:58 +00:00
Frank M. Kromann 62fb872a4d Fixing ZTS Build 2002-12-10 19:28:04 +00:00
Sara Golemon 51c9f2c64b Added support for libbcmath's bc_raisemod function as bc_powmod() 2002-12-10 19:04:27 +00:00
Ilia Alshanetsky 91a6272972 Fixed win32 build. 2002-12-10 18:00:47 +00:00
Ilia Alshanetsky 99f2b9674f Fixed build with GD 1.8.4 2002-12-10 17:57:41 +00:00
Edin Kadribasic 28c32e1fc8 MFB: Fix ZTS build. 2002-12-10 17:07:40 +00:00
Ilia Alshanetsky e982d5c7f0 MFB 2002-12-10 16:39:59 +00:00
foobar 8416a0433a This extension requires cyrus-imap >= 2.0.8 2002-12-10 16:34:20 +00:00
Ilia Alshanetsky 3c9a6a8890 Removed one more unneeded check. 2002-12-10 15:58:31 +00:00
Ilia Alshanetsky ecc9c539d2 Removed a pointless check. Thanks Stefan. 2002-12-10 15:36:26 +00:00
Stefan Esser f481a209b7 fixing crashbug
patch by freddy77@angelfire.com
2002-12-10 15:18:01 +00:00
Marcus Boerger 26c5c323ab -make those debug messages 2002-12-10 14:35:13 +00:00
Marcus Boerger 922ce573cf -when required haeder was not found --with-cdpf was simply ignored. I
changed this to be an error.
-cpdf did not check for --with-jpeg-dir and --with-tiff-dir
2002-12-10 14:31:00 +00:00
Marcus Boerger cbab922570 "of cause" should have been "of course" but is not needed anyway
#noticed by Zeev
2002-12-10 11:21:30 +00:00
Zeev Suraski 66aba3c568 Fix check to allow for static+access level modifiers 2002-12-10 09:04:12 +00:00
Ilia Alshanetsky aa4c85dda1 Fixed bug #20907, patch by m-arai@sco.bekkoame.ne.jp. 2002-12-10 00:10:27 +00:00
Ilia Alshanetsky 04a16f914c Replaced deprecated APR_BRIGADE_FOREACH macro. 2002-12-09 18:45:32 +00:00
foobar 8a8041befe fix typos 2002-12-09 18:30:50 +00:00
foobar 31415ad2b5 Make this actually work too. 2002-12-09 18:29:22 +00:00
Wez Furlong 58210f9232 Centralize fopencookie test 2002-12-09 18:29:07 +00:00
foobar 44aec93861 Fix the build with new cyrus and sasl2 libs 2002-12-09 18:05:37 +00:00
Marcus Boerger 85f1caeb14 Recheckin as unix
# *** sorry ** a new diff tool converted it to dos before last comit *** sorry ***
2002-12-09 18:03:00 +00:00
Marcus Boerger ba534ac7c8 Added open modifier '-' to skip/ignore locking. See bug #20828, #20858 2002-12-09 17:54:13 +00:00
Melvyn Sopacua 2421e79b60 Fix make install target on Cygwin, bug #20807 2002-12-09 17:02:38 +00:00
Wez Furlong ca6b002e4c MFB: zlib stream tests 2002-12-09 16:43:15 +00:00
Wez Furlong 5029c73096 Emulate fopencookie on *BSD systems.
Patch mostly from Melvyn Sopacua <msopacua@idg.nl>
2002-12-09 16:14:28 +00:00
Moriyoshi Koizumi 4974f268a6 @- Let array_search() accept objects as a needle under ZendEngine2. (Moriyoshi) 2002-12-09 15:54:38 +00:00
Sascha Schumann 7b2fd2c6c9 Use $(INSTALL) rather than cp to install modules.
$(INSTALL) will usually unlink the target file first, so that in-memory
instances of the old file don't get simply overwritten (and crash and burn).
2002-12-09 15:32:17 +00:00
Edin Kadribasic 3994fbbc86 MFB: Fix for #20894. 2002-12-09 13:35:57 +00:00
Zeev Suraski 32b100e6cb - Allow variables to have both 'static' modifier and an access level.
NOTE:  This only works at the syntax level right now (parser).  It
         doesn't actually work as of yet - all statics are considered
         public for now
- Prevent users from putting more restrictions on methods in derived classes
  (i.e., you cannot make a public method private in a derived class, etc.)
2002-12-09 12:10:17 +00:00
foobar 085f362ae3 T_AAAA is not always available. 2002-12-09 11:50:15 +00:00
Sebastian Bergmann ba5764ab39 Fix build. 2002-12-09 11:45:46 +00:00
Wez Furlong f4ca743d66 MFB zlib related fixes
(sorry I didn't get around to doing this sooner)
2002-12-09 10:54:20 +00:00
Wez Furlong 164130ed22 MFB: #20831 fix 2002-12-09 10:38:35 +00:00
Andi Gutmans 9283ff3ab6 - Fix a bug which I just introduced. 2002-12-09 08:36:36 +00:00
Andi Gutmans 60a4fa66cf - Fix typo 2002-12-09 08:31:44 +00:00
Andi Gutmans 757cd19aff - Improvements 2002-12-09 08:27:23 +00:00
Christian Stocker bda98029b4 PHP_FALIAS for doc_get_elements_by_tagname got lost 2002-12-09 08:14:15 +00:00
Andi Gutmans 671c6bb4c3 - First attempt to improve memory manager during realloc()'s 2002-12-09 08:14:00 +00:00
Ilia Alshanetsky 8f6d5dc775 Fixed a color mixup in gdImageCopyResampled() when dealing with true-color
images & brought the code up to PHP coding standards.
2002-12-08 21:07:13 +00:00
Harald Radi 0c4dc0afdf update todo 2002-12-08 19:05:43 +00:00
Harald Radi 3be2fdd14a initial checkin 2002-12-08 19:05:02 +00:00
Zeev Suraski 8f491470a1 Remove comment 2002-12-08 14:10:58 +00:00
Zeev Suraski dc5c790a49 Treat the absence of an access type just as if 'public' was supplied 2002-12-08 14:09:43 +00:00
Moriyoshi Koizumi 93ee146d0e Fixed stream leaks 2002-12-08 10:23:50 +00:00
Moriyoshi Koizumi 8d1b2bf8a5 Prevented return_value from being freed() twice 2002-12-08 09:54:30 +00:00
Sara Golemon a4d6863ee5 Bug #17174 Added IPv6 (AAAA record) support to dns_check_record() also added support to dns_get_record 2002-12-08 08:14:43 +00:00
Marcus Boerger 90d9299e51 Updated error message 2002-12-07 23:33:41 +00:00
Marcus Boerger f01fa3e02e Updated error message 2002-12-07 23:21:50 +00:00
Zeev Suraski 68aa19445b Simplify/fix inheritance checks 2002-12-07 21:46:12 +00:00
Zeev Suraski ce69b6f6ee Support private/protected constructors 2002-12-07 21:37:09 +00:00
Timm Friebe b9fa1813b2 - Fixed three memory leaks
- Fixed segfault with sybase_unbuffered_query() and unfetched resultsets
2002-12-07 19:49:31 +00:00
Sebastian Bergmann 81b1ed9ff3 Update. 2002-12-07 16:47:44 +00:00
Ilia Alshanetsky 66e40c013d Bug fixing news. 2002-12-07 16:15:46 +00:00
Ilia Alshanetsky 683251eba3 Fixed bug #20796. $_GET/$_POST/$_COOKIE data can get overwritten when
register_globals are on and input contains arrays.
2002-12-07 16:05:27 +00:00
Zeev Suraski c087d9e9e4 Fix error messages 2002-12-07 15:53:37 +00:00
Zeev Suraski e156edb1d0 Remove unintentional code 2002-12-07 15:52:08 +00:00
Andi Gutmans 1d1a796b58 - Dissallow using parent, self and main as class names 2002-12-07 15:51:25 +00:00
Marcus Boerger 8e268d2816 Adding a test for abstract class instanciation 2002-12-07 14:27:29 +00:00
foobar 495f544d4b sync 2002-12-07 12:14:42 +00:00
Sander Roobol 63519faca0 sync with branch 2002-12-07 11:27:59 +00:00
Sander Roobol 29529daebd Forgot to add this entry... 2002-12-07 11:21:44 +00:00
Frank M. Kromann 7f3783ec15 fixing code style 2002-12-07 06:05:06 +00:00
Ilia Alshanetsky 8425dbd0bc Fixed bugs #20725 & #20860. Post form variables get lost if the uploaded
files cannot be written to disk.
2002-12-07 00:48:13 +00:00
Frank M. Kromann ac2f1624d7 Removing unused code and making sure headers are send when called from imap_mail() 2002-12-06 22:56:57 +00:00
Frank M. Kromann 0d812352be Fixing a possible strcat on a NULL pointer 2002-12-06 22:52:31 +00:00
Moriyoshi Koizumi 3500c239a0 Fixed build with autoconf-2.54 2002-12-06 18:25:39 +00:00
Ilia Alshanetsky 3bc8512cf0 Added test case for bug #20865. 2002-12-06 17:46:26 +00:00
Ilia Alshanetsky ed7c3bfe0e Fixed bug #20865, array_key_exists() could not locate NULL keys. 2002-12-06 17:35:52 +00:00
Zeev Suraski e062dffe6c - Implement public/protected/private methods.
- Prevent instantiation of classes with abstract methods.
Based in part on Marcus's patch.
2002-12-06 17:09:44 +00:00
Marcus Boerger e0a972c061 cpdf + bundled gd
#maybe someone finds a better solution (perhaps in config) and comitts it
2002-12-06 16:33:57 +00:00
Abdul-Kareem Abo-Namous 646c4747b4 added support for multiple character sets.
OCILogon now has a forth optional parameter, which is the character set requested by the string (i.e. we8iso8859p1). when left blank, NLS_LANG or default is used.

config.m4 was changed to identify Oracle 9+ which is needed for this feature. all other oracle versions (lesser) fall back to the old behaviour.
2002-12-06 13:44:35 +00:00
Sebastian Bergmann b3d0cca0e6 A bit of an update for the sapi/servlet installation guide. 2002-12-06 06:44:29 +00:00
Sebastian Bergmann 27ff466cbc Deprecate sapi/fastcgi. 2002-12-06 06:08:17 +00:00
Ilia Alshanetsky 33de9befa1 Fixed bug #20812, ftp_get returned NULL on success instead of TRUE. 2002-12-06 06:07:40 +00:00
Pierre Joye dda7acaad5 Add imageistruecolor 2002-12-06 02:16:06 +00:00
Stig Bakken 1ef49991ff * fix upgrade-all output 2002-12-06 00:10:10 +00:00
Marcus Boerger ae35c4731f php_error -> php_error_docref 2002-12-05 23:18:28 +00:00
James Cox 2cca05a32a more rain 2002-12-05 23:17:59 +00:00
James Cox 0704182de1 rainy and cold here. 2002-12-05 23:06:40 +00:00
James Cox 1d5ee6f74d touch again. 2002-12-05 22:55:25 +00:00
Ilia Alshanetsky d6c29c781e Fixed a memory leak inside heb_number_to_chars(). 2002-12-05 22:46:54 +00:00
James Cox a43d2960ec touch2. 2002-12-05 22:35:11 +00:00
James Cox e93f60e651 touch 2002-12-05 22:31:18 +00:00
Ilia Alshanetsky c668055159 Remove pointless checks for array_init() return values. 2002-12-05 22:28:02 +00:00
Marcus Boerger 4ce4a1c32c php_error -> php_error_docref 2002-12-05 21:53:25 +00:00
Marcus Boerger 8ed84254cd -php_error -> php_error_docref 2002-12-05 21:46:08 +00:00
Sara Golemon ad65d01cbe Bug #20746. Renamed aggregation_info() to aggregate_info() per naming conventions and created alias for BC. 2002-12-05 21:20:47 +00:00
Marcus Boerger 49a99a98f4 -php_error -> php_error_docref
-removed some cases where emalloc result was tested
2002-12-05 20:59:49 +00:00
Marcus Boerger 3cf581b1b3 correct code that is guarded by "#if 0" 2002-12-05 20:41:55 +00:00
Marcus Boerger 9a04528061 fix ZTS build 2002-12-05 20:39:43 +00:00
Marcus Boerger dcfe988820 php_error -> php_error_docref 2002-12-05 20:13:35 +00:00
Marcus Boerger 47b0e79b1a -fix a warning that was an error
-php_error -> php_error_docref
2002-12-05 20:01:31 +00:00
Ilia Alshanetsky 7364e3b771 Fixed bug #12556, updated the test for this bug. 2002-12-05 20:01:19 +00:00
Marcus Boerger cf5d2e79b9 fix debug only 2002-12-05 19:49:12 +00:00
Derick Rethans 83741be445 - Renamed snmpv3_* to snmp3_*
- Conversion to php_error_docref
- Whitespace fixes
2002-12-05 19:33:03 +00:00
Melvyn Sopacua bd06d48e56 Test data 2002-12-05 19:30:28 +00:00
Melvyn Sopacua 76436b8820 Add a testcase for this bug 2002-12-05 19:29:45 +00:00
Marcus Boerger 19d5e535c0 Remove unnecessary code here 2002-12-05 15:52:20 +00:00
foobar f8c050395c ws fix (bug: #20808) 2002-12-05 15:44:27 +00:00
Marcus Boerger 373361d9c4 Return FALSE on error as mentioned by John Coggeshall.
See Bug #20822
2002-12-05 12:39:00 +00:00
Rasmus Lerdorf 4c749f08c0 Fix build 2002-12-04 23:21:30 +00:00
Ilia Alshanetsky 8d4b717518 Added GD image conversion tests. 2002-12-04 21:04:07 +00:00
Ilia Alshanetsky 5779f9bb0f Made imagecreatefromxpm() work once again. 2002-12-04 20:58:04 +00:00
Ilia Alshanetsky f3a253a4a0 Fixed a typo. 2002-12-04 17:31:35 +00:00
Ilia Alshanetsky 30724f6291 Bug fixing news. 2002-12-04 17:29:48 +00:00
Ilia Alshanetsky 1e8ec47a99 Fixed a memory leak inside gdImageTrueColorToPalette(). 2002-12-04 17:16:19 +00:00
Moriyoshi Koizumi cf0a0f0967 Added a test for bug #12776 2002-12-04 17:01:07 +00:00
Moriyoshi Koizumi 7b56bfae46 Bug fix news 2002-12-04 16:49:59 +00:00
Moriyoshi Koizumi 7bf4090efb Fixed segfaults of array_walk() when keys are passed to cb by reference.
Fixed bug #12776.
2002-12-04 16:41:28 +00:00
Ilia Alshanetsky 143e46ae28 WS fixes. 2002-12-04 16:29:48 +00:00
Sebastian Bergmann 196b3f581f Fix bugs #20270, #15702, #18600 (segfaults in ext/java). (Tony J. White) 2002-12-04 08:31:43 +00:00
Sebastian Bergmann 49f05c470a Fix bugs #20270, #15702, #18600. Patch by Tony J. White <tjw@tjw.org>. 2002-12-04 08:18:02 +00:00
Pierre Joye 00881ea504 Fix imagegd stdoutput
Typo 256 colors
2002-12-04 02:48:23 +00:00
Pierre Joye e8e2420042 Fix imagegd crashes when used with truecolor image (from jpeg,png, or imagecreatetruecolor)
may we add parameters to imagegd to let user specify the palette size and dither (set to 256 and true) ?
2002-12-04 02:37:21 +00:00
Christian Dickmann 910a03a835 silence some possible warnings 2002-12-03 20:51:36 +00:00
Frank M. Kromann 956d63899c Changed php_error() to php_error_docref() 2002-12-03 19:39:25 +00:00
Ilia Alshanetsky e1b9a77725 Fixed a bug that caused a crash in pdf_open_memory_image(), when a truecolor
image was loaded, it now checks if the image is truecolor and performs the
appropriate calculations (fixed bug #20785).
Changed E_WARNING back to E_ERROR.
2002-12-03 19:25:17 +00:00
Frank M. Kromann 686010e050 Changed php_error() to php_error_docref() 2002-12-03 19:19:15 +00:00
Frank M. Kromann 13b6390df7 Bug #19370
Allow stored procedures to return multiple results.
2002-12-03 18:57:04 +00:00
Frank M. Kromann 5eaf2d10e7 Bug #17593
Make sure any pending data is released from the server when freeing the result
2002-12-03 18:04:35 +00:00
Harald Radi 8529f3ba95 damn milter api:
"Furthermore, since there is not a one-to-one correspondence between
 threads and connections (N connections mapped onto M threads,
 M <= N), connection-specific data must be accessed through the handles
 provided by the Milter library."

which in other words means php_request_startup() and the corresponding
php_request_shutdown() will never be called for the same thread
2002-12-03 16:26:57 +00:00
Ilia Alshanetsky b08f247f32 Fixed a crash that occurs during the last step of png/jpeg -> gd2 -> png/jpeg
conversion. The same crash still occures with png/jpeg -> gd -> png/jpeg, because
apparently gd format cannot handle truecolor images.
Turned off debug messages inside gd_gd2.c.
2002-12-03 15:43:17 +00:00
Moriyoshi Koizumi 242ddba326 Fixed leaks in array_walk() 2002-12-03 15:02:06 +00:00
Harald Radi bf16a54f5a fix typos and make example more useful 2002-12-03 14:43:43 +00:00
foobar 7d744c54b4 - Need these libraries for static build 2002-12-03 11:34:12 +00:00
foobar 68eaf6391a - Fixed the build with iPlanet LDAP SDK 5.x 2002-12-03 09:35:42 +00:00
Frank M. Kromann 679d645738 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 05:56:39 +00:00
Moriyoshi Koizumi e7f1bbf0f2 Iconv extension is no longer experimental 2002-12-02 21:29:06 +00:00
Moriyoshi Koizumi de79a4e9d8 Reverted the changes because the problem was elsewhere. 2002-12-02 21:10:37 +00:00
Moriyoshi Koizumi c7a0b0d262 Reverted wrong part of the commit made in 1.24 2002-12-02 20:11:59 +00:00
Frank M. Kromann b2a648f5b5 Fixing the Win32 compilation of mbstring with mbregex enabled. 2002-12-02 19:18:23 +00:00
Frank M. Kromann a7f3ad42a4 Fixing build on WIn32
MBREGEX is disabled for now. 5 mbre_* functions are undefined on WIn32
2002-12-02 18:19:17 +00:00
Sterling Hughes 7fd0c8b593 apparently this isn't finished 2002-12-02 16:38:22 +00:00
Ilia Alshanetsky 467a5f44ec Fixed flex version check. Some lex scanners like Sun's SGU do not appear
to support -V flag, so by passing them data on stdin we prevent them from
sitting idle waiting for stdin data. I've also added some common version
retrieval flags, that may be supported by various lex scanners.
2002-12-02 07:03:00 +00:00
Ilia Alshanetsky 057e87e6e5 Repositioned CoInitialize and CoUninitialize that apparetly makes it more
correct according to MS docs. Patch (+5) by Michael Sisolak
<msisolak@yahoo.com>.
2002-12-02 06:43:54 +00:00
Ilia Alshanetsky a6e02dc45d Fixed a crash bug that can occur due to PDF_delete() being called more then
once and E_ERROR occurring during the shutdown sequence.
2002-12-02 06:35:29 +00:00
Jason Greene 5e1741fd48 Revert patch that should have been reverted a long time ago.
There was a memory leak in the error handling system on win32, that this patch
circumvented (by preventing the errors (EAGAIN mesages) from being generated).
# I must have forgotten to remove this when I fixed the leak
2002-12-02 05:45:13 +00:00
Shane Caraveo 76e09401ab aparently did not add these on head
removed ssize_t which was causing problems, and not in libfcgi anyway
2002-12-02 05:24:54 +00:00
Shane Caraveo 75cbbfacb1 fix use of Alias under apache by defaulting script_name to redirect_url
dont lstat, stat.
2002-12-02 02:16:38 +00:00
Jon Parise 6be496f44e Correct the punctuation of these error messages. 2002-12-02 00:21:15 +00:00
Sterling Hughes 065104b8fe TODO: Cleanup elements that have happened, or most likely won't happen. There
is probably more that should be gone, but its still a move in the right
direction.

Other stuff is ws/formatting changes
2002-12-01 22:15:39 +00:00
Shane Caraveo 9bc3f72d8e build support for cgi fixes previously commited 2002-12-01 21:50:35 +00:00
Shane Caraveo a3bd39429c Fix CGI to match cgi spec.
This patch properly fixes support for CGI in PHP.  For backwards compatible
broken behaviour, cgi.fix_pathinfo can be set to zero in php.ini.
CGI failed to work under apache at all, either using the cgi-script directive
or as a ScriptAlias setup. Typicaly it would try to parse itself.  This will
still happen if you dissable fix_pathinfo, and set DISCARD_PATH.
This also fixes PATH_INFO, and finally we can run pres2 under cgi or fastcgi.
This patch has been tested under Apache 1.3, 2.0, IIS, as both cgi and fastcgi,
on Windows and OSX.  A followup patch with build stuff for linux will follow.
2002-12-01 21:37:14 +00:00
Shane Caraveo 529762a21a php_error_docref aborts cgi. This broke using php as cgi under
apache/mod_cgi with the cgi-script directive and bang lines in php scripts.
removing it allows this to work again.
2002-12-01 21:28:27 +00:00
Harald Radi 3fb36b0c56 example 2002-12-01 20:29:14 +00:00
Harald Radi e25b194525 rename callbacks to fit the original name 2002-12-01 20:28:54 +00:00
Andi Gutmans 9f361fc0f8 - Allow enabling of memory cache with zend_mm 2002-12-01 20:15:09 +00:00
Harald Radi b460dfc042 initial checkin 2002-12-01 19:55:48 +00:00
Harald Radi 9d5e55f790 if the api functions are called, check if they're valid in that context
reopen file per request, so milter doesn't hang. PHPA or APC can be used to speed the milter up
added a milter_init callback to init the milter before it is registered
added protos to make sniper happy
2002-12-01 19:50:07 +00:00
Andi Gutmans 27de54b0df - MFZE1 2002-12-01 19:47:02 +00:00
Andi Gutmans f222884e2d - Revert as the patch doesn't compile 2002-12-01 19:22:30 +00:00
Andi Gutmans b6ecd6704c - MFZE1 2002-12-01 19:07:07 +00:00
Stefan Roehrich e50dc16b21 Comment about maximal length now matches code. 2002-12-01 18:48:51 +00:00
foobar cef45338c9 fix build.. 2002-12-01 17:24:00 +00:00
Harald Radi 8c19b754f9 first working version 2002-12-01 16:37:59 +00:00
Harald Radi db93856c07 check for libmilter path 2002-12-01 13:44:22 +00:00
Derick Rethans 7fbcf76973 -fix typo 2002-12-01 13:43:17 +00:00
Harald Radi e4bc32fbe2 no message 2002-12-01 13:36:53 +00:00
Stanislav Malyshev 2c7d6f9a74 improve username/password detection for IIS 2002-12-01 12:48:08 +00:00
Harald Radi 1356e60fa3 no message 2002-12-01 12:23:47 +00:00
Marcus Boerger fa38a6af6f No more (f)printf for errors and warnings instead use php_error_docref. 2002-12-01 11:43:54 +00:00
foobar e178bdc1ee Fix build 2002-12-01 05:14:56 +00:00
Harald Radi 0244ca1d97 it finally compiles now
tests will follow tomorrow
2002-12-01 03:37:49 +00:00
Sascha Schumann 2b95b3c83b add a "force HTTP/1.0 response" facility to the SAPI layer
this is necessary, when you want to take over control of a connection
and the web server is doing stupid things by default (like enabling
chunked transfer encoding for no reason).
2002-12-01 03:28:21 +00:00
Sterling Hughes b9447c2f49 remove dos line endings 2002-12-01 03:13:03 +00:00
Harald Radi b7b5ca519f fix build 2002-12-01 02:45:30 +00:00
Moriyoshi Koizumi aeb6a6c458 Fixed possible buffer overflow in php_base64_decode();
# This bug doesn't appear to be harmful for now,
# so I won't merge it into branches...
2002-12-01 02:44:50 +00:00
Harald Radi 39e03b580b todo or not todo 2002-12-01 01:36:26 +00:00
Harald Radi 3a0a2411c7 added remaining functions, still untested, still having problems with config.m4 2002-12-01 01:18:48 +00:00
Marcus Boerger 38f5812191 Skip overload for ZE2
Bug #20156
2002-12-01 00:38:30 +00:00
Harald Radi ad6333654e Sendmail Milter SAPI
initial version
2002-12-01 00:21:10 +00:00
Frank M. Kromann 32d7284c52 Dont scan headers for cc abd bcc if extra parameters are used for these 2002-11-30 21:50:17 +00:00
Frank M. Kromann 7afd92792b Fix the use of "personal" information in To and Cc headers 2002-11-30 21:49:20 +00:00
Ilia Alshanetsky cc13af6a07 Fixed bug #20716. 2002-11-30 19:12:48 +00:00
Marcus Boerger 0d7957bc15 Bug #20433 2002-11-30 18:36:17 +00:00
Andi Gutmans 671fff2fde h WHitespace 2002-11-30 11:20:25 +00:00
Christian Stocker 3429e3313b fixed big bad memory leak in xpath objects. 2002-11-30 10:38:17 +00:00
Jason Greene 5d554c20d2 Sockets is no longer experimental 2002-11-29 23:44:06 +00:00
Moriyoshi Koizumi b9687bea65 Prevented the result from being affected by function overloading 2002-11-29 18:32:50 +00:00
Sander Roobol 348b429b5b Remove all traces of _bc_Free_list - it's not used anymore 2002-11-29 17:59:30 +00:00
Yasuo Ohgaki e4be6b3ac2 Fixed problem with PostgreSQL 7.3 2002-11-29 17:18:01 +00:00
Andi Gutmans 2de45bec65 - Initialize constants_updated (by Marcus) 2002-11-29 16:35:46 +00:00
Christian Stocker 71235e4140 removed unused variable 2002-11-29 16:31:41 +00:00
foobar 7f48a6f13b MFB 2002-11-29 14:48:17 +00:00
foobar 6fb3b26796 - MFB 2002-11-29 14:46:06 +00:00
Christian Stocker 55ee8af808 fix for bug #20389 (no trailing slash in configure option) 2002-11-29 13:30:29 +00:00
Sascha Schumann 95fead0b9f add missing line 2002-11-29 11:34:08 +00:00
Christian Stocker a2ccb29a97 @- Added xpath_register_ns_auto([contextnode]) for automatically registering
@  namespace definitions (chregu)

changed my mind. Automatic namesapce registration is not done within
xpath_eval() anymore, but in a seperate function.
2002-11-29 11:22:06 +00:00
Christian Stocker eed5b11b5f do some kind of automatic namespace registration in xpath_eval(). This
works only for namespaces defined in the context node (eg docroot if
no second argument is given. If one wants to use namespaces defined
elsewhere or with different prefixes, you still have to use
xpath_ns_register()
2002-11-29 10:24:44 +00:00
Christian Stocker b1dab29214 relative xpath queries are already possible
(use $ctx->xpath_eval($xpath,$contextnode) )
2002-11-29 08:28:53 +00:00
Christian Stocker cac5d670b3 get_element_by_id does not need LIBXML_XPATH support 2002-11-29 07:50:37 +00:00
Marcus Boerger 65eb0d8125 Conversion fixes 2002-11-29 01:44:19 +00:00
Marcus Boerger 0a7487e32d Conversion fixes 2002-11-28 22:48:20 +00:00
Marcus Boerger e7f5b801be Do not instanciate an abstract class 2002-11-28 17:07:50 +00:00
Ilia Alshanetsky 398ff4fe82 Fixed mhash tests, apparently the TIGER algorithm was updated (fixed?) in
later mhash releases and consequently returns a different hash. I've updated
the hash to the one generated by latter releases.
Removed useless \r from ext/mhash/tests/003.phpt.
2002-11-28 14:13:44 +00:00
Martin Kraemer 966f75d4fb Portability: avoid <malloc.h> warnings on FreeBSD 2002-11-28 09:19:16 +00:00
Martin Kraemer f3845c3ae0 Portability: The header contains the declaration; while the source ext/bcmath/libbcmath/src/init.c has the definition
(otherwise some compilers complain about 'duplicate symbols')
2002-11-28 08:26:14 +00:00
Martin Kraemer c5a7a522a1 Portability: Use 0 if the platform does not define EX_OK 2002-11-28 08:23:36 +00:00
Andi Gutmans c6502fa225 - Nuke use of deprecated macro 2002-11-27 20:09:36 +00:00
Sterling Hughes 52a451ccd2 no more need for this either 2002-11-27 20:06:01 +00:00
Sterling Hughes 5c96f91123 don't use stupid constants, be smart, just read the line 2002-11-27 20:05:20 +00:00
Frank M. Kromann 7abdf90a0e free alocated mem.
minor changes in the layout
2002-11-27 18:52:31 +00:00
Tal Peer 1d768548cd jdtojewish() test 2002-11-27 15:54:32 +00:00
Tal Peer 8aac1ce2ee Added an additional (optional) argument to jdtojewish() to keep BC
with 4.3 (and let users getdates in Hebrew without further formatting)
2002-11-27 15:52:25 +00:00
Ilia Alshanetsky e195b10ede Fixed bug #20664. 2002-11-27 06:20:19 +00:00
Marcus Boerger 28c10e29d0 -Code completley rewritten 2002-11-27 02:42:41 +00:00
Marcus Boerger 569c69ba36 -Add test for exif_read_data and magic_quotes_runtime 2002-11-27 02:31:26 +00:00
Marcus Boerger 57f41b1a90 -Forgot to correct length 2002-11-27 02:28:29 +00:00
Marcus Boerger 3ff08b91a6 -Add magic_quotes_runtime support
-Fix Canon Markernote
2002-11-27 01:46:36 +00:00
Frank M. Kromann f9b3452c6a Convert 0D 0D 0A line breaks to 0D 0A 2002-11-27 00:49:24 +00:00
Stig Bakken 441a3e3612 * fix typo 2002-11-26 23:17:22 +00:00
Frank M. Kromann 9f927c1a2e time is a function. Use the name of the variable 'timestamp' 2002-11-26 23:03:07 +00:00
Frank M. Kromann 863962d5cf Adding missing header file on Win32 2002-11-26 23:02:09 +00:00
Frank M. Kromann 0cddc5b4eb removing unused variables 2002-11-26 23:01:17 +00:00
Stig Bakken b066da4e65 * lose obsolete tags: libfile, libname, sources, includes, libadd 2002-11-26 22:52:34 +00:00
Frank M. Kromann 2ac7c4f2de Adding missing ; 2002-11-26 22:44:16 +00:00
Moriyoshi Koizumi 98dace883e Improved the error reporting portion of array_walk() as suggested by Markus 2002-11-26 22:12:40 +00:00
Moriyoshi Koizumi 3fd513f32a Prevent too many error reports from being displayed 2002-11-26 21:51:37 +00:00
Stig Bakken 7e21663cb5 * ws/folding 2002-11-26 21:49:55 +00:00
Moriyoshi Koizumi 61b3d5ccb5 Fixed incorrect error messages of array_walk() in case the callback is
specified in an array form
2002-11-26 21:21:32 +00:00
Stig Bakken 397b35f891 * changed "info" shortcut to "in" 2002-11-26 18:23:58 +00:00
Christian Stocker 20688a30ab Fix for Bug #20639 DomElement->get_elements_by_tagname() doesn't work 2002-11-26 15:37:54 +00:00
Wez Furlong b1a5434537 Update to use new parameter parsing API.
Updates to Jewish/Hebrew calendar code.
Patch from Moshe Doron, amended by Tal Peer,
reviewed by me.
# Maybe Tal and/or Moshe could comment on whether this should
# also be commited to the 4_3 branch (it completes some earlier work
# started prior to the branch).
2002-11-26 14:52:00 +00:00
Marcus Boerger 579e3ca96b Add Berkeley db4 support 2002-11-26 12:05:59 +00:00
Marcus Boerger 197fd585bd -Disallow combining db2 with db3 which are conflicting.
-Stop searching for headers and libraries when found.
-Check version for Berkeley DB library headers.
2002-11-26 12:00:25 +00:00
Marcus Boerger f88aa8045a Highlight "Thank you" 2002-11-26 11:30:08 +00:00
Frank M. Kromann a2bf03ccea Avoid , at the end of each string (to, cc and bcc) 2002-11-26 07:04:31 +00:00
Shane Caraveo 17cce37a72 fix windows build of cgi/fastcgi 2002-11-26 06:51:44 +00:00
foobar dd53efc196 - Made the STANDARD_SAPI_MODULE_PROPERTIES be what it says it is. 2002-11-26 05:57:06 +00:00
Shane Caraveo 95b4045f48 configure now supports building the cgi-fcgi module
configure --enable-fastcgi
2002-11-26 05:51:16 +00:00
Sascha Schumann 09f463ddae Add sapi_get_fd() and implement it for the Apache/thttpd SAPIs. 2002-11-26 05:15:55 +00:00
Yasuo Ohgaki f0b6f5450c Remove a warning 2002-11-26 02:13:35 +00:00
Stig Bakken 693204265e * a little more "windows robust" when looking for package.xml 2002-11-26 01:38:48 +00:00
Stig Bakken ad2618b8eb * forgot to set release date 2002-11-26 01:34:14 +00:00
Stig Bakken df158fa5cf * added --ignore-errors option, --force no longer ignores errors 2002-11-26 01:32:47 +00:00
Stig Bakken 58c57d43ab * added sig_keyid config param 2002-11-26 00:05:21 +00:00
Ilia Alshanetsky 9497ba9d49 MFH (test failure if session.serialize_handler is not set to php). 2002-11-25 23:20:05 +00:00
Stig Bakken e617da5aae * more accurate description of "makerpm" command 2002-11-25 23:16:16 +00:00
Stig Bakken 6f1c21aea2 * silence some notices 2002-11-25 23:15:31 +00:00
Stefan Esser ababfedb66 tmp_line was possible uninitialised, resulting in crap error messages. 2002-11-25 22:53:57 +00:00
Ilia Alshanetsky 693fd4a36b Added a check to determine if the file can be retrieved or sent.
This check also prevents incorrect error reporting in the event the retrieval
or the sending of the file cannot be accomplished.
2002-11-25 22:00:52 +00:00
Maxim Maletsky d9cf3c2a0e Bug# 16798. Tests appreciated by someone with Oracle 8.0 2002-11-25 18:14:45 +00:00
Moriyoshi Koizumi 53fba5f8a6 @- Enabled mbregex by default when mbstring is also enabled (Moriyoshi) 2002-11-25 17:44:14 +00:00
Moriyoshi Koizumi 12d4a19fce Forgot to adjust this one 2002-11-25 17:21:50 +00:00
Moriyoshi Koizumi 76b218cb6e Renamed several internal functions for consistency 2002-11-25 17:20:20 +00:00
Rui Hirokawa b3cfda6389 simplified korean encoding conversion table. 2002-11-25 15:21:04 +00:00
Ilia Alshanetsky c330fdc1a1 Removed un-needed zlib check. 2002-11-25 14:25:52 +00:00
Hartmut Holzgraefe 8bd550825f email address change 2002-11-25 12:30:28 +00:00
Ilia Alshanetsky 9251486567 Synchronized bundled gd library with the latest stable GD, 2.0.6
Fixed a configuration problem with xpm.
Fixed 2 possible memory leaks in fontFetch().
2002-11-25 01:51:53 +00:00
Yasuo Ohgaki 5c851cba19 Cleanup state=4 and avoid using sscanf() 2002-11-25 01:38:29 +00:00
Andi Gutmans 6aa90a75bd - FN_IS_STATIC -> FN_STATIC 2002-11-24 20:32:49 +00:00
Andi Gutmans 5cb8fabb7d - Fix crash 2002-11-24 20:15:56 +00:00
Moriyoshi Koizumi 436bc265e6 MFB 2002-11-24 19:48:58 +00:00
Sergey Kartashoff dab1bb005a - Header file update for new mnogosearch functions 2002-11-24 19:39:47 +00:00
Sergey Kartashoff 319f286562 @- A new functions have been added: udm_set_agent_param_ex and
udm_get_res_field_ex
- A new functions have been added: udm_set_agent_param_ex and
  udm_get_res_field_ex
2002-11-24 19:36:46 +00:00
Sascha Schumann 3f6b470770 Use proper form of NUL
Drop superfluous checks for NULL results
2002-11-24 16:23:37 +00:00
Marcus Boerger 2ddbee008f Better naming 2002-11-24 16:07:34 +00:00
Marcus Boerger c4272645ce Add test against redeclaring an overloaded method abstract 2002-11-24 15:51:57 +00:00
Marcus Boerger 622b45e2a9 Add test against mixing static/non static methods 2002-11-24 15:50:28 +00:00
Sterling Hughes 490903da5a null after the erealloc() 2002-11-24 15:11:43 +00:00
Christian Dickmann 51f5b6debb remove the check, cause i don't really know, if content has to be an array everytime 2002-11-24 10:15:25 +00:00
Christian Dickmann 0228cfcf4a add some checks to increase cache integrity 2002-11-24 10:13:57 +00:00
Christian Dickmann 7dd3e5e683 add errormessage, but that does not fix the problem 2002-11-24 10:06:54 +00:00
Yasuo Ohgaki 5c2fda30b2 Added missing '\0' 2002-11-24 07:45:26 +00:00
foobar bad0d653a1 MFB: ; instead of : 2002-11-24 05:15:10 +00:00
Moriyoshi Koizumi c7c7132a66 Renamed the file because this is actually a test for gdImageStringFt(). 2002-11-24 01:32:15 +00:00
Ilia Alshanetsky ef1d4e1dcf Fix compile warning, MIN/MAX macros may already be defined by param.h 2002-11-24 01:30:51 +00:00
Ilia Alshanetsky 67e25fcbd8 Added gdPEstrdup macro. 2002-11-24 01:20:13 +00:00
Ilia Alshanetsky ef26e2d1f8 Fixed 3 memory leaks.
Formatted the code to meet PHP's coding standards, which makes it MUCH easier
to understand.
2002-11-24 01:15:34 +00:00
Moriyoshi Koizumi 9db2512418 Fixed the macro so this can be compiled with ft1 2002-11-24 00:59:41 +00:00
Moriyoshi Koizumi fe23fcab12 Sorry, wrong commit. 2002-11-23 23:35:57 +00:00
Moriyoshi Koizumi 0f8916e37c Dismissed the second part of the test 2002-11-23 23:34:38 +00:00
Frank M. Kromann ecd975550b Adding mb_gpc files to project 2002-11-23 22:59:24 +00:00
Moriyoshi Koizumi 4124672edf Fixed leaks. Other leaks are originated in libgd. 2002-11-23 22:11:59 +00:00
Derick Rethans 1019b2ea94 - Adjust tests for removed old_function() in Zend Engine 2 2002-11-23 22:08:05 +00:00
Moriyoshi Koizumi 57e4b81d13 Fixed segfaults 2002-11-23 21:33:31 +00:00
Marcus Boerger 1827a58de0 Allow db4.0 & db4.1 here. Patch by Ralf Engelschall (rse@engelschall.com) 2002-11-23 21:11:12 +00:00
Andi Gutmans 01e853c2ce - My personal cleanups 2002-11-23 20:46:39 +00:00
Andi Gutmans e8214a3384 - Commit Marcus' cleanup of abstract and static inheritance and improve
- error messages
2002-11-23 20:44:12 +00:00
Moriyoshi Koizumi f920e5d068 Forgot this one. Updated license information 2002-11-23 20:17:46 +00:00
Moriyoshi Koizumi 7f1f056f16 Updated license information headers 2002-11-23 20:14:33 +00:00
Moriyoshi Koizumi 22a9d7ad25 Separated GPC related part from mbstring.c 2002-11-23 20:08:44 +00:00
foobar 5e429447b1 ws fix 2002-11-23 19:20:44 +00:00
Derick Rethans 36e82c84ae - Make it compile on IRIX again
#- Tested with Linux/FreeBSD and IRIX
2002-11-23 19:03:21 +00:00
Marcus Boerger c7dc6c0e00 Move up general tests
# if MFH is needed should be decided by QA team: because the output # sequence changes
2002-11-23 16:57:25 +00:00
Moriyoshi Koizumi 44c98c7e3f Fixed some odd behaviours of range() 2002-11-23 11:27:56 +00:00
Moriyoshi Koizumi 715ad2730c Fixed tab positions. 2002-11-23 11:20:51 +00:00
Moriyoshi Koizumi 40d605a385 Test for mb_send_mail() under language=Korean 2002-11-23 05:26:18 +00:00
Marcus Boerger 517af84b0a MFB: Fix memleak in debug mode 2002-11-23 01:24:08 +00:00
Sara Golemon e9047df607 New function dns_get_record(): close resolver socket after use.
fix to internal func php_parserr(): correct bug in return state.
2002-11-23 01:09:07 +00:00
Marcus Boerger 318e561905 Testing default behaviour 2002-11-23 00:54:04 +00:00
Rui Hirokawa c38db57f3c fixed some bugs in korean encoding conversion. 2002-11-22 23:34:55 +00:00
Rasmus Lerdorf 761bcbd751 Applied imagedeallocate() fix 2002-11-22 23:25:14 +00:00
Ilia Alshanetsky 962e4864a1 Fixed bug #20560. 2002-11-22 21:51:38 +00:00
Stefan Esser 9dae1475ef little fix 2002-11-22 19:34:17 +00:00
Marcus Boerger e7d20a0422 Make magic_quotes_runtime work bidirectional for dba 2002-11-22 15:47:48 +00:00
Edin Kadribasic 81711ba621 Avoid possible buffer overflow. 2002-11-22 15:47:39 +00:00
Marcus Boerger d33ff48608 Show which algorythm fails and do not fail when we have new algos.
#for me TIGER fails anybody else?
2002-11-22 14:07:29 +00:00
Edin Kadribasic fd47c5bb32 MFB: Don't send default http status (200). 2002-11-22 13:55:27 +00:00
Jan Kneschke b4ced28d7c - protect the function against a non-xml document
- initializing variables reduces the number of seg-faults
2002-11-22 13:41:51 +00:00
Jan Kneschke 3598fbcef9 - fixed a buffer under run
- initializing variables is a good thing
  - in case of a invalid response we don't seg-fault here anymore
2002-11-22 13:39:06 +00:00
Andrey Hristov 850586cfe7 typo fix. 2002-11-22 11:11:31 +00:00
Derick Rethans 2a9f250ec7 - Initialize all functions to non-static (patch by Marcus Börger
<marcus.boerger@t-online.de>.
2002-11-22 10:49:46 +00:00
Marcus Boerger 4e78286eaf Update error message and say 'method' instead of 'function' 2002-11-22 10:44:36 +00:00
Edin Kadribasic 714a5be6cc Fixed bug #19207 by adding cgi.rfc2616_headers configuration directive. 2002-11-22 10:15:47 +00:00
Sander Roobol f200f739d8 Made bcmath extension thread safe.
@Made bcmath extension thread safe. (Sander)
2002-11-22 09:25:29 +00:00
Stig Bakken 64a75d6d77 * fix config-show output 2002-11-22 07:03:46 +00:00
Sebastian Bergmann ba1f645030 Show class name as well. Patch by Marcus Börger. 2002-11-22 06:19:04 +00:00
Ilia Alshanetsky 489b0f2115 Added missing header (fixed bug #20555). 2002-11-22 02:38:03 +00:00
Ilia Alshanetsky 2ca45412ed Added a test case for bug #20528. 2002-11-22 00:08:57 +00:00
Ilia Alshanetsky c7dd366c1a Fixed bug #20528. 2002-11-21 23:51:52 +00:00
Melvyn Sopacua 7732ce7fe3 Fix bug #20518 2002-11-21 23:28:26 +00:00
Melvyn Sopacua 8d42dd7a8b test for bug #20518 2002-11-21 23:27:38 +00:00
Maxim Maletsky e20121e6c7 Added E_WARNING to OCIPasswordChage() when Safe Mode is in effect 2002-11-21 21:26:18 +00:00
Maxim Maletsky b5ae4adde1 @- Added OCIPasswordChange() which allows the password of an Oracle account to be changed. (Maxim) 2002-11-21 20:49:33 +00:00
Maxim Maletsky 1f73196bf9 comment typo 2002-11-21 20:32:56 +00:00
Maxim Maletsky 8338d8bfce Disabled OCIPasswordChange() in safe mode. Possible security risks. 2002-11-21 20:28:11 +00:00
Moriyoshi Koizumi 1748935997 Added missing mb_internal_encoding() 2002-11-21 18:12:53 +00:00
Moriyoshi Koizumi adfcb09190 Removed unnecessary "\n" 2002-11-21 17:36:16 +00:00
Moriyoshi Koizumi 9762403c26 Added a test case for imagettftext() 2002-11-21 17:26:18 +00:00
Marcus Boerger d3e095004c Revert that unwanted debug thing - thanks to Sander Robol 2002-11-21 16:48:39 +00:00
Sander Roobol b8cf1a369f Hardcode the bcmath.scale ini-entry 2002-11-21 16:16:38 +00:00
Rui Hirokawa 13a51b8f20 mbstring is supporting CJK + some other encodings. 2002-11-21 16:12:49 +00:00
Rui Hirokawa 8a2b5991d6 fixed incorrect encoding conversion in korean. 2002-11-21 16:05:38 +00:00
Sander Roobol f4ffead6fa Adding tests for the bcmath extension 2002-11-21 15:24:45 +00:00
Marcus Boerger 64e45b1287 Force showing the question 2002-11-21 15:09:45 +00:00
Marcus Boerger b66a39eb6e Test: An abstract function can be overwritten but not called 2002-11-21 15:06:54 +00:00
Marcus Boerger b7cd48efdd Make it possible to test language features like newly introduced 'abstract'
independantly from debug mode.
2002-11-21 14:56:06 +00:00
Sebastian Bergmann da0e29e92f Show the name of the abstract method in the error. 2002-11-21 14:20:25 +00:00
Sebastian Bergmann 9726e74da5 Fix prototype. 2002-11-21 14:16:57 +00:00
Hartmut Holzgraefe fb5ac5d286 the apache 1.x sapi read_posts tests for SG(read_post_bytes) being
counted up, so lets make it happy although this value is not really
needed in these cases ...
2002-11-21 10:29:11 +00:00
James Cox 5d0f205df8 grr.. 2002-11-20 21:21:35 +00:00
James Cox 418f53c647 remove number.c from the win32 build..
# did this on unix... shouldn't cause a problem, but vc can get picky.
2002-11-20 21:20:10 +00:00
Andi Gutmans 32fcc74395 - CVS nuked number.* so we'll nuke it from the build:) 2002-11-20 21:16:39 +00:00
Frank M. Kromann 392ea5529f Adding generated files to ignore list 2002-11-20 20:29:21 +00:00
Andi Gutmans b0528dbe5e - Revert previous patch 2002-11-20 20:03:01 +00:00
Andi Gutmans e6b7ab9db8 - Intermediate commit which works on making bcmath thread-safe. 2002-11-20 19:48:12 +00:00
Derick Rethans 33d0e4e1fb - MFZE1: Disable leak() and crash() when not using debug mode 2002-11-20 19:44:37 +00:00
Andi Gutmans 7ce4bc76bf - Add abstract methods 2002-11-20 19:15:36 +00:00
Frank M. Kromann c77d276997 Adding path to resolv.lib 2002-11-20 18:53:14 +00:00
Frank M. Kromann a4bcf9bb60 Changing line endings to CRLF. This allows the extension to build again. 2002-11-20 18:39:39 +00:00
Andi Gutmans 227f7838d6 - Fix build (thanks Marcus)
- Implement abstract methods, syntax:
-    abstract function foo($vars);
- I don't see any reason why modifiers such as static/public need to be
- used with abstract. PHP is weakly typed and there would be no meaning to
- this anyway. People who want a strictly typed compiled language are
- looking in the wrong place.
2002-11-20 18:00:23 +00:00
Sascha Schumann a257d758a5 Add an error message to the ini handlers 2002-11-20 17:15:00 +00:00
Sascha Schumann e9ed065afc add protective checks to ini updates
Noticed by: Derick Rethans <d.rethans@jdimedia.nl>
PR: #20284
2002-11-20 16:06:29 +00:00
Ilia Alshanetsky 7908cffab4 Switched to a new parameter parsing API, which simplifies the code.
Made error reporting use php_error_docref().
Fixed a memory leak in shmop_open() when an invalid flag is specified.
Added tests for shmop() extension.
2002-11-20 15:56:56 +00:00
Sander Roobol e532b24d82 One Apache 1.3 line is enough 2002-11-20 12:53:40 +00:00
Stig Bakken 713d0e8966 * convert to english 2002-11-20 06:51:23 +00:00
Stig Bakken 0cc15ba4b9 * fix doc for config-{set,get} 2002-11-20 06:50:33 +00:00
Ilia Alshanetsky 96b562ae29 Added .cvsignore file. 2002-11-20 06:48:58 +00:00
Ilia Alshanetsky d7d2b6ef50 Switched to a new parameter parsing API, which simplifies the code a great deal.
Made error reporting use php_error_docref()
Fixed a bug in mhash_keygen_s2k() that caused non \0 terminated data to be returned.
Added tests of all mhash functions.
2002-11-20 06:48:39 +00:00
Stefan Esser 63a50e500d Adding SHA1 tests. 2002-11-19 23:25:57 +00:00
Ilia Alshanetsky 7751c4f549 Do not register IMAGETYPE_SWC if zlib, which is needed for parsing of swc
files is not available.
2002-11-19 21:24:47 +00:00
Ilia Alshanetsky 11e7f6278d Addressed the issue of persistant allocation.
Fixed bug #20470.
Fixed a memory leak in gdttf.c that would happen when an error during
processing occures.
2002-11-19 19:55:54 +00:00
George Schlossnagle 010fd97aa5 brief v1 documentation 2002-11-19 19:03:20 +00:00
George Schlossnagle 3bdfbd6d1e Props to Lukas as well 2002-11-19 18:57:38 +00:00
foobar dad428b49e Add George to the credits and add note about it being different than the real Apache SAPI 2002-11-19 18:02:36 +00:00
foobar 5df80a262b Fix the configure.. 2002-11-19 17:58:10 +00:00
Zeev Suraski 4be862b02c MFZE1 - error_reporting fix 2002-11-19 17:51:30 +00:00
Moriyoshi Koizumi 72f0be09c0 Function renamings: s/php_mbstr_/php_mb/.
# all of which are static so I don't see any problem for now.
2002-11-19 17:23:41 +00:00
Moriyoshi Koizumi 41ef851eb5 Unified the duplicated portions.
# No need to merge this patch to the branch
2002-11-19 17:02:06 +00:00
Moriyoshi Koizumi 65677445b4 Added a test to check whether mb_parse_str() works properly 2002-11-19 16:56:43 +00:00
Moriyoshi Koizumi 18089ce360 Modified the test so it wouldn't be affected by ini settings. 2002-11-19 16:55:34 +00:00
Edin Kadribasic 543c383302 Update Credits 2002-11-19 15:11:27 +00:00
Derick Rethans 8011c17fd3 - Add test for bison weirdness as some people experienced (seems fixed
now though)
2002-11-19 14:53:31 +00:00
Derick Rethans 96c054f775 - MFB: Safemode install problem 2002-11-19 14:45:13 +00:00
Marcus Boerger c41b6b2967 Allow error_prepend and error_append being empty as used in run-test.php 2002-11-19 14:11:50 +00:00
Derick Rethans 0b2d775d3d - Already moved to PECL, but forgot to remove it from php4 2002-11-19 09:51:50 +00:00
Derick Rethans a8e7b5b6a1 - Committing patch by Philip Olson <philip@cornado.com>. 2002-11-19 08:20:18 +00:00
Marcus Boerger 3ca6344e57 -rename checkdnsrr to dns_check_record, keep old name as alias
-rename getmxrr to dns_get_mx, keep old name as alias
-added dns_get_record
@Added dns_get_record() which allows to retrieve DNS information about
@a host. (Marcus, Pollita)
2002-11-19 02:34:13 +00:00
Stig Bakken bfae20f404 * allow config-get in the default layer 2002-11-19 02:18:30 +00:00
George Schlossnagle c598b3ac16 now this works (thanks Rasmus)
Note:  the correct line is --with-apache-hooks
2002-11-19 01:20:42 +00:00
Edin Kadribasic ff55850562 No need to declare functions used internally by DBA as PHPAPI. This
fixes windows build.
2002-11-19 01:06:42 +00:00
Moriyoshi Koizumi b75f2df3d4 We have to use binary mode here. 2002-11-18 21:20:45 +00:00
Moriyoshi Koizumi a9d7509036 Fixed possible leaks 2002-11-18 21:15:41 +00:00
George Schlossnagle 0ad980c667 fixed recurrent entrance to add_cgi_vars 2002-11-18 19:07:37 +00:00
Thies C. Arntzen 6aaa7bc345 use FREE_ZVAL when freeing zvals 2002-11-18 17:34:55 +00:00
Marcus Boerger f0daa5c6d9 Fix warning as discussed with Wez. 2002-11-18 17:23:21 +00:00
Sascha Schumann 58b26398de Add FAM support for LGPLed libfam.
FAM, the File Alteration Monitor, provides an API that applications can use to
be notified when specific files or directories are changed.

FAM is being used in Enlightenment, GNOME/Nautilus, and KDE.

# Yes, this will be moved to PECL once that is fully usable. Emails about
# this issue will likely be redirected to /dev/null. :-)
2002-11-18 17:06:05 +00:00
Marcus Boerger 301330ff88 -Added colordepth for png
-Added tests for width/heidth for unsigned/signed problems
2002-11-18 16:51:02 +00:00
Marcus Boerger a3d821c695 Added colordepth for png 2002-11-18 16:50:10 +00:00
Sascha Schumann 52f1135c8f add missing backslash 2002-11-18 15:55:07 +00:00
Edin Kadribasic b8d3c75a6c Nuke one more win32 linking warning. 2002-11-18 15:53:00 +00:00
Marcus Boerger 25456939b3 Fixing unsigned/signed problems (and i thought about it before...) 2002-11-18 15:49:06 +00:00
Derick Rethans e93f1c00c6 - Remove outdated GPL clause; the file was totally rewritten 2002-11-18 15:45:27 +00:00
Edin Kadribasic d40c5e2624 Really nuke win32 linking warnings. 2002-11-18 14:33:34 +00:00
Ilia Alshanetsky 6e99ecdb01 Hopefully fix win32 linker warnings. 2002-11-18 13:17:14 +00:00
Edin Kadribasic 03fc9eb415 Initial attempt to get apache_hooks api to compile on windows.
Still getting link errors with
undefined symbol: 'php_request_startup_for_hook'.
2002-11-18 12:52:57 +00:00
Wez Furlong 039d6a1668 wb -> r+b 2002-11-18 12:40:12 +00:00
Ilia Alshanetsky d9ecd30cc4 Changed memory allocation wrappers to macros, so that it is possible to see
where the memory leak is happening.
2002-11-18 12:31:39 +00:00
Edin Kadribasic f8026b7453 Updated windows build file. 2002-11-18 12:30:08 +00:00
Edin Kadribasic f876916381 Added .cvsignore file. 2002-11-18 12:29:29 +00:00
Edin Kadribasic 5b292d5348 Remove fribidi from the NEWS item about extensions available on windows
for now. This is because I'm unable to get fribidi library to compile
on windows.
2002-11-18 12:16:12 +00:00
Wez Furlong bceb56b2ba Re-enable the curlwrappers configure option.
I still don't recommend it's use unless you are hacking both curl and PHP
to make it work.
2002-11-18 12:00:21 +00:00
Wez Furlong 110fd64bbd Amend news about mbstring enabled by default 2002-11-18 11:55:11 +00:00
Wez Furlong 5b7537ecd2 Merge the temp file mode fix from the branch,
add missing Id tag.
2002-11-18 11:49:06 +00:00
Wez Furlong ca58966a0d Merge streams changes from branch. 2002-11-18 11:39:42 +00:00
Rasmus Lerdorf a94a226691 Fix a few warnings - compiles nicely now 2002-11-18 06:14:10 +00:00
George Schlossnagle 2c34ea1be4 #defined offsetof, for systems that can't find it 2002-11-18 06:09:23 +00:00
Sebastian Bergmann 51e4dbaba0 Fix ZTS build. 2002-11-18 06:04:06 +00:00
Andi Gutmans 6d8a643edb - MFZE1 2002-11-18 05:27:46 +00:00
foobar 6987855e95 Fixed bug: #20458 (--with-qtdom=shared broken) 2002-11-18 05:06:02 +00:00
foobar 43584058e9 Added error message if browscap location is not set in php.ini 2002-11-18 03:23:51 +00:00
Ilia Alshanetsky c7fa1fa99f Fixed bug #20462. 2002-11-18 03:16:13 +00:00
Ilia Alshanetsky c5107b8989 Removed duplicate php_compat.h include. 2002-11-18 02:30:27 +00:00
George Schlossnagle 824fdad6c1 initial import of all these files. This was previously the apache_hooks
branch of the apache sapi.  Now it lives on its own.  General functionality
seems to be working, though there may be a problem with some
output buffering, most likely due to the way that sapi_deactivate needs
to be mangled with here.
2002-11-18 01:01:21 +00:00
George Schlossnagle 99c7ddc3a8 added support functions for the apache_hooks SAPI 2002-11-18 00:59:23 +00:00
foobar a3e9ae20d9 Fix the test. (and indented it for easier bug spotting :) 2002-11-18 00:41:27 +00:00
Ilia Alshanetsky f14b742392 Fixed bug #20466. 2002-11-17 22:52:47 +00:00
Ilia Alshanetsky 8d00d54f2f Fixed gd 2.0.4 check 2002-11-17 21:57:43 +00:00
Sebastian Bergmann 9229918fd7 Fix warning. HAVE_MEMMOVE is already defined in config.w32.h. 2002-11-17 21:50:00 +00:00
Sebastian Bergmann b4e42dd43f Fix Win32 build. (Lots of linkage warnings remain!) 2002-11-17 21:29:16 +00:00
Ilia Alshanetsky a10e0b6d8e A better gd >=2.0.4 version check for non-bundled gd library. 2002-11-17 20:18:44 +00:00
Derick Rethans 8c86784cae - MFB 2002-11-17 19:45:10 +00:00
Ilia Alshanetsky 06d94f2169 Expat upgrade news. 2002-11-17 18:57:21 +00:00
Ilia Alshanetsky cea2419529 Upgraded the bundled expat library to 1.95.5 (latest stable, atm).
Fixed bug #20442.
2002-11-17 18:37:48 +00:00
Stanislav Malyshev 29695934ed fix the leak 2002-11-17 17:57:57 +00:00
Derick Rethans 1a5037de1a - Fix compile problems for mips pro 2002-11-17 14:25:50 +00:00
Zeev Suraski d372861f03 Unify handling of error_reporting - fix bug #16137 2002-11-17 13:26:38 +00:00
Derick Rethans c3fe54dfab - MFB: Fix memory allocation problem in bundled GD (reported by Brian Havard) 2002-11-17 13:11:46 +00:00
Marcus Boerger 24726b0c64 Conversion fix by Michael Mauch 2002-11-17 09:27:48 +00:00
Ilia Alshanetsky 3bef247fcc Fixed a problem that would cause include/require("/dir/file") to fail on
Windows.
2002-11-17 00:06:50 +00:00
Marcus Boerger 2442adabe5 Force float for the float test 2002-11-16 23:45:58 +00:00
Marcus Boerger 4f747e80f0 Show module used in test 2002-11-16 19:43:53 +00:00
Marcus Boerger 015c117e37 -Do not rely on a side effect of 32bit platforms (patch by Michael Mauch)
-remove unused sections
2002-11-16 17:28:04 +00:00
Marcus Boerger 31e1cd13e2 removed unused sections 2002-11-16 17:26:52 +00:00
Ilia Alshanetsky 47596de32f Fixed the test so it works properly on both 32 and 64 bit platforms. 2002-11-16 17:26:26 +00:00
Marcus Boerger a3157908a8 Make getimagesize more robust against corrupt files 2002-11-16 17:02:07 +00:00
Georg Richter 208a3a3717 forgot to decrement result_allocated :( 2002-11-16 16:07:54 +00:00
Sebastian Bergmann 47388f2121 Fix Win32 build. 2002-11-16 08:30:31 +00:00
Andi Gutmans ce06e7ba77 - MFZE1 2002-11-16 07:37:03 +00:00
Andi Gutmans e1725b26fa - MFZE1 2002-11-16 07:32:53 +00:00
Stig Bakken 7547238723 no longer in use 2002-11-15 23:19:41 +00:00
Marcus Boerger dbf8593b5b When --enable-dba is used then include builtin modules unless --without-xxx
is not used.
2002-11-15 21:28:42 +00:00
Ilia Alshanetsky 2306c0e9d7 Removed the md5 checks since the files may be slightly different due to
float -> int conversion inconsistencies on various architectures.
2002-11-15 18:53:07 +00:00
Maxim Maletsky 9e3788864b WS 2002-11-15 18:20:59 +00:00
Maxim Maletsky 336e559718 Tons of WS fixes all over the file 2002-11-15 17:59:19 +00:00
Ilia Alshanetsky f0e2c04582 Revert of previous patch ad requested by Andi. 2002-11-15 16:36:55 +00:00
Ilia Alshanetsky 8193641d2d With ZTS on, we need to resolve the full paths before making symlinks.
If a chdir() call occurs before the symlink operation, the symlink is
created in the current directory rather then directory we've chdired to
because in ZTS we don't actually chdir but store the new path internally.

For an example of this problem consider the ext/standard/tests/file/001.phpt
test under ZTS.
2002-11-15 16:34:16 +00:00
Marcus Boerger 7ba0d505af Use eregi is better (noticed by Jon) 2002-11-15 16:33:05 +00:00
Moriyoshi Koizumi 90317cbc5d Always use binary mode for magic files 2002-11-15 16:25:31 +00:00
Moriyoshi Koizumi 7222abda70 Include php_config.h for HAVE_MBSTRING 2002-11-15 16:13:36 +00:00
Marcus Boerger 93769053cc Use flatfile if available.
# This way we are using the internal library which we know about most.
2002-11-15 16:11:51 +00:00
Moriyoshi Koizumi 003be7fe32 Divided the overload test into two so as to handle the case mbregex is
not enabled
2002-11-15 15:59:07 +00:00
Marcus Boerger 7d03dc004e Show which handler was used in the test 2002-11-15 15:58:09 +00:00
Marcus Boerger 0f66b352e9 -Allow skip in upper letters.
-Add 'info' result to --SKIPIF-- -> see following dba commits
2002-11-15 15:57:00 +00:00
Marcus Boerger 483502fe10 Speling (found by Andi) 2002-11-15 15:35:11 +00:00
Moriyoshi Koizumi b62afe783d %s/SKIP/skip/g 2002-11-15 15:34:57 +00:00
Marcus Boerger 5841e290ac Simplify and show skip reason 2002-11-15 15:22:07 +00:00
Marcus Boerger 16af3f7d11 Update to new syntax suggestion 2002-11-15 15:19:02 +00:00
Marcus Boerger adffe9fba6 Show correct result 2002-11-15 15:17:39 +00:00
Moriyoshi Koizumi 3ecc71a099 Fixed segfault in case the specified magic file cannot be read. 2002-11-15 15:13:30 +00:00
Moriyoshi Koizumi 1391f774cf Bug fixing news 2002-11-15 15:07:24 +00:00
Moriyoshi Koizumi 46b4abc08b Removed unnecessary ?> 2002-11-15 14:53:58 +00:00
Moriyoshi Koizumi b23d2c8beb Fixed bogus SKIPIF conditions. 2002-11-15 14:49:57 +00:00
Marcus Boerger 8c598f8bff Only show the first results 2002-11-15 14:46:52 +00:00
Andi Gutmans 5c12ee2474 - MFZE1 2002-11-15 14:30:40 +00:00
Moriyoshi Koizumi f0a7db1c7e Added some skipif conditions to handle the case mbstring is enabled but mbregex is disabled. 2002-11-15 14:26:33 +00:00
Andi Gutmans 55e127a6d5 - Commit fix for bug #19566 (I think it's by Marcus :) 2002-11-15 14:25:44 +00:00
Marcus Boerger ea971db849 Show Zend version 2002-11-15 14:23:40 +00:00
Moriyoshi Koizumi 57ca42e10f Bug fixing news 2002-11-15 13:36:49 +00:00
Marcus Boerger 66ec203e70 Showing memleaks for a memleak test is a good idea 2002-11-15 11:55:57 +00:00
Marcus Boerger 4ef6a3af03 db is deprecated now 2002-11-15 11:49:58 +00:00
Marcus Boerger b030a7a140 Fix segfaults (check ext/domxml/tests/domxml002.phpt) 2002-11-15 11:06:13 +00:00
Sander Roobol 8fb395bb9e Move the build-environment stuff down or the test results up, so you
don't need to scroll down to see the failed tests.
2002-11-15 10:37:41 +00:00
Georg Richter d46bd1cd63 removed restore_connection_defaults for pconnects (discussed on php-dev@)
bug #19529 closed
bug #12513 reopened
2002-11-15 10:35:10 +00:00
foobar dadfd6e94a ws fix 2002-11-15 07:21:33 +00:00
Moriyoshi Koizumi fb20eae7fc Fixed bug #20381 2002-11-15 02:16:41 +00:00
Moriyoshi Koizumi ac209557dd Added a test case for bug #20381 2002-11-15 02:11:23 +00:00
Maxim Maletsky cd9b495663 I mean - todo typo :) 2002-11-15 02:06:11 +00:00
Maxim Maletsky 05f07d2eba todo typo 2002-11-15 02:05:06 +00:00
Moriyoshi Koizumi ee37386183 Use C comments 2002-11-15 01:45:23 +00:00
Andrei Zmievski ca332dfc96 Oops. 2002-11-15 00:32:42 +00:00
Andrei Zmievski 3e8a800a96 Fix function prototype. 2002-11-15 00:31:10 +00:00
Sascha Schumann 04e564dec5 use grep -E instead of egrep. the latter is not defined by POSIX anymore 2002-11-15 00:20:17 +00:00
Stig Bakken 40ac4a2d68 Added error codes for the PEAR_Dependency class
Changed the dependency API to have a reference to an error message
string as first arg to all check methods
2002-11-14 23:23:21 +00:00
Moriyoshi Koizumi 5ca953b10f Fixed a problem that ICONV_IMPL doesn't give a correct value in win32 build. 2002-11-14 23:07:53 +00:00
Stig Bakken bdeb45b335 Added PATH_SEPARATOR constant 2002-11-14 22:50:01 +00:00
Stig Bakken 9f39cc0626 * a little bit of internal refactoring 2002-11-14 22:41:56 +00:00
Moriyoshi Koizumi 9efefc742b Added a test for zend-multibyte extension 2002-11-14 22:38:43 +00:00
Marcus Boerger 25641a7e96 Minor test corrections 2002-11-14 21:45:01 +00:00
Marcus Boerger 37e64f38ac Test is affected by mbstring 2002-11-14 21:43:49 +00:00
Andrei Zmievski cbec84d93d MFZE1 2002-11-14 21:36:07 +00:00
Moriyoshi Koizumi e40416ebf6 Fixed possible buffer over run in php_mb_safe_strrchr_ex() 2002-11-14 21:33:36 +00:00
Maxim Maletsky 7890b6fc87 Added function OCIPasswordChange() that allows renewal of an expired Oracle password.
# Tested, but still considered experimental...
2002-11-14 21:26:57 +00:00
Andrei Zmievski 26bd73fec6 Sort the modules for info output as well. 2002-11-14 21:15:42 +00:00
Marcus Boerger dbb95f338e file() is affected by magic_quotes_runtime 2002-11-14 21:15:31 +00:00
Marcus Boerger a81fe09722 Add info: Add magic_quotes_runtime support 2002-11-14 21:11:40 +00:00
Marcus Boerger a14bc7685d Add magic_quotes_runtime support 2002-11-14 21:09:41 +00:00
Marcus Boerger 5ad332f846 Add magic_quotes_runtime which affects several tests 2002-11-14 21:02:24 +00:00
Melvyn Sopacua 8298f6f982 typo 2002-11-14 20:57:48 +00:00
Andrei Zmievski e09d62c435 Sort the modules and extensions before printing them when -m switch is used. 2002-11-14 20:32:28 +00:00
Marcus Boerger 8579756c05 Test for bug #14383 2002-11-14 20:30:53 +00:00
Marcus Boerger 6048db9005 Only set the overwrites once 2002-11-14 20:12:36 +00:00
Melvyn Sopacua 87e3b97057 Add a note about the mime-type 2002-11-14 19:44:26 +00:00
Moriyoshi Koizumi 6841184abc Fix build 2002-11-14 19:04:29 +00:00
Moriyoshi Koizumi dac0b6fc4f Moved some mbregex related portions from mbstring.c to php_mbregex.c
# No need to merge this change to PHP_4_3 branch
2002-11-14 18:54:42 +00:00
Moriyoshi Koizumi db6efcf7e5 Prevent warnings under safe mode 2002-11-14 18:38:38 +00:00
Ilia Alshanetsky eef51c3d6b Disable safe_mode as it interferes with just about every test that needs
to access the file system, set enviroment variables or execute commands.
2002-11-14 18:38:19 +00:00
Marcus Boerger 29a40a1909 Missed that 2002-11-14 17:20:50 +00:00
Ilia Alshanetsky 4e1d684027 Fixed ZTS compile warning. 2002-11-14 16:32:30 +00:00
Stefan Esser 658fd1ba8d Fixing possible remote overflow due to mbstring translation. 2002-11-14 16:30:07 +00:00
Ilia Alshanetsky 5f7de8bf5b Fixed bug #20423. 2002-11-14 16:20:23 +00:00
Marcus Boerger f986cb84f3 Fix TSRM build 2002-11-14 15:09:53 +00:00
Marcus Boerger a391c4b12b Fix warnings (Marcus & Pierre-Alain Joye) 2002-11-14 15:08:39 +00:00
Marcus Boerger 9669932516 Info about gd changes 2002-11-14 14:58:01 +00:00
Wez Furlong f921ea9f7d Add a test case for this "bug" # 20134.
I'm not sure that this test is actually useful, so I'm not adding
it to the branch.
2002-11-14 14:56:35 +00:00
Marcus Boerger da20e867f3 Info about closed bugs 2002-11-14 14:38:20 +00:00
Marcus Boerger 5ec9375760 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:32:39 +00:00
Wez Furlong 4e85935386 MFB 2002-11-14 14:26:15 +00:00
Ilia Alshanetsky 8bfe7d76ea Fix bug 19689, solution suggested by dmitry@koteroff.ru. 2002-11-14 13:45:08 +00:00
Ilia Alshanetsky 6b7d77a7a0 Fixed bug #20420 and added partial urls to the test of the function. 2002-11-14 13:40:14 +00:00
Wez Furlong b01add793c Add this test to make sure that fopencookie is detected and working
correctly (or that the less efficient tmpfile casting is working).
More details in the test itself.
2002-11-14 12:20:36 +00:00
Wez Furlong 08362f90d9 Fix build for unix.
Not sure if this needs merging to the branch (haven't got that far yet today).
2002-11-14 12:06:01 +00:00
Wez Furlong 9ae3c2f7bd Commit these before Sterling renames the files again :-)
When curlstreams are enabled, registers a each supported protocol
with PHP.
"More Correctly" implement eof for curlstreams.
Still not ready for anything like primetime.
2002-11-14 11:41:24 +00:00
Derick Rethans bab4957d1c - MFB: Fixed bug #20484 (stream_get_meta_data crashes on a normal file
stream). (Derick, Wez)
2002-11-14 10:56:35 +00:00
Jon Parise 92df58dab6 @- Added an optional "step" parameter to range(). (Jon) 2002-11-14 05:46:10 +00:00
Sterling Hughes 89ea16ffaa remove C++ comments 2002-11-14 04:07:51 +00:00
James Cox ad9788d853 changing..
#also, i think the qa and web team needs updating -- i'd like to see web change to a more general infrastructure category... anyone care to volunteer? :)
2002-11-14 02:05:53 +00:00
James Cox d3663f76b5 englishify 2002-11-14 01:54:38 +00:00
Sascha Schumann 1585ad97ff Fix "make install" in vpath env 2002-11-14 01:35:20 +00:00
Sascha Schumann 46a99e9022 - Remove PHP_DISABLE_CLI
- Streamline ircg build: thttpd-dependent part moved into separate source
  file, so that it can be added to the SAPI-only object list.
2002-11-14 01:09:46 +00:00
Sascha Schumann f7c6d9fb2a upgrade files to libtool 1.4.3 shipped ones
# should be safe to upgrade these to the 1.5.x ones
2002-11-14 00:41:53 +00:00
foobar 8efbeb68a1 MFB: Fix for bug: #20412 2002-11-14 00:21:14 +00:00
Edin Kadribasic 1eddce79dd MFB (made mbstring compile on windows again). 2002-11-13 23:11:14 +00:00
Sterling Hughes 9d04acdaaa curl_multi_info_read is unimplemented... 2002-11-13 22:43:31 +00:00
Ilia Alshanetsky c7da0b117e Moved news entry about imagefilter() to proper location. 2002-11-13 22:35:16 +00:00
Sterling Hughes 537284418c add multi support and reorganize things a bit... 2002-11-13 22:25:33 +00:00
foobar ae1fcb4542 Welcome 4.4.0 2002-11-13 22:24:49 +00:00
Edin Kadribasic 7cdffea872 Really remove mbstring from the build.
# mbstring is gone completely as it does not build currently on win32
# as a separate module
2002-11-13 21:29:55 +00:00
Edin Kadribasic f15420b3e1 Allow mbstring defines to be somewhere else without warnings. 2002-11-13 21:28:16 +00:00
Ilia Alshanetsky d183eb1e31 New gd function. 2002-11-13 20:07:12 +00:00
Ilia Alshanetsky 4522738188 Added tests for imagefilter() function. 2002-11-13 20:03:59 +00:00
Ilia Alshanetsky 901980b3ab Added imagefilter() function by Pierre-Alain Joye (paj@pearfr.org). This
function allows negate, grayscale, brightness, contrast, colorize, selective blur,
Gaussian blur, edge detect, smooth, sharpen and emboss filters to be applied
on an image.
2002-11-13 20:02:58 +00:00
Stig Bakken fb179417ef * remove debug output 2002-11-13 19:49:28 +00:00
Derick Rethans 315927cc9b - Moved cybermut to PECL 2002-11-13 19:40:10 +00:00
Andrei Zmievski 0eea23a4f8 Change version to 4.4.0-dev. 2002-11-13 19:19:05 +00:00
foobar d3d7c3d486 moved this entry under correct version 2002-11-13 18:28:50 +00:00
Ilia Alshanetsky a7487bb4f8 Compile warning fix. 2002-11-13 17:17:32 +00:00
Ilia Alshanetsky 0cb9c53033 Added a skip condition for when mail() function is not avaliable. 2002-11-13 17:16:33 +00:00
Ilia Alshanetsky b0d519f730 Added a skip condition for when the encoding needed for the test is not
available or supported.
2002-11-13 16:52:48 +00:00
1120 changed files with 56106 additions and 74235 deletions

No files matched your search

+2376 -27041
View File
File diff suppressed because it is too large. Load diff
BIN
View File
Binary file not shown.
+5 -5
View File
@@ -197,7 +197,7 @@ MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: bz2
PRIMARY MAINTAINER: Hartmut Holzgraefe <hartmut@six.de>
PRIMARY MAINTAINER: Hartmut Holzgraefe <hholzgra@php.net>
MAINTENANCE: Odd Fixes
STATUS: Working
SINCE: 4.0.3
@@ -215,7 +215,7 @@ STATUS: Working
SINCE: 4.0.6
-------------------------------------------------------------------------------
EXTENSION: calendar
PRIMARY MAINTAINER: Hartmut Holzgraefe <hartmut@six.de>
PRIMARY MAINTAINER: Hartmut Holzgraefe <hholzgra@php.net>
MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
@@ -235,7 +235,7 @@ STATUS: Experimental
SINCE: 4.0.5
-------------------------------------------------------------------------------
EXTENSION: ctype
PRIMARY MAINTAINER: Hartmut Holzgraefe <hartmut@six.de>
PRIMARY MAINTAINER: Hartmut Holzgraefe <hholzgra@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
@@ -469,7 +469,7 @@ MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: xslt
PRIMARY MAINTAINER: Hartmut Holzgraefe <hartmut@six.de>
PRIMARY MAINTAINER: Hartmut Holzgraefe <hholzgra@php.net>
MAINTENANCE: Odd Fixes
STATUS: Working (mostly)
-------------------------------------------------------------------------------
@@ -489,7 +489,7 @@ MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: zziplib
PRIMARY MAINTAINER: Hartmut Holzgraefe <hartmut@six.de>
PRIMARY MAINTAINER: Hartmut Holzgraefe <hholzgra@php.net>
MAINTENANCE: Odd Fixes
STATUS: Working
SINCE: 4.0.5
+2 -2
View File
@@ -1,6 +1,6 @@
--------------------------------------------------------------------
The PHP License, version 3.0
Copyright (c) 1999 - 2002 The PHP Group. All rights reserved.
The PHP License, Version 3.0
Copyright (c) 1999 - 2003 The PHP Group. All rights reserved.
--------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
+2 -2
View File
@@ -37,7 +37,7 @@ install-modules: build-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
$(INSTALL) modules/* $(INSTALL_ROOT)$(EXTENSION_DIR) >/dev/null 2>&1 || true
install-tester:
@echo "Installing regression tester: $(INSTALL_ROOT)$(PEAR_INSTALLDIR)/"
@@ -49,7 +49,7 @@ 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) \
CC="$(CC)" \
$(top_builddir)/$(SAPI_CLI_PATH) -d 'open_basedir=' -d 'safe_mode=0' $(top_srcdir)/run-tests.php $(TESTS)
clean:
+142 -61
View File
@@ -1,18 +1,97 @@
PHP 4 NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
? ? ??? 2002, Version 4.3.0
- ATTENTION! "make install" will *by default* install the CLI SAPI binary in
{PREFIX}/bin/php. If you don't disable the CGI binary, it will be
installed as {PREFIX}/bin/php-cgi.
- Removed extensions: (Jan, Jani)
? ? ??? 200?, Version 5.0.0
- Fixed bug #17448 (Print the message when OCI_SUCCESS_WITH_INFO is returned).
- Enhanced jpeg 2000 support for GetImageSize(). (marcus, Adam Wright)
- Fixed bug #20155: xmlrpc compile problem with zendengine2 (Derick, Jan
Schneider)
- Implemented string.base64 stream filter. (Moriyoshi)
- Added domxml_node_get_path() (Lukas Schröder)
- Added iconv related functions (Moriyoshi)
. iconv_strlen()
. iconv_substr()
. iconv_strpos()
. iconv_strrpos()
. iconv_mime_decode()
. iconv_mime_encode()
- Removed support for libmcrypt 2.2.x to allow cleaner code. Another reason
to upgrade libmcrypt to a 2.5.x series as the older ones have too many bugs
to be safely used with PHP. (Derick)
- Fixed bug #20442 (upgraded bundled expat to 1.95.5). (Ilia)
- Made uniqid() parameters to be optional and allow any prefix length. (Marcus)
- Improved array_search() so that it can accept objects as a needle under
ZendEngine2. (Moriyoshi)
- Added new range() functionality (Ilia)
. Support for float modifier.
. Detection of numeric values inside strings passed as high & low.
. Proper handle the situations where high == low.
- Added imagefilter() function which allows application of various filters.
This function is only available with bundled GD. (Pierre-Alain Joye, Ilia)
- Added imageistruecolor(), only available with GD2+(Pierre-Alain Joye)
- Added antialiased drawing support (Pierre-Alain Joye, Ilia), available only
with bundled GD:
. imageantialias($im, $flag) to (de)active antialias
. imageline antialias support
. imagepolygon antialias support
27 Dec 2002, Version 4.3.0
- Make PHP_AUTH_* variables not available in safe mode under Apache when an
external basic auth mechanism is used. (Philip)
- Aliased dba_popen() to dba_open() until 4.3.1 when persistent STDIO streams
are introduced. (Andrei)
- Fixed a security bug in the bundled MySQL library. (Georg, Stefan)
- If you don't specify building any other SAPI "make install" will install the
CGI SAPI binary in {PREFIX}/bin/php. If you want to install CLI SAPI in that
location use "make install-cli" after "make install" or add --disable-cgi
to your configure options. In the Windows distribution CLI SAPI is included
in the "cli" folder. (Edin)
- Removed extensions: (Jan, Jani, Sebastian)
. ext/aspell
. ext/ccvs
. ext/cybercash
. ext/icap
. sapi/fastcgi
. sapi/fhttpd
- Moved ext/vpopmail to PECL. (James)
- Moved extensions to PECL (http://pear.php.net/): (James, Derick)
. ext/vpopmail
. ext/cybermut
- ZLIB extension is now built-in in the Windows distribution.
External extension (php_zlib.dll) has been removed. (Edin)
- Fix a crash when using invalid color index with imagecolortransparent()
(Pierre-Alain Joye).
- Fixed bug #20987 (no handling for client certificates). (Ilia)
- Fixed bug #21039 (crash when not supplying an IV to mcrypt_generic_init).
(Derick)
- Fixed bug #20936 (openssl_pkey_get was broken). (jeroen@derks.it, Wez)
- Fixed bug #20927 (wordwrap crash). (Ilia)
- Fixed bug #20796 (when register_globals is on & arrays with same names are
passed via get/post/cookie the data inside $_GET/$_POST/$_COOKIE can would be
corrupted). (Ilia)
- Fixed bug #20725 (if the upload directory cannot be written to, the POST data
after the uploaded file is lost). (Ilia)
- Fixed bug #20865 (array_key_exists() fails to find NULL key). (Ilia)
- Fixed bug #20812 (ftp_get returned NULL on success, instead of TRUE). (Ilia)
- Fixed bug #20785 (crash when using pdf_open_memory_image() to load a
true-color image). (Ilia)
- Fixed a crash when converting between true-color images (png/jpeg) and
gd1/gd2 image formats, png/jpeg -> gd1/gd2 -> png/jpeg conversion now
works correctly. (Ilia, (Pierre-Alain Joye).
- Fixed a memory leak in the bundled GD library inside
gdImageTrueColorToPalette(). (Ilia)
- Fixed bug #12776 (array_walk crash). (Moriyoshi)
- Fixed bug #20934 (htmlspecialchars returns latin1 from UTF-8). (Moriyoshi)
- Fixed bugs #20270, #15702, #18600 (segfaults in ext/java). (Tony J. White)
- Made bcmath extension thread safe. (Sander)
- Fixed bug #19566 (get_declared_classes() segfaults). (Moriyoshi, Marcus, Andi)
- Fixed bug #20381 (array_merge_recursive mangles input arrays). (Moriyoshi)
- Added -n command switch to cli and cgi version which allows to skip php.ini
parsing at startup. (Marcus, Wez)
- Fixed bug #19689 (absolute paths like /test/dir/ not working correctly).
(Ilia)
- Added "neutral" language entry to mbstring spec. (Moriyoshi)
- Changed bundled gd library to consider php.ini option memory_limit. (Marcus)
- Modified log() to accept multiple bases. (Jason)
- Fixed bugs #16190/18746 (ext/db: flatfile support with windows). (Marcus)
- Added gd_info() which returns an array of gd support information. (Marcus)
- Implemented features/changes requested in Bug #16960 (Timm):
. Added a new function sybase_unbuffered_query()
@@ -47,6 +126,7 @@ PHP 4 NEWS
. Added optional skip parameter to dba_fetch() to support multiple key-value
pairs with the same key for cdb handler.
. Added locking for those handlers that do not have their own locking.
. Added support for magic_quotes_runtime php.ini option.
. Added flatfile support what finally makes ext/db deprecated.
- Added imagerotate() which is available only when bundled libgd is used.
(Pierre-Alain Joye, Ilia)
@@ -62,7 +142,6 @@ PHP 4 NEWS
- Added dbx_escape_string() function to dbx module. (Marc)
- Added Oracle (oci8) support to dbx module. (Marc)
- Updated FDF extension to work with Adode fdftk 5.0. (Hartmut)
- Made raw POST data to be available also as "php://input" stream. (Hartmut)
- Added mb_strtolower() and mb_strtoupper(). (Moriyoshi)
- Fixed an infinite loop in setlocale() when only invalid locale names
were passed in the array. (patch by Pal Loberg, pallo@initio.no)
@@ -126,28 +205,63 @@ PHP 4 NEWS
- Fixed bug #19366 (gdImageFill crashes when x & y are outside of
the image's boundries). (Ilia)
- Fixed bug #13936 (__FILE__ constant didn't contain full path). (Ilia)
- Renamed:
socket_set_timeout() -> stream_set_timeout()
socket_set_blocking() -> stream_set_blocking()
set_file_buffer() -> stream_set_write_buffer()
socket_get_status() -> stream_get_meta_data()
As these functions can (in theory) work on any type of stream. (Wez)
- Added stream_context_create(), stream_context_set_params() and
stream_context_set_option and added an optional fourth parameter to
fopen() which accepts a stream context. Contexts allow sharing of
information between streams (a kind of "session") and setting notification
callbacks. (Wez)
- Added stream_filter_prepend() and stream_filter_append() which apply
a filter to either the top or the bottom of the filter stack for a stream.
Implemented "string.rot13" filter as an example; more filters are expected
to follow in later releases and other extensions. (Wez)
- Added stream_select() which works like socket_select but works on streams
returned by fopen(), fsockopen() and pfsockopen() instead. (Wez)
- PHP now has a new stream system that allows it to do some clever stuff with
fopen() and fsockopen(). As a result:
. URL wrappers natively supports https:// URLs if you have compiled
OpenSSL support into PHP (shared extension does not support this).
. Added support for fopen("ftps://...", ...) which allows to connect to FTP
servers via SSL. (Stefan Esser)
. fsockopen() adds support for ssl:// and tls:// connections via TCP/IP
. copy($srcfilename, $destfilename) can now be used with URL wrappers
. zlib wrappers/streams can be used even on systems without fopencookie()
. Changed 'zlib:' fopen wrapper to 'compress.zlib://' and deprecate
'zlib:' to avoid ambiguities when filenames have ':' characters. (Wez)
. Added 'compress.bzip2://' stream and wrapper support.
. Added user-space streams - it is now possible to define a class in PHP
code and register it as a URL wrapper. (stream_register_wrapper)
. Most extensions now support streams when passing files, which means
that those extensions will now also support URL wrappers. (Wez)
. Added URL-wrapper support to exif. (Marcus)
. Added memory stream support. (Marcus)
. Renamed:
socket_set_timeout() -> stream_set_timeout()
socket_set_blocking() -> stream_set_blocking()
set_file_buffer() -> stream_set_write_buffer()
socket_get_status() -> stream_get_meta_data()
As these functions can (in theory) work on any type of stream. (Wez)
. Raw POST data is now available as "php://input" stream. (Hartmut)
. fopen("php://output", "wb") returns a stream that writes to the output
buffer (like echo and print). (Wez)
. Added stream_context_create(), stream_context_set_params() and
stream_context_set_option and added an optional fourth parameter to
fopen() which accepts a stream context. Contexts allow sharing of
information between streams (a kind of "session") and setting
notification callbacks. (Wez)
. Made the "User-Agent" header sent by http:// and https:// wrappers
configurable in php.ini or via a stream context. (Sterling)
. Added stream_filter_prepend() and stream_filter_append() which apply
a filter to either the top or the bottom of a stream filter stack.
Implemented "string.rot13" filter as an example; more filters are
expected to follow in later releases and other extensions. (Wez)
. Added stream_select() which works like socket_select but works on
streams returned by fopen(), fsockopen() and pfsockopen() instead. (Wez)
. Added STDIN, STDOUT and STDERR constants for CLI sapi reflecting opened
streams to their respective standard I/O counterparts. (Edin)
. Added php.ini option "auto_detect_line_endings" which enables PHP to
detect Macintosh, Unix and Dos end-of-line characters in fgets() and
file(). Fixes bugs #16521 and #16708. (Wez)
. Fixed include(), require() and GD functions to work with remote files
under win32.
Fixed bug #18609 (ImageCreateFromJPEG can't fetch from a URL). (Wez)
- Fixed bug #18022 (fopen does not work with php://stdin anymore on Solaris).
(Wez)
- Added php.ini option "default_socket_timeout" to set the timeout limit for
PHP network streams. (kalowsky, ilia@prohost.org, Wez)
- Added file_get_contents() which returns the contents of a file as a string.
This function also supports the URL wrappers. (Wez)
- Fixed bug #19595 (Missing functions for GD2 format handling). (Edin)
- Fixed bug #19633 (Wrong directories in ext/ldap/config.m4). (Derick)
- Fixed bugs #17274 and #19627 (segfault in sem_remove). (Wez)
- Fixed bug #18022 (fopen does not work with php://stdin anymore on Solaris).
(Wez)
- Added mb_convert_case() function to the mbstring extension which can convert
strings between upper, lower and title case using Unicode mappings.
Fixed bug #19257 (strtolower & strtoupper does not work for UTF-8 strings).
@@ -157,13 +271,8 @@ PHP 4 NEWS
- Fixed bug #18556 (Scripting Engine, problem with locales like tr_TR). (Ilia)
- Changed y2k_compliance to default to 1 now. (Sascha)
- Added platform independent socket error constants for better error handling. (Jason)
- Fixed include(), require() and GD functions to work with remote files under
win32. Fixed bug #18609 (ImageCreateFromJPEG can't fetch from a URL. (Wez)
- Update output of phpinfo() to use more CSS to reduce the file size, do
proper HTML escaping, and make it XHTML compliant. (Colin)
- Added php.ini option "auto_detect_line_endings" which enables PHP to detect
Macintosh, Unix and Dos end-of-line characters in fgets() and file().
Fixes bugs #16521 and #16708. (Wez)
- Fixed compile errors in the FriBidi extension (Bug #16414). (Tal)
- Fixed bugs #7472, #12120 and #12989 as well as other potential problems
with strip_tags() function. (Ilia)
@@ -185,12 +294,6 @@ PHP 4 NEWS
flag. (Andrei)
- Fixed a build failure with the OCI8 extension on Tru64.
(Patch by Michael Mauch, micahel.mauch@gmx.de)
- Added support for fopen("ftps://...", ...) which allows to connect to FTP
servers via SSL. (Stefan Esser)
- Made the "User-Agent" header sent by the fopen wrappers to be configurable
in php.ini or via a stream context. (Sterling)
- Added support for fopen("php://output", "wb") which returns a stream that
writes to the output buffer (like echo and print). (Wez)
- Added --disable-all configure option. (Jani)
- Backported debug_backtrace() from ZendEngine2. (Thies)
- Added html-free phpinfo() output for CLI. (Jan)
@@ -211,7 +314,7 @@ PHP 4 NEWS
- Added XsltObject->result_dump_mem($result) for returning xslt-result directly
into a string and XsltObject->result_dump_file($result,$file[,$compression])
for dumping into a file. (morus.walter@web.de, chregu)
- Made mime_magic, FriBidi and ZIP extensions available on Windows. (Edin)
- Made mime_magic and ZIP extensions available on Windows. (Edin)
- Added xslt_backend_version() and xslt_backend_name() for getting
information about the processor backend. (chregu)
- Added php.ini option "allow_webdav_methods" to allow handling of
@@ -242,8 +345,6 @@ PHP 4 NEWS
- Fixed a bug in ODBC where closing the module caused a crash in the Windows
executable. (kalowsky)
- Fixed memory leaks in pack() and unpack(). (Patch by ilia@prohost.org)
- Added php.ini option "default_socket_timeout" to set the timeout limit for
PHP streams. (kalowsky, ilia@prohost.org, Wez)
- Added URLs to error messages which direct to a page describing the error or
function in question. (Derick, Wez, Marcus)
- Added odbc_data_source() functionality to identify DB ServerName, and a
@@ -301,7 +402,6 @@ PHP 4 NEWS
condition. Also fixed host resolution error messages on win32. (Jason)
- Added optional 3rd parameter 'recursive' to ftp_rawlist() which will
do 'LIST -R' instead of 'LIST'. (Jani)
- Disabled the fifth parameter in mail() when safe-mode is turned on. (Derick)
- Changed getimagesize() to always set unknown fields to 0 and added support
for iff imagetype. (Marcus)
- Added runtime Apache2 thread check to ensure we don't run a non-threaded
@@ -338,8 +438,6 @@ PHP 4 NEWS
the unix socket location. (e.g. NFS compiles, etc.) (James Cox)
- Fixed is_a() to properly work on extension registered classes. (Andrei)
- Added new constants: PHP_PREFIX and PHP_SHLIB_SUFFIX. (Stig)
- Added STDIN, STDOUT and STDERR constants for CLI sapi reflecting opened
streams to their respective I/O counterparts. (Edin)
- Added pctnl_alarm() function. (Edin)
- If zlib.output_compression is enabled and a page is compressed
a "Vary: Accept-Encoding" header is now added. (Stefan)
@@ -376,7 +474,6 @@ PHP 4 NEWS
when dealing with built-in extensions. (Sebastian)
- Added large OID value (2^31 to 2^32) support for pg_lo_import(),
pg_lo_unlink(), pg_lo_open() and pg_lo_export(). (Yasuo)
- Changed the mbstring extension to be enabled by default. (Yasuo)
- Fixed mixing OCIPlogon() and OCINLogon() to not leak Oracle-Sessions. (Thies)
- Added php.ini options for EXIF extension to encode and decode Unicode/JIS
user comments. (Marcus)
@@ -402,23 +499,6 @@ PHP 4 NEWS
available at http://www.jtatesoftware.com/cracklib/. (jtate)
- Added mysql_info() function. (Jan)
- Added mysql_list_processes() and mysql_stat() functions. (Georg)
- Added file_get_contents() which returns the contents of a file as a string.
This function also supports the URL wrappers. (Wez)
- Changed 'zlib:' fopen wrapper to 'compress.zlib://' to avoid ambiguities
when filenames have ':' characters. (Wez)
- Added URL-wrapper support to exif. (Marcus)
- PHP now has a new stream system that allows it to do some clever stuff with
fopen() and fsockopen(). As a result:
. URL wrappers natively supports https:// URLs
. fsockopen() adds support for ssl:// and tls:// connections via TCP/IP
. copy($srcfilename, $destfilename) can now be used with URL wrappers
. zlib wrappers/streams can be used even on systems without fopencookie()
. Added 'compress.bzip2://' stream and wrapper support.
. Added user-space streams - it is now possible to define a class in PHP
code and register it as a URL wrapper. (stream_register_wrapper)
. Most extensions now support streams when passing files, which means
that those extensions will support URL wrappers. (Wez)
. Added memory stream support. (Marcus)
- Fixed memory allocation problem on systems that have iconv() support in libc.
(Yasuo)
- Made var_dump() handle recursive structures better. (Yasuo, Derick)
@@ -429,6 +509,7 @@ PHP 4 NEWS
process is now more portable and less resource-consuming. (Sascha)
06 Sep 2002, Version 4.2.3
- Disabled the fifth parameter in mail() when safe-mode is turned on. (Derick)
- Enable UTF8 modifier support for PCRE on win32. (Wez, Edin)
- Enabled strcoll() on win32. (Markus)
- Fixed possible ASCII control char injection in mail(). (Stefan Esser)
+8 -8
View File
@@ -42,14 +42,14 @@ Type specifiers
z - the actual zval
The following characters also have a meaning in the specifier string:
| - indicates that the remaining parameters are optional, they
should be initialized to default values by the extension since they
will not be touched by the parsing function if they are not
passed to it.
/ - use SEPARATE_ZVAL_IF_NOT_REF() on the parameter it follows
! - the parameter it follows can be of specified type or NULL (only applies
to 'a', 'o', 'O', 'r', and 'z'). If NULL is passed, the results
pointer is set to NULL as well.
| - indicates that the remaining parameters are optional, they
should be initialized to default values by the extension since they
will not be touched by the parsing function if they are not
passed to it.
/ - use SEPARATE_ZVAL_IF_NOT_REF() on the parameter it follows
! - the parameter it follows can be of specified type or NULL (only applies
to 'a', 'o', 'O', 'r', and 'z'). If NULL is passed, the results
pointer is set to NULL as well.
Examples
--------
+5
View File
@@ -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.
+2 -139
View File
@@ -1,6 +1,6 @@
[IMPORTANT NOTICE]
------------------
Do _not_ ask to developers why some or all tests are failed under
Please do not ask developers why some or all tests are failing in
your environment! Let us know if you find why it fails. Thank you.
@@ -141,145 +141,8 @@ advised to test for non-zero, rather then a specific value.
[Creating new test files]
-------------------------
Writing test file is very easy if you are used to PHP.
See the HOWTO at http://qa.php.net/write-test.php
Here is an actual test file from standard module.
===== ext/standard/tests/strings/strtr.phpt =======
--TEST--
strtr() function
--FILE--
<?php
/* Do not change this test it is a REATME.TESTING example. */
$trans = array("hello"=>"hi", "hi"=>"hello", "a"=>"A", "world"=>"planet");
var_dump(strtr("# hi all, I said hello world! #", $trans));
?>
--EXPECT--
string(32) "# hello All, I sAid hi planet! #"
===== ext/standard/tests/strings/strtr.phpt =======
As you can see the file is devided into several sections. Below is a
list of all possible sections:
"--TEST--" is title of the test (required).
"--SKIPIF--" is condition when to skip this test (optional).
"--POST--" is POST variable passed to test script (optional).
"--GET--" is GET variable passed to test script (optional).
"--INI--" each line contains an ini setting e.g. foo=bar (optional).
"--FILE--" is the test script (required).
"--EXPECT--" is the expected output from the test script (required).
"--EXPECTF--" is an alternative of --EXPECT--. The difference is that
this form uses sscanf for output validation (alternative).
"--EXPECTREGEX--" is an alternative of --EXPECT--. This form allows the tester
to specify the result in a regular expression (alternative).
A test must at least contain the sections TEST, FILE and either EXPECT
or EXPECTF. When a test is called run-test.php takes the name from the
TEST section and writes the FILE section into a ".php" file with the
same name as the ".phpt" file. This ".php" file will then be executed
and its output compared to the contents of the EXPECT section. It is a
good idea to generate output with var_dump() calls.
/ext/standard/tests/strings/str_shuffle.phpt is a good example for using
EXPECTF instead of EXPECT. From time to time the algorithm used for shuffle
changed and sometimes the machine used to execute the code has influence
on the result of shuffle. But it always returns a three character string
detectable by %s. Other scan-able forms are %i for integers, %d for numbers
only, %f for floating point values, %c for single characters and %x for
hexadecimal values.
==== /ext/standard/tests/strings/str_shuffle.phpt ===
--TEST--
Testing str_shuffle.
--FILE--
<?php
/* Do not change this test it is a REATME.TESTING example. */
$s = '123';
var_dump(str_shuffle($s));
var_dump($s);
?>
--EXPECTF--
string(3) %s
string(3) "123"
==== end of /ext/standard/tests/strings/str_shuffle.phpt ===
/ext/standard/tests/strings/strings001.phpt is a good example for using
EXPECTREGEX instead of EXPECT. This test also shows that in EXPECTREGEX
some characters need to be escaped since otherwise they would be
interpreted as a regular expression.
==== /ext/standard/tests/strings/strings001.phpt ===
--TEST--
Test whether strstr() and strrchr() are binary safe.
--FILE--
<?php
/* Do not change this test it is a REATME.TESTING example. */
$s = "alabala nica".chr(0)."turska panica";
var_dump(strstr($s, "nic"));
var_dump(strrchr($s," nic"));
?>
--EXPECTREGEX--
string\(18\) \"nica\x00turska panica\"
string\(19\) \" nica\x00turska panica\"
==== end of /ext/standard/tests/strings/strings001.phpt ===
Some tests depend on modules or functions available only in certain versions
or they even require minimum version of php or zend. These tests should be
skipped when the requirement cannot be fullfilled. To achieve this you can
use the SKIPIF section. To tell run-test.php that your test should be skipped
the SKIPIF section must print out the word "skip" followed by a reason why
the test should skip.
==== /ext/exif/tests/exif005.phpt ===
--TEST--
Check for exif_read_data, unusual IFD start
--SKIPIF--
<?php
if (!extension_loaded('exif')) print 'skip exif extension not available';
?>
--FILE--
<?php
/* Do not change this test it is a REATME.TESTING example.
* test5.jpg is a 1*1 image that contains an Exif section with ifd = 00000009h
*/
$image = exif_read_data('./ext/exif/tests/test5.jpg','',true,false);
var_dump($image['IFD0']);
?>
--EXPECT--
array(2) {
["ImageDescription"]=>
string(11) "Ifd00000009"
["DateTime"]=>
string(19) "2002:10:18 20:06:00"
}
==== end of /ext/exif/tests/exif005.phpt ===
Test script and SKIPIF code should be directly written into *.phpt. However,
it is recommended to use include files when more test scripts depend on the
same SKIPIF code or when certain test files need the same values for some
input. But no file used by any test should have one of the following
extensions: ".php", ".log", ".exp", ".out" or ".diff".
Tests should be named according to the following list:
Class: Name: Example:
Tests for bugs bug<bugid>.phpt bug17123.phpt
Tests for functions <functionname>.phpt dba_open.phpt
General tests for extensions <extname><no>.phpt dba3.phpt
When you use an include file for the SKIPIF section it should be named
"skipif.inc" and an include file used in the FILE section of many tests
should be named "test.inc".
NOTE: All tests should run correctly with error_reporting(E_ALL) and
display_errors=1. This is the default when called from run-test.php.
If you have a good reason for lowering the error reporting, use --INI--
section and comment this in your testcode.
NOTE: If your test intentionally generates a PHP warning message use
$php_errormsg variable, which you can then output. This will result
in a consistent error message output across all platforms and PHP
configurations, preventing your test from failing due inconsistencies
in the error message content.
[How to help us]
----------------
+4 -13
View File
@@ -3,9 +3,7 @@ parenthesis means that person has taken on this project.
Zend
----
For PHP 4.3.0:
* Allow foreach ($array as $k => &$val) syntax. right now we cannot
traverse an array without copying each element.
For PHP 5.0.0:
* Allow foreach ($array as $k => list($a, $b)) syntax for multi
dimensional arrays.
* Look at replacing c-lib call tolower().
@@ -16,8 +14,8 @@ Zend
* Add configure test to determine if dlsym() requires underscore and set
DLSYM_NEEDS_UNDERSCORE accordingly. Perl and zsh have it in configure,
for example. (DONE?)
For PHP 5.0.0:
* Allow foreach ($array as $k => &$val) syntax. right now we cannot
traverse an array without copying each element.
* Native large number support (probably with GNU GMP)
* Const'ify APIs. Right now, many functions leave parameters untouched,
but don't declare those as const. This makes interaction with other
@@ -27,17 +25,10 @@ Zend
global
------
For PHP 4.3.0:
* Add aliases to functions to conform to new naming conventions, e.g.
str_to_upper().
* Make all extensions thread-safe.
* Make everything on the language-level independent of your locale
settings.
* Change PHP error messages, so that they point to pages or sections
in the PHP Manual.
in the PHP Manual.
* Make sure that all ZTS globals get destructed. Most ts_allocate_id()
calls should have a dtor entry.
* Activate all extensions by default that don't rely on external
dependencies. (eg ftp) (DONE?)
* on some platforms unimplemented function will just do nothing
(e.g. symlink) they should print a warning or not even be defined!
(DONE ?)
+211
View File
@@ -0,0 +1,211 @@
Component: Zend Engine 2
Important stuff to finish: PPP members/PPP methods,
support of overloaded extensions, possibly differentiate
between class and namespace as discussed with Stig in
Germany.
Responsibility: Zeev, Andi, Stas
Time frame: Couple of months for first part and extensions will be
ongoing while PHP is being fixed.
Things to leave for later versions: Native aggregation
support, accessing static members via object and not class.
Component: Aggregation
Responsibility: Andi, Stig?
Time frame: ?
Component: Introspection
get_function_definition(<is_callable> [field]) =>
array(
file => filename
line_start =>
line_end =>
parameters => array( name, byref, default )
static_variables => array( name, value/default )
scope => 'namespace' | 'class' | null
namespace => classname | namespacename | 'main'
protection => protection_flags
phpdoc => pre-scanned-phpdoc-string
type => 'internal' | 'user'
)
get_class_definition(<class> [field]) =>
array(
type => 'internal' | 'user'
file => filename
line_start =>
line_end =>
name => pretty-name
parent => classname | namespace | null
flags => bitfield (ABSTRACT)
methods => array( array( name, phpdoc ) )
default_properties => array( array( name, value, phpdoc ) )
private_properties => array( array( name, value, phpdoc ) )
protected_properties => array( array( name, value, phpdoc ) )
public_properties => array( array( name, value, phpdoc ) )
static_members => array( array( name, value, phpdoc ) )
constants => array( array( name, value, phpdoc ) )
classes => array( array( name, phpdoc ) )
phpdoc => pre-scanned-phpdoc-string
)
get_constant_definition(<constant> [field]) =>
array(
file => filename
line_start =>
line_end =>
name =>
value =>
phpdoc =>
)
get_global_variable_defintion(<name> [field]) =>
array(
file =>
line_start =>
line_end =>
name =>
phpdoc =>
)
We tried to take into account the implementation of each piece of
information, and there are some that are problematic, especially those
regarding constants and global variables (where do we store the extra
information?)
With "pre-scanned-phpdoc-string" we mean converting:
/**
* Blah blah blah
* @param foo ...
*/
to:
Blah blah blah
@param foo
The rest of the phpdoc handling should be left to an extension.
Responsibility: Stig, Andrei, Harald
Time frame: ?
Component: Redesign of API Versioning
Responsibility: ?
Time frame: 1 month
Component: Thread Safety
Identify the extensions that are not thread safe by design
or due to dependant libraries and identify them as such.
If possible try to resolve thread safety issue via code
improvements (if php code or patches will be accepted by
library maintainers). For situations where thread safety
cannot easily be acheived a flag in the extension API is
set so PHP can identify non-thread safe extensions. These
extensions will not be loaded in a ZTS compiled binary
(unless it is cli/cgi).
Responsibility: ?
Time frame: ?
Component: SAPI
Environment variables defined in the CGI spec need to be
verified in each SAPI module that they conform to the CGI
spec correctly. If they do not, the SAPI module needs to
fix the variable prior to script execution. Having this
conformity will aid in having PHP scripts run correctly
under different sapi modules.
Responsibility: Shane Caraveo & each sapi module owner
Timeframe: ? (but shouldn't be much effort, most modules are probably ok)
Component: Input Filtering
- Implement a SAPI input filter hook that will get called
just before registering a variable in the
treat_data/post_handler hooks.
- Make sure this is also done in mbstring
- Provide access functions, or perhaps a new
$_RAW_GET/POST/Cookie set of superglobals to get at the
unfiltered data
- Provide a .ini directive which allows people to set their
input filter to one of the built-in strip_tags,
htmlspecialchars or whatever other internal function might
be useful here.
- (The main benefit of this is to make it easier for people
to solve the XSS problem once and for all without having
to go through every line of their code and adding input
validation/filtering everywhere)
Responsibility: Rasmus
Timeframe: Yesterday
Component: RPC Abstraction Layer
Porting java, com, dotnet, xmlrpc, corba, soap and python, srm
(are there more ?) to work with the new oo api and preferably
by using ext/rpc.
Responsibility: Harald
Time frame: 2 months (but i have to wait for a few engine features first)
Component: OO Extensions
Each OO extension has to be revised and rewritten to fit into
the new OO model. We should decide which extensions are a must
to have for the release and which can be ported by the maintainer
later as a separate pecl release.
A list of extensions to be extended that have to be investigated:
* browscap
* aggregate
* all *sql extensions (*_fetch_object)
* domxml (seems like christian is rewriting it anyways)
* ming
Responsibility: Harald (, extension maintainers)
Component: Abstract Data Types (ADT)
Responsibility: Sterling, Harald
Time frame: ?
Component: MySQL Extension
Complete rewrite, leveraging the new MySQL 4 / MySQL 5
features.
Responsibility: Georg Richter, Zak Greant
Timeframe: ?
Component: XML
- Rewrite DOMXML and incorporate all (or most of) W3C-DOM2.
- Use the new ZE2 features (Exceptions, setter/getter).
- Add SAX(2), XML Schema.
- XSLT, HTML, XPath, XPointer, DTD Validation will still be
supported, have to find a meaningful API for it.
- Break BC, warn users now.
- Look at the libxml2 patch by lukas schröder and see if we can prevent
memory leaks with it (anyway, getting rid of mem-leaks and intelligent
memory management is on top prio...)
- In the longer term, domxml (or another name, as with todays features
domxml is a little bit misleading) shall be the main xml-class, which
covers most of what's needed for decent XML support in PHP ;)
But there is certainly place for others like Sablotron etc.
Responsibility: Christian Stocker
Timeframe: ?
Component: Test Suite
Extending the test suite with atleast a test for every
function in an extension that doesn't require external
resources. Also developing an automated test thing which
cvs ups's, compiles and tests the build on a daily base on
as much platforms/extensions as possible.
The test suite will also be extended to support threaded
testing and testing for differing sapi modules (via http
calls or other methods).
Reponsibility: Derick (, extension maintainers)
Time frame: 3 months
+44 -4
View File
@@ -158,6 +158,9 @@ TSRM_API void tsrm_shutdown(void)
next_p = p->next;
for (j=0; j<id_count; j++) {
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);
@@ -290,6 +293,15 @@ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
int hash_value;
tsrm_tls_entry *thread_resources;
#ifdef NETWARE
/* The below if loop is added for NetWare to fix an abend while unloading PHP
* when an Apache unload command is issued on the system console.
* While exiting from PHP, at the end for some reason, this function is called
* with tsrm_tls_table = NULL. When this happened, the server abends when
* tsrm_tls_table is accessed since it is NULL.
*/
if(tsrm_tls_table) {
#endif
if (!th_id) {
#if defined(PTHREADS)
/* Fast path for looking up the resources for the current
@@ -352,6 +364,9 @@ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
* changes to the structure as we read it.
*/
TSRM_SAFE_RETURN_RSRC(thread_resources->storage, id, thread_resources->count);
#ifdef NETWARE
} /* if(tsrm_tls_table) */
#endif
}
@@ -419,7 +434,12 @@ TSRM_API THREAD_T tsrm_thread_id(void)
#ifdef TSRM_WIN32
return GetCurrentThreadId();
#elif defined(NETWARE)
return NXThreadGetId();
/* There seems to be some problem with the LibC call: NXThreadGetId().
* Due to this, the PHPMyAdmin application is abending in PHP calls.
* Used the call, kCurrentThread instead and it works fine.
*/
/* return NXThreadGetId(); */
return kCurrentThread();
#elif defined(GNUPTH)
return pth_self();
#elif defined(PTHREADS)
@@ -441,16 +461,23 @@ TSRM_API MUTEX_T tsrm_mutex_alloc(void)
{
MUTEX_T mutexp;
#ifdef NETWARE
long flags = 0; /* Don't require NX_MUTEX_RECURSIVE, I guess */
#ifndef USE_MPK
/* To use the Recursive Mutex Locking of LibC */
long flags = NX_MUTEX_RECURSIVE;
NXHierarchy_t order = 0;
NX_LOCK_INFO_ALLOC (lockInfo, "PHP-TSRM", 0);
#endif
#endif
#endif
#ifdef TSRM_WIN32
mutexp = malloc(sizeof(CRITICAL_SECTION));
InitializeCriticalSection(mutexp);
#elif defined(NETWARE)
mutexp = NXMutexAlloc(flags, order, &lockInfo); /* return value ignored for now */
#ifdef USE_MPK
mutexp = kMutexAlloc((BYTE*)"PHP-TSRM");
#else
mutexp = NXMutexAlloc(flags, order, &lockInfo);
#endif
#elif defined(GNUPTH)
mutexp = (MUTEX_T) malloc(sizeof(*mutexp));
pth_mutex_init(mutexp);
@@ -481,8 +508,13 @@ TSRM_API void tsrm_mutex_free(MUTEX_T mutexp)
if (mutexp) {
#ifdef TSRM_WIN32
DeleteCriticalSection(mutexp);
free(mutexp);
#elif defined(NETWARE)
#ifdef USE_MPK
kMutexFree(mutexp);
#else
NXMutexFree(mutexp);
#endif
#elif defined(GNUPTH)
free(mutexp);
#elif defined(PTHREADS)
@@ -513,7 +545,11 @@ TSRM_API int tsrm_mutex_lock(MUTEX_T mutexp)
EnterCriticalSection(mutexp);
return 1;
#elif defined(NETWARE)
#ifdef USE_MPK
return kMutexLock(mutexp);
#else
return NXLock(mutexp);
#endif
#elif defined(GNUPTH)
return pth_mutex_acquire(mutexp, 0, NULL);
#elif defined(PTHREADS)
@@ -540,7 +576,11 @@ TSRM_API int tsrm_mutex_unlock(MUTEX_T mutexp)
LeaveCriticalSection(mutexp);
return 1;
#elif defined(NETWARE)
#ifdef USE_MPK
return kMutexUnlock(mutexp);
#else
return NXUnlock(mutexp);
#endif
#elif defined(GNUPTH)
return pth_mutex_release(mutexp);
#elif defined(PTHREADS)
+8
View File
@@ -40,7 +40,11 @@
# include <windows.h>
#elif defined(NETWARE)
# include <nks/thread.h>
#ifdef USE_MPK
# include <mpklib4php.h>
#else
# include <nks/synch.h>
#endif
#elif defined(GNUPTH)
# include <pth.h>
#elif defined(PTHREADS)
@@ -60,7 +64,11 @@ typedef int ts_rsrc_id;
# define MUTEX_T CRITICAL_SECTION *
#elif defined(NETWARE)
# define THREAD_T NXThreadId_t
#ifdef USE_MPK
# define MUTEX_T MUTEX
#else
# define MUTEX_T NXMutex_t *
#endif
#elif defined(GNUPTH)
# define THREAD_T pth_t
# define MUTEX_T pth_mutex_t *
+4 -2
View File
@@ -3,7 +3,9 @@
#define HAVE_UTIME 1
/* Though we have alloca(), this seems to be causing some problem with the stack pointer -- hence not using it */
/* #define HAVE_ALLOCA 1 */
/* Though we have alloca(), this seems to be causing some problem
* with the stack pointer. Hence not using it
*/
/*#define HAVE_ALLOCA 1*/
#endif
+2
View File
@@ -25,7 +25,9 @@
#pragma alloca
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
# ifndef NETWARE
char *alloca ();
# endif
# endif
# endif
# endif
+133 -153
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 |
@@ -13,6 +13,7 @@
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Venkat Raghavan S <rvenkat@novell.com> |
| Anantha Kesari H Y <hyanantha@novell.com> |
+----------------------------------------------------------------------+
*/
@@ -39,8 +40,9 @@
#include "mktemp.h"
/* strtok() call in LibC is abending when used in a different address space -- hence using
PHP's version itself for now : Venkat (30/4/02) */
/* strtok() call in LibC is abending when used in a different address space
* -- hence using PHP's version itself for now
*/
#include "tsrm_strtok_r.h"
#define tsrm_strtok_r(a,b,c) strtok((a),(b))
@@ -50,211 +52,189 @@
TSRM_API FILE* popen(const char *commandline, const char *type)
{
char *command = NULL, *argv[MAX_ARGS] = {'\0'}, **env = NULL;
char *command = NULL, *argv[MAX_ARGS] = {'\0'}, **env = NULL;
char *tempName = "sys:/php/temp/phpXXXXXX.tmp";
char *filePath = NULL;
char *ptr = NULL;
int ptrLen = 0, argc = 0, i = 0, envCount = 0, err = 0;
char *filePath = NULL;
char *ptr = NULL;
int ptrLen = 0, argc = 0, i = 0, envCount = 0, err = 0;
FILE *stream = NULL;
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
int pipe_handle;
int mode = O_RDONLY;
int pipe_handle;
int mode = O_RDONLY;
#else
NXHandle_t pipe_handle;
NXMode_t mode = NX_O_RDONLY;
NXHandle_t pipe_handle;
NXMode_t mode = NX_O_RDONLY;
#endif
NXExecEnvSpec_t envSpec;
NXNameSpec_t nameSpec;
NXVmId_t newVM = 0;
NXExecEnvSpec_t envSpec;
NXNameSpec_t nameSpec;
NXVmId_t newVM = 0;
/* Check for validity of input parameters */
if (!commandline || !type)
return NULL;
/* Check for validity of input parameters */
if (!commandline || !type)
return NULL;
/* Get temporary file name */
filePath = mktemp(tempName);
/*consoleprintf ("PHP | popen: file path = %s, mode = %s\n", filePath, type);*/
/* Get temporary file name */
filePath = mktemp(tempName);
if (!filePath)
return NULL;
/* Set pipe mode according to type -- for now allow only "r" or "w" */
if (strcmp(type, "r") == 0)
/* Set pipe mode according to type -- for now allow only "r" or "w" */
if (strcmp(type, "r") == 0)
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
mode = O_RDONLY;
mode = O_RDONLY;
#else
mode = NX_O_RDONLY;
mode = NX_O_RDONLY;
#endif
else if (strcmp(type, "w") == 0)
else if (strcmp(type, "w") == 0)
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
mode = O_WRONLY;
mode = O_WRONLY;
#else
mode = NX_O_WRONLY;
mode = NX_O_WRONLY;
#endif
else
return NULL;
else
return NULL;
#ifdef USE_PIPE_OPEN
pipe_handle = pipe_open(filePath, mode);
/*consoleprintf ("PHP | popen: pipe_open() returned %d\n", pipe_handle);*/
if (pipe_handle == -1)
return NULL;
pipe_handle = pipe_open(filePath, mode);
if (pipe_handle == -1)
return NULL;
#elif defined(USE_MKFIFO)
pipe_handle = mkfifo(filePath, mode);
consoleprintf ("PHP | popen: mkfifo() returned %d\n", pipe_handle);
if (pipe_handle == -1)
return NULL;
pipe_handle = mkfifo(filePath, mode);
if (pipe_handle == -1)
return NULL;
#else
/*
- NetWare doesn't require first parameter
- Allowing LibC to choose the buffer size for now
*/
err = NXFifoOpen(0, filePath, mode, 0, &pipe_handle);
/*consoleprintf ("PHP | popen: NXFifoOpen() returned %d\n", err);*/
if (err)
return NULL;
/* - NetWare doesn't require first parameter
* - Allowing LibC to choose the buffer size for now
*/
err = NXFifoOpen(0, filePath, mode, 0, &pipe_handle);
if (err)
return NULL;
#endif
/* Copy the environment variables in preparation for the spawn call */
/* Copy the environment variables in preparation for the spawn call */
envCount = NXGetEnvCount() + 1; /* add one for NULL */
env = (char **) NXMemAlloc(sizeof(char *) * envCount, 0);
if (!env)
return NULL;
envCount = NXGetEnvCount() + 1; /* add one for NULL */
env = (char**)NXMemAlloc(sizeof(char*) * envCount, 0);
if (!env)
return NULL;
err = NXCopyEnv(env, envCount);
if (err) {
NXMemFree (env);
return NULL;
}
err = NXCopyEnv(env, envCount);
consoleprintf ("PHP | popen: NXCopyEnv() returned %d\n", err);
if (err)
{
NXMemFree (env);
return NULL;
}
/* Separate commandline string into words */
ptr = tsrm_strtok_r((char*)commandline, WHITESPACE, NULL);
ptrLen = strlen(ptr);
/* Separate commandline string into words */
consoleprintf ("PHP | popen: commandline = %s\n", commandline);
ptr = tsrm_strtok_r((char*)commandline, WHITESPACE, NULL);
ptrLen = strlen(ptr);
command = (char*)malloc(ptrLen + 1);
if (!command) {
NXMemFree (env);
return NULL;
}
command = (char*)malloc(ptrLen + 1);
if (!command)
{
NXMemFree (env);
return NULL;
}
strcpy (command, ptr);
strcpy (command, ptr);
ptr = tsrm_strtok_r(NULL, WHITESPACE, NULL);
while (ptr && (argc < MAX_ARGS)) {
ptrLen = strlen(ptr);
ptr = tsrm_strtok_r(NULL, WHITESPACE, NULL);
while (ptr && (argc < MAX_ARGS))
{
ptrLen = strlen(ptr);
argv[argc] = (char*)malloc(ptrLen + 1);
if (!argv[argc]) {
NXMemFree (env);
if (command)
free (command);
argv[argc] = (char*)malloc(ptrLen + 1);
if (!argv[argc])
{
NXMemFree (env);
for (i = 0; i < argc; i++) {
if (argv[i])
free (argv[i]);
}
if (command)
free (command);
return NULL;
}
for (i = 0; i < argc; i++)
{
if (argv[i])
free (argv[i]);
}
strcpy (argv[argc], ptr);
argc++;
ptr = tsrm_strtok_r(NULL, WHITESPACE, NULL);
}
return NULL;
}
/* Setup the execution environment and spawn new process */
envSpec.esFlags = 0; /* Not used */
envSpec.esArgc = argc;
envSpec.esArgv = (void **) argv;
envSpec.esEnv = (void **) env;
strcpy (argv[argc], ptr);
/* envSpec.esStdin.ssType = */
envSpec.esStdout.ssType = NX_OBJ_FIFO;
envSpec.esStderr.ssType = NX_OBJ_FILE;
argc++;
ptr = tsrm_strtok_r(NULL, WHITESPACE, NULL);
}
consoleprintf ("PHP | popen: commandline string parsed into tokens\n");
/* Setup the execution environment and spawn new process */
envSpec.esFlags = 0; /* Not used */
envSpec.esArgc = argc;
envSpec.esArgv = (void**)argv;
envSpec.esEnv = (void**)env;
envSpec.esStdin.ssType =
envSpec.esStdout.ssType = NX_OBJ_FIFO;
envSpec.esStderr.ssType = NX_OBJ_FILE;
/* 'ssHandle' is not a struct/union/class member */
/*
envSpec.esStdin.ssHandle =
envSpec.esStdout.ssHandle =
envSpec.esStderr.ssHandle = -1;
envSpec.esStdin.ssHandle =
envSpec.esStdout.ssHandle =
envSpec.esStderr.ssHandle = -1;
*/
envSpec.esStdin.ssPathCtx =
envSpec.esStdout.ssPathCtx =
envSpec.esStderr.ssPathCtx = NULL;
envSpec.esStdin.ssPathCtx = NULL;
envSpec.esStdout.ssPathCtx = NULL;
envSpec.esStderr.ssPathCtx = NULL;
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
if (mode == O_RDONLY)
if (mode == O_RDONLY) {
#else
if (mode == NX_O_RDONLY)
if (mode == NX_O_RDONLY) {
#endif
{
envSpec.esStdin.ssPath = filePath;
envSpec.esStdout.ssPath = stdout;
}
else /* Write Only */
{
envSpec.esStdin.ssPath = stdin;
envSpec.esStdout.ssPath = filePath;
}
envSpec.esStdin.ssPath = filePath;
envSpec.esStdout.ssPath = stdout;
} else { /* Write Only */
envSpec.esStdin.ssPath = stdin;
envSpec.esStdout.ssPath = filePath;
}
envSpec.esStderr.ssPath = stdout;
envSpec.esStderr.ssPath = stdout;
nameSpec.ssType = NX_OBJ_FIFO;
/* nameSpec.ssHandle = 0; */ /* Not used */
nameSpec.ssPathCtx = NULL; /* Not used */
nameSpec.ssPath = argv[0];
consoleprintf ("PHP | popen: environment setup\n");
err = NXVmSpawn(&nameSpec, &envSpec, 0, &newVM);
consoleprintf ("PHP | popen: NXVmSpawn() returned %d\n", err);
if (!err)
/* Get file pointer corresponding to the pipe (file) opened */
stream = fdopen(pipe_handle, type);
nameSpec.ssType = NX_OBJ_FIFO;
/* nameSpec.ssHandle = 0; */ /* 'ssHandle' is not a struct/union/class member */
nameSpec.ssPathCtx = NULL; /* Not used */
nameSpec.ssPath = argv[0];
err = NXVmSpawn(&nameSpec, &envSpec, 0, &newVM);
if (!err)
/* Get file pointer corresponding to the pipe (file) opened */
stream = fdopen(pipe_handle, type);
/* Clean-up */
/* Clean-up */
if (env)
NXMemFree (env);
if (env)
NXMemFree (env);
if (pipe_handle)
if (pipe_handle)
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
close(pipe_handle);
close(pipe_handle);
#else
NXClose(pipe_handle);
NXClose(pipe_handle);
#endif
if (command)
free (command);
if (command)
free (command);
for (i = 0; i < argc; i++)
{
if (argv[i])
free (argv[i]);
}
consoleprintf ("PHP | popen: all clean-up done, returning...\n");
return stream;
for (i = 0; i < argc; i++) {
if (argv[i])
free (argv[i]);
}
return stream;
}
TSRM_API int pclose(FILE* stream)
{
int err = 0;
NXHandle_t fd = 0;
int err = 0;
NXHandle_t fd = 0;
/* Get the process associated with this pipe (file) handle and terminate it */
fd = fileno(stream);
NXClose (fd);
/* Get the process associated with this pipe (file) handle and terminate it */
fd = fileno(stream);
NXClose (fd);
err = fclose(stream);
err = fclose(stream);
return err;
return err;
}
#endif
#endif /* NETWARE */
+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 |
@@ -13,6 +13,7 @@
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Venkat Raghavan S <rvenkat@novell.com> |
| Anantha Kesari H Y <hyanantha@novell.com> |
+----------------------------------------------------------------------+
*/
+13 -12
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 |
@@ -49,7 +49,7 @@
#include "TSRM.h"
/* Only need mutex for popen() in Windows and NetWare, because it doesn't chdir() on UNIX */
/* Only need mutex for popen() in Windows and NetWare because it doesn't chdir() on UNIX */
#if (defined(TSRM_WIN32) || defined(NETWARE)) && defined(ZTS)
MUTEX_T cwd_mutex;
#endif
@@ -210,7 +210,7 @@ CWD_API void virtual_cwd_startup(void)
cwd_globals_ctor(&cwd_globals TSRMLS_CC);
#endif
#if defined(TSRM_WIN32) && defined(ZTS)
#if (defined(TSRM_WIN32) || defined(NETWARE)) && defined(ZTS)
cwd_mutex = tsrm_mutex_alloc();
#endif
}
@@ -220,7 +220,7 @@ CWD_API void virtual_cwd_shutdown(void)
#ifndef ZTS
cwd_globals_dtor(&cwd_globals TSRMLS_CC);
#endif
#if defined(TSRM_WIN32) && defined(ZTS)
#if (defined(TSRM_WIN32) || defined(NETWARE)) && defined(ZTS)
tsrm_mutex_free(cwd_mutex);
#endif
@@ -340,9 +340,6 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
copy_amount = COPY_WHEN_ABSOLUTE(path_copy);
is_absolute = 1;
#ifdef TSRM_WIN32
} else if (IS_UNC_PATH(path_copy, path_length)) {
copy_amount = 2;
is_absolute = 1;
} else if (IS_SLASH(path_copy[0])) {
copy_amount = 2;
#endif
@@ -477,19 +474,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)
+6 -6
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 |
@@ -53,14 +53,13 @@ typedef unsigned short mode_t;
#define IS_SLASH_P(c) (*(c) == '/' || \
(*(c) == '\\' && !IsDBCSLeadByte(*(c-1))))
/* COPY_WHEN_ABSOLUTE also takes path as argument because netware needs it
* to account for volume name that is unique to NetWare absolute paths
*/
/* COPY_WHEN_ABSOLUTE is 2 under Win32 because by chance both regular absolute paths
in the file system and UNC paths need copying of two characters */
#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
@@ -70,6 +69,7 @@ typedef unsigned short mode_t;
#define DEFAULT_SLASH '/'
#define DEFAULT_DIR_SEPARATOR ';'
#define IS_SLASH(c) ((c) == '/' || (c) == '\\')
#define IS_SLASH_P(c) IS_SLASH(*(c))
#define COPY_WHEN_ABSOLUTE(path) \
(strchr(path, ':') - path + 1) /* Take the volume name which ends with a colon */
#define IS_ABSOLUTE_PATH(path, len) \
+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 |
+754
View File
@@ -1,3 +1,757 @@
2003-01-27 Stanislav Malyshev <stas@zend.com>
* zend_compile.c
zend_compile.h
zend_execute.c:
Replace MAKE_VAR opcode with special 'data' opcode
This opcode is not executeable but only holds data for opcodes
that need more than two arguments (presently only ASSIGN_OBJ and the ilk
but
in the future also ASSIGN_DIM)
2003-01-26 Sascha Schumann <sascha@schumann.cx>
* zend_API.c:
Replace snprintf() call using zend_error's capabilities
2003-01-23 Zeev Suraski <zeev@zend.com>
* zend_execute.c:
Let the scope propagate to internal functions
2003-01-23 Jani Taskinen <sniper@iki.fi>
* zend_execute_API.c:
Fixed bug: #14542, register_shutdown_function() timeout problem
2003-01-22 Stanislav Malyshev <stas@zend.com>
* OBJECTS2_HOWTO:
some small refinements for get_class_*
2003-01-22 Ilia Alshanetsky <ilia@prohost.org>
* zend_execute.c:
Fixed bug #21814 (Allow booleans to be used as array keys).
2003-01-21 Sterling Hughes <sterling@bumblebury.com>
* zend_objects_API.c:
fix by phanto to the cloning
2003-01-19 Zeev Suraski <zeev@zend.com>
* Zend.m4:
relabel
2003-01-19 Stanislav Malyshev <stas@zend.com>
* zend_compile.c:
Restore for now old statics behaviour (so that indirect $$var references
would work again). Comprehensive fix will follow later.
2003-01-19 Harald Radi <harald.radi+coding.php@nme.at>
* zend_ini.h
zend_ini_parser.y
zend_ini_scanner.l:
ini patch to allow 'entry[] = value' entries
2003-01-17 Harald Radi <harald.radi+coding.php@nme.at>
* zend_objects.c
zend_objects.h:
export zend_objects_destroy_object()
static inline was meaningless anyways as the function
was only used as a callback handler and was never
called directly
* zend_objects_API.c
zend_objects_API.h:
make std_object_handlers struct available for shared modules
2003-01-16 Ilia Alshanetsky <ilia@prohost.org>
* zend_execute.c:
Fixed bug #20933 (isset/empty didn't work when used on string offsets).
2003-01-15 Andi Gutmans <andi@zend.com>
* zend_compile.c:
- Revert int -> unsigned int change for str.len
2003-01-15 Sascha Schumann <sascha@schumann.cx>
* zend.h:
Revert commit which turned the lengths of strings into zend_uint.
2003-01-14 Andi Gutmans <andi@zend.com>
* ZEND_CHANGES
zend_compile.c
zend_compile.h
zend_execute.c
zend_language_parser.y
zend_language_scanner.l
zend_operators.c
zend_operators.h:
- Change "is" to "instanceof" as it explains better what the operator
means.
- "is_a" was also appropriate but ugly.
2003-01-14 Stanislav Malyshev <stas@zend.com>
* zend_API.c:
fix memory leaks and key size
2003-01-14 Ilia Alshanetsky <ilia@prohost.org>
* zend_ini_parser.y:
MFZE2
2003-01-14 Stanislav Malyshev <stas@zend.com>
* zend_compile.c:
fix warning
* zend_API.c
zend_API.h:
Make add_property_ functions work via write_property handler
* zend.c
zend_object_handlers.c:
ws
2003-01-14 Ilia Alshanetsky <ilia@prohost.org>
* zend_ini_parser.y:
Reverting previous patch.
2003-01-13 Ilia Alshanetsky <ilia@prohost.org>
* zend_ini_parser.y:
MFZE2
2003-01-13 Andi Gutmans <andi@zend.com>
* zend_objects_API.c:
- Don't check if the handle is bogus. We should crash.
2003-01-12 Harald Radi <harald.radi+coding.php@nme.at>
* zend_modules.h:
fix wrong dereferenciation
2003-01-12 Stanislav Malyshev <stas@zend.com>
* zend_compile.c:
fix inheritance
* zend_API.h:
Remove handle_property from here too
* zend.c
zend.h
zend_compile.c:
RIP handle_* functions. ZE2 will use __ handlers instead.
* zend_object_handlers.c:
Move Z_OBJ_P here.
* zend_operators.h:
Remove Z_OBJ - it's internal to Zend objects, no generic function except
those in zend_object_handlers.c should use it.
Add Z_OBJ_HANDLER macro for easy access to handlers
2003-01-12 Sebastian Bergmann <sb@sebastian-bergmann.de>
* zend.c
zend.h
zend_builtin_functions.c:
ZTS fixes.
2003-01-12 Stanislav Malyshev <stas@zend.com>
* zend_object_handlers.c:
add get_class_name handler
* zend.c:
Use generic handlers instead of Z_OBJ
2003-01-12 Harald Radi <harald.radi+coding.php@nme.at>
* zend_modules.h:
* zend_ini.h
zend_ini_entry.h
zend_modules.h:
partially revert previous commit and
change zend_modules.h to include
a forward declaration to zend_ini_entry
* zend_ini.h
zend_ini_entry.h
zend_modules.h:
added zend_ini_entry to zend_modules_entry as
discussed with zeev
* zend_builtin_functions.c:
fix 'use of uninitialized variable' warning
2003-01-12 Stanislav Malyshev <stas@zend.com>
* zend_objects_API.c:
validate handle
2003-01-12 Zeev Suraski <zeev@zend.com>
* zend.c
zend_compile.c
zend_execute.c
zend_execute_API.c
zend_globals.h
zend_ini.c
zend_ini.h
zend_variables.c:
Implemented compatibility mode
To enable - zend2.implicit_clone = on in php.ini or using ini_set()
2003-01-11 Andi Gutmans <andi@zend.com>
* zend_execute.c:
- Fix typo and whitespace
2003-01-11 Derick Rethans <d.rethans@jdimedia.nl>
* zend.c
zend_execute.c
zend_execute.h
zend_execute_API.c:
- Ported the zend_execute_internal hook to ZendEngine2.
2003-01-11 Harald Radi <harald.radi+coding.php@nme.at>
* zend_ts_hash.c:
freed reader twice instead of writer and reader
2003-01-10 Ilia Alshanetsky <ilia@prohost.org>
* zend_alloc.c:
MFZE2
2003-01-10 Andrei Zmievski <andrei@gravitonic.com>
* zend_API.c:
Automatically register constructor, destructor, and clone function when
class methods are registered.
2003-01-09 Zeev Suraski <zeev@zend.com>
* zend_compile.c:
Found some more occurences of that elusive bug...
* zend_compile.c:
Fix one lousy, annoying lurking bug (memory corruption)
Sebastian - try coWiki again please...
* zend_API.h:
Unify and make it easy to add code into the broken-string error handler
* zend_language_parser.y:
Fix writability checks
* zend.c:
Fix leak
2003-01-08 James Cox <james@imajes.info>
* zend.h:
cvs is dev not alpha.
2003-01-08 Ilia Alshanetsky <ilia@prohost.org>
* zend_builtin_functions.c:
MFZE2
2003-01-05 Zeev Suraski <zeev@zend.com>
* zend_compile.c
zend_globals.h
zend_language_scanner.l:
MFZE1 - lineno fix
2003-01-02 Zeev Suraski <zeev@zend.com>
* zend_compile.c
zend_compile.h
zend_execute.c:
Fix incorrect linkage of access-levels, when using private methods
2003-01-01 Zeev Suraski <zeev@zend.com>
* zend_API.c
zend_operators.h:
Win32 build fix
2003-01-01 Stanislav Malyshev <stas@zend.com>
* zend_operators.h:
use handler for Z_OBJPROP
2003-01-01 Zeev Suraski <zeev@zend.com>
* zend_API.c:
Fix Wez's problem
2002-12-31 Sebastian Bergmann <sb@sebastian-bergmann.de>
* LICENSE
zend.c
zend.h
zend_API.c
zend_API.h
zend_alloc.c
zend_alloc.h
zend_builtin_functions.c
zend_builtin_functions.h
zend_compile.c
zend_compile.h
zend_config.nw.h
zend_config.w32.h
zend_constants.c
zend_constants.h
zend_dynamic_array.c
zend_dynamic_array.h
zend_errors.h
zend_execute.c
zend_execute.h
zend_execute_API.c
zend_extensions.c
zend_extensions.h
zend_fast_cache.h
zend_globals.h
zend_globals_macros.h
zend_hash.c
zend_hash.h
zend_highlight.c
zend_highlight.h
zend_indent.c
zend_indent.h
zend_ini.c
zend_ini.h
zend_language_scanner.h
zend_list.c
zend_list.h
zend_llist.c
zend_llist.h
zend_mm.c
zend_mm.h
zend_modules.h
zend_opcode.c
zend_operators.c
zend_operators.h
zend_ptr_stack.c
zend_ptr_stack.h
zend_qsort.c
zend_qsort.h
zend_sprintf.c
zend_stack.c
zend_stack.h
zend_static_allocator.c
zend_static_allocator.h
zend_ts_hash.c
zend_ts_hash.h
zend_types.h
zend_variables.c
zend_variables.h:
Bump year.
2002-12-31 Stanislav Malyshev <stas@zend.com>
* zend_object_handlers.h:
fix level of indirection
2002-12-30 Andrei Zmievski <andrei@gravitonic.com>
* zend_execute_API.c:
Adjust the error message.
2002-12-30 Stanislav Malyshev <stas@zend.com>
* zend_object_handlers.h:
Oops, fix it indeed
* zend_object_handlers.h:
Better check
2002-12-26 Andrei Zmievski <andrei@gravitonic.com>
* zend_compile.c:
do_inherit_method_check() is supposed to return 0 or 1, not SUCCESS or
FAILURE.
2002-12-14 Ilia Alshanetsky <ilia@prohost.org>
* zend_language_scanner.l:
MFZE2
2002-12-10 Zeev Suraski <zeev@zend.com>
* zend_compile.c:
Fix check to allow for static+access level modifiers
* zend_compile.c
zend_compile.h
zend_language_parser.y:
- Allow variables to have both 'static' modifier and an access level.
NOTE: This only works at the syntax level right now (parser). It
doesn't actually work as of yet - all statics are considered
public for now
- Prevent users from putting more restrictions on methods in derived
classes
(i.e., you cannot make a public method private in a derived class, etc.)
2002-12-09 Andi Gutmans <andi@zend.com>
* zend_mm.c:
- Fix a bug which I just introduced.
* zend_mm.c:
- Fix typo
* zend_mm.c:
- Improvements
* zend_mm.c
zend_mm.h:
- First attempt to improve memory manager during realloc()'s
2002-12-08 Zeev Suraski <zeev@zend.com>
* zend_compile.c:
Remove comment
* zend_compile.c
zend_compile.h
zend_language_parser.y:
Treat the absence of an access type just as if 'public' was supplied
* zend_compile.c:
Simplify/fix inheritance checks
* zend_execute.c:
Support private/protected constructors
2002-12-07 Sebastian Bergmann <sb@sebastian-bergmann.de>
* ZEND_CHANGES:
Update.
2002-12-07 Zeev Suraski <zeev@zend.com>
* zend_execute.c:
Fix error messages
* zend_language_parser.y
zend_language_scanner.l:
Remove unintentional code
2002-12-07 Andi Gutmans <andi@zend.com>
* zend_compile.c:
- Dissallow using parent, self and main as class names
2002-12-06 Zeev Suraski <zeev@zend.com>
* zend.c
zend.h
zend_API.c
zend_compile.c
zend_compile.h
zend_execute.c
zend_globals.h
zend_hash.h
zend_language_parser.y
zend_language_scanner.l:
- Implement public/protected/private methods.
- Prevent instantiation of classes with abstract methods.
Based in part on Marcus's patch.
2002-12-01 Andi Gutmans <andi@zend.com>
* zend_alloc.c:
- Allow enabling of memory cache with zend_mm
* zend.c
zend.c
zend.h
zend.h
zend_builtin_functions.c
zend_builtin_functions.c:
- MFZE1
* zend.c
zend.h
zend_builtin_functions.c:
- Revert as the patch doesn't compile
* zend.c
zend_API.c
zend_builtin_functions.c
zend_compile.c
zend_execute.c
zend_execute_API.c
zend_indent.c
zend_object_handlers.c
zend_opcode.c
zend_operators.c
zend_operators.h
zend_variables.c:
h WHitespace
* zend.c:
- Initialize constants_updated (by Marcus)
* zend_builtin_functions.c:
- Nuke use of deprecated macro
* zend_compile.c
zend_compile.h
zend_execute.c
zend_language_parser.y:
- FN_IS_STATIC -> FN_STATIC
* zend.c:
- Fix crash
* zend_compile.c
zend_compile.h:
- My personal cleanups
* zend_API.c
zend_API.h
zend_builtin_functions.c
zend_compile.c
zend_compile.h
zend_execute.c
zend_execute.h
zend_language_parser.y
zend_object_handlers.c:
- Commit Marcus' cleanup of abstract and static inheritance and improve
- error messages
2002-11-22 Derick Rethans <d.rethans@jdimedia.nl>
* zend_API.c:
- Initialize all functions to non-static (patch by Marcus Börger
<marcus.boerger@t-online.de>.
2002-11-22 Sebastian Bergmann <sb@sebastian-bergmann.de>
* zend_execute.c:
Show class name as well. Patch by Marcus Börger.
* zend_execute.c:
Show the name of the abstract method in the error.
* zend_compile.h:
Fix prototype.
2002-11-20 Derick Rethans <d.rethans@jdimedia.nl>
* zend_builtin_functions.c:
- MFZE1: Disable leak() and crash() when not using debug mode
2002-11-20 Andi Gutmans <andi@zend.com>
* ZEND_CHANGES:
- Add abstract methods
* zend_compile.c
zend_compile.h
zend_execute.c
zend_language_parser.y
zend_language_scanner.l:
- Fix build (thanks Marcus)
- Implement abstract methods, syntax:
- abstract function foo($vars);
- I don't see any reason why modifiers such as static/public need to be
- used with abstract. PHP is weakly typed and there would be no meaning to
- this anyway. People who want a strictly typed compiled language are
- looking in the wrong place.
2002-11-19 Zeev Suraski <zeev@zend.com>
* zend.c
zend.h
zend_builtin_functions.c
zend_execute.c
zend_execute_API.c:
MFZE1 - error_reporting fix
2002-11-18 Andi Gutmans <andi@zend.com>
* zend_language_scanner.l:
- MFZE1
2002-11-17 Stanislav Malyshev <stas@zend.com>
* zend_execute.c:
fix the leak
2002-11-16 Andi Gutmans <andi@zend.com>
* zend_language_scanner.l
zend_language_scanner.l:
- MFZE1
* Zend.m4
configure.in:
- MFZE1
* zend_hash.c:
- Commit fix for bug #19566 (I think it's by Marcus :)
2002-11-14 Andrei Zmievski <andrei@gravitonic.com>
* zend_llist.h:
MFZE1
2002-11-13 Stanislav Malyshev <stas@zend.com>
* zend_execute.c:
semi-fix string offsets crash - now it doesn't crash, but still leaks
* zend_object_handlers.c:
fix static
2002-11-11 Andi Gutmans <andi@zend.com>
* ZEND_CHANGES:
- Update with statics
2002-11-11 Sebastian Bergmann <sb@sebastian-bergmann.de>
* zend_execute.c:
Fugbix typo.
2002-11-11 Ilia Alshanetsky <ilia@prohost.org>
* zend.h:
MFZE1
2002-11-10 Andi Gutmans <andi@zend.com>
* zend_compile.c:
- MFZE1
2002-11-10 Stanislav Malyshev <stas@zend.com>
* zend_compile.c
zend_compile.h
zend_language_parser.y:
fix statics - make it behave like $this (fetch type "static")
Side effect: indirect references to statics won't work.
2002-11-06 Sebastian Bergmann <sb@sebastian-bergmann.de>
* zend_execute.c:
Fix ZTS build.
2002-11-06 Stanislav Malyshev <stas@zend.com>
* zend_execute.c:
fix zend_assign_to_object_op
2002-11-05 Ilia Alshanetsky <ilia@prohost.org>
* zend_language_scanner.l:
MFZE1
2002-11-05 Andi Gutmans <andi@zend.com>
* zend_compile.h:
- Shift around zend_op members
* ZEND_CHANGES:
- A couple of updates
* zend_compile.c
zend_compile.h
zend_execute.c
zend_language_parser.y:
- Add support for static methods. Basically methods which are defined as
- static don't have $this. That's the whole difference.
* tests/zend2.php:
- $clone -> $that
* zend_execute_API.c:
- Fix bug introduced with type change of free_op1/2
* zend_language_parser.y
zend_language_scanner.l:
- ATTENTION: Finally nuke old_function and cfunction. I think it is time
- to get rid of these BC notations. This is from the days of the move from
- PHP/FI 2 -> PHP 3
2002-11-05 Ilia Alshanetsky <ilia@prohost.org>
* zend_hash.c:
Revert of previous patch.
2002-11-05 Andi Gutmans <andi@zend.com>
* zend_compile.c
zend_objects.c:
- Change the automatically created variable $clone in __clone() to
- $that as discussed at the PHP Conference. If there are any objections
- alternative names please let me know. The reason for changing it from
- $clone is because $clone sounds as if it's the newly cloned object and
- not the old one.
2002-11-05 Stanislav Malyshev <stas@zend.com>
* zend_compile.c
zend_compile.h:
avoid using 'class' in exported functions - it annoys c++
2002-11-05 Stig Bakken <ssb@fast.no>
* zend.c:
Fixed some special cases that were crashing for the exception default
handler.
2002-11-04 Ilia Alshanetsky <ilia@prohost.org>
* zend_compile.c:
Silence compiler warnings.
* zend_hash.c:
If ordered is not set a random compiler assigned value of *p2 would be
used,
this patch fixes the problem by initializing *p2 to NULL.
* zend_operators.c:
Silence compile warning, ctype.h is needed for tolower() function.
* zend_language_scanner.l:
MFZE1
2002-11-02 Derick Rethans <d.rethans@jdimedia.nl>
* zend_language_scanner.l:
- Fix segfault when __CLASS__ was used outside a class definition
* zend.c:
- MFZE1
2002-11-02 Ilia Alshanetsky <ilia@prohost.org>
* zend_language_scanner.l:
MFZE1 (20214).
2002-11-01 Andi Gutmans <andi@zend.com>
* zend_execute.c: - Fix unset($this->foo)
+2 -2
View File
@@ -1,6 +1,6 @@
--------------------------------------------------------------------
The Zend Engine License, version 2.00
Copyright (c) 1999-2002 Zend Technologies Ltd. All rights reserved.
The Zend Engine License, Version 2.00
Copyright (c) 1999-2003 Zend Technologies Ltd. All rights reserved.
--------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
+5 -3
View File
@@ -101,8 +101,10 @@ compared.
Objects - reflection
--------------------
get_class_name is used to retrieve class name of the object. No other
reflection functions are currently implemented.
get_class_name is used to retrieve class name of the object.
get_class_entry returns class entry (zend_class_entry) for the object,
in case there exists PHP class for it.
No other reflection functions are currently implemented.
Objects - data structures and handlers
---------------------------------------
@@ -186,7 +188,7 @@ 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_entry - should return the class entry for the object
get_class_name - get the name of the class the object belongs to
+27 -49
View File
@@ -21,9 +21,10 @@ Changes in the Zend Engine 2.0
* 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.
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:
@@ -34,9 +35,9 @@ Changes in the Zend Engine 2.0
protected $Foo = "Hello, Bar!\n";
function printHello() {
print "MyClass::printHello() ".$this->Hello;
print "MyClass::printHello() ".$this->Bar;
print "MyClass::printHello() ".$this->Foo;
print "MyClass::printHello() " . $this->Hello;
print "MyClass::printHello() " . $this->Bar;
print "MyClass::printHello() " . $this->Foo;
}
}
@@ -44,10 +45,10 @@ Changes in the Zend Engine 2.0
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 */
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 */
}
}
@@ -64,13 +65,15 @@ Changes in the Zend Engine 2.0
$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!
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!
* Private and protected methods. (TBD)
* Object Cloning.
The Zend Engine 1.0 offered no way a user could decide what copy
@@ -489,10 +492,15 @@ Changes in the Zend Engine 2.0
print foo::$my_static;
?>
* Static methods (TBD)
* Static methods. (TBD)
* static function variables
statics are now treated at compile-time which allows developers
* Abstract methods. (TBD)
* instanceof (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.
@@ -510,36 +518,6 @@ Changes in the Zend Engine 2.0
}
?>
* 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
+10 -6
View File
@@ -57,9 +57,12 @@ dlfcn.h)
AC_TYPE_SIZE_T
AC_TYPE_SIGNAL
AC_DEFUN(LIBZEND_LIBDL_CHECKS,[
AC_CHECK_LIB(dl, dlopen, [LIBS="-ldl $LIBS"])
AC_CHECK_FUNC(dlopen,[AC_DEFINE(HAVE_LIBDL, 1,[ ])])
])
AC_DEFUN(LIBZEND_DLSYM_CHECK,[
dnl
dnl Ugly hack to check if dlsym() requires a leading underscore in symbol name.
dnl
@@ -72,6 +75,7 @@ _LT_AC_TRY_DLOPEN_SELF([
], [
AC_MSG_RESULT(no)
], [])
])
dnl This is required for QNX and may be some BSD derived systems
AC_CHECK_TYPE( uint, unsigned int )
@@ -103,11 +107,11 @@ AC_ARG_ENABLE(debug,
AC_DEFUN(LIBZEND_OTHER_CHECKS,[
AC_ARG_ENABLE(experimental-zts,
[ --enable-experimental-zts This will most likely break your build],[
ZEND_EXPERIMENTAL_ZTS=$enableval
AC_ARG_ENABLE(maintainer-zts,
[ --enable-maintainer-zts Enable thread safety - for code maintainers only],[
ZEND_MAINTAINER_ZTS=$enableval
],[
ZEND_EXPERIMENTAL_ZTS=no
ZEND_MAINTAINER_ZTS=no
])
AC_ARG_ENABLE(inline-optimization,
@@ -126,7 +130,7 @@ AC_ARG_ENABLE(memory-limit,
])
AC_MSG_CHECKING(whether to enable thread-safety)
AC_MSG_RESULT($ZEND_EXPERIMENTAL_ZTS)
AC_MSG_RESULT($ZEND_MAINTAINER_ZTS)
AC_MSG_CHECKING(whether to enable inline optimization for GCC)
AC_MSG_RESULT($ZEND_INLINE_OPTIMIZATION)
@@ -152,7 +156,7 @@ fi
test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLAGS $DEBUG_CFLAGS"
if test "$ZEND_EXPERIMENTAL_ZTS" = "yes"; then
if test "$ZEND_MAINTAINER_ZTS" = "yes"; then
AC_DEFINE(ZTS,1,[ ])
CFLAGS="$CFLAGS -DZTS"
LIBZEND_CPLUSPLUS_CHECKS
+2
View File
@@ -17,6 +17,8 @@ test -z "$CFLAGS" && auto_cflags=1
sinclude(Zend.m4)
LIBZEND_BASIC_CHECKS
LIBZEND_LIBDL_CHECKS
LIBZEND_DLSYM_CHECK
AM_PROG_LIBTOOL
if test "$enable_debug" != "yes"; then
+160 -27
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
@@ -58,6 +58,34 @@ static void (*zend_message_dispatcher_p)(long message, void *data);
static int (*zend_get_configuration_directive_p)(char *name, uint name_length, zval *contents);
static ZEND_INI_MH(OnUpdateErrorReporting)
{
if (!new_value) {
EG(error_reporting) = E_ALL & ~E_NOTICE;
} else {
EG(error_reporting) = atoi(new_value);
}
return SUCCESS;
}
static ZEND_INI_MH(OnUpdateImplicitClone)
{
if (!new_value) {
EG(implicit_clone) = 0;
} else {
EG(implicit_clone) = atoi(new_value) ? 1 : 0;
}
return SUCCESS;
}
ZEND_INI_BEGIN()
ZEND_INI_ENTRY("error_reporting", NULL, ZEND_INI_ALL, OnUpdateErrorReporting)
ZEND_INI_ENTRY("zend2.implicit_clone", NULL, ZEND_INI_ALL, OnUpdateImplicitClone)
ZEND_INI_END()
#ifdef ZTS
ZEND_API int compiler_globals_id;
ZEND_API int executor_globals_id;
@@ -73,12 +101,12 @@ 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 ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998-2003 Zend Technologies\n"
#define PRINT_ZVAL_INDENT 4
static void print_hash(HashTable *ht, int indent)
static void print_hash(HashTable *ht, int indent TSRMLS_DC)
{
zval **tmp;
char *string_key;
@@ -107,7 +135,7 @@ static void print_hash(HashTable *ht, int indent)
break;
}
ZEND_PUTS("] => ");
zend_print_zval_r(*tmp, indent+PRINT_ZVAL_INDENT);
zend_print_zval_r(*tmp, indent+PRINT_ZVAL_INDENT TSRMLS_CC);
ZEND_PUTS("\n");
zend_hash_move_forward_ex(ht, &iterator);
}
@@ -118,6 +146,34 @@ static void print_hash(HashTable *ht, int indent)
ZEND_PUTS(")\n");
}
static void print_flat_hash(HashTable *ht TSRMLS_DC)
{
zval **tmp;
char *string_key;
HashPosition iterator;
ulong num_key;
uint str_len;
int i = 0;
zend_hash_internal_pointer_reset_ex(ht, &iterator);
while (zend_hash_get_current_data_ex(ht, (void **) &tmp, &iterator) == SUCCESS) {
if (i++ > 0) {
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_flat_zval_r(*tmp TSRMLS_CC);
zend_hash_move_forward_ex(ht, &iterator);
}
}
ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_copy)
{
@@ -200,16 +256,65 @@ ZEND_API int zend_print_zval_ex(zend_write_func_t write_func, zval *expr, int in
return expr->value.str.len;
}
ZEND_API void zend_print_zval_r(zval *expr, int indent)
ZEND_API void zend_print_flat_zval_r(zval *expr TSRMLS_DC)
{
zend_print_zval_r_ex(zend_write, expr, indent);
zend_write_func_t write_func = zend_write;
switch (expr->type) {
case IS_ARRAY:
ZEND_PUTS("Array (");
if (++expr->value.ht->nApplyCount>1) {
ZEND_PUTS(" *RECURSION*");
expr->value.ht->nApplyCount--;
return;
}
print_flat_hash(expr->value.ht TSRMLS_CC);
ZEND_PUTS(")");
expr->value.ht->nApplyCount--;
break;
case IS_OBJECT:
{
HashTable *properties = NULL;
char *class_name = NULL;
zend_uint clen;
if (Z_OBJ_HANDLER_P(expr, get_class_name)) {
Z_OBJ_HANDLER_P(expr, get_class_name)(expr, &class_name, &clen, 0 TSRMLS_CC);
}
if (class_name == NULL) {
class_name = "Unknown Class";
}
zend_printf("%s Object (", class_name);
if (Z_OBJ_HANDLER_P(expr, get_properties)) {
properties = Z_OBJPROP_P(expr);
}
if (properties) {
if (++properties->nApplyCount>1) {
ZEND_PUTS(" *RECURSION*");
properties->nApplyCount--;
return;
}
print_flat_hash(properties TSRMLS_CC);
properties->nApplyCount--;
}
ZEND_PUTS(")");
break;
}
default:
zend_print_variable(expr);
break;
}
}
ZEND_API void zend_print_zval_r(zval *expr, int indent TSRMLS_DC)
{
zend_print_zval_r_ex(zend_write, expr, indent TSRMLS_CC);
}
ZEND_API void zend_print_zval_r_ex(zend_write_func_t write_func, zval *expr, int indent)
ZEND_API void zend_print_zval_r_ex(zend_write_func_t write_func, zval *expr, int indent TSRMLS_DC)
{
switch(expr->type) {
switch (expr->type) {
case IS_ARRAY:
ZEND_PUTS("Array\n");
if (++expr->value.ht->nApplyCount>1) {
@@ -217,21 +322,34 @@ ZEND_API void zend_print_zval_r_ex(zend_write_func_t write_func, zval *expr, int
expr->value.ht->nApplyCount--;
return;
}
print_hash(expr->value.ht, indent);
print_hash(expr->value.ht, indent TSRMLS_CC);
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;
HashTable *properties = NULL;
char *class_name = NULL;
zend_uint clen;
if (Z_OBJ_HANDLER_P(expr, get_class_name)) {
Z_OBJ_HANDLER_P(expr, get_class_name)(expr, &class_name, &clen, 0 TSRMLS_CC);
}
if (class_name == NULL) {
class_name = "Unknown Class";
}
zend_printf("%s Object\n", class_name);
if (Z_OBJ_HANDLER_P(expr, get_properties)) {
properties = Z_OBJPROP_P(expr);
}
if (properties) {
if (++properties->nApplyCount>1) {
ZEND_PUTS(" *RECURSION*");
properties->nApplyCount--;
return;
}
print_hash(properties, indent TSRMLS_CC);
properties->nApplyCount--;
}
zend_printf("%s Object\n", object->ce->name);
print_hash(object->properties, indent);
object->properties->nApplyCount--;
break;
}
default:
@@ -253,7 +371,7 @@ static FILE *zend_fopen_wrapper(const char *filename, char **opened_path)
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);
@@ -269,10 +387,13 @@ static void register_standard_class(void)
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->__call = NULL;
zend_standard_class_def->__get = NULL;
zend_standard_class_def->__set = NULL;
zend_standard_class_def->refcount = 1;
zend_standard_class_def->constants_updated = 0;
zend_standard_class_def->ce_flags = 0;
zend_hash_add(GLOBAL_CLASS_TABLE, "stdclass", sizeof("stdclass"), &zend_standard_class_def, sizeof(zend_class_entry *), NULL);
}
@@ -436,6 +557,7 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions, i
zend_compile_file = compile_file;
zend_execute = execute;
zend_execute_internal = NULL;
zend_init_opcodes_handlers();
@@ -508,6 +630,14 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions, i
}
void zend_register_standard_ini_entries(TSRMLS_D)
{
int module_number = 0;
REGISTER_INI_ENTRIES();
}
#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
@@ -520,6 +650,7 @@ void zend_post_startup(TSRMLS_D)
*GLOBAL_FUNCTION_TABLE = *compiler_globals->function_table;
*GLOBAL_CLASS_TABLE = *compiler_globals->class_table;
*GLOBAL_CONSTANTS_TABLE = *executor_globals->zend_constants;
zend_destroy_rsrc_list(&EG(persistent_list) TSRMLS_CC);
compiler_globals_ctor(compiler_globals, tsrm_ls);
executor_globals_ctor(executor_globals, tsrm_ls);
}
@@ -637,7 +768,7 @@ void zend_deactivate_modules(TSRMLS_D)
void zend_deactivate(TSRMLS_D)
{
/* we're no longer executing anything */
EG(opline_ptr) = NULL;
EG(opline_ptr) = NULL;
EG(active_symbol_table) = NULL;
zend_try {
@@ -771,7 +902,7 @@ ZEND_API void zend_error(int type, const char *format, ...)
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;
@@ -789,7 +920,9 @@ ZEND_API void zend_error(int type, const char *format, ...)
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);
if (retval) {
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);
@@ -849,7 +982,7 @@ ZEND_API int zend_execute_scripts(int type TSRMLS_DC, zval **retval, int file_co
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 *);
+12 -5
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
@@ -22,7 +22,7 @@
#ifndef ZEND_H
#define ZEND_H
#define ZEND_VERSION "2.0.0-alpha3"
#define ZEND_VERSION "2.0.0-dev"
#define ZEND_ENGINE_2
@@ -247,7 +247,7 @@ typedef union _zvalue_value {
double dval; /* double value */
struct {
char *val;
zend_uint len;
int len;
} str;
HashTable *ht; /* hash table value */
/* struct {
@@ -295,6 +295,8 @@ typedef struct _zend_overloaded_element {
/* A lot of stuff needs shifiting around in order to include zend_compile.h here */
union _zend_function;
#define ZEND_CE_ABSTRACT ZEND_ACC_ABSTRACT /* same as ZEND_ACC_ABSTRACT */
struct _zend_class_entry {
char type;
char *name;
@@ -302,6 +304,7 @@ struct _zend_class_entry {
struct _zend_class_entry *parent;
int refcount;
zend_bool constants_updated;
zend_uint ce_flags;
HashTable function_table;
HashTable default_properties;
@@ -323,9 +326,11 @@ struct _zend_class_entry {
zend_object_value (*create_object)(zend_class_entry *class_type TSRMLS_DC);
/* old handlers */
#if 0
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);
#endif
};
@@ -396,6 +401,7 @@ typedef int (*zend_write_func_t)(const char *str, uint str_length);
int zend_startup(zend_utility_functions *utility_functions, char **extensions, int start_builtin_functions);
void zend_shutdown(TSRMLS_D);
void zend_register_standard_ini_entries(TSRMLS_D);
#ifdef ZTS
void zend_post_startup(TSRMLS_D);
@@ -429,8 +435,9 @@ 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_print_zval_r(zval *expr, int indent TSRMLS_DC);
ZEND_API void zend_print_flat_zval_r(zval *expr TSRMLS_DC);
ZEND_API void zend_print_zval_r_ex(zend_write_func_t write_func, zval *expr, int indent TSRMLS_DC);
ZEND_API void zend_output_debug_string(zend_bool trigger_break, char *format, ...);
#if ZEND_DEBUG
+87 -30
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
@@ -443,16 +443,13 @@ static char *zend_parse_arg_impl(zval **arg, va_list *va, char **spec)
static int zend_parse_arg(int arg_num, zval **arg, va_list *va, char **spec, int quiet TSRMLS_DC)
{
char *expected_type = NULL;
char buf[1024];
expected_type = zend_parse_arg_impl(arg, va, spec);
if (expected_type) {
if (!quiet) {
snprintf(buf, sizeof(buf)-1, "%s() expects parameter %d to be %s, %s given",
zend_error(E_WARNING, "%s() expects parameter %d to be %s, %s given",
get_active_function_name(TSRMLS_C), arg_num, expected_type,
zend_zval_type_name(*arg));
buf[sizeof(buf)-1] = '\0';
zend_error(E_WARNING, buf);
}
return FAILURE;
}
@@ -933,81 +930,118 @@ ZEND_API int add_get_index_stringl(zval *arg, uint index, char *str, uint length
}
ZEND_API int add_property_long_ex(zval *arg, char *key, uint key_len, long n)
ZEND_API int add_property_long_ex(zval *arg, char *key, uint key_len, long n TSRMLS_DC)
{
zval *tmp;
zval z_key;
MAKE_STD_ZVAL(tmp);
ZVAL_LONG(tmp, n);
ZVAL_STRINGL(&z_key, key, key_len-1, 0);
return zend_hash_update(Z_OBJPROP_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
Z_OBJ_HANDLER_P(arg, write_property)(arg, &z_key, tmp TSRMLS_CC);
zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */
return SUCCESS;
}
ZEND_API int add_property_bool_ex(zval *arg, char *key, uint key_len, int b)
ZEND_API int add_property_bool_ex(zval *arg, char *key, uint key_len, int b TSRMLS_DC)
{
zval *tmp;
zval z_key;
MAKE_STD_ZVAL(tmp);
ZVAL_BOOL(tmp, b);
return zend_hash_update(Z_OBJPROP_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
ZVAL_STRINGL(&z_key, key, key_len-1, 0);
Z_OBJ_HANDLER_P(arg, write_property)(arg, &z_key, tmp TSRMLS_CC);
zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */
return SUCCESS;
}
ZEND_API int add_property_null_ex(zval *arg, char *key, uint key_len)
ZEND_API int add_property_null_ex(zval *arg, char *key, uint key_len TSRMLS_DC)
{
zval *tmp;
zval z_key;
MAKE_STD_ZVAL(tmp);
ZVAL_NULL(tmp);
return zend_hash_update(Z_OBJPROP_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
ZVAL_STRINGL(&z_key, key, key_len-1, 0);
Z_OBJ_HANDLER_P(arg, write_property)(arg, &z_key, tmp TSRMLS_CC);
zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */
return SUCCESS;
}
ZEND_API int add_property_resource_ex(zval *arg, char *key, uint key_len, long n)
ZEND_API int add_property_resource_ex(zval *arg, char *key, uint key_len, long n TSRMLS_DC)
{
zval *tmp;
zval z_key;
MAKE_STD_ZVAL(tmp);
ZVAL_RESOURCE(tmp, n);
ZVAL_STRINGL(&z_key, key, key_len-1, 0);
return zend_hash_update(Z_OBJPROP_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
Z_OBJ_HANDLER_P(arg, write_property)(arg, &z_key, tmp TSRMLS_CC);
zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */
return SUCCESS;
}
ZEND_API int add_property_double_ex(zval *arg, char *key, uint key_len, double d)
ZEND_API int add_property_double_ex(zval *arg, char *key, uint key_len, double d TSRMLS_DC)
{
zval *tmp;
zval z_key;
MAKE_STD_ZVAL(tmp);
ZVAL_DOUBLE(tmp, d);
ZVAL_STRINGL(&z_key, key, key_len-1, 0);
return zend_hash_update(Z_OBJPROP_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
Z_OBJ_HANDLER_P(arg, write_property)(arg, &z_key, tmp TSRMLS_CC);
zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */
return SUCCESS;
}
ZEND_API int add_property_string_ex(zval *arg, char *key, uint key_len, char *str, int duplicate)
ZEND_API int add_property_string_ex(zval *arg, char *key, uint key_len, char *str, int duplicate TSRMLS_DC)
{
zval *tmp;
zval z_key;
MAKE_STD_ZVAL(tmp);
ZVAL_STRING(tmp, str, duplicate);
return zend_hash_update(Z_OBJPROP_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
ZVAL_STRINGL(&z_key, key, key_len-1, 0);
Z_OBJ_HANDLER_P(arg, write_property)(arg, &z_key, tmp TSRMLS_CC);
zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */
return SUCCESS;
}
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_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, int duplicate TSRMLS_DC)
{
zval *tmp;
zval z_key;
MAKE_STD_ZVAL(tmp);
ZVAL_STRINGL(tmp, str, length, duplicate);
return zend_hash_update(Z_OBJPROP_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
ZVAL_STRINGL(&z_key, key, key_len-1, 0);
Z_OBJ_HANDLER_P(arg, write_property)(arg, &z_key, tmp TSRMLS_CC);
zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */
return SUCCESS;
}
ZEND_API int add_property_zval_ex(zval *arg, char *key, uint key_len, zval *value)
ZEND_API int add_property_zval_ex(zval *arg, char *key, uint key_len, zval *value TSRMLS_DC)
{
return zend_hash_update(Z_OBJPROP_P(arg), key, key_len, (void *) &value, sizeof(zval *), NULL);
zval z_key;
ZVAL_STRINGL(&z_key, key, key_len-1, 0);
Z_OBJ_HANDLER_P(arg, write_property)(arg, &z_key, value TSRMLS_CC);
return SUCCESS;
}
ZEND_API int zend_startup_module(zend_module_entry *module)
@@ -1030,14 +1064,15 @@ ZEND_API int zend_startup_module(zend_module_entry *module)
/* registers all functions in *library_functions in the function hash */
int zend_register_functions(zend_function_entry *functions, HashTable *function_table, int type TSRMLS_DC)
int zend_register_functions(zend_class_entry *scope, zend_function_entry *functions, HashTable *function_table, int type TSRMLS_DC)
{
zend_function_entry *ptr = functions;
zend_function function;
zend_function function, *reg_function;
zend_internal_function *internal_function = (zend_internal_function *)&function;
int count=0, unload=0;
HashTable *target_function_table = function_table;
int error_type;
zend_function *ctor = NULL, *dtor = NULL, *clone = NULL;
if (type==MODULE_PERSISTENT) {
error_type = E_CORE_WARNING;
@@ -1054,16 +1089,32 @@ int zend_register_functions(zend_function_entry *functions, HashTable *function_
internal_function->handler = ptr->handler;
internal_function->arg_types = ptr->func_arg_types;
internal_function->function_name = ptr->fname;
internal_function->scope = NULL;
internal_function->scope = scope;
internal_function->fn_flags = ZEND_ACC_PUBLIC;
if (!internal_function->handler) {
zend_error(error_type, "Null function defined as active function");
zend_unregister_functions(functions, count, target_function_table TSRMLS_CC);
return FAILURE;
}
if (zend_hash_add(target_function_table, ptr->fname, strlen(ptr->fname)+1, &function, sizeof(zend_function), NULL) == FAILURE) {
if (zend_hash_add(target_function_table, ptr->fname, strlen(ptr->fname)+1, &function, sizeof(zend_function), (void**)&reg_function) == FAILURE) {
unload=1;
break;
}
if (scope) {
/*
* If it's an old-style constructor, store it only if we don't have
* a constructor already.
*/
if (!strcmp(ptr->fname, scope->name) && !ctor) {
ctor = reg_function;
} else if (!strcmp(ptr->fname, ZEND_CONSTRUCTOR_FUNC_NAME)) {
ctor = reg_function;
} else if (!strcmp(ptr->fname, ZEND_DESTRUCTOR_FUNC_NAME)) {
dtor = reg_function;
} else if (!strcmp(ptr->fname, ZEND_CLONE_FUNC_NAME)) {
clone = reg_function;
}
}
ptr++;
count++;
}
@@ -1077,6 +1128,11 @@ int zend_register_functions(zend_function_entry *functions, HashTable *function_
zend_unregister_functions(functions, count, target_function_table TSRMLS_CC);
return FAILURE;
}
if (scope) {
scope->constructor = ctor;
scope->destructor = dtor;
scope->clone = clone;
}
return SUCCESS;
}
@@ -1113,7 +1169,7 @@ ZEND_API int zend_register_module(zend_module_entry *module)
#if 0
zend_printf("%s: Registering module %d\n", module->name, module->module_number);
#endif
if (module->functions && zend_register_functions(module->functions, NULL, module->type TSRMLS_CC)==FAILURE) {
if (module->functions && zend_register_functions(NULL, module->functions, NULL, module->type TSRMLS_CC)==FAILURE) {
zend_error(E_CORE_WARNING,"%s: Unable to register functions, unable to load", module->name);
return FAILURE;
}
@@ -1173,7 +1229,7 @@ int module_registry_request_startup(zend_module_entry *module TSRMLS_DC)
*/
int module_registry_cleanup(zend_module_entry *module TSRMLS_DC)
{
switch(module->type) {
switch (module->type) {
case MODULE_PERSISTENT:
if (module->request_shutdown_func) {
#if 0
@@ -1235,6 +1291,7 @@ ZEND_API zend_class_entry *zend_register_internal_class(zend_class_entry *orig_c
class_entry->parent = NULL;
class_entry->refcount = 1;
class_entry->constants_updated = 0;
class_entry->ce_flags = 0;
zend_hash_init(&class_entry->default_properties, 0, NULL, ZVAL_PTR_DTOR, 1);
zend_hash_init(&class_entry->private_properties, 0, NULL, ZVAL_PTR_DTOR, 1);
zend_hash_init(&class_entry->protected_properties, 0, NULL, ZVAL_PTR_DTOR, 1);
@@ -1245,7 +1302,7 @@ ZEND_API zend_class_entry *zend_register_internal_class(zend_class_entry *orig_c
zend_hash_init(&class_entry->class_table, 10, NULL, ZEND_CLASS_DTOR, 1);
if (class_entry->builtin_functions) {
zend_register_functions(class_entry->builtin_functions, &class_entry->function_table, MODULE_PERSISTENT TSRMLS_CC);
zend_register_functions(class_entry, class_entry->builtin_functions, &class_entry->function_table, MODULE_PERSISTENT TSRMLS_CC);
}
zend_hash_update(CG(class_table), lowercase_name, class_entry->name_length+1, &class_entry, sizeof(zend_class_entry *), NULL);
@@ -1308,7 +1365,7 @@ ZEND_API int zend_disable_function(char *function_name, uint function_name_lengt
return FAILURE;
}
disabled_function[0].fname = function_name;
return zend_register_functions(disabled_function, CG(function_table), MODULE_PERSISTENT TSRMLS_CC);
return zend_register_functions(NULL, disabled_function, CG(function_table), MODULE_PERSISTENT TSRMLS_CC);
}
zend_bool zend_is_callable(zval *callable, zend_bool syntax_only, char **callable_name)
+23 -23
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
@@ -95,9 +95,9 @@ BEGIN_EXTERN_C()
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; \
class_container.__call = handle_fcall; \
class_container.__get = handle_propget; \
class_container.__set = handle_propset; \
}
@@ -124,7 +124,7 @@ 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);
int zend_register_functions(zend_class_entry *scope, 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);
@@ -220,23 +220,23 @@ 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);
ZEND_API int add_property_long_ex(zval *arg, char *key, uint key_len, long l TSRMLS_DC);
ZEND_API int add_property_null_ex(zval *arg, char *key, uint key_len TSRMLS_DC);
ZEND_API int add_property_bool_ex(zval *arg, char *key, uint key_len, int b TSRMLS_DC);
ZEND_API int add_property_resource_ex(zval *arg, char *key, uint key_len, long r TSRMLS_DC);
ZEND_API int add_property_double_ex(zval *arg, char *key, uint key_len, double d TSRMLS_DC);
ZEND_API int add_property_string_ex(zval *arg, char *key, uint key_len, char *str, int duplicate TSRMLS_DC);
ZEND_API int add_property_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, int duplicate TSRMLS_DC);
ZEND_API int add_property_zval_ex(zval *arg, char *key, uint key_len, zval *value TSRMLS_DC);
#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)
#define add_property_long(__arg, __key, __n) add_property_long_ex(__arg, __key, strlen(__key)+1, __n TSRMLS_CC)
#define add_property_null(__arg, __key) add_property_null_ex(__arg, __key, strlen(__key) + 1 TSRMLS_CC)
#define add_property_bool(__arg, __key, __b) add_property_bool_ex(__arg, __key, strlen(__key)+1, __b TSRMLS_CC)
#define add_property_resource(__arg, __key, __r) add_property_resource_ex(__arg, __key, strlen(__key)+1, __r TSRMLS_CC)
#define add_property_double(__arg, __key, __d) add_property_double_ex(__arg, __key, strlen(__key)+1, __d TSRMLS_CC)
#define add_property_string(__arg, __key, __str, __duplicate) add_property_string_ex(__arg, __key, strlen(__key)+1, __str, __duplicate TSRMLS_CC)
#define add_property_stringl(__arg, __key, __str, __length, __duplicate) add_property_stringl_ex(__arg, __key, strlen(__key)+1, __str, __length, __duplicate TSRMLS_CC)
#define add_property_zval(__arg, __key, __value) add_property_zval_ex(__arg, __key, strlen(__key)+1, __value TSRMLS_CC)
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);
@@ -250,9 +250,9 @@ 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);
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);
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)
+16 -12
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
@@ -72,18 +72,22 @@ static long mem_block_end_magic = MEM_BLOCK_END_MAGIC;
#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); \
int php_mem_limit = AG(memory_limit); \
if (AG(memory_limit)+1048576 > AG(allocated_memory) - rs) { \
AG(memory_limit) = AG(allocated_memory) + 1048576; \
if (file) { \
zend_error(E_ERROR,"Allowed memory size of %d bytes exhausted (tried to allocate %d bytes)", php_mem_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); \
zend_error(E_ERROR,"Allowed memory size of %d bytes exhausted at %s:%d (tried to allocate %d bytes)", php_mem_limit, file, lineno, s); \
} \
AG(memory_exhausted)=1; \
} \
} else { \
if (file) { \
fprintf(stderr, "Allowed memory size of %d bytes exhausted at %s:%d (tried to allocate %d bytes)\n", php_mem_limit, file, lineno, s); \
} else { \
fprintf(stderr, "Allowed memory size of %d bytes exhausted (tried to allocate %d bytes)\n", php_mem_limit, s); \
} \
exit(1); \
} \
} \
}
# endif
@@ -467,7 +471,7 @@ ZEND_API void shutdown_memory_manager(int silent, int clean_cache TSRMLS_DC)
}
#endif /* ZEND_ENABLE_FAST_CACHE */
#if !ZEND_DISABLE_MEMORY_CACHE
#if !ZEND_DISABLE_MEMORY_CACHE && !defined(ZEND_MM)
if (1 || clean_cache) {
unsigned int i, j;
zend_mem_header *ptr;
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
+160 -14
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
@@ -22,7 +22,7 @@
#include "zend_API.h"
#include "zend_builtin_functions.h"
#include "zend_constants.h"
#include "zend_ini.h"
#undef ZEND_TEST_EXCEPTIONS
static ZEND_FUNCTION(zend_version);
@@ -43,10 +43,12 @@ static ZEND_FUNCTION(get_parent_class);
static ZEND_FUNCTION(method_exists);
static ZEND_FUNCTION(class_exists);
static ZEND_FUNCTION(function_exists);
#if ZEND_DEBUG
static ZEND_FUNCTION(leak);
#ifdef ZEND_TEST_EXCEPTIONS
static ZEND_FUNCTION(crash);
#endif
#endif
static ZEND_FUNCTION(get_included_files);
static ZEND_FUNCTION(is_subclass_of);
static ZEND_FUNCTION(is_a);
@@ -68,6 +70,7 @@ static ZEND_FUNCTION(extension_loaded);
static ZEND_FUNCTION(get_extension_funcs);
static ZEND_FUNCTION(get_defined_constants);
static ZEND_FUNCTION(debug_backtrace);
static ZEND_FUNCTION(debug_print_backtrace);
#if ZEND_DEBUG
static ZEND_FUNCTION(zend_test_func);
#ifdef ZTS
@@ -98,9 +101,11 @@ static zend_function_entry builtin_functions[] = {
ZEND_FE(method_exists, NULL)
ZEND_FE(class_exists, NULL)
ZEND_FE(function_exists, NULL)
#if ZEND_DEBUG
ZEND_FE(leak, NULL)
#ifdef ZEND_TEST_EXCEPTIONS
ZEND_FE(crash, NULL)
#endif
#endif
ZEND_FE(get_included_files, NULL)
ZEND_FALIAS(get_required_files, get_included_files, NULL)
@@ -125,6 +130,7 @@ static zend_function_entry builtin_functions[] = {
ZEND_FE(get_extension_funcs, NULL)
ZEND_FE(get_defined_constants, NULL)
ZEND_FE(debug_backtrace, NULL)
ZEND_FE(debug_print_backtrace, NULL)
#if ZEND_DEBUG
ZEND_FE(zend_test_func, NULL)
#ifdef ZTS
@@ -137,7 +143,7 @@ static zend_function_entry builtin_functions[] = {
int zend_startup_builtin_functions(TSRMLS_D)
{
return zend_register_functions(builtin_functions, NULL, MODULE_PERSISTENT TSRMLS_CC);
return zend_register_functions(NULL, builtin_functions, NULL, MODULE_PERSISTENT TSRMLS_CC);
}
@@ -408,8 +414,8 @@ ZEND_FUNCTION(error_reporting)
if (zend_get_parameters_ex(1, &arg) == FAILURE) {
RETURN_FALSE;
}
convert_to_long_ex(arg);
EG(error_reporting)=(*arg)->value.lval;
convert_to_string_ex(arg);
zend_alter_ini_entry("error_reporting", sizeof("error_reporting"), Z_STRVAL_PP(arg), Z_STRLEN_PP(arg), ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME);
break;
default:
ZEND_WRONG_PARAM_COUNT();
@@ -429,7 +435,7 @@ ZEND_FUNCTION(define)
int case_sensitive;
zend_constant c;
switch(ZEND_NUM_ARGS()) {
switch (ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &var, &val)==FAILURE) {
RETURN_FALSE;
@@ -452,7 +458,7 @@ ZEND_FUNCTION(define)
break;
}
switch((*val)->type) {
switch ((*val)->type) {
case IS_LONG:
case IS_DOUBLE:
case IS_STRING:
@@ -836,7 +842,7 @@ ZEND_FUNCTION(function_exists)
}
/* }}} */
#if ZEND_DEBUG
/* {{{ proto void leak(int num_bytes=3)
Cause an intentional memory leak, for testing/debugging purposes */
ZEND_FUNCTION(leak)
@@ -865,6 +871,7 @@ ZEND_FUNCTION(crash)
}
#endif
#endif /* ZEND_DEBUG */
/* {{{ proto array get_included_files(void)
Returns an array with the file names that were include_once()'d */
@@ -892,7 +899,7 @@ ZEND_FUNCTION(trigger_error)
int error_type = E_USER_NOTICE;
zval **z_error_type, **z_error_message;
switch(ZEND_NUM_ARGS()) {
switch (ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &z_error_message)==FAILURE) {
ZEND_WRONG_PARAM_COUNT();
@@ -1248,7 +1255,7 @@ static int add_constant_info(zend_constant *constant, void *arg TSRMLS_DC)
ZEND_FUNCTION(get_loaded_extensions)
{
if (ZEND_NUM_ARGS() != 0) {
WRONG_PARAM_COUNT;
ZEND_WRONG_PARAM_COUNT();
}
array_init(return_value);
@@ -1262,7 +1269,7 @@ ZEND_FUNCTION(get_loaded_extensions)
ZEND_FUNCTION(get_defined_constants)
{
if (ZEND_NUM_ARGS() != 0) {
WRONG_PARAM_COUNT;
ZEND_WRONG_PARAM_COUNT();
}
array_init(return_value);
@@ -1291,6 +1298,145 @@ static zval *debug_backtrace_get_args(void ***curpos TSRMLS_DC) {
return arg_array;
}
void debug_print_backtrace_args(zval *arg_array TSRMLS_DC)
{
zval **tmp;
HashPosition iterator;
int i = 0;
zend_hash_internal_pointer_reset_ex(arg_array->value.ht, &iterator);
while (zend_hash_get_current_data_ex(arg_array->value.ht, (void **) &tmp, &iterator) == SUCCESS) {
if (i++) {
ZEND_PUTS(", ");
}
zend_print_flat_zval_r(*tmp TSRMLS_CC);
zend_hash_move_forward_ex(arg_array->value.ht, &iterator);
}
}
/* {{{ proto void debug_print_backtrace(void) */
ZEND_FUNCTION(debug_print_backtrace)
{
zend_execute_data *ptr;
int lineno;
char *function_name;
char *filename;
char *class_name = NULL;
char *call_type;
char *include_filename = NULL;
zval *arg_array = NULL;
void **cur_arg_pos = EG(argument_stack).top_element;
void **args = cur_arg_pos;
int arg_stack_consistent = 0;
int frames_on_stack = 0;
int indent = 0;
if (ZEND_NUM_ARGS()) {
ZEND_WRONG_PARAM_COUNT();
}
while (--args >= EG(argument_stack).elements) {
if (*args--) {
break;
}
args -= *(ulong*)args;
frames_on_stack++;
if (args == EG(argument_stack).elements) {
arg_stack_consistent = 1;
break;
}
}
ptr = EG(current_execute_data);
/* skip debug_backtrace() */
ptr = ptr->prev_execute_data;
cur_arg_pos -= 2;
frames_on_stack--;
array_init(return_value);
while (ptr) {
if (ptr->op_array) {
filename = ptr->op_array->filename;
lineno = ptr->opline->lineno;
} else {
filename = NULL;
}
function_name = ptr->function_state.function->common.function_name;
if (function_name) {
if (ptr->object) {
class_name = Z_OBJCE(*ptr->object)->name;
call_type = "->";
} else if (ptr->function_state.function->common.scope) {
class_name = ptr->function_state.function->common.scope->name;
call_type = "::";
} else {
class_name = NULL;
call_type = NULL;
}
if ((! ptr->opline) || ((ptr->opline->opcode == ZEND_DO_FCALL_BY_NAME) || (ptr->opline->opcode == ZEND_DO_FCALL))) {
if (arg_stack_consistent && (frames_on_stack > 0)) {
arg_array = debug_backtrace_get_args(&cur_arg_pos TSRMLS_CC);
frames_on_stack--;
}
}
} else {
/* i know this is kinda ugly, but i'm trying to avoid extra cycles in the main execution loop */
zend_bool build_filename_arg = 1;
switch (ptr->opline->op2.u.constant.value.lval) {
case ZEND_EVAL:
function_name = "eval";
build_filename_arg = 0;
break;
case ZEND_INCLUDE:
function_name = "include";
break;
case ZEND_REQUIRE:
function_name = "require";
break;
case ZEND_INCLUDE_ONCE:
function_name = "include_once";
break;
case ZEND_REQUIRE_ONCE:
function_name = "require_once";
break;
default:
/* this can actually happen if you use debug_backtrace() in your error_handler and
* you're in the top-scope */
function_name = "unknown";
build_filename_arg = 0;
break;
}
if (build_filename_arg && include_filename) {
MAKE_STD_ZVAL(arg_array);
array_init(arg_array);
add_next_index_string(arg_array, include_filename, 1);
}
}
zend_printf("#%-2d ", indent);
if (class_name) {
ZEND_PUTS(class_name);
ZEND_PUTS(call_type);
}
zend_printf("%s(", function_name?function_name:"main");
if (arg_array) {
debug_print_backtrace_args(arg_array TSRMLS_CC);
zval_ptr_dtor(&arg_array);
}
zend_printf(") called at [%s:%d]\n", filename, lineno);
include_filename = filename;
ptr = ptr->prev_execute_data;
++indent;
}
}
/* }}} */
/* {{{ proto void debug_backtrace(void)
Prints out a backtrace */
ZEND_FUNCTION(debug_backtrace)
@@ -1309,7 +1455,7 @@ ZEND_FUNCTION(debug_backtrace)
int frames_on_stack = 0;
if (ZEND_NUM_ARGS()) {
WRONG_PARAM_COUNT;
ZEND_WRONG_PARAM_COUNT();
}
while (--args >= EG(argument_stack).elements) {
@@ -1441,7 +1587,7 @@ ZEND_FUNCTION(extension_loaded)
zval **extension_name;
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &extension_name)) {
WRONG_PARAM_COUNT;
ZEND_WRONG_PARAM_COUNT();
}
convert_to_string_ex(extension_name);
@@ -1463,7 +1609,7 @@ ZEND_FUNCTION(get_extension_funcs)
zend_function_entry *func;
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &extension_name)) {
WRONG_PARAM_COUNT;
ZEND_WRONG_PARAM_COUNT();
}
convert_to_string_ex(extension_name);
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
+215 -99
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
@@ -79,6 +79,7 @@ void zend_init_compiler_data_structures(TSRMLS_D)
zend_stack_init(&CG(list_stack));
CG(handle_op_arrays) = 1;
CG(in_compilation) = 0;
CG(start_lineno) = 0;
init_compiler_declarables(TSRMLS_C);
CG(throw_list) = NULL;
zend_register_auto_global("GLOBALS", sizeof("GLOBALS")-1 TSRMLS_CC);
@@ -183,84 +184,71 @@ void zend_do_unary_op(zend_uchar op, znode *result, znode *op1 TSRMLS_DC)
#define MAKE_NOP(opline) { opline->opcode = ZEND_NOP; memset(&opline->result,0,sizeof(znode)); memset(&opline->op1,0,sizeof(znode)); memset(&opline->op2,0,sizeof(znode)); opline->result.op_type=opline->op1.op_type=opline->op2.op_type=IS_UNUSED; }
static void zend_replace_object_fetch(zend_op *last_op, znode *value TSRMLS_DC)
static void zend_do_op_data(zend_op *data_op, znode *value TSRMLS_DC)
{
if (value->op_type != IS_VAR) {
last_op->opcode = ZEND_MAKE_VAR;
last_op->result.op_type = IS_VAR;
last_op->result.u.EA.type = 0;
last_op->result.u.var = get_temporary_variable(CG(active_op_array));
last_op->op1 = *value;
SET_UNUSED(last_op->op2);
value->op_type = IS_VAR;
value->u.EA.type = 0;
value->u.var = last_op->result.u.var;
} else {
MAKE_NOP(last_op);
}
data_op->opcode = ZEND_OP_DATA;
data_op->op1 = *value;
SET_UNUSED(data_op->op2);
}
void zend_do_binary_assign_op(zend_uchar op, znode *result, znode *op1, znode *op2 TSRMLS_DC)
{
int last_op_number = get_next_op_number(CG(active_op_array))-1;
zend_op *last_op = &CG(active_op_array)->opcodes[last_op_number];
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
zend_op *last_op = &CG(active_op_array)->opcodes[last_op_number];
if (last_op->opcode == ZEND_FETCH_OBJ_RW) {
switch(op) {
switch (op) {
case ZEND_ASSIGN_ADD:
opline->opcode = ZEND_ASSIGN_ADD_OBJ;
last_op->opcode = ZEND_ASSIGN_ADD_OBJ;
break;
case ZEND_ASSIGN_SUB:
opline->opcode = ZEND_ASSIGN_SUB_OBJ;
last_op->opcode = ZEND_ASSIGN_SUB_OBJ;
break;
case ZEND_ASSIGN_MUL:
opline->opcode = ZEND_ASSIGN_MUL_OBJ;
last_op->opcode = ZEND_ASSIGN_MUL_OBJ;
break;
case ZEND_ASSIGN_DIV:
opline->opcode = ZEND_ASSIGN_DIV_OBJ;
last_op->opcode = ZEND_ASSIGN_DIV_OBJ;
break;
case ZEND_ASSIGN_MOD:
opline->opcode = ZEND_ASSIGN_MOD_OBJ;
last_op->opcode = ZEND_ASSIGN_MOD_OBJ;
break;
case ZEND_ASSIGN_SL:
opline->opcode = ZEND_ASSIGN_SL_OBJ;
last_op->opcode = ZEND_ASSIGN_SL_OBJ;
break;
case ZEND_ASSIGN_SR:
opline->opcode = ZEND_ASSIGN_SR_OBJ;
last_op->opcode = ZEND_ASSIGN_SR_OBJ;
break;
case ZEND_ASSIGN_CONCAT:
opline->opcode = ZEND_ASSIGN_CONCAT_OBJ;
last_op->opcode = ZEND_ASSIGN_CONCAT_OBJ;
break;
case ZEND_ASSIGN_BW_OR:
opline->opcode = ZEND_ASSIGN_BW_OR_OBJ;
last_op->opcode = ZEND_ASSIGN_BW_OR_OBJ;
break;
case ZEND_ASSIGN_BW_AND:
opline->opcode = ZEND_ASSIGN_BW_AND_OBJ;
last_op->opcode = ZEND_ASSIGN_BW_AND_OBJ;
break;
case ZEND_ASSIGN_BW_XOR:
opline->opcode = ZEND_ASSIGN_BW_XOR_OBJ;
last_op->opcode = ZEND_ASSIGN_BW_XOR_OBJ;
break;
default:
zend_error(E_COMPILE_ERROR, "Unknown binary op opcode %d", op);
}
opline->op2 = last_op->op2;
opline->op1 = last_op->op1;
zend_replace_object_fetch(last_op, op2 TSRMLS_CC);
opline->extended_value = op2->u.var;
zend_do_op_data(opline, op2 TSRMLS_CC);
SET_UNUSED(opline->result);
*result = last_op->result;
} else {
opline->opcode = op;
opline->op1 = *op1;
opline->op2 = *op2;
opline->result.op_type = IS_VAR;
opline->result.u.EA.type = 0;
opline->result.u.var = get_temporary_variable(CG(active_op_array));
*result = opline->result;
}
opline->result.op_type = IS_VAR;
opline->result.u.EA.type = 0;
opline->result.u.var = get_temporary_variable(CG(active_op_array));
*result = opline->result;
}
@@ -287,13 +275,13 @@ void fetch_simple_variable_ex(znode *result, znode *varname, int bp, zend_uchar
opline_ptr->op2.u.EA.type = ZEND_FETCH_LOCAL;
if (varname->op_type == IS_CONST && varname->u.constant.type == IS_STRING) {
if(zend_hash_exists(CG(auto_globals), varname->u.constant.value.str.val, varname->u.constant.value.str.len+1)) {
if (zend_hash_exists(CG(auto_globals), varname->u.constant.value.str.val, varname->u.constant.value.str.len+1)) {
opline_ptr->op2.u.EA.type = ZEND_FETCH_GLOBAL;
} else {
if(CG(active_op_array)->static_variables && zend_hash_exists(CG(active_op_array)->static_variables, varname->u.constant.value.str.val, varname->u.constant.value.str.len+1)) {
/* if (CG(active_op_array)->static_variables && zend_hash_exists(CG(active_op_array)->static_variables, varname->u.constant.value.str.val, varname->u.constant.value.str.len+1)) {
opline_ptr->op2.u.EA.type = ZEND_FETCH_STATIC;
}
}
*/ }
}
if (bp) {
@@ -378,30 +366,37 @@ void zend_do_echo(znode *arg TSRMLS_DC)
SET_UNUSED(opline->op2);
}
void zend_do_abstract_method(TSRMLS_D)
{
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_RAISE_ABSTRACT_ERROR;
SET_UNUSED(opline->op1);
SET_UNUSED(opline->op2);
}
void zend_do_assign(znode *result, znode *variable, znode *value TSRMLS_DC)
{
int last_op_number = get_next_op_number(CG(active_op_array))-1;
zend_op *last_op = &CG(active_op_array)->opcodes[last_op_number];
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
zend_op *last_op = &CG(active_op_array)->opcodes[last_op_number];
if (last_op->opcode == ZEND_FETCH_OBJ_W) {
opline->opcode = ZEND_ASSIGN_OBJ;
opline->op1 = last_op->op1;
opline->op2 = last_op->op2;
zend_replace_object_fetch(last_op, value TSRMLS_CC);
last_op->opcode = ZEND_ASSIGN_OBJ;
opline->extended_value = value->u.var;
zend_do_op_data(opline, value TSRMLS_CC);
SET_UNUSED(opline->result);
*result = last_op->result;
} else {
opline->opcode = ZEND_ASSIGN;
opline->op1 = *variable;
opline->op2 = *value;
opline->result.op_type = IS_VAR;
opline->result.u.EA.type = 0;
opline->result.u.var = get_temporary_variable(CG(active_op_array));
*result = opline->result;
}
opline->result.op_type = IS_VAR;
opline->result.u.EA.type = 0;
opline->result.u.var = get_temporary_variable(CG(active_op_array));
*result = opline->result;
}
@@ -525,8 +520,8 @@ 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)
{
int last_op_number = get_next_op_number(CG(active_op_array))-1;
zend_op *last_op = &CG(active_op_array)->opcodes[last_op_number];
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
zend_op *last_op = &CG(active_op_array)->opcodes[last_op_number];
if (last_op->opcode == ZEND_FETCH_OBJ_RW) {
opline->opcode = (op==ZEND_PRE_INC)?ZEND_PRE_INC_OBJ:ZEND_PRE_DEC_OBJ;
@@ -550,8 +545,8 @@ 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)
{
int last_op_number = get_next_op_number(CG(active_op_array))-1;
zend_op *last_op = &CG(active_op_array)->opcodes[last_op_number];
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
zend_op *last_op = &CG(active_op_array)->opcodes[last_op_number];
if (last_op->opcode == ZEND_FETCH_OBJ_RW) {
opline->opcode = (op==ZEND_POST_INC)?ZEND_POST_INC_OBJ:ZEND_POST_DEC_OBJ;
@@ -864,7 +859,7 @@ void zend_do_free(znode *op1 TSRMLS_DC)
} else if (op1->op_type==IS_VAR) {
zend_op *opline = &CG(active_op_array)->opcodes[CG(active_op_array)->last-1];
while (opline->opcode == ZEND_END_SILENCE || opline->opcode == ZEND_EXT_FCALL_END) {
while (opline->opcode == ZEND_END_SILENCE || opline->opcode == ZEND_EXT_FCALL_END || opline->opcode == ZEND_OP_DATA) {
opline--;
}
if (opline->result.op_type == op1->op_type
@@ -900,7 +895,18 @@ void zend_do_free(znode *op1 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)
int zend_do_verify_access_types(znode *current_access_type, znode *new_modifier)
{
if ((new_modifier->u.constant.value.lval & ZEND_ACC_PPP_MASK)
&& ((current_access_type->u.constant.value.lval & ZEND_ACC_PPP_MASK) != (new_modifier->u.constant.value.lval & ZEND_ACC_PPP_MASK))) {
zend_error(E_COMPILE_ERROR, "Multiple access type modifiers are not allowed");
}
return (current_access_type->u.constant.value.lval | new_modifier->u.constant.value.lval);
}
void zend_do_begin_function_declaration(znode *function_token, znode *function_name, int is_method, int return_reference, zend_uint fn_flags TSRMLS_DC)
{
zend_op_array op_array;
char *name = function_name->u.constant.value.str.val;
@@ -915,7 +921,7 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n
op_array.function_name = name;
op_array.arg_types = NULL;
op_array.return_reference = return_reference;
op_array.is_static = is_static;
op_array.fn_flags = fn_flags;
op_array.scope = CG(active_class_entry);
@@ -941,6 +947,9 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n
zend_error(E_COMPILE_ERROR, "Cannot redeclare %s()", name);
}
}
if (fn_flags & ZEND_ACC_ABSTRACT) {
CG(active_class_entry)->ce_flags |= ZEND_ACC_ABSTRACT;
}
if ((short_class_name_length == name_len) && (!memcmp(short_class_name, name, name_len))) {
CG(active_class_entry)->constructor = (zend_function *) CG(active_op_array);
@@ -1295,7 +1304,7 @@ void zend_do_pass_param(znode *param, zend_uchar op, int offset TSRMLS_DC)
}
if (original_op == ZEND_SEND_VAR) {
switch(op) {
switch (op) {
case ZEND_SEND_VAR_NO_REF:
zend_do_end_variable_parse(BP_VAR_R, 0 TSRMLS_CC);
break;
@@ -1493,7 +1502,6 @@ ZEND_API void function_add_ref(zend_function *function)
}
}
static void do_inherit_parent_constructor(zend_class_entry *ce)
{
zend_function *function;
@@ -1515,14 +1523,86 @@ static void do_inherit_parent_constructor(zend_class_entry *ce)
function_add_ref(function);
}
ce->constructor = ce->parent->constructor;
ce->__get = ce->parent->__get;
ce->__set = ce->parent->__set;
ce->__call = ce->parent->__call;
if (!ce->__get) {
ce->__get = ce->parent->__get;
}
if (!ce->__set) {
ce->__set = ce->parent->__set;
}
if (!ce->__call) {
ce->__call = ce->parent->__call;
}
}
char *zend_visibility_string(zend_uint fn_flags)
{
if (fn_flags & ZEND_ACC_PRIVATE) {
return "private";
}
if (fn_flags & ZEND_ACC_PROTECTED) {
return "protected";
}
if (fn_flags & ZEND_ACC_PUBLIC) {
return "public";
}
return "";
}
static void do_inherit_method(zend_function *function)
{
/* The class entry of the derived function intentionally remains the same
* as that of the parent class. That allows us to know in which context
* we're running, and handle private method calls properly.
*/
if (function->common.fn_flags & ZEND_ACC_ABSTRACT) {
function->op_array.scope->ce_flags |= ZEND_ACC_ABSTRACT;
}
function_add_ref(function);
}
static zend_bool do_inherit_method_check(zend_function *child, zend_function *parent)
{
zend_uint child_flags = child->common.fn_flags;
zend_uint parent_flags = parent->common.fn_flags;
/* You cannot change from static to non static and vice versa.
*/
if ((child_flags & ZEND_ACC_STATIC) != (parent_flags & ZEND_ACC_STATIC)) {
if (child->common.fn_flags & ZEND_ACC_STATIC) {
zend_error(E_COMPILE_ERROR, "Cannot make non static method %s::%s() static in class %s", ZEND_FN_SCOPE_NAME(parent), child->common.function_name, ZEND_FN_SCOPE_NAME(child));
} else {
zend_error(E_COMPILE_ERROR, "Cannot make static method %s::%s() non static in class %s", ZEND_FN_SCOPE_NAME(parent), child->common.function_name, ZEND_FN_SCOPE_NAME(child));
}
}
/* Disallow making an inherited method abstract.
*/
if ((child_flags & ZEND_ACC_ABSTRACT) && !(parent_flags & ZEND_ACC_ABSTRACT)) {
zend_error(E_COMPILE_ERROR, "Cannot make non abstract method %s::%s() abstract in class %s", ZEND_FN_SCOPE_NAME(parent), child->common.function_name, ZEND_FN_SCOPE_NAME(child));
}
if (parent_flags & ZEND_ACC_CHANGED) {
child->common.fn_flags |= ZEND_ACC_CHANGED;
} else {
/* Prevent derived classes from restricting access that was available in parent classes
*/
if ((child_flags & ZEND_ACC_PPP_MASK) > (parent_flags & ZEND_ACC_PPP_MASK)) {
zend_error(E_COMPILE_ERROR, "Access level to %s::%s() must be %s (as in class %s)%s", ZEND_FN_SCOPE_NAME(parent), child->common.function_name, zend_visibility_string(parent_flags), ZEND_FN_SCOPE_NAME(child), (parent_flags&ZEND_ACC_PUBLIC) ? "" : " or weaker");
} else if (((child_flags & ZEND_ACC_PPP_MASK) < (parent_flags & ZEND_ACC_PPP_MASK))
&& ((parent_flags & ZEND_ACC_PPP_MASK) & ZEND_ACC_PRIVATE)) {
child->common.fn_flags |= ZEND_ACC_CHANGED;
}
}
return 0;
}
void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce)
{
zend_function tmp_zend_function;
zval *tmp;
/* Perform inheritance */
@@ -1531,14 +1611,8 @@ void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce)
/* STATIC_MEMBERS_FIXME */
/* zend_hash_merge(ce->static_members, parent_ce->static_members, (void (*)(void *)) zval_add_ref, (void *) &tmp, sizeof(zval *), 0); */
zend_hash_merge(&ce->constants_table, &parent_ce->constants_table, (void (*)(void *)) zval_add_ref, (void *) &tmp, sizeof(zval *), 0);
zend_hash_merge(&ce->function_table, &parent_ce->function_table, (void (*)(void *)) function_add_ref, &tmp_zend_function, sizeof(zend_function), 0);
zend_hash_merge_ex(&ce->function_table, &parent_ce->function_table, (copy_ctor_func_t) do_inherit_method, sizeof(zend_function), (zend_bool (*)(void *, void *)) do_inherit_method_check);
ce->parent = parent_ce;
if (!ce->handle_property_get)
ce->handle_property_get = parent_ce->handle_property_get;
if (!ce->handle_property_set)
ce->handle_property_set = parent_ce->handle_property_set;
if (!ce->handle_function_call)
ce->handle_function_call = parent_ce->handle_function_call;
do_inherit_parent_constructor(ce);
}
@@ -1553,6 +1627,7 @@ static void create_class(HashTable *class_table, char *name, int name_length, ze
new_class_entry->name_length = name_length;
new_class_entry->refcount = 1;
new_class_entry->constants_updated = 0;
new_class_entry->ce_flags = 0;
zend_str_tolower(new_class_entry->name, new_class_entry->name_length);
@@ -1573,10 +1648,6 @@ static void create_class(HashTable *class_table, char *name, int name_length, ze
new_class_entry->__call = NULL;
new_class_entry->create_object = NULL;
new_class_entry->handle_function_call = NULL;
new_class_entry->handle_property_set = NULL;
new_class_entry->handle_property_get = NULL;
new_class_entry->parent = NULL;
if (zend_hash_update(class_table, new_class_entry->name, name_length+1, &new_class_entry, sizeof(zend_class_entry *), NULL) == FAILURE) {
@@ -2013,6 +2084,10 @@ void zend_do_begin_class_declaration(znode *class_token, znode *class_name, znod
class_token->u.previously_active_class_entry = CG(active_class_entry);
new_class_entry->type = ZEND_USER_CLASS;
if (!(strcmp(class_name->u.constant.value.str.val, "main") && strcmp(class_name->u.constant.value.str.val, "self") &&
strcmp(class_name->u.constant.value.str.val, "parent"))) {
zend_error(E_COMPILE_ERROR, "Cannot use '%s' as class name as it is reserved", class_name->u.constant.value.str.val);
}
if (CG(active_class_entry)) {
new_class_entry->name_length = sizeof("::")-1 + class_name->u.constant.value.str.len + CG(active_class_entry)->name_length;
new_class_entry->name = emalloc(new_class_entry->name_length+1);
@@ -2026,6 +2101,7 @@ void zend_do_begin_class_declaration(znode *class_token, znode *class_name, znod
}
new_class_entry->refcount = 1;
new_class_entry->constants_updated = 0;
new_class_entry->ce_flags = 0;
zend_str_tolower(new_class_entry->name, new_class_entry->name_length);
@@ -2046,10 +2122,6 @@ void zend_do_begin_class_declaration(znode *class_token, znode *class_name, znod
new_class_entry->__call = NULL;
new_class_entry->create_object = NULL;
new_class_entry->handle_function_call = NULL;
new_class_entry->handle_property_set = NULL;
new_class_entry->handle_property_get = NULL;
new_class_entry->parent = NULL;
if (parent_class_name->op_type != IS_UNUSED) {
@@ -2105,7 +2177,8 @@ void mangle_property_name(char **dest, int *dest_length, char *src1, int src1_le
*dest_length = prop_name_length;
}
void zend_do_declare_property(znode *var_name, znode *value, int declaration_type TSRMLS_DC)
void zend_do_declare_property(znode *var_name, znode *value TSRMLS_DC)
{
zval *property;
@@ -2118,8 +2191,14 @@ void zend_do_declare_property(znode *var_name, znode *value, int declaration_typ
property->type = IS_NULL;
}
switch (declaration_type) {
case T_PRIVATE:
if (CG(access_type) & ZEND_ACC_STATIC) {
/* FIXME: Currently, ignores access type for static variables */
zend_hash_update(CG(active_class_entry)->static_members, var_name->u.constant.value.str.val, var_name->u.constant.value.str.len+1, &property, sizeof(zval *), NULL);
return;
}
switch (CG(access_type)) {
case ZEND_ACC_PRIVATE:
{
char *priv_name;
int priv_name_length;
@@ -2133,7 +2212,7 @@ void zend_do_declare_property(znode *var_name, znode *value, int declaration_typ
zend_hash_update(&CG(active_class_entry)->private_properties, var_name->u.constant.value.str.val, var_name->u.constant.value.str.len+1, &property, sizeof(zval *), NULL);
break;
}
case T_PROTECTED:
case ZEND_ACC_PROTECTED:
{
char *prot_name;
int prot_name_length;
@@ -2159,19 +2238,34 @@ void zend_do_declare_property(znode *var_name, znode *value, int declaration_typ
efree(prot_name);
break;
}
case T_VAR:
case ZEND_ACC_PUBLIC:
zend_hash_update(&CG(active_class_entry)->default_properties, var_name->u.constant.value.str.val, var_name->u.constant.value.str.len+1, &property, sizeof(zval *), NULL);
break;
case T_STATIC:
zend_hash_update(CG(active_class_entry)->static_members, var_name->u.constant.value.str.val, var_name->u.constant.value.str.len+1, &property, sizeof(zval *), NULL);
break;
case T_CONST:
zend_hash_update(&CG(active_class_entry)->constants_table, var_name->u.constant.value.str.val, var_name->u.constant.value.str.len+1, &property, sizeof(zval *), NULL);
break;
}
FREE_PNODE(var_name);
}
void zend_do_declare_class_constant(znode *var_name, znode *value TSRMLS_DC)
{
zval *property;
ALLOC_ZVAL(property);
if (value) {
*property = value->u.constant;
} else {
INIT_PZVAL(property);
property->type = IS_NULL;
}
zend_hash_update(&CG(active_class_entry)->constants_table, var_name->u.constant.value.str.val, var_name->u.constant.value.str.len+1, &property, sizeof(zval *), NULL);
FREE_PNODE(var_name);
}
void zend_do_fetch_property(znode *result, znode *object, znode *property TSRMLS_DC)
{
zend_op opline;
@@ -2193,7 +2287,7 @@ void zend_do_fetch_property(znode *result, znode *object, znode *property TSRMLS
SET_UNUSED(opline_ptr->op1); /* this means $this for objects */
opline_ptr->op2 = *property;
/* if it was usual fetch, we change it to object fetch */
switch(opline_ptr->opcode) {
switch (opline_ptr->opcode) {
case ZEND_FETCH_W:
opline_ptr->opcode = ZEND_FETCH_OBJ_W;
break;
@@ -2521,7 +2615,7 @@ void zend_do_list_end(znode *result, znode *expr TSRMLS_DC)
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
if (dimension == tmp_dimension_llist->head) { /* first */
last_container = *expr;
switch(expr->op_type) {
switch (expr->op_type) {
case IS_VAR:
opline->opcode = ZEND_FETCH_DIM_R;
break;
@@ -2574,10 +2668,13 @@ void zend_do_list_end(znode *result, znode *expr TSRMLS_DC)
void zend_do_fetch_static_variable(znode *varname, znode *static_assignment, int fetch_type TSRMLS_DC)
{
zval *tmp;
zend_op *opline;
znode lval;
znode result;
ALLOC_ZVAL(tmp);
convert_to_string(&varname->u.constant);
if(static_assignment) {
if (static_assignment) {
*tmp = static_assignment->u.constant;
} else {
INIT_ZVAL(*tmp);
@@ -2587,7 +2684,26 @@ void zend_do_fetch_static_variable(znode *varname, znode *static_assignment, int
zend_hash_init(CG(active_op_array)->static_variables, 2, NULL, ZVAL_PTR_DTOR, 0);
}
zend_hash_update(CG(active_op_array)->static_variables, varname->u.constant.value.str.val, varname->u.constant.value.str.len+1, &tmp, sizeof(zval *), NULL);
zval_dtor(&varname->u.constant);
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_FETCH_W; /* the default mode must be Write, since fetch_simple_variable() is used to define function arguments */
opline->result.op_type = IS_VAR;
opline->result.u.EA.type = 0;
opline->result.u.var = get_temporary_variable(CG(active_op_array));
opline->op1 = *varname;
SET_UNUSED(opline->op2);
opline->op2.u.EA.type = fetch_type;
result = opline->result;
if (varname->op_type == IS_CONST) {
zval_copy_ctor(&varname->u.constant);
}
fetch_simple_variable(&lval, varname, 0 TSRMLS_CC); /* Relies on the fact that the default fetch is BP_VAR_W */
zend_do_assign_ref(NULL, &lval, &result TSRMLS_CC);
CG(active_op_array)->opcodes[CG(active_op_array)->last-1].result.u.EA.type |= EXT_TYPE_UNUSED;
/* zval_dtor(&varname->u.constant); */
}
void zend_do_fetch_global_variable(znode *varname, znode *static_assignment, int fetch_type TSRMLS_DC)
@@ -2712,11 +2828,11 @@ 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_instanceof(znode *result, znode *expr, znode *class_znode, int type TSRMLS_DC)
{
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_IS_CLASS;
opline->opcode = ZEND_INSTANCEOF;
opline->result.op_type = IS_TMP_VAR;
opline->result.u.var = get_temporary_variable(CG(active_op_array));
opline->op1 = *expr;
@@ -3061,7 +3177,7 @@ int zendlex(znode *zendlval TSRMLS_DC)
zendlval->u.constant.type = IS_LONG;
retval = lex_scan(&zendlval->u.constant TSRMLS_CC);
switch(retval) {
switch (retval) {
case T_COMMENT:
case T_OPEN_TAG:
case T_WHITESPACE:
+30 -9
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
@@ -88,13 +88,26 @@ typedef struct _zend_brk_cont_element {
} zend_brk_cont_element;
#define ZEND_ACC_STATIC 0x01
#define ZEND_ACC_ABSTRACT 0x02
/* The order of those must be kept - public < protected < private */
#define ZEND_ACC_PUBLIC 0x10
#define ZEND_ACC_PROTECTED 0x20
#define ZEND_ACC_PRIVATE 0x40
#define ZEND_ACC_PPP_MASK (ZEND_ACC_PUBLIC | ZEND_ACC_PROTECTED | ZEND_ACC_PRIVATE)
#define ZEND_ACC_CHANGED 0x80
char *zend_visibility_string(zend_uint fn_flags);
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 fn_flags; /* MUST be the fifth element of this struct! */
zend_uint *refcount;
@@ -129,11 +142,13 @@ typedef struct _zend_internal_function {
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 fn_flags; /* MUST be the fifth element of this struct! */
void (*handler)(INTERNAL_FUNCTION_PARAMETERS);
} zend_internal_function;
#define ZEND_FN_SCOPE_NAME(function) ((function) && (function)->common.scope ? (function)->common.scope->name : "")
typedef union _zend_function {
zend_uchar type; /* MUST be the first element of this struct! */
@@ -142,7 +157,7 @@ typedef union _zend_function {
zend_uchar *arg_types;
char *function_name;
zend_class_entry *scope;
zend_bool is_static;
zend_uint fn_flags;
} common;
zend_op_array op_array;
@@ -289,7 +304,8 @@ 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);
int zend_do_verify_access_types(znode *current_access_type, znode *new_modifier);
void zend_do_begin_function_declaration(znode *function_token, znode *function_name, int is_method, int return_reference, zend_uint fn_flags 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);
@@ -331,7 +347,8 @@ void zend_do_default_before_statement(znode *case_list, znode *default_token TSR
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_declare_property(znode *var_name, znode *value TSRMLS_DC);
void zend_do_declare_class_constant(znode *var_name, znode *value TSRMLS_DC);
void zend_do_fetch_property(znode *result, znode *object, znode *property TSRMLS_DC);
@@ -362,7 +379,7 @@ 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_instanceof(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);
@@ -393,6 +410,8 @@ 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);
void zend_do_abstract_method(TSRMLS_D);
ZEND_API void function_add_ref(zend_function *function);
#define INITIAL_OP_ARRAY_SIZE 64
@@ -600,14 +619,16 @@ int zendlex(znode *zendlval TSRMLS_DC);
#define ZEND_POST_DEC_OBJ 135
#define ZEND_ASSIGN_OBJ 136
#define ZEND_MAKE_VAR 137
#define ZEND_OP_DATA 137
#define ZEND_IS_CLASS 138
#define ZEND_INSTANCEOF 138
#define ZEND_DECLARE_CLASS 139
#define ZEND_DECLARE_INHERITED_CLASS 140
#define ZEND_DECLARE_FUNCTION 141
#define ZEND_RAISE_ABSTRACT_ERROR 142
/* end of block */
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
+279 -66
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
@@ -31,6 +31,7 @@
#include "zend_extensions.h"
#include "zend_fast_cache.h"
#include "zend_execute_locks.h"
#include "zend_ini.h"
#define get_zval_ptr(node, Ts, should_free, type) _get_zval_ptr(node, Ts, should_free TSRMLS_CC)
#define get_zval_ptr_ptr(node, Ts, type) _get_zval_ptr_ptr(node, Ts TSRMLS_CC)
@@ -51,7 +52,7 @@ static void zend_extension_fcall_end_handler(zend_extension *extension, zend_op_
static inline zval *_get_zval_ptr(znode *node, temp_variable *Ts, zval **should_free TSRMLS_DC)
{
switch(node->op_type) {
switch (node->op_type) {
case IS_CONST:
*should_free = 0;
return &node->u.constant;
@@ -242,8 +243,8 @@ static inline void make_real_object(zval **object_ptr TSRMLS_DC)
static inline zval **get_obj_zval_ptr_ptr(znode *op, temp_variable *Ts, int type TSRMLS_DC)
{
if(op->op_type == IS_UNUSED) {
if(EG(This)) {
if (op->op_type == IS_UNUSED) {
if (EG(This)) {
/* this should actually never be modified, _ptr_ptr is modified only when
the object is empty */
return &EG(This);
@@ -256,8 +257,8 @@ static inline zval **get_obj_zval_ptr_ptr(znode *op, temp_variable *Ts, int type
static inline zval *get_obj_zval_ptr(znode *op, temp_variable *Ts, zval **freeop, int type TSRMLS_DC)
{
if(op->op_type == IS_UNUSED) {
if(EG(This)) {
if (op->op_type == IS_UNUSED) {
if (EG(This)) {
return EG(This);
} else {
zend_error(E_ERROR, "Using $this when not in object context");
@@ -266,11 +267,13 @@ static inline zval *get_obj_zval_ptr(znode *op, temp_variable *Ts, zval **freeop
return get_zval_ptr(op, Ts, freeop, type);
}
static inline void zend_assign_to_object(znode *result, znode *op1, znode *op2, zval *value, temp_variable *Ts TSRMLS_DC)
static inline void zend_assign_to_object(znode *result, znode *op1, znode *op2, znode *value_op, temp_variable *Ts TSRMLS_DC)
{
zval **object_ptr = get_obj_zval_ptr_ptr(op1, Ts, BP_VAR_W TSRMLS_CC);
zval *object;
zval *property = get_zval_ptr(op2, Ts, &EG(free_op2), BP_VAR_R);
zval *free_value;
zval *value = get_zval_ptr(value_op, Ts, &free_value, BP_VAR_R);
zval tmp;
zval **retval = &T(result->u.var).var.ptr;
@@ -303,11 +306,13 @@ static inline void zend_assign_to_object(znode *result, znode *op1, znode *op2,
break;
}
/* here property is a string */
Z_OBJ_HT_P(object)->write_property(object, property, value TSRMLS_CC);
if (EG(implicit_clone)) {
SEPARATE_ZVAL_IF_NOT_REF(object_ptr);
object = *object_ptr;
}
PZVAL_UNLOCK(value);
/* here property is a string */
Z_OBJ_HT_P(object)->write_property(object, property, value TSRMLS_CC);
if (property == &tmp) {
zval_dtor(property);
}
@@ -320,11 +325,13 @@ static inline void zend_assign_to_object(znode *result, znode *op1, znode *op2,
}
}
static inline void zend_assign_to_object_op(znode *result, znode *op1, znode *op2, zval *value, temp_variable *Ts, int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC) TSRMLS_DC)
static inline void zend_assign_to_object_op(znode *result, znode *op1, znode *op2, znode *value_op, temp_variable *Ts, int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC) TSRMLS_DC)
{
zval **object_ptr = get_obj_zval_ptr_ptr(op1, Ts, BP_VAR_W TSRMLS_CC);
zval *object;
zval *property = get_zval_ptr(op2, Ts, &EG(free_op2), BP_VAR_R);
zval *free_value;
zval *value = get_zval_ptr(value_op, Ts, &free_value, BP_VAR_R);
zval tmp;
zval **retval = &T(result->u.var).var.ptr;
int have_get_ptr = 0;
@@ -359,8 +366,6 @@ static inline void zend_assign_to_object_op(znode *result, znode *op1, znode *op
}
/* here property is a string */
PZVAL_UNLOCK(value);
if (Z_OBJ_HT_P(object)->get_property_zval_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_zval_ptr(object, property TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
@@ -623,7 +628,7 @@ static inline HashTable *zend_get_target_symbol_table(zend_op *opline, temp_vari
return EG(active_op_array)->static_variables;
break;
case ZEND_FETCH_STATIC_MEMBER:
if(T(opline->op2.u.var).EA.class_entry->parent) {
if (T(opline->op2.u.var).EA.class_entry->parent) {
/* if inherited, try to look up */
return zend_find_inherited_static(T(opline->op2.u.var).EA.class_entry, variable);
} else {
@@ -783,8 +788,12 @@ static void zend_fetch_dimension_address(znode *result, znode *op1, znode *op2,
zval ***retval = &T(result->u.var).var.ptr_ptr;
if (!container_ptr) {
if(T(op1->u.var).EA.type == IS_STRING_OFFSET) {
if (T(op1->u.var).EA.type == IS_STRING_OFFSET) {
zval *offset;
zend_error(E_WARNING, "Cannot use string offset as an array");
offset = get_zval_ptr(op2, Ts, &EG(free_op2), BP_VAR_R);
FREE_OP(Ts, op2, EG(free_op2));
}
*retval = &EG(error_zval_ptr);
SELECTIVE_PZVAL_LOCK(**retval, result);
@@ -1154,6 +1163,11 @@ static int zend_check_symbol(zval **pz TSRMLS_DC)
opcode_handler_t zend_opcode_handlers[512];
ZEND_API void execute_internal(zend_execute_data *execute_data_ptr, int return_value_used TSRMLS_DC)
{
((zend_internal_function *) execute_data_ptr->function_state.function)->handler(execute_data_ptr->opline->extended_value, (*(temp_variable *)((char *) execute_data_ptr->Ts + execute_data_ptr->opline->result.u.var)).var.ptr, execute_data_ptr->object, return_value_used TSRMLS_CC);
}
ZEND_API void execute(zend_op_array *op_array TSRMLS_DC)
{
zend_execute_data execute_data;
@@ -1491,67 +1505,100 @@ int zend_assign_bw_xor_handler(ZEND_OPCODE_HANDLER_ARGS)
int zend_assign_add_obj_handler(ZEND_OPCODE_HANDLER_ARGS)
{
zend_assign_to_object_op(&EX(opline)->result, &EX(opline)->op1, &EX(opline)->op2, EX_T(EX(opline)->extended_value).var.ptr, EX(Ts), add_function TSRMLS_CC);
zend_op *op_data = EX(opline)+1;
zend_assign_to_object_op(&EX(opline)->result, &EX(opline)->op1, &EX(opline)->op2, &op_data->op1, EX(Ts), add_function TSRMLS_CC);
/* assign_obj has two opcodes! */
EX(opline)++;
NEXT_OPCODE();
}
int zend_assign_sub_obj_handler(ZEND_OPCODE_HANDLER_ARGS)
{
zend_assign_to_object_op(&EX(opline)->result, &EX(opline)->op1, &EX(opline)->op2, EX_T(EX(opline)->extended_value).var.ptr, EX(Ts), sub_function TSRMLS_CC);
zend_op *op_data = EX(opline)+1;
zend_assign_to_object_op(&EX(opline)->result, &EX(opline)->op1, &EX(opline)->op2, &op_data->op1, EX(Ts), sub_function TSRMLS_CC);
/* assign_obj has two opcodes! */
EX(opline)++;
NEXT_OPCODE();
}
int zend_assign_mul_obj_handler(ZEND_OPCODE_HANDLER_ARGS)
{
zend_assign_to_object_op(&EX(opline)->result, &EX(opline)->op1, &EX(opline)->op2, EX_T(EX(opline)->extended_value).var.ptr, EX(Ts), mul_function TSRMLS_CC);
zend_op *op_data = EX(opline)+1;
zend_assign_to_object_op(&EX(opline)->result, &EX(opline)->op1, &EX(opline)->op2, &op_data->op1, EX(Ts), mul_function TSRMLS_CC);
/* assign_obj has two opcodes! */
EX(opline)++;
NEXT_OPCODE();
}
int zend_assign_div_obj_handler(ZEND_OPCODE_HANDLER_ARGS)
{
zend_assign_to_object_op(&EX(opline)->result, &EX(opline)->op1, &EX(opline)->op2, EX_T(EX(opline)->extended_value).var.ptr, EX(Ts), div_function TSRMLS_CC);
zend_op *op_data = EX(opline)+1;
zend_assign_to_object_op(&EX(opline)->result, &EX(opline)->op1, &EX(opline)->op2, &op_data->op1, EX(Ts), div_function TSRMLS_CC);
/* assign_obj has two opcodes! */
EX(opline)++;
NEXT_OPCODE();
}
int zend_assign_mod_obj_handler(ZEND_OPCODE_HANDLER_ARGS)
{
zend_assign_to_object_op(&EX(opline)->result, &EX(opline)->op1, &EX(opline)->op2, EX_T(EX(opline)->extended_value).var.ptr, EX(Ts), mod_function TSRMLS_CC);
zend_op *op_data = EX(opline)+1;
zend_assign_to_object_op(&EX(opline)->result, &EX(opline)->op1, &EX(opline)->op2, &op_data->op1, EX(Ts), mod_function TSRMLS_CC);
/* assign_obj has two opcodes! */
EX(opline)++;
NEXT_OPCODE();
}
int zend_assign_sl_obj_handler(ZEND_OPCODE_HANDLER_ARGS)
{
zend_assign_to_object_op(&EX(opline)->result, &EX(opline)->op1, &EX(opline)->op2, EX_T(EX(opline)->extended_value).var.ptr, EX(Ts), shift_left_function TSRMLS_CC);
zend_op *op_data = EX(opline)+1;
zend_assign_to_object_op(&EX(opline)->result, &EX(opline)->op1, &EX(opline)->op2, &op_data->op1, EX(Ts), shift_left_function TSRMLS_CC);
/* assign_obj has two opcodes! */
EX(opline)++;
NEXT_OPCODE();
}
int zend_assign_sr_obj_handler(ZEND_OPCODE_HANDLER_ARGS)
{
zend_assign_to_object_op(&EX(opline)->result, &EX(opline)->op1, &EX(opline)->op2, EX_T(EX(opline)->extended_value).var.ptr, EX(Ts), shift_right_function TSRMLS_CC);
zend_op *op_data = EX(opline)+1;
zend_assign_to_object_op(&EX(opline)->result, &EX(opline)->op1, &EX(opline)->op2, &op_data->op1, EX(Ts), shift_right_function TSRMLS_CC);
/* assign_obj has two opcodes! */
EX(opline)++;
NEXT_OPCODE();
}
int zend_assign_concat_obj_handler(ZEND_OPCODE_HANDLER_ARGS)
{
zend_assign_to_object_op(&EX(opline)->result, &EX(opline)->op1, &EX(opline)->op2, EX_T(EX(opline)->extended_value).var.ptr, EX(Ts), concat_function TSRMLS_CC);
zend_op *op_data = EX(opline)+1;
zend_assign_to_object_op(&EX(opline)->result, &EX(opline)->op1, &EX(opline)->op2, &op_data->op1, EX(Ts), concat_function TSRMLS_CC);
/* assign_obj has two opcodes! */
EX(opline)++;
NEXT_OPCODE();
}
int zend_assign_bw_or_obj_handler(ZEND_OPCODE_HANDLER_ARGS)
{
zend_assign_to_object_op(&EX(opline)->result, &EX(opline)->op1, &EX(opline)->op2, EX_T(EX(opline)->extended_value).var.ptr, EX(Ts), bitwise_or_function TSRMLS_CC);
zend_op *op_data = EX(opline)+1;
zend_assign_to_object_op(&EX(opline)->result, &EX(opline)->op1, &EX(opline)->op2, &op_data->op1, EX(Ts), bitwise_or_function TSRMLS_CC);
/* assign_obj has two opcodes! */
EX(opline)++;
NEXT_OPCODE();
}
int zend_assign_bw_and_obj_handler(ZEND_OPCODE_HANDLER_ARGS)
{
zend_assign_to_object_op(&EX(opline)->result, &EX(opline)->op1, &EX(opline)->op2, EX_T(EX(opline)->extended_value).var.ptr, EX(Ts), bitwise_and_function TSRMLS_CC);
zend_op *op_data = EX(opline)+1;
zend_assign_to_object_op(&EX(opline)->result, &EX(opline)->op1, &EX(opline)->op2, &op_data->op1, EX(Ts), bitwise_and_function TSRMLS_CC);
/* assign_obj has two opcodes! */
EX(opline)++;
NEXT_OPCODE();
}
int zend_assign_bw_xor_obj_handler(ZEND_OPCODE_HANDLER_ARGS)
{
zend_assign_to_object_op(&EX(opline)->result, &EX(opline)->op1, &EX(opline)->op2, EX_T(EX(opline)->extended_value).var.ptr, EX(Ts), bitwise_xor_function TSRMLS_CC);
zend_op *op_data = EX(opline)+1;
zend_assign_to_object_op(&EX(opline)->result, &EX(opline)->op1, &EX(opline)->op2, &op_data->op1, EX(Ts), bitwise_xor_function TSRMLS_CC);
/* assign_obj has two opcodes! */
EX(opline)++;
NEXT_OPCODE();
}
@@ -1823,7 +1870,7 @@ int zend_make_var_handler(ZEND_OPCODE_HANDLER_ARGS)
zval *value, *value2;
value = get_zval_ptr(&EX(opline)->op1, EX(Ts), &EG(free_op1), BP_VAR_R);
switch(EX(opline)->op1.op_type) {
switch (EX(opline)->op1.op_type) {
case IS_TMP_VAR:
value2 = value;
ALLOC_ZVAL(value);
@@ -1849,7 +1896,10 @@ int zend_make_var_handler(ZEND_OPCODE_HANDLER_ARGS)
int zend_assign_obj_handler(ZEND_OPCODE_HANDLER_ARGS)
{
zend_assign_to_object(&EX(opline)->result, &EX(opline)->op1, &EX(opline)->op2, EX_T(EX(opline)->extended_value).var.ptr, EX(Ts) TSRMLS_CC);
zend_op *op_data = EX(opline)+1;
zend_assign_to_object(&EX(opline)->result, &EX(opline)->op1, &EX(opline)->op2, &op_data->op1, EX(Ts) TSRMLS_CC);
/* assign_obj has two opcodes! */
EX(opline)++;
NEXT_OPCODE();
}
@@ -2212,6 +2262,79 @@ int zend_fetch_class_handler(ZEND_OPCODE_HANDLER_ARGS)
NEXT_OPCODE();
}
/* Ensures that we're allowed to call a private method.
* Will update EX(fbc) with the correct handler as necessary.
*/
inline int zend_check_private(zend_execute_data *execute_data, zend_class_entry *ce, int fn_flags, char *function_name_strval, int function_name_strlen TSRMLS_DC)
{
zend_function *orig_fbc;
if (!ce) {
return 0;
}
/* We may call a private function if:
* 1. The class of our object is the same as the scope, and the private
* function (EX(fbc)) has the same scope.
* 2. One of our parent classes are the same as the scope, and it contains
* a private function with the same name that has the same scope.
*/
if (EX(fbc)->common.scope == ce
&& EG(scope) == ce) {
/* rule #1 checks out ok, allow the function call */
return 1;
}
/* Check rule #2 */
orig_fbc = EX(fbc);
ce = ce->parent;
while (ce) {
if (ce == EG(scope)) {
if (zend_hash_find(&ce->function_table, function_name_strval, function_name_strlen+1, (void **) &EX(fbc))==SUCCESS
&& EX(fbc)->op_array.fn_flags & ZEND_ACC_PRIVATE
&& EX(fbc)->common.scope == EG(scope)) {
return 1;
}
break;
}
ce = ce->parent;
}
EX(fbc) = orig_fbc;
return 0;
}
/* Ensures that we're allowed to call a protected method.
*/
inline int zend_check_protected(zend_class_entry *ce, zend_class_entry *scope)
{
zend_class_entry *fbc_scope = ce;
/* Is the context that's calling the function, the same as one of
* the function's parents?
*/
while (fbc_scope) {
if (fbc_scope==scope) {
return 1;
}
fbc_scope = fbc_scope->parent;
}
/* Is the function's scope the same as our current object context,
* or any of the parents of our context?
*/
while (scope) {
if (scope==ce) {
return 1;
}
scope = scope->parent;
}
return 0;
}
int zend_init_ctor_call_handler(ZEND_OPCODE_HANDLER_ARGS)
{
zend_ptr_stack_n_push(&EG(arg_types_stack), 3, EX(fbc), EX(object), EX(calling_scope));
@@ -2236,6 +2359,22 @@ int zend_init_ctor_call_handler(ZEND_OPCODE_HANDLER_ARGS)
EX(fbc) = EX(fbc_constructor);
if (EX(fbc)->type == ZEND_USER_FUNCTION) { /* HACK!! */
if (EX(fbc)->op_array.fn_flags & ZEND_ACC_PUBLIC) {
/* No further checks necessary */
} else if (EX(fbc)->op_array.fn_flags & ZEND_ACC_PRIVATE) {
/* Ensure that if we're calling a private function, we're allowed to do so.
*/
if (EX(object)->value.obj.handlers->get_class_entry(EX(object) TSRMLS_CC) != EG(scope)) {
zend_error(E_ERROR, "Call to private constructor from context '%s'", EG(scope) ? EG(scope)->name : "");
}
} else if ((EX(fbc)->common.fn_flags & ZEND_ACC_PROTECTED)) {
/* Ensure that if we're calling a protected function, we're allowed to do so.
*/
if (!zend_check_protected(EX(fbc)->common.scope, EG(scope))) {
zend_error(E_ERROR, "Call to protected constructor from context '%s'", EG(scope) ? EG(scope)->name : "");
}
}
/* The scope should be the scope of the class where the constructor
was initially declared in */
EX(calling_scope) = EX(fbc)->common.scope;
@@ -2246,6 +2385,7 @@ int zend_init_ctor_call_handler(ZEND_OPCODE_HANDLER_ARGS)
NEXT_OPCODE();
}
int zend_init_method_call_handler(ZEND_OPCODE_HANDLER_ARGS)
{
zval *function_name;
@@ -2263,15 +2403,43 @@ int zend_init_method_call_handler(ZEND_OPCODE_HANDLER_ARGS)
EX(object) = get_obj_zval_ptr(&EX(opline)->op1, EX(Ts), &EG(free_op1), BP_VAR_R TSRMLS_CC);
if (EX(object) && EX(object)->type == IS_OBJECT) {
/* First, locate the function. */
EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(EX(object), function_name_strval, function_name_strlen TSRMLS_CC);
if (!EX(fbc)) {
zend_error(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
}
if (EX(fbc)->op_array.fn_flags & ZEND_ACC_PUBLIC) {
/* Ensure that we haven't overridden a private function and end up calling
* the overriding public function...
*/
if (EX(fbc)->op_array.fn_flags & ZEND_ACC_CHANGED) {
zend_function *priv_fbc;
if (zend_hash_find(&EG(scope)->function_table, function_name_strval, function_name_strlen+1, (void **) &priv_fbc)==SUCCESS
&& priv_fbc->common.fn_flags & ZEND_ACC_PRIVATE) {
EX(fbc) = priv_fbc;
}
}
} else if (EX(fbc)->op_array.fn_flags & ZEND_ACC_PRIVATE) {
/* Ensure that if we're calling a private function, we're allowed to do so.
*/
if (!zend_check_private(execute_data, EX(object)->value.obj.handlers->get_class_entry(EX(object) TSRMLS_CC), EX(fbc)->common.fn_flags, function_name_strval, function_name_strlen TSRMLS_CC)) {
zend_error(E_ERROR, "Call to %s method %s::%s() from context '%s'", zend_visibility_string(EX(fbc)->common.fn_flags), ZEND_FN_SCOPE_NAME(EX(fbc)), function_name_strval, EG(scope) ? EG(scope)->name : "");
}
} else if ((EX(fbc)->common.fn_flags & ZEND_ACC_PROTECTED)) {
/* Ensure that if we're calling a protected function, we're allowed to do so.
*/
if (!zend_check_protected(EX(fbc)->common.scope, EG(scope))) {
zend_error(E_ERROR, "Call to %s method %s::%s() from context '%s'", zend_visibility_string(EX(fbc)->common.fn_flags), ZEND_FN_SCOPE_NAME(EX(fbc)), function_name_strval, EG(scope) ? EG(scope)->name : "");
}
}
} else {
zend_error(E_ERROR, "Call to a member function on a non-object");
}
if (!EX(fbc)) {
zend_error(E_ERROR, "Call to undefined function: %s()", function_name_strval);
zend_error(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
}
if (EX(fbc)->common.is_static) {
if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) {
EX(object) = NULL;
} else {
if (!PZVAL_IS_REF(EX(object))) {
@@ -2300,7 +2468,6 @@ int zend_init_method_call_handler(ZEND_OPCODE_HANDLER_ARGS)
int zend_init_static_method_call_handler(ZEND_OPCODE_HANDLER_ARGS)
{
zval *function_name;
zend_function *function;
zval tmp;
zend_class_entry *ce;
zend_bool is_const;
@@ -2330,8 +2497,25 @@ int zend_init_static_method_call_handler(ZEND_OPCODE_HANDLER_ARGS)
EX(calling_scope) = ce;
if (zend_hash_find(&ce->function_table, function_name_strval, function_name_strlen+1, (void **) &function)==FAILURE) {
zend_error(E_ERROR, "Call to undefined function: %s()", function_name_strval);
if (zend_hash_find(&ce->function_table, function_name_strval, function_name_strlen+1, (void **) &EX(fbc))==FAILURE) {
zend_error(E_ERROR, "Call to undefined method %s::%s()", ce->name, function_name_strval);
}
EX(calling_scope) = EX(fbc)->common.scope;
if (EX(fbc)->op_array.fn_flags & ZEND_ACC_PUBLIC) {
/* No further checks necessary, most common case */
} else if (EX(fbc)->op_array.fn_flags & ZEND_ACC_PRIVATE) {
/* Ensure that if we're calling a private function, we're allowed to do so.
*/
if (!zend_check_private(execute_data, EG(scope), EX(fbc)->common.fn_flags, function_name_strval, function_name_strlen TSRMLS_CC)) {
zend_error(E_ERROR, "Call to %s method %s::%s() from context '%s'", zend_visibility_string(EX(fbc)->common.fn_flags), ZEND_FN_SCOPE_NAME(EX(fbc)), function_name_strval, EG(scope) ? EG(scope)->name : "");
}
} else if ((EX(fbc)->common.fn_flags & ZEND_ACC_PROTECTED)) {
/* Ensure that if we're calling a protected function, we're allowed to do so.
*/
if (!zend_check_protected(EG(scope), EX(fbc)->common.scope)) {
zend_error(E_ERROR, "Call to %s method %s::%s() from context '%s'", zend_visibility_string(EX(fbc)->common.fn_flags), ZEND_FN_SCOPE_NAME(EX(fbc)), function_name_strval, EG(scope) ? EG(scope)->name : "");
}
}
if (!is_const) {
@@ -2339,9 +2523,7 @@ int zend_init_static_method_call_handler(ZEND_OPCODE_HANDLER_ARGS)
FREE_OP(EX(Ts), &EX(opline)->op2, EG(free_op2));
}
EX(fbc) = function;
if (function->common.is_static) {
if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) {
EX(object) = NULL;
} else {
if ((EX(object) = EG(This))) {
@@ -2417,18 +2599,20 @@ int zend_do_fcall_common_helper(ZEND_OPCODE_HANDLER_ARGS)
int return_value_used = RETURN_VALUE_USED(EX(opline));
zend_ptr_stack_n_push(&EG(argument_stack), 2, (void *) EX(opline)->extended_value, NULL);
current_scope = EG(scope);
EG(scope) = EX(calling_scope);
current_this = EG(This);
EG(This) = EX(object);
EX_T(EX(opline)->result.u.var).var.ptr_ptr = &EX_T(EX(opline)->result.u.var).var.ptr;
if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION) {
ALLOC_ZVAL(EX_T(EX(opline)->result.u.var).var.ptr);
INIT_ZVAL(*(EX_T(EX(opline)->result.u.var).var.ptr));
((zend_internal_function *) EX(function_state).function)->handler(EX(opline)->extended_value, EX_T(EX(opline)->result.u.var).var.ptr, EX(object), return_value_used TSRMLS_CC);
if (!zend_execute_internal) {
/* saves one function call if zend_execute_internal is not used */
((zend_internal_function *) EX(function_state).function)->handler(EX(opline)->extended_value, EX_T(EX(opline)->result.u.var).var.ptr, EX(object), return_value_used TSRMLS_CC);
} else {
zend_execute_internal(execute_data, return_value_used TSRMLS_CC);
}
EG(current_execute_data) = execute_data;
EX_T(EX(opline)->result.u.var).var.ptr->is_ref = 0;
EX_T(EX(opline)->result.u.var).var.ptr->refcount = 1;
@@ -2438,6 +2622,11 @@ int zend_do_fcall_common_helper(ZEND_OPCODE_HANDLER_ARGS)
} else if (EX(function_state).function->type == ZEND_USER_FUNCTION) {
HashTable *calling_symbol_table;
current_this = EG(This);
EG(This) = EX(object);
current_scope = EG(scope);
EG(scope) = EX(calling_scope);
EX_T(EX(opline)->result.u.var).var.ptr = NULL;
if (EG(symtable_cache_ptr)>=EG(symtable_cache)) {
/*printf("Cache hit! Reusing %x\n", symtable_cache[symtable_cache_ptr]);*/
@@ -2475,6 +2664,11 @@ int zend_do_fcall_common_helper(ZEND_OPCODE_HANDLER_ARGS)
zend_hash_clean(*EG(symtable_cache_ptr));
}
EG(active_symbol_table) = calling_symbol_table;
if (EG(This)) {
zval_ptr_dtor(&EG(This));
}
EG(This) = current_this;
EG(scope) = current_scope;
} else { /* ZEND_OVERLOADED_FUNCTION */
ALLOC_ZVAL(EX_T(EX(opline)->result.u.var).var.ptr);
INIT_ZVAL(*(EX_T(EX(opline)->result.u.var).var.ptr));
@@ -2497,14 +2691,6 @@ int zend_do_fcall_common_helper(ZEND_OPCODE_HANDLER_ARGS)
EG(function_state_ptr) = &EX(function_state);
zend_ptr_stack_clear_multiple(TSRMLS_C);
EG(scope) = current_scope;
if (EG(This)) {
zval_ptr_dtor(&EG(This));
}
EG(This) = current_this;
if (EG(exception)) {
if (EX(opline)->op2.u.opline_num == -1) {
RETURN_FROM_EXECUTE_LOOP(execute_data);
@@ -2911,6 +3097,9 @@ int zend_switch_free_handler(ZEND_OPCODE_HANDLER_ARGS)
int zend_new_handler(ZEND_OPCODE_HANDLER_ARGS)
{
if (EX_T(EX(opline)->op1.u.var).EA.class_entry->ce_flags & ZEND_ACC_ABSTRACT) {
zend_error(E_ERROR, "Cannot instantiate abstract class %s", EX_T(EX(opline)->op1.u.var).EA.class_entry->name);
}
EX_T(EX(opline)->result.u.var).var.ptr_ptr = &EX_T(EX(opline)->result.u.var).var.ptr;
ALLOC_ZVAL(EX_T(EX(opline)->result.u.var).var.ptr);
object_init_ex(EX_T(EX(opline)->result.u.var).var.ptr, EX_T(EX(opline)->op1.u.var).EA.class_entry);
@@ -3025,11 +3214,12 @@ inline int zend_init_add_array_helper(ZEND_OPCODE_HANDLER_ARGS)
}
}
if (offset) {
switch(offset->type) {
switch (offset->type) {
case IS_DOUBLE:
zend_hash_index_update(array_ptr->value.ht, (long) offset->value.dval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_LONG:
case IS_BOOL:
zend_hash_index_update(array_ptr->value.ht, offset->value.lval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_STRING:
@@ -3518,13 +3708,22 @@ int zend_isset_isempty_dim_obj_handler(ZEND_OPCODE_HANDLER_ARGS)
}
break;
}
} else {
if ((*container)->type == IS_OBJECT) {
result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (EX(opline)->extended_value == ZEND_ISEMPTY) TSRMLS_CC);
} else if ((*container)->type == IS_OBJECT) {
result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (EX(opline)->extended_value == ZEND_ISEMPTY) TSRMLS_CC);
} else if ((*container)->type == IS_STRING) { /* string offsets */
switch (EX(opline)->extended_value) {
case ZEND_ISSET:
if (offset->value.lval <= Z_STRLEN_PP(container)) {
result = 1;
}
break;
case ZEND_ISEMPTY:
if (offset->value.lval <= Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') {
result = 1;
}
break;
}
}
} else {
/* string offsets */
}
EX_T(EX(opline)->result.u.var).tmp_var.type = IS_BOOL;
@@ -3564,13 +3763,25 @@ int zend_begin_silence_handler(ZEND_OPCODE_HANDLER_ARGS)
{
EX_T(EX(opline)->result.u.var).tmp_var.value.lval = EG(error_reporting);
EX_T(EX(opline)->result.u.var).tmp_var.type = IS_LONG; /* shouldn't be necessary */
EG(error_reporting) = 0;
zend_alter_ini_entry("error_reporting", sizeof("error_reporting"), "0", 1, ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME);
NEXT_OPCODE();
}
int zend_raise_abstract_error_handler(ZEND_OPCODE_HANDLER_ARGS)
{
zend_error(E_ERROR, "Cannot call abstract method %s::%s()", EG(scope)->name, op_array->function_name);
NEXT_OPCODE(); /* Never reached */
}
int zend_end_silence_handler(ZEND_OPCODE_HANDLER_ARGS)
{
EG(error_reporting) = EX_T(EX(opline)->op1.u.var).tmp_var.value.lval;
zval restored_error_reporting;
restored_error_reporting.type = IS_LONG;
restored_error_reporting.value.lval = EX_T(EX(opline)->op1.u.var).tmp_var.value.lval;
convert_to_string(&restored_error_reporting);
zend_alter_ini_entry("error_reporting", sizeof("error_reporting"), Z_STRVAL(restored_error_reporting), Z_STRLEN(restored_error_reporting), ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME);
zendi_zval_dtor(restored_error_reporting);
NEXT_OPCODE();
}
@@ -3638,10 +3849,10 @@ int zend_ticks_handler(ZEND_OPCODE_HANDLER_ARGS)
NEXT_OPCODE();
}
int zend_is_class_handler(ZEND_OPCODE_HANDLER_ARGS)
int zend_instanceof_handler(ZEND_OPCODE_HANDLER_ARGS)
{
zval *expr = get_zval_ptr(&EX(opline)->op1, EX(Ts), &EG(free_op1), BP_VAR_R);
is_class_function(&EX_T(EX(opline)->result.u.var).tmp_var, expr,
instanceof_function(&EX_T(EX(opline)->result.u.var).tmp_var, expr,
EX_T(EX(opline)->op2.u.var).EA.class_entry TSRMLS_CC);
FREE_OP(EX(Ts), &EX(opline)->op1, EG(free_op1));
NEXT_OPCODE();
@@ -3822,11 +4033,13 @@ void zend_init_opcodes_handlers()
zend_opcode_handlers[ZEND_POST_DEC_OBJ] = zend_post_dec_obj_handler;
zend_opcode_handlers[ZEND_ASSIGN_OBJ] = zend_assign_obj_handler;
zend_opcode_handlers[ZEND_MAKE_VAR] = zend_make_var_handler;
zend_opcode_handlers[ZEND_OP_DATA] = NULL;
zend_opcode_handlers[ZEND_IS_CLASS] = zend_is_class_handler;
zend_opcode_handlers[ZEND_INSTANCEOF] = zend_instanceof_handler;
zend_opcode_handlers[ZEND_DECLARE_CLASS] = zend_declare_class_handler;
zend_opcode_handlers[ZEND_DECLARE_INHERITED_CLASS] = zend_declare_inherited_class_handler;
zend_opcode_handlers[ZEND_DECLARE_FUNCTION] = zend_declare_function_handler;
zend_opcode_handlers[ZEND_RAISE_ABSTRACT_ERROR] = zend_raise_abstract_error_handler;
}
+8 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
@@ -51,10 +51,12 @@ typedef union _temp_variable {
BEGIN_EXTERN_C()
ZEND_API extern void (*zend_execute)(zend_op_array *op_array TSRMLS_DC);
ZEND_API extern void (*zend_execute_internal)(zend_execute_data *execute_data_ptr, int return_value_used 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 void execute_internal(zend_execute_data *execute_data_ptr, int return_value_used TSRMLS_DC);
ZEND_API int zend_is_true(zval *op);
static inline void safe_free_zval_ptr(zval *p)
{
@@ -162,6 +164,11 @@ void zend_assign_to_variable_reference(znode *result, zval **variable_ptr_ptr, z
#define IS_OVERLOADED_OBJECT 1
#define IS_STRING_OFFSET 2
/* The following tries to resolve the classname of a zval of type object.
* Since it is slow it should be only used in error messages.
*/
#define Z_OBJ_CLASS_NAME_P(zval) ((zval) && (zval)->type == IS_OBJECT && Z_OBJ_HT_P(zval)->get_class_entry != NULL && Z_OBJ_HT_P(zval)->get_class_entry(zval TSRMLS_CC) ? Z_OBJ_HT_P(zval)->get_class_entry(zval TSRMLS_CC)->name : "")
END_EXTERN_C()
#endif /* ZEND_EXECUTE_H */
+8 -7
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
@@ -34,6 +34,7 @@
ZEND_API void (*zend_execute)(zend_op_array *op_array TSRMLS_DC);
ZEND_API void (*zend_execute_internal)(zend_execute_data *execute_data_ptr, int return_value_used TSRMLS_DC);
#ifdef ZEND_WIN32
#include <process.h>
@@ -128,6 +129,7 @@ void init_executor(TSRMLS_D)
EG(symtable_cache_ptr) = EG(symtable_cache)-1;
EG(symtable_cache_limit)=EG(symtable_cache)+SYMTABLE_CACHE_SIZE-1;
EG(no_extensions)=0;
EG(implicit_clone)=0;
EG(function_table) = CG(function_table);
EG(class_table) = CG(class_table);
@@ -162,7 +164,6 @@ void init_executor(TSRMLS_D)
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;
@@ -251,7 +252,6 @@ void shutdown_executor(TSRMLS_D)
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();
}
@@ -262,7 +262,7 @@ ZEND_API char *get_active_function_name(TSRMLS_D)
if (!zend_is_executing(TSRMLS_C)) {
return NULL;
}
switch(EG(function_state_ptr)->function->type) {
switch (EG(function_state_ptr)->function->type) {
case ZEND_USER_FUNCTION: {
char *function_name = ((zend_op_array *) EG(function_state_ptr)->function)->function_name;
@@ -520,7 +520,7 @@ int call_user_function_ex(HashTable *function_table, zval **object_pp, zval *fun
/* 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");
zend_error(E_WARNING, "Cannot use call_user_function on objects without a class entry");
return FAILURE;
}
@@ -838,11 +838,12 @@ 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);
}
zend_error(E_ERROR, "Maximum execution time of %d second%s exceeded",
EG(timeout_seconds), EG(timeout_seconds) == 1 ? "" : "s");
}
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
+5 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
@@ -119,10 +119,13 @@ struct _zend_compiler_globals {
int interactive;
zend_uint start_lineno;
zend_bool in_clone_method;
zend_bool increment_lineno;
zend_llist import_commands;
int access_type;
};
@@ -174,6 +177,7 @@ struct _zend_executor_globals {
zend_bool in_execution;
zend_bool bailout_set;
zend_bool full_tables_cleanup;
zend_bool implicit_clone;
/* for extended information support */
zend_bool no_extensions;
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
+3 -3
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
@@ -722,9 +722,9 @@ ZEND_API void zend_hash_apply_with_arguments(HashTable *ht, apply_func_args_t de
HASH_PROTECT_RECURSION(ht);
va_start(args, num_args);
p = ht->pListHead;
while (p != NULL) {
va_start(args, num_args);
hash_key.arKey = p->arKey;
hash_key.nKeyLength = p->nKeyLength;
hash_key.h = p->h;
@@ -733,8 +733,8 @@ ZEND_API void zend_hash_apply_with_arguments(HashTable *ht, apply_func_args_t de
} else {
p = p->pListNext;
}
va_end(args);
}
va_end(args);
HASH_UNPROTECT_RECURSION(ht);
}
+2 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
@@ -39,6 +39,7 @@ 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);
typedef void (*copy_ctor_param_func_t)(void *pElement, void *pParam);
struct _hashtable;
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
+2 -2
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
@@ -80,7 +80,7 @@ ZEND_API void zend_indent()
default:
if (token.type==0) {
/* keyword */
switch(token_type) {
switch (token_type) {
case ',':
ZEND_PUTS(", ");
goto dflt_printout;
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
+10 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
@@ -75,6 +75,15 @@ ZEND_API int zend_ini_startup(TSRMLS_D)
ZEND_API int zend_ini_shutdown(TSRMLS_D)
{
zend_hash_destroy(EG(ini_directives));
free(EG(ini_directives));
return SUCCESS;
}
ZEND_API int zend_ini_global_shutdown(TSRMLS_D)
{
zend_hash_destroy(registered_zend_ini_directives);
free(registered_zend_ini_directives);
return SUCCESS;
}
+3 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
@@ -84,6 +84,7 @@ struct _zend_ini_entry {
ZEND_API int zend_ini_startup(TSRMLS_D);
ZEND_API int zend_ini_shutdown(TSRMLS_D);
ZEND_API int zend_ini_global_shutdown(TSRMLS_D);
ZEND_API int zend_ini_deactivate(TSRMLS_D);
ZEND_API int zend_copy_ini_directives(TSRMLS_D);
@@ -190,6 +191,7 @@ typedef void (*zend_ini_parser_cb_t)(zval *arg1, zval *arg2, int callback_type,
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
#define ZEND_INI_PARSER_POP_ENTRY 3
typedef struct _zend_ini_parser_param {
zend_ini_parser_cb_t ini_parser_cb;
+10 -1
View File
@@ -140,7 +140,7 @@ static void ini_error(char *str)
fprintf(stderr, "PHP: %s", error_buf);
#endif
} else {
zend_error(E_CORE_WARNING, error_buf);
zend_error(E_WARNING, error_buf);
}
efree(error_buf);
}
@@ -178,6 +178,7 @@ int zend_parse_ini_file(zend_file_handle *fh, zend_bool unbuffered_errors, zend_
%pure_parser
%token TC_STRING
%token TC_ENCAPSULATED_STRING
%token BRACK
%token SECTION
%token CFG_TRUE
%token CFG_FALSE
@@ -200,6 +201,14 @@ statement:
free($1.value.str.val);
free($3.value.str.val);
}
| TC_STRING BRACK '=' string_or_value {
#if DEBUG_CFG_PARSER
printf("'%s'[ ] = '%s'\n", $1.value.str.val, $4.value.str.val);
#endif
ZEND_INI_PARSER_CB(&$1, &$4, ZEND_INI_PARSER_POP_ENTRY, ZEND_INI_PARSER_ARG);
free($1.value.str.val);
free($4.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'
+4 -1
View File
@@ -108,6 +108,9 @@ NEWLINE ("\r"|"\n"|"\r\n")
%%
<INITIAL>[ ]*[\[][ ]*[\]][ ]* {
return BRACK;
}
<INITIAL>[ ]*("true"|"on"|"yes")[ ]* {
ini_lval->value.str.val = zend_strndup("1", 1);
@@ -166,7 +169,7 @@ NEWLINE ("\r"|"\n"|"\r\n")
}
<INITIAL>[^=\n\r\t;|&~()!"]+ {
<INITIAL>[^=\n\r\t;|&~()!"\[]+ {
/* STRING */
register int i;
+56 -45
View File
@@ -67,7 +67,7 @@
%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
%nonassoc T_NEW T_INSTANCEOF
%token T_EXIT
%token T_IF
%left T_ELSEIF
@@ -94,7 +94,7 @@
%token T_ENDFOREACH
%token T_DECLARE
%token T_ENDDECLARE
%token T_IS_CLASS
%token T_INSTANCEOF
%token T_AS
%token T_SWITCH
%token T_ENDSWITCH
@@ -110,9 +110,7 @@
%token T_THROW
%token T_USE
%token T_GLOBAL
%token T_STATIC
%token T_PRIVATE
%token T_PROTECTED
%right T_STATIC T_ABSTRACT T_PRIVATE T_PROTECTED T_PUBLIC
%token T_VAR
%token T_UNSET
%token T_ISSET
@@ -272,6 +270,12 @@ class_declaration_statement:
;
is_reference:
/* empty */ { $$.op_type = ZEND_RETURN_VAL; }
| '&' { $$.op_type = ZEND_RETURN_REF; }
;
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); }
@@ -436,44 +440,51 @@ class_statement_list:
class_statement:
class_variable_declaration ';'
variable_modifiers { CG(access_type) = $1.u.constant.value.lval; } 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); } '('
| method_modifiers 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_ABSTRACT method_modifiers T_FUNCTION { $3.u.opline_num = CG(zend_lineno); } is_reference T_STRING { zend_do_begin_function_declaration(&$3, &$6, 1, $5.op_type, $2.u.constant.value.lval | ZEND_ACC_ABSTRACT TSRMLS_CC); } '('
parameter_list ')' { zend_do_abstract_method(TSRMLS_C); zend_do_end_function_declaration(&$3 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; }
variable_modifiers:
non_empty_access_modifiers { $$ = $1; }
| T_VAR { $$.u.constant.value.lval = ZEND_ACC_PUBLIC; }
;
is_reference:
/* empty */ { $$.op_type = ZEND_RETURN_VAL; }
| '&' { $$.op_type = ZEND_RETURN_REF; }
method_modifiers:
/* empty */ { $$.u.constant.value.lval = ZEND_ACC_PUBLIC; }
| non_empty_access_modifiers { $$ = $1; if (!($$.u.constant.value.lval & ZEND_ACC_PPP_MASK)) { $$.u.constant.value.lval |= ZEND_ACC_PUBLIC; } }
;
non_empty_access_modifiers:
access_modifier { $$ = $1; }
| non_empty_access_modifiers access_modifier { $$.u.constant.value.lval = zend_do_verify_access_types(&$1, &$2); }
;
access_modifier:
T_PUBLIC { $$.u.constant.value.lval = ZEND_ACC_PUBLIC; }
| T_PROTECTED { $$.u.constant.value.lval = ZEND_ACC_PROTECTED; }
| T_PRIVATE { $$.u.constant.value.lval = ZEND_ACC_PRIVATE; }
| T_STATIC { $$.u.constant.value.lval = ZEND_ACC_STATIC; }
;
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_variable_declaration ',' T_VARIABLE { zend_do_declare_property(&$3, NULL TSRMLS_CC); }
| class_variable_declaration ',' T_VARIABLE '=' static_scalar { zend_do_declare_property(&$3, &$5 TSRMLS_CC); }
| T_VARIABLE { zend_do_declare_property(&$1, NULL TSRMLS_CC); }
| T_VARIABLE '=' static_scalar { zend_do_declare_property(&$1, &$3 TSRMLS_CC); }
;
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); }
class_constant_declaration ',' T_STRING '=' static_scalar { zend_do_declare_class_constant(&$3, &$5 TSRMLS_CC); }
| T_CONST T_STRING '=' static_scalar { zend_do_declare_class_constant(&$2, &$4 TSRMLS_CC); }
;
echo_expr_list:
| echo_expr_list ',' expr { zend_do_echo(&$3 TSRMLS_CC); }
echo_expr_list ',' expr { zend_do_echo(&$3 TSRMLS_CC); }
| expr { zend_do_echo(&$1 TSRMLS_CC); }
;
@@ -490,21 +501,21 @@ non_empty_for_expr:
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 '=' expr { zend_check_writable_variable(&$1); 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); }
| variable '=' '&' T_NEW new_class_entry { zend_check_writable_variable(&$1); 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); }
| variable T_PLUS_EQUAL expr { zend_check_writable_variable(&$1); 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(&$1); 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(&$1); 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(&$1); 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(&$1); 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(&$1); 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(&$1); 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(&$1); 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(&$1); 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(&$1); 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(&$1); 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); }
@@ -537,7 +548,7 @@ expr_without_variable:
| 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 T_INSTANCEOF instanceof_expr { zend_do_instanceof(&$$, &$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); }
@@ -595,7 +606,7 @@ static_or_variable_string:
| r_variable_without_static_member { $$ = $1; }
;
is_class_expr:
instanceof_expr:
parse_class_entry T_STRING { do_fetch_class(&$$, &$1, &$2 TSRMLS_CC); }
| T_STRING { do_fetch_class(&$$, NULL, &$1 TSRMLS_CC); }
;
@@ -675,12 +686,12 @@ r_variable:
w_variable:
variable { zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); $$ = $1; }
{ zend_check_writable_variable(&$$); }
{ zend_check_writable_variable(&$1); }
;
rw_variable:
variable { zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); $$ = $1; }
{ zend_check_writable_variable(&$$); }
{ zend_check_writable_variable(&$1); }
;
r_variable_without_static_member:
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
+20 -8
View File
@@ -127,7 +127,6 @@ void startup_scanner(TSRMLS_D)
CG(heredoc_len)=0;
SCNG(yy_start_stack_ptr) = 0;
SCNG(yy_start_stack_depth) = 0;
SCNG(yy_start_stack) = 0;
}
@@ -249,8 +248,9 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle TSRMLS_DC)
zend_set_compiled_filename(file_path TSRMLS_CC);
if (CG(zend_lineno) < 0) { /* position is (n_lines * -1), position was changed by an external app */
CG(zend_lineno) = CG(zend_lineno) * -1;
if (CG(start_lineno)) {
CG(zend_lineno) = CG(start_lineno);
CG(start_lineno) = 0;
} else {
CG(zend_lineno) = 1;
}
@@ -474,6 +474,8 @@ DNUM ([0-9]*[\.][0-9]+)|([0-9]+[\.][0-9]*)
EXPONENT_DNUM (({LNUM}|{DNUM})[eE][+-]?{LNUM})
HNUM "0x"[0-9a-fA-F]+
LABEL [a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*
ENCAPSED_STRING ([a-zA-Z0-9_\x7f-\xff \t #'.:;,()|^&+/*=%!~<>?@]|"-"[a-zA-Z0-9_\x7f-\xff \t #'.:;,()|^&+/*=%!~<?@])+
ENCAPSED_STRING_WITH_NEWLINE ([a-zA-Z0-9_\x7f-\xff \t\n\r #'.:;,()|^&+/*=%!~<>?@]|"-"[a-zA-Z0-9_\x7f-\xff \t\n\r #'.:;,()|^&+/*=%!~<?@])+
WHITESPACE [ \n\r\t]+
TABS_AND_SPACES [ \t]*
TOKENS [;:,.\[\]()|^&+-/*=%!~$<>?@]
@@ -570,8 +572,8 @@ NEWLINE ("\r"|"\n"|"\r\n")
return T_ENDDECLARE;
}
<ST_IN_SCRIPTING>"is" {
return T_IS_CLASS;
<ST_IN_SCRIPTING>"instanceof" {
return T_INSTANCEOF;
}
<ST_IN_SCRIPTING>"as" {
@@ -724,6 +726,10 @@ NEWLINE ("\r"|"\n"|"\r\n")
return T_STATIC;
}
<ST_IN_SCRIPTING>"abstract" {
return T_ABSTRACT;
}
<ST_IN_SCRIPTING>"private" {
return T_PRIVATE;
}
@@ -733,10 +739,9 @@ NEWLINE ("\r"|"\n"|"\r\n")
}
<ST_IN_SCRIPTING>"public" {
return T_VAR;
return T_PUBLIC;
}
<ST_IN_SCRIPTING>"unset" {
return T_UNSET;
}
@@ -1076,6 +1081,13 @@ NEWLINE ("\r"|"\n"|"\r\n")
return T_VARIABLE;
}
<ST_DOUBLE_QUOTES,ST_BACKQUOTE>{ENCAPSED_STRING_WITH_NEWLINE} {
HANDLE_NEWLINES(yytext, yyleng);
zendlval->value.str.val = (char *)estrndup(yytext, yyleng);
zendlval->value.str.len = yyleng;
zendlval->type = IS_STRING;
return T_STRING;
}
<ST_IN_SCRIPTING>{LABEL} {
zendlval->value.str.val = (char *)estrndup(yytext, yyleng);
@@ -1085,7 +1097,7 @@ NEWLINE ("\r"|"\n"|"\r\n")
}
<ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC>{LABEL} {
<ST_HEREDOC>{ENCAPSED_STRING} {
zendlval->value.str.val = (char *)estrndup(yytext, yyleng);
zendlval->value.str.len = yyleng;
zendlval->type = IS_STRING;
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
+2 -2
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
@@ -28,7 +28,7 @@ typedef struct _zend_llist_element {
} 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 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);
+48 -7
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
@@ -57,7 +57,6 @@
#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))
@@ -152,14 +151,15 @@ zend_bool zend_mm_add_memory_block(zend_mm_heap *heap, size_t block_size)
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->size = block_size - ZEND_MM_ALIGNED_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->size = ZEND_MM_ALIGNED_HEADER_SIZE;
guard_block->guard_block = 1;
guard_block->prev_size = mm_block->size;
ZEND_MM_DEBUG(("Setup guard block at 0x%0.8X\n", guard_block));
@@ -231,9 +231,9 @@ void *zend_mm_alloc(zend_mm_heap *heap, size_t size)
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)) {
if (true_size > (heap->block_size - ZEND_MM_ALIGNED_SEGMENT_SIZE - ZEND_MM_ALIGNED_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);
zend_mm_add_memory_block(heap, true_size + ZEND_MM_ALIGNED_SEGMENT_SIZE + ZEND_MM_ALIGNED_HEADER_SIZE);
} else {
zend_mm_add_memory_block(heap, heap->block_size);
}
@@ -242,6 +242,7 @@ zend_mm_finished_searching_for_block:
/* mark as used */
best_fit->type = ZEND_MM_USED_BLOCK;
((zend_mm_block *) best_fit)->guard_block = 0;
/* remove from free list */
zend_mm_remove_from_free_list(heap, best_fit);
@@ -257,7 +258,7 @@ 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) {
if (mm_block->type != ZEND_MM_USED_BLOCK) {
/* error */
return;
}
@@ -300,6 +301,46 @@ void *zend_mm_realloc(zend_mm_heap *heap, void *p, size_t size)
next_block = ZEND_MM_BLOCK_AT(mm_block, mm_block->size);
if ((mm_block->prev_size == 0) && (next_block->type == ZEND_MM_USED_BLOCK) &&
(next_block->guard_block)) {
zend_mm_segment *segment = (zend_mm_segment *) ((char *)mm_block - ZEND_MM_ALIGNED_SEGMENT_SIZE);
zend_mm_segment *segment_copy = segment;
zend_mm_block *guard_block;
size_t realloc_to_size;
/* segment size, size of block and size of guard block */
realloc_to_size = ZEND_MM_ALIGNED_SEGMENT_SIZE+true_size+ZEND_MM_ALIGNED_HEADER_SIZE;
segment = realloc(segment, realloc_to_size);
if (segment != segment_copy) {
if (heap->segments_list == segment_copy) {
heap->segments_list = segment;
} else {
zend_mm_segment *seg = heap->segments_list;
while (seg) {
if (seg->next_segment == segment_copy) {
seg->next_segment = segment;
break;
}
seg = seg->next_segment;
}
}
mm_block = (zend_mm_block *) ((char *) segment + ZEND_MM_ALIGNED_SEGMENT_SIZE);
}
mm_block->size = true_size;
/* 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_HEADER_SIZE;
guard_block->guard_block = 1;
guard_block->prev_size = mm_block->size;
return ZEND_MM_DATA_OF(mm_block);
}
if (next_block->type != ZEND_MM_FREE_BLOCK || (mm_block->size + next_block->size < true_size)) {
void *ptr;
+2 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
@@ -32,6 +32,7 @@ typedef struct _zend_mm_block {
unsigned int size : 31;
unsigned int type : 1;
size_t prev_size;
unsigned int guard_block : 1;
} zend_mm_block;
typedef struct _zend_mm_free_block {
+5 -2
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
@@ -41,7 +41,8 @@ ZEND_API extern unsigned char third_arg_force_ref[];
#define USING_ZTS 0
#endif
#define STANDARD_MODULE_HEADER sizeof(zend_module_entry), ZEND_MODULE_API_NO, ZEND_DEBUG, USING_ZTS
#define STANDARD_MODULE_HEADER sizeof(zend_module_entry), ZEND_MODULE_API_NO, ZEND_DEBUG, USING_ZTS, NULL
#define ZE2_STANDARD_MODULE_HEADER sizeof(zend_module_entry), ZEND_MODULE_API_NO, ZEND_DEBUG, USING_ZTS, ini_entries
#define STANDARD_MODULE_PROPERTIES_EX 0, 0, 0, NULL, 0
@@ -53,6 +54,7 @@ ZEND_API extern unsigned char third_arg_force_ref[];
#define MODULE_PERSISTENT 1
#define MODULE_TEMPORARY 2
struct _zend_ini_entry;
typedef struct _zend_module_entry zend_module_entry;
struct _zend_module_entry {
@@ -60,6 +62,7 @@ struct _zend_module_entry {
unsigned int zend_api;
unsigned char zend_debug;
unsigned char zts;
struct _zend_ini_entry *ini_entry;
char *name;
zend_function_entry *functions;
int (*module_startup_func)(INIT_FUNC_ARGS);
+24 -4
View File
@@ -8,6 +8,8 @@
#define DEBUG_OBJECT_HANDLERS 0
#define Z_OBJ_P(zval_p) zend_objects_get_address(zval_p)
/*
__X accessors explanation:
@@ -207,7 +209,7 @@ static void zend_std_write_property(zval *object, zval *member, zval *value TSRM
}
if (zend_hash_find(zobj->properties, Z_STRVAL_P(member), Z_STRLEN_P(member)+1, (void **) &variable_ptr) == SUCCESS) {
if(*variable_ptr == value) {
if (*variable_ptr == value) {
/* if we already have this value there, we don't actually need to do anything */
setter_done = 1;
} else {
@@ -397,8 +399,8 @@ static union _zend_function *zend_std_get_method(zval *object, char *method_name
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->scope = zobj->ce;
call_user_call->fn_flags = 0;
call_user_call->function_name = estrndup(method_name, method_len);
free_alloca(lc_method_name);
@@ -474,6 +476,24 @@ zend_class_entry *zend_std_object_get_class(zval *object TSRMLS_DC)
return zobj->ce;
}
int zend_std_object_get_class_name(zval *object, char **class_name, zend_uint *class_name_len, int parent TSRMLS_DC)
{
zend_object *zobj;
zobj = Z_OBJ_P(object);
if (parent) {
if (!zobj->ce->parent) {
return FAILURE;
}
*class_name = zobj->ce->parent->name;
*class_name_len = zobj->ce->parent->name_length;
} else {
*class_name = zobj->ce->name;
*class_name_len = zobj->ce->name_length;
}
return SUCCESS;
}
zend_object_handlers std_object_handlers = {
zend_objects_store_add_ref, /* add_ref */
zend_objects_store_del_ref, /* del_ref */
@@ -493,7 +513,7 @@ zend_object_handlers std_object_handlers = {
NULL, /* call_method */
zend_std_get_constructor, /* get_constructor */
zend_std_object_get_class, /* get_class_entry */
NULL, /* get_class_name */
zend_std_object_get_class_name, /* get_class_name */
zend_std_compare_objects /* compare_objects */
};
+1 -1
View File
@@ -73,7 +73,7 @@ typedef struct _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 IS_ZEND_STD_OBJECT(z) ((z).type == IS_OBJECT && (Z_OBJ_HT((z))->get_class_entry != NULL))
#define HAS_CLASS_ENTRY(z) (Z_OBJ_HT(z)->get_class_entry != NULL)
#endif
+1 -1
View File
@@ -38,7 +38,7 @@ static inline void zend_objects_call_destructor(zend_object *object, zend_object
}
static inline void zend_objects_destroy_object(zend_object *object, zend_object_handle handle TSRMLS_DC)
ZEND_API 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 */
+1
View File
@@ -4,6 +4,7 @@
#include "zend.h"
ZEND_API zend_object_value zend_objects_new(zend_object **object, zend_class_entry *class_type);
ZEND_API void zend_objects_destroy_object(zend_object *object, zend_object_handle handle TSRMLS_DC);
ZEND_API zend_object *zend_objects_get_address(zval *object);
ZEND_API zend_object_value zend_objects_clone_obj(zval *object TSRMLS_DC);
+6 -1
View File
@@ -153,7 +153,7 @@ ZEND_API zend_object_value zend_objects_store_clone_obj(zval *zobject TSRMLS_DC)
zend_error(E_ERROR, "Trying to clone uncloneable object");
}
obj->clone(&obj->object, &new_object TSRMLS_CC);
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);
@@ -242,6 +242,11 @@ ZEND_API zval* zend_object_proxy_get(zval *property TSRMLS_DC)
return NULL;
}
ZEND_API zend_object_handlers *zend_get_std_object_handlers()
{
return &std_object_handlers;
}
static zend_object_handlers zend_object_proxy_handlers = {
ZEND_OBJECTS_STORE_HANDLERS,
+2
View File
@@ -46,4 +46,6 @@ 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);
ZEND_API zend_object_handlers *zend_get_std_object_handlers();
#endif /* ZEND_OBJECTS_H */
+2 -2
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
@@ -339,7 +339,7 @@ int print_class(zend_class_entry *class_entry TSRMLS_DC)
ZEND_API unary_op_type get_unary_op(int opcode)
{
switch(opcode) {
switch (opcode) {
case ZEND_BW_NOT:
return (unary_op_type) bitwise_not_function;
break;
+5 -5
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
@@ -504,7 +504,7 @@ ZEND_API void convert_to_array(zval *op)
{
TSRMLS_FETCH();
switch(op->type) {
switch (op->type) {
case IS_ARRAY:
return;
break;
@@ -538,7 +538,7 @@ ZEND_API void convert_to_array(zval *op)
ZEND_API void convert_to_object(zval *op)
{
switch(op->type) {
switch (op->type) {
case IS_ARRAY:
{
/* OBJECTS_OPTIMIZE */
@@ -1360,7 +1360,7 @@ ZEND_API int is_smaller_or_equal_function(zval *result, zval *op1, zval *op2 TSR
}
ZEND_API int is_class_function(zval *result, zval *op1, zend_class_entry *class TSRMLS_DC)
ZEND_API int instanceof_function(zval *result, zval *op1, zend_class_entry *class TSRMLS_DC)
{
if (Z_TYPE_P(op1) == IS_OBJECT) {
zend_class_entry *ce;
@@ -1540,7 +1540,7 @@ ZEND_API int decrement_function(zval *op1)
op1->type = IS_LONG;
break;
}
switch(is_numeric_string(op1->value.str.val, op1->value.str.len, &lval, &dval, 0)) {
switch (is_numeric_string(op1->value.str.val, op1->value.str.len, &lval, &dval, 0)) {
case IS_LONG:
STR_FREE(op1->value.str.val);
if (lval == LONG_MIN) {
+8 -7
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
@@ -58,7 +58,7 @@ 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);
ZEND_API int instanceof_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)
{
@@ -109,7 +109,7 @@ static inline zend_bool is_numeric_string(char *str, int length, long *lval, dou
register char *ptr=str, *end=str+length;
while (ptr<end) {
switch(*ptr++) {
switch (*ptr++) {
case 'e':
case 'E':
/* scientific notation, not handled by the BC library */
@@ -238,9 +238,10 @@ ZEND_API void zend_locale_sprintf_double(zval *op ZEND_FILE_LINE_DC);
#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_OBJPROP(zval) Z_OBJ_HT((zval))->get_properties(&(zval) TSRMLS_CC)
#define Z_OBJ_HANDLER(zval, hf) \
Z_OBJ_HT((zval))->hf
#define Z_RESVAL(zval) (zval).value.lval
#define Z_LVAL_P(zval_p) Z_LVAL(*zval_p)
@@ -249,12 +250,12 @@ ZEND_API void zend_locale_sprintf_double(zval *op ZEND_FILE_LINE_DC);
#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_OBJ_HANDLER_P(zval_p, h) Z_OBJ_HANDLER(*zval_p, h)
#define Z_LVAL_PP(zval_pp) Z_LVAL(**zval_pp)
#define Z_BVAL_PP(zval_pp) Z_BVAL(**zval_pp)
@@ -262,12 +263,12 @@ ZEND_API void zend_locale_sprintf_double(zval *op ZEND_FILE_LINE_DC);
#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_OBJ_HANDLER_PP(zval_p, h) Z_OBJ_HANDLER(**zval_p, h)
#define Z_TYPE(zval) (zval).type
#define Z_TYPE_P(zval_p) Z_TYPE(*zval_p)
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
+2 -2
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
@@ -69,7 +69,7 @@ ZEND_API int zend_ts_hash_init_ex(TsHashTable *ht, uint nSize, hash_func_t pHash
ZEND_API void zend_ts_hash_destroy(TsHashTable *ht)
{
tsrm_mutex_free(ht->mx_reader);
tsrm_mutex_free(ht->mx_reader);
tsrm_mutex_free(ht->mx_writer);
zend_hash_destroy(TS_HASH(ht));
}
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
+8 -7
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
@@ -37,7 +37,7 @@ ZEND_API void _zval_dtor(zval *zvalue ZEND_FILE_LINE_DC)
if (zvalue->type==IS_LONG) {
return;
}
switch(zvalue->type & ~IS_CONSTANT_INDEX) {
switch (zvalue->type & ~IS_CONSTANT_INDEX) {
case IS_STRING:
case IS_CONSTANT:
CHECK_ZVAL_STRING_REL(zvalue);
@@ -126,11 +126,12 @@ ZEND_API int _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
case IS_OBJECT:
{
TSRMLS_FETCH();
#if 0
zvalue->value.obj = zvalue->value.obj.handlers->clone_obj(zvalue->value.obj.handle);
#else
Z_OBJ_HT_P(zvalue)->add_ref(zvalue TSRMLS_CC);
#endif
if (EG(implicit_clone)) {
zvalue->value.obj = zvalue->value.obj.handlers->clone_obj(zvalue TSRMLS_CC);
} else {
Z_OBJ_HT_P(zvalue)->add_ref(zvalue TSRMLS_CC);
}
}
break;
}
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2003 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 |
+66 -23
View File
@@ -31,9 +31,9 @@ AC_DEFUN([PHP_INIT_BUILD_SYSTEM],[
mkdir include >/dev/null 2>&1
> Makefile.objects
> Makefile.fragments
dnl We need to play tricks here to avoid matching the egrep line itself
dnl We need to play tricks here to avoid matching the grep line itself
pattern=define
egrep $pattern'.*include/php' $srcdir/configure|sed 's/.*>//'|xargs touch 2>/dev/null
grep -E $pattern'.*include/php' $srcdir/configure|sed 's/.*>//'|xargs touch 2>/dev/null
])
dnl PHP_GEN_GLOBAL_MAKEFILE
@@ -137,13 +137,6 @@ EOF
done
])
dnl
dnl Disable building CLI
dnl
AC_DEFUN([PHP_DISABLE_CLI],[
disable_cli=1
])
dnl
dnl Separator into the configure --help display.
dnl
@@ -211,13 +204,13 @@ AC_DEFUN([PHP_SETUP_OPENSSL],[
AC_MSG_CHECKING([for OpenSSL version])
AC_EGREP_CPP(yes,[
#include <openssl/opensslv.h>
#if OPENSSL_VERSION_NUMBER >= 0x0090500fL
#if OPENSSL_VERSION_NUMBER >= 0x0090600fL
yes
#endif
],[
AC_MSG_RESULT([>= 0.9.5])
AC_MSG_RESULT([>= 0.9.6])
],[
AC_MSG_ERROR([OpenSSL version 0.9.5 or greater required.])
AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.])
])
CPPFLAGS=$old_CPPFLAGS
@@ -784,7 +777,7 @@ dnl
dnl PHP_BUILD_THREAD_SAFE
dnl
AC_DEFUN([PHP_BUILD_THREAD_SAFE],[
enable_experimental_zts=yes
enable_maintainer_zts=yes
if test "$pthreads_working" != "yes"; then
AC_MSG_ERROR([ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads.])
fi
@@ -1121,7 +1114,7 @@ AC_DEFUN([PHP_CHECK_CC_OPTION],[
changequote([,])
AC_MSG_CHECKING([if compiler supports -$1 really])
ac_php_compile="${CC-cc} -$opt -o conftest $CFLAGS $CPPFLAGS conftest.$ac_ext 2>&1"
if eval $ac_php_compile 2>&1 | egrep "$opt" > /dev/null 2>&1 ; then
if eval $ac_php_compile 2>&1 | grep -E "$opt" > /dev/null 2>&1 ; then
eval php_cc_$var=no
AC_MSG_RESULT([no])
else
@@ -1462,6 +1455,56 @@ int main(void) {
fi
])
AC_DEFUN([PHP_BROKEN_GLIBC_FOPEN_APPEND],[
AC_MSG_CHECKING([for broken libc stdio])
AC_CACHE_VAL(have_broken_glibc_fopen_append,[
AC_TRY_RUN([
#include <stdio.h>
int main(int argc, char *argv[])
{
FILE *fp;
long position;
char *filename = "/tmp/phpglibccheck";
fp = fopen(filename, "w");
if (fp == NULL) {
perror("fopen");
exit(2);
}
fputs("foobar", fp);
fclose(fp);
fp = fopen(filename, "a+");
position = ftell(fp);
fclose(fp);
unlink(filename);
if (position == 0)
return 1;
return 0;
}
],
[have_broken_glibc_fopen_append=no],
[have_broken_glibc_fopen_append=yes ],
AC_TRY_COMPILE([
#include <features.h>
],[
#if !__GLIBC_PREREQ(2,2)
choke me
#endif
],
[have_broken_glibc_fopen_append=yes],
[have_broken_glibc_fopen_append=no ])
)])
if test "$have_broken_glibc_fopen_append" = "yes"; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_BROKEN_GLIBC_FOPEN_APPEND,1, [Define if your glibc borks on fopen with mode a+])
else
AC_MSG_RESULT(no)
fi
])
AC_DEFUN([PHP_FOPENCOOKIE],[
AC_CHECK_FUNC(fopencookie, [ have_glibc_fopencookie=yes ])
@@ -1487,16 +1530,16 @@ AC_DEFUN([PHP_FOPENCOOKIE],[
#include <stdio.h>
struct cookiedata {
fpos_t pos;
__off64_t pos;
};
size_t reader(void *cookie, char *buffer, size_t size)
__ssize_t reader(void *cookie, char *buffer, size_t size)
{ return size; }
size_t writer(void *cookie, const char *buffer, size_t size)
__ssize_t writer(void *cookie, const char *buffer, size_t size)
{ return size; }
int closer(void *cookie)
{ return 0; }
int seeker(void *cookie, fpos_t *position, int whence)
int seeker(void *cookie, __off64_t *position, int whence)
{ ((struct cookiedata*)cookie)->pos = *position; return 0; }
cookie_io_functions_t funcs = {reader, writer, seeker, closer};
@@ -1505,13 +1548,13 @@ main() {
struct cookiedata g = { 0 };
FILE *fp = fopencookie(&g, "r", funcs);
if (fp && fseek(fp, 69, SEEK_SET) == 0 && g.pos == 69)
if (fp && fseek(fp, 8192, SEEK_SET) == 0 && g.pos == 8192)
exit(0);
exit(1);
}
],
[ cookie_io_functions_use_fpos_t=yes ],
[ cookie_io_functions_use_off64_t=yes ],
[ ] )
else
@@ -1532,8 +1575,8 @@ main() {
if test "$have_fopen_cookie" = "yes" ; then
AC_DEFINE(HAVE_FOPENCOOKIE, 1, [ ])
AC_DEFINE_UNQUOTED(COOKIE_IO_FUNCTIONS_T, $cookie_io_functions_t, [ ])
if test "$cookie_io_functions_use_fpos_t" = "yes" ; then
AC_DEFINE(COOKIE_SEEKER_USES_FPOS_T, 1, [ ])
if test "$cookie_io_functions_use_off64_t" = "yes" ; then
AC_DEFINE(COOKIE_SEEKER_USES_OFF64_T, 1, [ ])
fi
fi
@@ -1778,7 +1821,7 @@ $debug ||
_sed=sed
# Check for GNU sed and select it if it is found.
if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
if "${_sed}" --version 2>&1 < /dev/null | grep -E '(GNU)' > /dev/null; then
ac_cv_path_sed=${_sed}
else
cat /dev/null > "$tmp/sed.in"
+4 -4
View File
@@ -16,7 +16,7 @@
# | Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id: buildcheck.sh,v 1.21 2002-10-30 11:42:22 sas Exp $
# $Id: buildcheck.sh,v 1.22 2003-01-13 10:27:50 sas Exp $
#
echo "buildconf: checking installation..."
@@ -72,8 +72,8 @@ fi
# libtool 1.4 or newer
# Prefer glibtool over libtool for Mac OS X compatibility
libtool=`which glibtool 2> /dev/null`
if test ! -f "$libtool"; then libtool=`which libtool`; fi
libtool=`./build/shtool path glibtool 2> /dev/null`
if test ! -f "$libtool"; then libtool=`./build/shtool path libtool`; fi
lt_pversion=`$libtool --version 2>/dev/null|sed -n -e 's/^[^0-9]*//' -e 1's/[- ].*//p'`
if test "$lt_pversion" = ""; then
echo "buildconf: libtool not found."
@@ -94,7 +94,7 @@ echo " to build PHP from CVS."
exit 1
fi
am_prefix=`which automake | sed -e 's#/[^/]*/[^/]*$##'`
am_prefix=`./build/shtool path automake | sed -e 's#/[^/]*/[^/]*$##'`
lt_prefix=`echo $libtool | sed -e 's#/[^/]*/[^/]*$##'`
if test "$am_prefix" != "$lt_prefix"; then
echo "WARNING: automake and libtool are installed in different"
+69 -31
View File
@@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002 Free Software Foundation, Inc.
timestamp='2002-05-29'
timestamp='2002-10-21'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -88,30 +88,40 @@ if test $# != 0; then
exit 1
fi
trap 'exit 1' 1 2 15
dummy=dummy-$$
trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
# compiler to aid in system detection is discouraged as it requires
# temporary files to be created and, as you can see below, it is a
# headache to deal with in a portable fashion.
# CC_FOR_BUILD -- compiler used by this script.
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
# use `HOST_CC' if defined, but it is deprecated.
set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
,,) echo "int dummy(){}" > $dummy.c ;
# This shell variable is my proudest work .. or something. --bje
set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ;
(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old)
|| (echo "$me: cannot create $tmpdir" >&2 && exit 1) ;
dummy=$tmpdir/dummy ;
files="$dummy.c $dummy.o $dummy.rel $dummy" ;
trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ;
case $CC_FOR_BUILD,$HOST_CC,$CC in
,,) echo "int x;" > $dummy.c ;
for c in cc gcc c89 c99 ; do
($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
if test $? = 0 ; then
if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
CC_FOR_BUILD="$c"; break ;
fi ;
done ;
rm -f $dummy.c $dummy.o $dummy.rel ;
rm -f $files ;
if test x"$CC_FOR_BUILD" = x ; then
CC_FOR_BUILD=no_compiler_found ;
fi
;;
,,*) CC_FOR_BUILD=$CC ;;
,*,*) CC_FOR_BUILD=$HOST_CC ;;
esac'
esac ;
unset files'
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 1994-08-24)
@@ -221,6 +231,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
eval $set_cc_for_build
cat <<EOF >$dummy.s
.data
\$Lformat:
@@ -246,10 +257,9 @@ main:
jsr \$26,exit
.end main
EOF
eval $set_cc_for_build
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
$CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null
if test "$?" = 0 ; then
case `./$dummy` in
case `$dummy` in
0-0)
UNAME_MACHINE="alpha"
;;
@@ -271,9 +281,12 @@ EOF
2-1307)
UNAME_MACHINE="alphaev68"
;;
3-1307)
UNAME_MACHINE="alphaev7"
;;
esac
fi
rm -f $dummy.s $dummy
rm -f $dummy.s $dummy && rmdir $tmpdir
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
exit 0 ;;
Alpha\ *:Windows_NT*:*)
@@ -314,6 +327,10 @@ EOF
NILE*:*:*:dcosx)
echo pyramid-pyramid-svr4
exit 0 ;;
DRS?6000:UNIX_SV:4.2*:7*)
case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7 && exit 0 ;;
esac ;;
sun4H:SunOS:5.*:*)
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
@@ -420,15 +437,18 @@ EOF
exit (-1);
}
EOF
$CC_FOR_BUILD $dummy.c -o $dummy \
&& ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
&& rm -f $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
$CC_FOR_BUILD -o $dummy $dummy.c \
&& $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
&& rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
rm -f $dummy.c $dummy && rmdir $tmpdir
echo mips-mips-riscos${UNAME_RELEASE}
exit 0 ;;
Motorola:PowerMAX_OS:*:*)
echo powerpc-motorola-powermax
exit 0 ;;
Motorola:*:4.3:PL8-*)
echo powerpc-harris-powermax
exit 0 ;;
Night_Hawk:*:*:PowerMAX_OS)
echo powerpc-harris-powermax
exit 0 ;;
@@ -504,8 +524,8 @@ EOF
exit(0);
}
EOF
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
rm -f $dummy.c $dummy && rmdir $tmpdir
echo rs6000-ibm-aix3.2.5
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
echo rs6000-ibm-aix3.2.4
@@ -603,9 +623,9 @@ EOF
exit (0);
}
EOF
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy`
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
rm -f $dummy.c $dummy
rm -f $dummy.c $dummy && rmdir $tmpdir
fi ;;
esac
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
@@ -641,8 +661,8 @@ EOF
exit (0);
}
EOF
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
rm -f $dummy.c $dummy && rmdir $tmpdir
echo unknown-hitachi-hiuxwe2
exit 0 ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
@@ -725,7 +745,19 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit 0 ;;
*:FreeBSD:*:*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
# Determine whether the default compiler uses glibc.
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#include <features.h>
#if __GLIBC__ >= 2
LIBC=gnu
#else
LIBC=
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
rm -f $dummy.c && rmdir $tmpdir
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
exit 0 ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
@@ -786,7 +818,7 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
rm -f $dummy.c
rm -f $dummy.c && rmdir $tmpdir
test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
;;
ppc:Linux:*:*)
@@ -849,7 +881,7 @@ EOF
;;
a.out-i386-linux)
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
exit 0 ;;
exit 0 ;;
coff-i386)
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
exit 0 ;;
@@ -882,7 +914,7 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
rm -f $dummy.c
rm -f $dummy.c && rmdir $tmpdir
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
;;
@@ -960,6 +992,9 @@ EOF
# "miniframe"
echo m68010-convergent-sysv
exit 0 ;;
mc68k:UNIX:SYSTEM5:3.51m)
echo m68k-convergent-sysv
exit 0 ;;
M68*:*:R3V[567]*:*)
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
@@ -1053,6 +1088,9 @@ EOF
SX-5:SUPER-UX:*:*)
echo sx5-nec-superux${UNAME_RELEASE}
exit 0 ;;
SX-6:SUPER-UX:*:*)
echo sx6-nec-superux${UNAME_RELEASE}
exit 0 ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit 0 ;;
@@ -1073,7 +1111,7 @@ EOF
*:QNX:*:4*)
echo i386-pc-qnx
exit 0 ;;
NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*)
NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
exit 0 ;;
*:NonStop-UX:*:*)
@@ -1245,8 +1283,8 @@ main ()
}
EOF
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
rm -f $dummy.c $dummy && rmdir $tmpdir
# Apollos put the system type in the environment.
Vendored
+69 -42
View File
@@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002 Free Software Foundation, Inc.
timestamp='2002-05-28'
timestamp='2002-09-05'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -118,7 +118,7 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
nto-qnx* | linux-gnu* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -229,24 +229,34 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
| c4x | clipper \
| clipper \
| d10v | d30v | dlx | dsp16xx \
| fr30 \
| fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k \
| m32r | m68000 | m68k | m88k | mcore \
| mips | mips16 | mips64 | mips64el | mips64orion | mips64orionel \
| mips64vr4100 | mips64vr4100el | mips64vr4300 \
| mips64vr4300el | mips64vr5000 | mips64vr5000el \
| mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \
| mipsisa32 | mipsisa64 \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
| mips64vr | mips64vrel \
| mips64orion | mips64orionel \
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
| mipsisa32 | mipsisa32el \
| mipsisa64 | mipsisa64el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| ns16k | ns32k \
| openrisc | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
| sh | sh[34] | sh[34]eb | shbe | shle | sh64 \
| sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
| strongarm \
| tahoe | thumb | tic80 | tron \
@@ -284,31 +294,42 @@ case $basic_machine in
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* \
| bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c54x-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \
| clipper-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fr30-* | fx80-* \
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* \
| m32r-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | mcore-* \
| mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
| mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \
| mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
| mips64vr-* | mips64vrel-* \
| mips64orion-* | mips64orionel-* \
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39 | mipstx39el \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
| sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* | sh64-* \
| sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
| tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
@@ -728,13 +749,13 @@ case $basic_machine in
pbb)
basic_machine=m68k-tti
;;
pc532 | pc532-*)
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
pentiumpro | p6 | 6x86 | athlon)
pentiumpro | p6 | 6x86 | athlon | athlon_*)
basic_machine=i686-pc
;;
pentiumii | pentium2)
@@ -755,22 +776,22 @@ case $basic_machine in
power) basic_machine=power-ibm
;;
ppc) basic_machine=powerpc-unknown
;;
;;
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle | ppc-le | powerpc-little)
basic_machine=powerpcle-unknown
;;
;;
ppcle-* | powerpclittle-*)
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64) basic_machine=powerpc64-unknown
;;
;;
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
basic_machine=powerpc64le-unknown
;;
;;
ppc64le-* | powerpc64little-*)
basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
@@ -801,6 +822,12 @@ case $basic_machine in
basic_machine=a29k-amd
os=-udi
;;
sb1)
basic_machine=mipsisa64sb1-unknown
;;
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
sequent)
basic_machine=i386-sequent
;;
@@ -866,7 +893,7 @@ case $basic_machine in
sun386 | sun386i | roadrunner)
basic_machine=i386-sun
;;
sv1)
sv1)
basic_machine=sv1-cray
os=-unicos
;;
@@ -886,6 +913,10 @@ case $basic_machine in
basic_machine=t90-cray
os=-unicos
;;
tic4x | c4x*)
basic_machine=tic4x-unknown
os=-coff
;;
tic54x | c54x*)
basic_machine=tic54x-unknown
os=-coff
@@ -924,8 +955,8 @@ case $basic_machine in
os=-vms
;;
vpp*|vx|vx-*)
basic_machine=f301-fujitsu
;;
basic_machine=f301-fujitsu
;;
vxworks960)
basic_machine=i960-wrs
os=-vxworks
@@ -950,7 +981,7 @@ case $basic_machine in
basic_machine=i386-pc
os=-windows32-msvcrt
;;
xps | xps100)
xps | xps100)
basic_machine=xps100-honeywell
;;
ymp)
@@ -996,7 +1027,7 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
sh3 | sh4 | sh3eb | sh4eb)
sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele)
basic_machine=sh-unknown
;;
sh64)
@@ -1005,7 +1036,7 @@ case $basic_machine in
sparc | sparcv9 | sparcv9b)
basic_machine=sparc-sun
;;
cydra)
cydra)
basic_machine=cydra-cydrome
;;
orion)
@@ -1020,10 +1051,6 @@ case $basic_machine in
pmac | pmac-mpw)
basic_machine=powerpc-apple
;;
c4x*)
basic_machine=c4x-none
os=-coff
;;
*-unknown)
# Make sure to match an already-canonicalized machine name.
;;
@@ -1155,7 +1182,7 @@ case $os in
os=-rtmk-nova
;;
-ns2 )
os=-nextstep2
os=-nextstep2
;;
-nsk*)
os=-nsk
@@ -1194,8 +1221,8 @@ case $os in
-xenix)
os=-xenix
;;
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
os=-mint
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
os=-mint
;;
-none)
;;
@@ -1232,7 +1259,7 @@ case $basic_machine in
pdp10-*)
os=-tops20
;;
pdp11-*)
pdp11-*)
os=-none
;;
*-dec | vax-*)
@@ -1325,19 +1352,19 @@ case $basic_machine in
*-next)
os=-nextstep3
;;
*-gould)
*-gould)
os=-sysv
;;
*-highlevel)
*-highlevel)
os=-bsd
;;
*-encore)
os=-bsd
;;
*-sgi)
*-sgi)
os=-irix
;;
*-siemens)
*-siemens)
os=-sysv4
;;
*-masscomp)
+41 -18
View File
@@ -41,8 +41,8 @@ done
AC_CANONICAL_HOST
AC_CONFIG_HEADER(main/php_config.h)
MAJOR_VERSION=4
MINOR_VERSION=3
MAJOR_VERSION=5
MINOR_VERSION=0
RELEASE_VERSION=0
EXTRA_VERSION="-dev"
VERSION="$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION"
@@ -159,7 +159,7 @@ if test "$ac_cv_c_const" = "yes" ; then
fi
AC_MSG_CHECKING([flex version])
set `$LEX -V | grep 'version' | cut -d ' ' -f 3 | sed -e 's/\./ /g' | sed -e 's/[^0-9 ]//g'`
set `echo "" | $LEX -V -v --version 2>/dev/null | grep 'version' | cut -d ' ' -f 3 | sed -e 's/\./ /g' | sed -e 's/[^0-9 ]//g'`
if test "${1}" != "2" -o "${2}" != "5" -o "${3}" -lt "4"; then
AC_MSG_WARN(You will need flex 2.5.4 or later if you want to regenerate Zend/PHP lexical parsers.)
fi
@@ -237,11 +237,16 @@ dnl Show which main SAPI was selected
AC_MSG_CHECKING([for chosen SAPI module])
AC_MSG_RESULT([$PHP_SAPI])
if test "$enable_experimental_zts" = "yes"; then
if test "$enable_maintainer_zts" = "yes"; then
PTHREADS_ASSIGN_VARS
PTHREADS_FLAGS
fi
if test "$PHP_ENABLE_FASTCGI" = "yes"; then
PHP_CONFIGURE_PART(Running FastCGI checks)
sinclude(sapi/cgi/libfcgi/acinclude.m4)
sinclude(sapi/cgi/libfcgi/libfcgi.m4)
fi
divert(3)
@@ -376,7 +381,8 @@ sys/ipc.h \
#endif
])
PHP_FOPENCOOKIE
PHP_BROKEN_GLIBC_FOPEN_APPEND
dnl Checks for typedefs, structures, and compiler characteristics.
dnl -------------------------------------------------------------------------
@@ -439,6 +445,7 @@ dnl -------------------------------------------------------------------------
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(
alphasort \
asctime_r \
chroot \
ctime_r \
@@ -446,6 +453,7 @@ cuserid \
crypt \
flock \
ftok \
funopen \
gai_strerror \
gcvt \
getlogin \
@@ -473,6 +481,7 @@ random \
rand_r \
regcomp \
res_search \
scandir \
setitimer \
setlocale \
localeconv \
@@ -607,7 +616,7 @@ PHP_ARG_WITH(pear, [whether to install PEAR, and where],
[ --with-pear=DIR Install PEAR in DIR (default PREFIX/lib/php)
--without-pear Do not install PEAR], DEFAULT, no)
if test "$PHP_PEAR" != "no" && test "$disable_cli" != "1"; then
if test "$PHP_PEAR" != "no" && test "$PHP_SAPI_CLI" != "no"; then
install_pear="install-pear install-build install-headers install-programs"
PEAR_INSTALLDIR=$PHP_PEAR
fi
@@ -721,7 +730,7 @@ dnl
dnl OpenSSL configure
dnl
PHP_ARG_WITH(openssl,for OpenSSL support,
[ --with-openssl[=DIR] Include OpenSSL support (requires OpenSSL >= 0.9.5) ])
[ --with-openssl[=DIR] Include OpenSSL support (requires OpenSSL >= 0.9.6) ])
if test "$PHP_OPENSSL" != "no"; then
ext_openssl_shared=$ext_shared
@@ -829,7 +838,7 @@ TSRM_LIB='TSRM/libtsrm.la'
TSRM_DIR=TSRM
CPPFLAGS="$CPPFLAGS -I\$(top_builddir)/TSRM"
if test "$ZEND_EXPERIMENTAL_ZTS" = "yes"; then
if test "$ZEND_MAINTAINER_ZTS" = "yes"; then
AC_DEFINE(ZTS,1,[ ])
PHP_THREAD_SAFETY=yes
else
@@ -881,7 +890,7 @@ datadir=`eval echo $datadir`
dnl Build extension directory path
ZEND_MODULE_API_NO=`egrep '#define ZEND_MODULE_API_NO ' $srcdir/Zend/zend_modules.h|sed 's/#define ZEND_MODULE_API_NO //'`
ZEND_MODULE_API_NO=`grep -E '#define ZEND_MODULE_API_NO ' $srcdir/Zend/zend_modules.h|sed 's/#define ZEND_MODULE_API_NO //'`
if test -z "$EXTENSION_DIR"; then
extbasedir=$ZEND_MODULE_API_NO
@@ -891,7 +900,7 @@ if test -z "$EXTENSION_DIR"; then
else
part1=no-debug
fi
if test "$enable_experimental_zts" = "yes"; then
if test "$enable_maintainer_zts" = "yes"; then
part2=zts
else
part2=non-zts
@@ -899,7 +908,7 @@ if test -z "$EXTENSION_DIR"; then
extbasedir=$part1-$part2-$extbasedir
EXTENSION_DIR=$libdir/extensions/$extbasedir
else
if test "$enable_experimental_zts" = "yes"; then
if test "$enable_maintainer_zts" = "yes"; then
extbasedir=$extbasedir-zts
fi
@@ -957,8 +966,8 @@ AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME",[uname -a output])
PHP_OS=`uname | xargs`
AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS",[uname output])
if test "$disable_cli" != "1"; then
PHP_CLI_TARGET=sapi/cli/php
if test "$PHP_SAPI_CLI" != "no"; then
PHP_CLI_TARGET="\$(SAPI_CLI_PATH)"
PHP_INSTALL_CLI_TARGET="install-cli"
PHP_ADD_SOURCES(sapi/cli, php_cli.c getopt.c,, cli)
fi
@@ -1002,7 +1011,7 @@ PHP_SUBST(CXX_PHP_COMPILE)
PHP_SUBST_OLD(DEBUG_CFLAGS)
PHP_SUBST(DEFS)
PHP_SUBST_OLD(EXTENSION_DIR)
PHP_SUBST(EXTRA_LDFLAGS)
PHP_SUBST_OLD(EXTRA_LDFLAGS)
PHP_SUBST_OLD(EXTRA_LIBS)
PHP_SUBST_OLD(ZEND_EXTRA_LIBS)
PHP_SUBST_OLD(INCLUDES)
@@ -1075,14 +1084,18 @@ INLINE_CFLAGS="$INLINE_CFLAGS $standard_libtool_flag"
CXXFLAGS="$CXXFLAGS $standard_libtool_flag"
all_targets='$(OVERALL_TARGET) $(PHP_MODULES) $(PHP_CLI_TARGET)'
install_targets="install-sapi install-modules $PHP_INSTALL_CLI_TARGET $install_pear"
install_targets="install-sapi install-modules $install_pear"
if test "$PHP_SAPI" != "cgi"; then
install_targets="$PHP_INSTALL_CLI_TARGET $install_targets"
fi
PHP_SUBST(all_targets)
PHP_SUBST(install_targets)
PHP_ADD_SOURCES(TSRM, TSRM.c tsrm_strtok_r.c tsrm_virtual_cwd.c)
PHP_ADD_SOURCES(main, main.c snprintf.c spprintf.c php_sprintf.c \
safe_mode.c fopen_wrappers.c alloca.c \
safe_mode.c fopen_wrappers.c alloca.c php_scandir.c \
php_ini.c SAPI.c rfc1867.c php_content_types.c strlcpy.c \
strlcat.c mergesort.c reentrancy.c php_variables.c php_ticks.c \
streams.c network.c php_open_temporary_file.c php_logos.c \
@@ -1235,6 +1248,17 @@ cat <<X
X
fi
if test "$PHP_DB" != "no"; then
cat <<X
+--------------------------------------------------------------------+
| *** WARNING *** |
| |
| You chose to compile PHP with DB extension. This extension is |
| deprecated and does not support databse locking correctly. Please |
| use DBA extension which is a fully operational superset. |
X
fi
if test "$MYSQL_MODULE_TYPE" = "builtin" && test "$PHP_SAPI" != "cgi" && test "$PHP_SAPI" != "cli" && test "$php_multiple_shlib_versions_ok" != "yes"; then
cat <<X
+--------------------------------------------------------------------+
@@ -1275,7 +1299,7 @@ X
fi
fi
cat<<X
cat <<X
+--------------------------------------------------------------------+
| License: |
| This software is subject to the PHP License, available in this |
@@ -1295,7 +1319,6 @@ cat<<X
| avoid using it if possible. |
+--------------------------------------------------------------------+
Thank you for using PHP.
X
Loaded 100 of 1120 files, more files were not shown because too many files have changed in this diff. Show more