Compare commits

..
1269 Commits
Author SHA1 Message Date
SVN Migration 0778c40868 This commit was manufactured by cvs2svn to create tag 'php_5_1_3'. 2006-04-27 11:39:33 +00:00
Ilia Alshanetsky 3566fe4afd Remove soap cache news 2006-04-26 14:31:33 +00:00
Edin Kadribasic fc4614d1d2 BFN 2006-04-26 14:23:51 +00:00
Ilia Alshanetsky ca2efe468d Go with 5.1.3 2006-04-26 14:08:26 +00:00
Ilia Alshanetsky 7775550245 Prepare the news file for release 2006-04-26 13:56:57 +00:00
Dmitry Stogov bbda630ed9 Fixed bug #37205 (Serving binary content/images fails with "comm with server aborted" FastCGI err) 2006-04-26 11:08:10 +00:00
Edin Kadribasic af11e1d592 Correctly import external data (#33292) 2006-04-26 09:31:23 +00:00
Antony Dovgal d18cd00657 fix tests 2006-04-25 22:09:46 +00:00
Antony Dovgal 0a38d6bd8c remove nonexistent tag 2006-04-25 12:49:59 +00:00
Antony Dovgal 896a5216d7 fix possible substr_compare() crash
add new tests
2006-04-25 12:48:42 +00:00
Michael Wallner b1de3647cf -improve last entry 2006-04-25 08:43:29 +00:00
Antony Dovgal 90b3dadc4e fix #37191 (chmod takes off sticky bit when safe_mode is On) 2006-04-25 08:41:02 +00:00
Michael Wallner 1c02dff74a - Fixed bug #37192 (cc fails on hash_adler.c:32) 2006-04-25 08:34:25 +00:00
Dmitry Stogov 5b973c86ee iFixed compilation on Solaris 2006-04-24 09:53:57 +00:00
Andrei Zmievski c86e96db11 Typo. 2006-04-23 19:56:53 +00:00
Ilia Alshanetsky 033c07972f Fixed typos 2006-04-23 16:40:05 +00:00
Ilia Alshanetsky a1bbdf831c Fixed bug #37162 (wddx does not build as a shared extension).
#Patch By: jdolecek at NetBSD dot org
2006-04-23 16:02:05 +00:00
Antony Dovgal b81e20f8e8 bah.. no UEXPECT in this branch.. 2006-04-22 23:47:25 +00:00
Antony Dovgal 658b22ad6e add test for #37158 2006-04-22 23:46:42 +00:00
Antony Dovgal 2765fdfa46 BFN 2006-04-22 19:16:36 +00:00
Antony Dovgal ea53739d30 MFB: don't segfault if an exception has been thrown from the fetch handler 2006-04-22 19:10:53 +00:00
Wez Furlong 8663f1644d fix for #37158 2006-04-22 17:17:40 +00:00
Wez Furlong 64de59d9a7 avoid unterminated loop when closing the statement. 2006-04-22 16:35:18 +00:00
Ilia Alshanetsky ee103a7c39 Back to dev 2006-04-20 23:09:20 +00:00
Antony Dovgal 32872b157e there is no %v in 5_1 2006-04-20 22:49:20 +00:00
Ilia Alshanetsky 50e1a51e5c Prepare for RC3 2006-04-20 21:11:29 +00:00
Michael Wallner f7a6327728 - Fix reading stream filters never notified about EOF 2006-04-20 17:43:18 +00:00
Dmitry Stogov bdef85af21 Fixed bug #37138 (__autoload tries to load callback'ed self and parent) 2006-04-20 07:30:38 +00:00
Ilia Alshanetsky 09dec62672 Fixed tokenizer tests 2006-04-20 01:06:58 +00:00
Nuno Lopes 227ca46fb7 fix build with newer libtidy versions on windows
# first commit on php-src. whatch out :)
2006-04-19 21:47:20 +00:00
John Coggeshall 974dc0f5b4 Fixing static builds on windoze machines for our current lib version 2006-04-19 20:57:30 +00:00
Dmitry Stogov 68906dbe62 Cleaned up Andrei's patch for caching WSDL in process memory, added TTL and LIMIT for memory cache.
Memory cache is disblead by fefault because it is experemental and isn't tested enough. It can be enabled whit configuartion directive "soap.wsdl_cache = WSDL_CACHE_MEMORY" or "soap.wsdl_cache = WSDL_CACHE_BOTH" or derectly in SoapClent/SoapServer constructor: $ws = new SoapClient($wsdl, array("cache_wsdl"=>WSDL_CACHE_BOTH))
Disk and memory caches use the same TTL value - "soap.wsdl_cache_ttl".
Configuration directive "soap.wsdl_cache_limit" restricts the number of cached wsdl files in memory. Adding new files into full memory cache will delete oldest files from it.
Note that, each PHP process or thread uses it's own memory cache.
2006-04-19 10:48:54 +00:00
Antony Dovgal 9ea8d8dbf6 MFH: fix typo 2006-04-19 08:43:29 +00:00
Ilia Alshanetsky 7315288591 Restore dev so win32 snaps can build 2006-04-18 23:47:10 +00:00
Ilia Alshanetsky 1c0d8a536a Fixed bug #29476 (sqlite_fetch_column_types() locks the database forever). 2006-04-18 14:30:16 +00:00
Dmitry Stogov 349bcd7443 Fixed bug #37083 (Frequent crashs in SOAP extension with new WSDL caching code in multithread WS). (Andrei, Dmitry) 2006-04-18 13:07:59 +00:00
Dmitry Stogov d19c105819 Fixed SUN_LEN calculation 2006-04-18 06:59:19 +00:00
Dmitry Stogov 73e4913cca Fixed memory leaks 2006-04-18 06:58:43 +00:00
Ilia Alshanetsky 101d925baa Commit the actual fix 2006-04-18 00:31:45 +00:00
Ilia Alshanetsky 76419e13aa Fixed Bug #36872 (session_destroy() fails after call to
+  session_regenerate_id(true)).
2006-04-17 23:28:02 +00:00
foobar 5fd0994495 BFN 2006-04-17 22:14:32 +00:00
foobar 92da3229d4 MFH: Fixed bug #37103 (libmbfl headers not installed) 2006-04-17 22:13:56 +00:00
Sara Golemon 3ef88178e8 MFH(r-1.55) Fix 'soft line break' handling in convert.quoted-printable-decode 2006-04-17 19:26:04 +00:00
Andrei Zmievski cfaf6406d7 Some encodings were assumed to be default and, thus, were not made
persistent.
2006-04-17 16:08:08 +00:00
Dmitry Stogov 7330c32329 Fixed several bugs in new "caching WSDL in memory" code
Re-enabled disk cache
2006-04-17 13:16:02 +00:00
Ilia Alshanetsky 74672b86b4 Fixed a typo in the previous patch.
# Thanks Tony
2006-04-16 17:40:33 +00:00
Ilia Alshanetsky 79d8f014da Fixed bug #37045 (Fixed check for special chars for http redirects). 2006-04-16 16:54:49 +00:00
Antony Dovgal 29254a477d fix #37062 (compile failure on ARM architecture)
if ARM is big endian - don't define IEEE_LITTLE_ENDIAN
2006-04-15 12:54:14 +00:00
Antony Dovgal f233299f96 make it consistent with the other ones =) 2006-04-14 21:06:11 +00:00
Antony Dovgal 522a5e128f ok, let's make this test to work on all systems
currently it fails at least on Linux PPC and Solaris, probably because of different strncmp/strncasecmp implementations.
2006-04-14 20:30:11 +00:00
Marcus Boerger 011266f7e1 - MFH Fix properties access to children() result 2006-04-14 15:19:45 +00:00
Antony Dovgal 7c42ddb8e0 fix #37077 (stream_socket_server() leaks when the port is not allowed) 2006-04-14 10:00:55 +00:00
Dmitry Stogov 874a22101f Fixed calling header functions through __call() 2006-04-14 09:11:29 +00:00
Dmitry Stogov 67abcb58c3 Fixed bug #36513 (comment will be outputed in last line) 2006-04-13 13:48:28 +00:00
Antony Dovgal af429910ef AIX #define's accept as naccept
add a workaround
2006-04-13 13:21:43 +00:00
Antony Dovgal 65fcbcbdc0 fix bug #37061 (curl_exec() doesn't zero-terminate binary strings) - we get the data length from cURL, so it's binary safe.
fix leak appearing when re-using curl handle
2006-04-13 11:26:10 +00:00
Dmitry Stogov f897cff480 Fixed bug #37054 (SoapClient Error Fetching http headers) 2006-04-13 08:18:36 +00:00
Dmitry Stogov 851801a795 Fixed test 2006-04-13 06:04:28 +00:00
Antony Dovgal 46e0ede425 fix test title 2006-04-12 22:20:52 +00:00
Johannes Schlüter 9047558fe3 - MFH: Fix bug #37060 (Type of retval of Countable::count() is not checked) 2006-04-12 19:30:52 +00:00
Antony Dovgal 5751903b1b fix #37059 (oci_bind_by_name() doesn't support RAW and LONG RAW fields)
add tests
2006-04-12 19:21:35 +00:00
Antony Dovgal 2d2f1cf0c6 oops.. I didn't want to commit this.. 2006-04-12 18:01:35 +00:00
Antony Dovgal 2e461783d0 correct fix for bug #37055 2006-04-12 17:59:32 +00:00
Antony Dovgal a6e4f11cb1 add test 2006-04-12 15:18:38 +00:00
Antony Dovgal 195271dd23 fix #37057 (xmlrpc_decode() may produce arrays with numeric strings which are unaccessible) 2006-04-12 15:13:57 +00:00
Antony Dovgal bac1fda336 fix #37055 (incorrect reference counting for persistent OCI8 connections) 2006-04-12 13:37:51 +00:00
Antony Dovgal d23c1d763b fix #37053 (html_errors with internal classes produces wrong links) 2006-04-12 12:49:39 +00:00
Dmitry Stogov f23d01ad4d Fixed bug #37046 (foreach breaks static scope) 2006-04-12 11:37:50 +00:00
Dmitry Stogov 6e762e648c Fixed bug #37002 (Have to quote literals in INI when concatenating with vars) 2006-04-12 09:51:54 +00:00
Andrei Zmievski 6a4faee367 MFH 2006-04-11 21:33:46 +00:00
Antony Dovgal 47cb31b7df add default timezone to the tests 2006-04-11 19:34:14 +00:00
Derick Rethans 4043f77e36 - MFH: Fixed bug #37017 (strtotime fails before 13:00:00 with some time zones
identifiers). (Derick)
- MFH: Fixed bug #36988 (mktime freezes on long numbers). (Derick)
- MFH: Implemented better error and warning handling that is also used for the
  date_parse() function.
- MFH: Fixed problems with "T" in front of a time string was seen as a time
  zone string.
- MFH: Fixed a problem were 5 and 6 character timezone abbreviations where not
  correctly parsed.

Experimental support (All MFH):
- Added the date_parse() function that returns a parsed date/time string
  including warnings and errors.
- Added the timezone_name_from_abbr() function that exposes the guessing
  mechanism that tries to find a timezone identifier from a timezone
  abbreviation and GMT offset.
2006-04-11 18:03:52 +00:00
Ilia Alshanetsky 4bab5226b2 Fixed test 2006-04-10 23:48:10 +00:00
Marcus Boerger 45b64e7a99 - Coverity issue 59 2006-04-10 23:23:09 +00:00
Marcus Boerger 6ea747d8e4 - MFH Iterators from overloaded objects are allowed to not have keys... 2006-04-10 23:16:29 +00:00
Marcus Boerger 6c89fd2d63 - MFH Coverity fix 49 2006-04-10 22:49:29 +00:00
Marcus Boerger 8bbf3a00dc - MFH Fix potenbtioal SEGV 2006-04-10 19:51:55 +00:00
Marcus Boerger 3438469b84 - MFH Fix condition 2006-04-10 18:23:24 +00:00
Dmitry Stogov 07d7750487 Fixed bug #36908 (wsdl default value overrides value in soap request). 2006-04-10 13:29:48 +00:00
Dmitry Stogov fabd954200 Fixed test 2006-04-10 12:50:02 +00:00
Dmitry Stogov 64e7be9b5a Fixed possible crash in interactive mode 2006-04-10 12:26:53 +00:00
foobar 12346d64eb MFH: fix typo 2006-04-10 12:17:36 +00:00
foobar 276171f871 MFH: - Determine the shared/link lib suffixes in one macro. 2006-04-10 12:16:17 +00:00
foobar 22a8c3113b MFH: - Fixed bug #36909 (ld: Undefined symbols: _lchown) 2006-04-10 11:56:18 +00:00
foobar 8cd558757f MFH: - Silence some PCRE compile warnings 2006-04-10 11:55:14 +00:00
Dmitry Stogov c261351a97 ZTS fix 2006-04-10 10:11:06 +00:00
foobar 3110d15a00 update credits 2006-04-10 09:49:18 +00:00
foobar 5241090585 Fix NEWS 2006-04-10 09:41:45 +00:00
Andrei Zmievski 06ef71fe3d Speed up SoapClient/SoapServer constructors by caching WSDL structures
in memory. All WSDL files will be cached, unless turned off via an
option to the constructor.
2006-04-09 23:35:51 +00:00
Edin Kadribasic 1e33c4cc85 Fixed bug #36935 2006-04-09 23:14:47 +00:00
Ilia Alshanetsky 8afc859b55 *** empty log message *** 2006-04-09 17:57:27 +00:00
Wez Furlong f83cfb77bf be aware of PDO_ATTR_EMULATE_PREPARES 2006-04-09 08:17:50 +00:00
Wez Furlong b9f85f37cc Fixed Bug #36602: persistent connections don't work with MySQL 5.0.3+.
Fixed PECL Bug #6262; correctly fallback to emulated statements
when the server version is too old.

Also include code to default to using emulated prepared statements, as these
can take advantage of the query cache.  Since it's a bit late in the release
process to spring this on the masses, the default has not been changed.  The
code is included so that it doesn't get lost.
2006-04-09 08:11:31 +00:00
Wez Furlong 687e6ffc58 Add "ATTR_EMULATE_PREPARES" general attribute to replace the custom
attributes employed by mysql and postgres drivers.
No functional change.
2006-04-09 08:05:01 +00:00
Wez Furlong bb5f3aa012 This completes the fix for PECL #5827; we need to gobble up result sets in the
stmt dtor too.
2006-04-09 06:49:07 +00:00
Wez Furlong 0f4137fbd9 fix for PECL Bug #5827.
We're responsible for gobbling up supplemental result sets in closeCursor()
(which is what PDO does for us if we didn't implement our own closer routine).
2006-04-09 06:41:42 +00:00
Andrei Zmievski 9e5655387a MFH 2006-04-08 17:53:11 +00:00
Antony Dovgal e8270edf9d fix memory corruptions and leaks when cloning ArrayObjects and ArrayIterators 2006-04-07 22:53:23 +00:00
Ilia Alshanetsky 5151efc2aa RC3 2006-04-07 14:21:13 +00:00
Pierre Joye 3511649498 - revert last commit, something else went wrong 2006-04-07 14:04:36 +00:00
Dmitry Stogov e9d452b9a9 Optimization 2006-04-07 13:57:27 +00:00
Dmitry Stogov 79b3d79a95 CGI anf FastCGI assume $_SERVER and $_ENV have the same values,
so we don't need construct the same arrays twich and may just copy it
2006-04-07 13:45:23 +00:00
Pierre Joye 670ed5d93f - fix leak when an error occured in socket_read, free tmpbuf 2006-04-07 13:33:55 +00:00
Dmitry Stogov 8c40d605e4 Removed unnecessary copying 2006-04-07 12:39:43 +00:00
Dmitry Stogov ead7652457 We don't need setup the same time-out two times. 2006-04-07 11:44:03 +00:00
Dmitry Stogov 6624682dff MFH:
- Allowed storing NULL pointers in HashTable
- Optimized zend_hash_reverse_apply()
2006-04-07 10:06:21 +00:00
Ilia Alshanetsky 8625b42162 Adjusted credits file so that it appears properly on phpinfo() 2006-04-07 03:41:06 +00:00
Andrei Zmievski 4033bfbda0 I guess we only need this on HEAD. 2006-04-06 21:35:27 +00:00
Andrei Zmievski 3d7abc2931 *** empty log message *** 2006-04-06 21:11:12 +00:00
Andrei Zmievski d288f66c7c Fix a bug that would not fill in the fifth argument to preg_replace()
properly, if the variable was not declared previously.
2006-04-06 21:10:45 +00:00
Antony Dovgal ad7768ee63 fix #36981 (SplFileObject->fgets() ignores max_length) 2006-04-06 19:01:56 +00:00
Ilia Alshanetsky 8f7319a49f Fixed safe_mode check for source argument of the copy() function. 2006-04-06 02:39:55 +00:00
Antony Dovgal 40e25b5ad7 MFH: workaround for problem on Solaris: shell tries to parse "for i in ;" and fails 2006-04-05 20:22:21 +00:00
Antony Dovgal 52296072e0 add new tests 2006-04-05 14:09:01 +00:00
Antony Dovgal 783dd9f0ff BFN 2006-04-05 14:08:18 +00:00
Antony Dovgal 7522fb7272 add missing defines to .w32 2006-04-05 14:07:40 +00:00
Antony Dovgal 569ce842f1 fix #36934 (OCILob->read() doesn't move internal pointer when reading 0's) 2006-04-05 14:06:00 +00:00
Antony Dovgal c0592d17e9 add test 2006-04-05 12:29:21 +00:00
Georg Richter 793d0ab719 fixed bigint conversion errors (windows) 2006-04-05 12:17:33 +00:00
Georg Richter 0944a47107 fixed bigint conversion on windows platforms 2006-04-05 12:17:08 +00:00
Antony Dovgal e25a1dccac fix #36944 (strncmp & strncasecmp do not return false on negative string length) 2006-04-05 11:36:13 +00:00
Ilia Alshanetsky f0cf877a81 Fixed bug #36957 (serialize() does not handle recursion). 2006-04-05 02:28:06 +00:00
Marcus Boerger c58e1fa5be - MFH
. Fixed bug #36941 (ArrayIterator does not clone itself)
  . Fixed SEGV when ArrayObject/Iterator use reference to self
  . Added tests
2006-04-04 19:53:21 +00:00
Frank M. Kromann 5ccfa591b7 Fix #33694 invalid sql or timeouts makes it impossible to reuse persistent connections 2006-04-04 18:49:12 +00:00
Antony Dovgal 0f510a6a95 #ifdef new functions and use their bodies to make PECL extensions compile with PHP < 5.1.3
(as was agreed with Ilia)
2006-04-03 14:59:30 +00:00
Ilia Alshanetsky 3edb5a8b6d Fixed an unlikely, but possible memory leak. 2006-04-03 13:46:11 +00:00
Antony Dovgal bace0def1e fix spelling in error messages:
greater/less thEn -> greater/less thAn
2006-04-03 09:14:33 +00:00
Georg Richter b97b088800 fixed stmt property container and required status for error properties 2006-04-03 05:48:50 +00:00
Ilia Alshanetsky 46ba651680 MFH:
Removed extra space in the Content-Type header for logos
Simplified stderr error reporting in apache sapi.
2006-04-02 17:58:17 +00:00
Georg Richter f8e6ffee30 Added additional information for compiled header files. 2006-04-02 09:40:19 +00:00
Antony Dovgal 9a59df13cc fix segfault when assigning value by ref and add test
(I consider it's wrong that we can't do it, but we shouldn't segfault anyway)
2006-04-01 19:13:04 +00:00
Antony Dovgal 8ccdceb4db fix compile failure with old GCC (see bug #36931) 2006-03-31 11:11:12 +00:00
Marcus Boerger ea9487249b - Make readable 2006-03-30 21:57:28 +00:00
Marcus Boerger 193ae05edd - MFH Add tests 2006-03-30 21:47:21 +00:00
Antony Dovgal 0fab5aacce fix compilation on AIX 2006-03-30 21:39:01 +00:00
Antony Dovgal 7fbb54f55c nuke compile warning 2006-03-30 21:10:23 +00:00
Antony Dovgal b6c9363f73 fix tests 2006-03-30 20:43:39 +00:00
Antony Dovgal 14aef92b2f fix build: there is no TSRMLS_CC in this function 2006-03-30 19:58:18 +00:00
Ilia Alshanetsky 7385433f34 Back to dev 2006-03-30 19:40:16 +00:00
Ilia Alshanetsky 0e07f0b117 Go with RC2 2006-03-30 19:19:20 +00:00
Ilia Alshanetsky 4aece8077c Fixed XSS inside phpinfo() with long inputs. 2006-03-30 19:16:12 +00:00
Marcus Boerger 867f89e575 - MFH Return NULL instead of '' if node does not exist 2006-03-30 17:37:50 +00:00
Antony Dovgal 62ce6717ad fix #36922 (missing MYSQLI_REPORT_STRICT constant in userspace) 2006-03-30 11:21:51 +00:00
Antony Dovgal ad746130ad fix typo 2006-03-29 16:29:53 +00:00
Antony Dovgal 59b8592c8c fix bug #36898 (__set() leaks in classes extending internal ones)
Added:
ZEND_API void zend_object_std_init(zend_object *object, zend_class_entry *ce TSRMLS_DC)
ZEND_API void zend_object_std_dtor(zend_object *object TSRMLS_DC)

to initialize and destroy zend_object structs
2006-03-29 14:28:43 +00:00
Dmitry Stogov 697c652001 Support for zend-myltibyte 2006-03-29 10:39:20 +00:00
Antony Dovgal eab2f690fd fix skip condition 2006-03-28 23:15:40 +00:00
Antony Dovgal 1fa58ec003 initialize bucket #0 with nulls (normally it shouldn't be used at all, but if it is - we don't want any memory issues, do we?) 2006-03-28 21:58:01 +00:00
Antony Dovgal 08e6fded56 prevent possible NULL dereference 2006-03-28 20:19:44 +00:00
Antony Dovgal cfbcb43d63 fix #36897 (debug_print_backtrace() doesn't return void but array(0) {}) 2006-03-28 19:43:21 +00:00
Wez Furlong 6387d83a05 add a test case for bug 35671 2006-03-28 16:47:35 +00:00
Ilia Alshanetsky 77acc692fd Fixed bug #36886 (User filters can leak buckets in some situations). 2006-03-28 16:01:04 +00:00
Antony Dovgal ea22696fb9 fix tests 2006-03-28 09:12:45 +00:00
Antony Dovgal 6dc42ef117 fix #36851 (Documentation and code discrepancies for NULL data) 2006-03-28 09:12:18 +00:00
Yasuo Ohgaki cdbe8b4fd8 reenable pg_execute E_WARNING 2006-03-28 00:28:02 +00:00
Ilia Alshanetsky 4ca3df56d3 Check 2nd parameter of tempnam() against path components. 2006-03-27 23:40:41 +00:00
Antony Dovgal a93bd9d493 fix #36878 (error messages are printed even though an exception has been thrown) 2006-03-27 22:07:38 +00:00
Wez Furlong c5df14364b Fix for #36342; ODBC won't let you bind variables by buffer after "long"
columns.

We simply add a flag that indicates if we've seen any long columns and will
continue to bind the columns the slow way.

While we're at it, increase the maximum length of the column names that we can
handle.
2006-03-27 21:04:12 +00:00
Wez Furlong fb7d5bd780 The fix for #35332 caused #35671 (and thus PECL #6504).
Partially back out that fix and introduce an extra optional step for drivers to
canonicalize the "name" that is used for registering parameters.
2006-03-27 20:51:01 +00:00
Antony Dovgal 2030a7a2ed fix #36869 (memory leak in output buffering when using chunked output) 2006-03-27 08:26:10 +00:00
Dmitry Stogov cde55c9223 Fixed meory leak in case of unknown pragma 2006-03-27 08:09:18 +00:00
Andrei Zmievski 0dded18b33 On Mac OSX, our extensions are actually "bundles" and should not have
.dylib extension. Read this:

http://www.sm.luth.se/~alapaa/file_fetch/unixcdbookshelf/mac/ch05_03.htm
2006-03-27 04:59:36 +00:00
Yasuo Ohgaki 82376269fd remove pg_execute() E_WARNING error when query plan is not defined 2006-03-27 02:59:55 +00:00
Andrey Hristov 0b02327267 kill the left unused variable 2006-03-26 21:10:13 +00:00
Andrey Hristov dfd5b4fbf4 remove unnecessary memcpy, cast directly 2006-03-26 21:08:41 +00:00
Ilia Alshanetsky a33d64e7b6 Fixed bug #36857 (Added support for partial content fetching to the HTTP
streams wrapper).
2006-03-26 17:12:05 +00:00
Marcus Boerger a824bcf41d - MFH: Make IteratorIterator base of most SPL iterators 2006-03-26 02:25:03 +00:00
Marcus Boerger 7b70ca475f - Fix docu 2006-03-26 02:24:33 +00:00
Seiji Masugata bf4ae10c36 fixed compiler warning. 2006-03-26 02:19:50 +00:00
Antony Dovgal d085b37f66 fix #36859 (DOMElement crashes when calling __construct when clone'ing) 2006-03-26 00:23:25 +00:00
Georg Richter 65d704cb7c fix and testcase for bug #36745 2006-03-24 12:10:39 +00:00
Antony Dovgal bf3a7e12e1 add new tests 2006-03-24 12:08:53 +00:00
Georg Richter f8183e2e97 fixed minor problems (thx to tony) 2006-03-24 10:58:52 +00:00
Georg Richter b3a437fcc4 Fix for bug #36802 (server crashes with invalid/not opened connections)
Added status to mysqli_resource:
		MYSQLI_STATUS_UNKNOWN
		MYSQLI_STATUS_CLEARED (for future use)
		MYSQLI_STATUS_INITIALIZED (after mysqli_init and mysqli_stmt_init)
		MYSQLI_STATUS_VALID (for valid objects)
	removed valid flag
	changed MYSQLI_FETCH_RESOURCE
		added last parameter __check which specifies the status
2006-03-24 09:32:24 +00:00
Dmitry Stogov 9e26f6c213 Fixed SoapFault::getMessage() 2006-03-24 08:45:54 +00:00
Marcus Boerger ed43fd9b3b - My eyes don't hurt anymore 2006-03-23 21:28:06 +00:00
Marcus Boerger fe1c2cfc0f - MFH
. spl_autoload_register() return bool to denote success/failure
  . spl_autoload_unregister() acept any callable
2006-03-23 19:55:16 +00:00
Antony Dovgal 1ad4dd8795 return FALSE if driver doesn't support quoting (this is what docu says)
also fixed PECL bug #6365
2006-03-23 19:01:46 +00:00
Ilia Alshanetsky 3b1cb0e500 Added myself to PDO and PDO_MySQL credits
Added Wez to PDO_MySQL credits
Added Tony to Q&A team credits
Regenerated the credits file
2006-03-23 18:36:47 +00:00
Antony Dovgal 5f80bcaf26 add missing skipif sections 2006-03-23 15:03:27 +00:00
Antony Dovgal e40df39518 fix typos 2006-03-23 14:56:12 +00:00
Marcus Boerger 041e7470b1 - Initialized callable_name if present 2006-03-23 13:14:55 +00:00
Marcus Boerger 1440bb5c7b - MFH Add new test 2006-03-23 12:21:40 +00:00
Marcus Boerger 4b4d61952f - MFH: Add new test 2006-03-23 11:57:34 +00:00
Marcus Boerger 660956b514 - Add missing bug title and synch with other tests 2006-03-23 11:48:59 +00:00
Dmitry Stogov 87ae2460d1 Fixed possible memory corruption 2006-03-23 11:42:32 +00:00
Marcus Boerger dbe881d9c2 - Fix build 2006-03-23 10:44:39 +00:00
Dmitry Stogov cb3a53db83 Cleanup 2006-03-23 10:19:30 +00:00
Dmitry Stogov 0c1b4f45eb Allowed '-b' with UNIX sockets:
-b <hostname>:<port_number>
  -b <port_number>
  -b <unix_socket_path>
2006-03-23 10:15:01 +00:00
Pierre Joye c4db88563f - Fixed fetching of string value bigger than 128bytes when no options
are used
2006-03-23 01:24:36 +00:00
Antony Dovgal 1ce8546cd1 fix leak 2006-03-22 23:12:03 +00:00
Antony Dovgal 09fcf3162c add test 2006-03-22 23:10:59 +00:00
Antony Dovgal f7ce1d6260 prevent segfault when exception is thrown from Countable::count() 2006-03-22 22:05:51 +00:00
Antony Dovgal 32f611097f fix #36825 (Exceptions thrown in ArrayObject::offsetGet cause segfault)
fix similar issue in offsetExists()
remove redundant semicolons
2006-03-22 21:56:40 +00:00
Antony Dovgal 8a58105f42 MFH: use set_time_limit(), this test takes forever on AIX 2006-03-22 19:27:47 +00:00
Antony Dovgal 6c101d6400 fix #36820 (Privileged connection with an Oracle password file fails) 2006-03-22 09:45:39 +00:00
Marcus Boerger 7b7717d196 MFH:
- Drop --no-prefix as disables --prefix which we do for http://gcov.php.net
# If you need/want this edit your makefile or provide a LTP_GENHTML export
# of your need when running buildconf
2006-03-21 18:17:15 +00:00
Antony Dovgal f9835c3786 change oci_field_type() to return VARCHAR2 instead of VARCHAR
(fixes feature request #36800)
2006-03-21 15:47:31 +00:00
Ilia Alshanetsky d76e149f0e Fixed bug #36802 (mysqli_set_charset() crash with a non-open connection). 2006-03-21 15:35:28 +00:00
Antony Dovgal 7019b978a0 reimplement php_oci_lob_read() and fix PECL bug #5995
now the function dosn't try to read data by blocks, as this is nearly impossible
to do with Unicode and regular LOBs in the same time
2006-03-21 15:06:50 +00:00
Dmitry Stogov 1122f647d2 Fixed compatibility with auto_globals_jit 2006-03-21 12:26:57 +00:00
Dmitry Stogov bafba669ad Fixed bug #36721 (The SoapServer is not able to send a header that it didn't receive) 2006-03-21 12:04:55 +00:00
Dmitry Stogov 658ac96cfa Fixed bug #36809 (__FILE__ behavior changed) 2006-03-21 08:49:42 +00:00
Rui Hirokawa e8d320dd77 MFH 2006-03-21 07:56:28 +00:00
Dmitry Stogov 8d012d041f Fixed bug #36749 (SOAP: 'Error Fetching http body' when using HTTP Proxy) 2006-03-21 07:22:59 +00:00
Rui Hirokawa 85019bf450 MFH. 2006-03-21 02:20:15 +00:00
Rui Hirokawa fa3173bec3 *** empty log message *** 2006-03-21 02:10:55 +00:00
Rui Hirokawa 6912dab9eb @added possible encoding attack detection by mb_get_info('illegalchars'). 2006-03-21 01:58:27 +00:00
Ilia Alshanetsky 79e7432c97 Fixed bug #36689 (Removed arbitrary limit on the length of syslog messages). 2006-03-21 00:59:08 +00:00
Antony Dovgal b2bbaca8e8 shutdown syslog module before freeing basic_globals 2006-03-20 23:32:58 +00:00
Antony Dovgal f789f0e384 .. and add missing #ifdef 2006-03-20 23:06:00 +00:00
Antony Dovgal 3309d14af2 fix wrong mshutdown func params 2006-03-20 23:04:30 +00:00
Antony Dovgal edbfb9c2c7 fix #36808 (syslog ident becomes garbage between requests) 2006-03-20 23:03:11 +00:00
Antony Dovgal 6aaf510bf0 MFH: fix #36741 (userstreams testcase have off-by-one error on fseek()) 2006-03-20 22:09:11 +00:00
Dmitry Stogov 608c3207a6 Removed unreachable code 2006-03-20 15:13:41 +00:00
Antony Dovgal b5001f5383 MFH: fix buffer overrun 2006-03-20 14:10:35 +00:00
Antony Dovgal afd781a09a MFH: initialize retval 2006-03-20 13:54:16 +00:00
Dmitry Stogov 110021f4c7 Fixed bug #36749 (SOAP: 'Error Fetching http body' when using HTTP Proxy) 2006-03-20 10:36:55 +00:00
Dmitry Stogov d355704998 Fixed register_argc_argv behavior. Now it behave in the same way as before in all combinations with register_globals, register_long_arrays, variables_order and auto_globals_jit. 2006-03-20 10:15:02 +00:00
Antony Dovgal ef1f36e2c1 first check stream for NULL, then dereference 2006-03-19 22:33:10 +00:00
Antony Dovgal 90d7fbe798 MFH: make the code cleaner 2006-03-19 22:11:36 +00:00
Marcus Boerger 4651f79ed5 - Missing skipif 2006-03-19 18:25:51 +00:00
Ilia Alshanetsky 4ccd89d147 Properly calculate the size of the result array. 2006-03-19 17:35:36 +00:00
Michael Wallner 5a49926c38 - add comitters name 2006-03-19 15:19:08 +00:00
Michael Wallner cf01cff2e5 - Fixed Apache2 SAPIs header handler modifying header strings. 2006-03-19 15:18:20 +00:00
Michael Wallner 23b8ce3876 - fix php_apache_sapi_header_handler() modifying sapi_header
# already taken care of in apcache1 sapi
2006-03-19 14:54:53 +00:00
Antony Dovgal 91f4b380d6 fix several leaks in date_sun*() functions 2006-03-18 23:43:48 +00:00
Antony Dovgal 5c7c11c41d MFH: check stream for NULL before writing to it
remove unnecessary semicolons
2006-03-18 22:24:05 +00:00
Antony Dovgal 4e75cd5548 Added support for BINARY_DOUBLE and BINARY_FLOAT to PDO_OCI and OCI8 (also fixes bug #36764) 2006-03-18 22:06:31 +00:00
Marcus Boerger fa922fb51c - MFH Fix seek/eof issue in temp streams 2006-03-18 19:57:00 +00:00
Rob Richards 2ea6d46e4f BFN 2006-03-18 11:47:05 +00:00
Rob Richards aaec067578 Fixed bug #36756 (DOMDocument::removeChild corrupts node)
add test
2006-03-18 11:44:49 +00:00
Antony Dovgal 7731dc9421 fix #36727 (segfault in pdo_pgsql bindValue() when no parameters are defined) 2006-03-17 22:15:57 +00:00
Dmitry Stogov 63b3f5c041 Eliminated unnecessary getcwd() syscall 2006-03-17 10:42:31 +00:00
Antony Dovgal 652d77eca4 fix #36743 (In a class extending XMLReader array properties are not writable) 2006-03-17 10:15:58 +00:00
Dmitry Stogov 76a7240d70 Optimized FastCGI SAPI check. Check for ini options only once. 2006-03-17 09:32:30 +00:00
Dmitry Stogov 55159796b0 Allowed 'auto_globals_jit' work together with 'register_argc_argv' 2006-03-17 08:58:51 +00:00
Dmitry Stogov d82462485e FIX: For some reason SIGSEGV handler wasn't set, but was restoring. Now all SIGSEGV related code is commented. 2006-03-17 08:47:41 +00:00
Dmitry Stogov c31c984365 Optimization of module unloading (temporary modules can be only in the end) 2006-03-17 08:34:16 +00:00
Ilia Alshanetsky 6fd71dbbe9 Allow PDO_MYSQL_ATTR_DIRECT_QUERY to be set via constructor
Allow getAttribute() to fetch MySQL specific attributes.
Eliminate unnecessary auto-commit call on connect.
2006-03-17 00:15:09 +00:00
Marcus Boerger 7c14d86dc3 - Fix test 2006-03-16 00:39:50 +00:00
Dmitry Stogov eacb27d2da Fixed Bug #36614 (Segfault when using Soap) 2006-03-15 16:13:18 +00:00
Ilia Alshanetsky 92ba7cccad Fixed memory leak on unused bind var. 2006-03-15 15:25:50 +00:00
Dmitry Stogov 79983ce0ce Fix: incorrect string length passed 2006-03-15 14:12:26 +00:00
Dmitry Stogov 6f76b17079 Added E_STRICT warning in case of calling non-static method from incompatible context (this feature is staying for BC with php-4). 2006-03-15 11:12:45 +00:00
Dmitry Stogov 7865dfb5b8 Eliminated run-time constant fetching for TRUE, FALSE and NULL 2006-03-15 09:04:36 +00:00
Dmitry Stogov 056bea6de7 Fixed "zend_vm_gen.php --without-specializer" 2006-03-15 08:06:28 +00:00
Frank M. Kromann c6b8c26cdf Fix Win32 compilation. 2006-03-14 18:07:51 +00:00
Georg Richter 829642a0b7 fixed a 64-bit problem reported by Pierre 2006-03-14 15:53:16 +00:00
Dmitry Stogov 98bacb0e21 Fixed bug #35988 (Unknown persistent list entry type in module shutdown) 2006-03-14 15:16:07 +00:00
Antony Dovgal ef3d879315 MFH: add brackets and clarity 2006-03-14 15:15:22 +00:00
Ilia Alshanetsky 0a076b11df Fixed offset/length parameter validation in substr_compare() function. 2006-03-14 14:55:13 +00:00
Dmitry Stogov 9d6e4964a1 Fixed bug #36568 (memory_limit setting on win32 has no effect) 2006-03-14 14:19:00 +00:00
Dmitry Stogov 161ae714ae zend_hash_apply() doesn't use ZEND_HASH_APPLY_... macros 2006-03-14 11:24:45 +00:00
Edin Kadribasic a8dbb0ded6 Be more verbose in phpinfo() output 2006-03-14 10:49:18 +00:00
Marcus Boerger 0bcd459300 - bug #36625 fix 2006-03-13 22:56:20 +00:00
Marcus Boerger a371a8c153 - Add missing file extension 2006-03-13 22:55:27 +00:00
Pierre Joye 01479757e3 - #36697, Transparency is lost when using imagecreatetruecolor 2006-03-13 21:56:38 +00:00
Ilia Alshanetsky 80ea07d30c Added overflow checks to wordwrap() function. 2006-03-13 14:37:10 +00:00
Edin Kadribasic c69f100d0e Fixed build 2006-03-13 11:37:51 +00:00
Dmitry Stogov ad10a538ee Optimized cleanup loops on request shutdown 2006-03-13 11:13:42 +00:00
Dmitry Stogov d21669fc80 Fixed realpath() cache for main script with FastCGI SAPI 2006-03-13 09:35:45 +00:00
Marcus Boerger 9e90d5b3c0 - Fix news 2006-03-13 00:03:22 +00:00
Marcus Boerger 0add197ec8 - MFH:
- Fix ReflectionParameter
  . Reintroduce getClass()
  . Change getDeclaringClass() to return what it suggests
  . (inactive but tested) Add getDeclaringFunction()
  . (inactive but tested) Add getPosition()
- Fix tests accordingly
# This also fixes Bug #36687 ReflectionParameter::getDeclaringClass returns
# wrong result
2006-03-12 17:22:34 +00:00
Ilia Alshanetsky 1c340d515d var news 2006-03-12 16:54:13 +00:00
Ilia Alshanetsky e7f6a3fab2 As per agreement during PDM, remove the E_STRICT deprecation notice from
"var".
2006-03-12 16:52:18 +00:00
Marcus Boerger e16bba12b1 - Prefix test names
- Add missing skipif
2006-03-12 12:38:25 +00:00
Rui Hirokawa 2e3ae2f5c2 MFH 2006-03-12 07:54:42 +00:00
Marcus Boerger 06d235fbf1 - MFH Fix writing faillog with redirected tests 2006-03-11 18:13:37 +00:00
Marcus Boerger 941d86a204 - MFH Fix test results with redirected tests 2006-03-11 17:58:24 +00:00
Marcus Boerger b80f9567d5 - Load list of extensions to test from php that is being tested rather than
from php running the tests
2006-03-11 16:37:53 +00:00
Georg Richter e13e2fe9ba fix for MySQL 5.1 (see http://bugs.mysql.com/?id=16144) 2006-03-11 11:16:03 +00:00
Marcus Boerger 79a968b21e - Fix 2006-03-10 22:18:25 +00:00
Brian France 6c4e9d30b9 MFH:
for the primary file only lookup the real file path and
        add it to the included_files list if already opened
        otherwise it will get opened and added to the included_files list in zend_execute_scripts
2006-03-10 18:19:29 +00:00
Pierre Joye 0ebab9d495 - #36686, do not be quiet with the extern GD 2006-03-10 18:07:27 +00:00
Seiji Masugata 61f7dc1396 fixed different value was returned in mb_get_info. 2006-03-10 16:22:15 +00:00
Dmitry Stogov 7ffc24b9f3 Fixed bug #36629 (SoapServer::handle() exits on SOAP faults) 2006-03-10 11:46:52 +00:00
Dmitry Stogov 97f463c156 Fixed debug_zval_dump() to support private and protected members 2006-03-10 08:42:56 +00:00
Sara Golemon 6dff869c51 MFH: Move temporary local storage of primary file's realpath up one block to ensure it stays on the stack. 2006-03-09 20:32:22 +00:00
Ilia Alshanetsky fe13b8ef69 Back to dev 2006-03-09 14:22:59 +00:00
Ilia Alshanetsky b04ecd08d2 5.1.3RC1 2006-03-09 14:12:15 +00:00
Sebastian Bergmann e1d9cf07cd MFH: Make spl_register_std_class() and spl_register_sub_class() available outside of SPL, for instance in SPL_Types. 2006-03-09 11:43:45 +00:00
Marcus Boerger 6dcb27d35c - MFH 2006-03-08 23:54:43 +00:00
Michael Wallner 74868fae47 - Fix bug #36656 (http_build_query generates invalid URIs due to use of square brackets) 2006-03-08 22:00:21 +00:00
Marcus Boerger 4a5dd30201 - MFH Allow pecl/phar and alike too hook into spl_filesystem_object's 2006-03-08 21:54:48 +00:00
Michael Wallner 0aa24dc0a1 - remove declaration of non existant function php_treat_data 2006-03-08 08:43:25 +00:00
Alex Waugh b8d26da1be MFH Fix for RISC OS 2006-03-07 22:37:53 +00:00
Alex Waugh 5dea328391 MFH Improve DOCUMENT_ROOT setting 2006-03-07 22:35:30 +00:00
Marcus Boerger 4e6245978b - Update 2006-03-07 19:29:04 +00:00
Rob Richards f84c9acc77 updated for simplexml changes 2006-03-07 15:27:01 +00:00
Rob Richards 8dffbf217d - Synch with head 2006-03-07 15:22:48 +00:00
Antony Dovgal 6ce1f43902 MFH
add workaround for Oracle server crash, use OCIServerVersion() instead of OCIPing()
fix #36250 (PHP Causes ORA-07445 Core dump in Oracle server 9.2.x)
2006-03-07 07:47:43 +00:00
Rasmus Lerdorf 3563191049 stray text 2006-03-06 23:26:28 +00:00
Sebastian Bergmann b8be6d3664 Fix build and sync parameters with config0.m4. 2006-03-06 22:49:16 +00:00
Marcus Boerger a325d22cd1 - MFH Missed 'proto' 2006-03-06 22:22:54 +00:00
Andrei Zmievski 1b688da7ac *** empty log message *** 2006-03-06 21:59:18 +00:00
Andrei Zmievski 89a4054106 MFH (Import PCRE 6.6) 2006-03-06 21:45:57 +00:00
Derick Rethans 5bfe560cab - MFH: Fixed bug #36638 (strtotime() returns false when 2nd argument < 1).
(Derick)
2006-03-06 21:44:58 +00:00
Rob Richards d36a88bdda fix win build 2006-03-06 20:21:52 +00:00
Colin Viebrock e70571c251 fix logo (proper spacing between the letters) 2006-03-06 19:10:19 +00:00
Marcus Boerger dc8221c154 - Fix last %v, too 2006-03-06 10:56:41 +00:00
Marcus Boerger 94165e41a7 - There is no %v in 5.1 (found by Tony) 2006-03-06 10:09:13 +00:00
Marcus Boerger f08316b525 - MFH Proto fixes 2006-03-06 10:06:25 +00:00
Marcus Boerger 6e93f3eb8f - MFH Proto fixes 2006-03-06 10:00:59 +00:00
Dmitry Stogov ade3995a79 Fixed compatibility with ext/hash 2006-03-06 09:58:01 +00:00
Marcus Boerger e795f8f427 - MFH Proto fixes 2006-03-06 09:50:44 +00:00
Derick Rethans 7fd337f955 - There is no ltouch. 2006-03-05 19:01:37 +00:00
Derick Rethans f87e7b8bab - Added lchown() and lchgrp() to change user/group ownership of symlinks. 2006-03-05 18:57:54 +00:00
Michael Wallner 7d73045415 - fix typo, reword slightly 2006-03-05 17:56:16 +00:00
Marcus Boerger 90ae21f310 - Update 2006-03-05 17:48:47 +00:00
Marcus Boerger 7dc322754a - Fix issues with not/double calling of constructors of SPL iterators
- Fix issues with info-class/file-class in SPL directory handling classes
- Add SimpleXMLElement::count()
- Drop erroneous RecursiveDirectoryIterator::getSubPathInfo()
- Drop dead code
- Add tests
- Update docu
2006-03-05 17:39:49 +00:00
Ilia Alshanetsky 41de805a9d MFH:
Fixed bug #36572 (Added PDO::MYSQL_ATTR_DIRECT_QUERY constant that show be
set when executing internal queries such as "show master status" via MySQL).

Added missing constant for MAX_BUFFER_SIZE.
2006-03-05 17:18:01 +00:00
Antony Dovgal e43a77d84c add test 2006-03-05 16:12:48 +00:00
Marcus Boerger 35ce5db25e - Add missing function for completeness 2006-03-05 16:12:24 +00:00
Antony Dovgal a9080d38f4 fix #36611 (assignment to SimpleXML object attribute changes argument type to string) 2006-03-05 15:36:03 +00:00
Antony Dovgal 0b12f7307e MFH: fix #36606 (pg_query_params() changes arguments type to string) 2006-03-05 13:35:52 +00:00
Rob Richards 65211cddcc fix crashes using notations and entity decls
add test
2006-03-03 20:15:10 +00:00
Edin Kadribasic a1024ce679 Sync with source distro, enable hash by default 2006-03-03 14:34:34 +00:00
Dmitry Stogov 54adfc6fcf Fixed incorrect backtrace type ("::" instead of "->") for __set()/__get() 2006-03-03 12:06:29 +00:00
Dmitry Stogov d46b474e1e Fixed crash 2006-03-03 10:29:29 +00:00
Dmitry Stogov b32a78c4fa Remove "called at [(null):0]" from debug backtrace 2006-03-03 10:09:21 +00:00
Dmitry Stogov 622347bd8c Fixed bug #36575 (SOAP: Incorrect complex type instantiation with hierarchies) 2006-03-03 09:20:33 +00:00
Derick Rethans 5c1dbf51af - Added the test case for bug #36599 2006-03-03 07:53:21 +00:00
Derick Rethans 22c501b016 - Fixed bug #36599 (DATE_W3C format constant incorrect). 2006-03-03 07:52:55 +00:00
Ilia Alshanetsky ea86f819a3 give credit where it is due. 2006-03-02 21:32:32 +00:00
Dmitry Stogov 65cca0dc20 Fixed bug #36388 (ext/soap crashes when throwing exception and session persistence). (David) 2006-03-02 14:07:48 +00:00
Marcus Boerger 7addae5089 - MFH Use object handler get in the same way as the rest of the engine does 2006-03-02 00:45:28 +00:00
Yasuo Ohgaki e2218515d2 MFH add safe_mode num of parameter check 2006-03-02 00:37:22 +00:00
Ilia Alshanetsky 1aa1c535b5 Remove no longer needed check (checked at a higher level now). 2006-03-01 18:37:11 +00:00
Marcus Boerger 3840e428bb - MFH Fix string-conversion and const updating 2006-03-01 17:21:04 +00:00
Marcus Boerger f128dff1ff - Fix test 2006-03-01 17:19:22 +00:00
Rob Richards 84ad62553d nuke tests for libxml2 version - will always be > 2.6.0 2006-03-01 15:37:45 +00:00
Ilia Alshanetsky 3022080d84 Fixed bug #36459 (Incorrect adding PHPSESSID to links, which contains \r\n). 2006-02-28 14:45:18 +00:00
Marcus Boerger 477f503b9e - MFH Fix dependency checks 2006-02-28 12:26:03 +00:00
Marcus Boerger c4b81d8720 - Fix warning 2006-02-28 02:22:57 +00:00
Marcus Boerger 728493ca37 - MFH Fix issues withhandling of derived info classes as entries 2006-02-28 01:33:32 +00:00
Marcus Boerger 2e37e86366 - MFH Argument parsing specifier 'C', which is necessary for SPL already 2006-02-27 22:23:21 +00:00
Derick Rethans 2e91228d15 - MFH: Fixed bug #36510 (strtotime() fails to parse date strings with tabs). 2006-02-27 19:41:33 +00:00
Ilia Alshanetsky e3ea152fee This fix was reverted 2006-02-27 14:22:26 +00:00
Marcus Boerger c5d70528d7 - MFH Fix count/foreach interaction 2006-02-27 13:38:03 +00:00
Marcus Boerger 44d4ba478f - Cleanup 2006-02-27 11:55:18 +00:00
Johannes Schlüter d4ba0a9fc3 - MFH: Add .cvsignore 2006-02-27 11:38:36 +00:00
Dmitry Stogov cde6f6e0cc Fixed memory leak 2006-02-27 07:12:14 +00:00
Johannes Schlüter 3e056bc13c - Fix tests 2006-02-27 00:18:59 +00:00
Marcus Boerger 0b300dac3a - Update 2006-02-26 23:21:50 +00:00
Marcus Boerger 4d442447f1 - Synch with head 2006-02-26 23:14:45 +00:00
Ilia Alshanetsky 2d4b399fe1 Revert previous fix to allow for a more comprehensive patch from Derick. 2006-02-26 22:14:58 +00:00
Ilia Alshanetsky 2d02bedd9c Fixed bug #36510 (strtotime() fails to parse date strings with tabs). 2006-02-26 17:05:45 +00:00
Marcus Boerger 5a69b29082 - Warning fixes by Steph 2006-02-26 10:57:00 +00:00
Marcus Boerger 84fc80064b - Update 2006-02-25 21:43:02 +00:00
Rasmus Lerdorf 8fe5bc7010 MFH - binary safety patch from Moriyoshi 2006-02-25 21:32:11 +00:00
Marcus Boerger bf213a2c7b - Add ReflectionExtension::getDependencies() 2006-02-25 21:17:18 +00:00
Marcus Boerger 941b0651dc - MFH: Function deprecation flag 2006-02-25 18:25:45 +00:00
Johannes Schlüter 611a6dece9 - MFH: Fix description 2006-02-24 23:25:57 +00:00
Johannes Schlüter 027abfd702 - MFH: Fix #29986 (Class constants won't work with predefined constants when
using ReflectionClass)
2006-02-24 23:09:22 +00:00
Derick Rethans 016dbe414e - MFH: Fixed issue with iconv_mime_decode where the "encoding" would only allow
upper case specifiers.
#- See RFC 2047, section 2.
2006-02-24 16:05:38 +00:00
Michael Wallner 6520ff9afc - fix crash with DOMImplementation::createDocumentType("name:") 2006-02-24 10:19:54 +00:00
Derick Rethans 521502f416 - MFH: Added support for exif date format
- MFH: Fixed bug #36396 (strtotime() fails to parse dates in dd-mm-yyyy
  format).
2006-02-24 09:44:56 +00:00
Ilia Alshanetsky 6d494f9725 Fixed bug #35900 (stream_select() should warning when tv_sec is negative). 2006-02-23 18:28:08 +00:00
Andrei Zmievski c009a4f361 Fix a bug where the default value for function argument could be an
array with array (!) keys.
2006-02-23 18:06:47 +00:00
Brian France 9f53c8e313 MFH: fixed bug #35594 for all systems. "optind = 0" doesn't work on FreeBSD, but "optind = 1" seems to work on all systems (bug #36091) 2006-02-23 03:51:46 +00:00
Ilia Alshanetsky 07e7092729 Added test for bug #36434 2006-02-22 15:45:25 +00:00
Johannes Schlüter 7409ed6403 - MFH: List --rf/--rc/--re only with enabled reflection 2006-02-21 21:15:13 +00:00
Ilia Alshanetsky f5241f165f Fixed bug #36458 (sleep() accepts negative values). 2006-02-21 15:32:06 +00:00
Johannes Schlüter c6cb1598be - MFH: Rename reflection constants to fix parser conflicts 2006-02-20 23:33:32 +00:00
Marcus Boerger 289f45c279 - Synch docu 2006-02-20 22:21:54 +00:00
Ilia Alshanetsky 4ea898b79f Fixed bug #36434 (Improper resolution of declaring class name of an
inherited property).
2006-02-20 15:27:45 +00:00
Dmitry Stogov 089f1283ad Fixed test file 2006-02-20 08:39:06 +00:00
Michael Wallner 59fa57d232 BFN: fixed ext/hash/tiger on big endian platforms 2006-02-19 23:50:46 +00:00
Michael Wallner 4b23428d9d - fix tiger on big endian platforms 2006-02-19 23:39:53 +00:00
Marcus Boerger f0d9ae46c3 - Fix method flag handling 2006-02-19 10:39:31 +00:00
Marcus Boerger afd8f0b608 - MFH Fix naming inconsistency (providing old name as alias) 2006-02-18 18:14:45 +00:00
Marcus Boerger 78516c7905 - Fixed bug #36436 (DBA problem with Berkeley DB4). 2006-02-18 17:11:06 +00:00
Michael Wallner 92ac0940d3 - fix misleading proto (confused out and in charset) 2006-02-18 16:02:43 +00:00
Rasmus Lerdorf bab48a0906 Rename getloadavg to sys_getloadavg 2006-02-18 05:41:59 +00:00
Andrei Zmievski f10bab6f97 MFH. 2006-02-17 21:18:09 +00:00
Wez Furlong a8be85ce7e add getloadavg() function that has been running in production on rs1.php.net
for a couple of years.
2006-02-16 22:49:13 +00:00
Antony Dovgal 1e8aad5075 MFH: add checks and fix possible reincarnations of bug #36420 2006-02-16 20:58:59 +00:00
Ilia Alshanetsky ce9dfedc69 Fixed bug #36420 (segfault when access result->num_rows after calling
result->close())
2006-02-16 16:03:27 +00:00
Antony Dovgal 2108714a2b MFH: improve usleep(): use new param parsing API, check for negative values
(related to #36410)
2006-02-16 10:13:52 +00:00
Antony Dovgal f2ac3274d7 fix typo 2006-02-16 06:29:40 +00:00
Ilia Alshanetsky 96843fe434 Use 5.1 functions 2006-02-16 03:15:52 +00:00
Sara Golemon a790d6ed3d Fix copy/paste problems for instantclient 2006-02-16 02:03:13 +00:00
Antony Dovgal 716d22a8f6 MFH: fix #36403 (oci_execute() no longer supports OCI_DESCRIBE_ONLY) 2006-02-15 20:44:55 +00:00
Antony Dovgal 82b6ccbc30 fix memory leak and possible invalid reads 2006-02-15 11:15:32 +00:00
Antony Dovgal 8068342483 MFH: fix #36400 (Custom 5xx error does not return correct HTTP response error code) 2006-02-15 11:09:05 +00:00
Antony Dovgal d43d090362 fix leak in zend_strtod() on big doubles
add new test
2006-02-14 22:10:55 +00:00
Ilia Alshanetsky 3608dd4c11 Fixed bug #36345 (PDO/MySQL problem loading BLOB over 1MB). 2006-02-14 14:26:11 +00:00
Antony Dovgal c65d61a301 add test for bug #36337 2006-02-14 09:46:16 +00:00
Derick Rethans 1a170a3de2 - Fixed bug #36382 (PDO/PgSQL's getColumnMeta() crashes). 2006-02-13 15:53:36 +00:00
Ilia Alshanetsky 1e05eec591 Fixed bug #36337 (ReflectionProperty fails to return correct visibility). 2006-02-13 14:49:26 +00:00
Dmitry Stogov 11187a40e0 Fixed bug #36205 (Memory leaks on duplicate cookies) 2006-02-13 12:18:16 +00:00
Marcus Boerger 9c614f8f8f - Synch 2006-02-12 18:51:12 +00:00
Marcus Boerger 4b2b9461d4 - MFH No more old parameter api usage 2006-02-12 16:44:36 +00:00
Ilia Alshanetsky 535a2e6092 Fixed bug #36351 (parse_url() does not parse numeric paths properly). 2006-02-12 16:39:44 +00:00
foobar 5fb8810c76 fix news 2006-02-11 11:23:57 +00:00
Rui Hirokawa e8d38828cd MFH 2006-02-11 02:26:07 +00:00
Antony Dovgal 08c4c9c202 MFH: fix #36359 (splFileObject::fwrite() doesn't write when no data length specified) 2006-02-10 16:57:56 +00:00
Rasmus Lerdorf 6cc9f92d16 (Missing patch from the PHP 4 tree that got lost in the shuffle)
See: http://cvs.php.net/viewcvs.cgi/php-src/ext/session/session.c?r1=1.336.2.39&r2=1.336.2.40
- fix logic. if the client already sent us the cookie, we don't
  need to send it again.  if the id has been changed, we need to
  update the client side.
2006-02-10 07:39:13 +00:00
Pierre Joye 8fe545aab7 - fix order 2006-02-09 22:26:43 +00:00
Ilia Alshanetsky 044d24a23c Added test for bug #36308 2006-02-09 18:18:18 +00:00
Pierre Joye c09237ffce - protos 2006-02-09 15:48:46 +00:00
Pierre Joye 8600417c79 - revert last fix
- ensure that we are in 32bit
- do not try to compare the decimal values but hex, php does not have
  unsigned integer
2006-02-09 15:33:53 +00:00
Ilia Alshanetsky f541b63e1f Fixed bug #36334 (Added missing documentation about realpath cache INI
settings).
2006-02-08 23:43:48 +00:00
Johannes Schlüter b0f0192f0c - MFH: Fix charset 2006-02-08 21:09:18 +00:00
Johannes Schlüter 991c753bc5 - MFH: It's 2006 and PHP 5 2006-02-08 21:03:36 +00:00
Antony Dovgal 1f8b320679 MFH: move function definition from .h to .c, where it should be 2006-02-08 20:50:03 +00:00
Greg Beaver 39a4a46ae4 MFB fix Bug #36001: make install fails when --enable-memory-limit used 2006-02-08 01:12:12 +00:00
Ilia Alshanetsky 0a6b074034 Fixed bug #36308 (ReflectionProperty::getDocComment() does not reflect
extended class commentary).
2006-02-08 00:36:57 +00:00
Andrei Zmievski 7deff63e3c Move array globals declarations back to the header file. 2006-02-07 17:54:24 +00:00
Antony Dovgal 3bafa8cead don't use deprecated call-time by reference 2006-02-07 14:11:31 +00:00
Dmitry Stogov 9167991f69 Compression level shouldn't be greatr then 9. 2006-02-07 12:57:28 +00:00
Dmitry Stogov 73605400e8 Fixed bug #36083 (SoapClient waits for responses on one-way operations) 2006-02-07 12:49:10 +00:00
Rob Richards 7831900882 fix mem leak with iterators
fix object casting for edge case
2006-02-07 11:50:54 +00:00
Pierre Joye 5f83d7ce90 - forgot the original credits 2006-02-07 00:38:15 +00:00
Andrei Zmievski da30791861 MFH. 2006-02-07 00:33:13 +00:00
Pierre Joye 0473a11ca2 - entry for #36306 2006-02-07 00:27:04 +00:00
Pierre Joye f3e11a705c - #36306, crc32() function result differs on 32-bit and 64-bit platforms 2006-02-07 00:23:55 +00:00
Antony Dovgal a3b941642c init variables 2006-02-06 20:37:11 +00:00
Michael Wallner beea63529c MFH: fix ReflectionClass::getInterfaces() 2006-02-06 20:12:48 +00:00
Andrei Zmievski 6c180238fd TODO 2006-02-06 19:02:53 +00:00
Ilia Alshanetsky a0d912490d Fixed test to work when TCP/IP access to MySQL is disabled or test server
is on a remote machine.
2006-02-06 14:25:07 +00:00
Dmitry Stogov a7c845ffcb typo 2006-02-06 13:17:06 +00:00
Dmitry Stogov 38409e944c Fixed bug #36303 (foreach on error_zval produces segfault) 2006-02-06 11:45:56 +00:00
Antony Dovgal bccf4bd9e7 MFH: initialize variables and reduce the number of warnings 2006-02-06 11:28:41 +00:00
Antony Dovgal 8911fac653 MFH: initialize variable and make gcc happy 2006-02-06 11:01:06 +00:00
Antony Dovgal c353a52a11 initialize variables 2006-02-06 10:52:34 +00:00
Antony Dovgal 4a179933b6 initialize to_r
remove needless semicolon
2006-02-06 10:41:28 +00:00
Dmitry Stogov f2772ecc0d Fixed bug #36283 (SOAPClient Compression Broken). 2006-02-06 10:16:03 +00:00
Marcus Boerger ff4ee6f043 - MFH Add new tests 2006-02-06 01:28:12 +00:00
Antony Dovgal aa920b8e00 MFH: fix #36295 (typo in SplFileObject::flock() parameter name) 2006-02-05 19:23:30 +00:00
Ilia Alshanetsky 64972c02de Simplify test code 2006-02-05 17:33:11 +00:00
Marcus Boerger 647eafcb5d - MFH 2006-02-05 17:07:40 +00:00
Pierre Joye 3c1b981a28 - ini entry for gd.jpeg_ignore_warning 2006-02-05 16:04:11 +00:00
Pierre Joye 3f68c2164b - jpeg tolerant mode entry 2006-02-05 15:54:56 +00:00
Pierre Joye 6f632a77c3 - MFH: add a weak/tolerant mode to the jpeg loader 2006-02-05 15:53:58 +00:00
Marcus Boerger 56db3290e2 - BFN 2006-02-05 12:04:46 +00:00
Marcus Boerger 39d71e375c - MFH Fix bug #36287 2006-02-05 11:43:44 +00:00
Frank M. Kromann 5e673e0639 Fix build on win32 2006-02-04 23:54:21 +00:00
Rob Richards c3c092bba6 BFN 2006-02-04 11:01:55 +00:00
Rob Richards a78a0b460c Fixed bug #34272 (empty array onto COM object blows up)
fix mem leaks
WS fixes
add test
2006-02-04 10:57:28 +00:00
Dmitry Stogov aa1142eded Fixed bug #36158 (SIGTERM is not handled correctly when running as a FastCGI server) 2006-02-03 16:30:09 +00:00
Antony Dovgal 52232a7f7a fix #36010 (Segfault when re-creating and re-executing statements with bound parameters) 2006-02-03 14:46:42 +00:00
Dmitry Stogov b179e081ab Fixed bug #36268 (Object destructors called even after fatal errors) 2006-02-03 09:31:59 +00:00
Marcus Boerger a31f337c24 - MFH Fix ArrayIterator::seek() edge cases 2006-02-02 22:17:42 +00:00
Antony Dovgal db7195ee0c nuke unused variable 2006-02-02 21:43:09 +00:00
Marcus Boerger a266261eb6 - Fix oversight 2006-02-02 18:59:11 +00:00
Sara Golemon 3a4a0e3cef MFH: Prevent bindport from being used uninitialized 2006-02-02 18:16:43 +00:00
Ilia Alshanetsky 0c972edce4 Only use win32 directory separators on win32 or netware. 2006-02-02 15:10:04 +00:00
Antony Dovgal 0655132e2c add test for bug #36258 2006-02-02 13:56:16 +00:00
Antony Dovgal ff30daae6e MFH: add missing folding tags
nuke unnecessary semicolons
2006-02-02 12:40:33 +00:00
Antony Dovgal 0506d1a9f5 fix #36258 (SplFileObject::getPath() may lead to segfault) 2006-02-02 12:19:14 +00:00
Dmitry Stogov 7dc9be77fc Bug #36226 Inconsistent handling when passing potential arrays 2006-02-02 11:41:45 +00:00
Dmitry Stogov 6a176fa7b3 AIX support 2006-02-02 09:59:23 +00:00
Dmitry Stogov 7e7fcc3a07 Reimplement FastCGI interface
Due to licensing restrictions that actually don't allow anybody to use
the libfcgi code without prior approval from Open Market, which is
impossible to obtain - we decided to reimplement this interface from
scratch.  The result is actually slightly faster, and more importantly,
clear of any copyright issues.
2006-02-02 08:17:23 +00:00
Dmitry Stogov 9774b6d3e6 Fixed encoding of inhereted objects 2006-02-01 17:18:24 +00:00
Ilia Alshanetsky d115747a24 Clarify new entries. 2006-02-01 17:05:38 +00:00
Joe Orton 8c55d477d8 MFH: - Fixed bug #36208 (symbol namespace conflicts using bundled gd). (Jakub Moc) 2006-02-01 13:52:46 +00:00
Antony Dovgal b90d985a23 MFH: fix #36242 (Possible memory corruption in stream_select()) 2006-02-01 10:31:57 +00:00
Sebastian Bergmann 823b39b698 Fix line endings. 2006-02-01 07:41:24 +00:00
Zeev Suraski b73349dbe4 Fix possibility of a wrong element being deleted by zend_hash_del()
Thanks Stefan!
2006-02-01 01:01:05 +00:00
Derick Rethans 0249f6b6b6 - MFH: Fixed bug #36224 (date(DATE_ATOM) gives wrong results). 2006-01-31 18:44:19 +00:00
Antony Dovgal 526bc44ff7 fix test 2006-01-31 18:39:28 +00:00
Antony Dovgal 3a800fe146 MFH: fix #36235 (ocicolumnname delivers empty results before a succesfull ocifetch) 2006-01-31 18:38:52 +00:00
Derick Rethans eb91dfc69e - MFH: Upgraded timezonedb to 2006a. 2006-01-31 18:08:15 +00:00
Ilia Alshanetsky 6f66a63cda Fixed bug #36222 (errorInfo in PDOException is always NULL). 2006-01-31 17:20:32 +00:00
Derick Rethans 657d5f086f - Moved msession to PECL. 2006-01-31 08:11:35 +00:00
Antony Dovgal b22ab5b5d3 fix printf-style formats 2006-01-30 21:14:54 +00:00
foobar f80f58168c nuke ws pollution 2006-01-29 17:54:45 +00:00
Ilia Alshanetsky 9b0f4a6234 Fixed bug #36176 (PDO_PGSQL - PDO::exec() does not return number of rows
affected by the operation).
2006-01-29 17:35:54 +00:00
foobar af56d9f1d4 fix news 2006-01-29 15:25:10 +00:00
Michael Wallner e44b9f08f6 - not efree but free 2006-01-28 08:07:20 +00:00
Frank M. Kromann 80cc4867e3 Export symbols that will allow building WDDX as shared object 2006-01-28 06:18:01 +00:00
Frank M. Kromann 329198a955 Add header so WDDX builds as shared 2006-01-28 06:15:25 +00:00
Pierre Joye f16b8429da - #36185 entry 2006-01-28 00:16:56 +00:00
Pierre Joye 2bfe34e06d - MFH: #36185 str_rot13(NULL) crash 2006-01-28 00:14:01 +00:00
Michael Wallner fe52312f59 - include png.h prior php.h 2006-01-27 20:46:02 +00:00
Michael Wallner a146043c25 - fix imap_fetchbody(); there is no default mailgets() 2006-01-27 20:18:03 +00:00
Pierre Joye 9494521055 - imagepng filter enty 2006-01-27 20:11:54 +00:00
Michael Wallner 26127e510f - added imap_savebody() 2006-01-27 19:47:14 +00:00
Michael Wallner b12f8e6811 MFH: add imap_savebody() 2006-01-27 19:46:11 +00:00
Pierre Joye 1b546b9f77 - MFH: add filter option to imagepng
- add constants
  PS: If someone can check why #include "png.h" fails, it will be cleaner
2006-01-27 13:36:30 +00:00
Ilia Alshanetsky c5ef24bfee Fixed bug #36148 (unpack("H*hex", $data) is adding an extra character to the
end of the string).
2006-01-26 15:45:33 +00:00
Michael Wallner 9eda552c75 BFN 2006-01-26 13:26:51 +00:00
Michael Wallner ed58b573a1 MFH: fix bug #36152 problems with curl+ssl and pgsql+ssl in same PHP 2006-01-26 13:23:33 +00:00
Rob Richards 84554b0364 BFN 2006-01-26 11:18:46 +00:00
Rob Richards c53b926a35 Fix bug #35954 (Fatal com_exception casting object) 2006-01-26 11:17:34 +00:00
Marcus Boerger cb4bb6e389 - MFH Bug #36141 Add ReflectionClass::newInstanceArgs($args) 2006-01-25 22:03:54 +00:00
Marcus Boerger 77915bc208 - MFH 2006-01-25 22:03:18 +00:00
Rob Richards ec605ac2ad fix possible crash in textContent 2006-01-25 17:34:05 +00:00
Ilia Alshanetsky 8fde2249c3 Properly rewrite queries where a bound parameter appears more then once. 2006-01-25 16:35:23 +00:00
Marcus Boerger 9cb7d29f84 - MFH Bug #35978 %n format string specifier wrongly implemented 2006-01-24 20:59:46 +00:00
Ilia Alshanetsky 5f25d80d10 cURL extension news. 2006-01-24 20:11:14 +00:00
Antony Dovgal d0e1a4fdca MFH: fix #36113 (Reading records of unsupported type causes segfault) 2006-01-23 22:42:12 +00:00
Derick Rethans ff438f1139 - date is not a server API 2006-01-23 18:07:40 +00:00
Ilia Alshanetsky 9cbc3ae264 Fixed bug #36134 (DirectoryIterator constructor failed to detect empty
directory names).
2006-01-23 15:24:10 +00:00
Marcus Boerger 2d1d476391 - MFH Fix error message 2006-01-23 02:26:32 +00:00
Marcus Boerger 1d461a6bcc - MFH 2006-01-22 23:57:41 +00:00
Marcus Boerger b1cebf32e4 - MFH Fix issues with static method invocation 2006-01-22 22:14:32 +00:00
Marcus Boerger cb27823e82 - MFH Show the exact version 2006-01-22 22:09:54 +00:00
Marcus Boerger 813a5651c1 - MFH Update test 2006-01-22 22:07:43 +00:00
Sebastian Bergmann 4803abf07c Fugbix typo. 2006-01-22 21:01:51 +00:00
foobar e4295ed864 fix news 2006-01-22 18:47:36 +00:00
Ilia Alshanetsky ffe84c11a7 News about further get_headers() changes. 2006-01-22 18:34:12 +00:00
Rui Hirokawa 90bb16db5a MFH 2006-01-21 02:49:52 +00:00
Antony Dovgal 1070dec09a fix typo 2006-01-20 16:58:48 +00:00
Antony Dovgal 4697099ab0 add new test 2006-01-20 11:07:34 +00:00
Antony Dovgal 5fb6e0703f MFH: fix #36096 (oci_result() returns garbage after oci_fetch() failed) 2006-01-20 11:02:49 +00:00
Ilia Alshanetsky 0621bcc9e1 Allow get_headers() to return header information even for non-200 responses. 2006-01-20 01:40:32 +00:00
Dmitry Stogov c447acf863 Fixed bug #36071 (Engine Crash related with 'clone') 2006-01-19 07:23:32 +00:00
Antony Dovgal 82d5901664 MFH: couple of pedantic fixes: "static" should be first 2006-01-18 23:55:47 +00:00
Derick Rethans 864004d4d7 - Enable date_sun_info() function. 2006-01-18 21:40:38 +00:00
Antony Dovgal 01e8d313c8 MFH: make sure ce_child is properly initialized 2006-01-18 21:06:47 +00:00
Antony Dovgal 26ef74f867 MFH: fix error message on make test when bison is not installed 2006-01-18 17:59:20 +00:00
foobar f0a60af876 fix news 2006-01-18 16:12:37 +00:00
Ilia Alshanetsky fb7608a006 Make get_headers() use the default context. 2006-01-18 14:05:14 +00:00
Antony Dovgal 1d72f55e7d MFH: reorganize resource destruction 2006-01-18 10:12:34 +00:00
Antony Dovgal 56242031aa MFH: improve open_basedir checks in GD 2006-01-17 23:47:08 +00:00
Antony Dovgal 4278ffd3b4 MFH: fix #36055 (possible OCI8 crash in multithreaded environment) 2006-01-17 23:44:51 +00:00
Ilia Alshanetsky 5a6a07467f Bug fixing news 2006-01-17 19:57:01 +00:00
Ilia Alshanetsky b6cb9d3ce5 Fixed bug #36046 (parse_ini_file() miscounts lines in multi-line values). 2006-01-17 19:56:25 +00:00
foobar 52933fc89d you fix, add, update or remove.. 2006-01-17 19:19:45 +00:00
Pierre Joye 5ea4c827c9 - remove old return_long 2006-01-17 19:04:06 +00:00
Pierre Joye e736bfc8b6 - imagecolorallocate* returns false entry 2006-01-17 16:33:11 +00:00
Pierre Joye afa77062d1 - return false on error 2006-01-17 15:44:12 +00:00
Pierre Joye 328c294569 - Returns FALSE on error, it is how it must work 2006-01-17 15:23:29 +00:00
Dmitry Stogov 0f4302b872 Fixed bug #36037 (heredoc adds extra line number) 2006-01-17 09:39:57 +00:00
Ilia Alshanetsky 5f9dde24d8 Only report mkdir() errors if error reporting option is set. 2006-01-17 02:32:09 +00:00
Antony Dovgal 694042e527 MFH: fix #36038 (ext/hash compile failure on Mac OSX) 2006-01-16 23:04:23 +00:00
Antony Dovgal ac1ec7914c fix typo 2006-01-16 20:40:41 +00:00
Antony Dovgal 3062348c75 MFH: fix #35999 (recursive mkdir() does not work with relative path like "foo/bar") 2006-01-16 19:48:23 +00:00
Dmitry Stogov bc410c3863 Fixed first-chance exception during request shutdown 2006-01-16 14:26:07 +00:00
Dmitry Stogov b8360c376b Fixed bug #36006 (Problem with $this in __destruct()) 2006-01-16 10:12:36 +00:00
Dmitry Stogov 4b1791a767 Fixed bug #36016 (realpath cache memleaks) 2006-01-16 09:12:22 +00:00
Dmitry Stogov 71d4d4a91f Fixed bug #36016 (realpath cache memleaks) 2006-01-16 09:09:37 +00:00
Ilia Alshanetsky 3d80bd0cdf Added a check for special characters in the session name. 2006-01-15 16:51:18 +00:00
Marcus Boerger d059b92fea - MFH Fix issue found by Nuno 2006-01-15 00:17:43 +00:00
Antony Dovgal 8488861e12 add test for bug #36010 2006-01-14 22:23:43 +00:00
Marcus Boerger 1edc8eec88 - Update 2006-01-14 20:21:10 +00:00
Marcus Boerger 66cfc793a2 - Fix test 2006-01-14 15:53:37 +00:00
Marcus Boerger 97086b2bc6 - BFN 2006-01-14 15:24:06 +00:00
Marcus Boerger add3c79a23 - Fixed bug #36011 2006-01-14 15:22:40 +00:00
foobar a408c539cf be wordy 2006-01-14 14:44:44 +00:00
Georg Richter 5854cf10c7 New field constants for BIT and NEWDECIMAL 2006-01-14 14:34:47 +00:00
Georg Richter 04ac1f7fd1 2nd attempt: implementation of 36007
1st commit stopped with protocol error - never seen that before :-(
2006-01-14 14:15:41 +00:00
foobar fecfb80a00 removed false information 2006-01-14 12:05:59 +00:00
Georg Richter c061fc6c37 Implemented feature request #36007: Support for BIT and NEW_DECIMAL field types 2006-01-14 10:15:08 +00:00
foobar 1cdaf5d7b1 fix news 2006-01-14 09:57:07 +00:00
Marcus Boerger 575e6b6e7c - Make clear what -a mode gets you 2006-01-14 02:09:37 +00:00
Marcus Boerger c863542dc1 - Fix #35998 (getPathname() method always returns unix style filenames) 2006-01-13 19:36:57 +00:00
Sascha Schumann 754b747637 WS 2006-01-13 14:31:38 +00:00
Sascha Schumann 64447a29aa - MFH lower valgrind error count to 0 2006-01-13 14:25:46 +00:00
Antony Dovgal 0851c649d1 MFH: add missing ifdefs 2006-01-13 13:04:27 +00:00
Marcus Boerger e6f4c2bce2 - Add News (which is news) 2006-01-13 08:30:40 +00:00
foobar db2697aae0 this is not news 2006-01-13 05:07:55 +00:00
Pierre Joye 6c509aa837 - add php_mkdir_ex, works like php_mkdir but allows to silent any error
when no options are used
2006-01-13 04:06:00 +00:00
Marcus Boerger f113090832 - Add stream filter 'consumed' 2006-01-12 19:23:58 +00:00
Ilia Alshanetsky e731da3653 Back to dev 2006-01-12 15:24:10 +00:00
Marcus Boerger 1cfcdf6612 - MFH 2006-01-11 20:31:05 +00:00
Michael Wallner 8f5005e4b6 MFH: fix CGI SAPI check on Windows 2006-01-11 15:19:52 +00:00
Antony Dovgal 6ba295f311 int -> long 64bit fixes 2006-01-11 15:09:59 +00:00
Ilia Alshanetsky ad1bbaca04 5.1.2 2006-01-11 14:19:14 +00:00
Ilia Alshanetsky 778c635c40 Fixed bug #35916 (Duplicate calls to stream_bucket_append() lead to a crash). 2006-01-10 16:14:16 +00:00
Antony Dovgal 21891aecc1 MFH: fix #35959 (Cannot build with Solid 2.3) 2006-01-10 14:15:35 +00:00
Antony Dovgal 92f050786f MFH: destroy regular connections in RSHUTDOWN if ZTS is used
this fixes problem with Oracle9 (not Oracle10) and Apache2/worker - connections are not being closed correctly
see #35205 and similar issues
2006-01-10 08:34:28 +00:00
Ilia Alshanetsky f079ef83ab Fixed test. 2006-01-10 03:18:37 +00:00
Ilia Alshanetsky 5b46c42641 PEAR news 2006-01-08 20:07:21 +00:00
Antony Dovgal 4972b45520 fix typo in the code and related tests 2006-01-06 20:55:14 +00:00
Antony Dovgal de8d0920d4 MFH: add missing .cvsignore 2006-01-06 20:26:25 +00:00
Marcus Boerger 58349878fc - MFH Update 2006-01-06 19:58:10 +00:00
Rasmus Lerdorf 4d64a617c3 MFH: I don't recall the reason for messing with r->allowed here, so let's
get rid of it (and see who screams).  This should fix bug #32561
2006-01-06 18:06:38 +00:00
foobar 02f405ccb1 MFH 2006-01-06 14:03:37 +00:00
Antony Dovgal 08feff327a BFN 2006-01-06 11:49:17 +00:00
Antony Dovgal 96723680d0 MFH: fix #35907 (PDO_OCI uses hardcoded lib path $ORACLE_HOME/lib) 2006-01-06 11:48:19 +00:00
foobar 6486069a3f MFH 2006-01-06 02:04:33 +00:00
Marcus Boerger 0d0f3e290b - Fix issue with memset seeking
- Fix issue with shutdown order of temp/memory stream
2006-01-05 22:03:07 +00:00
foobar 8c56ee5cb6 MFH: - Fixed bug #35911 (HAVE_PG_CONFIG_H set incorrectly) 2006-01-05 21:53:19 +00:00
Ilia Alshanetsky c4790e3a9e Back to dev 2006-01-05 21:36:05 +00:00
Antony Dovgal 6fcc365c75 MFH: fix typo 2006-01-05 20:49:37 +00:00
Marcus Boerger 5121b2a78a - MFH Fix docu 2006-01-05 19:00:27 +00:00
Ilia Alshanetsky 32dc6ee526 Go with 5.1.2RC2 2006-01-05 18:36:24 +00:00
Ilia Alshanetsky 8340e30313 Revert unrelated parts of the previous patch. 2006-01-05 18:07:55 +00:00
Ilia Alshanetsky e9c813af61 MFH4: Fixed bug #35908 (curl extension uses undefined GCRY_THREAD_OPTIONS_USER). 2006-01-05 18:05:37 +00:00
Antony Dovgal 8eb44c317e MFH: delete descriptor from the hash and avoid crashes on commit/rollback 2006-01-05 13:42:35 +00:00
Sebastian Bergmann b185e09245 MFH: Add astro.c. 2006-01-05 06:41:09 +00:00
Andi Gutmans 864a2897df - More -> 2006 changes 2006-01-05 02:34:02 +00:00
Ilia Alshanetsky fc4fb89cac Fixed bug #35669 (imap_mail_compose() crashes with
multipart-multiboundary-email).
2006-01-05 00:47:16 +00:00
Andi Gutmans 30cb5e36b8 - Update to 2006 2006-01-04 23:55:42 +00:00
Andi Gutmans 61e93ccfe8 - Update copyright notices to 2006 2006-01-04 23:53:05 +00:00
Derick Rethans 0d4965407e - Removed the files which are no longer necessary. 2006-01-04 21:35:17 +00:00
Derick Rethans 88268c6bcc - MFH: Fixed bug #35887 (wddx_deserialize not parsing dateTime fields properly).
- MFH: Fixed bug #35885 (strtotime("NOW") no longer works).
- MFH: Fixed bug #33789 (Many Problems with SunFuncs).
- MFH: Fixed bug #33671 (sun_rise and sun_set don't return a GMT timestamp if one
  passes an offset).
- MFH: Fixed bug #32820 (date_sunrise and date_sunset don't handle GMT offset
  well).
- MFH: Fixed bug #30937 (date_sunrise() & date_sunset() don't handle endless
  day/night at high latitudes).
2006-01-04 21:31:35 +00:00
Rob Richards 594139b1ea MFH: fix test 2006-01-04 20:55:58 +00:00
Rob Richards da692974ab MFH: fix tests 2006-01-04 19:44:46 +00:00
Marcus Boerger 47e6f644f7 - MFH Update examples 2006-01-04 15:34:39 +00:00
Marcus Boerger f9bfdc921a - MFH 2006-01-04 15:17:41 +00:00
Marcus Boerger 43fdbe99cd - MFH 2006-01-04 15:08:02 +00:00
Derick Rethans 0839cadef6 - Fixed broken test case. 2006-01-04 10:31:58 +00:00
Ilia Alshanetsky fb91408a17 Added param checks for ap2 fetch respose/request header functions. 2006-01-03 20:13:07 +00:00
foobar 22f4a05149 - prevent pontential failure with stupid compilers 2006-01-03 13:25:06 +00:00
foobar 58576f71c3 typofix 2006-01-03 13:24:46 +00:00
foobar bcc1654de3 - Fixed bug #35288 (iconv() function defined as libiconv()) 2006-01-03 13:21:07 +00:00
Ilia Alshanetsky a5e15f2e1c Fixed possible crash in apache_getenv()/apache_setenv() on invalid
parameters.
2006-01-02 22:19:37 +00:00
foobar 6d8c69e3cb MFH: fixed apache_setenv(): at least 2 parameters are required 2006-01-02 22:10:38 +00:00
Derick Rethans d4dd29194b - MFH: Fixed year dependent test. 2006-01-02 20:15:57 +00:00
Ilia Alshanetsky 488500acfb Added safety checks 2006-01-01 20:12:55 +00:00
Ilia Alshanetsky 64a7e46506 Fixed bug #35797 (segfault on PDOStatement::execute() with
zend.ze1_compatibility_mode = On).
2006-01-01 20:07:41 +00:00
Marcus Boerger 34f32d4dcd - Just another place where rewind() might not be set 2006-01-01 19:55:27 +00:00
Marcus Boerger e99fac3d01 - key() might be optional 2006-01-01 19:51:17 +00:00
Marcus Boerger d6ee7d1d9a - Fix SEGV when rewind() not set 2006-01-01 19:48:11 +00:00
foobar 9b01900321 MFH 2006-01-01 19:00:53 +00:00
Marcus Boerger e5ab119ad3 - dos2unix 2006-01-01 17:27:31 +00:00
Rasmus Lerdorf e2dd2d7e7a Fix the build 2006-01-01 17:24:32 +00:00
Andrey Hristov 3a75666285 WS 2006-01-01 16:55:01 +00:00
Andrey Hristov d03aea048f fetch more than one row at once 2006-01-01 16:52:05 +00:00
foobar 62b9a736bf MFH: oops 2006-01-01 13:27:13 +00:00
foobar 63e14480fc fix typo 2006-01-01 13:13:52 +00:00
foobar 12894cc1b6 update credits 2006-01-01 13:04:33 +00:00
foobar 5bd93221a8 bump year and license version 2006-01-01 12:51:34 +00:00
foobar 220490222a - Fix date 2006-01-01 12:47:32 +00:00
foobar 56567d31b3 Update license to 3.01 2006-01-01 12:30:06 +00:00
foobar e3fd31503b bump the year and license version 2006-01-01 12:26:08 +00:00
Marcus Boerger 9846878450 - MFH Fix environment handling 2005-12-31 17:48:26 +00:00
Marcus Boerger 8479546920 - MFH Fix tests 2005-12-31 17:42:39 +00:00
foobar 90c6bfd259 BFN 2005-12-31 00:57:29 +00:00
foobar 8d63360fc4 MFH:- Fixed bug #35377 (undefined reference to "fdatasync") 2005-12-31 00:56:06 +00:00
Rasmus Lerdorf c7d2d2a689 MFH - instantiated is correct 2005-12-30 17:15:55 +00:00
Marcus Boerger c2c7bc6a10 - WS 2005-12-30 15:05:17 +00:00
Marcus Boerger 2a140b8f40 - Allow to specify ini to use for test executeable 2005-12-30 13:39:54 +00:00
Marcus Boerger dc7ecd41ef - If user wnats help, don't complain about missing environment 2005-12-30 13:31:48 +00:00
Marcus Boerger bb29557060 - Need to set precision in ini 2005-12-30 12:49:46 +00:00
foobar b905bddda8 MFH 2005-12-30 12:21:48 +00:00
Marcus Boerger ad5af84a3c - Fix test 2005-12-30 11:44:21 +00:00
foobar c5b9552891 MFH: typofix 2005-12-30 05:40:43 +00:00
Rui Hirokawa b0ccd89450 MFH:added Turkish language definition (related to bug #29955) 2005-12-30 00:49:24 +00:00
Ilia Alshanetsky 5c32e974aa Not a fatal error. 2005-12-29 21:59:39 +00:00
Derick Rethans 25aeeb5e25 - Fixed bug #35751 (using date with a timestamp makes httpd segfault). 2005-12-29 10:54:07 +00:00
Georg Richter a5acdfc5f2 Fix for bug #35517:
added missing unsigned flag for result buffer
	fixed returncode in mysql_stmt_fetch for data truncation
2005-12-29 09:49:19 +00:00
Sara Golemon 3795f9d8bb MFH(r-1.7) Silence compiler warning: unused variable 2005-12-29 06:02:17 +00:00
Ilia Alshanetsky 0e396980a1 Fixed bug #35817 (unpack() does not decode odd number of hexadecimal values) 2005-12-28 20:55:14 +00:00
Antony Dovgal b5aeda4e65 tweak the fix 2005-12-27 23:26:55 +00:00
Antony Dovgal f046cdf3fa fix #35821 (array_map() segfaults when exception is throwed from the callback) 2005-12-27 22:32:01 +00:00
Derick Rethans 21e1f5da43 - MFH: Upgraded timezone db to 2005.18. 2005-12-27 19:50:13 +00:00
Ilia Alshanetsky f34a85bc58 Improve "skip" checks 2005-12-27 17:16:41 +00:00
Antony Dovgal d7c1980a21 typofix 2005-12-26 23:58:42 +00:00
foobar 73ab144544 MFH: fix test 2005-12-26 18:30:33 +00:00
foobar 74d3631062 reorder 2005-12-26 16:18:44 +00:00
foobar 64363f71f2 fix news 2005-12-26 16:17:56 +00:00
Antony Dovgal 537900c8e8 add new test for recently fixed bug 2005-12-26 15:05:38 +00:00
Marcus Boerger 8b35266a35 - BFN 2005-12-26 14:48:58 +00:00
Marcus Boerger 22ee7f8e3e - MFH Support full range of floats 2005-12-26 14:46:49 +00:00
Marcus Boerger ec1a7e02d4 - SWH (WS + memory corruption fix) 2005-12-26 13:41:58 +00:00
Zeev Suraski 7669169bd5 Whitespace fix (don't ask :) 2005-12-26 09:28:38 +00:00
Dmitry Stogov 56d78654a3 Reverted invalid fix for bug #35785 2005-12-26 08:18:38 +00:00
Pierre Joye 6bcb57fc2b - xslt/exslt versions constants entry 2005-12-26 00:59:32 +00:00
Pierre Joye 41284d17b0 - MFH: #35805 add LIBXSLT_VERSION, LIBXSLT_DOTTED_VERSION, LIBEXSLT_VERSION
and LIBEXSLT_DOTTED_VERSION
2005-12-26 00:56:41 +00:00
Antony Dovgal 386581b3f8 add missing skipif tag 2005-12-25 22:38:14 +00:00
Pierre Joye 7ebca7d3b7 - imagecolormatch fix and changes 2005-12-25 20:34:59 +00:00
Pierre Joye d07b094461 - MFH: raise warnings instead of errors in colormatch 2005-12-25 20:33:05 +00:00
Ilia Alshanetsky 077559d3e4 Make MySQL driver use ANSI complaint quoting style. 2005-12-25 20:30:40 +00:00
Pierre Joye f5a7694305 - MFH: fix segfault/leak in imagecolormatch
- MFH: test for imagecolormatch
2005-12-25 19:39:53 +00:00
foobar cfda375620 MFH 2005-12-25 16:04:15 +00:00
Rui Hirokawa ef0c0cc62b MFH: fixed #35711, added mbstring.strict_detection to detect the encoding striktly. 2005-12-25 15:23:55 +00:00
Ilia Alshanetsky 2e50763315 Fixed memory corruption that affected pdo_sqlite2. 2005-12-24 17:41:04 +00:00
Marcus Boerger 319dff73fb - Make this work with VPATH builds too 2005-12-24 12:23:09 +00:00
Marcus Boerger 6c2ebc6d76 - MFH Require re2c 0.9.11 and use correct version notation 2005-12-24 11:38:05 +00:00
Rui Hirokawa 11105b1eed MFH: fixed #35711 ISO-8859 charset not correctly detected. 2005-12-24 04:32:42 +00:00
Andrey Hristov caac5ef86d move the message to where it belongs 2005-12-23 22:27:23 +00:00
Andrey Hristov eea08af619 fix small memory leak which emerged two days ago 2005-12-23 22:22:42 +00:00
Marcus Boerger 1a36aaf874 - BFN 2005-12-23 20:40:52 +00:00
Marcus Boerger 9a6a266b16 - MFH Fixed Bug #35785 (SimpleXML memory read error) 2005-12-23 20:32:15 +00:00
Marcus Boerger ad61a18a2e - MFH Add new test 2005-12-23 20:26:41 +00:00
Marcus Boerger 42f8bef053 - MFH Fix test by splitting it 2005-12-23 20:04:30 +00:00
Marcus Boerger b1cb83f3c9 - MFH Fix handling of bork tests 2005-12-23 19:40:12 +00:00
Ilia Alshanetsky 7f75b5fbf4 RC2 not RC1 2005-12-23 19:12:28 +00:00
foobar d411d72053 MFH:fix mkdir() function properly (patch by nlopess) 2005-12-23 18:57:39 +00:00
Stefan Esser f7c77f0f33 Beware of format strings... 2005-12-23 18:23:43 +00:00
foobar fc6d0f3264 BFN 2005-12-23 18:00:03 +00:00
Rui Hirokawa 4628a41c00 MFH: fixed #29955 mb_strtoupper() / lower() broken with Turkish encoding.. 2005-12-23 15:18:52 +00:00
Ilia Alshanetsky 983263ce5d Bug fixing news 2005-12-23 14:43:57 +00:00
Ilia Alshanetsky e18a1d7c08 Back to dev 2005-12-23 14:42:49 +00:00
Antony Dovgal 248be6fcfc fix #35781 (stream_filter_append() can cause segfault) 2005-12-23 14:32:11 +00:00
Rui Hirokawa cf90abfc24 MFH: fixed #28899 mb_substr() and substr() work differently when mbstring.func_overload is enabled. 2005-12-23 11:15:16 +00:00
Marcus Boerger 35343ffaec - MFH Do not test output escaping here 2005-12-23 08:44:43 +00:00
Edin Kadribasic a151e632d5 MFH: Back out a portion of the previous patch which broke win32 file functions 2005-12-22 21:33:38 +00:00
Marcus Boerger 3515689363 \# Damn ! 2005-12-22 20:27:11 +00:00
Marcus Boerger 8c4d236546 - MFH Point to README.TESTING 2005-12-22 20:24:46 +00:00
Andrey Hristov a0872d6bed BFN
#if it is not clear from the previous commit that fixes the bug. the leaks
#does not come from the fix bug from some other bug.
2005-12-22 18:13:47 +00:00
Andrey Hristov 1c0971f3ce fix for bug# 35759
(mysqli_stmt_bind_result() makes huge allocation when column empty)
#this shows some leaks now, which has to be investigated but closes the
#bug report.
2005-12-22 18:11:39 +00:00
Dmitry Stogov 9c2ea13abc Fixed bug #35612 (iis6 Access Violation crash). (alacn dot uhahaa at gmail dot com) 2005-12-22 16:46:15 +00:00
Zeev Suraski a034972797 Fix prototype 2005-12-22 14:55:55 +00:00
Ilia Alshanetsky 7c17499079 5.1.2RC1 2005-12-22 14:17:56 +00:00
Dmitry Stogov ad90780930 Fixed memory leak 2005-12-22 09:16:11 +00:00
Marcus Boerger c5b4115fd6 - Find lib in default locations, too 2005-12-22 08:57:38 +00:00
Marcus Boerger 7f6018aa3a - WS 2005-12-22 00:37:07 +00:00
Marcus Boerger 53e37ac843 - Fix memleak 2005-12-22 00:35:37 +00:00
Antony Dovgal c01d79b2df merge two skipif entries 2005-12-22 00:19:28 +00:00
Marcus Boerger 0986f33d1e - Fix memleak 2005-12-22 00:06:38 +00:00
foobar 34ff54e4c7 Better be a bit more verbose 2005-12-21 22:48:50 +00:00
Frank M. Kromann a7d2ac4189 Fix #35730 Use correct character encoding with FreeTDS 2005-12-21 22:43:06 +00:00
Marcus Boerger 970298401b - MFH Add --[keep|show]-[all|skip|php] switches 2005-12-21 22:23:55 +00:00
Marcus Boerger fc0fe6472e - MFH Add missing skipif 2005-12-21 22:22:33 +00:00
foobar 59aecb1d88 MFH:- Fixed bug #35461 (Ming extension fails to compile with ming 0.3beta1) 2005-12-21 21:44:15 +00:00
Marcus Boerger fe3f66e188 - We need to store the length of the class name 2005-12-21 20:05:24 +00:00
Ilia Alshanetsky 8710b8c5f5 Don't lose track of exec() errors in pdo_sqlite2 2005-12-21 16:23:12 +00:00
foobar d09ad216a0 MFH: prevent compile failure with --disable-all 2005-12-21 14:22:26 +00:00
Antony Dovgal 604990d6a5 fix test, add test for 64bit platform 2005-12-21 12:16:20 +00:00
Antony Dovgal b7d5d7047b fix test 2005-12-21 11:46:26 +00:00
Antony Dovgal c92ae847c7 add missing skipif conditions
fix existing ones
2005-12-21 11:42:06 +00:00
Antony Dovgal 97200944d2 add skipif conditions 2005-12-21 10:49:51 +00:00
Antony Dovgal fb607b0327 BFN 2005-12-21 10:21:31 +00:00
Antony Dovgal 81a2bacdc4 fix #35760 (sybase_ct doesn't compile on Solaris) 2005-12-21 10:18:32 +00:00
Pierre Joye f90214347e - MFH: add tests, ~70% coverage 2005-12-21 03:58:59 +00:00
Pierre Joye d831a501f7 - MFH: typo in error msg 2005-12-21 02:59:50 +00:00
Pierre Joye ab056b02a1 - fix {{{ 2005-12-21 01:12:24 +00:00
Marcus Boerger 8e43f0085b - Apply workaround only when neccessary 2005-12-20 21:38:28 +00:00
Marcus Boerger eb99c74567 - MFH move zend_object_Value definition to zend_types.h 2005-12-20 21:37:52 +00:00
Marcus Boerger af264f6f0d - MFH add Z_OBJVAL*() macros 2005-12-20 21:37:19 +00:00
Marcus Boerger 81c25d8700 - Get rid of compiler warnings (both postgres an dphp use these defines) 2005-12-20 21:10:43 +00:00
Derick Rethans 48336bcd71 - This check is unnecessary, as it can only be set through the
date_default_timezone_set() function which checks the value already.
2005-12-20 19:58:44 +00:00
Derick Rethans f0a0f89a2c - MFH: Fixed bug #35660 (AIX TZ variable format not understood, yields UTC
timezone).
2005-12-20 19:54:10 +00:00
Antony Dovgal 3782a4acf2 fix test description 2005-12-20 17:00:24 +00:00
Antony Dovgal 670b075f87 fix notice 2005-12-20 16:17:30 +00:00
Derick Rethans 97ec0f3db5 - Fixed bug #35699 (date() can't handle leap years before 1970). 2005-12-20 15:58:01 +00:00
Ilia Alshanetsky 3450841dbe Updated libsqlite in ext/pdo_sqlite to 3.2.8. 2005-12-20 15:33:03 +00:00
Ilia Alshanetsky 61c9b22536 Updated libsqlite in ext/sqlite to 2.8.17.
Use in-memory database for tests.
2005-12-20 15:26:26 +00:00
Ilia Alshanetsky 5961160f95 Proper error handling for persistent connections. 2005-12-20 14:50:12 +00:00
Ilia Alshanetsky cd82349b9e Fixed bug #31347 (is_dir and is_file (incorrectly) return true for any
string greater then 255 characters).
2005-12-20 14:24:24 +00:00
Ilia Alshanetsky 5df2f5df42 Fixed bug #31347 (is_dir and is_file (incorrectly) return true for any string
greater then 255 characters).
2005-12-20 14:24:14 +00:00
Antony Dovgal efff8a45e2 more SPL leak fixes 2005-12-20 12:41:24 +00:00
Antony Dovgal 9255733c4f fix leak appearing when __autoload() throws an exception 2005-12-20 11:25:34 +00:00
Antony Dovgal 84326a9b72 add test for #35740 2005-12-20 09:51:53 +00:00
Antony Dovgal aec3b4e73c fix #35740 (memory leak when including a directory) 2005-12-20 09:47:57 +00:00
Ilia Alshanetsky 4e09db1dbf Fixed possible memory corruption. 2005-12-19 16:33:46 +00:00
Rob Richards 78244d64af BFN 2005-12-19 14:18:05 +00:00
Rob Richards fc4ebee3e3 MFH: Fixed bug #35447 (xml_parse_into_struct() chokes on the UTF-8 BOM)
add test
2005-12-19 14:17:30 +00:00
Antony Dovgal 2a130b19fc fix possible reads of uninitialized memory (reproducible only on 64bit platforms) 2005-12-19 13:53:06 +00:00
Derick Rethans e8a7e6a8cf - Upgraded timezone database to 2005.17. 2005-12-19 13:31:08 +00:00
Derick Rethans 7b581f6d19 - MFH: Merged new timelib, which is a bit more cleverer
- MFH: Support "UTC" in strtotime() properly.
- MFH: Added astro code, which is going to form the base for the new sunfuncs.
2005-12-19 13:00:37 +00:00
Marcus Boerger 32220d2e7e - Check for result of getIterator() call 2005-12-19 00:45:28 +00:00
Marcus Boerger e989e9f70f - Fix reference counting 2005-12-19 00:32:51 +00:00
foobar ae5204a02a MFH: - Fixed bug #35723 (xmlrpc_introspection.c fails compile per C99 std) 2005-12-18 22:59:57 +00:00
Antony Dovgal 9e8a1bfcbe fix leak in SPL iterators 2005-12-18 22:52:24 +00:00
Antony Dovgal 8aedeb8513 tix fypo 2005-12-18 21:17:07 +00:00
Antony Dovgal 0d38bc9f80 MFH: more spelling fixes 2005-12-18 21:01:27 +00:00
Antony Dovgal 5500dea5f1 MFH: fix spelling 2005-12-18 20:57:27 +00:00
foobar 93d339bede touch with re2c 0.9.11 2005-12-18 20:01:22 +00:00
Ilia Alshanetsky 2a29db4b2b Fixed UTC handling problem stemming from an earlier fix for bug #35422. 2005-12-18 16:15:45 +00:00
Derick Rethans 20b97141d4 - Those should be lower case only. 2005-12-18 16:06:57 +00:00
Zeev Suraski 5238fb0bee Fix prototypes 2005-12-18 15:58:51 +00:00
Marcus Boerger 86ecf121e5 - MFH Fix --version 2005-12-18 15:47:07 +00:00
Zeev Suraski b1264f7172 prototype fix 2005-12-18 15:46:46 +00:00
Zeev Suraski 99cd9ed713 Fix protos 2005-12-18 15:40:34 +00:00
Zeev Suraski 59dc41f761 Fix prototype 2005-12-18 15:38:08 +00:00
Marcus Boerger 2b413f7af2 - MFH End test script when detecting '===DONE===' that way showing memleaks 2005-12-18 14:50:33 +00:00
Ilia Alshanetsky 6654b31e26 fixed test for ZTS 2005-12-18 14:22:48 +00:00
Ilia Alshanetsky b6f856fbec Test fixes 2005-12-18 14:21:27 +00:00
Zeev Suraski 2f3678eb44 Fix prototype 2005-12-18 14:00:23 +00:00
Marcus Boerger 8d4080a6e1 - MFH Add missing prefixes 2005-12-18 13:01:20 +00:00
Marcus Boerger 29f5ce9af3 - MFH Speling 2005-12-18 12:54:41 +00:00
Antony Dovgal 46f922bdf7 MFH: fix possible usage of uninitialized variable 2005-12-18 12:50:28 +00:00
Marcus Boerger 6370ae56ed - MFH Increase timeut for -m testing 2005-12-18 12:08:18 +00:00
foobar a9ffac3eda it is easier to spot fixes when you know what and where something was fixed 2005-12-18 00:07:40 +00:00
foobar 5da39c99c6 fix news 2005-12-18 00:02:35 +00:00
Ilia Alshanetsky 58bd1ac860 bug fixing news 2005-12-17 20:09:08 +00:00
Ilia Alshanetsky ab55ed15d5 Fixed parameter parsing for setIndent() method. 2005-12-17 20:04:57 +00:00
Ilia Alshanetsky b83a0eb10c Fixed memory corruption when FETCH_LAZY mode is being used. 2005-12-17 20:00:00 +00:00
Ilia Alshanetsky 8370e1aca4 Fixed uninitialized variable in a test. 2005-12-17 19:57:37 +00:00
Ilia Alshanetsky f7276af1c6 Fixed compiler warning 2005-12-17 18:26:15 +00:00
Ilia Alshanetsky c2ed71a879 Retry on failed prepare resulting from duplicate statement name. 2005-12-17 17:59:05 +00:00
Pierre Joye 94518ca8e4 - add leaks fix in imagecreatefromstring 2005-12-17 17:52:44 +00:00
Pierre Joye 1024844a41 - MFH:
- fix leaks and wrong error when invalid/empty string are given to
  imagecreatefromstring
- add test for imagecreatefromstring
- add test for palettecopy
2005-12-17 17:46:59 +00:00
Ilia Alshanetsky 87db368a75 Added token for capturing arbitrary whitespace blocks inside text. 2005-12-17 16:33:38 +00:00
Antony Dovgal bfb72e0c08 change int to long and fix valgrind warnings 2005-12-17 16:07:47 +00:00
Marcus Boerger 905007669d - BFN 2005-12-17 15:53:40 +00:00
Marcus Boerger 18a99796ad - MFH Fix Bug #35720 A final constructor can be overwritten 2005-12-17 15:51:52 +00:00
Marcus Boerger adc26d2bca - Fix export 2005-12-17 15:41:56 +00:00
Marcus Boerger 8c991f6a49 - Add optional dependency to ext/dom 2005-12-17 15:40:37 +00:00
foobar 849a614275 - Fix test 2005-12-17 14:54:41 +00:00
Marcus Boerger 70a53e10c6 - Simplify (+fix memleak) 2005-12-16 23:58:38 +00:00
Andrei Zmievski e6ae0e99c3 MFH 2005-12-16 22:45:12 +00:00
Marcus Boerger e4210e3851 - Drop superflous param 2005-12-16 22:38:17 +00:00
Ilia Alshanetsky 579e00d489 Fixed bug #35705 (strtotime() fails to parse soap date format without TZ). 2005-12-16 22:36:46 +00:00
Antony Dovgal dfcc155c76 fix compile warning with Apache2 and Zend VM disabled
(someone forgot to do MFH)
2005-12-16 22:29:34 +00:00
Marcus Boerger 69fdadf1a0 - Add SplTempFileObject to output 2005-12-16 22:29:02 +00:00
Marcus Boerger 10f77a5d71 - Add/fix tests 2005-12-16 22:19:02 +00:00
Marcus Boerger 4bb39ad2a5 - Fix is_callable usage 2005-12-16 22:18:11 +00:00
Marcus Boerger 57492cc2d4 - Provide better error message when using illegal function 'pointers' 2005-12-16 22:17:32 +00:00
Marcus Boerger 0cd997d79c - Simplify and synch is_callable_ex() with actual execution code
. Allow array($this, 'parent::method') for function 'pointers'
  . Spit out E_STRICT in case of erroneous use of function 'pointers'
2005-12-16 22:15:41 +00:00
Antony Dovgal 418223e2f6 fix #35713 (getopt() returns array with numeric strings when passed options like '-1') 2005-12-16 20:09:16 +00:00
Antony Dovgal 17907a50cd fix test
add new one for 64bit only
2005-12-16 15:52:09 +00:00
Antony Dovgal 460a4fecef fix test 2005-12-16 14:57:29 +00:00
Antony Dovgal 8fee6ac1e2 fix test 2005-12-16 14:50:47 +00:00
Ilia Alshanetsky 84cd3c125c Cleanup code and prevent usage of uninitialized variable. 2005-12-15 22:54:15 +00:00
Antony Dovgal 33c87b395f MFH: fix #35692(iconv_mime_decode() segfault, with libiconv only) 2005-12-15 22:49:22 +00:00
Ilia Alshanetsky bdf9c4d15c Fixed bug #35694 (Improved error message for invalid fetch mode). 2005-12-15 22:33:02 +00:00
Antony Dovgal a91f9fb786 MFH: fix #35690 (pack() tries to allocate huge memory block when packing float values to strings) 2005-12-15 22:15:01 +00:00
Antony Dovgal 9417c070f6 MFH: fix C++ comments in C code 2005-12-15 13:58:10 +00:00
Ilia Alshanetsky cb3cca21b3 Fixed possible memory corruption inside mb_strcut(). 2005-12-15 03:36:53 +00:00
Frank M. Kromann 67313884c1 Export symbols needed by pecl/http 2005-12-15 02:25:58 +00:00
Marcus Boerger 5c8027584f - MFH Fix issue spotted by Wez using ms vc 2005 2005-12-14 09:55:11 +00:00
Wez Furlong 85a578e029 Possible fixes for #35552, #35592 and #35620. 2005-12-14 04:56:22 +00:00
Ilia Alshanetsky 00b9392bf5 Fixed bug #35571 (Fixed crash in Apache 2 SAPI when more then one php
script is loaded via SSI include).
2005-12-14 03:36:44 +00:00
Wez Furlong b041abbb4e Fixes for building with vs.net 2005. 2005-12-14 02:01:13 +00:00
Antony Dovgal 1b7e3fe2a5 MFH: fix spelling and #35665 2005-12-14 00:54:29 +00:00
Marcus Boerger 71c7cdb7d9 - Fix temp/memory stream modes 2005-12-14 00:06:09 +00:00
Antony Dovgal f7aec44aee MFH: use default colors to prevent any problems with existing php.ini 2005-12-13 22:32:30 +00:00
Antony Dovgal 6c65d6df59 add new test 2005-12-13 21:43:36 +00:00
Ilia Alshanetsky 3ce27140dc Fixed bug #35655 (whitespace following end of heredoc is lost). 2005-12-13 20:55:42 +00:00
Antony Dovgal 900d49a553 add missing .cvsignore files 2005-12-13 20:18:50 +00:00
Ilia Alshanetsky cdb699b497 Fixed bug #35630 (strtotime() crashes on certain relative identifiers). 2005-12-13 02:28:39 +00:00
Antony Dovgal bc22352c30 fix tests and their skip conditions 2005-12-12 21:21:11 +00:00
foobar f94b3012bd MFH 2005-12-12 19:45:01 +00:00
Marcus Boerger 882a9effe6 - Enforce termination to prevent possible SEGVs 2005-12-12 19:10:12 +00:00
foobar a8a4d7944d - Always use the builddir! 2005-12-12 12:39:50 +00:00
foobar a939717011 MFH: - added missing configure help line 2005-12-12 12:20:55 +00:00
foobar ec4fd02760 MFH 2005-12-12 11:51:45 +00:00
foobar d43833ecff MFH: cleanup test outputs 2005-12-12 11:49:45 +00:00
foobar 379cd5a6df MFH:- Include timestamp for the leaks. (to make possible matching leaks with access_log entries) 2005-12-12 11:00:57 +00:00
Dmitry Stogov db312cf18e Fixed bug #35570 (segfault when re-using soap client object) 2005-12-12 09:25:23 +00:00
Ilia Alshanetsky a74463e9bd Fixed bug #35629 (crash in http:// wrapper on multiple redirects). 2005-12-12 05:04:15 +00:00
foobar ddcc5257ac MFH: - Added missing fold tags 2005-12-11 22:38:38 +00:00
Ilia Alshanetsky f19c2e00ec Fixed bug #35624 (strtotime() does not handle 3 character weekdays).
Improved fix for bug #35414.
2005-12-11 22:35:40 +00:00
foobar 64f82f9c00 fix news 2005-12-11 22:08:43 +00:00
Edin Kadribasic f75efcb505 Bundle update news 2005-12-11 22:03:19 +00:00
Edin Kadribasic 60db0632dd Updated to libxml2 to 2.6.22, thanks to rrichards 2005-12-11 21:54:32 +00:00
Marcus Boerger bac905b982 MFH:
. Change to use sane default flags fro RecursiveDirectoryIterator
 . Drop 2nd parameter from DirectoryIterator::__construct()
2005-12-11 16:43:29 +00:00
Marcus Boerger 9bb52c750c - MFH 2005-12-11 15:29:14 +00:00
Marcus Boerger 85a261bb85 - MFH Fix tests 2005-12-11 14:50:29 +00:00
Marcus Boerger d05c2a40d8 - MFH Revert accidential 'drop in' from 1.227 2005-12-11 12:47:46 +00:00
Marcus Boerger af1d83d783 - Fix MFH (oversight problem) 2005-12-11 12:37:39 +00:00
Marcus Boerger c19fa0bbde - MFH Add method support to --rfunction 2005-12-11 02:41:04 +00:00
Marcus Boerger ba6c82eee9 - MFH --r* switches 2005-12-11 02:17:34 +00:00
foobar b3fc86b5f4 fix news 2005-12-10 18:29:29 +00:00
foobar 933d1d174c MFH 2005-12-10 18:26:52 +00:00
Ilia Alshanetsky 5e9c6555ad Fixed typo in gcov output filename 2005-12-09 21:40:24 +00:00
Rob Richards cc96967132 MFH: allow NULL prefix to create default namespace
fix tests
2005-12-09 20:52:15 +00:00
Antony Dovgal ca42324497 php_stream_get_line() is a macro and it already has TSRMLS_CC 2005-12-09 18:53:09 +00:00
Pierre Joye 7a6ac7ce16 - MFH: no need to test if jpeg support exists 2005-12-09 18:17:02 +00:00
Dmitry Stogov 599221036f Fixed bug #35612 (iis6 Access Violation crash) 2005-12-09 18:10:45 +00:00
Pierre Joye ce90a27a48 - MFH, PNG compression support exposed 2005-12-09 18:07:57 +00:00
Dmitry Stogov 5461b5a6b1 Fixed bug #34429 (Output buffering cannot be turned off with FastCGI) 2005-12-09 17:01:50 +00:00
Dmitry Stogov eef44c609b Fixed possible SIGSEGV (Rob Richards) 2005-12-09 15:29:15 +00:00
Antony Dovgal 4ccdc86561 fix C++ comment 2005-12-09 13:28:10 +00:00
Marcus Boerger b8572a0c9c - MFH Section FILE does not exist for redirection tests 2005-12-09 09:50:30 +00:00
Rob Richards c98ef984d8 MFH: enable a few additional functions
- add tests
2005-12-09 04:57:20 +00:00
Marcus Boerger 6b86285dd2 - MFH Add missing newline 2005-12-09 00:30:41 +00:00
Marcus Boerger fbeb8ae0d4 - Revert piece of MFH that shows an inconsistency - actually we should fix
this fread() issue.
2005-12-09 00:22:21 +00:00
Marcus Boerger a4d0a4c625 - MFH
. Add ability to create temp files in separate dir and keep them.
  . Add ability to create links in html results as table.
2005-12-08 22:51:01 +00:00
Antony Dovgal ccdeb10696 new tests 2005-12-08 22:30:23 +00:00
Antony Dovgal 84051ba42b MFH: improve error message 2005-12-08 22:07:30 +00:00
Antony Dovgal c287dec802 MFH: add 1 to the max_length to keep \0 at its place 2005-12-08 21:22:52 +00:00
Ilia Alshanetsky 185f085735 Include a legend in the gcov report (suggestion by Tony). 2005-12-08 21:12:03 +00:00
Antony Dovgal 0d1efb245b MFH: fix segfault in SplFileObject when file doesn't exist or cannot be read 2005-12-08 19:55:13 +00:00
Marcus Boerger 25de19a2fb - MFH Change dba/db4 to use its own locking 2005-12-08 19:35:05 +00:00
Ilia Alshanetsky 484de9c3a4 Added myself to a list of extensions/sapis I try to maintain. 2005-12-08 17:06:59 +00:00
Ilia Alshanetsky 25670c59d3 Final fix for gcov generation. 2005-12-08 16:00:28 +00:00
Ilia Alshanetsky b30602b78b Fixed bug #35594 (Multiple calls to getopt() may result in a crash). 2005-12-08 03:25:22 +00:00
Ilia Alshanetsky 3d4c1d6886 Improve fix for bug #35382 2005-12-08 03:09:14 +00:00
Ilia Alshanetsky 644cf05505 Fixed bug #34359 (Possible crash inside fopen http wrapper). 2005-12-08 02:53:08 +00:00
Michael Wallner 90bdbfa921 - release 1.1 2005-12-07 19:53:34 +00:00
Michael Wallner 24d824d4e8 - fix PECL bug #6283 - haval source file entries are missing in package.xml 2005-12-07 18:41:14 +00:00
Marcus Boerger 2d234ec4ac - Readd the file in this branch 2005-12-07 17:44:43 +00:00
Ilia Alshanetsky d5bb2e38ef Undo accidental revert of patch for bug #34729 2005-12-07 17:36:17 +00:00
Dmitry Stogov 9e8bf1a20f Fixed bug #33394 (Socket Timeout on SOAP request causes general exception in Apache process). 2005-12-07 13:56:18 +00:00
foobar bfa084ddba MFH:- Made tests that require CGI skipped if it is not available 2005-12-07 11:28:58 +00:00
foobar 241659ff70 MFH: fixed wrong logic 2005-12-07 11:12:52 +00:00
foobar e5bd8e32f5 MFH: fixed error messages 2005-12-07 10:08:42 +00:00
Rob Richards 5b561a6df3 MFH: fix res parameter typos
- add test
2005-12-07 05:09:33 +00:00
Ilia Alshanetsky 2796160d15 Better critical error handling (fix for previous html encoding patch). 2005-12-07 02:37:05 +00:00
Ilia Alshanetsky 0e46f5113c Fixed filename picker.
Various modernizations of the script.
2005-12-07 02:01:58 +00:00
Ilia Alshanetsky 24af85dfe9 Fixed memory leak 2005-12-07 01:29:14 +00:00
Marcus Boerger 8c8907458c - MFH
. Support for '--' style switches
  . Modularize output
  . Better valgrind integration (valgrind 3.0.0+ required now) (-m)
  . Ability to generate an additional html style output log (--html)
  . Ability to test unicode + native tests in one go (-U)
  . Show list of leaked files in summary if any
  . Use basename correct
2005-12-07 00:03:46 +00:00
Ilia Alshanetsky 481ec28566 Fixed bug #30760 (Remove MessageBox on win32 for E_CORE errors if
display_startup_error is off).
2005-12-06 23:32:06 +00:00
Marcus Boerger 5e223ad13b - Fix TSRM 2005-12-06 21:44:15 +00:00
Antony Dovgal 31c35e5cad add 4 new tests
remove ENV tag from the old ones
2005-12-06 19:28:25 +00:00
Sara Golemon 2b059ae91f MFH: (r-1.104) 2005-12-06 19:15:41 +00:00
Antony Dovgal dfba12435d use strlen() to get correct element length 2005-12-06 18:53:35 +00:00
Ilia Alshanetsky 085ff7f19b Fixed build of mssql extension. 2005-12-06 18:47:14 +00:00
Sara Golemon 5fd5bead8a Prep for release 2005-12-06 17:54:24 +00:00
Ilia Alshanetsky f2415625d4 MFH: Prevent header injection by limiting each header to a single line. 2005-12-06 03:39:45 +00:00
Ilia Alshanetsky aa1b0709f2 Fixed possible XSS inside error reporting functionality. 2005-12-06 03:09:24 +00:00
foobar 684d68bb27 MFH: fix docs 2005-12-06 02:30:18 +00:00
foobar 3e669bc950 MFH: nuke php3 legacy 2005-12-06 02:28:41 +00:00
foobar 347032c753 sync with HEAD 2005-12-06 02:21:01 +00:00
foobar a4295629b8 MFH 2005-12-06 02:00:14 +00:00
foobar 06b36f7cea MFH: nuke php3 legacy 2005-12-06 01:40:06 +00:00
foobar 253392f64f MFH: nuke php3 legacy 2005-12-06 01:26:44 +00:00
foobar 635e2bb028 MFH 2005-12-06 01:25:16 +00:00
foobar 4e874820e9 MFH: nuke php3 legacy 2005-12-06 01:21:28 +00:00
foobar b9af8f2719 MFH: nuke php3 legacy 2005-12-06 01:14:02 +00:00
foobar d95275052b MFH 2005-12-06 01:08:49 +00:00
foobar a3c0b190d1 MFH 2005-12-06 00:54:15 +00:00
foobar 9e1c5a32a3 MFH 2005-12-06 00:43:44 +00:00
foobar 4cbde95247 MFH 2005-12-05 23:53:05 +00:00
foobar a3af52c11e MFH: list_entry -> zend_rsrc_list_entry 2005-12-05 23:38:04 +00:00
foobar d0a54af4c5 MFH: Nuke php3 legacy 2005-12-05 22:54:01 +00:00
foobar f20a62b164 MFH:- Do not use the PHP3 era names 2005-12-05 22:43:14 +00:00
foobar f58f7f4e67 MFH: fix typo 2005-12-05 22:41:10 +00:00
foobar 66832decc5 MFH 2005-12-05 22:39:03 +00:00
foobar bbe1f9d280 MFH 2005-12-05 22:21:56 +00:00
Brian France 7154c617bf Wrap the php_session.h include in the same ifdef as the rest of the
session code.
2005-12-05 20:40:54 +00:00
Antony Dovgal 6aba1816ee more typos fixed (thanks to Mike Naberezny for noticing these) 2005-12-05 20:06:33 +00:00
Stanislav Malyshev 3eafc3d329 fix reallocation bug 2005-12-05 19:54:47 +00:00
Ilia Alshanetsky 937e9f801d Fixed bug #35558 (mktime() interpreting 3 digit years incorrectly). 2005-12-05 17:27:02 +00:00
Antony Dovgal 4ce11c2a63 improve error messages 2005-12-05 13:39:52 +00:00
Antony Dovgal 012e5bf4cd add NEWDECIMAL, NEWDATE, GEOMETRY, SET and ENUM field types 2005-12-05 13:22:14 +00:00
Antony Dovgal ab34dafb69 fix #35536 (mysql_field_type() doesn't handle NEWDECIMAL)
add also SET, ENUM, NEWDATE and GEOMETRY to the switch
2005-12-05 13:16:48 +00:00
Dmitry Stogov 9ee0707cfa Fixed bug #35509 (string constant as array key has different behavior inside object) 2005-12-05 08:56:09 +00:00
Ilia Alshanetsky 6abf54a489 Avoid gcov conflicts on non-unique filenames 2005-12-05 04:22:16 +00:00
foobar 55a299075b fix branches 2005-12-04 23:19:44 +00:00
Wez Furlong 17683295e4 switch to package2.xml 2005-12-04 22:34:26 +00:00
Wez Furlong bd0aaa0198 Fix PECL #6138 2005-12-04 18:33:26 +00:00
Ilia Alshanetsky 66fbae9d75 Added tests for new parse_url() and http_build_query() functionality. 2005-12-04 17:58:15 +00:00
Ilia Alshanetsky 2994c23670 MFH:
Added 2nd optional parameter to parse_url() that allows retrieval of
individual URL components.
Added 3rd optional parameter to http_build_query() that allows custom param
separator.
2005-12-04 17:44:27 +00:00
Ilia Alshanetsky eb83ca1cd3 load proper header file 2005-12-04 17:41:02 +00:00
Ilia Alshanetsky 15afc78f85 Fixed bug #35062 (socket_read() produces warnings on non blocking sockets). 2005-12-04 17:30:43 +00:00
Ilia Alshanetsky b01f5b35f5 Fixed gcov for generated files 2005-12-04 17:27:34 +00:00
Ilia Alshanetsky 58c05c04f4 Regen files so they work properly with gcov. 2005-12-04 17:25:05 +00:00
foobar d1ce095f84 reorder,reword 2005-12-04 14:10:22 +00:00
Antony Dovgal b09703e921 BFN 2005-12-04 11:47:18 +00:00
Antony Dovgal ca0d712c3c MFH: fix #35539 (typo in error message for ErrorException) 2005-12-04 11:47:00 +00:00
Antony Dovgal d72347f7bc MFH: fix #35543 (php crash when calling non existing method of a class that extends PDO) 2005-12-04 11:41:13 +00:00
Antony Dovgal 6190512876 MFH: fix typos in xmlwriter/config.m4 2005-12-04 00:21:39 +00:00
Antony Dovgal 3f666e1dfe MFH: add declarations
more uint -> size_t fixes
2005-12-03 23:50:33 +00:00
Antony Dovgal bb6aa3ebd3 fix #35538 (new "hash" extensions does not compile on amd64) 2005-12-03 23:31:14 +00:00
Antony Dovgal 7cf9dfe237 add .cvsignore 2005-12-03 23:27:59 +00:00
Antony Dovgal d66e492c3d MFH: yet another compile warning 2005-12-03 23:24:29 +00:00
Antony Dovgal 72e366657b MFH: fix compile warning 2005-12-03 23:20:07 +00:00
foobar c7c71b8530 MFH: - Fix bug #35530 (ext/bz2 compile failure with phpize) 2005-12-03 13:23:14 +00:00
Michael Wallner 3cfdbdbd12 - add adler32 test 2005-12-03 10:31:01 +00:00
Michael Wallner c6fb5f38c0 MFH: fix ws 2005-12-03 10:25:31 +00:00
Michael Wallner 7d8d573f0d - add test to package.xml 2005-12-03 10:19:50 +00:00
Michael Wallner f5fae65194 MFH: add crc32 test 2005-12-03 10:18:38 +00:00
foobar bde40a73db MFH: fix possible compile error 2005-12-03 01:28:16 +00:00
foobar ee372651d0 MFH: fix bug #35528 2005-12-03 01:23:25 +00:00
Sara Golemon 860c3a5a32 MFH: Add MD4 2005-12-03 01:17:48 +00:00
foobar 6c3e2b32bf MFH 2005-12-03 01:12:45 +00:00
foobar ef7cb6880f MFH 2005-12-03 01:07:00 +00:00
foobar 4bfba57f96 MFH 2005-12-03 00:00:55 +00:00
Ilia Alshanetsky 40ad5745a7 Regenerate file to be more gcov friendly 2005-12-02 17:32:36 +00:00
Marcus Boerger e9f5066faa - MFH Be picky about names 2005-12-02 16:00:45 +00:00
foobar 2e3ae884fb - touch with correct re2c version and correct options 2005-12-02 13:16:38 +00:00
foobar 2196bda958 - Fix warning 2005-12-02 13:15:58 +00:00
Michael Wallner ab6a987f86 MFJ: use --enable instead of --with 2005-12-02 10:55:33 +00:00
foobar ee72c31788 MFH 2005-12-02 08:59:35 +00:00
Ilia Alshanetsky 2fae8d37c0 Enable hash & xmlwriter by default 2005-12-02 02:18:54 +00:00
Ilia Alshanetsky bcd9356df5 Added xmlwriter to 5.1 2005-12-02 02:05:26 +00:00
Ilia Alshanetsky 950de07889 Added hash extension to PHP 5.1 2005-12-02 01:59:48 +00:00
Michael Wallner 20c3b72bf0 - export everything we've got aliases for 2005-12-01 21:07:52 +00:00
Michael Wallner 039c69da18 - use php_pcre aliases 2005-12-01 20:53:35 +00:00
Antony Dovgal 06c57b7d55 tweak fix a bit
(by request of Wez)
2005-12-01 20:39:12 +00:00
foobar b935f6f13a - Fix paths for --enable-gcov usage
# re2c -b -o ext/pdo/pdo_sql_parser.c ext/pdo/pdo_sql_parser.re
2005-12-01 20:28:27 +00:00
Michael Wallner 7901a6dbef MFH: ext/filter will need those exports
# php_compat.h still prevents linking
2005-12-01 20:07:34 +00:00
Antony Dovgal b45292a819 BFN 2005-12-01 20:01:33 +00:00
Antony Dovgal 59087fee52 MFH: fix #35508 (PDO fails when unknown fetch mode specified) 2005-12-01 19:59:58 +00:00
Antony Dovgal fc8d9584b1 fix Win32 compile failure 2005-12-01 19:25:48 +00:00
Antony Dovgal bd8df0b32a add 2 new tests
now we have one extension absolutely covered by tests, yay! =)
2005-12-01 18:22:11 +00:00
Ilia Alshanetsky 4e03ce9fc5 Fixed memory leaks 2005-12-01 16:33:01 +00:00
Ilia Alshanetsky f4248e51a4 Fixed bug #35499 (strtotime() does not handle whitespace around the date
string).
2005-12-01 16:24:52 +00:00
foobar f74f26f487 fix news 2005-12-01 15:29:40 +00:00
Andrey Hristov c23052d6d2 fix compile failure on Windows - Microsoft hasn't heard of long long :) 2005-12-01 14:12:56 +00:00
Antony Dovgal 7a652e397b fix #35490 (socket_sendto() unable to handle IPv6 addresses) 2005-12-01 14:02:54 +00:00
Antony Dovgal f496bf9dda MFH: fix potential problem in php_oci_bind_post_exec() when OCIDateToText() fails 2005-12-01 13:47:22 +00:00
Antony Dovgal da6e561d2b announce the OCI8 upgrade in the news entry 2005-12-01 13:41:53 +00:00
Antony Dovgal 3756201e04 upgrade bundled OCI8 to v.1.1 2005-12-01 13:39:48 +00:00
Dmitry Stogov 916ad6c8f7 Fixed bug #35437 (Segfault or Invalid Opcode 137/1/4) 2005-12-01 12:50:58 +00:00
Dmitry Stogov 8768ab94b3 Fixed bug #34729 (Crash in ZTS mode under Apache) 2005-12-01 11:48:17 +00:00
Rob Richards 673dc5ee5f fix build - zend_reflection_api.c is no more 2005-12-01 11:11:46 +00:00
Andrey Hristov c1cb5e6885 mysqli is since many months not experimental
add myself as maintainer. discussed with georg.
2005-12-01 09:49:48 +00:00
foobar 8c7f03c8a4 MFH: - Fix paths for --enable-gcov 2005-12-01 09:34:20 +00:00
foobar 0a1ba06e5d MFH: - Use correct configure option style. Enabled by default. 2005-12-01 08:54:22 +00:00
Wez Furlong c83472edf1 prep for release 2005-12-01 05:16:24 +00:00
foobar d23ad35375 sync with docs (?) 2005-12-01 00:42:13 +00:00
Ilia Alshanetsky ae07423bcd Fixed bug #35496 (Crash in mcrypt_generic()/mdecrypt_generic() without
proper init).
2005-11-30 23:51:25 +00:00
Antony Dovgal 9c2183f622 add new test
improve gcov stats =)
2005-11-30 23:34:08 +00:00
Ilia Alshanetsky 911355bee8 Fixed memory leak 2005-11-30 23:27:15 +00:00
foobar de8052aa41 MFH 2005-11-30 22:47:03 +00:00
Marcus Boerger 279e4f7219 - Reflection was moved into its own extension 2005-11-30 21:58:01 +00:00
Marcus Boerger 7cb0480d04 - Moved reflection into its own extension 2005-11-30 21:53:20 +00:00
Marcus Boerger 16177d63f2 - MFH Move reflection to its own extension
# As discussed with RM
2005-11-30 21:46:26 +00:00
Ilia Alshanetsky c60079862b Fixed bug #35410 (wddx_deserialize() doesn't handle large ints as keys
properly).
2005-11-30 18:10:19 +00:00
Andrey Hristov a8a55dc086 BFN 2005-11-30 16:23:20 +00:00
Andrey Hristov 4ec16344a9 add a test case
fix incorrect handling of unsigned bigint.
optimize handling of unsigned int
2005-11-30 16:20:25 +00:00
Andrey Hristov a8c0463961 fix more leaks. handle better unknown type (4.1.x connected to 5.0.x
incompatibility)
2005-11-30 15:26:41 +00:00
foobar 5b6cc7d96c MFH: - Fix the ccache detection 2005-11-30 15:01:34 +00:00
foobar e20b4ab640 bfn 2005-11-30 12:35:55 +00:00
Andrey Hristov b6b6ec2a97 BFN 2005-11-30 11:38:11 +00:00
Andrey Hristov c230f7defb fix a crash and a leak.
4.1.15 (client) -> 5.x (server) because of the incompatibility because of
decimal in the protocol binding may fail. Don't close the statement in
that case because subsequent ->execute() will crash or any other function
that will try to use already freed (and in debug mode thrashed) pointer.
#probably more problems exist because of the 4.1.x -> 5.x protocol
#incompatibility
2005-11-30 11:35:03 +00:00
Antony Dovgal 22efcfd530 MFH: fix possible crash in pdo_mysql_stmt_dtor() 2005-11-30 11:33:07 +00:00
Dmitry Stogov 6357acc086 *** empty log message *** 2005-11-30 10:30:38 +00:00
Dmitry Stogov 0a5d10a5b9 Fixed bug #35373 (HP-UX "alias not allowed in this configuration") 2005-11-30 10:29:44 +00:00
Dmitry Stogov 02aad34c43 Fixed bug #35470 (Assigning global using variable name from array doesn't function) 2005-11-30 10:09:37 +00:00
Wez Furlong 7eb04b7907 Fix dep usage; it must appear after the PHP_NEW_EXTENSION line.
pdo and spl are both optional dependencies.
2005-11-30 04:50:03 +00:00
Wez Furlong 046bff25fb Fix bugs #35379 and #35432 by erroring out when the user configures PHP
extensions with conflicting options.

Jani, feel free to refine the way that extensions are detected as shared :)

For this to be foolproof, we either need to guarantee that the extensions have
their PHP_NEW_EXTENSION invoked in the right sequence.  Eg: PDO should be
handled in the configure script before any of the extensions that depend on it
are handled... tricky.

By happy coincidence, the alphabet ensures that pdo is configured before all
the pdo_ extensions, and also before sqlite, so this works for now.
2005-11-30 04:47:24 +00:00
Wez Furlong 559c624806 Fix PECL Bug #6102; fails to configure for instant client on OSX.
In addition, make it work for the instant client install on my gentoo box.
2005-11-30 03:18:09 +00:00
foobar 30dc899c2e MFH: - Added --enable-gcov configure option to enable C-level code coverage. 2005-11-29 23:20:01 +00:00
Ilia Alshanetsky ea80259eb3 Fixed ZTS build 2005-11-29 23:10:15 +00:00
foobar 49f673979b - automake is not needed 2005-11-29 22:41:15 +00:00
foobar 128119b9ab MFH 2005-11-29 22:39:19 +00:00
Ilia Alshanetsky 6f5b9894a2 Added missing support for 'B' format identifier to date() function. 2005-11-29 20:43:53 +00:00
Ilia Alshanetsky 820b5aa9e4 Fixed bug #35425 (idate() function ignores timezone settings). 2005-11-29 20:19:56 +00:00
Antony Dovgal 28dfe0dfd9 remaining part of the fix (-o -> ||) 2005-11-29 18:35:26 +00:00
Antony Dovgal 1cbe552f4d change "-o" to "||" (fixes potential problems on weird systems where test doesn't support -o) 2005-11-29 18:26:02 +00:00
Ilia Alshanetsky d79e01e211 Fixed compiler warnings 2005-11-29 18:17:46 +00:00
foobar 37661c8b39 - Always use the right sed 2005-11-29 17:32:40 +00:00
foobar efcd3e318b cleanup + fix link problems with old mysql versions 2005-11-29 17:31:13 +00:00
Ilia Alshanetsky bc9fc0d6cf Fixed tests 2005-11-29 16:25:16 +00:00
Ilia Alshanetsky 0242b892d2 Fixed bug #35427 (str_word_count() handles '-' incorrectly). 2005-11-29 16:14:19 +00:00
foobar d61e8d63fd - Update bundled libtool to 1.5.20 2005-11-29 15:58:54 +00:00
foobar 5db70599d1 be very clear what you fixed 2005-11-29 08:16:00 +00:00
foobar 4250a26f5c - Regenerated with working re2c and with proper options 2005-11-29 08:10:59 +00:00
Wez Furlong 40666b6708 proto fixups 2005-11-29 04:06:03 +00:00
Marcus Boerger 5d1cf6a544 - BFN 2005-11-29 03:35:33 +00:00
Marcus Boerger 6dec77d25e - MFH Add class SplFileInfo as base for DirectoryIterator and SplFileObject
# As discussed with ilia before 5.1.0
2005-11-29 03:33:59 +00:00
Marcus Boerger 4a400ce14f - BFN (reorder + missed another one) 2005-11-29 03:11:26 +00:00
Marcus Boerger ac48d5d24f - BFN (not to forget this one) 2005-11-29 02:58:20 +00:00
Marcus Boerger 0626f6ca0a - BFN 2005-11-29 02:53:48 +00:00
Marcus Boerger 40a3cdd97b - MFH
. Fix memleaks
  . Add tests
  . Add functions: getNamespaces(), getDocNamespaces()
  . Fixed var_dump()
  . Fixed bugs: #35028 XML object fails FALSE test
# This plan was decided before 5.1.0 came out with ilia and checked again
# just now. The extension currently shows no more memleaks or errors using
# the test suite.
2005-11-29 02:51:07 +00:00
Wez Furlong 131033352d Added PDO::pgsqlLOBCreate(), PDO::pgsqlLOBOpen() and PDO::pgsqlLOBUnlink(). 2005-11-29 02:11:39 +00:00
Ilia Alshanetsky 2ad81f4584 Fixed bug #35414 (strtotime() no longer works with ordinal suffix). 2005-11-29 01:23:29 +00:00
Ilia Alshanetsky 22f2b206b7 Fixed bug #35422 (strtotime() does not parse times with UTC as timezone). 2005-11-28 23:49:25 +00:00
foobar 52e1590285 MFH 2005-11-28 23:04:01 +00:00
Ilia Alshanetsky c2ec68ab62 Fixed bug #35456 (+ 1 [time unit] format did not work). 2005-11-28 22:24:01 +00:00
foobar 26b8b65c18 MFH: - Fixed bug #35409 (undefined reference to 'rl_completion_matches'). 2005-11-28 16:51:16 +00:00
Dmitry Stogov 14594953d2 Fixed bug #35393 (changing static protected members from outside the class, one more reference issue) 2005-11-28 14:33:03 +00:00
Andrey Hristov da9abd8b73 mysql 4.1.x gives strange result. the result in the test is generated with
5.0.16 (valid for 5.1.3).
2005-11-28 13:35:54 +00:00
foobar d69ab24f69 MFH: - Fixed bug #35381 (ssl library is not initialized properly) 2005-11-28 11:37:43 +00:00
Dmitry Stogov 13af4c9a09 Fixed bug #35399 (Since fix of bug #35273 SOAP decoding of soapenc:base64binary fails) 2005-11-28 10:08:34 +00:00
Wez Furlong b15e33f85a prep for release 2005-11-28 06:39:53 +00:00
Wez Furlong d0ea27b802 API for connection dependent objects to add/del refs to dbh's. 2005-11-28 05:23:22 +00:00
foobar 419a9c6cac - Fixed wrong usage of AC_TRY_COMPILE() macro 2005-11-27 23:22:43 +00:00
Antony Dovgal 5a606e0be3 use || instead of -o to support weird systems with old test 2005-11-27 22:59:54 +00:00
Wez Furlong b4dd85ff46 update changelog here too 2005-11-27 21:18:24 +00:00
Wez Furlong 7a05927e44 BFN 2005-11-27 21:17:17 +00:00
Wez Furlong 63dae4ee74 Fix #35431; LAZY fetch and fetchAll == crash.
Lazy makes no sense with fetchAll; disallow it.
2005-11-27 21:01:58 +00:00
Antony Dovgal 6543134dea MFH: fix #35430 (PDO crashes on incorrect FETCH_FUNC use) 2005-11-27 21:01:02 +00:00
Ilia Alshanetsky cdbe4a5cab Improved safe_mode/open_basedir check. 2005-11-27 20:07:36 +00:00
Antony Dovgal 3b3f8137c3 MFH: plug memory leak
fix config.m4
2005-11-27 18:36:11 +00:00
Ilia Alshanetsky 4320984303 Back to dev 2005-11-27 17:29:54 +00:00
foobar 8b443a1851 Back from future 2005-11-27 16:33:18 +00:00
Ilia Alshanetsky b81012c718 removed no longer relevant portion. 2005-11-27 15:39:09 +00:00
Ilia Alshanetsky bd196f4bd0 Adjust news 2005-11-27 15:38:07 +00:00
Ilia Alshanetsky 93608bf8a5 5.1.1 2005-11-27 14:19:40 +00:00
foobar fc34aa8489 fix news 2005-11-27 13:24:53 +00:00
Marcus Boerger e678e7a6af - BFN 2005-11-27 12:24:55 +00:00
Marcus Boerger e8ec9a98dd - Fixed bug #35423 RecursiveDirectoryIterator doesnt appear to recurse with RecursiveFilterIterator 2005-11-27 12:22:54 +00:00
Rob Richards 51e3beb4cb BFN 2005-11-27 12:22:04 +00:00
Rob Richards 934e19107d Fixed bug #35316 (Application exception trying to create COM object) 2005-11-27 12:19:04 +00:00
Marcus Boerger c37b13e0db - MFH Editor blocks 2005-11-27 12:16:14 +00:00
Marcus Boerger 9aebeaaf09 - MFH Synch with what we decided for 5 and what we are practicing since 5 2005-11-27 11:06:07 +00:00
Ilia Alshanetsky b3a48855ab Disabled native date class, to prevent pear::date conflict. 2005-11-27 06:51:43 +00:00
Ilia Alshanetsky 331726338b tokenizer fixes for bug #35382
Bug fixing news
2005-11-27 06:41:32 +00:00
Ilia Alshanetsky 497fae9d1f Fixed bug #35411 (Regression with \{$ handling).
Fixed bug #35382 (Comment in end of file produces fatal error).
2005-11-27 06:39:31 +00:00
Wez Furlong ef08c58664 update the todo list 2005-11-26 21:29:31 +00:00
Wez Furlong 339b4dbd6f going stable 2005-11-26 21:25:39 +00:00
Wez Furlong ab6a675131 going to release 1.0.1 2005-11-26 21:22:49 +00:00
Wez Furlong 426fb96cc9 Doh, need to canonicalize parameter names (by prefixing with :) before
attempting to remap them to positional args.
2005-11-26 21:20:52 +00:00
Ilia Alshanetsky 36d62a2f84 Bug fixing news 2005-11-26 21:04:42 +00:00
Ilia Alshanetsky 0b9f9de012 No longer dev 2005-11-26 21:03:44 +00:00
Wez Furlong 85ad81736c set to 1.0 stable. 2005-11-26 20:50:08 +00:00
foobar 1ea0bae9c0 fix test 2005-11-26 13:38:28 +00:00
Marcus Boerger 57f76446cf - MFH Add new test 2005-11-26 13:23:27 +00:00
Marcus Boerger 0f3d8acfd6 - BFN 2005-11-26 13:12:52 +00:00
Marcus Boerger 46ae03d872 - MFH Fix bug #35406 eval hangs when evall'ed code ends with comment w/o newline 2005-11-26 13:11:26 +00:00
Antony Dovgal 7241dea7ef fix Timezone class too 2005-11-26 12:35:27 +00:00
Antony Dovgal b6307d1014 MFH: fix #35402 (New date class causes crash in get_object_vars()) 2005-11-26 09:40:54 +00:00
Rasmus Lerdorf 4e3cd72df5 Typo 2005-11-26 06:22:14 +00:00
Rui Hirokawa 244c9a4ba0 5th argument of mb_encode_mimeheader() was not acceptable. 2005-11-25 21:55:25 +00:00
Wez Furlong c0c096b752 fix configure 2005-11-25 17:07:49 +00:00
foobar 366832fbd2 MFH: Fixed wrong usage of ZEND_EXTENSION_API_NO (these are not Zend exts :) 2005-11-25 16:01:41 +00:00
Wez Furlong 4e4b98a66d Use right define: ZEND_MODULE_API_NO as these are PHP modules, not Zend extensions 2005-11-25 15:42:26 +00:00
Antony Dovgal dc0db7382c MFH: fix #35391 (pdo_mysql::exec does not return number of affected rows) 2005-11-25 12:56:04 +00:00
Antony Dovgal 350aec954e MFH: ICC doesn't support __attribute__ for pointers 2005-11-25 12:25:05 +00:00
Wez Furlong 7107105429 Update the TODO list. 2005-11-25 07:23:55 +00:00
Wez Furlong 17f504a0ec actually, bytea is not required for LOBs in postgres; good! 2005-11-25 03:37:01 +00:00
Wez Furlong 70331c361e Addresses #35338.
Postgres client API is pretty poor, so we have zero idea about the actual
parameter types in a statement.

We now defer the preparation of a statement until the first call to execute is
made.  At that point, we have the parameters defined by the calling script, so
we can use the typing specified there when we perform the prepare.

For PDO_PARAM_LOB parameters, we set the binary formatting flag.

We can't just set this flag for all parameters, because its meaning is not
"string data, counted length" but "data is in native format".  If this flag is
set for a numeric column and we send the number 1 formatted as a string, then
we will get an "insufficient data left in message" error message, because the
library was expecting sizeof(int4) bytes but only saw 1 byte for "1".

This is infuriating because we have no way to determine the datatypes for
parameters, and the type we explicitly set has to match the type in the
database.  The only choice we're left with is telling postgres to deduce the
type; we still have no idea what type was deduced.
2005-11-25 03:35:04 +00:00
Wez Furlong 2256ec00ef PDO support for LOBs in the postgres driver currently assumes bytea columns. 2005-11-25 03:24:32 +00:00
Wez Furlong 2618322506 Bug: when stringify fetch mode is on, and the driver returns a string instead
of a stream for a LOB parameter, PDO would incorrectly return NULL for that
column.
2005-11-25 03:23:17 +00:00
Wez Furlong 268ac81e39 Add pdo_odbc.db2_instance_name ini setting when built against DB2.
This is a convenience for setting up the DB2 environment more easily.
2005-11-25 02:33:04 +00:00
Andrey Hristov 1d3f0d8891 fix test - unsigned it is casted to 0 in mysql sql_mode 2005-11-25 01:13:56 +00:00
Wez Furlong c2d53719c2 Fix for #35332.
The problem is caused by the user mixing positional and named parameters.
PDO was blindly adding the parameters, unaware that the same parameters were
already allocated by position.

What we do now is register the parameter with the driver before adding it to
any hash.  This gives the driver an opportunity to normalize the name and
parameter number.  PDO can then ensure that only one entry is occupied in the
hash for a given parameter.
2005-11-25 00:29:04 +00:00
Wez Furlong bb2f034eff well, what do you know, it does do something. 2005-11-25 00:20:12 +00:00
Ilia Alshanetsky 363b0ce10b Fixed bug #35170 (PHP_AUTH_DIGEST differs under Apache 1.x and 2.x). 2005-11-25 00:02:16 +00:00
Wez Furlong 0a865c89c5 prep for release 2005-11-24 22:33:20 +00:00
Wez Furlong 94ab6069b8 prep for release 2005-11-24 22:25:37 +00:00
Wez Furlong dfdd1e4caf CLASSTYPE is an internal flag.
Closes PECL #5640.
2005-11-24 21:46:56 +00:00
Wez Furlong 2814b749ec Fix PECL Bug #6014; config fails on PHP 5.0.3 2005-11-24 21:38:09 +00:00
Marcus Boerger 7aa61c312d - NEWS, NEWS, NEWS 2005-11-24 20:06:11 +00:00
Marcus Boerger fb81446ec9 - MFH Reflection class consts (not removing globals consts in 5.1*) (by Johannes) 2005-11-24 19:56:11 +00:00
Wez Furlong aae30f20fc Fix bug that breaks pdo_mysql when built shared (was not being linked to the
mysql libraries).

If you have another mysql module loaded, this would not have been noticable.
2005-11-24 18:56:16 +00:00
Ilia Alshanetsky 8e49bacf95 Fixed bug #35358 (Incorrect error messages for PDO class constants). 2005-11-24 16:21:43 +00:00
Dmitry Stogov a570981151 Fixed bug #35360 (exceptions in interactive mode (php -a) may cause crash) 2005-11-24 11:33:11 +00:00
Sebastian Bergmann f5117c81b3 MFH: Add an additional field $frame['object'] to the result array of debug_backtrace() that contains a reference to the respective object when the frame was called from an object. 2005-11-24 05:07:28 +00:00
Sara Golemon a420b562df MFH (r-1.2) Sync tests with new defaults 2005-11-24 04:37:47 +00:00
Marcus Boerger c13c6e4f68 - Fix build for new ming versions
# Maybe we should check if it is safe to MFH all the corresponding changes
# in head. But why is this out of sync anyway?
2005-11-24 00:51:44 +00:00
Ilia Alshanetsky 4dbac17f9c Back to dev 2005-11-23 21:25:37 +00:00
Ilia Alshanetsky e0ded79c0f Rolling 5.1.0 2005-11-23 20:53:33 +00:00
Antony Dovgal 794c2e8e5d change zend_read_property() to allocate property zval too 2005-11-23 18:51:44 +00:00
Rui Hirokawa b9f0ff7aab MFH: fixed 5307 unexpected header can be injected to mb_send_mail(). 2005-11-23 15:17:29 +00:00
foobar f7beb9f30c fix tag 2005-11-23 15:01:54 +00:00
Antony Dovgal 1e93bb16e4 fix #35336 (crash on PDO::FETCH_CLASS + __set()) 2005-11-23 11:15:11 +00:00
Dmitry Stogov 36d6ddc241 Bug #33732 (Wrong behavior of constants in class and interface extending) 2005-11-23 09:26:43 +00:00
Rob Richards 7e0dc09703 BFN 2005-11-23 03:13:57 +00:00
Rob Richards ad7732c0cc Fixed bug #35342 (isset(DOMNodeList->length) returns false)
add test
2005-11-23 03:12:47 +00:00
Ilia Alshanetsky 8c86ea4693 Fixed bug #35046 (phpinfo() uses improper css enclosure). 2005-11-23 00:15:08 +00:00
Ilia Alshanetsky 2f6cebb206 Added 5.1 upgrading notes.
# Big thanks to Steph Fox for taking the time to make this list possible.
2005-11-22 23:49:13 +00:00
Antony Dovgal af34ed0d97 fix #35341 (Fix for bug #33760 breaks build with older curl) 2005-11-22 22:53:34 +00:00
Sara Golemon 7f367c9d83 Widen allowable range of values for 'window' bits.
Make -MAX_WBITS default (to match gzinflate() and gzdeflate())
2005-11-22 22:05:38 +00:00
Ilia Alshanetsky 0d088689c0 Removed {} E_STRICT pending furher discussion, may be introduced later on. 2005-11-22 19:46:13 +00:00
Ilia Alshanetsky 80e04c2c35 Fixed command error in ftp:// wrapper.
# Thanks to Stefan Esser for discovering the problem.
2005-11-22 03:01:39 +00:00
Ilia Alshanetsky 13996df552 Fixed test 2005-11-22 01:57:02 +00:00
Michael Wallner 3db21d2f4c - fix make install 2005-11-22 00:50:36 +00:00
Frank M. Kromann a6a9dc2eec /Gz and /RTC1 is for debug builds 2005-11-22 00:29:56 +00:00
foobar 7243d31ae0 MFH: - Fixed header installing under phpize builds 2005-11-21 23:08:02 +00:00
Marcus Boerger 19ea8abd09 - MFH Fixed Bug #35286 tokenizer ext drops final comment (by greg) 2005-11-21 19:24:38 +00:00
foobar e47c21e0bc test -e does not work with solaris 2005-11-21 19:06:04 +00:00
Derick Rethans 2bb4d8282c - Fixed bug #35143 (gettimeofday() ignores current time zone).
- Fixed tests due to class constants patch.
2005-11-20 20:14:24 +00:00
Ilia Alshanetsky 4020933726 Fixed bug #35303 (PDO prepare() crashes with invalid parameters). 2005-11-20 20:06:28 +00:00
foobar db77890bbd MFH: - Fixed bug #35243 (php_mblen() crashes when compiled with thread-safety on Linux) 2005-11-20 18:07:28 +00:00
Sebastian Bergmann abe364335b Use /RTC1 instead of /GZ for MS VisualStudio 2005. 2005-11-20 17:03:14 +00:00
Marcus Boerger cfeb12ccf5 - MFH Fix parameter parsing 2005-11-20 13:05:15 +00:00
foobar d20fe303b3 fix news 2005-11-20 08:13:34 +00:00
Antony Dovgal 493c9fcf93 MFH: fix #35293 (PDO segfaults when using persistent connections) 2005-11-19 16:41:08 +00:00
Rui Hirokawa 60949ca571 MFH: fixed #35253 length of the encoded string vilolates a RFC. 2005-11-19 08:25:32 +00:00
Frank M. Kromann 6ed54ddc79 MFH: Fix #33201 Crash when fetching some data types 2005-11-18 21:23:20 +00:00
Frank M. Kromann e1fac162a0 MFH Fix #33963. mssql_bind fails on input parameters 2005-11-18 20:48:46 +00:00
Frank M. Kromann ae75d4350d MFH: Fix #32009 crash when mssql_bind() is called more than once 2005-11-18 20:40:52 +00:00
Frank M. Kromann da2d7e7229 MFH: Fix #33153 Crash in mssql_next_result(). 2005-11-18 19:14:32 +00:00
Ilia Alshanetsky 110344d65c Fixed bug #35278 (Multiple virtual() calls crash Apache 2 php module). 2005-11-18 18:59:49 +00:00
foobar 54a5c714ca php4 -> php5 2005-11-18 16:09:50 +00:00
foobar 7b073bbad8 - Make sure --with-readline is used only when --with-libedit is not used. 2005-11-18 15:07:39 +00:00
Dmitry Stogov 8b4e1abdb0 Fixed bug #35273 (Error in mapping soap - java types) 2005-11-18 11:00:15 +00:00
foobar 25558ffdbb back to dev 2005-11-18 09:51:44 +00:00
Marcus Boerger c21ced1ec9 - Not in this branch 2005-11-17 22:35:27 +00:00
Rasmus Lerdorf aa749a1269 Missing }}} 2005-11-17 21:56:04 +00:00
Ilia Alshanetsky 4ba37d04d4 RC6 2005-11-17 21:27:58 +00:00
foobar 4eb9e62209 fix news 2005-11-17 21:15:19 +00:00
Ilia Alshanetsky eb0a6a666f Moved date constants into the date class, they all class constants now. 2005-11-17 21:05:30 +00:00
Ilia Alshanetsky 8f514cd18c MFH: Resolve Apache 2 regression with sub-request handling on non-linux
systems.
2005-11-17 21:00:28 +00:00
Sara Golemon 1340c04976 MFH (r-1.51) #32371 php://input sometimes returns duplicate data 2005-11-17 19:40:38 +00:00
Antony Dovgal 014729d00b MFH: make GCC happy and suppress the warning 2005-11-17 19:21:32 +00:00
Ilia Alshanetsky 95c6c6d2cd Fixed test. 2005-11-17 18:25:16 +00:00
Ilia Alshanetsky d734669230 Fixed bug #35248 (sqlite_query() doesnt set error_msg when return value is
being used).
2005-11-17 14:38:36 +00:00
Antony Dovgal 1a78dc5fbf MFH: fix #35079 (stream_set_blocking(true) toggles, not enables blocking)
patch by askalski at gmail dot com
2005-11-17 14:19:40 +00:00
Derick Rethans 924ae32ddf - Fixed bug #35218 (strtotime no longer ignores timezone comments like "(PST)") 2005-11-17 13:04:31 +00:00
Derick Rethans 18606377dd - Fixed typo 2005-11-17 12:33:36 +00:00
foobar a0303c772a MFH: Renamed config.m4 to config0.m4
# PCRE configure tests must be run before e.g. ext/filter
2005-11-17 10:02:42 +00:00
foobar 52747127f8 MFH 2005-11-17 09:58:28 +00:00
foobar c127df868e MFH: - Fix compile failure when ext/readline is compiled as shared (bug #35249) 2005-11-17 08:37:31 +00:00
Ilia Alshanetsky b5c8fcb5fa Allow zend_parse_parameters to handle non-well formed integers, but raise
E_NOTICE in the process.
2005-11-17 00:19:23 +00:00
foobar 158ebbd9b5 MFH 2005-11-16 22:14:32 +00:00
Ilia Alshanetsky da0a76c561 {} to [] test fixes 2005-11-16 16:57:27 +00:00
Ilia Alshanetsky f1a8fde76a back to dev 2005-11-16 15:41:59 +00:00
Ilia Alshanetsky cce5e8c9ea Updated tests to use [] instead of {} 2005-11-16 15:13:20 +00:00
Ilia Alshanetsky 9aeb125f4a By popular demand the {} message is now an E_STRICT. 2005-11-16 15:10:56 +00:00
Ilia Alshanetsky aab9009deb Added depreciation notice for {} string offset access. 2005-11-16 14:55:21 +00:00
Ilia Alshanetsky 209169786a 5.1.0RC5 2005-11-16 14:18:11 +00:00
Dmitry Stogov 6b8bf38333 Fixed bug #35239 (Objects can lose references) 2005-11-16 11:52:27 +00:00
Dmitry Stogov 8bd18e174b Fixed bug #35229 (call_user_func() crashes when arguement_stack is nearly full) 2005-11-16 09:31:21 +00:00
Wez Furlong 0bd9518f8c Closes PECL #5944; binding an invalid parameter can lead to segfaults.
Modified patch provided by curt@php.net.
2005-11-16 06:32:33 +00:00
Marcus Boerger c95360658f - MFH Add new test 2005-11-15 21:33:10 +00:00
foobar f8781c168e extend the entry a bit :) 2005-11-15 16:53:14 +00:00
foobar a7d31c8dac bfp 2005-11-15 16:51:24 +00:00
Dmitry Stogov b58ed261d7 Allow "null" default value for arguments with array type hint 2005-11-15 16:49:40 +00:00
Derick Rethans aa9ea59851 - Allow "= null" default for parameters with a class type-hint. 2005-11-15 15:59:49 +00:00
Ilia Alshanetsky 57e49322a5 Fixed memory leak on php-cli -h 2005-11-15 15:27:26 +00:00
Ilia Alshanetsky c4da6009bb MFH: Fixed possible crash in http:// wrapper. 2005-11-15 14:46:34 +00:00
Dmitry Stogov d3e0b57e1a Allow recursive calls to __get/__set for different properties 2005-11-15 14:28:40 +00:00
Dmitry Stogov 3c19326480 Allow recursive calls to __get/__set for different properties 2005-11-15 14:18:15 +00:00
Antony Dovgal 23a3fdbf04 MFH: call zend_objects_destroy_object() explicitly
fix segfault when intern->time is NULL
2005-11-15 14:08:03 +00:00
Dmitry Stogov 64931b62cc Allow recursive calls to __get/__set for different properties 2005-11-15 13:35:23 +00:00
Dmitry Stogov a8c6b992b8 Fixed bug #35147 (__HALT_COMPILER() breaks with --enable-zend-multibyte) 2005-11-15 13:29:39 +00:00
Dmitry Stogov 5519008169 Fixed call to __destruct() for objects of classes delivered from internal ones those use zend_objects_store_put(obj, NULL, ... 2005-11-15 12:41:31 +00:00
Dmitry Stogov 8c100e6451 Fixed bug #35176 (include()/require()/*_once() produce wrong error messages about main()) 2005-11-15 11:13:43 +00:00
Frank M. Kromann fe306ed1a6 Change max_procs from 25 to library default. This will make FreeTDS connections work a bit better 2005-11-14 23:14:25 +00:00
Antony Dovgal 241aa9a59d MFH: fix #35197 (Destructor is not called) and similar issues in other extensions 2005-11-14 22:03:02 +00:00
Antony Dovgal cd9e244a68 MFH: fix #35197 (Destructor is not called) and similar issues in other extensions 2005-11-14 21:54:35 +00:00
Ilia Alshanetsky 927ea59de3 PEAR news 2005-11-13 18:23:25 +00:00
Ilia Alshanetsky f3f057127b Slated for PHP 6 2005-11-13 18:02:47 +00:00
foobar 592e78ab87 MFH: - Fixed bug #35179 (tokenizer extension needs T_HALT_COMPILER) 2005-11-10 07:50:59 +00:00
foobar 71ac32bdb8 MFH 2005-11-08 20:21:47 +00:00
foobar bd8fe7fcf0 FBFN 2005-11-08 16:57:10 +00:00
foobar f60da5cd5e MFH 2005-11-08 15:54:48 +00:00
Rui Hirokawa 68d1942a9a NEWS updated. 2005-11-08 14:47:50 +00:00
Andrey Hristov df2c11b731 test fetching of unsigned int(11) 2005-11-08 14:43:49 +00:00
Andrey Hristov 611a05f857 BFN 2005-11-08 14:10:17 +00:00
Andrey Hristov 64e8f63978 fix test - putting signed into unsigned produces 0, if not in strict mode
(in strict mode this will fail)
2005-11-08 14:06:40 +00:00
Andrey Hristov 00a9f063f8 on 32bit platform if the column is UNSIGNED INT(11) and the value
is greater than 2^31-1 then convert to string. on 64bit this is of no
problem because there long inside zval is big enough to keep unsigned
int(11)
2005-11-08 13:50:50 +00:00
Dmitry Stogov 270640283e Fixed bug #35142 (SOAP Client/Server Complex Object Support) 2005-11-08 08:30:19 +00:00
Marcus Boerger 9c14ce94f3 - MFH heredoc handling in -a mode 2005-11-07 19:14:40 +00:00
Marcus Boerger 134b2718d4 - Add new tests 2005-11-07 18:38:20 +00:00
Ilia Alshanetsky 8e2de517bb Fixed bug #35135 (PDOStatment without related PDO object may crash). 2005-11-07 16:53:15 +00:00
Marcus Boerger bb293e15c3 - Drop unnecessary param 2005-11-07 13:08:24 +00:00
Marcus Boerger ae1d56d098 - MFH Bug #32223 weird behaviour of pg_last_notice 2005-11-07 12:57:49 +00:00
Dmitry Stogov 9e1beb4f1c Fixed bug #35009 (ZTS: Persistent resource destruct crashes when extension is compiled as shared) 2005-11-07 12:24:55 +00:00
Dmitry Stogov 88edad9f08 Fixed bug #35091 (SoapClient leaks memory) 2005-11-07 10:05:35 +00:00
foobar 6ec23a56d8 MFH:- Fixed minor leak with -dzlib.output_compression=1 -m 2005-11-06 22:42:23 +00:00
foobar 261eabbdd4 MFH 2005-11-06 22:08:30 +00:00
Marcus Boerger 33c650020a - Remve bogus part of test 2005-11-06 12:25:53 +00:00
Marcus Boerger 71ad4dd19b - Fix parameter parsing 2005-11-06 11:58:34 +00:00
Derick Rethans 15c1b8a3a2 - MFH: E_STRICT is not part of E_ALL, so the lines were wrong here. 2005-11-06 11:09:32 +00:00
Marcus Boerger c388f97ac9 - Fix test expectations 2005-11-06 10:51:29 +00:00
foobar d4a1506d52 Fix bad MFH 2005-11-06 02:59:18 +00:00
Rasmus Lerdorf b03351633a And simplexml doesn't need dom anymore to do the import 2005-11-05 22:37:18 +00:00
Rasmus Lerdorf 04a291d39a This SimpleXML requirement is no longer needed and by removing it we
remove a circular dep where it was impossible to build simplexml shared
and not load it.
2005-11-05 22:25:12 +00:00
Ilia Alshanetsky 82814fc852 Fixed bug #31971 (ftp_login fails on some SSL servers).
Patch by: frantisek at augusztin dot com
2005-11-05 22:02:15 +00:00
Wez Furlong 2556b354b3 improve configure script.
Fixes #35107; compile failure with MySQL 5
2005-11-05 16:20:06 +00:00
Rui Hirokawa 00dfb7dc14 MFH: fixed garbled multibyte characters. 2005-11-05 04:49:57 +00:00
Wez Furlong 00df9b67ce Fixes PECL Bug #5868; wrong iters count for OCIStmtExecute 2005-11-04 18:11:40 +00:00
Marcus Boerger bf9a25d0bb - Fix test expectations - we are no detecting the error earlier
# Unfortunatley we also lower the severity here because sqlite's error
# facility is dealing with the problem at this early stage as E_WARNING.
2005-11-03 23:48:09 +00:00
Marcus Boerger 83bdbe5b53 - Fix static check in zend_is_callable_ex()
- Fix/speedup zend_make_callable()
# Actually the ...STATIC... flag in zend_is_callable_ex() *must* go, too.
# We keep it for the moment to support old stuff and skip analyzing them
# in detail...
2005-11-03 23:45:18 +00:00
Marcus Boerger 2ca2153a06 - MFH Add missing check flag 2005-11-03 22:06:30 +00:00
Marcus Boerger e464f0f456 - MFH Try fixing #35088 2005-11-03 21:59:13 +00:00
Marcus Boerger 7ae7cc363a - MFH Add missing check 2005-11-03 21:28:43 +00:00
foobar 528e7869b6 MFH: - Fixed bug #35078 (configure does not find ldap_start_tls_s) 2005-11-03 20:41:13 +00:00
Ilia Alshanetsky 72030596ba Fixed typo. 2005-11-03 15:01:30 +00:00
Michael Wallner 17d16cf2af - MFB44: #34851 (SO_RECVTIMEO and SO_SNDTIMEO socket options expect integer
parameter on Windows)
2005-11-03 15:00:51 +00:00
foobar edc87ef840 MFH: Fixed bad usage of php_checkuid() 2005-11-02 21:26:25 +00:00
Marcus Boerger 8098790208 - Add missing test 2005-11-02 20:32:21 +00:00
Marcus Boerger 50ba309495 - Make spl_autoload_register use zend_is_callable_ex() 2005-11-02 20:31:01 +00:00
Marcus Boerger a4bd0d6a25 - Add missing cases and checks 2005-11-02 20:30:13 +00:00
Derick Rethans 703fc059bf - MFH: Fixed initializing and argument checking for posix_mknod(). 2005-11-02 15:53:49 +00:00
Michael Wallner 496fd1c041 - sapi_header_op(SAPI_HEADER_(REPLACE|ADD), {NULL, 0, 0}) caused HTTP response splitting
- sapi_send_headers() already takes care of default_content_type (left over of fix for bug #29983)
2005-11-02 14:38:13 +00:00
Ilia Alshanetsky 435b820f68 Fixed minor memory leak triggered by: -dzlib.output_compression=1 -m 2005-11-01 22:59:18 +00:00
foobar e02f8809f1 - Fixed test. Some people might actually be using php.ini-dist which
has precision set to 12. (and this test results need 14)
2005-11-01 22:39:53 +00:00
Marcus Boerger 1d0b88d316 - Update docu 2005-11-01 21:48:25 +00:00
Marcus Boerger 376d4554fb - MFH the iterator base interface is Traversable not IteratorAggregate 2005-11-01 21:18:24 +00:00
Frank M. Kromann 623a2021ab MFH: Fix #35037. Selecting a uniqueidentifier would return unknown data type when used with freetds. 2005-11-01 18:15:44 +00:00
foobar 289402edc6 MFH: - Added missing safe-mode checks
# Added by replacing the existing open_basedir checks with a macro
# Also, the filename passed might be null, etc. so it's not very good
# idea to pass to php_error_docref() (catch by Ilia)
2005-11-01 17:05:09 +00:00
foobar 98691ba0c0 nuke typo 2005-11-01 16:21:29 +00:00
foobar f803888510 MFH: Hiding bugs is not purpose of the regression tests. 2005-11-01 14:36:37 +00:00
Edin Kadribasic fbc6470cb6 Fix ZTS build 2005-11-01 14:18:20 +00:00
Wez Furlong 3d9af317e6 update ready for release spree today 2005-11-01 13:14:10 +00:00
Wez Furlong 6f63c45639 Fix #35032; pdo_dblib doesn't find includes on some systems 2005-11-01 13:12:52 +00:00
Dmitry Stogov e98a40f1fa Fixed SIGSEGV 2005-11-01 11:11:35 +00:00
Sebastian Bergmann 02eb02d1ce MFH: Allow bison 2.1. 2005-11-01 10:31:56 +00:00
Wez Furlong 38c5dd2929 prep for PECL release 2005-11-01 03:16:36 +00:00
Wez Furlong dbc09d3325 Closes PECL Bug #5633.
Build tested with 5.0.x as PECL, 5.1 as PECL and 5.1 static
2005-11-01 03:13:32 +00:00
Wez Furlong b6fe60ab52 prep for PECL release 2005-11-01 03:10:09 +00:00
Wez Furlong 6070381f9d prep for pecl release 2005-11-01 03:07:41 +00:00
Wez Furlong 872661b91d prep for PECL release 2005-11-01 03:04:49 +00:00
Wez Furlong b3b9ee1467 hrmm, typo fix. 2005-11-01 03:04:25 +00:00
Wez Furlong 598f182c29 prep for PECL release 2005-11-01 02:46:12 +00:00
Wez Furlong 58a14f225d Prep for PECL release 2005-11-01 02:44:11 +00:00
Brian France 890bd3f002 Fixed phpize build (default PHP_OPENSSL to no if not set) 2005-11-01 00:32:21 +00:00
Ilia Alshanetsky 0ba24fb65a Additional open_basedir/safe_mode checks. 2005-10-31 23:44:40 +00:00
Marcus Boerger 9622ccface - Drop unnecessary exports to prevent forward BC problems 2005-10-31 21:20:44 +00:00
Dmitry Stogov 681405fc4a Fixed bug #35017 (Exception thrown in error handler may cause unexpected behavior) 2005-10-31 19:25:14 +00:00
Marcus Boerger 24a80c3ebf - Fix remaining memleaks
# all tests pass for me now for the first time in:
# pgsql, mysql, sqlite, sqlite2
2005-10-31 07:47:40 +00:00
Wez Furlong b74698f135 fix misinterpretation of data when overriding types via bindColumn.
Very slightly modified patch from Marcus.
2005-10-31 03:23:38 +00:00
Wez Furlong 2baf1500e0 Closes PECL Bug #5722; BLOB support was half-baked. 2005-10-31 02:11:27 +00:00
Wez Furlong 40c24a65c4 improve test portability.
improve infrastructure for LOB support.
2005-10-31 02:07:38 +00:00
foobar 138ad7d252 bfn 2005-10-31 00:11:42 +00:00
Marcus Boerger e7494a7e9e - Fix memleak 2005-10-30 22:17:52 +00:00
Ilia Alshanetsky 2dc3862c7f Improve iconv skip conditions 2005-10-30 18:07:47 +00:00
Ilia Alshanetsky 57510065ce Fixed bug #35022, #35019 (Regression in the behavior of key/current
functions).
2005-10-30 18:03:30 +00:00
Marcus Boerger cea6a783af - MFH Add docu 2005-10-30 16:07:45 +00:00
Ilia Alshanetsky 941a94ead4 Simplify code. 2005-10-30 13:48:30 +00:00
Ilia Alshanetsky d22d6910ad Fixed Bug #35014 (array_product() always returns 0). 2005-10-30 13:44:26 +00:00
Wez Furlong cc4b453611 dos to unix line endings 2005-10-29 20:41:54 +00:00
Wez Furlong 0139cd0e53 Closes PECL Bug #5772; FETCH_FUNC broken for mixed case function names 2005-10-29 03:11:46 +00:00
Wez Furlong 7af8089096 Closes PECL #5809; PDOStatement::execute(array(...)) would modify its args.
It should behave like bindValue() not bindParam().
2005-10-29 03:01:19 +00:00
Wez Furlong 588d88960c clean up the test2 table that some tests create 2005-10-29 02:58:24 +00:00
Wez Furlong c28a9a4e5c Closes PECL Bug #5802 2005-10-29 02:41:50 +00:00
Wez Furlong e0924b7451 Close PECL Bug #5780 2005-10-29 02:36:30 +00:00
Wez Furlong b2424b2e08 argh! we don't want to NULL the stmt here; freeing the results is not the same
as destroying the prepared statement handler, so we're leaking and breaking, as
can be seen by running the test suite.

brown paper bag for PDO in PHP 5.1RC4?
2005-10-29 02:16:35 +00:00
Wez Furlong 9bd48c2e15 Closes PECL Bug #5645; emits mysql client library version in MINFO output. 2005-10-29 01:58:22 +00:00
Ilia Alshanetsky fad0caaee9 Back to dev 2005-10-28 15:45:05 +00:00
Antony Dovgal 579c9abfb3 MFH: quick fix for #35003 (Warning: PDOStatement::fetch(): column 0 data was too large for buffer and was) 2005-10-28 15:02:09 +00:00
1638 changed files with 87372 additions and 60544 deletions

No files matched your search

+109 -71
View File
@@ -1,8 +1,7 @@
set $zts = 0
define ____executor_globals
if $zts
set $eg = ((zend_executor_globals) (*((void ***) tsrm_ls))[executor_globals_id-1])
if basic_functions_module.zts
set $tsrm_ls = ts_resource_ex(0, 0)
set $eg = ((zend_executor_globals) (*((void ***) $tsrm_ls))[executor_globals_id-1])
else
set $eg = executor_globals
end
@@ -10,7 +9,7 @@ end
document ____executor_globals
portable way of accessing executor_globals
type "set $zts = 1" if you use --enable-maintainer-zts on your configure line
ZTS detection is automatically based on ext/standard module struct
end
define dump_bt
@@ -44,55 +43,33 @@ document printzv
end
define ____printzv_contents
____executor_globals
set $zvalue = $arg0
set $type = $zvalue->type
if $zvalue.type == 0
set $typename = "NULL"
printf "(refcount=%d) ", $zvalue->refcount
if $type == 0
printf "NULL"
end
if $zvalue.type == 1
set $typename = "long"
if $type == 1
printf "long: %ld", $zvalue->value.lval
end
if $zvalue.type == 2
set $typename = "double"
if $type == 2
printf "double: %lf", $zvalue->value.dval
end
if $zvalue.type == 3
set $typename = "string"
if $type == 3
printf "bool: "
if $zvalue->value.lval
printf "true"
else
printf "false"
end
end
if $zvalue.type == 4
set $typename = "array"
end
if $zvalue.type == 5
set $typename = "object"
end
if $zvalue.type == 6
set $typename = "bool"
end
if $zvalue.type == 7
set $typename = "resource"
end
if $zvalue.type == 8
set $typename = "constant"
end
if $zvalue.type == 9
set $typename = "const_array"
end
printf "(refcount=%d) %s: ", $zvalue.refcount, $typename
if $zvalue.type == 1
printf "%ld", $zvalue.value.lval
end
if $zvalue->type == 2
printf "%lf", $zvalue.value.dval
end
if $zvalue.type == 3
printf "\"%s\"(%d)", $zvalue.value.str.val, $zvalue.value.str.len
end
if $zvalue.type == 4
if $type == 4
printf "array(%d): ", $zvalue->value.ht->nNumOfElements
if ! $arg1
printf "{\n"
set $ind = $ind + 1
____print_ht $zvalue.value.ht
____print_ht $zvalue->value.ht
set $ind = $ind - 1
set $i = $ind
while $i > 0
@@ -101,34 +78,60 @@ define ____printzv_contents
end
printf "}"
end
set $type = 0
end
if $zvalue.type == 5
if $type == 5
printf "object"
____executor_globals
set $handle = $zvalue->value.obj.handle
set $handlers = $zvalue->value.obj.handlers
if basic_functions_module.zts
set $zobj = zend_objects_get_address($zvalue, $tsrm_ls)
else
set $zobj = zend_objects_get_address($zvalue)
end
if $handlers->get_class_entry == &zend_std_object_get_class
set $cname = $zobj->ce.name
else
set $cname = "Unknown"
end
printf "(%s) #%d", $cname, $handle
if ! $arg1
printf "(prop examination disabled due to a gdb bug)"
if $zvalue.value.obj.handlers->get_properties
# set $ht = $zvalue->value.obj.handlers->get_properties($zvalue)
# printf "{\n"
# set $ind = $ind + 1
# ____print_ht $ht
# set $ind = $ind - 1
# set $i = $ind
# while $i > 0
# printf " "
# set $i = $i - 1
# end
# printf "}"
if $handlers->get_properties == &zend_std_get_properties
set $ht = $zobj->properties
if $ht
printf "(%d): ", $ht->nNumOfElements
printf "{\n"
set $ind = $ind + 1
____print_ht $ht
set $ind = $ind - 1
set $i = $ind
while $i > 0
printf " "
set $i = $i - 1
end
printf "}"
else
echo "no properties found"
end
end
end
set $type = 0
end
if $zvalue.type == 6
if $zvalue.value.lval
printf "true"
else
printf "false"
end
if $type == 6
printf "string(%d): \"%s\"", $zvalue->value.str.len, $zvalue->value.str.val
end
if $zvalue.type == 7
printf "#%d", $zvalue.value.lval
if $type == 7
printf "resource: #%d", $zvalue->value.lval
end
if $type == 8
printf "constant"
end
if $type == 9
printf "const_array"
end
if $type > 9
printf "unknown type %d", $type
end
printf "\n"
end
@@ -143,7 +146,7 @@ define ____printzv
printf "*uninitialized* "
end
set $zcontents = *(struct _zval_struct *) $zvalue
set $zcontents = (zval*) $zvalue
if $arg1
____printzv_contents $zcontents $arg1
else
@@ -156,7 +159,7 @@ define ____print_const_table
set $p = $ht->pListHead
while $p != 0
set $const = *(zend_constant *) $p->pData
set $const = (zend_constant *) $p->pData
set $i = $ind
while $i > 0
@@ -170,7 +173,7 @@ define ____print_const_table
printf "%d => ", $p->h
end
____printzv_contents $const.value 0
____printzv_contents &$const->value 0
set $p = $p->pListNext
end
end
@@ -187,7 +190,7 @@ define ____print_ht
set $p = $ht->pListHead
while $p != 0
set $zval = *(struct _zval_struct **)$p->pData
set $zval = *(zval **)$p->pData
set $i = $ind
while $i > 0
@@ -217,6 +220,41 @@ document print_ht
dumps elements of HashTable made of zval
end
define ____print_ft
set $ht = $arg0
set $p = $ht->pListHead
while $p != 0
set $func = (zend_function*)$p->pData
set $i = $ind
while $i > 0
printf " "
set $i = $i - 1
end
if $p->nKeyLength > 0
printf "\"%s\" => ", (char*)$p->arKey
else
printf "%d => ", $p->h
end
printf "\"%s\"\n", $func->common.function_name
set $p = $p->pListNext
end
end
define print_ft
set $ind = 1
printf "[0x%08x] {\n", $arg0
____print_ft $arg0
printf "}\n"
end
document print_ft
dumps a function table (HashTable)
end
define printzn
____executor_globals
set $ind = 0
+12 -7
View File
@@ -148,20 +148,19 @@ Naming Conventions
'buildsomewidget'
'getI()'
[7] Classes should be given descriptive names. Avoid using abbreviations
where possible. Each word in the class name should start with a capital
letter, with words underscore delimited. The class name should be prefixed
with the name of the 'parent set'.
[7] Classes should be given descriptive names. Avoid using abbreviations where
possible. Each word in the class name should start with a capital letter,
without underscore delimiters (CampelCaps starting with a capital letter).
The class name should be prefixed with the name of the 'parent set' (e.g.
the name of the extension).
Good:
'Curl'
'Foo_Bar'
'FooBar'
Bad:
'foobar'
'foo_bar'
'FooBar'
Syntax and indentation
----------------------
@@ -208,6 +207,12 @@ Syntax and indentation
indent preprocessor directives you should put the # at the beginning
of a line, followed by any number of whitespace.
Testing
-------
[1] Extensions should be well tested using *.phpt tests. Read about that
in README.TESTING.
Documentation and Folding Hooks
-------------------------------
+13 -13
View File
@@ -46,9 +46,9 @@ MAINTENANCE: Maintained
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: apache2handler
PRIMARY MAINTAINER: Aaron Bannert <aaron@php.net>
PRIMARY MAINTAINER: Aaron Bannert <aaron@php.net>, Ilia Alshanetsky <iliaa@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: caudium
MAINTENANCE: Unknown
@@ -68,11 +68,6 @@ PRIMARY MAINTAINER: Alex Leigh <aleigh@php.net>
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: date
PRIMARY MAINTAINER: Derick Rethans <derick@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: embed
PRIMARY MAINTAINER: Edin Kadribasic <edink@php.net>
MAINTENANCE: Maintained
@@ -176,9 +171,9 @@ MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: mysqli
PRIMARY MAINTAINER: Georg Richter <georg@php.net>
PRIMARY MAINTAINER: Georg Richter <georg@php.net>, Andrey Hristov <andrey@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
STATUS: Working
SINCE: 5.0
-------------------------------------------------------------------------------
EXTENSION: oci8
@@ -302,11 +297,16 @@ MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: curl
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>,Ilia Alshanetsky <iliaa@php.net>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 4.0.2
-------------------------------------------------------------------------------
EXTENSION: date
PRIMARY MAINTAINER: Derick Rethans <derick@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: exif
PRIMARY MAINTAINER: Marcus Boerger <helly@php.net>
MAINTENANCE: Maintained
@@ -357,8 +357,8 @@ MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: imap
PRIMARY MAINTAINER: Chuck Hagenbuch <chuck@horde.org>
MAINTENANCE: Odd Fixes
PRIMARY MAINTAINER: Chuck Hagenbuch <chuck@horde.org>, Ilia Alshanetsky <iliaa@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: ircg
@@ -465,7 +465,7 @@ MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: session
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>, Ilia Alshanetsky <iliaa@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
+650 -88
View File
@@ -1,4 +1,3 @@
Installing PHP
_________________________________________________________________
@@ -17,6 +16,7 @@ Installing PHP
OpenBSD installation notes
Solaris specific installation tips
Gentoo installation notes
Debian GNU/Linux installation notes
3. Installation on Mac OS X
@@ -43,6 +43,8 @@ Installing PHP
The configuration file
How to change configuration settings
7. Installation FAQ
_________________________________________________________________
Preface
@@ -164,7 +166,7 @@ Apache 1.3.x on Unix systems
your files.
Example 2-1. Installation Instructions (Apache Shared Module Version)
for PHP
for PHP
1. gunzip apache_xxx.tar.gz
2. tar -xvf apache_xxx.tar
3. gunzip php-xxx.tar.gz
@@ -248,36 +250,38 @@ Apache 1.3.x on Unix systems
Alternatively, to install PHP as a static object:
Example 2-2. Installation Instructions (Static Module Installation for
Apache) for PHP
Apache) for PHP
1. gunzip -c apache_1.3.x.tar.gz | tar xf -
2. cd apache_1.3.x
3. ./configure
4. cd ..
5. gunzip -c php-4.x.y.tar.gz | tar xf -
6. cd php-4.x.y
5. gunzip -c php-5.x.y.tar.gz | tar xf -
6. cd php-5.x.y
7. ./configure --with-mysql --with-apache=../apache_1.3.x
8. make
9. make install
10. cd ../apache_1.3.x
11. ./configure --prefix=/www --activate-module=src/modules/php4/libphp4.a
(The above line is correct! Yes, we know libphp4.a does not exist at this
11. ./configure --prefix=/www --activate-module=src/modules/php5/libphp5.a
(The above line is correct! Yes, we know libphp5.a does not exist at this
stage. It isn't supposed to. It will be created.)
12. make
(you should now have an httpd binary which you can copy to your Apache bin
dir if
is is your first install then you need to "make install" as well)
it is your first install then you need to "make install" as well)
13. cd ../php-4.x.y
13. cd ../php-5.x.y
14. cp php.ini-dist /usr/local/lib/php.ini
15. You can edit /usr/local/lib/php.ini file to set PHP options.
Edit your httpd.conf or srm.conf file and add:
AddType application/x-httpd-php .php
Note: Replace php-5 by php-4 and php5 by php4 in PHP 4.
Depending on your Apache install and Unix variant, there are many
possible ways to stop and restart the server. Below are some typical
lines used in restarting the server, for different apache/unix
@@ -309,9 +313,9 @@ stop and start:
./configure --with-apxs --with-pgsql
This will create a libphp4.so shared library that is loaded into
Apache using a LoadModule line in Apache's httpd.conf file. The
PostgreSQL support is embedded into this libphp4.so library.
This will create a libphp5.so (or libphp4.so in PHP 4) shared library
that is loaded into Apache using a LoadModule line in Apache's
httpd.conf file. The PostgreSQL support is embedded into this library.
./configure --with-apxs --with-pgsql=shared
@@ -322,14 +326,14 @@ stop and start:
./configure --with-apache=/path/to/apache_source --with-pgsql
This will create a libmodphp4.a library, a mod_php4.c and some
accompanying files and copy this into the src/modules/php4 directory
This will create a libmodphp5.a library, a mod_php5.c and some
accompanying files and copy this into the src/modules/php5 directory
in the Apache source tree. Then you compile Apache using
--activate-module=src/modules/php4/libphp4.a and the Apache build
system will create libphp4.a and link it statically into the httpd
binary. The PostgreSQL support is included directly into this httpd
binary, so the final result here is a single httpd binary that
includes all of Apache and all of PHP.
--activate-module=src/modules/php5/libphp5.a and the Apache build
system will create libphp5.a and link it statically into the httpd
binary (replace php5 by php4 in PHP 4). The PostgreSQL support is
included directly into this httpd binary, so the final result here is
a single httpd binary that includes all of Apache and all of PHP.
./configure --with-apache=/path/to/apache_source --with-pgsql=shared
@@ -380,8 +384,8 @@ Apache 2.0 on Unix systems
* PHP 4.3.0 or later available at http://www.php.net/downloads.php.
* the latest stable development version. Get the source code
http://snaps.php.net/php4-latest.tar.gz or download binaries for
Windows http://snaps.php.net/win32/php4-win32-latest.zip.
http://snaps.php.net/php5-latest.tar.gz or download binaries for
Windows http://snaps.php.net/win32/php5-win32-latest.zip.
* a prerelease version downloadable from http://qa.php.net/.
* you have always the option to obtain PHP through anonymous CVS.
@@ -403,7 +407,7 @@ Apache 2.0 on Unix systems
files.
Example 2-4. Installation Instructions (Apache 2 Shared Module
Version)
Version)
1. gzip -d httpd-2_0_NN.tar.gz
2. tar xvf httpd-2_0_NN.tar
3. gunzip php-NN.tar.gz
@@ -461,11 +465,11 @@ Apache 2.0 on Unix systems
For PHP 4:
LoadModule php4_module libexec/libphp4.so
LoadModule php4_module modules/libphp4.so
For PHP 5:
LoadModule php5_module libexec/libphp5.so
LoadModule php5_module modules/libphp5.so
15. Tell Apache to parse certain extensions as PHP. For example,
let's have Apache parse the .php extension as PHP. You could
@@ -1097,6 +1101,121 @@ Common Problems
"Apache PHP".
_________________________________________________________________
Debian GNU/Linux installation notes
This section contains notes and hints specific to installing PHP on
Debian GNU/Linux.
_________________________________________________________________
Using APT
While you can just download the PHP source and compile it yourself,
using Debian's packaging system is the simplest and cleanest method of
installing PHP. If you are not familiar with building software on
Linux, this is the way to go.
The first decision you need to make is whether you want to install
Apache 1.3.x or Apache 2.x. The corresponding PHP packages are
respectively named libapache-mod-php* and libapache2-mod-php*. The
steps given below will use Apache 1.3.x. Please note that, as of this
writing, there is no official Debian packages of PHP 5. Then the steps
given below will install PHP 4.
PHP is available in Debian as CGI or CLI flavour too, named
respectively php4-cgi and php4-cli. If you need them, you'll just have
to reproduce the following steps with the good package names. Another
special package you'd want to install is php4-pear. It contains a
minimal PEAR installation and the pear commandline utility.
If you need more recent packages of PHP than the Debian's stable ones
or if some PHP modules lacks the Debian official repository, perhaps
you should take a look at http://www.apt-get.org/. One of the results
found should be Dotdeb. This unofficial repository is maintained by
Guillaume Plessis and contains Debian packages of the most recent
versions of PHP 4 and PHP 5. To use it, just add the to following two
lines to your /etc/apt/sources.lists and run apt-get update :
Example 2-10. The two Dotdeb related lines
deb http://packages.dotdeb.org stable all
deb-src http://packages.dotdeb.org stable all
The last thing to consider is whether your list of packages is up to
date. If you have not updated it recently, you need to run apt-get
update before anything else. This way, you will be using the most
recent stable version of the Apache and PHP packages.
Now that everything is in place, you can use the following example to
install Apache and PHP:
Example 2-11. Debian Install Example with Apache 1.3
# apt-get install libapache-mod-php4
APT will automatically install the PHP 4 module for Apache 1.3, and
all its dependencies and then activate it. If you're not asked to
restart Apache during the install process, you'll have to do it
manually :
Example 2-12. Stopping and starting Apache once PHP 4 is installed
# /etc/init.d/apache stop
# /etc/init.d/apache start
_________________________________________________________________
Better control on configuration
In the last section, PHP was installed with only core modules. This
may not be what you want and you will soon discover that you need more
activated modules, like MySQL, cURL, GD, etc.
When you compile PHP from source yourself, you need to activate
modules via the configure command. With APT, you just have to install
additional packages. They're all named 'php4-*' (or 'php5-*' if you
installed PHP 5 from a third party repository).
Example 2-13. Getting the list of PHP additional packages
# dpkg -l 'php4-*'
As you can see from the last output, there's a lot of PHP modules that
you can install (excluding the php4-cgi, php4-cli or php4-pear special
packages). Look at them closely and choose what you need. If you
choose a module and you do not have the proper libraries, APT will
automatically install all the dependencies for you.
If you choose to add the MySQL, cURL and GD support to PHP the command
will look something like this:
Example 2-14. Install PHP with MySQL, cURL and GD
# apt-get install php4-mysql php4-curl php4-gd
APT will automatically add the appropriate lines to your different
php.ini (/etc/php4/apache/php.ini, /etc/php4/cgi/php.ini, etc).
Example 2-15. These lines activate MySQL, cURL and GD into PHP
extension=mysql.so
extension=curl.so
extension=gd.so
You'll only have to stop/start Apache as previously to activate the
modules.
_________________________________________________________________
Common Problems
* If you see the PHP source instead of the result the script should
produce, APT has probably not included /etc/apache/conf.d/php4 in
your Apache 1.3 configuration. Please ensure that the following
line is present in your /etc/apache/httpd.conf file then
stop/start Apache:
Example 2-16. This line activates PHP 4 into Apache
# Include /etc/apache/conf.d/
* If you installed an additional module and if its functions are not
available in your scripts, please ensure that the appropriate line
is present in your php.ini, as seen before. APT may fail during
the installation of the additional module, due to a confusing
debconf configuration.
_________________________________________________________________
Chapter 3. Installation on Mac OS X
This section contains notes and hints specific to installing PHP on
@@ -1119,7 +1238,7 @@ Using Packages
Compiling for OS X Server
Mac OS X Server install.
Mac OS X Server install.
1. Get the latest distributions of Apache and PHP.
2. Untar them, and run the configure program on Apache like so.
@@ -1221,24 +1340,24 @@ Chapter 4. Installation of PECL extensions
Introduction to PECL Installations
PHP extensions may be installed in a variety of ways. PECL is a
repository of PHP extensions living within the PEAR structure, and the
following demonstrates how to install these extensions.
PECL is a repository of PHP extensions that are made available to you
via the PEAR packaging system. This section of the manual is intended
to demonstrate how to obtain and install PECL extensions.
These instructions assume /your/phpsrcdir/ is the path to the PHP
source, and extname is the name of the PECL extension. Adjust
accordingly. These instructions also assume a familiarity with the
pear command.
source distribution, and that extname is the name of the PECL
extension. Adjust accordingly. These instructions also assume a
familiarity with the pear command.
Shared extensions may be installed by including them inside of php.ini
using the extension PHP directive. See also the extensions_dir
directive, and dl(). The installation methods described below do not
automatically configure PHP to include these extensions, this step
must be done manually.
To be useful, a shared extension must be built, installed, and loaded.
The methods described below provide you with various instructions on
how to build and install the extensions, but they do not automatically
load them. Extensions can be loaded by adding an extension directive.
To this php.ini file, or through the use of the dl() function.
When building PHP modules, it's important to have the appropriate
versions of the required tools (autoconf, automake, libtool, etc.) See
the Anonymous CVS Instructions for details on the required tools, and
When building PHP modules, it's important to have known-good versions
of the required tools (autoconf, automake, libtool, etc.) See the
Anonymous CVS Instructions for details on the required tools, and
required versions.
_________________________________________________________________
@@ -1247,16 +1366,19 @@ Downloading PECL extensions
There are several options for downloading PECL extensions, such as:
* http://pecl.php.net
Listed here is information like the ChangeLog, release
information, requirements, revisions, etc. Although not every PECL
extension has a webpage, most do.
The PECL web site contains information about the different
extensions that are offered by the PHP Development Team. The
information available here includes: ChangeLog, release notes,
requirements and other similar details.
* pear download extname
The pear command may also be used to download source files.
PECL extensions that have releases listed on the PECL web site are
available for download and installation using the pear command.
Specific revisions may also be specified.
* CVS
All PECL files reside in CVS. A web-based view may be seen at
http://cvs.php.net/pecl/. To download straight from CVS, consider
the following where phpfi is the password for user cvsread:
Most PECL extensions also reside in CVS. A web-based view may be
seen at http://cvs.php.net/pecl/. To download straight from CVS,
the following sequence of commands may be used. Note that phpfi is
the password for user cvsread:
$ cvs -d:pserver:cvsread@cvs.php.net:/repository login
$ cvs -d:pserver:cvsread@cvs.php.net:/repository co pecl/extname
@@ -1270,9 +1392,10 @@ $ cvs -d:pserver:cvsread@cvs.php.net:/repository co pecl/extname
PECL for Windows users
Like with any other PHP extension DLL, to install move the PECL
extension DLLs into the extension_dir folder and include them within
php.ini. For example:
As with any other PHP extension DLL, installation is as simple as
copying the PECL extension DLLs into the extension_dir folder and
loading them from php.ini. For example, add the following line to your
php.ini:
extension=php_extname.dll
@@ -1286,67 +1409,76 @@ Compiling shared PECL extensions with PEAR
$ pear install extname
That will download the source for extname, and compile it on the
system. This results in an extname.so file that may then be included
in php.ini
This will download the source for extname, compile, and install
extname.so into your extension_dir. extname.so may then be loaded via
php.ini
In case the systems preferred_state is set higher than an available
extname version, like it's set to stable and the extension is still in
beta, either alter the preferred_state via pear config-set or specify
a specific version of the PECL extension. For example:
By default, the pear command will not install packages that are marked
with the alpha or beta state. If no stable packages are available, you
may install a beta package using the following command:
$ pear install extname-0.1.1
$ pear install extname-beta
Regardless, pear will copy this extname.so into the extensions
directory. Adjust php.ini accordingly.
You may also install a specific version using this variant:
$ pear install extname-0.1
_________________________________________________________________
Compiling shared PECL extensions with phpize
If using pear is not an option, like for building shared PECL
extensions from CVS, or for unreleased PECL packages, then creating a
shared extension may also be done by manually using the phpize
command. The pear command essentially does this but it may also be
done manually. Assuming the source file is named extname.tgz, and that
it was downloaded into the current directory, consider the following:
Sometimes, using the pear installer is not an option. This could be
because you're behind a firewall, or it could be because the extension
you want to install is not available as a PEAR compatible package,
such as unreleased extensions from CVS. If you need to build such an
extension, you can use the lower-level build tools to perform the
build manually.
The phpize command is used to prepare the build environment for a PHP
extension. In the following sample, the sources for an extension are
in a directory named extname:
$ pear download extname
$ gzip -d < extname.tgz | tar -xvf -
$ cd extname
$ phpize
$ ./configure && make
$ ./configure
$ make
# make install
Upon success, this will create extname.so and put it into the modules/
and/or .libs/ directory within the extname/ source. Move this shared
extension (extname.so) into the PHP extensions directory, and adjust
php.ini accordingly.
A successful install will have created extname.so and put it into the
PHP extensions directory. You'll need to and adjust php.ini and add an
extension=extname.so line before you can use the extension.
_________________________________________________________________
Compiling PECL extensions statically into PHP
To statically include the extension within the PHP build, put the
extensions source into the ext/ directory found in the PHP source. For
example:
You might find that you need to build a PECL extension statically into
your PHP binary. To do this, you'll need to place the extension source
under the php-src/ext/ directory and tell the PHP build system to
regenerate its configure script.
$ cd /your/phpsrcdir/ext
$ pear download extname
$ gzip -d < extname.tgz | tar -xvf -
$ mv extname-x.x.x extname
$ rm package.xml
This will result in the following directory:
/your/phpsrcdir/ext/extname
From here, build PHP as normal:
From here, force PHP to rebuild the configure script, and then build
PHP as normal:
$ cd /your/phpsrcdir
$ ./buildconf
$ rm configure
$ ./buildconf --force
$ ./configure --help
$ ./configure --with-extname --enable-someotherext --with-foobar
$ make
$ make install
Note: To run the 'buildconf' script you need autoconf 2.13 and
automake 1.4+ (newer versions of autoconf may work, but are not
supported).
Whether --enable-extname or --with-extname is used depends on the
extension. Typically an extension that does not require external
libraries uses --enable. To be sure, run the following after
@@ -1403,14 +1535,23 @@ The configuration file
versions of PHP, this happens only once when the web server is
started. For the CGI and CLI version, it happens on every invocation.
The default location of php.ini is a compile time option (see the FAQ
entry), but can be changed for the CGI and CLI version with the -c
command line switch, see the chapter about using PHP from the command
line. You can also use the environment variable PHPRC for an
additional path to search for a php.ini file.
php.ini is searched in these locations (in order):
* SAPI module specific location (PHPIniDir directive in Apache 2, -c
command line option in CGI and CLI, php_ini parameter in NSAPI,
PHP_INI_PATH environment variable in THTTPD)
* HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath (Windows Registry
location)
* The PHPRC environment variable
* Current working directory (for CLI)
* The web server's directory (for SAPI modules), or directory of PHP
(otherwise in Windows)
* Windows directory (C:\windows or C:\winnt) (for Windows), or
--with-config-file-path compile time option
If php-SAPI.ini exists (where SAPI is used SAPI, so the filename is
e.g. php-cli.ini or php-apache.ini), it's used instead of php.ini.
SAPI name can be determined by php_sapi_name().
Note: The Apache web server changes the directory to root at
startup causing PHP to attempt to read php.ini from the root
@@ -1418,11 +1559,11 @@ The configuration file
The php.ini directives handled by extensions are documented
respectively on the pages of the extensions themselves. The list of
the core directives is available in the appendix. Probably not all the
PHP directives are documented in the manual though. For a completel
list of directives available in your PHP version, please read your
well commented php.ini file. Alternatively, you may find the the
latest php.ini from CVS helpful too.
the core directives is available in the appendix. Probably not all PHP
directives are documented in the manual though. For a complete list of
directives available in your PHP version, please read your well
commented php.ini file. Alternatively, you may find the the latest
php.ini from CVS helpful too.
Example 6-1. php.ini example
; any text on a line after an unquoted semicolon (;) is ignored
@@ -1438,6 +1579,10 @@ include_path = ".:/usr/local/lib/php"
; backslashes are treated the same as any other character
include_path = ".;c:\php\lib"
Since PHP 5.1.0, it is possible to refer to existing .ini variables
from within .ini files. Example: open_basedir = ${open_basedir}
":/new/dir".
_________________________________________________________________
How to change configuration settings
@@ -1533,3 +1678,420 @@ Other interfaces to PHP
function, and review the resulting page. You can also access the
values of individual configuration directives at runtime using
ini_get() or get_cfg_var().
_________________________________________________________________
Chapter 7. Installation FAQ
This section holds common questions about the way to install PHP. PHP
is available for almost any OS (except maybe for MacOS before OSX),
and almost any web server.
To install PHP, follow the instructions in the INSTALL file located in
the distribution. Windows users should also read the install.txt file.
There are also some helpful hints for Windows users here.
1. Why shouldn't I use Apache2 with a threaded MPM in a production
environment?
2. Unix/Windows: Where should my php.ini file be located?
3. Unix: I installed PHP, but every time I load a document, I get the
message 'Document Contains No Data'! What's going on here?
4. Unix: I installed PHP using RPMS, but Apache isn't processing the
PHP pages! What's going on here?
5. Unix: I installed PHP 3 using RPMS, but it doesn't compile with the
database support I need! What's going on here?
6. Unix: I patched Apache with the FrontPage extensions patch, and
suddenly PHP stopped working. Is PHP incompatible with the
Apache FrontPage extensions?
7. Unix/Windows: I have installed PHP, but when I try to access a PHP
script file via my browser, I get a blank screen.
8. Unix/Windows: I have installed PHP, but when try to access a PHP
script file via my browser, I get a server 500 error.
9. Some operating systems: I have installed PHP without errors, but
when I try to start apache I get undefined symbol errors:
[mybox:user /src/php4] root# apachectl configtest
apachectl: /usr/local/apache/bin/httpd Undefined symbols:
_compress
_uncompress
10. Windows: I have installed PHP, but when I to access a PHP script
file via my browser, I get the error:
cgi error:
The specified CGI application misbehaved by not
returning a complete set of HTTP headers.
The headers it did return are:
11. Windows: I've followed all the instructions, but still can't get
PHP and IIS to work together!
12. When running PHP as CGI with IIS, PWS, OmniHTTPD or Xitami, I get
the following error: Security Alert! PHP CGI cannot be accessed
directly..
13. How do I know if my php.ini is being found and read? It seems like
it isn't as my changes aren't being implemented.
14. How do I add my PHP directory to the PATH on Windows?
15. How do I make the php.ini file available to PHP on windows?
16. Is it possible to use Apache content negotiation (MultiViews
option) with PHP?
17. Is PHP limited to process GET and POST request methods only?
1. Why shouldn't I use Apache2 with a threaded MPM in a production
environment?
PHP is glue. It is the glue used to build cool web applications by
sticking dozens of 3rd-party libraries together and making it all
appear as one coherent entity through an intuitive and easy to learn
language interface. The flexibility and power of PHP relies on the
stability and robustness of the underlying platform. It needs a
working OS, a working web server and working 3rd-party libraries to
glue together. When any of these stop working PHP needs ways to
identify the problems and fix them quickly. When you make the
underlying framework more complex by not having completely separate
execution threads, completely separate memory segments and a strong
sandbox for each request to play in, feet of clay are introduced into
PHP's system.
If you feel you have to use a threaded MPM, look at a FastCGI
configuration where PHP is running in its own memory space.
And finally, this warning against using a threaded MPM is not as
strong for Windows systems because most libraries on that platform
tend to be threadsafe.
2. Unix/Windows: Where should my php.ini file be located?
By default on Unix it should be in /usr/local/lib which is
<install-path>/lib. Most people will want to change this at
compile-time with the --with-config-file-path flag. You would, for
example, set it with something like:
--with-config-file-path=/etc
And then you would copy php.ini-dist from the distribution to
/etc/php.ini and edit it to make any local changes you want.
--with-config-file-scan-dir=PATH
On Windows the default path for the php.ini file is the Windows
directory. If you're using the Apache webserver, php.ini is first
searched in the Apaches install directory, e.g. c:\program
files\apache group\apache. This way you can have different php.ini
files for different versions of Apache on the same machine.
See also the chapter about the configuration file.
3. Unix: I installed PHP, but every time I load a document, I get the
message 'Document Contains No Data'! What's going on here?
This probably means that PHP is having some sort of problem and is
core-dumping. Look in your server error log to see if this is the
case, and then try to reproduce the problem with a small test case. If
you know how to use 'gdb', it is very helpful when you can provide a
backtrace with your bug report to help the developers pinpoint the
problem. If you are using PHP as an Apache module try something like:
* Stop your httpd processes
* gdb httpd
* Stop your httpd processes
* > run -X -f /path/to/httpd.conf
* Then fetch the URL causing the problem with your browser
* > run -X -f /path/to/httpd.conf
* If you are getting a core dump, gdb should inform you of this now
* type: bt
* You should include your backtrace in your bug report. This should
be submitted to http://bugs.php.net/
If your script uses the regular expression functions (ereg() and
friends), you should make sure that you compiled PHP and Apache with
the same regular expression package. This should happen automatically
with PHP and Apache 1.3.x
4. Unix: I installed PHP using RPMS, but Apache isn't processing the
PHP pages! What's going on here?
Assuming you installed both Apache and PHP from RPM packages, you need
to uncomment or add some or all of the following lines in your
httpd.conf file:
# Extra Modules
AddModule mod_php.c
AddModule mod_php3.c
AddModule mod_perl.c
# Extra Modules
LoadModule php_module modules/mod_php.so
LoadModule php3_module modules/libphp3.so # for PHP 3
LoadModule php4_module modules/libphp4.so # for PHP 4
LoadModule perl_module modules/libperl.so
And add:
AddType application/x-httpd-php3 .php3 # for PHP 3
AddType application/x-httpd-php .php # for PHP 4
... to the global properties, or to the properties of the
VirtualDomain you want to have PHP support added to.
5. Unix: I installed PHP 3 using RPMS, but it doesn't compile with the
database support I need! What's going on here?
Due to the way PHP 3 built, it is not easy to build a complete
flexible PHP RPM. This issue is addressed in PHP 4. For PHP 3, we
currently suggest you use the mechanism described in the
INSTALL.REDHAT file in the PHP distribution. If you insist on using an
RPM version of PHP 3, read on...
The RPM packagers are setting up the RPMS to install without database
support to simplify installations and because RPMS use /usr/ instead
of the standard /usr/local/ directory for files. You need to tell the
RPM spec file which databases to support and the location of the
top-level of your database server.
This example will explain the process of adding support for the
popular MySQL database server, using the mod installation for Apache.
Of course all of this information can be adjusted for any database
server that PHP supports. We will assume you installed MySQL and
Apache completely with RPMS for this example as well.
* First remove mod_php3 :
rpm -e mod_php3
* Then get the source rpm and INSTALL it, NOT --rebuild
rpm -Uvh mod_php3-3.0.5-2.src.rpm
* Then edit the /usr/src/redhat/SPECS/mod_php3.spec file
In the %build section add the database support you want, and the
path.
For MySQL you would add --with-mysql=/usr The %build section will
look something like this:
./configure --prefix=/usr \
--with-apxs=/usr/sbin/apxs \
--with-config-file-path=/usr/lib \
--enable-debug=no \
--enable-safe-mode \
--with-exec-dir=/usr/bin \
--with-mysql=/usr \
--with-system-regex
* Once this modification is made then build the binary rpm as
follows:
rpm -bb /usr/src/redhat/SPECS/mod_php3.spec
* Then install the rpm
rpm -ivh /usr/src/redhat/RPMS/i386/mod_php3-3.0.5-2.i386.rpm
Make sure you restart Apache, and you now have PHP 3 with MySQL
support using RPM's. Note that it is probably much easier to just
build from the distribution tarball of PHP 3 and follow the
instructions in INSTALL.REDHAT found in that distribution.
6. Unix: I patched Apache with the FrontPage extensions patch, and
suddenly PHP stopped working. Is PHP incompatible with the Apache
FrontPage extensions?
No, PHP works fine with the FrontPage extensions. The problem is that
the FrontPage patch modifies several Apache structures, that PHP
relies on. Recompiling PHP (using 'make clean ; make') after the FP
patch is applied would solve the problem.
7. Unix/Windows: I have installed PHP, but when I try to access a PHP
script file via my browser, I get a blank screen.
Do a 'view source' in the web browser and you will probably find that
you can see the source code of your PHP script. This means that the
web server did not send the script to PHP for interpretation.
Something is wrong with the server configuration - double check the
server configuration against the PHP installation instructions.
8. Unix/Windows: I have installed PHP, but when try to access a PHP
script file via my browser, I get a server 500 error.
Something went wrong when the server tried to run PHP. To get to see a
sensible error message, from the command line, change to the directory
containing the PHP executable (php.exe on Windows) and run php -i. If
PHP has any problems running, then a suitable error message will be
displayed which will give you a clue as to what needs to be done next.
If you get a screen full of HTML codes (the output of the phpinfo()
function) then PHP is working, and your problem may be related to your
server configuration which you should double check.
9. Some operating systems: I have installed PHP without errors, but
when I try to start apache I get undefined symbol errors:
[mybox:user /src/php4] root# apachectl configtest
apachectl: /usr/local/apache/bin/httpd Undefined symbols:
_compress
_uncompress
This has actually nothing to do with PHP, but with the MySQL client
libraries. Some need --with-zlib, others do not. This is also covered
in the MySQL FAQ.
10. Windows: I have installed PHP, but when I to access a PHP script
file via my browser, I get the error:
cgi error:
The specified CGI application misbehaved by not
returning a complete set of HTTP headers.
The headers it did return are:
This error message means that PHP failed to output anything at all. To
get to see a sensible error message, from the command line, change to
the directory containing the PHP executable (php.exe on Windows) and
run php -i. If PHP has any problems running, then a suitable error
message will be displayed which will give you a clue as to what needs
to be done next. If you get a screen full of HTML codes (the output of
the phpinfo() function) then PHP is working.
Once PHP is working at the command line, try accessing the script via
the browser again. If it still fails then it could be one of the
following:
* File permissions on your PHP script, php.exe, php4ts.dll, php.ini
or any PHP extensions you are trying to load are such that the
anonymous internet user ISUR_<machinename> cannot access them.
* The script file does not exist (or possibly isn't where you think
it is relative to your web root directory). Note that for IIS you
can trap this error by ticking the 'check file exists' box when
setting up the script mappings in the Internet Services Manager.
If a script file does not exist then the server will return a 404
error instead. There is also the additional benefit that IIS will
do any authentication required for you based on the NTLanMan
permissions on your script file.
11. Windows: I've followed all the instructions, but still can't get
PHP and IIS to work together!
Make sure any user who needs to run a PHP script has the rights to run
php.exe! IIS uses an anonymous user which is added at the time IIS is
installed. This user needs rights to php.exe. Also, any authenticated
user will also need rights to execute php.exe. And for IIS4 you need
to tell it that PHP is a script engine. Also, you will want to read
this faq.
12. When running PHP as CGI with IIS, PWS, OmniHTTPD or Xitami, I get
the following error: Security Alert! PHP CGI cannot be accessed
directly..
You must set the cgi.force_redirect directive to 0. It defaults to 1
so be sure the directive isn't commented out (with a ;). Like all
directives, this is set in php.ini
Because the default is 1, it's critical that you're 100% sure that the
correct php.ini file is being read. Read this faq for details.
13. How do I know if my php.ini is being found and read? It seems like
it isn't as my changes aren't being implemented.
To be sure your php.ini is being read by PHP, make a call to phpinfo()
and near the top will be a listing called Configuration File
(php.ini). This will tell you where PHP is looking for php.ini and
whether or not it's being read. If just a directory PATH exists than
it's not being read and you should put your php.ini in that directory.
If php.ini is included within the PATH than it is being read.
If php.ini is being read and you're running PHP as a module, then be
sure to restart your web server after making changes to php.ini
14. How do I add my PHP directory to the PATH on Windows?
On Windows NT, 2000, XP and 2003:
* Go to Control Panel and open the System icon (Start -> Settings ->
Control Panel -> System, or just Start -> Control Panel -> System
for Windows XP/2003)
* Go to the Advanced tab
* Click on the 'Environment Variables' button
* Look into the 'System Variables' pane
* Find the Path entry (you may need to scroll to find it)
* Double click on the Path entry
* Enter your PHP directory ant the end, including ';' before (e.g.
;C:\php)
* Press OK and restart your computer
On Windows 98/Me you need to edit the autoexec.bat file:
* Open the Notepad (Start -> Run and enter notepad)
* Open the C:\autoexec.bat file
* Locate the line with PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;..... and
add: ;C:\php to the end of the line
* Save the file and restart your computer
Note: Be sure to reboot after following the steps above to ensure
that the PATH changes are applied.
The PHP manual used to promote the copying of files into the Windows
system directory, this is because this directory (C:\Windows,
C:\WINNT, etc.) is by default in the systems PATH. Copying files into
the Windows system directory has long since been deprecated and may
cause problems.
15. How do I make the php.ini file available to PHP on windows?
There are several ways of doing this. If you are using Apache, read
their installation specific instructions (Apache 1, Apache 2),
otherwise you must set the PHPRC environment variable:
On Windows NT, 2000, XP and 2003:
* Go to Control Panel and open the System icon (Start -> Settings ->
Control Panel -> System, or just Start -> Control Panel -> System
for Windows XP/2003)
* Go to the Advanced tab
* Click on the 'Environment Variables' button
* Look into the 'System variables' pane
* Click on 'New' and enter 'PHPRC' as the variable name and the
directory where php.ini is located as the variable value (e.g.
C:\php)
* Press OK and restart your computer
On Windows 98/Me you need to edit the autoexec.bat file:
* Open the Notepad (Start -> Run and enter notepad)
* Open the C:\autoexec.bat file
* Add a new line to the end of the file: set PHPRC=C:\php (replace
C:\php with the directory where php.ini is located). Please note
that the path cannot contain spaces. For instance, if you have
installed PHP in C:\Program Files\PHP, you would enter
C:\PROGRA~1\PHP instead.
* Save the file and restart your computer
16. Is it possible to use Apache content negotiation (MultiViews
option) with PHP?
If links to PHP files include extension, everything works perfect.
This FAQ is only for the case when links to PHP files don't include
extension and you want to use content negotiation to choose PHP files
from URL with no extension. In this case, replace the line AddType
application/x-httpd-php .php with:
# PHP 4
AddHandler php-script php
AddType text/html php
# PHP 5
AddHandler php5-script php
AddType text/html php
This solution doesn't work for Apache 1 as PHP module doesn't catch
php-script.
17. Is PHP limited to process GET and POST request methods only?
No, it is possible to handle any request method, e.g. CONNECT. Proper
response status can be sent with header(). If only GET and POST
methods should be handled, it can be achieved with this Apache
configuration:
<LimitExcept GET POST>
Deny from all
</LimitExcept>
+5 -5
View File
@@ -1,6 +1,6 @@
--------------------------------------------------------------------
The PHP License, Version 3.0
Copyright (c) 1999 - 2005 The PHP Group. All rights reserved.
The PHP License, version 3.01
Copyright (c) 1999 - 2006 The PHP Group. All rights reserved.
--------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -38,8 +38,8 @@ are met:
6. Redistributions of any form whatsoever must retain the following
acknowledgment:
"This product includes PHP, freely available from
<http://www.php.net/>".
"This product includes PHP software, freely available from
<http://www.php.net/software/>".
THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND
ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
@@ -64,5 +64,5 @@ The PHP Group can be contacted via Email at group@php.net.
For more information on the PHP Group and the PHP project,
please see <http://www.php.net>.
This product includes the Zend Engine, freely available at
PHP includes the Zend Engine, freely available at
<http://www.zend.com>.
+70
View File
@@ -0,0 +1,70 @@
#
# LCOV
#
lcov: lcov-html
lcov-test: all
@echo "Running test suite"
@find . -name \*.gcda -o -name \*.da -o -name \*.bbg? | xargs rm -f
-@if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \
NO_INTERACTION=1 \
TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
TEST_PHP_SRCDIR=$(top_srcdir) \
CC="$(CC)" \
$(PHP_EXECUTABLE) -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' -d 'memory_limit=-1' $(top_srcdir)/run-tests.php -d 'extension_dir=modules/' -d `( . $(PHP_MODULES) ; echo extension=$$dlname)` tests/; \
elif test ! -z "$(SAPI_CLI_PATH)" && test -x "$(SAPI_CLI_PATH)"; then \
NO_INTERACTION=1 \
TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
TEST_PHP_SRCDIR=$(top_srcdir) \
CC="$(CC)" \
$(top_builddir)/$(SAPI_CLI_PATH) -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' -d 'memory_limit=-1' $(top_srcdir)/run-tests.php $(TESTS); \
else \
echo "ERROR: Cannot run tests without CLI sapi."; \
fi
php_lcov.info: lcov-test
@echo "Generating data for $@"
@rm -rf lcov_data/
@$(mkinstalldirs) lcov_data/
@echo
-@find . -name \*.gcda -o -name \*.gcno -o -name \*.da | sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 's/\.da//g' | uniq | while read x; do \
echo -n . ;\
y=`echo $$x | sed -e 's!\.libs/!!'`; \
dir=lcov_data/`dirname $$x`; \
test -d "$$dir" || $(mkinstalldirs) "$$dir"; \
if test -f "$(top_srcdir)/$$y.c"; then \
ln -f -s $(top_srcdir)/$$y.c lcov_data/$$y.c; \
fi; \
if test -f "$(top_srcdir)/$$y.re"; then \
ln -f -s $(top_srcdir)/$$y.re lcov_data/$$y.re; \
fi; \
if test -f "$(top_srcdir)/$$y.y"; then \
ln -f -s $(top_srcdir)/$$y.y lcov_data/$$y.y; \
fi; \
if test -f "$(top_srcdir)/$$y.l"; then \
ln -f -s $(top_srcdir)/$$y.l lcov_data/$$y.l; \
fi; \
if test -f "$(top_builddir)/$$y.c"; then \
ln -f -s $(top_builddir)/$$y.c lcov_data/$$y.c; \
fi; \
test -f "$$x.gcno" && cp $$x.gcno lcov_data/$$y.gcno ; \
test -f "$$x.gcda" && cp $$x.gcda lcov_data/$$y.gcda ; \
test -f "$$x.da" && cp $$x.da lcov_data/$$y.da ; \
test -f "$$x.bb" && cp $$x.bb lcov_data/$$y.bb ; \
test -f "$$x.bbg" && cp $$x.bbg lcov_data/$$y.bbg ; \
done
@echo
@echo "Generating $@"
@$(LTP) --directory lcov_data/ --capture --base-directory=lcov_data --output-file $@
lcov-html: php_lcov.info
@echo "Generating lcov HTML"
@$(LTP_GENHTML) --legend --output-directory lcov_html/ --title "PHP Code Coverage" --show-details php_lcov.info
lcov-clean:
rm -f php_lcov.info
rm -rf lcov_data/
rm -rf lcov_html/
+28 -6
View File
@@ -5,9 +5,6 @@ INSTALL_DATA = $(INSTALL) -m 644
DEFS = -DPHP_ATOM_INC -I$(top_builddir)/include -I$(top_builddir)/main -I$(top_srcdir)
COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(PHP_FRAMEWORKPATH)
CORE_HEADERS = Zend/ TSRM/ include/ main/ main/streams/ regex/ ext/standard/
INSTALL_HEADERS = $(CORE_HEADERS) $(INSTALL_EXT_HEADERS)
all: $(all_targets)
@echo
@echo "Build complete."
@@ -28,10 +25,10 @@ install: $(all_targets) $(install_targets)
install-sapi: $(OVERALL_TARGET)
@echo "Installing PHP SAPI module: $(PHP_SAPI)"
-@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
-@if test ! -r $(phptempdir)/libphp5.$(SHLIB_SUFFIX_NAME); then \
-@if test ! -r $(phptempdir)/libphp5.$(SHLIB_DL_SUFFIX_NAME); then \
for i in 0.0.0 0.0 0; do \
if test -r $(phptempdir)/libphp5.$(SHLIB_SUFFIX_NAME).$$i; then \
$(LN_S) $(phptempdir)/libphp5.$(SHLIB_SUFFIX_NAME).$$i $(phptempdir)/libphp5.$(SHLIB_SUFFIX_NAME); \
if test -r $(phptempdir)/libphp5.$(SHLIB_DL_SUFFIX_NAME).$$i; then \
$(LN_S) $(phptempdir)/libphp5.$(SHLIB_DL_SUFFIX_NAME).$$i $(phptempdir)/libphp5.$(SHLIB_DL_SUFFIX_NAME); \
break; \
fi; \
done; \
@@ -45,6 +42,31 @@ install-modules: build-modules
@rm -f modules/*.la >/dev/null 2>&1
@$(INSTALL) modules/* $(INSTALL_ROOT)$(EXTENSION_DIR)
install-headers:
-@if test "$(INSTALL_HEADERS)"; then \
for i in `echo $(INSTALL_HEADERS)`; do \
i=`$(top_srcdir)/build/shtool path -d $$i`; \
paths="$$paths $(INSTALL_ROOT)$(phpincludedir)/$$i"; \
done; \
$(mkinstalldirs) $$paths && \
echo "Installing header files: $(INSTALL_ROOT)$(phpincludedir)/" && \
for i in `echo $(INSTALL_HEADERS)`; do \
if test "$(PHP_PECL_EXTENSION)"; then \
src=`echo $$i | $(SED) -e "s#ext/$(PHP_PECL_EXTENSION)/##g"`; \
else \
src=$$i; \
fi; \
if test -f "$(top_srcdir)/$$src"; then \
$(INSTALL_DATA) $(top_srcdir)/$$src $(INSTALL_ROOT)$(phpincludedir)/$$i; \
elif test -f "$(top_builddir)/$$src"; then \
$(INSTALL_DATA) $(top_builddir)/$$src $(INSTALL_ROOT)$(phpincludedir)/$$i; \
else \
(cd $(top_srcdir)/$$src && $(INSTALL_DATA) *.h $(INSTALL_ROOT)$(phpincludedir)/$$i; \
cd $(top_builddir)/$$src && $(INSTALL_DATA) *.h $(INSTALL_ROOT)$(phpincludedir)/$$i) 2>/dev/null || true; \
fi \
done; \
fi
install-su: install-pear
test: all
+979 -482
View File
File diff suppressed because it is too large. Load diff
+3 -3
View File
@@ -31,11 +31,11 @@ Having said that, here are the organizational rules:
6. Test your changes before committing them. We mean it. Really.
Currently we have the following branches in use:
HEAD Will become PHP 5.1. This CVS branch is for active development.
PHP_5_0 Is used to release the PHP 5.0.x series. Only minor feature
HEAD Will become PHP 6.0. This CVS branch is for active development.
PHP_5_1 Is used to release the PHP 5.1.x series. Only minor feature
enhancements may go in here, but please keep that as infrequent as
possible.
PHP_4_3 Is used to release the PHP 4.3.x series. Only bugfixes are permitted
PHP_4_4 Is used to release the PHP 4.4.x series. Only bugfixes are permitted
on this branch.
The next few rules are more of a technical nature.
+1 -1
View File
@@ -34,7 +34,7 @@ ZEND_END_MODULE_GLOBALS(my_input_filter)
ZEND_DECLARE_MODULE_GLOBALS(my_input_filter)
function_entry my_input_filter_functions[] = {
zend_function_entry my_input_filter_functions[] = {
PHP_FE(my_get_raw, NULL)
{NULL, NULL, NULL}
};
-1
View File
@@ -2,4 +2,3 @@ Zend Engine
-----------
- Look at making zend_constant value member be a zval* instead of zval. (Andi)
- Implement inheritance rules for type hints. (Marcus)
- Find a keyword for the if-set-or operator (apply the patch). (Marcus, all)
+1 -1
View File
@@ -1,4 +1,4 @@
Copyright (c) 1999, 2000, Andi Gutmans, Sascha Schumann, Zeev Suraski.
Copyright (c) 1999-2006, Andi Gutmans, Sascha Schumann, Zeev Suraski.
All rights reserved.
Redistribution and use in source and binary forms, with or without
+47 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Thread Safe Resource Manager |
+----------------------------------------------------------------------+
| Copyright (c) 1999, 2000, Andi Gutmans, Sascha Schumann, Zeev Suraski|
| Copyright (c) 1999-2006, Andi Gutmans, Sascha Schumann, Zeev Suraski |
| This source file is subject to the TSRM license, that is bundled |
| with this package in the file LICENSE |
+----------------------------------------------------------------------+
@@ -480,6 +480,52 @@ void ts_free_thread(void)
}
/* frees all resources allocated for all threads except current */
void ts_free_worker_threads(void)
{
tsrm_tls_entry *thread_resources;
int i;
THREAD_T thread_id = tsrm_thread_id();
int hash_value;
tsrm_tls_entry *last=NULL;
tsrm_mutex_lock(tsmm_mutex);
hash_value = THREAD_HASH_OF(thread_id, tsrm_tls_table_size);
thread_resources = tsrm_tls_table[hash_value];
while (thread_resources) {
if (thread_resources->thread_id != thread_id) {
for (i=0; i<thread_resources->count; i++) {
if (resource_types_table[i].dtor) {
resource_types_table[i].dtor(thread_resources->storage[i], &thread_resources->storage);
}
}
for (i=0; i<thread_resources->count; i++) {
free(thread_resources->storage[i]);
}
free(thread_resources->storage);
if (last) {
last->next = thread_resources->next;
} else {
tsrm_tls_table[hash_value] = thread_resources->next;
}
free(thread_resources);
if (last) {
thread_resources = last->next;
} else {
thread_resources = tsrm_tls_table[hash_value];
}
} else {
if (thread_resources->next) {
last = thread_resources;
}
thread_resources = thread_resources->next;
}
}
tsrm_mutex_unlock(tsmm_mutex);
}
/* deallocates all occurrences of a given id */
void ts_free_id(ts_rsrc_id id)
{
+4 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Thread Safe Resource Manager |
+----------------------------------------------------------------------+
| Copyright (c) 1999, 2000, Andi Gutmans, Sascha Schumann, Zeev Suraski|
| Copyright (c) 1999-2006, Andi Gutmans, Sascha Schumann, Zeev Suraski |
| This source file is subject to the TSRM license, that is bundled |
| with this package in the file LICENSE |
+----------------------------------------------------------------------+
@@ -106,6 +106,9 @@ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id);
/* frees all resources allocated for the current thread */
TSRM_API void ts_free_thread(void);
/* frees all resources allocated for all threads except current */
void ts_free_worker_threads(void);
/* deallocates all occurrences of a given id */
TSRM_API void ts_free_id(ts_rsrc_id id);
+2
View File
@@ -42,6 +42,8 @@ char *alloca ();
#ifndef MAXPATHLEN
# ifdef PATH_MAX
# define MAXPATHLEN PATH_MAX
# elif defined(MAX_PATH)
# define MAXPATHLEN MAX_PATH
# else
# define MAXPATHLEN 256
# endif
+3 -3
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2005 The PHP Group |
| Copyright (c) 1997-2006 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_0.txt. |
| http://www.php.net/license/3_01.txt |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+3 -3
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2005 The PHP Group |
| Copyright (c) 1997-2006 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_0.txt. |
| http://www.php.net/license/3_01.txt |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+47 -27
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2005 The PHP Group |
| Copyright (c) 1997-2006 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_0.txt. |
| http://www.php.net/license/3_01.txt |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
@@ -163,18 +163,15 @@ static int php_is_file_ok(const cwd_state *state)
static void cwd_globals_ctor(virtual_cwd_globals *cwd_globals TSRMLS_DC)
{
CWD_STATE_COPY(&cwd_globals->cwd, &main_cwd_state);
#ifdef REALPATH_CACHE
cwd_globals->realpath_cache_size = 0;
cwd_globals->realpath_cache_size_limit = REALPATH_CACHE_SIZE;
cwd_globals->realpath_cache_ttl = REALPATH_CACHE_TTL;
memset(cwd_globals->realpath_cache, 0, sizeof(cwd_globals->realpath_cache));
#endif
}
static void cwd_globals_dtor(virtual_cwd_globals *cwd_globals TSRMLS_DC)
{
CWD_STATE_FREE(&cwd_globals->cwd);
#ifdef REALPATH_CACHE
{
int i;
@@ -187,7 +184,6 @@ static void cwd_globals_dtor(virtual_cwd_globals *cwd_globals TSRMLS_DC)
}
}
}
#endif
}
static char *tsrm_strndup(const char *s, size_t length)
@@ -308,7 +304,6 @@ CWD_API char *virtual_getcwd(char *buf, size_t size TSRMLS_DC)
return buf;
}
#ifdef REALPATH_CACHE
static inline unsigned long realpath_cache_key(const char *path, int path_len)
{
register unsigned long h;
@@ -352,19 +347,18 @@ static inline realpath_cache_bucket* realpath_cache_find(const char *path, int p
while (*bucket != NULL) {
if (CWDG(realpath_cache_ttl) && (*bucket)->expires < t) {
realpath_cache_bucket *r = *bucket;
*bucket = (*bucket)->next;
CWDG(realpath_cache_size) -= sizeof(realpath_cache_bucket) + r->path_len + 1 + r->realpath_len + 1;
free(r);
*bucket = (*bucket)->next;
CWDG(realpath_cache_size) -= sizeof(realpath_cache_bucket) + r->path_len + 1 + r->realpath_len + 1;
free(r);
} else if (key == (*bucket)->key && path_len == (*bucket)->path_len &&
memcmp(path, (*bucket)->path, path_len) == 0) {
return *bucket;
} else {
*bucket = (*bucket)->next;
bucket = &(*bucket)->next;
}
}
return NULL;
}
#endif
/* Resolve path relatively to state and put the real path into state */
@@ -385,20 +379,17 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
#else
char *new_path;
#endif
#ifdef REALPATH_CACHE
char orig_path[MAXPATHLEN];
int orig_path_len;
int orig_path_len = 0;
realpath_cache_bucket *bucket;
time_t t;
time_t t = 0;
TSRMLS_FETCH();
#endif
if (path_length == 0)
return (0);
if (path_length >= MAXPATHLEN)
return (1);
#ifdef REALPATH_CACHE
if (use_realpath && CWDG(realpath_cache_size_limit)) {
if (IS_ABSOLUTE_PATH(path, path_length) || (state->cwd_length < 1)) {
memcpy(orig_path, path, path_length+1);
@@ -430,7 +421,6 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
}
}
}
#endif
#if !defined(TSRM_WIN32) && !defined(NETWARE)
/* cwd_length can be 0 when getcwd() fails.
* This can happen under solaris when a dir does not have read permissions
@@ -478,13 +468,14 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
#endif
#if defined(TSRM_WIN32)
{
char *dummy = NULL;
int new_path_length;
new_path_length = GetLongPathName(path, dummy, 0) + 1;
new_path_length = GetLongPathName(path, NULL, 0);
if (new_path_length == 0) {
return 1;
goto php_failed_getlongpath;
}
/* GetLongPathName already counts the \0 */
new_path = (char *) malloc(new_path_length);
if (!new_path) {
return 1;
@@ -495,6 +486,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
path_length = new_path_length;
} else {
free(new_path);
php_failed_getlongpath:
new_path = NULL;
}
}
@@ -607,11 +599,9 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
#endif
free(free_path);
#ifdef REALPATH_CACHE
if (use_realpath && CWDG(realpath_cache_size_limit)) {
realpath_cache_add(orig_path, orig_path_len, state->cwd, state->cwd_length, t TSRMLS_CC);
}
#endif
if (verify_path && verify_path(state)) {
CWD_STATE_FREE(state);
@@ -775,7 +765,7 @@ CWD_API int virtual_chmod(const char *filename, mode_t mode TSRMLS_DC)
}
#if !defined(TSRM_WIN32) && !defined(NETWARE)
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group TSRMLS_DC)
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group, int link TSRMLS_DC)
{
cwd_state new_state;
int ret;
@@ -783,7 +773,15 @@ CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group TSRMLS_
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, filename, NULL, 0);
ret = chown(new_state.cwd, owner, group);
if (link) {
#if HAVE_LCHOWN
ret = lchown(new_state.cwd, owner, group);
#else
ret = -1;
#endif
} else {
ret = chown(new_state.cwd, owner, group);
}
CWD_STATE_FREE(&new_state);
return ret;
@@ -856,7 +854,9 @@ CWD_API int virtual_stat(const char *path, struct stat *buf TSRMLS_DC)
int retval;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, path, NULL, 1);
if (virtual_file_ex(&new_state, path, NULL, 1)) {
return -1;
}
retval = stat(new_state.cwd, buf);
@@ -1043,6 +1043,26 @@ CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
#endif
/* On AIX & Tru64 when a file does not exist realpath() returns
* NULL, and sets errno to ENOENT. Unlike in other libc implementations
* the destination is not filled and remains undefined. Therefor, we
* must populate it manually using strcpy as done on systems with no
* realpath() function.
*/
#if defined(__osf__) || defined(_AIX)
char *php_realpath_hack(char *src, char *dest)
{
char *ret;
if ((ret = realpath(src, dest)) == NULL && errno == ENOENT) {
return strcpy(dest, src);
} else {
return ret;
}
}
#endif
/*
* Local variables:
+12 -26
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2005 The PHP Group |
| Copyright (c) 1997-2006 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_0.txt. |
| http://www.php.net/license/3_01.txt |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
@@ -166,23 +166,8 @@ CWD_API int virtual_access(const char *pathname, int mode TSRMLS_DC);
#endif
#endif
/* On AIX & Tru64 when a file does not exist realpath() returns
* NULL, and sets errno to ENOENT. Unlike in other libc implementations
* the destination is not filled and remains undefined. Therefor, we
* must populate it manually using strcpy as done on systems with no
* realpath() function.
*/
#if defined(__osf__) || defined(_AIX)
static char *php_realpath_hack(char *src, char *dest)
{
char *ret;
if ((ret = realpath(src, dest)) == NULL && errno == ENOENT) {
return strcpy(dest, src);
} else {
return ret;
}
}
char *php_realpath_hack(char *src, char *dest);
#endif
#if HAVE_UTIME
@@ -190,16 +175,14 @@ CWD_API int virtual_utime(const char *filename, struct utimbuf *buf TSRMLS_DC);
#endif
CWD_API int virtual_chmod(const char *filename, mode_t mode TSRMLS_DC);
#if !defined(TSRM_WIN32) && !defined(NETWARE)
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group TSRMLS_DC);
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group, int link TSRMLS_DC);
#endif
CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func verify_path, int use_realpath);
#define REALPATH_CACHE
#define REALPATH_CACHE_TTL (2*60) /* 2 minutes */
#define REALPATH_CACHE_SIZE 0 /* disabled while php.ini isn't loaded */
#ifdef REALPATH_CACHE
typedef struct _realpath_cache_bucket {
unsigned long key;
char *path;
@@ -209,16 +192,13 @@ typedef struct _realpath_cache_bucket {
time_t expires;
struct _realpath_cache_bucket *next;
} realpath_cache_bucket;
#endif
typedef struct _virtual_cwd_globals {
cwd_state cwd;
#ifdef REALPATH_CACHE
long realpath_cache_size;
long realpath_cache_size_limit;
long realpath_cache_ttl;
realpath_cache_bucket *realpath_cache[1024];
#endif
} virtual_cwd_globals;
#ifdef ZTS
@@ -262,7 +242,10 @@ extern virtual_cwd_globals cwd_globals;
#endif
#define VCWD_CHMOD(path, mode) virtual_chmod(path, mode TSRMLS_CC)
#if !defined(TSRM_WIN32) && !defined(NETWARE)
#define VCWD_CHOWN(path, owner, group) virtual_chown(path, owner, group TSRMLS_CC)
#define VCWD_CHOWN(path, owner, group) virtual_chown(path, owner, group, 0 TSRMLS_CC)
#if HAVE_LCHOWN
#define VCWD_LCHOWN(path, owner, group) virtual_chown(path, owner, group, 1 TSRMLS_CC)
#endif
#endif
#else
@@ -305,6 +288,9 @@ extern virtual_cwd_globals cwd_globals;
#define VCWD_CHMOD(path, mode) chmod(path, mode)
#if !defined(TSRM_WIN32) && !defined(NETWARE)
#define VCWD_CHOWN(path, owner, group) chown(path, owner, group)
#if HAVE_LCHOWN
#define VCWD_LCHOWN(path, owner, group) lchown(path, owner, group)
#endif
#endif
#endif
+3 -3
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2005 The PHP Group |
| Copyright (c) 1997-2006 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_0.txt. |
| http://www.php.net/license/3_01.txt |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+3 -3
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2005 The PHP Group |
| Copyright (c) 1997-2006 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_0.txt. |
| http://www.php.net/license/3_01.txt |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
Executable
+548
View File
@@ -0,0 +1,548 @@
$Id$
UPGRADE NOTES - PHP 5.1
1. Changes in reference handling
a. Overview
b. Code that worked under PHP 4.3, but now fails
c. Code that was valid under PHP 4.3, but now throws an error
d. Code that failed under PHP 4.3, but now works
e. Code that 'should have worked' under PHP 5.0
f. Warnings that came and went
2. Reading []
3. instanceof, is_a(), is_subclass_of(), catch
4. Integer values in function parameters
5. Abstract private methods
6. Access modifiers in interfaces
7. Changes in inheritance rules
8. Class constants
9. Extensions
a. Extensions that are gone from the PHP core
b. Class constants in new PHP 5.1 extensions
10. Date/time support
11. Changes in database support
a. PDO overview
b. Changes in MySQL support
c. Changes in SQLite support
12. Further migration information
13. Checking for E_STRICT errors
===============================================================================
1. Changes in reference handling
================================
1a. Overview
============
>From the PHP script writer's point of view, the change most likely to impact
legacy code is in the way that references are handled in all PHP versions
post-dating the PHP 4.4.0 release.
Until and including PHP 4.3, it was possible to send, assign or return variables
by reference that should really be returned by value, such as a constant, a
temporary value (e.g. the result of an expression), or the result of a function
that had itself been returned by value, as here:
<?php
$foo = "123";
function return_value() {
global $foo;
return $foo;
}
$bar = &return_value();
?>
Although this code would usually work as expected under PHP 4.3, in the general
case the result is undefined. The Zend Engine could not act correctly on these
values as references. This bug could and did lead to various hard-to-reproduce
memory corruption problems, particularly where the code base was large.
In PHP 4.4.0, PHP 5.0.4 and all subsequent PHP releases, the Engine was fixed
to 'know' when the reference operation is being used on a value that should
not be referenced. The actual value is now used in such cases, and a warning
is emitted. The warning takes the form of an E_NOTICE in PHP 4.4.0 and up,
and E_STRICT in PHP 5.0.4 and up.
Code that could potentially produce memory corruption can no longer do so.
However, some legacy code might work differently as a result.
1b. Code that worked under PHP 4.3, but now fails
=================================================
<?php
function func(&$arraykey) {
return $arraykey; // function returns by value!
}
$array = array('a', 'b', 'c');
foreach (array_keys($array) as $key) {
$y = &func($array[$key]);
$z[] =& $y;
}
var_dump($z);
?>
Running the above script under any version of PHP that pre-dates the reference
fix would produce this output:
array(3) {
[0]=>
&string(1) "a"
[1]=>
&string(1) "b"
[2]=>
&string(1) "c"
}
Following the reference fix, the same code would result in:
array(3) {
[0]=>
&string(1) "c"
[1]=>
&string(1) "c"
[2]=>
&string(1) "c"
}
This is because, following the changes, func() assigns by value. The value
of $y is re-assigned, and reference-binding is preserved from $z. Prior
to the fix, the value was assigned by reference, leading $y to be
re-bound on each assignment. The attempt to bind to a temporary value
by reference was the cause of the memory corruption.
Such code can be made to work identically in both the pre-fix and the
post-fix PHP versions. The signature of func() can be altered to return
by reference, or the reference assignment can be removed from the result
of func().
<?php
function func() {
return 'function return';
}
$x = 'original value';
$y =& $x;
$y = &func();
echo $x;
?>
In PHP 4.3 $x would be 'original value', whereas after the changes it would
be 'function return' - remember that where the function does not return by
reference, the reference assignment is converted to a regular assignment.
Again, this can be brought to a common base, either by forcing func() to
return by reference or by eliminating the by-reference assignment.
1c. Code that was valid under PHP 4.3, but now throws an error
==============================================================
<?php
class Foo {
function getThis() {
return $this;
}
function destroyThis() {
$baz =& $this->getThis();
}
}
$bar = new Foo();
$bar->destroyThis();
var_dump($bar);
?>
In PHP 5.0.3, $bar evaluated to NULL instead of returning an object.
That happened because getThis() returns by value, but the value here
is assigned by reference. Although it now works in the expected way,
this is actually invalid code which will throw an E_NOTICE under
PHP 4.4 or an E_STRICT under PHP 5.0.4 and up.
1d. Code that failed under PHP 4.3, but now works
=================================================
<?php
function &f() {
$x = "foo";
var_dump($x);
print "$x\n";
return($a);
}
for ($i = 0; $i < 3; $i++) {
$h = &f();
}
?>
In PHP 4.3 the third call to var_dump produces NULL, due to the memory
corruption caused by returning an uninitialized value by reference.
This is valid code in PHP 5.0.4 and up, but threw errors in earlier
releases of PHP.
<?php
$arr = array('a1' => array('alfa' => 'ok'));
$arr =& $arr['a1'];
echo '-'.$arr['alfa']."-\n";
?>
Until PHP 5.0.5, it wasn't possible to assign an array element by
reference in this way. It now is.
1e. Code that 'should have worked' under PHP 5.0
================================================
There are a couple of instances of bugs reported under PHP 5.0 prior
to the reference fixes which now 'work'. However, in both cases errors
are thrown by PHP 5.1, because the code was invalid in the first place.
Returning values by reference using self:: now works in the general
case but throws an E_STRICT warning, and although your mileage may
vary when assigning by reference to an overloaded object, you will
still see an E_ERROR when you try it, even where the assignment
itself appears to work.
1f. Warnings that came and went
===============================
<?php
function & foo() {
$var = 'ok';
return $var;
}
function & bar() {
return foo();
}
$a =& bar();
echo "$a\n";
?>
Nested calls to functions returning by reference are valid code under both
PHP 4.3 and PHP 5.1, but threw an unwarranted E_NOTICE or E_STRICT under
the intervening PHP releases.
2. Reading []
=============
<?php
class XmlTest {
function test_ref(&$test) {
$test = "ok";
}
function test($test) { }
function run() {
$ar = array();
$this->test_ref($ar[]);
var_dump($ar);
$this->test($ar[]);
}
}
$o = new XmlTest();
$o->run();
?>
This should always have thrown a fatal E_ERROR, because [] cannot be used
for reading in PHP. It is invalid code in PHP 4.4.2 and PHP 5.0.5 upward.
3. instanceof, is_a(), is_subclass_of(), catch
==============================================
In PHP 5.0, is_a() was deprecated and replaced by the "instanceof" operator.
There were some issues with the initial implementation of "instanceof", which
relied on __autoload() to search for missing classes. If the class was not
present, "instanceof" would throw a fatal E_ERROR due to the failure of
__autoload() to discover that class. The same behaviour occurred in the
"catch" operator and the is_subclass_of() function, for the same reason.
None of these functions or operators call __autoload() in PHP 5.1, and
the class_exists() workarounds used in code written for PHP 5.0, while
not problematic in any way, are no longer necessary.
4. Integer values in function parameters
========================================
With the advent of PHP 5.0, a new parameter parsing API was introduced
which is used by a large number of PHP functions. In all versions of
PHP between 5.0 and 5.1, the handling of integer values was very strict
and would reject non-well formed numeric values when a PHP function
expected an integer. These checks have now been relaxed to support
non-well formed numeric strings such as " 123" and "123 ", and will
no longer fail as they did under PHP 5.0. However, to promote code
safety and input validation, PHP functions will now emit an E_NOTICE
when such strings are passed as integers.
5. Abstract private methods
===========================
Abstract private methods were supported between PHP 5.0.0 and PHP 5.0.4,
but were then disallowed on the grounds that the behaviours of 'private'
and 'abstract' are mutually exclusive.
6. Access modifiers in interfaces
=================================
Under PHP 5.0, function declarations in interfaces were treated in exactly
the same way as function declarations in classes. This has not been the case
since October 2004, at which point only the 'public' access modifier was
allowed in interface function declarations. Since April 2005 - which pre-dates
the PHP 5.0b1 release - the 'static' modifier has also been allowed. However,
the 'protected' and 'private' modifiers will now throw an E_ERROR, as will
'abstract'. Note that this change should not affect your existing code, as
none of these modifiers makes sense in the context of interfaces anyway.
7. Changes in inheritance rules
===============================
Under PHP 5.0, it was possible to have a function declaration in a derived class
that did not match the declaration of the same function in the base class, e.g.
class Base {
function &return_by_ref() {
$r = 1;
return $r;
}
}
class Derived extends Base {
function return_by_ref() {
return 1;
}
}
This code will cause an E_STRICT error to be emitted under PHP 5.1.
8. Class constants
==================
Under PHP 5.0, the following code was valid:
<?php
class test {
const foobar = 'foo';
const foobar = 'bar';
}
?>
Under PHP 5.1, redefinition of a class constant will throw a fatal E_ERROR.
9. Extensions
=============
9a. Extensions that are gone from the PHP core
==============================================
One of the first things you're likely to notice when you download PHP 5.1 is that
several of the older extensions have disappeared. Those extensions that are still
actively maintained are available in the PHP Extension Community Library (PECL),
at http://pecl.php.net. Windows binaries are built regularly, and you can obtain
the binaries for PECL extensions built against PHP 5.1 from
http://pecl4win.php.net/list.php/5_1.
Extension Alternative/status
========= ========================
ext/cpdf pecl/pdflib
ext/dbx pecl/dbx
ext/dio pecl/dio
ext/fam not actively maintained
ext/ingres_ii pecl/ingres
ext/ircg not actively maintained
ext/mcve pecl/mcve
ext/mnogosearch not actively maintained
ext/oracle ext/oci8 or ext/pdo_oci
ext/ovrimos not actively maintained
ext/pfpro not actively maintained
- alternatives at http://pecl.php.net/packages.php?catpid=18&catname=Payment
ext/w32api pecl/ffi
ext/yp not actively maintained
sapi/activescript http://pecl4win.php.net/ext.php/php5activescript.dll (PECL package)
or pecl/activescript (CVS)
Modules in PECL that are not actively maintained (i.e. have not been supported
for some time, have no active maintainer working on them currently, and do not
have any PECL package releases), are still available in CVS at
http://cvs.php.net/pecl/. However, unreleased PHP modules are by their nature
unsupported, and your mileage may vary when attempting to install or use them.
9b. Class constants in new PHP 5.1 extensions
=============================================
The Zend Engine 2.1 API allows extension developers to declare class constants
in object oriented extensions. New extensions written for PHP 5.1, including SPL,
PDO, ext/XMLReader and ext/date, have their constants in the format
PDO::CLASS_CONSTANT
rather than in the C format
PDO_CLASS_CONSTANT
in order to minimise pollution of the global namespace in PHP.
10. Date/time support
====================
Date/time support has been fully rewritten in PHP 5.1, and no longer
uses the system settings to 'know' the timezone in operation. It will
instead utilize, in the following order:
* The timezone set using the date_default_timezone_set() function (if any)
* The TZ environment variable (if non empty)
* The date.timezone ini option (if set)
* "magical" guess (if the operating system supports it)
* If none of the above options succeeds, UTC
To ensure accuracy (and avoid an E_STRICT warning), you will need to define
your timezone in your php.ini using the following format:
date.timezone = Europe/London
The supported timezones are listed, in this format, in the PHP manual at
http://www.php.net/manual/en/timezones.php.
11. Changes in database support
==============================
11a. PDO overview
================
PHP Data Objects (PDO) were introduced as a PECL extension under PHP 5.0,
and became part of the core PHP distribution in PHP 5.1. The PDO extension
provides a consistent interface for database access, and is used alongside
database-specific PDO drivers. Each driver may also have database-specific
functions of its own, but basic data access functionality such as issuing
queries and fetching data is covered by PDO functions, using the driver
named in PDO::__construct().
Note that the PDO extension, and its drivers, are intended to be built as
shared extensions. This will enable straightforward driver upgrades from
PECL, without forcing you to rebuild all of PHP.
At the point of the PHP 5.1 release, PDO is more than ready for widespread
testing and could be adopted in most situations. However, it is important
to understand that PDO and its drivers are comparatively young and may be
missing certain database-specific features; evaluate PDO carefully before
you use it in new projects.
Legacy code will generally rely on the pre-existing database extensions,
which are still maintained.
There is more in-depth information about the PDO extension in the manual
at http://www.php.net/manual/ref.pdo.php.
11b. Changes in MySQL support
============================
In PHP 4, MySQL 3 support was built-in. With the release of PHP 5.0 there
were two MySQL extensions, named 'mysql' and 'mysqli', which were designed
to support MySQL < 4.1 and MySQL 4.1 and up, respectively. With the
introduction of PDO, which provides a very fast interface to all the
database APIs supported by PHP, the PDO_MYSQL driver can support any
of the current versions (MySQL 3, 4 or 5) in PHP code written for PDO,
depending on the MySQL library version used during compilation. The
older MySQL extensions remain in place for reasons of back compatibility,
but are not enabled by default.
11c. Changes in SQLite support
=============================
In PHP 5.0, SQLite 2 support was provided by the built-in sqlite
extension, which was also available as a PECL extension in PHP 4.3
and PHP 4.4. With the introduction of PDO, the sqlite extension doubles
up to act as a 'sqlite2' driver for PDO; it is due to this that the
sqlite extension in PHP 5.1 has a dependency upon the PDO extension.
PHP 5.1 ships with a number of alternative interfaces to sqlite:
The sqlite extension provides the "classic" sqlite procedural/OO API
that you may have used in prior versions of PHP. It also provides the
PDO 'sqlite2' driver, which allows you to access legacy SQLite 2
databases using the PDO API.
PDO_SQLITE provides the 'sqlite' version 3 driver. SQLite version 3
is vastly superior to SQLite version 2, but the file formats of the
two versions are not compatible.
If your SQLite-based project is already written and working against
earlier PHP versions, then you can continue to use ext/sqlite without
problems, but will need to explicitly enable both PDO and sqlite. New
projects should use PDO and the 'sqlite' (version 3) driver, as this is
faster than SQLite 2, has improved locking concurrency, and supports
both prepared statements and binary columns natively.
12. Further migration information
================================
For general information about migrating from PHP 4 to PHP 5, please refer to
the relevant section in the PHP manual at http://www.php.net/manual/migration5.php.
13. Checking for E_STRICT errors
================================
If you only have a single script to check, you can pick up E_STRICT
errors using PHP's commandline lint facility:
php -d error_reporting=4095 -l script_to_check.php
For larger projects, the shell script below will achieve the same task:
#!/bin/sh
directory=$1
shift
# These extensions are checked
extensions="php inc"
check_file ()
{
echo -ne "Doing PHP syntax check on $1 ..."
# Options:
ERRORS=`/www/php/bin/php -d display_errors=1 -d html_errors=0 -d error_prepend_string=" " -d error_append_string=" " -d error_reporting=4095 -l $1 | grep -v "No syntax errors detected"`
if test -z "$ERRORS"; then
echo -ne "OK."
else
echo -e "Errors found!\n$ERRORS"
fi
echo
}
# loop over remaining file args
for FILE in "$@" ; do
for ext in $extensions; do
if echo $FILE | grep "\.$ext$" > /dev/null; then
if test -f $FILE; then
check_file "$FILE"
fi
fi
done
done
+1 -1
View File
@@ -1,6 +1,6 @@
--------------------------------------------------------------------
The Zend Engine License, Version 2.00
Copyright (c) 1999-2005 Zend Technologies Ltd. All rights reserved.
Copyright (c) 1999-2006 Zend Technologies Ltd. All rights reserved.
--------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
+1 -1
View File
@@ -15,7 +15,7 @@ libZend_la_SOURCES=\
zend_list.c zend_indent.c zend_builtin_functions.c zend_sprintf.c \
zend_ini.c zend_qsort.c zend_objects.c zend_object_handlers.c \
zend_objects_API.c zend_ts_hash.c zend_stream.c zend_mm.c \
zend_default_classes.c zend_reflection_api.c \
zend_default_classes.c \
zend_iterators.c zend_interfaces.c zend_exceptions.c \
zend_strtod.c zend_multibyte.c
-8
View File
@@ -227,10 +227,6 @@ SOURCE=.\zend_qsort.c
# End Source File
# Begin Source File
SOURCE=.\zend_reflection_api.c
# End Source File
# Begin Source File
SOURCE=.\zend_sprintf.c
# End Source File
# Begin Source File
@@ -407,10 +403,6 @@ SOURCE=.\zend_qsort.h
# End Source File
# Begin Source File
SOURCE=.\zend_reflection_api.h
# End Source File
# Begin Source File
SOURCE=.\zend_stack.h
# End Source File
# Begin Source File
-8
View File
@@ -260,10 +260,6 @@ SOURCE=.\zend_qsort.c
# End Source File
# Begin Source File
SOURCE=.\zend_reflection_api.c
# End Source File
# Begin Source File
SOURCE=.\zend_sprintf.c
# End Source File
# Begin Source File
@@ -444,10 +440,6 @@ SOURCE=.\zend_qsort.h
# End Source File
# Begin Source File
SOURCE=.\zend_reflection_api.h
# End Source File
# Begin Source File
SOURCE=.\zend_stack.h
# End Source File
# Begin Source File
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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
@@ -4,7 +4,7 @@ dnl This file contains local autoconf functions.
AC_DEFUN([LIBZEND_BISON_CHECK],[
# we only support certain bison versions
bison_version_list="1.28 1.35 1.75 1.875 2.0"
bison_version_list="1.28 1.35 1.75 1.875 2.0 2.1"
# for standalone build of Zend Engine
test -z "$SED" && SED=sed
+3 -3
View File
@@ -179,7 +179,7 @@ function fibo($n) {
/****/
function hash($n) {
function hash1($n) {
for ($i = 1; $i <= $n; $i++) {
$X[dechex($i)] = $i;
}
@@ -401,8 +401,8 @@ ary3(2000);
$t = end_test($t, "ary3(2000)");
fibo(30);
$t = end_test($t, "fibo(30)");
hash(50000);
$t = end_test($t, "hash(50000)");
hash1(50000);
$t = end_test($t, "hash1(50000)");
hash2(500);
$t = end_test($t, "hash2(500)");
heapsort(20000);
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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
@@ -8,7 +8,7 @@ class Test {
function __copy()
{
$string = PHP_VERSION;
$version = $string{0};
$version = $string[0];
if($string < 5)
{
return $this;
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #26077 Memory leaks when creating an instance of an object
Bug #26077 (Memory leaks when creating an instance of an object)
--FILE--
<?php
class foo {} new foo();
+1 -1
View File
@@ -3,7 +3,7 @@ Bug #26281 (switch() crash when condition is a string offset)
--FILE--
<?php
$x = 'abc';
switch ($x{0}) {
switch ($x[0]) {
case 'a':
echo "no crash\n";
break;
+2 -2
View File
@@ -4,14 +4,14 @@ Bug #26801 (switch ($a{0}) crash)
<?php
$a = '11';
$b = $a{0};
$b = $a[0];
switch ($b) {
case '-':
break;
}
$a = '22';
switch ($a{0}) {
switch ($a[0]) {
case '-':
break;
}
+1 -1
View File
@@ -89,7 +89,7 @@ if (is_callable(array('test_class','test_func4'))) {
$object = new foo();
$object->test();
?>
--EXPECT--
--EXPECTF--
test_func1
test_func2
test_func3
+2 -2
View File
@@ -1,5 +1,5 @@
--TEST--
Bug 30346 (arrayAcces & using $this)
Bug #30346 (arrayAccess and using $this)
--FILE--
<?php
@@ -21,4 +21,4 @@ echo "\n";
===DONE===
--EXPECT--
page_show
===DONE===
===DONE===
+3 -3
View File
@@ -9,11 +9,11 @@ var_dump(isset($a->b));
$a = '0';
var_dump(isset($a->b));
$a = '';
var_dump(isset($a{'b'}));
var_dump(isset($a['b']));
$a = 'a';
var_dump(isset($a{'b'}));
var_dump(isset($a['b']));
$a = '0';
var_dump(isset($a{'b'}));
var_dump(isset($a['b']));
$simpleString = "Bogus String Text";
echo isset($simpleString->wrong)?"bug\n":"ok\n";
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #31177 (menory corruption because of incorrect refcounting)
Bug #31177 (memory corruption because of incorrect refcounting)
--FILE--
<?php
class foo {
+1 -1
View File
@@ -20,7 +20,7 @@ foreach ($a as $v) {
--EXPECT--
'$ \{ '
' \{ $'
' {$ '
' \{$ '
' $\{ '
' $\{ '
' \{$ '
+96 -5
View File
@@ -7,7 +7,31 @@ class TestA
{
public function doSomething($i)
{
echo __METHOD__ . "($this)\n";
echo __METHOD__ . "($i)\n";
return --$i;
}
public function doSomethingThis($i)
{
echo __METHOD__ . "($i)\n";
return --$i;
}
public function doSomethingParent($i)
{
echo __METHOD__ . "($i)\n";
return --$i;
}
public function doSomethingParentThis($i)
{
echo __METHOD__ . "($i)\n";
return --$i;
}
public static function doSomethingStatic($i)
{
echo __METHOD__ . "($i)\n";
return --$i;
}
}
@@ -16,20 +40,87 @@ class TestB extends TestA
{
public function doSomething($i)
{
echo __METHOD__ . "($this)\n";
echo __METHOD__ . "($i)\n";
$i++;
if ($i >= 5) return 5;
return call_user_func_array(array("TestA","doSomething"), array($i));
return call_user_func_array(array("TestA", "doSomething"), array($i));
}
public function doSomethingThis($i)
{
echo __METHOD__ . "($i)\n";
$i++;
if ($i >= 5) return 5;
return call_user_func_array(array($this, "TestA::doSomethingThis"), array($i));
}
public function doSomethingParent($i)
{
echo __METHOD__ . "($i)\n";
$i++;
if ($i >= 5) return 5;
return call_user_func_array(array("parent", "doSomethingParent"), array($i));
}
public function doSomethingParentThis($i)
{
echo __METHOD__ . "($i)\n";
$i++;
if ($i >= 5) return 5;
return call_user_func_array(array($this, "parent::doSomethingParentThis"), array($i));
}
public static function doSomethingStatic($i)
{
echo __METHOD__ . "($i)\n";
$i++;
if ($i >= 5) return 5;
return call_user_func_array(array("TestA", "doSomethingStatic"), array($i));
}
}
$x = new TestB();
echo "===A===\n";
var_dump($x->doSomething(1));
echo "\n===B===\n";
var_dump($x->doSomethingThis(1));
echo "\n===C===\n";
var_dump($x->doSomethingParent(1));
echo "\n===D===\n";
var_dump($x->doSomethingParentThis(1));
echo "\n===E===\n";
var_dump($x->doSomethingStatic(1));
?>
===DONE===
<?php exit(0); ?>
--EXPECTF--
TestB::doSomething(Object id #%d)
TestA::doSomething(Object id #%d)
===A===
TestB::doSomething(1)
Strict Standards: Non-static method TestA::doSomething() cannot be called statically, assuming $this from compatible context TestB in %sbug32290.php on line %d
TestA::doSomething(2)
int(1)
===B===
TestB::doSomethingThis(1)
TestA::doSomethingThis(2)
int(1)
===C===
TestB::doSomethingParent(1)
Strict Standards: Non-static method TestA::doSomethingParent() cannot be called statically, assuming $this from compatible context TestB in %sbug32290.php on line %d
TestA::doSomethingParent(2)
int(1)
===D===
TestB::doSomethingParentThis(1)
TestA::doSomethingParentThis(2)
int(1)
===E===
TestB::doSomethingStatic(1)
TestA::doSomethingStatic(2)
int(1)
===DONE===
+45
View File
@@ -0,0 +1,45 @@
--TEST--
Bug #33732 (Wrong behavior of constants in class and interface extending)
--FILE--
<?php
interface iA {
const cA = "const of iA\n";
}
class A implements iA {
}
class B extends A implements iA {
}
echo iA::cA;
echo A::cA;
echo B::cA;
interface iA2 {
const cA = "const of iA2\n";
}
interface iB2 extends iA2 {
}
class A2 implements iA2 {
}
class B2 extends A2 implements iB2 {
}
echo iA2::cA;
echo A2::cA;
echo iB2::cA;
echo B2::cA;
?>
--EXPECT--
const of iA
const of iA
const of iA
const of iA2
const of iA2
const of iA2
const of iA2
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
bug #34873 (Segmentation Fault on foreach in object)
Bug #34873 (Segmentation Fault on foreach in object)
--FILE--
<?php
class pwa {
+21
View File
@@ -0,0 +1,21 @@
--TEST--
Bug #35017 (Exception thrown in error handler may cause unexpected behavior)
--FILE--
<?php
set_error_handler('errorHandler');
try {
if ($a) {
echo "1\n";
} else {
echo "0\n";
}
echo "?\n";
} catch(Exception $e) {
echo "This Exception should be catched\n";
}
function errorHandler($errno, $errstr, $errfile, $errline, $vars) {
throw new Exception('Some Exception');
}
?>
--EXPECT--
This Exception should be catched
+41
View File
@@ -0,0 +1,41 @@
--TEST--
Bug #35239 (Objects can lose references)
--FILE--
<?php
$a = new stdClass;
$a->x0 = new stdClass;
$a->x0->y0 = 'a';
$a->x0->y1 =& $a->x0;
$a->x0->y2 =& $a->x0;
$a->x0->y0 = 'b';
var_dump($a);
$a->x0->y1 = "ok\n";
echo $a->x0;
?>
--EXPECT--
object(stdClass)#1 (1) {
["x0"]=>
&object(stdClass)#2 (3) {
["y0"]=>
string(1) "b"
["y1"]=>
&object(stdClass)#2 (3) {
["y0"]=>
string(1) "b"
["y1"]=>
*RECURSION*
["y2"]=>
*RECURSION*
}
["y2"]=>
&object(stdClass)#2 (3) {
["y0"]=>
string(1) "b"
["y1"]=>
*RECURSION*
["y2"]=>
*RECURSION*
}
}
}
ok
+30
View File
@@ -0,0 +1,30 @@
--TEST--
Bug #35393 (changing static protected members from outside the class)
--INI--
error_reporting=4095
--FILE--
<?php
class ObjectPath
{
static protected $type = array(0=>'main');
static function getType()
{
return self::$type;
}
}
print_r(ObjectPath::getType());
$object_type = array_pop((ObjectPath::getType()));
print_r(ObjectPath::getType());
?>
--EXPECTF--
Array
(
[0] => main
)
Strict Standards: Only variables should be passed by reference in %sbug35393.php on line 12
Array
(
[0] => main
)
+19
View File
@@ -0,0 +1,19 @@
--TEST--
Bug #35411 (Regression with \{$ handling)
--FILE--
<?php
$abc = "bar";
echo "foo\{$abc}baz\n";
echo "foo\{ $abc}baz\n";
echo <<<TEST
foo{$abc}baz
foo\{$abc}baz
foo\{ $abc}baz
TEST;
?>
--EXPECT--
foo\{bar}baz
foo\{ bar}baz
foobarbaz
foo\{bar}baz
foo\{ bar}baz
+27
View File
@@ -0,0 +1,27 @@
--TEST--
Bug #35437 Segfault or Invalid Opcode 137/1/4
--FILE--
<?php
function err2exception($errno, $errstr)
{
throw new Exception("Error occuried: " . $errstr);
}
set_error_handler('err2exception');
class TestClass
{
function testMethod()
{
$GLOBALS['t'] = new stdClass;
}
}
try {
TestClass::testMethod();
} catch (Exception $e) {
echo "Catched: ".$e->getMessage()."\n";
}
?>
--EXPECT--
Catched: Error occuried: Non-static method TestClass::testMethod() should not be called statically
+11
View File
@@ -0,0 +1,11 @@
--TEST--
Bug #35470 (Assigning global using variable name from array doesn't function)
--FILE--
<?php
$x = array("test", "55");
global ${$x[0]};
${$x[0]} = $x[1];
echo "Test: $test\n";;
?>
--EXPECT--
Test: 55
+31
View File
@@ -0,0 +1,31 @@
--TEST--
Bug #35509 (string constant as array key has different behavior inside object)
--FILE--
<?php
class mytest
{
const classConstant = '01';
private $classArray = array( mytest::classConstant => 'value' );
public function __construct()
{
print_r($this->classArray);
}
}
$classtest = new mytest();
define( "normalConstant", '01' );
$normalArray = array( normalConstant => 'value' );
print_r($normalArray);
?>
--EXPECT--
Array
(
[01] => value
)
Array
(
[01] => value
)
+25
View File
@@ -0,0 +1,25 @@
--TEST--
Bug #35655 (whitespace following end of heredoc is lost)
--INI--
highlight.string = #DD0000
highlight.comment = #FF8000
highlight.keyword = #007700
highlight.bg = #FFFFFF
highlight.default = #0000BB
highlight.html = #000000
--FILE--
<?php
$code = '
<?php
$x = <<<EOT
some string
EOT
$y = 2;
?>';
highlight_string($code);
?>
--EXPECT--
<code><span style="color: #000000">
<br /><span style="color: #0000BB">&lt;?php<br />&nbsp;&nbsp;$x&nbsp;</span><span style="color: #007700">=&nbsp;&lt;&lt;&lt;EOT<br /></span><span style="color: #0000BB">some&nbsp;string&nbsp;&nbsp;&nbsp;&nbsp;<br /></span><span style="color: #007700">EOT<br />&nbsp;&nbsp;</span><span style="color: #0000BB">$y&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">2</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code>
+30
View File
@@ -0,0 +1,30 @@
--TEST--
Bug #36006 (Problem with $this in __destruct())
--FILE--
<?php
class Person {
public $dad;
public function __destruct() {
$this->dad = null; /* no segfault if this is commented out */
}
}
class Dad extends Person {
public $son;
public function __construct() {
$this->son = new Person;
$this->son->dad = $this; /* no segfault if this is commented out */
}
public function __destruct() {
$this->son = null;
parent::__destruct(); /* segfault here */
}
}
$o = new Dad;
unset($o);
echo "ok\n";
?>
--EXPECT--
ok
+14
View File
@@ -0,0 +1,14 @@
--TEST--
Bug #36037 (heredoc adds extra line number)
--FILE--
<?php
echo __LINE__, "\n";
$x=<<<XXX
123
YYY;
XXX;
echo __LINE__, "\n";
?>
--EXPECT--
2
7
+13
View File
@@ -0,0 +1,13 @@
--TEST--
Bug #36071 (Engine Crash related with 'clone')
--INI--
error_reporting=4095
--FILE--
<?php
$a = clone 0;
$a[0]->b = 0;
echo "ok\n";
?>
--EXPECTF--
Warning: __clone method called on non-object in %sbug36071.php on line 2
ok
+14
View File
@@ -0,0 +1,14 @@
--TEST--
Bug #36268 (Object destructors called even after fatal errors)
--FILE--
<?php
class Foo {
function __destruct() {
echo "Ha!\n";
}
}
$x = new Foo();
bar();
?>
--EXPECTF--
Fatal error: Call to undefined function bar() in %sbug36268.php on line 8
+12
View File
@@ -0,0 +1,12 @@
--TEST--
Bug #36303 (foreach on error_zval produces segfault)
--FILE--
<?php
$x="test";
foreach($x->a->b as &$v) {
}
echo "ok\n";
?>
--EXPECTF--
Warning: Invalid argument supplied for foreach() in %sbug36303.php on line 3
ok
+22
View File
@@ -0,0 +1,22 @@
--TEST--
Bug #36513 (comment will be outputed in last line)
--FILE--
<?php
function test($s) {
echo "'".trim(str_replace("&nbsp;", " ", htmlspecialchars_decode(strip_tags(highlight_string($s,1)))))."'\n";
}
eval('echo "1";//2');
eval('echo 3; //{ 4?>5');
echo "\n";
//test('<?php echo "1";//');
test('<?php echo "1";//2');
test('<?php echo "1";//22');
test('<?php echo 3; // 4 ?>5');
?>
--EXPECT--
135
'<?php echo "1";//2'
'<?php echo "1";//22'
'<?php echo 3; // 4 ?>5'
+15
View File
@@ -0,0 +1,15 @@
--TEST--
Bug #36568 (memory_limit has no effect)
--SKIPIF--
<?php
if (!function_exists('memory_get_usage')) die('skip PHP is configured without memory_limit');
?>
--INI--
memory_limit=16M
--FILE--
<?php
ini_set("memory_limit", "32M");
echo ini_get("memory_limit");
?>
--EXPECT--
32M
+23
View File
@@ -0,0 +1,23 @@
--TEST--
Bug #37046 (foreach breaks static scope)
--FILE--
<?php
function s() {
static $storage = array(array('x', 'y'));
return $storage[0];
}
foreach (s() as $k => $function) {
echo "op1 $k\n";
if ($k == 0) {
foreach (s() as $k => $function) {
echo "op2 $k\n";
}
}
}
?>
--EXPECT--
op1 0
op2 0
op2 1
op1 1
+21
View File
@@ -0,0 +1,21 @@
--TEST--
Bug #37138 (__autoload tries to load callback'ed self and parent)
--FILE--
<?php
function __autoload ($CN) {var_dump ($CN);}
class st {
public static function e () {echo ("EHLO\n");}
public static function e2 () {call_user_func (array ('self', 'e'));}
}
class stch extends st {
public static function g () {call_user_func (array ('parent', 'e'));}
}
st::e ();
st::e2 ();
stch::g ();
?>
--EXPECT--
EHLO
EHLO
EHLO
+19
View File
@@ -0,0 +1,19 @@
--TEST--
zend_strtod() leaks on big doubles
--INI--
precision=14
--FILE--
<?php
var_dump("1139932690.21688500" - "1139932790.21688500");
var_dump("1139932690000.21688500" - "331139932790.21688500");
var_dump("339932690.21688500" - "4564645646456463461139932790.21688500");
var_dump("123123139932690.21688500" - "11399327900000000.21688500");
echo "Done\n";
?>
--EXPECTF--
float(-100)
float(808792757210)
float(-4.5646456464565E+27)
float(-11276204760067000)
Done
+29 -7
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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 |
@@ -78,6 +78,9 @@ static ZEND_INI_MH(OnUpdateErrorReporting)
ZEND_INI_BEGIN()
ZEND_INI_ENTRY("error_reporting", NULL, ZEND_INI_ALL, OnUpdateErrorReporting)
STD_ZEND_INI_BOOLEAN("zend.ze1_compatibility_mode", "0", ZEND_INI_ALL, OnUpdateBool, ze1_compatibility_mode, zend_executor_globals, executor_globals)
#ifdef ZEND_MULTIBYTE
STD_ZEND_INI_BOOLEAN("detect_unicode", "1", ZEND_INI_ALL, OnUpdateBool, detect_unicode, zend_compiler_globals, compiler_globals)
#endif
ZEND_INI_END()
@@ -99,7 +102,7 @@ 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-2005 Zend Technologies\n"
#define ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998-2006 Zend Technologies\n"
#define PRINT_ZVAL_INDENT 4
@@ -234,11 +237,19 @@ ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_cop
} else {
if(Z_OBJ_HANDLER_P(expr, get)) {
zval *z = Z_OBJ_HANDLER_P(expr, get)(expr TSRMLS_CC);
z->refcount++;
if(Z_TYPE_P(z) != IS_OBJECT) {
zend_make_printable_zval(z, expr_copy, use_copy);
FREE_ZVAL(z);
if (*use_copy) {
zval_ptr_dtor(&z);
} else {
ZVAL_ZVAL(expr_copy, z, 0, 1);
*use_copy = 1;
}
return;
}
zval_ptr_dtor(&z);
}
}
if (EG(exception)) {
@@ -450,6 +461,13 @@ static void compiler_globals_ctor(zend_compiler_globals *compiler_globals TSRMLS
compiler_globals->auto_globals = (HashTable *) malloc(sizeof(HashTable));
zend_hash_init_ex(compiler_globals->auto_globals, 8, NULL, NULL, 1, 0);
zend_hash_copy(compiler_globals->auto_globals, global_auto_globals_table, NULL, NULL, sizeof(zend_auto_global) /* empty element */);
compiler_globals->last_static_member = zend_hash_num_elements(compiler_globals->class_table);
if (compiler_globals->last_static_member) {
compiler_globals->static_members = (HashTable**)calloc(compiler_globals->last_static_member, sizeof(HashTable*));
} else {
compiler_globals->static_members = NULL;
}
}
@@ -467,6 +485,10 @@ static void compiler_globals_dtor(zend_compiler_globals *compiler_globals TSRMLS
zend_hash_destroy(compiler_globals->auto_globals);
free(compiler_globals->auto_globals);
}
if (compiler_globals->static_members) {
free(compiler_globals->static_members);
}
compiler_globals->last_static_member = 0;
}
@@ -702,6 +724,7 @@ void zend_shutdown(TSRMLS_D)
#ifdef ZEND_WIN32
zend_shutdown_timeout_thread();
#endif
zend_destroy_rsrc_list(&EG(persistent_list) TSRMLS_CC);
zend_hash_graceful_reverse_destroy(&module_registry);
zend_hash_destroy(GLOBAL_FUNCTION_TABLE);
@@ -719,7 +742,6 @@ void zend_shutdown(TSRMLS_D)
zend_hash_destroy(GLOBAL_CONSTANTS_TABLE);
free(GLOBAL_CONSTANTS_TABLE);
zend_destroy_rsrc_list(&EG(persistent_list) TSRMLS_CC);
#ifdef ZTS
GLOBAL_FUNCTION_TABLE = NULL;
GLOBAL_CLASS_TABLE = NULL;
@@ -855,7 +877,7 @@ static int exec_done_cb(zend_module_entry *module TSRMLS_DC)
void zend_post_deactivate_modules(TSRMLS_D)
{
zend_hash_apply(&module_registry, (apply_func_t) exec_done_cb TSRMLS_CC);
zend_hash_apply(&module_registry, (apply_func_t) module_registry_unload_temp TSRMLS_CC);
zend_hash_reverse_apply(&module_registry, (apply_func_t) module_registry_unload_temp TSRMLS_CC);
}
@@ -1003,7 +1025,7 @@ ZEND_API void zend_error(int type, const char *format, ...)
}
zval_ptr_dtor(&retval);
}
} else {
} else if (!EG(exception)) {
/* The user error handler failed, use built-in error handler */
zend_error_cb(type, error_filename, error_lineno, format, args);
}
@@ -1032,7 +1054,7 @@ ZEND_API void zend_error(int type, const char *format, ...)
}
}
#if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(DARWIN)
#if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX)
void zend_error_noreturn(int type, const char *format, ...) __attribute__ ((alias("zend_error"),noreturn));
#endif
+14 -17
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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.1.0-dev"
#define ZEND_VERSION "2.1.0"
#define ZEND_ENGINE_2
@@ -91,7 +91,7 @@ const char *zend_mh_bundle_error(void);
#endif /* HAVE_MACH_O_DYLD_H */
#if defined(HAVE_LIBDL) && !defined(HAVE_MACH_O_DYLD_H)
#if defined(HAVE_LIBDL) && !defined(HAVE_MACH_O_DYLD_H) && !defined(ZEND_WIN32)
# ifndef RTLD_LAZY
# define RTLD_LAZY 1 /* Solaris 1, FreeBSD's (2.1.7.1 and older) */
@@ -171,7 +171,7 @@ char *alloca ();
# define ZEND_ATTRIBUTE_FORMAT(type, idx, first)
#endif
#if ZEND_GCC_VERSION >= 3001
#if ZEND_GCC_VERSION >= 3001 && !defined(__INTEL_COMPILER)
# define ZEND_ATTRIBUTE_PTR_FORMAT(type, idx, first) __attribute__ ((format(type, idx, first)))
#else
# define ZEND_ATTRIBUTE_PTR_FORMAT(type, idx, first)
@@ -250,7 +250,7 @@ char *alloca ();
#define INTERNAL_FUNCTION_PARAMETERS int ht, zval *return_value, zval **return_value_ptr, zval *this_ptr, int return_value_used TSRMLS_DC
#define INTERNAL_FUNCTION_PARAM_PASSTHRU ht, return_value, return_value_ptr, this_ptr, return_value_used TSRMLS_CC
#if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(DARWIN)
#if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX)
# define ZEND_VM_ALWAYS_INLINE __attribute__ ((always_inline))
void zend_error_noreturn(int type, const char *format, ...) __attribute__ ((noreturn));
#else
@@ -265,25 +265,22 @@ void zend_error_noreturn(int type, const char *format, ...) __attribute__ ((nore
typedef struct _zval_struct zval;
typedef struct _zend_class_entry zend_class_entry;
typedef struct _zend_guard {
zend_bool in_get;
zend_bool in_set;
zend_bool in_unset;
zend_bool in_isset;
zend_bool dummy; /* sizeof(zend_guard) must not be equal to sizeof(void*) */
} zend_guard;
typedef struct _zend_object {
zend_class_entry *ce;
HashTable *properties;
unsigned int in_get:1;
unsigned int in_set:1;
unsigned int in_unset:1;
unsigned int in_isset:1;
HashTable *guards; /* protects from __get/__set ... recursion */
} zend_object;
typedef unsigned int zend_object_handle;
typedef struct _zend_object_value zend_object_value;
#include "zend_object_handlers.h"
struct _zend_object_value {
zend_object_handle handle;
zend_object_handlers *handlers;
};
typedef union _zvalue_value {
long lval; /* long value */
double dval; /* double value */
+252 -125
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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 |
@@ -271,7 +271,7 @@ ZEND_API int zend_get_object_classname(zval *object, char **class_name, zend_uin
}
static char *zend_parse_arg_impl(zval **arg, va_list *va, char **spec TSRMLS_DC)
static char *zend_parse_arg_impl(int arg_num, zval **arg, va_list *va, char **spec TSRMLS_DC)
{
char *spec_walk = *spec;
char c = *spec_walk++;
@@ -296,7 +296,7 @@ static char *zend_parse_arg_impl(zval **arg, va_list *va, char **spec TSRMLS_DC)
double d;
int type;
if ((type = is_numeric_string(Z_STRVAL_PP(arg), Z_STRLEN_PP(arg), p, &d, 0)) == 0) {
if ((type = is_numeric_string(Z_STRVAL_PP(arg), Z_STRLEN_PP(arg), p, &d, -1)) == 0) {
return "long";
} else if (type == IS_DOUBLE) {
*p = (long) d;
@@ -330,7 +330,7 @@ static char *zend_parse_arg_impl(zval **arg, va_list *va, char **spec TSRMLS_DC)
long l;
int type;
if ((type = is_numeric_string(Z_STRVAL_PP(arg), Z_STRLEN_PP(arg), &l, p, 0)) == 0) {
if ((type = is_numeric_string(Z_STRVAL_PP(arg), Z_STRLEN_PP(arg), &l, p, -1)) == 0) {
return "double";
} else if (type == IS_LONG) {
*p = (double) l;
@@ -445,6 +445,21 @@ static char *zend_parse_arg_impl(zval **arg, va_list *va, char **spec TSRMLS_DC)
}
break;
case 'h':
{
HashTable **p = va_arg(*va, HashTable **);
if (Z_TYPE_PP(arg) != IS_ARRAY) {
if (Z_TYPE_PP(arg) == IS_NULL && return_null) {
*p = NULL;
} else {
return "array";
}
} else {
*p = Z_ARRVAL_PP(arg);
}
}
break;
case 'o':
{
zval **p = va_arg(*va, zval **);
@@ -477,6 +492,41 @@ static char *zend_parse_arg_impl(zval **arg, va_list *va, char **spec TSRMLS_DC)
}
break;
case 'C':
{
zend_class_entry **lookup, **pce = va_arg(*va, zend_class_entry **);
zend_class_entry *ce_base = *pce;
convert_to_string_ex(arg);
if (zend_lookup_class(Z_STRVAL_PP(arg), Z_STRLEN_PP(arg), &lookup TSRMLS_CC) == FAILURE) {
*pce = NULL;
} else {
*pce = *lookup;
}
if (ce_base) {
if ((!*pce || !instanceof_function(*pce, ce_base TSRMLS_CC)) && !return_null) {
char *space;
char *class_name = get_active_class_name(&space TSRMLS_CC);
zend_error(E_WARNING, "%s%s%s() expects parameter %d to be a class name derived from %s, '%s' given",
class_name, space, get_active_function_name(TSRMLS_C),
arg_num, ce_base->name, Z_STRVAL_PP(arg));
*pce = NULL;
return "";
}
}
if (!*pce && !return_null) {
char *space;
char *class_name = get_active_class_name(&space TSRMLS_CC);
zend_error(E_WARNING, "%s%s%s() expects parameter %d to be a valid class name, '%s' given",
class_name, space, get_active_function_name(TSRMLS_C),
arg_num, Z_STRVAL_PP(arg));
return "";
}
break;
}
break;
case 'z':
{
zval **p = va_arg(*va, zval **);
@@ -510,7 +560,7 @@ static int zend_parse_arg(int arg_num, zval **arg, va_list *va, char **spec, int
{
char *expected_type = NULL;
expected_type = zend_parse_arg_impl(arg, va, spec TSRMLS_CC);
expected_type = zend_parse_arg_impl(arg_num, arg, va, spec TSRMLS_CC);
if (expected_type) {
if (!quiet) {
char *space;
@@ -545,6 +595,7 @@ static int zend_parse_va_args(int num_args, char *type_spec, va_list *va, int fl
case 'r': case 'a':
case 'o': case 'O':
case 'z': case 'Z':
case 'C': case 'h':
max_num_args++;
break;
@@ -723,11 +774,13 @@ static int zend_merge_property(zval **value, int num_args, va_list args, zend_ha
if (hash_key->nKeyLength) {
zval *obj = va_arg(args, zval *);
zend_object_handlers *obj_ht = va_arg(args, zend_object_handlers *);
zval member;
zval *member;
TSRMLS_FETCH();
ZVAL_STRINGL(&member, hash_key->arKey, hash_key->nKeyLength-1, 0);
obj_ht->write_property(obj, &member, *value TSRMLS_CC);
MAKE_STD_ZVAL(member);
ZVAL_STRINGL(member, hash_key->arKey, hash_key->nKeyLength-1, 1);
obj_ht->write_property(obj, member, *value TSRMLS_CC);
zval_ptr_dtor(&member);
}
return ZEND_HASH_APPLY_KEEP;
}
@@ -753,22 +806,27 @@ ZEND_API void zend_merge_properties(zval *obj, HashTable *properties, int destro
ZEND_API void zend_update_class_constants(zend_class_entry *class_type TSRMLS_DC)
{
if (!class_type->constants_updated || !class_type->static_members) {
if (!class_type->constants_updated || !CE_STATIC_MEMBERS(class_type)) {
zend_class_entry **scope = EG(in_execution)?&EG(scope):&CG(active_class_entry);
zend_class_entry *old_scope = *scope;
*scope = class_type;
zend_hash_apply_with_argument(&class_type->constants_table, (apply_func_arg_t) zval_update_constant, (void*)1 TSRMLS_CC);
zend_hash_apply_with_argument(&class_type->default_properties, (apply_func_arg_t) zval_update_constant, (void *) 1 TSRMLS_CC);
if (!class_type->static_members) {
if (!CE_STATIC_MEMBERS(class_type)) {
HashPosition pos;
zval **p;
if (class_type->parent) {
zend_update_class_constants(class_type->parent TSRMLS_CC);
}
#if ZTS
ALLOC_HASHTABLE(CG(static_members)[(long)(class_type->static_members)]);
#else
ALLOC_HASHTABLE(class_type->static_members);
zend_hash_init(class_type->static_members, 0, NULL, ZVAL_PTR_DTOR, 0);
#endif
zend_hash_init(CE_STATIC_MEMBERS(class_type), 0, NULL, ZVAL_PTR_DTOR, 0);
zend_hash_internal_pointer_reset_ex(&class_type->default_static_members, &pos);
while (zend_hash_get_current_data_ex(&class_type->default_static_members, (void**)&p, &pos) == SUCCESS) {
@@ -782,23 +840,23 @@ ZEND_API void zend_update_class_constants(zend_class_entry *class_type TSRMLS_DC
class_type->parent &&
zend_hash_find(&class_type->parent->default_static_members, str_index, str_length, (void**)&q) == SUCCESS &&
*p == *q &&
zend_hash_find(class_type->parent->static_members, str_index, str_length, (void**)&q) == SUCCESS) {
zend_hash_find(CE_STATIC_MEMBERS(class_type->parent), str_index, str_length, (void**)&q) == SUCCESS) {
(*q)->refcount++;
(*q)->is_ref = 1;
zend_hash_add(class_type->static_members, str_index, str_length, (void**)q, sizeof(zval*), NULL);
zend_hash_add(CE_STATIC_MEMBERS(class_type), str_index, str_length, (void**)q, sizeof(zval*), NULL);
} else {
zval *q;
ALLOC_ZVAL(q);
*q = **p;
INIT_PZVAL(q)
INIT_PZVAL(q);
zval_copy_ctor(q);
zend_hash_add(class_type->static_members, str_index, str_length, (void**)&q, sizeof(zval*), NULL);
zend_hash_add(CE_STATIC_MEMBERS(class_type), str_index, str_length, (void**)&q, sizeof(zval*), NULL);
}
zend_hash_move_forward_ex(&class_type->default_static_members, &pos);
}
}
zend_hash_apply_with_argument(class_type->static_members, (apply_func_arg_t) zval_update_constant, (void *) 1 TSRMLS_CC);
zend_hash_apply_with_argument(CE_STATIC_MEMBERS(class_type), (apply_func_arg_t) zval_update_constant, (void *) 1 TSRMLS_CC);
*scope = old_scope;
class_type->constants_updated = 1;
@@ -1169,58 +1227,68 @@ ZEND_API int add_get_index_stringl(zval *arg, ulong index, char *str, uint lengt
ZEND_API int add_property_long_ex(zval *arg, char *key, uint key_len, long n TSRMLS_DC)
{
zval *tmp;
zval z_key;
zval *z_key;
MAKE_STD_ZVAL(tmp);
ZVAL_LONG(tmp, n);
ZVAL_STRINGL(&z_key, key, key_len-1, 0);
MAKE_STD_ZVAL(z_key);
ZVAL_STRINGL(z_key, key, key_len-1, 1);
Z_OBJ_HANDLER_P(arg, write_property)(arg, &z_key, tmp TSRMLS_CC);
Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp TSRMLS_CC);
zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */
zval_ptr_dtor(&z_key);
return SUCCESS;
}
ZEND_API int add_property_bool_ex(zval *arg, char *key, uint key_len, int b TSRMLS_DC)
{
zval *tmp;
zval z_key;
zval *z_key;
MAKE_STD_ZVAL(tmp);
ZVAL_BOOL(tmp, b);
ZVAL_STRINGL(&z_key, key, key_len-1, 0);
MAKE_STD_ZVAL(z_key);
ZVAL_STRINGL(z_key, key, key_len-1, 1);
Z_OBJ_HANDLER_P(arg, write_property)(arg, &z_key, tmp TSRMLS_CC);
Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp TSRMLS_CC);
zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */
zval_ptr_dtor(&z_key);
return SUCCESS;
}
ZEND_API int add_property_null_ex(zval *arg, char *key, uint key_len TSRMLS_DC)
{
zval *tmp;
zval z_key;
zval *z_key;
MAKE_STD_ZVAL(tmp);
ZVAL_NULL(tmp);
ZVAL_STRINGL(&z_key, key, key_len-1, 0);
MAKE_STD_ZVAL(z_key);
ZVAL_STRINGL(z_key, key, key_len-1, 1);
Z_OBJ_HANDLER_P(arg, write_property)(arg, &z_key, tmp TSRMLS_CC);
Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp TSRMLS_CC);
zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */
zval_ptr_dtor(&z_key);
return SUCCESS;
}
ZEND_API int add_property_resource_ex(zval *arg, char *key, uint key_len, long n TSRMLS_DC)
{
zval *tmp;
zval z_key;
zval *z_key;
MAKE_STD_ZVAL(tmp);
ZVAL_RESOURCE(tmp, n);
ZVAL_STRINGL(&z_key, key, key_len-1, 0);
Z_OBJ_HANDLER_P(arg, write_property)(arg, &z_key, tmp TSRMLS_CC);
MAKE_STD_ZVAL(z_key);
ZVAL_STRINGL(z_key, key, key_len-1, 1);
Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp TSRMLS_CC);
zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */
zval_ptr_dtor(&z_key);
return SUCCESS;
}
@@ -1228,14 +1296,17 @@ ZEND_API int add_property_resource_ex(zval *arg, char *key, uint key_len, long n
ZEND_API int add_property_double_ex(zval *arg, char *key, uint key_len, double d TSRMLS_DC)
{
zval *tmp;
zval z_key;
zval *z_key;
MAKE_STD_ZVAL(tmp);
ZVAL_DOUBLE(tmp, d);
ZVAL_STRINGL(&z_key, key, key_len-1, 0);
MAKE_STD_ZVAL(z_key);
ZVAL_STRINGL(z_key, key, key_len-1, 1);
Z_OBJ_HANDLER_P(arg, write_property)(arg, &z_key, tmp TSRMLS_CC);
Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp TSRMLS_CC);
zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */
zval_ptr_dtor(&z_key);
return SUCCESS;
}
@@ -1243,40 +1314,46 @@ 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 TSRMLS_DC)
{
zval *tmp;
zval z_key;
zval *z_key;
MAKE_STD_ZVAL(tmp);
ZVAL_STRING(tmp, str, duplicate);
ZVAL_STRINGL(&z_key, key, key_len-1, 0);
MAKE_STD_ZVAL(z_key);
ZVAL_STRINGL(z_key, key, key_len-1, 1);
Z_OBJ_HANDLER_P(arg, write_property)(arg, &z_key, tmp TSRMLS_CC);
Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp TSRMLS_CC);
zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */
zval_ptr_dtor(&z_key);
return SUCCESS;
}
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;
zval *z_key;
MAKE_STD_ZVAL(tmp);
ZVAL_STRINGL(tmp, str, length, duplicate);
ZVAL_STRINGL(&z_key, key, key_len-1, 0);
MAKE_STD_ZVAL(z_key);
ZVAL_STRINGL(z_key, key, key_len-1, 1);
Z_OBJ_HANDLER_P(arg, write_property)(arg, &z_key, tmp TSRMLS_CC);
Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp TSRMLS_CC);
zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */
zval_ptr_dtor(&z_key);
return SUCCESS;
}
ZEND_API int add_property_zval_ex(zval *arg, char *key, uint key_len, zval *value TSRMLS_DC)
{
zval z_key;
zval *z_key;
ZVAL_STRINGL(&z_key, key, key_len-1, 0);
MAKE_STD_ZVAL(z_key);
ZVAL_STRINGL(z_key, key, key_len-1, 1);
Z_OBJ_HANDLER_P(arg, write_property)(arg, &z_key, value TSRMLS_CC);
Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, value TSRMLS_CC);
zval_ptr_dtor(&z_key);
return SUCCESS;
}
@@ -1469,8 +1546,8 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, zend_function_entr
zend_function *ctor = NULL, *dtor = NULL, *clone = NULL, *__get = NULL, *__set = NULL, *__unset = NULL, *__isset = NULL, *__call = NULL;
char *lowercase_name;
int fname_len;
char *lc_class_name;
int class_name_len;
char *lc_class_name = NULL;
int class_name_len = 0;
if (type==MODULE_PERSISTENT) {
error_type = E_CORE_WARNING;
@@ -1513,8 +1590,10 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, zend_function_entr
}
if (ptr->flags) {
if (!(ptr->flags & ZEND_ACC_PPP_MASK)) {
zend_error(error_type, "Invalid access level for %s%s%s() - access must be exactly one of public, protected or private", scope ? scope->name : "", scope ? "::" : "", ptr->fname);
internal_function->fn_flags = ZEND_ACC_PUBLIC;
if (ptr->flags != ZEND_ACC_DEPRECATED || scope) {
zend_error(error_type, "Invalid access level for %s%s%s() - access must be exactly one of public, protected or private", scope ? scope->name : "", scope ? "::" : "", ptr->fname);
}
internal_function->fn_flags = ZEND_ACC_PUBLIC | ptr->flags;
} else {
internal_function->fn_flags = ptr->flags;
}
@@ -1776,11 +1855,7 @@ int module_registry_cleanup(zend_module_entry *module TSRMLS_DC)
int module_registry_unload_temp(zend_module_entry *module TSRMLS_DC)
{
switch (module->type) {
case MODULE_TEMPORARY:
return 1;
}
return 0;
return (module->type == MODULE_TEMPORARY) ? ZEND_HASH_APPLY_REMOVE : ZEND_HASH_APPLY_STOP;
}
@@ -1949,15 +2024,101 @@ ZEND_API int zend_disable_class(char *class_name, uint class_name_length TSRMLS_
return 1;
}
static int zend_is_callable_check_func(int check_flags, zval ***zobj_ptr_ptr, zend_class_entry *ce_org, zval *callable, zend_class_entry **ce_ptr, zend_function **fptr_ptr TSRMLS_DC)
{
int retval;
char *lcname, *lmname, *colon;
int clen, mlen;
zend_function *fptr;
zend_class_entry **pce;
HashTable *ftable;
*ce_ptr = NULL;
*fptr_ptr = NULL;
if ((colon = strstr(Z_STRVAL_P(callable), "::")) != NULL) {
clen = colon - Z_STRVAL_P(callable);
mlen = Z_STRLEN_P(callable) - clen - 2;
lcname = zend_str_tolower_dup(Z_STRVAL_P(callable), clen);
/* caution: lcname is not '\0' terminated */
if (clen == sizeof("self") - 1 && memcmp(lcname, "self", sizeof("self") - 1) == 0) {
*ce_ptr = EG(scope);
} else if (clen == sizeof("parent") - 1 && memcmp(lcname, "parent", sizeof("parent") - 1) == 0 && EG(active_op_array)->scope) {
*ce_ptr = EG(scope) ? EG(scope)->parent : NULL;
} else if (zend_lookup_class(Z_STRVAL_P(callable), clen, &pce TSRMLS_CC) == SUCCESS) {
*ce_ptr = *pce;
}
efree(lcname);
if (!*ce_ptr) {
return 0;
}
ftable = &(*ce_ptr)->function_table;
if (ce_org && !instanceof_function(ce_org, *ce_ptr TSRMLS_CC)) {
return 0;
}
lmname = zend_str_tolower_dup(Z_STRVAL_P(callable) + clen + 2, mlen);
} else {
mlen = Z_STRLEN_P(callable);
lmname = zend_str_tolower_dup(Z_STRVAL_P(callable), mlen);
if (ce_org) {
ftable = &ce_org->function_table;
*ce_ptr = ce_org;
} else {
ftable = EG(function_table);
}
}
retval = zend_hash_find(ftable, lmname, mlen+1, (void**)&fptr) == SUCCESS ? 1 : 0;
if (!retval) {
if (*zobj_ptr_ptr && *ce_ptr && (*ce_ptr)->__call != 0) {
retval = (*ce_ptr)->__call != NULL;
*fptr_ptr = (*ce_ptr)->__call;
}
} else {
*fptr_ptr = fptr;
if (*ce_ptr) {
if (!*zobj_ptr_ptr && !(fptr->common.fn_flags & ZEND_ACC_STATIC)) {
if ((check_flags & IS_CALLABLE_CHECK_IS_STATIC) != 0) {
retval = 0;
} else {
if (EG(This) && instanceof_function(Z_OBJCE_P(EG(This)), *ce_ptr TSRMLS_CC)) {
*zobj_ptr_ptr = &EG(This);
zend_error(E_STRICT, "Non-static method %s::%s() cannot be called statically, assuming $this from compatible context %s", (*ce_ptr)->name, fptr->common.function_name, Z_OBJCE_P(EG(This))->name);
} else {
zend_error(E_STRICT, "Non-static method %s::%s() cannot be called statically", (*ce_ptr)->name, fptr->common.function_name);
}
}
}
if (retval && (check_flags & IS_CALLABLE_CHECK_NO_ACCESS) == 0) {
if (fptr->op_array.fn_flags & ZEND_ACC_PRIVATE) {
if (!zend_check_private(fptr, *zobj_ptr_ptr ? Z_OBJCE_PP(*zobj_ptr_ptr) : EG(scope), lmname, mlen TSRMLS_CC)) {
retval = 0;
}
} else if ((fptr->common.fn_flags & ZEND_ACC_PROTECTED)) {
if (!zend_check_protected(fptr->common.scope, EG(scope))) {
retval = 0;
}
}
}
}
}
efree(lmname);
return retval;
}
ZEND_API zend_bool zend_is_callable_ex(zval *callable, uint check_flags, char **callable_name, int *callable_name_len, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zval ***zobj_ptr_ptr TSRMLS_DC)
{
char *lcname;
zend_bool retval = 0;
int callable_name_len_local;
zend_class_entry *ce_local;
zend_class_entry *ce_local, **pce;
zend_function *fptr_local;
zval **zobj_ptr_local;
if (callable_name) {
*callable_name = NULL;
}
if (callable_name_len == NULL) {
callable_name_len = &callable_name_len_local;
}
@@ -1983,17 +2144,13 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, uint check_flags, char **
if (check_flags & IS_CALLABLE_CHECK_SYNTAX_ONLY) {
return 1;
}
lcname = zend_str_tolower_dup(Z_STRVAL_P(callable), Z_STRLEN_P(callable));
if (zend_hash_find(EG(function_table), lcname, Z_STRLEN_P(callable)+1, (void**)fptr_ptr) == SUCCESS) {
retval = 1;
}
efree(lcname);
retval = zend_is_callable_check_func(check_flags|IS_CALLABLE_CHECK_IS_STATIC, zobj_ptr_ptr, NULL, callable, ce_ptr, fptr_ptr TSRMLS_CC);
break;
case IS_ARRAY:
{
zend_class_entry *ce = NULL, **pce;
zend_class_entry *ce = NULL;
zval **method;
zval **obj;
@@ -2017,20 +2174,17 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, uint check_flags, char **
}
if (check_flags & IS_CALLABLE_CHECK_SYNTAX_ONLY) {
*ce_ptr = ce;
return 1;
}
lcname = zend_str_tolower_dup(Z_STRVAL_PP(obj), Z_STRLEN_PP(obj));
if (EG(active_op_array) && strcmp(lcname, "self") == 0) {
if (Z_STRLEN_PP(obj) == sizeof("self") - 1 && memcmp(lcname, "self", sizeof("self")) == 0) {
ce = EG(active_op_array)->scope;
} else if (strcmp(lcname, "parent") == 0 && EG(active_op_array) && EG(active_op_array)->scope) {
} else if (Z_STRLEN_PP(obj) == sizeof("parent") - 1 && memcmp(lcname, "parent", sizeof("parent")) == 0 && EG(active_op_array)->scope) {
ce = EG(active_op_array)->scope->parent;
} else if (zend_lookup_class(Z_STRVAL_PP(obj), Z_STRLEN_PP(obj), &pce TSRMLS_CC) == SUCCESS) {
ce = *pce;
}
efree(lcname);
} else {
ce = Z_OBJCE_PP(obj); /* TBFixed: what if it's overloaded? */
@@ -2056,35 +2210,7 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, uint check_flags, char **
}
if (ce) {
zend_function *fbc;
lcname = zend_str_tolower_dup(Z_STRVAL_PP(method), Z_STRLEN_PP(method));
if (zend_hash_find(&ce->function_table, lcname, Z_STRLEN_PP(method)+1, (void **)&fbc) == SUCCESS) {
retval = 1;
if ((check_flags & IS_CALLABLE_CHECK_NO_ACCESS) == 0) {
if (fbc->op_array.fn_flags & ZEND_ACC_PRIVATE) {
if (!zend_check_private(fbc, (Z_TYPE_PP(obj) == IS_STRING)?EG(scope):(*obj)->value.obj.handlers->get_class_entry(*obj TSRMLS_CC), lcname, Z_STRLEN_PP(method) TSRMLS_CC)) {
retval = 0;
}
} else if ((fbc->common.fn_flags & ZEND_ACC_PROTECTED)) {
if (!zend_check_protected(fbc->common.scope, EG(scope))) {
retval = 0;
}
}
}
if (retval) {
if ((check_flags & IS_CALLABLE_CHECK_IS_STATIC) != 0 && (fbc->common.fn_flags & ZEND_ACC_STATIC) == 0) {
retval = 0;
} else {
*fptr_ptr = fbc;
}
}
}
/* check for __call too */
if (retval == 0 && *zobj_ptr_ptr && ce->__call != 0) {
retval = 1;
}
efree(lcname);
retval = zend_is_callable_check_func(check_flags, zobj_ptr_ptr, ce, *method, ce_ptr, fptr_ptr TSRMLS_CC);
}
} else if (callable_name) {
*callable_name = estrndup("Array", sizeof("Array")-1);
@@ -2121,36 +2247,20 @@ ZEND_API zend_bool zend_is_callable(zval *callable, uint check_flags, char **cal
ZEND_API zend_bool zend_make_callable(zval *callable, char **callable_name TSRMLS_DC)
{
char *lcname, *func, *class_name;
zend_bool retval = 0;
zend_class_entry **pce;
int class_name_len;
zend_class_entry *ce;
zend_function *fptr;
zval **zobj_ptr;
if (zend_is_callable_ex(callable, 0, callable_name, NULL, NULL, NULL, NULL TSRMLS_CC)) {
if (zend_is_callable_ex(callable, 0, callable_name, NULL, &ce, &fptr, &zobj_ptr TSRMLS_CC)) {
if (Z_TYPE_P(callable) == IS_STRING && ce) {
zval_dtor(callable);
array_init(callable);
add_next_index_string(callable, ce->name, 1);
add_next_index_string(callable, fptr->common.function_name, 1);
}
return 1;
}
switch (Z_TYPE_P(callable)) {
case IS_STRING:
lcname = zend_str_tolower_dup(Z_STRVAL_P(callable), Z_STRLEN_P(callable));
if ((func = strstr(lcname, "::")) != NULL) {
*func = '\0';
class_name_len = func - lcname;
class_name = estrndup(Z_STRVAL_P(callable), class_name_len);
if (zend_lookup_class(class_name, class_name_len, &pce TSRMLS_CC) == SUCCESS) {
zval_dtor(callable);
array_init(callable);
add_next_index_stringl(callable, lcname, class_name_len, 1);
func += 2;
add_next_index_stringl(callable, func, strlen(func), 1);
retval = 1;
}
efree(class_name);
}
efree(lcname);
break;
}
return retval;
return 0;
}
@@ -2333,6 +2443,20 @@ ZEND_API int zend_declare_class_constant(zend_class_entry *ce, char *name, size_
return zend_hash_update(&ce->constants_table, name, name_length+1, &value, sizeof(zval *), NULL);
}
ZEND_API int zend_declare_class_constant_null(zend_class_entry *ce, char *name, size_t name_length TSRMLS_DC)
{
zval *constant;
if (ce->type & ZEND_INTERNAL_CLASS) {
constant = malloc(sizeof(zval));
} else {
ALLOC_ZVAL(constant);
}
ZVAL_NULL(constant);
INIT_PZVAL(constant);
return zend_declare_class_constant(ce, name, name_length, constant TSRMLS_CC);
}
ZEND_API int zend_declare_class_constant_long(zend_class_entry *ce, char *name, size_t name_length, long value TSRMLS_DC)
{
zval *constant;
@@ -2397,7 +2521,7 @@ ZEND_API int zend_declare_class_constant_string(zend_class_entry *ce, char *name
ZEND_API void zend_update_property(zend_class_entry *scope, zval *object, char *name, int name_length, zval *value TSRMLS_DC)
{
zval property;
zval *property;
zend_class_entry *old_scope = EG(scope);
EG(scope) = scope;
@@ -2410,8 +2534,10 @@ ZEND_API void zend_update_property(zend_class_entry *scope, zval *object, char *
zend_error(E_CORE_ERROR, "Property %s of class %s cannot be updated", name, class_name);
}
ZVAL_STRINGL(&property, name, name_length, 0);
Z_OBJ_HT_P(object)->write_property(object, &property, value TSRMLS_CC);
MAKE_STD_ZVAL(property);
ZVAL_STRINGL(property, name, name_length, 1);
Z_OBJ_HT_P(object)->write_property(object, property, value TSRMLS_CC);
zval_ptr_dtor(&property);
EG(scope) = old_scope;
}
@@ -2584,7 +2710,7 @@ ZEND_API int zend_update_static_property_stringl(zend_class_entry *scope, char *
ZEND_API zval *zend_read_property(zend_class_entry *scope, zval *object, char *name, int name_length, zend_bool silent TSRMLS_DC)
{
zval property, *value;
zval *property, *value;
zend_class_entry *old_scope = EG(scope);
EG(scope) = scope;
@@ -2596,9 +2722,10 @@ ZEND_API zval *zend_read_property(zend_class_entry *scope, zval *object, char *n
zend_get_object_classname(object, &class_name, &class_name_len TSRMLS_CC);
zend_error(E_CORE_ERROR, "Property %s of class %s cannot be read", name, class_name);
}
ZVAL_STRINGL(&property, name, name_length, 0);
value = Z_OBJ_HT_P(object)->read_property(object, &property, silent TSRMLS_CC);
MAKE_STD_ZVAL(property);
ZVAL_STRINGL(property, name, name_length, 1);
value = Z_OBJ_HT_P(object)->read_property(object, property, silent TSRMLS_CC);
zval_ptr_dtor(&property);
EG(scope) = old_scope;
return value;
}
+12 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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 |
@@ -50,7 +50,9 @@ typedef struct _zend_function_entry {
#define ZEND_NAMED_FE(zend_name, name, arg_info) ZEND_FENTRY(zend_name, name, arg_info, 0)
#define ZEND_FE(name, arg_info) ZEND_FENTRY(name, ZEND_FN(name), arg_info, 0)
#define ZEND_DEP_FE(name, arg_info) ZEND_FENTRY(name, ZEND_FN(name), arg_info, ZEND_ACC_DEPRECATED)
#define ZEND_FALIAS(name, alias, arg_info) ZEND_FENTRY(name, ZEND_FN(alias), arg_info, 0)
#define ZEND_DEP_FALIAS(name, alias, arg_info) ZEND_FENTRY(name, ZEND_FN(alias), arg_info, ZEND_ACC_DEPRECATED)
#define ZEND_ME(classname, name, arg_info, flags) ZEND_FENTRY(name, ZEND_FN(classname##_##name), arg_info, flags)
#define ZEND_ABSTRACT_ME(classname, name, arg_info) ZEND_FENTRY(name, NULL, arg_info, ZEND_ACC_PUBLIC|ZEND_ACC_ABSTRACT)
#define ZEND_MALIAS(classname, name, alias, arg_info, flags) \
@@ -146,6 +148,12 @@ typedef struct _zend_function_entry {
#define INIT_OVERLOADED_CLASS_ENTRY(class_container, class_name, functions, handle_fcall, handle_propget, handle_propset) \
INIT_OVERLOADED_CLASS_ENTRY_EX(class_container, class_name, functions, handle_fcall, handle_propget, handle_propset, NULL, NULL)
#ifdef ZTS
# define CE_STATIC_MEMBERS(ce) (((ce)->type==ZEND_USER_CLASS)?(ce)->static_members:CG(static_members)[(long)(ce)->static_members])
#else
# define CE_STATIC_MEMBERS(ce) ((ce)->static_members)
#endif
int zend_next_free_module(void);
BEGIN_EXTERN_C()
@@ -198,6 +206,8 @@ ZEND_API void zend_wrong_param_count(TSRMLS_D);
#define IS_CALLABLE_CHECK_NO_ACCESS (1<<1)
#define IS_CALLABLE_CHECK_IS_STATIC (1<<2)
#define IS_CALLABLE_STRICT (IS_CALLABLE_CHECK_IS_STATIC)
ZEND_API zend_bool zend_is_callable_ex(zval *callable, uint check_flags, char **callable_name, int *callable_name_len, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zval ***zobj_ptr_ptr TSRMLS_DC);
ZEND_API zend_bool zend_is_callable(zval *callable, uint check_flags, char **callable_name);
ZEND_API zend_bool zend_make_callable(zval *callable, char **callable_name TSRMLS_DC);
@@ -213,6 +223,7 @@ ZEND_API int zend_declare_property_string(zend_class_entry *ce, char *name, int
ZEND_API int zend_declare_property_stringl(zend_class_entry *ce, char *name, int name_length, char *value, int value_len, int access_type TSRMLS_DC);
ZEND_API int zend_declare_class_constant(zend_class_entry *ce, char *name, size_t name_length, zval *value TSRMLS_DC);
ZEND_API int zend_declare_class_constant_null(zend_class_entry *ce, char *name, size_t name_length TSRMLS_DC);
ZEND_API int zend_declare_class_constant_long(zend_class_entry *ce, char *name, size_t name_length, long value TSRMLS_DC);
ZEND_API int zend_declare_class_constant_bool(zend_class_entry *ce, char *name, size_t name_length, zend_bool value TSRMLS_DC);
ZEND_API int zend_declare_class_constant_double(zend_class_entry *ce, char *name, size_t name_length, double value TSRMLS_DC);
+2 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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 |
@@ -558,6 +558,7 @@ ZEND_API void shutdown_memory_manager(int silent, int full_shutdown TSRMLS_DC)
grand_total_leaks++;
if (!silent) {
zend_message_dispatcher(ZMSG_LOG_SCRIPT_NAME, NULL);
zend_message_dispatcher(ZMSG_MEMORY_LEAK_DETECTED, t);
}
t->reported = 1;
+2 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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 |
@@ -125,6 +125,7 @@ ZEND_API char *_estrndup(const char *s, unsigned int length ZEND_FILE_LINE_DC ZE
#else
#undef _GNU_SOURCE
#define _GNU_SOURCE
#include <string.h>
#undef _GNU_SOURCE
+9 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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 |
@@ -40,6 +40,14 @@ ZEND_BEGIN_ARG_INFO(fourth_arg_force_ref, 0)
ZEND_ARG_PASS_INFO(1)
ZEND_END_ARG_INFO();
ZEND_BEGIN_ARG_INFO(fifth_arg_force_ref, 0)
ZEND_ARG_PASS_INFO(0)
ZEND_ARG_PASS_INFO(0)
ZEND_ARG_PASS_INFO(0)
ZEND_ARG_PASS_INFO(0)
ZEND_ARG_PASS_INFO(1)
ZEND_END_ARG_INFO();
ZEND_BEGIN_ARG_INFO(all_args_by_ref, 1)
ZEND_END_ARG_INFO();
+32 -8
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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 |
@@ -314,6 +314,12 @@ ZEND_FUNCTION(strncmp)
convert_to_string_ex(s1);
convert_to_string_ex(s2);
convert_to_long_ex(s3);
if (Z_LVAL_PP(s3) < 0) {
zend_error(E_WARNING, "Length must be greater than or equal to 0");
RETURN_FALSE;
}
RETURN_LONG(zend_binary_zval_strncmp(*s1, *s2, *s3));
}
/* }}} */
@@ -347,6 +353,12 @@ ZEND_FUNCTION(strncasecmp)
convert_to_string_ex(s1);
convert_to_string_ex(s2);
convert_to_long_ex(s3);
if (Z_LVAL_PP(s3) < 0) {
zend_error(E_WARNING, "Length must be greater than or equal to 0");
RETURN_FALSE;
}
RETURN_LONG(zend_binary_zval_strncasecmp(*s1, *s2, *s3));
}
/* }}} */
@@ -738,7 +750,7 @@ ZEND_FUNCTION(get_class_vars)
array_init(return_value);
add_class_vars(*pce, &(*pce)->default_properties, return_value TSRMLS_CC);
zend_update_class_constants(*pce TSRMLS_CC);
add_class_vars(*pce, (*pce)->static_members, return_value TSRMLS_CC);
add_class_vars(*pce, CE_STATIC_MEMBERS(*pce), return_value TSRMLS_CC);
}
}
/* }}} */
@@ -768,11 +780,16 @@ ZEND_FUNCTION(get_object_vars)
RETURN_FALSE;
}
properties = Z_OBJ_HT_PP(obj)->get_properties(*obj TSRMLS_CC);
if (properties == NULL) {
RETURN_FALSE;
}
instanceof = EG(This) && instanceof_function(Z_OBJCE_P(EG(This)), Z_OBJCE_PP(obj) TSRMLS_CC);
array_init(return_value);
properties = Z_OBJ_HT_PP(obj)->get_properties(*obj TSRMLS_CC);
zend_hash_internal_pointer_reset_ex(properties, &pos);
while (zend_hash_get_current_data_ex(properties, (void **) &value, &pos) == SUCCESS) {
@@ -1693,8 +1710,6 @@ ZEND_FUNCTION(debug_print_backtrace)
}
}
array_init(return_value);
while (ptr) {
char *free_class_name = NULL;
@@ -1801,7 +1816,11 @@ ZEND_FUNCTION(debug_print_backtrace)
debug_print_backtrace_args(arg_array TSRMLS_CC);
zval_ptr_dtor(&arg_array);
}
zend_printf(") called at [%s:%d]\n", filename, lineno);
if (filename) {
zend_printf(") called at [%s:%d]\n", filename, lineno);
} else {
ZEND_PUTS(")\n");
}
include_filename = filename;
ptr = skip->prev_execute_data;
++indent;
@@ -1813,7 +1832,7 @@ ZEND_FUNCTION(debug_print_backtrace)
/* }}} */
ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last TSRMLS_DC)
ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int provide_object TSRMLS_DC)
{
zend_execute_data *ptr, *skip;
int lineno;
@@ -1913,6 +1932,11 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last TSRML
add_assoc_string_ex(stack_frame, "class", sizeof("class"), class_name, dup);
}
if (provide_object) {
add_assoc_zval_ex(stack_frame, "object", sizeof("object"), ptr->object);
ptr->object->refcount++;
}
add_assoc_string_ex(stack_frame, "type", sizeof("type"), "->", 1);
} else if (ptr->function_state.function->common.scope) {
add_assoc_string_ex(stack_frame, "class", sizeof("class"), ptr->function_state.function->common.scope->name, 1);
@@ -1994,7 +2018,7 @@ ZEND_FUNCTION(debug_backtrace)
ZEND_WRONG_PARAM_COUNT();
}
zend_fetch_debug_backtrace(return_value, 1 TSRMLS_CC);
zend_fetch_debug_backtrace(return_value, 1, 1 TSRMLS_CC);
}
/* }}} */
+2 -2
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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 |
@@ -25,7 +25,7 @@
int zend_startup_builtin_functions(TSRMLS_D);
BEGIN_EXTERN_C()
ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last TSRMLS_DC);
ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int provide_object TSRMLS_DC);
END_EXTERN_C()
#endif /* ZEND_BUILTIN_FUNCTIONS_H */
+95 -18
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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 |
@@ -465,6 +465,9 @@ void fetch_array_dim(znode *result, znode *parent, znode *dim TSRMLS_DC)
void fetch_string_offset(znode *result, znode *parent, znode *offset TSRMLS_DC)
{
#ifdef ilia_0
zend_error(E_STRICT, "Usage of {} to access string offsets is deprecated and will be removed in PHP 6");
#endif
fetch_array_dim(result, parent, offset TSRMLS_CC);
}
@@ -1273,15 +1276,29 @@ void zend_do_receive_arg(zend_uchar op, znode *var, znode *offset, znode *initia
cur_arg_info->pass_by_reference = pass_by_reference;
if (class_type->op_type != IS_UNUSED) {
cur_arg_info->allow_null = 0;
if (class_type->u.constant.type == IS_STRING) {
cur_arg_info->class_name = class_type->u.constant.value.str.val;
cur_arg_info->class_name_len = class_type->u.constant.value.str.len;
if (op == ZEND_RECV_INIT) {
if (Z_TYPE(initialization->u.constant) == IS_NULL || (Z_TYPE(initialization->u.constant) == IS_CONSTANT && !strcasecmp(Z_STRVAL(initialization->u.constant), "NULL"))) {
cur_arg_info->allow_null = 1;
} else {
zend_error(E_COMPILE_ERROR, "Default value for parameters with a class type hint can only be NULL");
}
}
} else {
cur_arg_info->array_type_hint = 1;
cur_arg_info->class_name = NULL;
cur_arg_info->class_name_len = 0;
if (op == ZEND_RECV_INIT) {
if (Z_TYPE(initialization->u.constant) == IS_NULL || (Z_TYPE(initialization->u.constant) == IS_CONSTANT && !strcasecmp(Z_STRVAL(initialization->u.constant), "NULL"))) {
cur_arg_info->allow_null = 1;
} else if (Z_TYPE(initialization->u.constant) != IS_ARRAY && Z_TYPE(initialization->u.constant) != IS_CONSTANT_ARRAY) {
zend_error(E_COMPILE_ERROR, "Default value for parameters with array type hint can only be an array or NULL");
}
}
}
cur_arg_info->allow_null = 0;
} else {
cur_arg_info->class_name = NULL;
cur_arg_info->class_name_len = 0;
@@ -1713,12 +1730,14 @@ void zend_do_mark_last_catch(znode *first_catch, znode *last_additional_catch TS
} else {
CG(active_op_array)->opcodes[last_additional_catch->u.opline_num].op1.u.EA.type = 1;
}
DEC_BPC(CG(active_op_array));
}
void zend_do_try(znode *try_token TSRMLS_DC)
{
try_token->u.opline_num = zend_add_try_element(get_next_op_number(CG(active_op_array)) TSRMLS_CC);
INC_BPC(CG(active_op_array));
}
@@ -1822,6 +1841,12 @@ static void do_inherit_parent_constructor(zend_class_entry *ce)
ce->destructor = ce->parent->destructor;
}
if (ce->constructor) {
if (ce->parent->constructor && ce->parent->constructor->common.fn_flags & ZEND_ACC_FINAL) {
zend_error(E_ERROR, "Cannot override final %s::%s() with %s::%s()",
ce->parent->name, ce->parent->constructor->common.function_name,
ce->name, ce->constructor->common.function_name
);
}
return;
}
@@ -2071,7 +2096,9 @@ static zend_bool do_inherit_property_access_check(HashTable *target_ht, zend_pro
if (parent_ce->type != ce->type) {
/* User class extends internal class */
ht = parent_ce->static_members;
TSRMLS_FETCH();
ht = CE_STATIC_MEMBERS(parent_ce);
} else {
ht = &parent_ce->default_static_members;
}
@@ -2177,7 +2204,7 @@ ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent
if (parent_ce->type != ce->type) {
/* User class extends internal class */
zend_update_class_constants(parent_ce TSRMLS_CC);
zend_hash_merge(&ce->default_static_members, parent_ce->static_members, (void (*)(void *)) inherit_static_prop, NULL, sizeof(zval *), 0);
zend_hash_merge(&ce->default_static_members, CE_STATIC_MEMBERS(parent_ce), (void (*)(void *)) inherit_static_prop, NULL, sizeof(zval *), 0);
} else {
zend_hash_merge(&ce->default_static_members, &parent_ce->default_static_members, (void (*)(void *)) inherit_static_prop, NULL, sizeof(zval *), 0);
}
@@ -2191,10 +2218,14 @@ ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent
}
static zend_bool do_inherit_constant_check(HashTable *child_constants_table, zval *parent_constant, zend_hash_key *hash_key, zend_class_entry *iface)
static zend_bool do_inherit_constant_check(HashTable *child_constants_table, zval **parent_constant, zend_hash_key *hash_key, zend_class_entry *iface)
{
if (zend_hash_quick_exists(child_constants_table, hash_key->arKey, hash_key->nKeyLength, hash_key->h)) {
zend_error(E_COMPILE_ERROR, "Cannot inherit previously-inherited constant %s from interface %s", hash_key->arKey, iface->name);
zval **old_constant;
if (zend_hash_quick_find(child_constants_table, hash_key->arKey, hash_key->nKeyLength, hash_key->h, (void**)&old_constant) == SUCCESS) {
if (*old_constant != *parent_constant) {
zend_error(E_COMPILE_ERROR, "Cannot inherit previously-inherited constant %s from interface %s", hash_key->arKey, iface->name);
}
return 0;
}
return 1;
@@ -2909,13 +2940,7 @@ void zend_do_declare_class_constant(znode *var_name, znode *value TSRMLS_DC)
}
ALLOC_ZVAL(property);
if (value) {
*property = value->u.constant;
} else {
INIT_PZVAL(property);
property->type = IS_NULL;
}
*property = value->u.constant;
if (zend_hash_add(&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)==FAILURE) {
FREE_ZVAL(property);
@@ -3064,6 +3089,33 @@ void zend_do_end_new_object(znode *result, znode *new_token, znode *argument_lis
*result = CG(active_op_array)->opcodes[new_token->u.opline_num].result;
}
static int zend_constant_ct_subst(znode *result, zval *const_name TSRMLS_DC)
{
zend_constant *c = NULL;
if (zend_hash_find(EG(zend_constants), Z_STRVAL_P(const_name), Z_STRLEN_P(const_name)+1, (void **) &c) == FAILURE) {
char *lookup_name = zend_str_tolower_dup(Z_STRVAL_P(const_name), Z_STRLEN_P(const_name));
if (zend_hash_find(EG(zend_constants), lookup_name, Z_STRLEN_P(const_name)+1, (void **) &c)==SUCCESS) {
if ((c->flags & CONST_CS) && memcmp(c->name, Z_STRVAL_P(const_name), Z_STRLEN_P(const_name))!=0) {
c = NULL;
}
} else {
c = NULL;
}
efree(lookup_name);
}
if (c && (c->flags & CONST_CT_SUBST)) {
zval_dtor(const_name);
result->op_type = IS_CONST;
result->u.constant = c->value;
zval_copy_ctor(&result->u.constant);
INIT_PZVAL(&result->u.constant);
return 1;
}
return 0;
}
void zend_do_fetch_constant(znode *result, znode *constant_container, znode *constant_name, int mode TSRMLS_DC)
{
switch (mode) {
@@ -3071,13 +3123,15 @@ void zend_do_fetch_constant(znode *result, znode *constant_container, znode *con
if (constant_container) {
zend_do_fetch_class_name(NULL, constant_container, constant_name TSRMLS_CC);
*result = *constant_container;
} else {
result->u.constant.type = IS_CONSTANT;
} else if (!zend_constant_ct_subst(result, &constant_name->u.constant TSRMLS_CC)) {
*result = *constant_name;
result->u.constant.type = IS_CONSTANT;
}
result->u.constant.type = IS_CONSTANT;
break;
case ZEND_RT:
{
if (constant_container ||
!zend_constant_ct_subst(result, &constant_name->u.constant TSRMLS_CC)) {
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_FETCH_CONSTANT;
@@ -3196,6 +3250,9 @@ void zend_do_add_static_array_element(znode *result, znode *offset, znode *expr)
case IS_DOUBLE:
zend_hash_index_update(result->u.constant.value.ht, (long)offset->u.constant.value.dval, &element, sizeof(zval *), NULL);
break;
case IS_CONSTANT_ARRAY:
zend_error(E_ERROR, "Illegal offset type");
break;
}
} else {
zend_hash_next_index_insert(result->u.constant.value.ht, &element, sizeof(zval *), NULL);
@@ -3724,6 +3781,8 @@ void zend_do_declare_stmt(znode *var, znode *val TSRMLS_DC)
}
efree(val->u.constant.value.str.val);
#endif /* ZEND_MULTIBYTE */
} else {
zval_dtor(&val->u.constant);
}
zval_dtor(&var->u.constant);
}
@@ -3975,6 +4034,8 @@ again:
case T_END_HEREDOC:
efree(zendlval->u.constant.value.str.val);
break;
case EOF:
return EOF;
}
INIT_PZVAL(&zendlval->u.constant);
@@ -4001,7 +4062,23 @@ ZEND_API void zend_initialize_class_data(zend_class_entry *ce, zend_bool nullify
zend_hash_init_ex(&ce->constants_table, 0, NULL, zval_ptr_dtor_func, persistent_hashes, 0);
zend_hash_init_ex(&ce->function_table, 0, NULL, ZEND_FUNCTION_DTOR, persistent_hashes, 0);
ce->static_members = (ce->type == ZEND_INTERNAL_CLASS) ? NULL : &ce->default_static_members;
if (ce->type == ZEND_INTERNAL_CLASS) {
#ifdef ZTS
int n = zend_hash_num_elements(CG(class_table));
if (CG(static_members) && n >= CG(last_static_member)) {
/* Support for run-time declaration: dl() */
CG(last_static_member) = n+1;
CG(static_members) = realloc(CG(static_members), (n+1)*sizeof(HashTable*));
CG(static_members)[n] = NULL;
}
ce->static_members = (HashTable*)n;
#else
ce->static_members = NULL;
#endif
} else {
ce->static_members = &ce->default_static_members;
}
if (nullify_handlers) {
ce->constructor = NULL;
+5 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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 |
@@ -136,6 +136,9 @@ typedef struct _zend_try_catch_element {
/* shadow of parent's private method/property */
#define ZEND_ACC_SHADOW 0x20000
/* deprecation flag */
#define ZEND_ACC_DEPRECATED 0x40000
char *zend_visibility_string(zend_uint fn_flags);
@@ -514,6 +517,7 @@ ZEND_API void zend_destroy_file_handle(zend_file_handle *file_handle TSRMLS_DC);
ZEND_API void zend_file_handle_dtor(zend_file_handle *fh);
ZEND_API int zend_cleanup_class_data(zend_class_entry **pce TSRMLS_DC);
ZEND_API int zend_cleanup_function_data(zend_function *function TSRMLS_DC);
ZEND_API int zend_cleanup_function_data_full(zend_function *function TSRMLS_DC);
ZEND_API void destroy_zend_function(zend_function *function TSRMLS_DC);
ZEND_API void zend_function_dtor(zend_function *function);
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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 |
+6 -15
View File
@@ -2,10 +2,10 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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 |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
@@ -23,8 +23,9 @@
#define ZEND_CONFIG_W32_H
#define USE_ZEND_ALLOC 1
#define HAVE_ALLOCA 1
#define HAVE_LIMITS_H 1
#include <../main/config.w32.h>
#define _CRTDBG_MAP_ALLOC
#include <malloc.h>
@@ -44,19 +45,9 @@
typedef unsigned long ulong;
typedef unsigned int uint;
#undef HAVE_KILL
#define HAVE_GETPID 1
/* #define HAVE_ALLOCA_H 1 */
#define HAVE_MEMCPY 1
#define HAVE_STRDUP 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_STDIOSTR_H 1
#define HAVE_CLASS_ISTDIOSTREAM
#define istdiostream stdiostream
#define HAVE_STDARG_H 1
#define HAVE_SNPRINTF 1
#define HAVE_VSNPRINTF 1
#define HAVE_STRCOLL 1
#define snprintf _snprintf
#define vsnprintf _vsnprintf
@@ -87,7 +78,7 @@ typedef unsigned int uint;
#define ZEND_DLEXPORT __declspec(dllexport)
#define ZEND_DLIMPORT __declspec(dllimport)
/* 0x00200000L is MB_SERVICE_NOTIFICATION, which is only supported under Windows NT
/* 0x00200000L is MB_SERVICE_NOTIFICATION, which is only supported under Windows NT
* (and requires _WIN32_WINNT to be defined, which prevents the resulting executable
* from running under Windows 9x
* Windows 9x should silently ignore it, so it's being used here directly
+19 -16
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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 |
@@ -55,11 +55,13 @@ void zend_copy_constants(HashTable *target, HashTable *source)
static int clean_non_persistent_constant(zend_constant *c TSRMLS_DC)
{
if (c->flags & CONST_PERSISTENT) {
return EG(full_tables_cleanup) ? 0 : ZEND_HASH_APPLY_STOP;
} else {
return EG(full_tables_cleanup) ? 1 : ZEND_HASH_APPLY_REMOVE;
}
return (c->flags & CONST_PERSISTENT) ? ZEND_HASH_APPLY_STOP : ZEND_HASH_APPLY_REMOVE;
}
static int clean_non_persistent_constant_full(zend_constant *c TSRMLS_DC)
{
return (c->flags & CONST_PERSISTENT) ? 0 : 1;
}
@@ -112,8 +114,7 @@ void zend_register_standard_constants(TSRMLS_D)
{
zend_constant c;
c.value.type = IS_BOOL;
c.flags = CONST_PERSISTENT;
c.flags = CONST_PERSISTENT | CONST_CT_SUBST;
c.module_number = 0;
c.name = zend_strndup(ZEND_STRL("TRUE"));
@@ -128,16 +129,18 @@ void zend_register_standard_constants(TSRMLS_D)
c.value.type = IS_BOOL;
zend_register_constant(&c TSRMLS_CC);
c.name = zend_strndup(ZEND_STRL("NULL"));
c.name_len = sizeof("NULL");
c.value.type = IS_NULL;
zend_register_constant(&c TSRMLS_CC);
c.flags = CONST_PERSISTENT;
c.name = zend_strndup(ZEND_STRL("ZEND_THREAD_SAFE"));
c.name_len = sizeof("ZEND_THREAD_SAFE");
c.value.value.lval = ZTS_V;
c.value.type = IS_BOOL;
zend_register_constant(&c TSRMLS_CC);
c.name = zend_strndup(ZEND_STRL("NULL"));
c.name_len = sizeof("NULL");
c.value.type = IS_NULL;
zend_register_constant(&c TSRMLS_CC);
}
}
@@ -153,7 +156,7 @@ int zend_shutdown_constants(TSRMLS_D)
void clean_non_persistent_constants(TSRMLS_D)
{
if (EG(full_tables_cleanup)) {
zend_hash_apply(EG(zend_constants), (apply_func_t) clean_non_persistent_constant TSRMLS_CC);
zend_hash_apply(EG(zend_constants), (apply_func_t) clean_non_persistent_constant_full TSRMLS_CC);
} else {
zend_hash_reverse_apply(EG(zend_constants), (apply_func_t) clean_non_persistent_constant TSRMLS_CC);
}
@@ -309,8 +312,8 @@ ZEND_API int zend_register_constant(zend_constant *c TSRMLS_DC)
if (!(c->flags & CONST_CS)) {
/* keep in mind that c->name_len already contains the '\0' */
lowercase_name = estrndup(c->name, c->name_len);
zend_str_tolower(lowercase_name, c->name_len);
lowercase_name = estrndup(c->name, c->name_len-1);
zend_str_tolower(lowercase_name, c->name_len-1);
name = lowercase_name;
} else {
name = c->name;
+2 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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 |
@@ -26,6 +26,7 @@
#define CONST_CS (1<<0) /* Case Sensitive */
#define CONST_PERSISTENT (1<<1) /* Persistent */
#define CONST_CT_SUBST (2<<1) /* Allow compile-time substitution */
#define PHP_USER_CONSTANT INT_MAX /* a constant defined in user space */
+1 -3
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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 |
@@ -21,7 +21,6 @@
#include "zend.h"
#include "zend_API.h"
#include "zend_reflection_api.h"
#include "zend_builtin_functions.h"
#include "zend_interfaces.h"
#include "zend_exceptions.h"
@@ -31,7 +30,6 @@ ZEND_API void zend_register_default_classes(TSRMLS_D)
{
zend_register_interfaces(TSRMLS_C);
zend_register_default_exception(TSRMLS_C);
zend_register_reflection_api(TSRMLS_C);
zend_register_iterator_wrapper(TSRMLS_C);
}
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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 |
+4 -5
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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 |
@@ -23,7 +23,6 @@
#include "zend.h"
#include "zend_API.h"
#include "zend_reflection_api.h"
#include "zend_builtin_functions.h"
#include "zend_interfaces.h"
#include "zend_exceptions.h"
@@ -92,7 +91,7 @@ static zend_object_value zend_default_exception_new_ex(zend_class_entry *class_t
ALLOC_ZVAL(trace);
trace->is_ref = 0;
trace->refcount = 0;
zend_fetch_debug_backtrace(trace, skip_top_traces TSRMLS_CC);
zend_fetch_debug_backtrace(trace, skip_top_traces, 0 TSRMLS_CC);
zend_update_property_string(default_exception_ce, &obj, "file", sizeof("file")-1, zend_get_executed_filename(TSRMLS_C) TSRMLS_CC);
zend_update_property_long(default_exception_ce, &obj, "line", sizeof("line")-1, zend_get_executed_lineno(TSRMLS_C) TSRMLS_CC);
@@ -132,7 +131,7 @@ ZEND_METHOD(exception, __construct)
int argc = ZEND_NUM_ARGS(), message_len;
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc TSRMLS_CC, "|sl", &message, &message_len, &code) == FAILURE) {
zend_error(E_ERROR, "Wrong parameter count for exception([string $exception [, long $code ]])");
zend_error(E_ERROR, "Wrong parameters for Exception([string $exception [, long $code ]])");
}
object = getThis();
@@ -158,7 +157,7 @@ ZEND_METHOD(error_exception, __construct)
int argc = ZEND_NUM_ARGS(), message_len, filename_len;
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc TSRMLS_CC, "|sllsl", &message, &message_len, &code, &severity, &filename, &filename_len, &lineno) == FAILURE) {
zend_error(E_ERROR, "Wrong parameter count for exception([string $exception [, long $code ]])");
zend_error(E_ERROR, "Wrong parameters for ErrorException([string $exception [, long $code, [ long $severity, [ string $filename, [ long $lineno ]]]]])");
}
object = getThis();
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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 -12
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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 |
@@ -177,8 +177,8 @@ static inline zval *_get_zval_ptr_var(znode *node, temp_variable *Ts, zend_free_
should_free->var = ptr;
if (T->str_offset.str->type != IS_STRING
|| ((int)T->str_offset.offset<0)
|| (T->str_offset.str->value.str.len <= T->str_offset.offset)) {
|| ((int)T->str_offset.offset < 0)
|| (T->str_offset.str->value.str.len <= (int)T->str_offset.offset)) {
zend_error(E_NOTICE, "Uninitialized string offset: %d", T->str_offset.offset);
ptr->value.str.val = STR_EMPTY_ALLOC();
ptr->value.str.len = 0;
@@ -440,6 +440,7 @@ static inline void make_real_object(zval **object_ptr TSRMLS_DC)
SEPARATE_ZVAL(object_ptr);
}
zend_error(E_STRICT, "Creating default object from empty value");
zval_dtor(*object_ptr);
object_init(*object_ptr);
}
}
@@ -544,6 +545,16 @@ static inline void zend_assign_to_object(znode *result, zval **object_ptr, znode
zval *value = get_zval_ptr(value_op, Ts, &free_value, BP_VAR_R);
zval **retval = &T(result->u.var).var.ptr;
if (*object_ptr == EG(error_zval_ptr)) {
FREE_OP(free_op2);
if (!RETURN_VALUE_UNUSED(result)) {
*retval = EG(uninitialized_zval_ptr);
PZVAL_LOCK(*retval);
}
FREE_OP(free_value);
return;
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
@@ -647,7 +658,7 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2
zend_error(E_WARNING, "Illegal string offset: %d", T->str_offset.offset);
break;
}
if (T->str_offset.offset >= T->str_offset.str->value.str.len) {
if ((int)T->str_offset.offset >= T->str_offset.str->value.str.len) {
zend_uint i;
if (T->str_offset.str->value.str.len==0) {
@@ -1250,11 +1261,6 @@ static void zend_fetch_property_address(temp_variable *result, zval **container_
return;
}
if ((type==BP_VAR_W || type==BP_VAR_RW) && container->refcount>1 && !PZVAL_IS_REF(container)) {
SEPARATE_ZVAL(container_ptr);
container = *container_ptr;
}
if (Z_OBJ_HT_P(container)->get_property_ptr_ptr) {
zval **ptr_ptr = Z_OBJ_HT_P(container)->get_property_ptr_ptr(container, prop_ptr TSRMLS_CC);
if(NULL == ptr_ptr) {
@@ -1371,6 +1377,11 @@ ZEND_API void execute_internal(zend_execute_data *execute_data_ptr, int return_v
CHECK_SYMBOL_TABLES() \
EX(opline) = new_op
#define ZEND_VM_JMP(new_op) \
CHECK_SYMBOL_TABLES() \
EX(opline) = EG(exception)?EX(opline)+1:new_op; \
ZEND_VM_CONTINUE()
#define ZEND_VM_INC_OPCODE() \
if (!EG(exception)) { \
CHECK_SYMBOL_TABLES() \
@@ -1388,9 +1399,6 @@ ZEND_API void execute_internal(zend_execute_data *execute_data_ptr, int return_v
EG(current_execute_data) = EX(prev_execute_data); \
ZEND_VM_RETURN()
#define ZEND_VM_CONTINUE_JMP() \
ZEND_VM_CONTINUE()
#include "zend_vm_execute.h"
ZEND_API int zend_set_user_opcode_handler(zend_uchar opcode, opcode_handler_t handler)
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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 |
+113 -41
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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 |
@@ -46,11 +46,12 @@ ZEND_API zend_fcall_info_cache empty_fcall_info_cache = { 0, NULL, NULL, NULL };
static WNDCLASS wc;
static HWND timeout_window;
static HANDLE timeout_thread_event;
static HANDLE timeout_thread_handle;
static DWORD timeout_thread_id;
static int timeout_thread_initialized=0;
#endif
#if ZEND_DEBUG
#if 0&&ZEND_DEBUG
static void (*original_sigsegv_handler)(int);
static void zend_handle_sigsegv(int dummy)
{
@@ -94,23 +95,27 @@ static void zend_extension_deactivator(zend_extension *extension TSRMLS_DC)
}
static int is_not_internal_function(zend_function *function TSRMLS_DC)
static int clean_non_persistent_function(zend_function *function TSRMLS_DC)
{
if (function->type == ZEND_INTERNAL_FUNCTION) {
return EG(full_tables_cleanup) ? 0 : ZEND_HASH_APPLY_STOP;
} else {
return EG(full_tables_cleanup) ? 1 : ZEND_HASH_APPLY_REMOVE;
}
return (function->type == ZEND_INTERNAL_FUNCTION) ? ZEND_HASH_APPLY_STOP : ZEND_HASH_APPLY_REMOVE;
}
static int is_not_internal_class(zend_class_entry **ce TSRMLS_DC)
static int clean_non_persistent_function_full(zend_function *function TSRMLS_DC)
{
if ((*ce)->type == ZEND_INTERNAL_CLASS) {
return EG(full_tables_cleanup) ? 0 : ZEND_HASH_APPLY_STOP;
} else {
return EG(full_tables_cleanup) ? 1 : ZEND_HASH_APPLY_REMOVE;
}
return (function->type != ZEND_INTERNAL_FUNCTION);
}
static int clean_non_persistent_class(zend_class_entry **ce TSRMLS_DC)
{
return ((*ce)->type == ZEND_INTERNAL_CLASS) ? ZEND_HASH_APPLY_STOP : ZEND_HASH_APPLY_REMOVE;
}
static int clean_non_persistent_class_full(zend_class_entry **ce TSRMLS_DC)
{
return ((*ce)->type != ZEND_INTERNAL_CLASS);
}
@@ -250,18 +255,22 @@ void shutdown_executor(TSRMLS_D)
So we want first of all to clean up all data and then move to tables destruction.
Note that only run-time accessed data need to be cleaned up, pre-defined data can
not contain objects and thus are not probelmatic */
zend_hash_apply(EG(function_table), (apply_func_t) zend_cleanup_function_data TSRMLS_CC);
if (EG(full_tables_cleanup)) {
zend_hash_apply(EG(function_table), (apply_func_t) zend_cleanup_function_data_full TSRMLS_CC);
} else {
zend_hash_reverse_apply(EG(function_table), (apply_func_t) zend_cleanup_function_data TSRMLS_CC);
}
zend_hash_apply(EG(class_table), (apply_func_t) zend_cleanup_class_data TSRMLS_CC);
zend_ptr_stack_destroy(&EG(argument_stack));
/* Destroy all op arrays */
if (EG(full_tables_cleanup)) {
zend_hash_apply(EG(function_table), (apply_func_t) is_not_internal_function TSRMLS_CC);
zend_hash_apply(EG(class_table), (apply_func_t) is_not_internal_class TSRMLS_CC);
zend_hash_apply(EG(function_table), (apply_func_t) clean_non_persistent_function_full TSRMLS_CC);
zend_hash_apply(EG(class_table), (apply_func_t) clean_non_persistent_class_full TSRMLS_CC);
} else {
zend_hash_reverse_apply(EG(function_table), (apply_func_t) is_not_internal_function TSRMLS_CC);
zend_hash_reverse_apply(EG(class_table), (apply_func_t) is_not_internal_class TSRMLS_CC);
zend_hash_reverse_apply(EG(function_table), (apply_func_t) clean_non_persistent_function TSRMLS_CC);
zend_hash_reverse_apply(EG(class_table), (apply_func_t) clean_non_persistent_class TSRMLS_CC);
}
while (EG(symtable_cache_ptr)>=EG(symtable_cache)) {
@@ -277,7 +286,7 @@ void shutdown_executor(TSRMLS_D)
} zend_end_try();
zend_try {
#if ZEND_DEBUG
#if 0&&ZEND_DEBUG
signal(SIGSEGV, original_sigsegv_handler);
#endif
@@ -481,7 +490,7 @@ ZEND_API int zval_update_constant(zval **pp, void *arg TSRMLS_DC)
continue;
}
if (const_value.type == IS_STRING && const_value.value.str.len == str_index_len-1 &&
if (const_value.type == IS_STRING && const_value.value.str.len == (int)str_index_len-1 &&
!strncmp(const_value.value.str.val, str_index, str_index_len)) {
/* constant value is the same as its name */
zval_dtor(&const_value);
@@ -501,17 +510,9 @@ ZEND_API int zval_update_constant(zval **pp, void *arg TSRMLS_DC)
*element = new_val;
switch (const_value.type) {
case IS_STRING: {
long lval;
double dval;
if (is_numeric_string(const_value.value.str.val, const_value.value.str.len, &lval, &dval, 0) == IS_LONG) {
zend_hash_update_current_key(p->value.ht, HASH_KEY_IS_LONG, NULL, 0, lval);
} else {
zend_hash_update_current_key(p->value.ht, HASH_KEY_IS_STRING, const_value.value.str.val, const_value.value.str.len+1, 0);
}
case IS_STRING:
zend_symtable_update_current_key(p->value.ht, const_value.value.str.val, const_value.value.str.len+1);
break;
}
case IS_BOOL:
case IS_LONG:
zend_hash_update_current_key(p->value.ht, HASH_KEY_IS_LONG, NULL, 0, const_value.value.lval);
@@ -589,11 +590,14 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
zend_op **original_opline_ptr;
zend_class_entry *current_scope;
zend_class_entry *calling_scope = NULL;
zend_class_entry *check_scope_or_static = NULL;
zval *current_this;
zend_execute_data execute_data;
zval *method_name;
zval *params_array;
int call_via_handler = 0;
char *fname, *colon;
int fname_len;
if (EG(exception)) {
return FAILURE; /* we would result in an instable executor otherwise */
@@ -612,6 +616,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
execute_data = *EG(current_execute_data);
EX(op_array) = NULL;
EX(opline) = NULL;
EX(object) = NULL;
} else {
/* This only happens when we're called outside any execute()'s
* It shouldn't be strictly necessary to NULL execute_data out,
@@ -667,6 +672,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
ce = &(EG(active_op_array)->scope);
found = (*ce != NULL?SUCCESS:FAILURE);
fci->object_pp = EG(This)?&EG(This):NULL;
EX(object) = EG(This);
} else if (strcmp(Z_STRVAL_PP(fci->object_pp), "parent") == 0 && EG(active_op_array)) {
if (!EG(active_op_array)->scope) {
@@ -678,6 +684,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
ce = &(EG(active_op_array)->scope->parent);
found = (*ce != NULL?SUCCESS:FAILURE);
fci->object_pp = EG(This)?&EG(This):NULL;
EX(object) = EG(This);
} else {
zend_class_entry *scope;
scope = EG(active_op_array) ? EG(active_op_array)->scope : NULL;
@@ -690,6 +697,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
instanceof_function(Z_OBJCE_P(EG(This)), scope TSRMLS_CC) &&
instanceof_function(scope, *ce TSRMLS_CC)) {
fci->object_pp = &EG(This);
EX(object) = EG(This);
} else {
fci->object_pp = NULL;
}
@@ -713,30 +721,67 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
return FAILURE;
}
fname = Z_STRVAL_P(fci->function_name);
fname_len = Z_STRLEN_P(fci->function_name);
if (calling_scope && (colon = strstr(fname, "::")) != NULL) {
int clen = colon - fname;
int mlen = fname_len - clen - 2;
zend_class_entry **pce, *ce_child = NULL;
if (zend_lookup_class(fname, clen, &pce TSRMLS_CC) == SUCCESS) {
ce_child = *pce;
} else {
char *lcname = zend_str_tolower_dup(fname, clen);
/* caution: lcname is not '\0' terminated */
if (calling_scope) {
if (clen == sizeof("self") - 1 && memcmp(lcname, "self", sizeof("self") - 1) == 0) {
ce_child = EG(active_op_array) ? EG(active_op_array)->scope : NULL;
} else if (clen == sizeof("parent") - 1 && memcmp(lcname, "parent", sizeof("parent") - 1) == 0 && EG(active_op_array)->scope) {
ce_child = EG(active_op_array) && EG(active_op_array)->scope ? EG(scope)->parent : NULL;
}
}
efree(lcname);
}
if (!ce_child) {
zend_error(E_ERROR, "Cannot call method %s() or method does not exist", fname);
return FAILURE;
}
check_scope_or_static = calling_scope;
fci->function_table = &ce_child->function_table;
calling_scope = ce_child;
fname = fname + clen + 2;
fname_len = mlen;
}
if (fci->object_pp) {
if (Z_OBJ_HT_PP(fci->object_pp)->get_method == NULL) {
zend_error(E_ERROR, "Object does not support method calls");
}
EX(function_state).function =
Z_OBJ_HT_PP(fci->object_pp)->get_method(fci->object_pp, Z_STRVAL_P(fci->function_name), Z_STRLEN_P(fci->function_name) TSRMLS_CC);
Z_OBJ_HT_PP(fci->object_pp)->get_method(fci->object_pp, fname, fname_len TSRMLS_CC);
if (EX(function_state).function && calling_scope != EX(function_state).function->common.scope) {
char *function_name_lc = zend_str_tolower_dup(Z_STRVAL_P(fci->function_name), Z_STRLEN_P(fci->function_name));
if (zend_hash_find(&calling_scope->function_table, function_name_lc, fci->function_name->value.str.len+1, (void **) &EX(function_state).function)==FAILURE) {
char *function_name_lc = zend_str_tolower_dup(fname, fname_len);
if (zend_hash_find(&calling_scope->function_table, function_name_lc, fname_len+1, (void **) &EX(function_state).function)==FAILURE) {
efree(function_name_lc);
zend_error(E_ERROR, "Cannot call method %s::%s() or method does not exist", calling_scope->name, Z_STRVAL_P(fci->function_name));
zend_error(E_ERROR, "Cannot call method %s::%s() or method does not exist", calling_scope->name, fname);
}
efree(function_name_lc);
}
} else if (calling_scope) {
char *function_name_lc = zend_str_tolower_dup(Z_STRVAL_P(fci->function_name), Z_STRLEN_P(fci->function_name));
char *function_name_lc = zend_str_tolower_dup(fname, fname_len);
EX(function_state).function =
zend_std_get_static_method(calling_scope, function_name_lc, Z_STRLEN_P(fci->function_name) TSRMLS_CC);
zend_std_get_static_method(calling_scope, function_name_lc, fname_len TSRMLS_CC);
efree(function_name_lc);
if (check_scope_or_static && EX(function_state).function
&& !(EX(function_state).function->common.fn_flags & ZEND_ACC_STATIC)
&& !instanceof_function(check_scope_or_static, calling_scope TSRMLS_CC)) {
zend_error(E_ERROR, "Cannot call method %s() of class %s which is not a derived from %s", fname, calling_scope->name, check_scope_or_static->name);
return 0;
}
} else {
char *function_name_lc = zend_str_tolower_dup(Z_STRVAL_P(fci->function_name), Z_STRLEN_P(fci->function_name));
char *function_name_lc = zend_str_tolower_dup(fname, fname_len);
if (zend_hash_find(fci->function_table, function_name_lc, fci->function_name->value.str.len+1, (void **) &EX(function_state).function)==FAILURE) {
if (zend_hash_find(fci->function_table, function_name_lc, fname_len+1, (void **) &EX(function_state).function)==FAILURE) {
EX(function_state).function = NULL;
}
efree(function_name_lc);
@@ -769,6 +814,19 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
EX(function_state).function = fci_cache->function_handler;
calling_scope = fci_cache->calling_scope;
fci->object_pp = fci_cache->object_pp;
EX(object) = fci->object_pp ? *fci->object_pp : NULL;
}
if (EX(function_state).function->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED)) {
if (EX(function_state).function->common.fn_flags & ZEND_ACC_ABSTRACT) {
zend_error_noreturn(E_ERROR, "Cannot call abstract method %s::%s()", EX(function_state).function->common.scope->name, EX(function_state).function->common.function_name);
}
if (EX(function_state).function->common.fn_flags & ZEND_ACC_DEPRECATED) {
zend_error(E_STRICT, "Function %s%s%s() is deprecated",
EX(function_state).function->common.scope ? EX(function_state).function->common.scope->name : "",
EX(function_state).function->common.scope ? "::" : "",
EX(function_state).function->common.function_name);
}
}
for (i=0; i<fci->param_count; i++) {
@@ -920,7 +978,7 @@ ZEND_API int zend_lookup_class_ex(char *name, int name_length, int use_autoload,
zval **args[1];
zval autoload_function;
zval *class_name_ptr;
zval *retval_ptr;
zval *retval_ptr = NULL;
int retval;
char *lc_name;
zval *exception;
@@ -1003,6 +1061,8 @@ ZEND_API int zend_lookup_class_ex(char *name, int name_length, int use_autoload,
}
if (!EG(exception)) {
EG(exception) = exception;
}
if (retval_ptr) {
zval_ptr_dtor(&retval_ptr);
}
@@ -1115,6 +1175,8 @@ void execute_new_code(TSRMLS_D)
INIT_ZVAL(ret_opline->op1.u.constant);
SET_UNUSED(ret_opline->op2);
zend_do_handle_exception(TSRMLS_C);
if (!CG(active_op_array)->start_op) {
CG(active_op_array)->start_op = CG(active_op_array)->opcodes;
}
@@ -1153,7 +1215,11 @@ void execute_new_code(TSRMLS_D)
zval_ptr_dtor(&local_retval);
}
CG(active_op_array)->last--; /* get rid of that ZEND_RETURN */
if (EG(exception)) {
zend_exception_error(EG(exception) TSRMLS_CC);
}
CG(active_op_array)->last -= 2; /* get rid of that ZEND_RETURN and ZEND_HANDLE_EXCEPTION */
CG(active_op_array)->start_op = CG(active_op_array)->opcodes+CG(active_op_array)->last;
}
@@ -1249,6 +1315,7 @@ static unsigned __stdcall timeout_thread_proc(void *pArgs)
}
DestroyWindow(timeout_window);
UnregisterClass(wc.lpszClassName, NULL);
SetEvent(timeout_thread_handle);
return 0;
}
@@ -1256,6 +1323,7 @@ static unsigned __stdcall timeout_thread_proc(void *pArgs)
void zend_init_timeout_thread()
{
timeout_thread_event = CreateEvent(NULL, FALSE, FALSE, NULL);
timeout_thread_handle = CreateEvent(NULL, FALSE, FALSE, NULL);
_beginthreadex(NULL, 0, timeout_thread_proc, NULL, 0, &timeout_thread_id);
WaitForSingleObject(timeout_thread_event, INFINITE);
}
@@ -1267,6 +1335,10 @@ void zend_shutdown_timeout_thread()
return;
}
PostThreadMessage(timeout_thread_id, WM_QUIT, 0, 0);
/* Wait for thread termination */
WaitForSingleObject(timeout_thread_handle, 5000);
CloseHandle(timeout_thread_handle);
}
#endif
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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 |
+7 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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 |
@@ -135,6 +135,7 @@ struct _zend_compiler_globals {
#ifdef ZEND_MULTIBYTE
zend_encoding **script_encoding_list;
int script_encoding_list_size;
zend_bool detect_unicode;
zend_encoding *internal_encoding;
@@ -143,6 +144,11 @@ struct _zend_compiler_globals {
zend_encoding_converter encoding_converter;
zend_encoding_oddlen encoding_oddlen;
#endif /* ZEND_MULTIBYTE */
#ifdef ZTS
HashTable **static_members;
int last_static_member;
#endif
};
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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 |
+17 -19
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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 |
@@ -102,14 +102,14 @@ ZEND_API ulong zend_hash_func(char *arKey, uint nKeyLength)
#define UPDATE_DATA(ht, p, pData, nDataSize) \
if (nDataSize == sizeof(void*)) { \
if (!(p)->pDataPtr) { \
pefree_rel((p)->pData, (ht)->persistent); \
if ((p)->pData != &(p)->pDataPtr) { \
pefree_rel((p)->pData, (ht)->persistent); \
} \
memcpy(&(p)->pDataPtr, pData, sizeof(void *)); \
(p)->pData = &(p)->pDataPtr; \
} else { \
if ((p)->pDataPtr) { \
(p)->pData = (void *) pemalloc_rel(nDataSize, (ht)->persistent); \
if ((p)->pData == &(p)->pDataPtr) { \
(p)->pData = (void *) pemalloc_rel(nDataSize, (ht)->persistent); \
(p)->pDataPtr=NULL; \
} else { \
(p)->pData = (void *) perealloc_rel((p)->pData, nDataSize, (ht)->persistent); \
@@ -123,9 +123,9 @@ ZEND_API ulong zend_hash_func(char *arKey, uint nKeyLength)
memcpy(&(p)->pDataPtr, pData, sizeof(void *)); \
(p)->pData = &(p)->pDataPtr; \
} else { \
(p)->pData = (void *) pemalloc_rel(nDataSize, (ht)->persistent); \
(p)->pData = (void *) pemalloc_rel(nDataSize, (ht)->persistent);\
if (!(p)->pData) { \
pefree_rel(p, (ht)->persistent); \
pefree_rel(p, (ht)->persistent); \
return FAILURE; \
} \
memcpy((p)->pData, pData, nDataSize); \
@@ -461,8 +461,10 @@ ZEND_API int zend_hash_del_key_or_index(HashTable *ht, char *arKey, uint nKeyLen
p = ht->arBuckets[nIndex];
while (p != NULL) {
if ((p->h == h) && ((p->nKeyLength == 0) || /* Numeric index */
((p->nKeyLength == nKeyLength) && (!memcmp(p->arKey, arKey, nKeyLength))))) {
if ((p->h == h)
&& (p->nKeyLength == nKeyLength)
&& ((p->nKeyLength == 0) /* Numeric index (short circuits the memcmp() check) */
|| !memcmp(p->arKey, arKey, nKeyLength))) { /* String index */
HANDLE_BLOCK_INTERRUPTIONS();
if (p == ht->arBuckets[nIndex]) {
ht->arBuckets[nIndex] = p->pNext;
@@ -489,7 +491,7 @@ ZEND_API int zend_hash_del_key_or_index(HashTable *ht, char *arKey, uint nKeyLen
if (ht->pDestructor) {
ht->pDestructor(p->pData);
}
if (!p->pDataPtr) {
if (p->pData != &p->pDataPtr) {
pefree(p->pData, ht->persistent);
}
pefree(p, ht->persistent);
@@ -518,7 +520,7 @@ ZEND_API void zend_hash_destroy(HashTable *ht)
if (ht->pDestructor) {
ht->pDestructor(q->pData);
}
if (!q->pDataPtr && q->pData) {
if (q->pData != &q->pDataPtr) {
pefree(q->pData, ht->persistent);
}
pefree(q, ht->persistent);
@@ -544,7 +546,7 @@ ZEND_API void zend_hash_clean(HashTable *ht)
if (ht->pDestructor) {
ht->pDestructor(q->pData);
}
if (!q->pDataPtr && q->pData) {
if (q->pData != &q->pDataPtr) {
pefree(q->pData, ht->persistent);
}
pefree(q, ht->persistent);
@@ -573,7 +575,7 @@ static Bucket *zend_hash_apply_deleter(HashTable *ht, Bucket *p)
if (ht->pDestructor) {
ht->pDestructor(p->pData);
}
if (!p->pDataPtr) {
if (p->pData != &p->pDataPtr) {
pefree(p->pData, ht->persistent);
}
retval = p->pListNext;
@@ -732,11 +734,7 @@ ZEND_API void zend_hash_reverse_apply(HashTable *ht, apply_func_t apply_func TSR
q = p;
p = p->pListLast;
if (result & ZEND_HASH_APPLY_REMOVE) {
if (q->nKeyLength>0) {
zend_hash_del(ht, q->arKey, q->nKeyLength);
} else {
zend_hash_index_del(ht, q->h);
}
zend_hash_apply_deleter(ht, q);
}
if (result & ZEND_HASH_APPLY_STOP) {
break;
@@ -1259,7 +1257,7 @@ ZEND_API int zend_hash_sort(HashTable *ht, sort_func_t sort_func,
ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t compar, zend_bool ordered TSRMLS_DC)
{
Bucket *p1, *p2;
Bucket *p1, *p2 = NULL;
int result;
void *pData2;
+7 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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 |
@@ -353,6 +353,12 @@ static inline int zend_symtable_exists(HashTable *ht, char *arKey, uint nKeyLeng
return zend_hash_exists(ht, arKey, nKeyLength);
}
static inline int zend_symtable_update_current_key(HashTable *ht, char *arKey, uint nKeyLength)
{
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_update_current_key(ht, HASH_KEY_IS_LONG, NULL, 0, idx));
return zend_hash_update_current_key(ht, HASH_KEY_IS_STRING, arKey, nKeyLength, 0);
}
#endif /* ZEND_HASH_H */
/*
+19 -19
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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 |
@@ -94,7 +94,7 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
int token_type;
char *last_color = syntax_highlighter_ini->highlight_html;
char *next_color;
int in_string=0, post_heredoc = 0;
int in_string=0;
zend_printf("<code>");
zend_printf("<span style=\"color: %s\">\n", last_color);
@@ -151,19 +151,16 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
switch (token_type) {
case T_END_HEREDOC:
zend_html_puts(token.value.str.val, token.value.str.len TSRMLS_CC);
post_heredoc = 1;
break;
default:
zend_html_puts(LANG_SCNG(yy_text), LANG_SCNG(yy_leng) TSRMLS_CC);
if (post_heredoc) {
zend_html_putc('\n');
post_heredoc = 0;
}
break;
}
if (token.type == IS_STRING) {
switch (token_type) {
case EOF:
goto done;
case T_OPEN_TAG:
case T_OPEN_TAG_WITH_ECHO:
case T_CLOSE_TAG:
@@ -180,6 +177,7 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
}
token.type = 0;
}
done:
if (last_color != syntax_highlighter_ini->highlight_html) {
zend_printf("</span>\n");
}
@@ -208,20 +206,22 @@ ZEND_API void zend_strip(TSRMLS_D)
case T_DOC_COMMENT:
token.type = 0;
continue;
case T_END_HEREDOC: {
char *ptr = LANG_SCNG(yy_text);
zend_write(ptr, LANG_SCNG(yy_leng) - 1);
/* The ensure that we only write one ; and that it followed by the required newline */
zend_write("\n", sizeof("\n") - 1);
if (ptr[LANG_SCNG(yy_leng) - 1] == ';') {
lex_scan(&token TSRMLS_CC);
}
efree(token.value.str.val);
}
break;
case EOF:
return;
case T_END_HEREDOC:
zend_write(LANG_SCNG(yy_text), LANG_SCNG(yy_leng));
efree(token.value.str.val);
/* read the following character, either newline or ; */
if (lex_scan(&token TSRMLS_CC) != T_WHITESPACE) {
zend_write(LANG_SCNG(yy_text), LANG_SCNG(yy_leng));
}
zend_write("\n", sizeof("\n") - 1);
prev_space = 1;
token.type = 0;
continue;
default:
zend_write(LANG_SCNG(yy_text), LANG_SCNG(yy_leng));
break;
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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
@@ -3,7 +3,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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 |
@@ -249,25 +249,26 @@ string_or_value:
expr { $$ = $1; }
| CFG_TRUE { $$ = $1; }
| CFG_FALSE { $$ = $1; }
| var_string_list { $$ = $1; }
| '\n' { zend_ini_init_string(&$$); }
| /* empty */ { zend_ini_init_string(&$$); }
;
var_string_list:
var_string_list cfg_var_ref { zend_ini_add_string(&$$, &$1, &$2); free($2.value.str.val); }
cfg_var_ref { $$ = $1; }
| TC_ENCAPSULATED_STRING { $$ = $1; }
| constant_string { $$ = $1; }
| var_string_list cfg_var_ref { zend_ini_add_string(&$$, &$1, &$2); free($2.value.str.val); }
| var_string_list TC_ENCAPSULATED_STRING { zend_ini_add_string(&$$, &$1, &$2); free($2.value.str.val); }
| var_string_list constant_string { zend_ini_add_string(&$$, &$1, &$2); }
| /* empty */ { zend_ini_init_string(&$$); }
| var_string_list constant_string { zend_ini_add_string(&$$, &$1, &$2); free($2.value.str.val); }
;
cfg_var_ref:
TC_DOLLAR_CURLY TC_STRING '}' { zend_ini_get_var(&$$, &$2); }
TC_DOLLAR_CURLY TC_STRING '}' { zend_ini_get_var(&$$, &$2); free($2.value.str.val); }
;
expr:
constant_string { $$ = $1; }
var_string_list { $$ = $1; }
| expr '|' expr { zend_ini_do_op('|', &$$, &$1, &$3); }
| expr '&' expr { zend_ini_do_op('&', &$$, &$1, &$3); }
| '~' expr { zend_ini_do_op('~', &$$, &$2, NULL); }
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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 |
+11 -1
View File
@@ -3,7 +3,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2005 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 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 |
@@ -139,8 +139,18 @@ NEWLINE ("\r"|"\n"|"\r\n")
<INITIAL>["][^"]*["] {
char *p = yytext;
/* ENCAPSULATED TC_STRING */
while ((p = strpbrk(p, "\r\n"))) {
if (*p == '\r' && *(p + 1) == '\n') {
p++;
}
SCNG(lineno)++;
p++;
}
/* eat trailing " */
yytext[yyleng-1]=0;
Loaded 100 of 1638 files, more files were not shown because too many files have changed in this diff. Show more