Compare commits

...
2668 Commits
Author SHA1 Message Date
SVN Migration 2ccef75a19 This commit was manufactured by cvs2svn to create tag 'dev'. 2002-08-06 16:36:06 +00:00
Brad House d5ec9a9886 sync to libmcve-3.0 2002-08-06 16:36:05 +00:00
Tomas V.V.Cox 5d4b690bab Changed Windows 9x detection code (reported by Alex Merz) 2002-08-06 16:35:19 +00:00
Marko Karppinen 5611c2fc78 Support compiling and linking against Darwin / Mac OS X frameworks 2002-08-06 16:01:34 +00:00
Dan Kalowsky e410749014 Keeping function prototype variables the same 2002-08-06 03:48:15 +00:00
Marcus Boerger 7477baf33a datatype inconsistency found by Dan Kalowsky 2002-08-06 03:32:16 +00:00
b5ffa93f5f NEWS update 2002-08-06 00:20:49 +00:00
22c0d36cd5 ChangeLog update 2002-08-06 00:19:36 +00:00
Sascha Schumann cd64450cd7 Touch file 2002-08-06 00:07:05 +00:00
Harald Radi 2007b1216a removed a possible NULL pointer referencing inside an error handler 2002-08-05 23:41:25 +00:00
Harald Radi 01dee775d1 found a memleak 2002-08-05 23:38:35 +00:00
Dan Kalowsky 61fc6e766f Removing the imap_popen command... because as Jani puts it "it never worked
and it never will work" until IMAP servers support this feature.
2002-08-05 21:53:09 +00:00
Stig Venaas dddf235671 Made ldap_connect/bind/unbind() use zend_parse_parameters() 2002-08-05 21:14:14 +00:00
Marcus Boerger 55f735a587 Correct carset if iconv is active
#Same solution would work for mbstring - but that must wait
2002-08-05 19:00:09 +00:00
Marcus Boerger 6d21c9465d Added php_ob_handler_used to check if a specific output handler is used
in c.
2002-08-05 18:54:53 +00:00
Marcus Boerger 6c094c3e07 ws fix 2002-08-05 18:42:41 +00:00
Marcus Boerger abc7041ca2 -keep mimetype until sapi deactivation
-move NULL check for sapi_apply_default_charset to proper position.
2002-08-05 18:32:05 +00:00
Marcus Boerger dd8ec2dc0a -fix one warning
-send Content-Type Header with charset
2002-08-05 18:26:06 +00:00
Alan Knowles c4ef31db26 revert change - this was due to an bug in php HEAD a few days ago 2002-08-05 12:58:38 +00:00
Marcus Boerger 77cf59e59c Add html_entities.c 2002-08-05 12:02:36 +00:00
foobar 47902326b9 consistency 2002-08-05 10:40:26 +00:00
Alan Knowles fd7e7021c7 Fixed array_shift messing up array_slice.. 2002-08-05 10:37:40 +00:00
Marcus Boerger cf045313e5 :-) 2002-08-05 03:24:50 +00:00
Marcus Boerger fd26a5c0a9 -New function ob_list_handlers
@- Added ob_list_handlers() which returns an array of all active output
@  handlers. (marcus)
2002-08-05 03:09:42 +00:00
16357dc2af NEWS update 2002-08-05 00:18:35 +00:00
eda6ed6673 ChangeLog update 2002-08-05 00:17:44 +00:00
Shane Caraveo 7645343c4a need to export var_replace and var_destroy for win32 2002-08-04 23:45:38 +00:00
Marcus Boerger c467129528 move html_entities.c to proper place
#nice to have snaps.php.net
2002-08-04 22:54:24 +00:00
Marcus Boerger fa175d6fa2 -Send charset US-ASCII or ini setting default_charset.
#After some discussion with Ilia Alshanetsky
#But perhaps we should have a look for a mbstring solution...
2002-08-04 22:49:48 +00:00
foobar ed4267cf34 Add PHP_MINFO_* 2002-08-04 21:37:44 +00:00
Marcus Boerger 367ca8e2ae -Correct mime_name for HTML-ENTITIES encoding is of cause US-ASCII
-Full list of ASCII aliases
2002-08-04 20:50:53 +00:00
Sander Roobol ef8eb92206 Nuke notice (thanks to Arnaud Limbourg) 2002-08-04 19:00:53 +00:00
Marcus Boerger 81df625260 -Fix warnings (fixed all?) 2002-08-04 18:59:19 +00:00
Georg Richter 06b5f1f546 ups.. :) 2002-08-04 18:59:16 +00:00
Sergey Kartashoff 7fd1881692 - a small fix to mnogosearch extension (affecting UDM_BROWSER_CHARSET) 2002-08-04 18:58:20 +00:00
Georg Richter 83a09ac1f9 added meta tag (w3c compliance)
Thx to Ilia Alshanetsky (ilia@prohost.org)
2002-08-04 18:57:02 +00:00
Marcus Boerger c4e66f4192 -Add new file to windows build 2002-08-04 18:33:28 +00:00
Marcus Boerger 77abd9d55a -New encoding/decoding HTML-ENTITIES.
#This allows to enforce named and numeric entities in output.
#Example:CMS that reads UTF8 or ISO-8859-1 but exports HTML in ASCII.
#Using mbstring.http_output=HTML-ENTITIES users receive entities which
#can displayed correctly independant of any brwoser side encoding.
@New mbstring encoding/decoding HTML-ENTITIES. (marcus)
2002-08-04 14:20:11 +00:00
Marcus Boerger f2f70b5dda -Allow double quotes for encoding lists (if used in ini for example)
-New parameter 'L' for mb_http_input() to retieve input encoding as
 comma separated string.
@New parameter 'L' for mb_http_input() to retrieve input encoding as
 comma separated string. (marcus)
2002-08-04 14:10:58 +00:00
c5067529ee ChangeLog update 2002-08-04 00:18:09 +00:00
James E. Flemer 9eb1213206 Close pipes to avoid deadlock.
Submitted By: Melvyn Sopacua <msopacua@idg.nl>
2002-08-03 14:54:30 +00:00
Dan Kalowsky d4ec2c30a0 Cleaning up the imap_get_quotaroot return array to remove useless data 2002-08-03 14:48:47 +00:00
Rasmus Lerdorf c8bf165242 Yup, sizeof() includes the space for the \0 2002-08-03 14:09:56 +00:00
Marcus Boerger 02a12b57e9 -additional section INI that allows to set special ini settings on call
by adding '-c foo=bar' strings to php call. Each line must have format
 foo=bar. This of cause only works for cli version.
-made sections SKIPIF,INI,GET,POST optional
2002-08-03 11:44:12 +00:00
Sergey Kartashoff 7279543c30 # mnogosearch example fix 2002-08-03 11:34:53 +00:00
Sergey Kartashoff 7a0fbd668a - UDM_PARAM_STORED mnogosearch parameter has been added to set
stored address.
2002-08-03 11:23:51 +00:00
Andi Gutmans 61a73183cc - Small fix 2002-08-03 09:50:07 +00:00
Andi Gutmans 4b492c4deb - Fix build on Windows. Also please don't use Java style opening function
- bracket indentation.
2002-08-03 09:48:34 +00:00
Zeev Suraski 6025b804c2 MFZE1 2002-08-03 09:44:27 +00:00
Sergey Kartashoff 37e58c21b2 - An Udm_Make_Excerpt function has been added to mnogosearch extension
to support excerpts while using with mnogosearch-3.2.5 or later.
2002-08-03 08:53:27 +00:00
Brad LaFountain c90764d753 one last fix for array_shift 2002-08-03 00:40:46 +00:00
b0fbb9fc45 ChangeLog update 2002-08-03 00:17:40 +00:00
James E. Flemer 3a8d66a021 Fix typo in #if. Bug #17538. 2002-08-02 14:35:24 +00:00
Marcus Boerger de8c36dcaa -use const to clarify code
-fix tsrmls build (therefore rfc1867.c)
2002-08-02 10:22:31 +00:00
Hartmut Holzgraefe e5fa36eee4 added money_format() function
this is similar to C-libs strfmon(), using the same format string
semantics but a different function prototype, so i decided to
give it a more speaking name similar to number_format()
2002-08-02 10:08:53 +00:00
Sergey Kartashoff c9107a668f - UDM_PARAM_WORD_MATCH icorrect behavior has been fixed in
mnogosearch extension
2002-08-02 07:22:19 +00:00
Rui Hirokawa 7527bf0c58 made sapi_register_treat_data() to support multibyte input encoding translation without MBSTR_ENC_TRANS and changed php_treat_data to php_default_treat_data. 2002-08-02 06:53:48 +00:00
82b5dc103f ChangeLog update 2002-08-02 00:23:21 +00:00
Stefan Roehrich f871a5b742 Fixed wrong usage of strncmp. 2002-08-01 21:12:09 +00:00
Brad LaFountain 9b0553c390 array_pop wasnt setting next index 2002-08-01 17:34:31 +00:00
foobar 922b7596a2 That was not correct.. 2002-08-01 16:44:47 +00:00
foobar 6df2b90c05 Reset index when doing array_pop() 2002-08-01 16:39:52 +00:00
foobar 362fc4ee76 Add test for the index resetting. 2002-08-01 16:39:14 +00:00
Stanislav Malyshev 0e7c1f4609 MFZE1 2002-08-01 16:07:19 +00:00
Rasmus Lerdorf b15651c95f Ugh 2002-08-01 15:51:56 +00:00
Dan Kalowsky f08a51f05a Adding in some BC for users to imap_get_quota() function 2002-08-01 14:47:48 +00:00
foobar ababdff402 Added tests for array_shift/array_pop. 2002-08-01 12:33:02 +00:00
foobar 06b3dd122f Nuke compile warning. 2002-08-01 12:07:15 +00:00
foobar 9d62cd7d45 - Removed the DOS line endings
- Changed the '//' comment (this is C, not C++) to /* */
# Brad, use some editor which works..
2002-08-01 12:06:46 +00:00
foobar 7d8c9d2f7f Fix the levels. (php.ini-dist has output_buffering OFF) 2002-08-01 12:02:22 +00:00
foobar 725b3573be Use the constant instead of string for locale type. 2002-08-01 11:49:41 +00:00
Marcus Boerger be0a6f4949 - free mimetype and statusline early if no longer needed or in deactivation
#not setting them to NULL caused the segfault
2002-08-01 09:00:30 +00:00
Rasmus Lerdorf 7b9036cada Need room for the \0 here to avoid an overflow 2002-08-01 07:49:53 +00:00
Brad LaFountain 4f5bd6b7d4 made array_shift re-index like it did before previous fix 2002-08-01 04:38:11 +00:00
1ad75f658b ChangeLog update 2002-08-01 00:17:10 +00:00
Jason Greene 0a376eec25 perhaps this tiem i will get it right 2002-07-31 23:06:53 +00:00
Jason Greene 3b449ce088 Fix unwrapped entry 2002-07-31 22:49:28 +00:00
Jason Greene 4ac782ae57 Fix my broken entry 2002-07-31 22:43:26 +00:00
Sterling Hughes 3754f76507 add support for the curl dns cache 2002-07-31 22:10:58 +00:00
Marcus Boerger dfe1a65faf -fix warnings in windows build 2002-07-31 21:34:37 +00:00
Marcus Boerger 4e05dd7c1b -problem with CLI/mbstring/output buffering 2002-07-31 17:55:15 +00:00
Zeev Suraski a842e12ad2 Fix for non-mbstring builds. Bad Yasuo! :) 2002-07-31 16:25:12 +00:00
Zeev Suraski bc82be4284 Fix crash 2002-07-31 14:41:06 +00:00
Dan Kalowsky 2832d8df94 WS 2002-07-31 13:51:20 +00:00
Dan Kalowsky cc491407de Just adding in an error check that seems to work here well. 2002-07-31 13:50:51 +00:00
foobar 9fe39b9604 Reverted the patch..it breaks the original behaviour of at least array_shift. 2002-07-31 13:49:50 +00:00
Dan Kalowsky 7f30227181 removing the useless +1's on sizeof() and adding the mail_parameter for the
getquot inside the imap_get_quotaroot function.  thank Jani.
2002-07-31 01:03:31 +00:00
38757032d2 NEWS update 2002-07-31 00:19:19 +00:00
e219b8e70c ChangeLog update 2002-07-31 00:18:46 +00:00
Dan Kalowsky 579d1b6a28 fixes a typo in the word "limit", adds the null character to the strlen,
and seems to make imap_get_quotaroot return the correct values despite
cclients claim of "getquotaroot list improper".
2002-07-30 23:16:11 +00:00
Brad LaFountain 70fb744365 fixed bugs 16063 and 16068
increased preformance of array_pop and array_shift
2002-07-30 22:54:12 +00:00
Jason Greene b0cf6c3112 MFZE1 global declare 2002-07-30 22:19:50 +00:00
Jason Greene 838b8ba49f Fix segfault 2002-07-30 22:14:39 +00:00
Stefan Esser a6cf14ac5c ftp_close returns now TRUE on success and FALSE on failure. 2002-07-30 20:37:59 +00:00
Dan Kalowsky 18c0d30c58 Commiting Steph@php.net's patch to re-enable touch on Win32 machines 2002-07-30 20:24:13 +00:00
Rasmus Lerdorf b17544fa33 Add --skel=dir option to ext_skel (patch from David Viner) 2002-07-30 19:02:23 +00:00
Rasmus Lerdorf 059f302596 Fix strtotime() "next" keyword handling. 2002-07-30 18:42:19 +00:00
Rasmus Lerdorf a03057d726 WTF? What sort of bogus commit was that? Fine, here you go. 2002-07-30 17:39:33 +00:00
foobar 3aa77bc32c . 2002-07-30 17:24:13 +00:00
Rasmus Lerdorf 888b7bc2c6 . 2002-07-30 16:05:32 +00:00
Rasmus Lerdorf d56bc7934d Fix for #18638 (str_rot13 bug) 2002-07-30 10:51:33 +00:00
Adam Dickmeiss 5246b7d9d4 Fixed proxy setting for ZOOM 2002-07-30 10:50:48 +00:00
Andrei Zmievski 82c72f2799 @- Adding 'is' operator that can be used to check the type of a variable,
@  or its class. (Andrei)
2002-07-30 04:07:15 +00:00
foobar 84ae5adf29 hot, damn hot. 2002-07-30 00:24:11 +00:00
05e14619b3 ChangeLog update 2002-07-30 00:19:14 +00:00
Sterling Hughes 2f0a47cd55 add sablotron version, patch by Christian Stocker... 2002-07-29 23:57:26 +00:00
Adam Dickmeiss ab9494f9cc Make PHP part of Z39.50 implementation name 2002-07-29 21:51:48 +00:00
Adam Dickmeiss 9decd37336 Use type ext rather than raw for ZOOM record fetch 2002-07-29 19:56:59 +00:00
Dan Kalowsky cc6cf09a51 updating the NEWS file
# why this wasn't done automagically I don't know...
2002-07-29 17:49:46 +00:00
Christian Stocker 825b5a42e2 - nodename is not always set, check if it really is.
- make force_ref for aliases as well
2002-07-29 14:04:44 +00:00
Edin Kadribasic 1463c0b7ee Fixed windows build by adding sha1.c and sha1.h to the project file. 2002-07-29 13:42:01 +00:00
Edin Kadribasic a55c1228ed Fixed bug #14657 (patch by Steph Fox) 2002-07-29 13:13:50 +00:00
Edin Kadribasic 0737394d80 Fixed bug #11214 (patch by Steph Fox) 2002-07-29 13:12:57 +00:00
Edin Kadribasic 8f94a8a744 First try to open php-SAPI.ini and if it fails fall back to regular
php.ini file. For example cli version of PHP will first try to open
php-cli.ini in the usual ini file search path and only if it fails
will it try to open php.ini using the same path.
2002-07-29 12:17:34 +00:00
Sascha Schumann 200058ae81 style police 2002-07-29 08:54:56 +00:00
5307eef5bc NEWS update 2002-07-29 00:19:54 +00:00
110027f64a ChangeLog update 2002-07-29 00:18:58 +00:00
Yasuo Ohgaki 073c21e5c0 Allow xmlrpc-epi header files stored under include/xmlrpc-epi 2002-07-28 21:03:26 +00:00
Derick Rethans 1630e1788f - Copy and paste error -> unify error messages 2002-07-28 19:29:28 +00:00
Stefan Esser bffe4cf222 Added sha1, sha1_file functions. 2002-07-28 19:18:08 +00:00
Marcus Boerger 4f1e5943d8 -add & document ini settings for exif 2002-07-28 17:25:55 +00:00
Marcus Boerger 0383426860 -decode several MarkerNotes
-correct offset information in debug mode
@exif_read_data() can decode MarkerNote of several Cameras. (Marcus)
2002-07-28 17:21:51 +00:00
Tal Peer 90488714ee * Fixed E_NOTICE on pear -V 2002-07-28 17:06:28 +00:00
Stefan Esser 46e76a451d (re)added /ext/ftp news 2002-07-28 14:10:56 +00:00
Stefan Roehrich 6f786ebf3e Commit patch as discussed on LinuxTag and posted to php-dev in June.
Disables zlib.output_compression for scripts with image/ content-type
header (fixes bug #16109) and makes it possible to switch
zlib.output_compression during script execution before the headers are
sent.
@- zlib.output_compression is disabled for "image/" content-type
@  headers and can be changed during script execution. (Stefan)
2002-07-28 14:08:08 +00:00
foobar 24b570dcac - Removed the 2 last entries.
# Dan, sesser, re-add them again yourself.
2002-07-28 13:46:11 +00:00
foobar 9ca47d493d No exceptions. 2002-07-28 13:44:37 +00:00
Harald Radi 476bae4035 update the handlers struct 2002-07-28 13:06:54 +00:00
Yasuo Ohgaki 05aa532310 Unify error messages 2002-07-28 11:17:57 +00:00
Marcus Boerger 0b6074a343 forgot to move imeageellipse out of #ifdef HAVE_LIBGD20 2002-07-28 10:00:37 +00:00
Yasuo Ohgaki 3e7c884b1c Fixed query string handling. Now some.php?a&b=1;c works.
# arg_separator.output can be multile chars
2002-07-28 09:42:15 +00:00
Tal Peer 6bb32a9b1e pear -V now shows pear version, php version and ZE version. 2002-07-28 09:09:03 +00:00
Stig Bakken 6cefddee6f * feature/fixed bug 2002-07-28 08:56:32 +00:00
Stig Bakken cbbc47a199 * added "upgrade-all" command 2002-07-28 08:52:55 +00:00
Stig Bakken 2b4f112d02 * don't abort install if errors are found in the package, display
a warning instead
2002-07-28 08:52:29 +00:00
Yasuo Ohgaki 92e542db27 Fixed some.php?a&b&c does not initilize $_GET['a'], $_GET['b'], $_GET['c']
when mbstr-enc-trans is disabled.
# There is a bug in php_mbstr_encoding_handler() alo, I'll fix it later.
2002-07-28 04:18:40 +00:00
aa338d7b21 ChangeLog update 2002-07-28 00:19:08 +00:00
Andi Gutmans b476ddf183 - Make sure classes are first looked for in the current scope.
- Make sure that during inheritance the global scope is searched if the
- current one doesn't work.
2002-07-27 15:53:14 +00:00
Rui Hirokawa fbbeaec630 fixed: output encoding translation by mb_output_handler() in ext/mbstring was not usable when Content-Type is set by header(). 2002-07-27 13:58:16 +00:00
Stefan Esser 70d7184624 Do not leak data connection. 2002-07-27 09:18:51 +00:00
14d029edf5 NEWS update 2002-07-27 00:19:15 +00:00
6a1b927482 ChangeLog update 2002-07-27 00:18:39 +00:00
foobar d1e3622fcc - Fix bug: #18509, e.g. setting CURLOPT_BINARYTRANSFER succeeds always.
- Also set the binary mode ONLY if the passed value is true..
2002-07-26 22:57:14 +00:00
Frank M. Kromann df0bab2c7b Fizing ZTS build 2002-07-26 22:14:55 +00:00
Stefan Esser 80e9724ccc [EXPERIMENTAL] Added functions for asynchronous FTP transfers 2002-07-26 22:00:25 +00:00
Marcus Boerger 8b853592b1 Missing Photoshop tags 2002-07-26 17:09:02 +00:00
Dan Kalowsky b53b76335f forgot to make the same change to imap_get_quota... 2002-07-26 17:08:05 +00:00
Dan Kalowsky 05f3881995 Minor memory fix suggested by Zeev 2002-07-26 16:59:11 +00:00
Georg Richter 797f7736eb Bugfix: #18532
Fixed week number calculation in accordance with ISO 8601
2002-07-26 16:50:34 +00:00
Stefan Esser 55c1b3d35b fixed cut & paste typo 2002-07-26 16:26:55 +00:00
Dan Kalowsky 9f3f613642 Adding initial support for PHP imap_get_quotaroot
# apparently c-client does not like Cyrus's GETQUOTAROOT return list this
# is still be worked out, but all functionality should be there
# Return array is still not very organized
2002-07-26 16:26:01 +00:00
Dan Kalowsky 0ccc2207bf (PHP imap_get_quota) updated to properly reflect the RFC 2087 as per
bug #14673
@- imap_get_quota now allows multiple resource values to be returned, as
   per RFC 2087, closes bug #14673 (kalowsky, Sander Steffann)
2002-07-26 16:22:43 +00:00
Sascha Schumann 8fd3f14ab1 Fix segfault due to unchecked null pointer 2002-07-26 16:16:12 +00:00
Tomas V.V.Cox bf2a898a5f In theory this will fix a problem in Window trying to delete a not closed
file

#if so, other fixes like that may be needed
2002-07-26 15:39:16 +00:00
Marcus Boerger b0b2226352 reapply patch for imageellipse beeing wrappet to imagearc if missing
# derick: the rest of the patch wasn't removed
2002-07-26 13:24:45 +00:00
Stefan Esser c9676ccad7 @- FTP extension does support (auto)resuming now.
Added (Auto)Resuming functionality to ftp_(f)get/(f)put via optional 5th parameter.
2002-07-26 13:03:08 +00:00
Tomas V.V.Cox 9aca197515 use -d output_buffer=0 to workarround the PHP flush() problem 2002-07-26 11:58:10 +00:00
Tomas V.V.Cox fedba5422c download package if force is set 2002-07-26 11:48:55 +00:00
Tomas V.V.Cox 6b08fd5f9c revert my change from PHP_BINDIR to bin_dir 2002-07-26 11:12:44 +00:00
Tomas V.V.Cox 377b106172 Use install-as attrib for pear.bat too, so it gets installed in @bin_dir@ 2002-07-26 11:02:41 +00:00
Tomas V.V.Cox 7bf6b4ccee Use script arg separator '--'
Clean up unused stuff
2002-07-26 10:48:20 +00:00
Andi Gutmans 41e3f4f0c3 - Fix problem with debug_backtrace() reported by Stig. We weren't reporting
- global function information because it wasn't available. We have to do
- an additional assignment per-function call so that it'll be available.
- Also don't define the global scope as function name _main_ but leave it
- empty so that frameworks like Pear can decide what they want to do.
2002-07-26 10:38:25 +00:00
Tomas V.V.Cox 8d73650be2 Use DIRECTORY_SEPARATOR instead of hardcoded '/' 2002-07-26 10:32:01 +00:00
Tomas V.V.Cox edfb9d44e4 Workarround to the empty $_ENV 2002-07-26 10:18:28 +00:00
Tomas V.V.Cox 6eed1b0243 use $GLOBALS['HTTP_SERVER_VARS'] instead 2002-07-26 10:11:01 +00:00
Tomas V.V.Cox 1690154e62 Silence NOTICE 2002-07-26 10:01:28 +00:00
Stefan Esser 02e6cd022a all functions based on php_stat are now safe mode aware... 2002-07-26 08:04:42 +00:00
foobar a0aa59e738 When Britney learns to sing, I will quit this.. 2002-07-26 01:14:20 +00:00
5780ca663f NEWS update 2002-07-26 00:19:00 +00:00
e7bd50a5e6 ChangeLog update 2002-07-26 00:18:24 +00:00
foobar c4789feffa Fixed 3 major failures in this test:
1. Tests work better when they are actually run..
  2. When file is opened, it should be closed sometime too.
  3. AC_TRY_RUN cleans after itself (rm -f conftest.*), so it's
     good idea to read the values while the file still exists.

#
# James, TEST BEFORE YOU COMMIT!!!!!!!
#
# Andi, I get these results (in Linux/i386):
#
#  ZEND_MM_ALIGNMENT      4
#  ZEND_MM_ALIGNMENT_LOG2 2
#
# Weren't these supposed to be 8 and 3 ?
#
2002-07-25 23:55:06 +00:00
foobar 272913f3d4 - Fixed bug: #18560, the macro was not defined always. 2002-07-25 18:37:16 +00:00
foobar 2dbd41869c Allow setting post_max_size and upload_max_filesize in .htaccess files too 2002-07-25 17:31:34 +00:00
foobar df3ae7ca85 Fixed bug: #18561. 2002-07-25 11:33:21 +00:00
Derick Rethans b7cc9f7447 - Added parameter to print_r which returns the variable representation
instead of echoing it.
@- Added parameter to print_r which returns the variable representation
@  instead of echoing it. (Derick)
2002-07-25 11:22:20 +00:00
Stefan Esser 3e05678842 do not dtor empty elements 2002-07-25 09:33:26 +00:00
Marcus Boerger 4a8dd1255f -handling of thumbnails in sub IFDs (the Photoshopway for TIFF)
-Some Photoshop specific tags
#after the last patches this finally fixes all warnings and errors in bug #18405
2002-07-25 00:52:30 +00:00
e09f789c14 ChangeLog update 2002-07-25 00:18:55 +00:00
Andi Gutmans a38038a4a0 - Fix some compile problems with the new configure checks. 2002-07-24 18:53:19 +00:00
James Cox 5626fc5a39 move testing for the alignment values into configure. 2002-07-24 17:04:11 +00:00
Stefan Esser 5b3ee5f27a break out if there is no data to work on. 2002-07-24 11:25:36 +00:00
Yasuo Ohgaki 7b3fb771e4 is_object() returns FALSE if object is a "incomplete object".
Raise E_NOTICE, instead of E_ERROR, for setting/getting properties
to/from a "incomplete object".
2002-07-24 09:55:11 +00:00
Uwe Steinmann 7df5113ef2 - removed unused variable 2002-07-24 05:59:04 +00:00
James Cox 79ef1c1661 ws fixes. 2002-07-24 00:50:04 +00:00
6b08ac665b ChangeLog update 2002-07-24 00:18:45 +00:00
Marcus Boerger 837fa41da5 -naming convention
-better notices
-(D)WORD are unsigned datatypes
-started to split tygs into different arrays that would allow to handle vendor specific tags after detection of their markers
#BUT simply i do not have any vendor specific image tags...
2002-07-24 00:05:41 +00:00
jim winstead e83a35d215 restore shane to list of members of php group (got lost somewhere along the way) 2002-07-23 23:46:54 +00:00
Andi Gutmans b291dfad3d - Fix WS. 2002-07-23 19:29:02 +00:00
Holger Zimmermann 2771e6d4f6 Removed some outdated lines from init_request_info(). 2002-07-23 17:12:54 +00:00
Sascha Schumann df3589cf88 Add autom4te.cache 2002-07-23 13:50:04 +00:00
Sascha Schumann 3f9ea879ae Remove \r 2002-07-23 13:45:49 +00:00
Edin Kadribasic 35cd16f6bf MFB (patch by Troels Arvin <troels@arvin.dk>).
Added pcre include path to global list of includes in order to allow
use of external pcre libs.
2002-07-23 13:07:29 +00:00
foobar 6a088a2e3c Fix bug: #18308. (uname -a sometimes has extra linefeeds) 2002-07-23 01:58:52 +00:00
foobar 2fcd502522 This should fix those solaris+gcc bugs when --enable-libgcc is not used 2002-07-23 01:58:02 +00:00
foobar 3177f1ca2a Fix bug: #18479. Better error message what was not found. 2002-07-23 01:11:16 +00:00
17e56389ca ChangeLog update 2002-07-23 00:18:02 +00:00
foobar bbbd435124 <insert funny comment here> 2002-07-23 00:08:29 +00:00
James Moore c5bb611c0c Added news item about bug 13866 in response to bug 14752 2002-07-22 19:06:49 +00:00
Jason Greene a64eceef59 Switch streams socket abstraction to use a timeval structure instead of an
integer to allow subsecond timeouts.

This supports the previous behavior of fsockopen()
Fixes bug #16261
2002-07-22 18:46:26 +00:00
Marcus Boerger 469266e4a2 added some more tags from WinXP
changed conersion for TAG_FMT_SBYTE & BYTE
#second change fixes unnecessary conversion timeout
#found by Johan Hultgren <johan@6thgear.se>
2002-07-22 15:07:12 +00:00
Tomas V.V.Cox 995073391e By the moment trust that the dependencies are good
# Will change the installer when finish the dependecy stuff
2002-07-22 12:03:43 +00:00
Marcus Boerger b4c3a0f06e added EXIF Version 2.2 Tags 2002-07-22 11:36:17 +00:00
Tomas V.V.Cox 0ee432cbd5 Bundle Net_socket, needed for Net_SMTP 2002-07-22 11:29:05 +00:00
foobar 2701726cf8 Fix typo.. 2002-07-22 08:58:21 +00:00
Georg Richter d911e50250 new mysql-functions for PHP 4.3.0 2002-07-22 07:50:51 +00:00
Yasuo Ohgaki 882f83cf81 Copy empty_string, fixed crash.
# I thought efree() won't free empty_string...
2002-07-22 06:38:36 +00:00
da3abfc27e NEWS update 2002-07-22 00:20:40 +00:00
435c2611fd ChangeLog update 2002-07-22 00:19:47 +00:00
Marcus Boerger 21da93abe1 unify error messages & notices
# this fixes exif again since it was broken by message unify
2002-07-21 22:38:23 +00:00
Georg Richter cbcdae7002 removed changes for mysql_select_db (optional parameter)
Why:
1) Its not the common way to add additionally functionality for functions or
features which are already implemented in SQL. Therefore also a lot of
mysql functions are marked as deprecated (and will be removed in near future)

2) The implemented workaround works only when mysql_select_db was called
before (fetching the databasename from mysql->conn.db). It returns invalid
or inconsistent results e.g.:

- when "USE databasename" via mysql_query was used
- when database was dropped or grant privileges had changed.

In conjunction with persistent connection, there are also some inconsistencies,
cause mysql_select_db returns the databasename from an old connection.

To determine the database name just use the SQL command "SELECT DATABASE()"
2002-07-21 21:36:10 +00:00
Georg Richter 96276bf8a0 fixed bug in mysql_real_escape_string:
allocated 1 more byte for '\0' terminating character
2002-07-21 20:16:03 +00:00
Andi Gutmans 8dd639ce22 - Fix bug reported by Sebastian where old constructors didn't work in
- nested classes.
2002-07-21 18:50:10 +00:00
Stig Bakken 27ac6946ad * yeah yeah 2002-07-21 16:17:18 +00:00
Stig Bakken 2b7461f585 * split #3 into two paragraphs again, like the Apache license we once
borrowed it from
2002-07-21 16:16:36 +00:00
Marko Karppinen b231fc0d35 Made PHP_ADD_LIBPATH use the $ld_runpath_switch and changed the Darwin
link lines in sapi/cli and sapi/cgi to use $NATIVE_RPATHS.
This is a tentative fix for #18450.
2002-07-21 14:42:01 +00:00
Sascha Schumann 2247d61e17 Move autoconf-2.13 check into buildcheck.sh where we already have
version parsing code and (more importantly) proper error checking
for missing autoconf.
2002-07-21 13:09:07 +00:00
Sascha Schumann 71e7b5cc99 One should not ignore
AC_PROG_CPP was called before AC_PROG_CC

because this error caused the Solaris issue
2002-07-21 12:54:06 +00:00
Stig Bakken f911cd5051 * bundle these releases 2002-07-21 07:40:18 +00:00
Stig Bakken 80b66c1567 * moved to /pear cvs 2002-07-21 07:38:15 +00:00
Yasuo Ohgaki 36e80ddc15 Added pg_fetch_all() that fetch all rows in result.
Useful and faster when there is enough memory.
@Added pg_fetch_all() that fetch all rows in result. (Yasuo)
2002-07-21 07:25:10 +00:00
Stig Bakken 5c770ace4f * already moved to /pear 2002-07-21 07:19:11 +00:00
Stig Bakken 783410e2bd * support "zend" dependency type 2002-07-21 07:18:49 +00:00
Stig Bakken 03b1160173 * moved to /pear cvs 2002-07-21 07:15:31 +00:00
Stig Bakken ca277b7a88 * added missing license element
* added "zend" dependency type
2002-07-21 07:06:56 +00:00
Stig Bakken f246ef4239 * always enable track_errors
* added throwError method (simpler version of raiseError)
2002-07-21 07:04:45 +00:00
Stig Bakken c02cb64be7 * license out of "alpha" 2002-07-21 06:53:17 +00:00
Stig Bakken d0f2e617ce * fixed some errors in package.xml 2002-07-21 06:35:55 +00:00
3ce3d54e43 ChangeLog update 2002-07-21 00:19:29 +00:00
James Cox aa84623d25 proper patch to cvsclean for bad autoconf. 2002-07-20 16:40:14 +00:00
foobar 7a5ac7cc9c I love rock'n'roll...laalalaa (britney sucks) 2002-07-20 15:17:51 +00:00
Sascha Schumann c2cc85d716 reverse bad patch
james, when you send me email about your patch which does not work,
why don't you wait for a reply first before committing the non-working
stuff?
2002-07-20 14:33:09 +00:00
Yasuo Ohgaki 78a2781936 Fixed php_pgsql_convert's bool type handling. 2002-07-20 07:45:01 +00:00
Yasuo Ohgaki 0b7f2da4cf Hmm. My PostgreSQL returns "bool" for boolean now. 2002-07-20 07:24:15 +00:00
Yasuo Ohgaki 06c969e68a Fixed convetion when null string is passed to php_pgsql_convert() 2002-07-20 07:08:17 +00:00
Yasuo Ohgaki c0306424fa Fixed crash. 2002-07-20 06:45:35 +00:00
James Cox dd16444849 more work for buildconf. forces a cvsclean if using a bad am. more ZE/zE2 tests. 2002-07-20 04:02:44 +00:00
Sascha Schumann aef27e37e1 Improve/fix handling of --disable-rpath
Might or might not fix #18374
2002-07-20 01:28:56 +00:00
61e5e9a93d NEWS update 2002-07-20 00:19:08 +00:00
5254ef8b05 ChangeLog update 2002-07-20 00:18:04 +00:00
Jason Greene 217ef0d115 Fix feof() on win32
Bug #18436
2002-07-19 20:34:35 +00:00
foobar 887e1ffe57 ws fix 2002-07-19 16:22:36 +00:00
Harald Radi cbe4f69663 - added a skeleton for new layers
- a bit cleanup
2002-07-19 16:19:00 +00:00
Yasuo Ohgaki fd428a4882 This option should be left enabled by default by mistake.
--enable-trans-sid option is removed and this option should
be disabled by default in php.ini.

1) It's insecure by nature
2) It may not work well always
3) It wasn't enabled by default used be
4) It risks security and user should enable it after realizing
   it's security risks.
2002-07-19 09:45:07 +00:00
Derick Rethans 70a5d29ece Unify error messages 2002-07-19 09:21:29 +00:00
Derick Rethans 2390cdafcf Unify error messages 2002-07-19 08:36:43 +00:00
Derick Rethans 7409f1cfd4 Unify error messages 2002-07-19 07:18:16 +00:00
eb14d0f8e7 ChangeLog update 2002-07-19 00:18:47 +00:00
Harald Radi c83f78dc96 ext/rpc/com should work now, but there's still lots of work left. 2002-07-18 18:31:37 +00:00
Derick Rethans 0650a59aea - MFZE1 - MacOSX fixes by Marko Karppinen 2002-07-18 11:16:34 +00:00
Yasuo Ohgaki 658503f6ee Move down open_basedir description. 2002-07-18 01:36:17 +00:00
ef8aad81e7 NEWS update 2002-07-18 00:20:49 +00:00
fb3f1709e8 ChangeLog update 2002-07-18 00:19:37 +00:00
Dan Helfman 2d695778e8 removing tclink extension so it can be moved to pear/pecl 2002-07-17 22:53:43 +00:00
Dan Helfman ee250fb4d6 new credit card processing module for TrustCommerce
http://trustcommerce.com/tclink.html
2002-07-17 22:07:05 +00:00
foobar 60ad61def7 We have a macro for checking -R, etc. switches. (exactly same code) 2002-07-17 21:56:40 +00:00
Andrei Zmievski 8e71a98cc9 Fix DL entry point. 2002-07-17 19:27:36 +00:00
Andi Gutmans 0355dc5504 - Remove code which wasn't supposed to go into the patch. 2002-07-17 18:39:26 +00:00
Andi Gutmans 9c52e883f0 - Rejuggle some code. 2002-07-17 18:36:29 +00:00
foobar a85f813b6c Remove evil quotes 2002-07-17 17:28:57 +00:00
Christian Stocker 2ba020d012 even more items on the TODO list 2002-07-17 08:59:05 +00:00
Christian Stocker bb069a1ccb nodename is not always set, check if it really is. 2002-07-17 08:57:29 +00:00
Hartmut Holzgraefe 40007c2049 Zend Engine behaviour is affected by setlocale() due to use of
locale aware functions like strtod(), atof(), tolower(), toupper() :(
2002-07-17 08:49:26 +00:00
Derick Rethans 9ae8c39bab - set_time_limit() now returns whether it succeeded in changing the time
limit.
2002-07-17 08:06:43 +00:00
Yasuo Ohgaki ba670fb19d Fixed build. 2002-07-17 07:50:32 +00:00
foobar e20b22fbc3 unbreak the shared build..again 2002-07-17 06:01:37 +00:00
Yasuo Ohgaki f4f8726b9e Accoding to safe_mode.h, php_checkuid() has six modes. 2002-07-17 05:15:17 +00:00
Yasuo Ohgaki a6384b3685 Added safe_mode & open_basedir checks for pg_lo_export()
@Added safe_mode & open_basedir checks for pg_lo_export() (Yasuo)
2002-07-17 05:01:58 +00:00
Yasuo Ohgaki 166ace3fa9 Added open_basedir check.
@ Added open_basedir check for pg_lo_import() (Yasuo)
2002-07-17 04:58:58 +00:00
Yasuo Ohgaki 02bc91f0bc Fixed open_basedir note - thanks to Sander. I also notice I have to modify pg_lo_import(), etc. It does not check open_basedir at all. It checks UID/GID, though. We are better to note how we should treat files in coding standard. 2002-07-17 04:20:37 +00:00
foobar ff012991f8 This was mentioned already above (with an example too :) 2002-07-17 03:46:55 +00:00
d6f74aeca8 NEWS update 2002-07-17 00:20:24 +00:00
8505e6ec1e ChangeLog update 2002-07-17 00:19:37 +00:00
Yasuo Ohgaki 7eecae7527 Changed configure option order to make it clear option dependecy to users. 2002-07-17 00:17:43 +00:00
Yasuo Ohgaki dc794edb1a Disable input encoding tranlation by default. 2002-07-17 00:11:32 +00:00
Yasuo Ohgaki ccc04b7096 Added note for open_basedir 2002-07-17 00:09:09 +00:00
foobar 390622df01 This is the real world.. 2002-07-16 19:47:51 +00:00
foobar dcb0523894 fix protos 2002-07-16 19:26:23 +00:00
Andi Gutmans 852f4f2c29 - Before I forget to list it, this was also added. 2002-07-16 19:16:53 +00:00
Andi Gutmans 3be1dd468e - Syntactic sugar - Add "public" as a synonym for "var".
- Now we have the three P's.
You can do:

<?
	class MyClass {
		public $a;
		private $b;
		protected $c;
	}

?>
2002-07-16 19:11:14 +00:00
Sascha Schumann 1326c95b29 refine 2002-07-16 16:24:15 +00:00
Georg Richter 6f2ad6b68b added mysql changes:
- php.ini option mysql.connect_timeout
- optional parameter client_flags (mysql_connect, mysql_pconnect)
- automatic rollback for non commited transactions
2002-07-16 14:31:55 +00:00
Jason Greene 9b68acb7f7 @Fixed infinite recursion crash bug in ticks (Jason)
Prevent reenterant calls to a user tick function by flagging the function
entry during call.

This prevents code like the following from infinitely recursing until a
crash occurs:
<?php

register_tick_function(a);

declare(ticks=1) {
	function a() {
		print "blah\n";
	}
	;
	;
	;
	;
}
?>
2002-07-16 14:14:22 +00:00
Georg Richter 950a576f73 Added support for php.ini parameter "mysql.connect_timeout" 2002-07-16 13:53:54 +00:00
Georg Richter ab863dee30 Added php.ini option "mysql_connection.timeout" 2002-07-16 13:52:23 +00:00
449327f57c ChangeLog update 2002-07-16 00:18:24 +00:00
Derick Rethans c652c4b512 - MFH of the crap removal 2002-07-15 18:11:04 +00:00
Andi Gutmans bc5ea87e28 - Commit patch to support protected member variables (by Timm Friebe w/
- some fixes by me).
- You can't access protected variables from outside the object. If you want
- to see a protected member from your ancestors you need to declare the
- member as protected in the class you want to use it in. You can't
- redeclare a protected variable as private nor the other way around.
2002-07-15 18:09:56 +00:00
Edin Kadribasic 50ca75a0f6 Fix bug #16985 (wrong count of GET/POST variables). 2002-07-15 17:48:54 +00:00
Stefan Esser 11ac4e035c use Zend API to access llist count 2002-07-15 16:37:15 +00:00
Anantha Kesari H Y 44bbec7acb mysql_create_db and mysql_drop_db disabled for NetWare 2002-07-15 11:14:18 +00:00
Yasuo Ohgaki a1f37648b3 Clean up code a little (Remove a use of magic number)
Change/add appropriate comments.
2002-07-15 10:04:01 +00:00
Andi Gutmans f7d9b9f1ae - Really implement bool increment/decrement as flip-flop. 2002-07-15 04:11:13 +00:00
Yasuo Ohgaki cb1c98762e Fixed news 2002-07-15 00:37:53 +00:00
Yasuo Ohgaki 160b74519f header sounds like http header. header -> header file 2002-07-15 00:35:46 +00:00
d399c486aa NEWS update 2002-07-15 00:22:42 +00:00
2fba341e07 ChangeLog update 2002-07-15 00:21:10 +00:00
Shane Caraveo 59e1b8e1c2 make this work with wsdl also 2002-07-14 22:57:53 +00:00
Andrei Zmievski 3650bab76f Fix Bug #18341.
@- Fixed cases where preg_split() incorrectly terminated final element if
@  it contained null byte. (Andrei)
2002-07-14 22:36:47 +00:00
Shane Caraveo da1a01ee93 a few fixes
fix __isfault
fix decimal encoding
fix a couple crashers in release builds by initializing variables
set http to 1.0 since 1.1 features are not really supported
2002-07-14 22:16:21 +00:00
Shane Caraveo eaf442b97f A start towards porting interop tests to php-soap 2002-07-14 22:14:38 +00:00
Andi Gutmans 7b68f5108a - Nuke delete(). It was a big mistake to introduce it and I finally
- understand why Java didn't do so.
- If you still want to control destruction of your object then either make
- sure you kill all references or create a destruction method which you
- call yourself.
2002-07-14 19:23:18 +00:00
Sascha Schumann cda0987153 it is not really cold though 2002-07-14 18:30:11 +00:00
Andi Gutmans 35e8d8139e - Nuke some unused code 2002-07-14 18:17:07 +00:00
Sascha Schumann b6aeeaea20 the sun was shining a few days ago 2002-07-14 18:15:08 +00:00
Sascha Schumann fa3d840cd1 integrate the public keep-alive patch
the patch did not handle pipeling at all, so that some code had to be added
from Premium thttpd

persistent connections are supported, if a script sets the Content-Length
header
2002-07-14 18:01:08 +00:00
Rasmus Lerdorf 6d992a9f0d Fix a couple of protos 2002-07-14 15:45:33 +00:00
Sascha Schumann b4c28fba7f thttpd blocks in rare circumstances where it cannot write out a small HTTP
response (happened at customer sites).  The response is now written out
using the standard state machine.

the buffer which is handed to thttpd by php is now simply dealt with as if
it were a thttpd generated response (avoids code duplication).
2002-07-14 13:48:46 +00:00
Sascha Schumann 402cc031cd make the sapi module hand off a buffer to thttpd for final data delivery,
instead of blocking the whole process
2002-07-14 13:10:34 +00:00
Derick Rethans 207845410b MFZE1 2002-07-14 11:48:45 +00:00
Derick Rethans dcd67e0b14 - MFZE1 2002-07-14 09:37:42 +00:00
Derick Rethans 643f21e840 - MFZE1 2002-07-14 09:29:42 +00:00
Yasuo Ohgaki 52f1ae5ac5 Move comment.
Remove a skip condition does not required.
2002-07-14 01:12:23 +00:00
foobar 02d3e99bf2 IF --disable-mbstr-enc-trans is used OR mbstring is compiled as shared
extension, these functions are not available.
2002-07-14 00:27:52 +00:00
f9710231fa ChangeLog update 2002-07-14 00:17:41 +00:00
foobar 7259893862 These options are all enabled by default. (why?) 2002-07-14 00:12:13 +00:00
foobar b87ac98701 These options are all enabled by default. (why?) 2002-07-14 00:11:44 +00:00
Yasuo Ohgaki 3639807a81 Fix tests. Moriyoshi Koizumi <readjust@deneb.freemail.ne.jp> 2002-07-14 00:08:22 +00:00
Sander Roobol 99b495b25d Fixed win32 build 2002-07-13 09:26:36 +00:00
foobar 7892e41645 Kill compiler warning 2002-07-13 08:42:38 +00:00
foobar 7e8aa50fe0 Fix SKIPs for these tests. 2002-07-13 08:08:36 +00:00
foobar f059932711 nuke unused variable warning 2002-07-13 07:10:59 +00:00
foobar efd065ff78 Fixed some unused variable warnings 2002-07-13 05:53:06 +00:00
foobar 0ace7f66f3 Nuke unused variable 2002-07-13 05:42:47 +00:00
foobar 3624b97ff1 Kill compile warning 2002-07-13 05:42:01 +00:00
foobar 71b0e91bad Really fix it this time.. 2002-07-13 05:01:55 +00:00
foobar e3797ab76a Fixed bug: #16638. 2002-07-13 04:45:21 +00:00
foobar 6a42e635ca Needed this to be able to test safe-mode stuff on cmd-line 2002-07-13 04:43:12 +00:00
foobar 2f8dc7a47c - Made the trim functions use same base function. (less code :)
- Renamed php_trim2 -> php_trim (not used anyplace else, yet)
- Made php_trim abit more usable for external use. (not necessary to use
  zvals with it anymore)
2002-07-13 04:13:43 +00:00
foobar 1e48f66729 Fixed the undefined reference to 'gdttf' errors when using bundled GD lib.
# I removed that in the first place..don't remember why. :(
2002-07-13 04:06:26 +00:00
Yasuo Ohgaki 4994b58c0b Fixed tests. Patch by Yoshimori Koizumi <readjust@deneb.freemail.ne.jp> 2002-07-13 01:05:13 +00:00
foobar 6f10116237 Fix bug: #18285, php_checkuid() mangled the passed path. 2002-07-13 00:52:18 +00:00
3bda0b40c2 ChangeLog update 2002-07-13 00:16:42 +00:00
foobar c7a68b78a7 - Fixed bug: #18268. If pcre is build as shared extension, we can't use
php_pcre_replace() here.
- Cleaned up a bit.
2002-07-13 00:15:22 +00:00
foobar 5d001a9ab6 Partially reverted the netware related commit. 2002-07-12 23:25:30 +00:00
foobar 20a735db2c Beauify a bit.. 2002-07-12 22:59:35 +00:00
foobar 21245bcbeb Some ws fixes. And removed the problems causing typedef for ushort. 2002-07-12 22:57:19 +00:00
foobar 48634e4026 - Fixed compile (bug #18297) on such systems which define uchar. 2002-07-12 22:34:43 +00:00
foobar 7b0b6d0b8c Bail out the given path does not have the libraries in it. 2002-07-12 22:11:54 +00:00
foobar 36fbe5c933 Fixed bug: #18295. e_os.h is not supposed to be included.. 2002-07-12 21:46:36 +00:00
Anantha Kesari H Y b6cc6a2376 File needed to build extensions for NetWare 2002-07-12 13:02:45 +00:00
Anantha Kesari H Y 2af885d467 Added NetWare changes 2002-07-12 12:55:56 +00:00
foobar 93f9acbffa Make configure stop if something is wrong with libraries/linking. 2002-07-12 12:13:45 +00:00
foobar ceadbe0e99 Fix ZTS build 2002-07-12 11:45:05 +00:00
Sebastian Bergmann bec1633335 Remove unused variables. 2002-07-12 04:57:14 +00:00
foobar 1b6e2cb0db missing entry for config.h.in 2002-07-12 04:41:48 +00:00
foobar 0dbd55581c .libs/ directories are created when building shared extensions. 2002-07-12 04:41:26 +00:00
foobar a96f15628c minor typo fixbug. 2002-07-12 02:37:48 +00:00
foobar ed58d3a235 - Added predefined constants for the upload errors.
- Removed the debugging error (not useful for end-users)
2002-07-12 01:49:58 +00:00
87e0a4baf5 NEWS update 2002-07-12 00:18:23 +00:00
bdf73348e2 ChangeLog update 2002-07-12 00:17:37 +00:00
foobar c334894a2b ws fix 2002-07-11 20:29:53 +00:00
Derick Rethans 6819ee3624 - Fix for bug #18283
#- It doesn't work from within a script anyways
2002-07-11 19:38:08 +00:00
Rui Hirokawa 555ca8eedd added mbstring.language option in ext/mbstring. 2002-07-11 15:45:35 +00:00
Tomas V.V.Cox 20ed142597 typo 2002-07-11 15:39:57 +00:00
Tomas V.V.Cox cefe27a480 Prepare package.xml for Net_SMTP 2002-07-11 15:36:48 +00:00
Sascha Schumann 6d643eb035 Break up the INSTALL_IT line into comprehensible pieces
and fix a bug related to [..] quotes.
2002-07-11 14:41:03 +00:00
Sascha Schumann 808f05c205 the variable interpolation was already subject to IFS treatment,
which resulted in the execution of the foremost directory.

we capture the output before setting IFS now
2002-07-11 13:33:22 +00:00
Adam Dickmeiss 6c19790778 yaz.max_links, yaz_log_file setting. User-defined Other Info 2002-07-11 13:04:03 +00:00
Adam Dickmeiss 377f5cfb13 Include YAZ support libs (if any) 2002-07-11 13:02:52 +00:00
Sascha Schumann ee619493b3 Use a simple IFS; set step to interprete the httpd -v output 2002-07-11 08:44:42 +00:00
Uwe Steinmann ecba0709e6 - added missing file 2002-07-11 06:35:28 +00:00
James Cox a234c521b9 adding patch from http://www.coupin.net/gd-freetype/ which makes images anti aliased (and therefore more readable).
#this does actually work.
2002-07-11 04:36:22 +00:00
Yasuo Ohgaki f3f3f76209 Added traslit test files. Moriyoshi Koizumi <readjust@deneb.freemail.ne.jp> 2002-07-11 03:44:12 +00:00
Yasuo Ohgaki 2e77bb3072 Fix #16069. Patch by Moriyoshi Koizumi <readjust@deneb.freemail.ne.jp>
@ Made iconv() work well with libiconv or libgconv. (Moriyoshi, Yasuo)
2002-07-11 03:37:28 +00:00
foobar 4d69e91806 Fix bug: #14052 2002-07-11 02:48:00 +00:00
foobar c8f5edec93 Fixed bug: #16637, username/password needs to be urlencoded. 2002-07-11 02:35:45 +00:00
foobar 0790c58f96 Fixed bug: #18250 2002-07-11 02:31:38 +00:00
foobar a17d934957 news-entry-robot(tm) 2002-07-11 00:57:28 +00:00
fa1bafe9a9 NEWS update 2002-07-11 00:19:46 +00:00
538880b14f ChangeLog update 2002-07-11 00:18:34 +00:00
Harald Radi 77f1d265be merging parts of the old com extension to the new rpc extension 2002-07-10 20:27:17 +00:00
Jason Greene d907b2d525 @Fixed socket_set_timeout on win32 (Jason, Edin, Jani) 2002-07-10 15:23:47 +00:00
Georg Richter 05007b0cbb 1) New constants:
MYSQL_CLIENT_SSL for ssl connections
MYSQL_CLIENT_COMPRESS for compressed protocol
MYSQL_CLIENT_IGNORE_SPACES for spaces after function names
MYSQL_CLIENT_INTERACTIVE for closing connections after timeout_interactive seconds

2) Optional parameter client_flags for mysql_connect and mysql_pconnect
For parameter desctiption see 1.
This also should fix bug #13589

3) New internal function _rollback_mysql_transactions, which is called via
PHP_RSHUTDOWN_FUNCTION
This fixes bug #12513
2002-07-10 13:16:24 +00:00
Stig Bakken b627e6e413 * signed these packages 2002-07-10 07:18:12 +00:00
82e8216ac7 ChangeLog update 2002-07-10 00:18:30 +00:00
Derick Rethans 2855b21e1c - Initialize var properly 2002-07-09 21:42:07 +00:00
Stig Venaas 910e6275d4 Hopefully fixes build with IBM's LDAP library 2002-07-09 20:54:49 +00:00
Harald Radi d90ca98223 add file again that andrei deleted by
accident (i don't want to blame anyone here)
2002-07-09 20:32:05 +00:00
Stig Bakken 0d6a49f48e * add HTTP package (signed) 2002-07-09 11:24:29 +00:00
Stig Bakken 5aab8b2b8b * tolerate $args being empty 2002-07-09 10:52:25 +00:00
Stig Bakken d90cada542 * tiniest optimization 2002-07-09 10:52:04 +00:00
Stig Bakken 0a6d81b56e * typo 2002-07-09 10:51:41 +00:00
61e87a9f66 ChangeLog update 2002-07-09 00:17:06 +00:00
Sterling Hughes 31d5c44ea5 eek 2002-07-08 21:12:07 +00:00
Sterling Hughes c28f8fca08 commit petr's sax handler patch 2002-07-08 21:04:59 +00:00
Andi Gutmans c28df01280 - Add TSRMLS_DC to prototype. 2002-07-08 18:44:05 +00:00
Andi Gutmans b4146638f0 - Fix TSRMLS_* stuff 2002-07-08 18:29:54 +00:00
foobar 6162414fd6 news update 2002-07-08 18:09:43 +00:00
foobar df9fc2bb51 Fix shared build and made the logic of finding the socket location better. 2002-07-08 15:31:01 +00:00
Derick Rethans 728f2de442 Unify error messages 2002-07-08 12:52:22 +00:00
Derick Rethans bd356fd0b9 Unify error messages 2002-07-08 11:52:57 +00:00
Derick Rethans fca0231206 - Add warning to is_*() functions if more than one argument was passed 2002-07-08 11:50:01 +00:00
Derick Rethans 392a452c80 Silence warning 2002-07-08 07:33:22 +00:00
Derick Rethans cc920570fd Unify error messages 2002-07-08 07:32:59 +00:00
Derick Rethans 7faa669915 - Fix for bug #14580: Made key() binary safe 2002-07-08 07:02:55 +00:00
foobar 2afacbf1cf These two can not be set in script. (so that they would have any effect) 2002-07-08 06:51:41 +00:00
Shane Caraveo a51e6a9400 a little more whitespace fix 2002-07-08 01:32:34 +00:00
Shane Caraveo ec3b1f1feb fix the line ending problems in the files 2002-07-08 01:23:06 +00:00
ab0eafc24b NEWS update 2002-07-08 00:17:28 +00:00
8e7219e123 ChangeLog update 2002-07-08 00:17:06 +00:00
Shane Caraveo f8875adaab import php-soap library from sourceforge 2002-07-07 23:03:43 +00:00
Sterling Hughes a6d815fb7c fix win32 build 2002-07-07 21:51:25 +00:00
Stig Bakken b85f40f079 * added "pear sign" command 2002-07-07 21:12:40 +00:00
Stig Bakken 24909111fc * use System::mktemp
* check if an install is about to overwrite existing files belonging
  to other packages, bail out if not in "force" mode
2002-07-07 21:10:29 +00:00
Stig Bakken 6e0745b57a * don't set include path if running 'pear.in' without substitutions
made by the installer
* sort command names in help output
2002-07-07 21:01:10 +00:00
Stig Bakken 81e5b17f91 * made rebuildFileMap method public, added caching and checkFileMap method 2002-07-07 20:48:54 +00:00
Shane Caraveo 8619108154 Let 'pear build' work on windows for building pecl extensions.
A few notes:
Currently only supports release builds, and of course, requires msdev!
pecl packages must have package.xml and xxx.dsp files for this to work
the package name in package.xml must match the name of the dsp file, so
package iisfunc must have dsp iisfunc.dsp
2002-07-07 20:47:57 +00:00
Stig Bakken 87f97ba5c9 * use System::mktemp rather than PEAR_Common::mkTempDir 2002-07-07 20:42:08 +00:00
Stig Bakken 38a56a51cc * silence warning 2002-07-07 20:41:20 +00:00
Andi Gutmans 1b5ac1386e - Path which should improve previous fix. 2002-07-07 19:59:37 +00:00
Andi Gutmans 4271895222 - First try at solving problem with different objects being allocated the
- same id.
2002-07-07 19:34:34 +00:00
Christian Stocker e5bcd202ce @ - Added domxml_node_namespace_uri() (Rui Lopes). 2002-07-07 17:19:29 +00:00
Jan Lehnardt afb93a20cb - fix #16290 2002-07-07 16:44:23 +00:00
foobar 2ca9ae687d - Fix the version check again. 2002-07-07 15:43:45 +00:00
foobar 9ba62685e1 cleanup 2002-07-07 14:09:48 +00:00
Stanislav Malyshev 0ed4f6d184 name length should be strlen+1 2002-07-07 13:06:58 +00:00
Sebastian Bergmann c9f1c9c19f Allow for 'class Namespace::Bar extends Foo' syntax. Patch by Timm Friebe <thekid@thekid.de>. 2002-07-07 08:22:23 +00:00
Sebastian Bergmann 72e7e4afd9 Fix warning. 2002-07-07 08:19:36 +00:00
Jason Greene 0cd2d8bd38 Remove sleep workaround, and fix the actual win32 memory leak which
was occurring in the error reporting system. The reason why sleepex appeared
to be working was because it suppressed EWOULDBLOCK errors in the example
(which was non-blocking)
@Fix win32 memory leak in /ext/sockets that would occur on any error condition
@Fix host resolution error messages on win32
2002-07-07 07:01:17 +00:00
foobar 5ea1e264ff ws fix 2002-07-07 00:55:51 +00:00
foobar d85eeba77c Fix the fix properly. 2002-07-07 00:54:38 +00:00
foobar b989395478 PHP_EVAL_LIBLINE must not reverse the order of libraries. 2002-07-07 00:47:16 +00:00
08f4a57cad ChangeLog update 2002-07-07 00:17:17 +00:00
foobar 7fe442f32b Added missing .libs entry 2002-07-06 23:57:30 +00:00
Andi Gutmans 677a9e8751 - Fix problem where scope was lost in nested function calls.
- Thanks to Timm Friebe for diving into this one.
2002-07-06 17:44:45 +00:00
Zeev Suraski 0ae66bd659 spelling fix 2002-07-06 16:48:13 +00:00
Christian Dickmann d04c8495d3 add local XMLRPC cache 2002-07-06 14:44:05 +00:00
Derick Rethans 7cdd6a6bb5 - Consistent error messages 2002-07-06 11:18:47 +00:00
e8c76f21ad ChangeLog update 2002-07-06 00:18:36 +00:00
foobar f56450ff14 Fix bug: #16707 2002-07-05 19:34:42 +00:00
Sascha Schumann e3e0dbf7b4 nuke another instance of newline suppression 2002-07-05 19:06:53 +00:00
foobar 6a83870c49 Fix typo 2002-07-05 18:32:08 +00:00
foobar 466208eafb Fix typo. 2002-07-05 18:16:31 +00:00
Rui Hirokawa ead78e9125 fixed shift_jis character corruption including 0x5c as second byte following a slash on uploaded filename. 2002-07-05 15:06:39 +00:00
Sascha Schumann 8366e6531a some seds want to see a newline, so we give them a newline
PR: #17072 and others
2002-07-05 06:42:31 +00:00
Sascha Schumann 30ed0ca993 Fix the Solaris issue where CPP was set wrongly to "cc -E", because
the AIX macro invoked the CPP check before the CC check, so that
autoconf did not know which $CC to use.

You can now close all those bug reports about unix.h and misdetected
headers.
2002-07-05 06:07:53 +00:00
Sascha Schumann af3871e44c Remove remainings of bsd_makefile 2002-07-05 06:02:19 +00:00
Dan Libby 2154e7b55b merged in updates from SF project. bring php repository up to date with xmlrpc-epi version 0.51 2002-07-05 04:43:55 +00:00
Stig Bakken eebae9f9ef * folding fixes 2002-07-05 02:34:54 +00:00
Stig Bakken 6b4707320d * define PEAR_ZE2 when running with Zend Engine 2 2002-07-05 01:52:09 +00:00
Stig Bakken c6ec881953 * fix segfault in case of odd version numbers 2002-07-05 01:00:05 +00:00
Stig Bakken 8b4a25ec13 (PHP version_compare) added "alpha" and "beta", make tests pass 2002-07-05 00:55:02 +00:00
0c4f0372e1 NEWS update 2002-07-05 00:18:30 +00:00
1cc956efee ChangeLog update 2002-07-05 00:17:42 +00:00
Sascha Schumann ad198758ed 1. PHP_CHECK_FUNC(func, lib1, lib2, ..., libn) searches for
func and __func using LIBS, and if unsuccessful, searches
   each specified lib.  Defines HAVE_FUNC, if found.  If func/__func is
   found in library foo, HAVE_LIBFOO is defined.

   (Jani, me)

2. Autoconf 2.5x is more pedantic regarding locating header files.
   We include the proper header files now in the check. (me)

3. The nsl/bind/socket/etc checks have been rewritten using PHP_CHECK_FUNC.
   This ensures that no extra library is used, if the symbol is
   available in libc which avoids issues on BSD/OS, OpenBSD and others.
   (Jani)
2002-07-04 21:07:08 +00:00
Martin Jansen 1b1d5da907 * Remove http:// from the proxy server string.
Patch by: "michiel bakker" <michiel_bakker@hotmail.com>
2002-07-04 20:28:56 +00:00
foobar b0ed560c95 @- Added optional 3rd parameter 'recursive' to ftp_rawlist() which will
@  do 'LIST -R' instead of 'LIST'. (Jani)
# tested too..and it even works. :)
# (removed that Z_TYPE_P() pollution also..)
2002-07-04 13:48:48 +00:00
Marko Karppinen a6eeec28b6 Moved the cgi link line to sapi/cgi/config.m4 and stopped
using libtool on Darwin on it
2002-07-04 08:39:11 +00:00
Sascha Schumann 8548b6390f Upgrade to the version shipped with automake-1.6.2 2002-07-04 08:21:32 +00:00
Sascha Schumann 2c3801b979 Generate content-type header, if the user did not specify one of its own.
Noticed by: Edin Kadribasic <edink@proventum.net>
2002-07-04 08:13:19 +00:00
b47ad58321 ChangeLog update 2002-07-04 00:17:56 +00:00
foobar bb0d7d6e31 - Let's be tad more verbose what's happening during 'make install' 2002-07-03 22:12:13 +00:00
Sebastian Bergmann 0e52055f70 Fix ZTS build. 2002-07-03 21:07:24 +00:00
Frank M. Kromann bda7548a00 Removed unneeded check for MBSTR_ENC_TRANS 2002-07-03 18:45:34 +00:00
Frank M. Kromann 720f4b8365 Added MBSTR_ENC_TRANS to allow compilation and linking under win32 2002-07-03 18:44:40 +00:00
Sascha Schumann ad8b4257a2 Please note that you need to use 'int' as a length type when
fetching strings.
2002-07-03 18:36:50 +00:00
Frank M. Kromann 9a743eef77 Adding _RU files to project 2002-07-03 18:24:14 +00:00
Frank M. Kromann 0818410f7c Fixing ZTS build 2002-07-03 18:23:55 +00:00
Frank M. Kromann fd348068f4 Adding missing prototype 2002-07-03 18:23:24 +00:00
Derick Rethans dfd8ea7147 - Fix README 2002-07-03 14:01:18 +00:00
Rui Hirokawa bb21c40738 fixed shift_jis character corruption including 0x5c as second byte on uploaded filename. 2002-07-03 13:36:19 +00:00
Sterling Hughes f7a5c05bb6 formatting fixes 2002-07-03 12:02:17 +00:00
Sterling Hughes 51e5a578b7 fix bug #17963 2002-07-03 11:50:00 +00:00
Sascha Schumann b3e562f9ef Add CRLF after complete HTTP reply header 2002-07-03 11:46:37 +00:00
Sascha Schumann 99cfb41da0 Use "Status: %d" instead of "HTTP/1.0 %d X" in the CGI SAPI module
as per the CGI RFC.

The status notation is incompatible with Apache's non-parsed-header mode
"nph-*", but that has never worked before anyway.  One could make the
format string configurable.

Noticed by: Sebastian Bergmann
2002-07-03 11:44:48 +00:00
Edin Kadribasic 9dcfbf41fa Fixed win32 build. 2002-07-03 10:54:42 +00:00
Sascha Schumann fee236fb80 fix typo 2002-07-03 10:47:16 +00:00
Sascha Schumann 9c876ea01a Add sapi_header_op interface which supersedes the sapi_add_header and _ex
calls.

Revert the change to the sapi_add_header_ex interface.

Fix various bugs:

1.  header("HTTP/1.0 306 foo");
    header("Location: absolute-uri");

    did not work in combination with several SAPI modules, because
    http_status_line was never properly reset.  And thus, all SAPI
    modules which looked at http_status_line ignored the changed
    http_response_code.

2.  The CGI SAPI did not send out the HTTP status line at all, if
    http_status_line had not been set explicitly by calling
    header("HTTP/1.0 200 foo");
2002-07-03 10:42:31 +00:00
Derick Rethans c73733c59a - Fix windows build
#- I could not test this, please try!
2002-07-03 06:45:01 +00:00
Uwe Steinmann 47b5b8da58 - fixed bug in hwnew_new_document_from_file 2002-07-03 06:10:29 +00:00
foobar 980d7a11a9 Fix the nasty crash. And Sterling..test next time before you commit? 2002-07-03 03:18:55 +00:00
foobar 29aae162e0 ws fix 2002-07-03 02:16:46 +00:00
0f8945edb5 NEWS update 2002-07-03 00:17:56 +00:00
db026cd876 ChangeLog update 2002-07-03 00:17:40 +00:00
Frank M. Kromann 8a7c339974 Add default arguments to new internal mail function. 2002-07-02 23:46:15 +00:00
Frank M. Kromann d305126002 Make sure To addresses are parsed correct with RFC822. 2002-07-02 23:45:32 +00:00
Frank M. Kromann e2c5462d91 Oops. Last commit reverted some of sebastians changes. 2002-07-02 23:44:06 +00:00
Marcus Boerger b634ec9e30 -fix datatypes for some vriables
-fix comment for function exif_process_CME
-force return parameters to be passed by reference
#this should kill warnings on win systems as found by Edin
2002-07-02 22:38:37 +00:00
Frank M. Kromann 57ec06677f Switch from imap_sendmail.* to sendmail.c under Win32 2002-07-02 22:29:13 +00:00
Frank M. Kromann a66cbb8e07 Fixing compilation of FrontBase extension with ZTS 2002-07-02 21:36:11 +00:00
Sterling Hughes d4512030bb use access instead of manually determining file permissions.. 2002-07-02 21:02:34 +00:00
Frank M. Kromann 407a0ec66a Switch from imap_sendmail.* to sendmail.c under Win32 2002-07-02 19:29:15 +00:00
Frank M. Kromann 1565e5d1bc These files are no longer needed as the imap module will use the standard sendmail function under Win32 2002-07-02 19:28:32 +00:00
Derick Rethans f7cab95a7d - Be nice to users and allow them to check if the mail was send 2002-07-02 14:22:22 +00:00
Derick Rethans 0d61ab3814 - Disable 5th parameter to mail in safemode
@- Disabled the fifth parameter to the mail function in safemode. (Derick)
2002-07-02 13:56:47 +00:00
Christian Dickmann a6783f8070 make 'remote-info' use package.info. add deps to 'list-all' 2002-07-02 13:04:01 +00:00
Sascha Schumann 03c034b6d6 Avoid error messages, if the variable is empty.
./config.status: test: !=: unary operator expected
2002-07-02 09:31:33 +00:00
Derick Rethans 7b7608d630 - Fix for bug #15547 (Patch by Justin Garrett <usjgarrett@byu.edu>) 2002-07-02 06:16:35 +00:00
7e921b42a4 ChangeLog update 2002-07-02 00:37:08 +00:00
Marko Karppinen 23de5d1c20 - You don't need libtool to build sapi/cli on Darwin.
- We don't need libtool to build sapi/cli on Darwin.
- You want the sapi/cli build line to be in sapi/cli, not Makefile.global.
- We want the sapi/cli build line to be in sapi/cli, not Makefile.global.
- He can go about his business.
- You can go about your business.
- Move along.
- Move along. Move along.
2002-07-01 21:17:39 +00:00
Derick Rethans d73eed9210 - No C++ comments 2002-07-01 18:52:30 +00:00
Marko Karppinen 7cd7c55148 In Darwin we have this thing called two-level namespace 2002-07-01 18:19:27 +00:00
Andi Gutmans 57b853c831 - Fix bug when acccessing $this not in class scope. 2002-07-01 15:13:39 +00:00
Christian Stocker e1483035b6 outcomment everything related to domxml_elem_set_attribute_node(). This
function is not implemented and shouldn't show up at all for the time
being
2002-07-01 14:48:38 +00:00
foobar 4b321b0430 Fix win32 build. 2002-07-01 09:00:00 +00:00
Andi Gutmans 4a52b98835 - Export zend_object_get_address() 2002-07-01 04:21:40 +00:00
James Cox 799cc612b4 "-" is not acceptable in a #define (i have since discovered). converting all - to _ is the right thing to do.
# should we issue a warning here too?
2002-07-01 01:01:06 +00:00
acac7af404 ChangeLog update 2002-07-01 00:24:52 +00:00
Andi Gutmans 4d1321afbc - Remember to document autoload when I have time. 2002-06-30 19:55:50 +00:00
Sander Roobol d325d07b1a Main script should not be parsed when (include|require)_once()'ed, #17720
# Derick, MFH?
2002-06-30 13:38:16 +00:00
Derick Rethans bf4e59449b - MFZE1 2002-06-30 11:18:43 +00:00
Derick Rethans 7115041c92 - More error messages cleanup 2002-06-30 11:14:27 +00:00
foobar 3c873776b8 Fix bug: #16252 2002-06-30 05:10:40 +00:00
foobar 905f56fd7d This does not work with AIX find.. 2002-06-30 04:26:05 +00:00
cfc2259d13 ChangeLog update 2002-06-30 00:22:49 +00:00
foobar e4e796064c - Upgrade bundled libtool to 1.4.2. Following stuff mentioned at:
http://www.gnu.org/software/libtool/news.html

  * Diagnose and warn about not-quite-working combinations of gcc and ld on Solaris.
  * Improved OpenBSD support.
  * Improved cygwin support.
  * Bugfixes.
2002-06-29 23:24:48 +00:00
Andi Gutmans f24cb9731c - Get ready for alpha2 2002-06-29 19:37:10 +00:00
Sascha Schumann 71a603ea32 Fix some 8bit issues with IRCG nickname encoding and
Change the underlying interface of smart_str to accept unsigned char.
2002-06-29 18:46:49 +00:00
Derick Rethans dc900d4f77 Unify error messages part 1 2002-06-29 17:40:28 +00:00
Andi Gutmans 401c26fb5e - Invalid -> Undefined 2002-06-29 16:01:40 +00:00
Derick Rethans 06ad4767e3 - Fix GD build with GD 1.8.3 2002-06-29 15:54:02 +00:00
Derick Rethans 1bf9b3d736 - Fix for bug #17654 2002-06-29 15:39:41 +00:00
Andi Gutmans 5f2fcdd689 - Add missing semi-colon. 2002-06-29 15:38:40 +00:00
Andi Gutmans ede84fa384 - Improve some error messages. 2002-06-29 15:30:27 +00:00
Andi Gutmans 20d02565df - Revert previous fix. 2002-06-29 11:24:11 +00:00
Thies C. Arntzen 5a0c283700 fix leak 2002-06-29 11:13:03 +00:00
Sergey Kartashoff 46079bc015 Search example (which demonstrates using of mnogosearch API) is updated. 2002-06-29 10:42:54 +00:00
Andi Gutmans 6116145f9f - Change E_ERROR -> E_COMPILE_ERROR where needed. 2002-06-29 08:42:17 +00:00
Andi Gutmans dd8df52223 - Fix for bug #17882. We complain if the same method is declared twice. 2002-06-29 08:38:24 +00:00
Andi Gutmans 6339bd5912 - Fix bug 15037
- Bump version to alpha2-dev
2002-06-29 07:35:41 +00:00
James Cox 8c49132266 fixes extensions with "-"
# thanks Rasmus for pointing out.
2002-06-29 02:34:36 +00:00
foobar 4a4abfa65d Fix some build error on win32 (snapshot build) 2002-06-29 02:12:42 +00:00
James Cox cd5fe093b3 make this build too. 2002-06-29 02:03:36 +00:00
James Cox 2ba3ae05bd removed these files from build. 2002-06-29 02:01:32 +00:00
James Cox 3ec40a8d32 really fix it.
# can anyone recommend an optician?
2002-06-29 01:58:07 +00:00
foobar 158370464a This is not done anymore. (should fix win32 snapshot build too) 2002-06-29 01:55:36 +00:00
James Cox 3ef1fe2b68 fixes bug #17453 2002-06-29 01:41:03 +00:00
foobar adade98519 - Fix the shared problem. (the previous patch really didn't fix anything) 2002-06-29 01:19:35 +00:00
foobar 0ffb2c25cf Missing TSRMLS_* stuff 2002-06-29 00:40:34 +00:00
foobar 999d9aa10f Better fix it here too.. 2002-06-29 00:33:02 +00:00
7e5b2f2165 ChangeLog update 2002-06-29 00:30:30 +00:00
Rasmus Lerdorf 03b76b278e Oops, extra pipe snuck in 2002-06-29 00:12:46 +00:00
Rasmus Lerdorf 02022179c9 Fix for bug #18055 2002-06-28 23:57:15 +00:00
Anil Madhavapeddy ed6b43582e remember the value of ext_shared passed into the --with-pdflib, since it
gets overwritten by future PHP_ARG_WITH checks in the same m4 fragment

from wilfried@openbsd.org
2002-06-28 16:47:36 +00:00
Andi Gutmans 1f6cadcd28 - WS fix 2002-06-28 15:30:03 +00:00
Sebastian Bergmann 836d9c3e9f Mention Apache 2.0.40. 2002-06-28 15:16:28 +00:00
Derick Rethans 0c8d24b53a - More gotchas... 2002-06-28 15:08:20 +00:00
Derick Rethans 787ee41beb - Fix more TSRM gotchas 2002-06-28 14:51:12 +00:00
foobar 21debac333 Require 2.0.40 2002-06-28 14:48:37 +00:00
Derick Rethans 2fda2eb4a8 - YAAC: I hope this is the last one! 2002-06-28 14:45:10 +00:00
Derick Rethans ea7653f667 - Fix TSRM gotcha 2002-06-28 14:35:20 +00:00
foobar 29a2967936 t1lib.h needs to be included here now. 2002-06-28 12:46:07 +00:00
foobar e2eaa0261a Moved all gd.h related stuff to gd.c 2002-06-28 12:35:30 +00:00
foobar 569da8b3bf Remove unnecessary #include's 2002-06-28 12:25:57 +00:00
foobar 78adadafc4 Remove unused files. 2002-06-28 12:23:20 +00:00
Derick Rethans b7ffa6033b Unify error messages 2002-06-28 10:52:11 +00:00
foobar 32e08c7e52 Fix bug: #14735 2002-06-28 09:53:25 +00:00
foobar ab0d5fecd3 Fix bug: #17528, do not crash with empty string. 2002-06-28 09:23:50 +00:00
foobar f4699170fc Fixed bug: #17491 (honor INSTALL_ROOT) 2002-06-28 09:01:56 +00:00
foobar 316a8b0b4f - Fix annoying redefine warning..
# ZAK! Heads up and fix this in Mysql CVS too.
2002-06-28 08:34:34 +00:00
foobar feb450bae7 - Fix bug: #17671 2002-06-28 07:47:19 +00:00
Derick Rethans 4330c0d9f3 - Fix for bug #18039 2002-06-28 07:12:32 +00:00
Derick Rethans b24c24969c Unify error messages 2002-06-28 06:43:17 +00:00
foobar 087f2be56f - Fixed bug: #17977, session build as shared works now with mm handler too.
- Added listing of save handlers into phpinfo() output
2002-06-28 02:27:02 +00:00
40b62da9aa ChangeLog update 2002-06-28 00:22:12 +00:00
foobar 2f492735f4 Fix bug: #18008 2002-06-27 23:56:27 +00:00
foobar 1f2c1d8093 Consistency fix. 2002-06-27 23:05:11 +00:00
foobar c8f3357586 - Fixed bug: #15595 (and possibly others too) 2002-06-27 22:16:53 +00:00
Sander Roobol 609e134871 Update configure line in phpinfo() after re-running configure without
running make clean first, bug #18012.
2002-06-27 10:01:06 +00:00
Derick Rethans 78ed8dcb7d Unify error messages 2002-06-27 06:54:51 +00:00
Derick Rethans 51dfe5eebe Unify error messages 2002-06-27 06:49:02 +00:00
Derick Rethans a954dd6ee9 - Remove \n 2002-06-27 06:24:26 +00:00
foobar e6921a7b23 - Cleaning up the mess..these are NOT zvals. 2002-06-27 01:47:36 +00:00
5bb94cb3a2 ChangeLog update 2002-06-27 00:22:58 +00:00
foobar 7eb0741a68 - Fixed bug: #17999
- The errors should always be stored, but they are not supposed to be
  shown at request shutdown unless E_NOTICES are allowed.
2002-06-26 23:28:31 +00:00
Anil Madhavapeddy 639d607db6 use LIBNAME consistently. Useful on systems like OpenBSD where the curses
library is called 'curses' and not 'ncurses'
2002-06-26 22:22:47 +00:00
Anil Madhavapeddy 34b3fbd153 the ncurses_getch() is in the wrong place and never gets run 2002-06-26 22:20:09 +00:00
foobar 34de1f6578 Better not pollute the EXTRA_LIBS with libpaths. 2002-06-26 21:44:58 +00:00
Marcus Boerger d96924ffc5 -xbuf_resize does not need to have return value 2002-06-26 21:03:28 +00:00
Derick Rethans d812929d2f - Implement Andrei's request for disabling memory leak reporting in debug
builds.
#- Andrei: I can show you the logs :)
2002-06-26 19:43:46 +00:00
Derick Rethans ea303541f8 - And the SAPI too 2002-06-26 18:58:49 +00:00
Derick Rethans 3696bc781a - Update credits 2002-06-26 18:58:25 +00:00
Derick Rethans e1c2e158ff - Update TODO 2002-06-26 18:49:42 +00:00
Derick Rethans 734496b44f - Nuke some TSRMLS_FETCHes 2002-06-26 18:49:08 +00:00
foobar 049042851a silence the warning when glibtool is not found.. 2002-06-26 18:42:50 +00:00
Derick Rethans b5c0408594 - Fix build
#- Please test next time! This file is never installed with a default gd
#  install
2002-06-26 18:32:27 +00:00
Derick Rethans d1c4ea779b - Let make clean follow symlinks (tested on Linux, IRIX, Solaris, FreeBSD
and Tru64)
2002-06-26 18:19:34 +00:00
Andi Gutmans 737de1bd0c - Autoloading support based on patch from Ivan Ristic.
- Again I hope this feature ends up working well because if it doesn't we
- might need to nuke it. This only works for global scoped classes and it
- will never work for sub-classes so don't even ask!!!!!
- Just define an __autoload() function in the global scope and it will be
- called with the class name as the parameter if it doesn't manage to find
- the class.
2002-06-26 15:13:14 +00:00
Andi Gutmans 28247f572a - Centralize global class fetch 2002-06-26 14:24:23 +00:00
Derick Rethans f9b21c4b7d - Fix typo 2002-06-26 13:07:40 +00:00
Andi Gutmans b55a20abf4 - Fix problem with scope's not changing correctly during method calls.
- Reapply a tiny optimization to the allocator so that in non-debug mode
- we clean memory without detecting leaks.
2002-06-26 11:07:35 +00:00
Derick Rethans 1d5ab209eb - Unify error messages
#- This is the last one for today... can't really stand another
#  get_active_function_name(TSRMLS_C)  :)
2002-06-26 09:09:35 +00:00
Derick Rethans ef591e5b81 Unify error messages 2002-06-26 08:57:18 +00:00
Derick Rethans 20213ed1b7 Unify error messages 2002-06-26 08:48:55 +00:00
Sascha Schumann 6039cd5a01 Prefer glibtool over libtool for Mac OS X compatibility
Submitted by: various people, including blakers@mac.com
2002-06-26 08:39:55 +00:00
Derick Rethans 6540bebab4 Unify error messages 2002-06-26 08:39:52 +00:00
Derick Rethans e7d006fa31 Unify error messages 2002-06-26 08:32:25 +00:00
Derick Rethans 7d4a78bad5 Unify error messages 2002-06-26 08:07:59 +00:00
Sascha Schumann ee477dbc56 Fix code which makes wrong assumptions about the return value of snprintf.
The AOLserver module did not use the return value, so simply drop it.
2002-06-26 07:54:50 +00:00
Derick Rethans f57306cdd9 Unify error messages 2002-06-26 07:54:00 +00:00
Andi Gutmans 1f58a8f087 - No idea why this wasn't crashing before. 2002-06-26 07:36:01 +00:00
Derick Rethans 8967b5725b Unify error messages 2002-06-26 07:24:47 +00:00
Derick Rethans 2d1b304781 - Unify error messages 2002-06-26 06:49:25 +00:00
9c03caadec ChangeLog update 2002-06-26 00:22:12 +00:00
Marcus Boerger 67bfbbe881 map imageellipse to imagearc if missing
fix warnings
2002-06-25 22:23:41 +00:00
Marcus Boerger 43ec2dfa59 bits/channels for gif 2002-06-25 21:22:14 +00:00
Tomas V.V.Cox ba7bdbdb65 change the include_path setting to be in the php space instead
of doing in the interpreter line (seems to break FreeBSD)
2002-06-25 13:45:29 +00:00
Christian Stocker d68707a2c9 should compile on windows again 2002-06-25 09:46:15 +00:00
Christian Stocker 15416d6797 include libxml/parserInternals.h 2002-06-25 09:19:20 +00:00
Marcus Boerger 33b5d72f6c imageellipse is removed in 2.01
#maybe someone reintroduces this one in bundled lib?
2002-06-25 09:00:09 +00:00
Derick Rethans ac52d75cd0 - Update NEWS 2002-06-25 06:37:57 +00:00
Markus Fischer c15d83b9ed - Fix proto. 2002-06-25 06:24:45 +00:00
e59d81b9fc NEWS update 2002-06-25 00:27:57 +00:00
26d98b5b0a ChangeLog update 2002-06-25 00:27:38 +00:00
foobar 8bff7ccd8d Minor cleanup. 2002-06-24 22:43:47 +00:00
Marcus Boerger 46a373ba70 modified test3 (old one had a warning) 2002-06-24 22:22:42 +00:00
Marcus Boerger ba6498e4c5 missing return value 2002-06-24 22:00:22 +00:00
Marcus Boerger 9fe5a514f0 cleanup 2002-06-24 20:51:52 +00:00
Andi Gutmans 136b92e33a - MFZE1 (Turn off fast cache until we make sure it performs well.) 2002-06-24 19:41:06 +00:00
Marcus Boerger cccc4e3c5a register IMAGETYPE_<xxx> constants in image.c as they are needed
there.
2002-06-24 19:36:26 +00:00
Derick Rethans 2a6980a720 - Make functions not exist when they are not available. This means you can
now safely do function_exists() on all gd functions.
2002-06-24 19:31:44 +00:00
Marko Karppinen ec88777f59 Revert to php_4_2_1 to get sablotron working again.
# Sterling, please fix the DOM stuff asap so we can enjoy
# the new functionality!
2002-06-24 19:31:31 +00:00
Marcus Boerger 48bdf08edb @GetImageSize now allways set fields unknown to 0 and new Imagetype
@iff. (Marcus)
2002-06-24 19:19:08 +00:00
Andi Gutmans c6b39eb50d - More fixes (warnings, bug fixes etc.) 2002-06-24 18:49:13 +00:00
Christian Stocker b6440188b1 added some points to the todo list 2002-06-24 18:02:48 +00:00
Andi Gutmans 68663bf96b - Revert patch which checks at run-time if you're allowed to assign
- certain values by reference.
- We still need to find a solution for cases when this shouldn't be allowed
- as it might cause leaks.
2002-06-24 17:58:22 +00:00
Andi Gutmans 8fd5e70e2d - Fix crash bug and clean up a bit. 2002-06-24 17:47:46 +00:00
Sebastian Bergmann 1ae6ee5458 IMHO, ZTS should no longer be labeled experimental. 2002-06-24 16:10:33 +00:00
Rasmus Lerdorf 890e01bebe @ Add runtime Apache2 thread check to ensure we don't run a non-threaded
@ PHP inside a threaded Apache2 MPM.  (Rasmus)
2002-06-24 16:04:20 +00:00
Martin Jansen 2fec25ad73 * Rephrase help text. 2002-06-24 16:03:45 +00:00
Rasmus Lerdorf 8a2ab01744 @ Turn off ZTS if Apache2 is using the prefork MPM. (Rasmus) 2002-06-24 14:51:01 +00:00
foobar 08b1d08008 - gethostname() is found in glibc (at least on Linux) and the yp_* funcs
are in libnsl. Fixes bug: #17941
2002-06-24 14:36:09 +00:00
Andi Gutmans 95e0bb6a4b - MFZE1 2002-06-24 13:45:21 +00:00
Andi Gutmans 2172abcb0a - Don't use cache if we're using ZEND_MM 2002-06-24 13:41:26 +00:00
Andi Gutmans 3b8cd875ab - Hardcode alignment to 8. We might need a configure check for this. 2002-06-24 13:21:49 +00:00
Andi Gutmans 15d7936601 - Improve memory manager to allocate small blocks quickly. 2002-06-24 12:39:08 +00:00
foobar 3d799b5db4 Fixed PHP_ADD_LIBRARY_DEFER_WITH_PATH to work with shared builds. 2002-06-24 11:36:21 +00:00
foobar f0998192b4 No need to have multiple AC_CHECK_FUNCS calls 2002-06-24 09:25:51 +00:00
Andi Gutmans 1c20bf27da - Don't keep allocated blocks in a linked list if we're in non-debug mode
- as now the memory manager takes care to nuke all leaking blocks.
2002-06-24 07:22:25 +00:00
Andi Gutmans ba72dbf37a - MFZE1 2002-06-24 07:11:12 +00:00
Sascha Schumann 5278f12e22 iterate through passed arguments 2002-06-24 03:05:00 +00:00
6a64ee774b ChangeLog update 2002-06-24 00:24:35 +00:00
Edin Kadribasic 2183565321 Allow dynamically compiled extensions to use gettimeofday() on win32. 2002-06-23 23:22:33 +00:00
Sterling Hughes 8a04592352 standardize a bit (we know its enabled :) 2002-06-23 22:44:29 +00:00
Marcus Boerger 302bfefac7 explain difference between sprintf, snprintf and spprintf
#before complaining snprintf is often used wrong:
#snprintf does not terminate the buffer but most people expect it
#that could be a security isuue at somewhere
2002-06-23 22:16:35 +00:00
Marcus Boerger 02ac908307 #some sentences about the functions 2002-06-23 22:12:22 +00:00
Marcus Boerger db39a2efa7 -freeing memory for pbuf=NULL
#should have been one commit but to many versions during tests
2002-06-23 22:10:30 +00:00
Marcus Boerger d3222bb5b7 -allow pbuf = NULL in case of NO MEMORY, too 2002-06-23 22:06:52 +00:00
Marcus Boerger fd4d8d5450 -allways terminate buffer
-allow pbuf parameter to be NULL for buffer size calculation
2002-06-23 22:02:35 +00:00
James Cox 372cab27ad some people would prefer to be able to specify. So, we specify --ZendEngine2 for ZE2 builds, Zend for the rest. 2002-06-23 16:31:54 +00:00
James Cox bca90b0796 changing this to mv ZendEngine2 Zend instead of shell logic that isn't portable. 2002-06-23 15:47:40 +00:00
Andi Gutmans 9c148f0d84 - Fix problem with constructor not being inherited and called correctly. 2002-06-23 15:46:58 +00:00
Andi Gutmans fd904b8e69 - Fix small bug 2002-06-23 10:49:21 +00:00
Andi Gutmans 41d85e4ec7 - Almost completely implement realloc(). It now resizes in place when
- possible.
2002-06-23 10:46:27 +00:00
Marcus Boerger 761e234a43 -unlimited php_printf 2002-06-23 00:57:01 +00:00
Marcus Boerger 1f56d4ba08 -imagetype2mimetype renamed to image_type_to_mime_type 2002-06-23 00:43:11 +00:00
Marcus Boerger 16a753d3c2 -new test for WinXP tags 2002-06-23 00:39:34 +00:00
Marcus Boerger b21a4d7fa9 -fix test results 2002-06-23 00:38:25 +00:00
Marcus Boerger 6ff0a9ee4a -make it run again 2002-06-23 00:37:16 +00:00
Marcus Boerger 76aa60d4e4 -compiler warning (missing data type) 2002-06-23 00:34:47 +00:00
Marcus Boerger 966e1d450e -corrected test result 2002-06-23 00:26:34 +00:00
61adf3e530 NEWS update 2002-06-23 00:24:35 +00:00
1154cdccc7 ChangeLog update 2002-06-23 00:24:17 +00:00
Marcus Boerger d782c712ca -exif version
-missing constant (and notice)
-corrected error messages
2002-06-22 23:43:16 +00:00
Marcus Boerger 4c53f954be @exif_read_data returns mime-type now for image and thumbnail And exif_thumbnail now optionally returns imagetype. (Marcus)
#So now you can use imagetype2filetype with exif_thumbnail
2002-06-22 18:38:33 +00:00
Marcus Boerger c8f1529d08 @GetImageSize now returns additional index 'MimeType' and new function
@imagetype2mimetype to convert php imagetypes to mime-types. (Marcus)
#the reason why i export php_imagetype2mimetype is that i use that for
#exif, too. Followup example will explain why.
2002-06-22 18:14:39 +00:00
Marcus Boerger d4b1909afe ws fix 2002-06-22 17:09:28 +00:00
Andi Gutmans 7f226a6b19 - Fix crash when zend_mm_shutdown is called more than once. 2002-06-22 16:09:15 +00:00
Stig Venaas 58ce28e588 Better not include ldap_parse_result() and ldap_start_tls() at all in
the symbol table when they are not usable. Makes it possible to check
on their usability.
2002-06-22 15:41:39 +00:00
Sander Roobol d279a92242 Made php_admin_value work outside <location> and <directory> blocks. 2002-06-22 15:31:44 +00:00
Andi Gutmans e2f57d0fcc - MFZE1 2002-06-22 14:37:49 +00:00
Andi Gutmans 805a1653f0 - Revert WS changes 2002-06-22 13:59:13 +00:00
Andi Gutmans 85983fe957 - This shouldn't have snuck in. 2002-06-22 13:58:32 +00:00
Andi Gutmans 4216379152 - Stop using persist_alloc(). 2002-06-22 13:53:44 +00:00
Andi Gutmans b53569c9e8 - Nuke persist_alloc(). 2002-06-22 13:52:07 +00:00
Stig Venaas c83f5a530d Added test for ldap_start_tls_s() 2002-06-22 11:41:36 +00:00
Den V. Tsopa f26fbd2bd5 small fix in preprocessor directive 2002-06-22 08:01:57 +00:00
30f8e36f0e NEWS update 2002-06-22 00:28:07 +00:00
4bbb858eb5 ChangeLog update 2002-06-22 00:24:42 +00:00
Markus Fischer d01f7a8a52 - Fix ZTS build, see #17915. 2002-06-21 22:22:46 +00:00
Stefan Esser 44a5b43b79 Fixing the same possible memory leak. 2002-06-21 14:47:59 +00:00
Edin Kadribasic 2203ef1979 Made pgsql compile on win32 again.
All defines regarding libpq capabilities are kept in ext/pgsql/pgsql.dsp
where HAVE_PQESCAPE is already defined.
2002-06-21 13:11:47 +00:00
Stig Bakken 7914985b1a * typo 2002-06-21 13:11:04 +00:00
Harald Radi 5a6a5bc609 removed CONST_EFREE_PERSISTENT so that andi can commit his patch
# _now_ it should work
2002-06-21 10:43:45 +00:00
Harald Radi 5dbd205bf7 removed CONST_EFREE_PERSISTENT so that andi can commit his patch
# second try
2002-06-21 10:35:33 +00:00
Harald Radi ed1b5c0388 removed CONST_EFREE_PERSISTENT so that andi can commit his patch
# this is one of these nice patches where you only remove something :)
# i still don't get what CONST_EFREE_PERSISTENT should have done
# there but the cvs log says that i can blame zeev :-P
2002-06-21 10:02:26 +00:00
Derick Rethans 6869cb3f5a - Added a new parameter to the header() function which overrides the HTTP
response code.
@- Added a new parameter to the header() function which overrides the HTTP
@  response code. (Derick)
2002-06-21 09:31:21 +00:00
Stig Bakken 0f4ccfaa27 * bending over backwards to find sensible defaults 2002-06-21 06:08:54 +00:00
b4ab0afa8e ChangeLog update 2002-06-21 00:20:31 +00:00
foobar e79b06fc02 Make this extension compile as shared extension too. 2002-06-21 00:15:48 +00:00
Sander Roobol 7c4ad7eda4 ZTS fixes
# if this breaks something, please let me know... i've got really no
# idea what i'm doing but this fixes the ZTS build :)
2002-06-20 20:13:20 +00:00
James Cox 3b58ead0be oops.. 2002-06-20 08:42:08 +00:00
James Cox 265f2d653a make "make snapshot" work again..
# is this actually used?
2002-06-20 08:36:48 +00:00
James Cox 337e158d40 fixing to permit builds with ZE2 2002-06-20 08:21:20 +00:00
Uwe Steinmann 662962f25c - take version of libxslt and libxml from runtime variables to make
sure the reported versions correspond to the actually installed
	versions of libxml and libxslt
2002-06-20 05:48:45 +00:00
c7af8c422a ChangeLog update 2002-06-20 00:27:26 +00:00
Tomas V.V.Cox 77acb22bba - Force params to version_compare() to be strings, otherwise some
comparations will fail (ex. 0.9 will be equal to 0.90)
- Other minor cleanup's
2002-06-19 23:38:59 +00:00
Tomas V.V.Cox fa2ee37313 Do NOT allow install packages with errors in its description file 2002-06-19 22:51:29 +00:00
Marcus Boerger 010e5e60ac correct handling/generating of php_mbstr_default_identify_list 2002-06-19 21:55:42 +00:00
Andi Gutmans 9e3517161e - This was also supposed to be part of the previous ZEND_MM commit :) 2002-06-19 16:53:49 +00:00
Andi Gutmans ad9bed0edd - Oops, this was supposed to be part of the previous #ifdef ZEND_MM change 2002-06-19 16:53:06 +00:00
Andi Gutmans 7e6fdcaa20 - Use #ifdef for ZEND_MM 2002-06-19 16:29:07 +00:00
Andi Gutmans 1432e49894 - Make sure MAX is defined 2002-06-19 16:13:39 +00:00
Christian Stocker 6ff3e9dc3d - Make domxml_xslt_process() working again. 2002-06-19 15:12:14 +00:00
Sander Roobol 3d1612c2fb Made the API versions appear better on phpinfo(); 2002-06-19 13:24:01 +00:00
Andi Gutmans 70de1bd5bb - Fix problem where you couldn't define constants with different cases but
- the same name.
2002-06-19 04:13:12 +00:00
foobar 5060a9b379 Fix bug: #17130 2002-06-19 01:11:20 +00:00
Edin Kadribasic 0af2ae718f No need to check for allow_url_fopen here.
#This closes two bugs which I cannot find right now courtesy our buggy bug
#database.
2002-06-19 00:31:30 +00:00
65a67889ef NEWS update 2002-06-19 00:28:47 +00:00
c7f2fca5f5 ChangeLog update 2002-06-19 00:27:39 +00:00
foobar d2f2ed76d1 Use correct macro for boolean ini values. 2002-06-19 00:18:40 +00:00
Stig Venaas 7853832234 Made array_unique() always keep the first occurrences of duplicates,
making the behavior easier to understand, and maybe more useful.
2002-06-18 19:37:59 +00:00
Andi Gutmans 52c941dc01 - Nuke use of persist_alloc(). This can't be used with a new memory manager 2002-06-18 18:51:33 +00:00
Derick Rethans d4acdd349f - MFZE1 2002-06-18 17:36:33 +00:00
Stefan Esser 028b25362b fix: appending the default charset to text/ content types never worked
fix: removed double free
2002-06-18 15:04:58 +00:00
Jan Lehnardt df226a54d9 - WS-fixes 2002-06-18 13:16:33 +00:00
Stefan Esser 28ad564c29 keep fingers away from already freed memory. 2002-06-18 12:57:09 +00:00
Hartmut Holzgraefe 303852b42e - fixed bug in enclosure handling (was still hardcoded to '"' in one place)
- added possibility to pass empty enclosure if you really don't want one
2002-06-18 12:16:27 +00:00
Sander Roobol ace4a23dfc Fixed stripslashes when magic_quotes_sybase is enabled, and add a test for
add- and stripslashes().
# this time without cvs messing up and aborting, hopefully :)
2002-06-18 11:51:06 +00:00
Sander Roobol 07975157eb Fix stripslashes when magic_quotes_sybase is enabled, and add a test for
add- and stripslashes().
2002-06-18 11:42:21 +00:00
Derick Rethans ba5257a2ec - Fix for bug #16065 2002-06-18 11:09:21 +00:00
Sander Roobol 0c1718c614 Patch by Michael Sisolak <msisolak@yahoo.com> to make header() honor the
replace parameter. Closes #16458.
2002-06-18 10:16:36 +00:00
Derick Rethans 94127f25e3 - oops... read before commit :) 2002-06-18 10:09:41 +00:00
Derick Rethans 81860467d4 - It doesn't work from within a script... so we disallow it 2002-06-18 10:06:54 +00:00
Tomas V.V.Cox 455f7bc746 "Release notes"++ 2002-06-18 08:41:39 +00:00
Markus Fischer 416c02f2a0 - User proper macros as suggested by Marc. 2002-06-18 07:48:41 +00:00
Markus Fischer 7cefd2fe09 - Fix ZTS build. 2002-06-18 01:51:59 +00:00
foobar cff4039c47 Fixed bug: #17137, test pass still 2002-06-18 00:56:11 +00:00
6997917bf8 NEWS update 2002-06-18 00:26:27 +00:00
86edd3731a ChangeLog update 2002-06-18 00:23:53 +00:00
Edin Kadribasic 67689bd557 ZTS fix. 2002-06-18 00:14:52 +00:00
Edin Kadribasic fb6bcda13b Check for +/- infinity in base_convert (bug #14807). 2002-06-18 00:04:33 +00:00
Andi Gutmans dbc195cdef - Improve speed of alignment calculation 2002-06-17 19:31:14 +00:00
Andi Gutmans 1e4a2dc6a9 - Fix a bug and add code which frees actual allocated segments at the end
- of execution (this still doesn't work because some blocks remain
- referenced after the memory manager is killed.
2002-06-17 19:00:37 +00:00
Andi Gutmans 54ef650fe7 - Save space per-allocated block. 2002-06-17 18:24:08 +00:00
Sergey Kartashoff 5e4ee5ac1b # Mnogosearch extension update. Now it should work with
# latest mnogosearch-3.2.5.
2002-06-17 17:39:18 +00:00
Andrei Zmievski fbae692ef6 Fix. 2002-06-17 15:13:39 +00:00
Andrei Zmievski a347ed559b Applied fix for #17764.
@- Fixed a crash in ereg_replace() when backreference number was greater
@  than the number of subpatterns. (oliver@billix.franken.de)
2002-06-17 15:10:22 +00:00
Tomas V.V.Cox d2b435eb08 Dropped case insentive ext search in PEAR::loadExtension() 2002-06-17 14:35:12 +00:00
Tomas V.V.Cox 4211d0e590 Typo in the folding mark 2002-06-17 14:04:01 +00:00
Stig Bakken 271c2526df * php-4.2.1-installer.exe for Windows is installed in c:\php by
default, but it has PHP_SYSCONFDIR set to c:\php4.  workaround.
2002-06-17 13:56:38 +00:00
Tomas V.V.Cox 80361edcb6 Use the new PEAR::loadExtension() in checkExtension() instead
of the "hack"
2002-06-17 13:50:33 +00:00
Tomas V.V.Cox 87ddd96027 Added PEAR::loadExtension($ext) - OS independant PHP extension load
# PEAR developers, please use this function if you need to check or
# load an extension.
2002-06-17 13:39:29 +00:00
Tomas V.V.Cox 9e67012d74 trailing ws 2002-06-17 13:32:42 +00:00
Hartmut Holzgraefe efdde5efe5 making printf/sprintf locale-aware without external dependencies 2002-06-17 11:50:25 +00:00
Hartmut Holzgraefe 00b667b61b fixed return types for ucwords/ucfirst when passed an empty string 2002-06-17 11:37:49 +00:00
Stig Bakken 97fd0acc14 * doh 2002-06-17 10:58:34 +00:00
Alan Knowles c904e22ade Fixing for the coding standard :) 2002-06-17 10:52:21 +00:00
Stig Bakken 2ae8219d44 * add xmlrpc request to debug output (verbosity level 4+) 2002-06-17 10:26:55 +00:00
Alan Knowles 19b63d5f87 Added Dependancy check on XML - previously pear installer failed silently 2002-06-17 04:49:14 +00:00
foobar 4e37016cb6 - Made dbase_get_record() and dbase_get_record_with_names use same backend
function as they both do same thing, just the output is different.

  Fixes also bug #17762 as side effect.
2002-06-17 02:27:34 +00:00
bea4f28474 ChangeLog update 2002-06-17 00:29:46 +00:00
Stefan Esser 984b48b009 Fixed Bug #17790
- link and symlink now check uid and open_base_dir for link and its target
2002-06-16 21:24:15 +00:00
Hartmut Holzgraefe 0170e42763 reverted patch depending on not yet commited work 2002-06-16 21:22:10 +00:00
Andi Gutmans 690c85b406 - Fix bug in class constants
- Start centralizing main class lookups. This will help implement
- __autload()
2002-06-16 18:25:05 +00:00
Derick Rethans 7672dbcdcf - Fix version in phpinfo(); 2002-06-16 18:20:21 +00:00
Andi Gutmans faa4f23a68 - Add zend_mm.c 2002-06-16 17:38:19 +00:00
Andi Gutmans 24e59ba35b - Remove debug code which doesn't work anymore and add headers. 2002-06-16 17:20:15 +00:00
Andi Gutmans 380c082e32 - Commit an initial version of a home made memory manager.
- It's just for seeing if this would be an advantage to PHP in MT
- environments. If this is to become production material there is still
- a long way to go.
2002-06-16 17:17:47 +00:00
Tomas V.V.Cox 19bfe8a3e1 Install the pear command under the bin_dir setting intead of the fixed
PHP_BINDIR
2002-06-16 14:30:14 +00:00
Hartmut Holzgraefe 7686d43737 make sprinf() locale-aware (Bug# 12647) 2002-06-16 13:14:21 +00:00
Sander Roobol fcb692a75d Made the tests (and not only run-tests.php) actually use php.ini-dist, and
removed unused php.ini file.
2002-06-16 10:58:54 +00:00
Markus Fischer c0736d6096 - List new session.use_only_cookies option. 2002-06-16 06:05:23 +00:00
Stig Bakken c55ce8b07f * set include_path when running "pear" 2002-06-16 05:43:48 +00:00
foobar d8a361b8d5 Fixed bug: #17732.
xmlrpc_decode_request() and xmlrpc_set_type() expect some parameters to be
passed by reference.
2002-06-16 02:24:18 +00:00
b9637a0bc5 ChangeLog update 2002-06-16 00:28:21 +00:00
Markus Fischer 1aac85becd - Be more verbose which index causes the warning. 2002-06-15 18:14:19 +00:00
Markus Fischer 9fea4c1f5f - Don't forget to close the stream. 2002-06-15 17:46:44 +00:00
Harald Radi a3c79eca49 workaround for a win32 memleak
# this definitely has to be revisited !
# maybe we should use winsock2 and overlapped IO
2002-06-15 16:04:59 +00:00
Harald Radi f7bdde218e workaround for a win32 memleak
# this definitely has to be revisited !
# maybe we should use winsock2 and overlapped IO
2002-06-15 15:58:16 +00:00
Sebastian Bergmann ebecbcb995 Add new target directories. 2002-06-15 09:40:19 +00:00
Andi Gutmans e8fe69884f - Fix copy&paste problem where we allocated according to an old structure
- decleration and not the new one.
2002-06-15 08:47:11 +00:00
bdc88cd7b6 NEWS update 2002-06-15 00:25:49 +00:00
e721a732c1 ChangeLog update 2002-06-15 00:23:18 +00:00
Markus Fischer 866329e61a - Update Win32/mail changes, mention bundled gd library. 2002-06-14 23:21:46 +00:00
Tomas V.V.Cox 9baec5623d - Fix issue with the DIRECTORY_SEPARATOR, did make the install of
XML_image2svg fail
- TODO++ and others minor stuff
2002-06-14 23:18:04 +00:00
Stig Bakken 972edb2795 * if verbosity config is > 3, display xmlrpc response
* another bugfix
2002-06-14 22:25:37 +00:00
Andrei Zmievski 6cac569055 Fix. 2002-06-14 20:16:50 +00:00
Sebastian Bergmann 01316104b3 Add gd_bundled to php_modules.dsw. 2002-06-14 16:37:24 +00:00
Alan Knowles 4f1531b163 remote list and remote listall, can now list non-stable packages if you set prefered_state to something else 2002-06-14 15:03:29 +00:00
Alan Knowles 78fffcce0e Fixed XML RPC sending of args - lets try and get the right tag :) 2002-06-14 14:55:28 +00:00
Edin Kadribasic 7e44ab0308 Use some more sane paths for win32 version. 2002-06-14 14:48:33 +00:00
Markus Fischer cf8166ee90 - Remove freetype.lib and HAVE_LIBTTF; we're always linking against freetype2
anyway.
2002-06-14 14:48:13 +00:00
Christian Stocker f9325a6a29 - renamed domxml_parser_reference to domxml_parser_entitiy_reference
- renamed domxml_cdata_block to domxml_parser_cdata_section
  (more consistent with the domxml_create_XXX methods)
- added domxml_parser_processing_instruction(target,data)
- added domxml_parser_namespace_decl(href,prefix)
2002-06-14 12:37:28 +00:00
Christian Stocker f185f06f27 - oops, that didn't even compile
- added domxml_parser_reference(reference)
2002-06-14 12:20:13 +00:00
Christian Stocker 7edd730be5 @ - Added preliminary SAX-Input support. It's now possible to build a DomDocument
@   with SAX-Events (added domxml_parser_start_document(), domxml_parser_end_document(),
@   domxml_parser_start_element(tagname[,attributes]), domxml_parser_end_element(tagname),
@   domxml_parser_characters(characters), domxml_parser_cdata_block(cdata),
@   domxml_parser_comment(comment), domxml_parser_get_document(). (chregu)
# More Sax Events to be implemented. Sax Output (from file or DOM-Tree) is
#  not that easy to implement, but possible...
2002-06-14 12:12:04 +00:00
Sebastian Bergmann 596859eb44 Remove unused local variables. 2002-06-14 05:42:08 +00:00
3ad50e1279 NEWS update 2002-06-14 00:29:45 +00:00
edb5b71501 ChangeLog update 2002-06-14 00:28:10 +00:00
foobar 748e75774d - Fixed bug #15803 (and propably others related too, part 2/2)
. Changed the configure/compile so that it doesn't "pollute" the INCLUDES
    anymore and thus cause trouble with other extensions which
    might use the same header files. (e.g. Informix)
  . Separated the #include statements to own file so we don't get any
    errors when compiling main/internal_functions.c
2002-06-14 00:07:16 +00:00
foobar 18943c345d - Fixed bug #15803 (and propably others related too)
. Changed the compile so that it doesn't "pollute" the INCLUDES
    anymore and thus cause trouble with other extensions which
    might use the same header files. (e.g. ODBC)
  . Some fixes for Informix compile problems (with the new build system)
  . Removed unnecessary stub.c file.
2002-06-14 00:01:49 +00:00
Markus Fischer fd3b919abf - Initial MSVC makefile to create a php_gd2.dll based on the bundled libgd,
works out of the box here with the right image libs and headers.
# Edin, I think it's your turn now. Feel free to tweak it for your needs.
# Could only compile Release_TS so far (no debug .lib files)
2002-06-13 23:08:40 +00:00
Markus Fischer d4711e51ae - We don't need the check here because the regex makes sure we never have \r\n
at the end of the header.
2002-06-13 22:25:28 +00:00
foobar f9e492d00b @- Fixed bug with Apache which let PHP_AUTH_* variables to be set when
@  external basic auth mechanism was used. (Jani)

Fixes bugs: #16653, #14534, #14370
2002-06-13 22:13:57 +00:00
Stefan Esser 6189dac445 Typo: == instead of = 2002-06-13 21:55:26 +00:00
Stefan Esser c3c4c6137a - should fix bug#17753 2002-06-13 21:42:39 +00:00
foobar ce379abfbd Fixed bug: #17751 (typo) 2002-06-13 19:41:25 +00:00
Stefan Esser 2eb859842b Fixed: possible bufferunderrun (worst case == invalid free bytes counter)
Fixed: isXXXX macros need (unsigned char) cast

Fixed: bug#17746 - control chars are now filtered within "to" and "subject" parameters
2002-06-13 18:54:45 +00:00
Tomas V.V.Cox cf4002fd58 Change a little the dep db structure
Comment the code and some clean up's
2002-06-13 15:10:42 +00:00
Tomas V.V.Cox 3507f15519 More work on the dependencies DB (still not tested/used) 2002-06-13 13:41:12 +00:00
Christian Stocker ff9a003f26 - Added DOMXML_LOAD_DONT_KEEP_BLANKS as possible mode, if one wants really nicely
formatted XML-Documents (but this can have sideeffects, if you depend on whitespaces..)
- bumped up domxml-api-version number.
2002-06-13 10:47:19 +00:00
Christian Stocker 1177e74fea @ - Added better error-messages (3rd parameter) and validating of DTDs (2nd parameter) to
@   domxml_open_mem(string xml[, int mode[, array errors]]) and domxml_open_file(string filename[, int mode[, array errors]]).
@ - Added domxml_doc_validate([array errors]) for validating existing DomDocuments with a DTD.
2002-06-13 09:05:56 +00:00
Edin Kadribasic 11bc56d48b Fix exit code (bug #17733). 2002-06-13 08:38:26 +00:00
Derick Rethans 1233f27eec - Fix for bug #14410 (Patch by C. McCohy <mccohy@kyberdigi.cz>). 2002-06-13 06:32:14 +00:00
foobar b5e46c5e05 Fix build in ZTS mode 2002-06-13 01:04:40 +00:00
be39b3fabc ChangeLog update 2002-06-13 00:25:40 +00:00
Jason Greene da18025d52 Fix entry 2002-06-12 23:26:37 +00:00
Stig Bakken efbb0b125c * comment typos 2002-06-12 21:23:22 +00:00
Stig Bakken 16a112094b * set working version to 0.91-dev 2002-06-12 21:19:51 +00:00
Stig Bakken ab9159719b * minor cleanup 2002-06-12 21:17:10 +00:00
Stig Bakken 3e7acb1ebf * this should have been done last year :) 2002-06-12 21:10:41 +00:00
Andrei Zmievski 4f4b983a39 This patch adds ability to capture string offsets in the preg_match_*()
results.
2002-06-12 20:04:20 +00:00
foobar 7a708cce74 typofix 2002-06-12 17:46:15 +00:00
foobar 01dff4d97a - Fixed bug #17669. PG(magic_quotes_runtime) wasn't reset for each request. 2002-06-12 17:25:48 +00:00
foobar 330a877d05 cleanup 2002-06-12 17:24:07 +00:00
Andrei Zmievski 62add42f05 set_error_handler() should take methods as callbacks. Also fixed it to report
invalid callbacks.
2002-06-12 17:02:19 +00:00
Andrei Zmievski 87f5f3962d Properly return the result of __call() handler. 2002-06-12 16:46:24 +00:00
Tomas V.V.Cox d2b830ff4a Attempt to make pear.bat work better under Windows 2002-06-12 16:31:53 +00:00
Hartmut Holzgraefe 808dd7dd5f fix for bug #10616 -> mktime() with negative date offsets not working on MacOSX 2002-06-12 15:35:27 +00:00
Christian Stocker 3ba753f3d8 Fixed domxml_get_element_by_id() 2002-06-12 11:13:11 +00:00
Sascha Schumann dcf67c4433 This option enables administrators to make their users invulnerable to
attacks which involve passing session ids in URLs.
2002-06-12 08:18:36 +00:00
e64b5c7045 NEWS update 2002-06-12 00:43:38 +00:00
b2c91950f6 ChangeLog update 2002-06-12 00:41:49 +00:00
Markus Fischer 9ec38259ed - Those have been implemented already. 2002-06-11 21:29:32 +00:00
Markus Fischer 17b3ef47f3 - Fix builtin gets() emulation (hopefully). 2002-06-11 21:22:12 +00:00
Markus Fischer 137a290086 - Add some recent observations with bz2. 2002-06-11 21:06:38 +00:00
Markus Fischer 4290da23d0 - Add missing Id tag. 2002-06-11 18:55:48 +00:00
Markus Fischer 709785a90a - Always \0 terminate data returned from _php_stream_copy_to_mem(). 2002-06-11 18:54:57 +00:00
Andi Gutmans b4a76acfa4 - Don't show debug_backtrace() in the trace itself.
- This patch is a bit ugly because the whole code itself is pretty complex
- and hard to re-order.
2002-06-11 18:37:41 +00:00
Andi Gutmans b2015c5610 - Fix problem with assigning functions by reference. 2002-06-11 17:33:53 +00:00
Jason Greene 1745076ffc Forgot one 2002-06-11 13:50:00 +00:00
Jason Greene abaefad8d3 Sockets currently works great with all compilers on Solaris
Update TODO
2002-06-11 13:48:49 +00:00
Hartmut Holzgraefe ddac6892f4 now it works on streams (plus some debug code removed) 2002-06-11 09:37:31 +00:00
Hartmut Holzgraefe c39a3bc880 macro definition fixed, guess it was the usual kind of cut&past bug? 2002-06-11 09:36:48 +00:00
Edin Kadribasic acae873a6b Disable installing pear when --disable-cli is used since pear installer
needs cli to function.
2002-06-11 09:35:59 +00:00
Markus Fischer b7cab12d21 - These things have been done already. 2002-06-11 08:33:09 +00:00
Sebastian Bergmann 1d6686c936 Add __delegate(). 2002-06-11 08:06:02 +00:00
Jason Greene c6a36d585b @Impelemented timeout functionality, and fixed error handling of fsockopen() on win32
Also fixed error handling on unix (micropatch)

Closes Bug #14740
2002-06-11 03:55:28 +00:00
e51bd48d22 ChangeLog update 2002-06-11 00:36:16 +00:00
foobar 73f2ab9951 - Reverted last bogus commit and fixed the credits in NEWS.
# STIG! Do a 'cvs update' before you commit anything!!
2002-06-11 00:18:34 +00:00
Markus Fischer 9b1ec11184 - Typo. 2002-06-10 22:43:49 +00:00
Stig Bakken a4ecce0cd9 @Add --with-mysql-sock option (James Cox) 2002-06-10 21:35:26 +00:00
Markus Fischer cad4ddebed - Revert zlib.lib patch.
# Only add it after ext/mysql takes really advantag of it on win32, needs
# also modification in mysql/libmysql/config-win.h
2002-06-10 21:29:01 +00:00
Harald Radi fd8082ef67 pooling and singleton finally work 2002-06-10 21:16:25 +00:00
Harald Radi f1f6818c20 new testcases 2002-06-10 21:15:38 +00:00
Harald Radi ba364121f1 added TS_HASH macro 2002-06-10 21:14:48 +00:00
Frank M. Kromann 4b40b9513b Adding ini setting for max_procs 2002-06-10 20:00:20 +00:00
Frank M. Kromann 509c606dbc Adding ini setting for max_procs 2002-06-10 19:31:29 +00:00
Harald Radi fd0d39da8f mysql need zlib.lib now
#again, something seemed to be messed in my last commit
2002-06-10 18:47:16 +00:00
Sergey Kartashoff 662235a522 # Mnogosearch new function calls fixes 2002-06-10 16:46:06 +00:00
Jan Lehnardt a8de8ec90c - whitespace fix 2002-06-10 16:34:25 +00:00
Markus Fischer cac49284b4 - Fix win32/mysql.
- Revert cryptic WS commit on php4dllts.dsp.
2002-06-10 15:53:26 +00:00
Joseph Tate 5bb233a931 #Undeprecated attribute access methods 2002-06-10 14:48:28 +00:00
Harald Radi f9fa95067b mysql need zlib.lib now 2002-06-10 13:14:43 +00:00
Harald Radi d63056b10b fix the build
# these files were blank, i suppose this happened by accident
2002-06-10 13:09:46 +00:00
Sergey Kartashoff 05a304d3a9 - MnoGoSearch extension compile fix with mnogosearch-3.2.4 and 3.2.5 2002-06-10 12:24:43 +00:00
Markus Fischer 0996358943 - WS fix, damn win32. 2002-06-10 12:24:15 +00:00
Harald Radi 8e19555608 fix the build 2002-06-10 12:21:58 +00:00
Markus Fischer f9936a8459 - Fix proto. 2002-06-10 10:28:33 +00:00
Stanislav Malyshev 3a419fa8dd Fix leak 2002-06-10 09:15:02 +00:00
Sergey Kartashoff 2c6e3c80a1 # mnogosearch update. Does not compile at this moment, but
# there are not so many things left to fix...
2002-06-10 08:55:18 +00:00
Markus Fischer 3856c3ff39 - Fix easter_(days|date)()s first parameter now really defaults to the current
year if ommited (it was document but didn't work).
2002-06-10 07:51:28 +00:00
Andrei Zmievski 7f4c12b006 Fix bug #7045: shuffle() now provides consistent distribution of values
in the array.
2002-06-10 02:28:32 +00:00
0258d9e2ee ChangeLog update 2002-06-10 00:37:32 +00:00
Tomas V.V.Cox 4bb9c66fee Commented out old unused stuff
# I'm not familiar with the 'make' syntax, please tell me if
# something is wrong
2002-06-09 18:34:04 +00:00
Tomas V.V.Cox 613496c4ef Moved to pear/Archive_Tar/scripts 2002-06-09 18:25:40 +00:00
Tomas V.V.Cox c67c595645 if (!dl(php_gtk)) die("Unable to load the php_gtk extension\n"); 2002-06-09 18:18:01 +00:00
Tomas V.V.Cox 8c8599222e Beautify config-show output, some wrap changes and fix small
issue with _tableRow() with line counting
2002-06-09 18:12:59 +00:00
foobar 0e26e149bf cleanup 2002-06-09 17:05:17 +00:00
Tomas V.V.Cox 0d5d98a6d8 displayLine() -> outputData() 2002-06-09 16:29:50 +00:00
Tomas V.V.Cox 7647781340 - outputData($data, $command)
+ outputData($data, $command = '_default')
2002-06-09 16:28:46 +00:00
Harald Radi 30e1541595 reflect the new abstraction changes in the demo layer 2002-06-09 14:52:50 +00:00
Harald Radi c55e855fdd - using stas' abstraction now
- layer can add individual ini settings now
- classentries for the loaded rpc object are created dynamically now
  class hirarchy looks like: rpc<-[layer]<-[object]  (e.g. rpc<-com<-adodb),
  thus the whole class tree is reflected into php
- added user-functions to mark an object as a singleton and as poolable

#rest of the linuxtag work
2002-06-09 14:51:41 +00:00
Harald Radi ecad1fbc5a pg_escape_* functions were not available on win32 due to a missing define
#if this breaks the build because the win32 pg libs don't export the functions
#we should consider implementing them somehow else
#some linuxtag work
2002-06-09 14:32:40 +00:00
Harald Radi 3738a6edd0 only check for an available class entry instead of
the std_object_handlers on some places

#some linuxtag work
2002-06-09 14:20:37 +00:00
Sander Roobol 85a99fa5a3 Don't use headers if the module contains only one phpinfo() entry, just
stick to ordinary rows.
2002-06-09 12:56:27 +00:00
Sander Roobol c5dc21f8c2 Made phpinfo() show if we're using the bundled version of GD 2002-06-09 12:44:33 +00:00
James Cox 210744928f dont test for the socket -- enables installs over NFS etc.
# my previous commit was the revision before the fixed one (ie, i had the fix) so apologies for that.
2002-06-09 11:43:50 +00:00
Sander Roobol a2849b868b Fixed detection of JPEG support in bundled version of GD. 2002-06-09 11:27:04 +00:00
Sander Roobol 2f6c2a9b18 Fixed configure stuff
# It didn't work for me... hope it works for everybody now...
2002-06-09 10:46:13 +00:00
Andrei Zmievski 5f3a9ebf13 Make RAND_RANGE() an API macro. 2002-06-09 04:26:36 +00:00
foobar fd70290b76 De-messify 2002-06-09 00:53:28 +00:00
foobar c8bacb7a06 Cleaned up the mess. Now it actually works too.
# TEST BEFORE COMMIT!!
2002-06-09 00:50:46 +00:00
fb7e21effd NEWS update 2002-06-09 00:22:17 +00:00
f6c9059da5 ChangeLog update 2002-06-09 00:22:00 +00:00
Christian Dickmann 3dd47bc651 add modes to list-all. fix a mergerbug 2002-06-08 18:44:34 +00:00
Sascha Schumann 5e148e3875 too many flushes are bad 2002-06-08 18:11:03 +00:00
Tomas V.V.Cox 2ed7358250 Hopefully fixed a couple of problems with destination paths:
- Bug #17529
- In Windows getting <pear>\/\<file>
- Documentation under <doc_dir>/Package/Package/

# Please test it and report possible problem
2002-06-08 17:34:46 +00:00
Andrei Zmievski 8515f3ec54 *** empty log message *** 2002-06-08 13:46:36 +00:00
Andi Gutmans 90f43c78b0 - This should improve performance on Windows 2002-06-08 13:01:05 +00:00
Andi Gutmans 1186d51c3a - Add a loop unrolled version of the hash function and a bit of an
- explanation about our hash function (Ralf S. Engelschall)
2002-06-08 12:44:39 +00:00
James Cox 00779e5fa3 @ added support for --with-mysql-sock so people can specify it (eg, NFS compiles, etc)
changed the default mysql.sock location to use the one from the RPM. Added /usr/local
  locations to the search list. (imajes)
2002-06-08 11:37:20 +00:00
Markus Fischer 0cd40c2808 - Since streams are always enabled, instead of just printing 'enabled' we tell
what streams are currently registered.
2002-06-08 10:25:44 +00:00
75f925dd37 NEWS update 2002-06-08 00:25:03 +00:00
a7f8fc82c5 ChangeLog update 2002-06-08 00:22:08 +00:00
Tomas V.V.Cox f33c5896ac Experimental dependencies database handling functions
(not yet in production)
2002-06-07 18:07:38 +00:00
Sebastian Bergmann 874cdf43a6 Unbreak build by setting PHP_PREFIX to c:\php4 for now. 2002-06-07 15:30:13 +00:00
Sebastian Bergmann 49446bb216 Fugbix typo. 2002-06-07 15:24:03 +00:00
Zak Greant 9daec6d227 Updating embedded libmysql to version 3.23.48 2002-06-07 15:07:55 +00:00
Tomas V.V.Cox fcd6d2b5cd Beautify remote-info 2002-06-07 15:06:25 +00:00
Joseph Tate 7a58bc690a Added aliases to make attr_node access functions more consistent.
Old access functions are now deprecated.
CVS: ----------------------------------------------------------------------
CVS: Enter Log.  Lines beginning with `CVS:' are removed automatically
CVS:
CVS: Committing in .
CVS:
CVS: Modified Files:
CVS: 	php_domxml.c
CVS: ----------------------------------------------------------------------
2002-06-07 14:56:08 +00:00
Tomas V.V.Cox f3673c8798 - Reapplied the "treat umask as octal in "config-set"
command" Stig's patch
- Ported the config-help command to new UI API
2002-06-07 14:50:39 +00:00
Tomas V.V.Cox 8f21117efb more wrapping cases 2002-06-07 14:48:01 +00:00
Stig Bakken 41e31645dd * fix SHLIB_SUFFIX_NAME define for Windows 2002-06-07 12:20:28 +00:00
Stig Bakken 40ab700677 @New constants: PHP_PREFIX and PHP_SHLIB_SUFFIX (Stig) 2002-06-07 12:19:26 +00:00
Tomas V.V.Cox ebea2ed5cf Remove debug code 2002-06-07 10:22:00 +00:00
Tomas V.V.Cox eeb7f9dafc More info output retouchs 2002-06-07 10:20:41 +00:00
Tomas V.V.Cox b5bf0fb154 Fix some minor issues with the parsing 2002-06-07 10:18:59 +00:00
Stig Bakken 2bc921c60a * get rid of pearize 2002-06-07 10:17:25 +00:00
Tomas V.V.Cox c083784023 Make "info" full human friendly (in deps list and lastmodified) 2002-06-07 08:45:00 +00:00
Tomas V.V.Cox 9f46d24922 Make $_deps_rel_trans and $_deps_type_trans globally avaible:
moved from Command/Package.php -> Command/Common.php
2002-06-07 08:43:45 +00:00
Tomas V.V.Cox 149dcec76f Be nicer with the help 2002-06-07 08:05:48 +00:00
Tomas V.V.Cox 7770b625ba ws 2002-06-07 08:04:05 +00:00
Stefan Esser 5956656864 - Stay always in buffer 2002-06-07 08:00:12 +00:00
Tomas V.V.Cox 1dac8c275b Put back the "info" command in its full state:
"Displays information about a package. The package argument may be a
local package file, an URL to a package file, or the name of an
installed package."
Command "package-info" depreciated (again)
2002-06-07 07:54:28 +00:00
ea16e37e9b ChangeLog update 2002-06-07 00:31:30 +00:00
Sebastian Bergmann b0d61f9bd3 Add RFC on delegation. 2002-06-06 21:13:39 +00:00
Daniela Mariaschi 8a65d5d3cb Add control on IB version. ibase_add_user(), ibase_modify_user()
and ibase_delete_user() are available with IB6 or later
2002-06-06 19:51:04 +00:00
Daniela Mariaschi 70184d32a4 Add control on the IB version. ibase_add_user(),ibase_modify_user()
and ibase_delete_user()  are available with IB6 or later
2002-06-06 19:47:28 +00:00
Markus Fischer 3a3fe41817 - Update 2002-06-06 18:38:32 +00:00
Markus Fischer cc01a5dabf - Remove C++ comments. 2002-06-06 17:59:37 +00:00
Markus Fischer 565f3797dc - Revert Ws thingy.
# Lazy bastard :-)
2002-06-06 12:58:25 +00:00
foobar 49523ba7d1 Changed the configure option to be --enable/disable 2002-06-06 12:44:28 +00:00
Stig Bakken 678456cf0f * prepare 0.90 2002-06-06 11:31:07 +00:00
Stig Bakken d1826b4287 * add "nobuild" option to installer (-B or --nobuild option to CLI frontend) 2002-06-06 10:51:26 +00:00
Stig Bakken d8c07cc63d * remove debug output 2002-06-06 10:37:13 +00:00
Stig Bakken cf81f686e9 * when building, look for "package-version" subdirectory, needed for
building stuff straight from tarballs
2002-06-06 10:35:16 +00:00
Stig Bakken 9161f8a32e * add PEAR_COMMON_PACKAGE_NAME_PREG constant 2002-06-06 10:16:42 +00:00
Stig Bakken 3c587c0aad * make displayFatalError work again 2002-06-06 10:16:01 +00:00
Tomas V.V.Cox aa7d447d25 Forgot that one 2002-06-06 09:05:04 +00:00
Tomas V.V.Cox 8447d094c6 Wrap table contents
# Sorry could't wait for that commit :-)
2002-06-06 08:50:31 +00:00
Tomas V.V.Cox 41e7696ec9 Implemented "pear info <Installed Package>" command
# Stig, why I'm sure that you already have implemented this
# command? Have to stop with my LSD therapy
2002-06-06 07:25:07 +00:00
Tomas V.V.Cox ec9c0bf0a7 Split the doPackageInfo() in doPackageInfo() and _infoForDisplaying()
(this last one can be statically called and is used also from
the "info" command)
2002-06-06 07:22:23 +00:00
Tomas V.V.Cox eb54d687ad package.xml file for the PEAR Mail package 2002-06-06 06:43:19 +00:00
Tomas V.V.Cox fda17098b1 That will really avoid PHP warnings 2002-06-06 06:40:05 +00:00
Tomas V.V.Cox 1971e52e33 Fix package command
# can't beleive you don't test commits :-)
2002-06-06 06:35:12 +00:00
Sergey Kartashoff 8fe1b8e9d8 # More mnogosearch updates 2002-06-06 05:45:46 +00:00
82bc088c57 ChangeLog update 2002-06-06 00:22:05 +00:00
foobar 9f238de87b ws and indent fixes 2002-06-05 23:58:51 +00:00
foobar 12f6175f26 - Fixes a segfault reported in #17584 2002-06-05 23:24:23 +00:00
Sebastian Bergmann e449646b68 Remove unused local variable. 2002-06-05 18:17:19 +00:00
Andi Gutmans 2d6404d5b0 - Allow overloaded objects to receive the method name in its original
- case.
2002-06-05 17:34:56 +00:00
Markus Fischer 6c6ac37be4 - Headers are now rewritten to always have \r\n line endings for SMTP.
Also automatically removes superflous line breaks at
  the start and end of the header.
# http://cr.yp.to/docs/smtplf.html is a good read about this topic.
2002-06-05 17:08:38 +00:00
Derick Rethans 3fb8db4ca8 - Fix a problem in domxml_dump_mem(_file) with xmlKeepBlanksDefault not
being set. (patch by Rob Richards <rrichards@digarc.com>)
2002-06-05 15:24:49 +00:00
Sergey Kartashoff 3b1d852949 # mnogosearch work continued 2002-06-05 14:34:54 +00:00
Stefan Esser 23ceadfe2b fixed multiline header detection (':' is valid within following lines)
fixed fill_buffer to fill the buffer always completely
2002-06-05 13:35:34 +00:00
Sergey Kartashoff 30afc3585c more mnogosearch compilation fixes 2002-06-05 13:06:56 +00:00
Stefan Esser a06a3e1f7f fixing some crashbugs that can be triggered with bogus uploads. 2002-06-05 11:28:33 +00:00
Sergey Kartashoff 1e3b1d16c1 MnoGoSearch extension fixes to compile under latest
mnogosearch 3.2.4 and 3.2.5. Still does not compile with them,
but the work still in progress...
2002-06-05 10:11:04 +00:00
Derick Rethans 1db85d6651 - Fix memleak (patch by Stefan Sesser) 2002-06-05 09:56:28 +00:00
e9b12faedb NEWS update 2002-06-05 00:26:11 +00:00
9bfc10a0fa ChangeLog update 2002-06-05 00:24:06 +00:00
Derick Rethans 733ebde160 - Fix for bug #17462 (Patch by Edin Kadribasic) 2002-06-04 21:58:05 +00:00
Edin Kadribasic 9d04bf58e3 Sync with openbsd glob.c 1.19 2002-06-04 21:26:06 +00:00
Edin Kadribasic 9143760ecd Removed some leftover debugging code. 2002-06-04 21:15:35 +00:00
foobar 9a47e545f6 - Fixed the include paths for the needed libraries for bundled libgd.
- Removed files which are not needed with libgd2 from the PHP_NEW_EXTENSION.
2002-06-04 18:44:54 +00:00
Edin Kadribasic 3b3ec06ee7 Added function pcntl_alarm().
@- Added pctnl_alarm() function. (Edin)
2002-06-04 15:51:25 +00:00
Stig Bakken 4317a5c7a9 * sort package names in "pear list" 2002-06-04 15:25:23 +00:00
Joseph Tate 68845d9811 #Whitespace fix: Sorry 2002-06-04 14:30:12 +00:00
Joseph Tate 316f8f0764 Bug fix to #17560 submitted by Rob Richards 2002-06-04 14:20:54 +00:00
Mark L. Woodward 63ded04ef5 Added persistent connections, and automattic reconnect on
lost connections. Requires Phoenix 1.0
2002-06-04 13:59:46 +00:00
Markus Fischer b4bcdda57b - Fix ZTS built. 2002-06-04 08:54:14 +00:00
foobar 1528a3d1fb Fixed bug: #17535 2002-06-04 02:33:10 +00:00
foobar 2be8691887 fine tuning 2002-06-04 01:27:29 +00:00
foobar 1a06a2fa15 - Made the bundled libgd actually work. Fixed bug: #17244 2002-06-04 01:13:01 +00:00
529ad188e1 NEWS update 2002-06-04 00:24:58 +00:00
1fad1a1b96 ChangeLog update 2002-06-04 00:22:49 +00:00
Markus Fischer 8e8f75a864 - Move macro code into distinct function for easier debugging as suggested by
Andi.
2002-06-03 20:52:07 +00:00
Rasmus Lerdorf ca9c4270f8 Make sure len is defined here 2002-06-03 18:26:27 +00:00
Edin Kadribasic e7ab5766d6 Fixed array_rand() on ZTS platforms.
@- Fixed array_rand() on thread-safe platforms such as Windows. (Edin)
2002-06-03 17:49:48 +00:00
Markus Fischer 8060dae548 - Fix isatty() and ttyname() (Closes #17323, #17333). 2002-06-03 15:49:38 +00:00
Markus Fischer 44afb19d40 - Fix a leak and a crash. 2002-06-03 14:39:30 +00:00
Markus Fischer 504d7c2ebd - Add note about IIS/CGI and cgi.force_redirect gotcha 2002-06-03 11:11:41 +00:00
6277fb312e NEWS update 2002-06-03 00:26:00 +00:00
05c7e945e0 ChangeLog update 2002-06-03 00:24:11 +00:00
Stig Bakken b8ec647fc5 * fix bug that was re-introduced during merge 2002-06-02 23:59:41 +00:00
Markus Fischer 9a97d55647 - Only add the To: field with the $to parameter if we don't have it in the
custom header. This was the behaviour < 4.2.x (but it was broken, this one
  isn't).
# last commit for today, promised.
2002-06-02 23:39:59 +00:00
Markus Fischer d497ca147e - Revert fix for #14407. The From: header field IS different from the
sendmail_from field which is in fact the retturn path.
2002-06-02 22:54:48 +00:00
Markus Fischer 1ec78a1e18 - Try to fix most of the buffer overflows and dynamically allocate memory where
applicable.
2002-06-02 22:10:25 +00:00
Adam Dickmeiss 553eda4145 Use ZOOM API for newer YAZ versions. 2002-06-02 21:59:58 +00:00
Adam Dickmeiss 0315c1e1c9 report error when YAZ cannot be found 2002-06-02 21:58:35 +00:00
Stefan Roehrich cce0d2f72d Added "Vary: Accept-Encoding" header to zlib.output_compression
compressed output as with obgzhandler().
@ If zlib.output_compression is enabled and a page is compressed
@ a "Vary: Accept-Encoding" header is added. (Stefan)
# obgzhandler() sends this header, I think it is recommened by
# RFC 2616. If there are problems (e.g. with some browsers)
# it should be reverted.
2002-06-02 21:35:06 +00:00
Christian Dickmann ee44ad4f5b make 'pear remote-info' work with CLI 2002-06-02 20:24:50 +00:00
Christian Dickmann 19c946cce2 make 'pear search' work with CLI. fix a typo 2002-06-02 20:13:50 +00:00
Markus Fischer b04656ad40 - Finish implementation of custom smtp port (introduces "smtp_port" ini config). 2002-06-02 17:13:48 +00:00
Markus Fischer c43f813d8e - Rephrase comment 2002-06-02 16:25:06 +00:00
Markus Fischer 05293f09eb - Classig problem: right idea, wrong pointer ... 2002-06-02 15:29:07 +00:00
Christian Dickmann 0220472176 silence unlink() and rmdir(). fix a bug where wasn't set due to wrong ini setting 2002-06-02 14:27:15 +00:00
Stig Bakken f111dff665 * merge NEW_UI_API branch 2002-06-02 13:07:19 +00:00
b341789bb8 ChangeLog update 2002-06-02 00:26:59 +00:00
Stefan Roehrich 506282af5c WS change to make very old compilers/preprocessors (e.g. HP/UX 9)
happy (thanks to Andreas Ley for recognizing this).
2002-06-01 20:14:58 +00:00
Sascha Schumann 190b65f4a1 Fix build 2002-06-01 17:38:23 +00:00
Andi Gutmans f8a3bc3fdd - Fix build with Engine 2 2002-06-01 11:38:41 +00:00
Andi Gutmans 0d5862d75a - Reapply netware patch 2002-06-01 10:27:51 +00:00
Rasmus Lerdorf f01a42b499 Put Netware header and comment back in. My CVS revision id got messed
up somehow.
2002-06-01 09:54:28 +00:00
Sander Roobol a6abfcbbe7 Update cracklib path and comment it out (thanks to Urs Gehrig for the hint) 2002-06-01 09:53:07 +00:00
Frank M. Kromann 426b47837f Makring function declarations match implementations (ZTS compilation) 2002-06-01 05:45:25 +00:00
fbde334434 NEWS update 2002-06-01 00:36:08 +00:00
99b8d68583 ChangeLog update 2002-06-01 00:33:31 +00:00
Rasmus Lerdorf b66f48c3ce Oops 2002-05-31 23:52:07 +00:00
Rasmus Lerdorf 6b756ea46c @ Renamed getallheaders() to apache_request_headers() and kept
@ getallheaders() as an alias to it.  Also added apache_response_headers()
@ which returns the current response headers from Apache.
Renamed getallheaders() to apache_request_headers() and kept
getallheaders() as an alias to it.  Also added apache_response_headers()
which returns the current response headers from Apache.
2002-05-31 23:49:49 +00:00
foobar 73ab5708b4 Fixed typo.. 2002-05-31 23:20:04 +00:00
Tomas V.V.Cox 3a32f51b11 fread already detects EOF 2002-05-31 18:49:47 +00:00
Tomas V.V.Cox 5d43ef2cd0 Be able to handle strings as well as arrays in _multipleToStruct() 2002-05-31 18:12:56 +00:00
Tomas V.V.Cox 5cb633933f - Make mkTemp() automatically removed temporary created files
or dirs at script shutdown time
- Remove unnecesarry PEAR inheritance
- Some PHPDoc fixes
2002-05-31 17:47:19 +00:00
Andi Gutmans 00e25fd42a - Add zend_objects_API.* to dsp 2002-05-31 15:34:36 +00:00
Andi Gutmans 006c46e920 - Fix build (one more coming up) 2002-05-31 15:34:12 +00:00
Andi Gutmans 478ed1cf82 - Fix build 2002-05-31 14:32:19 +00:00
Sebastian Bergmann 1020ecd5bb Add zend_objects_API.c to project. 2002-05-31 14:24:57 +00:00
Brad LaFountain fa60d31d27 Changed PHP_EXPORTS to DOMXML_EXPORTS as Edin Kadribasic suggested 2002-05-31 13:38:58 +00:00
Stanislav Malyshev f75f3cff82 Generalize object storage and reference bookkeeping 2002-05-31 12:09:19 +00:00
Harald Radi d3383bab2d added wez to the com extension 2002-05-31 10:06:19 +00:00
Harald Radi d1b01b92ab added wez and ordered names alphabetically 2002-05-31 09:43:22 +00:00
Venkat Raghavan S ecdbaeced1 Removed ugly code done as part of NetWare change, upon Andi's advice. Now, the typecasting is done for all platforms. 2002-05-31 09:07:12 +00:00
Derick Rethans f3c71c43b0 - Don't issue a notice when no file was uploaded 2002-05-31 09:05:39 +00:00
Brad LaFountain 5313321e08 initalize variable in domxml_doc_document_element() 2002-05-31 06:14:29 +00:00
Brad LaFountain 2eb29ca917 defined PHP_EXPORTS for exporting php_domobject_new() 2002-05-31 06:01:50 +00:00
Brad LaFountain e6fa086537 added the ability to use new keywork with domxmls objects "new DomDocument()"
instead of xmldoc. This also allows you to create nodes without having
  a whole document "new DomElement("foo")".

moved DOMXML_API_VERSION to php_domxml.h
exposed php_domobject_new for other extensions to use
removed some un-needed code
2002-05-31 05:58:40 +00:00
Venkat Raghavan S 575e3682f5 NetWare related changes 2002-05-31 04:49:45 +00:00
Venkat Raghavan S c4fd805ce4 NetWare related additions / changes to build mod_php 2002-05-31 04:42:02 +00:00
4ef5f9ec71 NEWS update 2002-05-31 00:24:41 +00:00
6d1a3716dd ChangeLog update 2002-05-31 00:23:07 +00:00
Harald Radi acc1021f0d #forgot something 2002-05-30 23:17:48 +00:00
Harald Radi d3ca5abab7 @ Added missing AddRef() calls in the COM extension. This should
@ fix weird behaviour (in particular with ADODB). (Harald)

# waah, this suxx
2002-05-30 23:07:23 +00:00
Sander Roobol 219aa68a30 Add missing .cvsignore 2002-05-30 14:47:00 +00:00
Markus Fischer 39f16dbc65 - Tell the user why his session doesn't work if he uses custom session_id()s. 2002-05-30 11:41:37 +00:00
Markus Fischer 82cc9a9404 - Typo
# Zorflix!
2002-05-30 10:24:52 +00:00
Markus Fischer 3d81af807d - Give some useful updates to Win32/Apache/PHP4 installation. Also mention
strace for advanced users.
# Probably a lot of spelling/grammar errors, feel free to correct, thx.
2002-05-30 10:16:16 +00:00
Den V. Tsopa 509df14ff4 Fixes some dummy errors (again). 2002-05-30 10:10:16 +00:00
Jan Lehnardt 57adfb0dec - add testcase for PEAR::delExpect() 2002-05-30 09:39:52 +00:00
Venkat Raghavan S bc95839f19 NetWare changes 2002-05-30 08:52:21 +00:00
Venkat Raghavan S b47980e0ce NetWare changes for ZE2 2002-05-30 08:50:33 +00:00
Cliff Woolley 46eeabccf7 That macro is and always was hopelessly broken, which is why it's
now deprecated.
2002-05-30 06:07:28 +00:00
26812c4902 NEWS update 2002-05-30 00:28:00 +00:00
e996b83167 ChangeLog update 2002-05-30 00:24:32 +00:00
Jan Lehnardt 5ec88a3b73 - minor improvement of readability,
#thanks richy ;)
2002-05-29 21:55:52 +00:00
Jan Lehnardt 998ef91cad - added delExpect() API method. It allows to unset one or more expected
- error codes.
 - requires _checkDelExpect() (private) which I added as well.
 - inspired by chregu (PHP-Deluxe, page 75)
2002-05-29 21:41:27 +00:00
Den V. Tsopa 1da8768cae Added GB2312 alias for CN-GB 2002-05-29 09:15:28 +00:00
Venkat Raghavan S c61598f32b Changes to build TSRM on NetWare 2002-05-29 08:41:21 +00:00
Derick Rethans b049f9bf17 - Fix for bug #17503 2002-05-29 08:40:43 +00:00
Den V. Tsopa 9cd5bf77a7 @Fixed some dummy errors. (dets) 2002-05-29 08:33:23 +00:00
Venkat Raghavan S ab699a7c2b Change to build on NetWare: TSRM_CONFIG.H not required 2002-05-29 05:16:58 +00:00
Venkat Raghavan S 423eca4e05 Changes to build Zend on NetWare 2002-05-29 05:16:17 +00:00
1d790e4916 ChangeLog update 2002-05-29 00:26:35 +00:00
Andrei Zmievski c174a15a60 Fix a bug in case statement. 2002-05-28 16:30:16 +00:00
Venkat Raghavan S f3bfe97520 SDK directory path change 2002-05-28 09:25:57 +00:00
Venkat Raghavan S d69261d12c Basic NetWare changes 2002-05-28 08:54:17 +00:00
Venkat Raghavan S c223987fa2 Makefiles and batch file required to build Zend and TSRM 2002-05-28 06:51:10 +00:00
Venkat Raghavan S dd1bf198dc *** empty log message *** 2002-05-28 05:33:08 +00:00
Stig Bakken 43beb1deda * 0.11 release coming up 2002-05-28 01:22:41 +00:00
Stig Bakken a0b0ad161f * drop package-info command (deprecated by "info") 2002-05-28 01:21:47 +00:00
Stig Bakken 1ed83e4970 * update test 2002-05-28 01:21:26 +00:00
Stig Bakken ecf93ec1fd * update 0.11 release notes
* move build logic into PEAR_Builder
2002-05-28 01:01:43 +00:00
Stig Bakken 599cede43e * disable *&$^*#@ runtime ^@#*&$@ magical ^*!@@!! quoting 2002-05-28 00:45:19 +00:00
Stig Bakken 0adf7e2530 * sync up 2002-05-28 00:35:16 +00:00
Stig Bakken 52a00c9a0c * disable magic_quotes_runtime (what a broken concept!!) while
reading config files
2002-05-28 00:31:04 +00:00
7917b3f253 ChangeLog update 2002-05-28 00:21:26 +00:00
Stig Bakken 819dd35055 * fix some errors/warnings
* install data and test files now
2002-05-28 00:11:41 +00:00
Stig Bakken 245ca5aa7c * added data_dir and test_dir 2002-05-28 00:01:19 +00:00
Stig Bakken 926dcdc854 * moved the --without-pear compat defines to the right place 2002-05-27 22:28:26 +00:00
Stig Bakken 076202e02c * change root for documentation files to <peardir>/docs 2002-05-27 22:27:40 +00:00
Stig Bakken 731f6a2a97 * treat umask as octal in "config-set" command 2002-05-27 21:59:19 +00:00
Stig Bakken 216986ff42 * use new Archive_Tar gzip autodetection 2002-05-27 21:36:28 +00:00
Stig Bakken 1794f9c922 * prepare 0.9 release 2002-05-27 20:57:01 +00:00
Stig Bakken 94ca53c871 * fixed a bug in PEAR_Config::set() that broke validation of "set" parameters 2002-05-27 19:37:17 +00:00
Stig Bakken 3337c2d307 * better gzip detection (magic cookie) 2002-05-27 19:28:09 +00:00
Andi Gutmans 65b11e4aae - Hope this is the last commit in the series. Make sure that the .h file
- also goes into ext/standard. I'm not sure how 4.2.1 was built with these
- broken files
2002-05-27 14:47:03 +00:00
Andi Gutmans 1fa0bd479a - One more try. 2002-05-27 14:07:41 +00:00
Andi Gutmans 8b95b42bd0 - Isn't Makefile.frag being called? (Weird) 2002-05-27 14:01:10 +00:00
Andi Gutmans 13a6426bd6 - Be a bit more verbose 2002-05-27 13:36:43 +00:00
Hartmut Holzgraefe f404c23b5f moved to PECL 2002-05-27 13:14:02 +00:00
Stig Bakken a618f2cd8b * fixes for php without zlib 2002-05-27 12:45:03 +00:00
Stig Bakken f3c5fea7a4 * make Archive_Tar auto-detect whether zlib is needed based on file
extension (.tar -> no zlib)
2002-05-27 11:59:09 +00:00
Andi Gutmans d351f618fc - Small update 2002-05-27 05:48:01 +00:00
Stig Bakken e59a6c28d5 * update version 2002-05-27 01:22:59 +00:00
Stig Bakken 622c684164 * first shot at "pear build" command for building extensions from C code 2002-05-27 01:20:10 +00:00
735f4a129f NEWS update 2002-05-27 00:24:21 +00:00
84439fe2dd ChangeLog update 2002-05-27 00:23:53 +00:00
Stig Bakken 5f7cdc85da * "info" command 2002-05-27 00:22:01 +00:00
Stig Bakken cb097ffded * added config-help command 2002-05-27 00:21:36 +00:00
Stig Bakken 17e6e108ac * drop "any" as a valid preferred_state 2002-05-27 00:20:03 +00:00
Stig Bakken d4eb209a6a * more verbose docs for "verbose" :) 2002-05-27 00:16:40 +00:00
Stig Bakken d0cfe03194 * un-indent description too 2002-05-26 23:38:22 +00:00
Stig Bakken 0f26462418 * try being smart about de-indenting release notes from the xml 2002-05-26 23:33:01 +00:00
Stig Bakken 6e462e2880 * PEAR_Frontend_Web is coming! 2002-05-26 22:11:17 +00:00
Andi Gutmans 6e4c046025 - Small fix 2002-05-26 21:26:38 +00:00
Andi Gutmans 779c11af21 - Update genfiles for new build system 2002-05-26 21:05:38 +00:00
Tomas V.V.Cox 25b78bc5bd Added "pear -V" (show version information) 2002-05-26 19:42:13 +00:00
Stig Bakken d3926c1e7e * another help fix 2002-05-26 19:19:34 +00:00
Andi Gutmans 459c6d0fd6 - Add empty zend_multibyte.c to allow build with 4.3.0-dev. 2002-05-26 19:17:49 +00:00
Tomas V.V.Cox 8cd936095b Make the error handling work again since the new internal command
structure
2002-05-26 19:08:21 +00:00
Martin Jansen e75fe514a1 * Add /me has helper. 2002-05-26 18:06:04 +00:00
Stig Bakken 5819f202f9 * bold column headings 2002-05-26 17:48:40 +00:00
Stig Bakken 457af88cf4 ^t 2002-05-26 17:46:21 +00:00
Tomas V.V.Cox f2f69974e9 "Help" fixes 2002-05-26 17:37:52 +00:00
Edin Kadribasic 2d953b348a Merge from cli. 2002-05-26 13:12:30 +00:00
Stig Bakken 177872f0a5 * add package.dtd to the distribution 2002-05-26 12:56:11 +00:00
Stig Bakken 7168cb0567 * roll out 0.10 2002-05-26 12:54:19 +00:00
Stig Bakken c4e4b05c05 * focus on the present 2002-05-26 12:54:08 +00:00
Stig Bakken a12d71be8a * add @nodep stuff here too 2002-05-26 12:53:26 +00:00
Stig Bakken d6881ebba1 * be nice to PEAR_Common::detectDepdencencies() 2002-05-26 12:52:16 +00:00
Stig Bakken e71d497bef * more work on the dependency detector 2002-05-26 12:51:32 +00:00
Stig Bakken f1882b9fc5 * Console_Getopt POSIX fix 2002-05-26 12:51:10 +00:00
Stig Bakken ea14cadea2 * phpdoc fixes (un-break the broken) 2002-05-26 12:50:36 +00:00
Edin Kadribasic af5663fa50 Due to the way Zend handles exit() we cannot rely on the return code
of php_execute_script.
2002-05-26 12:43:20 +00:00
Edin Kadribasic 190719ab97 Made constants persistent and fixed a memory leak. 2002-05-26 12:20:35 +00:00
Stig Bakken 39ba363638 * POSIX getopt compatibility support (first argv element is the command) 2002-05-26 12:13:47 +00:00
Stig Bakken 6b2d3bba17 * tidy output a bit 2002-05-26 12:13:05 +00:00
Stig Bakken 90efd3abe6 @Fix segfault in version_compare() (Stig) 2002-05-26 12:01:30 +00:00
Stig Bakken 7132d9e56f * cleaned up error handling in _installFile 2002-05-26 11:46:11 +00:00
25c43a6bbe ChangeLog update 2002-05-26 00:18:45 +00:00
Martin Jansen cbdcb20b37 * Make rel_trans from doPackageInfo globally available.
* Add command "package-dependencies" (shortcut "pd") to list the
  dependencies of a package.
2002-05-25 09:03:19 +00:00
Stig Bakken 0aa275f3ae * typo caught by PEAR_Common::detectDependencies :) 2002-05-25 00:43:58 +00:00
6e3b6d0cf8 ChangeLog update 2002-05-25 00:21:35 +00:00
Rui Hirokawa d3012238bc reverted my patch. 2002-05-24 22:30:24 +00:00
Rui Hirokawa ee480a7ec8 reverted patch to support iso2022kr. 2002-05-24 22:28:42 +00:00
Sander Roobol b80c27f7ae Fix <head> and <body> tags in phpinfo() output (#17411) 2002-05-24 17:25:40 +00:00
Sebastian Bergmann a014080299 Fugbix typo. 2002-05-24 08:46:32 +00:00
Andi Gutmans f657df14be - Add a bit of information. 2002-05-24 08:32:18 +00:00
Edin Kadribasic 1501657b2f Register STDIN, STDOUT, and STDERR "constants" in cli in cases where
script itself is not being loaded from STDIN.

This enables constructs like fwrite(STDERR, "Error 42");
2002-05-24 01:17:37 +00:00
aafc03c45b NEWS update 2002-05-24 00:28:11 +00:00
75ea340506 ChangeLog update 2002-05-24 00:26:45 +00:00
Derick Rethans de2c71e7cb - Added support for compressed SWF (Flash MX) files to getimagesize().
(Fixes feature request #17272).
@- Added support to getimagesize() for compressed Flash MX files. (Derick)
2002-05-23 21:48:27 +00:00
Tomas V.V.Cox 6ec69deaf6 TODO++
Check dependencies break on package uninstall (when no force given)
2002-05-23 20:42:33 +00:00
Tomas V.V.Cox 5ab1f810b9 Fix package dependency check (reported by Rasmus) 2002-05-23 20:37:58 +00:00
Andrei Zmievski 001b4c71e4 This code adds string offset capturing in preg_split() results. Original
patch by David Brown, modified by me.
2002-05-23 17:22:05 +00:00
Andi Gutmans fc059f5e40 - Fix typo 2002-05-23 14:28:14 +00:00
Wez Furlong e202ad5c8b Add simple test case for proc_open 2002-05-23 10:46:06 +00:00
Wez Furlong 4fd00c9502 Fix (stupid) segfault. #17379 2002-05-23 10:17:07 +00:00
Derick Rethans 708f980389 - Fix unchecked return values with parameters to proc_open. (Fixes
bug #17375)
2002-05-23 07:52:03 +00:00
Derick Rethans c37d2a97ac - Fix errormessage and whitespace 2002-05-23 07:08:25 +00:00
Yasuo Ohgaki b768cf0322 Added 4th parameter to specify enclosure character. Patch by Dean Richard Benson <dean@vipersoft.co.uk>
Spit more meaningful error messages when delim and/or enclosure char is null.
2002-05-23 07:03:43 +00:00
da1545b404 ChangeLog update 2002-05-23 00:25:48 +00:00
foobar dc26e8d8f5 Skip POST data if it is empty. 2002-05-22 23:40:29 +00:00
Andi Gutmans 19a5bcf297 - makedist script for creating Engine 2 distribution.
- Hopefully we can get a preview out in the next few days.
2002-05-22 15:51:48 +00:00
Tomas V.V.Cox 613f08a231 Trigger an error if the run-test.php file is not found
Make the run-tests pear cmd run with the CGI SAPI
2002-05-22 12:44:21 +00:00
Tomas V.V.Cox ae126450c9 Test first if the package exists before comparing the version
(fix the version_compare() segfault)
2002-05-22 01:23:12 +00:00
a5bdd68198 ChangeLog update 2002-05-22 00:26:48 +00:00
Tomas V.V.Cox 4d10d79c3e Make pear -vv XXX set the XML_RPC debug flag 2002-05-22 00:15:27 +00:00
Wez Furlong 64df5577bf Add README and CREDITS... 2002-05-22 00:03:02 +00:00
Wez Furlong 139fd6a8e4 Fix bug when length was queried before the string was converted. 2002-05-22 00:02:35 +00:00
Wez Furlong 762effcf60 Add documentation comment for properties in com_print_typeinfo 2002-05-21 22:44:10 +00:00
Wez Furlong fbf920d9a3 Enhance com_print_typeinfo.
The main expected use is like this, for figuring out what methods
are allowed for a COM object:

$ie = new COM("InternetExplorer.Application");
// Prints class definition for IE object
com_print_typeinfo($ie, "InternetExplorer.Application", false);
// Prints class definition for default IE event handler
com_print_typeinfo($ie, "InternetExplorer.Application", true);
2002-05-21 22:41:45 +00:00
Andrei Zmievski 634746ece9 *** empty log message *** 2002-05-21 21:24:09 +00:00
Andrei Zmievski f08e0ef9d4 Fix bug #16939. 2002-05-21 21:23:20 +00:00
Wez Furlong 8a53a89a94 Correct usage of convert_to_string_ex which is not allowed to zval* 2002-05-21 20:57:04 +00:00
Wez Furlong c05834fbce Reformat some comments. 2002-05-21 20:51:31 +00:00
Wez Furlong e2b9f0d964 Fix a flag, remove an old comment. 2002-05-21 20:46:08 +00:00
Wez Furlong e04d6ca9f7 - Make sure that COM and VARIANT resources are returned as resources
rather than longs.
- Make the IDispatch implementation a bit more generic (and
  fix my mess of pointers).
- Add new com_message_pump() function that acts like an interruptible
  usleep() that processes COM calls/events.
- Add new com_print_typeinfo() function for "decompiling" the typeinfo
  for an interface into PHP script.  This is useful for generating a
  skeleton for use as an event sink.
- Add new com_event_sink() function for sinking events from COM
  objects.  Usage is like this:

<?php

class IEEventSinker {
	var $terminated = false;

	function ProgressChange($progress, $progressmax) {
		echo "Download progress: $progress / $progressmax\n";
	}
	function DocumentComplete(&$dom, $url) {
		echo "Document $url complete\n";
	}
	function OnQuit() {
		echo "Quit!\n";
		$this->terminated = true;
	}
}

$ie = new COM("InternetExplorer.Application");

$sink =& new IEEventSinker();
com_event_sink($ie, $sink, "DWebBrowserEvents2");

$ie->Visible = true;
$ie->Navigate("http://www.php.net");

while(!$sink->terminated) {
	com_message_pump(4000);
}
$ie = null;
?>
2002-05-21 18:58:11 +00:00
Hartmut Holzgraefe 8a6f6fca1d ZTS issues fixed 2002-05-21 12:02:44 +00:00
Hartmut Holzgraefe 7f732313a7 not beautifull (yet), but should fix ZTS builds 2002-05-21 10:14:12 +00:00
Tomas V.V.Cox 743ad31884 files that are not installed should be removed from the
registered file list (TODO--)
2002-05-21 09:19:46 +00:00
Stig Bakken d8d42fcc59 * show installed_as instead of a "calculated" path for installed packages 2002-05-21 07:18:48 +00:00
Stig Bakken 86a043d250 * add TODO comment 2002-05-21 07:16:35 +00:00
Sebastian Bergmann ae6b6359d7 Add HAVE_MBSTR_RU support for Win32. 2002-05-21 07:15:42 +00:00
Sebastian Bergmann 4405b313c5 ZTS fixes. 2002-05-21 07:10:26 +00:00
Stig Bakken e7ccd22d5e * disable wrapping for now 2002-05-21 07:00:45 +00:00
Den V. Tsopa 4974e6073e Added russian codepages (koi8-r,cp1251,cp866) support. 2002-05-21 07:00:34 +00:00
Tomas V.V.Cox 5700c0d421 Some minor error verbosity updates 2002-05-21 02:31:23 +00:00
Tomas V.V.Cox 39b4baccbe doListRemote -> doRemoteList 2002-05-21 02:28:08 +00:00
Tomas V.V.Cox 2133d0f4ac Make the installation of a package fail when _installFile
fails and "force" is not set
2002-05-21 02:11:42 +00:00
Stig Bakken 6eb5ad0f53 * list command no longer displays test and data files when listing
installed files
2002-05-21 02:04:03 +00:00
Stig Bakken c8ea5b26d2 * package-list command no longer needed ("list" does the same thing and
more)
2002-05-21 01:44:06 +00:00
Stig Bakken cea551cf93 * rename shell-test shortcut to st (was stest) 2002-05-21 01:40:35 +00:00
Stig Bakken dd6b25cfcb * added more shortcuts 2002-05-21 01:38:50 +00:00
Stig Bakken 7ecfacedad * implemented shortcuts ("pv" for "package-validate" etc.)
do "pear help shortcuts" to see what shortcuts exist
* renamed "list-installed" command to "list" and made it able to
  list the contents of installed packages as well as tar/tgz/xml files
* added some more/better command docs
* fixed up the synopsis part in the help output
* display option parameters (--foo=bar, where bar is specified in
  'shortarg' as for example 'f:bar')
* renamed list-remote-packages to list-remote
* renamed remote-package-info to remote-info
2002-05-21 01:27:53 +00:00
Stig Bakken f208968c9f * make infoFromAny actually work :) 2002-05-21 01:20:51 +00:00
Stig Bakken 3cb61284ad * better wording 2002-05-21 01:20:24 +00:00
Edin Kadribasic 16e9e77e2a Fix for #17315. Requires client library 7.2 or greater to compile. 2002-05-21 01:03:13 +00:00
00211c2e0c ChangeLog update 2002-05-21 00:23:07 +00:00
Markus Fischer 94501132c6 - Fix posix_isatty() and posix_ttyname() (Closes #17323) 2002-05-20 23:26:13 +00:00
Stig Bakken d24f7420d0 * disable debug in XML_RPC fallback 2002-05-20 22:29:52 +00:00
Wez Furlong 3fca69809d Use the GIT for inter-thread marshalling. 2002-05-20 22:22:57 +00:00
Markus Fischer 601cf3690c - Add safe_mode/uid and open_basedir check to zip_open() (closes #16927). 2002-05-20 18:33:08 +00:00
Markus Fischer 720a890f84 - ZTS gotcha 2002-05-20 17:41:35 +00:00
Markus Fischer 96bf2d1deb - Add open_basedir check for all functions using php_stat() (filesize, stat,
etc), closes #11563.
2002-05-20 17:18:18 +00:00
Harald Radi 02a13a4ec4 this way it even compiles
#blame me if i did something wrong, i didn't test it ;)
2002-05-20 15:38:19 +00:00
Harald Radi e47a667cc9 integrating wez's patch 2002-05-20 15:35:57 +00:00
Stig Bakken 6553e94791 * new command setup 2002-05-20 11:37:33 +00:00
Stig Bakken 324c342527 * upgrade bundled XML_RPC package to 1.0.3 2002-05-20 11:35:33 +00:00
Stig Bakken 344ba505b9 * new installer rule that does not depend on bash 2002-05-20 10:46:01 +00:00
Stig Bakken 2034c61557 * _infoFromAny goes public! 2002-05-20 10:45:23 +00:00
Stig Bakken 840b5f8e67 * some verbosity changes: 0 - only errors, 1 - status report when the
install is done, 2 - show each operation, 3 - show file operations
2002-05-20 10:44:53 +00:00
Stig Bakken 9cd470d160 * no output in verbosity level 0 2002-05-20 10:43:29 +00:00
Stig Bakken 5c7623ee86 * added PEAR_Config::removeLayer() 2002-05-20 10:42:47 +00:00
Stig Bakken a31e8b7373 * remove getCommands() from here
* added options to "pear cvstag": -q -Q -d -F
2002-05-20 10:31:12 +00:00
Stig Bakken 454a31121c * support multiple -v and -q options 2002-05-20 10:27:16 +00:00
Stig Bakken b1bcf9d794 * forgot to update the release date 2002-05-20 10:21:01 +00:00
Stig Bakken fa6d66d6d2 * fix fix 2002-05-20 09:54:37 +00:00
Stig Bakken 9178695c37 * merge 0.4 files from /pear/Archive_Tar 2002-05-20 09:05:52 +00:00
Stig Bakken 89fb60f049 * prepare 0.10 2002-05-20 08:58:46 +00:00
Stig Bakken 845e6f86bc * remove run() from this class 2002-05-20 08:56:00 +00:00
Zeev Suraski 0450ab9462 MFZE1 (Expose more C++ APIs) 2002-05-20 07:17:30 +00:00
Wez Furlong bc068a9c99 This somehow got undone when I committed the rest... 2002-05-20 05:08:40 +00:00
Yasuo Ohgaki 62b8c29083 Fixed possible pg_lo_write() overflow and make it more fail safe. 2002-05-20 01:40:22 +00:00
Wez Furlong 935809872a Add activescript sapi to the workspace 2002-05-20 01:37:01 +00:00
Wez Furlong e754361405 Implement ActiveScript interfaces.
This allows use of PHP in:
  Client-side script in Internet Explorer
  Windows Scripting Host
  ASP and ASP.NET pages
It's mostly working... give it a go.
You will need to regsvr32 the php4activescript.dll manually.
2002-05-20 01:35:29 +00:00
Wez Furlong 50f7427e69 Protect C code with extern "C" 2002-05-20 01:32:48 +00:00
Wez Furlong fc964e88d3 Added generic COM wrapper for PHP objects. 2002-05-20 01:31:48 +00:00
Tomas V.V.Cox 3b97fe3657 Added missing key 'doc' for -Z help 2002-05-20 01:22:00 +00:00
Tomas V.V.Cox 3716f28350 Fix small bug making the baseinstalldir attrib persist 2002-05-20 01:17:09 +00:00
Yasuo Ohgaki c6873da401 Improve large object performance. pg_lo_read() and pg_lo_read_all() should perform
much better now.
Fixed Old API support for pg_lo_import().
2002-05-20 01:02:29 +00:00
2c9f3460dc ChangeLog update 2002-05-20 00:24:47 +00:00
Stig Bakken 7542066eef * no need for getCommands() here 2002-05-20 00:17:43 +00:00
Stig Bakken c2d1d3fc82 * new command setup 2002-05-20 00:15:52 +00:00
Stig Bakken 9fd5019fed * typo fixes, wrapping 2002-05-20 00:11:15 +00:00
Stig Bakken 71c7fe0d8f * install pear.bat on Windows only 2002-05-19 21:45:45 +00:00
foobar 14f05fbbc7 Make this actually work somewhat better.. 2002-05-19 21:39:59 +00:00
Edin Kadribasic 46cb400a3b Give due credit to Markus. 2002-05-19 16:58:05 +00:00
Stig Bakken f19b566a40 * compat fix 2002-05-19 16:32:18 +00:00
Markus Fischer f361189067 - Mention the availability of glob(). 2002-05-19 16:17:23 +00:00
Tomas V.V.Cox 93b603861e Put "pear help options" working again 2002-05-19 15:50:36 +00:00
Tomas V.V.Cox 26493531d4 Put "pear help command" working again 2002-05-19 15:44:47 +00:00
Sander Roobol 3f156fe6f9 Fix php.ini-related stuff in run-tests.php 2002-05-19 14:48:27 +00:00
Sander Roobol 751cd67cc0 get_cfg_var("get_file_path") didn't work correctly when an alternative
php.ini _file_ was specified using -c
2002-05-19 14:45:31 +00:00
Edin Kadribasic 544694255a Added glob() support for windows. 2002-05-19 14:32:24 +00:00
Sander Roobol 295e8e5bd4 It's get_cfg_var() not cfg_get_var() 2002-05-19 14:16:41 +00:00
Sander Roobol e3490f1429 Fix temporary filename problems, and update .cvsignores with new extensions 2002-05-19 13:54:37 +00:00
Sander Roobol f3a8a7d6bb Fix make test and remove a warning 2002-05-19 13:24:38 +00:00
Sander Roobol c9872c9199 Cleaned up run-tests.php, and fixed it on linux/unix
# and probably broke it on windows :)
2002-05-19 13:16:03 +00:00
Stig Bakken 6dce2376da * new command setup 2002-05-19 06:48:40 +00:00
Stig Bakken 6eee62645b * support platform-specific files 2002-05-19 06:19:26 +00:00
Stig Bakken d7ef0b964b * take uname as optional constructor parameter 2002-05-19 06:13:07 +00:00
8d6ee9ae84 ChangeLog update 2002-05-19 00:21:19 +00:00
foobar 9c0d95cde4 Typo fixes 2002-05-19 00:06:26 +00:00
foobar 3b9401a3ed DO NOT use C++ comments! 2002-05-19 00:02:07 +00:00
Christian Stocker ccd962e155 - delete attributes as well in php_free_xml_node
- more consistent naming in phpinfo()
2002-05-18 20:19:43 +00:00
Christian Stocker b692311fdd added "domxml API version" in phpinfo() output. 2002-05-18 17:07:59 +00:00
Christian Stocker def8bc92fc mem leak fix for domxml_dump_node 2002-05-18 14:38:22 +00:00
Christian Stocker 987ab91efb fixes memleak in html_dump_mem 2002-05-18 14:23:31 +00:00
Christian Stocker 81c8b8e7a4 rename the object name for comment nodes to domcoment 2002-05-18 14:21:46 +00:00
Markus Fischer 25a616d7aa - Fix portability issues with empty results on Linux and FreeBSD, add safe_mode
check and simplify code.
# Hartmut, what was the VCWD check for ?!
2002-05-18 13:31:31 +00:00
Christian Stocker 034d684089 WS fixes 2002-05-18 10:05:21 +00:00
Christian Stocker f275fe0b0b This should fix a big bad memory leak in freeing the nodes at script end. 2002-05-18 09:35:28 +00:00
ab5d1ccb9f ChangeLog update 2002-05-18 00:23:28 +00:00
Sascha Schumann d7edeee55f Improve readability of the header send function 2002-05-17 21:22:30 +00:00
Markus Fischer bd34eea40a - Stuff all Win32 mail() changes together. 2002-05-17 16:21:52 +00:00
Jon Parise 64eaef11ad Credit where credit is due. 2002-05-17 16:17:07 +00:00
Markus Fischer aec7987d9e - Win32 mail() is no longer case-sensitive when it comes to match for any headers
(e.g. from:, cc:, etc).
# Fixed also a crash I introduced earlier, which tells me no one tested it :)
2002-05-17 16:16:27 +00:00
Preston L. Bannister 34941b1ba6 Re-add "tests" project - this is the only change to file. For some reason MSVC chose to put "" around all the project file names. (Why? Ask Microsoft :). Perhaps different patch levels on MSVC6?). These files are not hand-edited. 2002-05-17 15:22:02 +00:00
Wez Furlong 7ae1630a97 proto tweak 2002-05-17 12:42:40 +00:00
Wez Furlong c347e0ce88 Add an optional flag to sem_get that specifies if the semaphore should be
automatically released on request shutdown. (#16986)
Fix a segfault in sem_remove (#17274)
2002-05-17 12:33:49 +00:00
Joseph Tate e8c2102659 Reverted the last commit which moved all the projects around.
#Preston, please re-add your make-test project, but this time don't move around
#the other projects in the process.
2002-05-17 09:13:45 +00:00
Cliff Woolley 8283979afc Allow the version checks for --with-apxs= and --with-apxs2= to work
with development version of Apache, whose version strings end in "-dev",
eg "Apache/2.0.37-dev".

PR: 17233
Submitted by: Dale Ghent <daleg@elemental.org>
2002-05-17 08:07:14 +00:00
Cliff Woolley 34d471d22e Only the last cookie was getting set. (You can have
more than one Set-Cookie: header, as indicated by
http://wp.netscape.com/newsref/std/cookie_spec.html.)

PR: 16626
Submitted by: regina@hitel.net
2002-05-17 07:10:19 +00:00
Cliff Woolley 57a4a7ed39 apache 2.0's apache_lookup_uri() was returning an array rather than an
object, which contradicted both the documentation and the behavior of the
same function under apache 1.3.

PR: 14999
2002-05-17 06:32:04 +00:00
Cliff Woolley 78cac2a42e * restore the php_flag and php_admin_flag Apache directives which for
some mysterious reason never made their way from sapi/apache to
  sapi/apache2filter when it was first written  PR: 16629
* change the allowed locations of php_admin_value (and php_admin_flag to
  match) to ACCESS_CONF instead of OR_NONE to match sapi/apache.  No
  idea why it was ever OR_NONE.  PR: 16489
2002-05-17 05:16:18 +00:00
Preston L. Bannister 3d4d3e3330 Default INI file used with run-tests.php 2002-05-17 03:43:18 +00:00
5107548856 NEWS update 2002-05-17 00:25:55 +00:00
df2dd9b1ce ChangeLog update 2002-05-17 00:23:24 +00:00
Christian Stocker 78acc6d865 - replaced domxml_doc_document_element implementation do use libxml2 method
- renamed domxml_add_root to domxml_doc_add_root (and added alias for BC)
- aliased $doc->get_root to domxml_document_element
@ - added domxml_doc_set_root to change the root node (Lukas Schroeder)
2002-05-16 21:59:26 +00:00
Preston L. Bannister 5c1d215976 More detailed/explanatory output. 2002-05-16 21:57:24 +00:00
Preston L. Bannister 285b73fa1f Make failed case tell you what was different. 2002-05-16 21:56:44 +00:00
Preston L. Bannister c2c16263e8 Make test valid for either "register globals" setting. 2002-05-16 21:56:08 +00:00
Preston L. Bannister e3ae02255b Restrict ctype tests to POSIX portable characters (0..127) and add numeric character tests. 2002-05-16 21:55:26 +00:00
Preston L. Bannister 1fdff888ce Remove leading "./" from include filenames as in PHP this defeats include_path. 2002-05-16 21:53:18 +00:00
Preston L. Bannister 90fa54c9d8 Add "tests" project to invoke run-tests.php (unit tests). 2002-05-16 21:49:50 +00:00
Preston L. Bannister 3d1d6022cd Updated to run cleanly on Win32, and perform a more controlled test. 2002-05-16 21:48:28 +00:00
Preston L. Bannister b1dbd42c4b Add TEST_PHP_DETAILED usage for verbose test runs. 2002-05-16 21:46:32 +00:00
Preston L. Bannister 7fa0e68dcc Fix typo in SKIP clause. 2002-05-16 16:07:47 +00:00
Preston L. Bannister 6b2ab5f66d Adjust dirname() on Win32 to match CWD per drive semantics. 2002-05-16 16:04:45 +00:00
Preston L. Bannister aa0702f051 dirname() checks that work for both Unix and Win32. 2002-05-16 15:59:39 +00:00
Rasmus Lerdorf adf701a3ef Grr.. I keep leaving my debug in... 2002-05-16 14:42:22 +00:00
Rasmus Lerdorf 5d286e21ea Fix for #17271
@ Fix crash bug in stripslashes() when working in sybase mode (Rasmus)
2002-05-16 14:41:15 +00:00
Preston L. Bannister 0b70f9e884 Range check arguments to mb_strcut().
Test ext/mbstring/013.phpt causes a hard failure w/o this.
2002-05-16 12:31:05 +00:00
Preston L. Bannister 9d3ed920b5 Proper declaration to suppress compiler warning. 2002-05-16 12:07:11 +00:00
foobar 2f12941fac - Made all is_*() functions to return only boolean values.
- Killed the "file not found" error for is_link(). (finally..)
2002-05-16 01:07:21 +00:00
87cf8f005d ChangeLog update 2002-05-16 00:20:06 +00:00
Preston L. Bannister e2da502e03 Win32 project and makefile used to invoke run-tests.php 2002-05-15 23:56:04 +00:00
Frank M. Kromann 7ca89cedf7 Fixing the mssql_query to handle multiple results correct if the first result does not return any data. 2002-05-15 18:07:17 +00:00
Harald Radi 37b9089bfa this should finally fix bug #14353 2002-05-15 17:59:48 +00:00
Frank M. Kromann bef1729fc6 Fixing line breaks 2002-05-15 17:40:28 +00:00
Frank M. Kromann b3d03499bd Fixing build of IMAP extension, after changes in sendmail 2002-05-15 17:39:41 +00:00
Markus Fischer 97cbaafead - Accommodate API changes to Ack(). 2002-05-15 13:13:17 +00:00
Christian Stocker 20226f71fc libxml2 >= 2.4.14 is needed (since quite some time ...) 2002-05-15 12:41:55 +00:00
foobar 25f6f239a2 Cleanup 2002-05-15 12:38:31 +00:00
Rui Hirokawa 19179736fa Added Chinese, Korean support in mbstring. 2002-05-15 12:16:15 +00:00
Rui Hirokawa 5f8009a7ea added ISO-2022-KR support in mbstring. 2002-05-15 12:13:56 +00:00
Tomas V.V.Cox fd5b0fb50a make downloadHttp() detect HTTP errors 2002-05-15 11:23:01 +00:00
foobar ce9fa7d326 MFB 2002-05-15 10:23:42 +00:00
foobar 370c985297 Nuke .1 2002-05-15 10:20:02 +00:00
foobar d6d4b7dd9a Added ctype to this list too. 2002-05-15 10:13:22 +00:00
Markus Fischer 03faaee849 - Add support for Bcc in w32/sendmail code. 2002-05-15 10:11:33 +00:00
Derick Rethans c2f2a0a86c - It's bundled, thus not experimental anymore 2002-05-15 05:25:16 +00:00
83fa712789 NEWS update 2002-05-15 00:31:44 +00:00
96ee1ce75d ChangeLog update 2002-05-15 00:30:34 +00:00
Frank M. Kromann 8d4097b29c Fixing hanfling of data type REAL.
Remove extra bytes allocated by emalloc calls
2002-05-14 23:57:43 +00:00
Rui Hirokawa e0a10acf8f fixed a initialization bug in euc-tw. 2002-05-14 21:42:46 +00:00
Sascha Schumann 9d17c42d77 some versions of autoconf pad CONFIG_FILES with a single space.
accomodate that

Thanks to Cliff Woolley
2002-05-14 20:53:33 +00:00
Markus Fischer 9b86cff931 - Adjust for improved error messages from win32/sendmail.c 2002-05-14 20:43:48 +00:00
Markus Fischer 7a0866ff90 - Improve code so errors returned from the server are reported back to the user.
# Testers, testers, testers!
2002-05-14 20:40:39 +00:00
Tomas V.V.Cox d9f4162ab9 Try to create the dir where the conf file resides before trying
to write to it
2002-05-14 17:59:41 +00:00
Tomas V.V.Cox 5ea5758bcf Add "\n" after the error in usage() 2002-05-14 17:58:44 +00:00
Andi Gutmans 1fe8df14c6 - constructor_called is supposed to be destructor_called 2002-05-14 16:15:50 +00:00
Markus Fischer b63236bd84 - Do not include the Cc: for the first Cc'd recipient (spotted by Richard). 2002-05-14 16:03:40 +00:00
Markus Fischer e3974c36ba - Convert unix to dos line endings.
# This is *really* annoying ... can only be an advantage for windows users imho.
2002-05-14 15:32:15 +00:00
Markus Fischer 0815b55950 - Try to find From: field in header, fallback to sendmail_from php.ini setting
(Original patch by Michael Sisolak <msisolak@yahoo.com>, enhanced a bit).
@- Win32 mail() supports parsing 'From:' field from header (msisolak@yahoo.com, Markus).
2002-05-14 15:29:28 +00:00
Markus Fischer 87286cdb3f - Fix win32 sendmail bug with Cc: in custom header not terminated with \r\n
- Fix some obvious errors returned by the module, little cleanup.
2002-05-14 13:52:18 +00:00
Stig Bakken ce2b2b76a0 * convert to new command setup 2002-05-14 12:46:17 +00:00
Stig Bakken b45e7182a0 * typo 2002-05-14 12:34:49 +00:00
Jan Lehnardt 46c5e3bc6f - fix typo, thanks to georg for spotting it. 2002-05-14 10:33:30 +00:00
Stig Bakken a14aeac0f8 * fall back to XML_RPC if xmlrpc-epi is not loaded
# still buggy
2002-05-14 01:51:06 +00:00
Stig Bakken 95ab15f0a5 * add command definitions, split run() into one method for each command 2002-05-14 01:49:56 +00:00
Stig Bakken 677cda3ea4 * no need for getHelp() here anymore 2002-05-14 01:49:18 +00:00
Stig Bakken 1da524b016 * moved get{Help,Commands,Options} here 2002-05-14 01:48:20 +00:00
Stig Bakken ed16e64498 * moved the {config xxx} help message substitution to
PEAR_Command_Common::getHelp
2002-05-14 01:45:20 +00:00
3e1a68277d ChangeLog update 2002-05-14 00:27:31 +00:00
Jason Greene e2c80df0dd Fix fastcgi build, may need more work
# Sascha, would you mind looking this over?
2002-05-14 00:07:51 +00:00
Marko Karppinen 5a5767e1d6 Patch by Justin Erenkrantz <jerenkrantz@apache.org> for enabling
--with-apxs2 build on Darwin. Omitting the change to start linking
with libtool for now, though.
2002-05-13 21:37:52 +00:00
Rasmus Lerdorf 01835e0469 fix copyresampled bug in bundled gd lib 2002-05-13 20:20:16 +00:00
Jim Jagielski 8006ee79a3 More verbose but more generic error message when we spot multiple
PHPINIDir directives
2002-05-13 19:22:27 +00:00
Rasmus Lerdorf f81ec94ac0 Make sure newtime is never NULL 2002-05-13 18:11:27 +00:00
Jan Lehnardt 8e19b31b24 - added reference to http://cvsbook.red-bean.com/ 2002-05-13 18:09:56 +00:00
Zeev Suraski 1bfb3595a8 - Fix a buglet in printing of GPCSE arrays
- Remove indirect access
2002-05-13 17:43:04 +00:00
Andrei Zmievski 1668570e4d Changing email address. 2002-05-13 17:28:38 +00:00
Sander Roobol 6940f88aab Added confdefs.h which seems to be generated by configure 2002-05-13 15:25:39 +00:00
Sterling Hughes f796a26c80 MFZE1 2002-05-13 14:38:42 +00:00
Zeev Suraski 2260e1742d - Centralize html_puts() again
- Revolutionize phpinfo()'s speed
2002-05-13 08:46:24 +00:00
Derick Rethans 4f77354ce0 - MFZE1 2002-05-13 08:41:55 +00:00
Jon Parise 9ec5aa9a92 Instead of calling mail_fetchheader_full() to retrieve the complete header
information just to extract the message envelope, call mail_fetchenvelope(),
which returns just what we need.

This is simpler, faster, and saves the IMAP server some work.

Submitted by: Adam Kauffman <adam.kauffman@mindspring.com>
2002-05-13 00:29:22 +00:00
80c6418119 NEWS update 2002-05-13 00:20:27 +00:00
bd6a7fc58e ChangeLog update 2002-05-13 00:20:08 +00:00
Stig Bakken 66605d218d * fix option parsing 2002-05-12 23:21:30 +00:00
Zeev Suraski 2369533bf9 Remove redundant code (thanks to Jani for pointing that out) 2002-05-12 22:17:58 +00:00
Stig Bakken 3bc12ac242 * refactored the command/options code:
- now each command class should define a "commands" property with
    documentation, option specs etc.
  - both long and short options are now supported
  - after recent changes to Console_Getopt, you may now have options
    to commands even though the same option is also valid for the pear
    command itself
  - less CLI-centric, better suited to Gtk and Web frontends
2002-05-12 21:09:04 +00:00
foobar d7e00e3285 sync with branch 2002-05-12 21:08:34 +00:00
foobar fa63185977 Made several entries comprehensible. 2002-05-12 21:00:13 +00:00
Jon Parise 066d417d69 @Improve IMAP performance when dealing with large mailboxes.
Submitted by: Rob Siemborski <rjs3@andrew.cmu.edu>
2002-05-12 20:53:25 +00:00
Sascha Schumann 226e1ed246 As far as I can tell, the AC_CHECK_MEMBER could not succeed,
because it does not include <sys/socket.h> which is necessary
for the definition of struct msghdr.  This include file is not
part of ac_includes_default.

Regardless, AC_CHECK_MEMBER is a autoconf-2.5x macro and thus we
expand it here for 2.13 compatibility.
2002-05-12 17:28:12 +00:00
Tomas V.V.Cox 94a3659642 The command name is now the first arg not the second 2002-05-12 16:42:50 +00:00
Tomas V.V.Cox 625b9c5f88 Add "r" in cmd help 2002-05-12 16:31:30 +00:00
Tomas V.V.Cox 1bf2abc2f5 The first entry in argv is the command name, so Getopt will stop
parsing more args
# Stig be carefull, your change to Getopt breaks BC
2002-05-12 16:30:26 +00:00
Rasmus Lerdorf 93af4bdfb7 Change safe-mode rule for rmdir() to match unlink() - allow is target
is opened by caller or in a directory owned by caller
@ Minor fix to rmdir() under safe-mode (Rasmus)
2002-05-12 15:59:42 +00:00
Zeev Suraski 2931bb640d MFZE1 2002-05-12 15:59:29 +00:00
Sascha Schumann f866bdc368 Simplify even more 2002-05-12 15:30:44 +00:00
Sascha Schumann 5c4ae13670 Simplify white space handling in php_html_puts.
If we encounter a ' ', we will look for the next non-' ' and set p
accordingly.
2002-05-12 15:22:11 +00:00
Sebastian Bergmann 90229ba841 Nuke unused local variables. 2002-05-12 15:14:21 +00:00
Marko Karppinen 554b7684ed Add an option to calculate easter dates based on the Gregorian calendar
during the years 1582-1752. Earlier this was only possible from
1753 onwards. Use the optional parameter CAL_EASTER_ROMAN with
easter_days() to enable this. This is a fix for bug #12766.
# As you can see, my Sundays are *so* busy...
2002-05-12 15:06:04 +00:00
Sascha Schumann b3de60dbf0 Fix this again.
If you are unsure whether enable or with shall be used, please
inquire on the mailing list.

WITH is solely for the purpose of pointing to paths and other external
entities.

Note that the comment has always mentioned "--disable-mbstring" which
clearly refers to enable and not with.
2002-05-12 14:55:25 +00:00
Stig Bakken d0fc0d4c08 * fix up package dependency check 2002-05-12 14:53:54 +00:00
Sascha Schumann feaa12a9bf Use string_len information 2002-05-12 14:50:54 +00:00
Sascha Schumann a769454d79 reenable php_html_puts 2002-05-12 14:48:22 +00:00
Tomas V.V.Cox 3a838c7737 Make <dep type="pkg" rel="has"> avaible 2002-05-12 14:42:03 +00:00
Stig Bakken bd77586b34 * fix description 2002-05-12 13:14:24 +00:00
Rui Hirokawa 767fa10a92 added chinese HZ encoding support. fixed ascii area character conversion was not work in euc-cn and euc-kr. 2002-05-12 13:06:13 +00:00
Sascha Schumann 38ad391894 - Fix the way code was outcommented
- Remove unused STR_CAT macro
- Remove limits/tests based on unused macro
- Implement cache_limiter(private) using private_no_expire
2002-05-12 12:51:42 +00:00
Daniela Mariaschi 87148b6edd fix bug #17040 ibase_close again.....
User can't close a connection if there are blobs opened.
He must close them before to not loose data....
2002-05-12 12:18:56 +00:00
Tomas V.V.Cox 0e9d6c4b42 Vincent is not involved in this class :-) 2002-05-12 11:27:39 +00:00
Sebastian Bergmann 9f47b2f193 Rephrase. 2002-05-12 08:35:37 +00:00
Sebastian Bergmann 3fa1fd866f Beautify. 2002-05-12 08:33:18 +00:00
Sebastian Bergmann 92c71b5bb9 Start documenting the debug backtracing. 2002-05-12 08:16:14 +00:00
Sebastian Bergmann 571d93e16a Whitespace fixes. 2002-05-12 08:15:45 +00:00
Jason Greene 969d7e5a82 Fix build on IRIX for both mips and gcc 2002-05-12 07:22:47 +00:00
Stig Bakken ebe26ec36c * Try again: fixed Console_Getopt::getopt so it does not steal options
after the first non-option argument.  Added test.
2002-05-12 07:13:49 +00:00
Stig Bakken f0a3e7262e * updated config key names 2002-05-12 07:09:25 +00:00
Stig Bakken 201ec25f42 * exclude _lastmodified registry attrib from tests 2002-05-12 07:08:25 +00:00
Rui Hirokawa b3690bbe19 fixed to support --with-mbsting=LANG. 2002-05-12 00:26:43 +00:00
ca47c3d3b3 ChangeLog update 2002-05-12 00:23:15 +00:00
Markus Fischer 965b4c26f1 - Update about CLI default settings and it's weirdness. 2002-05-11 20:33:59 +00:00
Rasmus Lerdorf 63e6666216 MTH - thought the code was slightly different in HEAD because of the
streams stuff, but it is exactly the same bug.
@ Safe-mode fix related to the safe_mode_include_dir feature (Rasmus)
2002-05-11 19:58:40 +00:00
Rasmus Lerdorf 465b2d54db Another safe-mode fix. parse_ini_file() did not check
@ safe-mode fix for parse_ini_file()  (Rasmus)
2002-05-11 19:19:49 +00:00
Rasmus Lerdorf 9cbcc9b822 show_source() safe-mode fix
@ show_source() was evading safe-mode - fixed (Rasmus)
2002-05-11 18:35:59 +00:00
Sterling Hughes e15a3c42f3 remove stale 1 2002-05-11 17:41:16 +00:00
Sterling Hughes 2e72f8cc1f WS Fixes (and similair stylistic changes) 2002-05-11 17:00:49 +00:00
Stig Bakken d9704c7134 * use PEAR::raiseError 2002-05-11 16:39:39 +00:00
Sterling Hughes 0a21aa12b2 allocate globals, making this work in zts mode
(not that it really matters, since libswf isn't thread safe...)
2002-05-11 15:58:55 +00:00
Markus Fischer 51ba96c603 - Update 2002-05-11 14:52:29 +00:00
Edin Kadribasic 8e15de012a Added copyright notice to php -v output. 2002-05-11 14:26:30 +00:00
Zeev Suraski b9fd10786b Use portable #define 2002-05-11 13:49:44 +00:00
Zeev Suraski bf97148978 Centralize html_puts() logic - php_html_puts() remains as an API wrapper 2002-05-11 12:41:33 +00:00
Zeev Suraski 4ec448e229 MFZE1 2002-05-11 12:36:32 +00:00
Zeev Suraski 77f41212f6 Removing HTMLization of ' ' wasn't ok, it didn't deal with series of spaces
properly.  Turn series of spaces into &nbsp;'s.
2002-05-11 12:17:53 +00:00
Zeev Suraski 19b7861d70 0 byte file uploads are valid, avoid choking on them 2002-05-11 11:58:16 +00:00
Zeev Suraski 70f72d0568 Fix dependencies for CLI module 2002-05-11 11:49:34 +00:00
Sebastian Bergmann 5192f6432c Patch by Justin Erenkrantz <jerenkrantz@apache.org>. This should be MFHed. 2002-05-11 08:58:20 +00:00
Zeev Suraski 5af649efbd Revert to the old php_ini.c, and reimplement the binary-path searching.
Should now also work under UNIX (CLI/CGI)
2002-05-11 03:41:17 +00:00
Zeev Suraski ce20564d1e whitespace 2002-05-11 03:33:29 +00:00
Zeev Suraski 70384bc755 Fix build 2002-05-11 03:22:02 +00:00
Markus Fischer c7a15e6388 - Fail gracefully and not just bail out with an error message from dirname
because no argument was given.
2002-05-11 03:11:46 +00:00
Yasuo Ohgaki f314d24d03 Reduce number of realloc calls. 2002-05-11 03:01:08 +00:00
Zeev Suraski 2d0f07d086 Add missing element 2002-05-11 02:58:43 +00:00
Edin Kadribasic cfd594e0ee Made ZIP extension available on Windows.
@- Made ZIP extension available on Windows. (Edin)
2002-05-11 02:12:44 +00:00
Stig Bakken aa1f45c964 * install Archive_Tar and Console_Getopt too 2002-05-11 01:35:23 +00:00
Stig Bakken b4bb7c10f9 * add package descriptions for Archive_Tar and Console_Getopt 2002-05-11 01:28:14 +00:00
Stig Bakken 42a0e2763f * add dependencies 2002-05-11 01:27:53 +00:00
b9d3ab65a6 NEWS update 2002-05-11 00:21:41 +00:00
548d89d449 ChangeLog update 2002-05-11 00:21:06 +00:00
Edin Kadribasic 3e42446692 Fixed "make install" when compiled with --disable-cli option. 2002-05-10 18:38:21 +00:00
Markus Fischer ccbadfc111 - Prefix the first version line with 'PHP' so it's easier to use shell tools to
parse the version number (both CLI and CGI).
2002-05-10 16:18:00 +00:00
Markus Fischer bf351e9639 - This affects both CGI and CLI sapi:
Remove Zend version output from -m switch and move it over to the output of
  the -v switch (-v is supposed to list version numbers, not -m).
2002-05-10 16:04:03 +00:00
Christian Stocker 827a769c28 @- added fifth optional parameter to domxml_xslt_process. If set,
it will output profiling information to the file stated (chregu)
- introduced version numbering for this extension
2002-05-10 14:59:14 +00:00
Andi Gutmans dc0bc97969 - Nuke C++ comment 2002-05-10 09:43:00 +00:00
Andi Gutmans b6219a0dbc - Make debug_backtrace() return an array. Still not finished because I
might want to differentiate between method calls and static methods.

Example:
$bt = debug_backtrace();
foreach ($bt as $frame) {
	if (isset($frame['class'])) {
		print $frame['class'];
		print "::";
	}
	print $frame['function'];
	print "   [";
	print $frame['file'];
	print ":";
	print $frame['line'];
	print "]\n";
}
2002-05-10 09:41:50 +00:00
Martin Jansen caa2dd2ce2 * package-pear.xml has been renamed to package-PEAR.xml. 2002-05-10 05:40:39 +00:00
Edin Kadribasic ffce791942 Added MD5 support for crypt() on Windows. 2002-05-10 04:58:05 +00:00
Edin Kadribasic 0685de942b Ignoring *.aps files. 2002-05-10 04:36:28 +00:00
Edin Kadribasic 51cb237aa6 Fix win32 build. 2002-05-10 02:39:37 +00:00
034685f258 ChangeLog update 2002-05-10 00:26:32 +00:00
Preston L. Bannister 57c5998ff9 Backed out preceding change. 2002-05-09 23:33:27 +00:00
foobar c241dc5c8b ws fix 2002-05-09 22:46:45 +00:00
Preston L. Bannister 3c8c01b475 Compute directory for temporary files once and use same directory for all subsequent calls. 2002-05-09 22:03:19 +00:00
Daniela Mariaschi cbb2dbb2e2 corrected parameter 2002-05-09 21:57:49 +00:00
Daniela Mariaschi f7d5d1036c fix test 5 to pass 2002-05-09 21:41:20 +00:00
Preston L. Bannister 0c7cfcda4f Detect when running under IIS and default force_redirect to zero. This This means an explicit php.ini setting is no longer required.
(NO extraneous whitespace changes this time (sigh)).
2002-05-09 21:18:26 +00:00
Stig Bakken ae7da10f0e * remove package-db.xml
* rename package-pear.xml to package-PEAR.xml (generic format is
  package-PKGNAME.xml)
2002-05-09 21:13:56 +00:00
Preston L. Bannister d706e224ac Detect when running under IIS and default force_redirect to zero. This This means an explicit php.ini setting is no longer required.
(No extraneous whitespace changes this time :).
2002-05-09 21:03:30 +00:00
Frank M. Kromann f0141f965f Allow the MSSQL extension to use NT authentication 2002-05-09 20:37:45 +00:00
James Cox 1e55a42391 this is dangerous.... 2002-05-09 20:36:49 +00:00
Frank M. Kromann 31a16f63f9 Adding ini setting that allows the MSSQL extension to use NT authentication 2002-05-09 20:36:40 +00:00
Preston L. Bannister 6de4f3a459 Add check for php.ini in same directory as php.exe (or equivalent executable that loaded php4ts.dll). Check is done before looking in the Windows directory. This allows distinct php.ini files when different applications using PHP are installed on the same system. Should be backwards compatible.
Note that checking for in CWD php.ini may be a security risk(?), and can now be made compile-time configurable by removing a single #define.

(This time with tabs for leading indent).
2002-05-09 20:34:53 +00:00
foobar 42c82bb40d Revert the last patches. 2002-05-09 20:03:36 +00:00
Sander Roobol 375d7960a7 Revert Preston's patch 2002-05-09 20:02:47 +00:00
foobar 773da954f8 ws fix 2002-05-09 19:58:39 +00:00
Preston L. Bannister fb0c506592 Add check for php.ini in same directory as php.exe (or equivalent executable that loaded php4ts.dll). Check is done before looks in the Windows directory.
This allows distinct php.ini files when different applications using PHP are installed on the same system.  Should be backwards compatible.

Note that checking for php.ini in CWD may be a security risk(?), and can now be made compile-time configurable by removing a single #define.
2002-05-09 19:51:18 +00:00
Preston L. Bannister 9fdec2e345 Change default directory for session data from /tmp (non-portable) to none.
Default directory for session data (if not specified) is same (platform-specific) directory used for temporary files.
This is backwards compatible and removes the need for explicitly specifying the session.save_path on Win32.
2002-05-09 19:42:00 +00:00
Preston L. Bannister 2d22fc3316 Compute directory for temporary files once and use same directory for all subsequent calls. 2002-05-09 19:36:03 +00:00
Preston L. Bannister 06f375b1cf Detect when running under IIS and not require explicit setting of force_redirect.
This means an explicit php.ini setting is no longer required.
2002-05-09 19:32:39 +00:00
Edin Kadribasic 2e317ff727 No need to link libxm2 in order to build php_crack.lib 2002-05-09 15:58:19 +00:00
Vincent Blavet 59071dc42e * Better handling of Windows paths (\php\any_thing or c:\php\any_thing)
* Remember that inside the archive path are all the time in unix format /php/any_thing
* When necessary, '\' are replaced by '/' and 'c:' are removed
* Synchro with cvs:pear/Archive_Tar/Tar.php version 1.20
2002-05-09 13:00:12 +00:00
Stig Bakken 27f5bfc848 * add some packages to bundle with PHP 2002-05-09 12:46:21 +00:00
Stig Bakken fddbd15554 * add "pear run-tests" command 2002-05-09 12:45:29 +00:00
Stig Bakken ed4ffb695b * use PEAR installer to install stuff (won't overwrite if newer versions
of packages already are installed)
2002-05-09 12:45:02 +00:00
Stig Bakken 123ae9bcdd * permanently moving DB to /pear 2002-05-09 12:29:25 +00:00
Derick Rethans 24e96213ff - Fix phpize 2002-05-09 12:27:20 +00:00
Derick Rethans f0d18c63be - Dump API NOs 2002-05-09 12:11:57 +00:00
foobar 1d4753755d Fix 'php-config --version' 2002-05-09 12:06:44 +00:00
Derick Rethans f58ad95c00 - Add PHP_API_VERSION too 2002-05-09 11:56:52 +00:00
Derick Rethans 7b3ce60a23 - Show both API nos 2002-05-09 11:47:37 +00:00
Sander Roobol 7586cdc654 Added the current SAPI to the output of php -v 2002-05-09 09:36:45 +00:00
Stig Bakken dad70be69c * show "update ok" after updates 2002-05-09 06:49:12 +00:00
Stig Bakken fdb724bffc * try the installed cli binary if everything else fails (I'm starting
to agree that looking too hard for a php binary is wrong)
2002-05-09 06:39:05 +00:00
Stig Bakken 2225be36d6 * install the old-fashioned way for just a bit longer 2002-05-09 02:32:18 +00:00
Stig Bakken b14c2f9185 * add -G option to "pear" for php-gtk frontend
* added Gtk stub (only creates window right now)
* added command descriptions
2002-05-09 02:31:37 +00:00
9dece79266 ChangeLog update 2002-05-09 00:23:53 +00:00
Andi Gutmans 14a81f91e3 - Hopefully fix problems with debug_backtrace() 2002-05-08 18:43:19 +00:00
Jason Greene cfb285a391 Fix overflow 2002-05-08 15:30:04 +00:00
Derick Rethans b43ba8dfe2 - MFZE1 2002-05-08 14:10:30 +00:00
Rui Hirokawa a627c674c5 Added conversion support from script character encoding to internal character encoding. This feature is very useful for japanese who uses Shift_JIS encoding because some of characters in Shift_JIS are including '0x5c' and it causes some troubles on Zend parser. This patch is made by Masaki Fujimoto. 2002-05-08 13:47:39 +00:00
Rui Hirokawa f30b722f14 Added conversion support from script character encoding to internal character encoding. This feature is very useful for japanese who uses Shift_JIS encoding because some of characters in Shift_JIS are including '0x5c' and it causes some troubles on Zend parser. This patch is made by Masaki Fujimoto. 2002-05-08 12:33:44 +00:00
Yasuo Ohgaki 2b5beee5ad Added estrdup() needed.
Fixed typo.
2002-05-08 11:44:14 +00:00
Aaron Bannert 218c661c6c This is a more appropriate address for me. 2002-05-08 07:48:04 +00:00
Zak Greant 4128739695 Minor improvement to error message for mysql_data_seek 2002-05-08 07:38:09 +00:00
Markus Fischer 1a3c8e6289 - Add a warning if running with safe_mode enabled. 2002-05-08 07:23:54 +00:00
Derick Rethans 31d1fac578 - Forgot one 2002-05-08 05:19:27 +00:00
Derick Rethans dedf22f5ad - Added Aaron Bannert as maintainer 2002-05-08 05:17:59 +00:00
Frank M. Kromann c75e794ebe Kill a compiler warning on Win32 2002-05-08 03:56:43 +00:00
5a33b8ea01 ChangeLog update 2002-05-08 00:31:28 +00:00
Sascha Schumann 50f68406cb Due to the thread-safety changes and lots of other stuff, the
current tree is not backwards compatible anymore.  Bump API no.
2002-05-07 22:00:33 +00:00
Jason Greene d4b11fb33f Fix 10830, and 17074
FreeBSD requires the exact length of the socket type
2002-05-07 18:47:17 +00:00
Andi Gutmans b66c89c47a - More debug backtrace work. It still doesn't work very well... 2002-05-07 18:42:13 +00:00
Frank M. Kromann 7c80fc1d9e Fixing win32 build. 2002-05-07 17:51:03 +00:00
Sascha Schumann 66036eab10 use thread-safe functions unconditionally 2002-05-07 13:24:07 +00:00
Sascha Schumann 946fca9c91 Add thread-safety to some conversion functions and sync a bit with
APR.
2002-05-07 05:26:30 +00:00
abc72f2820 ChangeLog update 2002-05-07 00:22:21 +00:00
Jason Greene f30fefcb30 Fix invalid warning caused by bogus convert_to_* calls
Fix possible invalid data in status for pcntl_waitpid()
2002-05-06 23:01:46 +00:00
Markus Fischer ac876a4981 - WS fix as pointed out by fabwash@hotmail.com 2002-05-06 21:44:43 +00:00
Jason Greene 4c9dbf9335 Fix type-o that broke ZTS build
Fix 3 nasty crash bugs that could occur if pcntl_exec's call to execve errored
2002-05-06 19:48:39 +00:00
Derick Rethans ebede147aa - Fix release date 2002-05-06 18:54:46 +00:00
jim winstead 51e2ea5ed2 fix problem with mkdir() on freebsd 2002-05-06 17:31:22 +00:00
Edin Kadribasic d00252cf38 Update README with register_argc_argv settings override. 2002-05-06 15:49:06 +00:00
d3fa83a8a7 ChangeLog update 2002-05-06 00:23:00 +00:00
Wez Furlong a03d09e2d9 Add support for remaining entities in HTML 4 for the UTF-8 encoding in
htmlentities/htmlspecial chars.
This is a fix for for #17008.
# I would *really* appreciate it if someone with a good eye could verify
# that all the entities are there and are correctly numbered; I've checked
# it three times, but it's best to be sure.
2002-05-05 23:06:39 +00:00
Yasuo Ohgaki 3f93b56b5b Clenup before I forgot. 2002-05-05 22:44:07 +00:00
Aaron Bannert 8e176a10fc Fix a graceful restart SEGV. We no longer only perform initialization
on the second pass through the post_config. Now we only avoid the
initialization only on the first DSO load, and on all subsequent loads
we rerun the init code.
2002-05-05 18:15:33 +00:00
Aaron Bannert b759322411 Fix an elusive and intermittent startup SEGV. The problem was
the static string we were using to set an initialization flag
would get remapped to a different location when Apache reloaded
the DSO, causing us to not run our initialization routines.

Submitted by: Justin Erenkrantz <jerenkrantz@apache.org>
Reviewed by: Aaron Bannert (I added the big comment too)
2002-05-05 18:11:41 +00:00
Stanislav Malyshev b67bafefa5 Return right exit status 2002-05-05 17:14:12 +00:00
foobar 5f13f4ecb7 Force register_argc_argv=On for CLI 2002-05-05 17:11:04 +00:00
Thies C. Arntzen 5d177788ea touch 2002-05-05 16:40:20 +00:00
Thies C. Arntzen 23251ebd1a re-add accidentily nuked session_adapt_url() 2002-05-05 16:39:49 +00:00
Rui Hirokawa b7321edb84 bug fixed in unicode -> cp1252 table. 2002-05-05 11:42:18 +00:00
Marko Karppinen b7e50782b7 Well that didn't last long! (Reverting previous.) 2002-05-05 09:52:39 +00:00
Marko Karppinen 32ff990c68 Prelim. patch to enable apache2filter to link on Darwin.
Submitted by: Justin Erenkrantz <jerenkrantz@apache.org>
Reviewed by: markonen
# A stopgap measure while we try to find a "real"
# solution, if one exists.
2002-05-05 09:40:31 +00:00
Rui Hirokawa 39c951ed88 added missing areas on Unicode->CP936 conversion table. added an alias CP932 on sjis-win. 2002-05-05 02:22:36 +00:00
Sascha Schumann 67d00f8c1d sync 2002-05-05 02:07:33 +00:00
Sascha Schumann c8f884fac8 the output buffer is flushed during request shutdown before it
reaches our rshutdown, so it is safe to delete the contents of
the url rewriter variables here.
2002-05-05 02:07:16 +00:00
e2de181cab NEWS update 2002-05-05 00:22:10 +00:00
2cb47c9326 ChangeLog update 2002-05-05 00:20:01 +00:00
Zeev Suraski fe127f93de We shouldn't force Content-length:, but much worse, it's wrong in many
cases (basically, unless you use output buffering to buffer all of your content,
it won't work;  output buffering is used for lots of different things as a
functional interface, and such buffers have no relation to Content-type at
all).
2002-05-04 23:23:16 +00:00
Sascha Schumann 707b8b019e Free string before overwriting it 2002-05-04 19:06:46 +00:00
Sascha Schumann d41773e8b6 update 2002-05-04 18:34:29 +00:00
Sascha Schumann 9743860d35 simplify handling of variables by maintaining two strings which
are simply appended instead of traversing the hash table on each
URL/form.

also fix an unconditional segfault in rshutdown due to efree'ing
a static char *.

remove remove_var, add reset_vars.  move the function declarations
into the right header file.
2002-05-04 18:33:13 +00:00
Sascha Schumann ebfff2df7e ret set but unused 2002-05-04 18:11:36 +00:00
Sascha Schumann 4fe391cb91 these are case sensitive 2002-05-04 17:42:58 +00:00
Sascha Schumann 74b09cbcf8 c set but unused 2002-05-04 17:41:51 +00:00
Sascha Schumann 34b899e2da inheader set but unused 2002-05-04 17:41:11 +00:00
James Cox fb3d9b72e9 touch. 2002-05-04 17:41:03 +00:00
James Cox 7e22424996 add $id:$ line 2002-05-04 17:39:05 +00:00
Sascha Schumann ea84524bc2 block_ended/opposite_target were set but never used 2002-05-04 17:38:45 +00:00
Sascha Schumann a6c3ce15ae don't emit code for version 2002-05-04 17:36:58 +00:00
Sascha Schumann c998176089 free_index is set but never used 2002-05-04 17:34:41 +00:00
Sascha Schumann 7e05237ed4 call_result is set but never used 2002-05-04 17:32:01 +00:00
Sascha Schumann 1ed3f698fe ap_php_optopt is set but never used 2002-05-04 17:27:18 +00:00
Sascha Schumann 1f09644ff7 Fix linkage of symbols 2002-05-04 17:26:45 +00:00
Sascha Schumann 9e91566179 entry_length was set but never used 2002-05-04 17:24:08 +00:00
Sascha Schumann 01c980980c update 2002-05-04 17:17:54 +00:00
Sascha Schumann 2438488c68 rval_temp was declared but never used 2002-05-04 17:17:43 +00:00
Sascha Schumann 140158734f redirected is set but never used 2002-05-04 17:16:28 +00:00
Sascha Schumann 62c54fca9f include url.h 2002-05-04 17:15:09 +00:00
Sascha Schumann 2a4dea6c18 include url.h to pull in declaration of php_url_encode 2002-05-04 17:14:56 +00:00
Sascha Schumann 4378214b80 Make this code work on compilers which don't consider the address
of a variable on the stack available at compile time.
2002-05-04 17:12:26 +00:00
Sascha Schumann e919e7e526 unused var 2002-05-04 16:59:41 +00:00
Sascha Schumann 3fbbd61dc2 p is set, but never used. 2002-05-04 16:54:13 +00:00
Sascha Schumann ee70764592 Turn misplaced PHP_ARG_WITH into _ENABLE
and fix --enable-mbstring=shared
2002-05-04 16:50:10 +00:00
Sascha Schumann 9517ff0689 Fix --enable-session=shared 2002-05-04 16:48:48 +00:00
Sascha Schumann 3c89ce7843 Fix --enable-xml=shared 2002-05-04 16:48:01 +00:00
Stig Venaas d47d8b99c5 Reworked result resource handling so that result is not freed until all
its result entry resources are freed
@- Fixed resource bug in LDAP extension. (Stig Venaas)
2002-05-04 14:27:48 +00:00
Rui Hirokawa fa1904b6e8 fixed a problem that ereg_replace() couldn't match with line stand/end marker. 2002-05-04 11:20:12 +00:00
Yasuo Ohgaki ae828233fe Forgot to dup strings. 2002-05-04 10:55:08 +00:00
Yasuo Ohgaki b1b5e42251 Fixed reference to freed zval string value. 2002-05-04 09:46:44 +00:00
Yasuo Ohgaki dfc48de0cb Fixed crash when buffer is over written in ob callback. (Bug $ 12227)
Added check current output function check for Centent-Length header.
@ Fixed output buffer crash when buffer is over written in callback. (Yasuo)
2002-05-04 03:02:51 +00:00
4510592428 NEWS update 2002-05-04 00:38:22 +00:00
9a44bbf416 ChangeLog update 2002-05-04 00:32:52 +00:00
foobar 8270b16d6b Domxml changes go into the 4.2.x branch. 2002-05-03 21:30:58 +00:00
Sander Roobol b545125fde Adding missing .cvsignore 2002-05-03 19:17:21 +00:00
Christian Stocker d5c7421a7c removed the function for domxml_node_add_child and made an alias to
domxml_node_append_child for BC
2002-05-03 13:53:46 +00:00
Stig Bakken bd4f1f90d0 * switched from static to instance model
* added matching method with glob support, some examples:
    $os->matchSignature('linux');
    $os->matchSignature('linux-2.4*);
    $os->matchSignature('linux-*-i?86');
2002-05-03 13:13:51 +00:00
Christian Stocker e7f7fb1781 WS fixes 2002-05-03 09:51:06 +00:00
Christian Stocker 9c37ea1888 one parameter too much 2002-05-03 09:46:27 +00:00
Christian Stocker 67c5b2e4fd added encoding support for domxml_dump_mem() 2002-05-03 09:45:09 +00:00
Thies C. Arntzen 023a381323 forgot 2002-05-03 08:32:03 +00:00
Sebastian Bergmann 8193ca7891 Fix ZTS build. 2002-05-03 08:10:43 +00:00
Thies C. Arntzen 9712a4b3c8 @ - Added output_add_rewrite_var() and output_remove_rewrite_var() to inject
@   and remove variables from the URL-Rewriter. (thies)
i have also modified the session module to use this - so it doesn't
need to fiddle with the output-system any more
2002-05-03 08:00:41 +00:00
Stig Bakken 9679267b88 * fixed autoconf vs. pear installer replacement issue in scripts/pear.in
(pear installer now substitutes "@prefix@/bin" to bin_dir ;-)
* added skeleton for OS_Guess class
2002-05-03 05:42:55 +00:00
Stig Bakken 919edc49a5 * unintentional news entry :-) 2002-05-03 05:32:52 +00:00
7ede88560d NEWS update 2002-05-03 00:24:52 +00:00
71eb0ed198 ChangeLog update 2002-05-03 00:24:03 +00:00
Stig Bakken 1a74e43001 * apply umask when installing files 2002-05-03 00:01:54 +00:00
Stig Bakken f6ad0eee1d * add umask config value 2002-05-02 23:56:44 +00:00
Frank M. Kromann 810c9dd963 Changed & to &&. 2002-05-02 17:54:54 +00:00
Frank M. Kromann e789e72515 Adding missing files to the project 2002-05-02 17:53:42 +00:00
Frank M. Kromann bd75b407cf Fixing wrong pointer 2002-05-02 17:36:00 +00:00
Andi Gutmans 7e5ec2d761 Initial support for built-in backtracing.
There are still a few problems such as includes and calling other functions
from internal functions which aren't seen (will have to think if and how to
fix this).
Also the main scripts filename isn't available. Need to think about that.
2002-05-02 17:20:48 +00:00
Sander Roobol 7a64b2b7e5 Fixed some minor typos 2002-05-02 17:19:42 +00:00
Jason Greene 89c59569ba socket_write() should just use the standard socket error macro so that errors will be consistent if the macro ever changes 2002-05-02 16:45:22 +00:00
Sebastian Bergmann edba077000 Fix build. 2002-05-02 15:18:26 +00:00
James Cox ba85302e79 updated cgi warning notice. 2002-05-02 14:55:12 +00:00
Zeev Suraski d0ae80a9de Update comment 2002-05-02 14:05:26 +00:00
Yasuo Ohgaki 5b83e9294c Change nest level to send Content-Length again. It seems this is the
best setting for now.

PHP will not send Content-Length always. It only sends when it is
possible to send. output_buffer=0 is supposed to disable chunked
output, but it seems it does not disable. It also behaves a litte
strange way. This should be addressed someday.

It is possible Content-Length header is not set. If it happens, try to
increase chunk size for now. (i.e. output_buffer=40960)

I included a little debug code for me and other develpers to play with,
when (NestLevel==1 && ObStatus==5), PHP sends Content-Length.
2002-05-02 13:55:05 +00:00
Harald Radi fe84a29b3f remove temporary resources immediately
return value fix

#thanks to alan for 'remote debugging'
2002-05-02 13:37:31 +00:00
Sascha Schumann 830f094933 Readd warning
If Mr. Taskinen feels like removing it again, he can commence a
discussion.  Otherwise, I'll personally disable his CVS account
immediately.
2002-05-02 13:21:38 +00:00
Sascha Schumann a79e2de3a7 in6addr_any is defined as extern in IRIX header files, but is not actually
contained in any library (sigh).

Make this check fail, if the link stage does not succeed.  Also avoid
GCC optimization which drops the reference to ip6addr_any.

Tested on IRIX 6.5.15.
2002-05-02 13:12:44 +00:00
Derick Rethans 0c16e026b0 - Add Zend API No. to phpinofo() output 2002-05-02 12:33:03 +00:00
foobar 399914da92 Stop the search when the libs are found. 2002-05-02 10:22:26 +00:00
Tomas V.V.Cox fec42ddeee Install pear.bat
# Please Windows hackers test the pear installer support!
2002-05-02 10:15:47 +00:00
Sebastian Bergmann 31c722f859 I could swear it worked the other way before I committed. 2002-05-02 10:15:27 +00:00
Tomas V.V.Cox f024d6b709 untabify 2002-05-02 10:14:01 +00:00
James Cox 2677efe372 englishify. 2002-05-02 10:05:24 +00:00
Sebastian Bergmann bed2bc7dbc Add config.w32.h. 2002-05-02 09:57:45 +00:00
Sebastian Bergmann b1246493f8 Oops. 2002-05-02 09:53:17 +00:00
Sebastian Bergmann 93ab7ea64e Fugbix typos. 2002-05-02 09:51:05 +00:00
Sebastian Bergmann 738b47c13e The Windows build can now be configures more comfortably, for instance in regard to built-in extensions. 2002-05-02 09:49:41 +00:00
foobar 5035904efc Remove bogus warning. 2002-05-02 08:31:55 +00:00
foobar 4987ef5f22 Sync with PHP_4_2_0 branch. 2002-05-02 08:30:29 +00:00
Yasuo Ohgaki 1103311eee Fixed header output. Only need to output header when it is actually sent to client. 2002-05-02 06:50:18 +00:00
Jon Parise b2579d3480 Revert the previous commit (revision 1.40).
@bindir@ ended up becoming '${exec_prefix}' (literally) on my system
(FreeBSD 4.5), thus producing a broken shebang line.

@prefix@ works fine for me here.  If @bindir@ is indeed preferred, the
substitution problem noted above needs to be resolved before the change
is reapplied.
2002-05-02 05:36:21 +00:00
Yasuo Ohgaki 8ee815ec91 Check buffer status 2002-05-02 04:04:59 +00:00
Yasuo Ohgaki f61b795a8f Make Content-Type output always correct.
# Flushing buffer is needed to be fixed properly anyway...
2002-05-02 01:58:12 +00:00
Yasuo Ohgaki cbf8a26d53 Modify NEWS entry for Content-Length header change 2002-05-02 01:15:30 +00:00
Yasuo Ohgaki 43df0c78c0 Move Content-Length: header handling from zlib.c to output.c
When output buffer is enabled and header can be sent, Content-Length:
header is added always from now on.
2002-05-02 01:12:01 +00:00
f46c152775 NEWS update 2002-05-02 00:25:56 +00:00
646991d39b ChangeLog update 2002-05-02 00:23:16 +00:00
Derick Rethans 8fe3c0c5d4 - Fix String is not zero-terminated error in base64_decode 2002-05-01 20:11:09 +00:00
Markus Fischer 07efbff856 - Update protos for socket_read() and socket_write().
- Set last_error in socket_write().
2002-05-01 16:38:22 +00:00
Markus Fischer ae5bc7c0f6 - Update protos for getpeer/getsock-name. 2002-05-01 16:08:50 +00:00
Jason Greene 38a6325178 Fix BYREF_FORCE that was not being read
Fix error message
2002-05-01 15:14:49 +00:00
Sascha Schumann 303b62ae47 Add a big disclaimer regarding register_globals. It just bit me again
but now on a live customer site :-/
2002-05-01 13:34:05 +00:00
Markus Fischer 1a5501ddfd - Rename setopt and getopt to set_option and get_option, provide alias. 2002-05-01 11:08:08 +00:00
Markus Fischer a2fbdad20e - Fix couple of problems with socket_create_pair():
- Force fourth argument to be passed by reference
  - Since the argument is modified there is no need to force it to be an array
    since it's destroyed anyway
  - Only modify the argument if socketpair() was successfully
  - Fix string modified for error message message
  - Set global last_error when socketpair() fails
2002-05-01 10:41:10 +00:00
Markus Fischer 7ee9e9d9e5 - Add SOMAXCONN constant. 2002-05-01 09:25:26 +00:00
Wez Furlong 3a68052828 Fix for #16885 2002-05-01 08:22:17 +00:00
Wez Furlong f571438d7a Probable fix for #16940. 2002-05-01 07:50:13 +00:00
Markus Fischer cc4ff9c3ac - WS fixes 2002-05-01 07:35:01 +00:00
Jason Greene 9a841d116b Changed socket_select to force reference copy, the older code would modify all references
@Fixed a bug in socket_select() that could cause unexpected behavior when using a statement
@ like $w=$e=array($sock);
@This change unfortunately prevents the use of constant values(NULL) for the socket array paramaters.
@Instead use a temporary variable or an expression with the leftmost member being a temporary variable.
@ ex. socket_select($w, $r, $e=NULL, 10);

Also fix small memory leak.
2002-05-01 04:46:59 +00:00
d6f87556b5 ChangeLog update 2002-05-01 00:49:54 +00:00
Harald Radi 6055c2b11a ZE2 compatibility fixes 2002-04-30 23:34:09 +00:00
Markus Fischer a369d06bea - Forgot to update proto 2002-04-30 22:03:51 +00:00
Markus Fischer c1c1ee9f6e - Allow resetting the module global last_error too. 2002-04-30 22:01:06 +00:00
Sebastian Bergmann 92748918c5 More unused variables. 2002-04-30 15:21:04 +00:00
Stanislav Malyshev f42bb6cfe4 Fix ZE1 build 2002-04-30 14:45:50 +00:00
Sebastian Bergmann 28e1120978 Fix ZTS build. Remove unused variables. 2002-04-30 14:36:43 +00:00
Sebastian Bergmann 71872d8ec3 Add missing #define's. 2002-04-30 14:36:02 +00:00
Harald Radi 9d650c093a # fooblah 2002-04-30 14:31:33 +00:00
Sebastian Bergmann aff6d565f4 Add new ext/mbstring/mbfilter_*.c files. 2002-04-30 14:29:10 +00:00
Sascha Schumann 6f57419453 Touch file 2002-04-30 13:47:16 +00:00
Dan Kalowsky d55c9134c8 reverting the cursor change as it seems to break many ODBC drivers. 2002-04-30 13:17:48 +00:00
Rui Hirokawa 813a795c64 fixed compile warning with Visual C++. 2002-04-30 12:45:14 +00:00
Rui Hirokawa 5df01432c7 added simplified chinese, traditional chinese, korean support to mbstring. Note that this feature is experimental. 2002-04-30 12:00:42 +00:00
Stanislav Malyshev 18805e8323 ZE2 compatibility fix 2002-04-30 11:30:07 +00:00
Stanislav Malyshev 3dd6217c0b ZE2 compatibility fixes 2002-04-30 11:29:28 +00:00
foobar 3b1ae7c62a revert last bogus change. There is bug in is_file() 2002-04-30 10:38:06 +00:00
Stanislav Malyshev 7a067547cd Make OBJCE return zend_class_entry*, also some cleanups 2002-04-30 09:56:48 +00:00
Uwe Steinmann 3858221c2f - added function domxml_parser_set_keep_blanks() 2002-04-30 05:18:12 +00:00
Frank M. Kromann eeb4fd9b45 Adding missing files to project 2002-04-30 04:36:34 +00:00
Sebastian Bergmann eacad68c68 Fix ZTS build. 2002-04-30 04:27:52 +00:00
Wez Furlong 2d88266965 Use ftok for message queue key. 2002-04-30 00:58:52 +00:00
4618a517da ChangeLog update 2002-04-30 00:41:33 +00:00
Wez Furlong 501ed6ccb2 Make use of new flag so that we can buffer http headers when we know that
the stream is not intended to be used in require/include.
2002-04-30 00:30:00 +00:00
Wez Furlong 760573695c Implement user-space funtions to operate on stream contexts. 2002-04-30 00:28:24 +00:00
Wez Furlong 840ed90f2b Fix is_file test.
# Is there a good reason for having the actual test in an include file??
2002-04-30 00:26:49 +00:00
Wez Furlong b0ed189159 Remove debug code that should not have been committed.
# I must apologize for the quality of my commits tonight...
2002-04-30 00:22:44 +00:00
Wez Furlong 0989e7bb41 Remove this; it should not have been commited 2002-04-30 00:20:34 +00:00
Wez Furlong 479aa767f5 revert... 2002-04-30 00:17:48 +00:00
Wez Furlong 37411dd674 Implement context option setting API.
Add/amend debugging code for sockets.
Add a flag that will help the http wrapper optimize itself when
it is not being used for include/require.
2002-04-30 00:16:00 +00:00
foobar 94f9b3bdb5 Never add libraries without checking that they exist and can be linked. 2002-04-29 18:08:20 +00:00
Harald Radi e72caee650 RETURN_NULL() is defined with braces while RETURN_TRUE
and RETURN_FALSE are defined without.
seems not very consistent ?
2002-04-29 17:20:15 +00:00
Stanislav Malyshev 11df2122df Add comments for the fix 2002-04-29 16:02:41 +00:00
Stanislav Malyshev 91a78e2974 Fix here too 2002-04-29 16:02:10 +00:00
Harald Radi 667a0841f3 functions returned FALSE in case of error and the oo api returned NULL.
make them both behave equal (return NULL, as FALSE can be a valid value).
2002-04-29 15:50:30 +00:00
Stanislav Malyshev aa10ac9a64 Yet another serialization fix - for incomplete class 2002-04-29 15:44:30 +00:00
foobar d066ed7c0e Make it possible to use recode 3.5 too. (happy now Wez? :) 2002-04-29 15:40:16 +00:00
foobar 43d46c2c41 Sync with PHP_4_2_0 branch. 2002-04-29 15:36:14 +00:00
Markus Fischer 8cf30c79ff - Fix WS and CS a bit 2002-04-29 15:06:48 +00:00
Markus Fischer c970490d28 - Store last errno in the module global 'last_error' implicitely
- Set the global 'last_error' explicitely for functions which can't return an
  error withing a single socket context (socket_create and socket_select)
- Modified socket_last_error() to return global modules last
  error if no socket resource is given
- Added a couple of more E_WARNING messages in case something
  goes foobar so the user isn't left alone in the dark.
2002-04-29 14:52:29 +00:00
Wez Furlong ab69b0c6ec Slightly alter the signature of msg_send and msg_receive so that error
codes and serialized "false" messages can be distinguished.
2002-04-29 12:52:34 +00:00
Yasuo Ohgaki 58896d5ef2 MFB 2002-04-29 09:25:56 +00:00
Stig Bakken 18936b9b61 * version will be 0.10 2002-04-29 06:41:42 +00:00
Stig Bakken dd3423434a * slight cleanup 2002-04-29 06:38:07 +00:00
Stig Bakken 7db1420fa6 * call the right parent constructor 2002-04-29 06:29:07 +00:00
Stig Bakken ac53945e9b * PEAR_Installer constructor now expects only the UI object 2002-04-29 06:24:37 +00:00
Stig Bakken 1ca41f7f49 * PEAR_Common::downloadHttp no longer wants a config object 2002-04-29 06:23:51 +00:00
Stig Bakken c5d6a0c524 * always set $this->config (use PEAR_Config::singleton)
* rename setFrontend to setFrontendObject
* add validPackageName method
* added downloadHttp callback types setup, connfailed and writefailed
* no more passing config objects around
2002-04-29 06:23:05 +00:00
Stig Bakken 0252c2bb39 * use the downloadHttp method w/callback 2002-04-29 06:20:42 +00:00
Rui Hirokawa 2f52cbbb7c shlib suffix was not defind and rint() was not found without -lm. 2002-04-29 02:55:55 +00:00
b028d4cf5a NEWS update 2002-04-29 00:43:40 +00:00
6ec7757764 ChangeLog update 2002-04-29 00:42:35 +00:00
Sascha Schumann 71124226d5 Touch generated file
# is it really so hard to remember this?
2002-04-28 21:24:52 +00:00
Sebastian Bergmann cd43b26095 Enable bundled build of ext/ctype and ext/mbstring on Win32. 2002-04-28 17:50:09 +00:00
Stanislav Malyshev a57381e3bd Fix couple of nasty serializer bugs:
a) When array unserializer encounters less data than it expects (like:
a:1:{}) it crashes. I don't understand exactly why it does, but the fact
is it does. So now it should catch "}" and bail out.
b) When array/object data are serialized, the count is written by hash
count. However, it can be that in-loop check fails and less data than
expected will then be written into the array. Which, due to a), would
crash on unserialize. So now it will write empty entries in place of
entries it cannot serialize (the other choice would be make two passes on
the data, which I don't like).
2002-04-28 16:56:33 +00:00
Thies C. Arntzen 245708b0db timestamp 2002-04-28 11:46:58 +00:00
Thies C. Arntzen 42158ef7c8 revert session_set_userdata - diffent patch will come shortly 2002-04-28 11:45:45 +00:00
Stig Bakken c6fe490093 * forgot script element in release contents 2002-04-28 07:58:41 +00:00
Stig Bakken 123a668fb5 * package.dtd: version 1.0b7
- added <provides> element
  - added <script> element
2002-04-28 07:52:00 +00:00
Stig Bakken eade67d6ab * implemented "list-remote-packages" command 2002-04-28 07:35:30 +00:00
Stig Bakken e08fb72a0c * implemented stub for XML_RPC fallback if xmlrpc-epi is not installed 2002-04-28 07:34:46 +00:00
foobar 80f9fdf3c7 @- Added optional 3rd parameter to mysql_select_db() which makes it return
@  the previously selected database name. (Jani)
2002-04-28 06:38:12 +00:00
Sebastian Bergmann 8463225b49 Revert. 2002-04-28 06:24:15 +00:00
foobar 305260ce4a kill a compile warning 2002-04-28 05:36:05 +00:00
foobar 2c8e8e0406 Fix build when openssl is enabled. 2002-04-28 04:53:40 +00:00
foobar c1c8a4fcfa touch file. Please commit first the .re file and afterwards the .c source. Otherwise, timestamps will be broken. 2002-04-28 04:14:47 +00:00
foobar 87a4bdca37 Missing dependancies.. 2002-04-28 03:27:43 +00:00
foobar 5e47866ec0 - Cleaned out the CVS commit conflicts.. 2002-04-28 01:49:42 +00:00
foobar 817750b088 ws fix 2002-04-28 01:37:54 +00:00
134e38ffd7 NEWS update 2002-04-28 00:35:32 +00:00
a7e28a7a07 ChangeLog update 2002-04-28 00:34:30 +00:00
Yasuo Ohgaki de4a0ba58e Add test case for file_exist/is_file 2002-04-28 00:05:43 +00:00
Sascha Schumann 30fd7de1fa s/len/xln/ was necessary here
Noticed by: Charles O Parks III
2002-04-27 23:37:17 +00:00
Sascha Schumann aab439f26f Use a single macro to set cl header 2002-04-27 18:41:38 +00:00
Thies C. Arntzen 7b59a131b6 @ - If possible set Content-Length header in zlib.output_compression mode. (thies) 2002-04-27 17:03:32 +00:00
Harald Radi da9dd9acc9 updated TODO list 2002-04-27 15:47:18 +00:00
Sebastian Bergmann 90bad130a9 MFZE1: If the size-operands of memset are constants, the compiler can turn them into fast inline code. So, instead of using ecalloc, we use emalloc + memset in macro form now. emalloc will not return NULL, so the chosen macro form is safe. This is not true for malloc(3). An inline function accomodates our needs here. Suggested by: http://www.mail-archive.com/dev%40httpd.apache.org/msg02492.html (Sascha) 2002-04-27 15:23:46 +00:00
Thies C. Arntzen 2dee392e5b part 2 of last commit 2002-04-27 14:08:07 +00:00
Thies C. Arntzen eb105693b8 @ - added session_set_userdata() which enables you to specify one variable
@   that will be kept in the browser in addition to the session-id. This
@   only works when using trans-sid sessions (no cookie). (thies)
2002-04-27 14:07:52 +00:00
Rasmus Lerdorf 22182fc78d # Since Jani seems to have us all on /ignore, I'm reverting 2002-04-27 13:38:55 +00:00
Harald Radi a380af2247 don't set CLSCTX_REMOTE_SERVER if NULL is passed as servername 2002-04-27 10:17:46 +00:00
foobar 6147e1e720 Fix bug: #16743 2002-04-27 01:02:52 +00:00
08b4079138 ChangeLog update 2002-04-27 00:35:20 +00:00
Yasuo Ohgaki 6cc8919dc4 Fixed bug #16861.
touch sets wrong atime or mtime when they are not specified.
touch silently failed when HAVE_UTIME is not defined.
(This needs more consideration. Which platform does not support it?)
# Derick, after HAVE_UTIME issue is resovled, this should be merged.
# or we can just merge 1st problem for now.
2002-04-26 23:46:51 +00:00
foobar 9e9ecbb84f - News entry about the change in php.ini-*
# This should have been done long time ago..
2002-04-26 23:28:24 +00:00
foobar f0de9845f8 Default setting for short_open_tag is better be Off. 2002-04-26 23:20:06 +00:00
Sascha Schumann 2b07dd4fe3 three less strlen invocations 2002-04-26 21:27:38 +00:00
Sascha Schumann 12ba44827a be a bit more verbose about what is wrong 2002-04-26 21:26:47 +00:00
Harald Radi 51241dba94 this patch should fix a bug where intermediate comvals were not
released before they were freed. this caused outproc com server
to belive that they still referenced even when the php process
already terminated.
2002-04-26 18:20:45 +00:00
Dan Kalowsky ce39ba7265 bug fix for bug #15758, a double free'ing of an ODBC connection 2002-04-26 14:56:34 +00:00
Sascha Schumann e2ad07fdcf Fix external builds 2002-04-26 10:23:16 +00:00
Sascha Schumann 5662171f0c reuse known values 2002-04-26 10:17:40 +00:00
Sascha Schumann 4efba9ef9d Improve use of module_globals macros 2002-04-26 10:13:45 +00:00
foobar 492efe963f - Fix for bug: #16791. (more reliable test) 2002-04-26 03:07:16 +00:00
77b99c3ce2 ChangeLog update 2002-04-26 00:43:34 +00:00
Wez Furlong f03115aae1 Add sysv IPC support (wrappers for msgsnd and friends). 2002-04-25 23:14:43 +00:00
jim winstead 79d113ba50 update generated file 2002-04-25 22:12:56 +00:00
jim winstead bc977dd195 Do not add redundant id attribute. It doesn't make the output any
more standards compliant.
2002-04-25 22:12:38 +00:00
Edin Kadribasic 54440c8bfd Some systems have mysql socket in /var/run/mysql 2002-04-25 21:07:36 +00:00
Edin Kadribasic b1c1a99b3d MFB 2002-04-25 17:20:14 +00:00
Rui Hirokawa 860e675884 fixed directory access problem when direcory name is encoded in japanese Shift_JIS encoding. 2002-04-25 14:43:40 +00:00
Stig Bakken 03a52cd97c * fix warning 2002-04-25 09:13:55 +00:00
Sascha Schumann 46527b3f5a Touch generated file to increase timestamp 2002-04-25 09:02:01 +00:00
Harald Radi 7e1a13131a already defined in zend_config.win32.h 2002-04-25 09:01:35 +00:00
Harald Radi f62e63dae7 unbreak the win32 build 2002-04-25 08:59:36 +00:00
Yasuo Ohgaki c5b4a507fe Added test for pg_fetch_*() functions 2002-04-25 07:52:01 +00:00
Yasuo Ohgaki b4c943ee7b Revert last 2 commits.
# Most PostgreSQL users should enable multibyte support ;)
2002-04-25 07:09:45 +00:00
Derick Rethans 8ffd089e02 - Fix for bug #16811 2002-04-25 06:43:11 +00:00
Derick Rethans 4ec1a03653 - Fix for bug #14353 2002-04-25 06:37:22 +00:00
Derick Rethans 4a834dfa44 - Fix for bug 16810 (XHTML compliance) 2002-04-25 06:30:09 +00:00
Yasuo Ohgaki 534ba498e3 Fix version in message 2002-04-25 02:40:58 +00:00
foobar c0be369f88 fine-tuning 2002-04-25 02:11:37 +00:00
foobar 9f096d2578 Only support the new libexpat. 2002-04-25 01:47:35 +00:00
Yasuo Ohgaki c65a20df4a pg_client_encoding/pg_set_client_encoding should be compiled always.
Recent libpq has PQclientEncoding/PQsetClientEncoding regarless of
multibyte support enabled or not.

Reported by c@cornelia-boenigk.de

# This should be merged, but need a little more testing.
2002-04-25 01:42:23 +00:00
da643f3fea ChangeLog update 2002-04-25 00:49:15 +00:00
Yasuo Ohgaki 48ea7057e4 Remove result_type from pg_fetch_object() proto.
It still accepts 3rd argument, but passing 3rd argument
does not make sense for pg_fetch_object().
2002-04-24 23:03:48 +00:00
Yasuo Ohgaki cf7f465ef9 It does not make any sense to have a PGSQL_BOTH as a default for pg_fetch_object()
Noticed by c@cornelia-boenigk.de
2002-04-24 22:57:21 +00:00
Dan Kalowsky 55e43151d5 clearing up some code to remove any possible confusion in variable counts 2002-04-24 22:07:29 +00:00
foobar e46f57b6fb - Fixed a typo..
# not related to the localhost.localdomain thing..
2002-04-24 18:00:39 +00:00
Stanislav Malyshev 68e5f549c0 Init output_start_* to avoid "output started at ZZZZZ" messages
(which may result when output started while zend is neither compiling nor
executing - e.g., when file upload fails).
2002-04-24 16:53:07 +00:00
Harald Radi 8bf59c8fd0 MFZE1 saschas 'Avoid exceeding buffer limits' patch 2002-04-24 15:46:40 +00:00
Andrei Zmievski 77629de74e *** empty log message *** 2002-04-24 15:30:59 +00:00
foobar 0d7b1a4e94 - Do the ssl_onceonlyinit() as last. This is how c-client creates
the linkage.c (used by Pine).
2002-04-24 15:29:52 +00:00
foobar 0cc3ccbfa8 - Missing .libs line..
# whoever removed all the .libs lines from these files,
# please put them back.
2002-04-24 15:28:50 +00:00
Andrei Zmievski 5ff970ba7d Fix Bug #14795. 2002-04-24 15:23:43 +00:00
Andrei Zmievski 4fc01022e6 Fix unwanted type conversion in array_merge_recursive (Bug #14990). 2002-04-24 15:01:53 +00:00
foobar 712c85eddc One big mess is a bit less mess now. 2002-04-24 12:45:55 +00:00
Uwe Steinmann 1259f0c24a - Put news item about changes of domxml in 2002-04-24 08:04:36 +00:00
Derick Rethans df97b95b4d Merge fixes 2002-04-24 06:40:36 +00:00
foobar 0a1f795271 Fix ZTS build. 2002-04-24 05:49:57 +00:00
foobar b6c79ed5e7 Added the 4.2.1 entries here too. 2002-04-24 02:06:33 +00:00
foobar a49d98b499 fixed the comment.. 2002-04-24 01:51:12 +00:00
Aaron Bannert b2f9b6fb16 Apache does a full load, unload, load cycle for each DSO module.
This patch makes sure that any startup actions that are performed
for PHP don't happen until the second load (the second call to
the post_config hook), and it also prevents subsequent calls
to the initialization routines.

Suggested By:   Cliff Woolley

PR: 16475, 16754
2002-04-24 00:55:38 +00:00
Stig Bakken 3460eedfca * add "_lastmodified" timestamp to registry files (don't trust filemtime) 2002-04-24 00:48:06 +00:00
dc49f3cd0a NEWS update 2002-04-24 00:23:56 +00:00
0cb2b488f7 ChangeLog update 2002-04-24 00:23:03 +00:00
Stig Bakken 1ac4caa680 0.9.1 release notes ++ 2002-04-23 23:37:07 +00:00
Stig Bakken 31d02d2bb8 * make validator work again 2002-04-23 23:36:54 +00:00
foobar c3a6cbbc42 Fixed the extension name. 2002-04-23 23:30:20 +00:00
Stig Bakken da684c5a00 * roll out 1.2 release 2002-04-23 23:29:16 +00:00
foobar 4586a989ef Wrong variable used here.. 2002-04-23 23:17:41 +00:00
foobar 5aed99b456 ws fix 2002-04-23 22:45:51 +00:00
Markus Fischer a8b633bfa2 - Fix proto. 2002-04-23 22:22:17 +00:00
Markus Fischer be013212bc - Fix pcntl_waitpid() [Fixes #16766]. 2002-04-23 21:21:41 +00:00
Sascha Schumann 1d22766fb1 Add #ifdef.. around F_SETFD. 2002-04-23 19:58:31 +00:00
Derick Rethans e31793414d Fix TSRMLS_CC thingies. 2002-04-23 19:01:31 +00:00
Harald Radi 51e797f1e3 some type cleanup work 2002-04-23 18:06:54 +00:00
Uwe Steinmann fc851f342a - replace_child() will not add a child twice
- domxml_open_mem() drops old optional parameter to switch between reading
  from a string or a file.
- new optional parameter for domxml_open_mem() which set the mode how the
  document shall be parsed
2002-04-23 13:24:25 +00:00
Hartmut Holzgraefe 4852dd3569 apache_child_terminate() returns status as bool
proto fixes
2002-04-23 11:40:19 +00:00
Yasuo Ohgaki 417f299d0e Remove unneeded 'return'. 2002-04-23 08:10:45 +00:00
Yasuo Ohgaki e6780384ad Fix possible wide char prolem.
Fix empty output when no conversion is performed.
# Derick, this needs to be merged.
2002-04-23 08:07:19 +00:00
Stig Bakken 722cd4fa17 * use PEAR_Common::downloadHttp() 2002-04-23 07:01:45 +00:00
Stig Bakken e22ee6a085 * downloadHttp: pass the total number of bytes downloaded as parameter
to the 'done' callback
2002-04-23 06:49:10 +00:00
Stig Bakken 124c63b333 * moved these "class variables" to global variables and added static methods for getting
them: maintainer_roles, release_states, dependency_types, dependency_relations,
  file_roles, replacement_types
* added downloadHttp method with status callback support (can be used by installers
  to show download progress)
2002-04-23 06:28:44 +00:00
Uwe Steinmann 1e9000e315 - added new function DomDocument->ids (subject to change) 2002-04-23 06:26:46 +00:00
Uwe Steinmann d4c273c3a7 - get_element_by_id() doesn't use xpath anymore but searches in
xmlDoc->ids as provided by libxml.
- New function DomDocument->ids() returns a list of ids (subject to change)
- replace_node() doesn't make a copy of the new node if it has no parents
2002-04-23 06:05:38 +00:00
Sascha Schumann cab34e6b05 No need for an ifelse here (which was lacking a char anyway :-) 2002-04-23 05:06:51 +00:00
Yasuo Ohgaki e7e0eddadd Make pg_convert/pg_insert/pg_select/pg_update/pg_delete a bit more flexible.
pg_convert() may ignore, NOT NULL and/or DEFAULT.
pg_insert/pg_update/pg_select/pg_update may return query string.
2002-04-23 03:42:26 +00:00
foobar f54f199906 This was not supposed to be uncommented..yet. 2002-04-23 03:02:20 +00:00
foobar dace2eca03 Part 4 of apache sapi build fixes:
- Fixed many conflicts caused by bogus includes, e.g the infamous XtOffset
  redefinition warning is gone now.
2002-04-23 03:01:30 +00:00
foobar eb18c5c38c Part 3 of static apache build fixes:
- Use the PHP_CFLAGS when compiling the php4 module in apache tree.
- Use the apache include dir only when compiling sapi/apache
  o Fixes the fnmatch.h issue Wez complained about :)
2002-04-23 02:58:54 +00:00
foobar 50f91c18fb Part 2 of static apache build fixes:
- Added 2 variables to be used in libphp4.module
  o Apparently autoconf 2.53 screws abs_srcdir
- Made INCLUDES and EXTRA_INCLUDES available to be used with AC_OUTPUT()
  o Not related to the static apache build issues
2002-04-23 02:51:17 +00:00
foobar 3679c6e054 Part 1 of commits to fix some issues with static apache (1.3.x) compile:
- Made the OPENSSL_INCDIR available to be added in the PHP_CFLAGS
  in libphp4.module
- Make it possible to set SAPI specific include dirs
2002-04-23 02:47:34 +00:00
foobar 675ff2d811 Missing date for 4.2.0 2002-04-23 01:44:46 +00:00
d16ea58e8b ChangeLog update 2002-04-23 00:28:29 +00:00
foobar ae2e36a4e5 Changed the error for 'no upload' to E_NOTICE so that it doesn't
pollute the logs too much.

@- Fixed possible crash bug in HTTP uploads. (Patch: Lucas Schroeder)
2002-04-23 00:14:08 +00:00
Rui Hirokawa 36e51815ad fixed access problem when japanese Shift_JIS character is used as directory name. Some characters in Shift_JIS are including 0x5c (slash) as second byte. 2002-04-22 22:14:39 +00:00
Sascha Schumann 303a784822 remove unnecessary casts
# if you mind the bogus warnings, you can either switch the compiler
# or decrease the warning level
2002-04-22 20:42:01 +00:00
Sascha Schumann 5a83ad6dc1 Set the close-on-exec flag for fds. Child processes should not inherit
the fd.

Also rip out the broken O_EXCL use.  Our file names are not unique and
this left a small window open where creating a session file would fail
(a, b notice that the file does not exist; a creates the file successfully;
 b tries to create, but fails due to O_EXCL).
2002-04-22 20:39:24 +00:00
Jim Jagielski a6117a874e Typo in error string 2002-04-22 20:00:41 +00:00
Harald Radi 894aac6e19 set up a proxy object when requesting a reference to a variable 2002-04-22 19:40:01 +00:00
Harald Radi b29604fefc fixes a warning when compiling under win32 2002-04-22 18:02:01 +00:00
Marko Karppinen 42555b189e Refine the OS X support a bit 2002-04-22 15:37:54 +00:00
Marko Karppinen 2cd85ac084 Merged the Mac OS X compile changes from the Apache 1.3 SAPI.
--with-apxs2 should now work on Mac OS X / Darwin.
# Not tested, though. So shoot me! :)
2002-04-22 15:25:17 +00:00
Marko Karppinen e7ccaf4fb9 Prettify the NEWS entries
# So that Jani doesn't have to do it every time!
2002-04-22 14:55:51 +00:00
Marko Karppinen 2580f11aa8 Let's pretend this is up-to-date now 2002-04-22 14:45:13 +00:00
Harald Radi 94ba23998f changes related to the latest commit of the zend engine 2002-04-22 14:25:46 +00:00
Harald Radi 6ac6cb1040 added get_class_entry callback handler to the
object handlers structure
2002-04-22 14:22:27 +00:00
Edin Kadribasic 6c491a5654 Reverting my previous patch. 2002-04-22 12:00:53 +00:00
Sebastian Bergmann 79d71a17a5 MFZE1: Change default value of inline-opt to yes (Sascha). 2002-04-22 11:06:22 +00:00
Harald Radi 2afbbd2e4f fixed linkage warning under win32 2002-04-22 09:33:25 +00:00
Martin Jansen eb3c6e7a18 * Due to the recent changes in the installer stuff, the webinstaller
is not supported at the moment.
2002-04-22 09:11:06 +00:00
Sascha Schumann ebd957f69e hash keys lengths include the NUL-byte, so we need to copy one byte less.
also add missing commas in the INSERT clause.

Noticed by: Yasuo Ohgaki
2002-04-22 08:18:19 +00:00
865c2b7ca4 ChangeLog update 2002-04-22 00:21:33 +00:00
foobar 983355dfde missing .cvsignore 2002-04-21 22:28:37 +00:00
Rui Hirokawa 222a2f4fef fixed problem when multibyte character is included in file path on Windows. If _MBCS is defined, _tcstok is defined as _mbstrtok which is multibyte enabled strtok. If _MBCS is not defined, _tcstok is defined as strtok. 2002-04-21 22:20:14 +00:00
Rui Hirokawa aa9cf268db small performance improvement when pass is selected as input encoding. 2002-04-21 22:06:55 +00:00
Edin Kadribasic 8509772d93 Added ..\..\..\php_build\lib\apache2 to libpath and
..\..\..\php_build\include\apache2 to includepath
2002-04-21 20:36:08 +00:00
Wez Furlong 6d1dc8141c Apply that patch I wrote ages ago that fixes some problems with true-color
vs palette based handling.
Also implements the gdImageStringFTEx function.
2002-04-21 13:48:22 +00:00
Stig Bakken 88024105c9 * more uniform "level 2 debug messages"
* don't add dirname(file) to install path if install-as attribute is set
2002-04-21 11:46:41 +00:00
Sascha Schumann d1a1f17628 refactoring in pgsql_do_connect and some "leaner" code in pgsql_add_quotes 2002-04-21 11:29:17 +00:00
Sascha Schumann c2c23ff6df Avoid allocating resources, if we know that the input array is empty.
Also pass tsrmls to do_exec.
2002-04-21 10:44:31 +00:00
Sascha Schumann bf87992040 speling fix and s/FAILURE/HASH_KEY_NON_EXISTANT/ 2002-04-21 10:37:40 +00:00
Sascha Schumann c6016fcfd2 The default has been changed to assume failure, because there were 5-10
cases of failure and one success.
2002-04-21 10:28:01 +00:00
Sascha Schumann db24a14b9b Add PGSQL_RETURN_OID which encapsulates the LONG_MAX check etc.
Add a few missing smart_str_0's.

Remove a "(" in a probably less-tested #ifdef.. branch
2002-04-21 10:22:31 +00:00
Sascha Schumann 9a7418906c Also support --disable-shared installations of pgsql 2002-04-21 10:18:34 +00:00
Stig Bakken 8a41f93fcc * set version to 0.9.1-dev 2002-04-21 10:17:13 +00:00
Stig Bakken 40878cbe0e * PHP_PREFIX constant is not defined, use bin_dir pear config instead 2002-04-21 10:16:32 +00:00
Sascha Schumann 7e597b260a My patch as posted to php-dev + warnings/errors fixed as seen in
Yasuo's reply.
2002-04-21 09:46:29 +00:00
Martin Jansen dc8c2c9a6c * Remove package directory if empty during uninstall process
* Don't baseinstalldir for documentation.
2002-04-21 06:17:53 +00:00
foobar 65078f3b50 Tiny typo.. 2002-04-21 02:50:38 +00:00
Tomas V.V.Cox 13f7ec4374 Bail on no HTTP.php present in the system
Let "pear download" act ala wget
2002-04-21 01:34:49 +00:00
Tomas V.V.Cox 929e8f81e3 typo 2002-04-21 01:32:03 +00:00
Sascha Schumann d30fc27e5a simplify and improve speed of smart_str_print_long.
also add a variant for unsigned numbers.
2002-04-21 01:17:49 +00:00
Sterling Hughes 5db5498f90 expletives deleted. 2002-04-21 00:41:38 +00:00
Sterling Hughes dc3b3fa302 some more fixes towards making it work again 2002-04-21 00:27:05 +00:00
382bdcf427 NEWS update 2002-04-21 00:18:33 +00:00
804aa39035 ChangeLog update 2002-04-21 00:18:00 +00:00
Zeev Suraski 579b9bff3d MFZE1 2002-04-20 20:14:14 +00:00
Sascha Schumann 5e25c15d6c allocate space for NUL 2002-04-20 18:58:20 +00:00
Derick Rethans 6075a65319 - initialize globals properly 2002-04-20 18:33:54 +00:00
jim winstead 36751953d4 include the checks for various support libraries to --with-gd=php section. the
libgd stuff needs some additional checks to handle the presence/absence of
things like libpng, but this helps when most things are included.
2002-04-20 18:02:14 +00:00
jim winstead 95e9eb35d8 s/.o/.c/ 2002-04-20 17:24:37 +00:00
Sterling Hughes a8504dc592 realloc buffer down 2002-04-20 16:08:30 +00:00
Sascha Schumann 20c0fed127 If I don't want mbstring, I also don't want this transparent encoding
thingee which caused an undefined reference in main.o.
2002-04-20 15:17:57 +00:00
Yasuo Ohgaki 3087b96ece Make pg_lo_import()/pg_lo_unlink()/pg_lo_open()/pg_lo_export() work with oid larger than 2^31.
@Added large OID value (2^31 to 2^32) support for pg_lo_import()/pg_lo_unlink()/pg_lo_open()/pg_lo_export(). (Yasuo)
2002-04-20 14:06:47 +00:00
Derick Rethans 63c3c0874a - Add missing .cvsignore 2002-04-20 11:11:49 +00:00
Sander Roobol b10e119023 Another .cvsignore update 2002-04-20 09:32:52 +00:00
Sander Roobol 230ded56ed Removed makefiles from most .cvsignores and some minor cleanups. 2002-04-20 09:32:42 +00:00
Sander Roobol d94a8467f0 Added missing .cvsignore 2002-04-20 08:25:00 +00:00
Yasuo Ohgaki 29e3175f97 Added comment to fix large OID value handling later.
Fixed wrong conversion specifiers.
2002-04-20 04:17:17 +00:00
Yasuo Ohgaki 3ee7591ae9 Added missing 'd'. 2002-04-20 03:50:21 +00:00
Yasuo Ohgaki d845ba2077 Some cleanup.
More OID range related fixes.
# Need a little more work for OID
2002-04-20 03:37:01 +00:00
Yasuo Ohgaki 07125ea9f4 Fixed OID overflow. If value is larger than MAX_LONG,
pg_last_oid() returns string to keep correct value.
2002-04-20 03:03:42 +00:00
Yasuo Ohgaki 04fb5ef2e3 Added API version for C programs 2002-04-20 02:38:30 +00:00
Yasuo Ohgaki c53c212da6 Remove warnings.
Fixed OID overflow bug.
Fixed type convertion bug.
# Thank you Edin.
2002-04-20 02:31:48 +00:00
foobar b3805dd364 We call them "extension"..and again, missing period. :-p 2002-04-20 02:19:43 +00:00
15f1841ed5 NEWS update 2002-04-20 00:19:55 +00:00
62efcae45e ChangeLog update 2002-04-20 00:19:10 +00:00
Sterling Hughes c53003575a throw a warning if encoding support not available... 2002-04-19 23:46:09 +00:00
Sterling Hughes 832ec57fda update todo a bit 2002-04-19 22:34:45 +00:00
Sterling Hughes 8912735d86 make it work with dom processing, this allows DOM tree caching to avoid
re-parsing the same data.  Currently very beta -- DO NOT USE.  Will be cleaning
this up over the next few days...  Need this in here for version history, and
to show other people
2002-04-19 22:17:23 +00:00
Adam Dickmeiss 4bf2f16771 Indentation;) 2002-04-19 20:15:40 +00:00
Adam Dickmeiss 6ad3b2bf43 fix warning 2002-04-19 20:03:47 +00:00
Andrei Zmievski 4acbbcf5a9 Revert bogus patch. 2002-04-19 17:23:22 +00:00
Sebastian Bergmann bf5bb84277 MFZE1: make sure the resource-list is always consistent during shutdown (Thies). 2002-04-19 16:53:36 +00:00
Sebastian Bergmann 2697ce689d MFZE1: Fix imbalance bug (Zeev). 2002-04-19 16:43:27 +00:00
Derick Rethans 18a3f085aa - Fix warnings in VC 2002-04-19 14:57:46 +00:00
Stig Bakken 8fcdb67068 * add http_proxy config setting 2002-04-19 14:01:51 +00:00
Stig Bakken c8418830f9 * make "pear install package.xml" possible, so you can install a package
without building a tarball first
2002-04-19 14:01:10 +00:00
Stig Bakken 021ed8a10b * reintroduce (un)install -r option for Registeration only 2002-04-19 14:00:14 +00:00
Stig Bakken 0ca308d152 * fix phpdoc 2002-04-19 13:58:25 +00:00
Yasuo Ohgaki e64696d729 Fixed pg_insert/update/select/delete overflow. 2002-04-19 13:09:09 +00:00
Yasuo Ohgaki 825e011805 Update tests 2002-04-19 12:24:58 +00:00
Yasuo Ohgaki 7a8ad06121 Added "NOT NULL" check and do not add converted variable when field is NULL and HAS DEFAULT.
(php_pgsql_convert)
2002-04-19 12:24:14 +00:00
Yasuo Ohgaki 8d8ca2602b Changed "default" -> "has default" (metadata)
Fixed comment. Do not use magic number.
2002-04-19 12:19:29 +00:00
Wez Furlong 928bae9cf8 Make scheme part decoding rfc2396 compliant.
Change zlib:// and bzip2:// to compress.zlib:// and compress.bzip2://
Tidy up old socket/network code/comments.
2002-04-19 10:06:41 +00:00
Yasuo Ohgaki fe6990cc6b Remove compiler warnings 2002-04-19 07:56:41 +00:00
Yasuo Ohgaki c1ae59c588 Fixed file include error 2002-04-19 07:55:24 +00:00
Yasuo Ohgaki ec11233183 Remove warning. 2002-04-19 07:54:52 +00:00
Yasuo Ohgaki 2efc8847cd Fixed test title (strlen -> mb_strlen) 2002-04-19 07:51:00 +00:00
Yasuo Ohgaki f463be8408 Leave "" (null string) when converting. 2002-04-19 07:47:53 +00:00
Yasuo Ohgaki 3b75b606d8 Remove warnings 2002-04-19 07:33:51 +00:00
Yasuo Ohgaki e59e3884b6 Added mbstring.func_overload directive 2002-04-19 07:13:55 +00:00
Yasuo Ohgaki 26bf419778 Fixed messages 2002-04-19 07:08:26 +00:00
Yasuo Ohgaki fe5c67d285 Remove gargabe 2002-04-19 06:33:55 +00:00
Yasuo Ohgaki 6c8bcadf76 Enable mbstring by default.
@ mbstring module is enabled by default (Yasuo)
2002-04-19 06:32:26 +00:00
Yasuo Ohgaki fd89d2d24a Added description to mbstring ini entries 2002-04-19 06:30:14 +00:00
Yasuo Ohgaki e17161443a Avoid defining/using S_ISDIR macro. 2002-04-19 05:48:22 +00:00
fedfdd2c11 ChangeLog update 2002-04-19 00:22:58 +00:00
Derick Rethans 68ca74c371 - Gaurd for problems in fault servers (fixes problem with Sambar 5.2) 2002-04-18 22:51:23 +00:00
Aaron Bannert 5ab179e830 Document the new PHPINIDir directive in the apache2filter/README. 2002-04-18 22:47:13 +00:00
Aaron Bannert 3aa8a9b62b This patch implements a new Apache2 directive called PHPINIDir that
allows the specification of the php.ini directory from within the Apache
configuration. If left unset, the default is to defer to the hard-coded
php paths. When set, the supplied path is made relative to Apache's
internal ServerRoot setting.

Example:
PHPINIDir "conf"
# PHP will now look in the ServerRoot/conf directory for the php.ini file
2002-04-18 22:10:57 +00:00
Martin Jansen ab54cc1e1b * Add API documentation. 2002-04-18 18:04:06 +00:00
Sebastian Bergmann a312b1f2ab Allow for PCRE to be disabled. 2002-04-18 17:56:53 +00:00
Sebastian Bergmann c57ab20ac8 Make use of HAVE_MYSQL. Reviewed by: Sterling. 2002-04-18 16:48:03 +00:00
Sebastian Bergmann ecf95deb6a Conditionally include mbstring.h. 2002-04-18 16:39:30 +00:00
Sebastian Bergmann 05a2de0d6a Add HAVE_CALENDAR, HAVE_COM, HAVE_SESSION and HAVE_TOKENIZER to enable/disable these extensions, respectively. It is now possible to build PHP on Win32 with just ext/standard and ext/pcre. The latter is needed by the former, because at least the aggregation functions use PCRE. 2002-04-18 16:34:13 +00:00
Aaron Bannert d11ee7c1ea Fix an intermittent SEGV when an error bubbled up from PHP before our
server context was set. Now if that happens we simply don't log against
any particular server config (vhost).

Obtained from bug report by:  Balazs Nagy <js@iksz.hu>
2002-04-18 16:34:06 +00:00
Sander Roobol fd167a7d42 Removed redefinition of MIN() 2002-04-18 14:05:28 +00:00
Sander Roobol 151bc2a082 Removing unused variable 2002-04-18 14:04:10 +00:00
Derick Rethans c0c9279c0a - MFH: Make DBA compile as a shared module again 2002-04-18 12:30:18 +00:00
Sebastian Bergmann 1d275db13b Some cleanup for the Win32 build configuration. 2002-04-18 11:58:08 +00:00
Harald Radi f246e23799 whitespace fixes 2002-04-18 10:05:47 +00:00
Alan Brown ad9f90a223 Missing break; causes fallthrough which actually causes heap corruption in the debugging version despite being just plain wrong. Also placed a default "Unavailable" message when the object does not populate the EXCEPINFO structure. Also removed a minor memory leak. 2002-04-18 01:56:29 +00:00
Alan Brown bbb133f292 When V_BSTR() is NULL, we pass a NULL pointer into php_OLECHAR_to_char() which reports an exception. Better to map a NULL string pointer to ZVAL_NULL. 2002-04-18 01:52:07 +00:00
57031f2ba0 ChangeLog update 2002-04-18 00:21:57 +00:00
Sebastian Bergmann 548421ff9a Whitespace fixes. 2002-04-17 18:14:03 +00:00
Sebastian Bergmann 81599ef561 Only include php_bcmath.h when WITH_BCMATH=true. 2002-04-17 18:11:53 +00:00
Sebastian Bergmann 958c68a17c Give HAVE_MYSQL meaning on Win32. 2002-04-17 18:10:35 +00:00
Sebastian Bergmann 08a4924344 Give HAVE_UODBC meaning on Win32. 2002-04-17 17:57:40 +00:00
Sebastian Bergmann 4a9c2f43f4 Give HAVE_LIBEXPAT and HAVE_WDDX meaning on Win32. 2002-04-17 17:51:30 +00:00
Sebastian Bergmann d2809b9fca Give HAVE_FTP meaning on Win32. 2002-04-17 17:38:03 +00:00
Sebastian Bergmann a16213f5fd Remove bogus includes. 2002-04-17 17:33:14 +00:00
Sebastian Bergmann c2dd85ce15 Patch by Marcus Börger. 2002-04-17 17:25:18 +00:00
Stig Bakken 948106fd20 * doooh! 2002-04-17 08:22:56 +00:00
Uwe Steinmann 4a2c9980b8 - fixed memory leak 2002-04-17 07:33:39 +00:00
Sebastian Bergmann 90f32a7d9c SPACEs->TAB. 2002-04-17 05:21:04 +00:00
Sebastian Bergmann 208c52fda6 Beautify. 2002-04-17 05:19:10 +00:00
Sebastian Bergmann 6d42121bf3 Forgot adding phpext_tokenizer_ptr. 2002-04-17 05:16:42 +00:00
Sebastian Bergmann 2fc2f74ad1 Enable ext/tokenizer by default on Win32, too. Since there is no HAVE_TOKENIZER flag, it cannot be turned off in config.w32.h. 2002-04-17 04:44:02 +00:00
d37c22ee3f ChangeLog update 2002-04-17 00:25:55 +00:00
Wez Furlong b10b24d50c Always initialize wrappers, regardless of PG(allow_url_fopen).
Add is_url field to wrapper structure; the stream wrapper openers
will disallow opening is is_url && !PG(allow_url_fopen).
Add infrastructure for stat($url) and opendir($url).
Tidy up/centralize code that locates and instantiates wrappers for the
various operations.
Implement opendir for plain files.
Make the PHP opendir and dir functions use the streams implementations.
Add modelines for syntax highlighting the pear scripts in vim
2002-04-16 22:14:27 +00:00
Stig Bakken fe2badf64e * added DB::isConnection
* phpdoc fixes
2002-04-16 21:50:48 +00:00
Marcus Boerger 7bb4b5bd76 fix cli/cgi -c <path>|<file>
#hope this fixes it really (works for me)
2002-04-16 19:08:02 +00:00
Aaron Bannert 2e3ce44c80 It makes more sense to do the null-pointer check *before* trying to use it.
(Also fix a typo that Cliff pointed out: "safe" --> "save".)

Obtained from:  Ryan Morgan <rmorgan@covalent.net>
2002-04-16 17:41:28 +00:00
Sterling Hughes 651c00718a move xslt_error and xslt_errno down to functions, in order to
make logical room for the xslt_dom_* functions

# (xslt_dom_* will be a basic api, allowing no dom manipulation,
#  however, one of these days I'll write a message/extension that
#  handles xslt/dom/sax in a coherent manner -- just you watch :)
2002-04-16 15:54:59 +00:00
Wez Furlong 1f4d4873dc remove old code 2002-04-16 14:47:20 +00:00
Sander Roobol c18338b84e Added missing function to function_entry 2002-04-16 14:19:09 +00:00
Stig Bakken 5d7b69f43e * started working on analyzeSourceCode and detectDependencies methods 2002-04-16 13:27:42 +00:00
foobar 01ae2f026e removed ws pollution 2002-04-16 12:58:23 +00:00
foobar 6394a85af8 Added 2 new tokens: T_CLASS_C and T_FUNC_C 2002-04-16 12:53:07 +00:00
Derick Rethans 561552cb4d - MFB: Remove version number 2002-04-16 10:14:08 +00:00
Sterling Hughes e937ad5adf update these docs, phpdoc will lag a bit :) 2002-04-16 06:41:05 +00:00
Sterling Hughes 2b5a95b54b Prefix current functions with "sax" in order to make way for dom interface
backwards compatibility is maintained via function aliases
xslt_sax_set_sax_handlers is a bit wierd, i guess...
2002-04-16 06:37:19 +00:00
Sterling Hughes 59f3ba1490 clean up the error code a tidbit 2002-04-16 06:04:17 +00:00
Stig Bakken e07f7cce08 * build tokenizer by default 2002-04-16 05:37:51 +00:00
Stig Bakken e32362f792 * chdir back to original dir in PEAR_Packager::package
* only display "cvstag" hint if CVS/Root exists
2002-04-16 05:01:41 +00:00
7acfa47fb5 ChangeLog update 2002-04-16 01:33:15 +00:00
Tomas V.V.Cox b339986c12 Added standar header 2002-04-16 00:44:03 +00:00
Tomas V.V.Cox 7325f1a4f0 Added standar header 2002-04-16 00:38:21 +00:00
Tomas V.V.Cox 8a365fd8a2 Vim tags added plus some other minor text about license and author 2002-04-16 00:31:16 +00:00
Tomas V.V.Cox 299849fbf2 Be more clear when no packages are installed 2002-04-16 00:23:32 +00:00
Tomas V.V.Cox 26e59d106c Give the right error when wrong params given to package-info and
fix/add help some help messages
2002-04-16 00:22:55 +00:00
Frank M. Kromann 1c111b5d3f Fixing Win32 compilation of mbstring 2002-04-15 23:03:48 +00:00
Frank M. Kromann 45881d2b40 Fixing Win32 compilation of exit 2002-04-15 22:23:20 +00:00
Frank M. Kromann 643fb6dcdf Adding PHPAPI needed for exif on Win32 2002-04-15 22:22:53 +00:00
Mark L. Woodward c000d491d7 Chages for beta3 2002-04-15 22:00:56 +00:00
Wez Furlong ca6b88ef46 should not be there 2002-04-15 20:12:29 +00:00
Wez Furlong 50cf12ce4c Some minor tweaks and debugging for sockets. 2002-04-15 20:11:12 +00:00
Uwe Steinmann de2ef69032 - DomNode->replace_node() now returns the node that was replace and
not the new node
- fixes Bug #15949
2002-04-15 15:39:10 +00:00
Uwe Steinmann c7e391637c - added DomNode->replace_child() 2002-04-15 14:45:38 +00:00
08e3ee7e90 ChangeLog update 2002-04-15 00:42:10 +00:00
Marcus Boerger ef5c0f7cc6 support for WinXP tags (thanks to Rui Carmo) 2002-04-14 20:47:21 +00:00
Thies C. Arntzen 136240ae46 fix crash bug introduced by last commit 2002-04-14 18:27:27 +00:00
Markus Fischer f95fbc4e60 - Do not try to draw a table if there are not elements.
# If no packages are installed, until now the output was:
#
# INSTALLED PACKAGES:
# ===================
# +
# +
#
# Now it is:
#
# INSTALLED PACKAGES:
# ===================
#
# Which is nicer IMHO. It think keeping the caption is ok.
2002-04-14 13:34:52 +00:00
foobar ce931e7413 Fixed some entries.. 2002-04-14 12:58:28 +00:00
foobar b21931e6c3 ws fixes 2002-04-14 12:38:33 +00:00
Derick Rethans 069d83c68a - Fix null-termination problem 2002-04-14 08:49:57 +00:00
Rui Hirokawa d5158c20a4 fixed error output handler when 'pass' is choosed as output encoding. 2002-04-14 08:18:55 +00:00
foobar 7c2811e1ab Make it possible to actually disable the CLI.. 2002-04-14 03:57:59 +00:00
Frank M. Kromann cd0b3ea491 /usr/lib is the default install dir on Mandrake 2002-04-14 02:28:09 +00:00
foobar 72c40cdf42 - Use the correct javac/jar binaries. 2002-04-14 00:40:36 +00:00
1a0ac41144 NEWS update 2002-04-14 00:23:02 +00:00
435857115d ChangeLog update 2002-04-14 00:21:50 +00:00
Thies C. Arntzen 12541a481e ocibind: avoid warning in debug mode if an outbound variable is NULL 2002-04-13 18:58:18 +00:00
Yasuo Ohgaki 3381fe4394 Fix cli/cgi -c option
# I must be sleeping
2002-04-13 14:12:17 +00:00
Thies C. Arntzen 33a493cf82 @- Mixing OCIPlogon and OCINLogon no longer leak Oracle-Sessions. (thies) 2002-04-13 12:10:03 +00:00
Christian Stocker 67292ee205 @- old $node->append_child() is now $node->append_sibling(), since
@  new append_child() now behaves like excepted (= W3C standard) (chregu, uwe)
2002-04-13 10:23:46 +00:00
Sascha Schumann 83719f5cd8 s/==/=/ 2002-04-13 09:26:29 +00:00
Markus Fischer 509ef0237f - Also raise a different error message if we don't specify any package at all.
# We might consider giving the 'pear help uninstall' output to the user?
2002-04-13 06:00:36 +00:00
foobar 0fa1516483 - Prevent users from trying to make a static build with Apache2 using
--with-apache

# I have working --with-apache2 stuff also..need to test it a bit more
# before committing it..
2002-04-13 05:58:29 +00:00
Markus Fischer e060e90f0c - Return a different error message if no package file was given at all. 2002-04-13 05:52:54 +00:00
Rasmus Lerdorf be2078bb73 oops 2002-04-13 05:43:14 +00:00
Markus Fischer e96a657f8d - Properly format error message.
# Shouldn't this 'throw' an PEAR Error object ?
2002-04-13 05:33:35 +00:00
Markus Fischer c7a1d96f8a - Fix a possible memory leak in xml_set_handler().
I stumbled over this while trying out 'pear package' which, while doing
  xml parsing, re-assigns the variaous callback handlers depending
  on the version during xml processing.

  If this check causes problems, let me know.
2002-04-13 05:06:33 +00:00
Rasmus Lerdorf 7a8cade379 Initial commit of the built-in libgd based on GD-2.0.1
This initial checkin has no changes to any of the libgd code so it can
be used as a basis for diffs.  It also will not build currently because
of this.  The PHP gd checks need to be incorporated along with a bit of
other config magic.  It also shouldn't break the build and will only
take effect if you use --with-gd=php right now.
2002-04-13 02:03:09 +00:00
foobar c46199f5b9 Do NOT use c++ comments in c code!!!!! 2002-04-13 00:31:55 +00:00
cff79286b8 NEWS update 2002-04-13 00:27:54 +00:00
e3c0fc38b9 ChangeLog update 2002-04-13 00:26:23 +00:00
Stig Bakken d1814a3c12 * cvstag command: tag slide option is -f, not -F 2002-04-13 00:23:19 +00:00
Stig Bakken 8c0edb86b0 * missing file role message could be mistaken for missing maintainer role 2002-04-13 00:20:40 +00:00
Stig Bakken 5d09a5e199 * add cookie authentication to PEAR_Remote (temporarily in addition to http auth) 2002-04-13 00:13:37 +00:00
foobar f81166f34e - Added checks to prevent building the DSO with wrong configure option. 2002-04-12 22:59:07 +00:00
Aaron Bannert bf8bb929ac Fix a typo and a build error detected by the lovely HPUX11 ANSI C compiler. 2002-04-12 22:25:29 +00:00
foobar 8581de0fe2 Fix the build.
# Marcus, do you TEST build at all before you commit?!
2002-04-12 22:02:28 +00:00
foobar 067ca4e813 Do NOT use C++ comments in C code. 2002-04-12 21:19:59 +00:00
jim winstead 84b37c9c03 remove this, since it doesn't describe the current process, and is
under a silly license.
2002-04-12 20:20:20 +00:00
Wez Furlong 4df5076d2f fix build with ZE2 2002-04-12 19:26:08 +00:00
Wez Furlong e2f00a130f fix segfault 2002-04-12 18:17:19 +00:00
Sascha Schumann 22815419f8 Gone they are.. files related to the old build-system 2002-04-12 17:28:41 +00:00
Jan Lehnardt 9b09fba139 - MFB (4_2_0) 2002-04-12 16:54:01 +00:00
Marcus Boerger 50d957cd7a Ini settings for internal encoding and decoding of Unicode and JIS formatted user comments.
@- Ini settings for encoding/decoding Unicode/JIS user comments (Marcus)
2002-04-12 16:35:56 +00:00
Frank M. Kromann 7ff43f040f Removing a unused local variable.
Setting the size before returning the value in readgzfile
2002-04-12 16:25:31 +00:00
Marcus Boerger 0f0a5dddf3 -new function php_mb_check_encoding_list
-mark module globals as const (thread safety)
2002-04-12 16:17:16 +00:00
Sander Roobol fa8e2db095 This test should be skipped if(!cgi) 2002-04-12 15:25:54 +00:00
Marcus Boerger df82b2ec75 -fix mb_detect_order
-php_mbstring_parse_encoding_list/array return 0 on any illegal input
2002-04-12 14:24:54 +00:00
Uwe Steinmann ce00085cdd - added method DomNode->remove_child() 2002-04-12 13:23:07 +00:00
Uwe Steinmann 53de1218fd - fixed stupid compile error 2002-04-12 11:47:48 +00:00
Uwe Steinmann 9b0564beb5 - insert_before(): copy node before doing the insert
- append_child(): actually do an append child and not and add sibling
- what is called xmlDtd in libxml is actually the class DocumentType
  in DOM. The domxml extension used a class DomDtd which is not defined
	in the DOM standard. Instead of using DomDtd DomDocumentType is now
	used. DomDtd has been renamed to Dtd but has not meaning anymore.
- added more functions
2002-04-12 11:32:23 +00:00
Sebastian Bergmann 3dfc150ff7 Sync with php4dllts. 2002-04-12 05:35:50 +00:00
Yasuo Ohgaki 734899e615 Enable CGI binary for testing. CGI binary should be used when it's
available, since some tests cannot be performed by CLI. (And
many of them are just failing now)
Fixed SAPI and VERSION output.
2002-04-12 01:34:06 +00:00
Yasuo Ohgaki 22919a4d36 Be nice to php.ini-recommended users.
php.ini-recommended uses output buffer resulting delayed output during
"make test". User php.ini file is used anyway, since run-tests.php
invoke php for each test from there.
2002-04-12 01:13:01 +00:00
Rasmus Lerdorf eb43795ccb This exif test was failing because the \0's in the expected output had
disappeared.  It may be CVS doing this.  I have put the nulls back, but we
may have to mark this as a binary file in th cvswrappers, or rewrite the
test to not output nulls.
2002-04-12 01:07:46 +00:00
Yasuo Ohgaki 0c9182ad71 Update Sablotron version supported. 2002-04-12 00:44:59 +00:00
feea1c56eb NEWS update 2002-04-12 00:26:32 +00:00
58c5f68368 ChangeLog update 2002-04-12 00:25:06 +00:00
Yasuo Ohgaki 439b56842f CGI/CLI take file and dir for -c option by this.
@ Both 'file' and 'path to php.ini' is allowed for "-c" cli/cgi option. (Yasuo)
2002-04-12 00:20:29 +00:00
Marcus Boerger fffb1a5d21 interpret empty to_encoding as encoding not set what results in current_internal_encoding 2002-04-11 22:52:43 +00:00
foobar 995e6f6af0 Fixed (again) the news entry..NEWS file is not a manual. 2002-04-11 22:42:10 +00:00
Rui Hirokawa adf58908e4 fixed a bug which causes crash when charset is not set. 2002-04-11 22:27:00 +00:00
Aaron Bannert 22fb507325 Fix a problem where php-generated data was pushed down the entire output
filter chain instead of just down the rest of the chain. This fix will
speed up some unnecessary overhead introduced in the last patch.

Suggested by:  Cliff Woolley <jwoolley@apache.org>
2002-04-11 20:34:56 +00:00
Harald Radi 6f22159aa2 fixed type 2002-04-11 20:32:03 +00:00
Aaron Bannert 27a5b380cf PHP filters and Apache 2 aren't quite a perfect match yet, so we have
to do some trickery with the server_context to make sure it is always
valid within the current thread.

This patch makes sure the server_context is created in apache's
post_read_request hook phase, and then registeres a cleanup that
will NULL out the server context when the request goes out of scope.
Then, inside the output filters, if the server_context is null we
throw an error. Finally, instead of saving the output filter in
the server_context, now we store the entire request_rec pointer
in there.

POST bodies appear to be working now, although they are very inefficient.
The input filter is still just realloc()ing for whatever data comes
down the input pipe, and then sending this to PHP. This means that
we are doing some really nasty memory management on big POST bodies.
For now this it allows for unlimited input bodies, which means that
a big POST could potentially DoS a box by making it run out of memory.
We might want to put a limit on here just in case, at least until
we figure out how to consume input data more efficiently into php.
2002-04-11 19:25:08 +00:00
Joseph Tate 07546ee788 Fixing project files so that they load 2002-04-11 17:52:26 +00:00
Aaron Bannert caf7f3d4d2 Don't depend on the context provided by the filter (f->ctx) anymore. In
Apache 2 the input and output filter contexts are kept unique. We now
only depend on SG(server_context) for each request, and assume that
the same thread will process the entire request. At some point it
would be wise to separate the input and output contexts.
2002-04-11 17:34:17 +00:00
Aaron Bannert d19fd6a0ad Return the number of bytes consumed, not the number of bytes left.
Suggested by:  Brian Havard <brianh@kheldar.apana.org.au>
2002-04-11 17:22:11 +00:00
Jan Lehnardt 49d6f53007 - add quotes. Cought by: Roman Neuhauser <neuhauser@mail.cz> 2002-04-11 17:20:47 +00:00
Sebastian Bergmann bdc27671cd Update README. 2002-04-11 17:01:51 +00:00
Joseph Tate 504b9beae6 Added versioning to dll and exe files created under windows.
#Note that these do not require modification when the version number changes.
#Utilizes the new partitioned version number defines in php_version.h

@ Added version info to the dll and exe files created under Windows. (jtate)
2002-04-11 16:31:22 +00:00
Wez Furlong ccbf1b84ee sync with PHP_MAJOR_VERSION changes to configure.in 2002-04-11 15:50:32 +00:00
Wez Furlong ae37223657 Apply patch for MAJOR_VERSION etc. by Joseph Tate 2002-04-11 15:15:33 +00:00
Yasuo Ohgaki 25db882a77 Fix ZTS build
# Please check caller when you add TSRMLS_DC. Especically if it's PHPAPI function...
# find . -name "*.c" | xargs grep php_mail
2002-04-11 13:40:19 +00:00
Wez Furlong 4adb1e58eb Fix declarations (Thanks Sebastian) 2002-04-11 12:13:17 +00:00
Alexander Merz a272bc81bb use DIRECTORY_SEPERATOR 2002-04-11 10:51:27 +00:00
Marcus Boerger 4407312d4f thread safe 2002-04-11 08:07:22 +00:00
Marcus Boerger e76b401f32 fix build (hopefully for BSD, too) 2002-04-11 07:28:24 +00:00
Marcus Boerger 628e639c08 fix warning 2002-04-11 07:26:53 +00:00
Marcus Boerger 42dc682626 fix testproblem 2002-04-11 06:41:55 +00:00
Sebastian Bergmann 38af983c80 Patch by Aaron Bannert <aaron@clove.org> and Cliff Woolley <jwoolley@virginia.edu>. 2002-04-11 06:01:54 +00:00
Sascha Schumann 7b6012cbfb properly reset ac_extra in PHP_NEW_EXTENSION
redirect stderr to /dev/null to silence xargs

Noticed by: Andrei
2002-04-11 05:47:03 +00:00
Yasuo Ohgaki 932e33e259 TSRMG => TSRMLS 2002-04-11 05:06:16 +00:00
973fe12d6d NEWS update 2002-04-11 00:25:15 +00:00
fde8ae2074 ChangeLog update 2002-04-11 00:23:36 +00:00
Wez Furlong 8dd62722c4 fix warning 2002-04-10 23:51:48 +00:00
Wez Furlong e1d0a14790 Implement stream context and status notification system.
Bump the BC for zlib notice to a warning
# See my RFC to php-dev a few days ago
2002-04-10 22:42:32 +00:00
foobar 3eafd2207c MFZE1 2002-04-10 21:33:34 +00:00
foobar 60ccb411ba MFZE1 2002-04-10 21:23:01 +00:00
foobar 5a92358183 - Added __FUNCTION__ and __CLASS__ constants. 2002-04-10 21:22:10 +00:00
Stig Bakken e8ad66aa49 * add download command to description 2002-04-10 21:09:58 +00:00
Tomas V.V.Cox ca0b7690c8 Implemented "pear download <pakage>" 2002-04-10 15:15:12 +00:00
Tomas V.V.Cox dfba9e63ab Do not show the "tag it!" message when verbose=0
# Forgot to commit that before
2002-04-10 15:10:49 +00:00
Tomas V.V.Cox a332c8c27b Added single display() 2002-04-10 15:09:36 +00:00
Uwe Steinmann 281b5d96e2 - extension to access a Hyperwave Server based on the official
Hypwerwave SDK. The function of this module is similar to the
	existing hyperwave extension but the api is very different.
2002-04-10 13:33:59 +00:00
Marcus Boerger 4e1a645ab0 fix a warnig and an error (found by Sebastioan) 2002-04-10 13:02:53 +00:00
Rui Hirokawa 1f847267e7 changed mbstring to make thread safe. 2002-04-10 12:47:41 +00:00
Tomas V.V.Cox f833895afd Help for command "shell-test" 2002-04-10 12:40:06 +00:00
Tomas V.V.Cox 3788b31b0e Added "pear package -n" (only output the created package file name) 2002-04-10 12:23:31 +00:00
Sascha Schumann 297ee300de ws changes 2002-04-10 12:22:36 +00:00
Sascha Schumann dc56d2d050 Replace all memsets with variable initializations
Change flow of code in functions to end in the "positive" branch.

Changes verified using the original php3 dba tests.
2002-04-10 12:16:31 +00:00
Sascha Schumann 1eb8ee6f6d too quick. full speed back. 2002-04-10 11:12:19 +00:00
Sascha Schumann 1ed150172a Please test patches which are merged into the release branch.
db2 has a standard UNIX API which in turn means that
it returns non-zero in error conditions.
2002-04-10 11:10:17 +00:00
Sebastian Bergmann 48b70510ba Fix Win32 build. 2002-04-10 11:08:44 +00:00
foobar 6958369295 Let people know this stuff is experimental. 2002-04-10 09:42:38 +00:00
Derick Rethans a19078870e - Fix defines 2002-04-10 06:22:12 +00:00
Marcus Boerger bd9cf79efb new ini setting log_errors_max_len
@-New ini setting log_errors_max_len controls maximum length for error
@ messages. Set it to 0 for infinite. Default is 1024 (old behaviour) (Marcus)
2002-04-10 01:27:44 +00:00
Marcus Boerger f140a8dd0d fix exif using vspprintf 2002-04-10 01:18:52 +00:00
Marcus Boerger 3e70f373ce make (v)spprintf available 2002-04-10 01:13:18 +00:00
Marcus Boerger c664a0a202 introducing spprintf and vspprintf
#mail follows
2002-04-10 01:09:22 +00:00
Marcus Boerger d3e97520d9 -preface for new vpprintf
#reordered and renamed some functions and removed some static
2002-04-10 01:07:49 +00:00
bab62092c4 ChangeLog update 2002-04-10 00:23:15 +00:00
Stig Bakken 49445bbee0 * ignore dirs and libfiles in older releases (changelog) 2002-04-09 22:30:44 +00:00
Stig Bakken 7e7676f8fb * ignore files in older releases (changelog) 2002-04-09 21:48:19 +00:00
jim winstead f5b7d979c0 Fix bug #15835. 2002-04-09 20:18:09 +00:00
Stig Bakken 22673618f7 * drop the ondemand connect stuff for now 2002-04-09 18:57:28 +00:00
Stig Bakken 96213680ca * add preferred_state 2002-04-09 18:51:31 +00:00
Stig Bakken 28452d5dc0 * drop file replace= attribute 2002-04-09 18:50:54 +00:00
Stig Bakken 704713caf8 * remove extra end-fold 2002-04-09 17:32:39 +00:00
Sterling Hughes 53fdf83f09 eekk -- and ssb thought my macro's were icky :) 2002-04-09 17:25:13 +00:00
Stig Bakken e91f94a259 * package-validate uses package.xml as default param 2002-04-09 17:15:17 +00:00
Stig Bakken 3c03ca3d7b * ext/xml/expat no longer has xmltok and xmlparse subdirs 2002-04-09 16:06:07 +00:00
Tomas V.V.Cox 4c125afc74 Make the dependencies check look for the correct registry file 2002-04-09 14:12:12 +00:00
Alexander Merz eb85e073e5 Win95/98/Me doesn't support locking, please check patch on other systems 2002-04-09 14:00:05 +00:00
Tomas V.V.Cox dc811f3041 Fix package-list not showing the right Install path 2002-04-09 13:49:47 +00:00
Tomas V.V.Cox ebb85a3738 Fix a problem when list-installed is called in a new installation 2002-04-09 13:11:51 +00:00
James Cox c602369f81 it's been changed back to php.exe 2002-04-09 09:59:17 +00:00
Alexander Merz f6cc322d7d updated, requires PHP4.2 php-cgi 2002-04-09 09:28:04 +00:00
Stig Bakken efa18af7e1 * show full cvstag command 2002-04-09 08:19:53 +00:00
Stig Bakken 8efdf7bc37 * get rid of CommandResponse stufff 2002-04-09 08:18:49 +00:00
Stig Bakken 2dc974d72d * drop file replace= attribute 2002-04-09 08:17:49 +00:00
Stig Bakken f2efded1bc * remove PEAR/Uploader.php 2002-04-09 08:12:18 +00:00
Stig Bakken 6b8c7db275 * unused files 2002-04-09 08:11:22 +00:00
Stig Bakken 894cbdf3d2 * implemented role="script" and <replace> substitution during install 2002-04-09 08:10:12 +00:00
Sterling Hughes 11acdb097d fix compile warnings 2002-04-09 06:13:00 +00:00
764f06b588 NEWS update 2002-04-09 00:22:01 +00:00
f3d1a92c47 ChangeLog update 2002-04-09 00:20:15 +00:00
Stig Bakken be65ac95cc * package definition for the base PEAR system 2002-04-09 00:03:44 +00:00
Stig Bakken 6c00a56766 HEADS UP, package.xml format change:
<file>foo.php</file> is now <file name="foo.php/>
Added tags for configure-like substitutions.
# the packager will handle both for a while
2002-04-09 00:03:18 +00:00
Mark L. Woodward 5e5bccccaa Added new features for msession beta 2 2002-04-08 23:07:23 +00:00
foobar 7cafcc1ef5 ws fix 2002-04-08 22:54:06 +00:00
foobar edead0523b CPP directives must start on the beginning of line 2002-04-08 22:21:08 +00:00
Richard Heyes f006b2bbc3 * Added getStaticProperty() for static methods. 2002-04-08 21:03:41 +00:00
foobar e3cc458d25 - Revert that change. Added a warning about this. 2002-04-08 18:43:35 +00:00
Yasuo Ohgaki 001d332a86 Make pgsql header available for PECL module(s) 2002-04-08 14:17:28 +00:00
foobar 14a6bc6d69 upload_max_filesize can only be set in php.ini 2002-04-08 07:58:47 +00:00
foobar ee20639c7f and the news entry.. 2002-04-08 07:47:50 +00:00
foobar 77c058a06a There's really no point in allowing using the system regex library. 2002-04-08 07:47:17 +00:00
foobar 23a3cc71e3 Using system regex lib seems not to work quite well when compiled with Apache. 2002-04-08 06:45:52 +00:00
Derick Rethans cbed0567aa - Fix wrong logic (Thanks to Alan for noticing it) 2002-04-08 06:36:03 +00:00
Yasuo Ohgaki 34625daf18 Remove unneeded conversions from pg_convert. 2002-04-08 04:21:04 +00:00
Tomas V.V.Cox 2a1e0a53bb Continue the list of features for PEAR DB
Release version is 2.0 (apiVersion)
# Multiline entries inside the tags looks better in the web or in
# "pear package-info" if they aren't formatted to look better
# in the xml
2002-04-08 02:22:48 +00:00
Yasuo Ohgaki d023a96cc6 Make it compile with ZTS.
# Forgot to test with ZTS
2002-04-08 02:01:45 +00:00
Yasuo Ohgaki 8fab36f99c Update README 2002-04-08 01:50:06 +00:00
Yasuo Ohgaki 4ac70c6821 Added pg_metadate(), pg_convert(), pg_insert(), pg_select(), pg_update()
and pg_delete().
@ Added pg_metadate(), pg_convert(), pg_insert(), pg_select(), pg_update()
@ and pg_delete(). (Yasuo)
2002-04-08 01:37:38 +00:00
Yasuo Ohgaki 7d48177f37 Return proper result. 2002-04-08 00:50:44 +00:00
foobar 7770fd5710 Some ws fixes and general cleanup. 2002-04-08 00:46:23 +00:00
Yasuo Ohgaki 994cdb4b14 Added 2nd parameter for pg_result_status(). PGSQL_STATUS_LONG is for LONG result status.
PGSQL_STATUS_STRING is for SQL command name successfully executed for this result.
@ Added 2nd parameter for pg_result_status() to specify return type. (Yasuo)
2002-04-08 00:43:58 +00:00
091a06946d ChangeLog update 2002-04-08 00:23:10 +00:00
Marcus Boerger 59f332800f correcting some more whitespace
#hope that's it
2002-04-07 23:30:01 +00:00
foobar e034d43ccf Fixed compile failure with ZTS build. 2002-04-07 22:43:17 +00:00
Stig Bakken 79a150068a * append "?uncompress=yes" to the package download url if zlib extension
is not loaded
2002-04-07 21:09:41 +00:00
Stig Bakken 46dd841b28 * package xml file for DB 2002-04-07 21:02:54 +00:00
Andi Gutmans 35befd3eb3 - Fix build with Visual Studio .NET. The MySQL team said they'll commit
- their fix a long time ago and never did. One day they'll update the
- whole MySQL client library.
2002-04-07 20:49:10 +00:00
Tomas V.V.Cox 6ac6b78818 Added PEAR_Common::getUserRoles() and a suggestion 2002-04-07 20:47:04 +00:00
Hartmut Holzgraefe 954dbb2d35 fix and regression test for Bug #16473 2002-04-07 19:46:45 +00:00
Stig Bakken 6303972256 * added "cvstag" command 2002-04-07 19:42:05 +00:00
Marcus Boerger bba604b3d8 -fix warnings
-fix layout
2002-04-07 18:45:30 +00:00
Marcus Boerger 0743669f1c -fix warnings 2002-04-07 18:09:31 +00:00
foobar 80131be70f Removed relics from PHP3. 2002-04-07 17:46:57 +00:00
Stanislav Malyshev a68b448169 make compatible with current PHP 2002-04-07 17:12:38 +00:00
Stig Bakken 8ec2ae71db * give PEAR_Packager::package an option to disable compression and make
plain .tar files
2002-04-07 17:07:49 +00:00
Stig Bakken d6d8d78754 * remove empty fold 2002-04-07 16:51:17 +00:00
Stig Bakken 5bdc0eaafe * use the UI's displayFatalError method 2002-04-07 16:48:24 +00:00
Stig Bakken 6718d569bd * added displayError and displayFatalError methods 2002-04-07 16:47:36 +00:00
Stig Bakken 49b11adf7c * initialize _PEAR_Command_uiobject 2002-04-07 16:42:33 +00:00
Sterling Hughes c89623d27f apply jan's configure check for apache2 and freebsd (relating to the use
of tsrm-pth).
2002-04-07 16:16:47 +00:00
Stig Bakken 255bbff361 * leave error reporting to the validator 2002-04-07 15:49:23 +00:00
Stanislav Malyshev 3b6b13b08a sync 2002-04-07 15:38:45 +00:00
Stig Bakken 065da3a0fa * more clear cvs tag hint 2002-04-07 15:07:26 +00:00
Tomas V.V.Cox 361cebe460 Just some help cleanup 2002-04-07 14:30:32 +00:00
Stig Bakken 73f4b5b2fa * typo 2002-04-07 13:22:21 +00:00
Stig Bakken 5179e9d0fa * rename package-verify command to package-validate 2002-04-07 12:40:51 +00:00
Wez Furlong 1f2344104f fix for #16469 2002-04-07 10:56:30 +00:00
Stig Bakken dc974a0299 * support for .tar files in PEAR_Installer
* new command: package-verify
* "package" command now sanity-checks the package information before
  making the tarball
* -Z option to the install/update commands for downloading non-compressed
  packages
2002-04-07 10:38:04 +00:00
Yasuo Ohgaki efbb9949a5 Added pgsql.ignore_notice and pgsql.log_notice ini entry. 2002-04-07 06:11:41 +00:00
Yasuo Ohgaki dbe3dfda5f Nuke waring with ZTS build 2002-04-07 05:21:43 +00:00
Yasuo Ohgaki 0cace44107 Fixed ZTS build 2002-04-07 05:20:16 +00:00
foobar de65bee975 Fixed bad entries. 2002-04-07 01:58:17 +00:00
1422bd2505 NEWS update 2002-04-07 01:20:51 +00:00
2dda958975 ChangeLog update 2002-04-07 01:20:03 +00:00
Marcus Boerger ddc6437e32 new feature ignoring repeated error messages (defaults to old behaviour)
@You can now disable logging of repeated error messages with two new ini settings ignore_repeated_errors, ignore_repeated_source. @(Marcus)
2002-04-06 18:49:59 +00:00
Wez Furlong 62538caa86 Added BC support for old style zlib: wrapper.
Added notice when a requested wrapper is not found.
# This BC thing was giving me nightmares.
# It took me 10 minutes to realize I hadn't compiled in zlib support also.
2002-04-06 17:29:39 +00:00
Derick Rethans d449021900 - Fix zzip_entry_read 2002-04-06 17:28:58 +00:00
Richard Heyes d3c0d67060 * Added registerShutdownFunc() method 2002-04-06 17:01:14 +00:00
Sebastian Bergmann 777bc9f954 Fix output directory. 2002-04-06 15:45:00 +00:00
Sebastian Bergmann b0eb69ecc0 Fix output directory. 2002-04-06 15:37:08 +00:00
Tomas V.V.Cox 02bff6ce0e Fix bug in pushErrorHandling() (fail under very specific circumstances) 2002-04-06 15:12:04 +00:00
Sascha Schumann 8fae36cbd1 Improve the life of external extension maintainers by
not plaguing them with "./" in absolute paths.

Requested by: Andrei, Wez
2002-04-06 13:42:40 +00:00
foobar e537d2bd7d minor fix.. 2002-04-06 13:29:05 +00:00
Sebastian Bergmann db840b8001 Fix Debug_TS build. 2002-04-06 08:57:06 +00:00
Yasuo Ohgaki 179a52b025 Chages for new pg_last_notice() 2002-04-06 06:42:02 +00:00
Yasuo Ohgaki b2fce9e893 Make pg_last_notice() work as it is designed. It returns last notice message for connection resource specified.
Added "pgsql.ignore_notice" ini entry.
Added "pgsql.log_notice" ini entry.
@ Make pg_last_notice() work as it is designed. It returns notice message PostgreSQL connection resource specified.
@ Added "pgsql.ignore_notice" ini entry.
@ Added "pgsql.log_notice" ini entry.
2002-04-06 05:52:52 +00:00
Andrei Zmievski 0141256493 - Fixed a leak in xml_decode().
- Fixed it so it's possible to compile as a shared extension.
2002-04-06 03:50:28 +00:00
345cee6bf7 NEWS update 2002-04-06 01:20:17 +00:00
d0d78eb783 ChangeLog update 2002-04-06 01:19:25 +00:00
Yasuo Ohgaki 65ba307319 Use get_active_function_name() for error messages. 2002-04-06 01:01:41 +00:00
Stig Bakken de1f6319ec * forgot htmlspecialchars in release notes 2002-04-06 00:58:22 +00:00
Joseph Tate 5ae6b3e17a Added test suite for domxml extension.
#eventually I'll separate all the tests into separate files, but until
#then, I'll commit it so that everyone can use it.
2002-04-05 20:55:37 +00:00
Joseph Tate 7954c7bafe Added unlink_node alias for consistency 2002-04-05 18:18:23 +00:00
Marcus Boerger 313503aa92 -testing unicode user-comment 2002-04-05 18:05:48 +00:00
Marcus Boerger 8a388954ea -correct length for ASCII
-global encoding variables
#will become ini settings explanation on what to set follows then
2002-04-05 17:59:29 +00:00
Marcus Boerger 1185a30687 include comma separated encoding lists in test 2002-04-05 16:25:05 +00:00
Marcus Boerger cbb96206be no space for comma separated encoding lists 2002-04-05 16:24:08 +00:00
Marcus Boerger b3a96ba509 aligning #
#mentioned by derick
2002-04-05 16:02:54 +00:00
Christian Stocker 672586726e oops. that was an error not detected in shared library mode ... 2002-04-05 15:47:08 +00:00
Christian Stocker e448122bd5 added domxml_parser(), domxml_parser_add_chunk() and domxml_parser_end().
It provides access to the PushParser interface of libxml2.
2002-04-05 15:27:52 +00:00
Stig Bakken dedf2a4c39 @Add zlib.output_compression_level option (Stig) 2002-04-05 13:07:43 +00:00
foobar 16d7d7bdd2 Fixed some entries.. 2002-04-05 11:59:58 +00:00
Zeev Suraski 385b233040 Fix gzip/bz2 builds for Windows 2002-04-05 11:51:43 +00:00
Yasuo Ohgaki 1abb9cd02c Add error message from _notice_handler()
# Currently, it always logs whennever notice message is
# recieved. I'll change error log optional later.
2002-04-05 07:57:33 +00:00
Yasuo Ohgaki 3dab8a24f9 FMB. Fixed bug info. 2002-04-05 07:17:30 +00:00
Yasuo Ohgaki 7f2446e7de Fix pg_last_notice() double free.
# This should be merged
2002-04-05 06:37:26 +00:00
Yasuo Ohgaki a9452edac7 Add notice message test
# Need to figure out why estrduped string is not null terminated
2002-04-05 06:30:18 +00:00
Yasuo Ohgaki d84f0e5530 Update message 2002-04-05 06:07:46 +00:00
Yasuo Ohgaki 04691a516b Add bytea field to test table.
Use table name variable.
2002-04-05 06:06:21 +00:00
Yasuo Ohgaki 22007a29de Add real pg_escape_bytea() test. 2002-04-05 06:05:28 +00:00
Yasuo Ohgaki eb7ed9105a Fixed way of exporing functions. (Need PHPAPI for Win)
Fixed if statement format. ("if () stmt;" should be "if () \n {stmt;}")
Fixed error message so that appropriate function names are
displayed.
2002-04-05 02:13:32 +00:00
Marcus Boerger d0de28ece4 Unicode is now based on php_mb_convert_encoding if available
#currently only ISO-8859-15 is supported as result
#maybe this will become an ini setting
2002-04-05 01:25:53 +00:00
Marcus Boerger cb51e72c46 new function php_mb_convert_encoding 2002-04-05 01:23:22 +00:00
a663bd9966 NEWS update 2002-04-05 01:21:31 +00:00
62350d574d ChangeLog update 2002-04-05 01:20:46 +00:00
Wez Furlong 5916b203fe add mbstring headers to those for pear/pecl extensions 2002-04-05 00:16:09 +00:00
Marcus Boerger bc6d302fcf removed calls to wctomb, wcstombs
#leave UNICODE to user
2002-04-04 20:45:53 +00:00
Sterling Hughes 5dd3477b0d i of course am the brilliant author of these files 2002-04-04 20:22:03 +00:00
Sterling Hughes f30b124b93 replace with non-gpl implementation 2002-04-04 20:14:47 +00:00
Sterling Hughes c57f3c562d non gpl implementation 2002-04-04 20:11:11 +00:00
Sterling Hughes 223e2e0bdb replace grp.h with a new implementation (non-GPL) 2002-04-04 20:10:20 +00:00
jim winstead e7d5c0e253 mailparse moved to pear/PECL. 2002-04-04 18:43:59 +00:00
Sander Roobol cebaafba15 Fixed build with multiple concurrent jobs (make -j) 2002-04-04 18:15:52 +00:00
Sander Roobol 49679a723e Fixed typo 2002-04-04 18:15:04 +00:00
Yasuo Ohgaki 24b76bba21 Fix tests 2002-04-04 15:25:46 +00:00
foobar d658b1a8d7 Revert the bogus patch. 2002-04-04 14:33:05 +00:00
Yasuo Ohgaki 68f8029fbb Added pg_escape_*() test 2002-04-04 13:59:44 +00:00
Yasuo Ohgaki fafea27a2d Clean up pg_escape_*() 2002-04-04 13:54:51 +00:00
Christian Stocker afeda57153 - fixed a lot of memory leaks (by Lukas Schroeder)
- get_attribute() returns False instead of empty string, if attribute not found
2002-04-04 12:16:48 +00:00
Yasuo Ohgaki 186823957a Fixed crash with pg_escape_*()
# I'll MFH later.
2002-04-04 10:25:12 +00:00
Sascha Schumann e50a42f907 Add deferred libs to DLIBS instead of LIBS.
Noticed by: Jani Taskinen <sniper@iki.fi>
2002-04-04 10:03:29 +00:00
Daniela Mariaschi c02a5dcc1d Fixed sigfault in ibase_close(). Bug #15419 #15992
@- Fixed sigfault in ibase_close() if user doesn't free resultset
@  (Bug #15419, #15992) (daniela)
2002-04-04 02:15:47 +00:00
7779d3de92 ChangeLog update 2002-04-04 01:18:47 +00:00
foobar f162b5f6dd minor fixes 2002-04-04 01:01:26 +00:00
Marko Karppinen ef0d337850 Added news on the Mac OS X changes and removed a duplicate line 2002-04-04 00:44:47 +00:00
foobar 97ba30ba5c - OS X support for dynamically loaded extensions. (patch by Marko)
# NEWS entry coming up..
2002-04-04 00:24:34 +00:00
Sterling Hughes 7201d8b54e fix bug #15150, thanks to daniel at haxx.se for the fix 2002-04-03 23:59:36 +00:00
Derick Rethans 755b8542e4 - Fix as suggested my Marcus 2002-04-03 19:50:02 +00:00
Yasuo Ohgaki ee26bf084d Added ini_set()/ini_get()/ini_restore() test 2002-04-03 14:34:45 +00:00
Wez Furlong fea3b0a7f8 fix TS build 2002-04-03 13:47:21 +00:00
Wez Furlong 27d1f7db16 Tidy up win32 implementation of proc_open.
Respect safe_mode_exec_dir.
Implement proc_close and return process return code under win32.
2002-04-03 13:39:35 +00:00
Wez Furlong 74dd73711b add test for mailparse_extract_part_file 2002-04-03 13:38:43 +00:00
5f53f02d14 ChangeLog update 2002-04-03 01:23:27 +00:00
Wez Furlong a0f165a5cb main/streams.c 2002-04-02 16:46:33 +00:00
Wez Furlong abc5a2cacb fix quoting 2002-04-02 16:45:10 +00:00
Derick Rethans b0970a3b27 - Fix layout 2002-04-02 12:54:21 +00:00
Stig Bakken d4dfead250 * Added "-s" (soft update) option to install/upgrade. Will make installs
fail silently.
2002-04-02 09:21:48 +00:00
Stig Bakken f8fc50b922 * add Frontend support to PEAR_Common::log() 2002-04-02 09:21:08 +00:00
Stig Bakken dfa3b671f7 * Implemented "shell-test" command for writing shell scripts that check
whether a package is installed.  Example of use:

    if ! pear shell-test Net_Socket; then
        echo "You don't have the Net_Socket package installed!" >&2
        exit 1
    fi
2002-04-02 09:20:28 +00:00
Stig Bakken 9de06e3662 * just renaming some comments 2002-04-02 09:18:07 +00:00
Stig Bakken 7ddaefba34 * add type property telling what type of frontend this class implements 2002-04-02 09:15:51 +00:00
Stig Bakken 812d9bf3c4 * remove "exit" at the end, it causes a "false" exit code always 2002-04-02 09:10:23 +00:00
Stig Bakken 990d19aefe * comment out the php files that are not necessary for the installer
# the rest will show up as packages in /pear shortly
2002-04-02 09:09:41 +00:00
Derick Rethans f71adad3cf - Whitespace 2002-04-02 06:41:23 +00:00
James Cox 99a68d4f83 just did... 2002-04-02 01:35:45 +00:00
James Cox f3d107a180 updated the alert sent to the browser. removed the verbosity, and linked to more info. 2002-04-02 01:34:15 +00:00
da56fd7624 NEWS update 2002-04-02 01:19:24 +00:00
f98ac64101 ChangeLog update 2002-04-02 01:18:51 +00:00
foobar 8d151063d3 Be a bit more verbose about what was not found. 2002-04-02 00:04:53 +00:00
foobar 46d42968a4 Fix for bug: #5499 (no need to MFH this one) 2002-04-01 23:25:48 +00:00
foobar bccfe80480 Prevent crashing with some bogus POSTs. 2002-04-01 23:02:16 +00:00
Tomas V.V.Cox 750ca4295e typo 2002-04-01 19:17:59 +00:00
Tomas V.V.Cox b57e0609ad Added layer checks and reorganize a little the code 2002-04-01 19:16:01 +00:00
Tomas V.V.Cox 49dacbee8c - Define the PEAR constants when they are not set (be nice
with the "--wihout-pear" people who finally regrets)
- Added method getLayers()
2002-04-01 19:13:37 +00:00
Tomas V.V.Cox 6ec8fbc30e - Make "config-set" actually store the values
- Help and error messages enhance
2002-04-01 18:19:45 +00:00
Tomas V.V.Cox 827334cd2f - Added "nodeps" option to install/upgrade/uninstall
(pear install -n package.tgz)
- Finish to document the install commands
2002-04-01 17:25:42 +00:00
Kirill Maximov 33ed30fce8 (PHP quoted_printable_decode) Fixed CR/LF processing for Windows/OS2
@ Fixed CR/LF processing for Windows/OS2 in quoted_printable_decode (kir)
2002-04-01 17:03:01 +00:00
Tomas V.V.Cox def4a8485d - Set some php.ini values needed by the installer
- Removed unused present_array() and heading() functions
2002-04-01 16:49:19 +00:00
Tomas V.V.Cox 7b68037886 People reported problems with flock(LOCK_SH) and fopen('w') 2002-04-01 16:10:39 +00:00
Tomas V.V.Cox 6e8268e4a4 added help 2002-04-01 15:23:46 +00:00
Tomas V.V.Cox 1924492aed Adaptation for the new help system 2002-04-01 14:35:08 +00:00
Tomas V.V.Cox edab1197f3 Go with the help system 2002-04-01 14:32:40 +00:00
Stig Bakken 0c7f16bd96 * typo 2002-04-01 14:15:30 +00:00
Derick Rethans f4447a9cc1 - Fix for bug #14966 2002-04-01 09:19:57 +00:00
Markus Fischer 700b9eb734 - Nuke *FETCH macros. 2002-04-01 08:05:17 +00:00
Marcus Boerger 0fd732214a #cleanup source 2002-04-01 03:15:57 +00:00
Mark L. Woodward 3828c26a8d PHP_SESSION_API not always defined. 2002-04-01 01:38:53 +00:00
d92c9f73c3 ChangeLog update 2002-04-01 01:18:47 +00:00
Markus Fischer ab2194d1da - Fix compilation.
# Marcus, could you please fix the whitespace in this file?
2002-03-31 23:00:31 +00:00
Tomas V.V.Cox 460eb1103c E_ALL fix 2002-03-31 19:04:53 +00:00
Tomas V.V.Cox ed450a6c4e if (!function_exists('md5_file')) { ... 2002-03-31 19:04:26 +00:00
foobar 6214164d28 Fixed the build issues reported by Stas. 2002-03-31 15:41:24 +00:00
foobar 63ec2d9ff7 missing .cvsignore 2002-03-31 15:39:33 +00:00
Stanislav Malyshev ee3a873863 Fix ZE2 builds 2002-03-31 13:02:36 +00:00
Mark L. Woodward f83d005d46 Fixed conditional compilation based on macros changed in
ext/session/php_session.h which changed.
2002-03-31 05:38:10 +00:00
Stig Bakken 561ac3d54e * E_ALL fix 2002-03-31 03:16:02 +00:00
Stig Bakken f1c803a41c * avoid object copying 2002-03-31 01:51:08 +00:00
Stig Bakken 5e13ee1428 * oops, config object was copied
* call parameters were not passed on to xmlrpc_encode_request()
2002-03-31 01:45:36 +00:00
Yasuo Ohgaki 266692a59a Print multibyte and SSL support is compiled in libpq or not. 2002-03-31 01:45:22 +00:00
3e67ad4dfa ChangeLog update 2002-03-31 01:19:42 +00:00
Yasuo Ohgaki 7ff1412432 Print PostgreSQL version number in phpinfo() 2002-03-31 01:18:32 +00:00
Stig Bakken c5d35962d2 * install PEAR/Command/Remote.php 2002-03-31 00:32:00 +00:00
Stig Bakken 03c82d38ef * added sys/utsname.h test 2002-03-30 23:44:50 +00:00
Rasmus Lerdorf 9c57dffecd Looks like mawk can't handle create_stubs - if someone is keen it would be
nice to fix that, but for now just make a note that gawk may be needed.
2002-03-30 16:44:56 +00:00
Sascha Schumann 3a3acee3c9 - Proper use of underscores (s/createsid/create_sid/)
- Bump the API date and remove extra cpp macro
- Pass TSRMLS appropiately to the create_sid function
2002-03-30 16:29:15 +00:00
Marcus Boerger e4f4386758 -compiler warnings 2002-03-30 14:28:05 +00:00
Marko Karppinen 676afb33b8 Enable --with-apxs build on Mac OS X. We build an MH_BUNDLE instead of
an MH_DYLIB. As all PPC code is relocatable, we don't use the libtool
based shared build but go a static route. Goodbye libtool!
# I'm committing this to enable widespear testing.
# Anyone have any ideas on how to easily backport this to 4.2.0?
2002-03-30 03:17:25 +00:00
foobar f43ca8d2bc Fixed a bug with file_uploads=off -> normal post variables not set. 2002-03-30 02:58:19 +00:00
Markus Fischer e4d2fa88d7 - Fix #16348. 2002-03-30 01:56:52 +00:00
ae336171bd ChangeLog update 2002-03-30 01:19:21 +00:00
Marko Karppinen 1ca5d55925 Mac's Find By Content indexing sprinkles these annoying files around 2002-03-29 20:10:39 +00:00
Marko Karppinen 60663c1f64 Prepare for MH_BUNDLE build on Mac OS X / Darwin 2002-03-29 19:25:55 +00:00
Sander Roobol ef2608925c Updating tests: remove alternative syntax in tests, added a special
alternative-syntax testfile.
2002-03-29 17:12:11 +00:00
Sander Roobol 4e8f9e2585 Added crack extension to php.ini-* 2002-03-29 16:32:23 +00:00
Mark L. Woodward 346d74a146 Added field to ps_module structure to hold function pointer for the creation
of the session ID string. Default PS_MOD() macro sets this to be the default
creation routine. PS_MOD_SID() macro sets this to a handlers session ID
creation routine.
2002-03-29 16:00:27 +00:00
Doug MacEachern eab1211ed1 adjust to recent apr bucket api changes 2002-03-29 15:42:18 +00:00
foobar acb218bf4c - Added missing entry for mysql_info() and fixed some entries 2002-03-29 13:05:08 +00:00
foobar a0e3bd8f0e WS fix 2002-03-29 12:56:25 +00:00
Jan Lehnardt bc19dd6900 - add mysql_info function 2002-03-29 12:47:02 +00:00
Derick Rethans 17116438da - revert patch 2002-03-29 12:34:25 +00:00
Yasuo Ohgaki c7d72bb20d Fix build failure with PostgreSQL 6.5.x
# I'll merge this to 4.2.0 branch later
2002-03-29 11:24:54 +00:00
Stig Bakken 7f89d8c13a (PHP php_uname) display runtime uname rather than compile-time uname, added
an optional parameter to get single fields (like uname(1))
# Windows version is not tested, and I didn't know how to get
# `uname -n` on Windows, so it's hardcoded to "localhost" for now.
# Windows gurus feel free to fix. :-)
2002-03-29 10:19:23 +00:00
Yasuo Ohgaki 7e570674cd Trying to be more clear. 2002-03-29 08:34:02 +00:00
Stig Bakken 69df28337b * implemented "pear list-upgrades", which will show you what releases
are available on the server (shows newer releases with the same state)
2002-03-29 02:41:28 +00:00
Stig Bakken 45878bff77 * always require PEAR/Common.php 2002-03-29 02:39:33 +00:00
Stig Bakken f6e4eea39a * allow "any" as a preferred_state value 2002-03-29 02:38:07 +00:00
Stig Bakken 99cfda3756 * pass on xmlrpc faults as pear errors 2002-03-29 02:17:55 +00:00
Yasuo Ohgaki 0090003920 Added class method registration test. It does not test
for multiple method definitions due to test script limitation.
# Current CVS source w/o my patch should fail, though.
2002-03-29 02:03:27 +00:00
Yasuo Ohgaki 99723b511e Change title to reasonable one.
# Shall we consider this as a bug or documentation problem?
2002-03-29 01:41:48 +00:00
Marcus Boerger efad4e4281 #and when the test does not result like you expect -> change test data
-fix test image
2002-03-29 01:33:30 +00:00
Marcus Boerger d0be2aabe4 -fix possible problem on low memory
-fix problem on failure
2002-03-29 01:32:26 +00:00
bf80594f6a NEWS update 2002-03-29 01:21:08 +00:00
aaf4f13910 ChangeLog update 2002-03-29 01:20:21 +00:00
Yasuo Ohgaki 266ba32b3c Fix ZE2 build. 2002-03-29 01:19:02 +00:00
Stig Bakken adc0b5741e * fix tempfile cleanup 2002-03-29 00:05:55 +00:00
Stig Bakken 84652eeb52 * per-command fold marks 2002-03-28 23:50:45 +00:00
Stig Bakken 62bff20267 * regenerate package.xml with file checksums 2002-03-28 23:49:34 +00:00
Stig Bakken 425cb1b04e * default dep rel attribute to 'has' 2002-03-28 23:45:16 +00:00
Stig Bakken a50c40cc24 * accept optional tmpdir arg in mkTempDir
* handle changelog releases without filelist
2002-03-28 23:44:31 +00:00
Andrei Zmievski 8474d7944d Cleanup. 2002-03-28 21:08:56 +00:00
Joseph Tate d5fde50a53 Fixed build of php4ts Release_TSDbg under Win32 2002-03-28 19:30:33 +00:00
Joseph Tate ab982d819a -Crack extension now available for Win32 platforms. You will need to
acquire the cracklib libraries from
 http://www.jtatesoftware.com/cracklib/.
@A project has been added to the crack extension to allow it to be compiled
@under Win32.  Cracklib libraries for Win32 are available from
@http://www.jtatesoftware.com/cracklib/.

#
#Will the person who does the releases for php for windows please be sure
#to add this to the list of extensions to be built.
#
#Will someone with doc karma add this extension to the list on the
#Installation on Windows Systems page:
#http://www.php.net/manual/en/install.windows.php.
#
#Will someone please add the following to php.ini-recommended and
#php.ini-dist:
#To the extensions list:
#;extension = php_crack.dll
#
#To the Module Settings section:
#[Crack]
##Modify the setting below to match the directory location of the cracklib
##dictionary files.  Include the base filename, but not the file extension.
#;crack.default_dictionary = 'C:\php4\lib\cracklib_dict'
#
#I will send a diff to the php-dev list.
#
#Thanks
2002-03-28 18:48:12 +00:00
Stig Bakken f5e745e848 * added preferred_state config keyword 2002-03-28 14:27:02 +00:00
Stig Bakken 78c020a3bb * added phpdoc
* now ready to support multiple versions of the package format
* don't parse dependencies in changelog
* fix libfile parsing
* default maintainer roles to 'lead'
* added infoFromString() method
* added xmlFromInfo() method to regenerate package.xml files
2002-03-28 14:07:33 +00:00
Stig Bakken 66d8ab4998 * added "platform" and "md5sum" attributes to <file> 2002-03-28 12:09:59 +00:00
Derick Rethans 0887298bd4 - Back out broken patch 2002-03-28 11:21:47 +00:00
Derick Rethans b0088fd883 - MFB for fix build for BSD: BSD_MAKEFILE and resolver functions. (Patch by
Melvyn Sopacua <msopacua@idg.nl>)
2002-03-28 07:59:42 +00:00
Derick Rethans 803d2b3154 - MFB 2002-03-28 07:36:02 +00:00
269bc38541 ChangeLog update 2002-03-28 01:21:15 +00:00
Wez Furlong 4361807185 add test for file_get_contents 2002-03-28 01:20:28 +00:00
Wez Furlong 959021a8c9 Add subject hash to parsed x509 data.
Make the test use file_get_contents().
2002-03-28 00:56:19 +00:00
Wez Furlong 2539cbc74c Phase 3 of OO wrapper cleanup
# What was phase 2?
2002-03-28 00:49:00 +00:00
Wez Furlong fa4341dcdf make quoted-printable encoding safe for use with digital signatures. Added some tests 2002-03-28 00:43:44 +00:00
foobar bf663c9746 Fixed bug: #16237 2002-03-27 23:47:06 +00:00
foobar 49ba2a983b WS fix 2002-03-27 22:49:21 +00:00
Joseph Tate 113f08bc4b Fixing compile warning under Win32 2002-03-27 21:45:45 +00:00
Marcus Boerger 406c665c13 recorrect las checkin 2002-03-27 21:01:26 +00:00
Hartmut Holzgraefe 492c837272 fix for Bug #16314 2002-03-27 20:20:57 +00:00
foobar 8f0390c708 autoconf 2.53 uses this directory for some temporary stuff 2002-03-27 15:43:48 +00:00
foobar cb104bbfb4 Moved these example scripts out of tests. 2002-03-27 15:39:30 +00:00
foobar 2d8c05bb38 - Fixed bug: #16203
# unconditionally adding libraries which are not even neeeded is evil.
2002-03-27 15:30:52 +00:00
Wez Furlong f870804c45 add test case for multiple To: lines 2002-03-27 14:07:48 +00:00
Wez Furlong 16fed222f6 allow headers hash to handle multiple To: lines 2002-03-27 14:05:56 +00:00
Hartmut Holzgraefe ad361b50dc not enabled by default 2002-03-27 13:54:09 +00:00
Hartmut Holzgraefe aba71d94e0 moved 'static' prototypes to prevent warnings 2002-03-27 13:51:55 +00:00
Hartmut Holzgraefe 65f93ba4f7 preparing for Content-Encoding detection 2002-03-27 11:56:42 +00:00
Sascha Schumann c7403326ab Factorize a few library/libpath-related functions 2002-03-27 11:09:20 +00:00
Sascha Schumann bc11acbf02 Defer linking against libmcal until we have built the extension,
so that extension-supplied symbols are available.

Also factorize the header file checks.

Reported by: Brandon Knitter
URL: http://news.php.net/article.php?group=php.dev&article=81833
2002-03-27 10:26:17 +00:00
Sascha Schumann a40b4ff52b Remove generated file 2002-03-27 10:06:24 +00:00
ca6ff78a8d ChangeLog update 2002-03-27 01:20:49 +00:00
Jon Parise 5237ff23e8 Ignore generated files. 2002-03-26 21:32:34 +00:00
Sean Bright 9fa1dd317d Fix typo. 2002-03-26 19:59:26 +00:00
Hartmut Holzgraefe 2875cb8a7f build conflicts fixed 2002-03-26 19:57:32 +00:00
Sander Roobol 9b6a8d2639 Fixed the array-tests. Broke the test up into various smaller tests.
Reduced the test data because it was unmanageable.
# I hope everything is ok :)
2002-03-26 18:17:38 +00:00
Tomas V.V.Cox b5f477ba00 E_ALL fixes 2002-03-26 16:31:13 +00:00
Tomas V.V.Cox 0e20c6e383 _lock() now returns PEAR Error or true for consistency 2002-03-26 16:29:53 +00:00
Marcus Boerger f277bf0c5c allow other modes to work with -- correct
#original idea was to allow this *only* for PHP_MODE_STANDARD
2002-03-26 14:43:57 +00:00
Marcus Boerger a2631c1f1d fix behaviour on --
#now php -- -i for scriptfile -i works
2002-03-26 11:22:20 +00:00
Sascha Schumann fb048880aa outcomment default linking against pam due to no feedback
regarding its purpose
2002-03-26 11:05:18 +00:00
Sascha Schumann 5428e463bd If an argument (<tag val=argument..) was not quoted, leave it that way. 2002-03-26 10:23:33 +00:00
Yasuo Ohgaki ec0c373992 Remove warnings 2002-03-26 08:49:36 +00:00
Yasuo Ohgaki c8a3623708 Changed error messages to be consistent with other error messages 2002-03-26 08:43:57 +00:00
Derick Rethans 13633cb945 - MFB 2002-03-26 08:29:14 +00:00
Markus Fischer f521ae3f30 - Fix bug 11244 (patch by "Tal Peer" <hazgul99@hotmail.com>).
# Sorry for the delay :-)
2002-03-26 07:57:07 +00:00
e74c66bb14 ChangeLog update 2002-03-26 01:19:23 +00:00
foobar edb03cdbb4 - Use correct header file. 2002-03-26 00:14:27 +00:00
foobar 11bcc2207e MFB. (I must have been sleep-walking..) 2002-03-26 00:14:02 +00:00
Wez Furlong 74749ad642 Fix regular openssl_pkey_get_private($content, $phrase) syntax and
add test case.
This stuff should be merged into the 4.2 branch.
2002-03-26 00:03:11 +00:00
foobar f4736c72ea Why was this here?? 2002-03-25 23:46:22 +00:00
Sterling Hughes 64c894b164 Whitespace fixes 2002-03-25 22:49:25 +00:00
Derick Rethans 7394b8fc6f - MFZE1 2002-03-25 20:37:02 +00:00
Georg Richter 6a0bf08ce3 fixed prototype for mysql_ping 2002-03-25 12:09:38 +00:00
d068c23bba NEWS update 2002-03-25 01:22:42 +00:00
8b0771cfe0 ChangeLog update 2002-03-25 01:21:47 +00:00
Sterling Hughes 7ae1dd662f more zend_parse_parameters fixup 2002-03-25 01:19:59 +00:00
Sterling Hughes 3c3ae850a2 Fix-up the last fix a bit
Clean up mysql_list_processes
2002-03-25 01:14:30 +00:00
Hartmut Holzgraefe d2b8655775 pproto fix 2002-03-25 01:08:39 +00:00
Sterling Hughes 05475d809b clean up mysql_real_escape_string() a bit
# I really think we should just add a database handle
# parameter to mysql_escape_string()
2002-03-25 01:07:23 +00:00
Hartmut Holzgraefe 14e298f805 initial checkin 2002-03-25 00:42:37 +00:00
Zak Greant 3fae05b014 Added mysql_table_name() alias for mysql_tablename()
Improved logic of parameter parsing code for mysql_ping
 - made test for no arguments more explicit
 - combined to if blocks into one if/else if block
2002-03-24 23:33:07 +00:00
Jan Lehnardt 26e1958c8e - added basic output buffering tests 2002-03-24 23:16:42 +00:00
Hartmut Holzgraefe 2c413f116a 1st implementation of magic-file based mime_content_type(string filename) 2002-03-24 23:00:47 +00:00
Alex Waugh 0f3b304506 Backslashes caused the build to fail with autoconf 2.52 2002-03-24 22:57:00 +00:00
Sterling Hughes ad8b00be3e fix freebsd compile 2002-03-24 21:16:02 +00:00
Sander Roobol f12dfba7e0 Fixed tiny mistake in proto (tnx to Egon for spotting it). 2002-03-24 18:19:31 +00:00
Wez Furlong 5ee65bd8f5 Phase 1 of wrapper OO cleanup.
# Collecting underpants
2002-03-24 18:05:49 +00:00
Sander Roobol 68b18b05fe Fix typo in proto. 2002-03-24 18:01:41 +00:00
Derick Rethans a9439b7072 - Fix proto 2002-03-24 17:59:39 +00:00
Georg Richter c47244cd8a changed prototype for mysql_real_escape_string 2002-03-24 17:57:32 +00:00
Mark L. Woodward 4211c9fed2 Added support for session manager ID creation, works with patch submitted earlier 2002-03-24 17:54:19 +00:00
Zak Greant fa4bd7ab32 Added mysql_ping() function. 2002-03-24 17:34:20 +00:00
Georg Richter e15bb45a1e a) ws fixed
b) changed mysql_list_processes, mysql_stat (zend_parse_parameters)
c) New functions:
	1) mysql_real_escape_string	this function is similar to mysql_escape_string (deprecated).
					it needs a mysql-connection to escape a string according to the
					current character set

	2) mysql_character_set_name	returns the current character set for the connection

	3) mysql_thread_id		return the pid for the current connection. This function is usefull
					when using mysql_list_processes
2002-03-24 17:19:19 +00:00
Edin Kadribasic 62df9cf644 Override max_execution_time, setting it to unlimited. 2002-03-24 17:14:34 +00:00
Wez Furlong 89994a2032 News updates.
# This might have saved some discussions on php-dev if I had done it
# sooner :-)
2002-03-24 16:58:27 +00:00
Jan Lehnardt 04f6ec87d0 - initial checkin of basic testcases for pspell 2002-03-24 16:22:50 +00:00
Zak Greant 28de0b545e (PHP mysql_list_processes) Returns a pointer to a result set containing
information on the processes running in the
                           MySQL server.
(PHP mysql_stat) Returns a string containing information on the status
                 of the MySQL server.
@- Added two new functions: mysql_list_processes and mysql_stat (Georg)
@- mysql_list_processes() fetches information on the processes running on
@  the MySQL server.
@- mysql_stat() returns status information for a MySQL server.
#  Committed for Georg by Zak
2002-03-24 10:57:40 +00:00
Derick Rethans 66e510f60a - Fix for bug #16232 (Patch by Alan Knowles <alan@akbkhome.com>) 2002-03-24 10:40:21 +00:00
Stig Bakken 365505daed * move logic to _assertStateDir 2002-03-24 01:52:38 +00:00
a927404520 ChangeLog update 2002-03-24 01:18:49 +00:00
Sterling Hughes dc81ee82a1 revert out accidental code 2002-03-23 23:47:53 +00:00
Edin Kadribasic 9ecec88998 Documented -r and added TODO 2002-03-23 23:47:10 +00:00
Sterling Hughes 6270efc5a9 remove experimental status 2002-03-23 23:46:04 +00:00
Sterling Hughes 34ba10b98b the point can be made both ways :) 2002-03-23 23:40:19 +00:00
Sterling Hughes 496c46c3f0 make key identifiers case sensitive 2002-03-23 23:37:17 +00:00
Derick Rethans 60f20cd870 - Fix experimental notice 2002-03-23 23:30:17 +00:00
Jan Lehnardt 8897845f3b - fix "xml_parse_into_struct/umlauts in tags" testcase. It never really
- worked
2002-03-23 23:24:48 +00:00
Derick Rethans 1f9b519c55 - Remove read_uploaded_file 2002-03-23 23:03:04 +00:00
Edin Kadribasic 0f79e17942 .cvsignore in tests dirs cleanup 2002-03-23 22:24:32 +00:00
jim winstead 23d2eff94d remove inappropriate article 2002-03-23 18:40:24 +00:00
jim winstead c06307e8bb rewrite history a bit. there is no is_enum(), it was com_isenum(). 2002-03-23 18:37:43 +00:00
Tomas V.V.Cox b217ed9711 The System class was modified to always return true or false instead
of PEAR Errors. Changed then assertStateDir() to check for false.
2002-03-23 18:36:52 +00:00
Tomas V.V.Cox 757ec9ef38 Show maintainers name in package-info and show more human friendly
column table names
2002-03-23 17:55:51 +00:00
Marcus Boerger 4df6833a79 -defined php_stream_temp_new() for standard temp streams 2002-03-23 17:51:20 +00:00
Tomas V.V.Cox 1cf543c34a Yet another break; forgotten 2002-03-23 17:46:51 +00:00
Tomas V.V.Cox fdce319634 Oops, forgot the break; 2002-03-23 17:44:48 +00:00
Tomas V.V.Cox 8ea9125840 - Show the real dir where files would be installed (using role & config)
- Introduce column wrapping
2002-03-23 17:27:39 +00:00
Marcus Boerger 4cab908a78 -removed -x
-no german in NEWS
2002-03-23 17:22:41 +00:00
Marcus Boerger fdf9d3502a -removed -x
-error handling for illegal switch combinations
-corrected ws for one case block
2002-03-23 17:10:31 +00:00
Tomas V.V.Cox f40007a1ef - Use getenv('TERM') instead of $_ENV (empty for me in 4.1.1)
- Added 'linux' as bold capable list of term types
- Pass the col by reference for making the wrap take effect in tableRow
2002-03-23 16:50:43 +00:00
Tomas V.V.Cox dc17bcc6ab fix parse error 2002-03-23 15:56:14 +00:00
Hartmut Holzgraefe e40ce9963e dl is now aware of modules compiled for php <4.1.0
which have a slightly different module_entry structure
2002-03-23 15:37:27 +00:00
Derick Rethans e2f110d982 - Added read_uploaded_file (patch by Andrew Sitnikov <sitnikov@infonet.ee>) 2002-03-23 14:10:57 +00:00
Sebastian Bergmann bfa05df3fd Nuke unused variables. 2002-03-23 13:13:15 +00:00
Andi Gutmans 3e3ae4f61c - Fix build without ZTS. If someone has a nicer fix let me know. 2002-03-23 12:18:50 +00:00
Stig Bakken 3402d342a6 * added package-list and package-info commands (for .tgz files) 2002-03-23 10:21:29 +00:00
Stig Bakken 9fae289542 * use switch/case for what it's worth :-) 2002-03-23 10:20:41 +00:00
Stig Bakken b5604d18dc * _lock() calls _assertStateDir() 2002-03-23 10:18:32 +00:00
Stig Bakken ed16ccb275 * support having a toplevel package.xml in tgz files 2002-03-23 10:17:39 +00:00
Stig Bakken e965aba2aa * wordwrapping and multiline table cell support 2002-03-23 10:15:36 +00:00
Rui Hirokawa 751dcedb08 fixed some errors in regression tests. 2002-03-23 07:36:27 +00:00
Rui Hirokawa d1caef7155 changed license from GPL2 to PHP License. 2002-03-23 07:33:13 +00:00
Rui Hirokawa 8c09fb90ba fixed compile warnings. 2002-03-23 07:32:40 +00:00
James Cox 7d5e529b55 "reverting" to 1.39 as per Tomas Cox's wishes. 2002-03-23 05:29:09 +00:00
Yasuo Ohgaki 5f3d9a67f9 Fix test :) 2002-03-23 01:50:54 +00:00
Hartmut Holzgraefe ab928b03d6 proto fix 2002-03-23 01:43:38 +00:00
Yasuo Ohgaki 4a95a9295a Added while(list() = each()) test
# We may want tests/bugs ?
2002-03-23 01:34:50 +00:00
b8bf7c9f7f NEWS update 2002-03-23 01:19:18 +00:00
8694004ba9 ChangeLog update 2002-03-23 01:18:55 +00:00
Marcus Boerger 122c18741c @Added new switch -x to CLI that enables execution of files without @scripting tags. (Marcus)
-Add -x
#Read follow up mail
2002-03-22 15:26:27 +00:00
foobar cf267402b5 fix the fix 2002-03-22 13:55:11 +00:00
foobar 35e7255055 - Fixed minor inconvenience with iconv detection when iconv is found in libc 2002-03-22 13:49:05 +00:00
Stig Bakken 5e0f34ea55 * don't start table cells with a space in borderless tables 2002-03-22 12:47:13 +00:00
Stig Bakken 1b09d1f19c * typo fix 2002-03-22 12:46:18 +00:00
Stig Bakken 75f15860b1 * use PEAR_Frontend tables in config-show command 2002-03-22 12:45:41 +00:00
Derick Rethans fe614114e6 - oops :) 2002-03-22 12:15:40 +00:00
Derick Rethans bdf73d2972 - Fix for bug #14644 (patch by samuel_carriere@hotmail.com) 2002-03-22 12:13:59 +00:00
Stig Bakken a57a5d7eda * now using PEAR_Frontend tables 2002-03-22 11:59:52 +00:00
Stig Bakken fd62c434e5 * ncurses note 2002-03-22 11:58:22 +00:00
Stig Bakken 5cc2e77ca8 * table support working
* added bold support for xterm/vt220/vt100 terminals
2002-03-22 11:57:45 +00:00
Stig Bakken 8ce0ceb372 * setUIType -> setFrontendType 2002-03-22 11:57:09 +00:00
Hartmut Holzgraefe 0fa0ae051d manual is fixed to have static anchors generated from ids for the faq part 2002-03-22 11:19:12 +00:00
Stig Bakken 5d11204de0 * rename class/methods 2002-03-22 11:09:58 +00:00
Stig Bakken 9631885246 * temporarily added: nuke old files/dirs 2002-03-22 10:28:27 +00:00
Sascha Schumann f93e3ab954 de-overquotation 2002-03-22 10:22:41 +00:00
Sascha Schumann e4a5210bbf A cli-specific extension should be named once only, not twice.
Noticed by: Derick
2002-03-22 10:22:02 +00:00
Stig Bakken 73d26803f0 * one last CommandUI -> Frontend change 2002-03-22 10:05:40 +00:00
Stig Bakken 60035fb949 * rename PEAR_CommandUI* to PEAR_Frontend*
* rename PEAR/Command/Login.php to PEAR/Command/Auth.php
* replace PEAR/Command/Info.php with PEAR/Command/Registry.php (will contain
  more commands related to the local registry)
* started working on Frontend table output
2002-03-22 09:22:28 +00:00
Derick Rethans 141e3d52f7 - Add test for sprintf()'s zero'th argument 2002-03-22 09:09:36 +00:00
Derick Rethans 25b42ae3b6 - Fix handling of zero'th argument for sprintf()'s argument swapping code
(Patch by Morten Poulsen <morten@afdelingp.dk>)
2002-03-22 09:09:18 +00:00
Derick Rethans c7bee30374 - Add note about changed fopen wrappers 2002-03-22 08:47:41 +00:00
Stig Bakken e41dca2995 * No point in creating the lock file directory if it does not exist (so many
other things would fail anyway).  Throw an error instead.
2002-03-22 08:32:40 +00:00
2b87db1674 ChangeLog update 2002-03-22 01:20:21 +00:00
Hartmut Holzgraefe 10811cd0d8 getting rid of the warn_not_available alias 2002-03-22 01:10:31 +00:00
Markus Fischer b199615ed2 - Fix #16206. 2002-03-21 23:12:10 +00:00
Markus Fischer 1d75089d8b *** empty log message *** 2002-03-21 22:35:02 +00:00
Tomas V.V.Cox 9772468d37 - Make the rellocation of packages work as expected if the target
dir doesn't exist
- The "install -f" now replaces the info in the registry
2002-03-21 22:29:03 +00:00
Markus Fischer 341af63328 - Use proper macros for php_stream_cast() return values (fixes #16211). 2002-03-21 22:05:40 +00:00
foobar 9ef9a18d2c The changes to build system and the streams stuff alone are big enough
reason to make next release 4.3.0
2002-03-21 20:55:55 +00:00
Tomas V.V.Cox 41a8a27676 - Added command level options
- Fix error handling for Getopt (it doesn't use raiseError)
2002-03-21 20:55:41 +00:00
Tomas V.V.Cox a7936eea78 - Implement command level options
- Removed call pass by reference
- Readd $options to command::run() params
2002-03-21 20:52:26 +00:00
Marcus Boerger 661fd669ec -missing efree in close 2002-03-21 20:37:04 +00:00
foobar 4110878a24 This file is generated and not supposed to be in CVS 2002-03-21 20:25:01 +00:00
foobar b5707cefc1 missing file 2002-03-21 20:22:41 +00:00
foobar d533371760 - Fixed bug #16165 again. We check libc for iconv functions only if
no path is given for --with-iconv.
# I hope this is the last time.
2002-03-21 20:22:05 +00:00
Marcus Boerger eb8c6b4696 -removed old streams test code 2002-03-21 20:16:22 +00:00
foobar 5b495616bd This file was missing. 2002-03-21 20:10:24 +00:00
Marcus Boerger ac6ae669e4 -fixed memory handling 2002-03-21 19:59:08 +00:00
Hartmut Holzgraefe b00d9a5b2c added fnmatch() and glob() functions
could someone please check if i got the virtual dir stuff right?
2002-03-21 19:18:13 +00:00
Tomas V.V.Cox a974fbd9ae fix a problem handling nested directories 2002-03-21 19:12:49 +00:00
Sascha Schumann a188fac946 Support systems without NIS functions, but with non-working libnsl 2002-03-21 17:05:47 +00:00
Wez Furlong 06f6e47e4c Require that wrappers use <protocol>://<path> to avoid
ambiguities when filenames have ':' characters.
This slightly breaks BC with the old style zlib: wrapper.
2002-03-21 17:02:50 +00:00
Hartmut Holzgraefe 8c0fd5bc35 proto fixes 2002-03-21 16:10:08 +00:00
foobar ec1b89a627 Minor detail fixed. 2002-03-21 15:49:55 +00:00
Andrei Zmievski 1cf188ae1b Fix compilation when PCRE is disabled. 2002-03-21 15:28:46 +00:00
Sander Roobol a15c9a31eb Added tests for pow()'ing with broken exponents and some additional test
for count()'ing arrays.
2002-03-21 14:18:30 +00:00
Wez Furlong abb7905c0c NEWS updates 2002-03-21 14:08:59 +00:00
Rui Hirokawa 4e494746c1 fixed POST/GET input processing. 2002-03-21 13:44:39 +00:00
Marcus Boerger 671829bff4 #ws 2002-03-21 13:16:03 +00:00
Marcus Boerger f2ae5b70d9 #uups commit on wrong file 2002-03-21 12:55:37 +00:00
Marcus Boerger a598e0b73f -fix missing efree 2002-03-21 12:45:32 +00:00
Tomas V.V.Cox 9bee3510ea readd the "list" command 2002-03-21 11:33:54 +00:00
Tomas V.V.Cox b14c8152da Adapt this commands to the new config store mechanism and command params 2002-03-21 11:16:15 +00:00
Tomas V.V.Cox 139f69ca32 Pass config to command factory and pass the correct command params 2002-03-21 11:13:02 +00:00
Tomas V.V.Cox 47c71bcaa1 - The config object is stored by the factory method
- Make install/unistall/package work again (didn't work for me)
2002-03-21 11:10:17 +00:00
Tomas V.V.Cox 67b971aece Clean up unused stuff 2002-03-21 11:04:56 +00:00
Sebastian Bergmann f6102f7300 ext/overload is a 'built-in' extension on Win32. 2002-03-21 06:25:42 +00:00
Andi Gutmans e7100e22dc - No idea how this slipped in. Fix delete $obj statement. 2002-03-21 04:20:03 +00:00
Wez Furlong c0e39dfa9c Implement bz2 streams and bz2: wrapper.
You can now do this:
copy("zlib:src.gz", "bz2:dest.bz2");
As with zlib, most of the functions with counterparts
in file.c are now aliases to those functions.
2002-03-21 02:27:41 +00:00
Wez Furlong 8da0093935 really nuke it... 2002-03-21 01:22:36 +00:00
ba81ebf46c ChangeLog update 2002-03-21 01:19:29 +00:00
Wez Furlong a662f012bb Convert the gzfile related functions into aliases for their equivalents
in ext/standard/file.c, so a gzopen()ed file pointer can be used in
fread, fseek etc.
Improved behaviour of zlib stream.
Moved passthru code into streams.c
# I'm not happy about BG(mmap_file)
Nuked gzgetss_state as no longer needed.
2002-03-21 01:11:52 +00:00
Yasuo Ohgaki 4094513915 Show function name in error message. 2002-03-21 00:06:45 +00:00
Harald Radi d5e64b2287 added thread safe hashtable which allows concurrent
reads but only exclusive writes
2002-03-20 21:26:46 +00:00
Boian Bonev 4586665c19 ws fix 2002-03-20 19:45:25 +00:00
Boian Bonev e94ffe37e7 fix version checking - now handle 1.2.3 and 1.2 as well 2002-03-20 19:22:54 +00:00
Harald Radi f64628eb7d fixed signed/unsigned comparison warnings 2002-03-20 19:13:03 +00:00
Derick Rethans 85682d568f - Fix makedist 2002-03-20 18:54:30 +00:00
Sander Roobol 8581f8394b Some PHP-info layout fixes (\n will automatically be converted into <br />)
and a comment-related fix.
2002-03-20 18:29:28 +00:00
Boian Bonev 396dc67cf7 fix a missing [ 2002-03-20 18:22:32 +00:00
foobar 9a5b42cb78 - Should work better now.. 2002-03-20 18:16:51 +00:00
Wez Furlong 3dbde95896 Make state parameter of php_strip_tags passed by reference.
Move state tracking to stream structure.
2002-03-20 14:38:13 +00:00
Wez Furlong 659a071e3d Streams are all tracked as resources now.
Add some logic that will help track down leaks
when debug is enabled.
2002-03-20 14:21:30 +00:00
Wez Furlong 14d62c7b62 Add parameter here too... 2002-03-20 13:50:16 +00:00
Sascha Schumann 350de12bc2 Expand the variables in PHP_EXPAND_BUILD_VARS.
Make HAVE_ICONV/HAVE_LIBICONV available through the more
fine-grained approach using a single include file per
directive.  This will significantly reduce the price of
full dependencies for developers, because basically each
file today includes php.h which includes php_config.h.

If PHP_ATOM_INC is defined, these include files can be used.

For all PHP_DEFINEs, empty files are created upon configure start.
2002-03-20 13:24:59 +00:00
Wez Furlong 6f77640ca8 add forgotten parameter 2002-03-20 13:21:55 +00:00
Sascha Schumann c8ec0fa4bd Fix building mysql client library
Run client lib specific checks only when clientlib is used
Remove second invocation of MYSQL_SOCK
2002-03-20 12:40:27 +00:00
Sascha Schumann 1962e1e620 Avoid duplicate tests and make third parameter truly optional. 2002-03-20 12:08:30 +00:00
foobar 4597486984 - Fixed (hope so :) like Sascha said. 2002-03-20 12:00:26 +00:00
Sascha Schumann 71a361d5ea Fix and tweak iconv macro 2002-03-20 11:59:48 +00:00
Sascha Schumann d9f36aed9f Don't quote too much. Now autoconf-2.13 is happy again. 2002-03-20 11:49:36 +00:00
Sascha Schumann 5005415595 Remove autoconf-2.5x specific m4_default macro.
It is pointless here, because we don't need any "void" statement.
There already is a statement and all it will do in the worst case
is generate an empty line
2002-03-20 11:41:06 +00:00
Sascha Schumann 6bbf968f8a There should not be any trailing data on an #endif line 2002-03-20 08:53:55 +00:00
Sascha Schumann 171b8642dc add info about build system macros 2002-03-20 08:48:41 +00:00
Markus Fischer f130bdb59e - Fix for #16176. 2002-03-20 08:17:06 +00:00
Jon Parise bb82bf2e2b This completely fixes the iconv library detection under FreeBSD (the
previous fix was incomplete).  We also set HAVE_ICONV and HAVE_LIBICONV
based on the library that was detected.
2002-03-20 07:36:56 +00:00
foobar 9ccad4a8ba - Fixed the bz2 tests. (and changed the usage comment to be correct) 2002-03-20 02:16:34 +00:00
foobar 956a7762b8 - This is not needed here 2002-03-20 02:07:32 +00:00
foobar 4a0291d238 - Make it possible to build ext/openssl as shared extension 2002-03-20 02:07:11 +00:00
foobar 00929ff9ac - Fixed bug: #16139 (compile failure with Mysql 4.0.1)
- Some tests were only run when compiling with the bundled libs.
  (caused some compile warnings with external mysql libs)
- Another try to fix the zlib issue..(uncompress)
2002-03-20 01:31:22 +00:00
92adc9456a ChangeLog update 2002-03-20 01:21:12 +00:00
foobar e8271cc71e - Fix this without breaking BC 2002-03-20 00:39:28 +00:00
Wez Furlong 7990d742e5 Improve behaviour of the stream casting operation.
Improve interaction with fopencookie.
2002-03-19 23:29:37 +00:00
Harald Radi 2adf5bea7c pass function signature in zend_parse_parameters style
lookup cache works now per signature (not only method name)
reviewed resource management
# have to learn now ..
2002-03-19 23:28:52 +00:00
Frank M. Kromann f6ec73d37f Minor change to allocated lengths for dates 2002-03-19 23:00:17 +00:00
foobar 1822154a4c missing entry 2002-03-19 22:52:27 +00:00
Markus Fischer 7bf57c999c - Support vpopmail 5.2 (fixes #16120). 2002-03-19 22:47:37 +00:00
foobar a62b31f6b7 - Fix the iconv detection when the functions are prefixed with lib.
(e.g. in freebsd)
2002-03-19 22:40:18 +00:00
Frank M. Kromann 42ba9987ea Oops.. This should make I64 work on WIn32 as well 2002-03-19 22:38:35 +00:00
Frank M. Kromann 0201386fac Changing the LongInteger to return 64 bit integers as string values with all 64 bit 2002-03-19 22:36:42 +00:00
Markus Fischer cd0ceca76f - Fix bug spotted by Lukas Schroeder <lukas@edeal.de>. 2002-03-19 21:18:18 +00:00
Stig Bakken c19ddade2c * install PEAR_Command_Package 2002-03-19 19:59:05 +00:00
Stig Bakken de381091ba * re-add "package" command 2002-03-19 19:55:30 +00:00
Stig Bakken fdf8cafd11 * "pear login" finally works 2002-03-19 19:31:02 +00:00
Stig Bakken 97beb58d43 * fix http auth bug 2002-03-19 19:30:06 +00:00
Stig Bakken 529ec7cda4 * add optional default parameter to userDialog method 2002-03-19 19:28:48 +00:00
Zeev Suraski a9411a6da2 Possibly fix a crash - Marcus, please take a look at it... 2002-03-19 19:16:20 +00:00
Zeev Suraski dcb44bf512 - Fix whitespace (guys, please try to stick with the php4 tree style as far
as indentation/newlines go, and also as far as using {} even on if's
  that have single statements)
- Fix Windows build
2002-03-19 19:15:40 +00:00
Andi Gutmans a990c4da3e - Finish covering all parsed methods to check for validity in parser.
- Change zval's refcount to zend_uint (If it doesn't slow down the Engine
- too much it should probably stay this way). If anyone has time to test
- the difference in speed between zend_ushort & zend_uint in zend.h of
- the struct _zval_struct (one line change) I'd be glad to get some
- figures.
2002-03-19 19:09:53 +00:00
Harald Radi cb2368c905 fixed memleaks
added method lookup caching
pass function signature to hash function callback
2002-03-19 18:46:28 +00:00
Frank M. Kromann 5280936895 Adding support for TinyInteger and LongInteger database types 2002-03-19 18:33:05 +00:00
Wez Furlong 14a3911866 fix for bug #16168 2002-03-19 17:49:02 +00:00
Wez Furlong b92f2da5fa make buffer length warnings more verbose 2002-03-19 16:56:53 +00:00
Ludovico Magnocavallo 6ebf422685 Fixed include of interbase.inc
Fixed test database path
Changed v_date field in test table definition to timestamp type
Reduced maximum length of double precision type to 18

Tests 001 002 003 006 pass
Test 004 (BLOB test) still needs to be fixed
Test 005 (Transaction) gives the right output but issues a warning
2002-03-19 16:52:41 +00:00
Daniela Mariaschi c3daa18168 fixed floating number incorrectly rendered (as mentioned by giancarlo@niccolai.ws in BUG #14755) 2002-03-19 15:29:17 +00:00
Wez Furlong 32a4f35580 register some constants for user streams 2002-03-19 14:35:55 +00:00
Uwe Steinmann 17b2eb13cc - the fdf include file shipped with the FDF toolkit is spelled
in lower case (at least in version 5.0)
2002-03-19 14:03:30 +00:00
Wez Furlong 6d55f16974 correct copy/paste typo 2002-03-19 13:46:32 +00:00
Wez Furlong 6d431f1caf avoid possible buffer overruns when write returns a value larger than the buffer 2002-03-19 13:44:38 +00:00
Wez Furlong b808af8601 Make file_get_wrapper_data return the underlying PHP object for
user-space streams.
2002-03-19 13:42:25 +00:00
Wez Furlong 6abe71bebc s/fgetwrapperdata/file_get_wrapper_data/ 2002-03-19 13:33:07 +00:00
Sascha Schumann 3757a81367 Remove trailing ;
The macro can now safely be used in constructs such as

if (..) foo() else bar();
2002-03-19 12:11:46 +00:00
Sascha Schumann 0459ad70a7 some typo fixing, and following The Little Book, omitting needless words 2002-03-19 12:08:57 +00:00
Sascha Schumann 27bf1db90b Somewhere along the build changes, -export-dynamic was lost.
Readd it.

Noticed by: Stanislav Malyshev
2002-03-19 11:48:40 +00:00
Sascha Schumann f84167571f touch file. Please commit first the .re file and afterwards the .c source. Otherwise, timestamps will be broken. 2002-03-19 11:39:41 +00:00
Thies C. Arntzen 3550d75d0f fix #12793 - serialize will now spit a notice if the return value of __sleep is
bogus.
2002-03-19 11:25:21 +00:00
foobar 737ea7691a added missing .libs entry 2002-03-19 10:52:41 +00:00
foobar 2bdd6f522e - Not needed anymore. 2002-03-19 10:49:26 +00:00
Yasuo Ohgaki 69d6f1e3f5 Added README.SUBMITTING_PATCH file. Please fix/add/change.
Added more description for use of assert().
2002-03-19 09:13:45 +00:00
Sebastian Bergmann 239a05eef6 Add streams.c/user_streams.c to MSVC projects. 2002-03-19 07:01:30 +00:00
Wez Furlong 06712a508a Implement user-space streams.
There's probably room for improvement,
docs will following some time this week.
2002-03-19 03:51:01 +00:00
Wez Furlong 9e14ed0255 add sys/poll.h header detection 2002-03-19 03:49:26 +00:00
Wez Furlong 67231e25e4 make feof more useful on network streams 2002-03-19 03:49:03 +00:00
Harald Radi a85ea38eac added lookup caching and now make use of the new thread
safe hashtables (not in cvs right now)
2002-03-19 03:36:16 +00:00
Yasuo Ohgaki 68f63a012f WS fix 2002-03-19 02:59:15 +00:00
c7b7b5a9b1 ChangeLog update 2002-03-19 01:22:04 +00:00
Jon Parise aceb7a3c2e Give one last reference to pear-get. 2002-03-19 01:19:24 +00:00
Stig Bakken 623905dfbf * pear-get gone 2002-03-19 01:13:20 +00:00
Vlad Krupin 7139845af9 Fix ftp_size() returning bogus results.
# make sure the server is in BINARY mode before requesting file size.
2002-03-18 22:26:32 +00:00
Sebastian Bergmann 46315144ee Fugbix typo. 2002-03-18 22:13:14 +00:00
Frank M. Kromann 836c6e36aa Adding note about permission to distribute this code under the PHP license 2002-03-18 21:38:17 +00:00
Frank M. Kromann ce24409e86 Adding HAVE_SHUTDOWN on win32. Needed for the sockets extension to compile 2002-03-18 21:09:23 +00:00
Markus Fischer 30454e237b - Let OCIError() also return the sql statement which failed and the exact
position into the statement where it failed (if applicable).
  Patch by Daniel Ceregatti <vi@sh.nu>.
2002-03-18 21:01:29 +00:00
Wez Furlong e3a884f552 fix error message which appeared even if no ssl mode was selected 2002-03-18 20:44:15 +00:00
Andi Gutmans c5ad6ae1b8 - More fixes to check for member/function call legality. 2002-03-18 20:27:03 +00:00
Wez Furlong 33906e934a Fix for bug #10001: a timeout event prevents further reads.
The Bug DB has a patch that should be applied to fsock.c on the
4.2 branch.
2002-03-18 20:13:50 +00:00
Zeev Suraski 16c9da0eed Fix build under Release_TS
Maybe separating TSRMLS away wasn't such a good idea (sorry Wez :)
2002-03-18 19:47:50 +00:00
Wez Furlong 48e902bacd Fix for bugs #16148, #11199, #10092:
fread from socket will never free memory.
This patch should also be applied to php_sockread_internal in
fsock.c in the 4.2 branch.
2002-03-18 19:42:19 +00:00
Wez Furlong c978602a0b fix non-TS build... 2002-03-18 19:13:11 +00:00
Wez Furlong 021bf6f01f Shouldn't have made it into my last commit. 2002-03-18 18:57:25 +00:00
Wez Furlong c9d5e13738 TSRMLS related work on streams, as discussed with Zeev.
# Should be the last "broad" commit for a while
# Don't forget to make clean ; make
2002-03-18 18:54:32 +00:00
Stig Bakken 41c1c08495 * get rid of this hack 2002-03-18 18:01:14 +00:00
Hartmut Holzgraefe c19dfe84c7 proto fixes 2002-03-18 18:00:24 +00:00
Stig Bakken a036fe5b72 * Refactoring of "pear" command internals. Highlights:
- user interface abstraction, making a Gtk installer should only be
   a matter of implementing PEAR_CommandUI_Gtk plus a "pear-gtk" executable
 - separated code into command classes, able to specify one or more
   commands
 - no more "pear-get" :-)
* fixed use of PEAR_Config::singleton to avoid object copying
2002-03-18 17:39:52 +00:00
Edin Kadribasic 4609e926cf -r is in the release branch. 2002-03-18 15:11:41 +00:00
Sascha Schumann 26a92a72f1 unused makefile.in 2002-03-18 14:38:01 +00:00
Sascha Schumann 94a3c1e7a4 empty files, let them go 2002-03-18 14:37:22 +00:00
Wez Furlong 5fb9f9c134 fix warning 2002-03-18 11:49:40 +00:00
Wez Furlong 966784bcde fix TSRM build 2002-03-18 11:46:21 +00:00
Wez Furlong 8ba2514253 Fix build.
Warning about TSRM testing still applies.
2002-03-18 11:46:00 +00:00
Wez Furlong dd9a3c94a8 tidyup use of STREAMS_DC macros 2002-03-18 11:18:07 +00:00
Wez Furlong 1222d80860 having streams is now the default 2002-03-18 10:44:39 +00:00
Zeev Suraski c157b0f75b Move stream files into the right folders 2002-03-18 10:35:01 +00:00
Stanislav Malyshev 834042f56d Update .dsp 2002-03-18 09:47:24 +00:00
Stanislav Malyshev 858291e6b5 Fix build 2002-03-18 09:42:20 +00:00
Zeev Suraski a145646e74 Fix build 2002-03-18 09:20:43 +00:00
Zeev Suraski 8cb649d06d Make Sebastian happy 2002-03-18 09:12:31 +00:00
Sascha Schumann 68d2592f52 Rename HAVE_PHP_STREAM to PHP_HAVE_STREAMS, because
1.) a PHP-specific symbol should be in the php namespace, and
2.) there are multiple streams and the old configure parameter was plural, too.
2002-03-18 08:29:17 +00:00
Sascha Schumann d74666a648 touch file 2002-03-18 08:22:33 +00:00
Zeev Suraski 73e79322ba Fix the build and all of the outstanding VC++ warnings 2002-03-18 08:05:28 +00:00
Yasuo Ohgaki 3de2e94c84 -c option is for path. 2002-03-18 06:06:00 +00:00
Yasuo Ohgaki 9d2edd0fd8 Use common.inc instead of common.php for ease of use (rm -f *.php for failed
test files)
2002-03-18 06:03:53 +00:00
Marcus Boerger 68f4e7c328 -streams are no longer an option 2002-03-18 05:32:25 +00:00
Marcus Boerger f83c6cc0a9 -temp streams are now clean (Thanks to Wez) 2002-03-18 04:57:06 +00:00
Shane Caraveo 391fdf858e add new ini item for fastcgi 2002-03-18 04:49:16 +00:00
Shane Caraveo c806dca62c add security impersonation feature for running under IIS security 2002-03-18 04:48:34 +00:00
Shane Caraveo b84c61f314 Add impersonation feature for running under IIS 2002-03-18 04:46:32 +00:00
jim winstead c91474615c make test: '-c' flag doesn't work like this expects (it takes a
directory, not a file), and this isn't necessary.
2002-03-18 03:51:40 +00:00
jim winstead 349936c93e Fix calculation of output buffer size in wordwrap(). (Thanks to Wez.) 2002-03-18 02:00:57 +00:00
Wez Furlong dc8593cb7b correct grammar 2002-03-18 01:40:56 +00:00
67d75b177d ChangeLog update 2002-03-18 01:21:55 +00:00
Wez Furlong afd2c5662a Add some rules for stream implementors. 2002-03-18 01:12:32 +00:00
Marcus Boerger c645babd8a -use php_stream_make_seekable 2002-03-18 00:12:47 +00:00
Marcus Boerger 318dc3e527 -added temporary streams
-added stream debug code
#should be used from php_stream_make_seekable
2002-03-17 23:50:31 +00:00
Wez Furlong d2d8762267 Streams now make more use of the memory manager, so tracking down
leaking streams should be easier.
# I hate these big commits
2002-03-17 22:50:59 +00:00
foobar 19e82a49f9 - Made one test/setup macro for iconv and fixed it to check
for libc first.
2002-03-17 21:09:21 +00:00
Stefan Esser 0d3a45299d SAFE_MODE restriction error message fixed if the file doesn't exist 2002-03-17 21:00:44 +00:00
Stefan Esser cce45de17c move_uploaded_files checks open_basedir now 2002-03-17 20:56:20 +00:00
Jason Greene aab103e9fc Remove already included file 2002-03-17 19:41:24 +00:00
Andi Gutmans 46afe61d25 - Start putting error handling where method calls are being used in a
- context where only writable variables should be used.
2002-03-17 19:13:46 +00:00
foobar d568b5c87b Fix build. 2002-03-17 17:30:55 +00:00
Sander Roobol 9ca0100889 Fixed compile error about gdImageColorResolve (#14426, #15000). 2002-03-17 17:01:18 +00:00
Harald Radi 65c4e9e0fd removed anoying warnings 2002-03-17 16:45:56 +00:00
Harald Radi 2b7c7de500 reduced warninglevel to remove the annoying
warnings from the re2c generated code
2002-03-17 16:20:50 +00:00
James Cox 7859852a3c NEWS is my friend... 2002-03-17 16:04:35 +00:00
James Cox 90fe0e93e9 s/-/ ./ 2002-03-17 15:49:53 +00:00
James Cox d0bfa92b42 no, really update it 2002-03-17 15:27:51 +00:00
foobar fdc07402b5 - This is not used anymore. 2002-03-17 15:17:46 +00:00
James Cox 2aa84cd9f5 updated NEWS 2002-03-17 15:12:18 +00:00
Wez Furlong 12a0092376 Fix for php_stream_gets when the implementation does not support it
natively (Thanks Marcus).

Implement php_stream_make_seekable() and add STREAM_MUST_SEEK as an
option to php_stream_open_wrapper().
See README.STREAMS for usage.
2002-03-17 14:21:01 +00:00
Wez Furlong effa6e8daa tidy up the headers (streams related) 2002-03-17 13:29:44 +00:00
Wez Furlong 436e339bc7 Fix for Bug #16121: make unix socket names binary safe.
# Could be applied to 4.2 branch, but I don't have a working copy, and
# I don't think it's amazingly critical.
2002-03-17 13:19:27 +00:00
Wez Furlong b98074ee86 fix problems with cgi/cli sapi when running tests 2002-03-17 13:16:35 +00:00
Marcus Boerger 20f2e63289 #removed code to track down error in streams 2002-03-17 12:16:29 +00:00
Marcus Boerger 34cb24fcf7 -fix bug with wrappers 2002-03-17 12:06:41 +00:00
Markus Fischer 519e6b2208 - Let configure also detect installation in standard unix paths.
- Properly format error message.
2002-03-17 08:33:25 +00:00
Shane Caraveo 4a8dda7d01 fix closing pipes
fix buffer overrun
2002-03-17 08:21:18 +00:00
Markus Fischer bfbb3bba1f - Fix some compiler warnings and errors. 2002-03-17 08:10:04 +00:00
Wez Furlong 1d3ad85ac2 fix win32 warning and ming leak 2002-03-17 01:58:42 +00:00
8261132f41 NEWS update 2002-03-17 01:20:41 +00:00
e0fd7cc2da ChangeLog update 2002-03-17 01:19:36 +00:00
Stig Bakken c55f61c9aa * added optional layer parameter to get() method
* added isDefinedLayer() method
2002-03-16 23:48:23 +00:00
Markus Fischer 9a6296c47e - WS and code style fix. 2002-03-16 22:31:57 +00:00
foobar 6f546e7b42 - Fixed some typos. 2002-03-16 22:19:33 +00:00
Markus Fischer 6c27722398 - Some more TSRMLS fixes. 2002-03-16 22:19:10 +00:00
Harald Radi 2be6527fc6 fixed TSRM build 2002-03-16 22:08:23 +00:00
Marcus Boerger bcad7a593a -quick hack to bug in streams....but where? 2002-03-16 21:19:17 +00:00
Marcus Boerger d50102b6ab -disabling debug
#Wez: i have an error when closing the original file after stream copy...
2002-03-16 20:25:51 +00:00
Marcus Boerger f24caf3244 -formatting 2002-03-16 20:12:58 +00:00
Marcus Boerger fe9cb020ae -fix bug for not correct terminated comments
-switch to streams
@exif functions now support streams using memory streams where @necessary (marcus)
2002-03-16 20:12:17 +00:00
Marcus Boerger 8c3535e15a -added memory streams
@added memory streams (marcus)
2002-03-16 20:11:06 +00:00
Marcus Boerger bfe7a9acaf -copy_stream_to_stream returns size if maxlen == PHP_STREAM_COPY_ALL
#had to commit myself to do the rest...
2002-03-16 20:05:08 +00:00
Wez Furlong b28e19c004 fix ftell/fseek in stdio streams 2002-03-16 18:52:03 +00:00
Wez Furlong b85096ffe9 fix build problem for interbase 2002-03-16 18:43:41 +00:00
Wez Furlong 5d0c53eecf Fix some issues with gzFile and fsockopen. 2002-03-16 18:42:42 +00:00
Andi Gutmans a18000f163 - Indentation fix.
Never do:
if (expr) {
}
else

It should be:
if (expr) {
} else {
2002-03-16 18:16:55 +00:00
Wez Furlong 1fdd2a7ddd add HAVE_PHP_STREAM macro for extensions to test which fileio functions to use 2002-03-16 17:54:11 +00:00
Wez Furlong 0895998bef s/get_file_contents/file_get_contents/ 2002-03-16 16:52:24 +00:00
Harald Radi 11a67831d1 blah 2002-03-16 16:15:34 +00:00
Wez Furlong 201446c2b5 Ooops. 2002-03-16 16:14:56 +00:00
Wez Furlong 0447327118 Implement get_file_contents() as discussed (briefly!) by myself, Derick
and Sterling on php-dev some months ago.
It returns the file contents as a string, and uses mmap if possible.
2002-03-16 16:06:18 +00:00
Markus Fischer ac50b53018 - WS fix. 2002-03-16 15:50:20 +00:00
Markus Fischer 3c52ef676f - Don't forget to close the handle. 2002-03-16 15:42:34 +00:00
Wez Furlong 80f52730ff correct some problems with ming 2002-03-16 15:15:51 +00:00
Wez Furlong bed04279c3 Hopefully fix resource usage so that we have no leaks and don't segfault. 2002-03-16 14:39:51 +00:00
Wez Furlong 6abd7c6f93 fix typo 2002-03-16 13:54:03 +00:00
Wez Furlong 6beb1e37a8 work around apache segfault for the moment 2002-03-16 13:50:17 +00:00
Wez Furlong 30647934a4 Tweak the API to be more consistent.
Update docs.
2002-03-16 13:48:57 +00:00
Markus Fischer d4e63bc5bf - Raise warning when trying to execute non-executeable shell
for mail delivery binary.
2002-03-16 12:45:43 +00:00
Harald Radi 01e5d78b80 TSRM fix 2002-03-16 12:22:25 +00:00
Wez Furlong 12f893d142 fsock.c did it this way, so it must be OK... 2002-03-16 12:07:27 +00:00
Wez Furlong a411b0e97b bring back ptrdiff_t 2002-03-16 11:58:38 +00:00
Wez Furlong 31ed1707a1 Hopefully fix probs with apache. 2002-03-16 11:24:12 +00:00
Wez Furlong e0fc29877f update NEWS 2002-03-16 11:12:25 +00:00
Sander Roobol ae69dae6f8 Fixed build with multiple concurrent jobs: zend_indent.c, zend_highlight.c
and zend_compile.c require zend_language_parser.h
2002-03-16 11:02:35 +00:00
Stefan Esser e926db7bfa fixed possible bufferoverflow in get_next_char
malformed input to htmlentities/htmlspecialchars
with utf-8 encoding crashed the server

ex: htmlentities("\xfd...(30times)", ENT_NOQUOTES, "utf-8");
2002-03-16 09:44:30 +00:00
Andi Gutmans 1d2ff695e9 - Add streams.c and php_streams.h to project. 2002-03-16 08:11:52 +00:00
Rui Hirokawa 9a735efbce fixed some errors of mbstring in regression tests. 2002-03-16 07:33:21 +00:00
foobar fe976659fd - Do not use @ when you're merging the fixes to the release branch.
Instead, edit the NEWS file manually.
2002-03-16 05:43:04 +00:00
Wez Furlong 29cb19ad18 some minor docu-in-header changes 2002-03-16 03:50:17 +00:00
Yasuo Ohgaki 31fe5e46cb Quick fix build error when ptrdiff_t is not defined in types.h or sys/types.h 2002-03-16 03:37:11 +00:00
Yasuo Ohgaki 2d08c867c8 ZTS build fix 2002-03-16 03:33:48 +00:00
Yasuo Ohgaki 115a0be944 ZTS build fix 2002-03-16 03:30:19 +00:00
Wez Furlong 636829345e Allow php_stream_copy_to_stream to do nothing when used with code
that calculates a max length of zero. (Thanks again Marcus).
2002-03-16 02:48:35 +00:00
Marcus Boerger 94b6c6e87f -use of corrected stream seek
#thanks to Wez!
#image.c no works again
2002-03-16 02:46:04 +00:00
Wez Furlong 7da30fa08c some tweaks for seek/read used in image.c (thanks Marcus) 2002-03-16 02:39:39 +00:00
Wez Furlong 52982c422e This should help with some build problems/warnings under win32.
Someone still needs to add the streams.c file to the MSVC
project/workspace though (there are so many that I don't really know
what I am doing :-).
2002-03-16 02:33:00 +00:00
Marcus Boerger 59ba0b5172 -new streams 2002-03-16 02:23:57 +00:00
Wez Furlong 28d6981152 more *'s 2002-03-16 01:58:13 +00:00
Wez Furlong bc264db921 change * formatting 2002-03-16 01:37:24 +00:00
Wez Furlong a184f5d1d3 * formatting, plus remove some old fopen wrappers 2002-03-16 01:34:52 +00:00
Wez Furlong 09213d7bf8 change * formatting 2002-03-16 01:28:57 +00:00
a1667db82d NEWS update 2002-03-16 01:19:21 +00:00
801b8f4340 ChangeLog update 2002-03-16 01:19:01 +00:00
jim winstead d3400b2b5f the 'setup' script was removed more than two years ago.
these can be safely removed from the 4.2 branch, too.
2002-03-16 00:21:40 +00:00
Andi Gutmans 8dfe4961c4 - More whitespace. I really can't do the other files though... 2002-03-16 00:13:46 +00:00
Andi Gutmans f1e0b83277 - Change one strncpy() to strlcpy().
- Big indentation patch. I don't have strength to do all of the changed
- files but here's a good example. Please try and keep to the coding
- standards even if you think they suck :)
- Things to keep in mind:
- void *foo and not void * foo;
- if() { and not if()<TAB>{
- } else { and not {\nelse
-
- The streams stuff looks very cool though! :)
2002-03-16 00:05:47 +00:00
Harald Radi c1fe9cd279 ongoing development ... 2002-03-15 23:28:10 +00:00
foobar 207f26ae91 This entry belongs under 4.2.0. 2002-03-15 21:46:14 +00:00
Wez Furlong 0f65280cb5 New PHP streams... 2002-03-15 21:03:08 +00:00
Harald Radi 3a1ebd4f51 @ fixed a bug that caused php to crash in php_COM_get_ids_of_names() (Harald, Paul) 2002-03-15 20:48:26 +00:00
foobar 45711eaba2 - Corrected these entries. (catched by Derick) 2002-03-15 20:18:07 +00:00
foobar 913b7fecf9 - Fixed grammar, made some entries make more sense...etc. (proof read please :)
# People, PLEASE try keeping in mind that these entries are for
# the end-users. ie. they need to explain what was changed and why.
# And be consistent too..
2002-03-15 20:01:36 +00:00
Derick Rethans b5252e28dd - Fix proto (again) 2002-03-15 19:04:22 +00:00
Derick Rethans 108448f37a - proto fixes 2002-03-15 18:22:57 +00:00
jim winstead 12bc95432a don't redefine NDEBUG if it is already defined. yeesh. 2002-03-15 17:10:38 +00:00
Andi Gutmans c84a4ead95 - Pass TSRMLS to callbacks. 2002-03-15 16:26:17 +00:00
Andi Gutmans db84afb206 - Scope fix. When calling an imported function the scope will change
- correctly to the scope of the functions class.
<?php

	function Hello()
	{
		print "Wrong one\n";
	}

	class MyClass {
		static $hello = "Hello, World\n";

		function Hello()
		{
			print self::$hello;
		}

		function Trampoline()
		{
			Hello();
		}
	}

	import function Trampoline from MyClass;

	Trampoline();
?>
2002-03-15 15:28:06 +00:00
Daniela Mariaschi 716e6a03db added new ibase_fetch_assoc() php function 2002-03-15 15:26:01 +00:00
Andi Gutmans 0ce019f715 - Fix issues with $this when using it by itself without indirection such as
- $this->foo.
2002-03-15 15:09:46 +00:00
Stig Bakken fb624cb77a * "new and improved" iconv test 2002-03-15 13:56:32 +00:00
Harald Radi 720c40dd4e fixed HashTable allocation 2002-03-15 13:10:35 +00:00
Stig Bakken 2e597b8dc8 * fix for db3 from ports on freebsd 2002-03-15 11:26:47 +00:00
Andi Gutmans f7ec2505ca - Revert assert fix until it becomes clear what was wrong with my previous
- fix. I don't see any warnings when building with VC++ English.
2002-03-15 10:49:31 +00:00
Stig Bakken 9aa5afacee * yet another iconv config fix, should be able to handle most or all
configurations now (giconv/iconv, static libs only, iconv in libc etc.)
2002-03-15 10:06:37 +00:00
Yasuo Ohgaki 23917d0e0c Avoid warnings under VC.
# If you know how assert() should be used under VC, please fix it.
2002-03-15 06:36:56 +00:00
Yasuo Ohgaki 02202751a6 Added some fix. Clean up a bit. 2002-03-15 02:38:54 +00:00
Wez Furlong 1cc6a8e998 it's late; no more commits from me tonight... 2002-03-15 02:06:08 +00:00
Wez Furlong 0454ad4de8 should have diffed first... 2002-03-15 02:00:55 +00:00
Wez Furlong ae9db4e440 fix for ZE2 compile 2002-03-15 01:58:00 +00:00
57505b6a13 ChangeLog update 2002-03-15 01:19:57 +00:00
Harald Radi ff62e746d2 rpc apstraction module
does only work with ZendEngine2
2002-03-15 00:00:34 +00:00
Derick Rethans 7935e73749 - Fix bug #16078 2002-03-14 18:41:35 +00:00
Zeev Suraski 7b3660c6e8 Change case for consistency 2002-03-14 18:39:53 +00:00
Stanislav Malyshev 508c82ad2a more cleanup 2002-03-14 17:13:02 +00:00
Stanislav Malyshev 929bdc6998 Update howto 2002-03-14 17:08:06 +00:00
Stefan Esser cf4a292c5d fixed a typo within checkuid 2002-03-14 16:48:18 +00:00
Stanislav Malyshev 40becd37e5 fix for delete $this and unset $this 2002-03-14 16:00:48 +00:00
Andi Gutmans bb7f0a919a - Define HAVE_ASSERT_H under Windows. There was a macro redefinition before
- this.
2002-03-14 15:13:08 +00:00
Zeev Suraski d3256ecf00 Good suggestion, but I'm not sure we want to start receiving bug
reports with that version
2002-03-14 14:15:26 +00:00
Wez Furlong 93ad205756 fix buglet 2002-03-14 14:05:13 +00:00
Sterling Hughes 6489b9c316 update version 2002-03-14 14:00:04 +00:00
Zeev Suraski fb837bddaf Childish, are we? 2002-03-14 13:42:58 +00:00
foobar 186651bd06 - Fixed version 2002-03-14 13:39:36 +00:00
Zeev Suraski 20f3b718dc Make it clearer what this entry means 2002-03-14 13:35:19 +00:00
Zeev Suraski 075dc0ccc6 Fix version number 2002-03-14 13:27:43 +00:00
Derick Rethans bfa2653b61 - Whitespace part 1 2002-03-14 12:20:53 +00:00
Stanislav Malyshev 3af5b15f30 Fix call_user_function 2002-03-14 12:18:01 +00:00
Stefan Esser 77b5d80081 fixed: last commit had debug code in it 2002-03-14 11:26:10 +00:00
Stefan Esser 229e7769f4 fixed whitespace
fixed lots of possible bufferoverflows
fixed memoryleak
2002-03-14 11:22:53 +00:00
Yasuo Ohgaki dcd86d154e Fixed var_dump() crash when there is recursion.
# Since I said it's easy to fix :)
2002-03-14 09:36:13 +00:00
Stefan Roehrich c62a7c9474 Fixed NEWS entry, make it consistent with other entries. 2002-03-14 08:55:25 +00:00
Sebastian Bergmann 2ff115b01e Add note on which version of Apache 2 this SAPI module is compatible with. 2002-03-14 06:31:37 +00:00
Sean Bright 86dba965b1 Translate to English.
# I still don't know what a 'tag search' is...
2002-03-14 03:25:46 +00:00
Yasuo Ohgaki cbc1cd802c Include/enable assert.h/assert() when it is available 2002-03-14 02:17:23 +00:00
foobar aba912e66f - Fixed bug: #16047, #15865, and propably a few more.. 2002-03-14 01:45:02 +00:00
101667b33e NEWS update 2002-03-14 01:20:41 +00:00
a60e6c7c2a ChangeLog update 2002-03-14 01:19:51 +00:00
Stefan Roehrich 0d00602659 Fixed NEWS entry. 2002-03-13 21:00:44 +00:00
Jason Greene 8abf829c2a Fix CREDIT files, remove email address 2002-03-13 18:45:39 +00:00
998 changed files with 144574 additions and 88750 deletions

No files matched your search

+13 -3
View File
@@ -60,9 +60,19 @@ Exceptions:
check its man page again, and only then, consider using it, and even then,
try avoiding it.
[7] Use ZEND_* macro instead of PHP_* macro. Use of PHP_* macros are
not recommended. Since most of PHP_* macros are ZEND_* macro alias, use of
PHP_* macro makes browsing source with tag search harder.
[7] Use ZEND_* macros instead of PHP_* macros. Use of PHP_* macros is not
recommended. Since most of the PHP_* macros are ZEND_* macro aliases, using
the PHP_* macros makes browsing the source code with a tag search harder.
[8] Use assert(). assert.h is included in php.h if it is available. Not only
does good assertion catch bugs, but it also helps with code readability.
- Do not use assert for error handling. Use assert only for the
condition that must be always true.
- Do not use assignments in assert conditions. If you assign inside an
assert condition, you risk an elusive bug that would be very difficult
to spot in a debug build, due to the side effect of the assignment.
Function calls in assert conditions may also cause this problem, if
they modify one of their arguments or global variables.
Naming Conventions
------------------
+1 -1
View File
@@ -1,2 +1,2 @@
For the list of people who've put work into PHP 4.0, please see
For the list of people who've put work into PHP, please see
http://www.php.net/credits.php
+12810
View File
File diff suppressed because it is too large. Load diff
+10
View File
@@ -36,6 +36,11 @@ PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: apache2
PRIMARY MAINTAINER: Aaron Bannert <aaron@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: cgi
MAINTENANCE: Unknown
STATUS: Working
@@ -216,6 +221,11 @@ MAINTENANCE: Unknown
STATUS: Experimental
SINCE: 4.0.5
-------------------------------------------------------------------------------
EXTENSION: ctype
PRIMARY MAINTAINER: Hartmut Holzgraefe <hartmut@six.de>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: curl
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
MAINTENANCE: Maintained
+17 -11
View File
@@ -1,5 +1,5 @@
Installation Instructions for PHP 4.1
-------------------------------------
Installation Instructions for PHP 4
-----------------------------------
STOP!
@@ -62,8 +62,8 @@ Compiled-in modules:
Chances are you will see a lot more modules than these two. That's ok,
as long as mod_so.c shows up you can proceed with the following steps:
$ gunzip -c php-4.1.x.tar.gz | tar xf -
$ cd php-4.1.x
$ gunzip -c php-4.x.y.tar.gz | tar xf -
$ cd php-4.x.y
$ ./configure --with-mysql --with-apxs
$ make
$ make install
@@ -72,6 +72,9 @@ If you get an error telling you that the apxs script could not be found,
look for it on your system and if you find it, provide the full path to it
as: --with-apxs=/path/to/apxs
Make sure you specify the version of apxs that is actually installed on
your system and NOT the one that is in the apache source tarball.
Next you must copy php.ini-dist to the appropriate place (normally
/usr/local/lib/php.ini) and edit it as necessary to set PHP options.
@@ -93,8 +96,8 @@ $ cd apache_1.3.x
$ ./configure
$ cd ..
$ gunzip -c php-4.1.x.tar.gz | tar xf -
$ cd php-4.1.x
$ gunzip -c php-4.x.y.tar.gz | tar xf -
$ cd php-4.x.y
$ ./configure --with-mysql --with-apache=../apache_1.3.x
$ make
$ make install
@@ -106,7 +109,7 @@ $ ./configure --prefix=/www --activate-module=src/modules/php4/libphp4.a
$ 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)
$ cd ../php-4.1.x
$ cd ../php-4.x.y
$ cp php.ini-dist /usr/local/lib/php.ini
You can edit /usr/local/lib/php.ini file to set PHP options.
Edit your httpd.conf or srm.conf file and add:
@@ -125,12 +128,12 @@ Installing PHP can be done in four simple steps:
1. Unpack your distribution file.
You will have downloaded a file named something like php-4.1.x.tar.gz.
Unzip this file with a command like: gunzip php-4.1.x.tar.gz
You will have downloaded a file named something like php-4.x.y.tar.gz.
Unzip this file with a command like: gunzip php-4.x.y.tar.gz
Next you have to untar it with: tar -xvf php-4.1.x.tar
Next you have to untar it with: tar -xvf php-4.x.y.tar
This will create a php-4.1.x directory. cd into this new directory.
This will create a php-4.x.y directory. cd into this new directory.
2a. Configure PHP (Dynamic Module) - Skip to 2b if you wish to build
a static module
@@ -160,6 +163,9 @@ Installing PHP can be done in four simple steps:
look for it on your system and if you find it, provide the full path to it
as: --with-apxs=/path/to/apxs
Make sure you specify the version of apxs that is actually installed on
your system and NOT the one that is in the apache source tarball.
You might also want other flags on this configure line. --with-mysql
is just an example.
+24 -31
View File
@@ -1,5 +1,5 @@
--------------------------------------------------------------------
The PHP License, version 2.02
The PHP License, version 3.0
Copyright (c) 1999 - 2002 The PHP Group. All rights reserved.
--------------------------------------------------------------------
@@ -8,48 +8,38 @@ modification, is permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
3. The name "PHP" must not be used to endorse or promote products
derived from this software without prior permission from the
PHP Group. This does not apply to add-on libraries or tools
that work in conjunction with PHP. In such a case the PHP
name may be used to indicate that the product supports PHP.
3. The name "PHP" must not be used to endorse or promote products
derived from this software without prior written permission. For
written permission, please contact group@php.net.
4. Products derived from this software may not be called "PHP", nor
may "PHP" appear in their name, without prior written permission
from group@php.net. You may indicate that your software works in
conjunction with PHP by saying "Foo for PHP" instead of calling
it "PHP Foo" or "phpfoo"
4. The PHP Group may publish revised and/or new versions of the
5. The PHP Group may publish revised and/or new versions of the
license from time to time. Each version will be given a
distinguishing version number.
Once covered code has been published under a particular version
of the license, you may always continue to use it under the
terms of that version. You may also choose to use such covered
code under the terms of any subsequent version of the license
of the license, you may always continue to use it under the terms
of that version. You may also choose to use such covered code
under the terms of any subsequent version of the license
published by the PHP Group. No one other than the PHP Group has
the right to modify the terms applicable to covered code created
under this License.
5. Redistributions of any form whatsoever must retain the following
6. Redistributions of any form whatsoever must retain the following
acknowledgment:
"This product includes PHP, freely available from
http://www.php.net/".
6. The software incorporates the Zend Engine, a product of Zend
Technologies, Ltd. ("Zend"). The Zend Engine is licensed to the
PHP Association (pursuant to a grant from Zend that can be
found at http://www.php.net/license/ZendGrant/) for
distribution to you under this license agreement, only as a
part of PHP. In the event that you separate the Zend Engine
(or any portion thereof) from the rest of the software, or
modify the Zend Engine, or any portion thereof, your use of the
separated or modified Zend Engine software shall not be governed
by this license, and instead shall be governed by the license
set forth at http://www.zend.com/license/ZendLicense/.
<http://www.php.net/>".
THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND
ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
@@ -73,3 +63,6 @@ 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
<http://www.zend.com>.
+2
View File
@@ -14,3 +14,5 @@ $(builddir)/zend_ini_parser.c: $(srcdir)/zend_ini_parser.y
$(builddir)/zend_ini_scanner.c: $(srcdir)/zend_ini_scanner.l
$(LEX) -Pini_ -S$(srcdir)/flex.skl -o$@ -i $(srcdir)/zend_ini_scanner.l
$(builddir)/zend_indent.lo $(builddir)/zend_highlight.lo $(builddir)/zend_compile.lo: $(builddir)/zend_language_parser.h
+18 -14
View File
@@ -1,9 +1,8 @@
TESTS = $(top_srcdir)
mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p
INSTALL = $(top_srcdir)/build/shtool install -c
INSTALL_DATA = $(INSTALL) -m 644
DEFS = -I$(top_builddir)/main -I$(top_srcdir)
DEFS = -DPHP_ATOM_INC -I$(top_builddir)/include -I$(top_builddir)/main -I$(top_srcdir)
COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS)
@@ -14,19 +13,24 @@ build-modules: $(PHP_MODULES)
libphp4.la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
php: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
libs/libphp4.bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
$(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp4.so
php: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
$(BUILD_CGI)
sapi/cli/php: $(PHP_GLOBAL_OBJS) $(PHP_CLI_OBJS)
$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_CLI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
$(BUILD_CLI)
install: $(install_targets)
install-cli:
$(INSTALL_CLI)
install-cli: sapi/cli/php
@echo "Installing PHP CLI binary: $(INSTALL_ROOT)$(bindir)/"
@$(INSTALL_CLI)
install-sapi:
install-sapi: libphp4.la
@echo "Installing PHP SAPI module"
-@$(LIBTOOL) --silent --mode=install cp libphp4.la $(phptempdir)/libphp4.la >/dev/null 2>&1
-@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
-@if test ! -r $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME); then \
@@ -37,25 +41,25 @@ install-sapi:
fi; \
done; \
fi
$(INSTALL_IT)
@$(INSTALL_IT)
install-modules:
install-modules: build-modules
@test -d modules && \
$(mkinstalldirs) $(INSTALL_ROOT)$(EXTENSION_DIR) && \
echo "installing shared modules into $(EXTENSION_DIR)" && \
echo "Installing shared extensions: $(INSTALL_ROOT)$(EXTENSION_DIR)/" && \
rm -f modules/*.la && \
cp modules/* $(INSTALL_ROOT)$(EXTENSION_DIR) >/dev/null 2>&1 || true
install-tester:
@echo "Installing regression tester"
@echo "Installing regression tester: $(INSTALL_ROOT)$(PEAR_INSTALLDIR)/"
@$(mkinstalldirs) $(PEAR_INSTALLDIR)
@$(INSTALL) -m 755 $(top_srcdir)/run-tests.php $(INSTALL_ROOT)$(PEAR_INSTALLDIR)
install-su: install-pear install-tester
test: sapi/cli/php
TOP_BUILDDIR=$(top_builddir) TOP_SRCDIR=$(top_srcdir) \
$(top_builddir)/sapi/cli/php -c $(top_srcdir)/php.ini-dist $(top_srcdir)/run-tests.php $(TESTS)
@TEST_PHP_EXECUTABLE=$(top_builddir)/sapi/cli/php \
$(top_builddir)/sapi/cli/php -c php.ini-dist $(top_srcdir)/run-tests.php
clean:
find . -name \*.lo -o -name \*.o -o -name \*.la -o -name \*.a| xargs rm -f
+324 -99
View File
@@ -1,124 +1,348 @@
PHP 4 NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2002, Version 4.3.0
- The second parameter of gzencode() now is the compression level like
in the documentation. The encoding mode is a third (optional) parameter.
- new function exif_imagetype
exif_thumbnail fupports thumbnails in TIFF format and can return size
of thumbnail
- implemented domxml_elem_get_elements_by_tagname
new function domxml_doc_get_elements_by_tagname
new function domxml_doc_get_element_by_id (chregu)
- Fixed seg fault in domxml_unlink() (jtate)
- implemented domxml_elem_get_attribute_node(attrname) (chregu)
- domxml_elem_remove_attribute(attibutename) is now implemented (chregu)
- Added -r option to the CLI version of PHP which executes a piece of PHP
code directly from the commmand line. (Edin)
- added formatting option to domxml_dump_mem() (chregu)
- New build system that, among other improvements, replaces the slow recursive
make with one global Makefile and eases the integration of proper
dependencies. automake is only needed for its aclocal tool. The
build process is now more portable and less resource-consuming. (Sascha)
? ? ??? 2002, Version 4.3.0
- Added ob_list_handlers() which returns an array of all active output
handlers. (marcus)
- Added mbstring encoding/decoding "HTML-ENTITIES". (Marcus)
- Added parameter 'L' for mb_http_input() to retrieve input encoding as a
comma separated string. (Marcus)
- Added the ability for declare() compiler modifications to occur globally
by using an empty statement. (Jason, Zend Engine)
i.e.
//Globally enables the ticks modifier for the whole program
declare (ticks=1);
?? ??? 2002, Version 4.2.0
- Modfied the mysql extension to disable 'LOAD LOCAL' when safe mode is
//Enables the ticks modifier for just the lexical block containing
//"statement".
declare (ticks=1) {
statement;
}
- Bring strtotime() "next" keyword handling in line with documentation and
its glibc cousin. (Rasmus)
- Fixed str_rot13() to not mangle source string. (Rasmus)
- Fixed imap_get_quota() to work with multiple returned resources as per
the RFC 2087 and bug #14673. (kalowsky, Sander Steffann)
- Added MarkerNote decoding to exif_read_data() for several Cameras. (Marcus)
- Disabled zlib.output_compression for "image/" content-type
headers which can be changed during script execution. (Stefan)
- Added new asynchronous FTP functions. (Stefan)
- Added optional 5th parameter to FTP functions to support resuming. (Stefan)
- Added optional 2nd parameter to print_r() to make it return the variable
representation instead of echoing it. (Derick)
- Added mysql_ping(), mysql_real_escape_string(), mysql_character_set_name(),
mysql_thread_id(), mysql_stat() and mysql_list_processes(). (Zak, Georg)
- Added pg_fetch_all() which fetches all rows in a result. (Yasuo)
- Changed "session.use_trans_sid" to be disabled by default in php.ini. (Yasuo)
- Added safe_mode & open_basedir checks for pg_lo_export(). (Yasuo)
- Added open_basedir check for pg_lo_import(). (Yasuo)
- Fixed infinite recursion crash bug in ticks. (Jason)
- Added php.ini option "mysql.connect_timeout" to set the timeout limit for
mysql_connect() and mysql_pconnect(). (Georg)
- Added optional parameter "flags" to mysql_connect() and mysql_pconnect()
which can be used to set usage of idle timeout and different protocols,
SSL and compressed. (Georg)
- Added automatic rollback to ext/mysql for non committed transactions. (Georg)
- Fixed cases where preg_split() incorrectly terminated final element if it
contained null bytes. (Andrei)
- Added persistent connections/pipelining to thttpd. (Sascha)
- Fixed two potential blocking issues in thttpd. (Sascha)
- Fixed broken header file detection on Solaris. (Sascha)
- Improved nss/socket-related symbol/library detection. (Jani, Sascha)
- Made iconv() work well with both libiconv and libgconv. (Moriyoshi, Yasuo)
- Fixed socket_set_timeout() on win32. (Jason, Edin, Jani)
- Added domxml_node_namespace_uri(). (Rui Lopes)
- Fixed win32 memory leak in /ext/sockets that would occur on any error
condition. Also fixed host resolution error messages on win32. (Jason)
- Added optional 3rd parameter 'recursive' to ftp_rawlist() which will
do 'LIST -R' instead of 'LIST'. (Jani)
- Disabled the fifth parameter in mail() when safe-mode is turned on. (Derick)
- Changed getimagesize() to always set unknown fields to 0 and added support
iff imagetype. (Marcus)
- Added runtime Apache2 thread check to ensure we don't run a non-threaded
PHP inside a threaded Apache2 MPM. (Rasmus)
- Made getimagesize() and exif_read_data() to return also the mime-type and
exif_thumbnail() to return also the image-type. (Marcus)
- Added image_type_to_mime_type() which converts image-types to mime-types.
(Marcus)
- Made GD functions to only exist if they are available in libgd. Now the
availability can be tested with function_exists(). (Derick)
- Added an optional parameter to the header() function which overrides the HTTP
response code. (Derick)
- Changed the order of which modules are unloaded to the reverse order of
which they were loaded. (Derick, Zend Engine)
- Fixed a crash in ereg_replace() when backreference number was greater
than the number of subpatterns. (oliver@billix.franken.de)
- Added preliminary SAX-Input support. It's now possible to build a DomDocument
with SAX-Events. (chregu)
- Bundled GD library 2.0.1 with php (ext/gd/libgd) (Rasmus, Jani, Markus, Edin)
- Fixed bug with Apache which let PHP_AUTH_* variables to be set when
external basic auth mechanism was used. (Jani)
- Fixed bzopen() crash in thread-safe mode. (Andrei)
- Added better error-messages (3rd parameter) and validating of DTDs (2nd
parameter) to domxml_open_mem() and domxml_open_file(). (Christian)
- Added domxml_doc_validate() for validating existing DomDocuments with a DTD.
(Christian)
- Added ability to capture string offsets in preg_match_*() results.
(David Brown, Andrei)
- Fixed set_error_handler() to accept methods as callbacks and also report
invalid callbacks. (Andrei)
- Fixed a memory corruption bug in overload extension. (Andrei)
- Fixed error handling in fsockopen() on win32. (Jason)
- Added win32 support for the timeout parameter of fsockopen(). (Jason)
- Fixed shuffle() to provide equal distribution of values. (Andrei)
- Added --with-mysql-sock configure option which can be used to override
the unix socket location. (e.g. NFS compiles, etc.) (James Cox)
- Fixed is_a() to properly work on extension registered classes. (Andrei)
- Added new constants: PHP_PREFIX and PHP_SHLIB_SUFFIX. (Stig)
- Added STDIN, STDOUT and STDERR constants for CLI sapi reflecting opened
streams to their respective I/O counterparts. (Edin)
- Added pctnl_alarm() function. (Edin)
- Fixed array_rand() on thread-safe platforms such as Windows. (Edin)
- If zlib.output_compression is enabled and a page is compressed
a "Vary: Accept-Encoding" header is now added. (Stefan)
- Renamed getallheaders() to apache_request_headers() and kept getallheaders()
as an alias to it. Also added apache_response_headers() which returns the
current response headers from Apache. (Rasmus)
- Added missing AddRef() calls in the COM extension. This should fix weird
behaviour (in particular with ADODB). (Harald)
- Fixed segfault in version_compare(). (Stig)
- Added compressed Flash MX files support to getimagesize(). (Derick)
- Added ability to capture string offsets in preg_split() results.
(David Brown, Andrei)
- Fixed a crash bug in token_get_all(). (Andrei)
- Implemented glob() for Unix/Win32. (Hartmut, Edin, Markus)
- Added domxml_doc_set_root() to change the root node. (Lukas Schroeder)
- Fixed a crash bug in stripslashes() when working in sybase mode. (Rasmus)
- Added experimental support for Simplified Chinese, Traditional Chinese and
Korean encodings into mbstring. (Rui)
- Misc. Win32 mail() enhancements: support 'From:' header (msisolak@yahoo.com),
support Bcc header, case-insensitive headers, enhanced error reporting,
automatic proper line ending conversion, fixed crash with Cc, fixed buffer
overflows with $header. (Markus)
- Improved IMAP extension performance. (adam.kauffman@mindspring.com,
rjs3@andrew.cmu.edu, Jon)
- Added optional 5th parameter to domxml_xslt_process(). When set, profiling
information is saved to the specified file. (chregu)
- Added MD5 support for crypt() on Windows. (Edin)
- Fixed resource bug in LDAP extension. (Stig Venaas)
- Fixed crash in output buffering when buffer is overwritten in a callback.
(Yasuo)
- Added output_add_rewrite_var() and output_remove_rewrite_var() to inject
and remove variables from the URL-Rewriter. (Thies)
- The Windows build can now be configured more comfortably, for example
when dealing with built-in extensions. (Sebastian)
- Added large OID value (2^31 to 2^32) support for pg_lo_import(),
pg_lo_unlink(), pg_lo_open() and pg_lo_export(). (Yasuo)
- Changed the mbstring extension to be enabled by default. (Yasuo)
- Fixed mixing OCIPlogon() and OCINLogon() to not leak Oracle-Sessions. (Thies)
- Added php.ini options for EXIF extension to encode and decode Unicode/JIS
user comments. (Marcus)
- Changed the "-c" CLI/CGI option to allow both 'filename' and
'path to php.ini'. (Yasuo)
- Added version information to the .dll and .exe files created under Windows.
(jtate)
- Added __FUNCTION__ and __CLASS__ constants. (Jani, Zend Engine)
- Added pg_metadate(), pg_convert(), pg_insert(), pg_select(), pg_update()
and pg_delete(). (Yasuo)
- Added optional 2nd parameter for pg_result_status() to specify return type.
(Yasuo)
- Added "log_errors_max_len" php.ini option which controls maximum length for
error messages. (Marcus)
- Added "ignore_repeated_errors" and "ignore_repeated_source" php.ini options
which can be used to disable logging of repeated error messages. (Marcus)
- Made pg_last_notice() work correctly. (Yasuo)
- Added "pgsql.ignore_notice" and "pgsql.log_notice" php.ini options. (Yasuo)
- Added "zlib.output_compression_level" php.ini option. (Stig)
- Added support for --with-apxs build on Mac OS X / Darwin. (markonen)
- Added support for dynamically loaded extensions on OS X / Darwin.
NOTE: This requires Apache 1.3.25 or later. (kalowsky, markonen)
- Fixed CR/LF processing in quoted_printable_decode() on Win32. (kir)
- Made crack extension available on Win32. Cracklib libraries for Win32 are
available at http://www.jtatesoftware.com/cracklib/. (jtate)
- Added mysql_info() function. (Jan)
- Added mysql_list_processes() and mysql_stat() functions. (Georg)
- Added file_get_contents() which returns the contents of a file as a string.
This function also supports the URL wrappers. (Wez)
- Changed 'zlib:' fopen wrapper to 'compress.zlib://' to avoid ambiguities
when filenames have ':' characters. (Wez)
- Added URL-wrapper support to exif. (Marcus)
- PHP now has a new stream system that allows it to do some clever stuff with
fopen() and fsockopen(). As a result:
. URL wrappers natively supports https:// URLs
. fsockopen() adds support for ssl:// and tls:// connections via TCP/IP
. copy($srcfilename, $destfilename) can now be used with URL wrappers
. zlib wrappers/streams can be used even on systems without fopencookie()
. Added 'compress.bzip2://' stream and wrapper support.
. Added user-space streams - it is now possible to define a class in PHP
code and register it as a URL wrapper.
. Most extensions now support streams when passing files, which means
that those extensions will support URL wrappers. (Wez)
. Added memory stream support. (Marcus)
- Fixed memory allocation problem on systems that have iconv() support in libc.
(Yasuo)
- Made var_dump() handle recursive structures better. (Yasuo, Derick)
- Added exif_imagetype() function. (Marcus)
- New improved build system. Among other improvements, replaces the slow
recursive make with one global Makefile and eases the integration of proper
dependencies. Automake is only needed for its aclocal tool. The build
process is now more portable and less resource-consuming. (Sascha)
13 May 2002, Version 4.2.1
- Added safe-mode checks to show_source(), parse_ini_file() and rmdir(). Also
fixed security problems with safe_mode_include_dir directive. (Rasmus)
- Changed HTTP upload code to accept 0 byte file uploads. (Zeev)
- Major update of domxml. New functions, better DOM compliance and bug fixes:
* Changed the old $node->append_child() to $node->append_sibling() since
the new append_child() behaves correctly (= W3C standard).
* Added domxml functions:
. domxml_elem_get_elements_by_tagname()
. domxml_doc_get_elements_by_tagname()
. domxml_doc_get_element_by_id()
. domxml_elem_remove_attribute()
. domxml_elem_get_attribute_node()
* Fixed a segfault in domxml_unlink().
* Added formatting option to domxml_dump_mem().
(Uwe, jtate, Chregu)
- Fixed a bug in socket_select() that could cause unexpected behavior when
using a statement like $w = $e = array($sock); This change unfortunately
prevents the use of constant values (e.g. NULL) for the socket array
paramaters. Instead, use a temporary variable or an expression with the
leftmost member being a temporary variable. ex.:
socket_select($w, $r, $e = NULL, 10); (Jason)
- Fixed crashes in the session serializer. (Stas)
- Fixed malformed atime/mtime with touch(). (Yasuo)
- Fixed a couple of bugs in array_sum() and array_merge(). (Andrei)
- Fixed SJIS directory name handling under Windows. (Rui)
- Fixed empty mb_output_handler() output when Content-Type is specified.
(Yasuo)
- Fixed the false logic in ext/session which made SID constant not to be
defined when cookies are disabled. (Sascha)
- Fixed possible crash bug in HTTP uploads. (Patch: Lucas Schroeder)
- Fixed possible NULL-pointer dereferencing in the COM extension which
caused 'Error in php_OLECHAR_to_char()' warnings on various places.
Also modified the API to consistently return NULL in case of an error.
(Alan, Harald)
- Fixed a bug in the COM extension that caused outproc servers to 'hang'
because of a missing Release() call. (Alan, Harald)
22 Apr 2002, Version 4.2.0
- ATTENTION!! register_globals defaults to 'off' now !!!
- Note: Apache2 support is EXPERIMENTAL.
- PostgreSQL functions are renamed, but all old function names are available.
Old function names will be available long enough. User can safely use old
function names. (Yasuo)
- Moved ext/mailparse to PECL. See http://thebrainroom.com/opensource/php/
for more information and to download the extension. (Wez/Jim)
- Fixed pg_last_notice() crash. (Yasuo)
- Modified the mysql extension to disable 'LOAD LOCAL' when safe mode is
enabled. (Jason)
- read_exif_data is now an alias for exif_read_data
important to differenciate old/new version for tests)
- new function exif_tagname returns the names of tags
new function exif_thumbnail extracts embedded thumbnail (Marcus)
- Introduced major modifications to the Sockets Extension and its API (Jason):
- Added CLI (command line interface) sapi which is more suitable for writing
shell scripts. Some of the differences to CGI sapi are: no HTTP headers,
plain text error messages, does not change working directory, have a new -r
option which executes a piece of PHP code directly from the commmand line, etc.
"make install" will install CLI SAPI version of php in {PREFIX}/bin/php while
CGI is renamed and installed as {PREFIX}/bin/php-cgi. (Edin)
- Fixed HTTP file upload support to handle big files better. (Jani)
- Major modifications to the Sockets Extension and its API (Jason):
. Fixed numerous bugs.
. Added automatic host lookup capability to all functions that take addr's
. ex. socket_connect($sock, 'www.yahoo.com', 80);
. Added automatic host lookup capability to all functions that take addr's.
example: socket_connect($sock, 'www.yahoo.com', 80);
. Corrected and standardized host lookup errors
. Modified socket_recv() behavior. [$r=socket_recv($sock, $buf, $len, $flags)]
. Added socket_set_block() which changes a socket into blocking IO mode
. Modified socket_last_error() to not clear the last error
. Added socket_clear_error() which clears the last error on a socket
. Removed all code pertaining to fd_sets (socket_fd_*)
. Modfied/Improved socket_select() to take resource arrays instead of fd_sets
ex. <?php $wfds=$rfds=array($sock1, $sock2, $sock3, $sock7);
$r=socket_select($rfds, $wfds, NULL, 1);
print "Ready to read:\n"; var_dump($rfds); ?>
- Returned iconv support to FreeBSD (kalowsky)
- Added CLI (command line intrerface) sapi based on a cut-down version
of the CGI sapi which is more suited for writing shell scripts. Some of
the differences are: it prints no HTTP headers, displays plain text
error messages, does not change working directory, etc. "make install"
will install CLI SAPI version of php in {PREFIX}/bin/php while
CGI is renamed and installed as {PREFIX}/bin/php-cgi. (Edin)
- Clean up posix extension (no more unwanted warning messages, introduce
posix_errno() and posix_strerror() for fetching error messages); changed the
way posix_getgrnam() and posix_getgrgid() return their values (breaks BC but
makes more sense); do not include functions in symbol table which aren't
supported on host system. (Markus)
- Fixed HTTP file upload support to handle big files better. (Jani)
- Added TIFF support for getimagesize(). (Marcus)
- Added TIFF support for read_exif_data(). (Marcus)
. Modified/Improved socket_select() to accept array of resources instead of
fd_sets. example:
<?php
$wfds=$rfds=array($sock1, $sock2, $sock3, $sock7);
$r=socket_select($rfds, $wfds, NULL, 1);
print "Ready to read:\n"; var_dump($rfds);
?>
- Fixed segfault in ibase_close() if user does not free the resultset.
Bugs #15419, #15992. (daniela)
- Added optional 3rd parameter "int encoding_mode" to gzencode() and fixed
parameters to conform documentation. (Stefan)
- Changed read_exif_data() to be an alias of exif_read_data(). (Marcus)
- Added exif_tagname() function which returns the names of tags and
exif_thumbnail() function to extract embedded thumbnails. (Marcus)
- Fixed iconv support with FreeBSD. (kalowsky)
- Cleaned up the posix extension: (Markus)
. Removed unwanted warning messages
. Added posix_errno() and posix_strerror() for fetching error messages
. Changed the way posix_getgrnam() and posix_getgrgid() return their values
(breaks BC but makes more sense)
. Does not include functions in symbol table which aren't supported on host
system.
- Added TIFF support for getimagesize() and read_exif_data(). (Marcus)
- Changed the Velocis extension namespace to Birdstep to reflect new product
name. Added aliases for BC. (James)
- Added safe_mode checks for opendir(). (jflemer)
- Make the 2nd parameter to pgsql_fetch_* support NULL in case 3 parameters
are supplied, but you do not want to provide a row number yourself. (Derick)
- Changed the 2nd parameter in pgsql_fetch_*() functions to support NULL if
all 3 parameters are supplied, but you do not want to provide a row number.
(Derick)
- Improved iconv() when using libc's iconv. (Yasuo)
- Added PHP_SAPI constant which contains the name of running SAPI. (Edin)
- Added ob_get_status() to get array of buffers and it's status. (Yasuo)
- Fixed crash bug with ob_end_*() function. ob_end_*() will not delete
- Added ob_get_status() which returns an array of buffers with their status.
(Yasuo)
- Fixed a crash bug in ob_end_*() functions. ob_end_*() will not delete
buffers that may not be deleted. (Yasuo)
- Added 3rd parameter "bool erase" to ob_start(). If FALSE, the buffer may not
be deleted until script finshes. (Yasuo)
- Changed ob_*() function that have void return type to bool. All ob_*()
functions return TRUE for success, FALSE for failure. (Yasuo)
be deleted until script finishes. (Yasuo)
- Changed ob_*() functions to return TRUE for success, FALSE for failure.
(Yasuo)
- Added sybase_ct support to dbx module. (Marc)
- Fixed error message handling with PostgreSQL 7.2. (Rui)
- Added object aggregation capability, see aggregation_*() functions. (Andrei)
- Added debug_zval_dump(), which works similar to var_dump, yet displays extra
internal information such as refcounts and true type names. (Jason)
- Added debug_zval_dump() which works similarly to var_dump, but displays
extra internal information such as refcounts and true type names. (Jason)
- Added Andrei's tokenizer extension. (Stig)
- Fixed a bug in the COM extension which caused php to crash in
php_COM_get_ids_of_names(). (Paul, Harald)
- Removed ext/satellite. It is now part of PEAR. (eriksson)
- Changed php.ini directive 'safe_mode_include_dir' to accept a (semi)colon
separated path (like 'include_path') rather than a single directory.
separated path (like 'include_path') rather than a single directory.
(jflemer)
- Added is_a() function that can be used to test whether object is of a certain
class or is derived from it. (Andrei, Zend Engine)
- Added optional parameter to highlight_string() and highlight_file() which
makes these functions return a highlighted string instead of dumping
to standard output. (Derick)
makes these functions to return a highlighted string instead of dumping
it to standard output. (Derick)
- Added EXTR_IF_EXISTS and EXTR_PREFIX_IF_EXISTS flags to extract(). (Rasmus)
- Fixed pg_pconnect(). It catches broken connection and reconnects to
PostgreSQL server always. When PostgreSQL is rebooted, web server reboot is
not needed to avoid errors. (Yasuo)
- Fix --enable-safe-mode. This configure option was not working. (Yasuo)
- Fixed a segfault in pg_pconnect(). If PostgreSQL server is restarted, broken
connection is detected and reconnected. (Yasuo)
- Fixed --enable-safe-mode configure option. (Yasuo)
- Added function domxml_dump_node($doc,$node). Dumps a node plus all children
into a string. (chregu)
- Added function domxml_node_get_content(). (chregu)
- Added function domxml_dump_file($filename,[$compression]). Dumps XML to
a file and uses compression, if specified. (chregu)
- Added exslt integration (see http://exslt.org for details). To be configured
with --with-dom-exslt[=DIR] (and --with-dom-xslt). (chregu,jaroslaw)
- Don't touch any globals in session_unset() if register_globals is set
to off. (Thies)
- Added exslt integration to domxml extension (http://exslt.org for details).
Configure with --with-dom-exslt[=DIR] (and --with-dom-xslt).
(chregu,jaroslaw)
- Fixed session_unset() to not touch any globals if register_globals is off.
(Thies)
- Added 3 new optional parameters to OCIFetchStatement(). They control
the number of rows to skip at the beginning of the cursor, the
maximun numer of rows that should be fetched and the format of the
returned array. (Thies)
- Updated the XSLT extension to support Sablotron 0.8. (Petr Cimprich)
- Fixed a bug in preg_match()/preg_match_all() when matching strings containing
null bytes. (Andrei)
- Fixed a bug in preg_match() and preg_match_all() when matching strings
contain null bytes. (Andrei)
- Added xpath_register_ns() function. This makes it possible to issue XPath
queries with namespaces like for example: "//namespace:sampletag".
(Chris Jarecki)
- Added multi-byte enabled regular expression functions. (Rui)
- Added second parameter to count() that can be used to specify either normal
or recursive counting. (patch by Vlad Bosinceanu <glipy@fx.ro>)
- Added optional second parameter to count() which can be used to specify
either normal or recursive counting. (patch by Vlad Bosinceanu <glipy@fx.ro>)
- Added mb_get_info() to get internal settings of mbstring. (Rui)
- Added async query functions to PostgreSQL module. (Yasuo)
- Added pg_copy_to()/pg_copy_from() for PostgreSQL module. (Youichi, Yasuo)
- Added IPv6 support in FTP extension. (Stig Venaas)
- Added IPv6 support for FTP extension. (Stig Venaas)
- Improved the speed of wordwrap() significantly. (Jim)
- Fixed pow()'s incorrect behaviour when dealing with powers of 0. (Jim)
- Added is_finite(), is_infinite(), and is_nan(). (Jim)
- Added is_finite(), is_infinite() and is_nan(). (Jim)
- Fixed segfault in wordwrap() when wrapping to zero width and using
multi-character break or trying to force cut (bug #12768). (Jim)
- Fixed several bugs in dbase extension (dbase_pack() truncate file to right
@@ -134,24 +358,24 @@ PHP 4 NEWS
- Fixed problem with dbase not returning very large (larger than long)
integers properly. (Vlad)
- Added concepts to IRCG: bailout-on-trivial issue, write output to
files, fetch a ressource upon connection end. (Sascha)
files, fetch a resource upon connection end. (Sascha)
- Fixed POST-related bugs in thttpd, added QUERY_STRING, HTTP_HOST,
HTTP_ACCEPT_LANGUAGE to the script environment, improved patch
to send correct MIME types, and added support for /nocache/. (Sascha)
- Fixed several bugs and memleaks in the domxml extension. (Markus)
- Added var_export() which outputs a representation of a variable as reusable
PHP code. (Derick)
- Added -w option to the cgi-version which strips all comments and whitespace
- Added -w option to the CGI-version to strip all comments and whitespace
from the script. (Thies)
- Added support for SO_RCVTIMEO and SO_SNDTIMEO to ext/sockets. (Jason)
- Added ob_get_level() which returns the nesting level of the output buffering
mechanism. (Yasuo, Derick)
- Added ob_flush() and ob_clean() functions which flush and clean an output
buffer without destroying the buffer. (Derick)
- Added a parameter to mysql_connect() to force a new database link to be
created. (Markus, Derick)
- Added new optional parameter to mysql_connect() which forces a new database
link to be created. (Markus, Derick)
- Added ldap_sort() function. (Stig Venaas)
- Added md5_file(), which calculaties the MD5 sum of a file.
- Added md5_file() function which calculates the MD5 sum of a file.
Patch by Alessandro Astarita <aleast@capri.it> (Derick)
- Added support for parsing recordsets contained in WDDX packets. (Andrei)
- Renamed key_exists() to array_key_exists(). (Derick)
@@ -162,17 +386,17 @@ PHP 4 NEWS
- Removed warning message about NONEXISTENT character set from mysql_connect()
when the server's default character set != latin1. (Mysql Team)
- Added Direct I/O extension for lowlevel access to the POSIX layer. (Sterling)
- New SAPI module for the WebJames server on RISC OS. (Alex Waugh)
- Made ldap_add (and modify) functions to throw a warning with illegal value
arrays. Previously segfaulted or added wrong value. (Stig Venaas)
- Added Udm_Check_Charset() function into mnoGoSearch extension. (gluke)
- Added SAPI module for the WebJames server on RISC OS. (Alex Waugh)
- Fixed ldap_add() and ldap_modify() functions to throw a warning with illegal
value arrays. Previously segfaulted or added wrong value. (Stig Venaas)
- Added udm_check_charset() function into mnoGoSearch extension. (gluke)
- Fixed mnoGoSearch extension to support mnogosearch-3.2.x. (gluke)
- Made fbsql_num_rows() to return the correct value on all select statements.
(Frank)
- Added array_chunk() function that splits an array into chunks of specified
- Added array_chunk() function which splits an array into chunks of specified
size. (Andrei)
- Fixed a bug which caused $HTTP_RAW_POST_DATA not to be populated on a missing
content-type even when always_populate_raw_post_data was On - fixed. (Rasmus)
- Fixed $HTTP_RAW_POST_DATA to be populated on a missing content-type when
always_populate_raw_post_data is on. (Rasmus)
- Added session_cache_expire() function. (patch by anuradha@gnu.org) (Andrei)
- Added array_fill() function. (Rasmus)
- Made Authorization header to be hidden from phpinfo() output in safe_mode.
@@ -186,8 +410,8 @@ PHP 4 NEWS
mt_srand() has not been called. (Sterling)
- Changed the seed options to srand() and mt_srand() to be optional. If the
seed is not specified the most random seed possible is generated. (Sterling)
- Added array_change_key_case() function that returns array with
with all string keys lowercased or uppercased. (Edin)
- Added array_change_key_case() function which returns an array with all
string keys lowercased or uppercased. (Edin)
- Added parameter to ircg_pconnect to suppress treating non-fatal errors
as fatal, and added conversion of Windows quotes to &quot;. (Sascha)
- Added pcntl_exec() function which behaves similar to the system execve.
@@ -198,7 +422,7 @@ PHP 4 NEWS
- Added mcrypt_generic_deinit() to replace mcrypt_generic_end(). (Derick)
- Added apache_setenv() function for injecting variables into Apache's
subprocess_env table. (Rasmus)
- Added support for 'int', 'bool', 'float' and 'null' for settype(). (Jeroen)
- Added support for 'int', 'bool', 'float' and 'null' in settype(). (Jeroen)
- Added IPv6 support to gethostbyaddr().
(Patch by Matthias Wimmer <matthias@charente.de> and venaas)
- Fixed LONG_VARCHAR type crashing in ODBC extension. Patch by Walter Franzini.
@@ -207,21 +431,21 @@ PHP 4 NEWS
in itself. (Andrei)
- Added ini_get_all() function which returns all registered ini entries
or entries for the specified extension. (Jani)
- Added mailparse_uudecode_all() which extracts all uuencoded attachments.
- Added mailparse_uudecode_all() which extracts all uuencoded attachments.
(Wez)
- Added support for chinese encodings to htmlentities() and htmlspecialchars().
- Added support for chinese encodings in htmlentities() and htmlspecialchars().
(Patch by Alan Knowles <alan_k@hklc.com> and Wez)
- Improved support for autoconf-2.50+/libtool 1.4b+. (Jan Kneschke, Sascha)
27 Feb 2002, Version 4.1.2
- Fixed start up failure when mm save handler is used and there are multiple
SAPIs working at the same time. (Yasuo)
- Fixed the Roxen SAPI (Yasuo)
- Fixed a buffer overflow in the RFC-1867 file upload code (Stefan)
- Fixed a crash in the session module (Yasuo)
- Fixed a crash in the pspell module (Yasuo)
- Fixed the Roxen SAPI. (Yasuo)
- Fixed a buffer overflow in the RFC-1867 file upload code. (Stefan)
- Fixed a crash bug in the session module. (Yasuo)
- Fixed a crash bug in the pspell module. (Yasuo)
- Changed the default output encoding of mbstring 'pass' to fix
initialization problem (Rui)
initialization problem. (Rui)
26 Dec 2001, Version 4.1.1
- Fixed incompatibility with Windows .NET / IIS 6 - may improve stability
@@ -244,6 +468,7 @@ PHP 4 NEWS
GMT +0100 and GMT -0100. (Derick)
10 Dec 2001, Version 4.1.0
- Fixed return values for strtok (Bug #13866) (jmoore)
- Worked around a bug in the MySQL client library that could cause PHP to hang
when using unbuffered queries. (Zeev)
- Fixed a bug which caused set_time_limit() to affect all subsequent requests
@@ -278,7 +503,7 @@ PHP 4 NEWS
- Fixed a crash in dbase_replace_record. (Patch by robin.marlow@dps-int.com)
- Fixed a crash in msql_result(). (Zeev)
- Added support for single dimensional SafeArrays and Enumerations.
Added an is_enum() function to check if a component implements an
Added com_isenum() function to check if a component implements an
enumeration. (Alan, Harald)
- Fixed a bug in dbase_get_record() and dbase_get_record_with_names().
boolean fields are now returned correctly.
@@ -308,9 +533,9 @@ PHP 4 NEWS
there's no need to import them using the 'global' statement. (Andi & Zeev)
- Added vprintf() and vsprintf() functions that allow passing all arguments
after format as an array. (Andrei)
- Added support for GD2 image type for ImageCreateFromString() (Jani)
- Added support for GD2 image type for ImageCreateFromString(). (Jani)
- Added ImageCreateFromGD(), ImageCreateFromGD2(), ImageCreateFromGD2part(),
ImageGD() and ImageGD2() functions (Jani)
ImageGD() and ImageGD2() functions. (Jani)
- addcslashes now warns when charlist is invalid. The returned string
remained the same (Jeroen)
- Added optional extra argument to gmp_init(). The extra argument
@@ -318,7 +543,7 @@ PHP 4 NEWS
string to the gmp-number. (Troels)
- Added the Cyrus-IMAP extension, which allows a direct interface to Cyrus'
more advanced capabilities. (Sterling)
- Enhance read_exif_data() to support multiple comment tags (Rasmus)
- Enhanced read_exif_data() to support multiple comment tags. (Rasmus)
- Fixed a crash bug in array_map() when NULL callback was passed in. (Andrei)
- Change from E_ERROR to E_WARNING in the exif extension (Rasmus)
- New pow() implementation, which returns an integer when possible,
+3 -2
View File
@@ -1,6 +1,7 @@
This is the first file you should be reading after you get your CVS account.
We'll assume you're basically familiar with CVS, but feel free to post
your questions on the mailing list.
your questions on the mailing list. Please have a look at
http://cvsbook.red-bean.com/ for more detailed information on CVS.
PHP is developed through the efforts of a large number of people.
Collaboration is a Good Thing(tm), and CVS lets us do this. Thus, following
@@ -83,7 +84,7 @@ For datetime.c:
For string.c:
(php_trim) Fixed a memory leak resulting from improper use of zval_dtor().
# Man, that thing was leaking all over the place!
@- Memory leak in trim() function has finally been fixed. (Bob)
@- Fixed memory leak in trim(). (Bob)
The lines above marked with @ will go into NEWS file automagically, and the
# lines will be omitted from the ChangeLog. Alternatively, you might want
+10 -5
View File
@@ -13,11 +13,16 @@ HOW TO USE IT
./ext_skel --extname=module_name
and everything you need is placed in directory module_name. In fact, if you
don't need to test the existence of any external header files, libraries or
functions in them, the module is already almost ready to be compiled in PHP.
Just remove 3 comments in your_module_name/config.m4, cd back up to PHP
sources top directory, and do
and everything you need is placed in directory module_name.
[ Note that GNU awk is likely required for this script to work. Debian
systems seem to default to using mawk, so you may need to change the
#! line in skeleton/create_stubs to use gawk explicitly. ]
If you don't need to test the existence of any external header files,
libraries or functions in them, the module is already almost ready to be
compiled in PHP. Just remove 3 comments in your_module_name/config.m4,
cd back up to PHP sources top directory, and do
./buildconf; ./configure --enable-module_name; make
+10 -1
View File
@@ -105,11 +105,20 @@ if (zend_parse_parameters(3 TSRMLS_CC, "zbr!",
/* Get either a set of 3 longs or a string. */
long l1, l2, l3;
char *s;
/*
* The function expects a pointer to a integer in this case, not a long
* or any other type. If you specify a type which is larger
* than a 'int', the upper bits might not be initialized
* properly, leading to random crashes on platforms like
* Tru64 or Linux/Alpha.
*/
int length;
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC,
"lll", &l1, &l2, &l3) == SUCCESS) {
/* manipulate longs */
} else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC,
"s", &s) == SUCCESS) {
"s", &s, &length) == SUCCESS) {
/* manipulate string */
} else {
/* output error */
+181 -57
View File
@@ -4,9 +4,6 @@ $Id$
Please send comments to: Wez Furlong <wez@thebrainroom.com>
Note: this doc is preliminary and is intended to give the reader an idea of
how streams work and should be used.
Why Streams?
============
You may have noticed a shed-load of issock parameters flying around the PHP
@@ -26,7 +23,7 @@ The main functions are:
PHPAPI size_t php_stream_read(php_stream * stream, char * buf, size_t count);
PHPAPI size_t php_stream_write(php_stream * stream, const char * buf, size_t
count);
count);
PHPAPI int php_stream_eof(php_stream * stream);
PHPAPI int php_stream_getc(php_stream * stream);
PHPAPI char *php_stream_gets(php_stream * stream, char *buf, size_t maxlen);
@@ -40,16 +37,119 @@ names: fread, fwrite, feof, fgetc, fgets, fclose, fflush, fseek, ftell.
Opening Streams
===============
Ultimately, I aim to implement an fopen_wrapper-like call to do this with
minimum fuss.
Currently, mostly for testing purposes, you can use php_stream_fopen to open a
stream on a regular file.
In most cases, you should use this API:
PHPAPI php_stream * php_stream_fopen(const char * filename, const char *
mode);
PHPAPI php_stream *php_stream_open_wrapper(char *path, char *mode,
int options, char **opened_path TSRMLS_DC);
This call behaves just like fopen(), except it returns a stream instead of a
FILE *
Where:
path is the file or resource to open.
mode is the stdio compatible mode eg: "wb", "rb" etc.
options is a combination of the following values:
IGNORE_PATH (default) - don't use include path to search for the file
USE_PATH - use include path to search for the file
IGNORE_URL - do not use plugin wrappers
REPORT_ERRORS - show errors in a standard format if something
goes wrong.
STREAM_MUST_SEEK - If you really need to be able to seek the stream
and don't need to be able to write to the original
file/URL, use this option to arrange for the stream
to be copied (if needed) into a stream that can
be seek()ed.
opened_path is used to return the path of the actual file opened,
but if you used STREAM_MUST_SEEK, may not be valid. You are
responsible for efree()ing opened_path. opened_path may be (and usually
is) NULL.
If you need to open a specific stream, or convert standard resources into
streams there are a range of functions to do this defined in php_streams.h.
A brief list of the most commonly used functions:
PHPAPI php_stream *php_stream_fopen_from_file(FILE *file, const char *mode);
Convert a FILE * into a stream.
PHPAPI php_stream *php_stream_fopen_tmpfile(void);
Open a FILE * with tmpfile() and convert into a stream.
PHPAPI php_stream *php_stream_fopen_temporary_file(const char *dir,
const char *pfx, char **opened_path TSRMLS_DC);
Generate a temporary file name and open it.
There are some network enabled relatives in php_network.h:
PHPAPI php_stream *php_stream_sock_open_from_socket(int socket, int persistent);
Convert a socket into a stream.
PHPAPI php_stream *php_stream_sock_open_host(const char *host, unsigned short port,
int socktype, int timeout, int persistent);
Open a connection to a host and return a stream.
PHPAPI php_stream *php_stream_sock_open_unix(const char *path, int persistent,
struct timeval *timeout);
Open a UNIX domain socket.
Stream Utilities
================
If you need to copy some data from one stream to another, you will be please
to know that the streams API provides a standard way to do this:
PHPAPI size_t php_stream_copy_to_stream(php_stream *src,
php_stream *dest, size_t maxlen);
If you want to copy all remaining data from the src stream, pass
PHP_STREAM_COPY_ALL as the maxlen parameter, otherwise maxlen indicates the
number of bytes to copy.
This function will try to use mmap where available to make the copying more
efficient.
If you want to read the contents of a stream into an allocated memory buffer,
you should use:
PHPAPI size_t php_stream_copy_to_mem(php_stream *src, char **buf,
size_t maxlen, int persistent);
This function will set buf to the address of the buffer that it allocated,
which will be maxlen bytes in length, or will be the entire length of the
data remaining on the stream if you set maxlen to PHP_STREAM_COPY_ALL.
The buffer is allocated using pemalloc(); you need to call pefree() to
release the memory when you are done.
As with copy_to_stream, this function will try use mmap where it can.
If you have an existing stream and need to be able to seek() it, you
can use this function to copy the contents into a new stream that can
be seek()ed:
PHPAPI int php_stream_make_seekable(php_stream *origstream, php_stream **newstream);
It returns one of the following values:
#define PHP_STREAM_UNCHANGED 0 /* orig stream was seekable anyway */
#define PHP_STREAM_RELEASED 1 /* newstream should be used; origstream is no longer valid */
#define PHP_STREAM_FAILED 2 /* an error occurred while attempting conversion */
#define PHP_STREAM_CRITICAL 3 /* an error occurred; origstream is in an unknown state; you should close origstream */
make_seekable will always set newstream to be the stream that is valid
if the function succeeds.
When you have finished, remember to close the stream.
NOTE: If you only need to seek forwards, there is no need to call this
function, as the php_stream_seek can emulate forward seeking when the
whence parameter is SEEK_CUR.
NOTE: Writing to the stream may not affect the original source, so it
only makes sense to use this for read-only use.
NOTE: If the origstream is network based, this function will block
until the whole contents have been downloaded.
NOTE: Never call this function with an origstream that is referenced
as a resource! It will close the origstream on success, and this
can lead to a crash when the resource is later used/released.
NOTE: If you are opening a stream and need it to be seekable, use the
STREAM_MUST_SEEK option to php_stream_open_wrapper();
Casting Streams
===============
@@ -59,14 +159,14 @@ You need to "cast" the stream into a FILE*, and this is how you do it:
FILE * fp;
php_stream * stream; /* already opened */
if (php_stream_cast(stream, PHP_STREAM_AS_STDIO, &fp, 1) == FAILURE) {
RETURN_FALSE;
if (php_stream_cast(stream, PHP_STREAM_AS_STDIO, (void*)&fp, REPORT_ERRORS) == FAILURE) {
RETURN_FALSE;
}
The prototype is:
PHPAPI int php_stream_cast(php_stream * stream, int castas, void ** ret, int
show_err);
show_err);
The show_err parameter, if non-zero, will cause the function to display an
appropriate error message of type E_WARNING if the cast fails.
@@ -83,8 +183,14 @@ if you mix ANSI stdio calls on the FILE* with php stream calls on the stream.
If your system has the fopencookie function, php streams can synthesize a
FILE* on top of any stream, which is useful for SSL sockets, memory based
streams, data base streams etc. etc.
NOTE: There might be situations where this is not desireable, and we need to
provide a flag to inform the casting routine of this.
In situations where this is not desireable, you should query the stream
to see if it naturally supports FILE *. You can use this code snippet
for this purpose:
if (php_stream_is(stream, PHP_STREAM_IS_STDIO)) {
/* can safely cast to FILE* with no adverse side effects */
}
You can use:
@@ -93,10 +199,15 @@ PHPAPI int php_stream_can_cast(php_stream * stream, int castas)
to find out if a stream can be cast, without actually performing the cast, so
to check if a stream is a socket you might use:
if (php_stream_can_cast(stream, PHP_STREAM_AS_SOCKETD) == SUCCESS) {
/* it's a socket */
if (php_stream_can_cast(stream, PHP_STREAM_AS_SOCKETD) == SUCCESS) {
/* it can be a socket */
}
Please note the difference between php_stream_is and php_stream_can_cast;
stream_is tells you if the stream is a particular type of stream, whereas
can_cast tells you if the stream can be forced into the form you request.
The former doesn't change anything, while the later *might* change some
state in the stream.
Stream Internals
================
@@ -109,10 +220,10 @@ underlying implementation.
The php_streams ops struct consists of pointers to methods that implement
read, write, close, flush, seek, gets and cast operations. Of these, an
implementation need only implement write, read, close and flush. The gets
method is intended to be used for non-buffered streams if there is an
underlying method that can efficiently behave as fgets. The ops struct also
contains a label for the implementation that will be used when printing error
messages - the stdio implementation has a label of "STDIO" for example.
method is intended to be used for streams if there is an underlying method
that can efficiently behave as fgets. The ops struct also contains a label
for the implementation that will be used when printing error messages - the
stdio implementation has a label of "STDIO" for example.
The idea is that a stream implementation defines a php_stream_ops struct, and
associates it with a php_stream using php_stream_alloc.
@@ -121,17 +232,17 @@ As an example, the php_stream_fopen() function looks like this:
PHPAPI php_stream * php_stream_fopen(const char * filename, const char * mode)
{
FILE * fp = fopen(filename, mode);
php_stream * ret;
if (fp) {
ret = php_stream_alloc(&php_stream_stdio_ops, fp, 0, 0, mode);
if (ret)
return ret;
FILE * fp = fopen(filename, mode);
php_stream * ret;
if (fp) {
ret = php_stream_alloc(&php_stream_stdio_ops, fp, 0, 0, mode);
if (ret)
return ret;
fclose(fp);
}
return NULL;
fclose(fp);
}
return NULL;
}
php_stream_stdio_ops is a php_stream_ops structure that can be used to handle
@@ -143,7 +254,7 @@ to be passed back to fopen_wrapper (or it's yet to be implemented successor).
The prototype for php_stream_alloc is this:
PHPAPI php_stream * php_stream_alloc(php_stream_ops * ops, void * abstract,
size_t bufsize, int persistent, const char * mode)
size_t bufsize, int persistent, const char * mode)
ops is a pointer to the implementation,
abstract holds implementation specific data that is relevant to this instance
@@ -164,6 +275,19 @@ into a FILE*, so it should be compatible with the mode parameter of fopen().
Writing your own stream implementation
======================================
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
RULE #1: when writing your own streams: make sure you have configured PHP with
--enable-debug.
I've taken some great pains to hook into the zend memory manager to help track
down allocation problems. It will also help you spot incorrect use of the
STREAMS_DC, STREAMS_CC and the semi-private STREAMS_REL_CC macros for function
definitions.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
RULE #2: Please use the stdio stream as a reference; it will help you
understand the semantics of the stream operations, and it will always
be more up to date than these docs :-)
First, you need to figure out what data you need to associate with the
php_stream. For example, you might need a pointer to some memory for memory
based streams, or if you were making a stream to read data from an RDBMS like
@@ -176,9 +300,9 @@ appropriately), and use the abstract pointer to refer to it.
For structured state you might have this:
struct my_state {
MYSQL conn;
MYSQL_RES * result;
struct my_state {
MYSQL conn;
MYSQL_RES * result;
};
struct my_state * state = pemalloc(sizeof(struct my_state), persistent);
@@ -201,32 +325,32 @@ For example, for reading from this wierd mysql stream:
static size_t php_mysqlop_read(php_stream * stream, char * buf, size_t count)
{
struct my_state * state = (struct my_state*)stream->abstract;
struct my_state * state = (struct my_state*)stream->abstract;
if (buf == NULL && count == 0) {
/* in this special case, php_streams is asking if we have reached the
* end of file */
if (... at end of file ...)
return EOF;
else
return 0;
}
/* pull out some data from the stream and put it in buf */
... mysql_fetch_row(state->result) ...
/* we could do something strange, like format the data as XML here,
and place that in the buf, but that brings in some complexities,
such as coping with a buffer size too small to hold the data,
so I won't even go in to how to do that here */
if (buf == NULL && count == 0) {
/* in this special case, php_streams is asking if we have reached the
* end of file */
if (... at end of file ...)
return EOF;
else
return 0;
}
/* pull out some data from the stream and put it in buf */
... mysql_fetch_row(state->result) ...
/* we could do something strange, like format the data as XML here,
and place that in the buf, but that brings in some complexities,
such as coping with a buffer size too small to hold the data,
so I won't even go in to how to do that here */
}
Implement the other operations - remember that write, read, close and flush
are all mandatory. The rest are optional. Declare your stream ops struct:
php_stream_ops my_ops = {
php_mysqlop_write, php_mysqlop_read, php_mysqlop_close,
php_mysqlop_flush, NULL, NULL, NULL,
"Strange mySQL example"
php_mysqlop_write, php_mysqlop_read, php_mysqlop_close,
php_mysqlop_flush, NULL, NULL, NULL,
"Strange mySQL example"
}
Thats it!
@@ -240,4 +364,4 @@ connection and then use pefree to dispose of the struct you allocated.
You may read the stream->persistent field to determine if your struct was
allocated in persistent mode or not.
vim:tw=78
vim:tw=78:et
+121
View File
@@ -0,0 +1,121 @@
Submitting Patch for PHP
========================
This document describes how to submit a patch for PHP. Since you are
reading this document, you are willing to submit a patch for PHP.
Please keep reading! Submitting a patch for PHP is easy. The hard
part is making it acceptable for inclusion into our repository. :-)
How to create patch?
--------------------
We are working with CVS. You need to get CVS source to create a patch
that we accept. Visit http://www.php.net/anoncvs.php to get CVS
source. You can check out older versions, but make sure you get
the default branch (i.e. Do not use -r option when you check out the
CVS source)
Read CODING_STANDARDS file before you start working.
Now you are ready to create a patch. Modify source to fix a bug in PHP or
add a new feature to PHP. After you finished editing, please test your
patch. Read README.TESTING for testing.
After you finish testing your patch, take diff file using
"cvs diff > your.patch" command.
Read README.TESTING for submitting a test script for your patch. This is
not strictly required, but it is preferred to submit a test script along
with your patch. Making new test script is very easy. It also helps us
to understand what you have been fixed or added to PHP.
Tips for creating patch
-----------------------
If you would like to fix multiple bugs. It is easier for us if you
could create 1 patch for 1 bug, but this is not strictly required.
Note though that you might get little response, if your patch is
too hard to review.
If you would like change/add many lines, it is better to ask module
maintainer and/or php-dev@lists.php.net, or pear-dev@lists.php.net if
you are patching PEAR. Official module maintainers can be found in
EXTENSIONS file in PHP source.
If you are new to CVS (Concurrent Versions System), visit
http://cvshome.org/ for details.
Recommended CVS client settings for creating patch file
------------------------------------------------------
Recommended ~/.cvsrc file setting is:
------
cvs -z3
update -d -P
checkout -P
diff -u
------
diff -u means:
-u Use the unified output format.
With this CVS setting, you don't have to worry about adding/deleting
newlines and spaces.
Check list for submitting patch
-------------------------------
- Did you run "make test" to check if your patch didn't break
other features?
- Did you compile PHP with --enable-debug and check php/webserver
error logs when you test your patch?
- Did you build PHP for multi-threaded web servers. (Optional)
- Did you create test script for "make test"? (Recommended)
- Did you check your patch is unified format and it does not
contain white space changes? (If you are not using recommended
cvs setting)
- Did you update CVS source before you take final patch?
- Did you read the patch again?
Where to send your patch?
-------------------------
If you are patching C source, send the patch to php-dev@lists.php.net.
If you are patching a module, you should also send the patch to the
maintainer. Official module maintainers are listed in EXTENSION file
in source.
If you are patching PEAR, send the patch to pear-dev@lists.php.net.
Please add the prefix "[PATCH]" to your email subject and make sure
to include the patch as a MIME attachment even if it is short.
Test scripts should be included in the same email.
Explain what has been fixed/added/changed by your patch.
Finally, add the bug Id(s) which can be closed by your patch, if any.
What happens after you submit your patch
--------------------------------------
If your patch is easy to review and has obviously no side-effects,
it might take up to a few hours until someone commits it.
Because this is a volunteer-driven effort, more complex patches will
require more patience on your side.
If you did not receive any feedback in a few days, please consider
resubmitting the description of your patch, along-side with
these questions:
- Is my patch too hard to review? Because of which factors?
- Should I split it up in multiple parts?
- Are there any unwanted whitespace changes?
What happens when your patch is applied?
----------------------------------------
Your name will be included together with your email address in the CVS
commit log. If your patch affects end-users, a brief description
and your name might be added to the NEWS file.
Thank you for submitting patch for PHP!
+4 -4
View File
@@ -17,7 +17,7 @@ make test
under source root. Therefore you can execute the script
as follows
./sapi/cli/php -c php.ini-dist run-tests.php [ext/some_extension_name]
./sapi/cli/php -c /path/to/php.ini/ run-tests.php [ext/some_extension_name]
@@ -42,7 +42,7 @@ you would like to test with other configuration file, user
"run-tests.php" script.
Example:
./sapi/cli/php -c ./your_php.ini ext/standard
./sapi/cli/php -c /path/to/php.ini/ ext/standard
If you use php.ini other than php.ini-dist, you may see more failed
tests.
@@ -58,7 +58,7 @@ executes it.
Tester can easily executes tests selectively with as follows.
Example:
./sapi/cli/php -c php.ini-dist run-tests.php ext/mbstring
./sapi/cli/php -c /path/to/php.ini/ run-tests.php ext/mbstring
[Test results]
@@ -146,7 +146,7 @@ However, it is recommended to use other files for ease of writing
test script. For instance, you can execute test script under
ext/iconv as follows:
./sapi/cli/php -c /etc/php.ini-dist ext/iconv
./sapi/cli/php -c /path/to/php.ini/ ext/iconv
[How to help us]
+123
View File
@@ -0,0 +1,123 @@
PHP Build System V5 Overview
- supports Makefile.ins during transition phase
- not-really-portable Makefile includes have been eliminated
- supports seperate build directories without VPATH by using
explicit rules only
- does not waste disk-space/CPU-time for building temporary libraries
=> especially noticeable on slower systems
- slow recursive make replaced with one global Makefile
- eases integration of proper dependencies
- adds PHP_DEFINE(what[, value]) which creates a single include-file
per what. This will allow more fine-grained dependencies.
- abandoning the "one library per directory" concept
- improved integration of the CLI
- several new targets
build-modules: builds and copies dynamic modules into modules/
install-cli: installs the CLI only, so that the install-sapi
target does only what its name says
- finally abandoned automake (still requires aclocal at this time)
- changed some configure-time constructs to run at buildconf-time
- upgraded shtool to 1.5.4
- removed $(moduledir) (use EXTENSION_DIR)
The Reason For a New System
It became more and more apparent that there is a severe need
for addressing the portability concerns and improving the chance
that your build is correct (how often have you been told to
"make clean"? When this is done, you won't need to anymore).
If You Build PHP on a Unix System
You, as a user of PHP, will notice no changes. Of course, the build
system will be faster, look better and work smarter.
If You Are Developing PHP
Extension developers:
Makefile.ins are abandoned. The files which are to be compiled
are specified in the config.m4 now using the following macro:
PHP_NEW_EXTENSION(foo, foo.c bar.c baz.cpp, $ext_shared)
E.g. this enables the extension foo which consists of three source-code
modules, two in C and one in C++. And dependending on the user's
wishes, the extension will even be built as a dynamic module.
The full syntax:
PHP_NEW_EXTENSION(extname, sources [, shared [,sapi_class[, extra-cflags]]])
Please have a look at acinclude.m4 for the gory details and meanings
of the other parameters.
And that's basically it for the extension side.
If you previously built sub-libraries for this module, add
the source-code files here as well. If you need to specify
separate include directories, do it this way:
PHP_NEW_EXTENSION(foo, foo.c mylib/bar.c mylib/gregor.c,,,-I@ext_srcdir@/lib)
E.g. this builds the three files which are located relative to the
extension source directory and compiles all three files with the
special include directive (@ext_srcdir@ is automatically replaced).
Now, you need to tell the build system that you want to build files
in a directory called $ext_builddir/lib:
PHP_ADD_BUILD_DIR($ext_builddir/lib)
Make sure to call this after PHP_NEW_EXTENSION, because $ext_builddir
is only set by the latter.
If you have a complex extension, you might to need add special
Make rules. You can do this by calling PHP_ADD_MAKEFILE_FRAGMENT
in your config.m4 after PHP_NEW_EXTENSION.
This will read a file in the source-dir of your extension called
Makefile.frag. In this file, $(builddir) and $(srcdir) will be
replaced by the values which are correct for your extension
and which are again determined by the PHP_NEW_EXTENSION macro.
Make sure to prefix *all* relative paths correctly with either
$(builddir) or $(srcdir). Because the build system does not
change the working directory anymore, we must use either
absolute paths or relative ones to the top build-directory.
Correct prefixing ensures that.
SAPI developers:
Instead of using PHP_SAPI=foo/PHP_BUILD_XYZ, you will need to type
PHP_SELECT_SAPI(name, type, sources.c)
I.e. specify the source-code files as above and also pass the
information regarding how PHP is supposed to be built (shared
module, program, etc).
For example for APXS:
PHP_SELECT_SAPI(apache, shared, sapi_apache.c mod_php4.c php_apache.c)
General info
The foundation for the new system is the flexible handling of
sources and their contexts. With the help of macros you
can define special flags for each source-file, where it is
located, in which target context it can work, etc.
Have a look at the well documented macros
PHP_ADD_SOURCES(_X) in acinclude.m4.
-186
View File
@@ -1,186 +0,0 @@
Advisory on the PHP Release Cycle
Copyright & Liciencing
This Document is (c) Copyright 2000,2001 by The PHP Group
This Document is distributed under the terms of the GNU General
Public License as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later
version.
Table of Contents
1. Introduction
2. Dealing with bugs
2.1 As a QA Team Member
2.2 As a Developer
3. Releaseing another RC
4. CVS During the Release Process
4.1 Useful CVS Commands
5 The Final Release
6 Summary
1. Introduction
This cycle should take place over roughly 10 days. When it is
decided it is time for an Release to occur Andi/Zeev (Or
Whoever) will tarball RC1, Tag & Branch CVS (see section 4)
and then announce the RC on PHP-QA and PHP-DEV. At this
point the build tracker and QA Bug System come into play.
If you successfully build PHP then report it in the build
tracker, If you then run and complete all the tests you
should report this too in the build tracker when
these features become avalible.
2. Dealing with Bugs
2.1 As a QA Team member
If you find a bug in an RC that you think is a showstopper
then, even if it is a known bug, you should report it in the
QA Bug system. This marks the bug for discussion at least,
and preferably fixing before the actual release. This system
is separate from the main bugs system so that important bugs
dont get lost in the midst if lots of feature/change request
in the approach to a release. It is imperitive where
appropraite that as a QA'er a test script, Configure options
and PHP.ini files are provided to enable the developer to
reproduce the bug, this is an important part of our job. If
you have a serious bug then you should also create a test
script to be added to the tests dir of the php source so
that at the end of the process to enable us to make sure bug
does not return. It is not difficult to create these test
scripts and a readme on it can be found in
php4/tests/README.
2.2 As a Developer
What should happen is that when a bug is reported it
is send to php-dev and php-qa as with other bugs. We should
have far stricter assignment system in this bug cycle rather
than just leaving them. Once again bugs should be able to be
marked as To Be Fixed Before release or moved to other bug
system. (This is currently the Release Masters responsibility)
Then before the actual release the qa bugs system can be
checked and if there are outstanding To Be Fixed Before
release bugs the Developers can see this easyly rather than
show stoppers being dismissed and not worried about.
When a bug is fixed the QAer who reported the bug is emailed
and asked to test again and see if the bug is fixed.
3 Releasing another RC
If it is felt necessary that a 2nd RC is needed then it
should be packaged as before and announced to both lists
again. The testing process then starts again, the RC2 is
added to the build tracker and QA'ers are asked to build and
retest the scripts as appropriate, espectially if you
reported a bug, you should test thourghly for your
bug and make sure it no longer occurs. This will normally
add anouther 3 days to the cycle, giving QA'ers time to
build test and report back, then for developers to
fix any problems.
4 CVS during the release process
At the point where the first RC is create a branch is
formed. This branch is not altered form that point onward
other than major bug fixes. Minor non important bug
fixes should not be applied to this branch but to the main
tree instead. Any major bug fixes should be applied to both
trees. The developer should test and check the RC tree then
also test and check the MAIN tree. This is their
responsibility to make sure (as far as possible) that the
bug fix works on both trees.
4.1 Useful CVS Commands
To create a Branch <Should only be done by person tarballing
the RC (The Release Master)>:
$ cvs tag -b php_4_0_<Version>RC<NUMBER>
IE:
$ cvs tag -b php_4_0_1RC1
This should be executed in the PHP directory of an up to
date checkout. Remember to also tag the Zend and TSRM repositories.
You can retrieve a branch in one of two ways: by checking it
out fresh from the repository, or by switching an existing
working copy over to the branch, I would suggest you
checkout a new copy.
To check out a new copy:
$ cvs checkout -r php_4_0_<Version>RC<NUMBER> php4
IE:
$ cvs checkout -r php_4_0_1RC1 php4
To switch a working copy (Not recomended due to possible
commiting to wrong branch)
$ cvs update -r php_4_0_<Version>RC<NUMBER> php4
IE:
$ cvs update -r php_4_0_1RC1 php4
This should be done in the PHP4 directory itself.
To revert back to normal branch you should use the
following:
$ cvs update -A
To Commit to the branch you follow exactly the same
procedure as normal
$ cvs commit file.c
MAKE SURE YOU DO NOT COMMIT TO THE WRONG BRANCH.
5 The Final Release
When it is time to make the final release the following
proceedure should be followed. The person who is tarballing
the final release should check the QA bugs system and make
sure there are no showstoppers left unfixed. If there are
then bug the person the bug is assigned to until they fix
it. If there are no more qa bugs then they should tag the
branch as php_4_0_<Version> and tarball as usual. An email
should be sent to PHP-GEN, PHP_DEV and PHP-QA about the new
release and it should be added to php.net. The windows
binaries and servelets should be built as soon as possible
and added too, as should the windows installer.
6 Summary
Here is a summary of what a release cycle might look like:
Thurs: RC is agreed on and packaged, an email is sent to
PHP_QA and PHP-DEV, the CVS is Branched and the
Release Cycle Begins.
Mon: After a weekends testing most show stoppers should
have been found (Hopefully) and the developers get to
work on fixing them.
Thurs: A second RC is released if needed with the new bug
fixes in and the QAers test again.
Sun: A review is made of all outstanding bugs and any show
stoppers should be fixed. if there are no show
stoppers then the final release is packaged and
released on the monday morning on php.net
Mon: Release is made.
James
--
James Moore
PHP QA Team
jmoore@php.net
+16 -16
View File
@@ -22,8 +22,6 @@ Zend
* Const'ify APIs. Right now, many functions leave parameters untouched,
but don't declare those as const. This makes interaction with other
interfaces difficult which pass const parameters to us.
* Add try..catch/throw exception handling.
* Fix Zend shallow copy issues with objects and arrays.
global
@@ -43,10 +41,6 @@ global
* on some platforms unimplemented function will just do nothing
(e.g. symlink) they should print a warning or not even be defined!
(DONE ?)
* Finish PHP streams abstraction, nuke all that issock stuff, implement SSL
socket support. (wez)
- ext/ftp/ -> all FILEs to streams
- ext/bz2/ -> convert to stream impl.
* Use arg_separator.input to implode args in the CGI sapi extension
and arg_separator.input to explode in php_build_argv(). (DONE?)
* Change the odbc_fetch_into() function to require ALWAYS the first two
@@ -87,10 +81,16 @@ documentation
* Add developer documentation.
* Add detailed documentation for Java extension.
ext/bz2
-------
* Add ini setting for decompression buffer size. The default 4k is to small
for big files and takes ages to decompress. However, 40k which perform
quite good with big files may be to much under certain environments as
default setting. There should be consideren different default sizes for
different SAPIS (e.g. apache and cli).
ext/curl
--------
* Use the cURL write handler to save data for use when returning data or
outputting data.
* Have a warning scheme for when people use unsupported features.
ext/oci8
@@ -105,6 +105,12 @@ ext/pcre
--------
* Allow user to set PCRE_NOTEMPTY, PCRE_ANCHORED at execution time, maybe
ext/pcntl
---------
* Change internal callback handler to use TICKS
* Remove all zend_extension code
* Add object callback support to pcntl_signal()
ext/pgsql
---------
For PHP 4.3.0:
@@ -129,8 +135,8 @@ ext/session
ext/sockets
-----------
* Make the extension work on windows (Daniel Beulshausen)
* Make the extension work with Solaris and the Sun GCC
* Implement IPv6
* Review/Fix vectors
ext/standard
------------
@@ -147,12 +153,6 @@ ext/standard
strrpos()
strrchr()
strip_tags()
* Rewrite win32 SMTP code to be usable for *ix to, maybe as a (default)
module of its own (Hartmut)
ext/zziplib
------------
* More fully support the zziplib API
ext/wddx
--------
+15
View File
@@ -412,6 +412,8 @@ TSRM_API THREAD_T tsrm_thread_id(void)
{
#ifdef TSRM_WIN32
return GetCurrentThreadId();
#elif defined(NETWARE)
return NXThreadGetId();
#elif defined(GNUPTH)
return pth_self();
#elif defined(PTHREADS)
@@ -430,10 +432,17 @@ TSRM_API THREAD_T tsrm_thread_id(void)
TSRM_API MUTEX_T tsrm_mutex_alloc(void)
{
MUTEX_T mutexp;
#ifdef NETWARE
long flags = 0; /* Don't require NX_MUTEX_RECURSIVE, I guess */
NXHierarchy_t order = 0;
NX_LOCK_INFO_ALLOC (lockInfo, "PHP-TSRM", 0);
#endif
#ifdef TSRM_WIN32
mutexp = malloc(sizeof(CRITICAL_SECTION));
InitializeCriticalSection(mutexp);
#elif defined(NETWARE)
mutexp = NXMutexAlloc(flags, order, &lockInfo); /* return value ignored for now */
#elif defined(GNUPTH)
mutexp = (MUTEX_T) malloc(sizeof(*mutexp));
pth_mutex_init(mutexp);
@@ -460,6 +469,8 @@ TSRM_API void tsrm_mutex_free(MUTEX_T mutexp)
if (mutexp) {
#ifdef TSRM_WIN32
DeleteCriticalSection(mutexp);
#elif defined(NETWARE)
NXMutexFree(mutexp);
#elif defined(GNUPTH)
free(mutexp);
#elif defined(PTHREADS)
@@ -486,6 +497,8 @@ TSRM_API int tsrm_mutex_lock(MUTEX_T mutexp)
#ifdef TSRM_WIN32
EnterCriticalSection(mutexp);
return 1;
#elif defined(NETWARE)
return NXLock(mutexp);
#elif defined(GNUPTH)
return pth_mutex_acquire(mutexp, 0, NULL);
#elif defined(PTHREADS)
@@ -507,6 +520,8 @@ TSRM_API int tsrm_mutex_unlock(MUTEX_T mutexp)
#ifdef TSRM_WIN32
LeaveCriticalSection(mutexp);
return 1;
#elif defined(NETWARE)
return NXUnlock(mutexp);
#elif defined(GNUPTH)
return pth_mutex_release(mutexp);
#elif defined(PTHREADS)
+8 -1
View File
@@ -13,7 +13,8 @@
#ifndef TSRM_H
#define TSRM_H
#ifndef WIN32
/* #ifndef WIN32 */
#if !defined(WIN32) && !defined(NETWARE)
# include "tsrm_config.h"
#endif
@@ -36,6 +37,9 @@
#ifdef TSRM_WIN32
# include <windows.h>
#elif defined(NETWARE)
# include <nks/thread.h>
# include <nks/synch.h>
#elif defined(GNUPTH)
# include <pth.h>
#elif defined(PTHREADS)
@@ -50,6 +54,9 @@ typedef int ts_rsrc_id;
#ifdef TSRM_WIN32
# define THREAD_T DWORD
# define MUTEX_T CRITICAL_SECTION *
#elif defined(NETWARE)
# define THREAD_T NXThreadId_t
# define MUTEX_T NXMutex_t *
#elif defined(GNUPTH)
# define THREAD_T pth_t
# define MUTEX_T pth_mutex_t *
+9
View File
@@ -0,0 +1,9 @@
#ifndef TSRM_CONFIG_NW_H
#define TSRM_CONFIG_NW_H
#define HAVE_UTIME 1
/* Though we have alloca(), this seems to be causing some problem with the stack pointer -- hence not using it */
/* #define HAVE_ALLOCA 1 */
#endif
+5 -3
View File
@@ -5,11 +5,13 @@
# define TSRM_WIN32
#endif
#ifndef TSRM_WIN32
#ifdef TSRM_WIN32
# include "tsrm_config.w32.h"
#elif defined(NETWARE)
# include "tsrm_config.nw.h"
#else
# include "tsrm_config.h"
# include <sys/param.h>
#else
# include "tsrm_config.w32.h"
#endif
#ifdef TSRM_WIN32
+260
View File
@@ -0,0 +1,260 @@
/*
+----------------------------------------------------------------------+
| PHP Version 4 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2002 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Venkat Raghavan S <rvenkat@novell.com> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include "TSRM.h"
#ifdef NETWARE
#ifdef USE_MKFIFO
#include <sys/stat.h>
#elif !defined(USE_PIPE_OPEN) /* NXFifoOpen */
#include <nks/fsio.h>
#endif
#include <nks/vm.h>
#include <nks/memory.h>
#include <string.h>
#include "mktemp.h"
/* strtok() call in LibC is abending when used in a different address space -- hence using
PHP's version itself for now : Venkat (30/4/02) */
#include "tsrm_strtok_r.h"
#define tsrm_strtok_r(a,b,c) strtok((a),(b))
#define WHITESPACE " \t"
#define MAX_ARGS 10
TSRM_API FILE* popen(const char *commandline, const char *type)
{
char *command = NULL, *argv[MAX_ARGS] = {'\0'}, **env = NULL;
char *tempName = "sys:/php/temp/phpXXXXXX.tmp";
char *filePath = NULL;
char *ptr = NULL;
int ptrLen = 0, argc = 0, i = 0, envCount = 0, err = 0;
FILE *stream = NULL;
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
int pipe_handle;
int mode = O_RDONLY;
#else
NXHandle_t pipe_handle;
NXMode_t mode = NX_O_RDONLY;
#endif
NXExecEnvSpec_t envSpec;
NXNameSpec_t nameSpec;
NXVmId_t newVM = 0;
/* Check for validity of input parameters */
if (!commandline || !type)
return NULL;
/* Get temporary file name */
filePath = mktemp(tempName);
/*consoleprintf ("PHP | popen: file path = %s, mode = %s\n", filePath, type);*/
if (!filePath)
return NULL;
/* Set pipe mode according to type -- for now allow only "r" or "w" */
if (strcmp(type, "r") == 0)
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
mode = O_RDONLY;
#else
mode = NX_O_RDONLY;
#endif
else if (strcmp(type, "w") == 0)
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
mode = O_WRONLY;
#else
mode = NX_O_WRONLY;
#endif
else
return NULL;
#ifdef USE_PIPE_OPEN
pipe_handle = pipe_open(filePath, mode);
/*consoleprintf ("PHP | popen: pipe_open() returned %d\n", pipe_handle);*/
if (pipe_handle == -1)
return NULL;
#elif defined(USE_MKFIFO)
pipe_handle = mkfifo(filePath, mode);
consoleprintf ("PHP | popen: mkfifo() returned %d\n", pipe_handle);
if (pipe_handle == -1)
return NULL;
#else
/*
- NetWare doesn't require first parameter
- Allowing LibC to choose the buffer size for now
*/
err = NXFifoOpen(0, filePath, mode, 0, &pipe_handle);
/*consoleprintf ("PHP | popen: NXFifoOpen() returned %d\n", err);*/
if (err)
return NULL;
#endif
/* Copy the environment variables in preparation for the spawn call */
envCount = NXGetEnvCount() + 1; /* add one for NULL */
env = (char**)NXMemAlloc(sizeof(char*) * envCount, 0);
if (!env)
return NULL;
err = NXCopyEnv(env, envCount);
consoleprintf ("PHP | popen: NXCopyEnv() returned %d\n", err);
if (err)
{
NXMemFree (env);
return NULL;
}
/* Separate commandline string into words */
consoleprintf ("PHP | popen: commandline = %s\n", commandline);
ptr = tsrm_strtok_r((char*)commandline, WHITESPACE, NULL);
ptrLen = strlen(ptr);
command = (char*)malloc(ptrLen + 1);
if (!command)
{
NXMemFree (env);
return NULL;
}
strcpy (command, ptr);
ptr = tsrm_strtok_r(NULL, WHITESPACE, NULL);
while (ptr && (argc < MAX_ARGS))
{
ptrLen = strlen(ptr);
argv[argc] = (char*)malloc(ptrLen + 1);
if (!argv[argc])
{
NXMemFree (env);
if (command)
free (command);
for (i = 0; i < argc; i++)
{
if (argv[i])
free (argv[i]);
}
return NULL;
}
strcpy (argv[argc], ptr);
argc++;
ptr = tsrm_strtok_r(NULL, WHITESPACE, NULL);
}
consoleprintf ("PHP | popen: commandline string parsed into tokens\n");
/* Setup the execution environment and spawn new process */
envSpec.esFlags = 0; /* Not used */
envSpec.esArgc = argc;
envSpec.esArgv = (void**)argv;
envSpec.esEnv = (void**)env;
envSpec.esStdin.ssType =
envSpec.esStdout.ssType = NX_OBJ_FIFO;
envSpec.esStderr.ssType = NX_OBJ_FILE;
/*
envSpec.esStdin.ssHandle =
envSpec.esStdout.ssHandle =
envSpec.esStderr.ssHandle = -1;
*/
envSpec.esStdin.ssPathCtx =
envSpec.esStdout.ssPathCtx =
envSpec.esStderr.ssPathCtx = NULL;
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
if (mode == O_RDONLY)
#else
if (mode == NX_O_RDONLY)
#endif
{
envSpec.esStdin.ssPath = filePath;
envSpec.esStdout.ssPath = stdout;
}
else /* Write Only */
{
envSpec.esStdin.ssPath = stdin;
envSpec.esStdout.ssPath = filePath;
}
envSpec.esStderr.ssPath = stdout;
nameSpec.ssType = NX_OBJ_FIFO;
/* nameSpec.ssHandle = 0; */ /* Not used */
nameSpec.ssPathCtx = NULL; /* Not used */
nameSpec.ssPath = argv[0];
consoleprintf ("PHP | popen: environment setup\n");
err = NXVmSpawn(&nameSpec, &envSpec, 0, &newVM);
consoleprintf ("PHP | popen: NXVmSpawn() returned %d\n", err);
if (!err)
/* Get file pointer corresponding to the pipe (file) opened */
stream = fdopen(pipe_handle, type);
/* Clean-up */
if (env)
NXMemFree (env);
if (pipe_handle)
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
close(pipe_handle);
#else
NXClose(pipe_handle);
#endif
if (command)
free (command);
for (i = 0; i < argc; i++)
{
if (argv[i])
free (argv[i]);
}
consoleprintf ("PHP | popen: all clean-up done, returning...\n");
return stream;
}
TSRM_API int pclose(FILE* stream)
{
int err = 0;
NXHandle_t fd = 0;
/* Get the process associated with this pipe (file) handle and terminate it */
fd = fileno(stream);
NXClose (fd);
err = fclose(stream);
return err;
}
#endif
+7 -14
View File
@@ -12,24 +12,17 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: Jouni Ahto <jah@mork.net> |
| Authors: Venkat Raghavan S <rvenkat@novell.com> |
+----------------------------------------------------------------------+
*/
*/
/* $Id$ */
#if HAVE_LIBT1
#ifndef TSRM_NW_H
#define TSRM_NW_H
#include <t1lib.h>
#include "TSRM.h"
extern void php_free_ps_font(zend_rsrc_list_entry *rsrc TSRMLS_DC);
extern void php_free_ps_enc(zend_rsrc_list_entry *rsrc TSRMLS_DC);
TSRM_API FILE* popen(const char *command, const char *type);
TSRM_API int pclose(FILE* stream);
#endif
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
+131 -40
View File
@@ -36,12 +36,17 @@
#include "tsrm_win32.h"
#endif
#ifdef NETWARE
/*#include "pipe.h"*/
#include "tsrm_nw.h"
#endif
#define VIRTUAL_CWD_DEBUG 0
#include "TSRM.h"
/* Only need mutex for popen() in Windows because it doesn't chdir() on UNIX */
#if defined(TSRM_WIN32) && defined(ZTS)
/* Only need mutex for popen() in Windows and NetWare, because it doesn't chdir() on UNIX */
#if (defined(TSRM_WIN32) || defined(NETWARE)) && defined(ZTS)
MUTEX_T cwd_mutex;
#endif
@@ -68,7 +73,8 @@ cwd_state main_cwd_state; /* True global */
#endif
#ifdef TSRM_WIN32
#define tsrm_strtok_r(a,b,c) strtok((a),(b))
#include <tchar.h>
#define tsrm_strtok_r(a,b,c) _tcstok((a),(b))
#define TOKENIZER_STRING "/\\"
static int php_check_dots(const char *element, int n)
@@ -84,6 +90,13 @@ static int php_check_dots(const char *element, int n)
#define IS_DIRECTORY_CURRENT(element, len) \
(len == 1 && ptr[0] == '.')
#elif defined(NETWARE)
/* NetWare has strtok() (in LibC) and allows both slashes in paths, like Windows --
but rest of the stuff is like Unix */
/* strtok() call in LibC is abending when used in a different address space -- hence using
PHP's version itself for now */
/*#define tsrm_strtok_r(a,b,c) strtok((a),(b))*/
#define TOKENIZER_STRING "/\\"
#else
#define TOKENIZER_STRING "/"
@@ -120,9 +133,15 @@ static int php_check_dots(const char *element, int n)
static int php_is_dir_ok(const cwd_state *state)
{
#if !(defined(NETWARE) && defined(CLIB_STAT_PATCH))
struct stat buf;
if (stat(state->cwd, &buf) == 0 && S_ISDIR(buf.st_mode))
#else
struct stat_libc buf;
if (stat(state->cwd, (struct stat*)(&buf)) == 0 && S_ISDIR(buf.st_mode))
#endif
return (0);
return (1);
@@ -130,9 +149,15 @@ static int php_is_dir_ok(const cwd_state *state)
static int php_is_file_ok(const cwd_state *state)
{
#if !(defined(NETWARE) && defined(CLIB_STAT_PATCH))
struct stat buf;
if (stat(state->cwd, &buf) == 0 && S_ISREG(buf.st_mode))
#else
struct stat_libc buf;
if (stat(state->cwd, (struct stat*)(&buf)) == 0 && S_ISREG(buf.st_mode))
#endif
return (0);
return (1);
@@ -273,7 +298,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
if (path_length == 0)
return (0);
#if !defined(TSRM_WIN32) && !defined(__BEOS__)
#if !defined(TSRM_WIN32) && !defined(__BEOS__) && !defined(NETWARE)
if (IS_ABSOLUTE_PATH(path, path_length)) {
if (realpath(path, resolved_path)) {
path = resolved_path;
@@ -308,7 +333,12 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
fprintf(stderr,"cwd = %s path = %s\n", state->cwd, path);
#endif
if (IS_ABSOLUTE_PATH(path_copy, path_length)) {
/* COPY_WHEN_ABSOLUTE needs to account for volume name that is unique to NetWare absolute paths */
#ifndef NETWARE
copy_amount = COPY_WHEN_ABSOLUTE;
#else
copy_amount = COPY_WHEN_ABSOLUTE(path_copy);
#endif
is_absolute = 1;
#ifdef TSRM_WIN32
} else if (IS_UNC_PATH(path_copy, path_length)) {
@@ -363,7 +393,13 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
state->cwd = (char *) realloc(state->cwd, state->cwd_length+ptr_length+1+1);
#ifdef TSRM_WIN32
/* Windows 9x will consider C:\\Foo as a network path. Avoid it. */
if (state->cwd[state->cwd_length-1]!='\\' && state->cwd[state->cwd_length-1]!='/') {
if ((state->cwd[state->cwd_length-1]!='\\' && state->cwd[state->cwd_length-1]!='/') ||
IsDBCSLeadByte(state->cwd[state->cwd_length-2])) {
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
}
#elif defined(NETWARE)
/* If the token is a volume name, it will have colon at the end -- so, no slash before it */
if (ptr[ptr_length-1] != ':') {
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
}
#else
@@ -375,7 +411,12 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
ptr = tsrm_strtok_r(NULL, TOKENIZER_STRING, &tok);
}
/* COPY_WHEN_ABSOLUTE needs to account for volume name that is unique to NetWare absolute paths */
#ifndef NETWARE
if (state->cwd_length == COPY_WHEN_ABSOLUTE) {
#else
if (state->cwd_length == COPY_WHEN_ABSOLUTE(state->cwd)) {
#endif
state->cwd = (char *) realloc(state->cwd, state->cwd_length+1+1);
state->cwd[state->cwd_length] = DEFAULT_SLASH;
state->cwd[state->cwd_length+1] = '\0';
@@ -425,7 +466,12 @@ CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path
return -1;
}
/* COPY_WHEN_ABSOLUTE needs to account for volume name that is unique to NetWare absolute paths */
#ifndef NETWARE
if (length == COPY_WHEN_ABSOLUTE && IS_ABSOLUTE_PATH(path, length+1)) { /* Also use trailing slash if this is absolute */
#else
if (length == COPY_WHEN_ABSOLUTE(path) && IS_ABSOLUTE_PATH(path, length+1)) { /* Also use trailing slash if this is absolute */
#endif
length++;
}
temp = (char *) tsrm_do_alloca(length+1);
@@ -524,7 +570,7 @@ CWD_API int virtual_chmod(const char *filename, mode_t mode TSRMLS_DC)
return ret;
}
#ifndef TSRM_WIN32
#if !defined(TSRM_WIN32) && !defined(NETWARE)
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group TSRMLS_DC)
{
cwd_state new_state;
@@ -600,6 +646,7 @@ CWD_API int virtual_rename(char *oldname, char *newname TSRMLS_DC)
return retval;
}
#if !(defined(NETWARE) && defined(CLIB_STAT_PATCH))
CWD_API int virtual_stat(const char *path, struct stat *buf TSRMLS_DC)
{
cwd_state new_state;
@@ -613,9 +660,23 @@ CWD_API int virtual_stat(const char *path, struct stat *buf TSRMLS_DC)
CWD_STATE_FREE(&new_state);
return retval;
}
#else
CWD_API int virtual_stat(const char *path, struct stat_libc *buf TSRMLS_DC)
{
cwd_state new_state;
int retval;
#ifndef TSRM_WIN32
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, path, NULL);
retval = stat(new_state.cwd, (struct stat*)buf);
CWD_STATE_FREE(&new_state);
return retval;
}
#endif
#if !defined(TSRM_WIN32) && !defined(NETWARE)
CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC)
{
cwd_state new_state;
@@ -629,7 +690,6 @@ CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC)
CWD_STATE_FREE(&new_state);
return retval;
}
#endif
CWD_API int virtual_unlink(const char *path TSRMLS_DC)
@@ -695,7 +755,69 @@ CWD_API DIR *virtual_opendir(const char *pathname TSRMLS_DC)
return retval;
}
#ifndef TSRM_WIN32
#ifdef TSRM_WIN32
/* On Windows the trick of prepending "cd cwd; " doesn't work so we need to perform
a real chdir() and mutex it
*/
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
{
char prev_cwd[MAXPATHLEN];
char *getcwd_result;
FILE *retval;
getcwd_result = getcwd(prev_cwd, MAXPATHLEN);
if (!getcwd_result) {
return NULL;
}
#ifdef ZTS
tsrm_mutex_lock(cwd_mutex);
#endif
chdir(CWDG(cwd).cwd);
retval = popen(command, type);
chdir(prev_cwd);
#ifdef ZTS
tsrm_mutex_unlock(cwd_mutex);
#endif
return retval;
}
#elif defined(NETWARE)
/* On NetWare, the trick of prepending "cd cwd; " doesn't work so we need to perform
a VCWD_CHDIR() and mutex it
*/
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
{
char prev_cwd[MAXPATHLEN];
char *getcwd_result;
FILE *retval;
getcwd_result = VCWD_GETCWD(prev_cwd, MAXPATHLEN);
if (!getcwd_result) {
return NULL;
}
#ifdef ZTS
tsrm_mutex_lock(cwd_mutex);
#endif
VCWD_CHDIR(CWDG(cwd).cwd);
retval = popen(command, type);
VCWD_CHDIR(prev_cwd);
#ifdef ZTS
tsrm_mutex_unlock(cwd_mutex);
#endif
return retval;
}
#else /* Unix */
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
{
@@ -731,37 +853,6 @@ CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
return retval;
}
#else
/* On Windows the trick of prepending "cd cwd; " doesn't work so we need to perform
a real chdir() and mutex it
*/
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
{
char prev_cwd[MAXPATHLEN];
char *getcwd_result;
FILE *retval;
getcwd_result = getcwd(prev_cwd, MAXPATHLEN);
if (!getcwd_result) {
return NULL;
}
#ifdef ZTS
tsrm_mutex_lock(cwd_mutex);
#endif
chdir(CWDG(cwd).cwd);
retval = popen(command, type);
chdir(prev_cwd);
#ifdef ZTS
tsrm_mutex_unlock(cwd_mutex);
#endif
return retval;
}
#endif
+26 -6
View File
@@ -50,12 +50,27 @@ typedef unsigned short mode_t;
#define DEFAULT_SLASH '\\'
#define DEFAULT_DIR_SEPARATOR ';'
#define IS_SLASH(c) ((c) == '/' || (c) == '\\')
#define IS_SLASH_P(c) (*(c) == '/' || \
(*(c) == '\\' && !IsDBCSLeadByte(*(c-1))))
#define COPY_WHEN_ABSOLUTE 2
#define IS_ABSOLUTE_PATH(path, len) \
(len >= 2 && isalpha(path[0]) && path[1] == ':')
#define IS_UNC_PATH(path, len) \
(len >= 2 && IS_SLASH(path[0]) && IS_SLASH(path[1]))
#elif defined(NETWARE)
#ifdef HAVE_DIRENT_H
#include <dirent.h>
#endif
#define DEFAULT_SLASH '/'
#define DEFAULT_DIR_SEPARATOR ';'
#define IS_SLASH(c) ((c) == '/' || (c) == '\\')
#define COPY_WHEN_ABSOLUTE(path) \
(strchr(path, ':') - path + 1) /* Take the volume name which ends with a colon */
#define IS_ABSOLUTE_PATH(path, len) \
(strchr(path, ':') != NULL) /* Colon indicates volume name */
#else
#ifdef HAVE_DIRENT_H
#include <dirent.h>
@@ -70,6 +85,7 @@ typedef unsigned short mode_t;
#endif
#define IS_SLASH(c) ((c) == '/')
#define IS_SLASH_P(c) (*(c) == '/')
#endif
@@ -117,8 +133,12 @@ CWD_API FILE *virtual_fopen(const char *path, const char *mode TSRMLS_DC);
CWD_API int virtual_open(const char *path TSRMLS_DC, int flags, ...);
CWD_API int virtual_creat(const char *path, mode_t mode TSRMLS_DC);
CWD_API int virtual_rename(char *oldname, char *newname TSRMLS_DC);
#if !(defined(NETWARE) && defined(CLIB_STAT_PATCH))
CWD_API int virtual_stat(const char *path, struct stat *buf TSRMLS_DC);
#ifndef TSRM_WIN32
#else
CWD_API int virtual_stat(const char *path, struct stat_libc *buf TSRMLS_DC);
#endif
#if !defined(TSRM_WIN32) && !defined(NETWARE)
CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC);
#endif
CWD_API int virtual_unlink(const char *path TSRMLS_DC);
@@ -130,7 +150,7 @@ CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC);
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);
#ifndef TSRM_WIN32
#if !defined(TSRM_WIN32) && !defined(NETWARE)
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group TSRMLS_DC);
#endif
@@ -165,7 +185,7 @@ typedef struct _virtual_cwd_globals {
#define VCWD_REALPATH(path, real_path) virtual_realpath(path, real_path TSRMLS_CC)
#define VCWD_RENAME(oldname, newname) virtual_rename(oldname, newname TSRMLS_CC)
#define VCWD_STAT(path, buff) virtual_stat(path, buff TSRMLS_CC)
#ifdef TSRM_WIN32
#if !defined(TSRM_WIN32) && !defined(NETWARE)
#define VCWD_LSTAT(path, buff) virtual_stat(path, buff TSRMLS_CC)
#else
#define VCWD_LSTAT(path, buff) virtual_lstat(path, buff TSRMLS_CC)
@@ -179,7 +199,7 @@ typedef struct _virtual_cwd_globals {
#define VCWD_UTIME(path, time) virtual_utime(path, time TSRMLS_CC)
#endif
#define VCWD_CHMOD(path, mode) virtual_chmod(path, mode TSRMLS_CC)
#ifndef TSRM_WIN32
#if !defined(TSRM_WIN32) && !defined(NETWARE)
#define VCWD_CHOWN(path, owner, group) virtual_chown(path, owner, group TSRMLS_CC)
#endif
@@ -202,7 +222,7 @@ typedef struct _virtual_cwd_globals {
#define VCWD_OPENDIR(pathname) opendir(pathname)
#define VCWD_POPEN(command, type) popen(command, type)
#ifndef TSRM_WIN32
#if !defined(TSRM_WIN32) && !defined(NETWARE)
#define VCWD_REALPATH(path, real_path) realpath(path, real_path)
#else
#define VCWD_REALPATH(path, real_path) strcpy(real_path, path)
@@ -212,7 +232,7 @@ typedef struct _virtual_cwd_globals {
#define VCWD_UTIME(path, time) utime(path, time)
#endif
#define VCWD_CHMOD(path, mode) chmod(path, mode)
#ifndef TSRM_WIN32
#if !defined(TSRM_WIN32) && !defined(NETWARE)
#define VCWD_CHOWN(path, owner, group) chown(path, owner, group)
#endif
-8763
View File
File diff suppressed because it is too large. Load diff
-186
View File
@@ -1,186 +0,0 @@
// $Header$
// FlexLexer.h -- define interfaces for lexical analyzer classes generated
// by flex
// Copyright (c) 1993 The Regents of the University of California.
// All rights reserved.
//
// This code is derived from software contributed to Berkeley by
// Kent Williams and Tom Epperly.
//
// Redistribution and use in source and binary forms with or without
// modification are permitted provided that: (1) source distributions retain
// this entire copyright notice and comment, and (2) distributions including
// binaries display the following acknowledgement: ``This product includes
// software developed by the University of California, Berkeley and its
// contributors'' in the documentation or other materials provided with the
// distribution and in all advertising materials mentioning features or use
// of this software. Neither the name of the University nor the names of
// its contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
// THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
// WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
// This file defines FlexLexer, an abstract class which specifies the
// external interface provided to flex C++ lexer objects, and yyFlexLexer,
// which defines a particular lexer class.
//
// If you want to create multiple lexer classes, you use the -P flag
// to rename each yyFlexLexer to some other xxFlexLexer. You then
// include <FlexLexer.h> in your other sources once per lexer class:
//
// #undef yyFlexLexer
// #define yyFlexLexer xxFlexLexer
// #include <FlexLexer.h>
//
// #undef yyFlexLexer
// #define yyFlexLexer zzFlexLexer
// #include <FlexLexer.h>
// ...
#ifndef FLEXLEXER_H
// Never included before - need to define base class.
#define FLEXLEXER_H
#include <iostream.h>
extern "C++" {
struct yy_buffer_state;
typedef int yy_state_type;
class FlexLexer {
public:
virtual ~FlexLexer() { }
const char* YYText() { return yytext; }
int YYLeng() { return yyleng; }
virtual void
yy_switch_to_buffer( struct yy_buffer_state* new_buffer ) = 0;
virtual struct yy_buffer_state*
yy_create_buffer( istream* s, int size ) = 0;
virtual void yy_delete_buffer( struct yy_buffer_state* b ) = 0;
virtual void yyrestart( istream* s ) = 0;
virtual int yylex() = 0;
// Call yylex with new input/output sources.
int yylex( istream* new_in, ostream* new_out = 0 )
{
switch_streams( new_in, new_out );
return yylex();
}
// Switch to new input/output streams. A nil stream pointer
// indicates "keep the current one".
virtual void switch_streams( istream* new_in = 0,
ostream* new_out = 0 ) = 0;
int lineno() const { return yylineno; }
int debug() const { return yy_flex_debug; }
void set_debug( int flag ) { yy_flex_debug = flag; }
protected:
char* yytext;
int yyleng;
int yylineno; // only maintained if you use %option yylineno
int yy_flex_debug; // only has effect with -d or "%option debug"
};
}
#endif
#if defined(yyFlexLexer) || ! defined(yyFlexLexerOnce)
// Either this is the first time through (yyFlexLexerOnce not defined),
// or this is a repeated include to define a different flavor of
// yyFlexLexer, as discussed in the flex man page.
#define yyFlexLexerOnce
class yyFlexLexer : public FlexLexer {
public:
// arg_yyin and arg_yyout default to the cin and cout, but we
// only make that assignment when initializing in yylex().
yyFlexLexer( istream* arg_yyin = 0, ostream* arg_yyout = 0 );
virtual ~yyFlexLexer();
void yy_switch_to_buffer( struct yy_buffer_state* new_buffer );
struct yy_buffer_state* yy_create_buffer( istream* s, int size );
void yy_delete_buffer( struct yy_buffer_state* b );
void yyrestart( istream* s );
virtual int yylex();
virtual void switch_streams( istream* new_in, ostream* new_out );
protected:
virtual int LexerInput( char* buf, int max_size );
virtual void LexerOutput( const char* buf, int size );
virtual void LexerError( const char* msg );
void yyunput( int c, char* buf_ptr );
int yyinput();
void yy_load_buffer_state();
void yy_init_buffer( struct yy_buffer_state* b, istream* s );
void yy_flush_buffer( struct yy_buffer_state* b );
int yy_start_stack_ptr;
int yy_start_stack_depth;
int* yy_start_stack;
void yy_push_state( int new_state );
void yy_pop_state();
int yy_top_state();
yy_state_type yy_get_previous_state();
yy_state_type yy_try_NUL_trans( yy_state_type current_state );
int yy_get_next_buffer();
istream* yyin; // input source for default LexerInput
ostream* yyout; // output sink for default LexerOutput
struct yy_buffer_state* yy_current_buffer;
// yy_hold_char holds the character lost when yytext is formed.
char yy_hold_char;
// Number of characters read into yy_ch_buf.
int yy_n_chars;
// Points to current character in buffer.
char* yy_c_buf_p;
int yy_init; // whether we need to initialize
int yy_start; // start state number
// Flag which is used to allow yywrap()'s to do buffer switches
// instead of setting up a fresh yyin. A bit of a hack ...
int yy_did_buffer_switch_on_eof;
// The following are not always needed, but may be depending
// on use of certain flex features (like REJECT or yymore()).
yy_state_type yy_last_accepting_state;
char* yy_last_accepting_cpos;
yy_state_type* yy_state_buf;
yy_state_type* yy_state_ptr;
char* yy_full_match;
int* yy_full_state;
int yy_full_lp;
int yy_lp;
int yy_looking_for_trail_begin;
int yy_more_flag;
int yy_more_len;
int yy_more_offset;
int yy_prev_more_offset;
};
#endif
-56
View File
@@ -1,56 +0,0 @@
--------------------------------------------------------------------
The Zend Engine License, version 2.00
Copyright (c) 1999-2002 Zend Technologies Ltd. All rights reserved.
--------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
modification, is permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
3. The names "Zend" and "Zend Engine" must not be used to endorse
or promote products derived from this software without prior
permission from Zend Technologies Ltd. For written permission,
please contact license@zend.com.
4. Zend Technologies Ltd. may publish revised and/or new versions
of the license from time to time. Each version will be given a
distinguishing version number.
Once covered code has been published under a particular version
of the license, you may always continue to use it under the
terms of that version. You may also choose to use such covered
code under the terms of any subsequent version of the license
published by Zend Technologies Ltd. No one other than Zend
Technologies Ltd. has the right to modify the terms applicable
to covered code created under this License.
5. Redistributions of any form whatsoever must retain the following
acknowledgment:
"This product includes the Zend Engine, freely available at
http://www.zend.com"
6. All advertising materials mentioning features or use of this
software must display the following acknowledgment:
"The Zend Engine is freely available at http://www.zend.com"
THIS SOFTWARE IS PROVIDED BY ZEND TECHNOLOGIES LTD. ``AS IS'' AND
ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ZEND
TECHNOLOGIES LTD. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
--------------------------------------------------------------------
-50
View File
@@ -1,50 +0,0 @@
## Process this file with automake to produce Makefile.in -*- makefile -*-
#CLEANFILES = zend_language_parser.c zend_language_parser.h zend_language_scanner.c zend_language_parser.output zend_ini_parser.c zend_ini_parser.h zend_ini_scanner.c zend_ini_parser.output
AUTOMAKE_OPTIONS=foreign
noinst_LTLIBRARIES=libZend.la
libZend_la_SOURCES=\
zend_language_parser.y zend_language_scanner.l \
zend_ini_parser.y zend_ini_scanner.l \
zend_alloc.c zend_compile.c zend_constants.c zend_dynamic_array.c \
zend_execute.c zend_execute_API.c zend_highlight.c zend_llist.c \
zend_opcode.c zend_operators.c zend_ptr_stack.c zend_stack.c \
zend_variables.c zend.c zend_API.c zend_extensions.c zend_hash.c \
zend_list.c zend_indent.c zend_builtin_functions.c zend_sprintf.c \
zend_ini.c zend_qsort.c zend_objects.c zend_object_handlers.c
libZend_la_LDFLAGS =
libZend_la_LIBADD = @ZEND_EXTRA_LIBS@
# automake isn't too clever about "non-standard" use of lex and yacc
$(libZend_la_OBJECTS): zend_language_parser.h
zend_ini_scanner.lo: zend_ini_parser.h
# Language parser/scanner rules
zend_language_scanner.c: $(srcdir)/zend_language_scanner.l
$(LEX) -Pzend -S$(srcdir)/flex.skl -o$@ -i $(srcdir)/zend_language_scanner.l
zend_language_parser.h: zend_language_parser.c
zend_language_parser.c: $(srcdir)/zend_language_parser.y
$(YACC) -p zend -v -d $(srcdir)/zend_language_parser.y -o zend_language_parser.c
# INI parser/scanner rules
zend_ini_parser.c: $(srcdir)/zend_ini_parser.y
$(YACC) -p ini_ -v -d $(srcdir)/zend_ini_parser.y -o zend_ini_parser.c
zend_ini_scanner.c: $(srcdir)/zend_ini_scanner.l
$(LEX) -Pini_ -S$(srcdir)/flex.skl -o$@ -i $(srcdir)/zend_ini_scanner.l
zend_ini_parser.h: zend_ini_parser.c
depend:
zend_execute.lo: $(srcdir)/zend_execute.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) $(INLINE_CFLAGS) -c $(srcdir)/zend_execute.c
-177
View File
@@ -1,177 +0,0 @@
Creating an object
------------------
Object can be created in the following ways:
1. As a result of a function call. E.g.:
$foo = create_new_foo("parameter");
$foo->run();
The function should create a new zval, create new object and get the
handle for it, set handle and handler table as needed. Note that the
handle is the only ID of the object, so it should be enough to
identify it.
2. Overriding create_object handler for class. E.g.:
$foo = new Java("some.Class.here", "parameter");
$foo->run();
The create_object handler function should create a new zval, create
new object and get the handle for it, set handle and handler table as
needed, and also provide constructor method that would handle
constructor call. The get_constructor handler table entry should be
used for that. Do not rely class entry's constructor, unless you refer
to it from get_constructor handler.
Object maintenance
------------------
The handlers add_ref and del_ref are called when a new zval referring
to the object is created. This does not create a new object - both
zvals still refer to the same object.
clone_obj handler should create a new object, identical to an old one,
but being a separate entity.
delete_obj should destroy an object, all references to it become
invalid.
Object access - read
--------------------
get_property is used to read object's property. This value is not
meant to be changed. The handler returns zval * with the value.
Object access - write
---------------------
write_property is used to directly write object's property by
name. This handler is not oftenly used by the engine itself, but may
be used by some internal functions.
get_property_ptr is used to obtain zval ** for future writing to
it. If your object properties are stored as zval*, return real place
where the property is stored. If the aren't, the best way is to create
proxy object and handle it via get and set methods (see below).
get and set handlers are used when engine needs to access the object
as a value. E.g., in the following situation:
$foo =& $obj->bar;
$foo = 1;
if $foo is an object (e.g., proxy object from get_property_ptr) it
would be accessed using write handler.
Object access - method call
---------------------------
get_method handler is used to find method description by name. It
should set right type, function name and parameter mask for the
method. If the type is ZEND_OVERLOADED_FUNCTION, the method would be
called via call_method handler, otherwise it would be called with
standard Zend means.
get_constructor performs the same function as get_method, but for the
object constructor.
call_method handler is used to perform method call. Parameters are
passed like to any other Zend internal function.
Object - comparison
-------------------
Objects can be compared via compare_objects handler. This is used with
== operation, === compares objects by handles, i.e., return true if
and only if it's really the same object. Note that objects from
different object types (i.e., having different handlers) can not be
compared.
Objects - reflection
--------------------
get_class_name is used to retrieve class name of the object. No other
reflection functions are currently implemented.
Objects - data structures and handlers
---------------------------------------
The object is represented by the following structure:
struct _zend_object_value {
zend_object_handle handle;
zend_object_handlers *handlers;
};
handle is an ID of the object among the objects of the same type (not
class!). The type of the object and how it behaves is determined by
the handler table.
typedef struct _zend_object_handlers {
zend_object_add_ref_t add_ref;
zend_object_del_ref_t del_ref;
zend_object_delete_obj_t delete_obj;
zend_object_clone_obj_t clone_obj;
zend_object_read_property_t read_property;
zend_object_write_property_t write_property;
zend_object_get_property_ptr_t get_property_ptr;
zend_object_get_t get;
zend_object_set_t set;
zend_object_has_property_t has_property;
zend_object_unset_property_t unset_property;
zend_object_get_properties_t get_properties;
zend_object_get_method_t get_method;
zend_object_call_method_t call_method;
zend_object_get_constructor_t get_constructor;
zend_object_get_class_name_t get_class_name;
zend_object_compare_t compare_objects;
} zend_object_handlers;
See zend_object_handlers.h for prototypes. All objects are passed as zval's.
Handlers explained:
add_ref - called when a copy of the object handle is created.
del_ref - called when a copy of the object handle is destroyed.
delete_obj - called when an object needs to be destroyed.
clone_obj - called when a new object identical to an old one should be
created (unlike Zend Engine 1, this never happens unless explicitly
asked for).
read_property - returns zval *, containing the value of the
property. Is used when value of the property should be retrieved for
reading.
write_property - assigns value to certain property of the object.
get_property_ptr - retrieves zval** for the property of the value, to
be used for read and write. If object properties are not zval's
natively, this method should create and return proxy object for use
with get and set methods.
get - retrieves zval* for object contents. To be used mainly with
proxy objects from get_property_ptr, but also may be used for
convert_to_* functions.
set - sets value for object contents. To be used mainly with
proxy objects from get_property_ptr.
has_property - checks if the object has certain property set.
unset_property - removes value for the property of the object
get_method - retrieves description of the method
call_method - calls the method (parameters should be put on stack like
for any other PHP internal function).
get_constructor - get description for the object constructor method
get_class_name - get the name of the class the object belongs to
compare_objects - compares if two objects are equal
-136
View File
@@ -1,136 +0,0 @@
Revamped object model using object handles
===========================================
Background
----------
In the Zend Engine 1.0 (and its predecessor the PHP 3 scripting
engine) the object model's design is that instantiated objects are
language values. This means that when programmers are performing
operations, such variable assignment and passing parameters to
functions, objects are handled very similarly to the way other
primitive types are handled such as integers and strings.
Semantically this means that the whole object is being copied. The
approach Java takes is different where one refers to objects by handle
and not by value (one can think of a handle as an objects' ID).
Need
----
Unfortunately, the approach taken up to now has severely limited the
Zend Engine's object oriented model, both feature and simplicity
wise. One of the main problems with the former approach is that object
instantiation and duplication is very hard to control, a problem which
can not only lead to inefficient development but also often to strange
run-time behavior. Changing the object model to a handle oriented
model will allow the addressing of many needs such as destructors,
de-referencing method return values, tight control of object
duplication and more.
Overview
--------
The proposed object model is very much influenced by the Java
model. In general, when you create a new object you will be getting a
handle to the object instead of the object itself. When this handle is
sent to functions, assigned and copied it is only the handle which is
copied/sent/assigned. The object itself is never copied nor
duplicated. This results in all handles of this object to always point
at the same object making it a very consistent solution and saving
unnecessary duplication and confusing behavior.
Functionality
-------------
After this change the basic use of objects will be almost identical to
previous versions of the scripting engine. However, you won't bump
into awkward and confusing copying & destructing of objects. In order
to create and use a new object instance you will do the following:
$object = new MyClass(); $object->method();
The previous code will assign $object the handle of a new instance of
the class MyClass and call one of its methods.
Consider the following code:
1 class MyClass
2 {
3 function setMember($value)
4 {
5 $this->member = $value;
6 }
7
8 function getMember()
9 {
10 return $this->member;
11 }
12 }
13
14 function foo($obj)
15 {
16 $obj->setMember("foo");
17 }
18
19 $object = new MyClass();
20 $object->setMember("bar");
21 foo($object);
22 print $object->getMember();
Without the new Java-like handles, at line 20 the objects' data member
member is set to the string value of "bar". Because of the internal
representation of objects in the Zend Engine 1.0, the object is marked
as a reference, and when it is sent by value to the function foo, it
is duplicated (!). Therefore, the call to foo() on line 21 will
result in the $obj->setMember("foo") call being called on a duplicate
of $object. Line 22 will then result in "bar" being printed.
This is how the scripting engine has worked until today. Most
developers are probably unaware of the fact that they aren't always
talking to the same object but often duplicates; others may have
realized this can usually be solved by always passing objects by
reference (unless a replica is actually desired, which is uncommon).
The new object model will allow for a much more intuitive
implementation of the code. On line 21, the object's handle (ID) is
passed to foo() by value. Inside foo(), the object is fetched
according to this handle and, therefore, the setMember() method is
called on the originally instantiated object and not a copy. Line 22
will therefore result in "foo" being printed. This approach gives
developers tighter control of when objects are created and duplicated.
An additional not-as-important benefit is that the object handle will
be passed to foo() by value, which most probably will also save
unnecessary duplication of the value containing the ID itself and thus
additionally improving run-time performance.
This was just a simple description of why the new object model solves
awkward behavior and makes object handling much easier, intuitive and
efficient. The importance of this change goes far beyond what is
mentioned in this section as you will see in further sections which
describe new features with a majority of them being based on this
change.
Compatibility Notes
--------------------
Many PHP programmers aren't even aware of the copying quirks of the
current object model and, therefore, there is a relatively good chance
that the amount of PHP applications that will work out of the box or
after a very small amount of modifications would be high.
To simplify migration, version 2.0 will support an optional
'auto-clone' feature, which will perform a cloning of the object
whenever it would have been copied in version 1.0. Optionally, it
will also be possible to request that the engine will emit an E_NOTICE
message whenever such an automatic clone occurs, in order to allow
developers to gradually migrate to the version 2.0-style behavior
(without automatic clones).
Dependencies
------------
The new object model is not dependent on other features. Many of the
other Zend Engine 2.0 features, such as the $foo->bar()->barbara()
syntax, destructors and others completely rely on this new object
model.
-169
View File
@@ -1,169 +0,0 @@
Title: Zend 2.0 Namespaces
Version: $Revision$
Status: draft
Maintainer: Stig S. Bakken <ssb@fast.no>
Created: 2001-09-08
Modified: 2001-09-08
1. Background/Need
==================
PHP and Zend 1.0 have come to a point where a lot of reusable code is
being written; from simple functions and classes to entire application
frameworks. It is becoming increasingly difficult to avoid symbol
name collisions with the current scoping methods.
The symbol scopes available in Zend 1.0 are the global scope, the
class scope and the function scope. All scopes but classes may
contain variables, only the class and global scopes may contain
functions, while only the global scope may contain constants and
classes. This means that all of Zend 1.0's scoping methods are
inherently limited for solving symbol name collision problems.
2. Overview
===========
Namespaces in Zend 2.0 provide a way to manage the symbol collision
problem by making it possible to define multiple symbol tables able to
contain all types of symbols. Zend will get the notion of a current
namespace, defaulting to the current global one. The current name
space may be changed on a file-by-file basis. Symbols in other name
spaces than the current one may be referenced using a new namespace
operator. It will be possible to "import" symbols from one namespace
into another.
3. Functionality
================
3.1. Namespace Syntax
=====================
The namespace operator ":" is used to refer to symbols in other
namespaces than the current one:
Class: Namespace:class
Function: Namespace:function
Static method: Namespace:class::method
Variable: $Namespace:variable
Constant: Namespace:CONSTANT
Class variable: $Namespace:class::variable
To refer to symbols in the global namespace, symbols are prefixed with
only the namespace operator:
Class: :class
Function: :function
Static method: :class::method
Variable: $:variable
Constant: :CONSTANT
Class variable: $:class::variable
Note: $:variable will effectively be just another syntax for
$GLOBALS['variable'].
A namespace may have a name containing a ":", it is always the last
":" character in the symbol qualifier that is the actual namespace
operator:
Class: Name:Space:class
Function: Name:Space:function
Static method: Name:Space:class::method
Variable: $Name:Space:variable
Constant: Name:Space:CONSTANT
Class variable: $Name:Space:class::variable
(Here, the ":" between "Name" and "Space" is part of the name, it is
the one after "Space" that is the namespace operator.)
3.2. Defining Namespaces
========================
Individual files may define a namespace that will apply to the entire
file. If no "namespace" operator occurs in the file, it will be in
the global namespace:
1 namespace HTML;
2
3 class Form {
4 function Form() {
5 // constructor
6 }
7 // ...
8 }
Or with the "nested" name syntax:
1 namespace HTML:Form;
2
3 class Image {
4 var $src;
5 function Image($src) {
6 $this->src = $src;
7 }
8 // ...
9 }
Code executed within the "HTML" namespace may refer to the Form class
as just "Form". Code executed from within other namespaces has to
refer to it as "HTML:Form". The "namespace" statement must occur
before any other statements in the file.
# [ssb 2001-09-08]:
# Should it be possible to "add" symbols to a namespace by including a
# second file with the same namespace statement?
3.3. Importing Symbols
======================
It is possible to import symbols from another namespace into the
current one with the "import" statement:
import * from HTML; // all symbols
import Form from HTML; // single symbols
import Form,Table from HTML; // multiple symbols
There is a potential for name clashes between symols of different
types that have the same qualifier syntax. These are resolved in this
order: class, function, constant.
Optionally, the symbol type may be explicitly given to import (as
"class", "function", "variable" or "constant"):
import class Form from HTML;
And finally, you may import all symbols of a given type:
import constant * from HTML:Table;
The namespace with its symbols must already be defined before using
"import".
4. Compatibility Notes
======================
Old code that does not take advantage of namespaces will run without
modifications.
5. Dependencies
===============
The class variable syntax depends on this class variables being
implemented in the new ZE2 object model.
6. Acknowledgements
===================
Andi Gutmans <andi@zend.com> and Zeev Suraski <zeev@zend.com> for
initial ZE2 namespaces proposal
Dean Hall <php@apt7.com> for the initial symbol qualification syntax
-72
View File
@@ -1,72 +0,0 @@
Title: Loose type requirements for functions
Version: $Revision$
Status: draft
Maintainer: Brian Moon <brianm@dealnews.com>
Created: 2001-09-17
Modified: 2001-09-17
1. Background/Need
==================
Many internal function of PHP will reject parameters because of their
type (the array and variable function come to mind). For userland
this is not an easy task as there is no uniform way to do it. An
addition to the engine for requiring loose types would allow
delevopers to know that the data passed to their functions is of the
correct type and reduce the need for duplicating the same code in
every function to check for the type of data.
2. Overview
===========
Loose typing mostly means evaluating the contents of the variable and
not the type of the variable itself. The requirements for this would
and should work much like several of the is_* functions do now.
The typing of parameters would be optional and those not typed would
simply continue to be treated as they are now.
3. Functionality
================
3.1. Allowed Types
==================
Only loose types should be needed to ensure the data is usable by the
function. Duplicating the functionallity of is_scalar, is_resource,
is_array and is_object should give developers all the information they
need to use a variable correctly.
3.2. Syntax
===========
The current function syntax should be expanded to allow typing of
variables inline in a C style.
function foo ($var){
}
could be changed to require an array such as:
function foo (array $var){
}
3.3. Errors
===========
Mis-matches in type should be reported as fatal errors and should halt
the execution of a script as that function can not be run and code
following could not reliably run.
4. Compatibility Notes
======================
Old code that does not take advantage of this will run without
modifications.
-641
View File
@@ -1,641 +0,0 @@
Changes in the Zend Engine 2.0
* New Object Model.
The Zend Engine's handling of objects has been completely
changed in order to allow for new features, but also to increase
its performance.
Objects were handled in previous versions like primitive types
(for instance integers and strings). The drawback of this method
is, that semantically the whole object was copied when a
variable was assigned or parameters were passed to a method. The
new approach refers to objects by handle and not by value (one
can think of a handle as an object's ID).
Many PHP programmers aren't even aware of the copying quirks of
the old object model and, therefore, there is a relatively good
chance that the amount of PHP applications that will work out of
the box or after a very small amount of modifications would be
high.
[Not sure if the following will be implemented after all]
To simplify migration, the Zend Engine 2.0 supports an optional
'auto-clone' feature, which performs a cloning of the object
whenever it would have been copied in the Zend Engine 1.0.
Optionally, it emits an E_NOTICE message whenever such an
automatic clone occurs, in order to allow developers to
gradually migrate to the behavior of the Zend Engine 2 (without
automatic clones).
* Private Members.
The Zend Engine 2.0 introduces private member variables. Note
that for performance reasons no error message is emitted in
case of an illegal access to a private member variable.
Example:
<?php
class MyClass {
private $Hello = "Hello, World!\n";
function printHello() {
print $this->Hello;
}
}
class MyClass2 extends MyClass {
function printHello() {
MyClass::printHello(); /* Should print */
print $this->Hello; /* Shouldn't print out anything */
}
}
$obj = new MyClass();
print $obj->Hello; /* Shouldn't print out anything */
$obj->printHello(); /* Should print */
$obj = new MyClass2();
print $obj->Hello; /* Shouldn't print out anything */
$obj->printHello();
?>
* Object Cloning.
The Zend Engine 1.0 offered no way a user could decide what copy
constructor to run when an object is duplicated. During
duplication, the Zend Engine 1.0 did a bitwise copy making an
identical replica of all the object's properties.
Creating a copy of an object with fully replicated properties is
not always the wanted behavior. A good example of the need for
copy constructors, is if you have an object which represents a
GTK window and the object holds the resource of this GTK window,
when you create a duplicate you might want to create a new
window with the same properties and have the new object hold the
resource of the new window. Another example is if your object
holds a reference to another object which it uses and when you
replicate the parent object you want to create a new instance of
this other object so that the replica has its own separate copy.
An object copy is created by calling the object's __clone()
method.
Example:
<?php
$copy_of_object = $object->__clone();
?>
When the developer asks to create a new copy of an object, the
Zend Engine will check if a __clone() method has been defined or
not. If not, it will call a default __clone() which will copy
all of the object's properties. If a __clone() method is
defined, then it will be responsible to set the necessary
properties in the created object. For convenience, the engine
will supply a function that imports all of the properties from
the source object, so that they can start with a by-value
replica of the source object, and only override properties that
need to be changed. [The function hasn't been implemented yet]
Example:
<?php
class MyCloneable {
static $id = 0;
function MyCloneable() {
$this->id = self::$id++;
}
function __clone() {
$this->name = $clone->name;
$this->address = "New York";
$this->id = self::$id++;
}
}
$obj = new MyCloneable();
$obj->name = "Hello";
$obj->address = "Tel-Aviv";
print $obj->id . "\n";
$obj = $obj->__clone();
print $obj->id . "\n";
print $obj->name . "\n";
print $obj->address . "\n";
?>
* Forced deletion of objects.
The Zend Engine 1.0 had no means to force deletion of an object
if there are still references to it. The newly introduced delete
statement calls the object's destructor and frees it even if the
object is referenced by some other places in the engine. Other
references to the deleted object become stale and trying to
access them results in a fatal error.
Note that if you have a user-defined function delete() in an old
script, this script will yield a parser error with the Zend
Engine 2.0, since 'delete' is now a reserved word.
* Namespaces.
The Zend Engine 1.0 provided only three scopes: the global
scope, the class scope and the function scope. All scopes but
classes could contain variables, only the class and global
scopes could contain functions, while only the global scope
could contain constants and classes. This means that all of the
Zend Engine 1.0's scoping methods were inherently limited for
solving symbol name collision problems.
The Zend Engine 2.0 introduces the concept of namespaces to
manage the symbol collision problem by making it possible to
define multiple symbol tables able to contain all types of
symbols. The Zend Engine is aware of a current namespace,
defaulting to the current global one. The current namespace may
be changed on a file-by-file basis. Symbols in other namespaces
than the current one may be referenced using a new namespace
operator.
Namespaces and classes are the same with the Zend Engine 2.0,
except that you can't instantiate a namespace with "new". This
essentially also makes a class a namespace, so the scoping rules
for namespaces apply for classes. Some of the consequences of
this are: [Not finalized. Right now we basically have nested
classes so you can instantiate any nested class]
* Classes may contain classes.
Example:
<?php
class DB::MySQL {
var $host = "";
function db_connect($user) {
print "Connecting to MySQL database '$this->host' as $user\n";
}
}
class DB::Oracle {
var $host = "localhost";
function db_connect($user) {
print "Connecting to Oracle database '$this->host' as $user\n";
}
}
$MySQL_obj = new DB::MySQL();
$MySQL_obj->db_connect("Susan");
$Oracle_obj = new DB::Oracle();
$Oracle_obj->db_connect("Barbara");
?>
* Classes may contain constants.
Example:
<?php
class foo {
const hey = "hello";
}
print foo::hey;
?>
* Current namespace's symbol tables are searched first for
constants and functions.
Example:
The following code prints "foobar", not "foo", because
the class constant overrides the "global" constant of
the same name.
<?php
define("foo", "bar");
class FooClass {
const foo = "foobar";
function printFoo() {
print foo;
}
}
?>
* In the scope of a function, the current namespace is that
of the containing class/namespace.
Example:
<?php
class FooClass {
function foo() {
$this->bar();
bar();
}
function bar() {
print "foobar\n";
}
}
$obj = new FooClass;
$obj->foo();
$obj->foo();
?>
This prints "foobar" two times, since a bar() method exists
in the current namespace.
* It is possible to "import" symbols from one namespace into
another.
Example:
<?php
class MyClass {
function hello() {
print "Hello, World\n";
}
class MyClass2 {
function hello() {
print "Hello, World in MyClass2\n";
}
}
}
import function hello, class MyClass2 from MyClass;
MyClass2::hello();
hello();
?>
Example:
<?php
class MyOuterClass {
class MyInnerClass {
function func1() {
print "func1()\n";
}
function func2() {
print "func2()\n";
}
}
}
import class * from MyOuterClass;
import function func2 from MyOuterClass::MyInnerClass;
MyInnerClass::func1();
func2();
?>
Example:
<?php
class MyOuterClass {
const Hello = "Hello, World\n";
}
import const Hello from MyOuterClass;
print Hello;
?>
Old code that does not take advantage of namespaces will run
without modifications.
* Unified Constructors.
The Zend Engine allows developers to declare constructor methods
for classes. Classes which have a constructor method call this
method on each newly-created object, so it is suitable for any
initialization that the object may need before it can be used.
With the Zend Engine 1.0, constructor methods were class methods
that had the same name as the class itself. Since it is very
common to call parent constructors from derived classes, the way
the Zend Engine 1.0 worked made it a bit cumbersome to move
classes around in a large class hierarchy. If a class is moved
to reside under a different parent, the constructor name of that
parent changes as well, and the code in the derived class that
calls the parent constructor has to be modified.
The Zend Engine 2.0 introduces a standard way of declaring
constructor methods by calling them by the name __construct().
Example:
<?php
class BaseClass {
function __construct() {
print "In BaseClass constructor\n";
}
}
class SubClass extends BaseClass {
function __construct() {
parent::__construct();
print "In SubClass constructor\n";
}
}
$obj = new BaseClass();
$obj = new SubClass();
?>
For backwards compatibility, if the Zend Engine 2.0 cannot find
a __construct() function for a given class, it will search for
the old-style constructor function, by the name of the class.
Effectively, it means that the only case that would have
compatibility issues is if the class had a method named
__construct() which was used for different semantics.
* Destructors.
Having the ability to define destructors for objects can be very
useful. Destructors can log messages for debugging, close
database connections and do other clean-up work.
No mechanism for object destructors existed in the Zend Engine
1.0, although PHP had already support for registering functions
which should be run on request shutdown.
The Zend Engine 2.0 introduces a destructor concept similar to
that of other object-oriented languages, such as Java: When the
last reference to an object is destroyed the object's
destructor, which is a class method name __destruct() that
recieves no parameters, is called before the object is freed
from memory.
Example:
<?php
class MyDestructableClass {
function __construct() {
print "In constructor\n";
$this->name = "MyDestructableClass";
}
function __destruct() {
print "Destroying " . $this->name . "\n";
}
}
$obj = new MyDestructableClass();
?>
Like constructors, parent destructors will not be called
implicitly by the engine. In order to run a parent destructor,
one would have to explicitly call parent::__destruct() in the
destructor body.
* Exceptions.
The Zend Engine 1.0 had no exception handling. The Zend Engine 2.0
introduces a exception model similar to that of other programming
languages.
Example:
<?php
class MyException {
function __construct($exception) {
$this->exception = $exception;
}
function Display() {
print "MyException: $this->exception\n";
}
}
class MyExceptionFoo extends MyException {
function __construct($exception) {
$this->exception = $exception;
}
function Display() {
print "MyException: $this->exception\n";
}
}
try {
throw new MyExceptionFoo("Hello");
}
catch (MyException $exception) {
$exception->Display();
}
?>
Old code that has no user-defined functions 'catch', 'throw' and
'try' will run without modifications.
* Derefencing objects returned from functions.
Example:
<?php
class Circle {
function draw() {
print "Circle\n";
}
}
class Square {
function draw() {
print "Square\n";
}
}
function ShapeFactoryMethod($shape) {
switch ($shape) {
case "Circle": return new Circle();
case "Square": return new Square();
}
}
ShapeFactoryMethod("Circle")->draw();
ShapeFactoryMethod("Square")->draw();
?>
* Static member variables of static classes can now be
initialized.
Example:
<?php
class foo {
static $my_static = 5;
}
print foo::$my_static;
?>
* Supporting default values for by-reference function parameters.
Example:
<?php
function my_function(&$var = null) {
if ($var === null) {
die('$var needs to have a value');
}
}
?>
Changes in the Zend Engine 1.0
The Zend Engine was designed from the ground up for increased speed,
reduced memory consumption and more reliable execution. We dare say
it meets all of these goals and does so pretty well. Beyond that,
there are several improvements in the language engine features:
* References support.
$foo = &$a; would make $foo and $a be two names to the same
variable. This works with arrays as well, on either side; e.g.,
$foo = &$a[7]; would make $foo and $a[7] be two names to the
same variable. Changing one would change the other and vice
versa.
* Object overloading support.
This feature allows various OO libraries to use the OO notation
of PHP to access their functionality. Right now, no use is made
of that feature, but we'd have a COM module ready by the time
PHP 4.0 is released. A CORBA module would probably follow.
* include() and eval() are now functions, and not statements.
That means they return a value. The default return value from
include() and eval() is 1, so that you can do if (include())
without further coding. The return value may be changed by
returning a value from the global scope of the included file or
the evaluated string. For example, if 'return 7;' is executed in
the global scope of foo.inc, include("foo.inc") would evaluate
to 7.
* Automatic resource deallocation.
Several people have been bitten by the fact that PHP 3.0 had no
concept of reference counting. The Zend Engine adds full
reference counting for every value in the system, including
resources. As soon as a resource is no longer referenced from
any variable, it is automatically destroyed to save memory and
resources. The most obvious example for the advantage in this is
a loop that has an SQL query inside it, something like '$result
= sql_query(...);'. In PHP 3.0, every iteration resulted in
another SQL result-set allocated in the memory, and all of the
result sets weren't destroyed until the end of the script's
execution. With the Zend Engine, as soon as we overwrite an old
result set with a new one, the old result set which is no longer
referenced, is destroyed.
* Full support for nesting arrays and objects within each other,
in as many levels as you want.
* true and false are now constants of type boolean.
Comparing any other value to them would convert that value to a
boolean first, and conduct the comparison later. That means, for
example, that 5==true would evaluate to true (in PHP 3.0, true
was nothing but a constant for the integer value of 1, so
5==true was identical to 5==1, which was false).
* Runtime binding of function names.
This complex name has a simple explanation - you can now call
functions before they're declared!
* Added here-docs support.
* Added foreach.
Two syntaxes supported:
foreach(array_expr as $val) statement
foreach(array_expr as $key => $val) statement
* A true unset() implementation.
A variable or element that is unset(), is now sent to oblivion
in its entirely, no trace remains from it.
* Output buffering support.
Use ob_start() to begin output buffering, ob_end_flush() to end
buffering and send out the buffered contents, ob_end_clean() to
end buffering without sending the buffered contents, and
ob_get_contents() to retreive the current contents of the output
buffer. Header information (header(), content type, cookies) are
not buffered. By turning on output buffering, you can
effectively send header information all throughout your file,
regardless of whether you've emitted body output or not.
* Full variable reference within quoted strings:
${expr} - full indirect reference support for scalar
variables
{variable} - full variable support
For example:
$foo[5]["bar"] = "foobar";
print "{$foo[5]["bar"]}"; // would print "foobar"
* Ability to call member functions of other classes from within
member functions or from the global scope.
You can now, for example, override a parent function with a
child function, and call the parent function from it.
* Runtime information for classes (class name, parent, available
functions, etc.).
* Much more efficient syntax highlighter - runs much quicker,
performs more reliably, and generates much tighter HTML.
* A full-featured debugger has been integrated with the language
(supports breakpoints, expression evaluation, step-in/over,
function call backtrace, and more).
The Zend Engine claims 100% compatability with the engine of PHP
3.0, and is shamelessly lying about it. Here's why:
* Static variable initializers only accept scalar values
(in PHP 3.0 they accepted any valid expression). The impact
should be somewhere in between void and non existent, since
initializing a static variable with anything but a simple
static value makes no sense at all.
* The scope of break and continue is local to that of an
include()'d file or an eval()'d string. The impact should
be somewhat smaller of the one above.
* The return statement no longer works from a require()'d file. It
hardly worked in PHP 3.0, so the impact should be fairly small. If
you want this functionality - use include() instead.
* unset() is no longer a function, but a statement.
* The following letter combination is not supported within
encapsulated strings: "{$". If you have a string that includes
this letter combination, for example, print "{$somevar"; (which
printed the letter { and the contents of the variable $somevar in
PHP 3.0), it will result in a parse error with the Zend Engine.
In this case, you would have to change the code to print
"\{$somevar"; This incompatability is due to the full variable
reference within quoted strings feature added in the Zend
Engine.
-506
View File
@@ -1,506 +0,0 @@
# Microsoft Developer Studio Project File - Name="Zend" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=Zend - Win32 Release_inline
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "Zend.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "Zend.mak" CFG="Zend - Win32 Release_inline"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "Zend - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "Zend - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE "Zend - Win32 Release_inline" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "Zend - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDebug" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug" /D "_LIB" /D "Zend_EXPORTS" /D ZEND_DEBUG=0 /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /FR /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x40d /d "NDebug"
# ADD RSC /l 0x40d /d "NDebug"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_Debug" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_Debug" /D "_LIB" /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D ZEND_DEBUG=1 /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c
# ADD BASE RSC /l 0x40d /d "_Debug"
# ADD RSC /l 0x40d /d "_Debug"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
# PROP BASE Use_MFC 0
# PROP BASE Output_Dir "Zend___Win32_Release_inline"
# PROP BASE Intermediate_Dir "Zend___Win32_Release_inline"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Output_Dir "Release_inline"
# PROP Intermediate_Dir "Release_inline"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug" /D "_LIB" /D "Zend_EXPORTS" /D ZEND_DEBUG=0 /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /FR /FD /c
# SUBTRACT BASE CPP /YX
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug" /D "_LIB" /D "Zend_EXPORTS" /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D ZEND_DEBUG=0 /D "ZEND_WIN32_FORCE_INLINE" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /FR /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x40d /d "NDebug"
# ADD RSC /l 0x40d /d "NDebug"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ENDIF
# Begin Target
# Name "Zend - Win32 Release"
# Name "Zend - Win32 Debug"
# Name "Zend - Win32 Release_inline"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\zend.c
# End Source File
# Begin Source File
SOURCE=.\zend_alloc.c
# End Source File
# Begin Source File
SOURCE=.\zend_API.c
# End Source File
# Begin Source File
SOURCE=.\zend_builtin_functions.c
# End Source File
# Begin Source File
SOURCE=.\zend_compile.c
# End Source File
# Begin Source File
SOURCE=.\zend_constants.c
# End Source File
# Begin Source File
SOURCE=.\zend_execute.c
# End Source File
# Begin Source File
SOURCE=.\zend_execute_API.c
# End Source File
# Begin Source File
SOURCE=.\zend_extensions.c
# End Source File
# Begin Source File
SOURCE=.\zend_hash.c
# End Source File
# Begin Source File
SOURCE=.\zend_highlight.c
# End Source File
# Begin Source File
SOURCE=.\zend_indent.c
# End Source File
# Begin Source File
SOURCE=.\zend_ini.c
# End Source File
# Begin Source File
SOURCE=.\zend_ini_parser.c
# End Source File
# Begin Source File
SOURCE=.\zend_ini_scanner.c
# End Source File
# Begin Source File
SOURCE=".\zend_language_parser.c"
# End Source File
# Begin Source File
SOURCE=".\zend_language_scanner.c"
# End Source File
# Begin Source File
SOURCE=.\zend_list.c
# End Source File
# Begin Source File
SOURCE=.\zend_llist.c
# End Source File
# Begin Source File
SOURCE=.\zend_objects.c
# End Source File
# Begin Source File
SOURCE=.\zend_opcode.c
# End Source File
# Begin Source File
SOURCE=.\zend_operators.c
# End Source File
# Begin Source File
SOURCE=.\zend_ptr_stack.c
# End Source File
# Begin Source File
SOURCE=.\zend_qsort.c
# End Source File
# Begin Source File
SOURCE=.\zend_sprintf.c
# End Source File
# Begin Source File
SOURCE=.\zend_stack.c
# End Source File
# Begin Source File
SOURCE=.\zend_variables.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\FlexLexer.h
# End Source File
# Begin Source File
SOURCE=.\zend.h
# End Source File
# Begin Source File
SOURCE=.\zend_alloc.h
# End Source File
# Begin Source File
SOURCE=.\zend_API.h
# End Source File
# Begin Source File
SOURCE=.\zend_builtin_functions.h
# End Source File
# Begin Source File
SOURCE=.\zend_compile.h
# End Source File
# Begin Source File
SOURCE=.\zend_config.w32.h
# End Source File
# Begin Source File
SOURCE=.\zend_constants.h
# End Source File
# Begin Source File
SOURCE=.\zend_errors.h
# End Source File
# Begin Source File
SOURCE=.\zend_execute.h
# End Source File
# Begin Source File
SOURCE=.\zend_extensions.h
# End Source File
# Begin Source File
SOURCE=.\zend_fast_cache.h
# End Source File
# Begin Source File
SOURCE=.\zend_globals.h
# End Source File
# Begin Source File
SOURCE=.\zend_hash.h
# End Source File
# Begin Source File
SOURCE=.\zend_highlight.h
# End Source File
# Begin Source File
SOURCE=.\zend_indent.h
# End Source File
# Begin Source File
SOURCE=.\zend_ini.h
# End Source File
# Begin Source File
SOURCE=".\zend_language_parser.h"
# End Source File
# Begin Source File
SOURCE=".\zend_language_scanner.h"
# End Source File
# Begin Source File
SOURCE=.\zend_list.h
# End Source File
# Begin Source File
SOURCE=.\zend_llist.h
# End Source File
# Begin Source File
SOURCE=.\zend_modules.h
# End Source File
# Begin Source File
SOURCE=.\zend_operators.h
# End Source File
# Begin Source File
SOURCE=.\zend_ptr_stack.h
# End Source File
# Begin Source File
SOURCE=.\zend_qsort.h
# End Source File
# Begin Source File
SOURCE=.\zend_stack.h
# End Source File
# Begin Source File
SOURCE=.\zend_variables.h
# End Source File
# End Group
# Begin Group "Parsers"
# PROP Default_Filter "y"
# Begin Source File
SOURCE=.\zend_ini_parser.y
!IF "$(CFG)" == "Zend - Win32 Release"
!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
# Begin Custom Build
InputDir=.
InputPath=.\zend_ini_parser.y
BuildCmds= \
bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y
"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend_ini_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
!ENDIF
# End Source File
# Begin Source File
SOURCE=".\zend_language_parser.y"
!IF "$(CFG)" == "Zend - Win32 Release"
# Begin Custom Build
InputDir=.
InputPath=".\zend_language_parser.y"
BuildCmds= \
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
# Begin Custom Build
InputDir=.
InputPath=".\zend_language_parser.y"
BuildCmds= \
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
# Begin Custom Build
InputDir=.
InputPath=".\zend_language_parser.y"
BuildCmds= \
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ENDIF
# End Source File
# End Group
# Begin Group "Scanners"
# PROP Default_Filter "l"
# Begin Source File
SOURCE=.\flex.skl
# End Source File
# Begin Source File
SOURCE=.\zend_ini_scanner.l
!IF "$(CFG)" == "Zend - Win32 Release"
!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
# Begin Custom Build
InputPath=.\zend_ini_scanner.l
"zend_ini_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.c zend_ini_scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
!ENDIF
# End Source File
# Begin Source File
SOURCE=".\zend_language_scanner.l"
!IF "$(CFG)" == "Zend - Win32 Release"
# Begin Custom Build
InputPath=".\zend_language_scanner.l"
"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -i -Pzend -ozend_language_scanner.c zend_language_scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
# Begin Custom Build
InputPath=".\zend_language_scanner.l"
"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -i -Pzend -ozend_language_scanner.c zend_language_scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
# Begin Custom Build
InputPath=".\zend_language_scanner.l"
"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -i -Pzend -ozend_language_scanner.c zend_language_scanner.l
# End Custom Build
!ENDIF
# End Source File
# End Group
# Begin Group "Text Files"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\ZEND_BUGS
# End Source File
# Begin Source File
SOURCE=.\ZEND_CHANGES
# End Source File
# Begin Source File
SOURCE=.\ZEND_TODO
# End Source File
# End Group
# Begin Group "Resources"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\zend.ico
# End Source File
# End Group
# End Target
# End Project
-202
View File
@@ -1,202 +0,0 @@
dnl
dnl $Id$
dnl
dnl This file contains Zend specific autoconf functions.
dnl
AC_DEFUN(LIBZEND_BISON_CHECK,[
if test "$YACC" != "bison -y"; then
AC_MSG_WARN(You will need bison if you want to regenerate the Zend parser.)
else
AC_MSG_CHECKING(bison version)
set `bison --version| grep 'GNU Bison' | cut -d ' ' -f 4 | sed -e 's/\./ /'`
if test "${1}" = "1" -a "${2}" -lt "28"; then
AC_MSG_WARN(You will need bison 1.28 if you want to regenerate the Zend parser (found ${1}.${2}).)
fi
AC_MSG_RESULT(${1}.${2} (ok))
fi
])
AC_DEFUN(LIBZEND_BASIC_CHECKS,[
AC_REQUIRE([AC_PROG_YACC])
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_PROG_CC_C_O])
AC_REQUIRE([AC_PROG_LEX])
AC_REQUIRE([AC_HEADER_STDC])
AC_REQUIRE([AC_PROG_LIBTOOL])
LIBZEND_BISON_CHECK
dnl Ugly hack to get around a problem with gcc on AIX.
if test "$CC" = "gcc" -a "$ac_cv_prog_cc_g" = "yes" -a \
"`uname -sv`" = "AIX 4"; then
CFLAGS=`echo $CFLAGS | sed -e 's/-g//'`
fi
dnl Hack to work around a Mac OS X cpp problem
dnl Known versions needing this workaround are 5.3 and 5.4
if test "$ac_cv_prog_gcc" = "yes" -a "`uname -s`" = "Rhapsody"; then
CPPFLAGS="$CPPFLAGS -traditional-cpp"
fi
AC_CHECK_HEADERS(
limits.h \
malloc.h \
string.h \
unistd.h \
stdarg.h \
sys/types.h \
sys/time.h \
signal.h \
unix.h \
dlfcn.h)
AC_TYPE_SIZE_T
AC_TYPE_SIGNAL
AC_CHECK_LIB(dl, dlopen, [LIBS="-ldl $LIBS"])
AC_CHECK_FUNC(dlopen,[AC_DEFINE(HAVE_LIBDL, 1,[ ])])
dnl
dnl Ugly hack to check if dlsym() requires a leading underscore in symbol name.
dnl
AC_MSG_CHECKING([whether dlsym() requires a leading underscore in symbol names])
_LT_AC_TRY_DLOPEN_SELF([
AC_MSG_RESULT(no)
], [
AC_MSG_RESULT(yes)
AC_DEFINE(DLSYM_NEEDS_UNDERSCORE, 1, [Define if dlsym() requires a leading underscore in symbol names. ])
], [
AC_MSG_RESULT(no)
], [])
dnl This is required for QNX and may be some BSD derived systems
AC_CHECK_TYPE( uint, unsigned int )
AC_CHECK_TYPE( ulong, unsigned long )
dnl Checks for library functions.
AC_FUNC_VPRINTF
AC_FUNC_MEMCMP
AC_FUNC_ALLOCA
AC_CHECK_FUNCS(memcpy strdup getpid kill strtod strtol finite fpclass)
AC_ZEND_BROKEN_SPRINTF
AC_CHECK_FUNCS(finite isfinite isinf isnan)
ZEND_FP_EXCEPT
])
AC_DEFUN(LIBZEND_ENABLE_DEBUG,[
AC_ARG_ENABLE(debug,
[ --enable-debug Compile with debugging symbols],[
ZEND_DEBUG=$enableval
],[
ZEND_DEBUG=no
])
])
AC_DEFUN(LIBZEND_OTHER_CHECKS,[
AC_ARG_ENABLE(experimental-zts,
[ --enable-experimental-zts This will most likely break your build],[
ZEND_EXPERIMENTAL_ZTS=$enableval
],[
ZEND_EXPERIMENTAL_ZTS=no
])
AC_ARG_ENABLE(inline-optimization,
[ --enable-inline-optimization If you have much memory and are using
gcc, you might try this.],[
ZEND_INLINE_OPTIMIZATION=$enableval
],[
ZEND_INLINE_OPTIMIZATION=no
])
AC_ARG_ENABLE(memory-limit,
[ --enable-memory-limit Compile with memory limit support. ], [
ZEND_MEMORY_LIMIT=$enableval
],[
ZEND_MEMORY_LIMIT=no
])
AC_MSG_CHECKING(whether to enable experimental ZTS)
AC_MSG_RESULT($ZEND_EXPERIMENTAL_ZTS)
AC_MSG_CHECKING(whether to enable inline optimization for GCC)
AC_MSG_RESULT($ZEND_INLINE_OPTIMIZATION)
AC_MSG_CHECKING(whether to enable a memory limit)
AC_MSG_RESULT($ZEND_MEMORY_LIMIT)
AC_MSG_CHECKING(whether to enable Zend debugging)
AC_MSG_RESULT($ZEND_DEBUG)
if test "$ZEND_DEBUG" = "yes"; then
AC_DEFINE(ZEND_DEBUG,1,[ ])
echo " $CFLAGS" | grep ' -g' >/dev/null || DEBUG_CFLAGS="-g"
if test "$CFLAGS" = "-g -O2"; then
CFLAGS=-g
fi
test -n "$GCC" && DEBUG_CFLAGS="$DEBUG_CFLAGS -Wall"
test -n "$GCC" && test "$USE_MAINTAINER_MODE" = "yes" && \
DEBUG_CFLAGS="$DEBUG_CFLAGS -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations"
else
AC_DEFINE(ZEND_DEBUG,0,[ ])
fi
test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLAGS $DEBUG_CFLAGS"
if test "$ZEND_EXPERIMENTAL_ZTS" = "yes"; then
AC_DEFINE(ZTS,1,[ ])
CFLAGS="$CFLAGS -DZTS"
LIBZEND_CPLUSPLUS_CHECKS
fi
if test "$ZEND_MEMORY_LIMIT" = "yes"; then
AC_DEFINE(MEMORY_LIMIT, 1, [Memory limit])
else
AC_DEFINE(MEMORY_LIMIT, 0, [Memory limit])
fi
changequote({,})
if test -n "$GCC" && test "$ZEND_INLINE_OPTIMIZATION" != "yes"; then
INLINE_CFLAGS=`echo $ac_n "$CFLAGS $ac_c" | sed s/-O[0-9s]*//`
else
INLINE_CFLAGS="$CFLAGS"
fi
changequote([,])
AC_C_INLINE
AC_SUBST(INLINE_CFLAGS)
])
AC_DEFUN(LIBZEND_CPLUSPLUS_CHECKS,[
])
-258
View File
@@ -1,258 +0,0 @@
# Microsoft Developer Studio Generated Dependency File, included by ZendCore.mak
.\zend_alloc.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_compile.h"\
".\zend_config.w32.h"\
".\zend_execute.h"\
".\zend_llist.h"\
".\zend_ptr_stack.h"\
".\zend_stack.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_globals.h"\
".\zend_hash.h"\
.\alloca.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_config.w32.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_hash.h"\
.\zend_compile.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_compile.h"\
".\zend_config.w32.h"\
".\zend_execute.h"\
".\zend_llist.h"\
".\zend_modules.h"\
".\zend_operators.h"\
".\zend_ptr_stack.h"\
".\zend_stack.h"\
".\zend_variables.h"\
".\zend.h"\
".\zend_API.h"\
".\zend_errors.h"\
".\zend_globals.h"\
".\zend_hash.h"\
".\zend_ini.h"\
.\zend_constants.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_config.w32.h"\
".\zend_constants.h"\
".\zend_operators.h"\
".\zend_variables.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_hash.h"\
.\zend_execute.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_compile.h"\
".\zend_config.w32.h"\
".\zend_constants.h"\
".\zend_execute.h"\
".\zend_llist.h"\
".\zend_modules.h"\
".\zend_operators.h"\
".\zend_ptr_stack.h"\
".\zend_stack.h"\
".\zend_variables.h"\
".\zend.h"\
".\zend_API.h"\
".\zend_errors.h"\
".\zend_globals.h"\
".\zend_hash.h"\
".\zend_ini.h"\
.\zend_highlight.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_compile.h"\
".\zend_config.w32.h"\
".\zend_execute.h"\
".\zend_highlight.h"\
".\zend_llist.h"\
".\zend_ptr_stack.h"\
".\zend_stack.h"\
".\zend_language_parser.tab.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_globals.h"\
".\zend_hash.h"\
.\zend_llist.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_config.w32.h"\
".\zend_llist.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_hash.h"\
.\zend_opcode.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_compile.h"\
".\zend_config.w32.h"\
".\zend_execute.h"\
".\zend_llist.h"\
".\zend_modules.h"\
".\zend_operators.h"\
".\zend_ptr_stack.h"\
".\zend_stack.h"\
".\zend_variables.h"\
".\zend.h"\
".\zend_API.h"\
".\zend_errors.h"\
".\zend_globals.h"\
".\zend_hash.h"\
".\zend_ini.h"\
.\zend_operators.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_compile.h"\
".\zend_config.w32.h"\
".\zend_execute.h"\
".\zend_llist.h"\
".\zend_operators.h"\
".\zend_ptr_stack.h"\
".\zend_stack.h"\
".\zend_variables.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_globals.h"\
".\zend_hash.h"\
.\zend_ptr_stack.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_config.w32.h"\
".\zend_ptr_stack.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_hash.h"\
.\zend_stack.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_config.w32.h"\
".\zend_stack.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_hash.h"\
.\zend_variables.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_compile.h"\
".\zend_config.w32.h"\
".\zend_constants.h"\
".\zend_execute.h"\
".\zend_llist.h"\
".\zend_modules.h"\
".\zend_ptr_stack.h"\
".\zend_stack.h"\
".\zend_variables.h"\
".\zend.h"\
".\zend_API.h"\
".\zend_errors.h"\
".\zend_globals.h"\
".\zend_hash.h"\
".\zend_ini.h"\
".\zend_list.h"\
.\zend.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_config.w32.h"\
".\zend_operators.h"\
".\zend_variables.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_hash.h"\
.\zend_API.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_compile.h"\
".\zend_config.w32.h"\
".\zend_constants.h"\
".\zend_execute.h"\
".\zend_llist.h"\
".\zend_modules.h"\
".\zend_operators.h"\
".\zend_ptr_stack.h"\
".\zend_stack.h"\
".\zend_variables.h"\
".\zend.h"\
".\zend_API.h"\
".\zend_errors.h"\
".\zend_globals.h"\
".\zend_hash.h"\
".\zend_ini.h"\
".\zend_list.h"\
.\zend_hash.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_config.w32.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_hash.h"\
.\zend_ini.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_config.w32.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_hash.h"\
".\zend_ini.h"\
!IF "$(CFG)" == "ZendCore - Win32 Release"
!ELSEIF "$(CFG)" == "ZendCore - Win32 Debug"
!ENDIF
!IF "$(CFG)" == "ZendCore - Win32 Release"
!ELSEIF "$(CFG)" == "ZendCore - Win32 Debug"
!ENDIF
!IF "$(CFG)" == "ZendCore - Win32 Release"
!ELSEIF "$(CFG)" == "ZendCore - Win32 Debug"
!ENDIF
!IF "$(CFG)" == "ZendCore - Win32 Release"
!ELSEIF "$(CFG)" == "ZendCore - Win32 Debug"
!ENDIF
-667
View File
@@ -1,667 +0,0 @@
# Microsoft Developer Studio Project File - Name="ZendTS" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=ZendTS - Win32 Release_TSDbg
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "ZendTS.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "ZendTS.mak" CFG="ZendTS - Win32 Release_TSDbg"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "ZendTS - Win32 Release_TS" (based on "Win32 (x86) Static Library")
!MESSAGE "ZendTS - Win32 Debug_TS" (based on "Win32 (x86) Static Library")
!MESSAGE "ZendTS - Win32 Release_TS_inline" (based on "Win32 (x86) Static Library")
!MESSAGE "ZendTS - Win32 Release_TSDbg" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
# PROP BASE Use_MFC 0
# PROP BASE Output_Dir "Release_TS"
# PROP BASE Intermediate_Dir "Release_TS"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Output_Dir "Release_TS"
# PROP Intermediate_Dir "Release_TS"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDebug_TS" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x40d /d "NDebug_TS"
# ADD RSC /l 0x40d /d "NDebug_TS"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
# PROP BASE Use_MFC 0
# PROP BASE Output_Dir "Debug_TS"
# PROP BASE Intermediate_Dir "Debug_TS"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Output_Dir "Debug_TS"
# PROP Intermediate_Dir "Debug_TS"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_Debug_TS" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_Debug_TS" /D ZEND_DEBUG=1 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c
# ADD BASE RSC /l 0x40d /d "_Debug_TS"
# ADD RSC /l 0x40d /d "_Debug_TS"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TS_inline"
# PROP BASE Use_MFC 0
# PROP BASE Output_Dir "ZendTS___Win32_Release_TS_inline"
# PROP BASE Intermediate_Dir "ZendTS___Win32_Release_TS_inline"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Output_Dir "Release_TS_inline"
# PROP Intermediate_Dir "Release_TS_inline"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "WIN32" /D "_MBCS" /D ZEND_DEBUG=0 /FR /FD /c
# SUBTRACT BASE CPP /YX
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D "ZEND_WIN32_FORCE_INLINE" /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x40d /d "NDebug_TS"
# ADD RSC /l 0x40d /d "NDebug_TS"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
# PROP BASE Use_MFC 0
# PROP BASE Output_Dir "ZendTS___Win32_Release_TSDbg"
# PROP BASE Intermediate_Dir "ZendTS___Win32_Release_TSDbg"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Output_Dir "Release_TSDbg"
# PROP Intermediate_Dir "Release_TSDbg"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
# SUBTRACT BASE CPP /YX
# ADD CPP /nologo /MD /W3 /GX /Zi /Od /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x40d /d "NDebug_TS"
# ADD RSC /l 0x40d /d "NDebug_TS"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ENDIF
# Begin Target
# Name "ZendTS - Win32 Release_TS"
# Name "ZendTS - Win32 Debug_TS"
# Name "ZendTS - Win32 Release_TS_inline"
# Name "ZendTS - Win32 Release_TSDbg"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\zend.c
# End Source File
# Begin Source File
SOURCE=.\zend_alloc.c
# End Source File
# Begin Source File
SOURCE=.\zend_API.c
# End Source File
# Begin Source File
SOURCE=.\zend_builtin_functions.c
# End Source File
# Begin Source File
SOURCE=.\zend_compile.c
# End Source File
# Begin Source File
SOURCE=.\zend_constants.c
# End Source File
# Begin Source File
SOURCE=.\zend_dynamic_array.c
# End Source File
# Begin Source File
SOURCE=.\zend_execute.c
# End Source File
# Begin Source File
SOURCE=.\zend_execute_API.c
# End Source File
# Begin Source File
SOURCE=.\zend_extensions.c
# End Source File
# Begin Source File
SOURCE=.\zend_hash.c
# End Source File
# Begin Source File
SOURCE=.\zend_highlight.c
# End Source File
# Begin Source File
SOURCE=.\zend_indent.c
# End Source File
# Begin Source File
SOURCE=.\zend_ini.c
# End Source File
# Begin Source File
SOURCE=.\zend_ini_parser.c
# End Source File
# Begin Source File
SOURCE=.\zend_ini_scanner.c
# End Source File
# Begin Source File
SOURCE=".\zend_language_parser.c"
# End Source File
# Begin Source File
SOURCE=.\zend_language_scanner.c
# End Source File
# Begin Source File
SOURCE=.\zend_list.c
# End Source File
# Begin Source File
SOURCE=.\zend_llist.c
# End Source File
# Begin Source File
SOURCE=.\zend_object_handlers.c
# End Source File
# Begin Source File
SOURCE=.\zend_objects.c
# End Source File
# Begin Source File
SOURCE=.\zend_opcode.c
# End Source File
# Begin Source File
SOURCE=.\zend_operators.c
# End Source File
# Begin Source File
SOURCE=.\zend_ptr_stack.c
# End Source File
# Begin Source File
SOURCE=.\zend_qsort.c
# End Source File
# Begin Source File
SOURCE=.\zend_sprintf.c
# End Source File
# Begin Source File
SOURCE=.\zend_stack.c
# End Source File
# Begin Source File
SOURCE=.\zend_variables.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\FlexLexer.h
# End Source File
# Begin Source File
SOURCE=.\zend.h
# End Source File
# Begin Source File
SOURCE=.\zend_alloc.h
# End Source File
# Begin Source File
SOURCE=.\zend_API.h
# End Source File
# Begin Source File
SOURCE=.\zend_builtin_functions.h
# End Source File
# Begin Source File
SOURCE=.\zend_compile.h
# End Source File
# Begin Source File
SOURCE=.\zend_config.w32.h
# End Source File
# Begin Source File
SOURCE=.\zend_constants.h
# End Source File
# Begin Source File
SOURCE=.\zend_dynamic_array.h
# End Source File
# Begin Source File
SOURCE=.\zend_errors.h
# End Source File
# Begin Source File
SOURCE=.\zend_execute.h
# End Source File
# Begin Source File
SOURCE=.\zend_execute_locks.h
# End Source File
# Begin Source File
SOURCE=.\zend_extensions.h
# End Source File
# Begin Source File
SOURCE=.\zend_fast_cache.h
# End Source File
# Begin Source File
SOURCE=.\zend_globals.h
# End Source File
# Begin Source File
SOURCE=.\zend_globals_macros.h
# End Source File
# Begin Source File
SOURCE=.\zend_hash.h
# End Source File
# Begin Source File
SOURCE=.\zend_highlight.h
# End Source File
# Begin Source File
SOURCE=.\zend_indent.h
# End Source File
# Begin Source File
SOURCE=.\zend_ini.h
# End Source File
# Begin Source File
SOURCE=.\zend_ini_parser.h
# End Source File
# Begin Source File
SOURCE=.\zend_ini_scanner.h
# End Source File
# Begin Source File
SOURCE=.\zend_istdiostream.h
# End Source File
# Begin Source File
SOURCE=".\zend_language_parser.h"
# End Source File
# Begin Source File
SOURCE=".\zend_language_scanner.h"
# End Source File
# Begin Source File
SOURCE=.\zend_list.h
# End Source File
# Begin Source File
SOURCE=.\zend_llist.h
# End Source File
# Begin Source File
SOURCE=.\zend_modules.h
# End Source File
# Begin Source File
SOURCE=.\zend_object_handlers.h
# End Source File
# Begin Source File
SOURCE=.\zend_objects.h
# End Source File
# Begin Source File
SOURCE=.\zend_operators.h
# End Source File
# Begin Source File
SOURCE=.\zend_ptr_stack.h
# End Source File
# Begin Source File
SOURCE=.\zend_qsort.h
# End Source File
# Begin Source File
SOURCE=.\zend_stack.h
# End Source File
# Begin Source File
SOURCE=.\zend_variables.h
# End Source File
# End Group
# Begin Group "Parsers"
# PROP Default_Filter "y"
# Begin Source File
SOURCE=.\zend_ini_parser.y
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
# Begin Custom Build
InputDir=.
InputPath=.\zend_ini_parser.y
BuildCmds= \
bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y
"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend_ini_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
# Begin Custom Build
InputDir=.
InputPath=.\zend_ini_parser.y
BuildCmds= \
bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y
"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend_ini_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TS_inline"
# Begin Custom Build
InputDir=.
InputPath=.\zend_ini_parser.y
BuildCmds= \
bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y
"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend_ini_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
# Begin Custom Build
InputDir=.
InputPath=.\zend_ini_parser.y
BuildCmds= \
bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y
"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend_ini_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ENDIF
# End Source File
# Begin Source File
SOURCE=".\zend_language_parser.y"
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
# Begin Custom Build
InputDir=.
InputPath=".\zend_language_parser.y"
BuildCmds= \
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
# Begin Custom Build
InputDir=.
InputPath=".\zend_language_parser.y"
BuildCmds= \
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TS_inline"
# Begin Custom Build
InputDir=.
InputPath=".\zend_language_parser.y"
BuildCmds= \
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
# Begin Custom Build
InputDir=.
InputPath=".\zend_language_parser.y"
BuildCmds= \
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ENDIF
# End Source File
# End Group
# Begin Group "Scanners"
# PROP Default_Filter "l"
# Begin Source File
SOURCE=.\flex.skl
# End Source File
# Begin Source File
SOURCE=.\zend_ini_scanner.l
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
# Begin Custom Build
InputPath=.\zend_ini_scanner.l
"zend_ini_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.c zend_ini_scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
# Begin Custom Build
InputPath=.\zend_ini_scanner.l
"zend_ini_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.c zend_ini_scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TS_inline"
# Begin Custom Build
InputPath=.\zend_ini_scanner.l
"zend_ini_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.c zend_ini_scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
# Begin Custom Build
InputPath=.\zend_ini_scanner.l
"zend_ini_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.c zend_ini_scanner.l
# End Custom Build
!ENDIF
# End Source File
# Begin Source File
SOURCE=".\zend_language_scanner.l"
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
# Begin Custom Build
InputPath=".\zend_language_scanner.l"
"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -B -i -Sflex.skl -Pzend -ozend_language_scanner.c zend_language_scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
# Begin Custom Build
InputPath=".\zend_language_scanner.l"
"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -B -i -Sflex.skl -Pzend -ozend_language_scanner.c zend_language_scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TS_inline"
# Begin Custom Build
InputPath=".\zend_language_scanner.l"
"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -B -i -Sflex.skl -Pzend -ozend_language_scanner.c zend_language_scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
# Begin Custom Build
InputPath=".\zend_language_scanner.l"
"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -B -i -Sflex.skl -Pzend -ozend_language_scanner.c zend_language_scanner.l
# End Custom Build
!ENDIF
# End Source File
# End Group
# Begin Group "Text Files"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\LICENSE
# End Source File
# Begin Source File
SOURCE=.\ZEND_BUGS
# End Source File
# Begin Source File
SOURCE=.\ZEND_CHANGES
# End Source File
# End Group
# Begin Group "Resources"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\zend.ico
# End Source File
# End Group
# End Target
# End Project
-76
View File
@@ -1,76 +0,0 @@
#define ZEND_API
#define ZEND_DLEXPORT
@TOP@
#undef uint
#undef ulong
/* Define if you want to enable memory limit support */
#define MEMORY_LIMIT 0
@BOTTOM@
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_IEEEFP_H
# include <ieeefp.h>
#endif
#ifdef HAVE_STRING_H
# include <string.h>
#else
# include <strings.h>
#endif
#if ZEND_BROKEN_SPRINTF
int zend_sprintf(char *buffer, const char *format, ...);
#else
# define zend_sprintf sprintf
#endif
#include <math.h>
#ifdef HAVE_ISNAN
#define zend_isnan(a) isnan(a)
#elif defined(NAN)
#define zend_isnan(a) (((a)==NAN)?1:0)
#elif defined(HAVE_FPCLASS)
#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
#else
#define zend_isnan(a) 0
#endif
#ifdef HAVE_ISINF
#define zend_isinf(a) isinf(a)
#elif defined(INFINITY)
/* Might not work, but is required by ISO C99 */
#define zend_isinf(a) (((a)==INFINITY)?1:0)
#elif defined(HAVE_FPCLASS)
#define zend_isinf(a) ((fpclass(a) == FP_PINF) || (fpclass(a) == FP_NINF))
#else
#define zend_isinf(a) 0
#endif
#ifdef HAVE_FINITE
#define zend_finite(a) finite(a)
#elif defined(HAVE_ISFINITE) || defined(isfinite)
#define zend_finite(a) isfinite(a)
#elif defined(fpclassify)
#define zend_finite(a) ((fpclassify((a))!=FP_INFINITE&&fpclassify((a))!=FP_NAN)?1:0)
#else
#define zend_finite(a) (zend_isnan(a) ? 0 : zend_isinf(a) ? 0 : 1)
#endif
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
-47
View File
@@ -1,47 +0,0 @@
dnl $Id$
dnl
dnl This file contains local autoconf functions.
AC_DEFUN(ZEND_FP_EXCEPT,[
AC_CACHE_CHECK(whether fp_except is defined, ac_cv_type_fp_except,[
AC_TRY_COMPILE([
#include <floatingpoint.h>
],[
fp_except x = (fp_except) 0;
],[
ac_cv_type_fp_except=yes
],[
ac_cv_type_fp_except=no
],[
ac_cv_type_fp_except=no
])])
if test "$ac_cv_type_fp_except" = "yes"; then
AC_DEFINE(HAVE_FP_EXCEPT, 1, [whether floatingpoint.h defines fp_except])
fi
])
dnl
dnl Check for broken sprintf()
dnl
AC_DEFUN(AC_ZEND_BROKEN_SPRINTF,[
AC_CACHE_CHECK(whether sprintf is broken, ac_cv_broken_sprintf,[
AC_TRY_RUN([main() {char buf[20];exit(sprintf(buf,"testing 123")!=11); }],[
ac_cv_broken_sprintf=no
],[
ac_cv_broken_sprintf=yes
],[
ac_cv_broken_sprintf=no
])
])
if test "$ac_cv_broken_sprintf" = "yes"; then
ac_result=1
else
ac_result=0
fi
AC_DEFINE_UNQUOTED(ZEND_BROKEN_SPRINTF, $ac_result, [Whether sprintf is broken])
])
AC_DEFUN(AM_SET_LIBTOOL_VARIABLE,[
LIBTOOL='$(SHELL) $(top_builddir)/libtool $1'
])
-43
View File
@@ -1,43 +0,0 @@
# Makefile to generate build tools
#
# Standard usage:
# make -f build.mk
#
# Written by Sascha Schumann
#
# $Id$
LT_TARGETS = ltmain.sh ltconfig
config_h_in = zend_config.h.in
makefile_am_files = Makefile.am
makefile_in_files = $(makefile_am_files:.am=.in)
makefile_files = $(makefile_am_files:e.am=e)
targets = $(makefile_in_files) $(LT_TARGETS) configure $(config_h_in)
all: $(targets)
clean:
rm -f $(targets)
$(LT_TARGETS):
rm -f $(LT_TARGETS)
libtoolize --automake $(AMFLAGS) -f
$(makefile_in_files): $(makefile_am_files)
automake -a -i $(AMFLAGS) $(makefile_files)
aclocal.m4: configure.in acinclude.m4
aclocal
$(config_h_in): configure.in acconfig.h
# explicitly remove target since autoheader does not seem to work
# correctly otherwise (timestamps are not updated)
@rm -f $@
autoheader
configure: aclocal.m4 configure.in
autoconf
-33
View File
@@ -1,33 +0,0 @@
#!/bin/sh
case "$1" in
--copy)
automake_flags=--copy
shift
;;
esac
libtoolize --force --automake $automake_flags
mv aclocal.m4 aclocal.m4.old 2>/dev/null
aclocal
if cmp aclocal.m4.old aclocal.m4 > /dev/null 2>&1; then
echo "buildconf: keeping ${1}aclocal.m4"
mv aclocal.m4.old aclocal.m4
else
echo "buildconf: created or modified ${1}aclocal.m4"
fi
autoheader
automake --add-missing --include-deps $automake_flags
mv configure configure.old 2>/dev/null
autoconf
if cmp configure.old configure > /dev/null 2>&1; then
echo "buildconf: keeping ${1}configure"
mv configure.old configure
else
echo "buildconf: created or modified ${1}configure"
fi
-45
View File
@@ -1,45 +0,0 @@
dnl $Id$
dnl Process this file with autoconf to produce a configure script.
AC_INIT(zend.c)
AM_INIT_AUTOMAKE(zend, 0.80A, nodefine)
AM_CONFIG_HEADER(zend_config.h)
AM_SANITY_CHECK
AM_MAINTAINER_MODE
AC_PROG_CC
AM_PROG_LEX
AM_PROG_CC_STDC
ZEND_VERSION=$VERSION
dnl We want this one before the checks, so the checks can modify CFLAGS.
test -z "$CFLAGS" && auto_cflags=1
sinclude(Zend.m4)
LIBZEND_BASIC_CHECKS
AM_PROG_LIBTOOL
if test "$enable_debug" != "yes"; then
AM_SET_LIBTOOL_VARIABLE([--silent])
fi
dnl
dnl Check for /usr/pkg/{lib,include} which is where NetBSD puts binary
dnl and source packages. This should be harmless on other OSs.
dnl
if test -d /usr/pkg/include -a -d /usr/pkg/lib ; then
CFLAGS="$CFLAGS -I/usr/pkg/include"
LDFLAGS="$LDFLAGS -L/usr/pkg/lib"
fi
LIBZEND_ENABLE_DEBUG
LIBZEND_OTHER_CHECKS
ZEND_EXTRA_LIBS="$LIBS"
LIBS=""
AC_SUBST(ZEND_EXTRA_LIBS)
AC_OUTPUT(Makefile)
# Local Variables:
# tab-width: 4
# End:
-1628
View File
File diff suppressed because it is too large. Load diff
-339
View File
@@ -1,339 +0,0 @@
Example 1: A singleton (static members)
=======================================
<?php
class Counter {
var $counter = 0;
function increment_and_print()
{
print ++$this->counter;
print "\n";
}
}
class SingletonCounter {
static $m_instance = NULL;
function Instance()
{
if (self::$m_instance == NULL) {
self::$m_instance = new Counter();
}
return self::$m_instance;
}
}
SingletonCounter::Instance()->increment_and_print();
SingletonCounter::Instance()->increment_and_print();
SingletonCounter::Instance()->increment_and_print();
?>
Example 2: Factory method (derefencing objects returned from functions)
=======================================================================
<?php
class Circle {
function draw()
{
print "Circle\n";
}
}
class Square {
function draw()
{
print "Square\n";
}
}
function ShapeFactoryMethod($shape)
{
switch ($shape) {
case "Circle":
return new Circle();
case "Square":
return new Square();
}
}
ShapeFactoryMethod("Circle")->draw();
ShapeFactoryMethod("Square")->draw();
?>
Example 3: Nested class
=======================
<?php
class Database {
class MySQL {
var $host = "";
function db_connect($user) {
print "Connecting to MySQL database '$this->host' as $user\n";
}
}
class Oracle {
var $host = "localhost";
function db_connect($user) {
print "Connecting to Oracle database '$this->host' as $user\n";
}
}
}
$MySQL_obj = new Database::MySQL();
$MySQL_obj->db_connect("John");
$Oracle_obj = new Database::Oracle();
$Oracle_obj->db_connect("Mark");
unset($MySQL_obj);
unset($Oracle_obj);
?>
Example 3: Nested class suitable for a PEAR like hierarchy
==========================================================
<?php
class DB::MySQL {
var $host = "";
function db_connect($user) {
print "Connecting to MySQL database '$this->host' as $user\n";
}
}
class DB::Oracle {
var $host = "localhost";
function db_connect($user) {
print "Connecting to Oracle database '$this->host' as $user\n";
}
}
$MySQL_obj = new DB::MySQL();
$MySQL_obj->db_connect("Susan");
$Oracle_obj = new DB::Oracle();
$Oracle_obj->db_connect("Barbara");
?>
Example 4: Class constants and class scope
==========================================
<?php
class ErrorCodes {
const FATAL = "Fatal error\n";
const WARNING = "Warning\n";
const INFO = "Informational message\n";
function print_fatal_error_codes()
{
print "FATAL = " . FATAL;
print "self::FATAL = " . self::FATAL;
}
}
/* Call the static function and move into the ErrorCodes scope */
ErrorCodes::print_fatal_error_codes();
?>
Example 5: Regular object method using both local and global functions
======================================================================
<?php
class HelloWorld {
const HELLO_WORLD = "Hello, World!\n";
function get_hello_world()
{
return HELLO_WORLD;
}
function length_of_hello_world()
{
$str = get_hello_world();
return strlen($str);
}
}
$obj = new HelloWorld();
print "length_of_hello_world() = " . $obj->length_of_hello_world();
print "\n";
?>
Example 6: Multiple derefencing of objects returned from methods
================================================================
<?php
class Name {
function Name($_name)
{
$this->name = $_name;
}
function display()
{
print $this->name;
print "\n";
}
}
class Person {
function Person($_name, $_address)
{
$this->name = new Name($_name);
}
function getName()
{
return $this->name;
}
}
$person = new Person("John", "New York");
print $person->getName()->display();
?>
Example 7: Exception handling
=============================
<?
class MyException {
function MyException($_error) {
$this->error = $_error;
}
function getException()
{
return $this->error;
}
}
function ThrowException()
{
throw new MyException("'This is an exception!'");
}
try {
} catch (MyException $exception) {
print "There was an exception: " . $exception->getException();
print "\n";
}
try {
ThrowException();
} catch (MyException $exception) {
print "There was an exception: " . $exception->getException();
print "\n";
}
?>
Example 8: __clone()
===================
<?
class MyCloneable {
static $id = 0;
function MyCloneable()
{
$this->id = self::$id++;
}
function __clone()
{
$this->name = $clone->name;
$this->address = "New York";
$this->id = self::$id++;
}
}
$obj = new MyCloneable();
$obj->name = "Hello";
$obj->address = "Tel-Aviv";
print $obj->id;
print "\n";
$obj = $obj->__clone();
print $obj->id;
print "\n";
print $obj->name;
print "\n";
print $obj->address;
print "\n";
?>
Example 9: Unified constructors
===============================
<?
class BaseClass {
function __construct()
{
print "In BaseClass constructor\n";
}
}
class SubClass extends BaseClass {
function __construct()
{
parent::__construct();
print "In SubClass constructor\n";
}
}
$obj = new BaseClass();
$obj = new SubClass();
?>
Example 10: Destructors
=======================
<?php
class MyDestructableClass {
function __construct()
{
print "In constructor\n";
$this->name = "MyDestructableClass";
}
function __destruct()
{
print "Destroying " . $this->name . "\n";
}
}
$obj = new MyDestructableClass();
?>
-876
View File
@@ -1,876 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include "zend.h"
#include "zend_extensions.h"
#include "zend_modules.h"
#include "zend_constants.h"
#include "zend_list.h"
#include "zend_API.h"
#include "zend_builtin_functions.h"
#include "zend_ini.h"
#ifdef ZTS
# define GLOBAL_FUNCTION_TABLE &global_main_class.function_table
# define GLOBAL_CLASS_TABLE &global_main_class.class_table
# define GLOBAL_CONSTANTS_TABLE &global_main_class.constants_table
# define GLOBAL_AUTO_GLOBALS_TABLE global_auto_globals_table
#else
# define GLOBAL_FUNCTION_TABLE CG(function_table)
# define GLOBAL_CLASS_TABLE CG(class_table)
# define GLOBAL_CONSTANTS_TABLE CG(zend_constants)
# define GLOBAL_AUTO_GLOBALS_TABLE CG(auto_globals)
#endif
#if defined(ZEND_WIN32) && ZEND_DEBUG
BOOL WINAPI IsDebuggerPresent(VOID);
#endif
/* true multithread-shared globals */
ZEND_API zend_class_entry *zend_standard_class_def = NULL;
ZEND_API int (*zend_printf)(const char *format, ...);
ZEND_API zend_write_func_t zend_write;
ZEND_API FILE *(*zend_fopen)(const char *filename, char **opened_path);
ZEND_API void (*zend_block_interruptions)(void);
ZEND_API void (*zend_unblock_interruptions)(void);
ZEND_API void (*zend_ticks_function)(int ticks);
ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
static void (*zend_message_dispatcher_p)(long message, void *data);
static int (*zend_get_configuration_directive_p)(char *name, uint name_length, zval *contents);
#ifdef ZTS
ZEND_API int compiler_globals_id;
ZEND_API int executor_globals_id;
ZEND_API int alloc_globals_id;
zend_class_entry global_main_class;
HashTable *global_auto_globals_table;
#endif
zend_utility_values zend_uv;
ZEND_API zval zval_used_for_init; /* True global variable */
/* version information */
static char *zend_version_info;
static uint zend_version_info_length;
#define ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998-2002 Zend Technologies\n"
#define PRINT_ZVAL_INDENT 4
static void print_hash(HashTable *ht, int indent)
{
zval **tmp;
char *string_key;
HashPosition iterator;
ulong num_key;
uint str_len;
int i;
for (i=0; i<indent; i++) {
ZEND_PUTS(" ");
}
ZEND_PUTS("(\n");
indent += PRINT_ZVAL_INDENT;
zend_hash_internal_pointer_reset_ex(ht, &iterator);
while (zend_hash_get_current_data_ex(ht, (void **) &tmp, &iterator) == SUCCESS) {
for (i=0; i<indent; i++) {
ZEND_PUTS(" ");
}
ZEND_PUTS("[");
switch (zend_hash_get_current_key_ex(ht, &string_key, &str_len, &num_key, 0, &iterator)) {
case HASH_KEY_IS_STRING:
ZEND_PUTS(string_key);
break;
case HASH_KEY_IS_LONG:
zend_printf("%ld", num_key);
break;
}
ZEND_PUTS("] => ");
zend_print_zval_r(*tmp, indent+PRINT_ZVAL_INDENT);
ZEND_PUTS("\n");
zend_hash_move_forward_ex(ht, &iterator);
}
indent -= PRINT_ZVAL_INDENT;
for (i=0; i<indent; i++) {
ZEND_PUTS(" ");
}
ZEND_PUTS(")\n");
}
ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_copy)
{
if (expr->type==IS_STRING) {
*use_copy = 0;
return;
}
switch (expr->type) {
case IS_NULL:
expr_copy->value.str.len = 0;
expr_copy->value.str.val = empty_string;
break;
case IS_BOOL:
if (expr->value.lval) {
expr_copy->value.str.len = 1;
expr_copy->value.str.val = estrndup("1", 1);
} else {
expr_copy->value.str.len = 0;
expr_copy->value.str.val = empty_string;
}
break;
case IS_RESOURCE:
expr_copy->value.str.val = (char *) emalloc(sizeof("Resource id #")-1 + MAX_LENGTH_OF_LONG);
expr_copy->value.str.len = sprintf(expr_copy->value.str.val, "Resource id #%ld", expr->value.lval);
break;
case IS_ARRAY:
expr_copy->value.str.len = sizeof("Array")-1;
expr_copy->value.str.val = estrndup("Array", expr_copy->value.str.len);
break;
case IS_OBJECT:
expr_copy->value.str.val = (char *) emalloc(sizeof("Object id #")-1 + MAX_LENGTH_OF_LONG);
expr_copy->value.str.len = sprintf(expr_copy->value.str.val, "Object id #%ld", (long)expr->value.obj.handle);
#if 0
/* FIXME: This might break BC for some people */
expr_copy->value.str.len = sizeof("Object")-1;
expr_copy->value.str.val = estrndup("Object", expr_copy->value.str.len);
#endif
break;
default:
*expr_copy = *expr;
zval_copy_ctor(expr_copy);
convert_to_string(expr_copy);
break;
}
expr_copy->type = IS_STRING;
*use_copy = 1;
}
ZEND_API int zend_print_zval(zval *expr, int indent)
{
return zend_print_zval_ex(zend_write, expr, indent);
}
ZEND_API int zend_print_zval_ex(zend_write_func_t write_func, zval *expr, int indent)
{
zval expr_copy;
int use_copy;
zend_make_printable_zval(expr, &expr_copy, &use_copy);
if (use_copy) {
expr = &expr_copy;
}
if (expr->value.str.len==0) { /* optimize away empty strings */
if (use_copy) {
zval_dtor(expr);
}
return 0;
}
write_func(expr->value.str.val, expr->value.str.len);
if (use_copy) {
zval_dtor(expr);
}
return expr->value.str.len;
}
ZEND_API void zend_print_zval_r(zval *expr, int indent)
{
zend_print_zval_r_ex(zend_write, expr, indent);
}
ZEND_API void zend_print_zval_r_ex(zend_write_func_t write_func, zval *expr, int indent)
{
switch(expr->type) {
case IS_ARRAY:
ZEND_PUTS("Array\n");
if (++expr->value.ht->nApplyCount>1) {
ZEND_PUTS(" *RECURSION*");
expr->value.ht->nApplyCount=0;
return;
}
print_hash(expr->value.ht, indent);
expr->value.ht->nApplyCount--;
break;
case IS_OBJECT:
{
zend_object *object = Z_OBJ_P(expr);
if (++object->properties->nApplyCount>1) {
ZEND_PUTS(" *RECURSION*");
object->properties->nApplyCount=0;
return;
}
zend_printf("%s Object\n", object->ce->name);
print_hash(object->properties, indent);
object->properties->nApplyCount--;
break;
}
default:
zend_print_variable(expr);
break;
}
}
static FILE *zend_fopen_wrapper(const char *filename, char **opened_path)
{
if (opened_path) {
*opened_path = estrdup(filename);
}
return fopen(filename, "rb");
}
static void register_standard_class(void)
{
zend_standard_class_def = malloc(sizeof(zend_class_entry));
zend_standard_class_def->type = ZEND_INTERNAL_CLASS;
zend_standard_class_def->name_length = sizeof("stdClass") - 1;
zend_standard_class_def->name = zend_strndup("stdClass", zend_standard_class_def->name_length);
zend_standard_class_def->parent = NULL;
zend_hash_init_ex(&zend_standard_class_def->default_properties, 0, NULL, ZVAL_PTR_DTOR, 1, 0);
zend_hash_init_ex(&zend_standard_class_def->private_properties, 0, NULL, ZVAL_PTR_DTOR, 1, 0);
zend_standard_class_def->static_members = (HashTable *) malloc(sizeof(HashTable));
zend_hash_init_ex(zend_standard_class_def->static_members, 0, NULL, ZVAL_PTR_DTOR, 1, 0);
zend_hash_init_ex(&zend_standard_class_def->constants_table, 0, NULL, ZVAL_PTR_DTOR, 1, 0);
zend_hash_init_ex(&zend_standard_class_def->class_table, 10, NULL, ZEND_CLASS_DTOR, 1, 0);
zend_hash_init_ex(&zend_standard_class_def->function_table, 0, NULL, ZEND_FUNCTION_DTOR, 1, 0);
zend_standard_class_def->constructor = NULL;
zend_standard_class_def->destructor = NULL;
zend_standard_class_def->clone = NULL;
zend_standard_class_def->handle_function_call = NULL;
zend_standard_class_def->handle_property_get = NULL;
zend_standard_class_def->handle_property_set = NULL;
zend_standard_class_def->refcount = 1;
zend_hash_add(GLOBAL_CLASS_TABLE, "stdclass", sizeof("stdclass"), &zend_standard_class_def, sizeof(zend_class_entry *), NULL);
}
static void zend_set_default_compile_time_values(TSRMLS_D)
{
/* default compile-time values */
CG(asp_tags) = 0;
CG(short_tags) = 1;
CG(allow_call_time_pass_reference) = 1;
CG(extended_info) = 0;
}
#ifdef ZTS
static void compiler_globals_ctor(zend_compiler_globals *compiler_globals TSRMLS_DC)
{
zend_function tmp_func;
zend_class_entry tmp_class;
compiler_globals->compiled_filename = NULL;
compiler_globals->function_table = &compiler_globals->main_class.function_table;
zend_hash_init_ex(compiler_globals->function_table, 100, NULL, ZEND_FUNCTION_DTOR, 1, 0);
zend_hash_copy(compiler_globals->function_table, GLOBAL_FUNCTION_TABLE, NULL, &tmp_func, sizeof(zend_function));
compiler_globals->class_table = &compiler_globals->main_class.class_table;
zend_hash_init_ex(compiler_globals->class_table, 10, NULL, ZEND_CLASS_DTOR, 1, 0);
zend_hash_copy(compiler_globals->class_table, GLOBAL_CLASS_TABLE, (copy_ctor_func_t) zend_class_add_ref, &tmp_class, sizeof(zend_class_entry));
zend_set_default_compile_time_values(TSRMLS_C);
CG(interactive) = 0;
compiler_globals->auto_globals = (HashTable *) malloc(sizeof(HashTable));
zend_hash_init_ex(compiler_globals->auto_globals, 8, NULL, NULL, 1, 0);
zend_hash_copy(compiler_globals->auto_globals, global_auto_globals_table, NULL, NULL, sizeof(void *) /* empty element */);
}
static void compiler_globals_dtor(zend_compiler_globals *compiler_globals TSRMLS_DC)
{
if (compiler_globals->function_table != GLOBAL_FUNCTION_TABLE) {
zend_hash_destroy(compiler_globals->function_table);
}
if (compiler_globals->class_table != GLOBAL_CLASS_TABLE) {
zend_hash_destroy(compiler_globals->class_table);
}
if (compiler_globals->auto_globals != global_auto_globals_table) {
zend_hash_destroy(compiler_globals->auto_globals);
free(compiler_globals->auto_globals);
}
}
static void executor_globals_ctor(zend_executor_globals *executor_globals TSRMLS_DC)
{
if (GLOBAL_CONSTANTS_TABLE) {
zend_startup_constants(TSRMLS_C);
zend_copy_constants(EG(zend_constants), GLOBAL_CONSTANTS_TABLE);
}
zend_init_rsrc_plist(TSRMLS_C);
EG(lambda_count)=0;
EG(user_error_handler) = NULL;
EG(in_execution) = 0;
}
static void executor_globals_dtor(zend_executor_globals *executor_globals TSRMLS_DC)
{
zend_shutdown_constants(TSRMLS_C);
zend_destroy_rsrc_list(&EG(persistent_list) TSRMLS_CC);
zend_ini_shutdown(TSRMLS_C);
}
static void zend_new_thread_end_handler(THREAD_T thread_id TSRMLS_DC)
{
zend_copy_ini_directives(TSRMLS_C);
zend_ini_refresh_caches(ZEND_INI_STAGE_STARTUP TSRMLS_CC);
}
#endif
static void alloc_globals_ctor(zend_alloc_globals *alloc_globals_p TSRMLS_DC)
{
start_memory_manager(TSRMLS_C);
}
static void alloc_globals_dtor(zend_alloc_globals *alloc_globals_p TSRMLS_DC)
{
shutdown_memory_manager(0, 1 TSRMLS_CC);
}
#ifdef __FreeBSD__
/* FreeBSD floating point precision fix */
#include <floatingpoint.h>
#endif
static void scanner_globals_ctor(zend_scanner_globals *scanner_globals_p TSRMLS_DC)
{
scanner_globals_p->c_buf_p = (char *) 0;
scanner_globals_p->init = 1;
scanner_globals_p->start = 0;
scanner_globals_p->current_buffer = NULL;
scanner_globals_p->yy_in = NULL;
scanner_globals_p->yy_out = NULL;
scanner_globals_p->_yy_more_flag = 0;
scanner_globals_p->_yy_more_len = 0;
}
int zend_startup(zend_utility_functions *utility_functions, char **extensions, int start_builtin_functions)
{
#ifdef ZTS
zend_compiler_globals *compiler_globals;
zend_executor_globals *executor_globals;
void ***tsrm_ls;
#ifdef ZTS
extern ZEND_API ts_rsrc_id ini_scanner_globals_id;
extern ZEND_API ts_rsrc_id language_scanner_globals_id;
#else
extern zend_scanner_globals ini_scanner_globals;
extern zend_scanner_globals language_scanner_globals;
#endif
ts_allocate_id(&alloc_globals_id, sizeof(zend_alloc_globals), (ts_allocate_ctor) alloc_globals_ctor, (ts_allocate_dtor) alloc_globals_dtor);
#else
alloc_globals_ctor(&alloc_globals TSRMLS_CC);
#endif
#ifdef __FreeBSD__
/* FreeBSD floating point precision fix */
fpsetmask(0);
#endif
zend_startup_extensions_mechanism();
/* Set up utility functions and values */
zend_error_cb = utility_functions->error_function;
zend_printf = utility_functions->printf_function;
zend_write = (zend_write_func_t) utility_functions->write_function;
zend_fopen = utility_functions->fopen_function;
if (!zend_fopen) {
zend_fopen = zend_fopen_wrapper;
}
zend_message_dispatcher_p = utility_functions->message_handler;
zend_block_interruptions = utility_functions->block_interruptions;
zend_unblock_interruptions = utility_functions->unblock_interruptions;
zend_get_configuration_directive_p = utility_functions->get_configuration_directive;
zend_ticks_function = utility_functions->ticks_function;
zend_compile_file = compile_file;
zend_execute = execute;
/* set up version */
zend_version_info = strdup(ZEND_CORE_VERSION_INFO);
zend_version_info_length = sizeof(ZEND_CORE_VERSION_INFO)-1;
#ifndef ZTS
GLOBAL_FUNCTION_TABLE = &compiler_globals.main_class.function_table;
GLOBAL_CLASS_TABLE = &compiler_globals.main_class.class_table;
#endif
GLOBAL_AUTO_GLOBALS_TABLE = (HashTable *) malloc(sizeof(HashTable));
zend_hash_init_ex(GLOBAL_FUNCTION_TABLE, 100, NULL, ZEND_FUNCTION_DTOR, 1, 0);
zend_hash_init_ex(GLOBAL_CLASS_TABLE, 10, NULL, ZEND_CLASS_DTOR, 1, 0);
zend_hash_init_ex(GLOBAL_AUTO_GLOBALS_TABLE, 8, NULL, NULL, 1, 0);
register_standard_class();
zend_hash_init_ex(&module_registry, 50, NULL, ZEND_MODULE_DTOR, 1, 0);
zend_init_rsrc_list_dtors();
/* This zval can be used to initialize allocate zval's to an uninit'ed value */
zval_used_for_init.is_ref = 0;
zval_used_for_init.refcount = 1;
zval_used_for_init.type = IS_NULL;
#ifdef ZTS
ts_allocate_id(&compiler_globals_id, sizeof(zend_compiler_globals), (ts_allocate_ctor) compiler_globals_ctor, (ts_allocate_dtor) compiler_globals_dtor);
ts_allocate_id(&executor_globals_id, sizeof(zend_executor_globals), (ts_allocate_ctor) executor_globals_ctor, (ts_allocate_dtor) executor_globals_dtor);
ts_allocate_id(&language_scanner_globals_id, sizeof(zend_scanner_globals), (ts_allocate_ctor) scanner_globals_ctor, NULL);
ts_allocate_id(&ini_scanner_globals_id, sizeof(zend_scanner_globals), (ts_allocate_ctor) scanner_globals_ctor, NULL);
compiler_globals = ts_resource(compiler_globals_id);
executor_globals = ts_resource(executor_globals_id);
tsrm_ls = ts_resource_ex(0, NULL);
compiler_globals_dtor(compiler_globals, tsrm_ls);
*compiler_globals->function_table = *GLOBAL_FUNCTION_TABLE;
*compiler_globals->class_table = *GLOBAL_CLASS_TABLE;
compiler_globals->auto_globals = GLOBAL_AUTO_GLOBALS_TABLE;
zend_startup_constants(tsrm_ls);
#else
zend_hash_init_ex(CG(auto_globals), 8, NULL, NULL, 1, 0);
scanner_globals_ctor(&ini_scanner_globals TSRMLS_CC);
scanner_globals_ctor(&language_scanner_globals TSRMLS_CC);
zend_startup_constants();
zend_set_default_compile_time_values(TSRMLS_C);
EG(user_error_handler) = NULL;
#endif
zend_register_standard_constants(TSRMLS_C);
#ifndef ZTS
zend_init_rsrc_plist(TSRMLS_C);
#endif
if (start_builtin_functions) {
zend_startup_builtin_functions(TSRMLS_C);
}
zend_ini_startup(TSRMLS_C);
#ifdef ZTS
tsrm_set_new_thread_end_handler(zend_new_thread_end_handler);
*GLOBAL_FUNCTION_TABLE = *compiler_globals->function_table;
*GLOBAL_CLASS_TABLE = *compiler_globals->class_table;
#endif
return SUCCESS;
}
void zend_shutdown(TSRMLS_D)
{
#ifdef ZEND_WIN32
zend_shutdown_timeout_thread();
#endif
#ifndef ZTS
zend_destroy_rsrc_list(&EG(persistent_list) TSRMLS_CC);
#endif
zend_destroy_rsrc_list_dtors();
zend_hash_destroy(&module_registry);
#ifndef ZTS
/* In ZTS mode these are freed by compiler_globals_dtor() */
zend_hash_destroy(GLOBAL_FUNCTION_TABLE);
zend_hash_destroy(GLOBAL_CLASS_TABLE);
#endif
zend_hash_destroy(GLOBAL_AUTO_GLOBALS_TABLE);
free(GLOBAL_AUTO_GLOBALS_TABLE);
zend_shutdown_extensions(TSRMLS_C);
free(zend_version_info);
#ifndef ZTS
zend_shutdown_constants();
#endif
}
void zend_set_utility_values(zend_utility_values *utility_values)
{
zend_uv = *utility_values;
zend_uv.import_use_extension_length = strlen(zend_uv.import_use_extension);
}
/* this should be compatible with the standard zenderror */
void zenderror(char *error)
{
zend_error(E_PARSE, error);
}
BEGIN_EXTERN_C()
ZEND_API void _zend_bailout(char *filename, uint lineno)
{
TSRMLS_FETCH();
if (!EG(bailout_set)) {
zend_output_debug_string(1, "%s(%d) : Bailed out without a bailout address!", filename, lineno);
exit(-1);
}
CG(unclean_shutdown) = 1;
CG(in_compilation) = EG(in_execution) = 0;
longjmp(EG(bailout), FAILURE);
}
END_EXTERN_C()
void zend_append_version_info(zend_extension *extension)
{
char *new_info;
uint new_info_length;
new_info_length = sizeof(" with v, by \n")
+ strlen(extension->name)
+ strlen(extension->version)
+ strlen(extension->copyright)
+ strlen(extension->author);
new_info = (char *) malloc(new_info_length+1);
sprintf(new_info, " with %s v%s, %s, by %s\n", extension->name, extension->version, extension->copyright, extension->author);
zend_version_info = (char *) realloc(zend_version_info, zend_version_info_length+new_info_length+1);
strcat(zend_version_info, new_info);
zend_version_info_length += new_info_length;
free(new_info);
}
ZEND_API char *get_zend_version()
{
return zend_version_info;
}
void zend_activate(TSRMLS_D)
{
init_compiler(TSRMLS_C);
init_executor(TSRMLS_C);
startup_scanner(TSRMLS_C);
}
void zend_activate_modules(TSRMLS_D)
{
zend_hash_apply(&module_registry, (apply_func_t) module_registry_request_startup TSRMLS_CC);
}
void zend_deactivate_modules(TSRMLS_D)
{
EG(opline_ptr) = NULL; /* we're no longer executing anything */
zend_try {
zend_hash_apply(&module_registry, (apply_func_t) module_registry_cleanup TSRMLS_CC);
} zend_end_try();
}
void zend_deactivate(TSRMLS_D)
{
/* we're no longer executing anything */
EG(opline_ptr) = NULL;
EG(active_symbol_table) = NULL;
zend_try {
shutdown_scanner(TSRMLS_C);
} zend_end_try();
/* shutdown_executor() takes care of its own bailout handling */
shutdown_executor(TSRMLS_C);
zend_try {
shutdown_compiler(TSRMLS_C);
} zend_end_try();
zend_try {
zend_ini_deactivate(TSRMLS_C);
} zend_end_try();
}
BEGIN_EXTERN_C()
ZEND_API void zend_message_dispatcher(long message, void *data)
{
if (zend_message_dispatcher_p) {
zend_message_dispatcher_p(message, data);
}
}
END_EXTERN_C()
ZEND_API int zend_get_configuration_directive(char *name, uint name_length, zval *contents)
{
if (zend_get_configuration_directive_p) {
return zend_get_configuration_directive_p(name, name_length, contents);
} else {
return FAILURE;
}
}
#define ZEND_ERROR_BUFFER_SIZE 1024
ZEND_API void zend_error(int type, const char *format, ...)
{
va_list args;
zval ***params;
zval *retval;
zval *z_error_type, *z_error_message, *z_error_filename, *z_error_lineno, *z_context;
char *error_filename;
uint error_lineno;
zval *orig_user_error_handler;
TSRMLS_FETCH();
/* Obtain relevant filename and lineno */
switch (type) {
case E_CORE_ERROR:
case E_CORE_WARNING:
error_filename = NULL;
error_lineno = 0;
break;
case E_PARSE:
case E_COMPILE_ERROR:
case E_COMPILE_WARNING:
case E_ERROR:
case E_NOTICE:
case E_WARNING:
case E_USER_ERROR:
case E_USER_WARNING:
case E_USER_NOTICE:
if (zend_is_compiling(TSRMLS_C)) {
error_filename = zend_get_compiled_filename(TSRMLS_C);
error_lineno = zend_get_compiled_lineno(TSRMLS_C);
} else if (zend_is_executing(TSRMLS_C)) {
error_filename = zend_get_executed_filename(TSRMLS_C);
error_lineno = zend_get_executed_lineno(TSRMLS_C);
} else {
error_filename = NULL;
error_lineno = 0;
}
break;
default:
error_filename = NULL;
error_lineno = 0;
break;
}
if (!error_filename) {
error_filename = "Unknown";
}
va_start(args, format);
/* if we don't have a user defined error handler */
if (!EG(user_error_handler)) {
zend_error_cb(type, error_filename, error_lineno, format, args);
} else switch (type) {
case E_ERROR:
case E_PARSE:
case E_CORE_ERROR:
case E_CORE_WARNING:
case E_COMPILE_ERROR:
case E_COMPILE_WARNING:
/* The error may not be safe to handle in user-space */
zend_error_cb(type, error_filename, error_lineno, format, args);
break;
default:
/* Handle the error in user space */
ALLOC_INIT_ZVAL(z_error_message);
ALLOC_INIT_ZVAL(z_error_type);
ALLOC_INIT_ZVAL(z_error_filename);
ALLOC_INIT_ZVAL(z_error_lineno);
ALLOC_INIT_ZVAL(z_context);
z_error_message->value.str.val = (char *) emalloc(ZEND_ERROR_BUFFER_SIZE);
#ifdef HAVE_VSNPRINTF
z_error_message->value.str.len = vsnprintf(z_error_message->value.str.val, ZEND_ERROR_BUFFER_SIZE, format, args);
if (z_error_message->value.str.len > ZEND_ERROR_BUFFER_SIZE-1) {
z_error_message->value.str.len = ZEND_ERROR_BUFFER_SIZE-1;
}
#else
strncpy(z_error_message->value.str.val, format, ZEND_ERROR_BUFFER_SIZE);
/* This is risky... */
/* z_error_message->value.str.len = vsprintf(z_error_message->value.str.val, format, args); */
#endif
z_error_message->type = IS_STRING;
z_error_type->value.lval = type;
z_error_type->type = IS_LONG;
if (error_filename) {
z_error_filename->value.str.len = strlen(error_filename);
z_error_filename->value.str.val = estrndup(error_filename, z_error_filename->value.str.len);
z_error_filename->type = IS_STRING;
}
z_error_lineno->value.lval = error_lineno;
z_error_lineno->type = IS_LONG;
z_context->value.ht = EG(active_symbol_table);
z_context->type = IS_ARRAY;
ZVAL_ADDREF(z_context); /* we don't want this one to be freed */
params = (zval ***) emalloc(sizeof(zval **)*5);
params[0] = &z_error_type;
params[1] = &z_error_message;
params[2] = &z_error_filename;
params[3] = &z_error_lineno;
params[4] = &z_context;
orig_user_error_handler = EG(user_error_handler);
EG(user_error_handler) = NULL;
if (call_user_function_ex(CG(function_table), NULL, orig_user_error_handler, &retval, 5, params, 1, NULL TSRMLS_CC)==SUCCESS) {
zval_ptr_dtor(&retval);
} else {
/* The user error handler failed, use built-in error handler */
zend_error_cb(type, error_filename, error_lineno, format, args);
}
EG(user_error_handler) = orig_user_error_handler;
efree(params);
zval_ptr_dtor(&z_error_message);
zval_ptr_dtor(&z_error_type);
zval_ptr_dtor(&z_error_filename);
zval_ptr_dtor(&z_error_lineno);
if (ZVAL_REFCOUNT(z_context)==2) {
FREE_ZVAL(z_context);
}
break;
}
va_end(args);
if (type==E_PARSE) {
zend_init_compiler_data_structures(TSRMLS_C);
}
}
ZEND_API void zend_output_debug_string(zend_bool trigger_break, char *format, ...)
{
#if ZEND_DEBUG
va_list args;
va_start(args, format);
# ifdef ZEND_WIN32
{
char output_buf[1024];
vsnprintf(output_buf, 1024, format, args);
OutputDebugString(output_buf);
OutputDebugString("\n");
if (trigger_break && IsDebuggerPresent()) {
DebugBreak();
}
}
# else
vfprintf(stderr, format, args);
fprintf(stderr, "\n");
# endif
va_end(args);
#endif
}
ZEND_API int zend_execute_scripts(int type TSRMLS_DC, zval **retval, int file_count, ...)
{
va_list files;
int i;
zend_file_handle *file_handle;
zend_op_array *orig_op_array = EG(active_op_array);
zval *local_retval=NULL;
va_start(files, file_count);
for (i=0; i<file_count; i++) {
file_handle = va_arg(files, zend_file_handle *);
if (!file_handle) {
continue;
}
EG(active_op_array) = zend_compile_file(file_handle, ZEND_INCLUDE TSRMLS_CC);
zend_destroy_file_handle(file_handle TSRMLS_CC);
if (EG(active_op_array)) {
EG(return_value_ptr_ptr) = retval ? retval : &local_retval;
zend_execute(EG(active_op_array) TSRMLS_CC);
if (EG(exception)) {
zval_ptr_dtor(&EG(exception));
zend_error(E_ERROR, "Uncaught exception!");
} else if (!retval) {
zval_ptr_dtor(EG(return_value_ptr_ptr));
local_retval = NULL;
}
destroy_op_array(EG(active_op_array));
efree(EG(active_op_array));
} else if (type==ZEND_REQUIRE) {
va_end(files);
EG(active_op_array) = orig_op_array;
return FAILURE;
}
}
va_end(files);
EG(active_op_array) = orig_op_array;
return SUCCESS;
}
#define COMPILED_STRING_DESCRIPTION_FORMAT "%s(%d) : %s"
ZEND_API char *zend_make_compiled_string_description(char *name TSRMLS_DC)
{
char *cur_filename;
int cur_lineno;
char *compiled_string_description;
if (zend_is_compiling(TSRMLS_C)) {
cur_filename = zend_get_compiled_filename(TSRMLS_C);
cur_lineno = zend_get_compiled_lineno(TSRMLS_C);
} else if (zend_is_executing(TSRMLS_C)) {
cur_filename = zend_get_executed_filename(TSRMLS_C);
cur_lineno = zend_get_executed_lineno(TSRMLS_C);
} else {
cur_filename = "Unknown";
cur_lineno = 0;
}
compiled_string_description = emalloc(sizeof(COMPILED_STRING_DESCRIPTION_FORMAT)+strlen(name)+strlen(cur_filename)+MAX_LENGTH_OF_LONG);
sprintf(compiled_string_description, COMPILED_STRING_DESCRIPTION_FORMAT, cur_filename, cur_lineno, name);
return compiled_string_description;
}
void free_estring(char **str_p)
{
efree(*str_p);
}
-551
View File
@@ -1,551 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
#ifndef ZEND_H
#define ZEND_H
#define ZEND_VERSION "2.0.0-dev"
#define ZEND_ENGINE_2
#ifdef __cplusplus
#define BEGIN_EXTERN_C() extern "C" {
#define END_EXTERN_C() }
#else
#define BEGIN_EXTERN_C()
#define END_EXTERN_C()
#endif
#include <stdio.h>
/*
* general definitions
*/
#ifdef ZEND_WIN32
# include "zend_config.w32.h"
# define ZEND_PATHS_SEPARATOR ';'
#elif defined(__riscos__)
# include "zend_config.h"
# define ZEND_PATHS_SEPARATOR ';'
#else
# include "zend_config.h"
# define ZEND_PATHS_SEPARATOR ':'
#endif
/* all HAVE_XXX test have to be after the include of zend_config above */
#ifdef HAVE_UNIX_H
# include <unix.h>
#endif
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#endif
#ifdef HAVE_DLFCN_H
# include <dlfcn.h>
#endif
#if defined(HAVE_LIBDL)
# ifndef RTLD_LAZY
# define RTLD_LAZY 1 /* Solaris 1, FreeBSD's (2.1.7.1 and older) */
# endif
# ifndef RTLD_GLOBAL
# define RTLD_GLOBAL 0
# endif
# define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL)
# define DL_UNLOAD dlclose
# if defined(DLSYM_NEEDS_UNDERSCORE)
# define DL_FETCH_SYMBOL(h,s) dlsym((h), "_" ## s)
# else
# define DL_FETCH_SYMBOL dlsym
# endif
# define DL_HANDLE void *
# define ZEND_EXTENSIONS_SUPPORT 1
#elif defined(ZEND_WIN32)
# define DL_LOAD(libname) LoadLibrary(libname)
# define DL_FETCH_SYMBOL GetProcAddress
# define DL_UNLOAD FreeLibrary
# define DL_HANDLE HMODULE
# define ZEND_EXTENSIONS_SUPPORT 1
#else
# define DL_HANDLE void *
# define ZEND_EXTENSIONS_SUPPORT 0
#endif
/* AIX requires this to be the first thing in the file. */
#ifndef __GNUC__
# if HAVE_ALLOCA_H
# include <alloca.h>
# else
# ifdef _AIX
#pragma alloca
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
# endif
# endif
# endif
#endif
#if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2)) && !(defined(ZTS) && defined(ZEND_WIN32))
# define do_alloca(p) alloca(p)
# define free_alloca(p)
#else
# define do_alloca(p) emalloc(p)
# define free_alloca(p) efree(p)
#endif
#if ZEND_DEBUG
#define ZEND_FILE_LINE_D char *__zend_filename, uint __zend_lineno
#define ZEND_FILE_LINE_DC , ZEND_FILE_LINE_D
#define ZEND_FILE_LINE_ORIG_D char *__zend_orig_filename, uint __zend_orig_lineno
#define ZEND_FILE_LINE_ORIG_DC , ZEND_FILE_LINE_ORIG_D
#define ZEND_FILE_LINE_RELAY_C __zend_filename, __zend_lineno
#define ZEND_FILE_LINE_RELAY_CC , ZEND_FILE_LINE_RELAY_C
#define ZEND_FILE_LINE_C __FILE__, __LINE__
#define ZEND_FILE_LINE_CC , ZEND_FILE_LINE_C
#define ZEND_FILE_LINE_EMPTY_C NULL, 0
#define ZEND_FILE_LINE_EMPTY_CC , ZEND_FILE_LINE_EMPTY_C
#define ZEND_FILE_LINE_ORIG_RELAY_C __zend_orig_filename, __zend_orig_lineno
#define ZEND_FILE_LINE_ORIG_RELAY_CC , ZEND_FILE_LINE_ORIG_RELAY_C
#else
#define ZEND_FILE_LINE_D
#define ZEND_FILE_LINE_DC
#define ZEND_FILE_LINE_ORIG_D
#define ZEND_FILE_LINE_ORIG_DC
#define ZEND_FILE_LINE_RELAY_C
#define ZEND_FILE_LINE_RELAY_CC
#define ZEND_FILE_LINE_C
#define ZEND_FILE_LINE_CC
#define ZEND_FILE_LINE_EMPTY_C
#define ZEND_FILE_LINE_EMPTY_CC
#define ZEND_FILE_LINE_ORIG_RELAY_C
#define ZEND_FILE_LINE_ORIG_RELAY_CC
#endif /* ZEND_DEBUG */
#ifdef ZTS
#define ZTS_V 1
#else
#define ZTS_V 0
#endif
#include "zend_errors.h"
#include "zend_alloc.h"
typedef unsigned char zend_bool;
typedef unsigned char zend_uchar;
typedef unsigned int zend_uint;
typedef unsigned long zend_ulong;
typedef unsigned short zend_ushort;
#ifdef HAVE_LIMITS_H
# include <limits.h>
#endif
#ifndef LONG_MAX
#define LONG_MAX 2147483647L
#endif
#ifndef LONG_MIN
#define LONG_MIN (- LONG_MAX - 1)
#endif
#undef SUCCESS
#undef FAILURE
#define SUCCESS 0
#define FAILURE -1 /* this MUST stay a negative number, or it may affect functions! */
#include "zend_hash.h"
#include "zend_llist.h"
#define INTERNAL_FUNCTION_PARAMETERS int ht, zval *return_value, zval *this_ptr, int return_value_used TSRMLS_DC
#define INTERNAL_FUNCTION_PARAM_PASSTHRU ht, return_value, this_ptr, return_value_used TSRMLS_CC
/*
* zval
*/
typedef struct _zval_struct zval;
typedef struct _zend_class_entry zend_class_entry;
typedef struct _zend_object {
zend_class_entry *ce;
HashTable *properties;
} zend_object;
typedef unsigned int zend_object_handle;
typedef struct _zend_object_value zend_object_value;
#include "zend_object_handlers.h"
struct _zend_object_value {
zend_object_handle handle;
zend_object_handlers *handlers;
};
typedef union _zvalue_value {
long lval; /* long value */
double dval; /* double value */
struct {
char *val;
int len;
} str;
HashTable *ht; /* hash table value */
/* struct {
zend_class_entry *ce;
HashTable *properties;
} obj;
*/
zend_object_value obj;
} zvalue_value;
struct _zval_struct {
/* Variable information */
zvalue_value value; /* value */
zend_uchar type; /* active type */
zend_uchar is_ref;
zend_ushort refcount;
};
typedef struct _zend_function_entry {
char *fname;
void (*handler)(INTERNAL_FUNCTION_PARAMETERS);
unsigned char *func_arg_types;
} zend_function_entry;
typedef struct _zend_property_reference {
int type; /* read, write or r/w */
zval *object;
zend_llist *elements_list;
} zend_property_reference;
typedef struct _zend_overloaded_element {
int type; /* array offset or object proprety */
zval element;
} zend_overloaded_element;
/* excpt.h on Digital Unix 4.0 defines function_table */
#undef function_table
/* A lot of stuff needs shifiting around in order to include zend_compile.h here */
union _zend_function;
struct _zend_class_entry {
char type;
char *name;
uint name_length;
struct _zend_class_entry *parent;
int refcount;
zend_bool constants_updated;
HashTable function_table;
HashTable default_properties;
HashTable private_properties; /* This is only needed at compile-time */
HashTable class_table;
HashTable *static_members;
HashTable constants_table;
zend_function_entry *builtin_functions;
union _zend_function *constructor;
union _zend_function *destructor;
union _zend_function *clone;
/* handlers */
zend_object_value (*create_object)(zend_class_entry *class_type TSRMLS_DC);
void (*handle_function_call)(INTERNAL_FUNCTION_PARAMETERS, zend_property_reference *property_reference);
zval (*handle_property_get)(zend_property_reference *property_reference);
int (*handle_property_set)(zend_property_reference *property_reference, zval *value);
};
typedef struct _zend_utility_functions {
void (*error_function)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
int (*printf_function)(const char *format, ...);
int (*write_function)(const char *str, uint str_length);
FILE *(*fopen_function)(const char *filename, char **opened_path);
void (*message_handler)(long message, void *data);
void (*block_interruptions)(void);
void (*unblock_interruptions)(void);
int (*get_configuration_directive)(char *name, uint name_length, zval *contents);
void (*ticks_function)(int ticks);
} zend_utility_functions;
typedef struct _zend_utility_values {
char *import_use_extension;
uint import_use_extension_length;
} zend_utility_values;
typedef int (*zend_write_func_t)(const char *str, uint str_length);
#undef MIN
#undef MAX
#define MAX(a, b) (((a)>(b))?(a):(b))
#define MIN(a, b) (((a)<(b))?(a):(b))
#define ZEND_STRL(str) (str), (sizeof(str)-1)
#define ZEND_STRS(str) (str), (sizeof(str))
#define ZEND_NORMALIZE_BOOL(n) \
((n) ? (((n)>0) ? 1 : -1) : 0)
/* data types */
#define IS_NULL 0
#define IS_LONG 1
#define IS_DOUBLE 2
#define IS_STRING 3
#define IS_ARRAY 4
#define IS_OBJECT 5
#define IS_BOOL 6
#define IS_RESOURCE 7
#define IS_CONSTANT 8
#define IS_CONSTANT_ARRAY 9
/* Special data type to temporarily mark large numbers */
#define FLAG_IS_BC 10 /* for parser internal use only */
/* Ugly hack to support constants as static array indices */
#define IS_CONSTANT_INDEX 0x80
/* overloaded elements data types */
#define OE_IS_ARRAY (1<<0)
#define OE_IS_OBJECT (1<<1)
#define OE_IS_METHOD (1<<2)
/* Argument passing types */
#define BYREF_NONE 0
#define BYREF_FORCE 1
#define BYREF_ALLOW 2
#define BYREF_FORCE_REST 3
int zend_startup(zend_utility_functions *utility_functions, char **extensions, int start_builtin_functions);
void zend_shutdown(TSRMLS_D);
void zend_set_utility_values(zend_utility_values *utility_values);
BEGIN_EXTERN_C()
ZEND_API void _zend_bailout(char *filename, uint lineno);
END_EXTERN_C()
#define zend_bailout() _zend_bailout(__FILE__, __LINE__)
#define zend_try \
{ \
jmp_buf orig_bailout; \
zend_bool orig_bailout_set=EG(bailout_set); \
\
EG(bailout_set) = 1; \
memcpy(&orig_bailout, &EG(bailout), sizeof(jmp_buf)); \
if (setjmp(EG(bailout))==0)
#define zend_catch \
else
#define zend_end_try() \
memcpy(&EG(bailout), &orig_bailout, sizeof(jmp_buf)); \
EG(bailout_set) = orig_bailout_set; \
}
#define zend_first_try EG(bailout_set)=0; zend_try
ZEND_API char *get_zend_version(void);
ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_copy);
ZEND_API int zend_print_zval(zval *expr, int indent);
ZEND_API int zend_print_zval_ex(zend_write_func_t write_func, zval *expr, int indent);
ZEND_API void zend_print_zval_r(zval *expr, int indent);
ZEND_API void zend_print_zval_r_ex(zend_write_func_t write_func, zval *expr, int indent);
ZEND_API void zend_output_debug_string(zend_bool trigger_break, char *format, ...);
#if ZEND_DEBUG
#define Z_DBG(expr) (expr)
#else
#define Z_DBG(expr)
#endif
ZEND_API extern char *empty_string;
ZEND_API void free_estring(char **str_p);
#define STR_FREE(ptr) if (ptr && ptr!=empty_string) { efree(ptr); }
#define STR_FREE_REL(ptr) if (ptr && ptr!=empty_string) { efree_rel(ptr); }
#define STR_REALLOC(ptr, size) \
if (ptr!=empty_string) { \
ptr = (char *) erealloc(ptr, size); \
} else { \
ptr = (char *) emalloc(size); \
memset(ptr, 0, size); \
}
/* output support */
#define ZEND_WRITE(str, str_len) zend_write((str), (str_len))
#define ZEND_PUTS(str) zend_write((str), strlen((str)))
#define ZEND_PUTC(c) zend_write(&(c), 1), (c)
BEGIN_EXTERN_C()
extern ZEND_API int (*zend_printf)(const char *format, ...);
extern ZEND_API zend_write_func_t zend_write;
extern ZEND_API FILE *(*zend_fopen)(const char *filename, char **opened_path);
extern ZEND_API void (*zend_block_interruptions)(void);
extern ZEND_API void (*zend_unblock_interruptions)(void);
extern ZEND_API void (*zend_ticks_function)(int ticks);
extern ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
ZEND_API void zend_error(int type, const char *format, ...);
void zenderror(char *error);
/* The following #define is used for code duality in PHP for Engine 1 & 2 */
#define ZEND_STANDARD_CLASS_DEF_PTR zend_standard_class_def
extern ZEND_API zend_class_entry *zend_standard_class_def;
extern zend_utility_values zend_uv;
extern ZEND_API zval zval_used_for_init;
END_EXTERN_C()
#define ZEND_UV(name) (zend_uv.name)
#define HANDLE_BLOCK_INTERRUPTIONS() if (zend_block_interruptions) { zend_block_interruptions(); }
#define HANDLE_UNBLOCK_INTERRUPTIONS() if (zend_unblock_interruptions) { zend_unblock_interruptions(); }
BEGIN_EXTERN_C()
ZEND_API void zend_message_dispatcher(long message, void *data);
END_EXTERN_C()
ZEND_API int zend_get_configuration_directive(char *name, uint name_length, zval *contents);
/* Messages for applications of Zend */
#define ZMSG_FAILED_INCLUDE_FOPEN 1L
#define ZMSG_FAILED_REQUIRE_FOPEN 2L
#define ZMSG_FAILED_HIGHLIGHT_FOPEN 3L
#define ZMSG_MEMORY_LEAK_DETECTED 4L
#define ZMSG_MEMORY_LEAK_REPEATED 5L
#define ZMSG_LOG_SCRIPT_NAME 6L
#define ZVAL_ADDREF(pz) (++(pz)->refcount)
#define ZVAL_DELREF(pz) (--(pz)->refcount)
#define ZVAL_REFCOUNT(pz) ((pz)->refcount)
#define INIT_PZVAL(z) \
(z)->refcount = 1; \
(z)->is_ref = 0;
#define INIT_ZVAL(z) z = zval_used_for_init;
#define ALLOC_INIT_ZVAL(zp) \
ALLOC_ZVAL(zp); \
INIT_ZVAL(*zp);
#define MAKE_STD_ZVAL(zv) \
ALLOC_ZVAL(zv); \
INIT_PZVAL(zv);
#define PZVAL_IS_REF(z) ((z)->is_ref)
#define SEPARATE_ZVAL(ppzv) \
{ \
zval *orig_ptr = *(ppzv); \
\
if (orig_ptr->refcount>1) { \
orig_ptr->refcount--; \
ALLOC_ZVAL(*(ppzv)); \
**(ppzv) = *orig_ptr; \
zval_copy_ctor(*(ppzv)); \
(*(ppzv))->refcount=1; \
(*(ppzv))->is_ref = 0; \
} \
}
#define SEPARATE_ZVAL_IF_NOT_REF(ppzv) \
if (!PZVAL_IS_REF(*ppzv)) { \
SEPARATE_ZVAL(ppzv); \
}
#define SEPARATE_ZVAL_TO_MAKE_IS_REF(ppzv) \
if (!PZVAL_IS_REF(*ppzv)) { \
SEPARATE_ZVAL(ppzv); \
(*(ppzv))->is_ref = 1; \
}
#define COPY_PZVAL_TO_ZVAL(zv, pzv) \
(zv) = *(pzv); \
if ((pzv)->refcount>1) { \
zval_copy_ctor(&(zv)); \
(pzv)->refcount--; \
} else { \
FREE_ZVAL(pzv); \
} \
INIT_PZVAL(&(zv));
#define REPLACE_ZVAL_VALUE(ppzv_dest, pzv_src, copy) { \
int is_ref, refcount; \
\
SEPARATE_ZVAL_IF_NOT_REF(ppzv_dest); \
is_ref = (*ppzv_dest)->is_ref; \
refcount = (*ppzv_dest)->refcount; \
zval_dtor(*ppzv_dest); \
**ppzv_dest = *pzv_src; \
if (copy) { \
zval_copy_ctor(*ppzv_dest); \
} \
(*ppzv_dest)->is_ref = is_ref; \
(*ppzv_dest)->refcount = refcount; \
}
#define ZEND_MAX_RESERVED_RESOURCES 4
#ifdef ZEND_WIN32
/* Only use this macro if you know for sure that all of the switches values
are covered by its case statements */
#define EMPTY_SWITCH_DEFAULT_CASE() \
default: \
__assume(0); \
break;
#else
#define EMPTY_SWITCH_DEFAULT_CASE()
#endif
#endif /* ZEND_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

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