Compare commits

..
Author SHA1 Message Date
Harald Radi a6c0a753e7 added testcases to project file 2002-08-05 10:44:48 +00:00
Harald Radi 32314dd11a add dispatch.c 2002-07-27 17:20:16 +00:00
Harald Radi bf9929b6bf merging parts of the old com extension to the new rpc extension 2002-07-10 20:25:31 +00:00
Harald Radi 81cf825db0 MFH 2002-07-09 20:28:35 +00:00
Harald Radi 0b3f98f75b MFH 2002-07-09 19:19:37 +00:00
SVN Migration 905c4fe3c1 This commit was manufactured by cvs2svn to create branch 'ZendEngine2'. 2002-07-03 18:44:41 +00:00
Harald Radi e3c8fb8ee9 MFH 2002-04-19 15:13:27 +00:00
Harald Radi c9ebab4edc MFH 2002-03-19 17:47:53 +00:00
Harald Radi 5a14982be6 reduced warninglevel to remove the annoying
warnings from the re2c generated code
2002-03-17 16:23:50 +00:00
Harald Radi 61d7ccfb87 project file for ZendEngine2 migration 2002-03-16 22:28:54 +00:00
Harald Radi a9818789c3 no message 2002-03-16 22:22:32 +00:00
SVN Migration 30f8f95197 This commit was manufactured by cvs2svn to create branch 'ZendEngine2'. 2002-03-16 08:11:53 +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
Jason Greene 94e6810a2a Ignore extensions/sapis named skeleton 2002-03-13 18:39:42 +00:00
Sascha Schumann 795c206389 > might not sufficiently update a timestamp.
echo > should be good enough and should be implemented by the shell.
2002-03-13 16:59:49 +00:00
Sebastian Bergmann dbae8e9065 Really remove muscat directory. 2002-03-13 16:22:37 +00:00
Sebastian Bergmann bcdef75be8 Fix credits. 2002-03-13 15:52:24 +00:00
Jason Greene caa3dbfbb1 Update Credits
#Forgot about sapi
2002-03-13 14:40:31 +00:00
Jason Greene d53439f246 Update Credits 2002-03-13 14:11:09 +00:00
Sascha Schumann 730800a96d Because of the feature "don't try to send a cookie, if the sid
was contained in get/post variables" (which I still am not convinced
of completely), we need a separate variable which determines whether
to define SID in the event that a cookie was not sent.

Noticed by: Matt Allen
2002-03-13 13:08:49 +00:00
Sascha Schumann f02d3f4518 Some simplifications in PHP_ADD_SOURCES* 2002-03-13 12:48:05 +00:00
Sascha Schumann 2ea99fe17a a bit of refactoring and making always_shared a nop in every day life 2002-03-13 12:30:49 +00:00
Stig Bakken 5274f1a708 * another libconv->libiconv typo 2002-03-13 09:59:43 +00:00
Sascha Schumann e10ca10084 Provide context-specific functions which yield the directories
of extensions (PHP 4 configure vs. self-contained module)
2002-03-13 09:20:49 +00:00
Sascha Schumann 1599932c2e Fix leftovers from yesterday (s/PHP_EXTENSION/PHP_NEW_EXTENSION/). 2002-03-13 09:18:53 +00:00
Christian Stocker 7542aa7499 Return attribute name in node_name(), if it's a XML_ATTRIBUTE_NODE 2002-03-13 08:08:22 +00:00
Christian Stocker da773a0cfc Return #document in node_name(), if it's a XML_DOCUMENT_NODE 2002-03-13 07:31:16 +00:00
Sebastian Bergmann 118761e11e Sync with Apache2 Filter API change. 2002-03-13 07:11:00 +00:00
Stig Bakken 923c47893a * muscat extension moved to PECL (it is GPL'ed and it has never been
appropriate to distribute it with PHP)
2002-03-13 06:26:22 +00:00
Boian Bonev 748c255306 fix all comments in protos 2002-03-13 03:51:22 +00:00
Wez Furlong 07f5120ee3 I've altered my diagnosis of segfault/leak problem 2002-03-13 02:49:03 +00:00
Wez Furlong 3ef239bfc8 Fix some issues with ZE2, but now have some leaks.
# Any ideas Andrei?
2002-03-13 02:14:28 +00:00
Tomas V.V.Cox 7c77b1a71e No more lines on this test 2002-03-13 01:46:10 +00:00
Tomas V.V.Cox 12b0eae9e2 phpdoc update 2002-03-13 01:39:51 +00:00
97d0337e4f NEWS update 2002-03-13 01:20:33 +00:00
5aa7d604a4 ChangeLog update 2002-03-13 01:20:11 +00:00
Tomas V.V.Cox 409a631bed Fix error handling selection when both class and global are set 2002-03-13 01:17:47 +00:00
Yasuo Ohgaki 85106b82e9 Fixed a compiler warning 2002-03-13 00:29:53 +00:00
Marcus Boerger e03a8a995c -handling 2002-03-13 00:21:51 +00:00
Marcus Boerger 659833a066 -remove filetime from test
# that's magic - now the test should work on all installations
2002-03-13 00:20:48 +00:00
Andi Gutmans 617b26f41d - Compile fixes for Engine 2 2002-03-12 20:28:17 +00:00
Andi Gutmans c8e7db984c - Allow duality between Engine 1 & 2 using ZEND_STANDARD_CLASS_DEF_PTR 2002-03-12 20:18:01 +00:00
Andi Gutmans 0ee65254ee - Forgot to close comment. 2002-03-12 19:41:02 +00:00
Andi Gutmans 9760fdcb37 - Macro for duality between Engine 1 and 2 2002-03-12 19:36:24 +00:00
Andi Gutmans fb6976e46d - Another couple of indirection fixes.
- Make class_entry->refcount be part of the structure and not allocated.
2002-03-12 19:22:29 +00:00
Andi Gutmans c8c629b3fc - Fix bug introduced with latest class hash table change. 2002-03-12 18:53:27 +00:00
Frank M. Kromann e96dd60412 Changed to PHP_CONFIG_FILE_PATH use the environment variable SystemRoot 2002-03-12 18:08:52 +00:00
Sascha Schumann 2fe4117113 missed zlib.c 2002-03-12 17:50:12 +00:00
Sascha Schumann 5b3a5f1e13 nuke old makefiles 2002-03-12 16:54:26 +00:00
Sascha Schumann e0bdaedca1 forgot to add _NEW_ 2002-03-12 16:53:20 +00:00
Sascha Schumann 283b860c58 php_new_extension 2002-03-12 16:53:19 +00:00
Sascha Schumann 06473e08a5 old makefiles 2002-03-12 16:52:17 +00:00
Sascha Schumann 1d06a3166c remove old makefiles 2002-03-12 16:50:43 +00:00
Sascha Schumann d9a2bb2ec0 Remove old Makefile templates 2002-03-12 16:44:50 +00:00
Sascha Schumann 120a6ede44 add makefile fragment manually 2002-03-12 16:44:01 +00:00
Sascha Schumann 5cba3a99c2 extension converted automatically to PHP_NEW_EXTENSION. Manually confirmed 2002-03-12 16:44:00 +00:00
Marcus Boerger 3c47fb91e8 -usability
-tests
2002-03-12 16:43:29 +00:00
Sascha Schumann a9f706812d php_new_extension 2002-03-12 16:40:34 +00:00
Sascha Schumann 54d27d7902 unused file 2002-03-12 15:56:27 +00:00
Stig Bakken 612f2b87d2 * fix compile problem on platforms without iconv in libc 2002-03-12 15:15:27 +00:00
Marcus Boerger 8a622d0668 -return size of thumbnail even if it not read 2002-03-12 13:49:40 +00:00
Stefan Roehrich edcb5813db (PHP gzencode) Reimplementation of gzencode(). Now works as documented
(gzencode(string data [, int level [, int encoding_mode]])),
               should fix #15930.
@- The second parameter of gzencode() now is the compression level like
@  in the documentation. The encoding mode is a third (optional) parameter.
# Rework of gzencode(), output should be closer to real gzip output.
# I think in the old version there could be some problems with
# this function and output compression, should be fixed, too.
2002-03-12 13:23:58 +00:00
Stefan Roehrich cede952f6a (PHP gzinflate) Workaround for bug #14939 (buffer error in gzinflate()).
Fixed prototype and added test for #14939.

# We have extra \0 if the input comes directly from gzdeflate()
# so give one extra byte as length to workaround behaviour of zlib.
# I want to avoid copying the input, but if there are problems,
# please tell (see my message <20020310175611.GA4472@stefan.roehri.ch> to
# php-dev).
2002-03-12 13:06:40 +00:00
Marcus Boerger f96696e2a1 -reflect changes
-find image from run-tests.php
2002-03-12 12:42:45 +00:00
Stanislav Malyshev b75ffba9bb Fix standard object creation 2002-03-12 11:28:30 +00:00
Christian Stocker b6d4004fd9 forgot SEPARATE_ZVAL, produced segfaults.
segfaulted only in 4_2_0 (not in HEAD and 4_0_7, strange...)
2002-03-12 11:15:03 +00:00
Stanislav Malyshev 92dd5e611b - make class tables contain class_entry *, not class_entry
- fix isset($this)
2002-03-12 10:08:47 +00:00
Andreas Karajannis bcdf9b3d4c Removed sqlrte from SAP DB liblist as it is not needed. 2002-03-12 09:54:46 +00:00
Yasuo Ohgaki aba1396f11 Catch up with recent test scripts changes 2002-03-12 09:20:04 +00:00
Markus Fischer f499aa1f33 - Remove *FETCH() statements.
- Clean up WS and parenthesis indentation.
2002-03-12 09:12:42 +00:00
Christian Stocker 668ade05c6 nicer (optional) formated output in dump_mem and dump_mem_file 2002-03-12 08:24:50 +00:00
Sebastian Bergmann 6adb33006b Fix TSRMLS_CC. 2002-03-12 07:20:00 +00:00
Yasuo Ohgaki c43792602e Change php_addslashes() a little.
Since most users do not use magic_quote_sybase, be nicer to
users not using magic_quote_sybase.
2002-03-12 07:05:40 +00:00
Yasuo Ohgaki e953dba0d7 Make use of TSRMLS_C/D 2002-03-12 06:56:57 +00:00
Yasuo Ohgaki 7f8b2a6533 Fix PHP version and sapi printed so that it does not print bogus
version and sapi name.
2002-03-12 06:43:15 +00:00
Marcus Boerger f4b857f393 -reflect new state of ext/exif 2002-03-12 06:16:37 +00:00
Marcus Boerger 06a242169c -support for array tags
-better memory handling
-support for thumbnails in TIFF format
-new functions exif_imagetype
@-new function exif_imagetype
@-exif_thumbnail fupports thumbnails in TIFF format and can return size
@ of thumbnail
2002-03-12 06:14:45 +00:00
Marcus Boerger e39dcad91a -fixed bug 15174
-support for some broken jpegs: bug 13213
-better memory handling
-initial jpeg2000 support (only jpc not jp2,jb2,jpx)
2002-03-12 06:08:48 +00:00
Yasuo Ohgaki e0867ffcf1 Add missing skipif.inc 2002-03-12 05:42:43 +00:00
Yasuo Ohgaki 270a907bad Do not search php binary in search path, since we are not testing older builds.
Print SAPI used.
2002-03-12 05:33:03 +00:00
Yasuo Ohgaki 7457b8a7ed Use CGI binary when CGI SAPI is there.
Make "php run-tests.php" work with cli SAPI.
# Anyone mind if I change spaces to tabs?
# Currently, it is using spaces and it's should use
# tabs just like C source.
2002-03-12 05:18:25 +00:00
foobar b4f73cc4f9 - Fix more possible bugs (bug #16008 related) 2002-03-12 02:27:03 +00:00
620f64043e NEWS update 2002-03-12 01:20:26 +00:00
cef7c9cc8f ChangeLog update 2002-03-12 01:19:48 +00:00
Derick Rethans ddf0fac996 - fix bug #16008 2002-03-11 23:11:04 +00:00
Christian Stocker 48da8216f9 @ implemented domxml_elem_get_elements_by_tagname
@ new function domxml_doc_get_elements_by_tagname
@ new function domxml_doc_get_element_by_id (chregu)
2002-03-11 22:37:32 +00:00
Markus Fischer d5b1a4f811 - Slightly unify error/warning messages.
- Switch to zend_parse_parameters().
- Fix whitespaces.
2002-03-11 22:23:05 +00:00
Shane Caraveo d3bea66937 fix on more build config 2002-03-11 18:25:47 +00:00
Sander Roobol b9e8bddb3a Maintain headers 2002-03-11 16:58:29 +00:00
Marcus Boerger 343b413cf8 -passing arguments to CLI, see: php -h 2002-03-11 16:25:32 +00:00
Stig Bakken b34300b070 * make "make test TESTS=..." work again 2002-03-11 15:16:11 +00:00
Stig Bakken 32d3a0afd7 * added file locking
* added file name to package map
2002-03-11 15:13:19 +00:00
Yasuo Ohgaki 1718f1bd33 Print function names in error messages 2002-03-11 14:53:59 +00:00
Ben Mansell 889988763f Instructions for using FastCGI-PHP with Apache 2002-03-11 14:34:56 +00:00
Ben Mansell 8154dbb7a2 Improved documentation for FastCGI SAPI. Documents the environment
variable tunings and the new command line usage.
2002-03-11 14:03:48 +00:00
Ben Mansell 8ac087a232 Add command line option to FastCGI SAPI to make it bind & listen to a
socket. This makes setting up 'remote' fastcgi much easier.
2002-03-11 13:37:25 +00:00
Sascha Schumann 2a8d55ff1d Add global include path, so that other extensions can access
the expat header.
2002-03-11 13:32:44 +00:00
Sascha Schumann 9c3b0c752e Invoke pear-related targets conditionally and
rename install-data-local target to install-pear.
Also remove PEAR_DIR, because it is unused.
2002-03-11 13:17:44 +00:00
Sascha Schumann 26715ba4f6 Use standard PHP shell check syntax 2002-03-11 12:56:19 +00:00
Sascha Schumann a0a857b9c8 You don't need a C++ compiler to build 100% of PHP (and the largest part of
the extensions), so I don't see a reason why PHP should not build on
a system without a C++ compiler.

If your extension uses C++ objects, put PHP_REQUIRE_CXX into your
config.m4.

This should also be removed from the 4.2.0 branch, because it will
cause portability problems otherwise.
2002-03-11 12:50:18 +00:00
Sascha Schumann a643a467e3 Add a note regarding which version we support 2002-03-11 12:28:16 +00:00
Sebastian Bergmann 3573a92c1a Fix warning, hope this is okay. 2002-03-11 07:58:52 +00:00
Shane Caraveo 99ddd9e453 fix include paths for fcgi headers 2002-03-11 07:39:55 +00:00
Yasuo Ohgaki 8885f79909 WS and indent 2002-03-11 07:23:07 +00:00
Yasuo Ohgaki 2a6ae3b7db Add comments for constants. Remove unneeded constants included by mistake. 2002-03-11 07:19:57 +00:00
Yasuo Ohgaki 7bccaefc41 Small memory leak fix that does not matter much. 2002-03-11 07:11:54 +00:00
Yasuo Ohgaki 8b8fcff81b Fix possible build error under Windows.
# Recent libpq under windows supports PQcmdTuples, right?
2002-03-11 07:09:12 +00:00
Sebastian Bergmann 6729e0e9bf Fix thread-safe build. 2002-03-11 05:43:23 +00:00
Jason Greene cd4954b7b5 Fix WS 2002-03-11 01:24:42 +00:00
aef0ea1beb ChangeLog update 2002-03-11 01:20:33 +00:00
jim winstead 8544cc1532 handle numeric strings. this means we're less picky about the argument
types, but the math functions aren't generally that picky.
2002-03-10 23:46:43 +00:00
Markus Fischer 949e6dbaae - Fix protos. 2002-03-10 23:45:02 +00:00
Shane Caraveo 1bd55792e3 fix output directory 2002-03-10 22:11:22 +00:00
Shane Caraveo c8f5565bf3 woohoo, take some credit! 2002-03-10 22:08:09 +00:00
Shane Caraveo f3a60dd1a6 children should be zero by default, enable by setting PHP_FCGI_CHILDREN env var. 2002-03-10 21:52:00 +00:00
Shane Caraveo 988a86db72 Update makefile for compiling with fastcgi under windows 2002-03-10 21:41:55 +00:00
Shane Caraveo 79bb884eec combine fastcgi capability with regular cgi binary
include fastcgi library for ease of windows builds
NOTE: included fastcgi library is modified for thread safety, but
	fastcgi support in cgi_main.c is only written for single
	threaded serving.  This does not present any issue for using
	fastcgi.
2002-03-10 21:39:28 +00:00
Andi Gutmans d77ff9607e - Fix build in ZTS mode. 2002-03-10 21:02:00 +00:00
Stanislav Malyshev 04ed2b520f New stuff for objects API:
- Better assignment handling
- More flexible operations with zval-containing objects
2002-03-10 13:42:37 +00:00
Rui Hirokawa 68976a35ce fixed wrong include file. 2002-03-10 13:17:59 +00:00
Rui Hirokawa 06923253c3 fixed module name iconv->mbstring. 2002-03-10 12:23:11 +00:00
Stefan Esser 2872bce78a Fix: Now returns correct Content-Type with Opera 6.01 2002-03-10 11:03:04 +00:00
Markus Fischer bbe42d7673 - Fix crash in iconv_set_encoding(). [Closes #15799] 2002-03-10 09:22:31 +00:00
foobar fe7a2440ca - Renamed aggregate.lib.php -> aggregate.lib (.php files are always deleted bycvsclean) 2002-03-10 02:38:06 +00:00
61eb6fb4b6 ChangeLog update 2002-03-10 01:19:17 +00:00
foobar 16d61c974c - Fixed bug: #15686 2002-03-09 21:30:12 +00:00
foobar 5b32b3c4df - Fixed bug: #15190 2002-03-09 18:17:06 +00:00
Andi Gutmans 1229705743 - Add the original example script to the CVS so that it's always available. 2002-03-09 16:25:51 +00:00
Sander Roobol a4e5289335 Oops... 1 digit is allowed too! Reverting my fix. 2002-03-09 11:23:48 +00:00
Jason Greene 494d2d0d5a Fix build on win32 2002-03-09 06:41:19 +00:00
Jason Greene 3c9c83640f Fixed bug where NULL specified in sec was not waiting infinately as it should
Fixed bug where socket_select was not producing an error message on error
Fixed bug where -1 was getting returned instead of FALSE in socket_recv(),
socket_send(), socket_sendto(), and socket_select()
2002-03-09 04:37:54 +00:00
a6e3c5c803 NEWS update 2002-03-09 01:20:26 +00:00
aae9a035c5 ChangeLog update 2002-03-09 01:19:56 +00:00
foobar 131f125fdd whitespace.. 2002-03-09 00:24:42 +00:00
foobar f30a9f1c86 - Commented out the space escaping. Works now as it did before. 2002-03-09 00:24:02 +00:00
Christian Stocker f8964007f8 @ implemented domxml_elem_get_attribute_node(attrname) (chregu) 2002-03-08 22:16:07 +00:00
Marcus Boerger 42e478c7aa -support for out of section data 2002-03-08 20:56:44 +00:00
Sander Roobol 58a52f93bc Fixed many tests, mostly incorrect paths. 2002-03-08 19:16:19 +00:00
Joseph Tate ea48f89d26 Added linking files to make build compatible with RH 7.2's updated libxslt
packages.  Should not break when compiling with older versions.  This may
fix bug #15942 as well.
Configure was giving a Warning message without these lines when --with-xslt was
specified.
2002-03-08 18:56:00 +00:00
Sander Roobol 6e6bd72e0d (php_date) Fixed 'r' modifier to always return two digits for the day
value (see RFC 822) (#15952).
2002-03-08 17:25:43 +00:00
Hartmut Holzgraefe 94c14ad4f6 reimplementation using macro instead of function pointer ( Bug #15951 ) 2002-03-08 11:59:02 +00:00
Sebastian Bergmann 2f010abe51 Add 'import const' example. 2002-03-08 11:36:56 +00:00
Marcus Boerger 27242a7a46 -change IsColor from non zero to 1
-new test and example for documentation
2002-03-08 11:33:46 +00:00
Christian Stocker 2cdb9f1bf9 @ domxml_elem_remove_attribute(attibutename) is now implemented (chregu) 2002-03-08 11:05:13 +00:00
Andi Gutmans 90f6005f58 - Support importing constants. e.g.:
<?php

	class MyOuterClass {
		const Hello = "Hello, World\n";
	}

	import const Hello from MyOuterClass;
	print Hello;
2002-03-08 10:58:24 +00:00
Edin Kadribasic 7918fe45b4 Cleaned up previous commit.
#Oops, commited older patch the first time :)
2002-03-08 09:55:58 +00:00
Edin Kadribasic 61071e6b7b @- Added -r option to the CLI version of PHP which executes a piece of PHP
@  code directly from the commmand line. (Edin)
2002-03-08 09:47:52 +00:00
Christian Stocker 0cf6de6fcb @ added formatting option to domxml_dump_mem() (chregu) 2002-03-08 09:18:31 +00:00
2139ba0922 ChangeLog update 2002-03-08 01:20:50 +00:00
Marcus Boerger 355150ebde -Changes according to exif.c 1.55 2002-03-08 01:11:03 +00:00
Marcus Boerger 9363bfad7e -Support for IFD Arrays
#necessary for update/write operations
2002-03-08 01:09:54 +00:00
Marcus Boerger d994d0b47d TIFF support for 'non' digicam files
# same as in standard/image.c but here it's more complex
2002-03-08 01:06:59 +00:00
Marcus Boerger d09d38ad6e TIFF support for 'non' digicam files 2002-03-08 00:57:08 +00:00
Joseph Tate 7ad4b465ca Commented out a few lines that were causing a segfault in the unlink code.
This fixes bug #14522.  I've tested that it does not cause a segfault under
RH 7.2, and retains all functionality.  I recommend that this patch be
considered for the PHP_4_2_0 tree as well, as having a function that core
dumps every time is a bad thing(TM).
2002-03-07 23:52:57 +00:00
foobar f57fe2a8df - Fixed the phpinfo() tables not to blow up when using very long
configure line.
2002-03-07 22:18:09 +00:00
foobar 88750086cc - Fixed some compile warnings and removed bogus comments. 2002-03-07 21:41:51 +00:00
Sascha Schumann d62c336cf2 These tests currently depend on register_globals=1 2002-03-07 20:51:27 +00:00
Jason Greene 43658a3564 News update 2002-03-07 20:48:10 +00:00
Sascha Schumann 65ae7c5df2 remove -module, it is added by configure.in 2002-03-07 20:45:20 +00:00
Sascha Schumann d404480b88 Update test target from rules.mk 2002-03-07 20:42:20 +00:00
Sascha Schumann a1bc7d3791 Readd ZEND_EXTRA_LIBS (as in Makefile.in rev 1.106). 2002-03-07 20:35:23 +00:00
Jon Parise 822c150636 Correct the header file ordering. From 'man 3 inet' (FreeBSD 4.5):
#include <sys/types.h>
	#include <sys/socket.h>
	#include <netinet/in.h>
	#include <arpa/inet.h>
2002-03-07 20:27:37 +00:00
Frank M. Kromann e58fbab4d1 Revert uppercase directory name to lower case. 2002-03-07 20:00:08 +00:00
Sascha Schumann 4928259fa9 ze2 handling 2002-03-07 19:56:53 +00:00
Frank M. Kromann ea0de609a6 Enabling crypt() on Win32 2002-03-07 19:46:23 +00:00
Sascha Schumann 5745f86187 Build libphp4.la as a module which can be dlopened.
This should not make a difference on common platforms,
but maybe esoteric ones.
2002-03-07 19:21:02 +00:00
Sascha Schumann 99e854f60d Fix typo 2002-03-07 18:16:57 +00:00
Frank M. Kromann 7d88c35ffd Making mbstring compile under WIn32 2002-03-07 17:28:50 +00:00
Sascha Schumann 810f3a5711 some more information 2002-03-07 16:46:05 +00:00
Sebastian Bergmann adff1e1c74 Add NEWS entry for the new build system. 2002-03-07 16:41:11 +00:00
Joseph Tate b6c9805cc8 Added type attribute wrappers to the remaining node types that did not have
them.  I.e. XML_ATTRIBUTE_NODE and XML_CDATA_SECTION_NODE.  Mentioned in
Bug #15918.
2002-03-07 16:34:13 +00:00
Joseph Tate f0bb6ff3db Added TODO item to modify new_child so that more than just element nodes
can be created.
2002-03-07 16:33:02 +00:00
Derick Rethans 8d4656dcf6 - Remove CVS things 2002-03-07 15:51:29 +00:00
Sascha Schumann c12dc3851b touch file 2002-03-07 15:44:10 +00:00
Sascha Schumann b2cc18212f From APR CVS.
fitz        02/03/07 07:37:09

  Modified:    build    apr_hints.m4
  Log:
  update for Mac OS X. -traditional-cpp is no longer recommended.
2002-03-07 15:40:39 +00:00
Sascha Schumann cb8181dd4e Fix check.. tsrm_config.h exists on all platforms but Win32. 2002-03-07 15:07:49 +00:00
Rui Hirokawa 5634d3a8f7 reverted my patch to fix freetype2 related problem. 2002-03-07 15:07:12 +00:00
Sascha Schumann 62a6c3bfcc Bad extension. Still using AC_ADD_INCLUDE! 2002-03-07 14:59:48 +00:00
Sascha Schumann 5eb451ff18 Remove .libs from .cvsignores, except /. 2002-03-07 14:57:15 +00:00
Sascha Schumann 245205fbd0 phpize is already working, remove from todo 2002-03-07 14:49:16 +00:00
Sascha Schumann 9d9d39a0de Please welcome the new build system.
If you encounter any problems, please make sure to email sas@php.net
directly.

An introduction can be found on

http://schumann.cx/buildv5.txt
2002-03-07 14:20:02 +00:00
Sebastian Bergmann 0e17eea049 Add another 'import' example and merge 'import' section into 'Namespaces' section. 2002-03-07 10:31:51 +00:00
Derick Rethans cc891daade - Update NEWS 2002-03-07 08:11:45 +00:00
Yasuo Ohgaki 00e71a8c7e Rename common.php to common.inc for easier deletion of garbages.
e.g. "rm -f *.php"
2002-03-07 08:06:22 +00:00
2f0b13c352 NEWS update 2002-03-07 01:22:10 +00:00
01d0e7ec15 ChangeLog update 2002-03-07 01:21:51 +00:00
Hartmut Holzgraefe 08ce0598c5 more proto stuff 2002-03-07 00:13:41 +00:00
Jason Greene d88701e3e6 Add news entries representing the sockets rework.
#I had a hard time with the style due to the number of entries
#Feel free to make any changes
2002-03-07 00:13:27 +00:00
Hartmut Holzgraefe 87e1cd308f proto fixes:
- changed 'double' to 'float'
  - changed 'int' to 'resource' where appropriate
  - format change: proto has to be on a single line and description
    on the very next one, some tools still rely on this
2002-03-07 00:01:26 +00:00
Dan Kalowsky 35efe18b1a iconv is back 2002-03-06 22:26:46 +00:00
Derick Rethans d1db2071fc - Bump version numbers on HEAD 2002-03-06 22:26:02 +00:00
foobar 98a9106b6a - Cleaned this abit (no such long stuff should be here if it can be found
in Manual...and if it's not in manual yet, ADD IT!
- Also moved some of the major changes in the beginning where people
  might even notice them. We should re-arrange this better btw.
2002-03-06 22:08:25 +00:00
Marcus Boerger ac80c9d00e - standard test scripts for exif
#hope all problems in exif are resolved now
2002-03-06 22:01:45 +00:00
Marcus Boerger 0a0942b193 -comments
#just another jhead.c line
2002-03-06 20:52:17 +00:00
James Cox adf31e9b04 fixed my foobarred news entry 2002-03-06 20:28:38 +00:00
Marcus Boerger 15d74e343b -comments 2002-03-06 20:24:29 +00:00
Jason Greene 165a97c90f Sockets Rework Patch 3 of 3
Nuked all fd code
Rewrote socket_select to use arrays instead of the fd code
(This has the side-effect of fixing quite a few bugs)
2002-03-06 20:19:09 +00:00
Derick Rethans d716e02a98 - Fix for bug #12383 and #14755: 105.05$ becomes 105.5$ (Patch by: Giancarlo
Niccolai <giancarlo@niccolai.org>)
2002-03-06 19:54:47 +00:00
James E. Flemer 01505de0b1 (PHP opendir) Changed CHECKUID_ALLOW_ONLY_DIR to CHECKUID_ALLOW_ONLY_FILE
so that relative paths (vs absolute) work correctly.
2002-03-06 18:31:33 +00:00
Marcus Boerger 3dc95db8b7 -updated test to reflect third parameter of exif_read_data 2002-03-06 18:21:50 +00:00
Marcus Boerger 0b5759f7bf -missing efree
-incorrect index/length computing: left from jhead
#no errors left with test files - controlled manually with hexeditor
2002-03-06 18:11:57 +00:00
Andi Gutmans 83f102fd9f - Add function * and class * functionality. Only constants are left.
<?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();
2002-03-06 17:08:26 +00:00
Dan Kalowsky 86ca867930 quelling a warning, and ensuring now undefined behavior 2002-03-06 16:15:28 +00:00
Dan Kalowsky 160fe54bab When #if BLAHING a section, ensure to make it's prototype included. Returns
build capability to MacOSX.
2002-03-06 16:14:00 +00:00
Derick Rethans f3d1ae176f - Add 'appname' parameter to sybase_connect. (Patch by Christophe Sollet
<csollet@coleebris.com>)
2002-03-06 15:59:57 +00:00
Derick Rethans 393cbe0ac3 - Put them back (and do it right) 2002-03-06 13:25:25 +00:00
Sascha Schumann b5660126d0 Do the estrdups after checking for parameter constraints.
No real memory leaks though, because they are catched by the
memory manager.
2002-03-06 12:34:47 +00:00
Sascha Schumann 0c69739feb Did not revert back enough.
This patch does not make sense, because it enforces the existence
of a single directory.
2002-03-06 12:25:01 +00:00
Sascha Schumann 0bf5fc14be SID shall be defined to name=id, if the client did not supply
a cookie.
2002-03-06 12:12:39 +00:00
Sascha Schumann 8141c7761c Merge in session API changes (carry around tsrm context)
Now PHP_SESSION_API is defined to the date of the last change,
so that externa source-code can handle changes more gracefully.
2002-03-06 11:49:51 +00:00
Sascha Schumann 398b1011dc Always initialize the track-vars 2002-03-06 11:41:17 +00:00
Derick Rethans c8740575c4 - Remove unused variables 2002-03-06 11:31:56 +00:00
Derick Rethans 2f04af4402 - More ZTS fixes 2002-03-06 11:26:05 +00:00
Derick Rethans 79330dc592 - Fix build with ZTS 2002-03-06 11:20:11 +00:00
Marcus Boerger efddda3d6d -updated test 2002-03-06 09:32:02 +00:00
Marcus Boerger 0ecd2f0876 -new working thumbnail code
-everything uses new data structures
-new function exif_thumbnail
#nearly stripped off all jhead code
@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)
#switched to internal version 1.2
2002-03-06 09:31:32 +00:00
Sascha Schumann ca59cb7cf9 Weep out all recent commits of Yasuo.
I don't have time right now to leave in the good ones and remove
only the bad ones.

There are some semantical changes which I reject, because
they aim at fixing a bug which is at a completely other location.

Then SID does not gefined anymore properly. (This broken patch
has not been sent to me at all.)

Also, there were *so* many whitespace changes which already
make these commits bogus.
2002-03-06 09:02:31 +00:00
Yasuo Ohgaki d36ddb5a9f Fixed typo :) 2002-03-06 09:01:13 +00:00
Yasuo Ohgaki ae3edadca6 Use static mm file save path. Now we can safely stop web server at start up when there is an error. Older mm uses static mm file path anyway. 2002-03-06 08:54:55 +00:00
Yasuo Ohgaki 0010418ea7 Fix crash bug #14232 2002-03-06 07:49:49 +00:00
Yasuo Ohgaki da977f8251 Make php start even with wrong save_path. 2002-03-06 06:29:43 +00:00
Jason Greene e228b16885 Socket Rework Patch 2
Redesigned socket_recv() as outlined on php-dev
Modified socket_last_error() to no longer clear the error
Added socket_clear_error()
Fixed socket_set_nonblock()
Added socket_set_block()
Fixed a proto
Saved 1 byte of RAM : )
2002-03-06 05:21:56 +00:00
97b3c97f59 ChangeLog update 2002-03-06 01:20:45 +00:00
Yasuo Ohgaki 92facba86f Oops. Fix compile failure 2002-03-06 00:42:39 +00:00
Yasuo Ohgaki a2fecc2d79 Using session_save_path() after starting session is obvious error.
Riase E_NOTICE error instead of E_WARNING. Since it is valid if
user uses session_save_path() with session_module_name().
2002-03-06 00:40:42 +00:00
Yasuo Ohgaki 09e6133e84 Return FALSE when session_module_name() failed. Fix a little leak. 2002-03-06 00:34:57 +00:00
Yasuo Ohgaki b17fd60310 Raise error when session module failed to open or read 2002-03-06 00:26:38 +00:00
Yasuo Ohgaki 782462a4ca More TSRM work 2002-03-06 00:12:48 +00:00
Yasuo Ohgaki 4042334882 Remove TSRMLS_FETCH() and use TSRMLS_C/TSRMLS_D
# Need a little more work for backword compatibility
2002-03-06 00:05:21 +00:00
Markus Fischer 1a209b0875 - Added recent changes done in ext/posix 2002-03-05 23:57:20 +00:00
Yasuo Ohgaki bc383c2eab Fixed crash with mm save handler 2002-03-05 23:45:50 +00:00
Yasuo Ohgaki d809d046df Fix bug #15322 and fix a little memory leak 2002-03-05 23:37:00 +00:00
Zeev Suraski 1c3c40a339 Make $_SESSION and $HTTP_SESSION_VARS links to each other 2002-03-05 22:06:35 +00:00
Stig Bakken fda570aadc * PEAR_Config test complete 2002-03-05 20:39:38 +00:00
Marcus Boerger 088450efce -fixes
-changed internal data structures
#nearly stripped off all jhead code
2002-03-05 19:47:19 +00:00
Stig Bakken 80f1212660 * update PEAR_Config test 2002-03-05 17:39:53 +00:00
Stig Bakken 856e382c8b * fix singleton() so it actually works
* insert file format version in written files
* add getSetValues() method for listing the valid values for a set value
2002-03-05 17:39:29 +00:00
Dan Kalowsky af4b22ceb5 Breaking BC, but making odbc_fetch_into behavior more consistent 2002-03-05 16:45:02 +00:00
Markus Fischer 003bb8c2b4 - Introduced posix_errno() (get error number from last error message) and
posix_strerror() (convert error number into error string).

- Do not output any error message if any of the function fails with FALSE
  return value. The proper way now is to call posix_errno() and
  posix_strerror() after encountering an error condition.

- Function not support on a system no longer issue a 'not available' error
  but simply don't exist so we can safely use 'function_exists'.

- Fixed protos.

- Use new parameter parsing API.

- posix_uname() may be aware of 'domainname' (GNU extension)

- posix_getgrnam(), posix_getgrgid(): the returned information does no
  longer contains mixture of string and numbered keys (hash / array)
  but contains key 'member' with an array of all members in a list
  (or an empty array). This breaks BC but is the right thing IMHO.
2002-03-05 16:04:04 +00:00
Stig Bakken 22aac3652e * fix PEAR::setErrorHandling() settings so they apply when using raiseError() 2002-03-05 14:43:02 +00:00
Derick Rethans eeeb95595f - More test fixes 2002-03-05 09:02:02 +00:00
Derick Rethans 39225a22b8 - Fix tests to work with CLI
#- Not totally done, but this makes it a lot better
2002-03-05 09:00:56 +00:00
Derick Rethans 9354703d9d - Fix mcrypt tests 2002-03-05 08:24:21 +00:00
Yasuo Ohgaki 15ee6955c5 Fixed wrong description about CLI sapi usage.
Currently "make test" is running test script as

./sapi/cli/php -c php.ini-dist run-tests.php

"make test" does not work... I'm supposing this
will be changed to use CGI sapi for now.
2002-03-05 07:57:05 +00:00
Yasuo Ohgaki 08fead5bb9 Added README.TESTING 2002-03-05 07:18:05 +00:00
Sebastian Bergmann 51c5cac572 s/php.exe/php-cgi.exe/. 2002-03-05 06:16:45 +00:00
Dan Kalowsky 1e0ee7b1b5 Added a comment for future reference 2002-03-05 06:15:01 +00:00
Jason Greene 7d7b1ae9b5 Style Improvement 2002-03-05 03:45:23 +00:00
5b1a3cd8a2 NEWS update 2002-03-05 01:21:06 +00:00
68a43a14a3 ChangeLog update 2002-03-05 01:20:16 +00:00
Stig Bakken 2b9f535589 * fixed a couple of bugs in PEAR_Config revealed by test 2002-03-05 00:41:36 +00:00
Frank M. Kromann 5f4fe6255e Killing compiler warning 2002-03-05 00:28:20 +00:00
Frank M. Kromann 68caa64328 Making dbase compule under WIn32 2002-03-05 00:28:07 +00:00
Frank M. Kromann 46a7b0cf61 Killing compiler warning on Win32 2002-03-05 00:21:28 +00:00
Dan Kalowsky a3010a9b8f Fix for Bug 14423. Enables FreeBSD to use iconv functionality. 2002-03-04 23:28:17 +00:00
Marcus Boerger ce4bf31268 - also test TIFF support in GetImageSize 2002-03-04 23:20:48 +00:00
Marcus Boerger 6b2a074330 - Read IsColor for TIFF 2002-03-04 23:19:27 +00:00
Sebastian Bergmann 05077c9a02 Rename Win32 SAPI/CGI binary to php-cgi.exe. 2002-03-04 23:02:45 +00:00
Jon Parise 577210441b Silence a warning under Solaris 8 (WorkShop Compilers 5.0 98/12/15 C 5.0). 2002-03-04 20:57:36 +00:00
Sascha Schumann e991374db6 Add apparently missing include 2002-03-04 20:14:52 +00:00
Derick Rethans f1e23ebb35 - Fix ChangeLog 2002-03-04 20:00:37 +00:00
Derick Rethans 9c5b4a6c25 - Some more speed (and more consistency)
#- I had some spare time Sascha :)
2002-03-04 19:08:17 +00:00
Sascha Schumann b4d5aa5c50 Supply php_html_puts which escapes a whole string.. now fully works in ZTS
mode, too.
2002-03-04 18:46:55 +00:00
Sebastian Bergmann f79e39cf56 Silence warning. 2002-03-04 18:21:43 +00:00
Sascha Schumann 316a03ca17 revert last commit, puts does more through putc. 2002-03-04 18:12:55 +00:00
Sascha Schumann 42bd356be8 Use PHPWRITE to output data. Because this just outputs diagnostic
information, a few spaces won't hurt (and multiple ones are rendered
as one by browsers anyway).  Micro-benchmarks which use phpinfo()
as a mean to generate output will yield more through-put now
(35 req/s vs. 83 req/s in tux).
2002-03-04 17:48:20 +00:00
Derick Rethans a6738260af - Fix for bug #15572 (Patch by Ralf Nyrén <ralf.nyren@educ.umu.se>) 2002-03-04 17:46:19 +00:00
Marcus Boerger 31b5286ac9 -expose the fact i am working on exif as discussed with Rasmus 2002-03-04 17:42:51 +00:00
Marcus Boerger d95f691e3f - TIFF support for GetImageSize
@ TIFF support for GetImageSize (Marcus)
2002-03-04 17:17:41 +00:00
Marcus Boerger a7403576e1 - disabled debug information
- added missing width/height from primary ifd for TIFF
2002-03-04 17:09:24 +00:00
James Cox c63843eb29 typos suck. 2002-03-04 17:09:09 +00:00
Jason Greene c6c7380d88 Style mismatch: Jon's catch 2002-03-04 15:02:23 +00:00
Stanislav Malyshev 800e8af417 cygwin fix 2002-03-04 11:11:25 +00:00
Jon Parise 9d43b9ecf5 Silence warning under Solaris 8 (WorkShop Compilers 5.0 98/12/15 C 5.0). 2002-03-04 11:03:19 +00:00
Jon Parise 57472aa318 Silence warning under Solaris 8 (WorkShop Compilers 5.0 98/12/15 C 5.0). 2002-03-04 10:58:00 +00:00
Derick Rethans ea2a3bddb8 - Fix a path and remove --with-imap 2002-03-04 10:45:30 +00:00
Stig Bakken 8188c50c28 PEAR_Config rewrite:
* Now supports (in theory) an arbitrary number of
  config "layers" (different sets of configuration data with a defined
  priority).
* Specify the type of config values so different frontends can make
  user-friendly configuration interfaces.  Valid types are currently
  "string", "integer", "file", "directory", "set" and "password".  The
  set type lets you specify a limited set of values that the config
  values must be selected from.  Password values are stored
  base64-encoded.
* Added phpdoc comments and some docs for config values.
* Added singleton method.
# configuration files still contain serialized data
2002-03-04 10:02:45 +00:00
Marcus Boerger be5908b06c -addition to last change: php_image.h must be included now 2002-03-04 09:29:06 +00:00
James Cox 0c78c87f34 Changing the Velocis extension to now be called Birdstep, due to a product/company change.
added aliases for Velocis to the birdstep functions.
# testing is both advised and encouraged!
@ The Velocis extension is no
2002-03-04 09:10:32 +00:00
Sascha Schumann cd5f8608e2 Restore use of inline 2002-03-04 08:37:44 +00:00
Sascha Schumann c8e453c060 Remove note, suppress warning 2002-03-04 08:28:57 +00:00
Sascha Schumann a2065b8743 Reduce operations in the ub_write loop. 2002-03-04 08:25:20 +00:00
Sascha Schumann 66535c240e Free status line, initialize number_vec, correctly account for
the number of bytes in the document, avoid strcpy/strlen.
2002-03-04 08:22:33 +00:00
Rasmus Lerdorf 83e6dbcf19 Let getimagesize() and read_exif_data() share the same constants to
promote a little bit of code reuse here on two very similar problems.
2002-03-04 07:21:30 +00:00
Marcus Boerger 9c8ad6614f -Updated test.txt and provided test.php
# simply including test.txt
@Added test.php/txt to have a possibility to check ext/exif
@(Marcus)
2002-03-04 06:26:07 +00:00
Marcus Boerger 642ab24df1 -Added TIFF support
-Changed parameters after checking bugdatabase and discussion with
    Rasmus: 1st=Filename, 2nd=NeededSections
# 3rd=Thumbnail, 4th=All
#   3rd and 4th parameter are currently diabled because the code
#   does not work correctly (will correct this in later versions).
#   Changing the parameters will not cause any problems because the
#   old parameter functions never found their way in documentation
#   and the they did not work...
@-Added TIFF support
@-Changed parameters after checking bugdatabase and discussion with Rasmus
@    1st=Filename, 2nd=NeededSections
@    If the 2nd parameter is not present or 0 or '' the function will return
@        a result array even if no data was read from file.
#        Personally i consider a default behaviour to generate no array if
#        no data is present as a bad idea because here we can generate as
#        much information as possible....
@    If the 2nd parameter is a string then that string describes which
@        sections have to be present in the file to generate a result array.
@        If none of the needed section is found the result will be false.
@        Section strings are "ANY_TAG","IFD0","COMMENT","EXIF","GPS","INTEROP"
@        "FPIX","APP12". Each string has to be separated by a colon. So
@        "COMMENT,EXIF" returns an array if either a comment or an Exif
@        section is present. "IFD0" is standard datastructure in a TIFF/JPEG
@        file that contains image information. "EXIF" is the Exif structure
@        of TIFF/JPEG (IFD0 subdirectory). "GPS", "INTEROP", "FPIX", "APP12"
@        are additional IFD0 subdirectories. The APP12 support is an
@		 experimental Olympus support.
#        Do not worry this is no problem, it is safe.
@(Marcus)
2002-03-04 06:21:58 +00:00
Jason Greene 03baef7a3d Patch 1 of 3 (2 in 3 still in progress) of sockets rework
Abstracted string -> ipv4 value conversion which unifies all functions
Standardized Host Lookups
Fixed Broken host error values
Fixed error detection in sendmsg
Added some safety struct zeroing
Modified bind to consitentlyy use sockaddr_storage(not just for AF_UNIX)
#Note this could potentially break the build on other platforms, as I have
#not tested them yet (Will soon though)
2002-03-04 05:27:04 +00:00
2d88841282 NEWS update 2002-03-04 01:20:19 +00:00
6b3440829b ChangeLog update 2002-03-04 01:19:24 +00:00
Zak Greant 6f4df4e16c Added message regarding expected error messages for ./buildconf 2002-03-03 23:03:34 +00:00
James E. Flemer 6a6b5a6108 (php_checkuid) Added case for root directory when mode is
not CHECKUID_ALLOW_ONLY_DIR.
2002-03-03 21:12:49 +00:00
James E. Flemer ecac9a7e9e (php_checkuid) Added case for root directory when mode is
CHECKUID_ALLOW_ONLY_DIR.
2002-03-03 20:49:04 +00:00
James E. Flemer 787ce372b9 (PHP opendir) Added safe_mode checks on path.
@- Added safe_mode checks for opendir(). (jflemer)
2002-03-03 20:46:57 +00:00
Derick Rethans 23fd95d972 - Tidy up NEWS a little bit 2002-03-03 19:09:55 +00:00
Alex Waugh e0a228f55d Updated build instructions 2002-03-03 14:25:59 +00:00
c5c53dbe2a NEWS update 2002-03-03 01:21:04 +00:00
a97fc9703c ChangeLog update 2002-03-03 01:20:44 +00:00
Sebastian Bergmann 3930d70fba Consistency. 2002-03-02 22:26:17 +00:00
Sebastian Bergmann 3b7435fc51 Add 'import statement' section. 2002-03-02 22:24:46 +00:00
Andi Gutmans b90d80b588 - Initial patch to support importing from class scopes (for Stig).
- It isn't complete yet but I want to work on it from another machine. It
- shouldn't break anything else so just don't try and use it.
- The following is a teaser of something that already works:
<?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();
?>
2002-03-02 20:38:52 +00:00
Derick Rethans bc7e0b5512 - 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.
@- 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)
2002-03-02 19:53:11 +00:00
Hartmut Holzgraefe 547b25fd13 php has no 'double', only 'float' 2002-03-02 17:08:09 +00:00
Hartmut Holzgraefe 0558bc5b1c tab/space mixture cleand up,
editor config comments added,
minor proto fixes
2002-03-02 16:49:06 +00:00
Hartmut Holzgraefe bff90c71c1 typo fix 2002-03-02 16:41:55 +00:00
Zeev Suraski 7c3763d056 Fix another crash bug 2002-03-02 15:59:16 +00:00
Hartmut Holzgraefe 7c655ad471 enable ctype functions by default 2002-03-02 15:44:08 +00:00
Marcus Boerger 442773abb3 Wrong brackets by rasmus...but sorry the fault was mine because i missed them...
i also decided to call the first working version 1.0a

by the way: currently i am working on tiff files and it looks like it may work
2002-03-02 15:43:19 +00:00
Zeev Suraski e9ec537aba Fix version number 2002-03-02 14:33:25 +00:00
Zeev Suraski 8ffc0e192f Fix a crash bug in the session module 2002-03-02 14:18:45 +00:00
Derick Rethans 6f9c7bcf21 - Fix warning message for join(). 2002-03-02 14:06:57 +00:00
Derick Rethans 1f9464e345 - MFZE1 2002-03-02 13:48:13 +00:00
Derick Rethans 80ac68cc59 - Fix CREDITS files 2002-03-02 13:44:08 +00:00
Derick Rethans 0c6be86747 - MFZE1 2002-03-02 13:26:37 +00:00
Derick Rethans d5fee0cb0c - Make GD functions only available if they really exist (Patch by
matslin@orakel.ntnu.no)
2002-03-02 12:32:31 +00:00
Yasuo Ohgaki 7ce7a73095 Add mbstring tests 2002-03-02 10:44:57 +00:00
Yasuo Ohgaki 7ff5e156c2 Use php.ini-dist as default config file for testing. 2002-03-02 09:29:45 +00:00
Rasmus Lerdorf 15ba6402bd Fix a couple of warnings 2002-03-02 08:37:28 +00:00
Yasuo Ohgaki 9981d06217 Improved iconv usage with libc's iconv. No overrun. More efficient memory
allocation.
Hopefully, all bugs reported for iconv will be resolved when users are using
libc iconv.
@Improved iconv with libc's iconv
2002-03-02 07:04:59 +00:00
Yasuo Ohgaki cdedece154 Add more tests for iconv 2002-03-02 07:00:40 +00:00
Stig Bakken 8d7d6ce2c3 * more cli test fixes 2002-03-02 03:11:02 +00:00
Stig Bakken 4c73289238 * updated tests to work with cli 2002-03-02 03:07:48 +00:00
Stig Bakken b8aa2339d3 fix test 2002-03-02 02:47:48 +00:00
Stig Bakken 8802148fcd * work with sapi/cli 2002-03-02 02:37:13 +00:00
922ec7c75d NEWS update 2002-03-02 01:20:56 +00:00
8ff2ad53f2 ChangeLog update 2002-03-02 01:20:39 +00:00
Edin Kadribasic ab57683ea0 Added PHP_SAPI constant which contains the name of running SAPI.
@- Added PHP_SAPI constant which contains the name of running SAPI. (Edin)
2002-03-01 19:29:35 +00:00
Andrei Zmievski a8609b1ba7 MFZE1 2002-03-01 17:34:52 +00:00
Andrei Zmievski 2310414868 MFZE1 2002-03-01 17:26:31 +00:00
Derick Rethans 8b5411b938 - Fix for Sun WorkShop 6 update 2 compiler (Bug #15812) 2002-03-01 16:52:16 +00:00
Andrei Zmievski 9616e7fdb2 *** empty log message *** 2002-03-01 16:13:33 +00:00
Andi Gutmans 90bd4539c7 - Remove use of C++ reserved words namespace/this 2002-03-01 14:27:26 +00:00
Andi Gutmans d1eea3de9c - Fix bug in nested try/catch's
- Infrastructure for implementing imports of methods.
2002-03-01 14:04:51 +00:00
Derick Rethans 6f6c4ec7c7 - Add support for returning NULL values from Interbase resultsets (Patch by
Daniela Mariaschi <mariaschi@libero.it>)
2002-03-01 14:03:10 +00:00
foobar 91107d7bbb - We haven't got the branch yet..
- Some typo fixes and correct grammar.
2002-03-01 12:18:29 +00:00
Yasuo Ohgaki 5fa8b2087f Fix compiler warnings and header file path. 2002-03-01 12:01:53 +00:00
Zeev Suraski bb685a402f Fix php_splice() to work with large values 2002-03-01 12:00:05 +00:00
Yasuo Ohgaki 6ecd17100e Update doc 2002-03-01 11:52:04 +00:00
Andi Gutmans 2505f6b400 - Fix crash reported by Sebastian when destructor function causes a fatal
- error. I hope this does it and we don't find any other problems.
2002-03-01 10:26:10 +00:00
Yasuo Ohgaki 3735282e8b Added todo item for Java extention documentation. 2002-03-01 10:24:13 +00:00
Yasuo Ohgaki 3ab9cc2f5d Merge TODO-4.2.txt into TODO. 2002-03-01 10:02:48 +00:00
Stig Bakken 8e0e7cd4ba * code for install/uninstall/upgrade complete, not yet tested
# uses a new, un-committed version of PEAR_Config
2002-03-01 09:43:18 +00:00
Yasuo Ohgaki 46bb7e0031 Do explicit test againt to FAILURE.
# Thanks Rasmus.
2002-03-01 09:29:32 +00:00
Stig Bakken a146a16475 * output a reminder to set CVS tags after packaging 2002-03-01 09:16:49 +00:00
Stig Bakken d9f47fafea * use cli sapi to run tests 2002-03-01 08:57:07 +00:00
Shane Caraveo 2f512dbd18 add stuff here also. 2002-03-01 06:48:27 +00:00
Shane Caraveo db73f90953 add comment for IIS users
fix some whitespace
2002-03-01 06:34:08 +00:00
Marcus Boerger 0857bdbcde +Support for Photographer/Editor Copyright as associative array as this is a new feature the change (optionally being an array) has to be mentioned in documentation.
+New function exif_headername can be used to read the internal Tag namelist (was mainly created for debugging purpose but maybe somone writes code to create/update exif headers here).
+An internal version number is present.
+A testpage is supplied test.txt describes how the test works.
+The oldfunction read_exif_data has got an alias exif_read_data

As the old version of this module is very buggy i decided to implement the testpage (test.txt) and to create the alias. The test script only works with the alias as the old version does not pass tests. By the way it seems a good way to prepend 'exif_' to all functions in the module.
2002-03-01 04:01:26 +00:00
Yasuo Ohgaki d5412f3952 Fix compiler warnings 2002-03-01 03:31:01 +00:00
Yasuo Ohgaki 82a8d372e5 Added ob_get_status() to get array of buffers and it's status.
(DO NOT document this function yet)

Fixed crash bug with ob_end_*() function. ob_end_*() will not delete
buffers that may not be deleted.

php_start_ob_buffer() and php_ob_set_internal_handler() takes parameter for
if the buffer created may be deleted or not.

Added 3rd parameter "bool erase" to ob_start(). If FALSE, buffer may not be
deleted until script finshes.

Changed ob_*() function that have void return type to bool. All ob_*()
functions return TRUE for success, FALSE for failure.

@ - 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
@   buffers that may not be deleted. (Yasuo)
@ - Added 3rd parameter "bool erase" to ob_start(). If FALSE, 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)
2002-03-01 03:05:50 +00:00
Shane Caraveo 28c5d0f045 document force-redirect in php.ini 2002-03-01 02:09:59 +00:00
Shane Caraveo cd18533a10 This is much better. With FORCE_CGI_REDIRECT turned on by default for compilation,
we can now define this in the ini file.  So it can be turned on for apache, turned
off for IIS which does not have a redirect issue.  Alternately, a different 'REDIRECT_STATUS'
environment var can be defined in case some web server out there needs it.

new ini vars
cgi.force_redirect 0|1
cgi.redirect_status_env ENV_VAR_NAME
2002-03-01 01:58:20 +00:00
aae381de66 ChangeLog update 2002-03-01 01:19:05 +00:00
Shane Caraveo e2b1161ea6 fix force redirect crash under multithreaded compile
should be discused: fix redirect detection to only work with apache or netscape,
where we know they set an environment variable regarding redirect.  IIS has
no security issue here.  Don't know about other windows web servers.
2002-03-01 00:19:01 +00:00
Shane Caraveo a9fcfb133c turn on force redirect for windows 2002-03-01 00:16:58 +00:00
foobar 77a9678496 - Fixed a typo. (caught by jtate@php.net) 2002-02-28 23:25:18 +00:00
Rasmus Lerdorf 38b3e061a7 Change fatal errors to warnings - fix bug #15797 2002-02-28 23:08:48 +00:00
Derick Rethans 27c4648010 - Make it a boolean 2002-02-28 16:00:26 +00:00
Brad House e7084cecd0 Fix proto for mcve_initconn 2002-02-28 14:58:48 +00:00
Edin Kadribasic 6d944dd399 Inserted a note about CGI binary name change. 2002-02-28 14:47:31 +00:00
Marc Boeren 299bd20df4 Updating docs (Mc) 2002-02-28 14:44:27 +00:00
Marcus Boerger 05b13da525 Changed file to match CODING_STANDARDS except function names that match jhead.c project. I think it is acceptable using naming conventions of other projects when borrowing code. 2002-02-28 12:20:17 +00:00
Edin Kadribasic ab2564053f Removed CWD from php_ini_search_path when using CLI SAPI. 2002-02-28 12:12:39 +00:00
Yasuo Ohgaki 83059ae3de Use {NULL, NULL, NULL} to terminate function entry.
# It does not fix any bugs, since {0} works also.
2002-02-28 12:10:36 +00:00
Edin Kadribasic ca1fdf8a55 Default name of CGI binary changed to php-cgi.
# Please note that this only applies when installing php with
# make install. The binary is still built as "php" in top build dir.
2002-02-28 11:48:39 +00:00
Marc Boeren e389c31315 Added entry that I forgot when comitting the code (Mc) 2002-02-28 08:46:10 +00:00
Sebastian Bergmann 90613d2282 Maintain headers. 2002-02-28 08:29:35 +00:00
Yasuo Ohgaki a0c2defe8e Recommend ZEND_* macro over PHP_* macro as discussed in php-dev. 2002-02-28 06:31:09 +00:00
Sebastian Bergmann 7d983e5faf Fix headers. 2002-02-28 06:26:50 +00:00
Yasuo Ohgaki 1c12a65f82 Added how to put bug ID in commit message. 2002-02-28 06:21:09 +00:00
Yasuo Ohgaki 98861da887 Fix iconv. Patch by (itai@siftology.com) 2002-02-28 03:09:01 +00:00
0b2b1ff379 ChangeLog update 2002-02-28 01:19:55 +00:00
Marcus Boerger 98ebd1c28b +Added UNICODE support for Comments
+Added Description,Artist
+Added missing memory deallocation
+Corrected error with multiple comments
+Corrected handling of ExifVersion, Tag has 4 ASCII characters *WITHOUT* NUL
+Corrected handling of Thumbnailsize if current source detects size < 0
+Changed all fields to char* that do not have a maximum length in EXIF standard
+Undocumented second Parameter ReadAll frees memory to early -> moved to third position default changed to false -> faster
+New second Parameter [true|false] to specify whether or not to to read thumbnails -> reading is timeconsumpting suppose default should be false -> done so
2002-02-28 01:16:27 +00:00
Rasmus Lerdorf 28b321b5e9 Drop this default to 12 to avoid some of the .000000000000001 questions.
I can't imagine much of a BC issue, and we aren't changing existing php.ini
files anyway.  If someone can think of a problem with this, please speak up
2002-02-27 23:50:41 +00:00
Brad House 20219b1e24 Initial MCVE extension added (Credit Card Processing) 2002-02-27 19:46:59 +00:00
Andrei Zmievski 313a3602bb This has been scaring people off. 2002-02-27 17:32:27 +00:00
foobar 46bc04ecdf - Missed this one.. 2002-02-27 15:16:32 +00:00
Derick Rethans 15cadf0c42 - Fix proto 2002-02-27 14:05:39 +00:00
Adam Dickmeiss 7a68b02482 Implemented yaz_schema. Cleanup. 1.8 YAZ required 2002-02-27 12:58:33 +00:00
foobar 8439b0691d Fixed minor typo. 2002-02-27 12:11:09 +00:00
Derick Rethans a44b57424b - Oops... wishful thinking here :) 2002-02-27 11:30:48 +00:00
Derick Rethans 5921ac0de3 - Update version number 2002-02-27 11:30:06 +00:00
James Cox 6aa69e70a2 correcting grammar so it's readable 2002-02-27 11:15:54 +00:00
Sebastian Bergmann 51a8449782 Add 4.1.2 NEWS entries to HEAD. 2002-02-27 09:30:40 +00:00
Sebastian Bergmann e3b86cb645 URLEncoder.encode(string) is deprecated in the Java 2 SDK 1.4. 2002-02-27 07:29:33 +00:00
71139b307d ChangeLog update 2002-02-27 01:33:13 +00:00
Andi Gutmans c456da514c - Hopefully fix the shutdown_memory_manager() stuff. Part of my previous
- patch seems to have gotten lost
2002-02-26 19:38:41 +00:00
Sebastian Bergmann 1b32da412d TSRM Cleanup. 2002-02-26 19:31:21 +00:00
Andi Gutmans 7df1601239 - MFZE1 2002-02-26 19:17:26 +00:00
Andi Gutmans a306665717 - Pass shutdown_memory_manager the TSRMLS context. 2002-02-26 18:59:27 +00:00
Dan Kalowsky a4113ee734 Bug fix 15719 as submited by Joseph Southwell and allows NULL values in ODBC
# I haven't been able to fully test this due to MacOSX compliation errors.
# if someone in the QA group could that'd be appriciated.
2002-02-26 15:33:54 +00:00
Edin Kadribasic 0bbc3c3a4c Allow use of dl() when CLI is compiled with ZTS (bug #15717). 2002-02-26 11:00:20 +00:00
8774cc2dfa ChangeLog update 2002-02-26 01:27:36 +00:00
jim winstead 63669c6a64 make it more clear that --with-apache and --with-apxs only work with apache 1.x. 2002-02-25 18:27:13 +00:00
b6b4b27988 NEWS update 2002-02-25 01:24:04 +00:00
6697e72433 ChangeLog update 2002-02-25 01:22:15 +00:00
Derick Rethans b5a0fd24a1 - Fix the fix.. no need to escape " in single quotes 2002-02-24 14:07:10 +00:00
Derick Rethans a4946ca375 - Add slashes around string output 2002-02-24 13:26:43 +00:00
Derick Rethans 8f0eb8cd04 - Update with XP (Thanx to Jan for the patch) 2002-02-24 13:01:10 +00:00
Stig Bakken 4a2e3c4a20 * fix broken dtd
# Tomas, there is no way to do what you want in the DTD without switching
# from XML to SGML.  Sorry :-)
2002-02-24 10:45:28 +00:00
Sebastian Bergmann dd95705ceb Make phpinfo() look nicer. 2002-02-24 07:54:04 +00:00
292d9deb18 ChangeLog update 2002-02-24 01:21:33 +00:00
Markus Fischer b68e5f2ec9 - Fix info output (Peter Neuman <neuman_peter@hotmail.com>). 2002-02-23 22:46:19 +00:00
Tomas V.V.Cox 3e4235b29a DTD corrections (make it require minimal data for installer) 2002-02-23 21:21:18 +00:00
Stig Bakken 3ea5f3343b * started implementing new "cross-environment" command API
# work in progress, not tested at all yet!
2002-02-23 15:32:36 +00:00
Holger Zimmermann 46acc391f0 Fixed functionality to read in server variables. 2002-02-23 15:17:00 +00:00
Tomas V.V.Cox 2833e8467c Point readers to pear web 2002-02-23 13:47:16 +00:00
Tomas V.V.Cox 40c5f9afbc outdated TODO not needed for the moment 2002-02-23 13:44:52 +00:00
Rui Hirokawa 8cfa80d082 fixed configure error with freetype1. 2002-02-23 01:36:55 +00:00
743fa79afe ChangeLog update 2002-02-23 01:24:50 +00:00
Rui Hirokawa 07a08288a1 fixed a comment and default output encoding changed to pass. 2002-02-23 00:04:20 +00:00
Rui Hirokawa acf08a9015 php.h included. 2002-02-23 00:00:15 +00:00
Vincent Blavet 508b9eff57 * Packager : Changing the order of the files in the package archive file.
The package.xml file is now at the 'root' of the archive, the files tree are under a 'packagename'-'packageversion' folder
* Installer : installing the knew archive format AND supporting the existing format
2002-02-22 21:57:04 +00:00
Frank M. Kromann db63c9e291 Return true on update success. 2002-02-22 19:03:11 +00:00
Yasuo Ohgaki b9d158c458 Fix crash bug 15607 2002-02-22 11:39:23 +00:00
8ca013f2ae ChangeLog update 2002-02-22 01:29:52 +00:00
Sebastian Bergmann 6a59c7fcd3 Maintain ZEND_CHANGES to account for the addition of private member variables. 2002-02-21 13:10:31 +00:00
Andi Gutmans 00e90f2ff3 - Experimental support for private members.
<?
	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();
?>
2002-02-21 11:50:44 +00:00
Yasuo Ohgaki 15daf99288 Added fmod() function
# Is there any reason that math.c does not use errno?
2002-02-21 11:44:41 +00:00
Sebastian Bergmann be1b9927e5 Add aggregation to Win32 build. 2002-02-21 07:00:15 +00:00
Andrei Zmievski 513e598d1e Adding object aggregation capability along with tests. 2002-02-21 03:32:42 +00:00
Sean Bright 444d3a6150 Fix for bug #15605
# If someone more familiar with the build system sees a problem with this
# feel free to revert it.  It simply escapes #'s that are put into
# config_vars.mk
2002-02-21 02:12:37 +00:00
04252a9618 ChangeLog update 2002-02-21 01:43:18 +00:00
Christian Stocker 94d06d34e0 "o|a|b" is not valid ZE code. changed to "o|ab" 2002-02-20 23:35:20 +00:00
Vincent Blavet 04db776e71 Config variables must be set between "" while using pear.bat windows script 2002-02-20 22:39:16 +00:00
Vincent Blavet 16c5edd86f * Correct bug while using windows dir separator. It is now supported 2002-02-20 22:15:28 +00:00
Rasmus Lerdorf 229d207a58 Split CRC32 table out into a header file so other code can use it 2002-02-20 18:18:39 +00:00
Derick Rethans 8b7b813ebc - Fix for bug #15628 (for real now :) 2002-02-20 15:53:25 +00:00
Derick Rethans 9d6c7626da - Reformatting 2002-02-20 10:41:18 +00:00
Derick Rethans cddd25661f - Fix for bug #15638 2002-02-20 07:24:53 +00:00
53f976cf83 ChangeLog update 2002-02-20 01:19:43 +00:00
David Hedbor aecccb16e9 Fixed environment hashing again. 2002-02-19 20:46:29 +00:00
Derick Rethans 7bd5199c54 - Fix removal of #line lines 2002-02-19 15:58:31 +00:00
Derick Rethans fe7bf6e4e7 - Update to note that I'm the mcrypt extension maintainer 2002-02-19 10:18:50 +00:00
Marc Boeren dcc8dd3d49 changed comment for dbx module 2002-02-19 10:10:11 +00:00
Dan Kalowsky 8e8be5365d #updating the EXTENSIONS to show the proper recent maintainer. 2002-02-19 01:42:51 +00:00
671a10afcd ChangeLog update 2002-02-19 01:19:02 +00:00
Martin Jansen 52ba15e99d ='typo' 2002-02-18 10:27:36 +00:00
Marc Boeren 6ddca71cdb Oops: source copy&paste should be done with care :) (Mc) 2002-02-18 10:22:09 +00:00
Marc Boeren cb46dbb6eb Added support for Sybase-CT to dbx module (Mc). 2002-02-18 09:21:51 +00:00
ede90c86fa ChangeLog update 2002-02-18 01:20:53 +00:00
Martin Jansen 12ebcb3a21 * Fix for bug #15500 2002-02-17 15:32:53 +00:00
Stig Bakken 2eef6d482f * allow <license> in both <package> and <release>
* added <changelog> element
* added "data" role for files
* allow nested <dir> elements
2002-02-17 14:43:16 +00:00
Alex Waugh 11318ff8ef Updated to new TSRM macros 2002-02-17 12:55:52 +00:00
Jon Parise d8bfdb4f91 Image/Remote.php and Mail/mime.php have moved to the pear/ repository. 2002-02-17 04:31:30 +00:00
e114080ef4 ChangeLog update 2002-02-16 01:21:49 +00:00
Andrei Zmievski 665247cfb6 Fix. 2002-02-15 17:39:25 +00:00
Jason Greene 0a2438b057 Fix parse string
(Since arg6 is initialized at null this still catches the wrong param condition)
2002-02-15 17:33:08 +00:00
Dan Kalowsky cd88ac738b fix for bug 15516, patch submitted by torben@php.net 2002-02-15 17:24:44 +00:00
Derick Rethans b8a5daf59c - Make the errorcode 255. (Doing docs right away) 2002-02-15 09:06:45 +00:00
Yasuo Ohgaki fe72f742eb Fix problem with sesssion_pgsql module 2002-02-15 03:30:15 +00:00
Sean Bright 12430d1da1 Fix cosmetic bug. (#15142) 2002-02-15 03:08:41 +00:00
37a929e5dd ChangeLog update 2002-02-15 01:22:47 +00:00
Derick Rethans 86fa2d3937 - Let php_execute_script return 0 on failure and 1 on sucess, and change
SAPIs accordingly. (Andrei, Derick)
2002-02-14 20:16:08 +00:00
Edin Kadribasic 48f688a261 Turned implicit_flush on.
Cleaned up help text.
2002-02-14 16:45:07 +00:00
Edin Kadribasic f47a9c8af3 Added README file for CLI SAPI. 2002-02-14 16:44:13 +00:00
Derick Rethans 14d0c9d9a3 - Remove duplicate constant 2002-02-14 15:02:49 +00:00
Stanislav Malyshev cefbdccb98 Pass TSRM to create_object 2002-02-14 09:20:51 +00:00
Andrei Zmievski 68a82f14a2 Fix the bug where the declared properties without init values were not
entered into the table.
2002-02-14 04:01:53 +00:00
e305585605 NEWS update 2002-02-14 01:20:58 +00:00
6578efea09 ChangeLog update 2002-02-14 01:20:35 +00:00
Frank M. Kromann d036b10062 Fixing release and debug build on Win32 2002-02-13 23:27:45 +00:00
Vincent Blavet f6f6d88ad3 * Synchronize pearwin script with pearcmd-xxx.php commands
* Still work to do
2002-02-13 21:27:54 +00:00
Vincent Blavet dac7d61612 * user system/user config rather than default value 2002-02-13 21:26:39 +00:00
Andi Gutmans 21b04ff2a6 @ Allow a series of consecutive catch() statements (Andi, Zend Engine)
<?php
	class MyException1 {

	}

	class MyException2 {

	}

	try {
		throw new MyException2();
	} catch (MyException1 $m) {
		print "Caught MyException1";
	} catch (MyException2 $m) {
		print "Caught MyException2";
	}
2002-02-13 19:26:07 +00:00
Yasuo Ohgaki d43e889854 Fix memory leaks. 2002-02-13 13:11:36 +00:00
Marc Boeren 6d3d668887 Fixed bug where users with empty passwords could not connect. (Mc)
# thanks for testing, Yasuo. Could you commit the mem-leak patch now?
2002-02-13 11:09:48 +00:00
Vincent Blavet e5a24250d2 - Adding support for remote-list command (with XML-RPC installed)
- Start support of show-config (still work to do ...)
2002-02-13 08:50:07 +00:00
Andrei Zmievski b0ef26f058 Ack. 2002-02-13 04:56:41 +00:00
Stig Bakken 6176cf5216 * "pear-get install Auth" works now 2002-02-13 01:40:18 +00:00
06ffcf8710 NEWS update 2002-02-13 01:21:31 +00:00
c6daefec0d ChangeLog update 2002-02-13 01:20:31 +00:00
Stig Bakken 773ee5d7e7 * don't use ext/overload yet 2002-02-13 01:09:55 +00:00
Stig Bakken 042b883899 * print package name 2002-02-13 01:07:30 +00:00
Jason Greene bcea892ffa Fix entry 2002-02-12 20:31:30 +00:00
Jan Lehnardt 9869854d47 - added support for different error messages for the following cases:
-
 - if a user with unsufficient permissions trys to select a database
 - PEAR::DB previously threw a "no database selected" error  instead
 - of a more proper "insufficient permissions". This is fixed now.
 -
 - if a user selects a nonexistant database PEAR::DB threw a
 - "no database selected" error instead of "no such database".
 - This is fixed as well.
 -
 - I added two new constants to DB.php and a simple case construct to
 - DB/mysql.php which can be easily extended to achive the above. I
 - hope this is ok.
 - Thanks to Till Gerken for mentioning this.
2002-02-12 18:29:27 +00:00
3b01fd8973 Adding automagically updated ChangeLog. 2002-02-12 17:28:41 +00:00
Andrei Zmievski 9151e980df Fix-up. 2002-02-12 17:20:56 +00:00
Sascha Schumann 1288783667 Irix defines AF_INET6, but lacks IPv6 support, including
struct sockaddr_in6.
2002-02-12 11:00:15 +00:00
Yasuo Ohgaki c1507e1e40 Initialize automatic persistent connection reset flag 2002-02-12 10:01:08 +00:00
Andrei Zmievski 260aee10fe Fix a long-standing infelicity that resulted in extra regex information
not being passed to PCRE functions.
2002-02-12 03:15:27 +00:00
Andrei Zmievski 51f1739983 Expose pcre_get_compiled_regex as an API function. 2002-02-12 03:00:05 +00:00
cc2580f5a4 ChangeLog update 2002-02-12 01:15:06 +00:00
Mark L. Woodward 3edf26b509 Added one more tweak for 4.0.x compatibility.
Used "#warning" to inform users of a hard dependency.
(If #warning is unaccptable, let me know!)
2002-02-11 18:32:00 +00:00
Sebastian Bergmann 3e845aaea4 Fugbix typo. 2002-02-11 16:29:51 +00:00
Martin Jansen 5aa0158452 * Fix bug #15423. 2002-02-11 13:07:42 +00:00
Markus Fischer 8b2dcb33b7 - Fix protos. 2002-02-11 02:48:49 +00:00
f9763d86a0 ChangeLog update 2002-02-11 01:12:17 +00:00
35e8129ff9 NEWS update 2002-02-11 01:12:14 +00:00
Sean Bright 6829710dce '0b' could be the beginning of a hex string (without leading '0x') so if
the user specifies base 16, use that instead.
2002-02-10 23:19:38 +00:00
Sean Bright 72c5a9cd8a Add a new test for GMP base recognition. 2002-02-10 23:13:37 +00:00
Sean Bright cc065b3351 Fix for bugs #10133 and #15454.
Bug #15454 results from a bug in GMP.  If you pass in a string '0xABCD' and
specify a base of 0, GMP figures out that it is hex and skips over the 0x
characters.  If you specify base 16, then it doesn't skip those chars.
This was confirmed with the following test program:

#include <stdio.h>
#include <gmp.h>

int main()
{
        char *str_one, *str_two;
        mpz_t num_one, num_two;

	mpz_init_set_str (num_one, "0x45", 0);
	str_one = mpz_get_str(NULL, 10, num_one);

	mpz_init_set_str (num_two, "0x45", 16);
	str_two = mpz_get_str(NULL, 10, num_two);

	printf("%s / %s\n", str_one, str_two);

	mpz_clear (num_one);
	mpz_clear (num_two);

	return 0;
}

We now take anything that starts with 0[xX] as hexidecimal and anything
that starts 0[bB] as binary (this is what GMP does internally).  We also
no longer force the base to 10 or 16, but instead let GMP decide what the
best base is, be it hex, dec, or octal.
2002-02-10 23:12:57 +00:00
Jason Greene 150d339231 Renamed zval_debug_dump() to debug_zval_dump() 2002-02-10 17:38:15 +00:00
Tomas V.V.Cox a5c0adc9fe Now System will return false on fail 2002-02-10 17:23:04 +00:00
Tomas V.V.Cox 0dd3010501 test suite for the System class 2002-02-10 17:12:43 +00:00
Tomas V.V.Cox d966015b52 - Now error will be triggered with trigger_error(). When a command
fails the function will return false
- In-line documentation update
2002-02-10 17:03:22 +00:00
Sebastian Bergmann 1fd542fd38 Export lex_scan(). Both the PHPDoc and tokenizer extension need this. I hope this is okay with Z&A. 2002-02-10 12:54:02 +00:00
Thies C. Arntzen 1d54bf97e0 only rollback at script end if there is something to rollback. 2002-02-10 12:41:52 +00:00
Stig Venaas 9e420659ad Added php_sockaddr_size() in network.c (and the header file). This is used
in ftp.c to make sure connect() and bind() is called with size argument
which is exactly the size of the relevant sockaddr_xx structure
2002-02-10 12:35:29 +00:00
Sebastian Bergmann 8acc47a7a9 TSRM fixes. 2002-02-10 08:08:14 +00:00
Jason Greene 91ac18bc66 @Added zval_debug_dump which works similar to var_dump yet displays extra
internal information such as refcounts, and the true type names (Jason)
2002-02-10 06:52:35 +00:00
Yasuo Ohgaki 7baa36c885 Fix typo 2002-02-10 02:27:09 +00:00
b99e34196b ChangeLog update 2002-02-10 01:11:14 +00:00
Andrei Zmievski 66c94331bc *** empty log message *** 2002-02-09 22:54:08 +00:00
Stig Bakken 5970cfb56c * ZTS fix
# Sebastian, does it build on Windows now?
2002-02-09 22:01:00 +00:00
9d76c72e80 ChangeLog update 2002-02-09 01:13:51 +00:00
2db42e1db1 NEWS update 2002-02-09 01:13:48 +00:00
Sebastian Bergmann 07f95b3a79 Add MSVC workspace for tokenizer extension. Add php_tokenizer.dll entries to php.ini-*. 2002-02-08 21:19:55 +00:00
Thies C. Arntzen 7f29ed5798 - got rid of unneded calls to OCIAttrGet when reexecuting the same query
- only invalidate the define list after all rows from a REFCORSOR are read,
  "normal" corsors will now remember their column defines. this means that
  ocigetcolumn[name|type|..] will from now on work even after the result set
  has been read.
2002-02-08 18:50:12 +00:00
Stig Bakken cf5ba0feec @Added Andrei's tokenizer extension (Stig) 2002-02-08 18:49:40 +00:00
Mark L. Woodward e8285d6bba Backward compatibility to 4.0.6 does not have "HAVE_PHP_SESSION" define
Renamed PHP_4_x_API to PHP_4_x
2002-02-08 03:05:21 +00:00
51ca3418ba ChangeLog update 2002-02-08 01:15:51 +00:00
Andi Gutmans b04238698f - Remove object debug messages. 2002-02-08 00:22:37 +00:00
Sterling Hughes ed6d751cd9 move to the ZEND_DECLARE_MODULE_GLOBALS() and ZEND_EXTERN_MODULE_GLOBALS
macros
2002-02-07 22:00:21 +00:00
Martin Jansen 7270b4223d * Better error handling. 2002-02-07 20:50:08 +00:00
Stanislav Malyshev 6608f07322 Mega-commit: Enter the new object model
Note: only standard Zend objects are working now. This is definitely going to
break custom objects like COM, Java, etc. - this will be fixed later.
Also, this may break other things that access objects' internals directly.
2002-02-07 14:08:43 +00:00
Martin Jansen 5e9b1634c6 * Partially fix bug #15423. 2002-02-07 11:15:54 +00:00
Yasuo Ohgaki 88e3aa7af6 Legacy code removed.
This line incorrectly removes buffer.
This line was correct only when ouput.c does not support
nested output buffers. Fixed bug #15178
2002-02-07 02:50:28 +00:00
6b9790f631 ChangeLog update 2002-02-07 01:13:14 +00:00
Frank M. Kromann 9d0f7ba3b5 Convert pLists to output character set before parsing the list 2002-02-06 22:31:23 +00:00
Frank M. Kromann 1121df7c45 Added order by clause in fbsql_list_tables().
Table names will now be sorted.
2002-02-06 19:41:00 +00:00
Frank M. Kromann d26c7a41ff Adding fbsql_table_name() aliased fbsql_tablename() for compatibility with MySQL 2002-02-06 19:24:02 +00:00
Derick Rethans cee660a123 - Fix for bug 15404 2002-02-06 19:10:35 +00:00
Yasuo Ohgaki ccc8755196 Remove unused line
# I forgot to delete this line
2002-02-06 10:03:40 +00:00
Yasuo Ohgaki eba550de9d Fixed crash with mb_output_handler()
When mb_output_hanlder is applied muiltiple times, PHP does not output.
This should be fixed also.
2002-02-06 09:51:39 +00:00
Tomas V.V.Cox b91c077710 added 'System::type()' (show the full path of a command)
Copied almost verbatim from Stig's PEAR_Dependency::checkProgram()
2002-02-06 08:32:00 +00:00
Yasuo Ohgaki 39ad453266 Clean up code.
Removed PHP_PGSQL_API macro.
Define pgsql_globals_id
# Need a little more clean up
2002-02-06 07:25:51 +00:00
Yasuo Ohgaki b42f0b0d43 Make module specified functions to static.
Added TSRMLS_D/C, get rid of one TSRMLS_FETCH.
2002-02-06 07:16:10 +00:00
777a707c17 ChangeLog update 2002-02-06 01:14:48 +00:00
81b38907c1 NEWS update 2002-02-06 01:14:45 +00:00
Andi Gutmans 284eaf34cc - Add TSRMLS_FETCH()'s needed for the new object overloading in ZE2. 2002-02-05 20:43:49 +00:00
Mark L. Woodward a8013517f5 Sorry guys, PHP 4.0.6's ZEND_MODULE_API_NO is whacked, it has an extra
zero, thus ZEND_MODULE_API_NO >= xxxx, will not work for about 18000 years.
Added better checking, and cleaned up some of the #ifdef you seem to love
so much.
2002-02-05 20:02:34 +00:00
Hartmut Holzgraefe 8b9b916ce9 removed the new-style parameter parser code for bc *and* readability
reasons, changed the remaining #ifdefs to check the api version
directly instead of using the not really related OLD_ZEND_PARAM macro
2002-02-05 17:00:28 +00:00
David Eriksson 2272eb57a4 @- Removed Satellite. It is now part of PEAR. 2002-02-05 09:09:35 +00:00
Yasuo Ohgaki a3e676f64b pval -> zval
Check number of parameters
2002-02-05 07:37:42 +00:00
Yasuo Ohgaki 0bf51b81bd register_globals=off is defualt for 4.2.0 2002-02-05 06:31:53 +00:00
foobar ff51415423 Let's be consistent and use zval instead of pval 2002-02-05 01:30:22 +00:00
foobar 86f123ba2e Export php_session_start(). 2002-02-05 01:28:55 +00:00
foobar 53cfce6bc5 The extensions build as shared were installed into wrong place
even as the layout was PHP.
2002-02-05 01:27:00 +00:00
1267f38f63 ChangeLog update 2002-02-05 01:14:05 +00:00
Jaroslaw Kolakowski 176a426b2e Fixed compile error 2002-02-04 21:07:39 +00:00
Andi Gutmans 8535164f21 - This small patch should also take care of allowing unseting of $this->foo
- and static members. The unset() opcode was luckily already suitable for
- object overloading.
2002-02-04 20:44:24 +00:00
Andi Gutmans e366f5dbd8 - Fix problem with the objects_destructor called during shutdown. It was
- freeing objects from id 0 instead of id 1. id 0 is not used.
- Change isset/empty opcodes to support static members and the new way of
- doing $this->foobar. Also the opcodes operate now on the hash table
- combined with the variable names so that they can be overloaded by the
- soon to be added overloading patch.
2002-02-04 19:29:56 +00:00
Mark L. Woodward 5f52b45708 More 4.0.6 compatibility. 2002-02-04 18:33:46 +00:00
Mark L. Woodward aa96e0e756 Restored backward compatibility to PHP 4.0.6 2002-02-04 18:01:40 +00:00
Yasuo Ohgaki 6abc327855 Fix ZTS startup crash 2002-02-04 14:28:02 +00:00
Thies C. Arntzen 32495f256c add oracle 9 detection for oracle-module 2002-02-04 12:08:40 +00:00
Yasuo Ohgaki 23258ef145 Remove TSRMLS_FETCH() does not need 2002-02-04 11:55:12 +00:00
Yasuo Ohgaki 488f6a706d Fix ZTS build 2002-02-04 11:43:07 +00:00
1f06429edb ChangeLog update 2002-02-04 01:14:37 +00:00
jim winstead 0abd719d2d don't include old changelogs in distribution, either 2002-02-03 20:54:41 +00:00
Adam Dickmeiss 4935636521 Zend config sets ZEND_EXTRA_LIBS. Bugs 14452, 14602, 14616, 14824 2002-02-03 20:42:10 +00:00
Adam Dickmeiss c4d84aa333 Zend config sets ZEND_EXTRA_LIBS. Bugs 14452, 14602, 14616, 14824 2002-02-03 20:00:27 +00:00
Yasuo Ohgaki bd32363e2f Revert last commit. Last patch has problem for the 1st request.
# I also found what's wrong in mod_mm.c  :)
# I'll fix it later since don't have much time now.
2002-02-03 05:40:19 +00:00
Yasuo Ohgaki 4c6e58ac59 Fixed crash when save_path is invalid.
Fixed crash when user save handler is incorrectly used.
Fixed crash when session read failed.
2002-02-03 03:17:35 +00:00
Yasuo Ohgaki 665d38629b Added UCS4 test 2002-02-03 02:18:30 +00:00
bb5e06b14e ChangeLog update 2002-02-03 01:12:07 +00:00
Shane Caraveo 14de816ecf now needs getopt 2002-02-02 23:17:10 +00:00
Shane Caraveo 3b81b97c40 an update to stresstest 2002-02-02 23:14:23 +00:00
Sebastian Bergmann cb2124be7c Revert per Andi's request. Sorry :-( 2002-02-02 19:55:21 +00:00
Sebastian Bergmann dcd4e0a2ec Remove obsolete CG(extended_info) = 0 calls, we already do this in zend_set_default_compile_time_values(). 2002-02-02 19:53:43 +00:00
Sebastian Bergmann fd884e2bea Fix warning. Again :-) 2002-02-02 19:47:24 +00:00
Andi Gutmans 2c95fc2d55 - Please don't use strcmp() and friends in Zend but only the mem*
- functions. I didn't check this patch so please check that it works.
2002-02-02 19:35:18 +00:00
Sebastian Bergmann 5319d84400 Consistency. 2002-02-02 19:33:36 +00:00
Sebastian Bergmann 4a2f0316e1 Fix a warning. 2002-02-02 19:27:33 +00:00
Sebastian Bergmann 86469a0dfb Fix a warning. 2002-02-02 19:18:25 +00:00
Andi Gutmans 180f91bac8 - Nice catch by Derick. GINIT is dead. 2002-02-02 16:56:17 +00:00
Jon Parise 1e5e93a63d Revert revision 1.294.
This commit broke things in interesting ways under FreeBSD.  By adding these
default header files to every header check, a number of subsequent checks
failed (due to unsatisfied header file dependencies).  This occured because
<netinet/in.h>, for example, requires <sys/types.h>.  In other words, these
default includes are not autonomous and don't make workable defaults.
2002-02-02 06:21:58 +00:00
Sebastian Bergmann 3ff94ed265 Fix thread-safe build. 2002-02-02 05:43:55 +00:00
26f1840e57 ChangeLog update 2002-02-02 01:13:02 +00:00
e8d58effa6 NEWS update 2002-02-02 01:12:59 +00:00
Stig Bakken ad882c44c9 * add some missing attributes 2002-02-02 00:06:44 +00:00
Sebastian Bergmann 031784c687 MFZE1: is_a() 2002-02-01 22:55:02 +00:00
Andrei Zmievski 441c583a2c Converted extract() to use smart_str for variable name manipulation. This
sped it up a bit.
2002-02-01 20:17:32 +00:00
James E. Flemer 6aadae975c Changed php.ini directive 'safe_mode_include_dir' to accept a
(semi)colon separated path, rather than a single directory.
Also moved checking of said path into a separate path for code
readability.
@- Changed php.ini directive 'safe_mode_include_dir' to accept a
@  (semi)colon separated path (like 'include_path') rather than
@  a single directory. (jflemer)
2002-02-01 20:04:14 +00:00
Andrei Zmievski 1f8c828c08 Added is_a() function. 2002-02-01 19:34:45 +00:00
Adam Dickmeiss f8d533d79d Fixes in MARC decoder (base adress, DANmarc case). 2002-02-01 17:56:19 +00:00
Tomas V.V.Cox 22aee18f0b Fix remote security risk, pointed out by Wolfram Kriesing 2002-02-01 16:36:32 +00:00
Tomas V.V.Cox 1cb07caf63 Added support for passing special backend params in DSN. Ex:
ibase://user:pass@localhost/db?role=foo&dialect=bar
2002-02-01 15:03:17 +00:00
Thies C. Arntzen 4526dd2078 remove some crap 2002-02-01 14:02:49 +00:00
James Cox 3783576806 2 years is ages.... and no way temporary. changed the php4 logo to a versionless one. 2002-02-01 09:20:11 +00:00
Derick Rethans 32e9ea6c64 - Fix for bug 14899 (patch by Sander Roobol <sander@php.net>) 2002-02-01 08:53:47 +00:00
Yasuo Ohgaki 53d349a3a6 Fixed bug with encodings that has 0 byte in strings. Patch by <itai@siftology.com>
Fixed possible problem with encodings that a char can be larger than
4 bytes.
2002-02-01 08:32:04 +00:00
5bf45bb13f ChangeLog update 2002-02-01 01:25:43 +00:00
James Cox 0ca5bf08b5 updating license to 2002 (hasn't been done since 2000) 2002-01-31 22:39:34 +00:00
Boian Bonev 8ad5009b22 fix comment 2002-01-31 17:02:48 +00:00
Martin Jansen 2077f62d08 * Fix bug #15313 2002-01-31 13:41:04 +00:00
Derick Rethans 98e8a7ba08 - Fix for bug 15311 (type mismatch of php_dl when #ifndef HAVE_LIBDL) 2002-01-31 10:21:24 +00:00
Yasuo Ohgaki 866a609208 A fix for the bug number 13231 & 11699.
Makes the roxen support compile.  Patch by Lars Wilhelmsen <lars@sral.org>
2002-01-31 10:15:07 +00:00
Derick Rethans d26afcf366 - Fix for openssl_pkcs7_sign segfaults
(patch by Christian Stocker <chregu@php.net>)
2002-01-31 09:57:28 +00:00
Stig Bakken c049dda279 * lowercase tags and attributes 2002-01-31 08:19:34 +00:00
Stig Bakken 0943dc82dd * remove broken rule for rebuilding Makefile 2002-01-31 08:19:09 +00:00
fef8e31f7c ChangeLog update 2002-01-31 01:13:37 +00:00
Edin Kadribasic 4972fac567 Ignore register_globals for $argc and $argv under CLI SAPI. 2002-01-31 00:05:07 +00:00
Edin Kadribasic 13ca332184 Enable extensions to specify that they are not supposed to be
built with the CLI SAPI. This is done by passing "nocli" as the
3rd parameter to PHP_EXTENSION macro.
2002-01-30 23:46:44 +00:00
Dan Kalowsky 860e2e97ee Fix for bug #14803 2002-01-30 21:54:54 +00:00
Sebastian Bergmann ec4bb876a3 Fugbix typo. Update path to /lib/optional. 2002-01-30 20:38:00 +00:00
Stig Bakken c1048eac9f * don't make command libs executable 2002-01-30 12:21:25 +00:00
Stig Bakken 615f110d4e * modularize "pear" and "pear-get" commands somewhat. checking options
etc. is done for both in pearcmd-common.php.
2002-01-30 12:20:12 +00:00
Stig Bakken a33fd65b12 * silence warning 2002-01-30 12:18:10 +00:00
Stig Bakken f4425aece6 * bring DTD up to date 2002-01-30 09:23:34 +00:00
Thies C. Arntzen 82a9fc746e enable "user-interrupts" 2002-01-30 07:41:04 +00:00
ab0404ffa3 ChangeLog update 2002-01-30 01:12:39 +00:00
Sebastian Bergmann 1ff67b38b3 Overload is built-in. 2002-01-29 19:05:40 +00:00
c4c1d7dba8 ChangeLog update 2002-01-29 01:11:18 +00:00
Sterling Hughes ed77632f2d Commit for mr. torben:
Add XSLT to extensions file, mark sablot obsolete
2002-01-28 22:16:03 +00:00
Jon Parise 9aba9071b6 These are now defined in zend_config.w32.h. 2002-01-28 16:06:27 +00:00
jim winstead 95407d3202 testing checkin 2002-01-28 01:43:43 +00:00
caccd36c4f ChangeLog update 2002-01-28 01:17:41 +00:00
Sebastian Bergmann 55cdbf3a6d MFZE1: define a couple of macros under win32. (Patch By: Jon Parise <jon@php.net>) 2002-01-27 20:20:19 +00:00
Jon Parise e40e7a669a zend_isinf() is already defined in Zend/zend_config.w32.h for Win32. 2002-01-27 18:19:18 +00:00
fabrice aeschbacher ece15242e7 add ibase_add_user(), ibase_modify_user(), ibase_delete_use() 2002-01-27 15:31:15 +00:00
Jon Parise f174bbc711 Use the zend_* versions of finite(), isinf(), and isnan(), as defined
in php_config.h.  Redefine the zend_* versions in the case of Win32.

This fixes the build on systems that don't provide a native version of,
say, isinf() (e.g. Solaris).
2002-01-27 07:41:20 +00:00
Jon Parise ea089d09ae Add a note that this statement will never be reached. 2002-01-27 07:23:21 +00:00
Jon Parise d299bdc5d9 Add a comment indicating that this return statement will never be reached.
# Perhaps it should just be removed?
2002-01-27 07:15:07 +00:00
Jon Parise 539114339c Use socklen_t (instead of int) where appropriate. 2002-01-27 07:06:09 +00:00
Jon Parise d7523c883b Because php_network.h includes <sys/socket.h>, it must be included after
_XPG4_2 is defined.

This fixes the build under Solaris 8.
2002-01-27 06:55:10 +00:00
Sterling Hughes 0d59ff42d4 don't throw fatal errors, throw E_WARNING instead. 2002-01-27 06:18:05 +00:00
Sterling Hughes 094873c6d2 hopefully fix --with-openssl issues 2002-01-27 06:11:50 +00:00
Marko Karppinen fc3a59c85f Enable developers to use PHP_ARG_ENABLE and PHP_ARG_WITH silently
to maintain legacy configure options without clutter in the
configure help and checking output.
# Hopefully this encourages module writers to finally adopt
# standard naming conventions for their configure options!
2002-01-27 03:37:02 +00:00
83721f0142 ChangeLog update 2002-01-27 01:16:08 +00:00
Marko Karppinen e9111e53f6 - Reorganized stuff in configure.in and added a few comments
# This isn't nearly as big a change as the diff would lead one to believe.
# I've tested this on all my machines and its working for sniper too.
- Added a check for ApplicationServices/ApplicationServices.h (Mac OS X)
- Added AC_PROG_CPP, AC_PROG_CXX and AC_PROG_CXXCPP
# (the bundled libmysql build was failing without them with ac2.52/OSX)
- Improved the IPv6 check to fail on Mac OS X (there's no IPv6 there yet)
2002-01-26 23:57:17 +00:00
Vincent Blavet 3d95bf927c * Remove the use of a temp dir
* Tar archive is now doing the same work with less overhead
2002-01-26 12:36:30 +00:00
5746250af8 ChangeLog update 2002-01-26 01:14:54 +00:00
7ef1f9f8cb NEWS update 2002-01-26 01:14:48 +00:00
Marko Karppinen 14b6678d2b Improve detection of resolv.h on versions of Darwin, FreeBSD and Solaris
(this requires post-2.13 autoconf, but 2.13 ignores it gracefully)
2002-01-25 23:42:23 +00:00
Marko Karppinen aca369774c Relying only on host_alias is wrong 2002-01-25 23:38:58 +00:00
Yasuo Ohgaki 93cb481634 We need mm file for each user.
# GCI/CLI SAPI need this. It might be better to disable mm save handler
# for CGI/CLI, though.
2002-01-25 20:59:24 +00:00
Derick Rethans edb0118d96 - Fix for bug #15227: Compiling the CGI binary with xmlrpc fails to
build/link expat
2002-01-25 19:56:48 +00:00
Derick Rethans 33b66a224b - Fixed highlight_* (make it more robust)
#- Thx Mr S for noticing this.
2002-01-25 15:43:58 +00:00
Hartmut Holzgraefe 58749ec3a4 no longer experimental 2002-01-25 14:01:41 +00:00
Andi Gutmans 7309a6ed21 - First destructor hell fix. There was a situation where an object's
- destructor could be run after its class was already dead. Right now
- object destructors is the first thing whic happens during shutdown in
- order to prevent this problem. It's very likely that destructors will
- cause more grief and we'll have to outline exactly when you should use
- them and what kind of logic you're allowed to do inside of them.
- This bug was reported by sebastian.
2002-01-25 12:55:03 +00:00
Derick Rethans 96a9eba020 - Added optional parameter to highlight_string and highlight_file which
makes these functions return a highlighted string instead of dumping
  to standard output. (Derick)
@- Added optional parameter to highlight_string and highlight_file which
@  makes these functions return a highlighted string instead of dumping
@  to standard output. (Derick)
2002-01-25 11:27:47 +00:00
Rasmus Lerdorf 0d139d3c27 (extraxt) add EXTR_IF_EXISTS and EXTR_PREFIX_IF_EXISTS flags
@- Added EXTR_IF_EXISTS and EXTR_PREFIX_IF_EXISTS flags to extract()
@   EXTR_IF_EXISTS only extracts a variable if it already exists
@   EXTR_PREFIX_IF_EXISTS only extracts the variable if it exists and
@   then it prepends the prefix to it.  ie. if $PATH exists then
@   extract($_ENV,EXTR_PREFIX_IF_EXISTS,'e') would result in $e_PATH
@  This lets you do $a = $b = $c = true; extract($_REQUEST,EXTR_IF_EXISTS);
@  and you only get the global request variables you have defined imported
@  into your symbol table.  (Rasmus)
2002-01-25 09:01:02 +00:00
Derick Rethans 22b1b4547f - Fix for bug #14934: type property not set in comment nodes (domxml) 2002-01-25 07:40:38 +00:00
Yasuo Ohgaki d9692f7896 Add sapi postfix for mm save path.
cli/cgi would not complain about mm save handler with this.
# I'm really annoyed by mm save path problem...
2002-01-25 04:36:26 +00:00
Doug MacEachern a1b21e0c4c adjust to ap_get_brigade() API change 2002-01-25 04:03:42 +00:00
0efc5cb783 ChangeLog update 2002-01-25 01:22:47 +00:00
Yasuo Ohgaki e19be6171f Added "pgsql.auto_reset_persistent" ini entry to catch broken connection
always with pg_pconnect(). (Default Off in source and php.ini-*)
This option requires a little overhead for pg_pconnect().
2002-01-25 00:51:03 +00:00
Yasuo Ohgaki 1ea87faeb1 Added "auto_reset_presistent" ini entry. 2002-01-25 00:43:50 +00:00
Marko Karppinen 99d36a7557 Latest libtools output a multiline version info. Deal with that 2002-01-24 23:31:45 +00:00
Marko Karppinen 449b53e34a Ignore ordinal suffixes on numbers (bug #15210) 2002-01-24 22:24:58 +00:00
Edin Kadribasic fd7ff95fde Added --disable-cli option. 2002-01-24 17:55:13 +00:00
Edin Kadribasic 859e7b79bd Made entry more consistent. 2002-01-24 17:54:45 +00:00
Sascha Schumann ede07e3a84 fix typo, found by edin 2002-01-24 16:48:53 +00:00
Andrei Zmievski c330a4f9ce Revert back to using <char> element for newlines. 2002-01-24 16:18:50 +00:00
Tomas V.V.Cox 7eebc64347 correct url 2002-01-24 15:02:05 +00:00
Marko Karppinen cd9b5d01e3 Added a case for Darwin / Mac OS X to PHP_SHLIB_SUFFIX_NAME 2002-01-24 14:41:14 +00:00
Marko Karppinen f03933bcec Corrected a confusing comment (see bug #14972) 2002-01-24 14:25:51 +00:00
Sascha Schumann c0b8ac1142 Don't build CLI, if an extension requests that.
In this case, the ircg extension refers to thttpd-specific symbols
which causes the build of the cli sapi module to fail.
2002-01-24 12:55:08 +00:00
Yasuo Ohgaki 8bbe180991 Change NEWS entry according to pgsql source change. 2002-01-24 09:33:54 +00:00
Yasuo Ohgaki c815a20aee Revert last 2 commit. Instead, make php_pgsql_do_connect() to catch
broken connection always.
# I think this is better than check&reset connection when query
# functions are called.
2002-01-24 09:27:43 +00:00
Vincent Blavet 06c98b477b * Call the PEAR_Registry constructor with the optional parameter 2002-01-24 08:24:24 +00:00
Vincent Blavet 1696a2c4e2 * Adding the ability to set the PEAR_INSTALL_DIR while creating the Registry object (in the same way as Installer.php) 2002-01-24 08:22:46 +00:00
Vincent Blavet f2121e4bcf * Adding support of extraction of remote archive http://www/archive.tgz
* Correct bug while using Windows root path c:\xxx\yyy in extract fct
2002-01-24 08:08:54 +00:00
Yasuo Ohgaki 74932e621f Added pgsql connection reset feature. Add my name to --enable-safe-mode fix. 2002-01-24 06:51:12 +00:00
Yasuo Ohgaki 448dbd72cd Add a little more fault tolerance for pg_host, pg_tty and more. 2002-01-24 06:40:10 +00:00
Yasuo Ohgaki ddee00da0e No more httpd restart is required when PostgreSQL is rebooted.
# Works for pg_query()/pg_send_query()
2002-01-24 06:20:33 +00:00
James Cox dc82c80981 updated INSTALL to be more relevant.. more fixes coming (at some point) 2002-01-24 02:06:20 +00:00
6ac7a08bc8 ChangeLog update 2002-01-24 01:14:28 +00:00
Vincent Blavet 2c91e54d5a * Add uninstall command
* Add list-installed command
2002-01-23 19:09:54 +00:00
Tomas V.V.Cox 62c9234520 Return false when the directory can not be created in mkDir() 2002-01-23 18:53:08 +00:00
Frank M. Kromann 2a02754b52 Fixing spelling error in FrontBase section
Changed som int to unsigned int to remove compiler warnings
2002-01-23 17:48:31 +00:00
Frank M. Kromann 55b5cb89bf Fixing spelling error in FrontBase section 2002-01-23 17:47:46 +00:00
Sebastian Bergmann eb60184fdb Add workspace to build CLI SAPI Module on Win32. 2002-01-23 13:42:46 +00:00
Sebastian Bergmann 43b1d2acd1 Give Edin Kadribasic his due credits. 2002-01-23 13:41:52 +00:00
Edin Kadribasic f18fade888 No need to dupe this string in cli sapi (Bug #15181). 2002-01-23 13:15:16 +00:00
Yasuo Ohgaki 47c2644e1d Added comment for pgsql module. 2002-01-23 10:24:57 +00:00
Hartmut Holzgraefe 2f4b9948d5 claiming maintainance ownership of ext/calendar 2002-01-23 09:55:45 +00:00
Hartmut Holzgraefe 22c3da8f9c added info about FETCH macros
(written over a year ago but somehow never commited)
2002-01-23 09:52:28 +00:00
7ce2b21354 ChangeLog update 2002-01-23 01:12:18 +00:00
Jaroslaw Kolakowski 4674123cca Simplified domxml_substitute_entities_default() function 2002-01-22 18:47:06 +00:00
Andi Gutmans c2b73faade - Fix a bug reported by Sebastian with indirect class names not working. 2002-01-22 18:02:52 +00:00
Sterling Hughes 1a36eb5574 just init CURL_GLOBAL_SSL 2002-01-22 17:06:16 +00:00
Christian Stocker deb652deed Getting rid of some compile warnings (thanks to markus for pointing me in the right direction :) ) 2002-01-22 09:52:56 +00:00
Sean Bright a38bfb424e Fix for bug #15130. Way too much effort for this bug, but cleaned up code
a bit, use zend_parse_parameters(), etc, etc.  We only look for extensions
in the basename, not the full path.
2002-01-22 03:35:23 +00:00
5a78516686 ChangeLog update 2002-01-22 01:16:18 +00:00
Jaroslaw Kolakowski b7f0e6bd1c Added domxml_substitute_entities_default() function 2002-01-21 23:21:32 +00:00
Chris Jarecki 5f153ca929 - fixed bug caused by libxml2 in xpath_register_ns()
- registered namespaces are now persistent
2002-01-21 19:12:00 +00:00
Jon Parise 6aa6a6ab87 Adding Archive/Tar.php to php4/pear/. This is needed in order for the
phptar script (php4/pear/scripts/phptar) to be useful, so it makes sense
to make Archive/Tar.php a standard component.
2002-01-21 18:25:04 +00:00
Hartmut Holzgraefe 44b5298506 removed check macros no longer needed due to CLI work
(plus reverting last commit, was in wrong dir :( )
2002-01-21 16:49:31 +00:00
Hartmut Holzgraefe a79e857ccd removed check macros no longer needed due to CLI work 2002-01-21 16:39:17 +00:00
Dan Kalowsky 31cd8e0b75 this closes off a number of ODBC bugs.
# this is a bit hack-ish in it's functionality.  The proper answer (allowing
# users to set their cursor type) has bugs with some tests cases at this time.
#  But this is being done to just get ODBC back into working order.
2002-01-21 14:11:17 +00:00
Derick Rethans 580a4701ba - Fix for bug #15057: getimagesize() crashes when offline (on MacOSX) 2002-01-21 07:54:56 +00:00
ce1bbf3712 ChangeLog update 2002-01-21 01:14:50 +00:00
Yasuo Ohgaki ae64c5cec3 Fixed typo and proto 2002-01-21 00:36:22 +00:00
Edin Kadribasic 1769e3fcdc Fixed bug #9041 and others in the same class (patch by pete.lee@ubs.com) 2002-01-20 23:58:37 +00:00
Andi Gutmans 2131b019c7 - Improve performance of functions that use $GLOBALS[]
- Please check this and make sure it doesn't break anything.
2002-01-20 20:42:15 +00:00
Markus Fischer fe6e7058ee - Fix crash with invalid localtime on Win32 systems. 2002-01-20 20:16:54 +00:00
Doug MacEachern cb0a09808f adjust to ap_get_brigade and input filter api changes 2002-01-20 18:44:15 +00:00
Sebastian Bergmann 23f8fe7d47 Move Cache to /pear. 2002-01-20 16:06:08 +00:00
Sebastian Bergmann 9904415f88 Move Payment_Verisign to /pear. 2002-01-20 15:55:04 +00:00
Sebastian Bergmann 8019a1cfe2 Move Benchmark, Math, Numbers to /pear. Remove Log, it was already in /pear. 2002-01-20 15:44:32 +00:00
Hartmut Holzgraefe ce8c6a04b6 cut&paste errors in protos fixed 2002-01-20 14:45:30 +00:00
Hartmut Holzgraefe b0bffb022a proto fix 2002-01-20 14:40:59 +00:00
Sebastian Bergmann 465ef7c649 Fixed by Sean Bright's commit. 2002-01-20 08:34:05 +00:00
Sean Bright 16344cc34e Forgot to remove the return from a void function 2002-01-20 05:02:52 +00:00
Sean Bright cbedeea53c These PHP3_* macros aren't defined in the code, so these haven't been doing
anything for some time now (at least since 4.0 was released).  So let's go
ahead and remove those.
# If I missed something obvious, let me know and I will revert the patch.
2002-01-20 04:55:40 +00:00
Edin Kadribasic ac1446fe1d Removed entry implemented in cli sapi. 2002-01-20 04:29:03 +00:00
Edin Kadribasic f5790b0a7c Modified the build system to make certain extensions (pcntl, ncurses,
pcntl) only with cgi/cli sapi's. This was done by adding 3rd optional
parameter to PHP_EXTENSION macro which should be set to "cli" if
the extension only makes sense for that class of api's.
2002-01-20 02:30:18 +00:00
Edin Kadribasic 7de51385c2 Added missing entry to .cvsignore 2002-01-20 01:58:14 +00:00
7c356f9a24 ChangeLog update 2002-01-20 01:16:05 +00:00
b8b8d8fff9 NEWS update 2002-01-20 01:16:02 +00:00
Yasuo Ohgaki 871f6dbde1 Get rid of needless spaces 2002-01-20 01:09:11 +00:00
Yasuo Ohgaki ab1adb8745 Revert my last commit
# "automagic" is intened :)
2002-01-20 01:03:17 +00:00
Edin Kadribasic 535f43789f Removed two issues resolved by the introduction of sapi/cli. 2002-01-19 23:31:12 +00:00
Edin Kadribasic 9504838d7e Merged patch from sapi/cgi.
# I will try to sync relevant patches from sapi/cgi to sapi/cli
2002-01-19 22:45:26 +00:00
Jaroslaw Kolakowski 833de5e0d2 - Fixed passing parameters to domxml_xslt_process(). Now they can be either strings or XPath expressions.
- Several minor fixes in domxml_xslt_process().
2002-01-19 21:12:05 +00:00
Wez Furlong bf7662a241 Make the decoder less strict to allow for brain-dead mailers that mark
messages as 7bit but then include 8bit chars in the body.
Thanks to Dan Fitzpatrick for bringing this to my attention.
2002-01-19 14:06:52 +00:00
Thies C. Arntzen a0ab80ab80 MFZE1 2002-01-19 10:35:51 +00:00
Tomas V.V.Cox 87530cf819 Stores limit_from and limit_count as DB_result proporties instead
of DB_common. Fixs bug when doing queries inside limitQuery results.
2002-01-19 07:46:23 +00:00
Yasuo Ohgaki 34cfada447 Make --enable-safe-mode useful
# It seems this option is broken for a long time.
@ Fix --enable-safe-mode. This configure option was not working.
2002-01-19 03:15:03 +00:00
f9626c7c90 ChangeLog update 2002-01-19 01:13:02 +00:00
a3836896ca NEWS update 2002-01-19 01:12:59 +00:00
Shane Caraveo 6120b8dc5a reimplement extension listing 2002-01-18 20:27:09 +00:00
Markus Fischer b7285dde4e - More WS fixes 2002-01-18 15:54:50 +00:00
Christian Stocker 6c08b99aac shite :) too much WS fixes. leave the licence as it was...
# (why uses pear spaces and php tabs anyway... but i don't want to start another CS flame war ...)
2002-01-18 15:45:44 +00:00
Christian Stocker 33ffb64091 - WS fixes (replaced " " by \t) 2002-01-18 15:40:26 +00:00
Christian Stocker 98e5d33bb8 - added optional parameters format and level for domxml_dump_node() 2002-01-18 15:03:13 +00:00
Christian Stocker 8e70e61bfa - added macro DOMXML_PARAM_ONE
@- added function domxml_dump_node($doc,$node). Dumps a node plus all
@  children into a string. (chregu)
2002-01-18 12:40:12 +00:00
Christian Stocker afb8248e91 @- Added function domxml_node_get_content() (chregu) 2002-01-18 11:04:10 +00:00
Christian Stocker 793bc648bf # sorry for the mixing of different things in this commit
- added DOMXML_PARAM_THREE macro
- renamed domxml_dumpmem to domxml_dump_mem, added alias for
  domxml_dumpmem
- domxml_has_attributes was missing in in zend_function_entry
@- 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)
2002-01-18 07:58:47 +00:00
Yasuo Ohgaki 5219d6c096 Fix typo 2002-01-18 06:51:04 +00:00
e6f6749965 ChangeLog update 2002-01-18 01:13:34 +00:00
013072f880 NEWS update 2002-01-18 01:13:30 +00:00
Adam Dickmeiss b2e578256e New function yaz_es_result: Z395.0 Extended Services Result.
----------------------------------------------------------------------
2002-01-17 23:21:28 +00:00
Ilia Alshanetsky 5b20d4c067 Fixed shmop_read to append \0 to returned string in shmop_read to eliminate Zend warnings 2002-01-17 19:58:53 +00:00
Thies C. Arntzen 53f8b2d28b @ - Don't touch any globals in session_unset() if register_globals is set
@   to off. (Thies)

guys, shoot me if i'm wrong, but when we have set register_globals to off we
should _not_ touch any global variables at any time, right? so all session
register/unregister should only work on $HTTP_SESSION_VARS and $_SESSION. this
patch fixes at least one spot where we were touching globals even with
register_globals set to off.
2002-01-17 18:56:11 +00:00
Thies C. Arntzen dadf411b8d @ - 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)
# sorry, no time to write the docs for this right now...
2002-01-17 18:40:59 +00:00
Sterling Hughes 2e2d1d356c Fix attribution, its Petr's patch, not mine :) 2002-01-17 17:26:38 +00:00
Sterling Hughes dd5afef1eb Little cleanup, add information about Sablotron 0.8 2002-01-17 17:26:09 +00:00
Sterling Hughes ce6c5801b3 Update for Sablotron .8 2002-01-17 17:21:38 +00:00
Yasuo Ohgaki 6c41675b0f Use libxml2 header if there are older version. Reported by <jwagoner@wlion.com> 2002-01-17 01:18:25 +00:00
Jaroslaw Kolakowski bde9576660 Added XsltStylesheet class with methods:
- domxml_xslt_stylesheet(string),
- domxml_xslt_stylesheet_doc(DomDocument),
- domxml_xslt_stylesheet_file(filename),
- process(DomDocument,parameters array) - previously domxml_xslt_process().
2002-01-17 01:13:39 +00:00
ec7286bc55 ChangeLog update 2002-01-17 01:12:29 +00:00
Yasuo Ohgaki 7dfff1a835 Export php_session_register_module/serializer 2002-01-16 23:24:37 +00:00
Rasmus Lerdorf 8f1eb93e0a Fix typo 2002-01-16 22:32:40 +00:00
Marc Boeren 4ce7a79870 mysql_db_query is deprecated, fixed by using mysql_select_db and
mysql_query (Mc).
2002-01-16 16:28:50 +00:00
Yasuo Ohgaki 847fd9d595 Export php_session_register_module/serializer. 2002-01-16 04:56:35 +00:00
7a05e1a726 ChangeLog update 2002-01-16 01:14:36 +00:00
Andrei Zmievski d0ed5b984c - Fixed a bug with matching string containing null bytes. 2002-01-15 15:40:31 +00:00
c7b5155fdc ChangeLog update 2002-01-15 01:14:47 +00:00
Chris Jarecki 300b5c0955 - using macro in xpath_register_ns()
- fixed protos in xpath functions
2002-01-14 21:43:18 +00:00
Andi Gutmans 65f01545a8 - Fix crash bug in call_user_function_ex(). Thanks to Sebastian for the
- very nice and short reproducing script.
<?php
	$array = array('foo', 'bar');

	uasort($array, 'cmp');

	function cmp($a, $b)
	{
		return (strcmp($a[1], $b[1]));
	}
?>
2002-01-14 16:55:23 +00:00
Stefan Esser 3acaa30c1c fix for bug #14776 2002-01-14 13:36:54 +00:00
Sebastian Bergmann 7e1957044d Update Exceptions example. 2002-01-14 12:14:18 +00:00
Rui Hirokawa 0544cdca3a fixed an error in mbstring caused by confliction with regex. 2002-01-14 03:08:40 +00:00
a95ff8e6e3 ChangeLog update 2002-01-14 01:13:37 +00:00
0aaafceafc NEWS update 2002-01-14 01:13:34 +00:00
Edin Kadribasic 2af5118d35 Fixed build in the directory other than $top_srcdir. 2002-01-13 23:51:56 +00:00
Andi Gutmans f1e8815c26 - Change exception handling to use the Java-like catch(MyException $exception)
- semantics. 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();
	}
?>
2002-01-13 20:21:55 +00:00
Tomas V.V.Cox 4cfbd67b08 New DSN "protcocol(protocol_opts)" format support:
phptype://user:pass@protocol(proto_opts)/database
ex:
pgsql://user@unix()/pear
mysql://user@unix(/path/to/socket)/pear
pgsql://user:pass@word@tcp(somehost:7777)/pear
2002-01-13 18:24:56 +00:00
Andi Gutmans 1f2f2571e4 - MFZE1 2002-01-13 17:51:18 +00:00
Rasmus Lerdorf 8fa606756a 4.1.1 NEWS entry block was missing from the HEAD tree 2002-01-13 16:50:08 +00:00
Rui Hirokawa 26a12ba990 fixed some link error of gd's configure. 2002-01-13 06:25:18 +00:00
Edin Kadribasic a7bbee9d22 This should fix cli build when running 'make install' directly. 2002-01-13 05:26:20 +00:00
Chris Jarecki 6536287267 - Added xpath_register_ns() function.
@ - Added xpath_register_ns() function.
@   It makes possible to issue XPath queries with namespaces
@   like for example: "//namespace:sampletag" (Chris Jarecki)
2002-01-13 01:17:34 +00:00
0c3d2275ff ChangeLog update 2002-01-13 01:10:35 +00:00
Edin Kadribasic 317e1a4636 Fixed CLI build when the main SAPI is built as a shered library. 2002-01-12 22:48:54 +00:00
Edin Kadribasic db8647203c Modified the build system to always build CLI SAPI. 2002-01-12 14:51:54 +00:00
Gavin Sherry 0a8722a0ac My bad. Left some stray debugging code in previous commit. 2002-01-12 07:38:35 +00:00
Gavin Sherry e8baeb304a See the update to dba_db3.c 2002-01-12 07:23:35 +00:00
Gavin Sherry 8f30e5f619 This fixes the notorious "mode 'c' fails" bug (see bugs - 10380, 10798, 11732). The bug originates from the fact that mode "c" for db3 sets 'type' to DB_UNKNOWN and mode DB_CREATE when the database already exists. The underlying library raises an error at this logical discrepancy: obviously one cannot create a database of unknown type. 2002-01-12 07:22:27 +00:00
Vlad Krupin 8df03e2814 Fixed segfault in imap_bodystruct() when called with an invalid message
number. Now it fails with a warning instead.
2002-01-12 05:39:07 +00:00
0b22425be1 ChangeLog update 2002-01-12 01:11:03 +00:00
9ffb4f2592 NEWS update 2002-01-12 01:11:00 +00:00
Jaroslaw Kolakowski ca7c5978d9 Added domxml_node_replace_node() function. 2002-01-11 21:15:46 +00:00
Rui Hirokawa c79f749ff8 @Added multi-byte enabled regex functions. (Rui) 2002-01-11 13:21:09 +00:00
Markus Fischer 1e2b854bba - mkdir(): made second (mode) parameter optional, default to 0777
switched to zend_parse_parameters().
# Added vim 'noet' setting
2002-01-11 10:44:24 +00:00
Tomas V.V.Cox e5898af98c - Added HTTP::head($url) which sends a "HEAD" HTTP command to a server
and returns the headers as an associative array
- Call-time pass-by-reference fixes
2002-01-11 01:51:24 +00:00
3c0d0b351e ChangeLog update 2002-01-11 01:11:10 +00:00
Tomas V.V.Cox 3a878be7a1 submit a test that will fail due to php bug #14744 2002-01-11 00:04:55 +00:00
Frank M. Kromann d454f8bb3a Adding functions to get BLOB/CLOB size from a lob_handle.
Added descriptions on most protos
2002-01-10 21:56:18 +00:00
Andrei Zmievski ddc039d0f5 Fix the recursive counting, it was broken for associative or non-sequential
arrays. Also update NEWS file.
2002-01-10 21:31:06 +00:00
Derick Rethans 645a94cd5e - Make an E_NOTICE error type show 'Notice' instead of 'Warning'. 2002-01-10 16:00:08 +00:00
Yasuo Ohgaki 43c3d4495a Fix startup crash
# Sascha, thanks for fixing poor patch :)
# mm save handler does not work regardlress of
# save path patch or not for some reason.
2002-01-10 12:08:39 +00:00
Markus Fischer daecaa729c - Unified error messages.
- Improved argument handling in dio_fcntl().
2002-01-10 09:09:19 +00:00
Sascha Schumann 770c39fed6 Improved code for handling PS(save_path)
Don't MFH before further testing
2002-01-10 07:37:10 +00:00
Sascha Schumann bbda8d9678 Ws fix 2002-01-10 07:28:27 +00:00
Sascha Schumann a1dbb4ab16 (PHP touch) Operate on a stack buffer.. no need for allocating newtime
on the heap.
2002-01-10 07:25:00 +00:00
Sascha Schumann edfd6d0988 Add three-parameter touch() which enables users to set
mtime/atime to different values.
2002-01-10 07:21:57 +00:00
Yasuo Ohgaki 7d819fc0cf Fix bug in test script 2002-01-10 06:44:02 +00:00
Yasuo Ohgaki 5c0dfdbdbe Make use of save_path for mm file.
Patch by Henning Schmiedehausen <hps@intermeta.de>
Closes bug 14808
2002-01-10 06:14:40 +00:00
Sascha Schumann 3a86163f19 Make these tests succeed with non-standard settings 2002-01-10 05:11:19 +00:00
Markus Fischer 904e3e4a41 - Fix compilation. (Christian Stocker) 2002-01-10 01:53:22 +00:00
0101ed3196 ChangeLog update 2002-01-10 01:15:32 +00:00
Yasuo Ohgaki 4c24fa7e70 Year update 2002-01-10 00:39:42 +00:00
Yasuo Ohgaki 3ca76cffa0 shmop got a new maintainer 2002-01-10 00:38:05 +00:00
jim winstead 831473d76e Rename finite/isinf/isnan to more standard is_*() names. 2002-01-09 23:59:05 +00:00
jim winstead e68095972e Move type-handling functions into ext/standard/type.c (which had
a few otherwise unused functions in it).
2002-01-09 23:47:46 +00:00
Markus Fischer 98220d2a82 - Correct some protos. 2002-01-09 16:51:53 +00:00
Derick Rethans aee570302f - Fix bug introduced in earlier patch 2002-01-09 16:03:36 +00:00
Uwe Steinmann 990c27a23a - fixed typo in deprecated functionname 2002-01-09 08:09:16 +00:00
Yasuo Ohgaki 5e3ab6f514 - shmop_open has a new flag for read/write access, 'w'
- eliminated a segfault when trying to write to a SHM_RDONLY segment
- eliminated a segfault when an invalid flag which starts with 'a' or 'c' is passed
- updated creators' email addresses
- changed error messages to say shmop_* instead of shm* to correspond with new shmop_* function names
Patch by Ilia Alshanetsky (ilia@prohost.org)
# Please test :)
2002-01-09 08:02:21 +00:00
foobar 6d14a5c60b - Fixed compile with older libxml.
# I had libxml 2.4.2 installed.
2002-01-09 03:42:30 +00:00
foobar 6ec98d5d74 - Fixed the creation of pear-get script. 2002-01-09 03:41:48 +00:00
foobar fa41fe8646 Reverted Hartmut's patch as it caused more trouble than it solved.
# Broke my build totally. The 'correct' fix is to make the checks better
# everywhere. ie. to check for existance of the library/symbol in some lib.
2002-01-09 03:40:51 +00:00
foobar f50277f003 whitespace 2002-01-09 02:06:32 +00:00
bf60b6178f ChangeLog update 2002-01-09 01:13:39 +00:00
Jaroslaw Kolakowski b178addf5c A
Changed names of functions:
- htmldoc() to html_doc(),
- htmldocfile() to html_doc_file(),
- domxml_htmldumpmem() to domxml_html_dump_mem(),
- htmldumpmem() to html_dump_mem().
2002-01-08 19:13:42 +00:00
foobar a41ee123df Some whitespace fixes (naugthy me :) and make use of PHP_CHECK_LIBRARY
macro instead of AC_CHECK_LIB.

# Better not touch LIBS anywhere. It might cause unexpected build problems
# if someone forgets to set it back in some config.m4..
2002-01-08 17:51:08 +00:00
Sterling Hughes 4afe145a10 Changed proto via Georg Richter's request. 2002-01-08 06:06:58 +00:00
aac95a6672 ChangeLog update 2002-01-08 01:14:25 +00:00
aa06ff957b NEWS update 2002-01-08 01:14:22 +00:00
Jaroslaw Kolakowski 415d5cbb75 - Added functions: htmldoc(), htmldocfile(), domxml_htmldumpmem().
- Added error handling for the libxml library.
- Added preliminary DOM XSLT support:
-- uses the libxslt library,
-- operates on DOM objects, not strings,
-- functions: domxml_xslt_process(), domxml_xslt_version().
2002-01-08 00:31:26 +00:00
James Cox f8a6ab9ae7 browscap url fix, plus removed ^M references. it should look nice on any os. 2002-01-07 18:51:51 +00:00
James Cox fa9f75e3eb changed the instructions for php with win32 + apache. Recommending using sapi
over cgi binary, since cgi binary and apache don't mix well security wise.
2002-01-07 18:31:18 +00:00
Yasuo Ohgaki 38f8fee99d New PostgreSQL functions 2002-01-07 08:14:34 +00:00
Egon Schmid ab32202968 Fixed some protos. 2002-01-07 06:58:01 +00:00
Rui Hirokawa 32c1b0fd2e @added mb_get_info() to get internal settings of mbstring. 2002-01-07 02:40:54 +00:00
687ce0d838 ChangeLog update 2002-01-07 01:13:47 +00:00
ff713a1e86 NEWS update 2002-01-07 01:13:44 +00:00
Markus Fischer d4fa619d49 - Fix domxml_node_unlink_node() proto and return value. 2002-01-07 00:54:20 +00:00
Tomas V.V.Cox ed01060897 ws 2002-01-07 00:11:11 +00:00
Stig Venaas 9a307e4550 Added IPv6 support
@- Added IPv6 support in FTP extension. (Stig Venaas)
2002-01-06 23:10:54 +00:00
Stig Venaas a6ec8d37e6 hostconnect now divides the timeout with no. of addresses. If a connection
attempt times out, it goes on to the next. Unless each timeout would be
<5s. Added php_any_addr() that fills out the any address for IPv6 and IPv4.
2002-01-06 22:45:43 +00:00
Andi Gutmans b9355b9a11 - Output error when there's an uncaught exception (by Timm Friebe) 2002-01-06 20:30:41 +00:00
Tomas V.V.Cox ce82f6261a use the new Console_Getopt::readPHPArgv() function to read args 2002-01-06 20:19:41 +00:00
Tomas V.V.Cox db508778ad Added readPHPArgv() function that will safely read the $argv PHP array
across different PHP configurations. Will take care on register_globals
and register_argc_argv ini directives and the new $_SERVER vars
2002-01-06 20:17:00 +00:00
Andi Gutmans 0f398e4d4a - Make sure $this is passed on to methods 2002-01-06 19:52:22 +00:00
Sebastian Bergmann 62dc854bb0 Happy New Year. 2002-01-06 15:21:36 +00:00
Edin Kadribasic b1f3a91569 @- 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, etc. (Edin)
Added CLI (command line intrerface) sapi.
# Let's see if a build expert can make this compile along
# side some other sapi.
2002-01-06 14:08:14 +00:00
Edin Kadribasic 1788410a56 Added argc and argv in request_info needed for the new cli sapi.
Modified registering $argc and $argv to support cli sapi.
2002-01-06 13:58:05 +00:00
Stig Venaas 6e1878b0fc Added some consts for arguments in network.c declarations. Moved
php_sockaddr_storage to php_network.h and added check for struct
sockaddr_storage
2002-01-06 11:54:19 +00:00
Stig Bakken 350777932a * archive the 2001 changelog 2002-01-06 05:19:43 +00:00
e92382460e ChangeLog update 2002-01-06 01:19:29 +00:00
e92233bffc NEWS update 2002-01-06 01:19:24 +00:00
Markus Fischer 734b77d130 - Refuse attribute nodes on add_child() and add list destructor for PI
nodes. (Christian Stocker)
- Fix append_child() according to add_child().
- Fix some protos, minor code and warning message cosmetics.
2002-01-05 23:50:59 +00:00
jim winstead 4fb4c6d4b3 More tweaking of wordwrap() with the cut parameter set. It was being a
little too aggressive and cutting words without breaking at spaces
first. (A couple of tests were incorrect.)
2002-01-05 23:49:58 +00:00
Andi Gutmans e1876cba4d - Small fix 2002-01-05 20:55:56 +00:00
jim winstead ca15b22212 New memcpy()-based wordwrap() implementation. The simple case
(single-character break, no forced break) appears to be about 60%
faster, and there's simply no comparison for non-simple cases with
non-trivial amounts of text. The old algorithm was O(n^2) (with an
unfortunately large constant factor) because of the use of strncat(),
the new one is O(n). Added some more tests, too.
@ - Made wordwrap() significantly faster. (Jim)
# test case: $t = join('',file('ChangeLog')); $w = wordwrap($t,10,"\n",1);
# new code completes in less than a second. i'm still waiting for the
# old code to finish.
2002-01-05 20:46:43 +00:00
Andi Gutmans e56fb1639b - Allow passing of $this as function arguments.
- Fix a bug which I introduced a couple of months ago
2002-01-05 19:59:09 +00:00
Tomas V.V.Cox 7f98b04296 Added check for $argv avaible
(thanks Michael Härtl <mhaertl@pressline.de>)
2002-01-05 17:20:08 +00:00
Andi Gutmans a4248dd584 - Significantly improve the performance of method calls and $this->member
- lookups.
2002-01-05 15:18:30 +00:00
jim winstead 62395159a9 Fix the Win32 compile. 2002-01-05 08:29:53 +00:00
Egon Schmid 87ad1fdb3b Fixed some protos. 2002-01-05 07:54:49 +00:00
jim winstead b9d68b8e9d Apparently multi_convert_to_double_ex() didn't quite do what I
thought. Still need to handle numeric strings.
2002-01-05 03:56:38 +00:00
jim winstead 461e105069 Fixed pow(), and added finite(), isinf(), and isnan(). Also fixed
pow() tests.
@- Fixed pow(), and added finite(), isinf(), and isnan(). (Jim)
# Jeroen was on crack, and apparently flunked arithmetic. Names of new
# functions subject to change if people get persnickety about them.
# (They're currently the same as the underlying C library function
# names. Hope nobody forgets to update the tests if they change the
# names.)
# Oh, and pow() uses the new parameter-passing API now.
2002-01-05 03:45:11 +00:00
jim winstead 4b8f435b2a good grief, positive powers of 0 are well-defined. (code fix coming.) 2002-01-05 02:16:16 +00:00
jim winstead 9a171d03e8 Be more aggressive in making sure that substring matches are valid in
ereg_replace before trying to use them.
# i could have sworn i fixed this in php3. ereg() has similar logic, i
# guess i just missed ereg_replace. fixing this lets
# ext/standard/tests/reg/012.phpt pass on my debian/unstable box
2002-01-05 01:59:11 +00:00
Zak Greant 6823fb1fe7 Surprising how tests can fail when they don't have any supporting data :) Thanks for the catch Jan and Jim 2002-01-05 01:58:44 +00:00
8b7a1d5440 ChangeLog update 2002-01-05 01:10:33 +00:00
4036c14edc NEWS update 2002-01-05 01:10:30 +00:00
Jon Parise 2720dc3c05 Nuke unused variable warning (end_arr). 2002-01-04 22:57:36 +00:00
Stig Venaas 2ac2b22c9b Made ldap_modify() an alias for ldap_mod_replace(). The two were identical.
#For more info, see my posting on php-dev Dec 25th.
2002-01-04 20:56:03 +00:00
jim winstead f68b7c5f3e Fixed segfault in wordwrap() when wrapping to zero width and using
multi-character break or trying to force cut (bug #12768, now fails
and issues a warning because forcing a zero-width cut doesn't make
sense). Also converted to new paramater-passing API and avoid making
an extra copy of the return values.
# also added tests.
@- Fixed segfault in wordwrap() when wrapping to zero width and using
@  multi-character break or trying to force cut (bug #12768). (Jim)
2002-01-04 19:48:08 +00:00
Sterling Hughes 1808802279 Added the O_NOCTTY option, for terminal i/o. 2002-01-04 19:42:31 +00:00
Hartmut Holzgraefe 597c0d5d4e first PHP_EXTENSION_LIBS casualty :( 2002-01-04 15:00:26 +00:00
Ben Mansell 0cbbac3c12 Added log_message function to the FastCGI sapi, so you can see error
output from scripts
2002-01-04 14:39:46 +00:00
Hartmut Holzgraefe 0195cc8364 ncurses is useless in webserver modules 2002-01-04 14:15:51 +00:00
Hartmut Holzgraefe 25534467c7 more unquoted messages with kommas fixed 2002-01-04 14:15:25 +00:00
Hartmut Holzgraefe 5a8b199454 always quote messages with [...], *especialy* when using kommas in the text 2002-01-04 14:13:53 +00:00
Hartmut Holzgraefe e69e9be289 proto fixes 2002-01-04 14:10:05 +00:00
Hartmut Holzgraefe 5560c7a686 use predefined function instead of hardcoded test 2002-01-04 14:08:50 +00:00
Hartmut Holzgraefe dda970500e proto fix 2002-01-04 14:08:25 +00:00
Hartmut Holzgraefe 3edcf21dda proto fix 2002-01-04 13:51:03 +00:00
Hartmut Holzgraefe 7d220af292 small clarification 2002-01-04 13:14:53 +00:00
Sascha Schumann afb022b7ec Remove #line's from var_unserializer.c 2002-01-04 13:10:26 +00:00
Hartmut Holzgraefe ec89317ff2 check for library existance before adding them 2002-01-04 12:27:01 +00:00
Hartmut Holzgraefe 48cba31e58 two new check functions for use in config.m4 file 2002-01-04 12:26:27 +00:00
Sebastian Bergmann aaa2d1f2e0 Update .cvsignore. 2002-01-04 09:50:41 +00:00
Andi Gutmans eb08cb956b - Improve performance of indirect-referenced function calls 2002-01-04 09:21:16 +00:00
Andi Gutmans 878f78a6d6 - Nuke C++ comments 2002-01-04 08:07:39 +00:00
Andi Gutmans 6203a250f7 - Separate other kinds of function calls too.
- Significantly improve performance of function calls by moving lowercasing
- the function name to compile-time when possible.
2002-01-04 08:05:21 +00:00
Andi Gutmans 0ab9d11225 - Start splitting up different kinds of function calls into different
- opcodes.
2002-01-04 06:44:19 +00:00
0d1ce8b710 ChangeLog update 2002-01-04 01:14:02 +00:00
Frank M. Kromann 5d0ac50c8b Making error handling thread safe. Thanks to Paco Ortiz <fjortiz@comunet.es> 2002-01-03 23:08:21 +00:00
Hartmut Holzgraefe d63edeba21 make configure more robust if extensions add libraries without
checking for their existance first

old behaviour was to fail on the next library check with misleading
messages, now configure will work but make will fail with a
'lib not found' message
2002-01-03 20:30:07 +00:00
Hartmut Holzgraefe c9bc54abc3 fix for bug #14832: basename with 2nd parm corrupts source string 2002-01-03 20:20:35 +00:00
Markus Fischer 7603d13733 - Now use ZE's builtin zend_zval_type_name(). 2002-01-03 14:32:36 +00:00
Derick Rethans 9b391a83c2 - MFZE1 for exit fix, exposing current function name in error messages and
exposing zend_zval_type_name().
2002-01-03 14:19:13 +00:00
Markus Fischer 7f428de370 - domxml_node_add_child(): Perform deep copy before adding child to prevent
double memory freeing.
# I wonder how this could work before.
2002-01-03 13:20:04 +00:00
Markus Fischer 84b948a15f - FTP_BINARY is more common instead of FTP_IMAGE. 2002-01-03 07:57:58 +00:00
Thies C. Arntzen 21cc717bac protos fixes by Wolfgang Drews 2002-01-03 06:57:22 +00:00
Egon Schmid e941df5d1a Please, no punctuation mark at the end of the description. 2002-01-03 05:55:22 +00:00
a767522485 ChangeLog update 2002-01-03 01:14:17 +00:00
Zak Greant 8c8b49ed20 Adding key_exists alias for array_key_exists, at the request of One-Who-Shall-Not-Be-Named-Because-He-Is-On-Vacation 2002-01-02 21:21:48 +00:00
Stig Bakken 54ad4c578c * PEAR.php line number changes again 2002-01-02 17:19:25 +00:00
Stig Bakken 6ca17a6e35 * registry files renamed from .inf to .reg, update test 2002-01-02 17:18:52 +00:00
Stig Bakken 7ab86afd32 * support "pear-get install XML_RPC" 2002-01-02 17:12:26 +00:00
Stig Bakken 4fc3baefd2 * start splitting "pear" command into "pear" and "pear-get" 2002-01-02 17:11:34 +00:00
Stig Bakken d379d735fb * use new overloading API properly 2002-01-02 17:09:59 +00:00
Markus Fischer f7bd38413e - Corrected proto for ftp_connect() (new optional parameter for initial
custom timeout).
2002-01-02 15:01:15 +00:00
Markus Fischer 9bde60d148 - Added ftp_set_option(), ftp_get_option() and support for setting a
custom timeout.
# Adding custom buffer size would be next, no promises though.
2002-01-02 14:58:17 +00:00
jim winstead 8e6a16984a jpeg2wbmp,png2wbmp: fix prototypes; _php_image_convert: simplify argument count checking 2002-01-02 01:25:48 +00:00
8582e4e9e5 ChangeLog update 2002-01-02 01:14:31 +00:00
Markus Fischer 83ccb3e511 - Fixed ftp_fget() and ftp_mkdir() protos. 2002-01-02 01:05:10 +00:00
Markus Fischer 7c197409ae - Corrected proto for ftp_fget(). 2002-01-02 00:42:11 +00:00
Markus Fischer 8559f372fd - Switched to zend_parse_parameters(), unified error/warning messages,
use real resources instead of integers, adjusted prototypes (hope I got
  them all).
2002-01-01 22:15:22 +00:00
Markus Fischer 5076b907e1 - Summarize dbase fixes. 2002-01-01 21:33:32 +00:00
Adam Dickmeiss a1432aa89a Removal of non-essential parameters for non-piggyback search. 2002-01-01 14:09:03 +00:00
3cb2be5fc0 ChangeLog update 2002-01-01 01:12:07 +00:00
3dd7bc06d9 NEWS update 2002-01-01 01:12:04 +00:00
Jon Parise a2d83ca4a4 Match the table style of the other single-row info entries. 2001-12-31 19:46:30 +00:00
Vlad Krupin 543077d915 Now dbase_pack() actually truncates the resulting .dbf file to the right
size (possibly fixing bug #6852 #3).
@Make dbase_pack() truncate the file to the right size. (Vlad)
2001-12-31 12:52:34 +00:00
Vlad Krupin 2f0cd79621 Verified and fixed bug 6852 #2. Now memo fields are 10 butes long, not 9.
That does not seem to affect how the code works except when creating a new
structure, in which case 'M' fields used to get created with size 9.
@Fixed bug 6852 #2. Mem fields are now 10 bytesin size, not 9. (Vlad)
2001-12-31 10:23:30 +00:00
Vlad Krupin 431c1f1d31 Verified and fixed bug 6852 #1. No more null byte after terminating 0x0D.
Verified that the problem is real when creating new files and writing
a record. Both fixed and old versions seem to be able to somehow read
and write already existing files properly though.
@Fixed bug 6852 #1. No more null byte after terminating 0x0D. (Vlad)
2001-12-31 09:13:08 +00:00
Sebastian Bergmann 7c2fef7020 Consistency. 2001-12-31 07:50:42 +00:00
Egon Schmid cc121adc54 Oops, missed one proto. 2001-12-31 05:37:19 +00:00
Andi Gutmans c54f216ecd - Add example of default argument for argument passed by-ref 2001-12-31 05:28:18 +00:00
Egon Schmid 97e03e1573 Fixed some protos. 2001-12-31 05:25:30 +00:00
Egon Schmid 831dfbd011 Fixed some protos. 2001-12-31 04:57:25 +00:00
08e96fd4e5 ChangeLog update 2001-12-31 01:13:10 +00:00
Georg Richter 69ce6a99a4 some prototypes changed 2001-12-30 19:14:12 +00:00
Alex Waugh dc7f04163a Give defaults for pread and pwrite checks when cross compiling 2001-12-30 15:39:01 +00:00
Sebastian Bergmann 4af1b42bc0 Typo. 2001-12-30 10:43:27 +00:00
Zak Greant f01745896f chdir: corrected proto, converted to zend_parse_parameters 2001-12-30 10:13:08 +00:00
Zak Greant 3ac1646ef2 Corrected bug in php_mysql_fetch_hash() that prevented columns with NULL values from having both numeric and associative indexes. (Bug 14291) 2001-12-30 10:00:26 +00:00
Zak Greant 59a45acca6 chroot: corrected prototype, converted to zend_parse_parameters 2001-12-30 09:50:41 +00:00
Zak Greant 2f6ffb545e Converted getenv to use zend_parse_parameters 2001-12-30 09:36:24 +00:00
Rui Hirokawa 427019cc76 added libfdftk for link path to make shared module. 2001-12-30 09:00:43 +00:00
Egon Schmid adee5f9451 Fixed a proto. 2001-12-30 08:21:58 +00:00
Egon Schmid 9f69163453 Fixed some protos. 2001-12-30 08:12:29 +00:00
Egon Schmid f347f25987 Fixed some protos. 2001-12-30 07:29:11 +00:00
Egon Schmid a3e6298de3 Fixed some protos. 2001-12-30 06:46:53 +00:00
Yasuo Ohgaki 47e4a02a64 Get rid of error message
# These lines should be enabled when save handlers can be initialized
# before session module initialization.
2001-12-30 01:37:23 +00:00
e321ed9346 ChangeLog update 2001-12-30 01:10:17 +00:00
3af1ccef0b NEWS update 2001-12-30 01:10:14 +00:00
Derick Rethans 57f3c395b8 - Removed is_array_multidimensional 2001-12-29 22:59:40 +00:00
Derick Rethans ae07e93028 - Added test for recursive counting 2001-12-29 21:05:03 +00:00
Derick Rethans cef0a461f9 - Added extra parameter to count() that recursively counts elements in an
array and added is_array_multidimensional(). (patch by Vlad Bosinceanu
  <glipy@fx.ro>)
2001-12-29 20:59:59 +00:00
Andi Gutmans 211d712c59 @ Fix bug in krsort() where an extra character was being compared (Andi)
- Fix bug in krsort() where an extra character was being compared (Andi)
2001-12-29 20:47:25 +00:00
Andi Gutmans 66d88ba07b - Fix bug in XML extension which exists due to a not perfect work around
- with ZE1. In ZE2 the correct code seems to work well.
2001-12-29 18:10:01 +00:00
Andi Gutmans 8a0c756c58 - #define to help #ifdef stuff in PHP sources to make them work w/ ZE1 and
- 2
2001-12-29 18:07:08 +00:00
Sebastian Bergmann 9063a96dfa PHP 4.0 -> PHP 4. Patch by Martin Jansen <mail@martin-jansen.de>. 2001-12-29 14:23:58 +00:00
Georg Richter df9dc889e0 1) fixed bugs in soft label key functions
2) insert new slk-functions
3) defined new key-constants
2001-12-29 11:48:30 +00:00
Andi Gutmans c6f1e68e75 - A few clarifications 2001-12-29 09:48:07 +00:00
Sebastian Bergmann 1d4793e5e8 Integrate Andi's examples and some notes by Stig. 2001-12-29 09:21:54 +00:00
Sebastian Bergmann 76cfd48f72 Update Exceptions example. 2001-12-29 08:17:57 +00:00
Stig Bakken 9311e05119 * install PEAR/Dependency.php 2001-12-29 02:12:02 +00:00
Vlad Krupin 2f307b2a53 fixed bug preventing pspell from building when pspell header files are
located in an unusual (e.g. /usr/local/include/pspell) location.
@fixed bug that made pspell include pspell.h from a wrong location. (Vlad)
2001-12-29 01:50:10 +00:00
7bdacc44a2 ChangeLog update 2001-12-29 01:10:04 +00:00
Tomas V.V.Cox 6b0ac4420c - Rewrote infoFromTgzFile() (Stig, no more "pedantic" :-)
- Added <description> tag for package.xml
- Temporal fix arround php bug #14744 and temp files cleaning
2001-12-28 19:27:08 +00:00
Andi Gutmans ae1a702501 - Fix some case insensitivity stuff in respect to classes 2001-12-28 16:36:04 +00:00
Andi Gutmans b14f6cf79f - Support default arguments for reference parameters
- Fix two compile warnings
2001-12-28 13:28:33 +00:00
Andi Gutmans 9a83837391 - Wasn't adding the lower case version of the class name to the hash 2001-12-28 13:18:19 +00:00
Georg Richter 87932e1e59 mouse support for ncurses added:
ncurses_getmouse, ncurses_ungetmouse, ncurses_mouse_trafo, ncurses_wmouse_trafo
2001-12-28 10:35:53 +00:00
Stig Bakken b22a776018 * added <description> element in <package> 2001-12-28 02:09:27 +00:00
6792e51a65 ChangeLog update 2001-12-28 01:10:15 +00:00
Andi Gutmans e322abdd63 - Use two underscores for __construct(), __clone and friends... 2001-12-27 16:35:07 +00:00
Dan Kalowsky b76eb3ae40 Making PHP compile again on MacOSX 10.1
# 10.1 does not have inet_pton support yet it seems so disabling it.
2001-12-27 15:42:05 +00:00
Andi Gutmans 3d89072c7e - Only check refcount of object if the destructor was called. 2001-12-27 14:44:39 +00:00
Andi Gutmans 73b159e056 - Experimental support for destructors. We need to see if destructors
- will actually work well in the context of PHP so we should consider this
- as experimental. Possible problems might be that when the constructor is
- run PHP might not be in a stable state.
2001-12-27 14:35:09 +00:00
Andi Gutmans b3fd2faac0 - Support parent:: again 2001-12-27 13:12:45 +00:00
Andi Gutmans a5f7a383bf - Support unified constructor name _construct() 2001-12-27 12:23:03 +00:00
Tomas V.V.Cox bc7bc41e6f switch to use the xml end tag function for correct handling
of multiline tag contents
2001-12-27 11:10:56 +00:00
Georg Richter 9c133dd23e Added new functions: ncurses_waddstr, ncurses_wnoutrefresh, ncurses_wclear,
ncurses_wcolorset, ncurses_wgetch, ncurses_keypad, ncurses_wmove

minor changes in protos.

Special Thanx to Mathieu Kooiman for submitting his patches!
2001-12-27 08:49:12 +00:00
e99c98a8f7 ChangeLog update 2001-12-27 01:11:01 +00:00
Andi Gutmans 5cb454a8ad - Fix scoping issue. The following works now:
<?
	class MyClass {
		static $id = 0;

		function MyClass()
		{
			$this->id = self::$id++;
		}

		function _clone()
		{
			$this->name = $clone->name;
			$this->address = "New York";
			$this->id = self::$id++;
		}
	}



	$obj = new MyClass();

	$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";
2001-12-26 20:17:34 +00:00
Andi Gutmans b04acdadf4 - Print out object id for easier debugging 2001-12-26 20:06:06 +00:00
Andi Gutmans 29ea3da2f8 - Pretty much finish _clone() support 2001-12-26 19:54:20 +00:00
Stig Venaas 403350e41d unbreak parallel search 2001-12-26 18:40:57 +00:00
Andi Gutmans 2ce4b47657 - Initial support for _clone() 2001-12-26 17:49:22 +00:00
Rui Hirokawa e72d606c36 added code to remove overloaded function in RSHUTDOWN. 2001-12-26 15:21:13 +00:00
Andi Gutmans f85c818fe8 - Start fixing the parsing rules so that function and method calls
- can't be used in a write context.
2001-12-26 14:46:18 +00:00
David Croft 0aeded1d2b #remove keyword substitution 2001-12-26 12:08:40 +00:00
Andi Gutmans 76b9acc165 - Fix crash correctly. 2001-12-26 11:18:00 +00:00
Derick Rethans 08c69a5aac - Fix for bug 14690 2001-12-26 10:01:50 +00:00
Yasuo Ohgaki 49d8ec248c Added msession
# Since it's there, I added it to module list. It should be mentioned
# if module is in php4 source tree.
# We need to discuss about PECL. Let's discuss. :)
2001-12-26 09:12:02 +00:00
Tomas V.V.Cox 65a205a7db added default target for installing documentation 2001-12-26 04:00:30 +00:00
Tomas V.V.Cox 09dba8cf28 reverted the last change for now 2001-12-26 03:58:44 +00:00
Tomas V.V.Cox a8f7a57e97 - Install files marked as "role=doc" in a central PEAR doc dir
(defaults to PHP_DATADIR/pear/doc/Package_name/)
- Store a new property of each installed file ['installed_as'] for
  easy uninstall
2001-12-26 03:57:47 +00:00
Yasuo Ohgaki fe81186629 Fix crash with external session save handlers
# This fixes only a little issue with sub modules
# More fixes are needed to make sub modules work correctly.
# 4.1.x also has the same problem....
2001-12-26 01:55:54 +00:00
Stig Bakken bd1a88fab6 * use "windir" env.var on Windows too 2001-12-26 01:50:08 +00:00
Stig Bakken 6b8397b9f7 * added System::tmpdir() method (now uses SystemRoot env.var on Windows) 2001-12-26 01:23:04 +00:00
abe6f2a233 ChangeLog update 2001-12-26 01:10:03 +00:00
Mark L. Woodward 05fd3d04f3 Moved "ifdef HAVE_PHP_SESSION" oops! 2001-12-26 00:50:09 +00:00
Georg Richter 1ca88c9276 activated ncurses_instr
New functions: ncurses_longname, ncurses_termname, ncurses_mousemask
2001-12-25 23:30:55 +00:00
Andi Gutmans e1e02af55b - Revert delete syntax patch 2001-12-25 17:10:58 +00:00
Andi Gutmans ee44180fc6 - Fix a crash (not a thorough fix).
- Commented old code
2001-12-25 16:51:37 +00:00
Stig Venaas a05e74cd29 Added check for ldap_parse_reference() (needed for broken Solaris 2.8), and
report more detailed library version info in the info function.
2001-12-25 14:36:06 +00:00
Georg Richter ae090a31a5 functions ncurses_erasechar, ncurses_inch, mcurses_killchar:
changed return values from bool to string (char)
2001-12-25 13:34:06 +00:00
9a9cf9eec6 ChangeLog update 2001-12-25 01:10:05 +00:00
Andi Gutmans df38ce3727 - Fixed bug where global functions weren't called if they didn't exist
- in the class scope
2001-12-24 17:39:16 +00:00
Rui Hirokawa 49f0b12a96 added my name for NEWS. 2001-12-24 15:21:21 +00:00
Sterling Hughes 85fa03aab3 Avoid a segfault when 0 bytes are returned from a website, and RETURNTRANSFER is enabled. 2001-12-24 13:58:03 +00:00
30b526bf78 ChangeLog update 2001-12-24 01:12:43 +00:00
e9bb88d51e NEWS update 2001-12-24 01:12:37 +00:00
Tomas V.V.Cox bda81affd2 added the <license> tag under <release> for the package.xml file 2001-12-23 21:32:09 +00:00
Mark L. Woodward 04999445d7 Major cleanup 2001-12-23 19:58:22 +00:00
Mark L. Woodward 5514a3e582 A php script which shows how to use msession with PHP sessions 2001-12-23 19:58:00 +00:00
Mark L. Woodward 84d3bfc0ea Added php.ini entry info. 2001-12-23 19:57:33 +00:00
Zeev Suraski a22cd5ba2d Update installation instructions (Marco Kaiser) 2001-12-23 19:48:25 +00:00
Andi Gutmans 3458373ed6 - Fix a bug where function's didn't work anymore in multi-threaded
- servers after the latest startup changes.
2001-12-23 18:39:52 +00:00
Stig Venaas 9912d5fc5d changed address 2001-12-23 17:42:31 +00:00
Stig Venaas ed942af693 Made ldap_set_option work with NULL as link, added option
LDAP_OPT_DEBUG_LEVEL for those that support it, and made sure the rebind
code is currently included for OpenLDAP only.
2001-12-23 16:32:06 +00:00
Markus Fischer 7cf14fb1e1 - Fix tiny leak. 2001-12-23 15:56:41 +00:00
Rui Hirokawa 8488a5a475 @added function overload in mbstring to add multibyte support for string and mail functions. 2001-12-23 15:32:08 +00:00
Alex Waugh 57d2cec170 Check for ushort 2001-12-23 14:37:24 +00:00
Mark L. Woodward c20deee43d Renamed msession_getdata and msession_setdata to
msession_get_data and msession_set_data respectively.
2001-12-23 02:22:09 +00:00
Derick Rethans b498ec567c - Fix for bug 14554 - segfault upon zip_entry_open. (patch by
phpbug@robin.pfft.net)
2001-12-23 01:59:10 +00:00
ed7ce6c111 ChangeLog update 2001-12-23 01:10:01 +00:00
Alex Waugh e320de1e2e Undefine AF_UNIX under RISC OS 2001-12-23 00:46:13 +00:00
Alex Waugh 3b09117535 Cache results of check for int8 2001-12-23 00:41:27 +00:00
Hartmut Holzgraefe ebe7376243 re-added prototype folding hooks 2001-12-22 18:54:40 +00:00
Hartmut Holzgraefe 0d69607ebd *now* it is backwards compatible ... 2001-12-22 18:47:59 +00:00
Andi Gutmans 9e7c0d67d0 - Add initial capability of defining nested classes as class foo::bar 2001-12-22 15:31:44 +00:00
Rasmus Lerdorf 87fa59a1f1 . 2001-12-22 14:00:12 +00:00
Mark L. Woodward dc474647e9 Toned down a comment that was written in the heat of the moment. 2001-12-22 13:33:19 +00:00
Derick Rethans e8f3e3ffa0 - Let ceil also return a float in every case 2001-12-22 11:53:29 +00:00
Derick Rethans 6729156450 - Add test for floor and ceil 2001-12-22 11:52:56 +00:00
Zak Greant 2c9f5d8a91 Modified array_walk, arsort, asort, krsort, ksort, rsort, shuffle, sort,
uasort, uksort and usort.

Corrected prototype comments for all.

Converted to use zend_parse_parameters, except for the u.?sort functions.

Changed return values for failure from implicit NULL to explicit FALSE in
asort(), krsort(), and ksort().

Changed pval to zval in the u.?sort functions.

Added test to help ensure that fixes to code do not change function
behavior. Tests are quite large (~237k) but compress down to ~16k.
Please let me know if this is a problem!
2001-12-22 11:49:56 +00:00
Stig Bakken 9c3b983a35 * add "pedantic" mode in infoFromTgzFile and skip some checks if not
pedantic
2001-12-22 04:42:12 +00:00
Zeev Suraski c8315794f1 Fix incompatibility with Windows .NET (IIS 6)
May also improve stability under other Windows versions
2001-12-22 03:11:46 +00:00
Zeev Suraski 431c793e0c Fix a warning 2001-12-22 03:04:32 +00:00
Zeev Suraski 2f8284ca0a Fix a warning and remove a printf() that slipped in... 2001-12-22 03:04:14 +00:00
Mark L. Woodward f6c98834ea Added msession_call 2001-12-22 02:10:43 +00:00
Mark L. Woodward 1c057aaf67 reverted chages
Restored zend_get_parameters_ex
Put back ansi brackets
Added author note.
Added msession_call
2001-12-22 02:10:19 +00:00
59fda95761 ChangeLog update 2001-12-22 01:10:12 +00:00
Yasuo Ohgaki d4aa7982cf Install session module haeder 2001-12-21 22:50:47 +00:00
Derick Rethans ca1bcd9ac3 - Fix for bug #14646, floor() always returns a float now. 2001-12-21 16:38:49 +00:00
Markus Fischer ba1d89b386 - Typo. 2001-12-21 12:57:17 +00:00
Derick Rethans e5c08b815f - Added open basedir checks to file functions. (Patch by
Christoph Kassen <chkassen@chkassen.de>)
2001-12-21 08:04:21 +00:00
Sean Bright 25058db066 Use memset() instead. 2001-12-21 03:50:07 +00:00
Sean Bright 33730ca2b9 Initialize variable to avoid bogus data and possible segfault. 2001-12-21 03:10:11 +00:00
Sean Bright 0ca4f69d31 Switched some functions to use zend_parse_parameters, cleaned up some
unused variables and some whitespace work.
2001-12-21 01:53:25 +00:00
265c69ac98 ChangeLog update 2001-12-21 01:14:05 +00:00
Frank M. Kromann f3e59b9793 Removed Win32 specific projects. These are now located in pear/PECL 2001-12-20 18:07:36 +00:00
Frank M. Kromann a0492dc8f4 Adding cvs ID 2001-12-20 18:06:13 +00:00
Sebastian Bergmann 825198e7f7 Update header. 2001-12-20 17:08:16 +00:00
Colin Viebrock 0222aed97b Add headers and Id lines 2001-12-20 16:50:49 +00:00
Markus Fischer 529761f0f7 - Fix crash with EntityRef nodes (and properly support them). 2001-12-20 14:40:43 +00:00
Yasuo Ohgaki d9149f023d Added when experimental functions are added. 2001-12-20 02:31:44 +00:00
5e6a0cf6c0 ChangeLog update 2001-12-20 01:12:11 +00:00
Yasuo Ohgaki 806f578365 Updated README. Module will not cancel queued query sent. 2001-12-19 05:57:57 +00:00
Yasuo Ohgaki 4ae3af8a3c Do not cancel queued query automatically. 2001-12-19 05:41:26 +00:00
b2b5e1e979 ChangeLog update 2001-12-19 01:11:22 +00:00
365f3e43cb NEWS update 2001-12-19 01:11:19 +00:00
Yasuo Ohgaki 8e52216b2e More proper error message.
Remove old lines that aren't needed.
2001-12-18 23:52:55 +00:00
Yasuo Ohgaki ee012b03c1 Get rid of useless path from seach path 2001-12-18 23:47:12 +00:00
Zeev Suraski 43617d0d50 MFZE1 2001-12-18 19:56:23 +00:00
Andrei Zmievski 0858fb4b73 @- Added flags parameter to preg_grep(). The only flag currently is
@  PREG_GREP_INVERT that will make the function return entries that
@  did not match. (Andrei)
2001-12-18 19:17:57 +00:00
Frank M. Kromann 92e1241ca9 Adding missing define, needed to build with FrontBase 3.4 and later 2001-12-18 17:40:17 +00:00
Martin Jansen 6c118a143a * Change $Version$ to $Revision$. 2001-12-18 17:06:28 +00:00
Martin Jansen 4b389679c4 * Convert tabs to spaces. 2001-12-18 14:13:43 +00:00
Hartmut Holzgraefe 7dd8ded152 typo fix 2001-12-18 11:16:53 +00:00
Tomas V.V.Cox 8e18d716f8 that makes more sense 2001-12-18 08:52:48 +00:00
Tomas V.V.Cox be45657eea quick fix for the "pear info" command 2001-12-18 08:48:28 +00:00
b9288f3515 ChangeLog update 2001-12-18 01:10:26 +00:00
Tomas V.V.Cox 1a451a98ba Added dependencies check support for Installer 2001-12-17 21:11:50 +00:00
Tomas V.V.Cox 2816eafc06 ensure correct package names and versions in the xml parser 2001-12-17 21:10:11 +00:00
Tomas V.V.Cox ed2bff2a7f - Added callCheckMethod() for making easy the integration with
the PEAR_installer class
- Reverted the logic of the returned value of the check methods.
  They will return false on no error or the error string on error
- Added signOperator() to output the representation of the operator
  with signs instead of letters ('ge' -> '>=')
- Other minor changes
2001-12-17 21:08:58 +00:00
Hartmut Holzgraefe dcda91c1a1 proto fix 2001-12-17 21:01:06 +00:00
Derick Rethans e51ce799af - Try to be a little bit more sane dealing backwards compability 2001-12-17 20:18:16 +00:00
Hartmut Holzgraefe f0c0b88fdd proto fix 2001-12-17 20:06:29 +00:00
Tomas V.V.Cox 47419f899f call PEAR::raiseError() instead of $this->raiseError() in factory() 2001-12-17 15:33:34 +00:00
Rui Hirokawa 1524fa7287 output encoding translation turn off in mb_output_handler() when non-text (binary) data was sent.(Patched by Kanemoto.) 2001-12-17 15:30:08 +00:00
Hartmut Holzgraefe a16b64b7aa yet another proto fix 2001-12-17 12:14:46 +00:00
Hartmut Holzgraefe eb42e4a847 proto fixes 2001-12-17 11:53:38 +00:00
Hartmut Holzgraefe 67d9cd6975 proto fix 2001-12-17 11:48:07 +00:00
Ulf Wendel 8a4b6a79b7 - included PEAR.php
- flush(): consistent cache group defaults
2001-12-17 11:23:33 +00:00
Hartmut Holzgraefe 8a13c8788e added proto descriptions 2001-12-17 10:59:52 +00:00
Yasuo Ohgaki 3778705036 Actually drop test table.
# name is dropdb since it may be changed to actually destory test db
2001-12-17 02:20:43 +00:00
Yasuo Ohgaki 0f12a9ca33 Use database named test for testing 2001-12-17 02:09:07 +00:00
8442ce9d9f ChangeLog update 2001-12-17 01:12:17 +00:00
Yasuo Ohgaki ff219f1f21 Fix compile error 2001-12-17 01:03:52 +00:00
Yasuo Ohgaki 1fc2a27fa5 Funtion rename:
Functions are renamed accoding to coding stanard. Some functions has
completely different name now.
New functions:
pg_copy_to()/pg_copy_from() - by Youichi Iwakiri <yiwakiri@st.rim.or.jp>
pg_lo_tell()/pg_lo_seek()/pg_result_error()/pg_result_status()
pg_escape_string()/pg_escape_bytea() - Only pgsql 7.2 or later.
Fixed:
Wrong mode when clean up connection resource.
Compiler warning for pg_encoding_to_char().
# Please do not document new functions, yet.
# For new functions and other info, please read README
# in module dir.
2001-12-17 00:24:59 +00:00
Yasuo Ohgaki 9a40810c85 Added test files 2001-12-17 00:16:48 +00:00
Stefan Esser a06a627394 fixed: fix for my broken patch. 2001-12-16 23:21:52 +00:00
Rui Hirokawa 26e30dc606 added an option mbstring.func_overload to overload some function by multibyte enabled version of function in mbstring. 2001-12-16 22:58:24 +00:00
Zeev Suraski 8e5e7efc5b Freeing that TLS is just too complicated. Since we're shutting
down anyway, remove it for now (it did not exist in 4.0.6)
2001-12-16 22:45:57 +00:00
Derick Rethans c40b915e55 Add entries 2001-12-16 22:42:02 +00:00
Stefan Esser 99e72c9ae5 whitespace. - now i know how code should look like ... 2001-12-16 21:59:13 +00:00
Stefan Esser 4d2343d7af whitespace. 2001-12-16 21:47:37 +00:00
Stefan Esser 8022bb9b40 fixed: WWW-Authenticate -> header_line got only freed when safe_mode was activ
fixed: WWW-Authenticate -> content of header_line was changed after it was freed
2001-12-16 21:40:20 +00:00
Sebastian Bergmann cc01431199 I'm too trigger-happy. 2001-12-16 20:28:18 +00:00
Sebastian Bergmann 7920d4fc7e delete is now function 2001-12-16 19:57:53 +00:00
Andi Gutmans 1e56cac358 - Seems like most people prefer delete($obj) over delete $obj. 2001-12-16 19:53:06 +00:00
Andi Gutmans ac7ed464b5 - Start adding parsed variable checks. 2001-12-16 19:45:49 +00:00
Andi Gutmans 880e7d8ce7 - Framework for knowing what kind of variable we just parsed.
- This will be used in compile-time error checking which couldn't be done
- at the level of the grammar.
2001-12-16 19:18:19 +00:00
Sam Ruby b4bd4d4f30 Update for 4.1 2001-12-16 16:46:18 +00:00
Tomas V.V.Cox a919c54de1 added support for <deps> and <dep> tags 2001-12-16 16:21:35 +00:00
Yasuo Ohgaki 13dbb1553c README update
Raise error for bogus installation path for --with-pgsql
Added check for pg_escape_*
2001-12-16 15:36:33 +00:00
Tomas V.V.Cox e2a5cf3fcb use the System class for mkDirHier() and mkTempDir() 2001-12-16 15:14:00 +00:00
Stefan Esser b29bcc8618 fixed: bufferoverflow in sapi_add_header_ex triggerable by header("WWW-Authenticate: Basic foobar"); 2001-12-16 14:47:18 +00:00
Stefan Esser dce6ba9e0f fixed: php_ap_getword was unaware of quotes
filenames with ; in it could not get uploaded

fixed: php_ap_getword_conf sometimes returned a static
	string that crashs php when freed
	(f.e. uploading the file "crash; name=  ;"
	crashed php)

fixed: magic_quotes was disabled while filling
	variables with user supplied input

fixed: memoryleak (some strings did not get freed)

fixed: assuming that adress of "" is always the same
	may fail on some compilers
2001-12-16 13:34:52 +00:00
Derick Rethans d578e05f96 Mail should go to php-dev 2001-12-16 13:04:02 +00:00
Derick Rethans 3709eb6ab2 - Fix for bug #14544, bogus warning in pow()
#- I think I do not need to tell who screwed this up....
2001-12-16 10:59:20 +00:00
Hartmut Holzgraefe 424679e9fb proto fixes 2001-12-16 10:18:45 +00:00
Hartmut Holzgraefe afba31f440 proto fixes 2001-12-16 09:56:01 +00:00
Tomas V.V.Cox a74e56fe05 improved phpdoc of mkTemp() 2001-12-16 01:36:49 +00:00
Tomas V.V.Cox aadc3fea32 Added System::mktemp() (Creates temporal files or directories) 2001-12-16 01:30:31 +00:00
40ad451d02 ChangeLog update 2001-12-16 01:10:36 +00:00
Zeev Suraski 9590c5173c Fix bug #13456 - I'm unable to actually test it 2001-12-15 17:09:37 +00:00
Martin Jansen 64a857c52e * Destructors seem to work like a charm. -> No need to keep this line. 2001-12-15 15:01:35 +00:00
Derick Rethans f5f4a5cf37 - TSRMLS here and there, it's all about the Windows flair 2001-12-15 14:55:18 +00:00
Martin Jansen dbe0db638e * Add links to the new documentation. 2001-12-15 14:55:02 +00:00
Derick Rethans 143df7de6b - Added a second parameter to var_export which makes the function return
the variable representation in a string.
2001-12-15 14:45:59 +00:00
Hartmut Holzgraefe 052d5fc85d proto fix 2001-12-15 14:23:07 +00:00
Hartmut Holzgraefe c51651dee2 proto fixes 2001-12-15 14:22:59 +00:00
Hartmut Holzgraefe 57c7f0ab5c cleanup 2001-12-15 14:20:41 +00:00
Hartmut Holzgraefe 1c23d93135 removed a stray proto comment 2001-12-15 14:20:00 +00:00
Hartmut Holzgraefe 43d0919298 improved xml generatioimproved xml generation 2001-12-15 14:19:13 +00:00
Hartmut Holzgraefe 72c7872e7f proto fix 2001-12-15 14:12:33 +00:00
Derick Rethans 9f6ff716c1 - Added TODO file 2001-12-15 13:18:51 +00:00
Derick Rethans 856c9fa57b - Fix for bug 14162, invalidate the resource then mcrypt_generic_init fails 2001-12-15 13:17:55 +00:00
c464d42445 ChangeLog update 2001-12-15 01:10:13 +00:00
8b90094a53 NEWS update 2001-12-15 01:10:10 +00:00
Markus Fischer e1d33db97f - Damn Typo. 2001-12-14 21:03:06 +00:00
Markus Fischer 022bef6ca7 - Remove redundant code. 2001-12-14 20:48:29 +00:00
Sterling Hughes a98c093d44 be rfc compliant...
RFC 822 *only* supports four digits for the year in order to have a compliant
header.
RFC 850 supports two digits for the year (y2k_incompliant :) so use that when
y2k_compliance is turned off.

In either case, both of these formats require that GMT be appended to the header,
so we do this as well
2001-12-14 11:43:20 +00:00
Sterling Hughes 33f839f31d derick's message is in the PHP_4_0_7 branch (or will be :)
jmoore merged this fix into PHP_4_0_7 before the release...
2001-12-14 10:03:16 +00:00
Thies C. Arntzen 7155e1311f add todo 2001-12-14 09:42:39 +00:00
Stig Bakken 7ea3d57462 * update to new overload api 2001-12-14 07:47:41 +00:00
Jason Greene 2807e1742f Add myself as a maintainer 2001-12-14 05:58:28 +00:00
Vlad Krupin fb8c063249 Fixed bug #5993. Now if the result returned from a database is bigger
than a long, dbase_get_record() and dbase_get_record_with_names() will
return a string instead.
# Need to update documentation to reflect that change
@ Fixed problem with dbase not returning very large (larger than long)
@ integers properly. (Vlad)
2001-12-14 04:22:01 +00:00
foobar ae24aa4b8e Got some undefined symbol without this patch..
# Also, shouldn't this extension be only available when building a CGI ?
2001-12-14 03:05:54 +00:00
foobar ef1b6c0b68 Missing period. :) 2001-12-14 02:34:15 +00:00
fb234adcf7 ChangeLog update 2001-12-14 01:13:32 +00:00
8020c7e56e NEWS update 2001-12-14 01:13:29 +00:00
Alexander Merz 4024d1f938 fix phpdoc 2001-12-13 23:07:16 +00:00
Andi Gutmans 7c749c1897 - Rearrange grammar to allow dereferencing of objects returned from
- functions. It still crashes though.
2001-12-13 22:21:50 +00:00
Derick Rethans cf8c1ef7b4 - Remove debug stuff 2001-12-13 21:12:53 +00:00
Derick Rethans 0adf145a9f - Fixes for bugs 10324, 12777, 14488 and 13399
@- Fixed several crash bugs in the mcrypt extension (Derick)
2001-12-13 20:44:40 +00:00
Stefan Esser 58a5b6bfda fixed some minor bugs and reordered some code to fix array uploads. 2001-12-13 18:12:58 +00:00
Sterling Hughes 2f6b0bc7d6 This'll come with 4.1.1 2001-12-13 17:18:01 +00:00
Andi Gutmans f4b832d277 - Fix crash bug in startup code.
- Start work on being able to reference global and local scope
2001-12-13 16:55:04 +00:00
Sterling Hughes c55f8b96c9 MFB 2001-12-13 16:27:39 +00:00
Hartmut Holzgraefe 39fcedd78c more proto descriptions and fixes 2001-12-13 14:40:40 +00:00
Rui Hirokawa 75687f2f11 added mbstring to EXTENSIONS. 2001-12-13 14:32:39 +00:00
Rui Hirokawa 5f8a57efec added mbstring to maintainers list. 2001-12-13 14:31:16 +00:00
Thies C. Arntzen b8b0a6ac27 typo 2001-12-13 12:23:32 +00:00
Sascha Schumann 5c2d995f0b Provide access to ini settings.
Properly block the thread, if IO is not ready on a fd.
2001-12-13 11:15:56 +00:00
Hartmut Holzgraefe 4fb28d67b6 - new parameter parsing api used
- added proto descriptions (not complete)
- swapped x/y arguments
- indentation style fix (no seperate WS fix as most of the file changed anyway)
2001-12-13 09:06:11 +00:00
8a21e6bcbe ChangeLog update 2001-12-13 01:13:17 +00:00
Hartmut Holzgraefe 3686d84a68 editor preferences for XML files updated 2001-12-12 20:49:44 +00:00
Andi Gutmans ce98c73f82 - Infrastructure changes for allowing to access the global scope from
- within a class scope.
- Fix the Zend.dsp project a bit. It seems someone pretty much killed it
- when commiting their own personal configuration. Please be careful in
- future.
2001-12-12 20:45:38 +00:00
Andrei Zmievski 6bd64164d5 Always output config.nice for standalone extensions. (Really helps with
PHP-GTK).
2001-12-12 20:26:13 +00:00
Andi Gutmans 74efc41fc3 - Make classes have scope and function/constant lookups default to the class 2001-12-12 17:38:37 +00:00
foobar 657ce39a28 Fixed a typo and added [] around the message text. 2001-12-12 15:42:25 +00:00
foobar 97a29e07c9 More ZTS fixes. 2001-12-12 15:32:08 +00:00
foobar bc033a67db Fixed some compile problems (in ZTS mode) 2001-12-12 15:04:23 +00:00
Sebastian Bergmann 515e8c2c0e Move PHPDoc extension to PECL. 2001-12-12 11:21:43 +00:00
Jan Kneschke 63a566c65a added the new PHPDoc extension which transform PHP-Code into a XML
representation.

The XML output will be used by PHPDoc as it provides more accuracy and
speed.
2001-12-12 09:46:27 +00:00
Andrei Zmievski 14ea586525 Since PHP method names are case-insensitive, we have to fold access to 'FOO'
and 'foo' properties into a call to the same accessor.
2001-12-12 02:53:05 +00:00
Andrei Zmievski 727ef4b94f Ack, apparently in statically linked-in extensions we have to clean the
hash of overloaded classes on request shutdown. Also, added some fold
markers and rearranged some defines.
2001-12-12 02:27:49 +00:00
Stig Bakken dd969337a0 return boolean where appropriate 2001-12-12 01:36:07 +00:00
Stig Bakken aef2b692c1 * implemented "upgrade"
* report install/uninstall errors
2001-12-12 01:35:03 +00:00
Stig Bakken 035cf39d34 * install PEAR/Autoloader.php 2001-12-12 01:32:01 +00:00
Stig Bakken 4adfb80edc * implemented upgrade 2001-12-12 01:30:56 +00:00
Stig Bakken 491a2f5219 * PEAR_Registry::updatePackage now takes an optional 2nd arg for
replacing package info instead of merging
2001-12-12 01:29:27 +00:00
913578add9 ChangeLog update 2001-12-12 01:17:34 +00:00
Stig Bakken 64349569de * make do without overload function 2001-12-12 00:10:47 +00:00
Tomas V.V.Cox 18f2ffeead fixed bug #14414 2001-12-11 20:52:58 +00:00
Hartmut Holzgraefe cc4b274a58 ereg functions will now take in account the real number of
subexpressions instead of simply assuming a fixed count of 10
2001-12-11 19:28:31 +00:00
Andi Gutmans 4214a056a1 - Merge from ZE1 2001-12-11 18:51:02 +00:00
Andi Gutmans 4cb97fa3b9 - Rename zend_class_entry.constants -> zend_class_entry.constants_table 2001-12-11 18:46:43 +00:00
Andi Gutmans 1dcef1e4ea - Start making scope change correctly when calling namespace functions.
- When inside a namespace fallback to global namespace when function
- or constant is not found.
2001-12-11 17:56:57 +00:00
Sebastian Bergmann 5b0b5b6ed5 Forgot to update the LICENSE. 2001-12-11 17:38:49 +00:00
Sebastian Bergmann 5704fcb29d Fix ChangeLog entry. 2001-12-11 15:43:56 +00:00
Sebastian Bergmann 38933514e1 Update headers. 2001-12-11 15:32:16 +00:00
Sebastian Bergmann d863d52a5d Update headers. 2001-12-11 15:16:21 +00:00
Andrei Zmievski db9da7b423 Adding overload extension. 2001-12-11 14:23:32 +00:00
Sascha Schumann d032a8e6f6 thttpd/ircg update 2001-12-11 11:26:43 +00:00
Zeev Suraski f09884ad54 Forward-port 4.1.0 changes 2001-12-11 10:06:06 +00:00
foobar 26f3ec7c03 Some typo, consistency fixes and removed some stuff that is not needed. 2001-12-11 10:02:16 +00:00
Sebastian Bergmann 4345f8a0b5 MFZE1 (AIX fixes) 2001-12-11 09:17:38 +00:00
Stig Bakken 180cce6f63 * fixed the sub-command option parsing
* added -r option to install/uninstall (registers package without
  installing any files, for use by rpm and the like)
2001-12-11 08:39:56 +00:00
Stig Bakken 131acf55f7 * added "register_only" option for install/uninstall 2001-12-11 08:39:01 +00:00
Yasuo Ohgaki 02c1e81a54 More README update. 2001-12-11 08:15:25 +00:00
Markus Fischer d28ef151e0 - Update NEWS entry about latest domxml changes. 2001-12-11 08:11:01 +00:00
Yasuo Ohgaki f4eff912d9 README update 2001-12-11 07:57:48 +00:00
Yasuo Ohgaki 35cc422378 Added README file for pgsql module
Added my self to CREDIT
2001-12-11 07:44:46 +00:00
Sebastian Bergmann ff4cc2c6e2 MFZE1 (added zend_strip mode in the highliter) 2001-12-11 06:30:30 +00:00
Andrei Zmievski 51a29e57f8 Show example of property-specific accessors. 2001-12-11 04:45:58 +00:00
Andrei Zmievski b197b8d104 This commit implements property-specific accessors.
When overload() is called, it not only scans for general handlers, but
also for any methods beginning with __get_ and __set_ and saves a list of
them. Then when a property is accessed, e.g. $obj->x, the extension will first
check whether __get_x() is available, and will call it if it is, otherwise
it will invoke the general __get() handler.
2001-12-11 04:41:15 +00:00
84eaf5e1c8 ChangeLog update 2001-12-11 01:13:03 +00:00
Jouni Ahto 558cce8323 - Yasuo Ohgaki <yohgaki@php.net> is the new maintainer of pgsql module.
# ... and I hope he has enough karma to do it.
2001-12-10 22:49:55 +00:00
Andi Gutmans 3bfee898db - More namespaces work.
- Nuke memory leak.
2001-12-10 18:57:17 +00:00
Andrei Zmievski 0c509e5cf8 Modified __call() handler to accept a byref return value parameter that
should be filled in. The __call() handler is now supposed to return true
or false, depending on whether it was successful or not.
2001-12-10 17:20:04 +00:00
Sebastian Bergmann ae9de3ed37 Enable ext/overload by default on Win32, too. 2001-12-10 17:14:42 +00:00
Stig Bakken 79f5dcf7d6 * now using ext/overload
# how to use:
#
# $remote = new PEAR_Remote;
# $remote->package_listAll();
# $remote->user_activate("johndoe");
#
# (when using overloading, "_" is replaced with "." before doing
#  the xmlrpc call)
2001-12-10 17:04:56 +00:00
Stig Bakken b26e4a97c9 * PEAR_Registry::packageInfo now takes a second arg for returning a single
attribute
2001-12-10 17:01:32 +00:00
Stig Bakken 936923a3b6 * added fold marks, moved around some code and silenced some Archive_Tar
notices
2001-12-10 17:00:32 +00:00
Stig Bakken 2c96b5856f * renamed check methods to checkXxx
* completed the extension check method
* added checks for os, php version, programs and sapi backend
2001-12-10 16:59:17 +00:00
Stig Bakken cd9f1f828e * fix phpdoc comments 2001-12-10 16:40:30 +00:00
Stig Bakken 883e3395f0 * stop parsing arguments when encoutering the first non-option arg 2001-12-10 16:38:44 +00:00
Sascha Schumann 92a6f2c344 Sent proper encodings for gzip/compress files, otherwise IE won't
display them.

Refer to section 3.5, RFC 2616 -- these are IANA registered.

Patch submitted to author.
2001-12-10 14:09:08 +00:00
Sascha Schumann ef72a765bf Add a nocache feature: If documents are stored under /nocache/,
appropiate HTTP headers will be sent which prevent client/proxy caching.
2001-12-10 13:31:41 +00:00
Sterling Hughes 737b6f8b13 Spaces -> Tabs 2001-12-10 13:22:48 +00:00
Sergey Kartashoff 678613b9d8 - mnogosearch example updated to include searchd support 2001-12-10 07:21:50 +00:00
Sergey Kartashoff f9f46598a9 - Fixed search daemon support in mnogosearch module. 2001-12-10 07:11:50 +00:00
Yasuo Ohgaki 9b405fa636 Fix proto 2001-12-10 06:14:03 +00:00
Yasuo Ohgaki db8bb9f23c Added async query functions 2001-12-10 04:02:08 +00:00
Stig Bakken b11d1eb440 * initial commit of PEAR method autoloader 2001-12-10 01:50:11 +00:00
foobar 5d1040309c - Fixed the version detection of Bison.
# The nice people who work on Bison decided to change the --version output.
2001-12-10 01:44:17 +00:00
3fa179752a ChangeLog update 2001-12-10 01:10:28 +00:00
foobar 1066633281 Enable it for real. 2001-12-10 00:38:18 +00:00
Stig Bakken 70ea4df4af * enable overload extension by default 2001-12-10 00:33:01 +00:00
foobar 9b81440b76 This was needed afterall. Without this Apache segfaulted when accessing PHP scripts. 2001-12-09 23:43:20 +00:00
Stig Bakken f22f8adedd * use macros in error messages 2001-12-09 22:39:24 +00:00
Andrei Zmievski 0ba80e7943 *** empty log message *** 2001-12-09 04:34:54 +00:00
Andrei Zmievski 2f4035c833 Adjust to account for latest changes. 2001-12-09 04:31:33 +00:00
Andrei Zmievski 36c4708a84 - Only destroy the current object if it was received from the __get() handler.
- Changed the way method arguments are passed to __call() handler. They are
  now encapsulated inside of an array, which makes it easier to pass them
  to call_user_func_array().
2001-12-09 04:28:23 +00:00
foobar 068be1721f Fixed a typo. 2001-12-09 02:02:44 +00:00
Sterling Hughes c8ef634f1b Align comments in xslt.c
First try at fixing funny resource free'ing problems with objects, don't
perform a zval seperation when we're directly saving a pointer to the SAX
or Scheme handlers
2001-12-09 01:18:20 +00:00
437ea23723 ChangeLog update 2001-12-09 01:10:58 +00:00
6a1f79bf8d NEWS update 2001-12-09 01:10:55 +00:00
Zeev Suraski 216e81db96 Undo (per Jani's request) 2001-12-09 01:00:57 +00:00
Derick Rethans a7b9d5590b - Remove debug code 2001-12-08 23:46:19 +00:00
Derick Rethans 3cb1db985e - Added var_export, which shows a representation of a variable, much like
var_dump, but in such a way you can use it as PHP code.
@- Added var_export, which shows a representation of a variable, much like
@  var_dump, but in such a way you can use it as PHP code. (Derick)
2001-12-08 23:44:34 +00:00
Andi Gutmans 8460372395 - Fix crash with unhandled exceptions 2001-12-08 20:58:20 +00:00
Thies C. Arntzen f026dae4f2 @- Added -w option to the cgi-version. This will remove all comments and
@  whitespace from teh script. (Thies)
2001-12-08 12:27:01 +00:00
6dd36a0df6 ChangeLog update 2001-12-08 01:11:43 +00:00
Andrei Zmievski 7b7f46aa2d - Fix memory leak when accessing undefined index or property.
- Only invoke call_get_handler() on an object in the chain if it's overloaded.
2001-12-07 22:03:19 +00:00
Markus Fischer 363a8b69c9 - Fix crash with invalid option to xslt_set_scheme_handlers(). 2001-12-07 18:16:29 +00:00
Sterling Hughes 751d155b96 Jani's AIX fixes 2001-12-07 17:37:00 +00:00
Rasmus Lerdorf ff3774d1ee Let's not crash when no error str has been set 2001-12-07 17:29:53 +00:00
Dan Kalowsky 89aa330637 Fix for bug #13628.
# basically handles a SQL_ERROR case for all odbc_execute()'s
2001-12-07 17:21:49 +00:00
Thies C. Arntzen 9fff2f7bbe fix #13801 (imap_rfc822_parse_adrlist changes arg1) 2001-12-07 16:48:36 +00:00
Andrei Zmievski 480d2b5624 Make sure refcount is 1 on stack zval. 2001-12-07 14:30:55 +00:00
Hartmut Holzgraefe 8e29c1e9ee old stuff removed 2001-12-07 14:25:10 +00:00
Sterling Hughes d95a4e2c19 Fix long2ip's handling of unsigned longs, by accepting a string argument and
then manually converting the string to an unsigned long using strtoul()
2001-12-07 13:20:18 +00:00
Hartmut Holzgraefe 836e8af6ff proto fixes 2001-12-07 10:17:20 +00:00
Hartmut Holzgraefe 7c8dc40fe3 proto fix 2001-12-07 10:10:47 +00:00
Hartmut Holzgraefe 126e776bb1 - proto descriptions
- changed to new parameter parser api
- changed to K&R style
- various cleanups
2001-12-07 09:49:26 +00:00
Egon Schmid b847333273 Fixed one proto. 2001-12-07 09:47:35 +00:00
Egon Schmid 9f456af68b Fixed some protos. 2001-12-07 09:34:50 +00:00
Stig Bakken 9b17045bdd * configure help indent fix 2001-12-07 09:08:02 +00:00
Hartmut Holzgraefe 94737d086f proto fix 2001-12-07 07:27:00 +00:00
Hartmut Holzgraefe 15515da8a2 protos prepared 2001-12-07 07:21:05 +00:00
Andrei Zmievski 1ec143228a All right, let people RTFM. 2001-12-07 06:19:20 +00:00
Andrei Zmievski 9a1f3b48a9 Add fold markers in strategic places and improve MINIT function a bit. 2001-12-07 06:15:02 +00:00
Andrei Zmievski ecd484ac21 If the method exists in object's function table, call it directly without
using __call() handler.
2001-12-07 06:08:15 +00:00
Andrei Zmievski 9789e43af1 Support overloaded method calls via __call(). 2001-12-07 05:46:02 +00:00
Doug MacEachern 1b35f3bcfc apr_table_elts are now const 2001-12-07 05:34:44 +00:00
Doug MacEachern 27018c0ff0 rename functions to match those supported in the apache 1.3 module:
apache_sub_request -> virtual
 get_all_headers    -> getallheaders
2001-12-07 05:31:07 +00:00
3c03232b35 ChangeLog update 2001-12-07 01:10:36 +00:00
8e4a4d2d60 NEWS update 2001-12-07 01:10:33 +00:00
Hartmut Holzgraefe 8b95f1005f added protos (but without description yet) 2001-12-06 22:27:49 +00:00
Hartmut Holzgraefe 6ebc57505c some cleanup of ext_skel stuff 2001-12-06 21:55:34 +00:00
Hartmut Holzgraefe bd1ac39821 whitespace/indent 2001-12-06 21:51:52 +00:00
Hartmut Holzgraefe 49cc65cdae renamed rot13 to str_rot13() 2001-12-06 21:39:01 +00:00
Hartmut Holzgraefe 7a3c3e85ad proto fix 2001-12-06 19:18:41 +00:00
Doug MacEachern 543d76185d need to call ap_destroy_sub_req() before RETURN_TRUE in apache_sub_req()
(Jon Parise <jon@php.net>)
2001-12-06 19:03:29 +00:00
Hartmut Holzgraefe 71028d46cf ported rot13() from php3 2001-12-06 19:02:27 +00:00
foobar 7decb9dae5 Fix shared extension linking when compiling with e.g. CGI sapi. 2001-12-06 19:01:43 +00:00
Hartmut Holzgraefe c1626365f9 proto fixes 2001-12-06 18:59:22 +00:00
Hartmut Holzgraefe 552ee2a247 proto fixes 2001-12-06 18:37:05 +00:00
Andi Gutmans 055709538c - Support constants. The following works now:
<?
	class foo {
		const GC = "foo constant\n";
	}

	define("GC", "Global constant\n");

	namespace;
	print GC;
	namespace foo;
	print GC;
	namespace;
	print foo::GC;

?>
2001-12-06 18:05:18 +00:00
Hartmut Holzgraefe 250aded265 proto fixes 2001-12-06 17:51:48 +00:00
Andi Gutmans 42486196ad - Initial work on changing namespace scope. Only methods & variables
- right now.
<?
	$hey = "Global hey\n";

	class foo {
		static $hey = "Namespace hey\n";
		function bar()
		{
			print "in foo::bar()\n";
		}
	}
	function bar()
	{
		print "in bar()\n";
	}

	bar();
	namespace foo;
	bar();
	namespace;
	bar();
	namespace foo;
	$bar_indirect = "bar";
	$bar_indirect();

	namespace;
	print $hey;
	namespace foo;
	print $hey;
	$hey = "Namespace hey #2\n";
	namespace;
	print $hey;
	$hey = "Global hey #2\n";
	namespace foo;
	print $hey;
?>
2001-12-06 17:47:04 +00:00
Andi Gutmans fe94f59427 - Nuke the namespace work I did. It'll be redone differently. 2001-12-06 17:23:08 +00:00
Hartmut Holzgraefe 75b47ad142 fixing the proto fixes 2001-12-06 17:18:10 +00:00
Hartmut Holzgraefe 38472b48d7 proto fix 2001-12-06 17:15:59 +00:00
Hartmut Holzgraefe b74a38968a proto fix (sort of) 2001-12-06 17:11:42 +00:00
Hartmut Holzgraefe e5f4a7541d proto fixes 2001-12-06 17:09:09 +00:00
Zeev Suraski 990e2612cc Work around a quirk in the MySQL client library to fix unbuffered queries 2001-12-06 15:04:23 +00:00
Zeev Suraski a702dc02f9 Fix session_unregister() 2001-12-06 14:20:20 +00:00
Zeev Suraski 2258453ba3 Remove PS_DEL_VAR macro, always use PS_DEL_VARL() 2001-12-06 13:33:10 +00:00
Sterling Hughes 84ed9d387f use PHP_INFO_ALL and PHP_CREDITS_ALL instead of hardcoding them 2001-12-06 13:31:34 +00:00
Sterling Hughes 91c6db000f 2 arguments, not 3 2001-12-06 11:44:38 +00:00
Markus Fischer 2b615c3ba4 - Prototype new parameter which forces the creation of new links. 2001-12-06 09:56:24 +00:00
foobar d46f919bc1 Ignore .reg files created by pear_registry test. 2001-12-06 05:42:28 +00:00
Jason Greene 49c3d762ee Fix broken format string in socket_recv -> zend_parse_parameters
Rewrote socket_setopt and socket_getopt to be cleaner
@Added support for SO_RCVTIMEO and SO_SNDTIMEO to ext/sockets (Jason)
2001-12-06 04:44:23 +00:00
foobar 686380b824 Fix test when allow_call_time_pass_reference = Off 2001-12-06 04:43:58 +00:00
Doug MacEachern 52b711521f destroy subrequests returned from ap_sub_req_lookup_uri 2001-12-06 01:25:48 +00:00
935347ee42 ChangeLog update 2001-12-06 01:10:43 +00:00
Doug MacEachern 6adebbf162 call to ap_sub_req_lookup_uri() needs to pass ctx->f->next rather than
NULL for next_filter argument in order for ap_run_sub_req() output to
end up where expected.  ("William A. Rowe, Jr." <wrowe@rowe-clan.net>)
2001-12-06 00:53:58 +00:00
Hartmut Holzgraefe c08d1ad74c proto fix 2001-12-05 23:07:13 +00:00
Hartmut Holzgraefe 2c93a6ac2d proto fixes 2001-12-05 23:01:21 +00:00
Hartmut Holzgraefe 6a42e63dee proto fix 2001-12-05 22:43:21 +00:00
Hartmut Holzgraefe 41d93ca3fd proto fixes 2001-12-05 22:38:49 +00:00
Sascha Schumann ab38ad27a5 increase timestamp, because make tries to regenerate this file without any reason 2001-12-05 21:45:33 +00:00
Zeev Suraski 56986a4ab8 Remove redundant include 2001-12-05 13:46:36 +00:00
Sebastian Bergmann 8b34428167 Document recent changes. 2001-12-05 07:04:16 +00:00
b49f07a92d ChangeLog update 2001-12-05 01:10:23 +00:00
foobar 2605bd4b30 Store the read bytes so that some sapi modules know how much to read. 2001-12-05 00:44:17 +00:00
foobar 1d062f3f6e Make it more clear what session.referer_check is about. 2001-12-05 00:32:23 +00:00
Frank M. Kromann 66d7578c36 Remove check for "To:" in headers. If "Reply-To:" exists the the To: entry was not created.
This is WIn32 only.
2001-12-04 23:33:52 +00:00
Hartmut Holzgraefe 648648ff1b proto fix 2001-12-04 22:57:16 +00:00
Hartmut Holzgraefe d9f641aa34 proto fix 2001-12-04 22:49:53 +00:00
Hartmut Holzgraefe e3fdc42dfa proto fixes 2001-12-04 22:46:06 +00:00
Hartmut Holzgraefe df6f8ba35a proto fix 2001-12-04 22:14:28 +00:00
Hartmut Holzgraefe a1cc1fddd8 proto fixes 2001-12-04 21:18:26 +00:00
Sterling Hughes 886ad91adf Make the length parameter to fgets optional (defaults to 1024) 2001-12-04 19:40:48 +00:00
Frank M. Kromann 08978fc3f4 Enable imap_mail() on win32 2001-12-04 18:47:32 +00:00
Frank M. Kromann 86a884e538 modified to enable imap_mail() on win32 2001-12-04 18:47:07 +00:00
Frank M. Kromann d9763dd63a Adding files to enable imap_mail() on win32 2001-12-04 18:46:49 +00:00
Andi Gutmans 5476706142 - Damn Zeev :) 2001-12-04 17:58:32 +00:00
Sebastian Bergmann a9b9c68b8a Mark sapi/servlet as what it is: experimental. 2001-12-04 13:20:26 +00:00
Sebastian Bergmann 46c3d99a9c Mark ext/java as what it is: experimental. 2001-12-04 13:19:42 +00:00
Sebastian Bergmann 3705cd3f6d Add Win32 specific files to .cvsignore. 2001-12-04 13:19:04 +00:00
Sebastian Bergmann 63de1783fa Add XMLRPC extension. 2001-12-04 05:32:07 +00:00
b99a07a935 ChangeLog update 2001-12-04 01:10:53 +00:00
e7bb6187eb NEWS update 2001-12-04 01:10:50 +00:00
foobar 9c462b0d01 typo fix 2001-12-04 00:28:36 +00:00
foobar c247b8081e - Let's not default to any set of extra libraries. This way any kind of
builds of pdflib work. And this configure stays simple.
2001-12-03 23:54:10 +00:00
Shane Caraveo 7b03b7571b Make xmlrpc module compilable on windows. compiles, but untested. 2001-12-03 22:33:32 +00:00
Andi Gutmans 288d96229e - Missed one 2001-12-03 20:55:59 +00:00
Andi Gutmans 67122717a4 - Nuke REGISTER_MAIN_*. Extension maintainers please make sure I didn't
- change something I wasn't supposed to. It should be fine IMO.
2001-12-03 20:54:23 +00:00
Sascha Schumann 74de59dff1 Fix declarations of static variables. Builds on AIX now. 2001-12-03 15:32:12 +00:00
Sterling Hughes 80f4a863f9 Add a content length field to perhaps eliminate null truncation 2001-12-03 12:24:03 +00:00
Sterling Hughes fa58a95035 Re-add support for HTTP file uploads 2001-12-03 09:19:14 +00:00
Sterling Hughes 734708319f MFB 2001-12-03 08:28:12 +00:00
Derick Rethans 1f14640b3e - Added ob_get_level, which returns the nesting level of the output buffering
mechanism. (patch by Yasuo Ohgaki <yasuo_ohgaki@yahoo.com>)
@- Added ob_get_level, which returns the nesting level of the output buffering
@  mechanism. (Yasuo, Derick)
2001-12-03 07:43:53 +00:00
Frank M. Kromann 03b5cb6775 Make php_reg_replace available from shared extensions 2001-12-03 05:15:29 +00:00
Frank M. Kromann e7ef5041d5 Make php_MD5* functions available from shared extensions 2001-12-03 05:14:28 +00:00
Frank M. Kromann 8e40864770 Make _php_math_number_format available from shared extensions 2001-12-03 05:12:48 +00:00
Frank M. Kromann c07cf5c2a5 Make php_startpage and php_getlastmod available from shared extensions 2001-12-03 05:11:29 +00:00
Frank M. Kromann b4d9b70c6e Make php_setcookie available from shared extensions 2001-12-03 05:10:10 +00:00
ad1cb8205b ChangeLog update 2001-12-03 01:10:54 +00:00
Harald Radi 8d8f148d98 added mssql_fetch_assoc() to be more mysql conform
changed mssql_fetch_array() back to its default behaviour (MSSQL_BOTH)
2001-12-02 21:10:15 +00:00
Hartmut Holzgraefe 34feef0d6b - switch to new paramter parser
- make sure To: and Subject: do not end with a newline character
2001-12-02 17:57:17 +00:00
Markus Fischer 3f9f54dcca Please Egon. 2001-12-02 17:40:38 +00:00
Bernd Roemer 99639f5812 Allow unserializer_callback_func to be turned off. 2001-12-02 17:31:11 +00:00
Tomas V.V.Cox 4bffed7769 Rename Dependencie.php to Dependency.php 2001-12-02 16:29:37 +00:00
Markus Fischer 949d0d7002 - Standardize function to accept either $obj->foo or domxml_foo($obj)
where they should.
- Use xml*Len functions where available.
- Workaround in set_content() to prevent crash.
- Cleaned up php_xpathptr_eval().
- Added NO_ARGS check where missing; moved check for $this always
  before arg parsing.
2001-12-02 16:17:51 +00:00
Daniel Beulshausen bfb066ee96 fix CFLAGS, how could this have worked before? 2001-12-02 14:01:22 +00:00
Daniel Beulshausen 71355c7917 remove outdated txts 2001-12-02 13:56:22 +00:00
Daniel Beulshausen f8cb29d636 cleanup workspace 2001-12-02 13:53:03 +00:00
Daniel Beulshausen ce75d26996 fix php_win_err (wasn't threadsafe) 2001-12-02 13:34:40 +00:00
Markus Fischer 31a74b4aec - Reverted macro moving stupidity (thx to Sterling). 2001-12-02 12:21:50 +00:00
Derick Rethans 896faf0b34 - Fix a bug in timezones +0100 and -0100 2001-12-02 11:35:28 +00:00
Sergey Kartashoff 77111db912 - Added synonym stuff support to mnogosearch module. Slightly changed
stored API. Example updated.
2001-12-02 10:24:39 +00:00
Egon Schmid 3c01151a08 I hope that this is a better explanation as unknown. 2001-12-02 10:00:15 +00:00
Egon Schmid 286d420740 Fixed some protos. 2001-12-02 09:41:27 +00:00
Egon Schmid 90e15c04c9 Fixed two protos. 2001-12-02 09:29:09 +00:00
Sergey Kartashoff 8b99a7385d - Mnogosearch module stored API slightly changed. Example updated. 2001-12-02 07:25:26 +00:00
e6e19800dc ChangeLog update 2001-12-02 01:10:14 +00:00
Rasmus Lerdorf 0c5e2d2439 Oops, FOO_VERSION doesn't exist 2001-12-02 00:59:44 +00:00
Tomas V.V.Cox 3898513fbd Class for checking dependencies 2001-12-02 00:44:02 +00:00
Rasmus Lerdorf 8dce85c2f2 Make ext_skel generate backward compatible module sources
(flight from London to Paris is too short for any real work)
2001-12-02 00:42:22 +00:00
Sergey Kartashoff 6687828100 - Added stored API to mnoGoSearch module. Now you can check
if URL is places at the stored database ot not. Example updated.
2001-12-01 20:09:15 +00:00
Markus Fischer 222fe23275 Last commit:
- Fix segfault in xmldoc().
- Proper free zval in php_xpathptr_eval().

This one:
- Fix segfault in php_xpathptr_eval().
- Fix win32 build (TSRMLS_FETCH issues).
- More sanity checking in php_xpath_get_object(), php_xpath_get_context()
  and php_dom_get_object().
- Moved macros into header file.
- Register le_domxmldtd, le_domxmlcdatap (removes anoying warning message on shutdown).
- Fig segfault in node_children() with unsupported node types.
- Fix leak in php_domobject_new() with unsupported note types.
- Fix leak when freeing xpath context/objects.
- Reverted behaviour change to append_child() [old crashes].
- set_content() also sets the node->content property.

# Testers/patches/contribs welcome.
2001-12-01 19:42:34 +00:00
Tomas V.V.Cox f4299a90e2 check for version for not building broken packages (thanks Markus) 2001-12-01 17:55:47 +00:00
Derick Rethans 29cd309944 - Fix a crash when passing e.g. NULL to basename(). (Patch by Markus
Fischer <mfischer@guru.josefine.at>)
#- Simplyfied code using zend_parse_parameters().
2001-12-01 15:45:55 +00:00
Thies C. Arntzen 0fd809a770 improve last patch:
non existant object variables are now serialized as NULL, this saves us from
buffering the serialized data.
2001-12-01 15:17:50 +00:00
Thies C. Arntzen 7ff5198c53 serialized data would be incoorect if __sleep() returned a variable-name
which is non-existant in the object.
submitted by: Bernd Roemer <berndr@bonn.edu>
2001-12-01 15:06:37 +00:00
Sergey Kartashoff 16344800b2 - mnoGoSearch module usage example (searchlite) updated to support
StoreDoc stuff.
2001-12-01 14:12:27 +00:00
Sergey Kartashoff f70e998794 - StoreDOC support has been added to mnogoSearch module. 2001-12-01 14:05:13 +00:00
Andi Gutmans 94cfe03da5 - Revert one of the changes because it might be before the memory
- manager has started.
2001-12-01 08:46:02 +00:00
Andi Gutmans bb9a36cad1 - Use alloca() when possible. 2001-12-01 08:33:48 +00:00
c45f699830 ChangeLog update 2001-12-01 01:10:20 +00:00
bef4389b5d NEWS update 2001-12-01 01:10:17 +00:00
foobar 8a8741a1fe This makes the configure --help output more readable. 2001-12-01 00:59:43 +00:00
Stig Venaas 80d8e554d3 ldap_first_attribute and ldap_next_attribute has been completely broken
for 6 months!! Fixed (I think), might be a memory leak there...
2001-11-30 23:37:43 +00:00
Brian Bruns 8a33c1cace Detect FreeTDS to work around different library sets 2001-11-30 22:12:31 +00:00
foobar f43b57190c Added missing cvs ids and unified configure messages. 2001-11-30 19:01:32 +00:00
foobar f1397d5339 Unified the configure messages. 2001-11-30 19:00:13 +00:00
Andi Gutmans e858d27888 - Initial support for class constants. There are still a few semantic
- issues which need to be looked into but basically it seems to work.
- Example:
<?php
	class foo
	{
		const hey = "hello";
	}

	print foo::hey;
?>
2001-11-30 16:29:47 +00:00
Andi Gutmans 7f66d5e99a - Fix typo 2001-11-30 11:42:30 +00:00
Derick Rethans 9190271cef - Added ob_flush and ob_clean functions, which do not end the buffer like
ob_end_flush and ob_end_clean do.
@- Added ob_flush and ob_clean functions, which flush and clean an
@  output buffer without destroying the buffer. (Derick)
2001-11-30 10:48:38 +00:00
Derick Rethans 2afc5d6924 - Fix for bug 8909 and 12680 (timezone problem) 2001-11-30 09:29:15 +00:00
foobar 2b88417b8c This is better way to configure. PDFlib 3/4 can be compiled with external libs too.. 2001-11-30 04:46:36 +00:00
8d030236d6 ChangeLog update 2001-11-30 01:10:33 +00:00
Stig Venaas 088c7a6044 Adding ldap_set_rebind_proc() for APIs with V3 3 arg variant, need more
testing.
2001-11-29 20:26:20 +00:00
Stig Venaas ce4c65a60d Making the link resource point to a structure that contains the LDAP
link, rather than point to it directly.
# This makes it much easier to store and retrieve per-connection PHP state.
2001-11-29 20:17:17 +00:00
Sterling Hughes d30044c969 Update to the latest apr api (patch by Clif Woolley) 2001-11-29 11:29:11 +00:00
Thies C. Arntzen 3ee263e348 i'm sure i had this compile before;-) 2001-11-29 08:18:50 +00:00
Thies C. Arntzen 5a67b295e6 fix a crash in socket_connect (if hostname was not resolvable)
initialize max_fd in various fdset function
fix error checking in _read and _write
2001-11-29 08:09:39 +00:00
35f82bcd6b ChangeLog update 2001-11-29 01:10:31 +00:00
Uwe Steinmann 9ed2694ce0 - introduced several macros to simply code (done by Markus Fischer) 2001-11-28 12:07:17 +00:00
540471fc09 ChangeLog update 2001-11-28 01:12:08 +00:00
Andi Gutmans f289014922 - Support syntax for class constants (doesn't do anything yet but
- required some reworking of the grammar).
2001-11-27 17:46:31 +00:00
c0273c47d7 ChangeLog update 2001-11-27 01:10:08 +00:00
Frank M. Kromann 1436374c40 Removing winutil.c from this project. the functions needed are found in php4ts.dll 2001-11-27 00:08:36 +00:00
foobar cc196f5b54 Show the registered ini entry in phpinfo() 2001-11-26 22:56:36 +00:00
foobar ef64e8336f Updated file since .re changed. 2001-11-26 22:46:15 +00:00
Derick Rethans 534b0f7e06 - Also patch the file from which var_unserializer.c is generated 2001-11-26 22:33:44 +00:00
Derick Rethans 06cdf297a8 - Adding a callback mechanism to the unserializer. (patch by Bernd
Roemer <berndr@bonn.edu>)
#- An explainatory e-mail will be send to php-dev
2001-11-26 21:04:21 +00:00
Sterling Hughes b91a66699c Z_TYPE(filehandle)?? ok.. whatever... ;) 2001-11-26 18:57:44 +00:00
Andi Gutmans 7cd6ccc0ec - Support static $var = 0; style initialization of static class
- members. For example:
-	class foo {
-		static $my_static = 5;
-
-	}
-
-	print foo::$my_static;
2001-11-26 18:05:01 +00:00
Sebastian Bergmann 7c4daf11c0 Nuke ext/sablot entries. 2001-11-26 10:55:46 +00:00
dc613f099c ChangeLog update 2001-11-26 01:10:42 +00:00
Rui Hirokawa ac39c13b1c fixed a link error in configure script. 2001-11-25 22:20:27 +00:00
Egon Schmid feee0f5a08 Fixed some protos. If pi means processing instruction, it should be written IMHO in uppercase characters. 2001-11-25 19:22:51 +00:00
Egon Schmid 15b5b127da Fixed some protos. 2001-11-25 18:51:00 +00:00
Andi Gutmans 0d559f17cd - Fix crash and leak 2001-11-25 12:29:08 +00:00
Zeev Suraski 6cacbd75e7 Fix build if PHP_ENABLE_SEH is not defined 2001-11-25 10:01:49 +00:00
Andi Gutmans 4f3eaaa854 - Whitespace 2001-11-25 08:58:59 +00:00
Andi Gutmans d2da63f629 - Support static members. The following script works:
<?
	class foo
	{
		class bar
		{
			function init_values()
			{
				for ($i=1; $i<10; $i++) {
					foo::bar::$hello[$i] = $i*$i;
				}
			}

			function print_values()
			{
				for ($i=1; $i<10; $i++) {
					print foo::bar::$hello[$i] . "\n";
				}
			}
		}
	}

	foo::bar::init_values();
	foo::bar::print_values();

	for ($i=1; $i<10; $i++) {
		print $hello[$i]?"Shouldn't be printed\n":"";
	}
?>
2001-11-25 08:49:09 +00:00
3d741d71c6 ChangeLog update 2001-11-25 01:10:22 +00:00
foobar 6f5fc0be54 Added missing ini directive: always_populate_raw_po st_data 2001-11-24 23:47:10 +00:00
foobar 18f7a8ca61 Added missing CVS Id tag. 2001-11-24 23:38:08 +00:00
Andi Gutmans 559d611a86 - MFZE1 2001-11-24 18:27:20 +00:00
foobar 6083eb1030 - Handle more error types when uploading files. 2001-11-24 18:23:35 +00:00
Zeev Suraski ee111cf9c8 whitespace 2001-11-24 16:07:05 +00:00
Zeev Suraski a25ccbec2e whitespace 2001-11-24 16:05:22 +00:00
Zeev Suraski 9950eaecd7 Honor error_reporting (in general and @ in particular) for IMAP notices 2001-11-24 15:32:00 +00:00
Zeev Suraski a3ef7170b1 Save entries in $_SESSION even if register_globals is on 2001-11-24 02:41:58 +00:00
Zeev Suraski 8c1f1f15c5 Entries registered with session_register() and altered by changing
$_SESSION (or $HTTP_SESSION_VARS) were not properly saved.  Fixed.
2001-11-24 02:14:45 +00:00
09f96051dd ChangeLog update 2001-11-24 01:10:23 +00:00
Zeev Suraski 66be507ac3 whitespace 2001-11-24 01:08:05 +00:00
Derick Rethans 983e41b7be - Reverse slight mistake (patch by Markus Fischer) 2001-11-23 11:46:01 +00:00
Rui Hirokawa 506eec88b4 restriction is relaxed because output handler couldn't be used even if zlib.output_compression is set to off. 2001-11-23 02:53:16 +00:00
062713a58d ChangeLog update 2001-11-23 01:10:12 +00:00
199b95c8d6 NEWS update 2001-11-23 01:10:09 +00:00
Derick Rethans f1f5a325c1 - Beautifying 2001-11-22 22:46:31 +00:00
foobar a4a8f6719b WS fix. 2001-11-22 15:14:49 +00:00
Derick Rethans e39fbeae16 - Fix crach bug if the parameter to shm_remove is not a valid identifier. 2001-11-22 14:33:35 +00:00
Derick Rethans 2d6842b103 - Added a parameter to mysql_connect to force a new database link to be
created. (patch by Markus Fischer <mfischer@guru.josefine.at>)
@- Added a parameter to mysql_connect to force a new database link to be
@  created. (Markus, Derick)
2001-11-22 07:58:37 +00:00
Derick Rethans 3eded520ef - Fix for bug #14169 2001-11-22 07:48:59 +00:00
2cbd22b9c8 ChangeLog update 2001-11-22 01:11:02 +00:00
4af0eeded6 NEWS update 2001-11-22 01:10:59 +00:00
Frank M. Kromann e184ed1ed3 Allow php_win_err() to be called from extenstions 2001-11-21 22:47:54 +00:00
Stig Venaas 2ea46ef6cc Added ldap_sort() function
@- Added ldap_sort() function. (Stig Venaas)
2001-11-21 20:14:17 +00:00
Uwe Steinmann 6affe84ee7 - add functions clone_node(), is_blank_node(), create_entity_reference()
- fixed bug in node_name()
- fixed behavior of append_child(), it now adds a child a not a sibling
2001-11-21 17:01:19 +00:00
Sean Bright 4312c5f9e0 Fix typo. 2001-11-21 02:00:02 +00:00
d5a1d55901 ChangeLog update 2001-11-21 01:10:26 +00:00
Harald Radi affac19132 added blabla 2001-11-21 00:36:20 +00:00
Sterling Hughes e7aa85c011 Fix a crash bug in CURLOPT_POSTFIELDS by using curl_formadd instead of
curl_formparse

Fix a crash bug when CURLOPT_INFILE is not properly specified.
2001-11-20 11:29:54 +00:00
James Moore 9a17664431 Remove sablot from php_modules.dsw, its no longer in repository 2001-11-20 10:47:20 +00:00
a975676399 ChangeLog update 2001-11-20 01:10:04 +00:00
Andrei Zmievski 0722546b20 Fix NEWS. 2001-11-19 15:47:50 +00:00
Derick Rethans 48475a52af - Added a bugfix 2001-11-19 15:20:26 +00:00
Zeev Suraski 312a226707 Fix set_time_limit() to affect only the current request (fix bug #13711) 2001-11-19 14:59:38 +00:00
857a051616 ChangeLog update 2001-11-19 01:11:38 +00:00
72c05b07d5 NEWS update 2001-11-19 01:11:34 +00:00
foobar 41b21156cc Fixed bugs: #14034, #11647 (can not find any others) 2001-11-19 00:51:06 +00:00
foobar e65ae0e7fd Fixed bug: #14014. 2001-11-18 23:52:11 +00:00
foobar 4b8709ef5c Test before commit..test before commit.. 2001-11-18 23:08:47 +00:00
foobar 48697c5f5c Now this might even work. 2001-11-18 22:54:18 +00:00
Doug MacEachern 8dd296dd7d AIX compiler doesn't like having a comma at the end of the enum
(Ryan Bloom <rbb@apache.org>)
2001-11-18 20:08:43 +00:00
Derick Rethans f17f3371be - Added md5_file(), which calculaties the MD5 sum of a file.
(patch by: Alessandro Astarita <aleast@capri.it>) (Derick)
@- Added md5_file(), which calculaties the MD5 sum of a file.
@  (patch by: Alessandro Astarita <aleast@capri.it>) (Derick)
2001-11-18 18:48:17 +00:00
Derick Rethans c1f93729b8 - MFB 2001-11-18 13:57:22 +00:00
Sterling Hughes 2aaa2cc409 Remove the .cvsignore file 2001-11-18 13:21:33 +00:00
Sterling Hughes 631f476abe Remove the sablotron extension
# HOOOOOOOOOOOORAY :)Remove the sablotron extension

# HOOOOOOOOOOOORAY :)Remove the sablotron extension

# HOOOOOOOOOOOORAY :)Remove the sablotron extension

# HOOOOOOOOOOOORAY :)Remove the sablotron extension

# HOOOOOOOOOOOORAY :)Remove the sablotron extension

# HOOOOOOOOOOOORAY :)Remove the sablotron extension

# HOOOOOOOOOOOORAY :)Remove the sablotron extension

# HOOOOOOOOOOOORAY :)Remove the sablotron extension

# HOOOOOOOOOOOORAY :)
2001-11-18 13:20:37 +00:00
Derick Rethans a72dce7da9 - Fix build on FreeBSD (patch by Markus Fischer) 2001-11-18 12:01:54 +00:00
foobar fc3906e93a WS fix 2001-11-18 03:34:23 +00:00
Andrei Zmievski a2f95abb6d - Added support for parsing recordsets.
- Fixed a bug that sometimes would corrupt top-level element
  if it was a scalar one.
2001-11-18 01:16:03 +00:00
3744720899 ChangeLog update 2001-11-18 01:10:14 +00:00
Zeev Suraski 23c0362aec Fix bug 13143 2001-11-17 21:15:38 +00:00
29312b2ec8 ChangeLog update 2001-11-17 01:10:30 +00:00
David Reid 4f0eab7f6c s/\t/ / 2001-11-16 17:31:13 +00:00
Sascha Schumann 9f3362933a Fix two incidents which have been reported about the new unserializer.
#1: forgot to handle negative numbers
#2: added zval_ptr_dtor which was not in the original code which
    might lead to crash

PR: #14082
2001-11-16 16:34:14 +00:00
Andrei Zmievski fcd83424cf Add todo item. 2001-11-16 15:04:12 +00:00
Rasmus Lerdorf e68a9c6bfa Use the macro here and add an E_NOTICE 2001-11-16 11:59:04 +00:00
foobar 1e5e73e0ae - Nuked some memleaks
- Changed the error to be set always. Otherwise the index for error
  wouldn't be correct in case of uploading multiple files within array.
  ( <input type="file" name="test[]"> )
2001-11-16 03:34:26 +00:00
c44f5ec495 ChangeLog update 2001-11-16 01:10:18 +00:00
foobar 37dec69a7c No use of populating the hash if there is no file saved. 2001-11-16 01:06:48 +00:00
Zeev Suraski 08615c6f68 MFZE1 2001-11-15 23:26:52 +00:00
foobar ae82e1ccf2 In case of submitting form without any files selected don't set
the tmp_name.
2001-11-15 15:37:02 +00:00
Stanislav Malyshev 39f3075500 Check in ftok() function by Andrew Sitnikov <sitnikov@infonet.ee> 2001-11-15 09:53:40 +00:00
Tomas V.V.Cox 15f0f8ae23 implemented "uninstall" command 2001-11-15 01:24:35 +00:00
df92e90d50 ChangeLog update 2001-11-15 01:10:15 +00:00
Stig Venaas 3dd9845e98 Fixed some memory leaks and removed some unnecessary checks due to
ZEND_FETCH_RESOURCE returning on error
2001-11-14 22:05:33 +00:00
Frank M. Kromann 3c06e3c4bb Prevent fbsql_num_rows from looping 2001-11-14 20:42:38 +00:00
Frank M. Kromann 95d99c9ba9 Fixing debug build 2001-11-14 17:56:26 +00:00
Sterling Hughes 42b9349d8b Many other reasons that setvbuf can fail than "wrong arguments", returning
false should be enough
2001-11-14 12:57:06 +00:00
Christian Stocker 57d908ea1f adding PEAR/Registry.php 2001-11-14 09:55:38 +00:00
Derick Rethans b278435074 - Fix crashbug on dtor 2001-11-14 09:48:14 +00:00
Christian Stocker fde1575ba2 checking if package.xml.gz exists, before checking if it's writeable 2001-11-14 09:22:00 +00:00
5598d6f0b1 ChangeLog update 2001-11-14 01:10:16 +00:00
Doug MacEachern 898099adba setup standard CGI variables 2001-11-13 21:40:01 +00:00
Frank M. Kromann de46a16e43 Fixing compile error 2001-11-13 19:20:26 +00:00
Frank M. Kromann dd714b617c Fixing debug build 2001-11-13 19:19:09 +00:00
Stig Venaas 80ccb3f7f7 Minor changes in ldap_connect(): fixed crash with OpenLDAP 2 libs when
called without args and also use ldap_init() rather than ldap_open();
simplified code a little
2001-11-13 18:05:47 +00:00
Stig Venaas ca476ecaa4 Removed some old cruft (some commented code and non-used globals), fixed
a proto typo, and make sure ldap_base_dn and ldap_filter are initialized
in php_ldap_do_search()
2001-11-13 17:10:08 +00:00
foobar 6f84c93e45 Fixed some problems in configuring e.g. shared module. 2001-11-13 13:59:13 +00:00
Rasmus Lerdorf a9fe559f60 Be explicit here and cast it 2001-11-13 13:53:11 +00:00
Rasmus Lerdorf 55d9b2ad9c Fix most of these tests - still think there is a bug in the long->float
conversion stuff somewhere
2001-11-13 13:12:46 +00:00
Rasmus Lerdorf f78f4364a0 Different operating systems handle the group x bit differently, so
simplify this test to test the user x bit instead
2001-11-13 12:39:21 +00:00
foobar 2e3fbf41f9 Make these tests work regardless of the register_globals setting. 2001-11-13 12:20:31 +00:00
Zeev Suraski 8b40f3c231 Improve OpenSSL compatibility 2001-11-13 11:47:52 +00:00
foobar a6d9db7dc1 Fixed bug introduced by my last commit. 2001-11-13 11:38:22 +00:00
Sterling Hughes 5fc1552c04 "Fix" last commit, to compile cURL with SSL support you must also use the
OpenSSL extension -- sorry...

The last commit caused bad things to happen if you were compiling cURL and
PHP on Win32 or if you compiled PHP --with-openssl, ie, re-initializing things
that were already initialized
2001-11-13 10:59:15 +00:00
Derick Rethans 3ca8006a8d - Fix scheme/sax handlers (patch by Lenar Lõhmus <lenar@vision.ee>) 2001-11-13 09:54:06 +00:00
bc6f6d9e83 ChangeLog update 2001-11-13 01:11:02 +00:00
Stig Bakken f705826052 * command name changes 2001-11-13 01:07:36 +00:00
Stig Bakken e6f95ee99b * rename files to .reg (not .inf) 2001-11-13 01:06:48 +00:00
Stig Bakken 79f0345166 * error message cleanup
* store registry object as property
2001-11-13 01:05:46 +00:00
Zeev Suraski 6d7be11454 Import patch from bug #14023 2001-11-13 01:01:47 +00:00
foobar 12cfb76b65 Fixed the wrong logic in ini_get_all() function.
Now it behaves same as how phpinfo() outputs the ini entries.

If there is a local value, then the global one is the 'original one' if
there is such. Otherwise global value is same as local. :)
2001-11-13 00:37:49 +00:00
Martin Jansen 62f57095a0 * shame on me ... 2001-11-12 10:52:41 +00:00
Martin Jansen 98bda8de71 * typo 2001-11-12 10:51:42 +00:00
Jon Parise 1c7f015c4d Provide the full URL to pear.php.net. 2001-11-12 03:04:06 +00:00
Markus Fischer abe67fdb83 Unified error/warning messages. 2001-11-12 01:54:55 +00:00
4d1daeb9bd ChangeLog update 2001-11-12 01:11:05 +00:00
821458c4d6 NEWS update 2001-11-12 01:11:02 +00:00
Markus Fischer 80a58cd23c WS 2001-11-12 01:07:17 +00:00
Markus Fischer 6cc12e1450 Fix #14020 and some minor leaks. 2001-11-12 00:58:16 +00:00
Rui Hirokawa 975ed901aa fixed output problem with output buffering handler. 2001-11-11 23:11:23 +00:00
Jeroen van Wolffelaar 5ccdb1d352 Fix all (at least, I tried to catch all) proto's in file.c 2001-11-11 20:33:27 +00:00
Jeroen van Wolffelaar 788b1552a7 Add warning when set_file_buffer() fails 2001-11-11 19:42:31 +00:00
Derick Rethans 78e4644fa1 - Renaming key_exists to array_key_exists
@- Renamed key_exists tp array_key_exists. (Derick)
#- Not sure if this belongs in NEWS, but it was already in a released
#  version. And yes, I know I'm breaking BC here, but as it was not documented
#  yet, that doesn't matter.
2001-11-11 18:28:43 +00:00
Stanislav Malyshev 88c66d4859 Fix crash bug on malformed .ini file 2001-11-11 12:41:14 +00:00
Thies C. Arntzen 66411756dd compile fix 2001-11-11 11:08:31 +00:00
Markus Fischer 3a1b1142fe Add missing loop variable $i.
Suppress more warnings when using the option separator '--'.
2001-11-11 04:09:08 +00:00
Markus Fischer d672226d6f Suppress warning on long-options without an additional argument. 2001-11-11 03:59:22 +00:00
Rasmus Lerdorf 035c6c83e6 Fix for 14012 2001-11-11 02:58:11 +00:00
foobar b893e59095 Make the filesize 0 when upload fails. And changed the error messages to be different from each other. 2001-11-11 01:51:17 +00:00
0515870902 ChangeLog update 2001-11-11 01:12:10 +00:00
8b4b057518 NEWS update 2001-11-11 01:12:07 +00:00
foobar 7d479f4abb Fix for bug: #14008. Still needs some minor changes but should give idea about this. 2001-11-11 00:45:31 +00:00
Andrei Zmievski 2bc39cfebc Clean up. 2001-11-11 00:06:47 +00:00
Andrei Zmievski 90cbb8e02b Crash fix news. 2001-11-10 23:58:23 +00:00
Andrei Zmievski 3942e2a8bd Fixed bug #13635. 2001-11-10 23:45:00 +00:00
Andrei Zmievski 98a7a1ba1f Fixed bug #13901. 2001-11-10 23:44:04 +00:00
Sebastian Bergmann d247632b5b No need to 'include' a .re file here. 2001-11-10 22:31:48 +00:00
Shane Caraveo 5664afaadc Make the win32 fastcgi compilable with the php4ts projects. 2001-11-10 22:11:03 +00:00
Sascha Schumann f341f630d3 Rewrite of unserializer which should be more maintainable and extensible.
Changes pass `make test´ and a couple of custom tests.

Enjoy.
2001-11-10 21:18:34 +00:00
Derick Rethans 88c6758d4e - Fixing this bad idea 2001-11-10 18:06:28 +00:00
James Moore 4f78737000 Fix apache win32 dso build.
(This is untested on linux but shouldnt break anything)
2001-11-10 17:24:02 +00:00
Rasmus Lerdorf e202deaec4 # More low-oxygen plane hacking
Fix ImageColorsForIndex() and ImageColorAt() to work for TrueColor images.
@- Fix ImageColorsForIndex() and ImageColorAt() to work for TrueColor
@  images. (Rasmus)
2001-11-10 15:06:09 +00:00
Derick Rethans 23db803b34 - Correcting Goba's name, and adding me to QA team 2001-11-10 14:22:36 +00:00
Martin Jansen 13fb78bab1 * some minor improvements 2001-11-10 10:37:24 +00:00
foobar 13ed1f43c1 Fixed bug: #13955.Checks now for png_write_image(). 2001-11-10 09:51:47 +00:00
Frank M. Kromann 95ee25ace6 Make fbsql_list_fields work as documented 2001-11-10 07:43:23 +00:00
ad6607332b ChangeLog update 2001-11-10 01:10:52 +00:00
412cca6f6f NEWS update 2001-11-10 01:10:47 +00:00
Jon Parise 8f26c3f326 @ Added support for bind_textdomain_codeset(). (rudib@email.si) 2001-11-09 16:27:09 +00:00
Alan Brown 8ee38d9d75 Not all components populate every field in the ExceptInfo structure. Thus we sometimes would try to convert NULL strings and see php_OLECHAR_to_char errors while displaying Exception information. This version is a little smarter about the member derefencing and the resulting error string. 2001-11-09 14:20:28 +00:00
58abda0e58 ChangeLog update 2001-11-09 01:10:14 +00:00
Derick Rethans 43eb67855f - oops :) 2001-11-08 23:38:38 +00:00
Derick Rethans b1d60772d8 - Let it also work with pdflib 3 again 2001-11-08 23:37:34 +00:00
Rui Hirokawa da8b28cf1c fixed a bug in http input processing patched by Yasuo Ohgaki. 2001-11-08 22:23:04 +00:00
Egon Schmid d3ea04bb66 Some protos fixed. 2001-11-08 22:11:41 +00:00
Egon Schmid 4396a984a8 More protos fixed. 2001-11-08 22:05:56 +00:00
Egon Schmid 6fbe1dbcae Fixed some protos and many more will follow the next hour. 2001-11-08 21:48:34 +00:00
Adam Dickmeiss 43f34af575 Use PHP_ADD_LIBRARY_DEFER and PHP_ADD_LIBPATH instead of
PHP_EVAL_LIBLINE to prevent configure error.
2001-11-08 21:37:49 +00:00
Egon Schmid 65429fbaac There are some rules. 2001-11-08 21:32:48 +00:00
Derick Rethans ea83d64507 - prototypes
#- Thanks to Zak for pointing this out during his talk
2001-11-08 20:23:33 +00:00
Derick Rethans a345d2ce86 - Prototypes 2001-11-08 20:21:01 +00:00
Tomas V.V.Cox 878fb495fe - By default DB_FETCHMODE_OBJECT will do a cast to object from the row
array (twice fast than with DB_Row)
- API Doc updates/fixs
2001-11-08 13:53:44 +00:00
Sebastian Bergmann 1a082a349c Add php_w32api.dll 2001-11-08 07:07:11 +00:00
Sebastian Bergmann 26d0435146 Add ext/w32api 2001-11-08 07:03:38 +00:00
34c165a274 ChangeLog update 2001-11-08 01:10:09 +00:00
db9d9523a6 NEWS update 2001-11-08 01:10:06 +00:00
James Moore 70941fe41b @ - Add generic Win 32 API extension (jmoore) 2001-11-07 14:31:03 +00:00
James Moore f111b84e05 @ - Fix Bug 9878 (patch by bfoddy@mediaone.net) (jmoore) 2001-11-07 14:22:15 +00:00
Stig Bakken 61cad20c12 * store registry data in PEAR_INSTALL_DIR/.registry instead of /var/something 2001-11-07 10:43:04 +00:00
Stig Bakken b1976de01b * fix "list" command 2001-11-07 09:25:39 +00:00
Stig Bakken 81b5aabb33 typo 2001-11-07 09:24:55 +00:00
a8d6e94635 ChangeLog update 2001-11-07 01:10:11 +00:00
5f8982d048 NEWS update 2001-11-07 01:10:08 +00:00
Chuck Hagenbuch 352e52716a fix the singleton and factory methods for
a). php 4.0.6 (where include_once might return false)
b). to use references and not copy so many objects
2001-11-06 21:46:41 +00:00
Jon Parise 2c5764d46f It doesn't look like we use a fourth pointer. 2001-11-06 18:02:04 +00:00
MySQL Team e982012daf (PHP mysql_connect) Removed warning message regarding NONEXISTENT character
set, when the server's default character set != latin1.
@- Removed a warning message about a NONEXISTENT character set from
@  mysql_connect(), when the server's default character set != latin1.
2001-11-06 16:59:07 +00:00
Jon Parise f8fb5e5d98 Include <sys/socket.h> for 'struct sockaddr'.
# This fixes my FreeBSD build.
2001-11-06 14:35:26 +00:00
Sterling Hughes ef537403e6 @ Add Direct I/O extension for lowlevel access to the POSIX layer. (sterling) 2001-11-06 12:24:09 +00:00
afa2c22e9c ChangeLog update 2001-11-06 01:10:55 +00:00
f34c1ee368 NEWS update 2001-11-06 01:10:52 +00:00
Tomas V.V.Cox 5695709fb7 E_ALL fixes 2001-11-06 01:05:28 +00:00
Tomas V.V.Cox 16f8af514f E_ALL fixes 2001-11-06 00:22:18 +00:00
Sergey Kartashoff 962216c201 @- Added Udm_Check_Charset function (gluke)
- Added Udm_Check_Charset function (gluke)
2001-11-05 19:07:25 +00:00
Alex Waugh e06c1d7c7e New SAPI module for the WebJames server on RISC OS
@- New SAPI module for the WebJames server on RISC OS (Alex Waugh)
2001-11-05 12:07:49 +00:00
Stig Venaas 92843788fa Fixed seg fault when using ldap_add (or modify) with value array not
indexed as 0, 1, ... In some cases it didn't give seg fault, but used
previously added value. Now gives warning.
@- Made ldap_add (and modify) give warning with illegal value arrays.
@  Previously seg faulted or added wrong value (Stig Venaas)
2001-11-05 11:50:52 +00:00
1251756d54 ChangeLog update 2001-11-05 01:10:08 +00:00
Stig S. Bakken 78f108d31a add newline at end of file to avoid warnings 2001-11-05 00:17:28 +00:00
Stig S. Bakken 9382ddec52 non-zts compile fix 2001-11-05 00:16:33 +00:00
Andi Gutmans a332f826a7 - Support instantiation of nested class. The following script now should
- work:
-<?php
-	class foo
-	{
-		function bar()
-		{
-			print "bar() in class bar\n";
-		}
-
-		class barbara
-		{
-			function bar()
-			{
-				print "bar() in class foo::barbara\n";
-			}
-		}
-	}
-
-	$obj = new foo();
-	$obj->bar();
-
-	$obj = new foo::barbara();
-	$obj->bar();
-
2001-11-04 19:30:49 +00:00
Alex Waugh bddb9539f7 Convert PATH_TRANSLATED for RISC OS 2001-11-04 12:46:30 +00:00
Alex Waugh f1e32a8c82 Undefine AF_UNIX when compiled for RISC OS 2001-11-04 12:40:45 +00:00
Alex Waugh 0bdd62c8ac Make sure uint et al are undefined before typedefing them 2001-11-04 12:38:33 +00:00
Alex Waugh bc26250413 Included header files needed by RISC OS 2001-11-04 12:35:49 +00:00
Stig Bakken db44b1086c * expectError() now accepts "*" as a catch-all
* updated tests
2001-11-04 09:07:17 +00:00
Sergey Kartashoff c4b7501956 # more mnoGoSearch example fixes 2001-11-04 09:02:25 +00:00
Sergey Kartashoff e475621f2c - mnoGoSearch extension example updated to support words hilighting (gluke) 2001-11-04 08:46:55 +00:00
foobar 488b76b95d ws fix 2001-11-04 02:09:55 +00:00
foobar 2c9ed05832 missing cvsignore 2001-11-04 01:54:26 +00:00
c20a1c1be6 ChangeLog update 2001-11-04 01:10:21 +00:00
3d000d9521 NEWS update 2001-11-04 01:10:15 +00:00
Sergey Kartashoff 411725b01c @- mnoGoSearch module example updates for 3.2.x compatibility
- mnoGoSearch module example updates for 3.2.x compatibility
2001-11-03 22:37:50 +00:00
Sergey Kartashoff eb4754441f @- Some mnogosearch-3.2.x compilation bugs fixes.
@  Make crosswords and weight sections work with mnogosearch-3.2.x
@  UDM_PARAM_HLBEG, UDM_PARAM_HLEND mnoGoSearch Agent parameters
@  has been added (gluke)
- Some mnogosearch-3.2.x compilation bugs fixes.
Make crosswords and weight sections work with mnogosearch-3.2.x
UDM_PARAM_HLBEG, UDM_PARAM_HLEND mnoGoSearch Agent parameters
has been added (gluke)
2001-11-03 21:45:50 +00:00
Derick Rethans 0f20565919 - Fix for bug #13918 2001-11-03 20:27:09 +00:00
Andi Gutmans 48e54e0c7a - RISC OS patch by Alex Waugh 2001-11-03 13:35:14 +00:00
Andi Gutmans de64d45439 - RISC OS patches by Alex Waugh 2001-11-03 13:33:21 +00:00
James Moore a67459f581 @ - Fix bug 13885 (gmdate timezone handling on windows) (jmoore)
- relying on timezone and tzname isnt OK for gmdate etc, the only behaviour
   that might not be right is the handling of T formatter under gmdate
   should it return the machines timezone or GMT Standard Time??
2001-11-03 12:42:41 +00:00
Andi Gutmans 2eccd95ca4 - Add some initializations 2001-11-03 12:19:52 +00:00
Andi Gutmans b87194e0c6 - Add constructor to the zend_class_entry instead of looking it up each
- time by name.
- This will allow the next patch of being able to instantiate nested
- classes such as new foo::bar::barbara();
2001-11-03 11:59:14 +00:00
02293b6bee ChangeLog update 2001-11-03 01:10:28 +00:00
e74c6b1674 NEWS update 2001-11-03 01:10:25 +00:00
Rui Hirokawa 702e243d98 added private_no_expire mode on session patched by Yasuo Ohgaki. 2001-11-02 22:27:07 +00:00
James Moore 2ace2ccd00 WS fix 2001-11-02 19:31:57 +00:00
James Moore c8896a38ae @- Fix behaviour of strtok. Bug 13866 (jmoore)
# I have brought the behaviour of strtok into line with how the
# libc strtok's behave. currently given
# <string1><token><string2><token><token>string>
# three recursive calls to strtok returns <string1>. <string2>, <token><string3>
# it now returns <string1>, <string2>, <string3>. (there was some
# debate in #php.bugs if it should return <string1>, <string2>, false, <string3>
# but php's strtok now behaves the same way as the libc version.
2001-11-02 19:19:24 +00:00
Christian Stocker 288871505b typo 2001-11-02 17:57:17 +00:00
foobar 6fce86d5ed Missing entry 2001-11-02 14:34:11 +00:00
foobar 5a81882c03 This was conditionally included if HAVE_MYSQL_REAL_CONNECT was defined. 2001-11-02 07:08:48 +00:00
foobar 9ba2c90e16 Make the extension work with MySQL 4.0 2001-11-02 06:42:12 +00:00
foobar ab94fecde3 This propably fixes couple of problems with compiling with external libs. 2001-11-02 01:32:33 +00:00
b1085a21e5 ChangeLog update 2001-11-02 01:10:52 +00:00
Tomas V.V.Cox 3a0e43cb54 use feautres property instead of options 2001-11-02 00:38:23 +00:00
Markus Fischer dceb1e7814 Remove prototype warnings under linux. 2001-11-01 22:40:43 +00:00
Harald Radi 93a58dbed2 no message 2001-11-01 20:53:41 +00:00
Daniel Beulshausen 54ca6f05b1 nuke remaining warnings 2001-11-01 20:10:17 +00:00
Daniel Beulshausen d0433b6d1c make this function static 2001-11-01 17:25:56 +00:00
Daniel Beulshausen 2fba036202 - convert to use new zend_parse_parameters API
- unify errormessages + add socket_last_error()
- fix linklibrary under windows
- some streamlining
2001-11-01 16:51:59 +00:00
Tomas V.V.Cox fa15d6069c - Added row limit support for fetchInto and fetchRow
- Added getRowCounter method for DB_result to get the row number
  you are fetching in limited queries
2001-11-01 15:14:17 +00:00
Derick Rethans 2830e45fe7 - Applied patch by Yasuo Ohgaki <yasuo_ohgaki@yahoo.com> 2001-11-01 10:57:49 +00:00
deeb3407ff ChangeLog update 2001-11-01 01:10:04 +00:00
Sebastian Bergmann b1322f570c Synch with persistant -> persistent changes to ext/fbsql. 2001-10-31 18:09:17 +00:00
Andrei Zmievski 7d2334f48d Fix. 2001-10-31 14:19:30 +00:00
Stig Bakken 8a7f7d5cae * pearweb xmlrpc layer now handles PEAR errors 2001-10-31 06:21:11 +00:00
Stig Bakken b0a803d127 * update tests 2001-10-31 05:52:41 +00:00
Stig Bakken 2c05c7e0ac * removed error_prepend and error_append properties 2001-10-31 05:48:16 +00:00
Stig Bakken b5dc4f7ce0 renamed "debuginfo" property declaration to "userinfo" 2001-10-31 05:44:19 +00:00
Stig Bakken f0df3f5f82 * added "pear info" and "pear show-config" commands
* "pear install" now using the package registry
2001-10-31 05:39:11 +00:00
dc5e38cf19 ChangeLog update 2001-10-31 01:11:06 +00:00
97be9bc1d5 NEWS update 2001-10-31 01:11:02 +00:00
foobar 91a6ed234d Works now with phpize 2001-10-31 00:20:34 +00:00
foobar 8ea8ebd2de ws fix 2001-10-30 23:27:27 +00:00
foobar 43825a76bb Installing into non-existing dir is not very good idea.. 2001-10-30 23:22:10 +00:00
Sebastian Bergmann 1bbdd3bce1 Cocoon/lib -> xml-cocoon2/lib 2001-10-30 16:55:56 +00:00
Stig Bakken 3a97065f87 * disable case-folding in the xml parser (for consistency now that the
DTD is all lowercase)
2001-10-30 12:29:55 +00:00
Stig Bakken 9a8854b5b1 * improved error reporting in PEAR_Remote::call 2001-10-30 12:28:39 +00:00
Stig Bakken ed03a30603 * added getKeys method 2001-10-30 12:27:58 +00:00
Stig Bakken 4fc273adda ws 2001-10-30 12:19:36 +00:00
Stig Bakken 31391b8df3 * moved <filelist> from <package> to <release>
* added <state> element
2001-10-30 12:08:07 +00:00
Markus Fischer 963226543b Fix possible leak. 2001-10-30 06:40:06 +00:00
Dan Libby 194e17cd11 patches to sync with sourceforge project, version 0.50. primary change: adds support for SOAP v 1.1 2001-10-30 02:33:13 +00:00
cc0b737e51 ChangeLog update 2001-10-30 01:09:58 +00:00
43a2fe1cd8 NEWS update 2001-10-30 01:09:55 +00:00
Frank M. Kromann 75b32c64ff Reset the error (or message) from the server when calling fetch_row functions.
If the user conected and changed the database the message from the change was reported
when the user checked the error function after a failed fetch.
This cased problems in PEAR/DB.
If the fetch fails for other resons than a fetch after the last row, the message from the server will still be reported.
2001-10-29 23:41:15 +00:00
Frank M. Kromann e9c09b86e1 Adding nextResult() function allowing batches of sql statements to be
executed with one call to the query function.
2001-10-29 23:37:27 +00:00
Frank M. Kromann 8b0ac98fe4 A more acurate fix to the fbsql_num_rows function returning
x7fffffff when the server is unable to tell the number of rows.
2001-10-29 21:40:48 +00:00
Frank M. Kromann fc412af04a Fixing spelling of persistent 2001-10-29 21:27:31 +00:00
Frank M. Kromann 51ef66ed67 Adding fbsql.php to PEAR install 2001-10-29 19:28:22 +00:00
foobar d6adcc98b5 After discussing with Rasmus, this line should be enough. Speak up if it is not. 2001-10-29 19:12:43 +00:00
foobar 3be12d1d9b - Added myself to authors.
- Modified the clause about Apache to say what exactly was borrowed.

  Should there be the Apache license included in this file?
2001-10-29 18:58:15 +00:00
Frank M. Kromann 4ccb92fcd0 Fixing wrong count on fbsql_num_rows.
@fbsql_num_rows now return the correct value on all select statements
2001-10-29 18:53:52 +00:00
Andi Gutmans 0a682c6d70 - Fix internal classes 2001-10-29 18:10:36 +00:00
Andi Gutmans 26578c386d - Initial support for nested class definitions 2001-10-29 17:19:02 +00:00
Stig Bakken 7ab89b02c4 * started working on "pear list" command 2001-10-29 14:15:43 +00:00
Stig Bakken b60aedc275 * PEAR_Registry: renamed "upgradePackage" to "updatePackage"
* added tests for PEAR_Config and PEAR_Registry
2001-10-29 12:17:37 +00:00
Stig Bakken f8055473a4 * moved System.php out of Experimental/ 2001-10-29 12:15:53 +00:00
Zeev Suraski 2f08cb119c more ws 2001-10-29 09:45:47 +00:00
Stig Bakken dc9fc4155e * typo 2001-10-29 07:21:08 +00:00
Frank M. Kromann 688cdc581d Fixing parsing of list's returned by extract database, extract license and other extract commands 2001-10-29 01:51:08 +00:00
Zeev Suraski 66a2690700 Fix pointer mess 2001-10-29 01:18:10 +00:00
edcd5d08b6 ChangeLog update 2001-10-29 01:10:07 +00:00
Sebastian Bergmann e2b0768e96 Leftover. 2001-10-28 23:49:59 +00:00
Sebastian Bergmann 6b8670b267 Whitespace changes. 2001-10-28 23:49:03 +00:00
Stig Bakken c62fdf8f11 * added listPackages
* made packageInfo param optional, if not specified returns info for
  all packages
2001-10-28 23:35:10 +00:00
Stig Bakken fd42c6afba * nuked PEAR_Packlist class and added PEAR_Registry instead 2001-10-28 23:22:17 +00:00
Zeev Suraski c06c27af73 Whitespace fixes
Don't Adafy the code, Jani :)
2001-10-28 22:51:58 +00:00
Sebastian Bergmann 43bd681c34 Refinements. 2001-10-28 17:38:37 +00:00
Sebastian Bergmann 610bc7a194 More work on the README. 2001-10-28 15:22:50 +00:00
Sebastian Bergmann 2fa4b31386 javac 1.3 could not find reflect.class before. Also use -O flag when compiling a Release build. 2001-10-28 09:59:00 +00:00
Sebastian Bergmann 6719d80101 Add missing footnotes. 2001-10-28 09:07:37 +00:00
Sebastian Bergmann 1ffea56325 More work on the sapi/servlet documentation. This is still a work in progress. 2001-10-28 09:01:58 +00:00
2928fcbb2c ChangeLog update 2001-10-28 00:11:47 +00:00
ae9f65537e NEWS update 2001-10-28 00:11:41 +00:00
Sebastian Bergmann eff53313f5 Another fix for Tomcat 4. 2001-10-27 23:17:19 +00:00
Sebastian Bergmann cb6e751008 Fix for Tomcat 4. 2001-10-27 23:14:49 +00:00
Derick Rethans 10fe28c8ab - fix crash bug 2001-10-27 18:22:56 +00:00
Derick Rethans 6a5bcfef8d - Fix for bugs #9640 and #13789 2001-10-27 17:50:26 +00:00
Rasmus Lerdorf 374a351444 These were supposed to match 2001-10-27 12:22:22 +00:00
Sascha Schumann 1f6f91035e Get rid of post_off-hack which was only suitable for POST data
which fit into the small thttpd read buffer.  Do a small recv
after content-length bytes have been read to accomodate non-conforming
user-agents.
2001-10-27 12:08:10 +00:00
Sascha Schumann a3368ababa Improved handling of posts 2001-10-27 11:27:39 +00:00
foobar 5ee719bae0 Modified the error message a bit. Happy now Andi? :) 2001-10-27 10:14:14 +00:00
Zeev Suraski 8b53a129f7 MFTGZE1 2001-10-27 09:43:38 +00:00
Stig Bakken cd0fb34562 * actually implement -s/-S options :-) 2001-10-27 07:52:12 +00:00
foobar 4a99c5ee5c Fixed bug: #13844 2001-10-27 06:26:02 +00:00
foobar 44b68122c2 @- Fixed HTTP file upload support to handle big files better. (Jani)
# There are some minor memleaks still..I tried to eliminate them but
# without luck. I'd be glad if someone could check this code out.
# Also, this uses the Apache libapreq. So there might be need to add some
# license thingie there too?
2001-10-27 05:26:24 +00:00
foobar 609271e651 - Prevent PHP from starting if output_handler is set and
zlib.output_compression is on
- Added notes to the bundled php.ini files about this.
2001-10-27 05:22:19 +00:00
Andrei Zmievski 2890b57e46 @- Added array_chunk() function that splits an array into chunks of specified
@  size. (Andrei)
2001-10-27 05:11:15 +00:00
dc107bf495 ChangeLog update 2001-10-27 00:10:14 +00:00
Andrei Zmievski 5da651fcd2 Convert to use new parameter parsing API. 2001-10-26 21:07:59 +00:00
Stig Bakken 475796a0d7 removed 2001-10-26 20:05:34 +00:00
Frank M. Kromann afd6890a78 Typo in constant naming. 2001-10-26 18:42:46 +00:00
Harald Radi 059cbc13d3 fix visual studio .net warning 2001-10-26 17:52:41 +00:00
Frank M. Kromann 2384eb7d62 Removed unused code 2001-10-26 17:50:33 +00:00
Sebastian Bergmann ae13c5c551 Add Win32 generated files. 2001-10-26 14:54:46 +00:00
Andrei Zmievski b3d49ab0e4 Convert to use new parameter parsing API. 2001-10-26 14:50:58 +00:00
Andi Gutmans 89a0e85251 - Fix Zeev's MFZE1 2001-10-26 14:13:42 +00:00
Thies C. Arntzen ca38506fb7 ZTS fixes 2001-10-26 12:54:55 +00:00
Stig Bakken c278bfc448 * implemented "pear list-packages", the first sub-command using xmlrpc 2001-10-26 11:45:21 +00:00
Sterling Hughes e967627ad6 no need to free these it seems 2001-10-26 11:17:34 +00:00
Stig Bakken f197cf3630 * PEAR_Config class to maintain system and per-user configuration for
PEAR installations
* PEAR_Remote class to communicate with the backend server (xmlrpc)
* change pear script's option parsing to "-d foo=bar" style
* added -c/-C (user/system config file) and -s/-S (store user/system config)
  options
2001-10-26 10:07:43 +00:00
6586cf7216 ChangeLog update 2001-10-26 00:10:08 +00:00
Thies C. Arntzen 2977edaacd make it compile again and nuke most warnings 2001-10-25 06:51:13 +00:00
18ccd87eb9 ChangeLog update 2001-10-25 00:10:18 +00:00
Rasmus Lerdorf db75202426 Let's suppress this warning if always_populate is enabled 2001-10-24 20:10:30 +00:00
foobar 35ace375a9 Fixed logic bug introduced by me. Bug: #13796 2001-10-24 10:42:31 +00:00
foobar 201aeb2bb5 C++ comment pollution removed. 2001-10-24 09:06:33 +00:00
Uwe Steinmann 9290bf04e8 - switched src and dest in memcpy. This caused a segm fault in hw_new_document_from_file() 2001-10-24 08:33:09 +00:00
Uwe Steinmann 90544a10ee - freeing memory wasn't always done right 2001-10-24 08:31:54 +00:00
92535e9fa6 ChangeLog update 2001-10-24 00:13:09 +00:00
77318b5186 NEWS update 2001-10-24 00:13:06 +00:00
Rasmus Lerdorf 42ec547950 Ok, now actually make it work - maybe... 2001-10-23 20:48:30 +00:00
Rasmus Lerdorf 550550f746 Minor tweaks 2001-10-23 19:57:45 +00:00
Rasmus Lerdorf 71d341e2c0 @- $HTTP_RAW_POST_DATA was not populated on a missing content-type even when
@  always_populate_raw_post_data was on - fixed. (Rasmus)
$HTTP_RAW_POST_DATA was not populated on a missing content-type even when
always_populate_raw_post_data was on - fixed. (Rasmus)
2001-10-23 19:34:29 +00:00
Rasmus Lerdorf 72fc6bc4b1 As suggested on php-dev, array_fill() is probably a better name for this
function.
2001-10-23 18:46:35 +00:00
Frank M. Kromann 991e30668f Patch for correct handling of DATETIME values.
The patch is implemented with a parameter in php.ini controling if
datetime values are converted with the new or the old method.
Thanks to Michael Bretterklieber <mbretter@jawa.at>
2001-10-23 16:34:52 +00:00
foobar f73ee14bd9 Check that realpath is available. Bug: #9469
# TSRM still uses it without checking. I can't fix that.
2001-10-23 11:14:51 +00:00
foobar 76fcdc1afb Fix these to give correct results even if register_globals=off or
register_argc_argv=off.
2001-10-23 11:11:29 +00:00
foobar 0b2af004c1 Fixed bug: #13782 2001-10-23 10:31:56 +00:00
foobar 19cfee427f Support also --with-gd (without path). Please test this! 2001-10-23 09:19:11 +00:00
foobar cf65fad63a This patch should reduce the amount of 'bogus' bug reports when people
have two or more different versions of GD library installed.
2001-10-23 08:52:14 +00:00
Zeev Suraski aecd5b89ee MFZE1 2001-10-23 01:23:36 +00:00
Zeev Suraski c767809b2f Prolong the death of dl() for a little while longer. 2001-10-23 01:18:54 +00:00
c2da7dc4a9 ChangeLog update 2001-10-23 00:10:31 +00:00
deea4d7f2c NEWS update 2001-10-23 00:10:28 +00:00
Rasmus Lerdorf d98c96fc6c Use references instead of making a copy each time in array_init(). About
twice as fast for a high number of elements.  2.80 seconds for the copy
of 1,000,000 elements and 1.39s for the reference version.  Need to chunk
it every 62k or so because refcount is a short.
2001-10-22 20:49:27 +00:00
Andrei Zmievski b31c3e04bc Fix-up. 2001-10-22 20:37:11 +00:00
Andrei Zmievski 27d63c5b8d Adding some docs for new parameter parsing API. They really should be more
fleshed out.
2001-10-22 20:28:57 +00:00
Andrei Zmievski 801cadc3b8 Remove redundant conversion. 2001-10-22 19:46:48 +00:00
Hartmut Holzgraefe a575980813 new-style parameter parsing 2001-10-22 19:36:46 +00:00
Andrei Zmievski adc9e9b587 Fix build. 2001-10-22 16:25:43 +00:00
Andrei Zmievski 4b5527ef2a Fix ZTS build. 2001-10-22 16:07:34 +00:00
Andrei Zmievski 1beb9b21e5 @- Added session_cache_expire() function. (patch from anuradha@gnu.org) 2001-10-22 15:18:06 +00:00
Jeroen van Wolffelaar 43f1b676bb .cvsignore now everywhere in ext/standard 2001-10-22 09:48:44 +00:00
Jeroen van Wolffelaar 43b3da1396 Make math tests pass, round & co don't work this way, and there was an error
in expected output
2001-10-22 09:44:27 +00:00
foobar 4c4c34aaeb Yet another missing .cvsignore file 2001-10-22 05:18:33 +00:00
foobar 035ffebe16 Missing .cvsignore files added. 2001-10-22 02:53:39 +00:00
foobar 8d8903b8d3 Use of deprecated stuff and having error_reporting(E_ALL) made the tests fail. 2001-10-22 02:53:08 +00:00
foobar db388374ed Deprecated style used 2001-10-22 02:49:34 +00:00
foobar f8b0353fec Added missing entry. 2001-10-22 02:38:19 +00:00
foobar 701b1a548e Fixed bug: #12617 2001-10-22 02:35:10 +00:00
foobar 4fdf886f5c Fixed bug: #12443 2001-10-22 02:28:00 +00:00
foobar 626c663b26 Missing .cvsignore file 2001-10-22 02:18:33 +00:00
24b033170f ChangeLog update 2001-10-22 00:11:40 +00:00
c24a1e3022 NEWS update 2001-10-22 00:11:36 +00:00
Rasmus Lerdorf 8064e685be Check if PCRE support is compiled in and only use the pcre functions if
it is.  Otherwise just set the realm to the safe mode user id if it isn't.
2001-10-21 17:41:15 +00:00
Sterling Hughes 2b8e0d43e9 MFB 2001-10-21 17:23:39 +00:00
Rasmus Lerdorf 4d60dbb9ef Oops, leftover crud 2001-10-21 07:45:32 +00:00
Rasmus Lerdorf 798ec79319 Motivated by bug #13607 I wrote up a simple array_init() function that
lets you quickly create an array and initialize each element to a certain
value.
@ Add array_init() function (Rasmus)
2001-10-21 07:42:35 +00:00
foobar 884cb737f0 missing entry 2001-10-21 03:02:40 +00:00
foobar 5db38caece Fixed bugs: #13251, #9827, #11363 2001-10-21 03:01:17 +00:00
cc0c2ea603 ChangeLog update 2001-10-21 00:12:45 +00:00
efd46d53b5 NEWS update 2001-10-21 00:12:40 +00:00
Rasmus Lerdorf 95dff71df7 This made no sense before. Hide Authorization in getallheaders() but
display it from phpinfo()?  Ouch!
@ Hide Authorization header from phpinfo() output in safe_mode (Rasmus)
2001-10-21 00:03:55 +00:00
Rasmus Lerdorf 02e25f0a1e # Butt-ugly looking code here, but I need regular expressions to do this.
Re-instated safe-mode realm mangling as it was in php 2 and 3 albeit
in a somewhat more robust way.
@ Re-instated safe-mode realm mangling (Rasmus)
2001-10-20 22:01:56 +00:00
Andrei Zmievski 3ead31449f MFHZ1 2001-10-20 13:55:47 +00:00
Andrei Zmievski 5c90e7a78f Fix warning, 2001-10-20 13:45:29 +00:00
Derick Rethans 6852a1e704 - Fix for bug #13413 2001-10-20 10:58:33 +00:00
fc05a725eb ChangeLog update 2001-10-20 00:10:16 +00:00
Andrei Zmievski 030e873758 convert to use new parameter parsing API. 2001-10-19 19:48:35 +00:00
Andrei Zmievski 1ed249ddbc Converting to use new parameter parsing API. 2001-10-19 19:21:58 +00:00
Egon Schmid 1f852425d1 Fixed other protos. 2001-10-19 19:21:28 +00:00
Jason Greene 86bd61aace Fix news entry 2001-10-19 18:45:33 +00:00
Egon Schmid 28575499df Fixed another proto. 2001-10-19 18:42:25 +00:00
Andrei Zmievski 65da5375ea Conver to use new parameter parsing API. 2001-10-19 18:26:30 +00:00
Edin Kadribasic c0efc001af Fixed last argument in strlcat() call. 2001-10-19 18:06:37 +00:00
Andrei Zmievski 8a54c2929f Convert to use new parameter parsing API. 2001-10-19 17:16:12 +00:00
Edin Kadribasic 86959aaf62 Changed strncpy=>strlcpy; strncat=>strlcat 2001-10-19 15:54:05 +00:00
7e1fb1c7b7 ChangeLog update 2001-10-19 00:09:58 +00:00
Frank M. Kromann 583b24b682 Reverting the last fix for ZTS and adding TSRMLS_FETCH() to make it work. 2001-10-18 19:24:51 +00:00
Frank M. Kromann d682cf90cf Adding include path for having curl header and libraries in php_build\curl 2001-10-18 17:47:35 +00:00
Frank M. Kromann d3dfc03108 Fixing ZTS build on win32 2001-10-18 17:46:57 +00:00
Sterling Hughes 454d13652e fix ws issue introduce in my use_trans_sid commit...
# still getting used to emacs
2001-10-18 09:12:39 +00:00
Sterling Hughes 009b5575fa fix formatting, this line really was too long ;) 2001-10-18 09:10:05 +00:00
Sterling Hughes 4c9c90eea2 force use of the session.use_trans_sid setting 2001-10-18 09:05:16 +00:00
Sebastian Bergmann 6c5d688dee Add php_overload.dll. 2001-10-18 08:53:08 +00:00
Sebastian Bergmann 7a2d291d50 Add ext/overload to modules workspace. 2001-10-18 08:49:37 +00:00
Harald Radi 73dbeb6f6f fixed wrong constant definition 2001-10-18 08:25:39 +00:00
Harald Radi b266763335 fix linkage error 2001-10-18 08:14:56 +00:00
d5478b94a6 ChangeLog update 2001-10-18 00:10:29 +00:00
fe72ba4684 NEWS update 2001-10-18 00:10:25 +00:00
Egon Schmid 8f4109e8cb Fixed some protos. 2001-10-17 18:52:33 +00:00
Frank M. Kromann 29c090934b Return a warning when fbsql_read_blob or fbsql_read_clob is called with an invalid handle 2001-10-17 18:36:32 +00:00
Andrei Zmievski a90e5f5a6b @- Fixed a bug in preg_replace() that would change the type of the replacement
@  array entries to string. (Andrei)
2001-10-17 18:20:19 +00:00
Harald Radi 67e663efbf rename com module entry 2001-10-17 12:50:44 +00:00
Harald Radi d5f1b1b60f rename module entry 2001-10-17 12:50:12 +00:00
Harald Radi c232516005 fixed unicode bug 2001-10-17 12:48:26 +00:00
Harald Radi db4021bc7c win32 project file 2001-10-17 00:57:12 +00:00
e8922acc53 ChangeLog update 2001-10-17 00:11:34 +00:00
Frank M. Kromann 2aefe30f18 Adding new functions to retreive LOB data.
fbsql_set_lob_mode() is used to switch from FBSQL_LOB_DIRECT to FBSQL_LOB_HANDLE

when LOBS are retreived as FBSQL_LOB_HANDLE the user must call fbsql_read_blob() or fbsql_read_clob() to get the data.
2001-10-16 23:08:38 +00:00
foobar d9c26ab299 fixed proto 2001-10-16 17:08:11 +00:00
c1872382ac ChangeLog update 2001-10-16 00:10:12 +00:00
Edin Kadribasic 96a04d4ab7 Fixed bug #13083 in http_fopen_wrapper.c which is now able to handle
non absolute redirects.
2001-10-15 23:30:40 +00:00
Andrei Zmievski 88d4de1da9 Adding user-space object overloading extension. 2001-10-15 20:32:56 +00:00
Sebastian Bergmann cb37652ca5 Bump version. 2001-10-15 20:18:02 +00:00
Stig Bakken b5e6cabb8e * bump version 2001-10-15 18:58:48 +00:00
Stig Bakken 0130405168 fix bug #13479 2001-10-15 18:36:43 +00:00
Frank M. Kromann dbe9e0bfc2 Fixing problem with indirect blobs 2001-10-15 17:33:14 +00:00
Stig Bakken d7acbbe2c3 * set PHP_EXTENSION_DIR to c:\php4 and change the default
PHP_INCLUDE_PATH to c:\php4\pear
2001-10-15 08:29:00 +00:00
Stig Bakken e638a3d354 * this line is from php-gtk. hum. 2001-10-15 08:20:03 +00:00
Stig Bakken 8d86cc6efe * fix Windows default include path 2001-10-15 05:47:07 +00:00
Stig Bakken c06ad9f9c0 * updated version numbers, moved extension version change to 4.1.0 2001-10-15 05:40:31 +00:00
a10c309e63 ChangeLog update 2001-10-15 00:10:52 +00:00
7bdfc6fbe8 NEWS update 2001-10-15 00:10:48 +00:00
Egon Schmid 8a5402c232 Fixed some spelling errors. 2001-10-14 09:24:37 +00:00
Markus Fischer 1a247ba1d8 Made error returning on missing extensions consistent across all backends 2001-10-14 01:23:07 +00:00
872da0aa0a ChangeLog update 2001-10-14 00:10:59 +00:00
Sascha Schumann a92fa9b2bc Either sizeof(struct stat) or sizeof f_stat, but not sizeof stat. 2001-10-13 23:43:49 +00:00
Adam Dickmeiss 7904bff7ad Fixed thread-safe compile. Thanks to Jani Taskinen. 2001-10-13 22:35:11 +00:00
foobar 7e88a009d2 Fixed bug: #13652 2001-10-13 15:06:14 +00:00
foobar 67b53c04eb This file is generated. 2001-10-13 14:55:51 +00:00
foobar eea391830a ws fix. 2001-10-13 13:12:30 +00:00
Martin Jansen 4d54d1919c * updated email adress 2001-10-13 09:32:34 +00:00
Adam Dickmeiss 6b934d9243 Fix backwards source compatibility. 2001-10-13 07:38:32 +00:00
Martin Jansen e9eb586106 * fixed problem with copyright header on some systems. 2001-10-13 06:22:09 +00:00
7a43e77e58 ChangeLog update 2001-10-13 00:10:43 +00:00
Martin Jansen d37016f26d * streamlined the copyright header
* changed path names in pear.bat to more typical values
# The GUI installer on Win32 installs PHP to c:\php by default, so we
# should make that the predefined value in the PEAR batch file.
2001-10-12 20:39:50 +00:00
Alexander Merz 8d66ae62e9 typo 2001-10-12 19:46:21 +00:00
Alexander Merz 262bcc637d win version of pear the pear script 2001-10-12 19:43:58 +00:00
Sterling Hughes cdc5600880 revert removal of zend_parse_parameters and properly use
zend_parse_parameters (ie zval * instead of zval **).
2001-10-12 19:16:39 +00:00
Sebastian Bergmann 01850714ee MFZE1: Introduced extension version numbers (Stig) 2001-10-12 18:40:30 +00:00
Sterling Hughes ce6dde342b fix segv's, zend_parse_parameters seems not to be able to handle
resources.

# emacs is cool
2001-10-12 15:07:05 +00:00
Stig Bakken 0cee8df65e * fix module struct in rest of sapi modules 2001-10-12 12:11:48 +00:00
Thies C. Arntzen 838a7a9566 make it work again 2001-10-12 07:50:52 +00:00
foobar de8ff3170e Fixed bug: #13556 2001-10-12 00:21:09 +00:00
8a06f6635e ChangeLog update 2001-10-12 00:10:35 +00:00
26a315308d NEWS update 2001-10-12 00:10:32 +00:00
Stig Bakken 689252082c * zend_module_entry change: apino, debug and zts are moved first,
see README.EXTENSIONS file for upgrade help.
@Introduced extension version numbers (Stig)
2001-10-11 23:33:59 +00:00
Stig Bakken 405142087c * replaced PEAR::phpVersionIs with version_compare 2001-10-11 22:11:34 +00:00
Stig Bakken b26fbe41b1 * version_compare() is included from 4.0.7 2001-10-11 10:46:29 +00:00
Stig Bakken 925ff7f2b2 * remove version_{lt,le,gt,ge,eq} functions, added a third optional
parameter to version_compare doing the same thing
2001-10-11 10:35:59 +00:00
Stig Bakken 1f40bd4cd9 * updated line numbers 2001-10-11 01:23:53 +00:00
Stig Bakken 3c98893a01 * make test pass 2001-10-11 00:41:15 +00:00
Mark L. Woodward bb5398c687 Allow msession to build without ext/session 2001-10-11 00:36:24 +00:00
1f3cd999e5 ChangeLog update 2001-10-11 00:12:00 +00:00
96a8cc1a44 NEWS update 2001-10-11 00:11:54 +00:00
Frank M. Kromann 8d88fb8bf3 Changed return value for BLOB/CLOB values to a string. and returning false if no handle is created. 2001-10-10 22:24:57 +00:00
Tomas V.V.Cox 692d30b7be fix a problem with the propagation of baseinstalldir and role 2001-10-10 18:42:23 +00:00
Sergey Kartashoff aa9098cd46 @- Make UDM_PARAM_ISPELL_PREFIXES work under mnogosearch-3.2.x (gluke)
- Make UDM_PARAM_ISPELL_PREFIXES work under mnogosearch-3.2.x (gluke)
2001-10-10 17:39:04 +00:00
Stig Bakken 99687096ca * fix default path in configure help text 2001-10-10 16:14:25 +00:00
Stig Bakken f0c30a0662 * added function entries for version_{lt,le,gt,ge,eq} 2001-10-10 10:32:16 +00:00
Stig Bakken f3d2d4c630 @Added version_{lt,le,gt,ge,eq} functions (Stig) 2001-10-10 10:14:51 +00:00
Frank M. Kromann ffd40bf495 Adding support for BLOB and CLOB 2001-10-10 00:42:00 +00:00
70a60c43ab ChangeLog update 2001-10-10 00:10:23 +00:00
91b3f7b570 NEWS update 2001-10-10 00:10:20 +00:00
Stig Venaas de894ef098 Added ldap_start_tls() function
@- Added ldap_start_tls() function (Stig Venaas, patch by kuenne@rentec.com)
2001-10-09 21:14:14 +00:00
Derick Rethans 27fb33e8b7 - More <br> to <br /> fixes 2001-10-09 19:19:21 +00:00
Sascha Schumann 49b44d537f Make the information available whether we are using HTTP/1.1 2001-10-09 15:15:55 +00:00
Rainer Schaaf 06111162cf added new configure option --with-pdflib3
Therefore --with-pdflib will only work with PDFlib 4.x from now on, if one wants
to build PHP with PDFlib V3.x he has to use the new option --with-pdflib3.

This makes configuration of PDFlib much easier, as no additional libraries
are needed anymore. This is possible, because PDFlib has built in libraries
for tiff/jpg/zlib since V4.
2001-10-09 12:24:44 +00:00
Derick Rethans e4ebe9f1ff - Changed <br> to - in PHP_INFO output. 2001-10-09 09:41:10 +00:00
Egon Schmid 251c275305 Fixed some protos. 2001-10-09 05:30:21 +00:00
Tomas V.V.Cox d557151ce7 more clean up/fixes 2001-10-09 02:56:33 +00:00
3bf9d3d82f ChangeLog update 2001-10-09 00:10:19 +00:00
08fe09e9d2 NEWS update 2001-10-09 00:10:16 +00:00
Frank M. Kromann 42cce22f2d use strdup to alloc memory refeed with free! 2001-10-08 22:24:59 +00:00
Frank M. Kromann 6e9e37be3a Oops. Removed too much code. 2001-10-08 22:21:16 +00:00
jim winstead a7bea2f140 handle dbase files with padded field headers. (patch from
Landon Bradshaw <landon@bradshaw.org>)
2001-10-08 21:52:26 +00:00
jim winstead 6fab353df1 handle 'I' field type, just another name for the 'N' field type (patch
from Landon Bradshaw <landon@bradshaw.org>)
2001-10-08 21:51:12 +00:00
Egon Schmid 116671a8fb Fixed some protos. 2001-10-08 18:39:42 +00:00
Tomas V.V.Cox 13682462c7 some clean up 2001-10-08 16:52:33 +00:00
Sergey Kartashoff 012840d145 @- Added support for word match mnogosearch-3.2 command and for stopfile
@  command. StopTable will not be supported by mnogosearch-3.2.x
- Added support for word match mnogosearch-3.2 command and for stopfile
  command. StopTable will not be supported by mnogosearch-3.2.x
2001-10-08 16:50:13 +00:00
Frank M. Kromann 3629062ab6 Fixing prototypes and removing unused code 2001-10-08 16:42:19 +00:00
Rainer Schaaf 6a0dce93af fixed PDF_get_value for parameters
- capheight
- ascender
- descender

had to ajust modifier by PDFLIB_FONT_OFFSET
2001-10-08 16:12:12 +00:00
Derick Rethans 009b8470eb - Fix for bug #13592 (Patch by Markus Fischer <mfischer@guru.josefine.at>) 2001-10-08 06:28:16 +00:00
Tomas V.V.Cox c7239f2b00 more work on Windows support 2001-10-08 06:12:13 +00:00
Tomas V.V.Cox 5f5bbfd3f3 added mkTempDir to create temporal directories 2001-10-08 06:10:54 +00:00
Tomas V.V.Cox fb487bc38d detect and report error 2001-10-08 03:31:14 +00:00
Tomas V.V.Cox 28f5a1e6e9 use Tar.php class and clean up some unused properties 2001-10-08 03:29:34 +00:00
60f7b32e4d ChangeLog update 2001-10-08 00:10:29 +00:00
ece41debc9 NEWS update 2001-10-08 00:10:25 +00:00
Tomas V.V.Cox 5b0e540882 work on Windows support (use Tar class and System class) 2001-10-07 20:16:41 +00:00
Tomas V.V.Cox b46e7d76b4 use the new System class for common file opperations 2001-10-07 20:14:11 +00:00
foobar 4cf3fd2752 make this entry readable. 2001-10-07 19:37:53 +00:00
Derick Rethans 62fb3d63c5 @- Added mmapfile(), read a file into a variabele with mmap (Ilia A, Derick)
- Added mmapfile(), read a file into a variabele with mmap (Patch by:
  Ilia A. <ilia@prohost.org>)
2001-10-07 18:34:44 +00:00
Jeroen van Wolffelaar 78b881f389 Fix naming inside php_search_array, comp_func is not a compare function. 2001-10-07 13:49:08 +00:00
Sterling Hughes f04497bab2 fix sp 2001-10-07 11:59:14 +00:00
Sterling Hughes 3a50a0322f @ Have rand() and mt_rand() seed automatically if srand() or mt_srand() has
@ not been called. (Sterling)
2001-10-07 11:52:09 +00:00
bf59a8db85 ChangeLog update 2001-10-07 00:10:03 +00:00
10ee55abf5 NEWS update 2001-10-07 00:10:00 +00:00
Stig Bakken 89bd184ea0 @Added version_compare() function (Stig) 2001-10-06 23:22:37 +00:00
Derick Rethans a0bbfb590c - <br> -> <br /> 2001-10-06 20:13:39 +00:00
Sterling Hughes af1c7070f7 fix execution order 2001-10-06 18:59:39 +00:00
Sterling Hughes 16da751e3b avoid TSRMLS_FETCH() 2001-10-06 18:55:09 +00:00
Sterling Hughes 1bceefb2da @ Don't through a file does not exist warning for the is_dir(), is_writeable(),
@ is_readable(), is_executable(), is_link() and is_file() functions. (Sterling)
2001-10-06 18:52:37 +00:00
Sascha Schumann 2965b8c1fc rand_mt.c, rand_sys.c are gone, remove them from the workspace file. 2001-10-06 18:02:23 +00:00
Edin Kadribasic 2ebefcf3b9 Made session test pass on systems with short open tags disabled. 2001-10-06 09:54:23 +00:00
Edin Kadribasic 26389258bb Made assert test pass on systems with short open tags disabled.
Added .cvsignore
2001-10-06 09:38:29 +00:00
Sebastian Bergmann 17ef8dba77 Fix Win32 build. 2001-10-06 06:05:36 +00:00
Rui Hirokawa 8b8d3d35c2 fixed name of global variables in ext/skelton. 2001-10-06 04:39:37 +00:00
f2fbed70fd ChangeLog update 2001-10-06 00:10:55 +00:00
f46dbef810 NEWS update 2001-10-06 00:10:52 +00:00
Stig Bakken 9ce638248d * prototype of version_compare, doesn't work yet 2001-10-05 23:56:19 +00:00
Jeroen van Wolffelaar a1c2b86701 Fix the pow-test, it now succeeds on my machine 2001-10-05 23:37:08 +00:00
Stig Bakken 91880600c7 cvsignore file 2001-10-05 22:25:33 +00:00
Jeroen van Wolffelaar 5541451085 Add test for array_search and in_array
(should be expanded though)
2001-10-05 22:01:04 +00:00
Jeroen van Wolffelaar 62feefddc7 Fix array_search and in_array. Now binary safe, and faster (returns when
found, and doesn't duplicate the key each time, but only when necessary)

Patch also by Edin Kadribasic
2001-10-05 21:58:41 +00:00
Jeroen van Wolffelaar 89ea50a588 Fix bug 13567 and don't depend on a boolean int-value to be either 1 or 0 2001-10-05 20:14:33 +00:00
Edin Kadribasic e78b61542d Added array_change_key_case() function that returns array with
with all string keys lowercased or uppercased
@- Added array_change_key_case() function that returns array with
@  with all string keys lowercased or uppercased (EdinK)
2001-10-05 18:38:53 +00:00
Daniel Beulshausen 1ac3aa7e08 nuke unnecessary force-by-ref declarations + name the needed in a proper way 2001-10-05 15:56:42 +00:00
Tomas V.V.Cox 20505d8483 added tests for PHP version comparing functions 2001-10-05 13:02:08 +00:00
Tomas V.V.Cox b244f61139 changed the logic of version comparation 2001-10-05 12:46:21 +00:00
Sascha Schumann 0c79e85ede fix declaration 2001-10-05 12:22:12 +00:00
Sterling Hughes 1c7e920a9e make this work under OSX 2001-10-05 07:12:27 +00:00
Tomas V.V.Cox 1f470ecca6 E_ALL fixes 2001-10-05 01:32:13 +00:00
Tomas V.V.Cox 0ebee4d29f get rid of the RC part of php versions 2001-10-05 00:28:36 +00:00
98a8ea2203 ChangeLog update 2001-10-05 00:11:33 +00:00
Daniel Beulshausen a58e996039 fix gd2 preprocessor definitions 2001-10-04 20:21:19 +00:00
Daniel Beulshausen 1fa1b9a60c undo last changes 2001-10-04 20:19:46 +00:00
Daniel Beulshausen c4ee7a403e fix macro 2001-10-04 20:14:17 +00:00
Daniel Beulshausen 377d88cec0 use maxpathlen instead of path_max 2001-10-04 20:10:58 +00:00
Tomas V.V.Cox 0786889de0 added method phpVersionIs() to find if a PHP version is minor, greater
or both (see in-line doc for more info)
2001-10-04 19:05:09 +00:00
Harald Radi 27744e892a no message 2001-10-04 18:24:44 +00:00
Derick Rethans 744d1fc1ea - 'Fix' for bug #13543 2001-10-04 15:25:39 +00:00
Sebastian Bergmann 43c7615c51 MFZE1 2001-10-04 14:18:52 +00:00
Sascha Schumann ee63d3400a update 2001-10-04 09:31:11 +00:00
Jon Parise c6bed4ce3d Search for the '@' symbol in the DSN from the right instead of the left.
That will allow the password element to include a '@' symbol without
confusing the DSN parser.

Submitted by: Alex L <admin@networkessence.net>
2001-10-04 00:29:37 +00:00
d452cf054e ChangeLog update 2001-10-04 00:10:38 +00:00
Stanislav Malyshev 73b5401fc9 Fix typo - comment is ; not ' 2001-10-03 11:35:51 +00:00
Jason Greene dc7d5df048 Add cleanup on an exec failure
Remove debug comments
2001-10-03 03:48:27 +00:00
4039c24ad5 ChangeLog update 2001-10-03 00:10:10 +00:00
Sascha Schumann 3db3d65d2e typo fix by zoot@zotikos.com 2001-10-02 14:54:46 +00:00
Andrei Zmievski 56e6d6ae77 Fix. 2001-10-02 13:57:29 +00:00
3e91f4fadc ChangeLog update 2001-10-02 00:11:54 +00:00
3c6bf08a47 NEWS update 2001-10-02 00:11:50 +00:00
Sascha Schumann 4eb7611155 @$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
may fail.
2001-10-01 21:03:05 +00:00
Mark L. Woodward 758b775d34 Removed PHOENIX_INCLUDE, I don't need it to compile and it seems like
it causes a conflict with ext/mhash. (Phoenix has a file called mhash.h
and that is being found when mhash is being built.)
2001-10-01 11:04:56 +00:00
bd15cd8ef9 ChangeLog update 2001-10-01 00:12:07 +00:00
a9bae61ca3 NEWS update 2001-10-01 00:12:02 +00:00
Sascha Schumann 6db3f409d8 Add QUERY_STRING, HTTP_HOST, HTTP_ACCEPT_LANGUAGE to the script
environment.

Also support setting the INI path from the outside.
2001-09-30 18:23:28 +00:00
Andi Gutmans 2eabb14dc7 - Merge the NAMESPACES_BRANCH. It wasn't a good idea to have a branch when
- the whole CVS tree is work in progress
2001-09-30 17:29:55 +00:00
Jon Parise 516b8bc723 Ignore generated files. 2001-09-30 16:20:05 +00:00
Jon Parise 362140868d Allow the location of the Phoenix library to be specified on the configure
commandline.
2001-09-30 16:13:52 +00:00
Stig Venaas b055912861 Didn't compile, replaced some TSRMLS_C with TSRMLS_CC 2001-09-30 13:30:18 +00:00
Jason Greene 8a705b8cd9 @Added new function pcntl_exec, which behaves similar to execve. 2001-09-30 06:59:12 +00:00
Rasmus Lerdorf 94d789e5d7 I could have sworn I test compiled this when I committed it a couple of
days ago.  Must have been hallucinating.
2001-09-30 04:42:08 +00:00
d21db564a3 ChangeLog update 2001-09-30 00:09:40 +00:00
147ae17bad NEWS update 2001-09-30 00:09:37 +00:00
Sergey Kartashoff bf3de43044 Search frontend example has been updated. 2001-09-29 14:09:42 +00:00
Sergey Kartashoff 2d91428732 @- initial support of mnogosearch-3.2.x has been added. Not all features
@  are implemented currently.
- initial support of mnogosearch-3.2.x has been added. Not all features
  are implemented currently.
2001-09-29 13:58:18 +00:00
Sergey Kartashoff 9edfe2e4d3 # fixed typo 2001-09-29 09:25:22 +00:00
Rui Hirokawa 69ae8f1903 ming-0.2a needs rint() in libm. 2001-09-29 08:15:39 +00:00
Mark L. Woodward c4c4626551 Doh! Return nothing when there is nothing back from a plugin 2001-09-29 00:53:07 +00:00
Tomas V.V.Cox e3e28c8f59 extract only the package.xml file instead of all files 2001-09-29 00:38:24 +00:00
cf1e1e0ddd ChangeLog update 2001-09-29 00:09:47 +00:00
Mark L. Woodward 38f3435f06 Added msession_set_array and msession_plugin 2001-09-28 12:41:06 +00:00
Tomas V.V.Cox 15ac0567f9 implemented infoFromTgzFile() 2001-09-28 00:55:16 +00:00
cb9991d9db ChangeLog update 2001-09-28 00:10:13 +00:00
ffd256654d NEWS update 2001-09-28 00:10:10 +00:00
Tomas V.V.Cox 73b5ff0389 tab vs ws 2001-09-27 23:59:16 +00:00
Tomas V.V.Cox 95d19651f3 don't want "-" in package names 2001-09-27 23:31:15 +00:00
Jeroen van Wolffelaar f512ec4331 Typo 2001-09-27 20:07:16 +00:00
Jeroen van Wolffelaar eb38ca844b Undo Z_ subst for sapi and ext/yaz 2001-09-27 20:01:23 +00:00
Jeroen van Wolffelaar 6d9c04e823 Undo Z_ subst 2001-09-27 19:43:06 +00:00
David Eriksson 6f7cf88a98 Patch from Sander Steffann <sander@steffann.nl> to prevent crash. 2001-09-27 12:28:10 +00:00
Andi Gutmans 279b468bf7 - Bump it up in the right place 2001-09-27 08:08:33 +00:00
Rasmus Lerdorf c8280238de Fix segfault and check for truecolor image in ImageColorAt
@- Fix segfault and check for truecolor image in ImageColorAt (Rasmus)
2001-09-27 07:36:34 +00:00
Derick Rethans be52d66f4b - Fix crashbug in php_chunk_split() 2001-09-27 06:55:23 +00:00
Dan Libby 061cd20400 include php_compat.h, so that we use php_XML_* if necessary. Better to do it in expat.h, so that other libs, eg xmlrpc, inherit this behavior and we can link 2001-09-27 00:29:34 +00:00
Zeev Suraski 7e42c73a50 Another leak bites the dust? 2001-09-27 00:21:21 +00:00
ba670f561e ChangeLog update 2001-09-27 00:11:04 +00:00
5fb05df977 NEWS update 2001-09-27 00:11:01 +00:00
Harald Radi d1199bd2c7 fixed Z_* conversion errors 2001-09-26 22:52:17 +00:00
Jeroen van Wolffelaar 39e47f5a98 Revert macro-subst, because wasn't necessary here, and those who were
substitued weren't zvals
2001-09-26 22:24:44 +00:00
Zeev Suraski 99a71e4418 More accurate NEWS entry 2001-09-26 21:46:04 +00:00
Zeev Suraski dd01c11ee3 Fix pg_last_notice() 2001-09-26 21:44:48 +00:00
Derick Rethans 51e2a6b84e - nl2br now handles different styles of line endings in one string. (Patch
by Boian Bonev <boian@bonev.com>)
@- nl2br now handles all styles of line-endings in one string. (Boian,
@  Derick)
2001-09-26 19:34:46 +00:00
Derick Rethans 5a34b26972 - This patch adds proper header file detection on system which
simultaneously isntallied libxml1 and libxml2 (eg. Debian) (patch by
  Markus Fischer <mfischer@php.net>)
2001-09-26 19:02:33 +00:00
Sascha Schumann bfef93878c Force proper alignment of php_sockaddr_storage. Sparc will throw
a SIGBUS, when accessing the family part of a char-aligned structure.
2001-09-26 15:12:20 +00:00
Derick Rethans 9d4c81e925 - whitespace fix 2001-09-26 12:44:34 +00:00
Derick Rethans 6b0196b652 - Fixed error introduced by the macro substitution 2001-09-26 12:34:30 +00:00
David Eriksson 9a4500d056 Fixed Jeroen's macrofication 2001-09-26 11:09:10 +00:00
David Eriksson e1c448e8be leave on first directory 2001-09-26 10:45:22 +00:00
Jeroen van Wolffelaar 0916fd50c0 5th and probably/hopefully last run of conv_z_macros 2001-09-26 09:21:58 +00:00
Jeroen van Wolffelaar d85b39e532 Typo 2001-09-26 09:11:49 +00:00
Jeroen van Wolffelaar 23a942c795 Fix build 2001-09-26 09:09:40 +00:00
Jeroen van Wolffelaar 0729948990 Parse-fix 2001-09-26 09:00:30 +00:00
Jeroen van Wolffelaar 6a8a5767c2 4rd run... now also var.Z_* 2001-09-26 08:53:37 +00:00
Jeroen van Wolffelaar 6693d112d2 Fix the fix 2001-09-26 08:51:53 +00:00
Jeroen van Wolffelaar 8ec9e5bca0 Fix parse-error 2001-09-26 08:41:05 +00:00
Jeroen van Wolffelaar 21f2b9277f 3rd run in back-substitutin Z_* macro's. The val->Z_ cases are all solved now. 2001-09-26 08:35:48 +00:00
Jeroen van Wolffelaar b0468809ff Now fixes virtually everything.
Sorry, but I assumed that the original script was correct. Unfortunately, that
wasn't the case.
2001-09-26 08:32:55 +00:00
Derick Rethans cdae7d9b7c - Fix NEWS 2001-09-26 07:59:04 +00:00
Jeroen van Wolffelaar f9d71bc3fb And now correctly... and up until 3 levels 2001-09-26 07:58:32 +00:00
Jeroen van Wolffelaar fe000a7391 This fixes most var->Z_* problems 2001-09-26 07:55:13 +00:00
Frank M. Kromann b77c39ea65 Fixing Win32 build...after the last macro convertions. 2001-09-26 03:43:34 +00:00
Frank M. Kromann 448e9d49cc Fixing Win32 build... 2001-09-26 03:24:19 +00:00
deb81174b0 ChangeLog update 2001-09-26 00:10:05 +00:00
Harald Radi 23c65b60a0 no message 2001-09-25 23:39:50 +00:00
Jeroen van Wolffelaar 6cfba2a3ea 2nd phase in back-substitution those macro's
I've got pretty much everything now...
2001-09-25 22:49:04 +00:00
Jeroen van Wolffelaar 0ddd124d1d Should've used my own script... 3rd try. 2001-09-25 22:34:57 +00:00
Jeroen van Wolffelaar c033288573 Back-substitute for Z_* macro's. If it breaks some extension (the script isn't optimal, it parses for example var->zval.value incorrect) please let me know. 2001-09-25 21:58:48 +00:00
Daniel Beulshausen 158d34c9a5 fix release_ts_dbg libpath 2001-09-25 17:16:27 +00:00
Daniel Beulshausen e014d58e46 nuke VARIANT module 2001-09-25 17:08:02 +00:00
Jeroen van Wolffelaar eb9390771c Just in case... 2001-09-25 16:06:39 +00:00
Jeroen van Wolffelaar ab0acab993 Enhance to also process objects, and be more verbose 2001-09-25 15:57:58 +00:00
Mark L. Woodward ad2113e635 Added REQ_RANDSTR to support msession_randstr 2001-09-25 12:21:45 +00:00
Mark L. Woodward 622fe4d488 Changed config.m4 to a better default, updated README. 2001-09-25 12:12:48 +00:00
Mark L. Woodward 32b196e4f7 Added msession_randstr, creates a random string from a single
source.
2001-09-25 12:11:25 +00:00
Sterling Hughes bb2d4e3126 add a 7.9 version check 2001-09-25 07:07:22 +00:00
d05661abd2 ChangeLog update 2001-09-25 00:10:25 +00:00
Sterling Hughes 2e79759f50 fix constant 2001-09-24 18:45:08 +00:00
Harald Radi a491db4e2d removed VARIANT module and put the VARIANT class into
the COM module.
also fixed a few bugs.
2001-09-24 15:56:18 +00:00
Derick Rethans f1ce7daccd - Fix crash bug (patch by <chocolateboy@lunomail.com>) 2001-09-24 08:33:51 +00:00
f3b1bc8bc2 ChangeLog update 2001-09-24 00:09:58 +00:00
Andi Gutmans 315c894da8 - Commit fix for bug #11998 by Ralf Bolte <r.bolte@gmx.net> 2001-09-23 19:17:44 +00:00
Jeroen van Wolffelaar f61dfce39c Make chop the alias and rtrim the main function, in order to get automagically
generated alias-listings correct.
2001-09-23 18:32:46 +00:00
Derick Rethans db1fe4b060 - Don't return from the function, so that mcrypt get properly initialized
(fix for bug #13399)
2001-09-23 14:39:08 +00:00
Derick Rethans 9c610ae87f - Added mcrypt_generic_deinit and added a warning about mcrypt_generic_end
being deprecated.
- Reordened constants, and added MCRYPT_3DES to the 2.4 set of constants
2001-09-23 14:14:27 +00:00
Rui Hirokawa 1b78716661 mbstring is no more in experimental status. 2001-09-23 13:42:00 +00:00
524b089127 ChangeLog update 2001-09-23 00:09:59 +00:00
1eda5996cc NEWS update 2001-09-23 00:09:55 +00:00
foobar f78cf8ee67 Moved the check for mcrypt_generic_deinit to the right place. 2001-09-22 17:55:16 +00:00
foobar 6bcd0ae557 Check if mcrypt lib has mcrypt_generic_deinit 2001-09-22 17:51:07 +00:00
Sebastian Bergmann 76ccb015e8 Keep ZEND_CHANGES up-to-date. 2001-09-22 17:03:05 +00:00
Sterling Hughes 958675c067 fix compile 2001-09-22 16:56:21 +00:00
Zeev Suraski e42ab2c95f MFZE1 2001-09-22 14:03:27 +00:00
Rasmus Lerdorf 1df380da5a new apache_setenv()
@- add apache_setenv() function for injecting variables into Apache's
@  subprocess_env table.
2001-09-22 10:11:53 +00:00
foobar b46354b7bc removed autogenerated file from cvs 2001-09-22 01:59:24 +00:00
Jeroen van Wolffelaar 929ae94c64 Let settype also accept 'int', 'bool', 'float' and 'null'
@Let settype also accept 'int', 'bool', 'float' and 'null' (Jeroen)
2001-09-22 01:39:14 +00:00
Sterling Hughes f8e78a00f2 update to curl 7.9 (when it comes out :)
make REGISTER_CURL_CONSTANT() only take one argument
couple of speed-up's
few style fixes
2001-09-22 00:38:59 +00:00
0002bae3bf ChangeLog update 2001-09-22 00:12:16 +00:00
Zeev Suraski 17352812a3 MFZE1 2001-09-22 00:09:24 +00:00
Hartmut Holzgraefe 03f7406711 proto fixes "double" -> "float" 2001-09-21 21:59:27 +00:00
Hartmut Holzgraefe 8f01638bf6 local resource fix 2001-09-21 21:57:41 +00:00
Hartmut Holzgraefe 2c275bf793 renamed doubleval to floatval and made doubleval an alias to floatval
made is_float the function entry and is_double the alias
2001-09-21 21:29:14 +00:00
Sascha Schumann 4582d38519 Fix warning on Win32 (thanks to Sebastian) 2001-09-21 17:21:50 +00:00
Sascha Schumann 0a8677167d don't use boyer_str_to_str. It is experimental 2001-09-21 16:17:14 +00:00
Sascha Schumann 9002e37e4e Always seed the LCG from the request-init hook, otherwise the seed
would be shared among the threads which is quite pointless.  Also
use a function of the current time as one factor.

Use gettimeofday() instead of time(), because it is faster on some
operating systems.
2001-09-21 13:38:44 +00:00
Sascha Schumann 78fb121a61 indentation fix 2001-09-21 13:13:10 +00:00
b08e6310fb ChangeLog update 2001-09-21 00:10:28 +00:00
Andi Gutmans d58240d0f5 - Nuke unused enum 2001-09-20 15:50:11 +00:00
Mark L. Woodward d1a1ef3d9b (Removed Makefile, added accidentally.)
Eliminated mod_msession in ext/session, and moved that code into msesion.c
2001-09-20 12:21:01 +00:00
Sascha Schumann f45555e62f Rework some string-to-number and vice-versa functions to work smarter
(e.g. without using functions that use slow locales, without allocating
 extra memory and with fewer integer/float operations)
2001-09-20 08:22:44 +00:00
a16eadb1ef ChangeLog update 2001-09-20 00:10:58 +00:00
6320f1aa3e NEWS update 2001-09-20 00:10:54 +00:00
Zeev Suraski 483fc4c73a MFZE1 2001-09-19 22:34:11 +00:00
Stig Venaas 7d2a912335 Not using _free_ldap_result destructor for le_result_entry, leads to
crashes due to freeing same memory several times in some cases
2001-09-19 19:43:59 +00:00
Andy Sautins 810dd37b90 Collections core-dump fix. ocicollgetelem was using OCIInd instead
of OCIInd * in call to OCICollGetElem
2001-09-19 19:25:43 +00:00
Stig Venaas 926d1506e0 Added IPv6 support to gethostbyaddr()
@- Added IPv6 support to gethostbyaddr()
@  (Patch by Matthias Wimmer <matthias@charente.de> and venaas)
2001-09-19 18:08:15 +00:00
Frank M. Kromann a46c6157de Fixing debug build on Win32 2001-09-19 17:48:34 +00:00
Hartmut Holzgraefe cc17f92947 argument count fix plus beginning local query support 2001-09-19 17:14:14 +00:00
Mark L. Woodward 49c66ea47e The extension should not be GPL. 2001-09-19 15:46:20 +00:00
Wez Furlong ad72c064bc doh\! 2001-09-19 15:12:30 +00:00
Mark L. Woodward ba2bc65d31 Added 2001-09-19 13:14:24 +00:00
Sascha Schumann e261d310a0 quickly fix newly introdued off-by-one 2001-09-19 11:03:58 +00:00
Wez Furlong c6a957e012 Fix silly bugs 2001-09-19 10:59:12 +00:00
Sascha Schumann e4ace6cde6 Rewrite _php_match_basetozval to need only one multiplication
per iteration and avoid the U?LONG_MAX hassle.
2001-09-19 10:57:50 +00:00
Andi Gutmans 88d408ee11 - MFZE1 2001-09-19 10:41:35 +00:00
Sebastian Bergmann 3bdddb4910 MFZE1 2001-09-19 10:25:04 +00:00
Sebastian Bergmann da5a79d185 MFZE1 2001-09-19 10:06:09 +00:00
Sascha Schumann ed50e0e155 Fix indentation of ./configure --help 2001-09-19 09:17:56 +00:00
Sascha Schumann 0215031834 Kill unnecessary quoting, and set host_alias to host, if only the latter
is defined.
2001-09-19 09:01:05 +00:00
Sascha Schumann 91985677a6 add missing dependency 2001-09-19 08:56:58 +00:00
Joey Smith 0098833e86 Don't manually register the resource, let php_domobject_new do it for us.
This fixes and elusive SIGSEGV.
Bug id'd and fixed by Ivo Hulinsky <huld@fido.cz>.

This fixes #13322.
2001-09-19 02:24:05 +00:00
1a92100ce1 ChangeLog update 2001-09-19 00:10:08 +00:00
Frank M. Kromann 975ebe3524 Fixing win32 debug build 2001-09-18 23:39:25 +00:00
Hartmut Holzgraefe d330072db9 argument count fix 2001-09-18 20:42:37 +00:00
Sterling Hughes 563c0670e5 another attempt at fixing compile warnings... 2001-09-18 20:05:05 +00:00
Sterling Hughes 8092460830 hopefully fix win32 compile warnings
# I really wish i had a box to compile php with win32 on
2001-09-18 05:48:49 +00:00
c3edc73ecc ChangeLog update 2001-09-18 00:10:02 +00:00
Hartmut Holzgraefe 30df2b3073 yet another ncurses 4.x fix 2001-09-17 22:11:55 +00:00
Hartmut Holzgraefe 38ab8708f2 editor hints added 2001-09-17 22:00:38 +00:00
Hartmut Holzgraefe 2f59bb576d whitespace 2001-09-17 21:59:15 +00:00
Hartmut Holzgraefe bc631cce3e some keyboard constants 2001-09-17 21:57:09 +00:00
Hartmut Holzgraefe a965a1759f some more function implementations 2001-09-17 21:54:25 +00:00
Sterling Hughes bcb426a207 Merge in qsort changes 2001-09-17 21:02:53 +00:00
David Benson d6cecfc213 Change duration of temporary lobs to avoid leakage of temporary lob
space (dbenson).
2001-09-17 20:52:31 +00:00
Hartmut Holzgraefe 0edb79a3d4 some proto fixes (not all done yet) 2001-09-17 19:55:22 +00:00
Hartmut Holzgraefe 75095ce66c got rid of strtok and added some comments 2001-09-17 19:49:17 +00:00
Hartmut Holzgraefe 891443e15f will now configure out functions not available in ncurses 4.2 2001-09-17 16:24:11 +00:00
Brian Moon b285fae0bc adding RFC for loose type requirements for functions 2001-09-17 16:01:20 +00:00
Daniel Beulshausen 60812553d4 fix macros 2001-09-17 13:37:11 +00:00
Daniel Beulshausen 75aa3cfc51 fix fcntl 2001-09-17 13:21:10 +00:00
Hartmut Holzgraefe 311fe215aa fixed a warning regarding incompatible function pointer types 2001-09-17 13:02:26 +00:00
Daniel Beulshausen 3a386f8684 fix macro + nuke warning 2001-09-17 12:22:35 +00:00
30042dc883 ChangeLog update 2001-09-17 00:10:09 +00:00
4f6c17b4f5 NEWS update 2001-09-17 00:10:05 +00:00
Andy Sautins 16ef3439f4 Collection fix. getelem method now handles returning nulls
correctly and gives warning when accessing an index that does
not exist.
2001-09-16 21:53:58 +00:00
Sterling Hughes 97fea0931c Make rand thread safe when ZTS is defined. 2001-09-16 20:49:57 +00:00
Sterling Hughes 96763e8372 Hopefully fix compile warnings on win32 systems 2001-09-16 17:37:19 +00:00
Zeev Suraski f88c25b60e MFZE1 2001-09-16 16:48:38 +00:00
Andi Gutmans 11e733ce29 - Start giving the notes extension an indentation face lift but I got
- tried half way through :)
2001-09-16 16:23:58 +00:00
Sascha Schumann 7c161fe069 WS-fix and directly use ap_psprintf instead of sprintf/ap_pstrdup 2001-09-16 16:03:49 +00:00
Thies C. Arntzen 9938137725 fixed memory_peak resetting 2001-09-16 15:45:25 +00:00
Hartmut Holzgraefe 639a36a3dd compiles without warnings now 2001-09-16 15:18:03 +00:00
Sterling Hughes 47f3851a00 for the daft folks that think 0 is a good seed. 2001-09-16 03:50:04 +00:00
Sterling Hughes 373fc12bb1 @ Make the seed options to srand() and mt_srand() optional, if the seed is
@ not specified, the generate the most random seed possible. (Sterling)

Please, if anyone has any comments on the way I generate this seed, speak up!
This seems to be the most "random" seed I could come up with...

This commit is 100% backwards compatible :)

Add myself to the authors list cause of recent work on the file
2001-09-16 03:46:59 +00:00
d477d490b2 ChangeLog update 2001-09-16 00:10:12 +00:00
8828af0bd5 NEWS update 2001-09-16 00:10:09 +00:00
Sterling Hughes ca5fdbf537 fix this in a couple of other places and use estrndup() when we have the
string length.
2001-09-15 16:05:38 +00:00
Sterling Hughes 236bcdb514 properly grab field and value pairs, plus avoid a segfault when errmsg isn't
defined
2001-09-15 16:00:47 +00:00
Sergey Kartashoff 55d84825c1 A bug fixed when trying to return NULL strings.
Added a new example of building search frontend based on mnoGoSearch
extension.
@- A bug fixed when tryint to return NULL strings.
@  Added a new example of building search frontend based on mnoGoSearch
@  extension.
2001-09-15 12:20:37 +00:00
Rui Hirokawa 9c5580c7d4 Added support for japanese encoding to htmlentites() and htmlspecialchars(). @ Added support for japanese encoding to htmlentites() and htmlspecialchars(). (Rui) 2001-09-15 04:48:48 +00:00
7c6b7baac9 ChangeLog update 2001-09-15 00:09:56 +00:00
7343b4da7a ChangeLog update 2001-09-14 00:09:58 +00:00
Hartmut Holzgraefe c403d6846b more data types supported (and warn if unsupported encountered) 2001-09-13 19:52:57 +00:00
Thies C. Arntzen e929389eeb fix strtr() when called with two parameters. this has been broken for some time!
guys, when "optimizing" functions you _shoudl_ write a testcase for the
working function and make _sure_ that it works afterwards!
2001-09-13 10:48:41 +00:00
567f6c7a27 ChangeLog update 2001-09-13 00:11:26 +00:00
Hartmut Holzgraefe d4bee942d6 be more flexible in finding a db++ installation 2001-09-12 19:54:46 +00:00
foobar 5275b60398 Enable chroot() only if SAPI is CGI. 2001-09-12 02:07:46 +00:00
8d88df3437 ChangeLog update 2001-09-12 00:09:59 +00:00
Andy Sautins 6e4e8e94d9 oops. Used C++ style comments. Make C style 2001-09-11 23:16:32 +00:00
Andy Sautins 5abba5ee0e Collection fix. Fix core dump when accessing an element that is
not in the collection.
2001-09-11 23:15:18 +00:00
Andy Sautins 23fea6461d Handle assign/append of NULL values to collections correctly. Now
works consistently with how the rest of the library operates.  If
the value passed in is a null string, the value is set to null
2001-09-11 21:03:58 +00:00
Sascha Schumann 919e7e9f69 revert last commit. Guys, discuss such things first, then commit. Mkay? 2001-09-11 10:16:01 +00:00
Sterling Hughes e302d6a5e8 Add an API function for setting the session id from a session module...
# The SRM folks wanted/needed this
2001-09-11 10:13:44 +00:00
Sascha Schumann fdd6f08aec Always return something from non-void function 2001-09-11 08:55:44 +00:00
Sascha Schumann 4c69a970d3 Remove some unused variables 2001-09-11 07:52:55 +00:00
Sascha Schumann f037e5b2da Similar to autoconf-2.5x, say who is doing what. 2001-09-11 07:50:53 +00:00
Sascha Schumann a7d71f9708 Ignore "AC_PROG_LEX invoked multiple times" 2001-09-11 07:47:31 +00:00
Sascha Schumann b14cb5c3ff Remove obselete message and drop "divert(6)" which caused
problems with autoconf 2.5x.
2001-09-11 07:30:45 +00:00
Egon Schmid 88713e4d8d Fixed some protos. Haven't read the source code, so some protos could be wrong. bool notext=true looks very strange to me. 2001-09-11 01:03:59 +00:00
Wez Furlong 671b46a0db Revise the xxx_export api so that exporting to files is comfortable. 2001-09-11 00:33:25 +00:00
e8f195c427 ChangeLog update 2001-09-11 00:10:19 +00:00
Wez Furlong 0f835fdf28 Arrrgghh!
Fix munched file.
# Dunno how that happened.
2001-09-11 00:03:58 +00:00
Wez Furlong 3b8f3cc439 Added some preliminary x509 cert and csr creation/signing functions.
Also, some problems with CGI initialization should be eliminated.
Renamed some pkey functions to be more consistent.
# Added aliases for older names; not sure if we should keep those.
2001-09-10 23:57:10 +00:00
foobar 8f9813031e fix build. 2001-09-10 23:34:42 +00:00
Daniel Beulshausen 1f9629d466 fix resource destruction 2001-09-10 19:28:50 +00:00
Sascha Schumann 2547f86060 Use $(LINK) for libraries, but $(LINK_CLEAN) for creating programs.
Also pass only $(CFLAGS_CLEAN) into thttpd's Makefile.
2001-09-10 17:15:03 +00:00
Derick Rethans a4f9a16225 - Fix for bug #13230 2001-09-10 17:14:38 +00:00
Sascha Schumann 2ee197b4c6 Fix a problem when withval pointed to a symlink and automatic
detection for the java libraries failed
2001-09-10 16:59:31 +00:00
Daniel Beulshausen 87d7284e46 don't forget TSRMLS_CC when using zend_parse_parameters 2001-09-10 14:30:10 +00:00
Daniel Beulshausen d504c7ca4f let apache2 filter build under win32 2001-09-10 13:04:24 +00:00
Sascha Schumann 2bbbec107b A round of "d'ohs" for me, please.
We must not stop scanning after finding a "?", because we
need the information regarding the "#".
2001-09-10 11:22:43 +00:00
Sascha Schumann d5e22e2a29 Use proper macro to return string with unknown length 2001-09-10 11:06:15 +00:00
Harald Radi 21b9a2ca2a removed ->is_ref check, doesn't make sense and causes bugs 2001-09-10 09:25:32 +00:00
Harald Radi d1a2dbfd9d IDispatchs got released if they were passed to another component 2001-09-10 09:22:40 +00:00
Stig Bakken 3b52256bd1 .cvsignore 2001-09-10 08:02:38 +00:00
Stig Bakken 4d90ca0aea * build fix 2001-09-10 07:56:23 +00:00
Sterling Hughes 2e890a36d4 Revert, this is max error size, not strlen(error) 2001-09-10 00:25:59 +00:00
Sterling Hughes 5830ffeb48 RETURN_STRING -> RETURN_STRINGL 2001-09-10 00:24:29 +00:00
7a03473347 ChangeLog update 2001-09-10 00:10:25 +00:00
Zeev Suraski 9f61e47c24 MFZE1 (nuke cplusplus code) 2001-09-10 00:08:24 +00:00
Zeev Suraski b06440bceb MFZE1 (support return value in execute_scripts) 2001-09-10 00:07:32 +00:00
Zeev Suraski 517bd3018c Do some justice to the doc team 2001-09-09 23:37:55 +00:00
Sascha Schumann de963ce9c6 Better fix for mark problem 2001-09-09 14:52:39 +00:00
Sascha Schumann c86c9f52b4 Fix mark-handling 2001-09-09 14:38:12 +00:00
Derick Rethans 78747bd2df - Don't wrap lines... this is annoying while coding. 2001-09-09 13:29:31 +00:00
Derick Rethans 61d4f7fe65 - Really fix nl2br now... it's actaulyl faster now 2001-09-09 12:55:48 +00:00
Derick Rethans 176cd90bd7 - Fix for bug 11904
#- This is possibly not the best solution... feel free to improve
2001-09-09 11:42:36 +00:00
Sterling Hughes ff2bc83c08 remove ARG_COUNT(ht)
# Is there any reason that the set_compare_func call is passed SORT_STRING
# instead of SORT_REGULAR??
2001-09-09 11:03:31 +00:00
Sterling Hughes 6963ac4050 export the mt rand functions... 2001-09-09 10:44:12 +00:00
Derick Rethans eede70a84f - Removed duplicate FETCH() 2001-09-09 10:42:52 +00:00
Sterling Hughes 71dca8c23e add DOMXML news 2001-09-09 10:06:31 +00:00
Sterling Hughes b5d77099fe have this go through php's error warning system 2001-09-09 09:58:49 +00:00
Sterling Hughes 6ee9f04f87 ws fix, MFB 2001-09-09 09:51:02 +00:00
Sterling Hughes 645a98ef99 Change DOM-XML's error reporting to E_WARNING which is more appropriate 2001-09-09 09:41:40 +00:00
fd07b94b0f ChangeLog update 2001-09-09 00:11:33 +00:00
Harald Radi 9a6fe9631e com_*() functions returned an oo-resource instead of an resource id,
thus subsequent com_*() calls to com-returnvalues failed.
2001-09-08 20:40:56 +00:00
André Langhorst d4b86e1c5b fix curl build for curl >= 7.8 2001-09-08 16:51:00 +00:00
Stig S. Bakken d07cfabce4 remove bogus comment :) 2001-09-08 11:17:25 +00:00
Stig S. Bakken b07b4c6029 RFC document for namespaces 2001-09-08 11:02:06 +00:00
Stig S. Bakken 4585ae9fb1 wrapped to 80 columns :) 2001-09-08 08:55:42 +00:00
Sterling Hughes 1c3b3ad8f3 tense, tense, tense 2001-09-08 00:42:25 +00:00
Sterling Hughes bdb4cb5271 I'll stop annoying the list if this doesn't shed light :) 2001-09-08 00:11:12 +00:00
1ab4c740b5 ChangeLog update 2001-09-08 00:10:12 +00:00
Sterling Hughes 186605c62f Doesn't fix the subject problem, but debugging 2001-09-08 00:09:00 +00:00
Sterling Hughes bbe7050e71 revert (I'll fix the subject stuff in a second) 2001-09-07 23:57:38 +00:00
Sterling Hughes c41913db4d testing 2001-09-07 23:56:19 +00:00
Wez Furlong 3ed4cc33ac API update: use zend_parse_parameters 2001-09-07 17:09:56 +00:00
Andi Gutmans d7536a8a5f - Shift around the variable parsing code to make it simpler. 2001-09-07 14:46:12 +00:00
Daniel Beulshausen 2da75a405f build fixes 2001-09-07 13:53:28 +00:00
Daniel Beulshausen a0acfe4375 fix def. 2001-09-07 13:35:32 +00:00
Daniel Beulshausen 0a543a9014 don't use ifx_free_result here 2001-09-07 13:29:50 +00:00
Daniel Beulshausen da0c69d7b9 fix result freeing
# some of the work in (zif_)ifx_free_result should
# probably be done in the list destructor as well
2001-09-07 13:20:33 +00:00
Wez Furlong 5569abe1ee Fix for bug #13190 2001-09-07 12:12:19 +00:00
Sterling Hughes 92390db7e6 MFB 2001-09-07 11:39:00 +00:00
Daniel Beulshausen ff5e95b9e3 fix zts build 2001-09-07 11:20:13 +00:00
Sterling Hughes a5828bbfa9 add a news entry 2001-09-07 10:33:04 +00:00
Sterling Hughes b8cf53d8a5 get rid of global mess 2001-09-07 10:29:06 +00:00
Sterling Hughes 1bc80e6048 register a list destructor 2001-09-07 10:25:26 +00:00
Derick Rethans 2e153ddae1 - Fix for bug #13052 2001-09-07 07:31:39 +00:00
Andi Gutmans fc1abec531 - Fix warning (was fixed in ZE1 and not merged at some point). Please make
sure you merge patches!
2001-09-07 06:40:03 +00:00
foobar 8d8e26577d Cleanup. 2001-09-07 00:58:23 +00:00
foobar c8751fc8a5 Almost missed this one.. 2001-09-07 00:25:11 +00:00
foobar e4df7dc7bf if test -f /usr/local/lib/libexample.s?; then <-- no workie
if test -f /usr/local/lib/libexample.so; then   <-- workie
#
# You can all point at me and laugh now..  :(
#
2001-09-07 00:24:06 +00:00
f6dfcb5641 ChangeLog update 2001-09-07 00:10:54 +00:00
Rasmus Lerdorf afa9e65ff4 Damn, went to head instead of the branch - revert 2001-09-06 23:35:39 +00:00
Rasmus Lerdorf 6a2d84ba06 Oops, forgot to add sapi_apache.c to the apache_hooks branch 2001-09-06 23:32:59 +00:00
foobar 3c64473b71 Fixed bug: #13172 2001-09-06 23:10:37 +00:00
Sterling Hughes 198e6f3ea7 no need to cast a 'HashTable *' to 'HashTable *' 2001-09-06 22:51:47 +00:00
foobar 14152e7ca6 Introduce the good practise of using [] around output messages. 2001-09-06 21:05:57 +00:00
foobar acb7d69ff7 Always quote the messages. 2001-09-06 20:55:24 +00:00
foobar 95ff1ab10f Hope this reduces the amount of bogus bug reports when people use wrong paths.. 2001-09-06 18:13:49 +00:00
Frank M. Kromann 059f1cc922 Fixing spelling 2001-09-06 16:49:17 +00:00
Andrei Zmievski 12eef9d6d6 Clean-up NEWS. 2001-09-06 14:03:59 +00:00
Dan Libby 79e6063a5e fix various build errors. default to no xmlrpc 2001-09-06 09:36:58 +00:00
Sterling Hughes 25d4500a86 I should really learn how to spell 2001-09-06 08:56:24 +00:00
Sterling Hughes b7ba9e007d avoid lowercasing the string 2001-09-06 08:54:54 +00:00
Sterling Hughes 33fc6e2d5f add missing ) 2001-09-06 07:33:45 +00:00
Sebastian Bergmann 4bfa51ad89 Fix Win32 build. 2001-09-06 07:00:39 +00:00
Sterling Hughes 8a156d9a39 fix ms compile warnings 2001-09-06 06:41:16 +00:00
Dan Libby 6883b92116 adding xmlrpc extension, per Stig's request 2001-09-06 04:13:30 +00:00
Sterling Hughes 903c831be5 spaces -> tabs work cont. 2001-09-06 00:40:02 +00:00
Sterling Hughes a4c905ff16 ws fix 2001-09-06 00:18:13 +00:00
4f10dd7985 ChangeLog update 2001-09-06 00:10:56 +00:00
167ea5e6e6 NEWS update 2001-09-06 00:10:53 +00:00
Sterling Hughes a1b11f0755 Fix ts build
# I've gotta start compiling --enable-experimental-zts...  anyway we can make
# this the default when compiling from cvs?  It'll help a large portion of
# compile issues with patches
2001-09-05 21:46:44 +00:00
Sterling Hughes e121eaaef5 Straight out da bronx, I be using zend_parse_parameters()
# Word out to my peeps on Connor st.
2001-09-05 21:38:49 +00:00
Sterling Hughes 5ec58914fe stray tabs and spaces 2001-09-05 21:04:30 +00:00
Sterling Hughes f0c5631778 change range macro semantics
# Kinda torn between the two, thoughts?
2001-09-05 20:59:24 +00:00
Sterling Hughes d930a72cd7 remove inline 2001-09-05 20:56:15 +00:00
Sterling Hughes 1b0f00d67f a bit of api cleanup... move range stuff into a macro (properly :) 2001-09-05 20:52:45 +00:00
foobar 3a044786f8 revert bad commit 2001-09-05 19:48:28 +00:00
foobar 42b5521af5 revert bad commit. 2001-09-05 19:47:55 +00:00
Dan Kalowsky 24b54b866f Patch to stop the crashing behavior exhibited by PHP/ODBC in SOLID/DB2
submitted by Walter Franzini (walter@sys-net.it)
@Fix for LONG_VARCHAR type crashing submitted by Walter Franzini (walter@sys-net.it)
#Should this also be put into the 4.0.7 RC cycle?
2001-09-05 16:19:48 +00:00
Rasmus Lerdorf dbc9a93fba Interbase changes should get a NEWS entry 2001-09-05 15:41:08 +00:00
Jason Greene 54905782b6 Prevent incorrect warning message from occuring on an EOF of socket_read. 2001-09-05 15:30:34 +00:00
Andrei Zmievski 91606e5264 Fix. 2001-09-05 14:43:49 +00:00
foobar 032b263129 Fixes commit / link problems with certain compilers.
# Please use PHP_CHECK_LIBRARY() always instead of AC_CHECK_LIB
# if you need to pass extra libs/libpaths to the test.
2001-09-05 13:18:09 +00:00
Stanislav Malyshev d082fb373d MFZE1 2001-09-05 09:29:28 +00:00
Sterling Hughes b9edf7c17c API Update 2001-09-05 06:55:37 +00:00
foobar b54ce06e96 Removed unused lines. 2001-09-05 01:03:50 +00:00
fe0bfa6dbb ChangeLog update 2001-09-05 00:11:04 +00:00
472a5b029c ChangeLog update 2001-09-05 00:11:03 +00:00
Jason Greene 9fe46a52d4 Much better fix for non forte compilers on Solaris.
Removed pragma hack.
Renamed socket struct to bsd_socket.
2001-09-04 22:27:30 +00:00
Frank M. Kromann a219643b2b Adding function to set transaction locking and isolation. 2001-09-04 21:51:11 +00:00
Rasmus Lerdorf 9a5fdae381 ok, hand-patched this one in 2001-09-04 21:50:27 +00:00
Rasmus Lerdorf 7101179c8d Interbase extension fixes by Jeremy Bettis
(.dsp patch looked funky, but these ones look ok)
2001-09-04 21:47:05 +00:00
Egon Schmid 8820474d4a Fixed some protos. 2001-09-04 21:46:27 +00:00
Egon Schmid e7e88a25d1 Fixed some protos. 2001-09-04 21:07:17 +00:00
Egon Schmid 03fbbb098c Fixed some protos. 2001-09-04 10:44:28 +00:00
Sterling Hughes 38cacba117 Thanks sebastian
# I really like this whole qa team thingy
2001-09-04 10:13:55 +00:00
Sterling Hughes 536c96969b update php_trim as well... 2001-09-04 09:35:53 +00:00
Sterling Hughes c661449ebf fix crash bug 2001-09-04 09:33:30 +00:00
Andi Gutmans 17765221df - Fix namespace collisions. 2001-09-04 07:41:20 +00:00
Sterling Hughes 0935217091 fix proto 2001-09-04 06:21:48 +00:00
Sterling Hughes e55315a375 tabs -> spaces 2001-09-04 06:20:23 +00:00
Sterling Hughes fe03f6f4c2 Begin cleanup, api wise... 2001-09-04 06:18:11 +00:00
Sterling Hughes 3151916113 pval -> zval 2001-09-04 06:08:42 +00:00
Stig Bakken f12896d23b * hopefully the only changes required for the initials->user rename 2001-09-04 03:34:59 +00:00
Stig Bakken 04439c305b * rename "initials" to "user" for clarity 2001-09-04 03:23:56 +00:00
Daniel Beulshausen 83df136d28 update workspaces 2001-09-04 02:20:49 +00:00
Daniel Beulshausen 9b8886410d fix zts+win32 build 2001-09-04 02:19:30 +00:00
8d07a0178f ChangeLog update 2001-09-04 00:10:39 +00:00
Sterling Hughes dda004bcfb - update to php4 api
- expand case statements, ie:

case 1: case 2: case 3:

to

case 1:
case 2:
case 3:

- Remove un-necessary brackets and parentheses (only when it takes away from
readability, I know this is quite arbitrary, but I did my best :)
2001-09-03 23:30:33 +00:00
Sterling Hughes 55b600d03c fix compile on sun forte cc 2001-09-03 21:54:27 +00:00
Andi Gutmans 1ecd31b66c - Fix thread safe mode.
- Please don't use Java style function braces.
2001-09-03 20:21:00 +00:00
Rasmus Lerdorf 00ef03186e This is a list of char *'s, not zvals (caught by Nick - see bug #13107) 2001-09-03 18:58:00 +00:00
Derick Rethans 383691eec2 - Fix broken build
#- Please test before commit!
2001-09-03 17:38:10 +00:00
Andi Gutmans 7c4a0cc6cf - CLS_CC -> TSRMLS_CC 2001-09-03 16:57:49 +00:00
Stanislav Malyshev 0a143cf655 Add _php_math_zvaltobase and _php_math_basetozval
This allows to use bindec, etc. functions to convert numbers longer
than fits in long, using floats instead.
Note: the functions like decbin still don't use the zval-ed functions,
so they work only on longs yet.
2001-09-03 16:26:31 +00:00
Jeroen van Wolffelaar dc8386e30d Removed outdated comment until I've got a better one 2001-09-03 12:01:50 +00:00
Jeroen van Wolffelaar efb83df9f9 Kill some warnings/errors (reported by Sebastian, more to come, but
could take some time. Update of ZTS-builderrors is welcome)
2001-09-03 11:57:15 +00:00
Sterling Hughes 79c27f0cd2 should be this 2001-09-03 08:47:45 +00:00
Sterling Hughes b417b96fb8 - Update to the PHP4 API (newer macros)
- Improve error reporting from split()
- Some minor speed improvements
2001-09-03 08:44:02 +00:00
Sterling Hughes f6d73d73fb stray tabs 2001-09-03 06:10:45 +00:00
Sterling Hughes f14ada19ac cleanup sscanf() just a tiny bit, just so it looks like the rest of the code
in the string.c file.
2001-09-03 04:49:36 +00:00
foobar e46decaa32 First step for chunkifying the HTTP uploads. 2001-09-03 02:31:56 +00:00
Jeroen van Wolffelaar 0cb6a31906 Fix array_rand and array_suffle to use php_rand correctly 2001-09-03 01:54:04 +00:00
Jeroen van Wolffelaar b0300e26df Fix prototype 2001-09-03 01:46:03 +00:00
Jeroen van Wolffelaar bf81c36cb3 Added RAND_REDESIGN change to NEWS (could be more elaborate, but IMHO
that should be in the manual?)
2001-09-03 01:40:06 +00:00
Jeroen van Wolffelaar 72c7ae080b Fix SIGSEGV because HAS_SRAND didn't check wether the entry existed at
all
2001-09-03 01:25:24 +00:00
Jeroen van Wolffelaar 1a68fe49cb Add forgotten files to MAIN 2001-09-03 01:10:29 +00:00
Jeroen van Wolffelaar 92f1248a49 Update credits 2001-09-03 01:09:35 +00:00
Jeroen van Wolffelaar f7306ce010 Merge RAND_REDESIGN into MAIN 2001-09-03 01:06:23 +00:00
d4197ea703 ChangeLog update 2001-09-03 00:10:58 +00:00
Jesus M. Castagnetto 22dc6f2a3b s/fileList/filelist/ 2001-09-02 00:11:44 +00:00
d44ee0670f ChangeLog update 2001-09-02 00:10:26 +00:00
Jesus M. Castagnetto 2f9b7b8737 Changed element and attribute names to lowercase to match the changes
in the package.xml files
2001-09-02 00:09:52 +00:00
Sascha Schumann c52b0e935c . 2001-09-01 17:23:17 +00:00
Zeev Suraski 9e8a2e5ba9 Update API number 2001-09-01 14:55:29 +00:00
f8907afacc ChangeLog update 2001-09-01 00:12:54 +00:00
84e163a900 NEWS update 2001-09-01 00:12:51 +00:00
foobar e29994166a WS 2001-08-31 22:03:24 +00:00
Sterling Hughes c57ed1b93b spaces->tabs 2001-08-31 21:55:43 +00:00
Sterling Hughes 498f7fd90f MFZE1 2001-08-31 21:52:44 +00:00
Sterling Hughes 69c7346f0e MFZE1 2001-08-31 21:47:26 +00:00
Zeev Suraski f7e7b42d4b Restore session_adapt_url() 2001-08-31 20:03:09 +00:00
foobar cb386234ea fixed NEWS entry 2001-08-31 19:55:54 +00:00
Zeev Suraski b080ddb867 Cleanup and clarify 2001-08-31 19:26:12 +00:00
Zeev Suraski 642eab8b46 define_sid updates 2001-08-31 19:22:08 +00:00
Tomas V.V.Cox a95fb10461 renumber error lines 2001-08-31 19:21:02 +00:00
Tomas V.V.Cox 2567b428b2 fix for DB/tests/db_error2.phpt 2001-08-31 19:13:24 +00:00
Tomas V.V.Cox bf0ab08fb8 fix problem when mixing different error modes under certain circumstances
(pear/test/pear_error3.phpt)
2001-08-31 17:56:44 +00:00
Tomas V.V.Cox 409b87d41e make some tests to work. Still left the Notice of the deprecated use of
call_user_method, no way to shut it down.
2001-08-31 16:43:08 +00:00
Tomas V.V.Cox 4861c0cf99 Use _default_error_options as the options for PEAR_ERROR_CALLBACK.
Depreciate the use of _default_error_callback
2001-08-31 16:12:33 +00:00
Zeev Suraski 357dfd5f14 Support multiple chunked output buffering layers 2001-08-31 15:56:48 +00:00
Zeev Suraski b2b50ab525 Fix trans_sid handler registration logic 2001-08-31 15:22:10 +00:00
Zeev Suraski 5c1c22764a Fix double freeing 2001-08-31 15:16:15 +00:00
Zeev Suraski 6bba521dd3 API update 2001-08-31 14:34:40 +00:00
Tomas V.V.Cox cc747779ce fix userinfo msg in Pear_Error::toString() when callback mode is selected
and style
2001-08-31 13:27:46 +00:00
Zeev Suraski 819ea51d00 MFZE1 2001-08-31 13:11:52 +00:00
Andrei Zmievski 392e1edee8 @- Made in_array() and search_array() allow the needle to be an array in
@  itself. (Andrei)
2001-08-31 04:52:10 +00:00
217059fdc7 ChangeLog update 2001-08-31 00:11:32 +00:00
5595973ea9 NEWS update 2001-08-31 00:11:29 +00:00
Tomas V.V.Cox 567c10ba4c killed obscure bug in pushErrorHandling 2001-08-30 19:55:57 +00:00
Zeev Suraski 17209a7088 Try to fix TSRM.dsp 2001-08-30 18:06:30 +00:00
foobar d340c5b2bf @- Added ini_get_all() function which returns all registered ini entries
or the entries for the specified extension. (Jani)
2001-08-30 17:47:04 +00:00
Andi Gutmans 619702157b - Make it compile in thread-safe mode. 2001-08-30 17:27:43 +00:00
foobar 67b9fb4912 KISS. And the search order must be reversed always. Last one counts. 2001-08-30 16:29:36 +00:00
Sebastian Bergmann 452c41ec9e HEAD has been 4.0.8-dev for some time now, so name it accordingly. 2001-08-30 15:33:43 +00:00
Andi Gutmans 560606d210 - Get rid of warning and C++ comments 2001-08-30 15:31:35 +00:00
Tomas V.V.Cox 0fdc143d9e The "actual" mode must be taken, not the error object mode 2001-08-30 15:27:55 +00:00
Andi Gutmans 29f5dbe10b - Initial support for exceptions. 2001-08-30 15:26:30 +00:00
Zeev Suraski ab48027b3e Fix unclean shutdown value 2001-08-30 13:38:33 +00:00
Zeev Suraski 4684d5f405 MFZE1 2001-08-30 12:08:23 +00:00
828aed1f40 ChangeLog update 2001-08-30 00:10:37 +00:00
foobar 5dd2b6e2fd According to Zeev this code is just for showing how to create overloaded classes. 2001-08-29 23:53:22 +00:00
Joey Smith a4a1543753 Fix bug #13025. 2001-08-29 22:26:04 +00:00
foobar 08a521572f WS fixes and indenting. 2001-08-29 16:00:30 +00:00
Andrei Zmievski 942f34e126 Fix changelog. 2001-08-29 13:38:08 +00:00
Wez Furlong efdc50c175 fix build 2001-08-29 13:13:24 +00:00
Wez Furlong e6c7f6f22c fix bug# 13017 - patch from tsukada@fminn.nagano.nagano.jp 2001-08-29 11:29:52 +00:00
f824bf94f3 ChangeLog update 2001-08-29 00:10:38 +00:00
43baccbf05 NEWS update 2001-08-29 00:10:33 +00:00
64c7c88af0 ChangeLog update 2001-08-29 00:10:21 +00:00
Wez Furlong b9c4dc4a05 @- Added mailparse_uudecode_all() which extracts all uuencoded attachments
(Wez)
2001-08-28 21:52:11 +00:00
Rasmus Lerdorf 563ffb8984 Kill a warning 2001-08-28 21:50:37 +00:00
Wez Furlong 1164abcdab fix uudecode 2001-08-28 21:50:29 +00:00
Wez Furlong 9a8c9439e8 fix cp1252 -> wchar conversion 2001-08-28 18:26:46 +00:00
Tomas V.V.Cox 176bf835e4 added the Mail/mime.php file 2001-08-28 13:39:50 +00:00
Stig Bakken b3745665dd * tidy up "make install" output 2001-08-28 13:07:33 +00:00
Stig Bakken 821ea15431 * Archive_Tar is no longer experimental 2001-08-28 12:26:47 +00:00
Stig Bakken 43c2025ac2 * output brief usage when called without params 2001-08-28 12:15:01 +00:00
Stig Bakken c93ec77f15 * Log/Observer.php rename fix 2001-08-28 12:11:32 +00:00
Stig Bakken 36c27603b1 * started work on php file support 2001-08-28 11:18:08 +00:00
Zeev Suraski b392fe4497 MFZE1 2001-08-28 09:23:22 +00:00
Stig Bakken f7fcf3a701 * fold case when parsing package.xml 2001-08-28 08:52:03 +00:00
Doug MacEachern 23f1b515a6 add php version component 2001-08-28 06:23:27 +00:00
Doug MacEachern c614a9ed3d not all MPMs support child_init,
so move php_apache_server_startup to the post_config phase
(happens at server startup)
2001-08-28 06:19:58 +00:00
1424e42326 ChangeLog update 2001-08-28 00:10:11 +00:00
foobar 6cc6e1e668 Coding style. 2001-08-27 22:26:49 +00:00
Stig Bakken 2ccffc5600 * fixes to make package.xml parsing case insensitive 2001-08-27 21:25:16 +00:00
Stig Bakken 5cd46bb2e0 * typo 2001-08-27 20:37:06 +00:00
Stig Bakken fb610787ff * add the directory where php.exe was found to PATH to help Windows
find its DLLs
2001-08-27 20:29:33 +00:00
Stig Bakken d1d848c171 * Windows fix 2001-08-27 20:17:36 +00:00
Chuck Hagenbuch 1c6bfcaa33 shorter protos 2001-08-27 20:05:11 +00:00
Andi Gutmans 0378e545a0 - Add sample RFC 2001-08-27 18:43:20 +00:00
Chuck Hagenbuch 0aca825435 add ngettext() support from Walter Franzini <walter@sys-net.it>, and use Z_*
macros.
2001-08-27 18:43:07 +00:00
Andrei Zmievski 30562acbb2 Moved to 4.0.7. 2001-08-27 16:53:39 +00:00
Stig Bakken 2186ced3a6 * MTH (merge _to_ head) 2001-08-27 16:39:49 +00:00
Zeev Suraski d7149ba8fc Cleanup 2001-08-27 02:06:32 +00:00
Zeev Suraski b781720b36 More fixes and refinements 2001-08-27 00:23:55 +00:00
151c872bc9 ChangeLog update 2001-08-27 00:10:55 +00:00
Stanislav Malyshev 2a0a07b883 Add dlsym underscore detection, by Jani Taskinen 2001-08-26 15:25:55 +00:00
Andi Gutmans b0970f1421 - MFZE1 2001-08-26 15:16:06 +00:00
Andi Gutmans e2efa0196f - Merge Andrei's fix from Engine 1. Please commit patches to both trees! 2001-08-26 15:14:45 +00:00
Hartmut Holzgraefe 05af99cd35 whitespace 2001-08-26 14:26:36 +00:00
Hartmut Holzgraefe 739716883b removed dbplus_change function
moved db++ specific includes to .c files
2001-08-26 14:25:48 +00:00
Hartmut Holzgraefe 521084f661 implementation of missing functionality
implementation and build improvements
2001-08-26 14:24:34 +00:00
Hartmut Holzgraefe b693782c36 removed as all functions from the perl interface have now been implemented 2001-08-26 14:20:51 +00:00
Hartmut Holzgraefe c7b55925a1 added symbolic constatns for error codes
removed dbplus_change function
some build improvements
2001-08-26 14:19:47 +00:00
Hartmut Holzgraefe b073c312b3 added -lm to LIBS, whitespae 2001-08-26 14:15:39 +00:00
Hartmut Holzgraefe 57d971d2ef whitespace 2001-08-26 14:12:27 +00:00
Zeev Suraski d697a558ac Fix my session updates.
trans_sid handling will no longer slow down performance unless a session
is actually in use.
2001-08-26 11:49:43 +00:00
Joey Smith 5d451c9885 Fix 1st case of #9893. 2nd case was already fixed in previous commit. 2001-08-26 11:36:27 +00:00
Zeev Suraski dc9769ea96 Fix trans-sid.
Still need to figure out how to turn trans-sid only when sessions
are actually used.
2001-08-26 11:14:35 +00:00
Rasmus Lerdorf 70c581b820 Test your changes please Jani 2001-08-26 01:10:10 +00:00
Zeev Suraski 7b73aee40f Make the session module more independent 2001-08-26 01:09:20 +00:00
41562f6ca2 ChangeLog update 2001-08-26 00:10:09 +00:00
Zeev Suraski d5e5e376ab This option is no longer needed 2001-08-25 16:19:57 +00:00
Zeev Suraski b8763a6f8c Get rid of TRANS_SID - it's always possible to use it now. 2001-08-25 16:09:23 +00:00
Zeev Suraski 13ff183225 Move the trans-sid mechanism to use the output buffering mechanism.
Advantages:
- Would work with the output buffering mechanism in general, and with
  output compression in particular
- Should yield better performance (untested as of yet)
2001-08-25 15:57:42 +00:00
Zeev Suraski bc596544a1 add struct name 2001-08-25 12:47:12 +00:00
Wez Furlong 2121989d4d This test needed a newline after an echo.
# However, the test still fails on my system
2001-08-25 09:23:10 +00:00
Wez Furlong cda7f49324 Windows-1252 encoding awareness 2001-08-25 09:21:43 +00:00
Wez Furlong 08073a5c60 TSRMLS fix 2001-08-25 09:20:18 +00:00
Jeroen van Wolffelaar 820d28affe Add random number generator-entry to INI-files 2001-08-25 00:11:03 +00:00
e2d51050ea ChangeLog update 2001-08-25 00:11:00 +00:00
ef9fc2e66a NEWS update 2001-08-25 00:10:57 +00:00
foobar f03a871d93 Fixed bug: #12948, #12945 2001-08-24 20:05:58 +00:00
Wez Furlong 61c62cf854 Ahem. 2001-08-24 09:03:50 +00:00
Wez Furlong 6738cda17c update news 2001-08-24 09:01:41 +00:00
Wez Furlong 9e7da02d3b Fix htmlspecialchars problem. 2001-08-24 08:58:10 +00:00
Andrei Zmievski cae9763d0a @- Fixed a crash bug in array_map() if the input arrays had string or
@  non-sequential keys. Also modified it so that if a single array is passed,
@  its keys are preserved in the resulting array. (Andrei)
2001-08-24 02:58:23 +00:00
Sterling Hughes 36412eb5de proto fix 2001-08-24 02:24:03 +00:00
John Donagher faa5031f25 Don't try and search a 0-length string. This allows parse_url() to correctly
parse a non-pathed URI, i.e. 'scheme://'
2001-08-24 02:21:16 +00:00
Sterling Hughes bd4eb1bf78 noet 2001-08-24 01:23:14 +00:00
Sterling Hughes 580d41b3af Break the entire PHP build
# just kidding, noet work :)
2001-08-24 01:21:14 +00:00
Sterling Hughes dd094d1866 noet 2001-08-24 01:12:37 +00:00
Sterling Hughes ca5eb34608 New extensions should put this in by default 2001-08-24 01:09:10 +00:00
8a4da944ba ChangeLog update 2001-08-24 00:10:36 +00:00
Sterling Hughes 398b65ed2f noet 2001-08-23 21:56:29 +00:00
Sterling Hughes 0fabddb745 some cleanup 2001-08-23 21:22:38 +00:00
Zeev Suraski 55c5c68769 whitespace 2001-08-23 14:24:13 +00:00
Wez Furlong f20e9fa298 - Add support for chinese encodings to htmlentities/htmlspecialchars
(patch from Alan Knowles <alan_k@hklc.com>)
2001-08-23 10:43:15 +00:00
Stanislav Malyshev d3ceaeb4e8 Add TODO for DLSYM_NEEDS_UNDRESCORE 2001-08-23 09:18:21 +00:00
a97b1e2341 ChangeLog update 2001-08-23 00:10:41 +00:00
Jeroen van Wolffelaar 3e62bd0867 Reverted the patch to main branch - should have branched whole
ext/standard...
2001-08-22 22:14:08 +00:00
Jeroen van Wolffelaar 43c2bc364f Commit forgotten fix in crypt.c, oversight of a BC-problem 2001-08-22 22:11:57 +00:00
foobar 8ade27507a killed a compile warning. 2001-08-22 17:39:16 +00:00
foobar 146dffb930 Added missing entry.. 2001-08-22 15:12:50 +00:00
foobar a3b9652564 This is not needed anymore. 2001-08-22 10:26:02 +00:00
foobar 93311d9301 Fixed two problems:
- CGI_BINARY was defined always thus this extension
  could be compiled with even when not building CGI binary.

- HAVE_READLINE => HAVE_LIBREADLINE (typo)
2001-08-22 10:25:24 +00:00
foobar 1f30f907b9 More compile warnings nuked. 2001-08-22 09:20:40 +00:00
foobar b78f77575b indent. 2001-08-22 08:43:52 +00:00
foobar 5296d29b59 Killed a compile warning. 2001-08-22 08:34:04 +00:00
Gavin Sherry bd4150ed80 Fixed buffer overflow issue. 2001-08-22 05:47:11 +00:00
Sterling Hughes 766de15694 Add some editor modes (in the rest of the source) 2001-08-22 04:45:51 +00:00
Gavin Sherry ff7a694e0f Changed php_strip_tags() to check if <? was XML code. 2001-08-22 02:03:14 +00:00
30dc0813cb ChangeLog update 2001-08-22 00:10:24 +00:00
Stig Bakken 3b4f80a035 * added two missing end folds 2001-08-22 00:09:27 +00:00
Joey Smith 1c10503029 Hmmm...not sure what this was trying to do. stat() was acting like filesize(). 2001-08-21 23:58:19 +00:00
Joey Smith f0ea3478cb Some changes to help out previous users of domxml...
node::tagname == node::name.
Add property "type" to textnode types.
2001-08-21 21:49:32 +00:00
Sterling Hughes f9d913537b Fix typo 2001-08-21 17:58:37 +00:00
Ulf Wendel 1ffed2e53f Added two new functions:
int pdf_get_minorversion()
  int pdf_get_majorversion()

Both functions are taken from the C-Library. You should be able to determine
the API version of the extension/library using pdf_get_value() or
pdf_get_parameter() but these functions need a pdf object to work on. This
means that you have to create an pdf object before you can find out the
API version. Using pdf_get_minorversion() and pdf_get_majorversion() there's
no need for this.
2001-08-21 13:33:16 +00:00
Zeev Suraski e140b35b04 API update 2001-08-21 12:57:53 +00:00
Zeev Suraski 4757104e45 MFZE1 2001-08-21 12:29:12 +00:00
Sascha Schumann 95347cd868 Further work on autoconf-2.5x support 2001-08-21 11:45:33 +00:00
Sascha Schumann 9350a23b8f Move PHP_SUBSTs to configure.in. 2001-08-21 11:03:45 +00:00
Sascha Schumann 8ab1c2aa44 nuke some apparently harmful spaces 2001-08-21 11:02:42 +00:00
Sascha Schumann 66187ec2dc nuke whitespace 2001-08-21 11:00:22 +00:00
Daniel Beulshausen b017d9b01d add MDAC note 2001-08-21 10:55:46 +00:00
Sterling Hughes ee1eaf9fbb Update api and fix some compile warnings 2001-08-21 09:04:18 +00:00
Zeev Suraski bafecffb7c Fix Release_TSDbg configuration 2001-08-21 07:56:25 +00:00
d1f29d7bb1 ChangeLog update 2001-08-21 00:11:03 +00:00
Jeroen van Wolffelaar d14b3a86cf Proto fix 2001-08-20 20:50:54 +00:00
Doug MacEachern 9b137805c8 automatically add php input/output filters when give the standard 1.x config:
AddType application/x-httpd-php .php
with that, no longer need "Set{In,Out}putFilter PHP" configuration for 2.0
2001-08-20 16:34:45 +00:00
Sascha Schumann 01672af8f0 Improved fix 2001-08-20 15:27:45 +00:00
Stanislav Malyshev 902100a692 Fix long printing in smart_str_print_long 2001-08-20 15:26:10 +00:00
Zeev Suraski 9b3df86e8d MFZE1 2001-08-20 14:58:52 +00:00
Stanislav Malyshev 8fd65b9f16 test big numbers too 2001-08-20 14:15:05 +00:00
foobar abeb4bd2e5 Cleaning. And made the check for SSL support in SNMP to really work. 2001-08-20 14:04:48 +00:00
foobar 929424032e Keep crypt() working even if SNMP needs OpenSSL. 2001-08-20 14:04:21 +00:00
Harald Radi acf13f82c1 catch date conversion errors 2001-08-20 08:53:18 +00:00
Harald Radi 3d0ab1236f hum, wasn't $foo->bar 's property type OE_IS_METHOD ? 2001-08-20 08:52:49 +00:00
Sergey Kartashoff c9aa94fc6f # just an author's promary email change in headers 2001-08-20 08:31:30 +00:00
Shane Caraveo 01e5a18c4a non-ts compile work, add fastcgi module. 2001-08-20 05:01:39 +00:00
Shane Caraveo 108633e1ab Windows compilation of fast cgi now working. See windows.txt for info. 2001-08-20 05:00:05 +00:00
Dave Hayden 22aed399e7 Added flags for SWFDisplayItem_addAction
Added Ming RINIT function
Added error handler for reporting Ming errors in PHP environment
Added size arg to drawGlyph function
Added swfdisplayitem_addAction function
Added ming_useSWFVersion function for selecting SWF 4 compatibility
Added SWFBitmap object
Added hacky SWFInput object for loading data from file/network/process
2001-08-20 03:32:43 +00:00
Dave Hayden 91997ed31c changed version check to look for function Ming_useSWFVersion, indicating
Ming 0.2a
2001-08-20 03:24:14 +00:00
Dave Hayden e0f91d3c48 added function prototypes:
PHP_RINIT_FUNCTION(ming)
  PHP_FUNCTION(swfdisplayitem_addAction)
  PHP_FUNCTION(ming_useSWFVersion)
2001-08-20 03:23:26 +00:00
e28fc0f85e ChangeLog update 2001-08-20 00:10:24 +00:00
Shane Caraveo 7a3c7ef930 fix for non-TS compile 2001-08-19 22:23:24 +00:00
Shane Caraveo b87aa1f67b Fixes for non-TS compilation 2001-08-19 22:02:46 +00:00
Doug MacEachern 4829b93fb2 php_input_filter needs to ignore proxy requests
else it swallows POST data that needs to be sent to the downstream server
2001-08-19 21:07:50 +00:00
Sterling Hughes ba4a1f2df2 Pass on proxy requests (fix by Doug MacEachern <dougm@covalent.net>) 2001-08-19 20:28:36 +00:00
Stig Bakken adb79869df * ignore phptar 2001-08-19 18:46:55 +00:00
Andi Gutmans 718f323edc - Fix compile problem 2001-08-19 15:23:25 +00:00
Zeev Suraski 4340c57ece MFZE1 2001-08-19 13:39:06 +00:00
Tomas V.V.Cox 9037bedb9e The "pear package" command will try to open "./package.xml" if no more
params are given.
2001-08-19 12:53:01 +00:00
Tomas V.V.Cox df54bca0a0 better error hanlding 2001-08-19 12:37:51 +00:00
Tomas V.V.Cox cf70755a05 maintain original file perms 2001-08-19 12:30:24 +00:00
foobar fd4de85836 Added some missing information. 2001-08-19 06:39:13 +00:00
foobar e5bd800aeb Fixed bug: #11232. Now we require Fribidi 0.9.0.
# Better use the latest version for this one too since
# it seems to have stabilized and they made an internal
# rewrite for that one.
2001-08-19 06:37:05 +00:00
foobar 7e34d46573 ws fix. 2001-08-19 01:47:19 +00:00
Stig Bakken b96e13a99d Added "phptar" command as proof that the Archive_Tar class works.
# Great work, Vincent!
2001-08-19 00:34:08 +00:00
f25c5f09f0 ChangeLog update 2001-08-19 00:10:11 +00:00
foobar d7d89bcf68 ws 2001-08-19 00:05:06 +00:00
foobar c902ad74f0 null terminate the returned string in here too. 2001-08-18 23:43:04 +00:00
foobar 1ffbcc5ecf ws fix. 2001-08-18 23:07:10 +00:00
foobar a000bdd93e libxml 2.4.2 is required now. 2001-08-18 21:08:52 +00:00
foobar de7d47c3fd fixed NEWS. 2001-08-18 20:24:06 +00:00
Andi Gutmans d87fa22532 - Merge Sterling's patches from ZE1 2001-08-18 18:16:49 +00:00
foobar e74c4e0a45 Added a check for libdmalloc whether it works (is found..) or not.
# We should always test every library (when possible) before
# adding them..
2001-08-18 18:14:22 +00:00
Zeev Suraski d921a2a5ea Update NEWS 2001-08-18 17:00:01 +00:00
Zeev Suraski b8624e7e08 Fix bugs #7301, #6827 2001-08-18 16:56:34 +00:00
foobar d3aff0f6ee make this test work. 2001-08-18 16:47:02 +00:00
Tomas V.V.Cox a0bf4ac47d added support for the following tags in package.xml:
- <State> inside <Release> (package development state: 'alpha','beta','stable','snapshot')
- <Changelog> stores <Release> entries
- <Maintainers> stores multiple <Maintainer> entries
- <Role> inside <Maintainer> ('lead','developer','contributor','helper')
2001-08-18 14:40:25 +00:00
Sterling Hughes 807b49aa2f K&R format changes 2001-08-18 08:43:47 +00:00
Sterling Hughes 15b1e4ba9c Fix XtOffsetOf compile problems if someone has already defined it. 2001-08-18 02:08:29 +00:00
Sterling Hughes 244c9ff3c9 Fix warning (Doug MacEachern, dougm@covalent.net) 2001-08-18 01:59:38 +00:00
Sterling Hughes 353f84c190 # f*ck @!e333u49/&§&$T§$&("E""! expandtab, that's it, the default in my
# vimrc is not noet
2001-08-18 01:36:29 +00:00
Sterling Hughes 0e12954669 fix crash bug (Doug MacEachern, dougm@covalent.net) 2001-08-18 01:34:19 +00:00
25363e0744 ChangeLog update 2001-08-18 00:10:14 +00:00
Ryan Bloom 1543904d71 Fix a seg fault in PHP. If a child process is created in the server,
using apr_proc_create, it will seg fault, because PHP is using a NULL
child cleanup.  To fix this, we have to use the special cleanup function,
apr_pool_cleanup_null.

This also fixes a compiler warning in the ap_log_error call.
2001-08-17 22:25:13 +00:00
Andrei Zmievski ea315a2e70 MFZE1 2001-08-17 17:42:43 +00:00
Zeev Suraski b02df6f4ac MFZE1 2001-08-17 14:53:55 +00:00
Zeev Suraski c6202789a4 Update php.ini-recommended 2001-08-17 14:04:30 +00:00
Marc Boeren 48d6d5e531 whitespace, braces, coding style (Mc) 2001-08-17 13:56:29 +00:00
Andi Gutmans e245e33f1f - Use the same coding standards for pointers as the rest of PHP.
- For example, char ** foo should be char **foo
2001-08-17 13:00:46 +00:00
Marc Boeren 9a22911392 Added preliminary support framework for Oracle 8. (Mc)
Thies C. Arntzen will look into this to actually make it work,
as I don't have Oracle installed here. As I said, it is only a
framework for Oracle, and it will most likely crash if you
actually try to use the oracle functions before Thies (or
anyone else that wants to, of course) has had a chance to look
at it.
# The other databases will continue to work, of course :)
2001-08-17 12:54:24 +00:00
Sterling Hughes 03724a70e9 Z_*_P{0,2} macro work. 2001-08-17 09:10:49 +00:00
Sterling Hughes c53f80fb23 1) update to the ZEND_NUM_ARGS() and Z_*_P{0,2} macros
2) minor ws improvements, removing unecessary error checking logic, and
making the error messages a bit nicer looking
2001-08-17 09:08:03 +00:00
Sebastian Bergmann d311622203 Forgot to add DB.php. 2001-08-17 08:51:09 +00:00
foobar 12a74c513d These files do not exist anymore. 2001-08-17 08:47:43 +00:00
foobar 8f6394365c Look for iconv library also in $ICONV_DIR. 2001-08-17 08:33:49 +00:00
Harald Radi feff3512f4 fixed a buggy cast 2001-08-17 08:17:13 +00:00
Sterling Hughes 06aa7a4d19 Cleanup of var_dump() with correct macro's, k&r indent, and removal of a
pair of unnecessary { }
2001-08-17 07:50:15 +00:00
Sterling Hughes 844788a4b8 pval -> zval
Z_*_P{0,2} macros
easier way of doing urldecode(), from rawurldecode() (a tad faster too).
2001-08-17 07:41:20 +00:00
Sterling Hughes 591aba3c89 ws fix. 2001-08-17 07:07:34 +00:00
foobar 85255d9ee5 HAVE_LIBICONV was never defined. 2001-08-17 06:54:55 +00:00
Sterling Hughes 6bc04c0858 Clean up the function for the Zend API (php3, early php4 relics removed).
Use PF_INET, instead of AF_INET, if present.
remove some code enclosed in #if 0 ... #endif that made no sense
2001-08-17 06:53:26 +00:00
fd7cf8dd7c ChangeLog update 2001-08-17 00:18:11 +00:00
15cde2d531 NEWS update 2001-08-17 00:18:08 +00:00
Zeev Suraski 3fd258f06b Remove redundant files 2001-08-16 23:58:56 +00:00
Joey Smith c8b294afa3 @- Fix a crash in dbase_replace_record (Patch by robin.marlow@dps-int.com).
This fixes Bug id #11928.
2001-08-16 23:44:10 +00:00
Zeev Suraski e9da242ed4 Send Content-Length if we're sending just one chunk 2001-08-16 23:34:25 +00:00
Rasmus Lerdorf b732d8da35 Missing define 2001-08-16 23:31:54 +00:00
foobar b1b4afa64e Missing entries. 2001-08-16 22:15:33 +00:00
Zeev Suraski ef18947e5a sync with CODING_STANDARDS 2001-08-16 20:57:55 +00:00
Zeev Suraski 77c52275a1 MFZE1 2001-08-16 20:38:56 +00:00
Chuck Hagenbuch c1a8854993 add tail pointer to speed up imap_search (submitted by Rob Siemborski
<rjs3@andrew.cmu.edu>).
2001-08-16 20:13:27 +00:00
Harald Radi 9e083d2de1 added me and myself 2001-08-16 19:59:08 +00:00
Rasmus Lerdorf 7cde1eb66b that too 2001-08-16 16:46:00 +00:00
Rasmus Lerdorf 6f902a3177 Add dbx 2001-08-16 16:44:56 +00:00
Andi Gutmans f909ff9ed0 - Try and nuke get_object_zval_ptr() 2001-08-16 15:01:25 +00:00
Andi Gutmans 6435c3e962 - Remove bogus notice 2001-08-16 14:42:28 +00:00
Andi Gutmans 290fc10af7 - Sync with ZE1 2001-08-16 14:12:03 +00:00
Andi Gutmans ea48c0c46a - Fix a bug in method calls.
- Try to get the old copying behavior of objects to work (doesn't work yet).
2001-08-16 14:04:04 +00:00
Thies C. Arntzen 3510482971 move php_shutdown_config further down 2001-08-16 09:40:05 +00:00
Sterling Hughes fe7b5a3434 darn noet 2001-08-16 06:09:12 +00:00
Sterling Hughes b87834a12d Ryan Bloom's fix of my fix. ;) 2001-08-16 06:05:57 +00:00
Sterling Hughes 9395f0e6e2 Fix error logging 2001-08-16 05:19:29 +00:00
Rasmus Lerdorf 2b4c2a2ff5 Commit a bit of random plane hacking.
- A slight exif fix from the latest version of jhead
 - Make ext_skel's confirm_module_compiled function consistent
2001-08-16 00:16:00 +00:00
891dfed091 ChangeLog update 2001-08-16 00:10:53 +00:00
Zeev Suraski 2d8ca548e2 Fix build 2001-08-15 22:49:15 +00:00
foobar 3cc6655f3a Add the build time too. Bug: #12774 2001-08-15 22:37:31 +00:00
foobar 24187f2e05 Fix --with-pear=path too. 2001-08-15 21:39:32 +00:00
Chuck Hagenbuch 2b9e767822 PEAR::raiseError() can be called statically - don't assume $this will be
there!
2001-08-15 21:26:12 +00:00
Stig Bakken 84cdabcec0 * point people to the manual instead 2001-08-15 21:03:51 +00:00
Jeroen van Wolffelaar 2b6bafb269 Remove cbrt also, and mark logm1 and exp1p as expermintal 2001-08-15 19:08:59 +00:00
Jeroen van Wolffelaar d62fbbd5a8 MF407 2001-08-15 19:01:32 +00:00
Daniel Beulshausen 0a6878cc02 accomodate SAPI_API changes 2001-08-15 18:11:40 +00:00
Zeev Suraski 7fe3b91c67 MFZE1 2001-08-15 18:06:06 +00:00
Daniel Beulshausen 0dab84d065 fix SAPI_POST_* exports 2001-08-15 18:01:48 +00:00
Harald Radi db33d810f3 no message 2001-08-15 17:39:08 +00:00
Thies C. Arntzen 04c3f8403f mega patch to avoid recursive oci-calls as they might break oracle!
php will simply exit() (!!!) once it encounters an attemp to call oracle
while still in an oracle-call. this can only happen when the script gets
interrupted (timeout, apache-restart) and php tries to run the cleanups even
though we are in an unclean state. i will add an -ini flag soon (not before
4.0.7) which will (optional) make php not run the cleanups when in an unclean
state!
2001-08-15 16:00:56 +00:00
Harald Radi c674638dd0 removed CoInitialize() and CoUninitialize() 2001-08-15 10:39:59 +00:00
Sterling Hughes 8300abe367 Removed select(), fd_set(), etc. (wasn't present in the first place, and
these are implemented in the sockwasn't present in the first place, and
 these are implemented in the sockets extension))
2001-08-15 05:21:43 +00:00
5917e31097 ChangeLog update 2001-08-15 00:11:10 +00:00
c9220c12c0 NEWS update 2001-08-15 00:11:06 +00:00
Zeev Suraski 8021e65569 Revert an old bogus patch 2001-08-14 23:17:02 +00:00
Zeev Suraski 2cf25894a8 improve typedef definition 2001-08-14 22:57:09 +00:00
Stig Bakken d400f78079 * expected error codes are stored on a stack now, PEAR::expectError()
pushes into it, PEAR::popExpect() pops off it
* made pear_error test work on other boxes than my own :-)
2001-08-14 21:11:33 +00:00
Andrei Zmievski e0c3120a11 Uh-oh, didn't mean to eliminate all folds. 2001-08-14 20:38:56 +00:00
Andrei Zmievski 90cc710351 Be more safe about freeing zvals. 2001-08-14 20:33:19 +00:00
John Donagher 02b431b6d5 Add compile-time versioning for default hostname 2001-08-14 20:28:07 +00:00
John Donagher d53cb7cd2f Update hostname 2001-08-14 20:23:26 +00:00
Daniel Beulshausen 48d75026ad depreciated, but should build anyway... 2001-08-14 17:46:19 +00:00
Andi Gutmans 4580df1080 - This code looks OK so remove FIXME comment 2001-08-14 17:43:39 +00:00
Daniel Beulshausen 388dfa0483 TSRMLS fixes 2001-08-14 17:31:00 +00:00
Daniel Beulshausen 21cac086e4 TSRMLS fixes 2001-08-14 17:16:19 +00:00
Daniel Beulshausen ba761ce9b1 TSRMLS fixes 2001-08-14 17:05:53 +00:00
Zeev Suraski f72d907105 MFZE1 2001-08-14 15:24:20 +00:00
Zeev Suraski ac0bee7ec9 MFZE1 2001-08-14 15:22:34 +00:00
Harald Radi ed126f68d5 fixed com_invoke retval 2001-08-14 13:38:36 +00:00
Andrei Zmievski 4e89fa671e I'm sure you meant 'l' here, Sterling. 2001-08-14 13:01:11 +00:00
Stig Bakken 3c801213c6 * updated test (currently passes only on my laptop, sorry...) 2001-08-14 12:49:51 +00:00
Stig Bakken c49f8aa0ef * added expectError() method 2001-08-14 12:49:25 +00:00
Zeev Suraski eb52f75407 - Avoid using malloc()
- Improve and fix leaks in the typelib constants registration mechanism
2001-08-14 12:47:09 +00:00
Harald Radi 0fbbadbd2f fixed bug in com_load_typelib 2001-08-14 11:50:16 +00:00
foobar 80277be8e3 @- Fixed a bug in dbase_get_record() and dbase_get_record_with_names().
@  boolean fields are now returned correctly.
@  Patch by Lawrence E. Widman <widman@cardiothink.com> (Jani)
2001-08-14 11:07:18 +00:00
Zeev Suraski b3e96d34f3 Whitespace 2001-08-14 10:53:42 +00:00
Zeev Suraski 17a36fb659 more whitespace 2001-08-14 10:15:43 +00:00
Zeev Suraski cf5bf23b32 Whitespace & API updates 2001-08-14 10:13:35 +00:00
Zeev Suraski 4b3dea31e6 Whitespace and API updates (please keep code in the repository in K&R style
like the CODING_STANDARDS ask, guys...)
2001-08-14 10:04:59 +00:00
Zeev Suraski f09302da07 Add missing break 2001-08-14 09:55:22 +00:00
Sascha Schumann 0ccda62835 use an absolute path for symlinking the php library archive 2001-08-14 09:37:25 +00:00
foobar 601b4727b6 If the header file is not found, bail out. 2001-08-14 08:53:48 +00:00
foobar 5b2f8a0c22 Fixed bug: #12726. If --with-xxx is used in configure line without any
value, it gets value 'yes'.
2001-08-14 08:49:39 +00:00
Thies C. Arntzen e8e401bc2d ypo;-) 2001-08-14 08:33:21 +00:00
Joey Smith 862472efdc Obviously not complete, but somewhere to start. 2001-08-14 08:28:34 +00:00
Joey Smith df7967729e Kill some duplicate PHP_FALIAS()'s.
Many of these were commented out, but I killed them anyways just to be
consistent.
2001-08-14 08:23:22 +00:00
Joey Smith 14f05c17dd Group PHP_FE and PHP_FALIAS with their own kind. 2001-08-14 07:49:28 +00:00
Joey Smith a26110de2c Fix my own ws errors. 2001-08-14 07:44:21 +00:00
Joey Smith b79868c28c Register le_domxmltextp. 2001-08-14 07:37:14 +00:00
Joey Smith 109f414557 Don't hammer the resource type right off the bat. 2001-08-14 07:36:18 +00:00
Joey Smith e3d6fc72e5 Trim ws only lines. 2001-08-14 07:34:20 +00:00
foobar a870fd2757 ws fix. Also added some missing protos and fold tags. 2001-08-14 07:14:23 +00:00
foobar 2983993b59 Fix ZTS build. 2001-08-14 07:09:20 +00:00
foobar 442669055b Another TSRMLS_FETCH() nuke. 2001-08-14 05:44:33 +00:00
Alan Brown 292d27bf6a Whenever typelibrary constants were loaded, there was a GP Fault at process exit as shutdown_memory_manager seemed to delete constants that were supposed to have been deleted earlier. It seems as though CONST_PERSISTENT is a bad thing to use. Resetting that bit on the constant creation still seems to work and the GP Fault at exit is gone. 2001-08-14 03:52:32 +00:00
Joey Smith 5e21a4afad More Z_* macro changes. 2001-08-14 01:07:42 +00:00
Harald Radi c4022601e2 hresult is returned if no return type is specified 2001-08-14 00:48:15 +00:00
Harald Radi 44ee05ae23 update todo 2001-08-14 00:29:51 +00:00
Harald Radi d041982a9c make next() return a single value instead of an array with one element 2001-08-14 00:28:54 +00:00
f7c0bc955c ChangeLog update 2001-08-14 00:15:46 +00:00
cbce9eb95b NEWS update 2001-08-14 00:15:42 +00:00
Joey Smith 022626a8f0 Remove unused variable and fix small mental error. 2001-08-14 00:10:39 +00:00
Harald Radi 9c6b9eb76b merged from EXPERIMENTAL
lots of cleanup work
2001-08-13 23:39:11 +00:00
Harald Radi bb0858db34 initial 2001-08-13 23:30:16 +00:00
Sascha Schumann 98304ba6a0 Use a symlink instead of copying the +6MB library archive during install 2001-08-13 22:34:25 +00:00
Jeroen van Wolffelaar d1881c8e26 Reverted - Didn't yet read Torben's mail - Sorry! 2001-08-13 22:34:02 +00:00
Jeroen van Wolffelaar 6be14623c5 Fixed proto's 2001-08-13 22:30:55 +00:00
Sascha Schumann 96aa97f8b4 Don't display egrep result 2001-08-13 22:17:18 +00:00
Sascha Schumann f42acb0cd6 whoops, forgot to apply cgi/poll patch before diff'ing 2001-08-13 22:01:55 +00:00
Sterling Hughes a24e3174a0 remove "i" 2001-08-13 22:01:39 +00:00
Sascha Schumann e09ed038e7 . 2001-08-13 21:58:58 +00:00
Sascha Schumann 7efc4d8b54 Add check for thttpd-2.21b. We support nothing else for now, because
this version is rock-stable using the combined set of patches.
2001-08-13 21:57:31 +00:00
Sascha Schumann 75c22e9a4a improved thttpd-2.21b patch.. I got tired of applying my patches for
these bugs.

fixes poll(2) issue
fixes hanging cgi issue
fixes off-by-one in scanning input buffers in case of EAGAIN/EWOULDBLOCK
fixes potential bug in managing write buffers
add "index.php" to default files to look for
2001-08-13 21:55:21 +00:00
Sascha Schumann 6ae6263094 assorted stuff 2001-08-13 21:28:15 +00:00
Joey Smith 2f485a1848 More WS. 2001-08-13 19:58:07 +00:00
Joey Smith 7094200c96 WS only 2001-08-13 19:45:26 +00:00
Rasmus Lerdorf 6a62f0bd4a Add TSRMLS_CC 2001-08-13 19:36:43 +00:00
Zeev Suraski 0116a7b911 Fix crashes in parse_parameters calls
HEADS UP:  Make sure you supply TSRMLS_CC for this function!
I'll try to think of a way that'd allow us to find this issue using
the compiler.
2001-08-13 19:31:18 +00:00
Andi Gutmans ad18bd07f1 - More Engine 2 work. 2001-08-13 18:47:52 +00:00
Andi Gutmans 33539126d0 - MFZE1 2001-08-13 18:33:41 +00:00
Andi Gutmans a5afd0e9d0 - ZE2 fixes 2001-08-13 16:40:12 +00:00
Andi Gutmans 9a3d4e736c - More ZE2 fixes 2001-08-13 16:13:25 +00:00
Andi Gutmans 0c0999352f - Attempt at fixing the Java extension for ZE2 2001-08-13 16:02:45 +00:00
Andi Gutmans 30bad123f0 - MFZE1 2001-08-13 15:38:07 +00:00
Andi Gutmans b6eb324cd2 - Merge from Engine 1 2001-08-13 15:23:37 +00:00
Rasmus Lerdorf d4a6487e8c Faster wrong_param check for functions that take no parameters 2001-08-13 08:15:12 +00:00
Joey Smith fc487f4603 Change to Z_* macros. 2001-08-13 08:08:18 +00:00
Stig Bakken ecb2b081f1 @Added --version option to php-config (Stig) 2001-08-13 07:58:29 +00:00
Rasmus Lerdorf 4d11d90880 Track down a few more functions that don't check for 0 args and use
faster mechanism
2001-08-13 07:55:39 +00:00
Rasmus Lerdorf 5b2227ea80 Oops, a little too much simplification there.. ;) 2001-08-13 07:28:57 +00:00
Rasmus Lerdorf 8c497f05c4 We don't consistently check for args passed to functions that don't
take any args.  In some cases we probably want to skip the check for
performance reasons, but in other cases where performance is unlikely
to be a factor, not throwing a warning on the wrong number of args passed
to a function is at best inconsistent, and at worst it could hide a bug.
So, add a few such checks.  There are still lots of cases out there.
2001-08-13 06:43:47 +00:00
Sterling Hughes 3f505f8624 ws 2001-08-13 05:51:06 +00:00
Sterling Hughes e9cdaccc51 Whitespace fixes and moving to zend_parse_parameters() 2001-08-13 05:44:37 +00:00
Zeev Suraski 1e125df0d1 Reverse patches that slipped in by mistake in a whitespace patch. They
require some more work...
2001-08-13 00:36:16 +00:00
Zeev Suraski 9bcacd36f5 Update .dsp 2001-08-13 00:33:08 +00:00
Zeev Suraski 49e45baf9b - Fix API
- Update NEWS
2001-08-13 00:32:04 +00:00
Zeev Suraski 8722b31d8a MFZE1 2001-08-13 00:28:18 +00:00
e8f4e4660c ChangeLog update 2001-08-13 00:10:19 +00:00
Zeev Suraski afedca1ff6 Enable output buffering in the php.ini-recommended 2001-08-12 22:42:36 +00:00
Zeev Suraski 35de326b0e Compile fix for oldie Linux systems (possibly others too) 2001-08-12 21:23:15 +00:00
Sebastian Bergmann fd5eea8b96 Fix warning. 2001-08-12 18:57:35 +00:00
Thies C. Arntzen d5b1a7f440 tags need to be UTF8-decoded as well.
guys, case_folding can only work when the parser target encoding equal (or
compatible) with the locale setting of the system as we use toupper to "do it"
2001-08-12 18:44:42 +00:00
Stanislav Malyshev f5c5986344 _FUNCTION is used in definition, so use _D 2001-08-12 14:58:57 +00:00
David Eriksson 4fee32fac9 adjusted Satellite for Zend 2 2001-08-12 09:48:07 +00:00
David Eriksson 224600786c changed IOR values 2001-08-12 09:47:37 +00:00
David Eriksson 4e998ed80a wrote some tests for satellite 2001-08-12 09:23:19 +00:00
Andi Gutmans ff39e51fdf - Make com work with new object model 2001-08-12 04:31:14 +00:00
Andrei Zmievski 1388a3a396 Save spec_opt for each function. 2001-08-12 03:46:25 +00:00
Andrei Zmievski 75da34e8aa Fix it up a bit. 2001-08-12 02:45:41 +00:00
Rasmus Lerdorf ecc2fae542 Oops, missing () there 2001-08-12 00:14:48 +00:00
459cff51b7 ChangeLog update 2001-08-12 00:11:18 +00:00
Zeev Suraski 90aa90b967 - Update php.ini-dist
- Sync php.ini-recommended with php.ini-dist
2001-08-11 22:55:35 +00:00
Zeev Suraski e077c6bc28 Make it possible to enable chunked output buffering without providing
an output handling function
2001-08-11 22:55:00 +00:00
Joey Smith 2aca8c67ea Let domxml compile with ZendEngine2. 2001-08-11 20:44:30 +00:00
Zeev Suraski 25394d7c0a Whitespace 2001-08-11 20:18:22 +00:00
Andi Gutmans d80ee070f9 - Make odbc_fetch_object() work with Engine 2 2001-08-11 18:28:31 +00:00
Andi Gutmans ed9c36c1b8 - Make mysql_fetch_object() work w/ Engine 2 2001-08-11 18:27:48 +00:00
Andi Gutmans 76a7a5bc18 - More work on making objects work 2001-08-11 18:26:47 +00:00
Andi Gutmans 532677e7ac - Fix some places which create objects. The fixes are ugly and will be
revised when things start working well
2001-08-11 18:04:07 +00:00
Zeev Suraski c0404f4631 Whitespace 2001-08-11 17:03:37 +00:00
Zeev Suraski f6f6c4d7e6 Whitespace 2001-08-11 16:39:07 +00:00
Tomas V.V.Cox bafa98109c removed my debug code :) 2001-08-11 16:14:14 +00:00
Tomas V.V.Cox 9ca706e8ab don't show is_file() stat errors 2001-08-11 16:11:49 +00:00
Zeev Suraski 4f6c95d17a Whitespace 2001-08-11 15:56:40 +00:00
Zeev Suraski adf89828d2 Whitespace 2001-08-11 15:44:24 +00:00
Zeev Suraski 6cb427bd12 update 2001-08-11 15:26:11 +00:00
Zeev Suraski 860b591299 Start pushing register_globals annihilation 2001-08-11 15:22:56 +00:00
Andi Gutmans 1751c4eba5 - Fix UNIX build. 2001-08-11 13:23:35 +00:00
Thies C. Arntzen 8b480b8c09 make sybase compile with engine2 2001-08-11 12:02:20 +00:00
Thies C. Arntzen 384c86542a beautify 2001-08-11 10:52:52 +00:00
foobar 3619c6eb6a Added $_SESSION to the $_* family. 2001-08-11 10:49:03 +00:00
Andi Gutmans 73d4931dac - Need to do some rewriting in the parser instead of this. 2001-08-11 10:47:41 +00:00
Thies C. Arntzen 6479bfe3b7 use macros for accessing properties in object. 2001-08-11 10:29:14 +00:00
Sebastian Bergmann fe956141fc 'delete' is a reserved word in Zend Engine 2 2001-08-11 08:08:05 +00:00
Andrei Zmievski 4e857ef2d3 Changed ext_skel to use zend_parse_parameters() for argument parsing in
the generated functions. This cuts down on code a lot.

The point before this change was tagged BEFORE_PARAM_PARSING_CHANGE.
2001-08-11 03:24:23 +00:00
Anil Madhavapeddy dc2e12253f fix a few typos 2001-08-11 02:53:57 +00:00
foobar 8a7d1d8e17 ZEND macro-rename. 2001-08-11 02:46:57 +00:00
Zeev Suraski a2dd66257f Move the macro wrappers from the compatibility header to php.h 2001-08-11 01:13:31 +00:00
Andi Gutmans f5ea49a647 - For Sebastian. Will allow to see you're using the Engine 2 CVS via
phpinfo()
2001-08-11 00:20:37 +00:00
40b419a577 ChangeLog update 2001-08-11 00:11:18 +00:00
Frank M. Kromann 300ac8c238 Adding SQL statement to the warning 2001-08-10 20:34:05 +00:00
foobar 5019d3d4b9 Made use of the resource macros here too. And some beutifying. 2001-08-10 20:32:33 +00:00
Jeroen van Wolffelaar 6da0268c2a Possible fix 12360. If it doesn't help, it doesn't hurt, AFAIK... 2001-08-10 20:18:42 +00:00
Chuck Hagenbuch a2b297bdf0 Add imap_setacl() function (Brian Masney <masneyb@seul.org>). 2001-08-10 18:32:56 +00:00
Wez Furlong 831f05b0fb Fix some build probs on *bsd 2001-08-10 18:02:59 +00:00
Andi Gutmans 8b6f848cbb - Merge from Engine 1 2001-08-10 16:19:49 +00:00
Sebastian Bergmann 5ac3adf9d2 Rename storage* to container*. 2001-08-10 16:12:33 +00:00
Andi Gutmans 8ff094046d - A couple of fixes 2001-08-10 14:18:38 +00:00
Zeev Suraski 2969852fb3 Optimize macro usage... 2001-08-10 14:10:31 +00:00
Andi Gutmans 61edd1bf41 - Merge from Engine 1 CVS 2001-08-10 13:39:35 +00:00
Zeev Suraski 486ad565d0 More build fixes 2001-08-10 13:04:58 +00:00
Adam Dickmeiss e4f0e351b7 Added yaz_sort. Updates for ZTS. 2001-08-10 12:53:11 +00:00
Zeev Suraski f7b2b02032 Centralize macros 2001-08-10 12:48:06 +00:00
Zeev Suraski c28a26b119 There we go. 2001-08-10 12:45:58 +00:00
Zeev Suraski 38c101521b build fix 2001-08-10 12:28:15 +00:00
Zeev Suraski e786d4d9e2 Let's not introduce more mess to maintain. 2001-08-10 12:27:33 +00:00
Rasmus Lerdorf 05db76df86 Sablot extension cleanup - it compiles again now 2001-08-10 09:48:48 +00:00
Rasmus Lerdorf eee9187ecb The checks were in the wrong order here. sablot depends on expat, so
check for expat first and add -lexpat then check for sablot
2001-08-10 09:05:37 +00:00
foobar 18c893d0df killed compile warnings. 2001-08-10 08:36:21 +00:00
foobar 9e0ad17dc4 compile fix (missing TSRMLS_CC) 2001-08-10 08:02:09 +00:00
foobar 52e3b4a44f Cleanup. Also make gethostnamel() to return FALSE on error and not just empty array. 2001-08-10 02:19:05 +00:00
Rasmus Lerdorf 9e9e47faa4 Filter a bit of the "Bronx" out of this README 2001-08-10 01:41:14 +00:00
65c1999246 ChangeLog update 2001-08-10 00:10:33 +00:00
9e23033e3e NEWS update 2001-08-10 00:10:30 +00:00
David Eriksson 77298408b3 Prevent potential crash 2001-08-09 22:00:05 +00:00
David Eriksson 81a7f27471 Convert parameter to long if needed. 2001-08-09 21:59:27 +00:00
David Eriksson 507d5699f0 Added zend_ prefix to wrong_param_count in enum.c, object.c and struct.c 2001-08-09 21:57:57 +00:00
David Eriksson f5c48a1406 struct.c 2001-08-09 21:56:25 +00:00
David Eriksson eeb26b89ec Prevent potential crashes. 2001-08-09 21:56:03 +00:00
David Eriksson ece087b842 (PHP satellite_object_to_string) Added function to get IOR of object. 2001-08-09 21:55:10 +00:00
David Eriksson 114d33ae07 rewrote configuration script 2001-08-09 21:53:50 +00:00
David Eriksson e306d079ab Added patch for ORBit that handles "Multiple Components Profile" in an IOR. 2001-08-09 21:42:54 +00:00
Joey Smith ca33def60b K&R-ify the switch statments. 2001-08-09 12:41:39 +00:00
Joey Smith f8d7307270 Commit acutal code only, will do ws on another pass. 2001-08-09 12:35:09 +00:00
Joey Smith 00418457d3 Revert patch to seperate code from whitespace changes. 2001-08-09 12:22:41 +00:00
Joey Smith e2a2aa75b0 Restore xpath_eval() and the underlying php_xpathptr_eval().
It still leaks like crazy, but does not appear to crash, and
seems to work correctly.

Anyone who can possibly test this, please do.

@- Restore xpath_eval() and php_xpathptr_eval() for 4.0.7. There
@  are still some known leaks.
2001-08-09 12:15:58 +00:00
Tomas V.V.Cox b4cdd3af84 fix multiple factory calls problem with php < 4.0.7 2001-08-09 08:06:52 +00:00
Tomas V.V.Cox d87bae9f1b *** empty log message *** 2001-08-09 07:56:33 +00:00
Tomas V.V.Cox 02545f0503 spaces 2001-08-09 07:52:29 +00:00
foobar 9551824584 Updated the extension part a little bit.
# I guess people didn't see the forest from the trees.. :)
2001-08-09 06:46:43 +00:00
Rasmus Lerdorf c359e40a57 More ext_skel cleanup 2001-08-09 04:47:47 +00:00
Sascha Schumann d0095ba3c5 Workaround which avoids passing pic-related flags in link mode 2001-08-09 04:27:40 +00:00
Andi Gutmans 80b870e5d3 - Merge from Engine 1 tree 2001-08-09 03:58:58 +00:00
Alexander Merz 25382be8ff fix PHPDoc 2001-08-09 01:11:56 +00:00
foobar 2b6b6b4324 Added missing entries. 2001-08-09 00:28:33 +00:00
788c201f52 ChangeLog update 2001-08-09 00:11:55 +00:00
Zeev Suraski 1db62e97c7 Update NEWS 2001-08-08 20:26:26 +00:00
Zeev Suraski f47962c7c0 Implement import_request_variables() 2001-08-08 20:05:37 +00:00
Wez Furlong b00809a322 Fix probs on OpenBSD-current and RedHat 6.1 2001-08-08 20:00:09 +00:00
Zeev Suraski c31ba75577 Put it in the wrong case... 2001-08-08 19:15:38 +00:00
Zeev Suraski 6fdf6b4c82 - Fix precedence of the variables order in $_FORM
- Rename $_FORM to $_REQUEST for now
2001-08-08 18:26:03 +00:00
Andi Gutmans 9d11db1200 - Merge new $_GET, $_POST etc. patch from Engine 1 tree 2001-08-08 17:18:16 +00:00
Zeev Suraski 5eb9495b1b - Implement $_FORM
- Update phpinfo()
- Update NEWS
2001-08-08 17:16:20 +00:00
Zeev Suraski 7f4453f4c1 - Implement new short names - $_GET, $_POST, $_COOKIE, $_SERVER, $_ENV and $_FILES
- Use the Zend Engine infrastructure - make these variables available in
  all functions
2001-08-08 16:36:04 +00:00
Andi Gutmans cb1a40f399 - Preliminary patch for method() dereferencing 2001-08-08 15:07:11 +00:00
Andi Gutmans 2f6cd308f9 - Merge zend_try fix from Engine 1 2001-08-08 15:06:08 +00:00
Zeev Suraski 6ecae422c4 Use zend_first_try 2001-08-08 14:01:22 +00:00
Zeev Suraski 815d043b1e Using TSRM no longer implies ZTS 2001-08-08 10:26:21 +00:00
Marc Boeren c04b317a28 Fixed a too hasty copy/paste action in the DBX_FBSQL constant check 2001-08-08 10:08:25 +00:00
Marc Boeren a4abfc1953 Added Frank to the CREDITS for FrontBase support
Added dbx_fbsql.c to the Makefile.in
# Could someone please compile/test this? My Linux-box is down :(
# Win compiles just fine, I don't expext any trouble on Linux...
2001-08-08 08:48:32 +00:00
Marc Boeren fdc3b548f5 Added extra entries for FrontBase support (Mc) 2001-08-08 08:44:41 +00:00
foobar 92ea7171c8 Changed the old skool resource stuff to use the Zend macros. 2001-08-08 02:55:07 +00:00
foobar 529b4dca82 Cleanup. (some relics from php3 era?) 2001-08-08 02:02:02 +00:00
foobar bef77f811a Make this compile again. 2001-08-08 01:52:22 +00:00
Rasmus Lerdorf b94cff2559 Fixed a bunch of problems here 2001-08-08 00:20:19 +00:00
60f37986c2 ChangeLog update 2001-08-08 00:14:40 +00:00
c749c8fa6c NEWS update 2001-08-08 00:14:36 +00:00
foobar 4263571386 More TSRM work. 2001-08-07 23:27:01 +00:00
Zeev Suraski b92a9c872f Migrate .dsp patches 2001-08-07 20:15:17 +00:00
foobar 001df0d028 Yet another TSRM fix. 2001-08-07 20:13:54 +00:00
Frank M. Kromann 4c5a6cbb82 Fixing a TSRMLS_FETCH problem. 2001-08-07 19:56:33 +00:00
Andrei Zmievski c4555f9f55 @- Added vprintf() and vsprintf() functions that allow passing all arguments
@  after format as an array. (Andrei)
2001-08-07 19:44:45 +00:00
Andi Gutmans 3d3eff12cb - Forgot to commit the updated dsp 2001-08-07 19:33:06 +00:00
foobar d7e1fe914a Killed compile warnings. 2001-08-07 19:24:21 +00:00
foobar ac28ca9d85 killed a compile warning. 2001-08-07 19:21:19 +00:00
Frank M. Kromann 587e3600d8 Adding cvs ID to source files 2001-08-07 19:09:58 +00:00
Frank M. Kromann 21e2a8fc1b Adding FrontBase support to the DBX extension 2001-08-07 19:08:06 +00:00
Harald Radi 5e867acb28 TSRM fix 2001-08-07 19:02:01 +00:00
foobar 6916db60e8 More TSRMLS_FETCH() nuking. 2001-08-07 18:36:55 +00:00
foobar 63b7e5e052 Another TSRM fix. Plus killed some compile warnings. 2001-08-07 17:57:55 +00:00
foobar ecfcae02a6 Another TSRM fix. 2001-08-07 17:40:10 +00:00
foobar 8b4c4c87e6 This did not work as expected. Reverted. 2001-08-07 17:29:11 +00:00
Harald Radi 516e769d5b TSRM fix 2001-08-07 17:26:37 +00:00
Harald Radi b4bc16bbc8 TSRM fix 2001-08-07 17:18:20 +00:00
foobar 053cac2c3a Missed these 2001-08-07 17:17:39 +00:00
Andrei Zmievski 32440e3051 Fix a couple of leaks. 2001-08-07 16:41:33 +00:00
foobar e53100fc7a php_sig_gd2 is only needed for GD extension. 2001-08-07 16:35:35 +00:00
foobar ab1ad77e0f oops. Copy-paste-magic. :) 2001-08-07 16:27:29 +00:00
foobar f710812427 Yet another TSRM fix. 2001-08-07 16:24:11 +00:00
foobar e17f384ee7 Beutifying. Also made a check for IMAP-2001. 2001-08-07 16:18:05 +00:00
foobar 27fcd0509a @- Added support for GD2 image type for ImageCreateFromString() (Jani) 2001-08-07 16:15:45 +00:00
Daniel Beulshausen 289770bf61 let ext\shmop build under win32 2001-08-07 13:33:27 +00:00
Daniel Beulshausen a118a1e7b0 fix buffer size 2001-08-07 13:29:51 +00:00
foobar 895c75e23c This was not supposed to be removed. 2001-08-07 13:29:09 +00:00
David Croft ef9d34b70a #remove cvs tag 2001-08-07 13:15:31 +00:00
Daniel Beulshausen 95d30927ab implement shm* similar functions 2001-08-07 13:06:23 +00:00
Adam Dickmeiss 9cb9b84e92 ZTS updates. 2001-08-07 11:22:33 +00:00
Sascha Schumann 64c4456cca A CRLF at the end of a line is not so wrong. 2001-08-07 08:35:54 +00:00
Sascha Schumann 61618d4a03 The module usually did not send out Content-Type: text/html.
No major browser seems to care, Opera does though.
2001-08-07 08:34:02 +00:00
Andi Gutmans 9802b1632c - More sync with latest CVS 2001-08-07 03:35:31 +00:00
Andi Gutmans 5af7770a81 - Sync Engine2 CVS with latest Engine CVS 2001-08-07 03:17:33 +00:00
6737ea6fd4 ChangeLog update 2001-08-07 00:10:43 +00:00
Zeev Suraski 2c8ec7f994 Commit uncommitted build fix 2001-08-06 23:56:32 +00:00
foobar beac42e3dc Fix bug: #12604. Also made the configure script shown a little nicer in phpinfo() 2001-08-06 18:43:02 +00:00
Frank M. Kromann 57946eb3be Adding missing TSRM macros.
Kill signed/unsigned compiler warning
2001-08-06 16:58:27 +00:00
Frank M. Kromann 96607ebd1a Adding missing TSRMLS_CC 2001-08-06 16:53:16 +00:00
foobar 755723bb3a - This is not supposed to be used, from c-client docs (formats.txt):
#"The following file/message formats are supported by c-client as of
# the time of this writing:
#
#. mx    This is an experimental format, and may be removed in a future
#        release.  An mx format mailbox has a .mxindex file which holds
#        the message status and unique identifiers.  Messages are
#        stored in Internet standard CF LF form, so the file size of
#        the message file equals the size of the message.
#
#        mx is somewhat inefficient; the entire directory must be read
#        and each file stat()'d.  We found it intolerable for a
#        moderate sized mailbox (2000 messages) and have more or less
#        abandoned it."
2001-08-06 16:36:31 +00:00
foobar 654b4332c7 Some cleanup. Removed unnecessary duplicate #ifndef's. 2001-08-06 15:58:37 +00:00
foobar f9c76ee19f Fixed bug: #12597. 2001-08-06 15:40:47 +00:00
foobar b5e49a1ba8 removed unused function. (seems like a copy of imap_body) 2001-08-06 15:29:49 +00:00
Zeev Suraski 7ade3b30cb Fix an off by one lineno issue, in case of an implicit ; 2001-08-06 14:36:46 +00:00
Zeev Suraski 85875e83ae Better shared code 2001-08-06 14:26:05 +00:00
Zeev Suraski 609d58a4d6 Merge from branch - move to standard C scanners in thread safe mode 2001-08-06 13:48:51 +00:00
Thies C. Arntzen a35df189b8 we can no longer register internal-classes once the script is started.
therefore the "incomplete class" is now registered at MINIT time.
2001-08-06 13:36:08 +00:00
foobar 89a8b0144c Fix TSRM problem. 2001-08-06 12:26:55 +00:00
foobar 84042cd9f1 Another TSRM fix. 2001-08-06 12:15:05 +00:00
foobar 90df9a211a missing entry 2001-08-06 10:19:02 +00:00
foobar 2bd567d513 Fixed bug: #12563 (and possibly other similar one's too..) 2001-08-06 10:11:03 +00:00
Sascha Schumann 23b9300fd1 more tsrm cleanup 2001-08-06 03:50:52 +00:00
Andi Gutmans e6697297b6 - Move to using Z_ macros 2001-08-06 02:52:03 +00:00
Andi Gutmans 54e871a9cc - Use Z_ macros 2001-08-06 02:48:55 +00:00
44ab460d27 ChangeLog update 2001-08-06 00:10:18 +00:00
8eec4d2a06 NEWS update 2001-08-06 00:10:12 +00:00
Jeroen van Wolffelaar dce78d75d6 Removed some duplicate code out of addclashes
# Not TSRM-safe, I am afraid...
@- addcslashes now warns when charlist is invalid. The returned string
@  remained the same (Jeroen)
2001-08-05 23:08:19 +00:00
Jeroen van Wolffelaar b3a7b945fa Fix test 2001-08-05 20:27:24 +00:00
Jeroen van Wolffelaar ec140f4f67 Bugfix in abs(), abs(LONG_MIN) was bogus 2001-08-05 20:27:03 +00:00
Sebastian Bergmann b4f31ecef5 Fix ZTS build. 2001-08-05 20:25:40 +00:00
Jeroen van Wolffelaar 2e6850a91d Added proto for php_charmask in the .h 2001-08-05 20:02:22 +00:00
Jeroen van Wolffelaar 4a01a15fd2 Error-handling for the second parameter of [l|r]trim 2001-08-05 19:38:49 +00:00
Jeroen van Wolffelaar 71a6c03bef Didn't commit the correct trim.phpt, it now passes 2001-08-05 19:06:34 +00:00
Jeroen van Wolffelaar 860be31cae More tests 2001-08-05 18:38:48 +00:00
Sterling Hughes ba211eef91 update NEWS as well 2001-08-05 17:56:11 +00:00
Sterling Hughes 294e19cd5c Add the Cyrus IMAP extension to PHP's CVS (Manual editing of the news file to occur). 2001-08-05 17:43:03 +00:00
Zeev Suraski c4ca84d3a1 More nulled-out macros 2001-08-05 17:07:59 +00:00
Sascha Schumann a19563c8dc more tsrm cleanup 2001-08-05 16:52:29 +00:00
Sascha Schumann 480ffb3d75 more tsrm cleanup 2001-08-05 16:43:57 +00:00
Sascha Schumann c095fa33d1 fix php_write 2001-08-05 16:22:50 +00:00
Sascha Schumann b349df6364 some more eliminate-fetches-or-escalate-them-at-least 2001-08-05 16:21:33 +00:00
Sascha Schumann 373b3e101e more tsrm cleanup -- output.c is not doing any fetches anymore 2001-08-05 15:55:43 +00:00
Sascha Schumann 8aef193056 more tsrm cleanup 2001-08-05 15:29:47 +00:00
Stanislav Malyshev 02fea7ed23 (gmp_init) Added extra (optional) argument to gmp_init():
a base argument which indicates the number base. E.g.:
           gmp_init('1010101010',2); // feed gmp a binary value.
Patch by Troels.
@- Added optional extra argument to gmp_init(). The extra argument
@  indicates which number base gmp should use when converting a
@  string to the gmp-number. (Troels)
2001-08-05 14:48:17 +00:00
Stanislav Malyshev c7d7834a43 Check that _php_math_basetolong result fits long (by request from Troels Arvin) 2001-08-05 14:40:14 +00:00
Sascha Schumann aafdfe82cb further tsrm cleanup 2001-08-05 14:36:51 +00:00
Sascha Schumann 2cce13fd50 further tsrm cleanup 2001-08-05 14:27:39 +00:00
Sascha Schumann 0af7ad15f5 further tsrm cleanup 2001-08-05 14:17:55 +00:00
Thies C. Arntzen 578c395411 delay module_shutdown even further. zend_try and _catch need the current
globals as well.
zeev, is this a chicken & egg problem?
2001-08-05 14:07:33 +00:00
Thies C. Arntzen 0fe837b448 module_shutdown() calls ts_free_thread in ZTS mode. so SG() cannot be accessed
afterwards.
2001-08-05 14:04:23 +00:00
Sebastian Bergmann 7168c31482 Even more TSRM cleanup. 2001-08-05 13:26:54 +00:00
Sebastian Bergmann 47b26817fb More tsrm-related cleanup. 2001-08-05 12:36:13 +00:00
Sascha Schumann 7263485576 tsrm-related cleanup 2001-08-05 10:32:48 +00:00
Sebastian Bergmann 2126ed210e Fixed some TSRMLS_CC instances (at least it looked odd to me the way it was before). 2001-08-05 05:40:43 +00:00
Sebastian Bergmann a70ecedb33 Remove more duplicate TSRMLS_FETCH() calls. 2001-08-05 05:35:06 +00:00
Zeev Suraski 1159c84ab7 - TSRMLS_FETCH work
- whitespace fixes
2001-08-05 01:43:02 +00:00
Zeev Suraski fcc035108f TSRMLS_FETCH work 2001-08-05 01:37:10 +00:00
Zeev Suraski 1f3faae352 Nukre most TSRMLS_FETCH()'s in TSRM 2001-08-05 01:34:40 +00:00
2361160cc5 ChangeLog update 2001-08-05 00:11:10 +00:00
2829475d00 NEWS update 2001-08-05 00:10:49 +00:00
foobar d800a2e16a - Fixed bug: #10822
- CRYPT_SALT_LENGTH is now set to the maximum length the system
  supports, like it has been in the documentation for ages.
- The automatic salt is now also working like it should.
2001-08-04 23:58:56 +00:00
Rasmus Lerdorf 628c21275f support for multiple exif comments
@ - Enhance read_exif_data() to support multiple comment tags (Rasmus)
2001-08-04 22:35:03 +00:00
Jeroen van Wolffelaar c105f7142f Better abs() testing 2001-08-04 21:40:34 +00:00
Jeroen van Wolffelaar fcf57d371d Layout: revert accidentel joining of lines 2001-08-04 21:37:43 +00:00
Jeroen van Wolffelaar 2b17cd1982 Named some constants in filestat to improve readability 2001-08-04 21:34:11 +00:00
Stig S. Bakken a259819f53 added some more stuff to .cvsignore 2001-08-04 21:09:30 +00:00
Jeroen van Wolffelaar 68df8ea465 Another bugfix in pow. Special cases, with 10 times the same thing are
_so_ error_prone... :(
2001-08-04 20:58:47 +00:00
Rasmus Lerdorf 7d5999fb4d Kill a warning 2001-08-04 20:52:35 +00:00
Jeroen van Wolffelaar b245789bdb Bugfix. All tests pass now on my system 2001-08-04 18:29:37 +00:00
Rasmus Lerdorf cc40cdc7d7 Fix newly introduced crash on a file-not-found 2001-08-04 18:08:13 +00:00
Jeroen van Wolffelaar 58ee4e47a4 Fix bug in the tests :-(
There seems to be one real bug in pow(), I'm trying to fix it...
2001-08-04 18:03:29 +00:00
Thies C. Arntzen dca5f8dce4 fix serialize:
- keys no longer have a trailing \0
- no leak on calling __wakeup (also saved 2* malloc & free)
- serializing objects that implement __sleep() works again
- make test works again:-)
2001-08-04 17:29:54 +00:00
Sebastian Bergmann b99798fda0 Another one bites the dust. 2001-08-04 17:07:16 +00:00
Sebastian Bergmann b5763a70a6 Remove duplicate TSRMLS_FETCH() call. 2001-08-04 17:02:43 +00:00
Andrei Zmievski bffbe675f9 @- Fixed a crash bug in array_map() when NULL callback was passed in. (Andrei) 2001-08-04 16:54:20 +00:00
Thies C. Arntzen 3884b15b95 fix possible crash - we should never keep the zval** as they might point
somewhere into the Engine. (there's still a new bug in strtok - hunting;-)
2001-08-04 16:53:57 +00:00
Sean Bright d789d45a2e WS Pollution 2001-08-04 13:47:44 +00:00
Jeroen van Wolffelaar 0cf60d749e Added tests for pow()
#The tests near LONG_MAX/MIN fail, I know that
2001-08-04 13:20:31 +00:00
Jeroen van Wolffelaar 8803bbaa80 - A little bit cleaning of pow(), and 12 bytes less memory (wow) 2001-08-04 13:11:17 +00:00
Sean Bright fff883689e Don't allocated quoted strings unless we are in a META tag. 2001-08-04 12:36:51 +00:00
Thies C. Arntzen 402f91fa2d calling mail_open() causes a SEGFAULT when using imap-2000c. mail_open(0,"",0);
seems to work.
2001-08-04 10:50:55 +00:00
Tomas V.V.Cox 96aab6aed4 don't show the call_user_method deprecated use warning (disturbs tests) 2001-08-04 10:47:10 +00:00
Sebastian Bergmann 724b4d409c Eliminate TSRMLS_FETCH() call. 2001-08-04 05:37:11 +00:00
Sebastian Bergmann ea79632b29 Fix Win32 (and maybe other ZTS) builds. 2001-08-04 05:22:55 +00:00
foobar 5bdc64c505 Fix bug: #9177 2001-08-04 04:47:24 +00:00
Sascha Schumann c947a0739e Clean up the serializer by modularizing some of its code. That also
enables us to serialize hash indices without creating zvals for them.
Due to its nature, this patch also includes some whitespace changes.
2001-08-04 03:30:38 +00:00
foobar a9f850f34e fixed a memleak. 2001-08-04 03:06:12 +00:00
foobar faaeee3705 Fixed bug: #11784 (combined with fixes Rasmus committed..) 2001-08-04 01:56:40 +00:00
c6454c83f4 ChangeLog update 2001-08-04 00:11:58 +00:00
e01b22e5cd NEWS update 2001-08-04 00:11:55 +00:00
Jeroen van Wolffelaar dc4adaa231 #- HTML-safe error for pow() 2001-08-03 23:27:23 +00:00
Jeroen van Wolffelaar b32f1ab299 #- Fix silly bug that caused segfault 2001-08-03 23:10:04 +00:00
Jeroen van Wolffelaar f0bcaf3901 Un-revert patch 2001-08-03 23:09:05 +00:00
Jeroen van Wolffelaar f6979a7d2b Reverting last patch, segfaults. 2001-08-03 22:42:02 +00:00
Rasmus Lerdorf 9b0df45da7 Change from E_ERROR to E_WARNING in the exif extension
@ Change from E_ERROR to E_WARNING in the exif extension (Rasmus)
2001-08-03 22:33:10 +00:00
Jeroen van Wolffelaar 7733d95770 - New pow() function. It now gives warnings on wrong input, and
returns integer result when possible
@- New pow() implementation, which returns an integer when possible,
@  and warnings on wrong input (jeroen)
2001-08-03 22:19:11 +00:00
Jeroen van Wolffelaar c2150f7038 - Added new parameter to [l|r]trim, to specify _what_ to trim
@- Added optional second parameter to trim, chop and ltrim. You can
@  now specify which characters to trim (jeroen)
2001-08-03 22:12:46 +00:00
Jon Parise 74b4b08b7b Don't blindly assume -lc-client when linking 'conftest'. 2001-08-03 19:36:58 +00:00
Jeroen van Wolffelaar 49c16290f3 - Fix array_sum to switch to float on overflow. Fixes bug#12505 2001-08-03 19:18:51 +00:00
Jon Parise 9db1d22659 Full include paths are preferrable. 2001-08-03 19:11:31 +00:00
Jon Parise 5b8c562b22 smart_str use requires php_smart_str.h. 2001-08-03 19:05:40 +00:00
Zeev Suraski c06dbe23bb Fix buglet 2001-08-03 16:08:01 +00:00
Tomas V.V.Cox fa0481609c * Added the new fetch row mode: DB_FETCHMODE_OBJECT that returns the columns
of a fetched row as object properties
* Added a new class DB_row (the default type of a fetched row object)
* Updated some phpdocs
2001-08-03 14:13:52 +00:00
Sascha Schumann d6dc2ba6bc Treat trailing zeroes correctly 2001-08-03 11:09:13 +00:00
Sascha Schumann 723bbcbea0 Do the nul'ifiying of php_var_serialize's result at the right place 2001-08-03 11:00:16 +00:00
Sascha Schumann 4a1943c542 Pass on nul'ified data 2001-08-03 10:39:48 +00:00
Sascha Schumann f6ed403fde Don't copy the strtok parameter 2001-08-03 09:50:38 +00:00
Sascha Schumann 84aed3b718 Fix a possible segfault (Thanks to Sebastian for catching it) 2001-08-03 09:36:14 +00:00
Sascha Schumann 3459f05a07 NUL-terminate string 2001-08-03 09:35:33 +00:00
Sascha Schumann 60024a469d Add some casts 2001-08-03 08:51:53 +00:00
Sascha Schumann 7471943c06 Replace our strtok implementation with a binary-safe one which code
does not cause headaches when reading it.  Also happens to be a bit quicker.
2001-08-03 08:49:19 +00:00
Zeev Suraski e206bd3374 Fix macro 2001-08-03 08:15:16 +00:00
Sascha Schumann 4dfa91543c Convert serializer to smart_str.. avoids lots of sprintf's and
copying of data.
2001-08-03 07:25:27 +00:00
Zeev Suraski 2ec440078a Get rid of a couple of bogus persist_alloc()'s, and some cleanup 2001-08-03 07:15:14 +00:00
Zeev Suraski 11908f2db8 More TSRM stuff 2001-08-03 07:12:59 +00:00
Zeev Suraski 66d9314b60 Implement fast memory allocation and reduced fragmentation under Windows. 2001-08-03 07:06:05 +00:00
Zeev Suraski ded764461b Some compat macros 2001-08-03 07:02:46 +00:00
foobar f9e375f493 Changed the PHP_ADD_LIBRARY_DEFER() to work when building
standalone extensions. Also improved the checks for SSL and Kerberos in
IMAP extension configure.
2001-08-03 05:17:18 +00:00
foobar 85e15deabe These are redefined in the sqltypes.h that comes with unixODBC. PR: #12519 2001-08-03 05:07:22 +00:00
Sebastian Bergmann 25076098c0 Revert whitespace patch. 2001-08-03 05:05:47 +00:00
foobar e069610c09 Add missing header. 2001-08-03 04:56:09 +00:00
Zeev Suraski bb60fe439f Fix non-TS build 2001-08-03 04:49:43 +00:00
96b8b4dc24 ChangeLog update 2001-08-03 00:20:00 +00:00
Rasmus Lerdorf 6e41650e52 Revert this change - if you want to do this, do it in a 'make clean' 2001-08-02 21:20:20 +00:00
Sterling Hughes 70a0951eb9 Larger transfer buffer before realloc() this should speed things up a bit 2001-08-02 19:28:33 +00:00
Sterling Hughes b71efb2f9c ws fix 2001-08-02 19:25:46 +00:00
foobar 17e6295fbb Delete config.cache always. This makes config.nice a bit more useful. 2001-08-02 18:22:57 +00:00
Zeev Suraski 7ecb33868c require_once()/include_once will return true in case a file was not included
because it was already included earlier.
Changed the default return value type of the include() family from long to
boolean
2001-08-02 17:27:19 +00:00
Thies C. Arntzen 84169a4bc2 this kills 90% of the warings in maintainer-mode 2001-08-02 16:03:17 +00:00
Sebastian Bergmann fcfea1c55d Whitespace fixes. 2001-08-02 15:16:43 +00:00
Sebastian Bergmann 010c3b44ed Fix Apache2Filter build. 2001-08-02 15:14:30 +00:00
Thies C. Arntzen 36a0e6369d not too sure about this:
the uw-imap lib is usually called libc-client.a - kde comes with a libimap.a
which (when used instead of libc-client.a) will break the build. so
i have reversed the detection for the imap-libs - 1st look for the variations
of libc-client and (if 'em are not found) try -limap. i hope this breaks
nobodies setup!

we should really add a AC_TRY_COMPILE for all extensions that get added thru
configure!
2001-08-02 11:23:01 +00:00
Thies C. Arntzen 67775fcd2c adding -lsablot later makes it appear _before_ -lexpat in config_vars - and
that fixes a link problem (atleast) for me.
sterling?
2001-08-02 11:19:19 +00:00
Zeev Suraski 9424023968 Optimize the NEWS file :) 2001-08-02 07:29:39 +00:00
Zeev Suraski 49c874e7f5 Update NEWS 2001-08-02 07:17:01 +00:00
Zeev Suraski c14baeece3 Avoid going over huge lists of functions, classes and constants.
Special thanks to the guys from the MS lab for the profiling tools :)
2001-08-02 07:00:43 +00:00
Zeev Suraski 7deb44e36d Some cleanup 2001-08-02 06:16:20 +00:00
Zeev Suraski 37a3490f33 Fix the .h file (untested) 2001-08-02 05:56:10 +00:00
Zeev Suraski 5dfe1deb96 We no longer need any FETCH's for internal functions 2001-08-02 05:49:24 +00:00
Rasmus Lerdorf 8cf4e4a725 TSRM fix for ext_skel - probably more needed 2001-08-02 05:36:50 +00:00
Zeev Suraski 3aa5674a84 TSRMLS fixes 2001-08-02 05:25:29 +00:00
ce16a6e920 ChangeLog update 2001-08-02 00:11:23 +00:00
Zeev Suraski 527689ca81 Beautify 2001-08-02 00:11:20 +00:00
e128e422e0 NEWS update 2001-08-02 00:11:17 +00:00
Zeev Suraski 12318a2068 Fix Apache/ZTS build 2001-08-01 22:53:26 +00:00
Frank M. Kromann 2794a0e69a These new math functions are not supported on Win32 2001-08-01 16:55:24 +00:00
Andrei Zmievski fa6b5cdde7 - Added a few new math functions from Jesus Castagnetto.
- Converted to Z_* macros.
@- Added a few new math functions. (Jesus)
2001-08-01 13:48:14 +00:00
Tomas V.V.Cox 88748bc7a8 added BaseInstall dir support 2001-08-01 13:24:55 +00:00
foobar 9ba69908cd This should work better. Thanks to Jon Wagoner <jwagoner@wlion.com> 2001-08-01 13:15:26 +00:00
foobar ea9b1cb66f configure leftovers.. 2001-08-01 03:11:57 +00:00
Zeev Suraski f93bfc47df Implement fast scanning in the multithreaded environment 2001-08-01 02:36:05 +00:00
foobar 0ccc2fd9ef kill warning and make this build again. 2001-08-01 00:31:19 +00:00
foobar bad630553b fix build. 2001-08-01 00:13:02 +00:00
1b891e3457 ChangeLog update 2001-08-01 00:10:25 +00:00
foobar 252e252999 killed some compile warnings 2001-07-31 23:49:08 +00:00
foobar 474da88b4c more ZTS fixes. 2001-07-31 23:47:35 +00:00
Sterling Hughes e7ea61ad98 remove duplicate TSRMLS_FETCH() 2001-07-31 23:44:20 +00:00
foobar 540f428a91 fixed comment.. 2001-07-31 23:34:23 +00:00
Zeev Suraski 15cb7ca021 Fix some warnings 2001-07-31 23:32:24 +00:00
Sterling Hughes 4b00c6b697 Fix ZTS build. 2001-07-31 23:22:19 +00:00
Christian Stocker 32e6c484a8 Moved to the /pear repository 2001-07-31 22:35:20 +00:00
foobar 23cb032fd9 Missing header. 2001-07-31 20:24:43 +00:00
Sterling Hughes 1a5ee49024 ws fix 2001-07-31 19:43:11 +00:00
foobar 1bca4ae723 Remove duplicate function entry. 2001-07-31 19:02:59 +00:00
foobar a440989150 Added help texts for --with-imap-ssl|kerberos. 2001-07-31 14:37:40 +00:00
Tomas V.V.Cox 2c1af4d645 package() now returns the full path of the generated package also improved
windows support (if php getcwd() returns also the drive letter, please test it)
2001-07-31 13:36:54 +00:00
Stig Bakken ae92dc7139 * DB_storage broke when DB_common::query was added, fixed 2001-07-31 07:57:14 +00:00
Zeev Suraski 982cd24aa4 the make Sebastian happy part of the day :) 2001-07-31 07:12:15 +00:00
Zeev Suraski b1de7fc900 More TSRMLS_FETCH annihilation. Enough for today... 2001-07-31 07:09:49 +00:00
Zeev Suraski bc42c37513 More TSRMLS_FETCH work. Got it under 400 now. 2001-07-31 06:28:05 +00:00
Zeev Suraski 0b7fdbb690 More TSRMLS_FETCH work 2001-07-31 06:07:25 +00:00
Zeev Suraski 9be8c97967 Some more TSRMLS_FETCH work 2001-07-31 05:56:26 +00:00
Zeev Suraski aa1772ca72 More TSRMLS_FETCH annihilation 2001-07-31 05:44:11 +00:00
Zeev Suraski 57507b4ea6 More TSRMLS_FETCH annihilation 2001-07-31 05:32:25 +00:00
Zeev Suraski d76cf1da18 More TSRMLS_FETCH work 2001-07-31 04:53:54 +00:00
Zeev Suraski 7bc71f442d build fixes 2001-07-31 03:00:05 +00:00
Zeev Suraski e629be7b5b Fix a crash bug in assert 2001-07-31 02:59:44 +00:00
3f8c890cee ChangeLog update 2001-07-31 00:17:07 +00:00
fa8c3dd293 NEWS update 2001-07-31 00:16:52 +00:00
foobar ace9632276 Make this compile in ZTS mode. 2001-07-30 21:12:48 +00:00
foobar 7a37f532ef Make this extension compile in ZTS mode. 2001-07-30 21:02:27 +00:00
Jason Greene 2b1fe64d46 Removed space type-o
Fixed WS
Added $Id$ tags
Removed already completed TODO from README
2001-07-30 20:51:57 +00:00
foobar 12ae3ac2d7 Use the new TSRM structure. 2001-07-30 20:50:54 +00:00
foobar 75e835017a Make this extension compile in ZTS mode. Also killed 2 compile warnings. 2001-07-30 20:27:11 +00:00
foobar 6ee8e4bccc Make this compile in ZTS mode. 2001-07-30 20:11:28 +00:00
Jason Greene 40c7f09509 Fully implement new thread safe model.
Fix ws.
2001-07-30 19:40:29 +00:00
foobar 3b7bc2535a Make this compile in ZTS mode. 2001-07-30 19:39:26 +00:00
foobar 1594f0967b Killed compile warning. 2001-07-30 17:35:45 +00:00
foobar 3c8b2e6d06 Removed duplicate function entry. 2001-07-30 17:35:29 +00:00
Zeev Suraski bde4e0cedf Fix GD build, and clean it tup 2001-07-30 17:29:57 +00:00
Frank M. Kromann 7020cccef9 Fixing build after implementing the new TSRM structure! 2001-07-30 17:27:08 +00:00
Christian Stocker 410dfbe6a4 moved from the Experimental dir. the basic things should work... 2001-07-30 15:54:28 +00:00
Andrei Zmievski 8fca87adb5 Updated to match TSRM changes. 2001-07-30 15:41:11 +00:00
Thies C. Arntzen 33e059062b @- Bump bundled expat to 1.95.2 (Thies) 2001-07-30 15:10:53 +00:00
Thies C. Arntzen 6627bab38d name-protect new expat function 2001-07-30 15:10:15 +00:00
Thies C. Arntzen b1cc3bd1d6 fix compile 2001-07-30 14:52:16 +00:00
Marc Boeren 859339c1a7 It's been working here for four months now... hardly experimental :) (Mc) 2001-07-30 14:47:00 +00:00
Thies C. Arntzen 0ba0f15256 unneded 2001-07-30 14:42:00 +00:00
Thies C. Arntzen 5f6e3db13f compile fix 2001-07-30 14:25:29 +00:00
foobar 381d4c3143 Make this extension compile thread safe on unixes too.
Also changed all those nice spaces to tabs
#
# Zeev, could you make those changes for this extension too?
#
# And yes, I know I shouldn't mix ws fixes to anything else but
# this was easier to do this way.
2001-07-30 10:09:53 +00:00
Zeev Suraski 9f4c0ae6c0 More TSRMLS_FETCH work 2001-07-30 09:16:46 +00:00
Zeev Suraski d49077f871 Compile fix 2001-07-30 09:05:42 +00:00
foobar 6da55e535b Added missing file 2001-07-30 08:47:21 +00:00
Zeev Suraski c43806f415 Zend compatibility patch 2001-07-30 08:24:42 +00:00
Zeev Suraski 4187439cff More TSRMLS_FETCH work 2001-07-30 07:43:02 +00:00
Zeev Suraski 797a079a95 More TSRMLS_FETCH work, and a bit of cleanup 2001-07-30 06:18:13 +00:00
Zeev Suraski e8ac55d03c More TSRMLS_FETCH work 2001-07-30 06:12:15 +00:00
Andi Gutmans 3baef4690a - Also cache TSRM lookups in thread local storage on Windows. 2001-07-30 05:46:31 +00:00
Zeev Suraski b0224d51da Zend compatibility patch 2001-07-30 05:36:18 +00:00
Zeev Suraski b52554951f More TSRMLS_FETCH work, and get rid of redundant ParametersPassedByRef 2001-07-30 05:34:21 +00:00
Andrei Zmievski 3839af35dc Let's be consisten and keep TSRMLS_DC declaration after num_args. 2001-07-30 05:05:26 +00:00
Zeev Suraski 7b1c400631 More TSRMLS_FETCH annihilation (Zend compatibility patch) 2001-07-30 04:58:07 +00:00
Zeev Suraski 8ce8324e59 More TSRMLS_FETCH annihilation 2001-07-30 04:54:16 +00:00
Zeev Suraski 11e5d2f229 Get rid of more TSRMLS_FETCH's 2001-07-30 02:07:52 +00:00
Zeev Suraski 1c25b8dd53 Avoid TSRMLS_FETCH()'s, and clean up a bit of stale extern's and layout on the way 2001-07-30 01:56:43 +00:00
Zeev Suraski b57703825b Avoid TSRMLS_FETCH()'s (still lots of work left) 2001-07-30 01:48:22 +00:00
Zeev Suraski 0701d68f97 Save TSRMLS_FETCH()'s 2001-07-30 01:46:35 +00:00
0a382bd3dc ChangeLog update 2001-07-30 00:10:02 +00:00
Rui Hirokawa a787dc2c4d changed for input encoding conversion in win32. 2001-07-29 22:15:41 +00:00
Thies C. Arntzen 832849e522 buffer was too small 2001-07-29 20:16:45 +00:00
Andi Gutmans 354f1158d8 *** empty log message *** 2001-07-29 08:40:41 +00:00
Andi Gutmans e3632d5ecd - Yet another one... 2001-07-29 08:35:41 +00:00
Andi Gutmans 51b92451d0 - More object junk 2001-07-29 08:24:38 +00:00
Andi Gutmans c259cb7c1a - Object macros... 2001-07-29 08:22:57 +00:00
Andi Gutmans 442890f3e1 - And more... 2001-07-29 08:20:30 +00:00
Andi Gutmans b99a590be3 - More object macros 2001-07-29 08:14:29 +00:00
Tomas V.V.Cox 1e2d51855c raiseError() now can accepts a PEAR error object in its first argument. With
this, users can "re-throw" a previously created PEAR error object (very
useful after the use of (push|pop)ErrorHandling)
2001-07-29 04:25:33 +00:00
Tomas V.V.Cox fa75ae3394 Added the methods pushErrorHandler and popErrorHandler. With this it's
posible to override the actual error handler with a new one for the time
you need and restore it back when finish.
2001-07-29 03:46:55 +00:00
Jon Parise a0fa32b646 Fix typo. 2001-07-29 01:46:37 +00:00
9e61c801c2 ChangeLog update 2001-07-29 00:12:08 +00:00
Andi Gutmans cf510cb7fd - Fix build 2001-07-28 20:28:29 +00:00
Andi Gutmans ff61394786 - More object macros. 2001-07-28 20:27:32 +00:00
Andi Gutmans 75ba1461dd - Object macros... 2001-07-28 19:29:16 +00:00
Andi Gutmans 5c5178b2f4 - More object macros 2001-07-28 19:23:21 +00:00
Andi Gutmans 13d4670c84 - More object macros 2001-07-28 19:11:05 +00:00
Andi Gutmans a0f5b7495e - More object macro work 2001-07-28 19:02:53 +00:00
Andi Gutmans c8eccca0b1 - More Object macro work. I couldn't test this one so let me know if it
breaks the Windows build.
2001-07-28 18:55:49 +00:00
Andi Gutmans d42f85427a - Use object macros 2001-07-28 18:40:18 +00:00
Andi Gutmans 896eec1ec5 - Use the Z_OBJ* macros for accessing objects 2001-07-28 18:35:22 +00:00
Andi Gutmans b40db64d0d - Small patch to allow fixing the PHP tree to be compatible w/ the initial
- Zend 2 objects patch. Hopefully I can commit that this week.
2001-07-28 18:33:06 +00:00
Rasmus Lerdorf 15ae74d3ba Fix typo 2001-07-28 14:01:24 +00:00
Zeev Suraski 59ffe8db79 Make Sebastian happy... 2001-07-28 12:16:43 +00:00
Zeev Suraski faa12fa06f another build fix, a simple UNIX build now compiles clean 2001-07-28 12:07:25 +00:00
Zeev Suraski dde79b86c5 Build fix 2001-07-28 12:05:15 +00:00
Zeev Suraski 63829bc949 Some more fixes 2001-07-28 12:02:42 +00:00
Zeev Suraski d87cc976e1 Redesigned thread safety mechanism - nua nua 2001-07-28 11:36:37 +00:00
Zeev Suraski b4f3b9d3ce Redesigned thread safety mechanism - nua nua 2001-07-28 10:51:54 +00:00
Zeev Suraski 633a1c30d1 Redesigned thread safety mechanism - nua nua 2001-07-28 10:46:11 +00:00
Alexander Feldman adb1fa5a4c Fixed the config.m4 script to allow the cracklib extension to be properly built
as a shared module.
2001-07-28 07:09:42 +00:00
foobar 2bff935a4f Fix build. This was done by bringing this to the 'PHP 4 era' :) 2001-07-28 03:57:16 +00:00
Joey Smith c5cbe8b3cb nesting_level is now ob_nesting_level in main/php_output.h 2001-07-28 01:31:52 +00:00
Sascha Schumann 28b0a3167b Fix build and add a mips-related preprocessor directive. 2001-07-28 00:49:56 +00:00
Sascha Schumann 6be787a929 Fix build 2001-07-28 00:46:42 +00:00
Sascha Schumann 30892690b3 Remove superfluous returns 2001-07-28 00:44:19 +00:00
1d1f17ff31 ChangeLog update 2001-07-28 00:10:27 +00:00
foobar 74f07c5278 Simplified a bit and made more readable. 2001-07-27 14:26:39 +00:00
foobar 80b09d007f Simplified this a bit and made more consistent. 2001-07-27 14:02:44 +00:00
Alexander Merz ca5fd10e1d Bugfix by Johannes Erdfelt 2001-07-27 11:53:35 +00:00
Zeev Suraski cba5dd7546 Fix release runtime :) 2001-07-27 11:03:32 +00:00
Zeev Suraski 0c9d455a81 Fix release build 2001-07-27 10:53:25 +00:00
Zeev Suraski fe6f8712a4 - Get rid of ELS_*(), and use TSRMLS_*() instead.
- Move to the new ts_allocate_id() API
This patch is *bound* to break some files, as I must have had typos somewhere.
If you use any uncommon extension, please try to build it...
2001-07-27 10:16:41 +00:00
Zeev Suraski 2c254ba762 Get rid of ELS_*(), and use TSRMLS_*() instead.
This patch is *bound* to break some files, as I must have had typos somewhere.
If you use any uncommon extension, please try to build it...
2001-07-27 10:10:39 +00:00
Zeev Suraski 736b4ae43d - Prepare for optimization - use a single fetch for multiple resources
- Clean a bit
2001-07-27 10:08:26 +00:00
Zeev Suraski e280c3e555 Fix a corrupted memory access 2001-07-27 07:37:16 +00:00
73ea4d9ca6 ChangeLog update 2001-07-27 00:11:47 +00:00
Thies C. Arntzen 2649b94449 detect oracle9i 2001-07-26 23:07:45 +00:00
Sascha Schumann 7c43206fb8 Remove unneeded variables 2001-07-26 18:10:38 +00:00
Nikos Mavroyanopoulos 0dec2794d2 Fixes for the module to be reentrant 2001-07-26 10:11:35 +00:00
99ed170fd1 ChangeLog update 2001-07-26 00:10:16 +00:00
56eb7c3b43 NEWS update 2001-07-26 00:10:13 +00:00
Tomas V.V.Cox 538c838ac9 DB::assertExtension-> trigger a useful error message if backend extension couldn't be loaded 2001-07-26 00:01:27 +00:00
Thies C. Arntzen a9e0de3947 @- Improved the stability of OCIPlogon() after a database restart. (Thies) 2001-07-25 22:34:25 +00:00
Daniel Beulshausen 69a4760b48 fix recently discovered api flaws
- nuke first parameter to socket_select (detemine it ourself)
- swap parameters for socket_fd_set, socket_fd_clear & socket_fd_isset
- allow to pass an array of sockets to socket_fd_set + socket_fd_clear
2001-07-25 22:03:55 +00:00
Stig Bakken 082165f198 * added emacs footer 2001-07-25 21:20:31 +00:00
Sascha Schumann d256fbf2b8 Get rid of memchr in SEARCHCR(). 2001-07-25 21:06:01 +00:00
Sascha Schumann 00596b414e Get rid of memchr 2001-07-25 19:02:13 +00:00
Nikos Mavroyanopoulos 81dd2af465 updated ovrimos driver 2001-07-25 13:30:36 +00:00
0dfedc400e ChangeLog update 2001-07-25 00:10:17 +00:00
Andrei Zmievski e308a157bf Remove references to global startup functions. 2001-07-24 23:50:43 +00:00
Zeev Suraski 536a53356d Get rid of the redundant global startup code 2001-07-24 20:30:37 +00:00
Frank M. Kromann 612b3666a9 Add extra check on Delete statements 2001-07-24 18:24:10 +00:00
Harald Radi 050d346cd2 removed duplicate code and changed
code slightly to be compatible with broken
com implementations
2001-07-24 10:42:29 +00:00
Andi Gutmans afaa0085bb - MSHUTDOWN needs to return SUCCESS/FAILURE 2001-07-24 03:52:16 +00:00
57e3e99075 ChangeLog update 2001-07-24 00:10:52 +00:00
Thies C. Arntzen 6c2cfdea43 indention 2001-07-23 17:50:06 +00:00
Thies C. Arntzen b660a9f553 fix newly introduced mem-leak in assert-module 2001-07-23 16:13:34 +00:00
Paul Moosman 22a8e9536a I added code to up the reference count of the database connection
reference. This change fixes bug #11489 in php version 4.0.6.
I derived this fix from the my_sql module.
2001-07-23 16:10:10 +00:00
Sascha Schumann 076f4f5136 Unbreak various tests and transparent session id rewriting for now. This
has been tested extensively.  Most SAPI modules (Apache 1.x, 2.0, thttpd,
AOLserver, CGI, TUX, Caudium, Roxen, NSAPI, Phttpd, Pi3web, Servlet)
call php_request_shutdown() right after php_execute_script (or
equivalent functionality), so that output is possible under an
overwhelmingly number of web-servers.
2001-07-23 14:05:26 +00:00
Phil Driscoll e8e47107d8 uploaded the install.txt version which was shipped with the 4.0.6 windows binary distributions with slight enhancement to cover the issue of dll location. 2001-07-23 09:10:02 +00:00
Sascha Schumann a95101669d Handle file buckets for now; that allows us to pass something to the
engine which it can handle.
2001-07-23 04:50:13 +00:00
Sascha Schumann b677af2265 tsrm_error is only available, if TSRM_DEBUG is defined. 2001-07-23 04:21:11 +00:00
Sascha Schumann 28ecbb213c tsrm_error is only available, if TSRM_DEBUG is defined. 2001-07-23 04:19:32 +00:00
Sascha Schumann c1938e3f13 Portable use of multiple arguments macro without generating lots of
warnings when doing nothing.
2001-07-23 04:16:31 +00:00
Sascha Schumann 36c2353046 Remove accidentially committed line 2001-07-23 02:39:59 +00:00
Sascha Schumann bd573e42ad Call php_request_shutdown only, if the startup was successful. 2001-07-23 02:06:16 +00:00
Sascha Schumann 36be1040eb Use synchronous php_request_shutdown in the standard case and
let the pool cleanup function only become effective, when an
error has occured.

This fixes the problem that the request_conn was already dead
when the request_shutdown was reached.
2001-07-23 01:03:22 +00:00
e5204748f7 ChangeLog update 2001-07-23 00:10:07 +00:00
Hartmut Holzgraefe d3fdc92ff5 these tow fail with "Constant sid already defined" i
too if E_NOTICE error reporting is active
2001-07-22 21:46:39 +00:00
Sascha Schumann 8492ece5f6 While researching a crash-bug in mail(), I found these two goldies.
Replace php_escape_shell_(arg|cmd) with straight-forward implementations.
2001-07-22 21:32:55 +00:00
Daniel Beulshausen c60a6a5bd9 fix date('T') 2001-07-22 13:16:15 +00:00
f91e59ccea ChangeLog update 2001-07-22 00:10:45 +00:00
Andi Gutmans c41418b1b5 - The __FILE__ fix and a couple of other NEWS entries which I forgot to
commit.
2001-07-21 18:33:12 +00:00
Zeev Suraski ef4fe54f0a Always track bailout file/lineno 2001-07-21 16:21:22 +00:00
Zeev Suraski 6fa5ac832f Fix Apache build 2001-07-21 16:18:03 +00:00
Zeev Suraski 5f2da6f219 Fix Release builds 2001-07-21 16:13:46 +00:00
Rasmus Lerdorf cc44119bf6 Left-over outdated comment 2001-07-21 15:51:40 +00:00
Andi Gutmans 7ce1846761 - Shouldn't be needed anymore 2001-07-21 15:13:19 +00:00
Andi Gutmans 4715403906 - Fix __FILE__ in the main script in CGI/command line mode. 2001-07-21 15:11:30 +00:00
Zeev Suraski 336004f4bc Improved bailout mechanism, supports nested bailouts a-la try..catch
Note:  You may *not* return directly from a catch block
2001-07-21 14:27:56 +00:00
Zeev Suraski 931ebe08d7 Improve bailout mechanism, supports nesting of bailouts a-la try..catch 2001-07-21 14:25:27 +00:00
Zeev Suraski 660a09c6da Fix compile warning 2001-07-21 14:18:53 +00:00
Zeev Suraski 20d53346ce Remove redundant code 2001-07-21 12:43:23 +00:00
Holger Zimmermann 7213492b3a Updated 2001-07-21 12:23:23 +00:00
Sascha Schumann 09ce807bf1 Drop memchr() in php_memnstr in favor of manual scanning. This reduces
the complexity of the function and is about 20% faster on Linux/x86.
2001-07-21 03:26:31 +00:00
Andrei Zmievski fc260e6c98 Fix certain cases where inheritance of base class's overloaded handlers wasn't
being done.
2001-07-21 02:35:13 +00:00
Zeev Suraski 38e5a2077d Clarify and optimize 2001-07-21 01:15:18 +00:00
Rasmus Lerdorf bf513871bc Fix more crashes related to this switch to z_value 2001-07-21 00:14:14 +00:00
6d4e4e0cf5 ChangeLog update 2001-07-21 00:09:57 +00:00
Holger Zimmermann 31252e854b Updated 2001-07-20 22:11:13 +00:00
Holger Zimmermann 1b03f89fa0 Updated 2001-07-20 21:10:57 +00:00
Holger Zimmermann a088c2e19d Updated PHP mode, fixed indent mode, added syntax check mode 2001-07-20 21:00:17 +00:00
Sascha Schumann b79aa095f5 Fix last two instances of using ext/standard/php_output.h 2001-07-20 19:42:26 +00:00
Thies C. Arntzen 0453eff2b8 fix include 2001-07-20 19:37:19 +00:00
Zeev Suraski 11c2acc34a Retain downwards compatibility - cool idea Jon :) 2001-07-20 17:10:04 +00:00
Zeev Suraski 3c26459d49 Update NEWS 2001-07-20 15:08:38 +00:00
Zeev Suraski ef9504cafc Fix UNIX build 2001-07-20 15:06:51 +00:00
Zeev Suraski 6f297a370a Fix Windows build 2001-07-20 14:40:30 +00:00
Zeev Suraski 8084d27885 Implement a more granular shutdown mechanism for the executor -
prevent corruption of constants and missing destructions of resources
2001-07-20 14:20:34 +00:00
Zeev Suraski 13ac04b8e5 Avoid getting bailouts on text output during shutdown. Text output is now
'officially' disabled during shutdown (this doesn't change the Apache module
behavior, but may change behavior of other server modules, in which it was
possible to emit output during shutdown;  I think it's a good step towards
consistency, though)
2001-07-20 13:59:00 +00:00
Zeev Suraski cd3acbd785 Fix broken text 2001-07-20 12:22:43 +00:00
Daniel Beulshausen aa032e2e4c fix font handling in vdir mode 2001-07-20 11:25:13 +00:00
Sascha Schumann 4ebcdd9929 Add optional support for using boyer-moore to str_replace. 2001-07-20 01:22:29 +00:00
0b3a7e6546 ChangeLog update 2001-07-20 00:10:16 +00:00
Joey Smith c2e983709a I just got annoyed by this, eventually. :) 2001-07-19 23:36:37 +00:00
Zeev Suraski d68f53e94e Unfix, it has too strong effects 2001-07-19 18:33:22 +00:00
Zeev Suraski ce29cb297e Catch all cases 2001-07-19 15:53:38 +00:00
Marc Boeren 2a661c6114 Added the error-message functionality (new in odbc module) (Mc) 2001-07-19 15:45:56 +00:00
Marc Boeren e8bcbacb3e changed implementation of creating reference to a value by columnname (Mc)
added a test for changing the referenced value (Mc)
2001-07-19 15:44:58 +00:00
Zeev Suraski 01814bb2b8 Fix bug #11970, strike 2 2001-07-19 14:15:50 +00:00
Zeev Suraski 06fc55cc67 Revert bogus patch 2001-07-19 14:11:40 +00:00
Adam Dickmeiss 863062a8be Function yaz_record handles MARC records that have identifers in 00X. 2001-07-19 13:27:58 +00:00
Tomas V.V.Cox 30ec364e49 move the package list handler methods to the new Packlist.php also removed
the unused code
2001-07-19 11:15:48 +00:00
Tomas V.V.Cox e78a175fc0 This class will handle the pear packages database (it's experimental now) 2001-07-19 11:10:28 +00:00
Tomas V.V.Cox 0d629b854a added TODO and checks before try to open the package.xml file 2001-07-19 10:32:06 +00:00
Stanislav Malyshev dfe15ad070 Fix warnings 2001-07-19 08:12:12 +00:00
Sascha Schumann 1734ff698c update 2001-07-19 04:58:44 +00:00
Sascha Schumann ef42a25b42 Fix a serious long-standing bug which deleted the shared memory segment
when an Apache children died.

Dynamically resize hash-table.

The hash key is now stored as part of the hash entry structure which
saves a mm_malloc.

ps_sd_new has been restructured to avoid code duplication.

A bug concerning moving existing entries to the top of a linked list
has been fixed.
2001-07-19 04:16:54 +00:00
0d7c522313 ChangeLog update 2001-07-19 00:11:34 +00:00
Sascha Schumann 664df24d11 Fix GC bug which did not increment the proper variable.
Fix warning regarding the initial hash value.
Use php_uint32 everywhere.
Speedup linked-list traversal by using the hash value.
Degrade linked-list to singledly linked-list.
Allocate a new shared memory buffer, if the data does not fit into the
current one.  Prior to this change, we always allocated a new buffer.
Fix debug prints to be compatible with non-GCC compilers.
NUL-terminate string return values.
2001-07-18 23:18:58 +00:00
Tomas V.V.Cox 9638928317 - Only decompress package once
- Allow relative directory package calls (for ex:
  pear install packs/Pear_DB-1.1.tgz)
2001-07-18 23:13:56 +00:00
Sascha Schumann 9576ab24dd Instead of using the poor system rand() algorithm and the
system-time seed, rely on the long-living LCG to determine
whether to start the GC process.
2001-07-18 22:56:56 +00:00
Sascha Schumann dcc60b7f4a The lcg needs to operate on signed 32-bit integers, so use
the proper php_int32 types here.
2001-07-18 22:55:52 +00:00
Sascha Schumann e8fe8f9d99 Provide typedefs for php_int32 2001-07-18 22:54:55 +00:00
Sascha Schumann eef0dda4da Retire old hash algorithm and use the FNV-1 algorithm. 2001-07-18 21:39:02 +00:00
Harald Radi 3110a58795 fixed a bug in 'case VT_DATE' 2001-07-18 19:56:18 +00:00
Tomas V.V.Cox 65af9358cd - remove the xml parser code (use PEAR_Common::infoFromDescFile)
- added the new package.xml Dir tag support
- killed many bugs and warnings

(as it is quite usable yet, work is still in progress)
2001-07-18 17:29:09 +00:00
Tomas V.V.Cox 97c0042c04 - always write a the package definition file as 'package.xml' inside the package
- other clean-up's
2001-07-18 17:13:38 +00:00
Tomas V.V.Cox 073f9ec70f killed some warnings 2001-07-18 17:11:28 +00:00
Stanislav Malyshev f0c879bb26 Make variables receiving long be long
Fix binary (x,o,b) formats - they should not be signed
2001-07-18 16:48:52 +00:00
Stanislav Malyshev db97aea8d9 fix double->long conversion 2001-07-18 16:46:51 +00:00
Stanislav Malyshev e2a7a6b0f6 Prevent cURl from always outputting the header. Fix bug #12018 2001-07-18 10:47:54 +00:00
Jon Parise dc5e76ec57 Private members don't have to be functions. 2001-07-18 00:27:15 +00:00
be10830fda ChangeLog update 2001-07-18 00:10:01 +00:00
2e3155620a NEWS update 2001-07-18 00:09:58 +00:00
Jon Parise 28d5698523 Woops, missed a closing paren. 2001-07-17 23:56:46 +00:00
Jon Parise 36868ff301 Describe the standards for function naming and private methods. 2001-07-17 23:55:10 +00:00
Tomas V.V.Cox c75f153daa Oops, said include but do require (thanks Jon and Rasmus) 2001-07-17 20:46:16 +00:00
Tomas V.V.Cox bed51fa581 - Removed the xml parser code (use now PEAR_Common::infoFromDescriptionFile())
- Added the ability to build packages without the need of being in the same
  dir as the package.xml file (f.ex: pear package ./mypack/package.xml)
- Removed methods log() and mkdirHier() as they are now in Common.php
- More debug code and error checks
2001-07-17 19:21:55 +00:00
Tomas V.V.Cox 5cb96db143 moved methods log() and mkdirHier() from Packager/Installer to here 2001-07-17 19:13:40 +00:00
Tomas V.V.Cox 55c6e37956 include only the needed files 2001-07-17 19:11:48 +00:00
Jason Greene 6034e5161d Forgotten Include.
This should fix the windows build (though I currently don't have a way to test it)
2001-07-17 16:56:51 +00:00
Rasmus Lerdorf 9bc97ac865 Add always_populate_raw_post_data ini directive and default it to 0 to
maintain current behaviour.  If this is turned on then $HTTP_RAW_POST_DATA
is always populated with a copy of the raw post data.
@ - Add config option (always_populate_raw_post_data) which when enabled
@   will always populate $HTTP_RAW_POST_DATA regardless of the post mime
@   type (Rasmus)
2001-07-17 16:46:07 +00:00
Andi Gutmans 6bd084cb0a - Remove unused code 2001-07-17 16:10:15 +00:00
Chuck Hagenbuch 20a61a49ca fix problem with static usage... 2001-07-17 16:01:16 +00:00
Joey Smith 5f2d12c3bc Be consistent with hashed_details behavior. 2001-07-17 08:16:58 +00:00
Jason Greene 8eb5a4b856 @Added support for socket and popen file types to ftp_fput (Jason) 2001-07-17 05:53:03 +00:00
18463f52a8 ChangeLog update 2001-07-17 00:10:19 +00:00
Zeev Suraski a9915bf69a Another layout fix 2001-07-16 20:43:18 +00:00
Zeev Suraski b6064e5d3e Fix layout
Guys - when submitting patches - please make sure you're not breaking
the layout of the code!  It's not less important than the patch
itself.
2001-07-16 20:42:49 +00:00
Tomas V.V.Cox e3e8ae44c7 extend infoFromDescriptionFile() to:
- Handle the new FileList->Dir tag format (see
http://marc.theaimsgroup.com/?l=pear-dev&m=99071271521558&w=2)
- Attributes of Files can inherit from Dir
- Support for the experimental LibFile/LibName/Sources tags

other indents and fixes
2001-07-16 18:01:09 +00:00
Zeev Suraski 43ebb86806 Fix bug #10287 - avoid crashing under a bogus usage of list() 2001-07-16 15:48:31 +00:00
Stanislav Malyshev cdf0532ad3 Make read always 0-terminate strings 2001-07-16 15:44:36 +00:00
Zeev Suraski ba1249dc8e Fix the crash Joey found 2001-07-16 13:48:07 +00:00
Zeev Suraski 407fd77c20 Generalize 2001-07-16 13:31:55 +00:00
Zeev Suraski 1c27165161 Add a useful #define 2001-07-16 13:31:22 +00:00
03b6b37157 ChangeLog update 2001-07-16 13:17:45 +00:00
Andrei Zmievski f8180ef58b Fix NEWS. 2001-07-16 13:09:55 +00:00
Stanislav Malyshev b028410760 Add credits to GMP 2001-07-16 12:45:36 +00:00
Zeev Suraski fb532ba52b Fix bug #10467 2001-07-16 11:41:06 +00:00
Joey Smith f272469b4c Close Bug #10235.
This makes domxml_root() work again. It now works
equally as well as object method or a simple function.
2001-07-16 11:16:44 +00:00
Rasmus Lerdorf 721c562e2a Fix a couple of build warnings 2001-07-16 04:31:13 +00:00
1d5f1bb464 ChangeLog update 2001-07-16 00:10:10 +00:00
618fa10e6f NEWS update 2001-07-16 00:10:07 +00:00
Stig Bakken 8406547fdb (PEAR DB) some doc fixes 2001-07-15 22:54:08 +00:00
Zeev Suraski 2edcf835ed Update cast 2001-07-15 22:49:25 +00:00
Zeev Suraski 1c2893a1b9 Minor cleaning 2001-07-15 22:48:04 +00:00
Zeev Suraski ec6c9f67c4 Optimize the parser a bit 2001-07-15 19:24:32 +00:00
Zeev Suraski d1ac05a850 Fix warning 2001-07-15 19:14:25 +00:00
Zeev Suraski 0078ceec19 Fix an inline 2001-07-15 19:08:32 +00:00
Zeev Suraski 94f5950438 Get rid of var_uninit() 2001-07-15 19:03:04 +00:00
Zeev Suraski c4f2e0197b Time to bid this old timer goodbye - get rid of var_uninit() 2001-07-15 19:02:20 +00:00
Zeev Suraski 563aacdb66 Fix bug #6239 2001-07-15 18:57:43 +00:00
Zeev Suraski 73f488b323 Allow indirect reference to method names in class::method() construct 2001-07-15 18:39:14 +00:00
Zeev Suraski 9bd9862451 Fix bug #10257 2001-07-15 17:48:50 +00:00
Zeev Suraski 553505cb61 Fix bug #11970 2001-07-15 16:51:30 +00:00
Zeev Suraski 0c49166197 Fix bug #9884 2001-07-15 16:22:41 +00:00
Zeev Suraski 85b4df53c0 Improved interactive mode - it is now available in all builds, without any significant slowdown 2001-07-15 14:08:58 +00:00
Zeev Suraski 4e1c65b42b Fix an inline 2001-07-15 14:08:23 +00:00
Zeev Suraski ab30c8cca3 Early initialization 2001-07-15 12:24:10 +00:00
Zeev Suraski ab7f5ee038 Fix a crash with the new check-in-cwd code. It will now work only
with files which are included in runtime, and not files which are opened at startup (e.g., php.ini)
2001-07-15 12:24:06 +00:00
Zeev Suraski 54d6837b4b 2nd bug in the same line 2001-07-15 12:22:11 +00:00
Zeev Suraski c77ed81803 remove bogus & 2001-07-15 12:02:58 +00:00
Zeev Suraski ee19afea96 Make bailouts valid at request_startup 2001-07-15 11:53:18 +00:00
Stig Venaas eabe8fcf8d Fixed memory leaks in ldap_get_entries() and ldap_get_dn() when using
RFC1823 API
# These leaks have always been there, will fix in PHP3
@- Fixed various memory leaks in the LDAP extension (Stig Venaas)
2001-07-15 11:12:28 +00:00
393d7676eb ChangeLog update 2001-07-14 23:10:30 +00:00
02c5c3dd46 NEWS update 2001-07-14 23:10:25 +00:00
Andi Gutmans fbc8f3f51d - Faster without calling strlen() 2001-07-14 16:41:58 +00:00
Rasmus Lerdorf 8406c2d682 Fix for bug #11632 2001-07-14 15:08:36 +00:00
Andrei Zmievski a462cb5088 Fix NEWS. 2001-07-14 14:26:56 +00:00
Wez Furlong 36e008ee66 Fix for bug #12065
# Was that it??
2001-07-14 12:59:46 +00:00
Thies C. Arntzen 3db0b1813a clearify ocisetprefetch 2001-07-14 12:45:42 +00:00
b594f4a34d ChangeLog update 2001-07-14 01:42:40 +00:00
c4adb5ed84 NEWS update 2001-07-14 01:42:34 +00:00
7ea8914c95 ChangeLog update 2001-07-13 23:10:03 +00:00
Boian Bonev e0b3fd8cd1 replaced add_index_string with add_next_index_string
made vpopmail_alias_get_all return sane result
2001-07-13 20:45:19 +00:00
James E. Flemer 771e3e498f o Fixed Bug #12121: chdir and safe_mode
- [ main/safe_mode.h ] added new checkuid mode:
    CHECKUID_ALLOW_ONLY_FILE: skips directory check if file check
	fails

  - [ ext/standard/dir.c ] changed php_checkuid() to use
    CHECKUID_ALLOW_ONLY_FILE instead of CHECKUID_ALLOW_ONLY_DIR

  - [ main/safe_mode.c ] added code for new checkuid mode

o Fixed Bug #12119: safe mode owner check can be bypassed with symlink
  - [ main/safe_mode.c ] use VCWD_REALPATH to resolve destination
    of symlink before trimming filename

o New Feature: safe_mode_include_dir (php.ini directive)
  - Allows bypassing UID/GID checks when including files
    from the directory in safe_mode_include_dir and its
	subdirectories. (safe_mode must be on, directory must
	also be in include_path or full path must be used when
	including)

o Fixed Feature: safe_mode_gid (php.ini directive)
  - Correctly check (and report) UID/GID bits on directories

o Changed include() fall back to scripts cwd implementation
  - CWD added to the (local) search path in php_fopen_with_path()
    instead of seperate case. [ main/fopen_wrappers.c ]
2001-07-13 18:21:21 +00:00
Rasmus Lerdorf b9325a36a8 Fix for #11941 2001-07-13 17:13:00 +00:00
d0d86ac127 ChangeLog update 2001-07-13 17:07:29 +00:00
Rasmus Lerdorf df965e200c Add fdf_set_encoding() 2001-07-13 16:58:09 +00:00
Sterling Hughes f00791ce24 add missing break statements. 2001-07-13 16:44:44 +00:00
Sascha Schumann 3dd33fdede Fix xmlrpc_error:number handling 2001-07-13 16:08:39 +00:00
Thies C. Arntzen 15f55b5e56 change test-name 2001-07-13 15:49:18 +00:00
Thies C. Arntzen d30590369a make sure all string from zlib are \0 terminated.
change one realloc to erealloc (though this code is never reached IMHO)
add regression tests
2001-07-13 15:48:37 +00:00
Thies C. Arntzen 11eca11dca fixed #12091. added \0 bytes at EOS in a few cases. 2001-07-13 15:19:17 +00:00
Thies C. Arntzen ba17fadbfb @ - Fixed crash in iptcparse() if the supplied data was bogus. (Thies) 2001-07-13 14:35:05 +00:00
Thies C. Arntzen 742c5c8e03 . 2001-07-13 12:20:13 +00:00
Zeev Suraski f63367bf16 layout 2001-07-13 12:08:32 +00:00
Thies C. Arntzen 7b7e72d1d2 the resource-lists are now destroyed backwards. this will make sure that
resources get destroyed in the opposite order they were created and thereby
db-cursors will always be released before their corresponding connection etc.
this sould not break anything!
2001-07-13 12:05:47 +00:00
Thies C. Arntzen 249c010d92 make regession test of session work without the ugly hack in session.c
and removed that ugly hack.
2001-07-13 10:32:37 +00:00
Rasmus Lerdorf 65c8679b26 Fix for bug #12081
@ - Fix return value for a failed snmpset() - now returns false  (Rasmus)
2001-07-13 05:21:37 +00:00
Rasmus Lerdorf 60c8e4409f Add port support to snmp functions
@ - Add hostname:port support to snmp functions
@   (nbougues@axialys.net, Rasmus)
2001-07-13 05:09:40 +00:00
Rui Hirokawa 86ae8add13 added an option to support utf-8 in pcre. 2001-07-13 03:37:18 +00:00
John Donagher 84cc39ea5f Quote grep patterns to avoid shell interpretation 2001-07-13 01:46:31 +00:00
Frank M. Kromann cbfe23b99b Fixing bug when using select unique from <table>
The value was not returned to the script
2001-07-12 22:43:25 +00:00
b1cce8f4bd ChangeLog update 2001-07-12 22:10:30 +00:00
Tomas V.V.Cox 51c54c45bd added DB_PARAM_MISC constant to use in prepare/execute 2001-07-12 11:14:12 +00:00
Sascha Schumann 87d99aa93c Allow extensions to define custom prealloc sizes 2001-07-11 23:13:55 +00:00
Sterling Hughes fc729b7cd5 Herr sascha's reccomendation. 2001-07-11 23:03:24 +00:00
1e9649b6db ChangeLog update 2001-07-11 22:10:33 +00:00
Sterling Hughes f76c42688d Return proper length, thanks for excellent reports by Colin. 2001-07-11 18:10:52 +00:00
Zeev Suraski 87e3924379 Remove the last couple of bogus inlines 2001-07-11 17:18:22 +00:00
Zeev Suraski 66c8b08efa Remove unreferenced variable 2001-07-11 17:10:13 +00:00
Andi Gutmans b98acd61f1 - Move inline_zend_hash_func() to header file 2001-07-11 16:16:08 +00:00
Thies C. Arntzen 5676e5ad05 use ZVAL_* macros 2001-07-11 15:27:37 +00:00
Thies C. Arntzen bbe83e4f29 gzencode() now zero-terminates its buffer. 2001-07-11 15:26:42 +00:00
Daniel Beulshausen 223c0a2f7d fix handle dup. 2001-07-11 15:10:56 +00:00
Hartmut Holzgraefe 319149fd8b workaround to make ext/session well behaved with 'make test' and E_ALL 2001-07-11 13:46:11 +00:00
Hartmut Holzgraefe e15d0193d9 cleanup in preparation for session_readonly() 2001-07-11 13:27:27 +00:00
Hartmut Holzgraefe 800b863310 once again, make test would not work right with error_reporting=E_ALL 2001-07-11 13:19:07 +00:00
Thies C. Arntzen 0ef0f8e32b ZVAL_BOOL(v,0) -> ZVAL_FALSE(v) 2001-07-11 12:42:25 +00:00
Thies C. Arntzen 07ea068454 fixed ZVAL_FALSE and ZVAL_TRUE 2001-07-11 12:40:29 +00:00
Stanislav Malyshev 6cf5e7f9f7 No hashpjw anymore, but we have zend_hash_func 2001-07-11 12:20:07 +00:00
Stanislav Malyshev adc98200d6 More correct pseudo-fix
# This is not really a fix. This thing is still broken. I will think on
# how to really fix it. Any suggestion is *welcome*.
2001-07-11 11:45:05 +00:00
Zeev Suraski 66d94bc655 Nuke zval_reset 2001-07-11 11:39:10 +00:00
Zeev Suraski 4cc86259dd Get rid of ZVAL_RESET... 2001-07-11 11:35:11 +00:00
Tomas V.V.Cox dc60b4d466 added LOCK/UNLOCK to mainps queries (reported by Erik Hjortsberg) 2001-07-11 11:03:27 +00:00
Zeev Suraski d70ce7be27 var_reset -> ZVAL_RESET 2001-07-11 09:39:09 +00:00
Zeev Suraski ed542331b7 Get rid of some inlines 2001-07-11 09:33:41 +00:00
Shane Caraveo ff4dfc56f2 prevent php from crashing when serializing circular data.
This script produced the crash.
<?
$hash["test_key"] = "test_value";
$hash["hash_key"] = &$hash;
echo serialize($hash);
?>
2001-07-11 05:57:18 +00:00
Andrei Zmievski b5dfb0d540 Wrap lines. 2001-07-11 04:13:34 +00:00
Andrei Zmievski 44de304a5f Modified to work with the new parameter parsing API as a demonstration. 2001-07-11 03:58:51 +00:00
55f4d0011b ChangeLog update 2001-07-11 01:20:26 +00:00
Sterling Hughes dd3a7680ca fix. 2001-07-11 01:06:09 +00:00
Frank M. Kromann 94e6db966b changed return value from fbsql_query to be booloan 2001-07-10 23:39:39 +00:00
Frank M. Kromann ad8150b3a9 Fixing return value from fbsql_query after a DELETE FROM with success. 2001-07-10 22:34:24 +00:00
Tomas V.V.Cox 2bf0a0e5af added NEED_MORE_DATA error message to $errorMessages 2001-07-10 21:49:51 +00:00
Andi Gutmans 2d9c29a31a - Nuke fprintf() 2001-07-10 20:40:56 +00:00
Andi Gutmans 4b54140a35 - Commit patch which checks for an include file in the calling scripts'
current working directory if everything else fails (include_path).
- Right now this also effects things like opening php.ini. It'll now always
  check in the current working directory for php.ini. I think this doesn't
  screw up todays behavior.
2001-07-10 20:38:39 +00:00
Sterling Hughes 203ea6c51d # I think i am quite stupid. 2001-07-10 20:31:49 +00:00
Andi Gutmans 2f8fa8cf21 - Merge faster hash implementation.
- The hash function parameter in hash_init(...) is not used anymore.
- It should be removed but it is "to be decided" if we want to do that now
- or in a major version as it means changing MANY places and third party
- modules might stop working.
2001-07-10 20:31:42 +00:00
Sterling Hughes 5e4e376571 If the transfer fails, still free the buffer if it exists. 2001-07-10 20:09:56 +00:00
Zeev Suraski fa684c5bd4 Whitespace 2001-07-10 18:49:47 +00:00
a928a2422b ChangeLog update 2001-07-10 17:11:00 +00:00
5cf89d6dd0 NEWS update 2001-07-10 17:10:53 +00:00
Sascha Schumann a2ce3c7068 Allow errors to be returned as XMLRPC fault packets.
Submitted by: Matt Allen <matt@investigationmarketplace.com>
2001-07-10 15:59:33 +00:00
Rasmus Lerdorf 043ec51eb0 manual update 2001-07-10 14:35:25 +00:00
Zeev Suraski 4bbb8a001e Fix a couple of buffer overflows in mcrypt.c 2001-07-10 12:57:28 +00:00
Tomas V.V.Cox 48cbbbb3db minor in-line doc fix 2001-07-10 11:55:15 +00:00
Thies C. Arntzen bcddfd474a cleaned up the RETVAL_ RETURN_ and ZVAL_ macros
added check for \0 at end-of-string at some places. all strings in PHP
have to be terminated with \0 because 3th party libraries might not be
binary-safe.
2001-07-10 08:20:20 +00:00
Andi Gutmans 6297cd26e2 - Commit Thies' patch. str.len was too long. 2001-07-10 05:02:50 +00:00
Rasmus Lerdorf 45d71e2951 Make range() function smarter
@ - Improve range() function to support range('a','z') and range(9,0)
@   types of ranges.  (Rasmus)
2001-07-09 20:36:47 +00:00
Rasmus Lerdorf 89a73df39c Fix Windows build (I think) 2001-07-09 18:57:19 +00:00
Andrei Zmievski f42519ffbd *** empty log message *** 2001-07-09 18:54:59 +00:00
Andrei Zmievski 58f88057b1 Adding new parameter parsing API. 2001-07-09 18:51:29 +00:00
Thies C. Arntzen 9f3110ea32 fix newly introduced SEFAULT. 2001-07-09 18:01:18 +00:00
Sascha Schumann aee2ff3ec9 __USE_GNU should not be defined by an application. 2001-07-09 17:44:07 +00:00
Rasmus Lerdorf 934e10c7dc Add getmygid() and safe_mode_gid ini directive to allow safe mode to do
a gid check instead of a uid check.
@ - Add getmygid() and safe_mode_gid ini directive to allow safe mode to do
@ a gid check instead of a uid check. (James E. Flemer, Rasmus)
2001-07-09 17:36:04 +00:00
Derick Rethans 9869ecc9b7 - Added php_escape_shell_arg to the header file 2001-07-09 17:02:50 +00:00
Daniel Beulshausen 112b9062ff adopt shane's popen patch 2001-07-09 16:44:40 +00:00
Thies C. Arntzen 61822fcd47 @ - assert() now accepts the array(&$obj,"methodname") syntax. (Thies)
+ some cleanups
2001-07-09 10:20:41 +00:00
Thies C. Arntzen e7b01fc53c added test for assert 2001-07-09 09:08:14 +00:00
Thies C. Arntzen 08546ef0e8 changed to use Z_* macros 2001-07-09 09:04:19 +00:00
Thies C. Arntzen 1be0975dff added test for serialize
changed var.c to use Z_* macros
2001-07-09 09:03:06 +00:00
Thies C. Arntzen 6708768c07 xml_utf8_encode: make sure the returned data is zero-terminated 2001-07-09 06:49:34 +00:00
Thies C. Arntzen 1e3553bd42 use erealloc for zvals! 2001-07-09 06:48:15 +00:00
Sascha Schumann 28efce4019 Reset strtok_string, so that strtok can be used in all session handler
functions.
2001-07-08 23:28:48 +00:00
Shane Caraveo fd2c27c061 Enable using an external mailer under windows.
1. this depends on the patch to fix tsrm I sent to dev
2. this provides backwards compatibility, as long as sendmail_path in the ini file is empty, the old internal mailer will be used, once sendmail_path is defined, the external sendmail program will be used.

I tested with indigomail from www.indigostar.com, which provides the same command line interface as sendmail no linux.
2001-07-08 22:30:11 +00:00
Sascha Schumann 69d129bdfb Needed for the prototype of php_escape_shell_cmd(). 2001-07-08 19:09:59 +00:00
Thies C. Arntzen 423613f4ee @ - Make sure that OCI8 outbound variables are always zero-terminated. (Thies) 2001-07-08 12:37:08 +00:00
Joey Smith cd9fe169e1 This should get xmldocfile() working again.
This should fix bugs:
11192, 10899
2001-07-08 00:54:25 +00:00
Sebastian Bergmann 88e45cfd36 Convert double-quotes to single-quotes. 2001-07-07 23:15:08 +00:00
Andi Gutmans 6f3f47eaa9 - Fix off by one error in allocating command line (by Shane) 2001-07-07 20:00:35 +00:00
Martin Jansen 7efccca429 * reverted "DIRECTORY_SEPARATOR" patch 2001-07-07 15:54:27 +00:00
Martin Jansen 9899ec9bef * added missing constant 2001-07-07 12:45:20 +00:00
Tomas V.V.Cox d1d7432da4 addes more logging and security options 2001-07-07 00:25:39 +00:00
Tomas V.V.Cox 0fe40d53b0 whitespaces 2001-07-06 19:23:41 +00:00
Jason Greene be8b7f9981 Signal numbers are not uniform accross all platforms.
Modified test to use the constants unless a failure occurs.
2001-07-06 18:30:38 +00:00
Daniel Beulshausen 805c76f742 fix dsp (?) 2001-07-06 17:53:02 +00:00
Dan Kalowsky eb7b11ce2e Making --with-openlink work the same as --with-iodbc for it's eventual
disappearing act.
#  As requested by the Openlink Software people
2001-07-06 14:30:34 +00:00
Rui Hirokawa 7dcb3cdfbd fixed argument number in mb_send_mail(). 2001-07-06 13:21:47 +00:00
Rui Hirokawa 659282bfbc fixed argument number in mb_send_mail(). 2001-07-06 13:19:36 +00:00
Sascha Schumann dda5663549 Fix Unix build (AC_ADD_* -> PHP_ADD_*) 2001-07-06 11:51:11 +00:00
Christian Stocker f74079c8cc Patch by Tobias, so parseInput returns pearError 2001-07-06 10:24:12 +00:00
Daniel Beulshausen fb30f1b067 enable get*by* networking functions + remove comments 2001-07-06 09:53:39 +00:00
Daniel Beulshausen 0568236d13 fix win32 build 2001-07-06 09:51:03 +00:00
Jason Greene 14646bf08e Fix proto's and some ws ugliness 2001-07-06 06:00:51 +00:00
Jason Greene 0bfa63490d Added wait.h functionality to pcntl
Added tests for such functionality
Removed bogus files
2001-07-06 05:48:52 +00:00
Joey Smith 08d1178d6e Be consistent across all cases. 2001-07-06 01:21:55 +00:00
Hartmut Holzgraefe 7b9b542af3 experimental db++ database support 2001-07-06 00:04:03 +00:00
Hartmut Holzgraefe 46265b64ce preliminary documentation for db++ support in ext/dbplus 2001-07-05 23:58:53 +00:00
Sean Bright 9d05cba6b8 This should be lower-cased per the documentation and previous
implementation.
2001-07-05 23:29:11 +00:00
Jason Greene 2b8945965b Check for getpgid (torben@php.net) 2001-07-05 22:01:42 +00:00
Wez Furlong 79ce305d1a Made imagegammacorrect() work on true-color images.
Added support for new ImageStringFTEx function (due in GD 2.0.2).
2001-07-05 21:23:28 +00:00
Wez Furlong 8ca519ca88 Change a load of E_ERRORS into E_WARNINGs; it was being a bit too severe,
which meant that scripts could not identify (or even display) errors before
PHP bailed out.
2001-07-05 21:18:21 +00:00
Frank M. Kromann 37cd3e026c Optimizing the mssql_execute function. 2001-07-05 19:17:33 +00:00
Wez Furlong 4948cb1691 More ifdefs, just in case. 2001-07-05 10:53:15 +00:00
Wez Furlong ca9c4b3753 Added loads of #ifdefs; should fix Bug #11889. 2001-07-05 10:49:58 +00:00
Wez Furlong 9b889bef19 Added name for enum, hopefully fixing the win32 build. 2001-07-05 09:55:13 +00:00
Derick Rethans 832fe2e636 - Fix for the first part of Bug #11890
@- Fixed a bug that allowed users to spawn processes while using the 5th
@  parameter to mail(). (Derick)
2001-07-05 08:47:37 +00:00
Jason Greene e48bc17c58 Fix build on linux
Heads up Wez
2001-07-05 07:12:28 +00:00
Jason Greene d4391dcdd8 no need to implement these functions, already in posix module 2001-07-04 22:02:00 +00:00
Jason Greene 7f2fa9fea7 Actually check for the needed system calls.
Currently require sigaction, fork, waitpit.
2001-07-04 21:51:22 +00:00
Sascha Schumann ef13ab5750 Improve url scanner speed (up to 40% for large chunks of data)
and handle some corner cases better.  The scanner has been changed
to the format as proposed in "RE2C - A More Versatile Scanner Generator"
by Cowan et al.
2001-07-04 15:30:21 +00:00
Nikos Mavroyanopoulos 98b1d4bbf4 fixes in source documentation 2001-07-04 13:33:11 +00:00
Christian Stocker d153a17da3 stupid missing semicolon 2001-07-04 11:24:49 +00:00
Wez Furlong a07a26888e Added a couple of new functions to "modularize" working with calendars.
Added a few constants for the existing functions, and tidied them up a bit.
2001-07-04 10:12:45 +00:00
Wez Furlong f1364ebf3e (PHP nl_langinfo) Added function when provided by OS
(PHP htmlentities, htmlspecialchars) Uses nl_langinfo to determine charset
@- Added nl_langinfo() (when OS provides it) that returns locale
   information. (Wez Furlong)
# There are a lot of constants used by nl_langinfo; should we do something
# along the lines of what we do for syslog?
2001-07-04 10:10:30 +00:00
Rasmus Lerdorf 649d14ae79 Stick open_basedir in here 2001-07-04 03:53:12 +00:00
foobar 7adb7db038 This works better. 2001-07-03 21:09:16 +00:00
Frank M. Kromann 6c20b4de53 This module is no longer experimental 2001-07-03 18:45:11 +00:00
Rui Hirokawa f90580caf1 fixed an argument in example of ext/xslt. 2001-07-03 16:59:46 +00:00
Rainer Schaaf b18dd1bab3 - fixed bug in pdf_open_image_file when using images as masks.
- clean up some comments
2001-07-03 14:35:08 +00:00
Sterling Hughes 6809bcf2b5 Small fixes. 2001-07-03 12:16:03 +00:00
Christian Stocker 51a4c0ceb6 Write-Patch by Alexander for bug reported by Yavor 2001-07-03 09:34:35 +00:00
Rasmus Lerdorf fb8e614690 Trivial fix - but the period looks odd in error messages 2001-07-03 04:18:38 +00:00
Zeev Suraski 551f1831a7 Fix a major thread safety bug in the output mechanism
@- Fixed a major memory corruption bug in the thread safe version (Zeev)
2001-07-02 18:17:10 +00:00
foobar 610ebfe3de Missing constant. 2001-07-02 12:49:21 +00:00
Ben Mansell c053f12207 Fix FastCGI shutdown for MacOSX, it didn't want to die. 2001-07-02 12:37:47 +00:00
Sterling Hughes 4dc55c14a4 Fix possible corruption problem with curl_errno() and curl_error() 2001-07-02 12:08:21 +00:00
Sterling Hughes d097b0ed86 Fix mispell. 2001-07-02 11:56:08 +00:00
Derick Rethans 91424b2b91 - Fixed proto's (Patch by Zak) 2001-07-02 11:11:58 +00:00
Christian Stocker a65e4e91a1 Moved Config-Package from Experimental to main-directory, since noone complained about it ;) 2001-07-02 09:14:28 +00:00
Rui Hirokawa 30ca718935 fixed a link problem of shared extension module in ext/xslt. 2001-07-02 01:55:43 +00:00
Daniel Beulshausen 4aa6ae493e PHPAPI-ize php_var_* functions
# need this for shm*
2001-07-01 20:18:51 +00:00
Daniel Beulshausen 8934c1eb6a fix some popen trouble 2001-07-01 20:08:21 +00:00
Sebastian Bergmann 512f6af726 Fix for #11821. 2001-07-01 14:15:49 +00:00
Sean Bright 55fecbab76 Remove unused variable. 2001-07-01 14:07:44 +00:00
Sascha Schumann da3b899dd8 mhash_keygen_s2k() overwrote the limits of a statically allocated buffer
for long salts.  We truncate the salt now appropiately.

PR: #11817
2001-07-01 11:20:56 +00:00
Sean Bright 1b0356e0f7 Fix for bug #11796. Also, fixed a problem in get_meta_tags that required
NAME and CONTENT to be in that order.  Meta tags with no CONTENT attribute
are now added to the array as empty strings.  Meta tags with no NAME
attribute are ignored.
2001-06-30 20:07:12 +00:00
Ben Mansell d5cf0abac3 Make the FastCGI module behave nicer when trying to shut it down. If you
kill the parent process, then it will kill all its kiddies for you.
Also, now refuses to run as a CGI (since it doesn't work that way), and
corrected a few debug messages.
2001-06-30 17:03:52 +00:00
Sascha Schumann 35c310252d Test commit 2001-06-30 13:25:13 +00:00
Andi Gutmans 55687ca216 - Fix the memory limit fix. 2001-06-30 07:58:34 +00:00
foobar 61b28c586a If no backend is specified, bail out. 2001-06-30 00:48:35 +00:00
foobar c493c298d4 Now all these options should behave the same. 2001-06-30 00:38:06 +00:00
Andi Gutmans af089a2938 - Remove bogus comment. 2001-06-29 20:42:02 +00:00
Hartmut Holzgraefe 7f08918b87 suppress sending of cookies if session id already came
from a non-cookie source
2001-06-29 05:27:57 +00:00
foobar bc3482d65f Fixed bug: #11728. Error message was cleared before outputted in pg_pconnect() 2001-06-29 03:12:06 +00:00
foobar 5c8035e346 This file needed an update.. 2001-06-29 02:32:19 +00:00
Zeev Suraski 3eb6d65ece Fix memory_limit, kill warning 2001-06-29 00:36:34 +00:00
Zeev Suraski 446567cb26 Fix warnings 2001-06-28 23:40:44 +00:00
Zeev Suraski 7d66eeb046 standard .h protection 2001-06-28 23:28:25 +00:00
Derick Rethans 3b66803260 - Fix for bug #11775: Typo in cpdf.c 2001-06-28 21:59:26 +00:00
Harald Radi 851d401e23 changed CLSIDfromProgId to CLSIDfromString 2001-06-28 21:26:20 +00:00
Frank M. Kromann a98efcda76 Adding new function to convert from binary to GUID format 2001-06-28 16:59:17 +00:00
foobar 5884ff3412 let this be more userfriendly. 2001-06-28 15:16:28 +00:00
Dan Kalowsky c0d6e07c8b added in note to fix for odbc_fetch_into
# could have sworn i did this before... but ahh well..
2001-06-28 14:28:27 +00:00
Zeev Suraski c458e960e0 Update NEWS, test cvs commit 2001-06-27 20:04:39 +00:00
Zeev Suraski a71df1c158 Update NEWS, test new CVS server 2001-06-27 19:58:02 +00:00
Zeev Suraski 2536259557 Fix leak in the patch, and revert a couple of lines I didn't mean to commit 2001-06-27 15:47:31 +00:00
Zeev Suraski ee115c8ecc - Warn about illegal offsets
- Allow assignments to uninitialized string offsets (automatically pads the
  string with spaces)
2001-06-27 15:40:49 +00:00
Zeev Suraski 44e75b6cdd Fix UNC path handling 2001-06-27 14:30:02 +00:00
Sterling Hughes 540391326c # leftovers 2001-06-26 22:49:54 +00:00
Sterling Hughes abd3b1543c Making logging optional. 2001-06-26 22:48:44 +00:00
Zeev Suraski 5e99993058 Fixed autoconversion of negative values to double (Fix bug #11685) 2001-06-26 21:11:35 +00:00
Joey Smith eaaf36b65e Make info look more like mysql's output. 2001-06-26 21:00:13 +00:00
Joey Smith d4881848a3 Added charset support. 2001-06-26 20:56:03 +00:00
Zeev Suraski f35b85b4c1 Fix bug #11678 2001-06-26 18:30:31 +00:00
Sterling Hughes 8133703841 special offer... 0 out a structure, and remove a crash bug...
# Offer only available between 6/30/2001 - 7/14/2001, Exclusively for
# cvs committers
2001-06-26 18:20:28 +00:00
Andi Gutmans b70eeddc70 - Fix crash bug (fix by Jani). 2001-06-26 15:19:47 +00:00
foobar d3eff417f6 fix bug: #11693. Some systems have crypt() in libc. 2001-06-26 14:36:45 +00:00
Zeev Suraski 49d1e26143 Fix Win32 build 2001-06-26 13:33:24 +00:00
foobar 0b7bf00cfc Simplify this and fix bug: #11654 2001-06-26 11:35:34 +00:00
foobar 531ec3623f No need for this constant. 2001-06-26 10:39:15 +00:00
foobar 0d3832ccdb Added an optional 2nd parameter 'readall' to read_exif_data. 2001-06-26 09:52:54 +00:00
Jason Greene dd6a1f9a7b Add update that Changelog missed 2001-06-26 06:09:37 +00:00
foobar 9813454356 This test won't work without these libs. Also, it might fail for other
reasons too.
2001-06-26 05:50:42 +00:00
Jason Greene 8f1f79fa7b *BSD doesn't have SIGPOLL or SIGPWR 2001-06-26 04:54:47 +00:00
Sterling Hughes c01ab20f01 Bunch of fixes, tested a bit, folks, please test with your scripts. changes
include nuking unnecessary extra copies, fixing handling of optional args,
adding an additional argument.

also, fix  socket_read() which used the php_read function by
default (by default, reading 4k would cause 4k calls to the read() function),
now it uses the system's built-in read() function, only uses php_read()
when its explicitly specified.
2001-06-26 04:19:39 +00:00
Jason Greene 333b1bf9c8 Fix casting wierdness that broke compiled code with Sun CC.
(Also easier to read)
2001-06-25 17:56:23 +00:00
Sterling Hughes 0216627522 @ Fixed a crash when using the CURLOPT_WRITEHEADER option. (Sterling)
# Folks please test, I've tested a limited amount of test cases, however,
# this change is far reaching, so I couldn't test all the necessary things
2001-06-25 15:14:20 +00:00
Sergey Kartashoff 0f3e5a3914 Security fix in Udm_Set_Agent_Param function. 2001-06-25 11:36:42 +00:00
foobar 9b131c2633 added missing include 2001-06-24 23:29:13 +00:00
Harald Radi d9c1247c86 added new com entries 2001-06-24 22:40:41 +00:00
Harald Radi 4a29944dac added verbose ini entry 2001-06-24 22:20:28 +00:00
foobar 2c95a1d690 The extension name seems to be usually totally lower-cased. 2001-06-24 22:18:51 +00:00
foobar c72bac335d A little typo here.. :) 2001-06-24 22:00:45 +00:00
foobar a8382659f9 added missing ending fold tag. 2001-06-24 21:58:47 +00:00
Harald Radi 7c95f0436f adapted to changes from com module 2001-06-24 21:20:23 +00:00
Harald Radi 22d42820b7 cast error 2001-06-24 21:19:49 +00:00
Sascha Schumann 5f51da8c58 Remove bogus use of volatile and add a note about using inet_ntop
instead.
2001-06-24 21:16:21 +00:00
Harald Radi 69abb74075 fixed bug that resource was freed twice 2001-06-24 21:10:08 +00:00
Harald Radi 750fee8fa0 cleanup 2001-06-24 21:09:32 +00:00
Harald Radi 3949658942 cleanup
added some macros
2001-06-24 21:09:17 +00:00
Harald Radi 5943e68e03 added variant.h 2001-06-24 21:08:30 +00:00
Sterling Hughes 35a816ce5f Hopefully fix leaks... 2001-06-24 17:50:16 +00:00
foobar 242b8af6aa fixed bug: #11641 2001-06-24 15:56:05 +00:00
foobar 315cfb2b4e This is better looking. Other options use the same. 2001-06-24 12:53:17 +00:00
Andi Gutmans 12db900a6f - Bump Zend version 2001-06-24 03:54:11 +00:00
foobar c15af25cd4 Check for PHP_SIGCHILD only if any of oracle libs is enabled. 2001-06-24 03:29:50 +00:00
foobar b3a855d760 added missing file 2001-06-24 00:38:53 +00:00
Sascha Schumann e6d153f6c4 Support for handling multiple concurrent requests. 2001-06-23 16:27:56 +00:00
Zeev Suraski b327e6593c Update NEWS 2001-06-23 13:48:19 +00:00
Stig Venaas 4172edad96 Fixed memory leak in ldap_first_attribute(), ldap_next_attribute(),
ldap_get_attributes(), ldap_get_dn() and ldap_dn2ufn() when using post
RFC 1823 API. Still more leaks to fix.
2001-06-23 13:43:20 +00:00
foobar 087398621f fix build. 2001-06-23 11:26:24 +00:00
foobar cc6a1b20fd Moved some messages to the end of configure process so they are easier
to notice.
2001-06-23 10:21:00 +00:00
Hartmut Holzgraefe 045acafc52 @added optional suffix removal parameter to basename() (Hartmut)
added optional suffix removal parameter to basename()
this makes it more simmilar to the basename command
2001-06-23 00:51:03 +00:00
Sascha Schumann 0bbe77309d Accomodate an Apache API change 2001-06-22 23:20:49 +00:00
foobar d87e59a1a3 Make it possible to build this extension as shared module. 2001-06-22 15:52:25 +00:00
foobar f61eac29ad Make it possible to build mysql extension as shared module. 2001-06-22 15:03:10 +00:00
Sergey Kartashoff 5d2d340af9 mnoGoSearch module test example updates 2001-06-22 08:54:31 +00:00
Sergey Kartashoff bdf1db6bdb A new parameter UDM_PARAM_VARDIR has been added in
Udm_Set_Agent_Param function to support alternative search data directory.
This requires mnogoSearch 3.1.13 or later.
@- A new parameter UDM_PARAM_VARDIR has been added in
@  Udm_Set_Agent_Param function to support alternative search data directory.
@  This requires mnogoSearch 3.1.13 or later.
2001-06-22 08:43:24 +00:00
Sascha Schumann 6558ae6f21 dup fds before fdopen'ing them, so that people cannot deliberately
close stdio streams.

This needs to be tested on non-UNIX platforms.

PR: #11599, #8624
2001-06-22 07:07:48 +00:00
Andi Gutmans 5bf89ce61c - Hopefully fix bug #11476 and improve garbage to be freed very quickly.
Tree tagged as PRE_GRANULAR_GARBAGE_FIX before commiting.
2001-06-21 22:30:23 +00:00
Andi Gutmans 7690887cf6 - Use inline instead of macro for PZVAL_LOCK()/PZVAL_UNLOCK() so that it
can be debugged.
2001-06-21 21:31:33 +00:00
Andi Gutmans 8cd70926c5 - Nuke dependency of all of PHP on zend_execute_locks.h. 2001-06-21 21:17:10 +00:00
Thies C. Arntzen 87902db2be *** empty log message *** 2001-06-21 19:39:52 +00:00
Thies C. Arntzen d34453258d fixed. 2001-06-21 18:58:55 +00:00
Thies C. Arntzen bd4f32cf12 - fixed the reference in session thingie
- regression test checked (this time;-)
- added new regression test for references
- references _between_ session variables also work in when the session var
  replaces an already existing global var (this was a brain twister)
- saved one strlen call per session variable
- fixed one tiny leak
2001-06-21 18:46:26 +00:00
Sascha Schumann 6ae7e5f54a Support for SGI's State Threads. Will be used by PHP's thttpd SAPI
initially.
2001-06-21 16:54:05 +00:00
Zeev Suraski 851b1e3b35 Eliminate the leak that the original bogus code tried to solve 2001-06-21 15:33:55 +00:00
Zeev Suraski a3739f10a4 Update NEWS 2001-06-21 15:07:14 +00:00
Zeev Suraski cb0d2775fb parent::methodname() now works better with runtime classes (fix bug #11589) 2001-06-21 14:53:05 +00:00
Zeev Suraski 8332ab409a Spit out errors 2001-06-21 14:18:23 +00:00
Zeev Suraski a13252b601 - Fix leak in case of a syntax error
- Be more verbose in lint mode
2001-06-21 13:47:26 +00:00
Sascha Schumann d6d59a9ee5 1. st_blksize might be different for regular files and symlinks; hence
ignore differences in the twelfth element of the stat() array.

2. The 'test.file' is created by the script, thus the owner of the file
   is the user id executing the script.  A mode of 0654 does not grant
   the owner the right to execute the file and therefore, the correct
   output here is "not executable."
2001-06-21 11:15:38 +00:00
Zeev Suraski 167dcb00be Remove redundant code from lint mode, it should now do only what it needs to do
and not anything else, and should no longer leak.
2001-06-21 09:24:53 +00:00
Zeev Suraski 3276cfd950 Fix bug #11590 (I want Andi to also review this patch before it goes into 4.0.6) 2001-06-21 08:17:09 +00:00
Sascha Schumann 375ef3aec5 Back out severely broken patch. I currently don't have the time
to debug this.  Please reapply a fixed version.
2001-06-20 23:39:28 +00:00
Frank M. Kromann d5d7cf7390 Changed length of BIT string.
Changed return value of fbsql_field_length to long
2001-06-20 22:54:51 +00:00
Stig Venaas 399885cddb Fixed memory leak in ldap_get_entries() when using post RFC 1823 API.
Similar problems for other functions will be fixed
2001-06-20 21:12:55 +00:00
David Croft fce6f4c5cb libtool 1.3 -> 1.4 in first check 2001-06-20 18:21:03 +00:00
Colin Viebrock 46847de73b entry 2001-06-20 18:09:09 +00:00
Colin Viebrock a367c39c2e date('W') now returns week of year (ISO 8601) 2001-06-20 18:07:53 +00:00
Andi Gutmans 1aa5b19cc9 - Fix string offsets crash. 2001-06-20 17:14:58 +00:00
Thies C. Arntzen 03ae0d775b add PLS_FETCH(); 2001-06-20 15:46:47 +00:00
Thies C. Arntzen 45f629925f @- Fixed references in sessions. This doesn't work when using the
@  WDDX session-serializer. Also improved speed of sessions. (Thies)
from now on php_set_session_var no longer copies the variable recovered from a
session (tested with php, php_binary and wddx). this should speed up session
deserializing quite a bit. (this damn thing has cost me 6 hours of my life;-)
2001-06-20 15:16:08 +00:00
Rasmus Lerdorf 94897efc36 Fix for #11570 2001-06-20 14:47:26 +00:00
Marc Boeren d0fba81668 All files are now in Unix-linebreak mode (\n only). Somehow \r\n still
created problems with some cvs clients.
2001-06-20 11:30:47 +00:00
Jason Greene 351b78d87e Make pcntl async safe by registering as a zend extension and grabing the
statement handler. There could possibly be a more atomic hook in the future.
Also added simple TODO section to README.

NOTE: sleep() grabs SIGALRM on solaris, so
test-pcntl.php's alarm_handle function will not catch.
2001-06-19 21:42:57 +00:00
Sebastian Bergmann d926e84e5f Change copyright note. 2001-06-19 21:25:53 +00:00
Sebastian Bergmann 3f4a4a3643 Change copyright note. 2001-06-19 21:14:39 +00:00
Jon Parise 355153b4b2 Include the 'html_errors' directive.
Submitted by: "Daniel Beckham" <danbeck-cvs@dealnews.com>
2001-06-19 20:50:03 +00:00
Jon Parise 2ee17dcc3b This warrants a NEWS entry, I think. 2001-06-19 18:13:08 +00:00
Jon Parise dbd51aaf61 Allow the PostgreSQL driver to do internal row counting when iterating
through a result set.

Submitted by: Georg von Zezschwitz <gvz@2scale.net>
2001-06-19 18:10:08 +00:00
Andi Gutmans d86f4828b9 - Memory fragmentation fix. 2001-06-19 18:01:41 +00:00
Andi Gutmans 34e0c392e8 - Fix memory fragmention problem which could lead to web server processes
growing much more than they should. (bug #11344?)
2001-06-19 17:59:07 +00:00
Dan Kalowsky 746dd9cbe4 Closed off Solid DB access to a function that it doesn't support in 3.0 and less.
Thanks to Eric Veldhuzen
2001-06-19 17:58:09 +00:00
foobar b0ed727aee Fix one problem with Opera browsers. Tested with IE,NS,Opera.
There can be also a \t before the 'filename=' part.
2001-06-19 16:54:30 +00:00
foobar 1e0aaeffe9 Fix bug: #11508 2001-06-19 16:48:37 +00:00
Andi Gutmans c977f29862 - Use ALLOC_HASHTABLE() instead of emalloc(sizeof(HashTable)) 2001-06-19 16:03:35 +00:00
Sebastian Bergmann e4f109b69f Finish phpinfo() HTML 4.01 tweaking. 2001-06-19 15:21:28 +00:00
Sebastian Bergmann 615cf785c1 Fix crash bug in urlencode(). 2001-06-19 15:20:50 +00:00
Zeev Suraski 0c164128f8 Add missing exports 2001-06-19 08:52:19 +00:00
Zeev Suraski 38085881a6 Fix warning 2001-06-19 08:42:22 +00:00
Harald Radi 85bb9e77e4 fixed malloc() / emalloc() bug 2001-06-15 21:48:05 +00:00
Sebastian Bergmann 499334e498 Make output of phpinfo() compliant with HTML 4.01. 2001-06-15 18:34:09 +00:00
Marc Boeren fa168d6b38 Changed username and password for pgsql in include file. 2001-06-15 13:25:44 +00:00
Sascha Schumann e843e8c5f0 Move PHP_TARGET_RDYNAMIC check to global acinclude.m4 and use it
in thttpd's config.m4.
2001-06-15 12:53:20 +00:00
Marc Boeren 35f8d4cb44 Added a pgsql testdatabase create script (thanks Christian)
Fine-tuned some tests.
2001-06-15 12:43:15 +00:00
foobar 32de53b7f5 Fixed proto. (also bug #10334) 2001-06-15 10:44:50 +00:00
foobar 4d17d05d31 Fixed bug: #9239, check for IPV6 on netbsd, maybe others 2001-06-14 19:04:57 +00:00
Stanislav Malyshev 5ad3d2828f Fix potential crash 2001-06-14 15:36:10 +00:00
Dan Kalowsky f2ec3fa6e5 adding in some error checking for parameter counts, and some thread safety for
functions
2001-06-14 15:02:17 +00:00
Daniel Beulshausen e4a2620d80 update credits 2001-06-14 10:05:41 +00:00
foobar 97a98c6888 This extension works with pdflib 4.x too.. 2001-06-14 04:35:11 +00:00
Stig Venaas a694b4b206 Added myself to the credits 2001-06-13 20:13:54 +00:00
Zeev Suraski b23d83cf6a Avoid crashing if the error reporting function is called after a bailout during shutdown 2001-06-13 17:18:11 +00:00
Zeev Suraski 1093ed17fb Clean-up
Remove a lot of 100% redundent code
2001-06-13 17:04:36 +00:00
Frank M. Kromann a86a08cc06 Fixing the return type of numeric data to be numeric 2001-06-13 17:00:32 +00:00
Marc Boeren bfd1f986b1 Latest (minor) fixes: mssql, mysql and odbc now pass the testset correctly.
# I need a working setup to test pgsql with the test-set as well.
2001-06-13 13:35:17 +00:00
Hartmut Holzgraefe f3fa23ace9 more functions, most of the simple ones (parameterwise) are now in 2001-06-13 07:26:41 +00:00
Jason Greene 5ae35781e3 Adding some ifdefs for better platform compatibility 2001-06-13 01:13:05 +00:00
Thies C. Arntzen d34fad6be2 namespace protect one enum to fix compile with ncurses 2001-06-12 21:34:47 +00:00
Harald Radi c7a934e763 added coauthors 2001-06-12 21:19:35 +00:00
Hartmut Holzgraefe 453a4ae985 initial version of ncurses extension,
see example1 for whats possible right now
2001-06-12 21:15:49 +00:00
Daniel Beulshausen 0d6661b436 fix build 2001-06-12 21:06:01 +00:00
Harald Radi 96686930ab added Alan Brown to credits 2001-06-12 20:33:50 +00:00
Stig Bakken 2a61bad994 (PHP curl_setopt) fix CURLOPT_HTTPHEADER crasher (Stig) 2001-06-12 20:23:14 +00:00
Daniel Beulshausen d5e9942bfb get rid of some getsockname() calls 2001-06-12 16:41:51 +00:00
Harald Radi 0f3ab761b6 added experimetal php->safearray support 2001-06-12 16:31:54 +00:00
Marc Boeren 92eb51fde2 Fixed bug concerning mysql default_link that got freed too soon (Mc).
Added the test-case to te connect-test-file (Mc).
2001-06-12 15:32:22 +00:00
Zeev Suraski e8796a1503 Improve XHTML compliance (suggested by Anil Madhavapeddy) 2001-06-12 10:51:59 +00:00
Jason Greene 3fd006d648 Remove bugus file. 2001-06-12 09:05:40 +00:00
Jason Greene 8b43f3222e @Added new experimental module pcntl (Process Control) (Jason)
Initial Import
2001-06-12 08:54:25 +00:00
foobar 3186994df1 Fix bug: #11397 2001-06-12 05:28:41 +00:00
foobar 9ddd6300de Fix the compile problem on some systems that do not have hstrerror() 2001-06-12 04:42:01 +00:00
Frank M. Kromann 44bc630d9b Fixing return value for fbsql_query on updates and fixing crash on fbsql_connect. 2001-06-12 00:39:05 +00:00
Harald Radi 20bb78f397 added experimental enum support
changed everthing to use the Z_* makros
2001-06-11 23:05:32 +00:00
Daniel Beulshausen a82f4f76e8 add mbstring & xslt 2001-06-11 15:43:50 +00:00
Sebastian Bergmann 782a7f57ba Oops. 2001-06-11 15:41:03 +00:00
Sebastian Bergmann 4e03328d39 Add ext/xslt project to workspace. 2001-06-11 15:39:16 +00:00
Daniel Beulshausen 669a6d6cf2 should build under windows as well 2001-06-11 15:31:58 +00:00
foobar 73bfcd8a8a this should be here..styles must be array 2001-06-11 15:21:47 +00:00
Daniel Beulshausen 491fcd2ef8 used in extension(s) as well 2001-06-11 15:18:44 +00:00
Daniel Beulshausen c6b4e55838 PHPAPIize url function to make them available to the outside (i.e. mbstring) 2001-06-11 15:14:04 +00:00
Daniel Beulshausen 218f570864 let this stuff build under windows 2001-06-11 14:53:31 +00:00
Daniel Beulshausen cae817a520 move some constants to a more appropriate place 2001-06-11 14:46:44 +00:00
foobar 8b15d97a31 fixed proto 2001-06-11 14:39:13 +00:00
foobar ffd1c31b53 Partial fix bug: #11333 2001-06-11 13:57:47 +00:00
Marc Boeren 113b128290 Fixed bug that caused dbx_query to segfault on Linux (not Windows, though) 2001-06-11 13:03:10 +00:00
Andi Gutmans 1c0471feee - Fix grammar 2001-06-11 04:15:58 +00:00
Dan Kalowsky a7e9b56112 # just correcting the evil vim removal of {{{'s and }}}'s ... bad vim! no folding for you! 2001-06-11 01:00:43 +00:00
Harald Radi 22790c9602 removed warnings 2001-06-10 23:26:35 +00:00
Dan Kalowsky eea60318d7 corrected a compile error (named variable missing). thanks to sebastian for pointing it out
# but why is he getting php-cvs commit messages and i'm not?!?
# i hope to hear that the mailing lists will be back online soon...
2001-06-10 22:40:32 +00:00
Sascha Schumann 5ebe991cfe Signal that no entry was found 2001-06-10 14:12:28 +00:00
Sascha Schumann 9a7c1f2ad6 Add some backwards-compatible macros to accomodate the renaming of
AC_ADD_* macros.
2001-06-10 13:51:18 +00:00
Rui Hirokawa f96a2539a7 added options for mbstring extension. 2001-06-10 09:44:31 +00:00
Rui Hirokawa fd46c91466 modified code freeing resouce which causes segmentation fault. 2001-06-10 09:41:43 +00:00
Sascha Schumann 22e506727c The Gettext module is not limited to the GNU implementation. 2001-06-09 16:55:27 +00:00
Daniel Beulshausen bdcff9817b fix compilation 2001-06-09 09:30:42 +00:00
Daniel Beulshausen 6ebd6f956c fix module initialization 2001-06-09 09:23:49 +00:00
David Hedbor 6b0f88e828 Fix segfault when env vars are missing. 2001-06-08 16:31:22 +00:00
Dan Kalowsky c3a3d5c853 added in a bit more checking on the persistent connection checks... 2001-06-08 15:31:29 +00:00
Sascha Schumann b31801b249 Check for http_session_vars != NULL. 2001-06-08 11:45:53 +00:00
Tomas V.V.Cox dfa35a78e6 Forget to add the $this->result param to fetchInto 2001-06-08 01:15:35 +00:00
Sebastian Bergmann a45a64a15c Add missing .cvsignore entries. 2001-06-07 15:57:36 +00:00
Rui Hirokawa 2be3c40b31 added charset parameter to output of mb_output_handler(). 2001-06-07 15:11:11 +00:00
Tomas V.V.Cox 48920fbb1b Changed constant DB_OK from 0 to 1. So if you set a default error handler,
this will improve fetchInto usability [while ($res->fetchInto($row))],
because don't disturb the while loop
2001-06-07 13:44:44 +00:00
Adam Dickmeiss 04bf3ebd55 Remove .libs in path to libyaz.la to make libtool 1.4 happy. 2001-06-07 13:40:31 +00:00
foobar c2f4987ebd Removed some ws and couple of useless comments. 2001-06-07 13:17:02 +00:00
Tomas V.V.Cox 50cb6e3733 change DB_result::fetchRow to use extension fetchInto instead of
DB_result::fetchInto (speed improvement)
2001-06-07 12:55:14 +00:00
Rasmus Lerdorf 81af7edbd0 Blowfish detection patch from Alexander Bokovoy <ab@avilink.net> 2001-06-07 12:18:02 +00:00
Sterling Hughes bf1738e86d remove unneccessary cast 2001-06-06 20:30:58 +00:00
Stanislav Malyshev 02b369e3a6 Make gmp compile again 2001-06-06 17:52:03 +00:00
Frank M. Kromann 127f827f76 Update fbsql_fetch_array() to match documentation 2001-06-06 16:57:16 +00:00
Uwe Steinmann 85d3d3e199 - fixed some compiler warnings 2001-06-06 14:48:01 +00:00
Rasmus Lerdorf 9c55882133 Fold a bit more code 2001-06-06 14:32:27 +00:00
Sebastian Bergmann 49ab8cb8f1 Remove bogus '.'. 2001-06-06 13:24:17 +00:00
Rasmus Lerdorf 81e2cf03ac Fix folding and clean up some extensions 2001-06-06 13:06:12 +00:00
Sebastian Bergmann 3bfd50f4f1 Maintain .cvsignore files. 2001-06-06 12:43:57 +00:00
Wez Furlong 94ea334dce Prevent problems with PDFlib 3.00 when setting the imagewarning parameter.
# I don't know if this is in later minors of PDF 3.x; someone please check!
2001-06-06 09:58:22 +00:00
Andy Sautins c3106f4c3e Change OCIFreeColl to OCIFreeCollection for consistency
with OCINewCursor/OCIFreeCursor
2001-06-06 00:08:21 +00:00
Rui Hirokawa 3acd77576e defined HAVE_CONFIG_H to enable DSO extension support. 2001-06-05 23:11:29 +00:00
Harald Radi de780b345c bugfix: collections didn't work correctly 2001-06-05 22:09:58 +00:00
Frank M. Kromann f8a697e2e8 Fixing memory leak.
Fixing mssql_pconnect to work with ISAPI
Adding MSSQL_NUM, MSSQL_ASSOC and MSSQL_BOTH so the extension will be more compatible with MySQL
2001-06-05 21:09:50 +00:00
Jason Greene 9e5b0de828 Add the capibility to to allow ap_php_(v)snprintf to replace (v)snprintf
if the platform has a broken (v)snprintf, or in my case, if a library included
by a module redifines snprintf incorrectly.
2001-06-05 16:35:56 +00:00
Harald Radi f6dc573f32 put VT_ARRAY outside of the switch 2001-06-05 16:24:53 +00:00
Jason Greene 14afcf724d Fix Non-terminated comment 2001-06-05 16:06:31 +00:00
Rui Hirokawa 491d00e46d two bug fixed: return value of mb_strimwidth() was invalid and separator parameter of mb_parse_str wasn't worked. 2001-06-05 14:25:23 +00:00
Marc Boeren 7567bf1862 Created a testset and a script to create a (mysql) database. This script
is easily modified to create other databases as well. The testset needs the
database, but it doesn't need to be a mysql database. Scripts to generate
other databases (with the same structure and data) would be appreciated.
2001-06-05 13:51:01 +00:00
Marc Boeren 98eed02fd7 Replaced dbx_cmp_asc and dbx_cmp_desc with dbx_compare function and
DBX_CMP_ASC, DBX_CMP_DESC flags.
Default comparison changed from DBX_CMP_TEXT to new DBX_CMP_NATIVE.
Solved bug in associative fields when using mssql
Cleaned up comments (/*/ ... /*/ to /* ... */)
dbx_connect now always return false if the database is not found.
Optimized dbx_query field-info retrieval loop
2001-06-05 13:39:09 +00:00
Rasmus Lerdorf 25c3a3a39d vim-6 does folding - clean up a bunch of missing folding tags plus
some misguided RINIT and RSHUTDOWN calls in a few fringe extensions
2001-06-05 13:12:10 +00:00
Harald Radi 4efe6f7e6b typelib is loaded automatically (depends on ini setting)
added com_load_typelib()
# i must get rid of duplicate defines()
@ fixed a bug when com.allow_dcom is set to false
@ added a further parameter to the constructor to load typelibs
@ from file when instantiating components (e.g. DCOM Components
@ without local registration). (phanto)
2001-06-05 12:53:44 +00:00
Harald Radi 088280c364 -used makros for zval modifications where possible
-small fixes in safearray to phparray code
2001-06-05 12:47:13 +00:00
Andrei Zmievski 6ad864713d Ignore generated files. 2001-06-04 13:14:26 +00:00
Andrei Zmievski 49519caa93 *** empty log message *** 2001-06-04 13:13:08 +00:00
foobar d1a382a1e8 Fixed bug: #11265 2001-06-04 08:06:07 +00:00
foobar fadd1472ea Fix bug: #9713 2001-06-04 02:04:46 +00:00
foobar 08ef1eac4a Always use -n... 2001-06-04 01:36:14 +00:00
Sterling Hughes d892b34a36 fix this (mea culpa, stray commit) 2001-06-03 21:38:23 +00:00
foobar 75720b018e Fixed little buggie with T1lib support. 2001-06-03 21:32:53 +00:00
Sascha Schumann 7112f32e66 Empty directories. No need for .cvsignore. 2001-06-03 17:13:54 +00:00
Sascha Schumann 72b9547d26 Fix XML build.
# sniper, did you ever test one of your patches?
2001-06-03 17:11:05 +00:00
Harald Radi c073b5ce04 added safearray to pval conversion for 1d arrays 2001-06-03 15:35:41 +00:00
Harald Radi b8627e62d4 @ added the possibility to specify typelibs by full name
@ in the typelib file (Alan Brown)
2001-06-03 15:33:41 +00:00
Sascha Schumann 36cfb10d79 fix logic 2001-06-03 13:59:21 +00:00
Harald Radi c9159797d8 removed unneeded function 2001-06-03 01:38:56 +00:00
Harald Radi ea6d39ca1c fixed typelib support 2001-06-03 01:20:08 +00:00
Rui Hirokawa 73aee8095f a bug fixed about memory reallocation and added extra parameter support to mb_send_mail(). 2001-06-03 01:14:45 +00:00
Sterling Hughes c0779b6db9 Leftovers from master Beckham's patch. 2001-06-02 05:25:36 +00:00
Sterling Hughes aa281a0771 Patch from Daniel Beckham, fetch the entry resource id, not the directory
resource id and fix prototype.
2001-06-02 05:12:44 +00:00
Frank M. Kromann ea90497f67 Changed efree to free for perststant data. 2001-06-01 23:51:48 +00:00
Harald Radi 94769b8f72 removed hardcoded typelib version.
forgot to call release on typinfo and dispatch
when obtaining typelib from classname.
2001-06-01 23:39:44 +00:00
Frank M. Kromann 354c57a931 Gerring rid of C++ comments,
Adding extra cleanup.
2001-06-01 22:27:00 +00:00
MySQL Team e8cbbc0637 Upgrade ext/mysql/libmysql to version 3.23.39. No major changes -
portability fixes.

Also add configure test for HAVE_INT_8_16_32 which should solve
compilation problems on AIX.
2001-06-01 20:07:26 +00:00
Sterling Hughes 304ac03be4 ops..
#coffee good
2001-06-01 18:54:14 +00:00
Sterling Hughes c6402b2a2f # see
.
2001-06-01 18:47:03 +00:00
Sterling Hughes 015e1d3d68 # testing changes is a good idea.
We were passing the php socket resource identifier to select instead of
the socket fd...
2001-06-01 18:41:06 +00:00
Andrei Zmievski 171c425641 A little clean, merge two if statements. 2001-06-01 15:01:29 +00:00
Martin Kraemer f2002d3e41 Oops, sorry. I should not have committed this ebcdic fix (which was none) 2001-06-01 12:58:41 +00:00
foobar cbe4d10a68 Cleaning up and fixed some compile problems on systems that only support static libs. 2001-06-01 12:49:50 +00:00
foobar 69e6f7ae52 Use different define name for this. 2001-06-01 06:42:14 +00:00
foobar c44198ff3a Cleanup. ws fixes (no tabs in config.m4 files please) 2001-06-01 06:41:45 +00:00
foobar 4c2340897a Cleanup a little bit. 2001-06-01 06:40:15 +00:00
foobar 16216e3eed Make use of the --with-expat-dir configure option 2001-06-01 06:32:02 +00:00
foobar 3a1b61c07d Fix bug: #9009. 2001-06-01 06:26:22 +00:00
foobar 58d35ea778 Missing entries in phpinfo() output 2001-06-01 05:02:13 +00:00
foobar 328258ac08 Output something if password is not set. 2001-06-01 05:01:50 +00:00
foobar 99cb747f71 Added missing configuration directive: from
which is used by fopen() to be send as the default password
2001-06-01 03:19:53 +00:00
Sterling Hughes ad0fb091a3 fix crash. 2001-05-31 23:48:05 +00:00
foobar 334ac7fc94 - Cleaned up some whitespace (sorry, I should have committed that before
any other changes)
- Made use of the Zend resource macros
2001-05-31 21:09:30 +00:00
foobar 77a1968ca5 Let's have examples here so maybe people would understand better
how to use this directive.
2001-05-31 21:03:11 +00:00
Frank M. Kromann 8d3ef75182 Fixing crash in shutdown after executing a SQL statement with errors 2001-05-31 19:40:24 +00:00
Frank M. Kromann 75daa01362 Adding missing resource 2001-05-31 18:57:58 +00:00
Frank M. Kromann 7fd7f0517a Changed code to return resources for links and results 2001-05-31 18:43:29 +00:00
Sterling Hughes db305fc6f7 small ws fix. 2001-05-30 20:16:23 +00:00
Sterling Hughes 28160f73d0 Revert as per Herr Schumann's request. 2001-05-30 19:56:11 +00:00
Sterling Hughes 506ceb28fc Try #2
# aka, flying blind in a shitstorm, but it shouldn't hurt anything
2001-05-30 19:43:27 +00:00
Sterling Hughes 948edd322b should fix warnings under winblows. 2001-05-30 18:33:46 +00:00
Sterling Hughes 439038759b should fix compile warnings on win32 2001-05-30 17:49:33 +00:00
Sterling Hughes c9ce7fcfc3 fix compile 2001-05-30 17:43:32 +00:00
Chuck Hagenbuch 093a807c11 Include the To: address in the overview information (already in the
envelope; it doesn't cost us anything).
2001-05-30 16:52:17 +00:00
Rasmus Lerdorf 1d115dbe8c ldap_result_entry needs to be initialized - tested
Should probably MFH this once someone else tests.
2001-05-30 15:09:20 +00:00
Adam Dickmeiss c62baa9dc6 Added array options for yaz_connect: user, group, password, cookie,
proxy, and persistent.
2001-05-30 13:23:20 +00:00
Rasmus Lerdorf 7ee4c793c3 Note to self - stop coding on planes 2001-05-30 12:30:14 +00:00
Adam Dickmeiss 9667d6b381 Fixed bug where yaz_connect could fail in cases where it shouldn't. 2001-05-30 11:58:25 +00:00
Zeev Suraski 6cf6835a4d Add missing check 2001-05-30 08:23:15 +00:00
Sterling Hughes 39e282254b place nice with other libraries. 2001-05-30 05:00:39 +00:00
Andrei Zmievski daefeb59d5 Kill warning. 2001-05-29 20:32:57 +00:00
Andrei Zmievski 6c4d96e8ea Fix long option parsing. 2001-05-29 16:18:35 +00:00
Frank M. Kromann 50bc884f78 Adding fbsql_status_db(). New function to get the status of a given database. 2001-05-29 16:01:54 +00:00
Chuck Hagenbuch 8f27945621 imap_thread(), from Rob Siemborski <rjs3@andrew.cmu.edu>. 2001-05-29 15:34:18 +00:00
Stanislav Malyshev ca8c8264db Fix the reference serializer
# Hope now it is right...
2001-05-29 13:19:24 +00:00
foobar 56c24c3309 This should finally get rid of those zlib problems. And this is safe too. 2001-05-29 11:59:33 +00:00
Wez Furlong 8b5edf1a9e Fix compile warning 2001-05-29 10:14:46 +00:00
foobar 0c5d5a513b Added missing GD/GD2 image handling functions. 2001-05-29 07:46:07 +00:00
Sterling Hughes 4fbb606f60 compile warning fixes....... 2001-05-29 07:08:47 +00:00
foobar 3e7754c51e Make this compile. Killed one compile warning.
# I still get a lot warnings when compiling sablot.c
2001-05-28 21:06:50 +00:00
Boian Bonev 0404618712 use AC_CHECK_LIB to see if the new API is supported 2001-05-28 19:58:36 +00:00
Boian Bonev e685cad988 changed checking if vpopmail has the new API
added checks if certain functions are supported
added vpopmail_alias_get_all
2001-05-28 19:56:10 +00:00
Boian Bonev 71553e5560 add checking if vpopmail has the new API 2001-05-28 19:53:45 +00:00
Andi Gutmans 91f4eec7e9 - tmpbuf is emalloc()'ed so this patch would be faster. 2001-05-28 19:38:30 +00:00
Wez Furlong f808add1c0 Prepare for php_streams.
# Someone with interbase please test!
2001-05-28 18:30:57 +00:00
Wez Furlong 65b0e70e58 Fix leak 2001-05-28 18:29:07 +00:00
Stig Bakken fc7d897490 @Added "pearize" script to generate Makefile.in files for PEAR extensions 2001-05-28 11:15:19 +00:00
Stig Bakken 9f3434264a * added LibFile element, used to build Makefile.in 2001-05-28 11:14:47 +00:00
Wez Furlong 952a62207a Add extra parameter to php_escape_html_entities.
# I meant to commit this with the html.[ch] changes
2001-05-28 11:05:14 +00:00
Wez Furlong d38cba8697 Added charset awareness to htmlentities() and htmlspecialchars(); use an
optional third parameter to specify the charset; otherwise tries to determine
it from the LC_CTYPE locale setting.
2001-05-28 11:00:06 +00:00
Wez Furlong 2bdef9c83f Improved performance of message part extraction when using a PHP-space
callback.
2001-05-28 10:57:23 +00:00
Stig Bakken 7d52787a96 * missing fold marks 2001-05-28 06:31:03 +00:00
Sterling Hughes 3af89678ec compile goood, compile error baaad. 2001-05-28 04:40:08 +00:00
Sterling Hughes 5bff2399dd remove un-necessary inline bloat... 2001-05-28 03:37:17 +00:00
Sterling Hughes 687a1c1abe ws fix 2001-05-28 03:30:11 +00:00
foobar 6686f83799 Oops. 2001-05-28 03:18:44 +00:00
foobar 2798dd52af Killed some compile warnings. 2001-05-28 00:16:28 +00:00
foobar d98f65085b Adding libnsl here causes problems on some systems. 2001-05-28 00:12:29 +00:00
foobar d3aa2b0d17 Killed compile warnings. 2001-05-28 00:09:38 +00:00
foobar ccf5f7ad04 Fixed some bugs. Now it compiles and works. 2001-05-27 23:57:27 +00:00
foobar 87eab1aa31 Removed duplicate line. 2001-05-27 23:56:16 +00:00
foobar c2772e9c85 Just cleanup. 2001-05-27 23:55:44 +00:00
foobar 48fb0a62ec Make this compile even if the INFORMIXDIR is not in path. 2001-05-27 23:51:39 +00:00
foobar 2dca041ec3 killed some compile warnings. the informix header files redefine these. 2001-05-27 23:49:22 +00:00
foobar 49d18d9f25 Fix by Sterling Hughes. Fixes bugs: #10939, #10756, #10324 2001-05-27 23:26:58 +00:00
foobar 02400e339b remove ws, kill one compile warning. 2001-05-27 22:54:54 +00:00
foobar 67f2331d17 Per Sterling's request I'm committing this.
This works fine for me now. (I'm using external iconv libs)
2001-05-27 19:43:16 +00:00
foobar 1ecc932895 Fixed bug: #9707 2001-05-27 19:12:21 +00:00
Sterling Hughes 5ede574d49 Speed up data being sent to stdout 2001-05-27 19:11:09 +00:00
foobar 43e41ddb93 curl-config tells us which libraries it has compiled with. So we should use it. 2001-05-27 18:52:33 +00:00
foobar d1735d5ed5 This is not needed. ssl_onceonlyinit() is enough. 2001-05-27 18:38:59 +00:00
Stig Bakken ae9da3a9c1 * typo 2001-05-27 09:40:58 +00:00
Stig Bakken 48c02a2e93 * use ereg functions instead of preg
* send stderr to the bit bucket
2001-05-27 09:09:00 +00:00
Sterling Hughes ee60cf057f Change the names around a bit zip_opendir() -> zip_open() and
zip_open() -> zip_entry_open()
2001-05-27 02:52:45 +00:00
Sterling Hughes ea0f4078b5 @ Renamed the ZZiplib extension to the Zip extension, function
@ names have also changed accordingly, functionality, has stayed
@ constant. (Sterling)
2001-05-27 02:49:46 +00:00
Egon Schmid 3ceeb1ff40 Fix some protos. 2001-05-27 01:21:30 +00:00
Sterling Hughes b2bd3b315f move to php_strtok_r() 2001-05-27 01:18:12 +00:00
Sterling Hughes 43865fb3c2 . 2001-05-27 01:16:45 +00:00
Sterling Hughes 1b20eacd21 so says sniper, and so it shall be. 2001-05-27 01:15:27 +00:00
Sterling Hughes 04908b1415 @ Made the length argument (argument 2) to pg_loread() optional,
@ if not specified data will be read in 1kb chunks. (Sterling)

@ Added a third argument to pg_lowrite() which is the length of
@ the data to write. (Sterling)
2001-05-27 01:10:36 +00:00
Sterling Hughes d4b3b6d536 more leftovers 2001-05-27 01:05:31 +00:00
Sterling Hughes 129f37093a leftovers 2001-05-27 00:58:08 +00:00
Sterling Hughes a2962a1312 # The mailing lists are a productivity hole, long live
cvsusers@php.net ;)

1) remove outdate struct xslt_function * construct in favor of
just using
the zval's themselves.

2) switch to call_user_function_ex() in the call_xslt_function()
function (gotta respect the alliteration ;) .

3) modify README.XSLT-BACKENDS to reflect some of the changes to
the api
2001-05-27 00:57:21 +00:00
Rasmus Lerdorf 8ca880265e Make c2-4 optional since they aren't needed in all cases 2001-05-27 00:01:55 +00:00
Sascha Schumann d342acc3a9 Add TUX SAPI module 2001-05-26 23:58:38 +00:00
Andi Gutmans e264a407eb - Change if() to while() to make sure we skip enough opcodes 2001-05-25 09:46:48 +00:00
Andi Gutmans 90c36273b4 - Fix memory leak 2001-05-25 07:26:48 +00:00
Andi Gutmans fe1dbf644f - Add prototype. 2001-05-24 12:54:05 +00:00
Sascha Schumann 2cb13b0cf3 Display the correct automake version 2001-05-24 12:36:09 +00:00
Boian Bonev 9caffb4fb7 fixed prototypes 2001-05-24 10:38:17 +00:00
Boian Bonev 312290a2c4 added vpopmail_alias_get covering valias_select/valias_select_next 2001-05-24 10:33:32 +00:00
Stig Bakken 1beda9ee1e * include "config.h" if HAVE_CONFIG_H is defined (for standalone dso build) 2001-05-24 10:07:29 +00:00
Boian Bonev 9270ae31ee cosmetic fixes; added 3 of the 7 valias functions 2001-05-24 03:31:09 +00:00
Boian Bonev fe110e40e9 added prototypes 2001-05-24 03:20:35 +00:00
Boian Bonev 78380f1135 added check if vauth.h exists in vpopmail install 2001-05-24 03:19:44 +00:00
Boian Bonev e38171a0b2 added 3 of 7 alias functions 2001-05-24 03:19:07 +00:00
Chuck Hagenbuch 9434da33b5 make it possible to set the CHARSET parameter with imap_mail_compose()
(Johan Ekenberg <johan@ekenberg.se>)
2001-05-24 03:06:10 +00:00
Sascha Schumann 3ffaa634a2 fix buggy debug statements 2001-05-24 01:12:11 +00:00
a25f899b47 ChangeLog update 2001-05-24 01:09:21 +00:00
05bd02a6ce NEWS update 2001-05-24 01:09:18 +00:00
Sascha Schumann 5e112d4384 Due to dynamic registration of storage handlers, OnUpdateSaveHandler
might be called before that registration takes place and hence the
INI update is dismissed.  In that case, we defer the lookup to the
first request init.
2001-05-23 23:18:51 +00:00
foobar 64c915e4f7 missing. 2001-05-23 23:17:22 +00:00
Sascha Schumann 1ad2a710ab Use EXTRA_LDFLAGS at this point.
I've confirmed that one can build a working Apache DSO module now
(AIX 4.2 with gcc 2.95.2 and Apache 1.3.12).
2001-05-23 21:23:16 +00:00
Sterling Hughes b4ce3a696f Fix credits 2001-05-23 21:09:20 +00:00
Sascha Schumann 75e0154b6c automake 1.4-p1 was released. Remove the -p\d+ suffix as this caused
an error message on FreeBSD.
2001-05-23 19:13:24 +00:00
Sascha Schumann 19a285419a $libtool already contains the full path to libtool. 2001-05-23 19:10:06 +00:00
Andi Gutmans 14ac3d74b9 - Nuke GINIT 2001-05-23 17:10:40 +00:00
Jon Parise 64b79f29c9 This was merged into the 4.0.6 branch. 2001-05-23 17:04:08 +00:00
Andi Gutmans 4ddb24366f - Fix problem of output initialization 2001-05-23 16:52:45 +00:00
Martin Kraemer c96d652843 Fix Basic auth (when under PHP control) for EBCDIC platforms 2001-05-23 15:24:53 +00:00
Tomas V.V.Cox 881f74263a -Changed $param[0] to $param{0} less ambiguous
-Readd "-?" param that shows the usage msg
2001-05-23 14:38:09 +00:00
Andrei Zmievski 9f0a619553 Fix segfault -- need to copy-construct constant value. 2001-05-23 13:54:22 +00:00
Andrei Zmievski bff9541958 This was merged into 4.0.6. 2001-05-23 13:04:35 +00:00
Stig Bakken 2d6d626c75 * added missing doc for PEAR::raiseError skipmsg parameter 2001-05-23 12:37:43 +00:00
Andi Gutmans d6656c2fa3 - Commit fix by Steve Meyers 2001-05-23 04:17:54 +00:00
foobar 726bd849c0 oops.. 2001-05-23 03:40:52 +00:00
Sterling Hughes 17e5edbf18 @ Added the CONNECTION_ABORTED, CONNECTION_TIMEOUT and CONNECTION_NORMAL
@ constants. (Zak)
2001-05-23 03:37:53 +00:00
John Donagher 639b957f74 Add missing end-folding delimiter 2001-05-23 01:50:11 +00:00
d161b81426 ChangeLog update 2001-05-23 01:09:25 +00:00
f8987b0f73 NEWS update 2001-05-23 01:09:22 +00:00
foobar 1567b0dfe0 fixed bug: #10960 2001-05-23 00:33:47 +00:00
Andy Sautins 915875a667 - Add correct OCIObjectFree to free collections immediately ( OCI_FREECOLLECTION_FORCE )
- Added schema optional parameter to OCINewCollection to allow accessing types in
     other schemas.
   - Added OCI_TYPECODE_TABLE to OCINewCollection to allow creation of collection of TYPES
     as well as VARRAYS
2001-05-22 23:16:03 +00:00
Shane Caraveo f0b6b8ab52 The -c commandline option was not working at all, need to set the path
override before calling on the module startup.
2001-05-22 23:05:08 +00:00
foobar 3461a40063 Fixed bug: #10914 2001-05-22 21:33:17 +00:00
Andrei Zmievski b31fbdc7b3 Fixes. 2001-05-22 20:13:52 +00:00
Andi Gutmans 177934732b - Start nuking not needed GINIT 2001-05-22 19:19:04 +00:00
Sebastian Bergmann b93a7db239 Fixed bug #10892. 2001-05-22 19:16:51 +00:00
Frank M. Kromann 251996bb79 Fixing prototypes to match function names 2001-05-22 18:26:36 +00:00
Andrei Zmievski 699489d456 @- Made $HTTP_SESSION_VARS['foo'] and $foo be references to the same value
@  when register_globals is on. (Andrei)
2001-05-22 17:55:07 +00:00
Frank M. Kromann 6b2df64cf0 Changing how persistant links are added to zend_lists 2001-05-22 17:32:17 +00:00
Tomas V.V.Cox e88dd1ac99 remove "?" from Console_Getopt. Sorry Andrei it was there and
I left there :)
2001-05-22 16:30:36 +00:00
Tomas V.V.Cox 370f099492 - added error cheking and abort when no script install dir is set
- minor typos
2001-05-22 16:25:04 +00:00
Tomas V.V.Cox a3d92b745a - Added the following params support:
* -p set script install dir
	* -e set extension install dir
	* -d set documentation dest dir
	* -v set verbose level
- Some error reporting clean up
- Added the standar PHP copyright header and authors
2001-05-22 16:21:02 +00:00
Jon Parise 311278f273 @ - Fix disk_free_space() and disk_total_space() under FreeBSD. (jon)
FreeBSD defines statfs(2) in <sys/mount.h>.  Teach PHP to look for it there.
2001-05-22 02:45:04 +00:00
6aafbd6775 ChangeLog update 2001-05-22 01:09:20 +00:00
7f0aac7729 NEWS update 2001-05-22 01:09:17 +00:00
foobar 920da9ef68 this fixes a few apache can not start bugs. 2001-05-22 00:39:17 +00:00
Derick Rethans 5512466878 - Nuke warning 2001-05-21 22:37:47 +00:00
Derick Rethans 31404981d3 - No need to include "zend" in include line
#- This broke compile because Unices want Zend instead of zend
2001-05-21 22:35:56 +00:00
James Moore b68965f62f Fix for #8539 2001-05-21 21:06:08 +00:00
foobar ffae2081d5 Fixed bug: #10777 2001-05-21 19:47:15 +00:00
Sterling Hughes d3b4074ed7 Fix compile warning. 2001-05-21 19:36:22 +00:00
foobar af5c5ecee1 fixed bug: #10593 2001-05-21 19:28:22 +00:00
James Moore 1dbab5bb33 Remove unused variable from imagesetstyle 2001-05-21 18:50:05 +00:00
Sterling Hughes fc741eb754 one of these days I'll get this commit correct, just you watch!
# must not commit  before coffee
# must not commit  before coffee
# *ploink*
2001-05-21 18:35:47 +00:00
Sterling Hughes b376e5b03e typo 2001-05-21 18:07:17 +00:00
Andi Gutmans 98c2329b0b - Fix name of function. 2001-05-21 17:48:49 +00:00
Sterling Hughes 77cf892176 Fix socket_read to work under Linux again. 2001-05-21 17:48:19 +00:00
Sterling Hughes 7d15e8cce3 WS fix (php_read) and correct checking of the return value from inet_aton,
which returns *non-zero* on success (fix by Till Gerken).
2001-05-21 17:34:18 +00:00
Sterling Hughes dc38b40eb8 Fixed bug where socket_connect() return the wrong value (report and fix by
Till Gerken)
2001-05-21 16:55:27 +00:00
foobar d299236d7b Fixed bug: #10742 2001-05-21 16:18:51 +00:00
Andrei Zmievski 4d78270b4e Moving some functions into Zend. 2001-05-21 15:47:52 +00:00
Andi Gutmans d160031c7d - EG's are passed automatically to internal functions. 2001-05-21 15:27:11 +00:00
Sean Bright 0b716d18b1 Added get_defined_constants() function. Returns an associative array of
constants mapped to their values.
@- Added get_defined_constants() function to return an associative array of
@  constants mapped to their values. (Sean)
# If anyone sees a problem let me know.
2001-05-21 13:36:42 +00:00
97ed89521e ChangeLog update 2001-05-21 01:09:24 +00:00
3c0cc90409 NEWS update 2001-05-21 01:09:20 +00:00
Sascha Schumann 82c4ac7423 Remove extraneous tab 2001-05-21 00:05:51 +00:00
Sascha Schumann e2eaf6342e Add support for systems where p{read|write} take a off64_t without
being properly prototyped.
2001-05-20 23:39:09 +00:00
foobar 4e545c1d73 A few modifications to make the ZLIB checks work better. 2001-05-20 23:00:44 +00:00
Sascha Schumann ae503d3a14 Whoops, the expat directory needs the XML_BYTE_ORDER macro 2001-05-20 22:18:03 +00:00
Sascha Schumann 244ea9f6c8 Don't add -DXML_BYTE_ORDER to global CPPFLAGS 2001-05-20 22:15:25 +00:00
Sascha Schumann c9023bdcae looks promising 2001-05-20 22:11:06 +00:00
Sascha Schumann cdc30c6826 Fix path to alternate mkdir 2001-05-20 22:04:23 +00:00
Sascha Schumann 7e5b4db323 Fix irix-time_r test 2001-05-20 21:55:57 +00:00
Sascha Schumann 7b88c7b378 remove fi 2001-05-20 21:50:54 +00:00
Sascha Schumann 2b73148189 ignore ylwrap 2001-05-20 21:41:35 +00:00
Sascha Schumann ff5a9de31d Support for IRIX-style asctime_r/ctime_r. 2001-05-20 21:29:55 +00:00
Sascha Schumann 7dfce52fdc Catch 'mkdir -p' brokeness on IRIX 2001-05-20 21:07:23 +00:00
Andi Gutmans e4f7a85acb - The previous name could be confused with resource # 2001-05-20 20:48:40 +00:00
Andi Gutmans e2f12eb0e5 - Whitespace and change the name of the macro to something more verbose
ZEND_GET_RESOURCE_ID(...)
2001-05-20 20:25:20 +00:00
James Moore c1164ad5bf @ - Add new ZEND_GET_LE macro for retrieving destructor
@   id's from remote extensions. (Jmoore, Zend Engine)
2001-05-20 17:06:39 +00:00
Andi Gutmans 65d9584ac0 - Don't allow resource types of 0 2001-05-20 16:04:22 +00:00
Wez Furlong 8d6d3006e1 fixed a bug in mailparse_stream_encode which would default to a random encoding (usually base64)
# oops
2001-05-20 11:43:55 +00:00
Sascha Schumann 5b87add94b refining 2001-05-20 11:13:56 +00:00
Wez Furlong 6468f8b492 Imported mailparse extension
@- New mailparse extension for parsing and manipulating MIME mail (Wez)
2001-05-20 11:11:28 +00:00
Stig Bakken 83b18832aa @Define HAVE_CONFIG_H when building standalone DSO extensions (Stig) 2001-05-20 05:29:54 +00:00
foobar fcfbb0cce6 This looks better. 2001-05-20 01:31:53 +00:00
Andrei Zmievski e1f671fb5c Properly free callback_name only when necessary. 2001-05-20 01:21:44 +00:00
45ebd79180 ChangeLog update 2001-05-20 01:09:15 +00:00
0115847b1f NEWS update 2001-05-20 01:09:12 +00:00
Derick Rethans dc43b9f574 - Reversed 'fix' for #9698
- Fix for bug #9698/#10681 (patch by kettler@gmx.net)
@- Added the 'u' modifier to printf/sprintf which prints unsigned longs.
@  (Derick)
2001-05-20 00:23:49 +00:00
Rasmus Lerdorf ae3dda8285 Fix bug #9526 2001-05-19 22:50:44 +00:00
foobar 16b94858b6 Fixed bug #10964 2001-05-19 22:21:40 +00:00
Sascha Schumann 6be7eb9059 Store some build-specific environment variables in config.nice. 2001-05-19 20:21:58 +00:00
Sterling Hughes 02d4567bb7 nuke last remnants of the old globals stuff
# oops
2001-05-19 17:45:36 +00:00
James Moore d6481a4ce7 Correct NEWS entry 2001-05-19 17:26:20 +00:00
Sascha Schumann 40245019cc s/^I/ / and some re-indenting. Also align the APXS checking code
with the standard scheme.
2001-05-19 17:13:09 +00:00
Sascha Schumann b56e877e53 Reindent, add link map for AIX, improve diagnostic message,
carry over all -D* CPPFLAGS, and nuke REGEX recognition.
2001-05-19 17:02:09 +00:00
Andrei Zmievski b398cbf72f Format. 2001-05-19 16:12:53 +00:00
Sascha Schumann ba8af2515e Fix segfault when using zend_hash_add_empty_element 2001-05-19 14:53:55 +00:00
Sascha Schumann 060983b184 Use zend_hash_add_empty_element 2001-05-19 14:51:39 +00:00
Sascha Schumann bc7a582f84 Use write(2), if we can successfully write to stdout. 2001-05-19 14:30:33 +00:00
Derick Rethans 391dfe4d02 - Adding an entry about mcrypt bugs 2001-05-19 10:42:16 +00:00
Sascha Schumann 3b822e5752 Looks like this was a bogus gcc warning.
Submitted by: Sebastian Bergmann
2001-05-19 10:10:49 +00:00
Sascha Schumann 6c3b8d5619 Improve reading from external data source for session id creation.
Improve generating the string representation of the md5 session id.
2001-05-19 09:58:31 +00:00
Sascha Schumann 991e05d062 Nuke some warnings. 2001-05-19 09:56:42 +00:00
Sascha Schumann 370c3418ad add entry 2001-05-19 07:47:11 +00:00
aeebfc5908 ChangeLog update 2001-05-19 01:09:22 +00:00
eee41cf325 NEWS update 2001-05-19 01:09:19 +00:00
Sascha Schumann d5cfb03ac9 munmap() file in RSHUTDOWN, if PHPWRITE fails. 2001-05-18 23:38:46 +00:00
Derick Rethans d1697ad012 - Fix for bug #10890
@- Fixed bugs in the mcrypt extension that caused crashes (Derick)
2001-05-18 20:54:15 +00:00
Sascha Schumann e29a1b2230 First try at using Apache's export list when building a DSO. 2001-05-18 20:53:53 +00:00
Sterling Hughes 3c8140d97b @ Added the IMG_ARC_ROUNDED option for the ImageFilledArc() function, which
@ specified that the drawn curve should be rounded. (Sterling)
2001-05-18 20:52:40 +00:00
Sterling Hughes 8f97b4d62f remove more php3 ts stuff 2001-05-18 20:37:21 +00:00
Sterling Hughes fd3eb2544a should be using the function here. 2001-05-18 20:32:47 +00:00
Sterling Hughes 4812388278 Remove the remnants of old global macro's 2001-05-18 20:29:47 +00:00
Sascha Schumann 0255bb01e4 Files should be shared among processes. 2001-05-18 17:48:43 +00:00
Hartmut Holzgraefe 002d241a03 a small proto clarification 2001-05-18 16:42:54 +00:00
Andrei Zmievski 0ee9518396 Move -DSUPPORT_UTF8 flag into the appropriate Makefile so as not to pollute
the global namespace.
2001-05-18 15:34:58 +00:00
Thies C. Arntzen e80abfa40c revert parts of last commit - stupid me! 2001-05-18 14:40:02 +00:00
Thies C. Arntzen 473d3eae45 reset allocated_memory_peak after each request. 2001-05-18 14:32:11 +00:00
Thies C. Arntzen 2db3431f00 --enable-memory-usage-info id deprecated. use --enable-memory-limit instead! 2001-05-18 14:32:05 +00:00
Uwe Steinmann 8562b074a3 - completed list of error messages (thanks to Torben Wilson) 2001-05-18 08:07:09 +00:00
774a1458ca ChangeLog update 2001-05-18 01:09:29 +00:00
823caad4c4 NEWS update 2001-05-18 01:09:26 +00:00
James Moore 6026a36879 Merge the more sensible way of doing this back in to HEAD 2001-05-17 23:57:43 +00:00
James Moore 873d59a8ea @ - Fixed getopt so it accepts arguments in the form -<option><value> not
@   just -<option> <value> (jmoore)
2001-05-17 21:32:05 +00:00
Derick Rethans 73f04651fa - Fix for bug #9801 (and maybe others) 2001-05-17 21:27:48 +00:00
Sterling Hughes f7c8bb6a29 Some fixes. Actually assign a value scheme_handlers before processing it.
Add some checks for key type.  Remove some debugging data.
2001-05-17 18:15:15 +00:00
Daniel Beulshausen 943af65924 update news 2001-05-17 17:21:26 +00:00
Daniel Beulshausen 741fbe5fc6 winsock is already initialized in an higher version by php 2001-05-17 17:13:47 +00:00
Daniel Beulshausen a621192cbf add notes & sockets ext 2001-05-17 17:05:17 +00:00
Daniel Beulshausen 9820c2a5af update sockets to work with winsock as well 2001-05-17 17:02:37 +00:00
Zeev Suraski 5b12d6077e That's slightly clearer that way :) 2001-05-17 16:33:45 +00:00
Martin Kraemer c34896aba8 Allow for DB3 to reside in /usr/local/include/db3/ and -ldb3 2001-05-17 15:27:12 +00:00
Zeev Suraski 89c7b891c9 Add missing info 2001-05-17 13:31:45 +00:00
Zeev Suraski c7464b7d6a Fix build 2001-05-17 12:51:24 +00:00
Zeev Suraski 41fbc95fe1 Fix build 2001-05-17 11:22:49 +00:00
Zeev Suraski 51303fc051 Fix corruption issue 2001-05-17 09:58:34 +00:00
Sebastian Bergmann 6b206a66a4 MS VisualStudio .NET 7.0 has M_PI_4 in math.h 2001-05-17 09:55:03 +00:00
cc60d7a165 ChangeLog update 2001-05-17 01:09:51 +00:00
Vlad Krupin 5cd87e870e ...and this fixes the typo I made long ago. It prevented people that have
certain weird installations of pspell from compiling properly (couldn't
find pspell header files). No-one noticed...
2001-05-17 00:32:45 +00:00
Vlad Krupin 3a56ec8ce2 Fix for bug 10912.
Also, if you explicily specify path in --with-pspell, the directories
/usr, /usr/local will no longer be searched even if the library is not
found at the specified location (this seems to make more sense)
2001-05-17 00:26:12 +00:00
Sterling Hughes ffc997f149 Add a compile check for the cURL version and fix the compile in general. 2001-05-16 23:43:30 +00:00
James Moore da22505333 - Sync prototype and definition of phpi_get_le_gd 2001-05-16 23:11:33 +00:00
Sterling Hughes 0492f086e7 # Revert the SLS_FETCH() ;) 2001-05-16 18:28:18 +00:00
Sterling Hughes 2d84ecbba8 Remove redundancy
# And further fix problem ;)
2001-05-16 18:15:49 +00:00
Sterling Hughes 4565812470 fix windows build.
#untested
2001-05-16 18:10:06 +00:00
Zeev Suraski 755207a1e6 Implement zend_hash_add_empty_element() using the existing infrastructure 2001-05-16 17:22:01 +00:00
Zeev Suraski 4c0d85ba4f Commit missing fix 2001-05-16 17:21:16 +00:00
James Moore fd243780b6 - Add dbx extension to php_modules workspace 2001-05-16 16:44:37 +00:00
Zeev Suraski 260b4d0dbf Merge memory usage into memory limit 2001-05-16 15:02:30 +00:00
Sascha Schumann 28a441fe02 Fix for #10900.
Submitted by: cech@debian.org
2001-05-16 12:01:25 +00:00
Daniel Beulshausen e1a9871337 add missing apls_fetch 2001-05-16 09:01:20 +00:00
foobar ad366598a6 Fixed bugs: #10297, #10615, #10783, #10880 2001-05-16 04:50:49 +00:00
484d82eb26 ChangeLog update 2001-05-16 01:09:35 +00:00
751b9a5ce7 NEWS update 2001-05-16 01:09:32 +00:00
Jon Parise 82b31fb7a3 @ - Added disk_total_space() to return the total size of a filesystem.
@   (Patch from Steven Bower)
2001-05-15 23:43:18 +00:00
Jon Parise 6c5db8d2d7 @ - Renamed diskfreespace() to disk_free_space() to conform to established
@   naming conventions. (jon)
2001-05-15 23:28:17 +00:00
Andrei Zmievski 58f7df0ae4 Revert previous commit - callback_name does need to be checked because
it is set conditional on is_callable_replace.
2001-05-15 18:00:35 +00:00
Jon Parise 12a5c62402 - Renaming $no_cache to $caching and inverting it's meaning
- Adding accessors for private $caching flag: getCaching() and setCaching()
2001-05-15 15:33:44 +00:00
Zeev Suraski d1845fb138 Move the initialization to a safer place (earlier, it could end up
not being reset to 0 under certain circumstances)
2001-05-15 14:55:42 +00:00
Tomas V.V.Cox ea8cd965fe Put the verbose mode to work again. Some other style. 2001-05-15 14:15:09 +00:00
Tomas V.V.Cox 1485283db2 white spaces and indenting 2001-05-15 14:03:04 +00:00
Andrei Zmievski 04088d87b5 Fix up a couple of entires. 2001-05-15 13:02:06 +00:00
Christian Stocker 58c92275e9 2 files from Cache/ were missing here, too. 2001-05-15 10:29:07 +00:00
Gavin Sherry 3a677d3e20 fixed shm_remove to expect the correct argument. 2001-05-15 07:32:34 +00:00
Gavin Sherry 16a13a6210 Added function sem_remove 2001-05-15 07:29:55 +00:00
Gavin Sherry 00f013189e Added sem_remove to remove semaphores from memory 2001-05-15 07:29:31 +00:00
foobar 613aacf0b0 MFB 2001-05-15 02:05:33 +00:00
foobar f3a67a2e40 Fix bug: #5418 2001-05-15 01:50:46 +00:00
2c99682077 ChangeLog update 2001-05-15 01:09:58 +00:00
c514cd5f21 NEWS update 2001-05-15 01:09:54 +00:00
Sterling Hughes 00421e7c83 leftovers..... 2001-05-14 21:04:23 +00:00
Frank M. Kromann 11d14590d1 Adding a small readme file for win32 users 2001-05-14 21:04:19 +00:00
Frank M. Kromann dcdd6d2b05 updating the win32 readme 2001-05-14 21:03:38 +00:00
Sterling Hughes db58472b56 Register the binary transfer option 2001-05-14 21:02:31 +00:00
Andrei Zmievski 1f9808b4ee Clean up call_user_func_*(). 2001-05-14 20:56:05 +00:00
Sterling Hughes 803bebb303 Use zend_is_callable to test whether or not the given callback is valid
before calling the function.
2001-05-14 20:06:06 +00:00
Sterling Hughes 47ee387d79 Use zend_is_callable() and fix sp of deprecated. 2001-05-14 19:19:03 +00:00
Sterling Hughes c58fdadc1f Couple of changes (and a little whitespace correction, sorry to mix :(
1) Depreciate the call_user_method*() variety of functions, their
    functionality can be easily duplicated by using the call_user_func*()
    functions (using the array(&$obj, "method") syntax).

    2) Change some pval's to zval's.

    3) Improve the error handling mechanism of call_user_func*() to report
    an the class name and the function name if an object or class name is
    given.
2001-05-14 19:02:23 +00:00
Derick Rethans 6123e2abe0 - Bumbed up the warning level to be in sync with fopen (which is E_WARNING
too) (See bug #10856)
2001-05-14 18:30:07 +00:00
Vlad Krupin 2331bbe445 @- Fix for bug 2181. Now zero is returned instead of an unset value for
@  7-bit encoding and plain text body type.
Also, bogus types and encodings will not be returned any longer.
Function imap_bodystruct() is also fixed in the same manner.
2001-05-14 18:24:27 +00:00
Andrei Zmievski 8a86d17882 Need to use ELS_FETCH() here. 2001-05-14 14:16:44 +00:00
Andrei Zmievski 4a85b47e50 Reformat. 2001-05-14 13:31:27 +00:00
Andrei Zmievski 553e04be2f @- Fixed a bug in call_user_*() functions that would not allow calling
functions/methods that accepted parameters by reference. (Andrei)

* Allow separation of arguments in call_user_* functions - this allows calling
  functions that force parameters by reference.
* Use executor function table instead of compiler one.
2001-05-14 13:24:03 +00:00
Andrei Zmievski eba50153ef No need for check since callback_name is always filled in. 2001-05-14 12:58:48 +00:00
Thies C. Arntzen 56cebea057 added expat version to phpinfo(); 2001-05-14 11:35:25 +00:00
Sascha Schumann bb472e7069 Initialize empty pDataPtr to a pseudo value to prevent a pefree on
pData.
2001-05-14 10:49:17 +00:00
Daniel Beulshausen 0f60b4b8a5 fix typo 2001-05-14 10:30:30 +00:00
796217d3f1 ChangeLog update 2001-05-14 01:09:15 +00:00
1544a77b72 NEWS update 2001-05-14 01:09:12 +00:00
Harald Radi cadfdacca8 renamed *typedef_VARIANT.* to *VARIANT.* 2001-05-13 17:09:53 +00:00
Harald Radi 06c7c52b58 changed php_typedef_VARIANT.h to php_VARIANT.h 2001-05-13 16:51:59 +00:00
Harald Radi ee17c6440d renamed 2001-05-13 16:50:48 +00:00
Harald Radi 49be36d70d modified because of the changes in com.c 2001-05-13 14:22:19 +00:00
Harald Radi 3c60aabe22 @added com_release($obj) and com_addref($obj) functions
@and the related class members $obj->Release() and $obj->AddRef()
@to gain more control over the used COM components. (phanto)
also changed the return values of the internal functions from VARIANT
to pval, so there's no need to convert the returned value after each function
call and the real hashtable entry is returned and not only a copy of it.
#now everything is prepared to implement the array support
2001-05-13 14:21:20 +00:00
Harald Radi 04a5d124aa @added an additional parameter to dotnet_load to specify the codepage (phanto) 2001-05-13 14:15:26 +00:00
Wez Furlong 74ce7ee6c5 Removed redundant (and incorrect) '0' from "begin" string for uudecode. 2001-05-13 12:04:37 +00:00
Zeev Suraski 0113263991 Safer detection of recursive PHP invocations 2001-05-13 09:03:46 +00:00
Zeev Suraski b38375b497 Fix broken XML build 2001-05-13 08:58:52 +00:00
Sascha Schumann 90c2979144 Nuke some warnings. 2001-05-13 07:37:28 +00:00
Sebastian Bergmann 4117324acf Nuke HAVE_LIBEXPAT2. We define HAVE_LIBEXPAT in config.w32.h, and that does the trick. 2001-05-13 05:55:10 +00:00
bbad9c9a04 ChangeLog update 2001-05-13 01:09:31 +00:00
Wez Furlong 2633261cc3 Took out a line that might cause problems if you try and uuencode; there is no
uuencode support yet.
# Looks hard to do too; we need to buffer 45 chars
2001-05-12 23:49:29 +00:00
Wez Furlong b2703047ab Added uudecode support (MIME name "x-uuencode") 2001-05-12 23:42:09 +00:00
Wez Furlong 615086c2c9 prototype for php_file_le_stream() 2001-05-12 21:49:13 +00:00
Wez Furlong 7a88deb402 expose streams to other extensions. 2001-05-12 21:48:39 +00:00
Andi Gutmans cbc07d4eb0 - Fix bug. The INI system expects a string for default INI values.
PR:
Submitted by:
Reviewed by:
Obtained from:
2001-05-12 20:11:01 +00:00
Daniel Beulshausen e91089edb9 hopefully fix win32 build, untested 2001-05-12 20:01:59 +00:00
Sebastian Bergmann a22397a762 Hopefully nuke the rest of the german commits. 2001-05-12 18:36:13 +00:00
Sebastian Bergmann 3f859324c9 Remove german comments from MS VisualStudio. 2001-05-12 18:18:42 +00:00
Sebastian Bergmann 2f0e998f78 Make expat and ext/xml compile again on Win32. 2001-05-12 17:57:59 +00:00
Andi Gutmans eadaf3eb7a - Remove check for ht == NULL in copy_ctor.
If ht is NULL at this point then we are better off crashing and fixing
  the bug that caused it.
2001-05-12 13:55:49 +00:00
Sascha Schumann e5176fe60a First step towards full libtool 1.4 portability 2001-05-12 12:22:34 +00:00
Sascha Schumann cf8d1563c2 Remove ltconfig which is not used anymore by libtool 1.4 2001-05-12 11:19:46 +00:00
Sascha Schumann afdaee9e47 Nuke more quotes 2001-05-12 11:09:05 +00:00
Sascha Schumann 9982ff568a Nuke some unneccessary quotes 2001-05-12 10:33:52 +00:00
Sascha Schumann fab8bd40d1 These functions have been changed to macros. 2001-05-12 10:28:39 +00:00
Sascha Schumann b18077179d Default to including expat.h 2001-05-12 10:22:16 +00:00
Sascha Schumann 5397b31c46 Moved to 4.0.6 2001-05-12 09:44:10 +00:00
Sascha Schumann cd30f5a6eb Rename some custom macros from AC_* to PHP_* 2001-05-12 09:26:47 +00:00
Sascha Schumann 718b588b14 Fix indentation of ./configure --help messages. 2001-05-12 09:13:42 +00:00
Sascha Schumann 8a3eb51a26 Replace ssize_t with long, as Win32 lacks proper support for that type. 2001-05-12 08:39:33 +00:00
Thies C. Arntzen 679f794eb4 add missing file 2001-05-12 08:21:20 +00:00
1e693a34ab ChangeLog update 2001-05-12 01:09:37 +00:00
ea1e226307 NEWS update 2001-05-12 01:09:34 +00:00
Wez Furlong 340c56e5c7 Fixed leak. 2001-05-12 00:45:55 +00:00
foobar be3b514637 Fixed bug: #10823 2001-05-12 00:15:08 +00:00
Andrei Zmievski ae90bcf16d Open season on memory leaks, shoot all you can. 2001-05-11 21:29:47 +00:00
Sascha Schumann 7566cf7f27 Fix special treatment of zlib by introducing the Apache concept
of config.m4 hierarchies.
2001-05-11 20:09:31 +00:00
Jason Greene c115a75544 Rewrote stat() and fstat() to be memory efficient, due to a recent
thread on php-dev.

Note: I added a macro that might have use in other instances, but for now
is included in php_filestat.h
2001-05-11 19:55:44 +00:00
Andrei Zmievski c081e6f417 Compress several entries into one. 2001-05-11 19:50:27 +00:00
Sascha Schumann 92a4409a4e update and some late additions 2001-05-11 19:44:30 +00:00
Sascha Schumann 996e9a7212 add missing closing paranthesis 2001-05-11 19:41:11 +00:00
Sascha Schumann 3efa08aaa8 Some extensions don't associate any data with hash entries,
except the key.  Prior to this change, a separate chunk of memory
was allocated in that case to store exactly zero bytes (plus
memory manager overhead).  We treat that case similar to the
pointer case, but don't copy any data at all (because the pointer
is usually the NULL pointer).
2001-05-11 19:32:01 +00:00
Sascha Schumann 2c4e1e84ce Fix a memory leak which occured upon registering an already existing
constant.
2001-05-11 19:18:24 +00:00
Thies C. Arntzen 169febcdf0 @- Added --enable-memory-usage-info. This creates a new Apache 1.x logging
@  directive "{mod_php_memory_usage}n" which will log the peak amount of
@  memory used by the script. (Thies)
2001-05-11 18:17:08 +00:00
Thies C. Arntzen 8ca106bffc added --enable-memory-usage-info 2001-05-11 18:16:41 +00:00
Thies C. Arntzen 78c8a877f8 . 2001-05-11 18:04:03 +00:00
Thies C. Arntzen 25003ea668 4.0.6 is tagged, HEAD is now 4.0.7-dev 2001-05-11 18:03:42 +00:00
Thies C. Arntzen cd2f057f1a bump bundled expat to 1.95.1
win32 project _needs_ updating and i don't have windows
2001-05-11 17:57:37 +00:00
Sascha Schumann 814fa2c71c Save a couple of syscalls per session
Fix apparent new-session-files-were-not-locked bug

Replace %m with portable "%s", strerror(errno)
2001-05-11 17:43:40 +00:00
Andrei Zmievski 1db2516277 Start cleaning up domxml memory leaks. Still much stuff to do. 2001-05-11 16:14:19 +00:00
Andi Gutmans d8c11e6f2a - Fix crash bug when opcodes array is erealloc()'ed to a different memory
area before it reaches the loop.
- Some whitespace stuff
2001-05-11 14:29:06 +00:00
Derick Rethans 04bd8d9174 Tabs please... 2001-05-11 13:34:49 +00:00
Sebastian Bergmann e69f4dc51c Fix for bug #10815. 2001-05-11 13:32:10 +00:00
foobar cf75b18a8d Fixed problems which were caused by the previous patches.
#And the usage of PHP_ADD_LIBRARY_DEFER is clear to me now..:)
2001-05-11 10:04:06 +00:00
Jason Greene 7f3291ae8c Fix is_executable test. 2001-05-11 02:45:49 +00:00
Jason Greene 0ed93d71b2 @fstat() and stat() now return identical output by returning a numerical and
@string indexed array (Jason)

(Andrei's suggestion to still allow backwords compatibility.)
2001-05-11 01:47:46 +00:00
49a0c0eb4a ChangeLog update 2001-05-11 01:09:27 +00:00
5fc789ff13 NEWS update 2001-05-11 01:09:19 +00:00
foobar 5bc7cf90cd default to /usr/local 2001-05-10 23:55:56 +00:00
Frank M. Kromann c1b7b83d45 Fixing some proto types 2001-05-10 16:35:05 +00:00
Andrei Zmievski f071e8c566 Always free the callback_name when using zend_is_callable(). 2001-05-10 16:30:12 +00:00
Zeev Suraski 4c10e198e2 Fix buggy line split 2001-05-10 14:25:48 +00:00
Zeev Suraski 4afa93f716 @- Fixed a possible crash in the PHP CGI when no input file is
@  specified (Zeev)
Fixed bug 7822
2001-05-10 14:13:18 +00:00
Rui Hirokawa 45a2e761e7 fixed bug of mb_substitute_character() and mb_substr() in mbstring. 2001-05-10 13:12:03 +00:00
Zeev Suraski 429667883e Treat numeric strings as numbers in the increment operator 2001-05-10 12:58:31 +00:00
foobar ef23bc97a3 Missing .slo ignore. 2001-05-10 09:28:56 +00:00
foobar 9fa37f60dc Fixed bug: #10779 2001-05-10 09:25:32 +00:00
foobar 9cce67f16d Cleaning this a bit too. Now I'm also able to configure and compile
with the test for imap-ssl.
2001-05-10 06:58:25 +00:00
Sterling Hughes b01ba3f820 Fix naming issue
# UNTESTED, but it should do the trick
# everyone on a winblows box please try out the change
2001-05-10 05:42:54 +00:00
aaa44ba271 ChangeLog update 2001-05-10 01:09:23 +00:00
4fdee19eb9 NEWS update 2001-05-10 01:09:20 +00:00
foobar a972b6aa5b Cleaning up here too. 2001-05-10 00:59:41 +00:00
foobar 5f20be7315 Moved the zlib configure before other extensions. 2001-05-10 00:57:36 +00:00
foobar 14e883c3a0 Cleaned up this a bit.. 2001-05-10 00:55:48 +00:00
Wez Furlong 63b3fa262c Reverse my earlier patch for mysql_db_query() & emit an E_NOTICE of it's
deprecated status.
# Should it be a warning or a notice?
2001-05-09 22:28:16 +00:00
Frank M. Kromann 4d1c545a9c Switching to zend_register_list_destructors_ex() 2001-05-09 21:44:44 +00:00
Andrei Zmievski 555fa77930 Nuke unused variable. 2001-05-09 20:37:16 +00:00
Andrei Zmievski 41aebd058e Fix a few bugs in zend_is_callable() and make it stricter. 2001-05-09 20:07:49 +00:00
Andrei Zmievski 8112d1beba @- Added is_callable() function that can be used to find out whether
@  its argument is a valid callable construct. (Andrei)
2001-05-09 20:06:39 +00:00
Frank M. Kromann 5258141db8 Minor change to the way string lengths are calculated and space alocated. 2001-05-09 19:18:04 +00:00
Sascha Schumann b1393e1880 Document overwriting behaviour of PHP_ARG_WITH/ENABLE with regard
to ext_shared.
2001-05-09 18:12:12 +00:00
Frank M. Kromann 90243d2cf0 Getting rid of memset. 2001-05-09 16:20:34 +00:00
foobar 3d430e4141 The PHP_EXTENSION() has to be before any other PHP_ARG_*()'s 2001-05-09 15:38:29 +00:00
Wenhui Zhang b6b5039f25 Change for Empress PHP support 2001-05-09 15:35:31 +00:00
Zeev Suraski 855cad5c54 Update .dsp 2001-05-09 14:55:17 +00:00
Sascha Schumann dca18dd68b Also remove -L/usr/lib/? from LDFLAGS. 2001-05-09 13:58:31 +00:00
Sascha Schumann 8f3ebfe4a9 Remove -L/usr/lib/? from PHP_LDFLAGS. 2001-05-09 13:57:56 +00:00
Rui Hirokawa 223eca31fb remaked mb_gpc_handler as mb_parse_str() in mbstring. 2001-05-09 11:18:11 +00:00
Sterling Hughes 59d4dfc4c6 fix crash bug (unlikely, but this is the only place where the reported bug
would make sense, and it can't hurt)...
2001-05-09 04:54:46 +00:00
foobar 1a032963ea Fixed a typo. 2001-05-09 01:41:53 +00:00
b9a724bdf2 ChangeLog update 2001-05-09 01:09:21 +00:00
Harald Radi ffefed1972 E_ERROR instead of E_WARNING on nullpointer exceptions 2001-05-09 00:00:01 +00:00
Frank M. Kromann 383c757a43 Use RETURN_ macros to define function returns.
Fix fetch functions to return values from array data structure
2001-05-08 22:58:32 +00:00
foobar 3d856be7f6 No need to show these if they are not used. 2001-05-08 22:18:00 +00:00
foobar 128df6ead7 Fixed: http://www.php.net/bugs.php?id=10733&edit=1 2001-05-08 20:11:46 +00:00
Dan Kalowsky b3a509ac9e this is a fix for bug 10250. it basically provides the unixODBC driver with
access to the SQLDriver functions.  patch originally submitted by
dzoll@nyscul.org, and is going to be tested by some of the unixODBC people.
2001-05-08 19:47:20 +00:00
Andi Gutmans a514e8fe66 - Fix line numbers when some lines end with \r 2001-05-08 19:42:14 +00:00
Frank M. Kromann 8a030b9809 Fixing the use of compatibility mode. When the flag is off the system should return correct PHP types (default) when the flag is on strings will be returned for all data types. 2001-05-08 19:24:14 +00:00
Frank M. Kromann aaebbecdcf Fixing the use of compatibility_mode setting in php.ini.
Nuking trailing spaces when returning a string.
2001-05-08 18:10:25 +00:00
Andrei Zmievski e05ebcdebb Remove wrong line. 2001-05-08 17:15:59 +00:00
Andrei Zmievski 420baada43 Reformatting. 2001-05-08 16:15:56 +00:00
Zeev Suraski aec679088c Update NEWS 2001-05-08 16:08:57 +00:00
Andi Gutmans 3380fa1b8e - Fix crash bug reported by DBG author Dmitri Dmitrienko. 2001-05-08 15:56:26 +00:00
Rui Hirokawa 0a452b2ff2 added mb_language to ext/mbstring. 2001-05-08 14:33:20 +00:00
foobar da0162a9de Fix the build.
# I promise not to commit if I'm tired.. :(
2001-05-08 11:08:08 +00:00
Dan Kalowsky f210ba988f reminder to remove the --with-openlink configure option
PR:
Submitted by:
Reviewed by:
Obtained from:
2001-05-08 03:19:48 +00:00
f2b5121100 ChangeLog update 2001-05-08 01:09:25 +00:00
b3fc1c2afc NEWS update 2001-05-08 01:09:22 +00:00
Zeev Suraski 6cd3b987b8 $argc was off by one in -f (fix bug #9289) 2001-05-08 00:51:11 +00:00
James Moore 7056620699 Give correct warnings if certain libaries/verisons are not avalible 2001-05-08 00:23:59 +00:00
Zeev Suraski 910e9d068c whitespace 2001-05-07 22:02:44 +00:00
Zeev Suraski ff11c36dc5 Avoid crashing if somehow, output is sent in a new thread tha had no requests 2001-05-07 22:00:13 +00:00
Marc Boeren a7bff5d8f1 Passed db_handle to dbx_error_function instead of NULL (Mc)
# I don't know why it worked on my machine, but now it works
# because the code is right, not through magic :)
2001-05-07 14:49:05 +00:00
Rui Hirokawa 156a461117 update address of licence term in mbstring. 2001-05-07 13:58:00 +00:00
Zeev Suraski 248931b66f Update NEWS 2001-05-07 11:09:48 +00:00
Zeev Suraski 0eadc7e423 Make zend_execute_scripts() reentrant 2001-05-07 11:08:18 +00:00
Zeev Suraski d229f82a46 Allow virtual() of PHP files. We may have to improve the detection code a
bit, but it worked well on everything I tried.
2001-05-07 11:07:22 +00:00
Wez Furlong 21ec6e2993 Enabled optional result_mode param in mysql_db_query() to make it behave
as mysql_unbuffered_query (can be either MYSQL_USE_RESULT or
MYSQL_STORE_RESULT)
2001-05-07 11:02:31 +00:00
Sascha Schumann 21eee58f6f As the WDDX extension can now be built as shared extension
without functional loss with regard to the session serializer, it
is safe to default to disable.  We enable XML automatically only,
if the user is building WDDX as a static extension.
2001-05-07 08:22:34 +00:00
David Hedbor 935d6287fd Patch from Jan Legenhausen to add vars to the HTTP_SERVER_VARS array. 2001-05-07 06:43:37 +00:00
cc9d78f4c6 ChangeLog update 2001-05-07 01:09:17 +00:00
093c7297c3 NEWS update 2001-05-07 01:09:14 +00:00
Stig Bakken 67212de780 updated the .emacs example 2001-05-06 23:44:06 +00:00
Stig Bakken dd9792bfae use $PHP_LAYOUT, not $libdir, to determine the extension install layout 2001-05-06 23:16:33 +00:00
Stig Bakken 553df412f2 @Added --with-layout configure option (Stig)
Changed the default php.ini path back to /usr/local/lib.  Use
"--with-layout=GNU" for now to get the new behaviour.
2001-05-06 23:11:58 +00:00
Egon Schmid 78ee5d56b3 Fixed some protos. 2001-05-06 22:25:14 +00:00
Sterling Hughes 7bf6869583 fix crash bug 2001-05-06 22:24:25 +00:00
Rui Hirokawa a09844a981 fixed divided by zero exception and lack of multidimentional array support in mbstring. 2001-05-06 22:06:10 +00:00
Sterling Hughes af58697165 fix compile bug. 2001-05-06 21:38:58 +00:00
foobar 3a56faeec9 Attempt to fix the build when a c-client lib with kerberos, pam and ssl
is used.
2001-05-06 20:16:49 +00:00
Zeev Suraski bda9c83a82 Recover from a parse error in include files (before, it could result in a crash under certain circumstances). Fix bug #8663 2001-05-06 19:30:31 +00:00
James Moore f3342a5b55 Fix win32 build 2001-05-06 19:20:25 +00:00
Derick Rethans 9f5e71bd42 - Nuke warning 2001-05-06 18:53:45 +00:00
Sascha Schumann 0d29419769 Up prerequisites to libtool 1.4 2001-05-06 18:51:21 +00:00
Sascha Schumann 23eb892bee Upgrade to libtool 1.4. 2001-05-06 18:49:09 +00:00
Derick Rethans b181237582 - Partial fix for bug #9050, support for "Jan 19 2000" date format 2001-05-06 18:33:49 +00:00
Andi Gutmans a31cd3ddff - .cc files were renamed. Update .cvsignore. 2001-05-06 18:30:51 +00:00
foobar 6c21f7ef0f Moved ts_alloca_id() into MINIT like Andi requested. 2001-05-06 17:55:10 +00:00
foobar 8e006f81af Fix bug: #8834. Now there should be more random salts.. 2001-05-06 16:54:27 +00:00
Zeev Suraski d2cbd019e3 Yikes, that would have been a very bad bug :) 2001-05-06 16:24:36 +00:00
Zeev Suraski f78e65cabf Floating point keys didn't work in array() (fix bug #6662) 2001-05-06 15:39:27 +00:00
foobar d8ab8ea544 Fixed bug: #7227. Now the correct strings (if set) are shown. 2001-05-06 15:22:22 +00:00
foobar 9d1817ed7f Fix bug: #10323. Every value outputted is now escaped. 2001-05-06 15:20:56 +00:00
Zeev Suraski f5643011f4 Update NEWS 2001-05-06 15:01:17 +00:00
Zeev Suraski 686eab894c Hear hear, interactive mode is finally showing some progress:
- Support function calls
- Fix crash bug
2001-05-06 15:00:58 +00:00
Zeev Suraski 1e63f44084 Support interactive mode in thread-safe builds 2001-05-06 14:36:25 +00:00
Zeev Suraski cd033b1271 Fix autoconversion of hexadecimal strings
It's time to close bug #5404 :)
2001-05-06 12:48:17 +00:00
Zeev Suraski dc30520622 Retain single spaces as spaces to condense HTML 2001-05-06 12:28:17 +00:00
Sascha Schumann eba7a8c8e6 Fix broken build 2001-05-06 10:33:21 +00:00
Wez Furlong 4f943b6012 Fixed win32 build problem. 2001-05-06 09:39:11 +00:00
Egon Schmid 58d2b0a52b Corrected one proto. 2001-05-06 06:33:48 +00:00
foobar 9ce123076f Beutify phpinfo() output. 2001-05-06 06:14:12 +00:00
foobar 60ad79335c Added a check that libc-client support SSL. 2001-05-06 05:39:16 +00:00
foobar 8d99685a4a Removed usused variables. 2001-05-06 05:38:46 +00:00
Rui Hirokawa b0d91b12f8 fixed a compilation problem without --enable-mbstr-enc-trans. 2001-05-06 02:44:12 +00:00
Rasmus Lerdorf 4f059abacf Add pg_last_notice() function 2001-05-06 01:34:56 +00:00
3cb4fdcc2b ChangeLog update 2001-05-06 01:09:32 +00:00
Wez Furlong 77e7035421 Fixed Andi's build problem. 2001-05-05 22:36:26 +00:00
Wez Furlong 3ffb8e3800 Nuke buffering from php_streams, move connect_nonb() from fsock.c to network.c
and rename to php_connect_nonb().
Use php_connect_nonb() instead of connect() in php_hostconnect() -> timeouts
should now work in php_hostconnect().
sock streams abstraction now uses php_sockbuf as the "abstract" pointer.
2001-05-05 18:36:22 +00:00
Andi Gutmans d5763bbdcb - Fix format to be consistent 2001-05-05 16:28:20 +00:00
Zeev Suraski a8f87e6c23 Layout fix 2001-05-05 16:05:19 +00:00
Zeev Suraski 70b6c55ce6 Fix missing statement 2001-05-05 16:04:14 +00:00
Sascha Schumann e1ddd48bd4 Fix libtool check
Submitted by: brisse@ping.dk
2001-05-05 15:33:49 +00:00
Wez Furlong 080fdabc85 Added Sascha Kettler to credits 2001-05-05 11:29:01 +00:00
Sascha Schumann d998ae4e5b Fix broken ZTS build. 2001-05-05 11:11:32 +00:00
Thies C. Arntzen 459e04f0a0 not to forget this one! 2001-05-05 08:03:32 +00:00
Zeev Suraski 52ba317606 emalloc()'d strings must be freed before the request shutdown;
Rule of the thumb:  initialize in RINIT, clean in RSHUTDOWN
2001-05-05 01:42:15 +00:00
853bf32770 ChangeLog update 2001-05-05 01:09:16 +00:00
5e3eec8d46 NEWS update 2001-05-05 01:09:13 +00:00
Wez Furlong b379cd968c Merged and adapted a patch from Sascha Kettler <kettler@gmx.net> that provides
some asymmetric RSA encrypt/decrypt functions.
2001-05-04 23:42:11 +00:00
Wez Furlong b9c5f299c1 I'm now the primary maintainer for OpenSSL extension, as agreed with Stig
Venaas.
2001-05-04 23:40:27 +00:00
Wez Furlong dc66895579 Making notes about which extensions need most work for streams. 2001-05-04 23:39:31 +00:00
Chuck Hagenbuch 2f8eef81f5 Add support for in_reply_to header, and fix erealloc usage ("Johan Ekenberg"
<johan@ekenberg.se>).
2001-05-04 20:03:47 +00:00
Jason Greene bb131011a7 Fixed bug in my previous patch, forgot to reset connect error globals
on request startup.
2001-05-04 18:27:15 +00:00
foobar a3c90853a0 Fix bugs: #10642, #10612 2001-05-04 17:57:58 +00:00
Andrei Zmievski 0eecec7773 @- Fixed a bug in preg_split() that would incorrectly limit the number of
@  results when used along with PREG_SPLIT_NO_EMPTY flag. (Andrei)

- Fixed a bug in preg_split() that would incorrectly limit the number of
  results when used along with PREG_SPLIT_NO_EMPTY flag. (Andrei)
- Also made limit = -1 when limit = 0, to emulate Perl.
2001-05-04 16:43:53 +00:00
Thies C. Arntzen a085b708e1 namespace-protect "open" 2001-05-04 14:53:45 +00:00
Harald Radi f64d32f667 added ext/com/ files to the project 2001-05-04 14:44:27 +00:00
Rui Hirokawa c0624c769b fixed a memory leak in ext/mbstring. 2001-05-04 10:42:54 +00:00
Ben Mansell 13e4699ae3 Removed a duplicate php_import_environment_variables() call
from fastcgi sapi
2001-05-04 09:49:14 +00:00
Marc Boeren a3d3819f6f Forgot the Visual Studio project, added now (Mc)
Updated CREDITS (Mc)
2001-05-04 09:43:57 +00:00
Marc Boeren a56162243a Registered db-module constants for use in dbx_connect (Mc)
Added support for Microsoft SQL Server (Mc)
2001-05-04 09:42:45 +00:00
Marc Boeren e3770563fc Added docs about creating dbx-support for other databases. (Mc) 2001-05-04 09:39:52 +00:00
Sebastian Bergmann d92522c8d1 Nuke unreferenced local variables. 2001-05-04 06:25:10 +00:00
Sterling Hughes 1ae44c8e49 Make it compile with the latest cURL cvs, heck it even works. 2001-05-04 04:20:38 +00:00
Rui Hirokawa 93e7521639 added status parameter to output handler in ext/iconv. 2001-05-04 03:55:48 +00:00
Jason Greene 8405c36815 @ Added connection error support to mysql_error() and mysql_errno() (Jason)
This should work correctly without causing compatibility issues with previous
scripts. Someone might want to double check this change, just in case.
2001-05-04 01:14:26 +00:00
36d2e71de1 ChangeLog update 2001-05-04 01:09:19 +00:00
54bfac850c NEWS update 2001-05-04 01:09:16 +00:00
Derick Rethans 8909c33319 - Applied a patch that enables getimagesize to return the size of .bmp and
.psd files (Patch by Paul Jongsma <paulj@webtic.com>)
@- Added support to getimagesize to return dimensions of BMP and PSD
@  files (Derick)
2001-05-03 21:28:26 +00:00
Wez Furlong 453f4a2d59 Added streams stuff
# Turn on those psychological thumbscrews!
2001-05-03 20:21:06 +00:00
Chuck Hagenbuch 3fc7a7aef7 add crash guard (valid message number check) to imap_body(). 2001-05-03 19:44:42 +00:00
Chuck Hagenbuch d0af2440e6 removing references to IMSP module, which will probably never be ported to
php4 (lack of a publically available library implementing it).
2001-05-03 19:32:49 +00:00
Chuck Hagenbuch 5c0791fcac Fix for #8359. imap_fetchheader should never return the full message; the
FT_PREFETCHTEXT flag is just a hint to c-client that you'll be asking for
the message text next.
2001-05-03 19:18:48 +00:00
Zeev Suraski cbb777f167 Fix chdir() under Windows 9x/ME 2001-05-03 15:50:37 +00:00
Sascha Schumann 9de9b7c1e9 add an interface for registering storage modules at run-time. 2001-05-03 15:48:49 +00:00
Harald Radi 172a9c9303 fixed leaky code
#cleaned up dirty hack from yesterday
2001-05-03 11:20:29 +00:00
Sascha Schumann e337f07ecd Replace slow strlcpy with a quick memcpy. 2001-05-03 09:04:15 +00:00
Sergey Kartashoff e176e5c101 Some fixes in Udm_Cat_List and Udm_Cat_Path functions. 2001-05-03 08:59:49 +00:00
foobar d805c9740f Fix bug #10589 2001-05-03 03:41:42 +00:00
Rui Hirokawa 0ec7b68462 added .cvsignore. 2001-05-03 03:12:43 +00:00
ed75b7fb87 ChangeLog update 2001-05-03 01:09:16 +00:00
Rui Hirokawa b388986f57 deleted some function aliases.
@- Added Japanese multibyte string functions support. (Rui)
2001-05-03 00:44:26 +00:00
Hartmut Holzgraefe 06d498473e added generation of CREDITS and EXPERIMENTAL to ext_skel 2001-05-02 23:33:21 +00:00
Andi Gutmans eb4d840a40 - More strncpy() -> strlcpy() changes. Am I getting bored yet? :) 2001-05-02 23:20:04 +00:00
Andi Gutmans 7c5a45d69a - More strncpy() -> strlcpy() changes. mm_login() doesn't seem to be used
though.
2001-05-02 22:57:01 +00:00
Andi Gutmans 8975186810 - Another strncpy() -> strlcpy() change 2001-05-02 22:53:41 +00:00
Andi Gutmans f84637d4b8 - Change strncpy()'s to strlcpy()'s 2001-05-02 22:49:48 +00:00
Andi Gutmans d90ef12bb8 - Whitespace fix 2001-05-02 22:41:09 +00:00
Andi Gutmans f1c801ac89 - Commit interbase fixes 2001-05-02 22:31:19 +00:00
Andi Gutmans 0ac0f656ae - Fix possible buffer overflow. Always better to use strlcpy() instead
of strncpy()
2001-05-02 22:22:16 +00:00
Andi Gutmans 5aec595716 - Support \r as newline in the ini scanner 2001-05-02 21:52:30 +00:00
Harald Radi 7361fa13fc adapted because of the changes in the com module 2001-05-02 21:52:12 +00:00
Andi Gutmans e6e43743c5 *** empty log message *** 2001-05-02 21:51:32 +00:00
Harald Radi 8dc2dbaf9b removed itypeinfo calls because they didn't work on every machine
#i'm investigating this ...
2001-05-02 21:51:19 +00:00
Andi Gutmans 62bec3a7a7 - Handle MAC OS X \r line endings 2001-05-02 21:48:07 +00:00
Frank M. Kromann ed267a7d66 Changing paramters on database_password 2001-05-02 20:36:51 +00:00
Frank M. Kromann 7049935da0 Fixing segfault in database_password 2001-05-02 20:06:00 +00:00
Andi Gutmans 2d9eac7e0e - Patch by Andrei to prevent crash in error situation when not all
object overloading handles are defined.
2001-05-02 19:51:33 +00:00
Sterling Hughes 09bb75a4a5 .
# How'd that sneak in
2001-05-02 19:37:59 +00:00
Sterling Hughes 66b2cf3ef5 set the date 4.0.5 was released.
add an entry about the cgi, $PHP_SELF change that I made.

# There are a lot of entries where no one is taking the blame/credit for
# the changes.  Can people who have made entries, please go back and check
# to make sure that their names are by their changes?
2001-05-02 19:34:51 +00:00
Andi Gutmans 5965588963 - Apply Vlad's sybase patch to work with two different kinds of builds of
the sybase libraries
2001-05-02 18:38:17 +00:00
Chuck Hagenbuch ec1f342fac fix whitespace pollution 2001-05-02 17:46:44 +00:00
Chuck Hagenbuch 0ae4591ea2 Fixes and improvements to imap_mail_compose (Johan Ekenberg
<johan@ekenberg.se>)
2001-05-02 17:42:10 +00:00
Chuck Hagenbuch 9cb85f9933 Add support for cram-md5 authentication in imap_open(). 2001-05-02 17:30:30 +00:00
Ben Mansell 98af7a8d7d Patch from Stephen Landamore: speed up the environment merging by
using memcpy instead of putenv.
2001-05-02 17:19:58 +00:00
Daniel Beulshausen 3d5b27d46a make run-tests work under win32 too
# this whole thing is pretty ugly...
2001-05-02 16:39:04 +00:00
Rui Hirokawa 953c181026 clear http input encoding detection result in RSHUTDOWN. 2001-05-02 13:24:26 +00:00
foobar bf417a3b72 Now the file uploads 'work' also on Lynx. This patch was submitted
by Andreas Pistoor <andreas@erestor.f2s.com> and I have tested it a
quite long time now and didn't notive any problems. Bug: #9930
2001-05-02 01:18:53 +00:00
7d81681ccb ChangeLog update 2001-05-02 01:15:10 +00:00
723769d53e NEWS update 2001-05-02 01:11:13 +00:00
John Donagher b2e6cf009d - Remove C-style comments
- Remove some stale debugging code
2001-05-02 01:08:47 +00:00
foobar d4e64925d5 Possible Fix for #10570, #10585, #10539 and maybe others. 2001-05-02 00:21:25 +00:00
Rui Hirokawa f34bad2d4f modified some function name in ext/mbstring based on naming convension and mbstr_http_input() implemented. 2001-05-01 23:44:20 +00:00
foobar d0dac28cc2 Fix bug #10563 2001-05-01 23:22:55 +00:00
Frank M. Kromann 1d7dc11df0 Fixing some proto types and return values 2001-05-01 22:04:11 +00:00
Hartmut Holzgraefe 6e883e9e32 looks like i missed something 2001-05-01 19:15:43 +00:00
John Donagher 5135d75bf5 Add TODO 2001-05-01 19:08:27 +00:00
Andi Gutmans 4cef5e78d3 - Optimizer the previous patch a bit by nuking memset() 2001-05-01 18:13:59 +00:00
Frank M. Kromann e8949d7781 Adding support for BINARY, VARBINARY and IMAGE column types.
Thanks to Brad LaFountain.
2001-05-01 18:01:08 +00:00
Andrei Zmievski ea56318495 Patch from Sascha that abstracts session serializers. WDDX extension
now implements the encode/decode functions and registers them with
the session module.
2001-05-01 17:01:51 +00:00
Andi Gutmans ab9a7a5f5f - Remove C++ comment 2001-05-01 16:33:09 +00:00
Andi Gutmans d04562e845 - Fix snprintf() to work with nan and inf properly 2001-05-01 16:29:52 +00:00
Hartmut Holzgraefe 78b54eaa8b hartmfixed and extended the ini parameter and module globals stuff
once again: someone test this please!
2001-05-01 16:21:58 +00:00
Rui Hirokawa f2731cb91a modified some function name in mbstring based on php's naming convension. 2001-05-01 09:20:51 +00:00
Andi Gutmans 62cc5c9c8f - Bump up Zend version 2001-05-01 07:20:36 +00:00
Andi Gutmans a166b6146b - Remove unused variable 2001-05-01 07:16:57 +00:00
Derick Rethans 7f20f1e866 - Fix for bug #10518 (Thanks to kettler@gmx.net) 2001-05-01 07:09:09 +00:00
Rui Hirokawa 4cafbdc67f simplified some function's name in ext/mbstring. 2001-05-01 05:21:29 +00:00
John Donagher 0f42480b48 - Remove some stale code
- Fix spelling mistakes
- Add build-time version detection
- Add support for v3 Verisign SDK
@ pfpro extension now supports version 3 of the Verisign SDK (John Donagher)
2001-05-01 05:04:43 +00:00
Sterling Hughes ba49860cc8 fix for bug 6491, http://www.php.net/bugs.php?id=6491, removes a bit of
(what I think is) broken logic.

#  This is as discussed on the mailing list previously.  This change
#  does fix the problem, however, the extra code was in there for a
#  reason (I'm guessing :), i'm ready to revert this patch in a jiffy
#  if someone has a good reason why that (just removed) extra logic
#  should be in there.
2001-05-01 03:48:27 +00:00
Sterling Hughes 11961e6585 Check for the existance of the iconv library
# Not sure if this is correct, I can verify that it doesn't break anything
# and it logically looks like it would work.  Can someone test this (BSD
# and/or Windows)
2001-05-01 03:26:04 +00:00
Rui Hirokawa 09197a4531 renamed jstring to mbstring. 2001-05-01 01:52:55 +00:00
Rui Hirokawa 9907826a66 d 2001-05-01 01:46:05 +00:00
08e6f380c9 ChangeLog update 2001-05-01 01:09:24 +00:00
23411a805b NEWS update 2001-05-01 01:09:21 +00:00
Andi Gutmans 6196e0bc4d - Fix for Bug id #10071
PR:
Submitted by:
Reviewed by:
Obtained from:
2001-04-30 22:47:51 +00:00
Hartmut Holzgraefe ba5ae96cb4 some more example code for modules using --with-something
works for me (linux/bash) but please give it a test drive
2001-04-30 19:06:26 +00:00
Sterling Hughes 21032fee6b remove last minute garbage that snuck in... 2001-04-30 16:30:46 +00:00
Sterling Hughes 2b2623981d As per Andi's suggestions. 2001-04-30 15:32:02 +00:00
Sterling Hughes 0ef7f36ecd # Wayyyyy too many entries, if anyone has an idea to maybe cut this down to
# one or two anouncements, speak!! :)

update the news file in accordance with my previous commit...
2001-04-30 15:14:02 +00:00
Sterling Hughes 33d5c80bcd Add some missing constants. 2001-04-30 14:46:04 +00:00
Sterling Hughes ea2cf1856f # Ok, big ass change list. Most of the changes are NEW's worthy, so
# I'll enter them directly there, not here....  The non-newsworthy code
# is:

Added REGISTER_CURL_CONSTANT() a wrapper around REGISTER_LONG_CONSTANT()
Re-vamp the internal php_curl structure.
Properly free allocated slist's and HttpPost structures
many whitespace changes
speed improvements (in the post handling and slist area's)

# Furthermore, as a side note, while the code I'm committing is correct,
# no one will be able to compile it yet and test it, as it requires a
# patched version of curl (if you really want to try it out and can't
# wait a day or two, send me a private mail)
2001-04-30 14:36:19 +00:00
Daniel Beulshausen 0a121f855c make pgsql build under win32 again 2001-04-30 14:23:41 +00:00
Adam Dickmeiss c8e177c7a3 Timeout setting for yaz_wait. Force call by reference for yaz_ccl_parse
and yaz_scan_result.
2001-04-30 14:11:15 +00:00
Rui Hirokawa e2e2d432fd added japanse http input (POST/GET/Cookie) handler. It is nessceary to add input encoding conversion functionality for ext/jstring. 2001-04-30 13:27:53 +00:00
Rui Hirokawa 1cc00fa05a added japanese string function module. 2001-04-30 13:24:46 +00:00
Andi Gutmans 1b94b89cb8 - Add mistakenly removen closing bracket 2001-04-30 13:05:11 +00:00
Andi Gutmans ec1068d695 - Get rid of warning 2001-04-30 13:04:27 +00:00
Daniel Beulshausen b9927b845f *must* use HwSLS_FETCH() 2001-04-30 12:53:58 +00:00
Andi Gutmans 4c823e8a89 - Change macros from V_ to VCWD_ because of AIX name clash 2001-04-30 12:45:02 +00:00
Daniel Beulshausen 96330d36bc make dsp supporting gd2 2001-04-30 12:14:36 +00:00
Sergey Kartashoff a1eee04a1b Udm_Cat_List and Udm_Cat_Path functions has been added.
@ Udm_Cat_List and Udm_Cat_Path functions has been added.
2001-04-30 11:11:19 +00:00
Daniel Beulshausen b120ab3986 look in Release_TS_inline for php4ts.lib as well 2001-04-30 11:09:03 +00:00
Daniel Beulshausen 9eaffbfcb0 make dotnet module build again & fix dsp ouput dir 2001-04-30 10:57:31 +00:00
Daniel Beulshausen cdbe5f50b0 newer libxml libs are called libxml2.lib 2001-04-30 10:33:17 +00:00
Andi Gutmans 1d3ef30714 - Fix crash bugs when rfc822_qprint and rfc822_base64 return NULL 2001-04-30 10:23:13 +00:00
Sergey Kartashoff 266a3b0dd6 # mnoGoSearch module TODO updated 2001-04-30 10:04:47 +00:00
Daniel Beulshausen f1351348b8 fix ouput directory 2001-04-30 10:01:36 +00:00
Daniel Beulshausen cb7c65d052 fix win32 build 2001-04-30 09:57:16 +00:00
Sergey Kartashoff 52c3958f88 Added UDM_FIELD_CATEGORY parameter to get current document
category in the mnoGoSearch module
2001-04-30 08:57:41 +00:00
Andi Gutmans 14947e7001 - Interactive mode is back in 4.0.6 2001-04-30 07:11:51 +00:00
Andi Gutmans aa1c46b3d8 - Try to solve crash on OS400. There is actually no reason I can see for
why his fix should solve a crash but it doesn't harm.
2001-04-30 05:39:37 +00:00
Andi Gutmans ce7d0ef090 - Fix crash bug in interactive mode 2001-04-30 04:50:34 +00:00
David Croft 34f03f2c5c @ - Added key_exists() to check if a given key or index exists in an
@ array or object (David Croft)
Added key_exists() to check if a given key or index exists in an array or object
2001-04-30 04:06:09 +00:00
ea7a6b407b ChangeLog update 2001-04-30 01:09:11 +00:00
Zeev Suraski 6217d16f9a layout 2001-04-29 18:21:37 +00:00
Andi Gutmans 91451bfcaf - Remove leak from opendir() under Windows. Maybe readdir.c should be
changed to use emalloc()
PR:
Submitted by:
Reviewed by:
Obtained from:
2001-04-29 18:06:56 +00:00
Andi Gutmans cabf7b8932 - Some news 2001-04-29 18:02:20 +00:00
Andi Gutmans 21603118b1 - Fix bug Bug id #5987. It could be fixed by changing readdir.c but I
- prefered not to touch that code but to treat windows a bit differently
- in dir.c
PR:
Submitted by:
Reviewed by:
Obtained from:
2001-04-29 17:57:23 +00:00
Zeev Suraski 6487d08e6b Accept the fix suggestion from bug #9562 2001-04-29 17:33:11 +00:00
Derick Rethans b8ad2e842d - 'Fix' for bug #10145 2001-04-29 15:48:07 +00:00
Sebastian Bergmann b5c2de814e Added not about 'thread-safing' all extensions for 4.1. 2001-04-29 13:35:52 +00:00
Sean Bright a98c9ba66f Fix proto decription. 2001-04-29 13:30:56 +00:00
Sean Bright 596e8208be Really fix bug #10362.
# My previous fix caused a segfault when there were parens in an unallowed
# tag :(  Thanks Andi.
2001-04-29 13:16:05 +00:00
Andi Gutmans b63bcebc6e - Whitespace 2001-04-29 13:06:00 +00:00
Andi Gutmans 277ab5f223 - Improve overwrite detection in debug mode. 2001-04-29 13:00:46 +00:00
Andi Gutmans 02b9292ff2 - Update to work with latest Zend
PR:
Submitted by:
Reviewed by:
Obtained from:
2001-04-29 12:58:50 +00:00
Zeev Suraski c8a768a2fb whitespace fix 2001-04-29 11:37:03 +00:00
foobar 28a2cb46d5 Fix bug #10545. 2001-04-29 10:14:18 +00:00
Andi Gutmans 27fd3a2e57 - Previous patch for too early freeing of resources seemed to have worked.
- Clean it up a bit.
2001-04-29 09:21:38 +00:00
Andi Gutmans b11202d66b - Try and solve the too early resource destruction problem. 2001-04-29 06:33:50 +00:00
b6b47a1f3d ChangeLog update 2001-04-29 01:09:13 +00:00
Sean Bright 9e34117cd9 Fix for bug #10362 2001-04-28 23:07:51 +00:00
Sterling Hughes 425c714435 # Actually fix the bug this time (I fixed another bug last time :) 2001-04-28 21:44:44 +00:00
Sterling Hughes d53ab0ae48 fix bug #10541 2001-04-28 21:37:45 +00:00
Zeev Suraski 4e71bbed0a include limits.h if available 2001-04-28 20:21:42 +00:00
Zeev Suraski b87bac782f Fix bug 5661 2001-04-28 20:13:25 +00:00
James Moore 8ac4ce6a43 Zend shallow copy needs to be fixed 2001-04-28 19:30:48 +00:00
Daniel Beulshausen 59f3775f7c add/fix pi3web dsp 2001-04-28 18:46:56 +00:00
Andi Gutmans 26c06df321 - Move all cases into switch(). 2001-04-28 18:20:46 +00:00
Andi Gutmans 1df2271224 - Just some little whitespace stuff. 2001-04-28 15:59:39 +00:00
Andi Gutmans 429aed9066 - Don't add/remove cached memory blocks from blocks list as this will slow
- down performance a bit.
2001-04-28 15:45:50 +00:00
Sean Bright 4175151567 - Fix for bugs #9042, #8212, and #8962. Patch from <tunacat@yahoo.com>
- Fixed proto for exec()
2001-04-28 13:16:18 +00:00
Zeev Suraski 882751dd7d Resources weren't being properly destroyed by the convert_to_*() functions 2001-04-28 02:06:35 +00:00
b3bd55c2cb ChangeLog update 2001-04-28 01:09:17 +00:00
Andi Gutmans dfa9179887 - Commit test passed 2001-04-27 19:11:35 +00:00
Andi Gutmans 3f72a97dbb - Testing commit script 2001-04-27 19:10:58 +00:00
Andi Gutmans acd56b0891 - More whitespace fixes while I'm at it. 2001-04-27 18:53:25 +00:00
Andi Gutmans 0971ff99cb - Whitespace changes to be standard like the rest of Zend 2001-04-27 18:51:56 +00:00
Andi Gutmans a2dbc5babd - Fix some ws to be like the rest of TSRM 2001-04-27 18:50:35 +00:00
Daniel Beulshausen 8e43b4a840 add notes about support directories 2001-04-27 18:00:14 +00:00
Daniel Beulshausen c1f4144665 add instructions for Netscape/iPlanet servers 2001-04-27 17:48:11 +00:00
Daniel Beulshausen 1b279d3477 get rid of MS's _popen/_pclose 2001-04-27 16:41:53 +00:00
Derick Rethans b278223909 - Added note about error messages 2001-04-27 13:57:49 +00:00
Sascha Schumann 453b4c7362 Make old readdir_r code compatible with HPUX and Solaris. 2001-04-27 11:14:48 +00:00
Sterling Hughes c67b6e4836 Add the xslt_make_array and xslt_free_array api functions (C level).
Change the naming to be a bit more standard for a few of the existing
api functions.

Make the sablotron backend compile with these changes.
2001-04-27 05:00:52 +00:00
e9def7c5c7 ChangeLog update 2001-04-27 01:09:16 +00:00
Andi Gutmans f725a0d11a - Convert cfunction -> function. 2001-04-26 19:42:08 +00:00
Sterling Hughes 1865be6ca4 fix for bug #8994, courtesy tom.anheyer@berlinonline.de
# Are we having another RC, and if so, can I MFH in time for it?
2001-04-26 13:47:17 +00:00
Matt McClanahan cb9db291c7 Enforce the right number of params for mysql_fetch_*() functions, related to bug 9839. 2001-04-26 08:22:12 +00:00
Sterling Hughes 25ad8d38f3 Add a readme, this is a substitute to the e-mail I was going to send. it
gives a basic overview of the new xslt extension and goes into the details
of the api, etc.
2001-04-26 05:38:17 +00:00
Andi Gutmans 6e8f7a06f6 - use get_current_key_ex() in order to receive key length and not having
- to use strlen() everywhere.
2001-04-26 02:54:27 +00:00
Sterling Hughes 9c8780c809 Add a free function to free the returned structure. 2001-04-26 02:12:07 +00:00
Sterling Hughes ad138d77db Add the parse_xslt_arguments api function which parses sablotron type
arguments into an easy to use structure.
2001-04-26 02:01:09 +00:00
Rasmus Lerdorf 41b33f0591 Take the blame for this one if it breaks something 2001-04-26 01:57:03 +00:00
Shane Caraveo a7f48e470f compile was broken, new argument? 2001-04-26 01:46:18 +00:00
b1125bb7bc ChangeLog update 2001-04-26 01:09:20 +00:00
1acfec6e9d NEWS update 2001-04-26 01:09:17 +00:00
Sterling Hughes 35890db0a1 Add an experimental version of the new XSLT extension. This is by no means
to be used on anything production, if you want to test it, beware, it may or
may not work (feel free to complain to me if it doesn't work, or shower
praise if it does work)...

Mainly in PHP's CVS so that work on the other backends can take place.
The api (function_entry) is what I'm thinking of for all backends.  Every
backend simply needs to define these functions, I'll send an e-mail describing
all this in a bit....
2001-04-26 00:13:26 +00:00
Stig Bakken 073fa0ee73 * define PEAR_EXTENSION_DIR as well 2001-04-25 21:46:40 +00:00
Hartmut Holzgraefe 17da9f22f2 a backslash was missing (+ whitespace) 2001-04-25 21:26:05 +00:00
Rasmus Lerdorf e8e6828863 - Make the printf functions binary clean
@ - Make the printf family of functions binary clean
2001-04-25 21:05:59 +00:00
Andrei Zmievski 07a5e3fb9c * Made ENT_* defines availabe to other functions.
* The key/variable names in WDDX are now html escaped to not break XML.
@- Fixed WDDX serialization to HTML-escape key/variable names so as not to
@  break the XML packet. (Andrei)
2001-04-25 20:14:29 +00:00
Frank M. Kromann a09c88cb6a Remove c++ comment
Move errormessage when FBExec is not running. This error should not show if we connect through a port number.
2001-04-25 19:45:13 +00:00
Frank M. Kromann 7873ab04b3 make fbsql_field_flags return a value 2001-04-25 18:01:22 +00:00
Frank M. Kromann c5cc42cae9 removed unused code 2001-04-25 18:00:55 +00:00
Andy Sautins 1dc4678d44 Collections cleanup
- Removed date specific methods.  Dates work consistently with
         the rest of the oci8 code.
       - Removed unused variables from collection code.
       - RETURN_FALSE on all errors.
       - fix error prints to php_error.
2001-04-25 17:48:30 +00:00
Andy Sautins e650cba5e4 Cleanup collections - removed unused members from oci_collection structure 2001-04-25 17:44:07 +00:00
Sascha Schumann 6602b48071 Fix optimization -- we did not send out custom Response Status Lines. 2001-04-25 06:42:24 +00:00
Andi Gutmans ef1835f54f - Fix filetype() and lstat() too. 2001-04-25 06:30:24 +00:00
Andi Gutmans ef71855bc6 - Another fix 2001-04-25 05:53:45 +00:00
Andi Gutmans 502b4efb7d - Nuke warning. This signed/unsigned stuff gets really annoying sometimes. 2001-04-25 05:43:30 +00:00
Andi Gutmans 76860d4fc0 - Fix problem with is_link(), there seem to be at least another couple of
- bugs lurking around though.
- Cleaned up code a bit and optimized it a bit too.
2001-04-25 04:22:29 +00:00
3b4923a6f1 ChangeLog update 2001-04-25 01:09:16 +00:00
Stig Bakken 60be93b8de whoops, two less items for 4.1 2001-04-24 23:18:37 +00:00
Sterling Hughes a59a85b598 Fixed a crash bug.
Return the proper amount.
2001-04-24 22:10:41 +00:00
Sascha Schumann ab1df8dfb9 Accomodate Apache HTTPD 2.0 API change 2001-04-24 12:57:34 +00:00
Ulf Wendel a8bc329291 Made Cache::save() a wrapper for Cache::extSave() 2001-04-24 08:27:11 +00:00
c6ada12aa2 ChangeLog update 2001-04-24 01:09:21 +00:00
David Hedbor d522a6a25e Disable use of th_farm since it doesn't seem to work. Uses a Pike layer
thread farm now instead.
2001-04-24 01:08:35 +00:00
Zeev Suraski 532dcda528 Remove unnecessary tab (was killing Tru64 make) 2001-04-23 23:50:56 +00:00
Chuck Hagenbuch 029cd8a882 Fix for bug 9908: check that the result of mail_sort is not 0 before trying
to dereference the pointer. :)

Also, free sort programs - this might have been a memory leak.
2001-04-23 21:58:44 +00:00
Frank M. Kromann 0be5cca176 Fix build on WIn32
Should the new directorys be static?
2001-04-23 17:33:22 +00:00
Thies C. Arntzen c03efd49f4 fixed ZTS buidl - still some WS pollution left 2001-04-23 11:54:02 +00:00
foobar 6398de5a8f Fixed bugs: #10194, #9177. 2001-04-23 07:32:35 +00:00
Rasmus Lerdorf fd57b9e15f Uh, weird typo. Wonder when that crept in. 2001-04-23 06:00:43 +00:00
db22c7e229 ChangeLog update 2001-04-23 01:09:19 +00:00
Jon Parise 34f6baaef6 Updater.php -> Uploader.php 2001-04-23 00:16:56 +00:00
Sterling Hughes bb9fe151c3 Fix bug #10447. 2001-04-22 23:40:34 +00:00
Sascha Schumann c44da99842 Fix freeing of a NULL pointer 2001-04-22 17:20:03 +00:00
Sascha Schumann ff423ef9d9 remove Only.* lines from patch 2001-04-22 14:33:57 +00:00
Sascha Schumann 0fc2ca64bf bytes in the conn structure was renamed to bytes_sent. 2001-04-22 14:22:40 +00:00
Sascha Schumann 38e55b3249 Update patch to thttpd-2.21 2001-04-22 14:00:53 +00:00
Stig Bakken 4d9660d3b9 * fixed PEAR_Common::infoFromDescriptionFile 2001-04-22 07:43:34 +00:00
Stig Bakken 39796b7613 * don't override $libdir and $datadir if they are specified on the
commandline
2001-04-22 01:16:25 +00:00
5774293716 ChangeLog update 2001-04-22 01:09:46 +00:00
Stig Bakken 2cf1b8d345 * expanded the following constants and made them available in PHP:
DEFAULT_INCLUDE_PATH
  PEAR_INSTALL_DIR
  PHP_EXTENSION_DIR
  PHP_BINDIR
  PHP_LIBDIR
  PHP_DATADIR
  PHP_SYSCONFDIR
  PHP_LOCALSTATEDIR
  PHP_CONFIG_FILE_PATH
* no longer generating pear/PEAR.php
* fixed some tests
* some more installer work
2001-04-22 01:09:14 +00:00
Andi Gutmans 9dd0231844 - Add typedef for function pointer of llist dtor 2001-04-21 11:44:00 +00:00
Andi Gutmans a6f90ec7c6 - Get rid of warning. 2001-04-21 11:40:04 +00:00
836ff4bf65 ChangeLog update 2001-04-21 01:09:17 +00:00
Andrei Zmievski b127a8472d Let people know what the heck I was up to. 2001-04-20 20:08:24 +00:00
Andrei Zmievski f52831bc84 Enabling WDDX by default. 2001-04-20 19:33:22 +00:00
Andrei Zmievski 787e4cc0fe That made it into 4.0.5. 2001-04-20 16:56:55 +00:00
foobar d9b2f7910e ws pollution removed. 2001-04-20 15:37:55 +00:00
Stig Bakken c78e847153 * update class doc-comment 2001-04-20 13:04:30 +00:00
Stig Bakken 20c4b9c7b9 * fixed up the XML-RPC class so it's useful at least (based on usefulinc 1b8) 2001-04-20 12:12:35 +00:00
Andi Gutmans 90cf65411c - Fix for crash bug when using invalid arguments in the foreach() loop.
- Reported by Yasuo Ohgaki
2001-04-20 07:09:22 +00:00
fb39bdaaf0 ChangeLog update 2001-04-20 01:09:17 +00:00
Tomas V.V.Cox cf080fb73f fix small bug on error reporting (PEAR::raiseError params order) 2001-04-19 23:56:57 +00:00
Jason Greene ebad4ff6af Change all // to /* */, fixed small whitespace.
Builds on Solaris now.
2001-04-19 22:00:34 +00:00
Stig Bakken fa6f3a3617 * fixed DB_common::getXxx when using the parameter array (didn't work before) 2001-04-19 21:54:37 +00:00
Andi Gutmans a5a4b4e2f8 - Use memcpy() instead of strlcpy() which is faster. 2001-04-19 21:42:45 +00:00
Dan Kalowsky d7383e3255 appling patch for joey since he has no ODBC karma. this is for bug #10252 2001-04-19 19:55:05 +00:00
Andi Gutmans 02af513c0d - Patch from Jason Greene.
- Make it easier to write PHP function definitions in more than just one .c
  file while accessing the same module globals.
2001-04-19 17:51:23 +00:00
Sterling Hughes 06e6363985 fix crash bug 10400. 2001-04-19 14:59:33 +00:00
Wez Furlong d52f75aa1c Patch from Adam Dickmeiss to make configure detect libtff again. 2001-04-19 14:16:09 +00:00
Stig Bakken 2966cc538b * cotcha, Tomas 2001-04-19 12:31:20 +00:00
Ulf Wendel 457c638bfb - fixed the garbage collection
Added some kind of LRU to delete all entries older than n seconds.
  This fixes the bug that cache entries with lifetime 0 (endless) never
  got removed although if they are no longer used. What's still missing
  is some space limit for cache data.
2001-04-19 11:04:01 +00:00
Andi Gutmans 3fc529e30d - \r\n -> \n 2001-04-19 04:16:27 +00:00
Andi Gutmans 65cccf02ba - WS 2001-04-19 04:02:03 +00:00
Stig Bakken 43bba67988 * forgot to update this test too 2001-04-19 02:40:35 +00:00
Stig Bakken 2e4ecd5cab * DB_common now inherits PEAR and its error handling stuff
* DB_common::raiseError is now just a wrapper for PEAR::raiseError
* fixed some cast warnings in prepare/execute
* updated tests
2001-04-19 02:37:47 +00:00
Stig Bakken 4f84d76ed7 * check that error callbacks exist 2001-04-19 02:33:24 +00:00
Stig Bakken ad8dbb8d10 * added Colin's connect/factory error reporting fix 2001-04-19 02:32:33 +00:00
Dan Kalowsky f41f369754 corrects bug #7488, patch supplied by submitter (torben@php.net).
quick local tests show it to work.
2001-04-19 02:31:23 +00:00
d598a9b03f ChangeLog update 2001-04-19 01:09:08 +00:00
Stig Bakken b16f38e2e7 * fix handling of broken DSNs like Colin suggested 2001-04-18 23:03:18 +00:00
Derick Rethans f557830af8 - Fixed some more problems with keys being chopped off (fix for bug #8839) 2001-04-18 22:14:06 +00:00
Adam Dickmeiss 1c62af36eb Function yaz_record returns database for record if type is "database". 2001-04-18 15:03:24 +00:00
Marc Boeren e2c8e80e2b Removed some old commented code (Mc) 2001-04-18 12:34:52 +00:00
Marc Boeren 9fc2c61698 Added DBX_CMP_TEXT and DBX_CMP_NUMBER constants and support for them in
the dbx_cmp_desc and dbx_cmp_asc functions. The old method of passing a
string "number" is now no longer valid. (Mc)
2001-04-18 12:31:08 +00:00
Wez Furlong e85f4fd5a7 Information about php streams 2001-04-18 10:43:21 +00:00
16f1d716a4 ChangeLog update 2001-04-18 01:09:15 +00:00
Frank M. Kromann f09a36b91f Adding fbsql_fetch_assoc() functon 2001-04-17 17:39:43 +00:00
Wez Furlong 86c84da7c2 Discovered warn_not_available and used it. 2001-04-17 17:08:03 +00:00
Wez Furlong 57af70f707 Changes for streams. Added temporary fopenstream function to PHP so that
the streams can be tested.
2001-04-17 17:06:06 +00:00
Wez Furlong 5dbb3a7708 Added files for PHP streams 2001-04-17 17:03:18 +00:00
Wez Furlong 2a26be63a0 Added --enable-php-streams option for experimental file abstraction 2001-04-17 17:01:33 +00:00
Zeev Suraski 1078e61c74 small beautification 2001-04-17 15:19:14 +00:00
Stig Bakken 90c1355a75 * PEAR_Installer un-broken again, it still doesn't update the
package list though
* better error handling in "pear" script
2001-04-17 02:33:45 +00:00
Dan Kalowsky 685186f9fd This change seems to fix bugs 7158, 7807, 8531, and 8636. After asking why this patch was applied no one seemed to respond with anything useful. If you find this change in error, sorry, I tested it on as many systems as I could. 2001-04-17 02:02:36 +00:00
Stig Bakken 2723ad2e63 * have DB.php use PEAR::raiseError in factory methods 2001-04-17 01:51:27 +00:00
Stig Bakken 266cc59f06 * enable static use of PEAR::raiseError 2001-04-17 01:29:48 +00:00
Stig Bakken 457333c1fd * implemented PEAR_Packager to make distribution packages. Currently only
runs on platforms with GNU tar installed
* the "pear" script now requires a command parameter (similar to cvs),
  for example "pear package Cache.xml"
* broke PEAR_Installer :-)
2001-04-17 01:17:59 +00:00
c7f7fcf430 ChangeLog update 2001-04-17 01:09:35 +00:00
4f9e803218 NEWS update 2001-04-17 01:09:32 +00:00
Wez Furlong fe88b5fd6e Fixed lame attempt to prevent ttf linkage when using freetype2 2001-04-17 01:02:37 +00:00
Stig Bakken 0edbf4242f * using CGI -C option, you no longer have to specify "full" path to tests 2001-04-16 23:28:58 +00:00
Stig Bakken 0b2641efa6 @Added -C command-line option to avoid chdir to the script's directory (Stig) 2001-04-16 23:20:47 +00:00
Stig Bakken f35cef5928 * DB::isManip now handles create, drop, alter, grant, revoke. 2001-04-16 22:16:38 +00:00
Stig Bakken ee17aae3ac * make the error class used by raiseError configurable (_error_class property,
overridden by first parameter to constructor)
2001-04-16 21:45:21 +00:00
Stig Bakken d3bb832585 * actually commit the stuff I said I had committed :-) 2001-04-16 21:24:38 +00:00
Frank M. Kromann fb98b6b838 Fixing memory leek on CancelFetch. 2001-04-16 16:27:11 +00:00
Sebastian Bergmann c7dcf9e0dc Daniel fixed this for PHP 4.0.6. 2001-04-16 13:55:18 +00:00
Andrei Zmievski 6f31580b99 More todo stuff. 2001-04-16 13:54:10 +00:00
James Moore 426a9cea75 - Updating order slighly so the install is easier to follow. 2001-04-16 09:44:21 +00:00
Andrei Zmievski 1a1018452c @- Fixed a bug with /e modifier in preg_replace(), that would not correctly
@  replace two-digit references if single digit references were present
@  before them. This fixed bug #10218. (Andrei)
2001-04-16 04:56:31 +00:00
c3874032b9 ChangeLog update 2001-04-16 01:09:12 +00:00
Stig Bakken 1bdc3d7478 * added sgml/xml catalog file 2001-04-15 23:53:09 +00:00
Stig Bakken a90c2198e0 * add a package type called empty (default) 2001-04-15 23:52:42 +00:00
Alexander Feldman f0abfcc894 Fixed typo. 2001-04-15 19:03:12 +00:00
Alexander Feldman 531b8042ad We shoud not fseek in a pipe and this caused a problem with popen and
fgets on the platforms where the buffer fix was applied (Solaris, FreeBSD).
Now the fseek is done only when the handle is of type fopen.
2001-04-15 18:42:50 +00:00
6426150e20 ChangeLog update 2001-04-15 01:09:16 +00:00
14e3e6fdec NEWS update 2001-04-15 01:09:13 +00:00
Rui Hirokawa 053994b5eb deleted warning output in dbx/pgsql. 2001-04-14 10:32:14 +00:00
Thies C. Arntzen af142e4d71 . 2001-04-14 10:30:05 +00:00
Thies C. Arntzen c42f260145 enable temporary LOBs when we detect oracle 8.1
enabled by default in Win32 project!
2001-04-14 09:51:29 +00:00
Thies C. Arntzen 8ac2502dfe @- Added temporary LOB support in OCI8 (Patch by David Benson) 2001-04-14 08:38:46 +00:00
Thies C. Arntzen 14d800f7d9 the collections stuff s worth mentioning in the credits! 2001-04-14 08:06:40 +00:00
df66aaf371 ChangeLog update 2001-04-14 01:09:21 +00:00
f96477443e NEWS update 2001-04-14 01:09:18 +00:00
Wez Furlong 2377647ff3 Added news about gd and openssl changes. 2001-04-14 00:38:45 +00:00
Wez Furlong e030eb8238 When using freetype2, turn off libttf and turn on native gd ttf. 2001-04-14 00:15:26 +00:00
Derick Rethans 55518d347d - Added the note about function names 2001-04-13 23:52:15 +00:00
Stig Bakken b45726148e * separated and compressed changelogs from 1999 and 2000 2001-04-13 23:33:49 +00:00
Stig Bakken 81e1ef0ad7 * PEAR: look for destructor methods in parent classes if
the current class does not have one
2001-04-13 22:24:33 +00:00
Stig Bakken fd7ec5e216 here's a preliminary list of stuff for 4.1 2001-04-13 20:47:12 +00:00
Thies C. Arntzen 9a42a31ba4 @- Fixed crash in pathinfo() 2001-04-13 18:22:13 +00:00
Thies C. Arntzen b9216bcc1b @ - OCI8 now supports binding of collections
@   (Patch by Andy Sautins <asautins@veripost.net>)
2001-04-13 14:43:39 +00:00
Wez Furlong e9731903d1 Added GD 2.0.1 support. 2001-04-13 12:00:12 +00:00
d79ebde6ab ChangeLog update 2001-04-13 01:09:25 +00:00
26395fe31d ChangeLog update 2001-04-12 01:09:18 +00:00
Thies C. Arntzen cb88701315 never initialize oci in OCI_THREADED mode. seems to break win32. 2001-04-11 15:46:03 +00:00
Marc Boeren 4532eebc4a Added a database member to the dbx_link object. Since e.g. mysql reuses
connections, two or more dbx_link objects may share the connection
identifier. The database name is used in the dbx_query, where it calls
mysql_db_query instead of mysql_query.
This means the database name has to be passed around to all dbx_xxx_query
functions, hence the update on all the files. (Mc)
# Thanks to Christian Rabe for all the input on this issue!
2001-04-11 08:14:57 +00:00
5ee8bfebb4 ChangeLog update 2001-04-11 01:09:19 +00:00
Frank M. Kromann 6df886acfe Fixing database password to actually work 2001-04-10 18:44:51 +00:00
Jon Parise 6aabc2c9d4 Statements end with a period. 2001-04-10 17:31:35 +00:00
Kevin 3cd2c989d3 Fixed compatibility issues in the ODBC extension for the Velocis Database server. Specifically, config.m4 was changed to use the client libraries instead of the serer libraries, and to look for the libs in the $RDSHOME/lin directory ass opposed to the $RDSHOME/bin directory. Makefile.in was changed to use the php_odbc.c file as the source for Velocis support. Other misc changes include a few #defines for some undefined data types and some #ifdefs for unsupported functions. 2001-04-10 16:26:28 +00:00
Jason Greene 86c2eaf741 Fix for PR #9729, 9664, 9656, 8667.
All compilers on Solaris should build this extension correctly now.
It turns out the SUN CC, by default, enables a define that enables the use of
#pragma redefine extname in sun header files. This is why cc would work,
and gcc wouldn't.

-Jason
2001-04-10 03:16:05 +00:00
7fb085f644 ChangeLog update 2001-04-10 01:09:15 +00:00
Derick Rethans a379669ab6 - Removed debug thing 2001-04-10 00:09:17 +00:00
Derick Rethans 61e1bf9286 - Fix for bug #8839
- MINFO updated to use smart_str's
2001-04-10 00:07:53 +00:00
Sean Bright b936138fd3 Constand should be case sensitive.
# Thanks Sterling
2001-04-09 21:12:54 +00:00
Jon Parise 5464d29551 Fix whitespace (use tabs). 2001-04-09 21:08:47 +00:00
Sean Bright ec6f1887f8 Stop SIGSEGV on Apache startup. Patch from <adam@indexdata.dk> 2001-04-09 20:56:49 +00:00
Sascha Schumann 466c226415 Revert mega patch.
This patch has at least the following deficiences:

- the CGI is built using objects from another SAPI module.
  This usually results in unsatisfied symbol references.
- the CGI makefile is not created properly
- building CGI cannot be disabled
2001-04-09 15:47:19 +00:00
foobar d85be2956c Fix bug #10212. 2001-04-09 15:46:24 +00:00
Rasmus Lerdorf 334cba47b9 printf argnum (parameter swapping) support from Morten Poulsen 2001-04-09 15:44:24 +00:00
Marc Boeren 066547a220 Added optional 'comparison_type' parameter to compare functions, to force
either text or number comparison. (Mc)
2001-04-09 11:53:39 +00:00
Uwe Steinmann 7ee542a524 - added domxml_version() to retrieve version of libxml 2001-04-09 11:53:06 +00:00
Sascha Schumann 846d6b1536 Fix current CVS breakage 2001-04-09 11:35:10 +00:00
d795707fd0 ChangeLog update 2001-04-09 01:09:28 +00:00
e585d2fe44 NEWS update 2001-04-09 01:09:23 +00:00
Stig Bakken a4877d7afd * CGI version is always installed!
* replaced --disable-pear with --with-pear=DIR (or --without-pear),
  is backwards compatible
* use --datadir, --libdir and --sysconfdir configure options to determine
  where PEAR files, shared extensions and php.ini goes
* simplified the extension version directory name
2001-04-08 22:30:17 +00:00
Stig Bakken 368c6bf003 @Add DIRECTORY_SEPARATOR constant ('/' on UNIX, '\' on Windows) (Stig) 2001-04-08 21:57:13 +00:00
Holger Zimmermann 23f3187b6f Contribute the MSVC project file. Someone could add this to the php4ts workspace. 2001-04-08 11:04:27 +00:00
Holger Zimmermann 8c0f71e7b3 Reorganized the #define's in the header. 2001-04-08 10:49:07 +00:00
Holger Zimmermann 9b7aa43dd4 Updated copyright agreement regarding move of Pi3Web to sourceforge. 2001-04-08 08:25:20 +00:00
Jon Parise 99b5477b90 Use tabs instead of spaces. 2001-04-08 01:13:07 +00:00
0800c33b51 ChangeLog update 2001-04-08 01:09:18 +00:00
foobar 176f5847be ws pollution removed. 2001-04-07 21:46:43 +00:00
Jon Parise db2cfde087 Fix compilation (strict compilers require constant initializers). 2001-04-07 18:22:29 +00:00
André Langhorst 9762f64222 fix proto 2001-04-07 15:43:06 +00:00
foobar 393189fccd fixed protos 2001-04-07 02:48:19 +00:00
a659972625 ChangeLog update 2001-04-07 01:09:19 +00:00
foobar 802a3ab829 Fixed some bugs. 2001-04-06 23:17:31 +00:00
foobar 84e5576f97 Killed some compile warnings. 2001-04-06 18:01:52 +00:00
Sean Bright a1ba58a46c Fixed possible overflow again.
# Heh...
2001-04-06 17:48:34 +00:00
Jon Parise c3634ff399 Comment out the 'include_path' variable by default.
# Leaving it blank overrides the default include path, which contains the
# PEAR directory.
# The other option is to have the build system generate this file and expand
# @PEAR_INSTALLDIR@ on this line to reflect the system default.
2001-04-06 16:24:55 +00:00
Jon Parise 8540c6923d Make this message more grammatically correct. 2001-04-06 16:04:25 +00:00
Jon Parise 1f451daf54 Fix expansion of PEAR_INSTALLDIR. 2001-04-06 16:01:20 +00:00
Sean Bright 10eaf14db9 Fixed possible overflow. 2001-04-06 14:42:06 +00:00
foobar 349b2bebe3 fixed typo in CVS id 2001-04-06 01:50:40 +00:00
72b58e62e2 ChangeLog update 2001-04-06 01:09:22 +00:00
foobar 62c517d124 spaces to tabs 2001-04-05 18:48:03 +00:00
Andi Gutmans 42fbe5be4b - Whitespace 2001-04-05 14:02:08 +00:00
Andi Gutmans a943751310 - Lock the whole thing for now in order not to have a race condition.
It shouldn't effect performance too much because usually threads are
  reused a few times before they are nuked by the web server, at least
  under IIS and Zeus.
2001-04-05 14:00:54 +00:00
Andi Gutmans 81d932c9d1 - Nuke README.BCMATH 2001-04-05 13:23:32 +00:00
Daniel Beulshausen 26f85bbbe7 add printer ext to php.ini & maintain extensions file 2001-04-05 12:41:25 +00:00
Romolo Manfredini 0509957bc3 pg_close not closing right connection. 2001-04-05 12:29:24 +00:00
Sascha Schumann 1280c0a2a2 Remove manual entry 2001-04-05 11:03:21 +00:00
Sascha Schumann d8b3bdf3bc Fix static Apache builds which were broken by the last commit. 2001-04-05 10:56:04 +00:00
Wez Furlong 486d3bef18 Fix for Bug #10168 (is_dst undeclared) 2001-04-05 08:40:27 +00:00
foobar 8960888c97 Fix bugs: #10157, #7549 2001-04-05 05:38:18 +00:00
b735ec3dbc ChangeLog update 2001-04-05 01:09:19 +00:00
Andi Gutmans 6123fe515d - Revert previous fix because dtor's which access thread local storage
might stop working. Need to fix this! We can either mutex the whole thing
  which is slow (this is how it was before the race condition was introduced)
  or find a different solution.
2001-04-04 21:43:04 +00:00
Thies C. Arntzen cc48dd2138 make it compile with 6.5.x
postgresql notices are now send to the standard error-log
2001-04-04 21:40:41 +00:00
foobar d9b309fdfa This branch is 4.0.6-dev.. 2001-04-04 20:52:44 +00:00
foobar c34d2b91da Added new configuration directives:
arg_separator.input and arg_separator.output
2001-04-04 20:46:26 +00:00
Frank M. Kromann 382e3c5ad6 Adding empty RSHUTDOWN function. 2001-04-04 20:10:14 +00:00
foobar 66553616ec Killed 2 compile warnings. 2001-04-04 17:13:40 +00:00
Andi Gutmans 78861607d7 - Fix race condition in ts_free_thread(). 2001-04-04 17:05:10 +00:00
Andi Gutmans 9047e5c956 - Use tabs and not spaces !!! 2001-04-04 16:33:06 +00:00
Andi Gutmans ac8ab87841 - This can explain lots of instability on multi-threaded platforms! 2001-04-04 16:25:29 +00:00
Jason Greene 6e2a6e07db This is a temporary fix to the previous patch that breaks the build.
This keeps the functionality of searching for glibtool or libtool,
but have you checked the rest of the build process to see if this is
compatible? Regardless, 'which' returns a value on some os's when nothing is
found which breaks the previous patches test. Also the unary negation after
an if is not compatible with true bourne.

-Jason
2001-04-04 04:41:01 +00:00
890430014c ChangeLog update 2001-04-04 01:09:12 +00:00
foobar 460293fbdc Cookies use ; as argument separator.
# And also the first step for the possible configure option
2001-04-04 00:37:06 +00:00
foobar 679b914dc0 Cleaned up a bit. Removed some checks for header files that are
already checked in configure.in
2001-04-04 00:06:49 +00:00
Wilfredo Sanchez cb71c4c2d0 Separate CPPFLAGS from CFLAGS. 2001-04-03 23:30:49 +00:00
Wilfredo Sanchez a71b0e1bfb Note INSTALL_ROOT change 2001-04-03 23:05:08 +00:00
Daniel Beulshausen f085ab8a33 use V_STAT 2001-04-03 22:36:27 +00:00
Daniel Beulshausen a29dc27c1c resolve realpath if in v-dir mode 2001-04-03 21:39:18 +00:00
Wilfredo Sanchez 5c30ce1436 Undo oopsie 2001-04-03 21:16:07 +00:00
Wilfredo Sanchez 0df6e8dd88 Add INSTALL_ROOT variable to specify install location. 2001-04-03 20:59:50 +00:00
Wilfredo Sanchez a0a471e7a3 Find libtool if it's called glibtool. 2001-04-03 19:07:32 +00:00
Frank M. Kromann 8003b3aa9d Fixing crash when listing databsaes
Fixing rowcount to woirk when the result contains an array og data.
2001-04-03 18:09:02 +00:00
foobar 83b5a2fb0c SCO (and maybe others) do not have this defined. 2001-04-03 10:51:16 +00:00
Jon Parise c20a6ff9dc Cleaner (and probably safer) condition handling. 2001-04-03 03:12:49 +00:00
b2f09a03a2 ChangeLog update 2001-04-03 01:09:16 +00:00
Wez Furlong 1d71f04b44 changed the flags parameters to be a bitfield + constants (I don't know what
I was thinking!).  Added a couple of extra parameters so that the equivalent
functionality of the openssl smime command can be pretty much used in full.
Added some more error reporting.
2001-04-02 23:14:01 +00:00
Anil Madhavapeddy d26ec12ba2 Free the correct output buffer, to avoid a segfault on a HEAD request
when using output buffering with a custom handler (patch by zeev@)
2001-04-02 16:45:27 +00:00
James Moore e52ec10341 remove rogue ZEND_GET_MODULE() 2001-04-02 16:37:50 +00:00
Nick Gorham 971d65059a Added small change to php_odbc module, to check for failed SQLDisconnects
and to close any outstanding transactions if the call fails, then disconnect
again. This can cause chaos with SQL Server, this regards a SELECT as
starting a transaction, and will leave it  open if the result set is not all
read.
2001-04-02 15:18:47 +00:00
Andrei Zmievski 221a5a60b6 Use correct string length. 2001-04-02 13:20:16 +00:00
foobar 943c73896f Fixed a typo. Bug: #10103 2001-04-02 09:06:33 +00:00
Marc Boeren cbdd711312 Inserted a few extra initialisations, just in case. Had some problems in a
different module, this solved it there, hance the added insurance. (Mc)
2001-04-02 08:51:35 +00:00
Wez Furlong 4fa9c7477b added some more error reporting and did a little tidying. 2001-04-02 01:31:08 +00:00
46fcfe73ab ChangeLog update 2001-04-02 01:09:19 +00:00
Wez Furlong 4cec53ac28 Added whole bunch of PKCS7 (S/MIME) functions and made the key/cert params
a bit more friendly to use.  See the README for more info.
2001-04-01 23:06:15 +00:00
Sebastian Bergmann 2348bb3031 Fixed some glitches in NEWS. (Yes, you may call me pedantic :-) 2001-04-01 14:13:09 +00:00
foobar 78390894e9 According to GD documentation the macros should be used instead.. 2001-04-01 06:20:45 +00:00
foobar aea8e80a62 Fixed bug #10095. 2001-04-01 05:55:21 +00:00
foobar f663f1edab Fixed bug #8137 and killed some compile warnings. 2001-04-01 05:42:07 +00:00
f29c9900b1 ChangeLog update 2001-04-01 02:09:16 +00:00
Zeev Suraski b865380edb Fix headers handling with output buffering 2001-03-31 22:53:19 +00:00
8f7d387f72 ChangeLog update 2001-03-31 02:09:21 +00:00
Fredrik Öhrn 64bb010cf4 Implemented cpdf_set_viewer_preferences (previously a stub).
Added new functions: cpdf_set_font_directories and cpdf_set_font_map_file.
2001-03-30 20:36:18 +00:00
Anil Madhavapeddy 2df7c8a0f1 Send the correct Vary headers, if we negotiate a gzip/deflate session
via Accept-Encoding.  This obeys a SHOULD directive in RFC2616

PR: 10070
2001-03-30 17:44:08 +00:00
Sascha Schumann 8d5af8cb46 Replace the incomprehensible newline escaping with @NEWLINE@
Fixes the build on Darwin 1.2
2001-03-30 14:02:20 +00:00
Ulf Wendel 2a7b87a162 - Renamed the file following Thies suggestion
100% beginners compatible politics of the PHP core guys: I was (again) allowed to make a mistake without beeing kicked - cool, thanks!
2001-03-30 09:16:54 +00:00
a7ca35193a ChangeLog update 2001-03-30 02:09:17 +00:00
Ulf Wendel e294ebbc6d - uuups, modified the package.dtd, undo 2001-03-29 22:01:52 +00:00
Ulf Wendel f20f37f8ad - Added a package xml file for IT[X] templates 2001-03-29 21:54:27 +00:00
Chuck Hagenbuch 183b651a84 Fix a couple of warnings when calling PEAR::raiseError() statically. 2001-03-29 19:54:27 +00:00
Ulf Wendel b8f18cbc3d - package XML for the Cache
I'm not sure how to use the package.dtd to document packages and if at all the Cache can be it's own package, but one has to start with it... Sterling, Stig can you give me a hint?
2001-03-29 15:01:16 +00:00
James Moore af02c17d9f Output php version at end of tests. 2001-03-29 12:07:37 +00:00
Wez Furlong 3bd5696a65 Fixed leak in php_iconv_string. Also returns FAILURE on failure,
rather than -1
2001-03-29 09:37:09 +00:00
32e7737567 ChangeLog update 2001-03-29 02:09:19 +00:00
foobar 7449d09be0 Fixed bug: #10040. 2001-03-29 00:22:45 +00:00
Tomas V.V.Cox 1910b18164 pgsql.php
* better handling of $rownum param in fetchInto()
* changed property numrows[] to num_rows[]

DB.php
* $rowmun in fetch* now defaults to NULL

mysql.php
* added default $fetchmode to ordered
* removed extra checks in connect()
* fetchrow() now uses fetchInto()
* added the "fetch absolute row numbers" feature to fetchInto()
(not tested)

ifx.php
* better handling of $rownum param in fetchInto()
2001-03-28 23:52:21 +00:00
foobar 6c55672dfd Make file() work again.
# For some reason if libbind is linked with PHP the file() function
# won't work with URLs. Do we even need libbind?
2001-03-28 22:30:21 +00:00
André Langhorst 7d50e21a4b fix typo 2001-03-28 20:08:49 +00:00
André Langhorst 339ac67ce3 fix proto 2001-03-28 19:41:38 +00:00
Ulf Wendel f5efe02d88 Added a simple usage example 2001-03-28 18:32:20 +00:00
Zeev Suraski 9aac926d3f Fix warning 2001-03-28 16:12:16 +00:00
Zeev Suraski 6dafabd73f Make Windows happy 2001-03-28 15:46:51 +00:00
Zeev Suraski 3492049c86 Get rid of more redundant code 2001-03-28 15:32:52 +00:00
Zeev Suraski 3d3d8881c6 Cleaner way of making sure resources start at 1 and not 0... 2001-03-28 15:22:15 +00:00
Zeev Suraski 8c13f9d56f Remove redundant code 2001-03-28 14:56:28 +00:00
de291baf63 ChangeLog update 2001-03-28 02:09:25 +00:00
foobar 8a26918ed1 Renamed the AC_ prefixed macros defined in acinclude.m4 to PHP_* prefixes.
# Heads up people! I tested this before committing but you never know..
2001-03-27 20:35:04 +00:00
Derick Rethans c713967de3 - 'Fix' for bug 10002 2001-03-27 17:21:45 +00:00
Zeev Suraski 59c32058fc God knows what this code was doing... 2001-03-27 16:46:24 +00:00
Dan Kalowsky 959f40a957 The last fix was missing a &, Marc Boeren either made the patch wrong, or I applied it improperly. Anyways, Sebastian Bergmann discovered it, and supposedly is fixed with this. 2001-03-27 15:46:27 +00:00
Ben Mansell afbcd5c4eb Changed header handling; before, we were somehow losing
Content-Type: text/html
2001-03-27 15:16:34 +00:00
Thies C. Arntzen 679d841502 fixed newly introduced crash in ora_bind 2001-03-27 14:55:04 +00:00
Dan Kalowsky 0d7729ed58 Fix for Bug #9272, as submitted by marc boeren (m.boeren@guidance.nl).
Applied by me, due to apparently a lack of cvs access to ext/odbc for him.
2001-03-27 14:17:52 +00:00
foobar 8c97f5c04d Fix the arg_separator behaviour. Only & or ; is allowed as separators so no need to use the ini setting here. 2001-03-27 11:34:51 +00:00
e080bd20e8 ChangeLog update 2001-03-27 02:09:18 +00:00
Tomas V.V.Cox 88d526ec5b pgsql.php
* connect() always use pg_connect string instead of the deprecated params
mode
* removed duplicated functions prepare() and execute() (now in common.php)
* pgsqlRaiseError() always fills native error param on DB_error objs
* added third param $rownum to fetchInto() so users can fetch also absolute
row numbers
* changed fetchRow() to use fetchInto() (can not erase, still used in get*()
from common.php

DB.php
* added third param $rownum to fetchInto()/fetchRow() so users can fetch
also absolute row numbers
* changed fetchRow() to use fetchInto()
2001-03-26 23:31:49 +00:00
foobar 6751e58f9d Fixed a typo. 2001-03-26 21:42:01 +00:00
foobar badb701caf Fixed the problem with libbind (again). 2001-03-26 21:34:59 +00:00
Andrei Zmievski 3e2ff3409a Updated get_class_methods() to take class instance as well as class name. 2001-03-26 20:14:21 +00:00
Andrei Zmievski d95607dcf8 More news. 2001-03-26 20:10:19 +00:00
Sebastian Bergmann dbe4447040 Nitpicking. 2001-03-26 19:03:36 +00:00
Andrei Zmievski 54da9024f5 Making it possible to pass a class name to get_parent_class() as well
as a class instance.
2001-03-26 19:03:06 +00:00
Andrei Zmievski 58aaeed92d Zend related news update. 2001-03-26 18:59:01 +00:00
Sterling Hughes cac0c51bab Remove FUNCTION_LIST.txt, the file is sadly out of date and not really used... 2001-03-26 18:29:12 +00:00
foobar 3c11d1697e Support Solaris 8 ldap. 2001-03-26 10:30:48 +00:00
Marc Boeren b8713b9c9b Removed #include php_config.h, since it was not necessary (Mc) 2001-03-26 08:26:07 +00:00
Romolo Manfredini 99e5dfd00e pg_close was undefining default_conn even if a ref to it was still there. 2001-03-26 08:00:43 +00:00
5a0056842d ChangeLog update 2001-03-26 02:09:22 +00:00
d16992a781 ChangeLog update 2001-03-25 02:09:20 +00:00
Jon Parise 0f99a7abea Install the Informix database implementation. 2001-03-24 21:48:41 +00:00
Sebastian Bergmann a92a7018e8 Added missing files. 2001-03-24 21:40:25 +00:00
Sebastian Bergmann 21cb46da23 Added php_dbx.dll. 2001-03-24 21:38:58 +00:00
Romolo Manfredini 7a102a4669 Solved bugs #9746 and #9937, pg_close was closing twice the default conn. 2001-03-24 18:36:43 +00:00
Stig Bakken 48aa99f6be * added Christian Stocker's tableInfo() implementation 2001-03-24 07:00:44 +00:00
e6afd0a691 ChangeLog update 2001-03-24 02:09:15 +00:00
Sascha Schumann fa068b5297 Fix ZTS build 2001-03-24 01:08:13 +00:00
Marc Boeren 1a842c4ae6 Fixed compile errors for PostgreSQL support (Mc)
Removed globals that Rui put in, and changed the dbx_get_row
to include a row_number (which PostgreSQL expects) (Mc)
Added source files to Makefile.in and dbx.dsp (Mc)
#Could someone please check if the PostgreSQL support works?
#And please, check your work _before_ you commit anything!
2001-03-23 14:50:17 +00:00
Andrei Zmievski 2b2484dd3d Fixing function name length. 2001-03-23 14:46:37 +00:00
Andrei Zmievski 1ff080726f Wrap lines. 2001-03-23 14:26:17 +00:00
Rui Hirokawa cd1debc81c changed license of PostgreSQL module in ext/dbx. 2001-03-23 13:40:12 +00:00
Rui Hirokawa 6ee15704e8 added initial support for PostgreSQL to ext/dbx. 2001-03-23 11:50:04 +00:00
Marc Boeren 10bb608e4e Changed header for source files, now point to PHP license (Mc)
Found another // comment and replaced with /**/ (Mc)
Removed proprietary license (in favor of php license) (Mc)
Added .cvsignore file, I hope it works correctly (Mc)
2001-03-23 10:23:58 +00:00
Romolo Manfredini 01ac20050e Added target ownership check in function copy for safe_mode operations 2001-03-23 09:30:51 +00:00
Daniel Beulshausen 6d41bf1492 update news 2001-03-23 08:33:22 +00:00
Daniel Beulshausen 8889397ba8 support unc style paths 2001-03-23 08:33:06 +00:00
Stephen van Egmond cd1b11d2b7 Added configuration for detecting the BeOS thread implementation
(which will be used once I get my patches into Zend to use bthreads).

Also, a check for a library distributed with the new BeOS networking
environment.
2001-03-23 04:56:51 +00:00
Stephen van Egmond 7f48c7adf5 Simple patch to deal with lack of fields in the BeOS implementation of rusage. 2001-03-23 04:36:29 +00:00
115081c775 ChangeLog update 2001-03-23 02:09:24 +00:00
d12d9cfff0 NEWS update 2001-03-23 02:09:21 +00:00
Stig Bakken 4651aa04c0 * fixed Oracle tests, fixed some bugs in DB_oci8, all tests but
errorNative() pass now (but that may be a bug in the test :-)
* implemented numRows() emulation in DB_oci8 that is available
  in "optimize portability" mode only
2001-03-23 01:15:05 +00:00
Frank M. Kromann d7491166c5 Removing extra check for warnings. 2001-03-23 00:58:59 +00:00
Frank M. Kromann 8bea574877 Adding warning when query fails 2001-03-22 21:16:23 +00:00
Ben Mansell 4549e389bb Fix a bug with POST requests. If the Content-Type header wasn't present,
we were setting SG(request_info).content_type to NULL, instead of
an empty string. This was stopping PHP from processing the data.
2001-03-22 18:54:51 +00:00
Ben Mansell 87bc51fc5c Fix a bug with POST requests. If the Content-Type header wasn't present,
we were setting SG(request_info).content_type to NULL, instead of
an empty string. This was stopping PHP from processing the data.
2001-03-22 18:48:51 +00:00
Marc Boeren 49bc33395b Changed C++ style comments to C-style comments (Marc)
#I hope I got 'em all
@Changed C++ style comments to C-style comments (Marc)
2001-03-22 15:14:34 +00:00
Sean Bright 90f3e09f08 Fixed prototype. 2001-03-22 14:43:48 +00:00
foobar f6e4cbd434 Fix bugs: #9920, #9190 2001-03-22 13:16:58 +00:00
Marc Boeren 0f9503c923 no comment :) 2001-03-22 12:26:21 +00:00
Marc Boeren ce79b44c27 Added dbx module (database abstraction) to the repositorty (/ext/dbx).
Compiles under Linux (--enable-dbx) and Windows.
Supports MySQL and ODBC modules (more to be added later).
@ Added dbx module (database abstraction) to the repository. (Marc)
2001-03-22 11:07:04 +00:00
Uwe Steinmann dbc4d4b457 - fixed some bugs with xpath 2001-03-22 06:58:13 +00:00
3dab4f77d7 ChangeLog update 2001-03-22 02:09:16 +00:00
Frank M. Kromann eea4386582 setting right params to zend_get_parameters_ex 2001-03-21 21:53:45 +00:00
Rainer Schaaf 9444df9e0b Beta2 of PDFlib V4.0 will introduce on new function (PDF_place_pdi_page)
and PDF_close_pdi_page will lose one parameter.
These changes are done for the phpwrapper now.
This has no impact on PDFlib V3.x.
2001-03-21 20:55:35 +00:00
Andi Gutmans 022ece7814 - Fix spelling error 2001-03-21 20:07:19 +00:00
Frank M. Kromann 983bfff7de changed arg types from pval* to zval** 2001-03-21 19:56:33 +00:00
Sterling Hughes 689dbb4e16 Remove experimental status from bz2 2001-03-21 19:46:05 +00:00
Andrei Zmievski 34657a7f7e Fixing news. 2001-03-21 16:19:54 +00:00
André Langhorst ec31b454d5 I don't like to commit this over and over either, but this client definitely seems to dislike branches 2001-03-21 16:01:52 +00:00
Ben Mansell 6d7ce5ffa0 UnixWare 7.1 does not have EX_TEMPFAIL or (as far as I can tell)
a concept of a temporary failure response to pclose().
2001-03-21 15:15:31 +00:00
Sean Bright e249545165 Fix for bug #9698.
# Anyone that can think of a way to fix long2ip(), feel free.
2001-03-21 13:53:38 +00:00
André Langhorst f438554953 fighting against the cvs client, it does not want to let the win32 binary safe change go in... 2001-03-21 13:00:33 +00:00
André Langhorst 3d9871dcf4 win32 fixes again 2001-03-21 12:52:32 +00:00
André Langhorst e35a679e74 more win32 fixes 2001-03-21 12:47:46 +00:00
Uwe Steinmann b70952bb50 - fulltext query are working now 2001-03-21 07:58:21 +00:00
Sebastian Bergmann b132c36325 Disable maximum execution time for tests. 2001-03-21 06:33:00 +00:00
André Langhorst 3ec4aa11d1 1) fixed tests on *both* win32+linux
2) made tests more sophisticated (checking against compiled in modules)
3) minor changes
4) win32 improvements
2001-03-21 06:04:36 +00:00
Uwe Steinmann e8d48dd7ae - added EntityReference and Notation class
- fixed handling of PI nodes
- implemented more class functions
2001-03-21 05:45:40 +00:00
Jon Parise d4952b482e Style and whitespace, based mostly on a submission from
"Tomas V.V.Cox" <cox@idecnet.com>.
2001-03-21 04:15:40 +00:00
4eb5ce6edf ChangeLog update 2001-03-21 02:09:23 +00:00
cae0b6f946 NEWS update 2001-03-21 02:09:20 +00:00
Harald Radi 21d00778e5 added [com] section 2001-03-20 22:45:10 +00:00
Harald Radi 256d799809 @Using ITypeInfo instead of IDispatch if possible. This makes DCOM calls
@and even COM calls much faster.
@All ini settings are now prefixed by 'com.'.
@Now you need not provide a path to the file containing the typelib, you can
@also provide the GUID of the TypeLib - entry or an IID for preloading
@type - information. (phanto)
memory leak was reportet, i'm not sure that it is fixed by now, but it should be.
2001-03-20 22:35:30 +00:00
Harald Radi 6a27146e72 added com.h 2001-03-20 22:25:10 +00:00
Sterling Hughes ad8fd43e10 remove some unneccessary casts, remove unneccessary error casts, standardize
the coding format for some of the stuff.
2001-03-20 21:30:42 +00:00
Fredrik Öhrn 3c5ed324dd Fix erronous out of bounds error message in rand(min,max) 2001-03-20 20:48:42 +00:00
Frank M. Kromann 80c4511012 Fixing crash when result conrains 0 rows 2001-03-20 20:25:55 +00:00
Fredrik Öhrn 88a6a97a86 really fix the build 2001-03-20 20:04:42 +00:00
Frank M. Kromann 3cbe879b89 Converting to c-style comments.
Adding prototypes to all exported function
2001-03-20 19:21:45 +00:00
Thies C. Arntzen deae9549c8 make qtdom compile on Mandrake-cooker 2001-03-20 19:19:31 +00:00
Daniel Beulshausen 00b8f898e7 fix dsp 2001-03-20 17:45:10 +00:00
Sebastian Bergmann 53385a9537 Nuke another warning. 2001-03-20 17:04:45 +00:00
Uwe Steinmann 3dfbbc31ac - fixed lot of compiler warnings 2001-03-20 16:20:42 +00:00
Daniel Beulshausen 1ba3c6d65d fix registry per directory values
# they never really worked for me before
2001-03-20 15:44:55 +00:00
Uwe Steinmann 1b07e7a612 - news about domxml 2001-03-20 15:03:33 +00:00
Uwe Steinmann 415e396ac8 - test script for rewritten domxml module 2001-03-20 15:02:10 +00:00
Uwe Steinmann 9fc59ce735 - complete rewrite of domxml module.
It is now mostly conform to DOM Level 2 though some classes and
  methods are still missing
2001-03-20 15:01:13 +00:00
Sascha Schumann a2ff136c8e fix build 2001-03-20 12:50:27 +00:00
d4a3b4895e ChangeLog update 2001-03-20 02:09:20 +00:00
09c1f0a502 NEWS update 2001-03-20 02:09:17 +00:00
Sterling Hughes 9b4c5db8ae Remove some unnecessary error checking 2001-03-20 01:46:41 +00:00
foobar de3f405997 Removed skipif.php + Fixed tests to use skipif.inc instead. 2001-03-20 01:22:07 +00:00
foobar 4f18fcb863 Removed unnessary file. 2001-03-20 01:06:25 +00:00
Andrei Zmievski d9aa966a44 @- Added array_map() function that applies a callback to the elements
@  of given arrays and returns the result. It can also be used with a
@  null callback to transpose arrays. (Andrei)
2001-03-19 21:20:02 +00:00
Andi Gutmans 5c7a762249 - Add support for isset($var1, $var2, $var3); - Will be true only if all
- variables are set.
2001-03-19 19:31:14 +00:00
Fredrik Öhrn 98b5ca057b Removed redundant initialization. 2001-03-19 17:01:36 +00:00
Ben Mansell 2c8c9d68d7 Altered README.Zeus to give instructions on building FastCGI.
Changed --with-zeus configure option into --with-isapi, since its more
descriptive (and since there are now different ways to configure PHP+Zeus)
2001-03-19 11:23:57 +00:00
Ben Mansell 08df6f9b67 @ New FastCGI server module
New FastCGI server module. Based on the thttpd server module with
large chunks of code ripped from the cgi module. Also modifies
Makefile.in and configure.in in order to make it build properly.
# This initial checkin has been tested with the Zeus web server,
# but should work with any server that has a correct FastCGI
# implementation.
2001-03-19 11:03:29 +00:00
d8f3ea791a ChangeLog update 2001-03-19 02:09:18 +00:00
Fredrik Öhrn 87138d68cd Much needed cleanup and new functions added
-------------------------------------------

Cleaned up stringhandling for binary safeness.

All functions now maintain a global 'errno' variable.

All functions now print warning messages on failure.

Added error code constants.

Fixed bug #8041 while maintaining backward compatibility.

New functions:
  yp_all         traverse a map
  yp_cat         retrive an entire map in one go
  yp_errno       get last error code
  yp_err_string  get a human readable error message
2001-03-18 22:16:47 +00:00
Fredrik Öhrn 00d81acc4f Solved compile failure due to clash bewteen IMAP and ClibPDF headers. 2001-03-18 18:32:58 +00:00
foobar 4759855606 Prevent mem leak 2001-03-18 09:25:40 +00:00
foobar e76703ae6a Fix possible crash if content-type is not set. 2001-03-18 08:00:10 +00:00
foobar 4f00125b7a Fix the fix. Plus killed some compile warnings. 2001-03-18 05:52:40 +00:00
Zeev Suraski fbbf5c0faa Fix reference to nuked function 2001-03-18 02:35:10 +00:00
Zeev Suraski d3572f74bb These functions are not necessary - that's what sapi_register_post_entry()
and sapi_unregister_post_entry() are for...

Also, please maintain K&R code layout, it's very messy to have different
styles intermixed in the same codebase, and especially in the same files!
2001-03-18 02:32:04 +00:00
f8178f3d48 ChangeLog update 2001-03-18 02:09:17 +00:00
Zeev Suraski 9db5589161 Recode delayed loading in a much simpler way (switched back to php_ini.c 1.49) 2001-03-17 23:35:32 +00:00
Stephen van Egmond 3b8140e47c fixed a (C++) warning about implicit conversion from void* 2001-03-17 20:35:38 +00:00
Christian Stocker fcdd641539 GarbageCollection was moved into a PEAR-Deconstructor 2001-03-17 16:06:31 +00:00
Daniel Beulshausen e438a6d48f fix dependencys 2001-03-17 12:30:27 +00:00
Zeev Suraski 34b2fc4a6c Fix the output buffering bug Andre found 2001-03-17 03:03:50 +00:00
b89dc4b4d8 ChangeLog update 2001-03-17 02:09:18 +00:00
cda95e161d NEWS update 2001-03-17 02:09:15 +00:00
Andrei Zmievski 770c66125d @- Added array_filter(), which allows filtering of array elements via
@  the specified callback. (Andrei)
2001-03-16 20:46:33 +00:00
Andrei Zmievski f7f2cf9de5 All user callbacks should be to EG(function_table). 2001-03-16 19:51:08 +00:00
Frank M. Kromann 6195f14633 Fixing build on Win32 by adding missing BLS_FETCH(); 2001-03-16 19:48:40 +00:00
Andrei Zmievski 561cc74389 @- Fixed all relevant array functions to avoid moving the internal array
@ pointer during operations. (Andrei)
2001-03-16 19:29:23 +00:00
foobar 88f41b4e91 This has got to be the last one.. 2001-03-16 18:18:01 +00:00
Uwe Steinmann 5dcf391497 - Inserting links without any delimiters is now possible 2001-03-16 17:40:38 +00:00
foobar 530ed2eb50 .php files should not be ignored. Typo? 2001-03-16 17:10:46 +00:00
Derick Rethans 9720ac01fc - Fixed mem leak 2001-03-16 15:59:45 +00:00
foobar 8913a7350e Missed this one. 2001-03-16 14:45:46 +00:00
foobar 21d158229b Make compile again when ZTS is enabled and imap-2000 is used. Bug #9762 2001-03-16 13:17:54 +00:00
Sascha Schumann 59eb57e42a Don't do anything, if the user wants no PDF. 2001-03-16 12:23:31 +00:00
foobar ab560941ee This should fix problems in systems without libbind. 2001-03-16 07:13:06 +00:00
fb41f6730e ChangeLog update 2001-03-16 02:09:22 +00:00
foobar 4567d57c61 Added a check for the one function missing in <= 0.1.0 versions of ming lib. 2001-03-16 02:06:34 +00:00
Brian Bruns bb5369fc62 sybase_affected_rows implementation submitted by John F. Dumas <jdumas@locutus.kingwoodcable.com> 2001-03-16 01:21:32 +00:00
foobar 847e0d996c Killed a compile warning + made ming extension compile with the older ming libs. 2001-03-16 00:37:35 +00:00
foobar 7b6a385c95 Missing files. 2001-03-16 00:36:47 +00:00
foobar e92ff40bc7 Beutify + fix some errors in finding libs and header files. 2001-03-16 00:36:31 +00:00
Daniel Beulshausen 0688feeba4 fix win32 build 2001-03-15 20:45:49 +00:00
Andi Gutmans baa92cc540 - Nuke commented code 2001-03-15 18:58:07 +00:00
Jon Parise 01008bb03c Whitespace (spaces to four-column tabs) 2001-03-15 05:07:31 +00:00
4d26e630d8 ChangeLog update 2001-03-15 02:09:19 +00:00
James Moore 2e22b01cf1 Adding webteam to credits. 2001-03-14 21:28:58 +00:00
foobar 3f64aa6a94 Forgot this one.. 2001-03-14 13:43:58 +00:00
foobar f35cb7d89b Missing. 2001-03-14 13:42:33 +00:00
Sascha Schumann a4ec164698 Fix ZTS build 2001-03-14 13:38:03 +00:00
Uwe Steinmann 46eb8d8def -fixed prototype and indention 2001-03-14 06:33:46 +00:00
e3312da133 ChangeLog update 2001-03-14 02:09:18 +00:00
f6afb343c9 NEWS update 2001-03-14 02:09:15 +00:00
Zeev Suraski 8b5a768640 Make get_browser() read its information from $HTTP_SERVER_VARS[] if available 2001-03-13 23:20:23 +00:00
Zeev Suraski e6f3fb39cb Implement mysql_unbuffered_query() - uses mysql_use_result() instead of
mysql_store_result()
2001-03-13 22:52:53 +00:00
foobar 256537a7cf cleanup. 2001-03-13 22:50:02 +00:00
Jason Greene ba553edc06 fix broken m4, you should have all checking code withing your withval test
-Jason
2001-03-13 22:44:49 +00:00
foobar c45884c5fb Extension was enabled by default.. 2001-03-13 22:33:53 +00:00
Zeev Suraski fdf21452ed Centralize query code 2001-03-13 21:42:43 +00:00
Zeev Suraski f5ddc2826d Use a container struct instead of MYSQL directly 2001-03-13 21:13:19 +00:00
Frank M. Kromann cbbbb1b1df Adding FrontBase extension to modules 2001-03-13 21:02:52 +00:00
Frank M. Kromann d5e1266dc5 Initial check-in of FrontBase extension 2001-03-13 20:58:47 +00:00
Stanislav Malyshev 5c1f7a2f60 Fix off-by-one on config values set from Apache config
# It didn't really hurt, since the extra character was always \0,
# but the phpinfo() display came out ugly.
2001-03-13 18:39:38 +00:00
Andrei Zmievski 6626f902a8 Remove config.h instead of php_config.h 2001-03-13 17:54:38 +00:00
Sascha Schumann 5708ddf171 Replace memcpy and sprintf with smart_strs. 2001-03-13 17:14:47 +00:00
Sascha Schumann 667a1f1fdb buf is gone. Don't reference it. 2001-03-13 17:11:43 +00:00
Adam Dickmeiss 91554d8b9c Added yaz_database. Option bit ExtendedServices set for InitRequest. 2001-03-13 17:04:06 +00:00
Sascha Schumann 2b6698aaa9 Replace another sprintf 2001-03-13 16:58:36 +00:00
Sascha Schumann 86cf74a169 Nuke calls to sprintf, snprintf, strcat, strcpy and rely on
memcpy and smart_strs.
2001-03-13 16:53:34 +00:00
Frank M. Kromann f49d04fb12 Fixing compiler warning on win32 2001-03-13 16:39:47 +00:00
Frank M. Kromann 0981778351 Changed email 2001-03-13 16:33:39 +00:00
1569 changed files with 1023 additions and 400485 deletions

No files matched your search

-219
View File
@@ -1,219 +0,0 @@
PHP Coding Standards
====================
This file lists several standards that any programmer, adding or changing
code in PHP, should follow. Since this file was added at a very late
stage of the development of PHP v3.0, the code base does not (yet) fully
follow it, but it's going in that general direction. Since we are now
well into the version 4 releases, many sections have been recoded to use
these rules.
Code Implementation
-------------------
[1] Functions that are given pointers to resources should not free them
For instance, function int mail(char *to, char *from) should NOT free
to and/or from.
Exceptions:
- The function's designated behavior is freeing that resource. E.g. efree()
- The function is given a boolean argument, that controls whether or not
the function may free its arguments (if true - the function must free its
arguments, if false - it must not)
- Low-level parser routines, that are tightly integrated with the token
cache and the bison code for minimum memory copying overhead.
[2] Functions that are tightly integrated with other functions within the
same module, and rely on each other non-trivial behavior, should be
documented as such and declared 'static'. They should be avoided if
possible.
[3] Use definitions and macros whenever possible, so that constants have
meaningful names and can be easily manipulated. The only exceptions
to this rule are 0 and 1, when used as false and true (respectively).
Any other use of a numeric constant to specify different behavior
or actions should be done through a #define.
[4] When writing functions that deal with strings, be sure to remember
that PHP holds the length property of each string, and that it
shouldn't be calculated with strlen(). Write your functions in a such
a way so that they'll take advantage of the length property, both
for efficiency and in order for them to be binary-safe.
Functions that change strings and obtain their new lengths while
doing so, should return that new length, so it doesn't have to be
recalculated with strlen() (e.g. php_addslashes())
[5] Use php_error() to report any errors/warnings during code execution.
Use descriptive error messages, and try to avoid using identical
error strings for different stages of an error. For example,
if in order to obtain a URL you have to parse the URL, connect,
and retreive the text, assuming something can go wrong at each
of these stages, don't report an error "Unable to get URL"
on all of them, but instead, write something like "Unable
to parse URL", "Unable to connect to URL server" and "Unable
to fetch URL text", respectively.
[6] NEVER USE strncat(). If you're absolutely sure you know what you're doing,
check its man page again, and only then, consider using it, and even then,
try avoiding it.
Naming Conventions
------------------
[1] Function names for user-level functions should be enclosed with in
the PHP_FUNCTION() macro. They should be in lowercase, with words
underscore delimited, with care taken to minimize the letter count.
Abbreviations should not be used when they greatly decrease the
readability of the function name itself.
Good:
'mcrypt_enc_self_test'
'mysql_list_fields'
Ok:
'mcrypt_module_get_algo_supported_key_sizes'
(could be 'mcrypt_mod_get_algo_sup_key_sizes'?)
'get_html_translation_table'
(could be 'html_get_trans_table'?)
Bad:
'hw_GetObjectByQueryCollObj'
'pg_setclientencoding'
'jf_n_s_i'
[2] If they are part of a "parent set" of functions, that parent should
be included in the user function name, and should be clearly related
to the parent program or function family. This should be in the form
of parent_*.
A family of 'foo' functions, for example:
Good:
'foo_select_bar'
'foo_insert_baz'
'foo_delete_baz'
Bad:
'fooselect_bar'
'fooinsertbaz'
'delete_foo_baz'
[3] Function names used by user functions should be prefixed
with "_php_", and followed by a word or an underscore-delimited list of
words, in lowercase letters, that describes the function. If applicable,
they should be declared 'static'.
[4] Variable names must be meaningful. One letter variable names must be
avoided, except for places where the variable has no real meaning or
a trivial meaning (e.g. for (i=0; i<100; i++) ...).
[5] Variable names should be in lowercase; Use underscores to seperate
between words.
Syntax and indentation
----------------------
[1] Never use C++ style comments (i.e. // comment). Always use C-style
comments instead. PHP is written in C, and is aimed at compiling
under any ANSI-C compliant compiler. Even though many compilers
accept C++-style comments in C code, you have to ensure that your
code would compile with other compilers as well.
The only exception to this rule is code that is Win32-specific,
because the Win32 port is MS-Visual C++ specific, and this compiler
is known to accept C++-style comments in C code.
[2] Use K&R-style. Of course, we can't and don't want to
force anybody to use a style he or she is not used to, but,
at the very least, when you write code that goes into the core
of PHP or one of its standard modules, please maintain the K&R
style. This applies to just about everything, starting with
indentation and comment styles and up to function decleration
syntax.
[3] Be generous with whitespace and braces. Always prefer:
if (foo) {
bar;
}
to:
if(foo)bar;
Keep one empty line between the variable decleration section and
the statements in a block, as well as between logical statement
groups in a block. Maintain at least one empty line between
two functions, preferably two.
[4] When indenting, use the tab character. A tab is expected to represent
four spaces. It is important to maintain consistency in indenture so
that definitions, comments, and control structures line up correctly.
Documentation and Folding Hooks
-------------------------------
In order to make sure that the online documentation stays in line with
the code, each user-level function should have its user-level function
prototype before it along with a brief one-line description of what the
function does. It would look like this:
/* {{{ proto int abs(int number)
Return the absolute value of the number */
PHP_FUNCTION(abs)
{
...
}
/* }}} */
The {{{ symbols are the default folding symbols for the folding mode in
Emacs. vim will soon have support for folding as well. Folding is very
useful when dealing with large files because you can scroll through the
file quickly and just unfold the function you wish to work on. The }}}
at the end of each function marks the end of the fold, and should be on
a separate line.
The "proto" keyword there is just a helper for the doc/genfuncsummary script
which generates a full function summary. Having this keyword in front of the
function prototypes allows us to put folds elsewhere in the code without
messing up the function summary.
Optional arguments are written like this:
/* {{{ proto object imap_header(int stream_id, int msg_no [, int from_length [, int subject_length [, string default_host]]])
Returns a header object with the defined parameters. */
And yes, please keep the prototype on a single line, even if that line
is massive.
New and Experimental Functions
-----------------------------------
To reduce the problems normally associated with the first public
implementation of a new set of functions, it has been suggested
that the first implementation include a file labeled 'EXPERIMENTAL'
in the function directory, and that the functions follow the
standard prefixing conventions during their initial implementation.
The file labelled 'EXPERIMENTAL' should include the following
information:
Any authoring infomration (known bugs, future directions of the module).
Ongoing status notes which may not be appropriate for CVS comments.
Aliases & Legacy Documentation
-----------------------------------
You may also have some deprecated aliases with close to duplicate
names, for example, somedb_select_result and somedb_selectresult. For
documentation puposes, these will only be documented by the most
current name, with the aliases listed in the documentation for
the parent function. For ease of reference, user-functions with
completely different names, that alias to the same function (such as
highlight_file and show_source), will be separately documented. The
proto should still be included, describing which function is aliased.
Backwards compatible functions and names should be maintained as long
as the code can be reasonably be kept as part of the codebase. See
/phpdoc/README for me information on documentation.
-2
View File
@@ -1,2 +0,0 @@
For the list of people who've put work into PHP 4.0, please see
http://www.php.net/credits.php
-39336
View File
File diff suppressed because it is too large. Load diff
-425
View File
@@ -1,425 +0,0 @@
List of PHP maintainers
=======================
Maintenance legend
------------------
Supported: Someone is actually paid to look after this.
Maintained: Someone actually looks after it.
Odd Fixes: It has a maintainer but they don't have time to do
much other than throw the odd patch in. See below.
Orphan: No current maintainer [but maybe you could take the
role as you write your new code].
Obsolete: Old code. Something tagged obsolete generally means
it has been replaced by a better system and you
should be using that.
Unknown: Not known at this time.
Status legend
-------------
Working: Working under both Windows and Unix.
Windows: Working only under Windows.
Unix: Working only under Unix.
Experimental: Under development or initial release.
Not Working: Not working.
Unknown: Status unknown.
== Server APIs ==
-------------------------------------------------------------------------------
EXTENSION: aolserver
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: apache
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: cgi
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: fhttpd
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: isapi
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: nsapi
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: phttpd
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: pi3web
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: roxen
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: servlet
PRIMARY MAINTAINER: Sam Ruby <rubys@us.ibm.com>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: thttpd
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
== Database extensions ==
-------------------------------------------------------------------------------
EXTENSION: dba
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: dbase
PRIMARY MAINTAINER: Jim Winstead <jimw@php.net>
MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: filepro
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: hyperwave
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: informix
PRIMARY MAINTAINER: Danny Heijl <Danny.Heijl@cevi.be>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: ingres_ii
PRIMARY MAINTAINER: David Hénot <henot@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
SINCE: 4.0.2
-------------------------------------------------------------------------------
EXTENSION: interbase
PRIMARY MAINTAINER: Jouni Ahto <jouni.ahto@exdec.fi>
MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: msql
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: mssql
PRIMARY MAINTAINER: Frank M. Kromann <fmk@swwwing.com>
MAINTENANCE: Maintained
STATUS: Working
COMMENT: Tested on phpts and isapi versions
-------------------------------------------------------------------------------
EXTENSION: mysql
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: pgsql
PRIMARY MAINTAINER: Jouni Ahto <jouni.ahto@exdec.fi>
MAINTENANCE: Odd fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: sybase
MAINTENANCE: Unknown
STATUS: Not Working
-------------------------------------------------------------------------------
EXTENSION: sybase_ct
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: oci8
PRIMARY MAINTAINER: Thies C. Arntzen <thies@thieso.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: odbc
PRIMARY MAINTAINER: Andreas Karajannis <Karajannis@gmd.de>
MAINTENANCE: Maintained
STATUS: Working
COMMENT: Working except for persistent connections
-------------------------------------------------------------------------------
EXTENSION: oracle
PRIMARY MAINTAINER: Thies C. Arntzen <thies@thieso.net>
MAINTENANCE: Maintained
STATUS: Working
COMMENT: Using the new OCI8 driver is encouraged where possible.
-------------------------------------------------------------------------------
== Other extensions ==
-------------------------------------------------------------------------------
EXTENSION: aspell
MAINTENANCE: Unknown
STATUS: Working
COMMENT: For aspell .27 and greater, check out the pspell extension
-------------------------------------------------------------------------------
EXTENSION: bcmath
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: bz2
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
SINCE: 4.0.3
-------------------------------------------------------------------------------
EXTENSION: calendar
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: com
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: cpdf
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: crack
MAINTENANCE: Unknown
STATUS: Experimental
SINCE: 4.0.5
-------------------------------------------------------------------------------
EXTENSION: curl
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 4.0.2
-------------------------------------------------------------------------------
EXTENSION: cybercash
PRIMARY MAINTAINER: Evan Klinger <evan715@sirius.com>
MAINTENANCE: Maintained
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: domxml
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: dotnet
PRIMARY MAINTAINER: Sam Ruby <rubys@us.ibm.com>
MAINTENANCE: Maintained
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: exif
MAINTENANCE: Unknown
STATUS: Unknown
SINCE: 4.0.1
-------------------------------------------------------------------------------
EXTENSION: fdf
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
MAINTENANCE: Maintained
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: ftp
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: gd
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: gettext
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: gmp
MAINTENANCE: Unknown
STATUS: Unknown
SINCE: 4.0.4
-------------------------------------------------------------------------------
EXTENSION: icap
MAINTENANCE: Unknown
STATUS: Obsolete
-------------------------------------------------------------------------------
EXTENSION: imap
PRIMARY MAINTAINER: Chuck Hagenbuch <chuck@horde.org>
MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: java
PRIMARY MAINTAINER: Sam Ruby <rubys@us.ibm.com>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: ldap
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: mcal
PRIMARY MAINTAINER: Chuck Hagenbuch <chuck@horde.org>
MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: mcrypt
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: mhash
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: muscat
PRIMARY MAINTAINER: Sam Liddicott <sam@ananova.com>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 4.0.5
COMMENT: Not tested against windows, only core API completed, rest under development
-------------------------------------------------------------------------------
EXTENSION: openssl
PRIMARY MAINTAINER: Stig Venaas <venaas@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
SINCE: 4.0.4
-------------------------------------------------------------------------------
EXTENSION: pcre
PRIMARY MAINTAINER: Andrei Zmievski <andrei@ispi.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: pdf
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: pfpro
PRIMARY MAINTAINER: David Croft <david@infotrek.co.uk>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 4.0.2
-------------------------------------------------------------------------------
EXTENSION: posix
PRIMARY MAINTAINER: Kristian Köhntopp <kris@koehntopp.de>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: printer
MAINTENANCE: Unknown
STATUS: Experimental
SINCE: 4.0.4
COMMENT: Only for Win32
-------------------------------------------------------------------------------
EXTENSION: pspell
PRIMARY MAINTAINER: Vlad Krupin <phpdevel@echospace.com>
MAINTENANCE: Unknown
STATUS: Unknown
SINCE: 4.0.2
-------------------------------------------------------------------------------
EXTENSION: qtdom
MAINTENANCE: Unknown
STATUS: Experimental
SINCE: 4.0.4
-------------------------------------------------------------------------------
EXTENSION: readline
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: recode
PRIMARY MAINTAINER: Kristian Köhntopp <kris@koehntopp.de>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: sablot
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
SINCE: 4.0.3
-------------------------------------------------------------------------------
EXTENSION: satellite
PRIMARY MAINTAINER: David Eriksson <eriksson@php.net>
MAINTENANCE: Odd Fixes
STATUS: Experimental
SINCE: 4.0.3
-------------------------------------------------------------------------------
EXTENSION: session
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: shmop
PRIMARY MAINTAINER: Unknown
MAINTENANCE: Unknown
STATUS: Experimental
SINCE: 4.0.3
-------------------------------------------------------------------------------
EXTENSION: snmp
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: sockets
PRIMARY MAINTAINER: Chris Vandomelen <chrisv@b0rked.dhs.org>
MAINTENANCE: Maintained
STATUS: Experimental
SINCE: 4.0.2
-------------------------------------------------------------------------------
EXTENSION: swf
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
MAINTENANCE: Maintained
STATUS: Unknown
COMMENT: Only for Unix (won't change)
-------------------------------------------------------------------------------
EXTENSION: sysvsem
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: sysvshm
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: vpopmail
MAINTENANCE: Unknown
STATUS: Experimental
SINCE: 4.0.5
-------------------------------------------------------------------------------
EXTENSION: wddx
PRIMARY MAINTAINER: Andrei Zmievski <andrei@ispi.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: xml
PRIMARY MAINTAINER: Thies C. Arntzen <thies@thieso.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: yaz
PRIMARY MAINTAINER: Adam Dickmeiss <adam@indexdata.dk>
MAINTENANCE: Maintained
STATUS: Unknown
SINCE: 4.0.1
-------------------------------------------------------------------------------
EXTENSION: yp
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: zlib
PRIMARY MAINTAINER: Stefan Roehrich <sr@linux.de>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: zziplib
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
SINCE: 4.0.5
-------------------------------------------------------------------------------
# iptc?
-538
View File
@@ -1,538 +0,0 @@
Functions:
Functions marked with 'u' do not work, or may not work correctly under windows.
basic_functions
include
_include
isset
intval
doubleval
strval
short_tags
sleep
u usleep
ksort
asort
sort
count
chr
ord
flush
end
prev
next
reset
current
key
gettype
settype
min
max
addslashes
chop
pos
fsockopen
getimagesize
htmlspecialchars
md5
parse_url
parse_str
phpinfo
phpversion
strlen
strtok
strtoupper
strtolower
strchr
basename
dirname
stripslashes
strstr
strrchr
substr
quotemeta
urlencode
urldecode
ucfirst
strtr
sprintf
printf
exec
system
escapeshellcmd
passthru
soundex
rand
srand
getrandmax
gethostbyaddr
gethostbyname
explode
implode
error_reporting
clearstatcache
get_current_user
getmyuid
getmypid
u getmyinode
getlastmod
base64_decode
base64_encode
abs
ceil
floor
sin
cos
tan
asin
acos
atan
pi
pow
exp
log
log10
sqrt
bindec
hexdec
octdec
decbin
decoct
dechex
getenv
putenv
time
mktime
date
gmdate
getdate
checkdate
microtime
uniqid
u linkinfo
u readlink
u symlink
u link
u unlink
bcmath_functions
bcadd
bcsub
bcmul
bcdiv
bcmod
bcpow
bcsqrt
bcscale
bccomp
dir_functions
opendir
closedir
chdir
rewinddir
readdir
dir
dl_functions
dl(string module_name); dynamicly load a module
dns_functions
gethostbyaddr
gethostbyname
file_functions
pclose
popen
readfile
rewind
rmdir
umask
fclose
feof
fgets
fgetss
fopen
fpassthru
fseek
ftell
fputs
mkdir
rename
copy
tempnam
file
filestat_functions
fileatime
filectime
u filegroup
u fileinode
filemtime
u fileowner
fileperms
filesize
filetype
stat
u chown
u chgrp
u chmod
touch
file_exists
is_executable
is_dir
is_readable
is_writeable
u is_link
header_functions
setcookie
header
mail_functions
mail
reg_functions
ereg
ereg_replace
eregi
eregi_replace
split
sql_regcase
syslog_functions (writes to event log on win NT)
openlog
syslog
closelog
The following are optional modules and may or may not be compiled into php, or may be compiled as a loadable module.
odbc_functions (obsolete, use uodbc below)
sqlconnect
sqldisconnect
sqlfetch
sqlexecdirect
sqlgetdata
sqlfree
sqlrowcount
uodbc_functions
(int) odbc_autocommit($connection_id, $OnOff)
(void) odbc_close($connection_id)
(void) odbc_close_all(void)
(int) odbc_commit($connection_id)
(int) odbc_connect($dsn, $user, $password)
(int) odbc_pconnect($dsn, $user, $password)
(string) odbc_cursor($result_id)
(int) odbc_do($connection_id, $query_string)
(int) odbc_exec($connection_id, $query_string)
(int) odbc_prepare($connection_id, $query_string)
(int) odbc_execute($result_id, $array)
(int) odbc_fetch_row($result_id, $row_number)
(int) odbc_fetch_into($result_id, $row_number, $array_ptr)
(int) odbc_field_len($result_id, $field_number)
(string) odbc_field_name($result_id, $field_number)
(string) odbc_field_type($result_id, $field)
(int) odbc_free_result($result_id)
(int) odbc_num_fields($result_id)
(int) odbc_num_rows($result_id)
(string) odbc_result($result_id, $field)
(int) odbc_result_all($result_id, $format)
(int) odbc_rollback($connection_id)
msql_functions
msql_connect
msql_pconnect
msql_close
msql_select_db
msql_create_db
msql_drop_db
msql_query
msql
msql_list_dbs
msql_list_tables
msql_list_fields
msql_result
msql_num_rows
msql_num_fields
msql_fetch_row
msql_fetch_array
msql_fetch_object
msql_data_seek
msql_fetch_field
msql_field_seek
msql_free_result
msql_fieldname
msql_fieldtable
msql_fieldlen
msql_fieldtype
msql_fieldflags
msql_regcase
/* for downwards compatability */
msql_selectdb
msql_createdb
msql_dropdb
msql_freeresult
msql_numfields
msql_numrows
msql_listdbs
msql_listtables
msql_listfields
msql_dbname
msql_tablename
ldap_functions
ldap_connect
ldap_bind
ldap_unbind
ldap_read
ldap_list
ldap_search
ldap_free_result
ldap_count_entries
ldap_first_entry
ldap_next_entry
ldap_get_entries
ldap_free_entry
ldap_first_attribute
ldap_next_attribute
ldap_get_attributes
ldap_get_values
ldap_get_dn
ldap_dn2ufn
ldap_add
ldap_delete
ldap_modify
gd_functions
imagearc
imagechar
imagecharup
imagecolorallocate
imagecolorclosest
imagecolorexact
imagecolortransparent
imagecopyresized
imagecreate
imagecreatefromgif
imagedestroy
imagefill
imagefilledpolygon
imagefilledrectangle
imagefilltoborder
imagegif
imageinterlace
imageline
imagepolygon
imagerectangle
imagesetpixel
imagestring
imagestringup
imagesx
imagesy
filepro_functions
filepro
filepro_rowcount
filepro_fieldname
filepro_fieldtype
filepro_fieldwidth
filepro_fieldcount
filepro_retrieve
dbm_functions
dblist
dbmopen
dbmclose
dbminsert
dbmfetch
dbmreplace
dbmexists
dbmdelete
dbmfirstkey
dbmnextkey
dbase_functions
dbase_open
dbase_create
dbase_close
dbase_numrecords
dbase_numfields
dbase_add_record
dbase_get_record
dbase_delete_record
dbase_pack
calendar_functions
jdtogregorian
gregoriantojd
jdtojulian
juliantojd
jdtojewish
jewishtojd
jdtofrench
frenchtojd
jddayofweek
jdmonthname
adabas_functions
(int) ada_afetch($result_id, $rownumber, $result array)
(int) ada_autocommit($connection_id, $OnOff)
(void) ada_close($connection_id)
ada_closeall
(int) ada_commit($connection_id)
(int) ada_connect($dsn, $user, $password)
(int) ada_exec($connection_id, $query_string)
(int) ada_fetchrow($result_id, $row?number)
ada_fieldlen
(string) ada_fieldname($result_id, $field_number)
(string) ada_fieldtype($result_id, $field)
(int) ada_freeresult($result_id)
(int) ada_numfields($result_id)
(int) ada_numrows($result_id)
(string) ada_result($result_id, $field)
(int) ada_resultall($result_id, $format)
(int) ada_rollback($connection_id)
***(int) ada_fieldnum($result_id, $field_name) (this function is not in adabase.c
crypt_functions
crypt
mysql_functions
mysql_connect
mysql_pconnect
mysql_close
mysql_select_db
mysql_create_db
mysql_drop_db
mysql_query
mysql
mysql_list_dbs
mysql_list_tables
mysql_list_fields
mysql_affected_rows
mysql_insert_id
mysql_result
mysql_num_rows
mysql_num_fields
mysql_fetch_row
mysql_fetch_array
mysql_fetch_object
mysql_data_seek
mysql_fetch_lengths
mysql_fetch_field
mysql_field_seek
mysql_free_result
mysql_fieldname
mysql_fieldtable
mysql_fieldlen
mysql_fieldtype
mysql_fieldflags
/* for downwards compatability */
mysql_selectdb
mysql_createdb
mysql_dropdb
mysql_freeresult
mysql_numfields
mysql_numrows
mysql_listdbs
mysql_listtables
mysql_listfields
mysql_dbname
mysql_tablename
oracle_functions
ora_close
ora_commit
ora_commitoff
ora_commiton
ora_error
ora_errorcode
ora_exec
ora_fetch
ora_getcolumn
ora_logoff
ora_logon
ora_open
ora_parse
ora_rollback
pgsql_functions
pg_connect
pg_pconnect
pg_close
pg_dbname
pg_errormessage
pg_options
pg_port
pg_tty
pg_host
pg_exec
pg_numrows
pg_numfields
pg_fieldname
pg_fieldsize
pg_fieldtype
pg_fieldnum
pg_result
pg_fieldprtlen
pg_getlastoid
pg_freeresult
pg_locreate
pg_lounlink
pg_loopen
pg_loclose
pg_loread
pg_lowrite
pg_loreadall
sybase_functions
sybase_connect
sybase_pconnect
sybase_close
sybase_select_db
sybase_query
sybase_free_result
sybase_get_last_message
sybase_num_rows
sybase_num_fields
sybase_fetch_row
sybase_fetch_array
sybase_fetch_object
sybase_data_seek
sybase_fetch_field
sybase_field_seek
sybase_result
sybase_old_functions
sybsql_seek
sybsql_exit
sybsql_dbuse
sybsql_query
sybsql_isrow
sybsql_result
sybsql_connect
sybsql_nextrow
sybsql_numrows
sybsql_getfield
sybsql_numfields
sybsql_fieldname
sybsql_result_all
sybsql_checkconnect
-406
View File
@@ -1,406 +0,0 @@
Installation Instructions for PHP 4.0
-------------------------------------
For the impatient here is a quick set of steps that will build PHP as
first a dynamic Apache module (DSO) for Apache 1.3.x with MySQL support
and then a static module. A more verbose explanation follows.
For installing PHP on other web servers, refer to one of the following
files:
sapi/aolserver/README
sapi/pi3web/README
sapi/servlet/README
sapi/thttpd/README
README.Zeus
Note! Only install either the static module or the dynamic one. Do not
install both.
Note 2! If you are recompiling PHP to add new extensions or upgrading
something like GD, remove the config.cache file before you re-run
configure.
Note 3! If you are on Linux and have installed shared libraries, make
sure the location of these shared libraries are listed in your
/etc/ld.so.conf file. For example, if you have:
/usr/local/lib/mysql/libmysqlclient.so
Make sure /etc/ld.so.conf contains:
/usr/local/lib/mysql
Then run ldconfig.
If you want both PHP 3 and 4 modules in the same Apache server, check the
bottom of this file for instructions.
INSTALLATION WITH THE ZEUS WEB SERVER:
--Please see the 'README.Zeus' file included in this distribution
QUICK INSTALL (DSO)
For this to work your Apache httpd must have mod_so enabled.
Check using httpd -l. You should see something like:
Compiled-in modules:
http_core.c
mod_so.c
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.0.x.tar.gz | tar xf -
$ cd php-4.0.x
$ ./configure --with-mysql --with-apxs
$ make
$ make install
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
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.
The only thing left to do is to edit your httpd.conf file and make sure the
PHP 4 mime type is there and uncommented. You need a line that looks like
this:
AddType application/x-httpd-php .php
Then restart your server (apachectl restart) and you should be able to
serve up PHP files now. Make a test file called test.php and put some
PHP tags in it. Like <?phpinfo()?>, for example.
QUICK INSTALL (Static)
$ gunzip -c apache_1.3.x.tar.gz | tar xf -
$ cd apache_1.3.x
$ ./configure
$ cd ..
$ gunzip -c php-4.0.x.tar.gz | tar xf -
$ cd php-4.0.x
$ ./configure --with-mysql --with-apache=../apache_1.3.x --enable-track-vars
$ make
$ make install
$ cd ../apache_1.3.x
$ ./configure --prefix=/www --activate-module=src/modules/php4/libphp4.a
(The above line is correct! Yes, we know libphp4.a does not exist at this
stage. It isn't supposed to. It will be created.)
$ 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.0.x
$ 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:
AddType application/x-httpd-php .php
VERBOSE INSTALL
Chances are you are reading this because the quick install steps above
did not work for you. If this is the case, congratulations, you are
among the elite few that actually reads documentation. It really is
not a difficult install and once you have done it once you will fly
through it.
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.0.x.tar.gz.
Unzip this file with a command like: gunzip php-4.0.x.tar.gz
Next you have to untar it with: tar -xvf php-4.0.x.tar
This will create a php-4.0.x directory. cd into this new directory.
2a. Configure PHP (Dynamic Module) - Skip to 2b if you wish to build
a static module
You now have to choose the options you would like. There are quite
a few of them. To see a list, type: ./configure --help
The only options that you are likely to want to use are the ones in
the last section entitled, "--enable and --with options recognized:"
A popular choice is to build the Apache module version. In order to
build PHP as a dynamic module for Apache-1.3.x you have to first have
Apache installed. Assuming Apache is already installed, make sure
the shared object module is enabled. To check this, type: httpd -l
You should see something like:
Compiled-in modules:
http_core.c
mod_so.c
You will most likely have a lot more modules than what is shown here.
As long as mod_so.c shows up in the list, PHP should be happy.
Now, type: ./configure --with-mysql --with-apxs
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
You might also want other flags on this configure line. --with-mysql
is just an example.
There are a few things that can go wrong during this configure step.
The most common is that you have asked for an option and that the
configure script can not find the files required to enable this
option in PHP. Chances are you can provide the full path to the
base directory under which the related files were installed. For
example, if you have installed the GD library in /opt/gd which means
that /opt/gd/include has your GD header files and /opt/gd/lib contains
your GD library files, you would use --with-gd=/opt/gd
Skip to step 3 for compilation and installation instructions.
2b. Configure PHP (Static Module) - Skip if you performed 2a
You now have to choose the options you would like. There are quite
a few of them. To see a list, type: ./configure --help
The only options that you are likely to want to use are the ones in
the last section entitled, "--enable and --with options recognized:"
A popular choice is to build the Apache module version. You need
to know where the source code directory for your Apache server is
located. Then use an option like: --with-apache=/usr/local/src/apache
if that is your Apache source code directory. If you only specify
--with-apache, then it will default to look for your Apache source
in /usr/local/etc/httpd.
NOTE: The directory you specify should be the top-level of the
unpacked Apache (or Stronghold) distribution. The configure program
will automatically look for httpd.h in different directories under that
location depending on which version of Apache, including Stronghold,
you are running.
For MySQL support, since newer versions of MySQL installs its various
components under /usr/local, this is the default. If you have
changed the location you can specify it with: --with-mysql=/opt/local
for example. Otherwise just use: --with-mysql
*NOTE* If you are using Apache 1.3b6 or later, you should run the
Apache Configure script at least once before compiling PHP. It
doesn't matter how you have Apache configured at this point.
Skip to step 3b at this point.
3. Compile and install the files. Simply type: make install
3a. Dynamic Module Installation
Nothing else is needed here. Proceed to step 4a.
3b. Static Module Installation
For the Apache module version this will copy the appropriate files
to the src/modules/php4 directory in your Apache distribution if
you are using Apache 1.3.x. If you are still running Apache 1.2.x
these files will be copied directly to the main src directory.
For Apache 1.3b6 and later, you can use the new APACI configuration
mechanism. To automatically build Apache with PHP support, use:
cd apache_1.3.x
./configure --prefix=/<path>/apache \
--activate-module=src/modules/php4/libphp4.a
make
make install
If you do not wish to use this new configuration tool, the old
install procedure (src/Configure) will work fine.
If you are using the old Apache ./Configure script, you will have to
edit the Apache src/Configuration file manually. If you do not have
this file, copy Configuration.tmpl to Configuration.
For Apache 1.3.x add:
AddModule modules/php4/libphp4.a
For Apache 1.3.x don't do anything else. Just add this line and then
run "./Configure" followed by "make".
For Apache 1.2.x add:
Module php4_module mod_php4.o
For Apache 1.2.x you will also have to look in the libphp4.module file,
which was copied to the src directory. The EXTRA_LIBS line in the Apache
Configuration file needs to be set to use the same libs as specified on
the LIBS line in libphp4.module. You also need to make sure to add
"-L." to the beginning of the EXTRA_LIBS line.
So, as an example, your EXTRA_LIBS line might look like:
EXTRA_LIBS=-L. -lphp4 -lgdbm -ldb -L/usr/local/mysql/lib -lmysqlclient
NOTE: You should not enclose the EXTRA_LIBS line in double-quotes, as it
is in the libphp4.module file.
Also, look at the RULE_WANTHSREGEX setting in the libphp4.module file
and set the WANTHSREGEX directive accordingly in your Configuration file.
This last step applies to versions of Apache prior to 1.3b3.
This is a bit of a hassle, but should serve as incentive to move to
Apache 1.3.x where this step has been eliminated.
Once you are satisfied with your Configuration settings, type: ./Configure
If you get errors, chances are that you forgot a library or made a typo
somewhere. Re-edit Configuration and try again. If it goes well,
type: make
Assuming it compiles without errors, proceed to step 4b.
4a. Setting up the server. (Dynamic Module)
The make install command in step 3 should have done most of your
work for you. It actually edits your httpd.conf file and tries to
enable the dynamic PHP module. To verify this, look for a line that
looks like this:
LoadModule php4_module libexec/libphp4.so
The actual path before the libphp4.so part might differ slightly. This
is likely fine. If you are paranoid you can examine the output from the
make install step to see where the libphp4.so file was actually put and
place the full path to this file on this LoadModule line.
If somewhere in your httpd.conf file you have a ClearModuleList line
then you also need this line:
AddModule mod_php4.c
And finally you need to tell Apache which file extension should trigger
PHP. You do this by creating a special mime type and associating it
with an extension. We suggest using:
AddType application/x-httpd-php .php
You are however free to use any extension you wish, including .html.
Note! If a line has a # at the beginning, then it is commented out
and you need to remove the # for that line to take effect.
Finally you need to copy php.ini-dist to the appropriate place
(normally /usr/local/lib/php.ini) and edit if necessary.
Once you have made these changes you should be ready to restart your
server and try it out. Type: apachectl restart
4b. Setting up the server. (Static Module)
You should now have a new httpd binary. Shut down your existing server,
if you have one, and copy this new binary overtop of it. Perhaps make
a backup of your previous one first. Then edit your conf/httpd.conf file
and add the line:
AddType application/x-httpd-php .php
There is also an interesting feature which can be quite instructive and
helpful while debugging. That is the option of having colour syntax
highlighting. To enable this, add the following line:
AddType application/x-httpd-php-source .phps
Any file ending in .phps will now be displayed with full colour syntax
highlighting instead of being executed.
Note that on some older server setups, the AddType lines are in the
conf/srm.conf file instead of conf/httpd.conf.
Note! If a line has a # at the beginning, then it is commented out
and you need to remove the # for that line to take effect.
When you are finished making changes to your httpd.conf file, you need
to copy php.ini-dist to the appropriate place (normally
/usr/local/lib/php.ini) and edit if necessary. You can then
start up your server.
5. Testing it all worked
Create a test file named test.php in your web tree somewhere and
put some test PHP tags in it. <?phpinfo()?> is a good first test.
This tag tells PHP to do a braindump and tells you all sorts of things
about itself.
WHY DISABLING -fPIC WORKS ON LINUX
From: Martin v. Loewis <martin@loewis.home.cs.tu-berlin.de>
To: glibc-linux@ricardo.ecn.wfu.edu
Subject: Re: Shared library -shared vs. -fpic
[In reply to Kaz Kylheku <kaz@ashi.footprints.net>]
> PIC stands for Position-Independent Code.
Correct.
> Code isn't position-independent (or ``relocatable'') cannot be
> loaded at an arbitrary address;
Wrong.
> it requires some references to be patched at load time.
Correct.
> Shared libraries need to be relocatable because it's not known
> beforehand what address they will be loaded at
Correct, depending on the meaning of "relocatable". PIC code typically
does not contain relocations; that's why its position-independent.
> Just because you don't specify -fPIC doesn't mean that the compiler
> won't emit position-independent code; the option prevents it from
> emitting position-dependent code in situations where it otherwise
> would.
Correct. However, a non-trivial shared library typically won't be
position-independent unless explicitly compiled with
-fPIC. Linux/glibc indeed does not require a shared library to be
position-independent; instead, it will perform the relocations in the
binary, even if they refer to code pages. As a result, those relocated
pages won't be shared across processes, anymore.
Regards,
Martin
USING PHP 3 AND PHP 4 AS CONCURRENT APACHE MODULES
Recent operating systems provide the ability to perform versioning and
scoping. This features make it possible to let PHP 3 and PHP 4 run as
concurrent modules in one Apache server.
This feature is known to work on the following platforms:
- Linux with recent binutils (binutils 2.9.1.0.25 tested)
- Solaris 2.5 or better
- FreeBSD (3.2, 4.0 tested)
- IRIX64 6.5
To enable it, configure PHP 3 and PHP 4 to use APXS (--with-apxs) and the
necessary link extensions (--enable-versioning). Otherwise, all standard
installations instructions apply. For example:
$ ./configure \
--with-apxs=/apache/bin/apxs \
--enable-versioning \
--with-mysql \
--enable-track-vars
If this also works on your platform or if you know a way to do it, please
report it to our bug database at http://bugs.php.net
-75
View File
@@ -1,75 +0,0 @@
--------------------------------------------------------------------
The PHP License, version 2.02
Copyright (c) 1999, 2000 The PHP Group. 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 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.
4. 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
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
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/.
THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``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 THE PHP
DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------
This software consists of voluntary contributions made by many
individuals on behalf of the PHP Group.
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>.
-56
View File
@@ -1,56 +0,0 @@
ZEND_DIR = $(srcdir)/Zend
SUBDIRS = Zend main ext sapi $(TSRM_DIR) $(REGEX_DIR) . $(PEAR_DIR)
LTLIBRARY_NAME = libphp4.la
LTLIBRARY_SOURCES = stub.c
LTLIBRARY_DEPENDENCIES = \
Zend/libZend.la \
sapi/$(PHP_SAPI)/libsapi.la \
main/libmain.la \
$(REGEX_LIB) \
$(EXT_LTLIBS) \
$(TSRM_LIB)
LTLIBRARY_LDFLAGS = -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS)
LTLIBRARY_LIBADD = $(LTLIBRARY_DEPENDENCIES) $(EXTRA_LIBS)
PROGRAM_NAME = php
PROGRAM_SOURCES = stub.c
PROGRAM_LDADD = libphp4.la $(EXT_PROGRAM_LDADD)
PROGRAM_LDFLAGS = -export-dynamic
PROGRAM_DEPENDENCIES = $(PROGRAM_LDADD)
targets = $(LTLIBRARY_NAME) $(PHP_PROGRAM)
install_targets = install-sapi install-modules
include $(top_srcdir)/build/rules.mk
include $(top_srcdir)/build/library.mk
include $(top_srcdir)/build/program.mk
install-sapi:
@$(LIBTOOL) --silent --mode=install cp libphp4.la $(phptempdir)/libphp4.la >/dev/null 2>&1
-@$(mkinstalldirs) $(bindir)
-@if test ! -r $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME); then \
for i in 0.0.0 0.0 0; do \
if test -r $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME).$$i; then \
$(LN_S) $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME).$$i $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME); \
break; \
fi; \
done; \
fi
$(INSTALL_IT)
install-modules:
@test -d modules && \
$(mkinstalldirs) $(moduledir) && \
echo "installing shared modules into $(moduledir)" && \
rm -f modules/*.la && \
cp modules/* $(moduledir) >/dev/null 2>&1 || true
install-su: install-modules
(cd pear && $(MAKE) install)
.NOEXPORT:
-1353
View File
File diff suppressed because it is too large. Load diff
-105
View File
@@ -1,105 +0,0 @@
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.
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
some basic rules with regards to CVS usage will:
a. Make everybody happier, especially those responsible for maintaining
the CVS itself.
b. Keep the changes consistently well documented and easily trackable.
c. Prevent some of those 'Oops' moments.
d. Increase the general level of good will on planet Earth.
Having said that, here are the organizational rules:
1. Respect other people working on the project.
2. Discuss any significant changes on the list before committing.
3. Look at EXTENSIONS file to see who is the primary maintainer of
the code you want to contribute to.
4. If you "strongly disagree" about something another person did, don't
start fighting publicly - take it up in private email.
5. If you don't know how to do something, ask first!
6. Test your changes before committing them. We mean it. Really.
The next few rules are more of a technical nature.
1. DO NOT TOUCH ChangeLog! It is automagically updated from the commit
messages every day. Woe be to those who attempt to mess with it.
2. All news updates intended for public viewing, such as new features,
bug fixes, improvements, etc., should go into the NEWS file. Also see
the note below about automatically updating NEWS in your commit message.
3. Do not commit multiple file and dump all messages in one commit. If you
modified several unrelated files, commit each group separately and
provide a nice commit message for each one. See example below.
4. Do write your commit message in such a way that it makes sense even
without the corresponding diff. One should be able to look at it, and
immediately know what was modified. Definitely include the function name
in the message as shown below.
5. In your commit messages, keep each line shorter than 80 characters. And
try to align your lines vertically, if they wrap. It looks bad otherwise.
6. If you modified a function that is callable from PHP, prepend PHP to
the function name as shown below.
The format of the commit messages is pretty simple.
If a line begins with #, it is taken to be a comment and will not appear
in the ChangeLog. If the line begins with @, it will be redirected to the
NEWS file. Everything else goes into the ChangeLog.
It is important to note that if your comment or news logline spans multiple
lines, you have to put # or @ at the beginning of _every_ such line. Every
entry in NEWS has to have a name after it, so if you did it with someone's
help, put both your names there. Your name WILL NOT be automatically put
at the end of the NEWS entry - so, please provide it yourself.
Example. Say you modified two files, datetime.c and string.c. In datetime.c
you added a new format option for date() function, and in string.c you fixed
a memory leak in php_trim(). Don't commit both of these at once. Commit them
separately and try to make sure your commit messages look something like the
following.
For datetime.c:
(PHP date) Added new 'K' format modifier for printing out number of
days until New Year's Eve.
@- Added new 'K' format modifier that will output the number of days
@ until New Year's Eve. (Bob)
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)
The lines above marked with @ will go into NEWS file automagically, and the
# lines will be omitted from the ChangeLog. Alternatively, you might want
to modify NEWS file directly and not use the @ lines.
If you don't see your messages in ChangeLog and NEWS right away, don't worry!
These files are updated once a day, so your stuff will not show up until
somewhat later. Don't go adding stuff to NEWS by hand if you already put @
lines in the commit message.
You can use LXR (http://lxr.php.net/) and Bonsai (http://bonsai.php.net/)
to look at PHP CVS repository in various ways.
To receive daily updates to ChangeLog and NEWS, send an empty message to
php-cvs-daily-subscribe@lists.php.net.
Happy hacking,
PHP Team
-185
View File
@@ -1,185 +0,0 @@
WHAT IT IS
It's a tool for automatically creating the basic framework for a PHP module
and writing C code handling arguments passed to your functions from a simple
configuration file. See an example at the end of this file.
HOW TO USE IT
Very simple. First, cd do directory ext/ in PHP 4 sources. If you just need
the basic framework and will be writing all the code in your functions
yourself, you can now do
./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
./buildconf; ./configure --enable-module_name; make
But if you already have planned the overall scheme of your module, what
functions it will contain, their return types and the arguments they take
(a very good idea) and don't want to bother yourself with creating function
definitions and handling arguments passed yourself, it's time to create a
function definitions file, which you will give as an argument to ext_skel
with option
--proto=filename.
FORMAT OF FUNCTION DEFINITIONS FILE
All the definitions must be on one line. In it's simplest form, it's just
the function name, ie.
my_function
but then you'll be left with an almost empty function body without any
argument handling.
Arguments are given in parenthesis after the function name, and are of
the form 'argument_type argument_name'. Arguments are separated from each
other with a comma and optional space. Argument_type can be one of int,
bool, double, float, string, array, object or mixed.
An optional argument is separated from the previous by an optional space,
then '[' and of course comma and optional space, like all the other
arguments. You should close a row of optional arguments with same amount of
']'s as there where '['s. Currently, it does not harm if you forget to do it
or there is a wrong amount of ']'s, but this may change in the future.
An additional short description may be added after the parameters.
If present it will be filled into the 'proto' header comments in the stubs
code and the <refpurpose> tag in the XML documentation.
An example:
my_function(int arg1, int arg2 [, int arg3 [, int arg4]]) this is my 1st
Arguments arg3 and arg4 are optional.
If possible, the function definition should also contain it's return type
in front of the definition. It's not actually used for any C code generating
purposes but PHP in-source documentation instead, and as such, very useful.
It can be any of int, double, string, bool, array, object, resource, mixed
or void.
The file must contain nothing else but function definitions, no comments or
empty lines.
OTHER OPTIONS
--no-help
By default, ext_skel creates both comments in the source code and a test
function to help first time module writers to get started and testing
configuring and compiling their module. This option turns off all such things
which may just annoy experienced PHP module coders. Especially useful with
--stubs=file
which will leave out also all module specific stuff and write just function
stubs with function value declarations and passed argument handling, and
function entries and definitions at the end of the file, for copying and
pasting into an already existing module.
--assign-params
--string-lens
By default, function proto 'void foo(string bar)' creates the following:
...
zval **bar;
... (zend_get_parameters_ex() called in the middle...)
convert_to_string_ex(bar);
Specifying both of these options changes the generated code to:
...
zval **bar_arg;
int bar_len;
char *bar = NULL;
... (zend_get_parameters_ex() called in the middle...)
convert_to_string_ex(bar_arg);
bar = Z_STRVAL_PP(bar_arg);
bar_len = Z_STRLEN_PP(bar_arg);
You shouldn't have to ask what happens if you leave --string-lens out. If you
have to, it's questionable whether you should be reading this document.
--with-xml[=file]
Creates the basics for phpdoc .xml file.
--full-xml
Not implemented yet. When or if there will ever be created a framework for
self-contained extensions to use phpdoc system for their documentation, this
option enables it on the created xml file.
CURRENT LIMITATIONS, BUGS AND OTHER ODDITIES
Only arguments of types int, bool, double, float, string and array are
handled. For other types you must write the code yourself. And for type
mixed, it wouldn't even be possible to write anything, because only you
know what to expect.
It can't handle correctly, and probably never will, variable list of
of arguments. (void foo(int bar [, ...])
Don't trust too much the generated code. It tries to be useful in most of
the situations you might encounter, but automatic code generating will never
beat a programmer who knows the real situation at hand. ext_skel is generally
best suited for quickly generating a wrapper for c-library functions you
might want to have available in PHP too.
This program doesn't have a --help option. It has --no-help instead.
EXAMPLE
The following _one_ line
bool my_drawtext(resource image, string text, resource font, int x, int y [, int color])
will create this function definition for you (note that there are a few
question marks to be replaced by you, and you must of course add your own
value definitions too):
/* {{{ proto bool my_drawtext(resource image, string text, resource font, int x, int y[, int color])
*/
PHP_FUNCTION(my_drawtext)
{
zval **image, **text, **font, **x, **y, **color;
int argc;
int image_id = -1;
int font_id = -1;
???LS_FETCH();
argc = ZEND_NUM_ARGS();
if (argc < 5 || argc > 6 || zend_get_parameters_ex(argc, &image, &text, &font, &x, &y, &color) == FAILURE) {
WRONG_PARAM_COUNT;
}
ZEND_FETCH_RESOURCE(???, ???, image, image_id, "???", ???G());
ZEND_FETCH_RESOURCE(???, ???, font, font_id, "???", ???G());
switch (argc) {
case 6:
convert_to_long_ex(color);
/* Fall-through. */
case 5:
convert_to_long_ex(y);
convert_to_long_ex(x);
/* font: fetching resources already handled. */
convert_to_string_ex(text);
/* image: fetching resources already handled. */
break;
default:
WRONG_PARAM_COUNT;
}
php_error(E_WARNING, "my_drawtext: not yet implemented");
}
/* }}} */
-57
View File
@@ -1,57 +0,0 @@
QNX4 Installation Notes
-----------------------
NOTE: General installation instructions are in the INSTALL file
1. To compile and test PHP3 you have to grab, compile and install:
- GNU dbm library or another db library;
- GNU bison (1.25 or later; 1.25 tested);
- GNU flex (any version supporting -o and -P options; 2.5.4 tested);
- GNU diffutils (any version supporting -w option; 2.7 tested);
2. To use CVS version you may need also:
- GNU CVS (1.9 tested);
- GNU autoconf (2.12 tested);
- GNU m4 (1.3 or later preferable; 1.4 tested);
3. To run configure define -lunix in command line:
LDFLAGS=-lunix ./configure
4. To use Sybase SQL Anywhere define ODBC_QNX and CUSTOM_ODBC_LIBS in
command line and run configure with --with-custom-odbc:
CFLAGS=-DODBC_QNX LDFLAGS=-lunix CUSTOM_ODBC_LIBS="-ldblib -lodbc" ./configure --with-custom-odbc=/usr/lib/sqlany50
If you have SQL Anywhere version 5.5.00, then you have to add
CFLAGS=-DSQLANY_BUG
to workaround its SQLFreeEnv() bug. Other versions has not been tested,
so try without this flag first.
5. To build the Apache module, you may have to hardcode an include path for
alloc.h in your Apache base directory:
- APACHE_DIRECTORY/src/httpd.h:
change #include "alloc.h"
to #include "APACHE_DIRECTORY/src/alloc.h"
Unless you want to use system regex library, you have to hardcode also
a path to regex.h:
- APACHE_DIRECTORY/src/conf.h:
change #include <regex.h>
to #include "APACHE_DIRECTORY/src/regex/regex.h"
I don't know so far why this required for QNX, may be it is Watcom
compiler problem.
If you building Apache module with SQL Anywhere support, you'll get
symbol conflict with BOOL. It is defined in Apache (httpd.h) and in
SQL Anywhere (odbc.h). This has nothing to do with PHP, so you have to
fix it yourself someway.
6. With above precautions, it should compile as is and pass regression
tests completely:
make
make check
make install
Don't bother me unless you really sure you made that all but it
still doesn't work.
June 28, 1998
Igor Kovalenko -- owl@infomarket.ru
-174
View File
@@ -1,174 +0,0 @@
$Id$
=============================================================================
HOW TO CREATE A SELF-CONTAINED PHP EXTENSION
A self-contained extension can be distributed independently of
the PHP source. To create such an extension, three things are
required:
- Makefile template (Makefile.in)
- Configuration file (config.m4)
- Source code for your module
We will describe now how to create these and how to put things
together.
PREPARING YOUR SYSTEM
While the result will run on any system, a developer's setup needs these
tools:
GNU autoconf
GNU automake
GNU libtool
GNU m4
All of these are available from
ftp://ftp.gnu.org/pub/gnu/
CONVERTING AN EXISTING EXTENSION
Just to show you how easy it is to create a self-contained
extension, we will convert an embedded extension into a
self-contained one. Install PHP and execute the following
commands.
$ mkdir /tmp/newext
$ cd /tmp/newext
You now have an empty directory. We will copy the files from
the mysql extension:
$ cp -rp php-4.0.X/ext/mysql/* .
It is time to finish the module. Run:
$ phpize
You can now ship the contents of the directory - the extension
can live completely on its own.
The user instructions boil down to
$ ./configure \
[--with-php-config=/path/to/php-config] \
[--with-mysql=MYSQL-DIR]
$ make install
The MySQL module will either use the embedded MySQL client
library or the MySQL installation in MYSQL-DIR.
DEFINING THE NEW EXTENSION
Our demo extension is called "foobar".
It consists of two source files "foo.c" and "bar.c"
(and any arbitrary amount of header files, but that is not
important here).
The demo extension does not reference any external
libraries (that is important, because the user does not
need to specify anything).
CREATING THE MAKEFILE TEMPLATE
The Makefile Template (Makefile.in) contains three lines:
------------------------------------------------------------------------------
LTLIBRARY_SHARED_NAME = foobar.la
LTLIBRARY_SOURCES = foo.c bar.c
include $(top_srcdir)/build/dynlib.mk
------------------------------------------------------------------------------
LTLIBRARY_SHARED_NAME specifies the name of the extension.
It must be of the form `ext-name.la'.
LTLIBRARY_SOURCES specifies the names of the sources files. You can
name an arbitrary number of source files here.
The final include directive includes the build rules (you usually
don't need to care about what happens there). rules.mk and other
files are installed by phpize which we will cover later.
CREATING THE M4 CONFIGURATION FILE
The m4 configuration can perform additional checks. For a
self-contained extension, you do not need more than a few
macro calls.
------------------------------------------------------------------------------
PHP_ARG_ENABLE(foobar,whether to enable foobar,
[ --enable-foobar Enable foobar])
if test "$PHP_FOOBAR" != "no"; then
PHP_EXTENSION(foobar, $ext_shared)
fi
------------------------------------------------------------------------------
PHP_ARG_ENABLE will automatically set the correct variables, so
that the extension will be enabled by PHP_EXTENSION in shared mode.
Please use always PHP_ARG_ENABLE or PHP_ARG_WITH. Even if you do not
plan to distribute your module with PHP, these facilities allow you
to integrate your module easily into the main PHP module framework.
CREATING SOURCE FILES
ext_skel can be of great help when creating the common code for all modules
in PHP for you and also writing basic function definitions and C code for
handling arguments passed to your functions. See README.EXT_SKEL for further
information.
As for the rest, you are currently alone here. There are a lot of existing
modules, use a simple module as a starting point and add your own code.
CREATING THE SELF-CONTAINED EXTENSION
Put Makefile.in, config.m4 and the source files into one directory.
Then run phpize (this is installed during make install by PHP 4.0).
For example, if you configured PHP with --prefix=/php, you would run
$ /php/bin/phpize
This will automatically copy the necessary build files and create
configure from your config.m4.
And that's it. You now have a self-contained extension.
INSTALLING A SELF-CONTAINED EXTENSION
An extension can be installed by running:
$ ./configure \
[--with-php-config=/path/to/php-config]
$ make install
ADDING SHARED MODULE SUPPORT TO A MODULE
In order to be useful, a self-contained extension must be loadable
as a shared module. I will explain now how you can add shared module
support to an existing module called foo.
1. In config.m4, use PHP_ARG_WITH/PHP_ARG_ENABLE. Then you will
automatically be able to use --with-foo=shared or
--enable-foo=shared.
2. In config.m4, use PHP_EXTENSION(foo, $ext_shared) to enable
building the extension.
3. Add the following line to Makefile.in:
LTLIBRARY_SHARED_NAME = foo.la
4. Add the following lines to your C source file:
#ifdef COMPILE_DL_FOO
ZEND_GET_MODULE(foo)
#endif
-126
View File
@@ -1,126 +0,0 @@
Using PHP4 with the Zeus Web Server
-----------------------------------
Zeus fully supports running PHP in combination with our
webserver. There are three different interfaces that can be used to
enable PHP:
* CGI
* ISAPI
* FastCGI
Of the three, we recommend using FastCGI, which has been tested and
benchmarked as providing the best performance and reliability.
Full details of how to install PHP are available from our
website, at:
http://support.zeus.com/products/php.html
If you have any problems, please check the support site for more
up-to-date information and advice.
Quick guide to installing FastCGI with Zeus
-------------------------------------------
Step 1 - obtain and install FastCGI development kit.
Grab the package from:
http://www.fastcgi.com/dist/devkit_2.2.0.tar.gz
Extract the package and follow the instructions:
./configure
make
make export
(run the last as root)
This will install to /usr/local/lib/libfcgi.a
and /usr/local/include/*fcgi*
Step 2 - Compile PHP as FastCGI.
Compile as follows:
./configure --with-fastcgi
make
Note that PHP has many options to the configure script -
e.g. --with-mysql. You will probably want to select your usual options
before compiling; the above is just a bare minimum, for illustration.
After compilation finishes, you will be left with an executable
program called 'php'. Copy this into your document root, under a
dedicated FastCGI directory (e.g. $DOCROOT/fcgi-bin/php)
Step 3 - configure Zeus
Four stages:
- enable FastCGI
- configure FastCGI
- setup alias for FastCGI
- setup alias for PHP
1) Using the admin server, go to the 'module configuration' page for
your virtual server, and ensure that 'fastcgi' is enabled (select the
tickbox to the left).
2) While we can run FastCGI's locally, there are known problems with
some OS's (specifically, the communication between web server and
FastCGI happens over a unix domain socket, and some OS's have trouble
sustaining high connection rates over these sockets). So instead, we
are going to set up the PHP FastCGI to run 'remotely' over localhost
(this uses TCP sockets, which do not suffer this problem). Go to the
'fastcgi configuration' page, and under 'add remote fastcgi':
Add Remote FastCGI
Docroot path /fcgi-bin/php
Remote machine localhost:8002
The first entry is where you saved PHP, above.
The second entry is localhost:<any unused port>
We will start the FastCGI listening on this port shortly.
Click 'update' to commit these changes.
3) Go to the path mapping module and add an alias for FastCGI:
Add Alias
Docroot path /fcgi-bin
Filesystem directory /path/to/docroot/fcgi-bin
Alias type fastcgi
Click 'update' to commit these changes
4) Also on the path mapping module, add a handler for PHP:
Add handler
File extension php
Handler /fcgi-bin/php
Click 'update' to commit these changes
Finally restart your virtual server for these changes to take effect.
Step 4 - start PHP as a FastCGI runner
When you start PHP, it will pre-fork a given number of child processes
to handle incoming PHP requests. Each process will handle a given
number of requests before exiting (and being replaced by a newly
forked process). You can control these two parameters by setting the
following environment variables BEFORE starting the FastCGI runner:
PHP_FCGI_CHILDREN - the number of child processes to pre-fork. If not
set, defaults to 8.
PHP_FCGI_MAX_REQUESTS - the number of requests each PHP child process
handles before exiting. If not set, defaults to 500.
To start the FastCGI runner, execute '$ZEUSHOME/web/bin/fcgirunner
8002 $DOCROOT/fcgi-bin/php'. Substitute the appropriate values for
$ZEUSHOME and $DOCROOT; also substitute for 8002 the port you chose,
above.
To stop the runner (e.g. to experiment with the above environment
variables) you will need to manually stop and running PHP
processes. (Use 'ps' and 'kill'). As it is PHP which is forking lots
of children and not the runner, Zeus unfortunately cannot keep track
of what processes are running, sorry. A typical command line may look
like 'ps -efl | grep $DOCROOT/fcgi-bin/php | grep -v grep | awk
'{print $4}' | xargs kill'
-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
-143
View File
@@ -1,143 +0,0 @@
Things to do or at least think about doing in the future. Name in
parenthesis means that person has taken on this project.
Zend
----
* allow foreach ($array as $k => &$val) syntax. right now we cannot
traverse an array without copying each element.
* allow foreach ($array as $k => list($a, $b)) syntax for multi
dimensional arrays.
* look at replacing c-lib call tolower().
* make hash API functions work with HASH_OF() to save time.
* native large number support (probably with GNU GMP)
* Const'ify APIs. Right now, many functions leave parameters untouched,
but don't declare those as const. This makes interaction with other
interfaces difficult which pass const parameters to us.
* add try..catch/throw exception handling
* make UNC filenames work with V_CD layer
global
------
* when used in standalone (skell-script like) mode don't urldecode
arguments passed to php. right now it's not possible to say
/usr/local/bin/php somescript.php dog+cat.txt
as "dog+cat.txt" will arrive in php as "dog cat.txt".
* make everything on the language-level independent of your locale setings.
* always build the standalone executable as well as the chosen SAPI
target.
* make sure all source files have the "right" copyright.
* the following modules still use PHP3_TLS_*() macros (and thereby don't
work in ZTS mode): ext/db/db.c, ext/gd/gd.c
* make sure that all ZTS globals get destructed. Most ts_allocate_id()
calls should have a dtor entry.
* activate all extensions by default that don't rely on external
dependices. (eg ftp)
* --enable-all in configure. (--enable-shared=max ...)
* make configure print out a summary when it's done (like XEmacs)
* replace standard functions which work on static data with
reentrancy-safe functions (DONE?).
* on some platforms unimplemented function will just do nothing (e.g. symlink)
they should print a warning or not even be defined!
* implement javadoc based function docs template system.
* use thread-safe resolver functions (either require BIND 8 or adns).
* provide optional IPv6 support.
* make SAPI conform to CGI/1.1. Currently, all SAPI modules
define REMOTE_ADDR etc. themselves and reach only various level
of compliance.
* find a better way to implement script timeouts. SIGVTALRM is used
by some POSIX threads implementations (i.e. OpenBSD) and is not
available in ZTS mode.
* add aliases to functions to conform to new naming conventions, e.g.
str_to_upper().
* see what functions might need to be changed to use HashPosition, so
that the internal array pointer is not affected.
documentation
-------------
* add remarks in the documentation which functions are not implemented on win32.
* add remarks in the documentation which functions are not binary-safe.
* improve documentation for the sablotron extension
* update curl documentation
* write documentation for the bzip2 extension
* write documentation for the zziplib extension
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/dav
--------
* rewrite.
ext/oci8
--------
* all OCIFetch*() functions should return 0 for no more data and false on error.
* have a flag that trims trailing spaces from CHAR fields on retrieval.
* make allow_call_time_pass_reference=Off working.
* for additional todo information, see oci8.c, in ext/oci8
ext/pcre
--------
* Allow user to set PCRE_NOTEMPTY, PCRE_ANCHORED at execution time, maybe
* add option to preg_grep() to return entries that _don't_ match
ext/sablot
----------
* Re-write the error handling and reporting interface
* Cleanup the underlying code a bit
* Add proper support for the message handlers
ext/session
-----------
* maybe implement finer-grained session variables that could be
locked individually.
* write a network-transparent storage back-end with fallover
facilities
* provide a callback facility which is executed upon encountering
an unknown classname during deserialization
ext/sockets
-----------
* Make the extension work on windows (Daniel Beulshausen)
* Make the extension work with Solaris and the Sun GCC
ext/standard
------------
* add a version number to data serialized via serialize().
* array_add(). (Andrei)
* possibly modify parsing of GPC data to automatically create arrays if
variable name is seen more than once.
* implement regex-cache for url-functions.
* stri_replace(). (Andrei)
* move socket related functions to fsock.c.
* NOT binary safe:
strtok()
basename()
dirname()
strrpos()
strrchr()
strip_tags()
* rewrite win32 SMTP code to be useable for *ix to, maybe as a (default)
module of its own (Hartmut)
ext/zziplib
------------
* more fully support the zziplib api
ext/wddx
--------
* See if we can support the remaining datatypes:
dateTime
binary
recordset
http://www.wddx.org/WDDX_SDK_10a/7__References/WDDX_DTD.htm
(Andrei)
* implement wddx_packet_as_javascript(). (Andrei)
other cool stuff
----------------
* PVM extension
-26
View File
@@ -1,26 +0,0 @@
Copyright (c) 1999, 2000, Andi Gutmans, Sascha Schumann, Zeev Suraski.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- Neither name of the copyright holders nor the names of their contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-6
View File
@@ -1,6 +0,0 @@
## process this file with automake to produce Makefile.am
AUTOMAKE_OPTIONS=foreign
noinst_LTLIBRARIES=libtsrm.la
libtsrm_la_SOURCES = TSRM.c tsrm_strtok_r.c tsrm_virtual_cwd.c
depend:
-2
View File
@@ -1,2 +0,0 @@
- Improve the lock in ts_resource_ex() in order to cover less code.
This can probably be done by more careful hash table access
-549
View File
@@ -1,549 +0,0 @@
/*
+----------------------------------------------------------------------+
| Thread Safe Resource Manager |
+----------------------------------------------------------------------+
| Copyright (c) 1999, 2000, Andi Gutmans, Sascha Schumann, Zeev Suraski|
| This source file is subject to the TSRM license, that is bundled |
| with this package in the file LICENSE |
+----------------------------------------------------------------------+
| Authors: Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include "TSRM.h"
#ifdef ZTS
#include <stdio.h>
#include <stdlib.h>
#if HAVE_STDARG_H
#include <stdarg.h>
#endif
typedef struct _tsrm_tls_entry tsrm_tls_entry;
struct _tsrm_tls_entry {
void **storage;
int count;
THREAD_T thread_id;
tsrm_tls_entry *next;
};
typedef struct {
size_t size;
ts_allocate_ctor ctor;
ts_allocate_dtor dtor;
} tsrm_resource_type;
#define TSRM_SHUFFLE_RSRC_ID(rsrc_id) ((rsrc_id)+1)
#define TSRM_UNSHUFFLE_RSRC_ID(rsrc_id) ((rsrc_id)-1)
/* The memory manager table */
static tsrm_tls_entry **tsrm_tls_table=NULL;
static int tsrm_tls_table_size;
static ts_rsrc_id id_count;
/* The resource sizes table */
static tsrm_resource_type *resource_types_table=NULL;
static int resource_types_table_size;
static MUTEX_T tsmm_mutex; /* thread-safe memory manager mutex */
/* New thread handlers */
static void (*tsrm_new_thread_begin_handler)();
static void (*tsrm_new_thread_end_handler)();
/* Debug support */
int tsrm_error(int level, const char *format, ...);
/* Read a resource from a thread's resource storage */
void *ts_resource_read( tsrm_tls_entry *thread_resources, ts_rsrc_id id );
static int tsrm_error_level;
static FILE *tsrm_error_file;
#if TSRM_DEBUG
#define TSRM_ERROR tsrm_error
#define TSRM_SAFE_ARRAY_OFFSET(array, offset, range) (((offset)>=0 && (offset)<(range)) ? array[offset] : NULL)
#else
#define TSRM_ERROR
#define TSRM_SAFE_ARRAY_OFFSET(array, offset, range) array[offset]
#endif
#if defined(PTHREADS)
/* Thread local storage */
static pthread_key_t tls_key;
#endif
/* Startup TSRM (call once for the entire process) */
TSRM_API int tsrm_startup(int expected_threads, int expected_resources, int debug_level, char *debug_filename)
{
#if defined(GNUPTH)
pth_init();
#elif defined(PTHREADS)
pthread_key_create( &tls_key, 0 );
#endif
tsrm_error_file = stderr;
tsrm_error_set(debug_level, debug_filename);
tsrm_tls_table_size = expected_threads;
tsrm_tls_table = (tsrm_tls_entry **) calloc(tsrm_tls_table_size, sizeof(tsrm_tls_entry *));
if (!tsrm_tls_table) {
TSRM_ERROR(TSRM_ERROR_LEVEL_ERROR, "Unable to allocate TLS table");
return 0;
}
id_count=0;
resource_types_table_size = expected_resources;
resource_types_table = (tsrm_resource_type *) calloc(resource_types_table_size, sizeof(tsrm_resource_type));
if (!resource_types_table) {
TSRM_ERROR(TSRM_ERROR_LEVEL_ERROR, "Unable to allocate resource types table");
free(tsrm_tls_table);
tsrm_tls_table = NULL;
return 0;
}
tsmm_mutex = tsrm_mutex_alloc();
tsrm_new_thread_begin_handler = tsrm_new_thread_end_handler = NULL;
TSRM_ERROR(TSRM_ERROR_LEVEL_CORE, "Started up TSRM, %d expected threads, %d expected resources", expected_threads, expected_resources);
return 1;
}
/* Shutdown TSRM (call once for the entire process) */
TSRM_API void tsrm_shutdown(void)
{
int i;
if (tsrm_tls_table) {
for (i=0; i<tsrm_tls_table_size; i++) {
tsrm_tls_entry *p = tsrm_tls_table[i], *next_p;
while (p) {
int j;
next_p = p->next;
for (j=0; j<id_count; j++) {
free(p->storage[j]);
}
free(p->storage);
free(p);
p = next_p;
}
}
free(tsrm_tls_table);
tsrm_tls_table = NULL;
}
if (resource_types_table) {
free(resource_types_table);
resource_types_table=NULL;
}
tsrm_mutex_free(tsmm_mutex);
tsmm_mutex = NULL;
TSRM_ERROR(TSRM_ERROR_LEVEL_CORE, "Shutdown TSRM");
if (tsrm_error_file!=stderr) {
fclose(tsrm_error_file);
}
#if defined(GNUPTH)
pth_kill();
#elif defined(PTHREADS)
pthread_key_delete( tls_key );
#endif
}
/* allocates a new thread-safe-resource id */
TSRM_API ts_rsrc_id ts_allocate_id(size_t size, ts_allocate_ctor ctor, ts_allocate_dtor dtor)
{
ts_rsrc_id new_id;
int i;
TSRM_ERROR(TSRM_ERROR_LEVEL_CORE, "Obtaining a new resource id, %d bytes", size);
tsrm_mutex_lock(tsmm_mutex);
/* obtain a resource id */
new_id = id_count++;
TSRM_ERROR(TSRM_ERROR_LEVEL_CORE, "Obtained resource id %d", TSRM_SHUFFLE_RSRC_ID(new_id));
/* store the new resource type in the resource sizes table */
if (resource_types_table_size < id_count) {
resource_types_table = (tsrm_resource_type *) realloc(resource_types_table, sizeof(tsrm_resource_type)*id_count);
if (!resource_types_table) {
tsrm_mutex_unlock(tsmm_mutex);
TSRM_ERROR(TSRM_ERROR_LEVEL_ERROR, "Unable to allocate storage for resource");
return 0;
}
resource_types_table_size = id_count;
}
resource_types_table[new_id].size = size;
resource_types_table[new_id].ctor = ctor;
resource_types_table[new_id].dtor = dtor;
/* enlarge the arrays for the already active threads */
for (i=0; i<tsrm_tls_table_size; i++) {
tsrm_tls_entry *p = tsrm_tls_table[i];
while (p) {
if (p->count < id_count) {
int j;
p->storage = (void *) realloc(p->storage, sizeof(void *)*id_count);
for (j=p->count; j<id_count; j++) {
p->storage[j] = (void *) malloc(resource_types_table[j].size);
if (resource_types_table[j].ctor) {
resource_types_table[j].ctor(p->storage[j]);
}
}
p->count = id_count;
}
p = p->next;
}
}
tsrm_mutex_unlock(tsmm_mutex);
TSRM_ERROR(TSRM_ERROR_LEVEL_CORE, "Successfully allocated new resource id %d", TSRM_SHUFFLE_RSRC_ID(new_id));
return TSRM_SHUFFLE_RSRC_ID(new_id);
}
static void allocate_new_resource(tsrm_tls_entry **thread_resources_ptr, THREAD_T thread_id)
{
int i;
TSRM_ERROR(TSRM_ERROR_LEVEL_CORE, "Creating data structures for thread %x", thread_id);
(*thread_resources_ptr) = (tsrm_tls_entry *) malloc(sizeof(tsrm_tls_entry));
(*thread_resources_ptr)->storage = (void **) malloc(sizeof(void *)*id_count);
(*thread_resources_ptr)->count = id_count;
(*thread_resources_ptr)->thread_id = thread_id;
(*thread_resources_ptr)->next = NULL;
#if defined(PTHREADS)
/* Set thread local storage to this new thread resources structure */
pthread_setspecific( tls_key, (void *)*thread_resources_ptr );
#endif
if (tsrm_new_thread_begin_handler) {
tsrm_new_thread_begin_handler(thread_id);
}
for (i=0; i<id_count; i++) {
(*thread_resources_ptr)->storage[i] = (void *) malloc(resource_types_table[i].size);
if (resource_types_table[i].ctor) {
resource_types_table[i].ctor((*thread_resources_ptr)->storage[i]);
}
}
tsrm_mutex_unlock(tsmm_mutex);
if (tsrm_new_thread_end_handler) {
tsrm_new_thread_end_handler(thread_id);
}
}
/* fetches the requested resource for the current thread */
TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
{
THREAD_T thread_id;
int hash_value;
tsrm_tls_entry *thread_resources;
if( !th_id ) {
#if defined(PTHREADS)
/* Fast path for looking up the resources for the current
* thread. Its used by just about every call to
* ts_resource_ex(). This avoids the need for a mutex lock
* and our hashtable lookup.
*/
thread_resources = pthread_getspecific( tls_key );
if( thread_resources ) {
TSRM_ERROR(TSRM_ERROR_LEVEL_INFO, "Fetching resource id %d for current thread %d", id, (long) thread_resources->thread_id );
return ts_resource_read( thread_resources, id );
}
#endif
thread_id = tsrm_thread_id();
} else {
thread_id = *th_id;
}
TSRM_ERROR(TSRM_ERROR_LEVEL_INFO, "Fetching resource id %d for thread %ld", id, (long) thread_id);
tsrm_mutex_lock(tsmm_mutex);
hash_value = THREAD_HASH_OF(thread_id, tsrm_tls_table_size);
thread_resources = tsrm_tls_table[hash_value];
if (!thread_resources) {
allocate_new_resource(&tsrm_tls_table[hash_value], thread_id);
return ts_resource_ex(id, &thread_id);
} else {
do {
if (thread_resources->thread_id == thread_id) {
break;
}
if (thread_resources->next) {
thread_resources = thread_resources->next;
} else {
allocate_new_resource(&thread_resources->next, thread_id);
return ts_resource_ex(id, &thread_id);
/*
* thread_resources = thread_resources->next;
* break;
*/
}
} while (thread_resources);
}
tsrm_mutex_unlock(tsmm_mutex);
return ts_resource_read( thread_resources, id );
}
/* Read a specific resource from the thread's resources.
* This is called outside of a mutex, so have to be aware about external
* changes to the structure as we read it.
*/
void *ts_resource_read( tsrm_tls_entry *thread_resources, ts_rsrc_id id )
{
void *resource;
resource = TSRM_SAFE_ARRAY_OFFSET(thread_resources->storage, TSRM_UNSHUFFLE_RSRC_ID(id), thread_resources->count);
if (resource) {
TSRM_ERROR(TSRM_ERROR_LEVEL_INFO, "Successfully fetched resource id %d for thread id %ld - %x", id, (long) thread_resources->thread_id, (long) resource);
} else {
TSRM_ERROR(TSRM_ERROR_LEVEL_ERROR, "Resource id %d is out of range (%d..%d)", id, TSRM_SHUFFLE_RSRC_ID(0), TSRM_SHUFFLE_RSRC_ID(thread_resources->count-1));
abort();
}
return resource;
}
/* frees all resources allocated for the current thread */
void ts_free_thread(void)
{
tsrm_tls_entry *thread_resources;
int i;
THREAD_T thread_id = tsrm_thread_id();
int hash_value;
tsrm_tls_entry *last=NULL;
tsrm_mutex_lock(tsmm_mutex);
hash_value = THREAD_HASH_OF(thread_id, tsrm_tls_table_size);
thread_resources = tsrm_tls_table[hash_value];
while (thread_resources) {
if (thread_resources->thread_id == thread_id) {
for (i=0; i<thread_resources->count; i++) {
if (resource_types_table[i].dtor) {
resource_types_table[i].dtor(thread_resources->storage[i]);
}
}
for (i=0; i<thread_resources->count; i++) {
free(thread_resources->storage[i]);
}
free(thread_resources->storage);
if (last) {
last->next = thread_resources->next;
} else {
tsrm_tls_table[hash_value] = thread_resources->next;
}
#if defined(PTHREADS)
pthread_setspecific(tls_key, 0);
#endif
free(thread_resources);
break;
}
if (thread_resources->next) {
last = thread_resources;
}
thread_resources = thread_resources->next;
}
tsrm_mutex_unlock(tsmm_mutex);
}
/* deallocates all occurrences of a given id */
void ts_free_id(ts_rsrc_id id)
{
}
/*
* Utility Functions
*/
/* Obtain the current thread id */
TSRM_API THREAD_T tsrm_thread_id(void)
{
#ifdef TSRM_WIN32
return GetCurrentThreadId();
#elif defined(GNUPTH)
return pth_self();
#elif defined(PTHREADS)
return pthread_self();
#elif defined(NSAPI)
return systhread_current();
#elif defined(PI3WEB)
return PIThread_getCurrent();
#endif
}
/* Allocate a mutex */
TSRM_API MUTEX_T tsrm_mutex_alloc(void)
{
MUTEX_T mutexp;
#ifdef TSRM_WIN32
mutexp = malloc(sizeof(CRITICAL_SECTION));
InitializeCriticalSection(mutexp);
#elif defined(GNUPTH)
mutexp = (MUTEX_T) malloc(sizeof(*mutexp));
pth_mutex_init(mutexp);
#elif defined(PTHREADS)
mutexp = (pthread_mutex_t *)malloc(sizeof(pthread_mutex_t));
pthread_mutex_init(mutexp,NULL);
#elif defined(NSAPI)
mutexp = crit_init();
#elif defined(PI3WEB)
mutexp = PIPlatform_allocLocalMutex();
#endif
#ifdef THR_DEBUG
printf("Mutex created thread: %d\n",mythreadid());
#endif
return( mutexp );
}
/* Free a mutex */
TSRM_API void tsrm_mutex_free(MUTEX_T mutexp)
{
if (mutexp) {
#ifdef TSRM_WIN32
DeleteCriticalSection(mutexp);
#elif defined(GNUPTH)
free(mutexp);
#elif defined(PTHREADS)
pthread_mutex_destroy(mutexp);
free(mutexp);
#elif defined(NSAPI)
crit_terminate(mutexp);
#elif defined(PI3WEB)
PISync_delete(mutexp)
#endif
}
#ifdef THR_DEBUG
printf("Mutex freed thread: %d\n",mythreadid());
#endif
}
/* Lock a mutex */
TSRM_API int tsrm_mutex_lock(MUTEX_T mutexp)
{
TSRM_ERROR(TSRM_ERROR_LEVEL_INFO, "Mutex locked thread: %ld", tsrm_thread_id());
#ifdef TSRM_WIN32
EnterCriticalSection(mutexp);
return 1;
#elif defined(GNUPTH)
return pth_mutex_acquire(mutexp, 0, NULL);
#elif defined(PTHREADS)
return pthread_mutex_lock(mutexp);
#elif defined(NSAPI)
return crit_enter(mutexp);
#elif defined(PI3WEB)
return PISync_lock(mutexp);
#endif
}
/* Unlock a mutex */
TSRM_API int tsrm_mutex_unlock(MUTEX_T mutexp)
{
TSRM_ERROR(TSRM_ERROR_LEVEL_INFO, "Mutex unlocked thread: %ld", tsrm_thread_id());
#ifdef TSRM_WIN32
LeaveCriticalSection(mutexp);
return 1;
#elif defined(GNUPTH)
return pth_mutex_release(mutexp);
#elif defined(PTHREADS)
return pthread_mutex_unlock(mutexp);
#elif defined(NSAPI)
return crit_exit(mutexp);
#elif defined(PI3WEB)
return PISync_unlock(mutexp);
#endif
}
TSRM_API void *tsrm_set_new_thread_begin_handler(void (*new_thread_begin_handler)(THREAD_T thread_id))
{
void *retval = (void *) tsrm_new_thread_begin_handler;
tsrm_new_thread_begin_handler = new_thread_begin_handler;
return retval;
}
TSRM_API void *tsrm_set_new_thread_end_handler(void (*new_thread_end_handler)(THREAD_T thread_id))
{
void *retval = (void *) tsrm_new_thread_end_handler;
tsrm_new_thread_end_handler = new_thread_end_handler;
return retval;
}
/*
* Debug support
*/
#if TSRM_DEBUG
int tsrm_error(int level, const char *format, ...)
{
if (level<=tsrm_error_level) {
va_list args;
int size;
fprintf(tsrm_error_file, "TSRM: ");
va_start(args, format);
size = vfprintf(tsrm_error_file, format, args);
va_end(args);
fprintf(tsrm_error_file, "\n");
fflush(tsrm_error_file);
return size;
} else {
return 0;
}
}
#endif
void tsrm_error_set(int level, char *debug_filename)
{
tsrm_error_level = level;
#if TSRM_DEBUG
if (tsrm_error_file!=stderr) { /* close files opened earlier */
fclose(tsrm_error_file);
}
if (debug_filename) {
tsrm_error_file = fopen(debug_filename, "w");
if (!tsrm_error_file) {
tsrm_error_file = stderr;
}
} else {
tsrm_error_file = stderr;
}
#endif
}
#endif /* ZTS */
-174
View File
@@ -1,174 +0,0 @@
# Microsoft Developer Studio Project File - Name="TSRM" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=TSRM - Win32 Debug_TS
!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 "TSRM.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 "TSRM.mak" CFG="TSRM - Win32 Debug_TS"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "TSRM - Win32 Debug_TS" (based on "Win32 (x86) Static Library")
!MESSAGE "TSRM - Win32 Release_TS" (based on "Win32 (x86) Static Library")
!MESSAGE "TSRM - Win32 Release_TS_inline" (based on "Win32 (x86) Static Library")
!MESSAGE "TSRM - 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)" == "TSRM - Win32 Debug_TS"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "TSRM___Win32_Debug_TS"
# PROP BASE Intermediate_Dir "TSRM___Win32_Debug_TS"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug_TS"
# PROP Intermediate_Dir "Debug_TS"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "C:\Projects\TSRM" /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 "ZTS" /D "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D TSRM_DEBUG=1 /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)" == "TSRM - Win32 Release_TS"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "TSRM___Win32_Release_TS"
# PROP BASE Intermediate_Dir "TSRM___Win32_Release_TS"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 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" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "ZTS" /D "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D TSRM_DEBUG=0 /YX /FD /c
# 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)" == "TSRM - Win32 Release_TS_inline"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "TSRM___Win32_Release_TS_inline"
# PROP BASE Intermediate_Dir "TSRM___Win32_Release_TS_inline"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 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" /D "WIN32" /D "_MBCS" /D "_LIB" /D "TSRM_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "ZTS" /D "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D TSRM_DEBUG=0 /YX /FD /c
# 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)" == "TSRM - Win32 Release_TSDbg"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "TSRM___Win32_Release_TSDbg"
# PROP BASE Intermediate_Dir "TSRM___Win32_Release_TSDbg"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 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" /D "ZTS" /D "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D TSRM_DEBUG=0 /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /Zi /Od /I "." /D "NDEBUG" /D "ZTS" /D "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D TSRM_DEBUG=0 /YX /FD /c
# 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 "TSRM - Win32 Debug_TS"
# Name "TSRM - Win32 Release_TS"
# Name "TSRM - Win32 Release_TS_inline"
# Name "TSRM - Win32 Release_TSDbg"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\TSRM.c
# End Source File
# Begin Source File
SOURCE=.\tsrm_strtok_r.c
# End Source File
# Begin Source File
SOURCE=.\tsrm_virtual_cwd.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\TSRM.h
# End Source File
# Begin Source File
SOURCE=.\tsrm_config.w32.h
# End Source File
# Begin Source File
SOURCE=.\tsrm_config_common.h
# End Source File
# Begin Source File
SOURCE=.\tsrm_strtok_r.h
# End Source File
# Begin Source File
SOURCE=.\tsrm_virtual_cwd.h
# End Source File
# End Group
# End Target
# End Project
-116
View File
@@ -1,116 +0,0 @@
/*
+----------------------------------------------------------------------+
| Thread Safe Resource Manager |
+----------------------------------------------------------------------+
| Copyright (c) 1999, 2000, Andi Gutmans, Sascha Schumann, Zeev Suraski|
| This source file is subject to the TSRM license, that is bundled |
| with this package in the file LICENSE |
+----------------------------------------------------------------------+
| Authors: Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef TSRM_H
#define TSRM_H
#ifdef HAVE_CONFIG_H
# include "tsrm_config.h"
#endif
/* Only compile multi-threading functions if we're in ZTS mode */
#ifdef ZTS
#ifdef WIN32
# define TSRM_WIN32
#endif
#ifdef TSRM_WIN32
# include <windows.h>
#elif defined(GNUPTH)
# include <pth.h>
#elif defined(PTHREADS)
# include <pthread.h>
#endif
typedef int ts_rsrc_id;
#ifdef TSRM_WIN32
# ifdef TSRM_EXPORTS
# define TSRM_API __declspec(dllexport)
# else
# define TSRM_API __declspec(dllimport)
# endif
#else
# define TSRM_API
#endif
/* Define THREAD_T and MUTEX_T */
#ifdef TSRM_WIN32
# define THREAD_T DWORD
# define MUTEX_T CRITICAL_SECTION *
#elif defined(GNUPTH)
# define THREAD_T pth_t
# define MUTEX_T pth_mutex_t *
#elif defined(PTHREADS)
# define THREAD_T pthread_t
# define MUTEX_T pthread_mutex_t *
#elif defined(NSAPI)
# define THREAD_T SYS_THREAD
# define MUTEX_T CRITICAL
#elif defined(PI3WEB)
# define THREAD_T PIThread *
# define MUTEX_T PISync *
#endif
typedef void (*ts_allocate_ctor)(void *);
typedef void (*ts_allocate_dtor)(void *);
#define THREAD_HASH_OF(thr,ts) (unsigned long)thr%(unsigned long)ts
#ifdef __cplusplus
extern "C" {
#endif
/* startup/shutdown */
TSRM_API int tsrm_startup(int expected_threads, int expected_resources, int debug_level, char *debug_filename);
TSRM_API void tsrm_shutdown(void);
/* allocates a new thread-safe-resource id */
TSRM_API ts_rsrc_id ts_allocate_id(size_t size, ts_allocate_ctor ctor, ts_allocate_dtor dtor);
/* fetches the requested resource for the current thread */
TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id);
#define ts_resource(id) ts_resource_ex(id, NULL)
/* frees all resources allocated for the current thread */
TSRM_API void ts_free_thread(void);
/* deallocates all occurrences of a given id */
TSRM_API void ts_free_id(ts_rsrc_id id);
/* Debug support */
#define TSRM_ERROR_LEVEL_ERROR 1
#define TSRM_ERROR_LEVEL_CORE 2
#define TSRM_ERROR_LEVEL_INFO 3
TSRM_API int tsrm_error(int level, const char *format, ...);
TSRM_API void tsrm_error_set(int level, char *debug_filename);
/* utility functions */
TSRM_API THREAD_T tsrm_thread_id(void);
TSRM_API MUTEX_T tsrm_mutex_alloc(void);
TSRM_API void tsrm_mutex_free(MUTEX_T mutexp);
TSRM_API int tsrm_mutex_lock(MUTEX_T mutexp);
TSRM_API int tsrm_mutex_unlock(MUTEX_T mutexp);
TSRM_API void *tsrm_set_new_thread_begin_handler(void (*new_thread_begin_handler)(THREAD_T thread_id));
TSRM_API void *tsrm_set_new_thread_end_handler(void (*new_thread_end_handler)(THREAD_T thread_id));
#ifdef __cplusplus
}
#endif
#endif /* ZTS */
#endif /* TSRM_H */
-1
View File
@@ -1 +0,0 @@
#undef PTHREADS
-5
View File
@@ -1,5 +0,0 @@
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 = tsrm_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
-33
View File
@@ -1,33 +0,0 @@
dnl $Id$
dnl
dnl Minimalistic configure.in for TSRM.
dnl
AC_INIT(TSRM.c)
AM_INIT_AUTOMAKE(TSRM, 1.0, nodefine)
AM_CONFIG_HEADER(tsrm_config.h)
sinclude(tsrm.m4)
TSRM_BASIC_CHECKS
TSRM_THREADS_CHECKS
AM_PROG_LIBTOOL
if test "$enable_debug" != "yes"; then
AM_SET_LIBTOOL_VARIABLE([--silent])
fi
dnl TSRM_PTHREAD
AC_CHECK_HEADERS(
utime.h \
dirent.h \
stdarg.h \
alloca.h \
unistd.h \
limits.h
)
AC_DEFINE(ZTS,1,[ ])
AC_OUTPUT(Makefile)
-44
View File
@@ -1,44 +0,0 @@
#ifndef READDIR_H
#define READDIR_H
/*
* Structures and types used to implement opendir/readdir/closedir
* on Windows 95/NT.
*/
#include <io.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
/* struct dirent - same as Unix */
struct dirent {
long d_ino; /* inode (always 1 in WIN32) */
off_t d_off; /* offset to this dirent */
unsigned short d_reclen; /* length of d_name */
char d_name[_MAX_FNAME + 1]; /* filename (null terminated) */
};
/* typedef DIR - not the same as Unix */
typedef struct {
long handle; /* _findfirst/_findnext handle */
short offset; /* offset into directory */
short finished; /* 1 if there are not more files */
struct _finddata_t fileinfo; /* from _findfirst/_findnext */
char *dir; /* the dir we are reading */
struct dirent dent; /* the dirent to return */
} DIR;
/* Function prototypes */
DIR *opendir(const char *);
struct dirent *readdir(DIR *);
int readdir_r(DIR *, struct dirent *, struct dirent **);
int closedir(DIR *);
void rewinddir(DIR *);
#endif /* READDIR_H */
-157
View File
@@ -1,157 +0,0 @@
dnl Copyright (c) 1999, 2000 Sascha Schumann. All rights reserved.
dnl
dnl Redistribution and use in source and binary forms, with or without
dnl modification, are permitted provided that the following conditions
dnl are met:
dnl
dnl 1. Redistributions of source code must retain the above copyright
dnl notice, this list of conditions and the following disclaimer.
dnl
dnl 2. Redistributions in binary form must reproduce the above copyright
dnl notice, this list of conditions and the following disclaimer in
dnl the documentation and/or other materials provided with the
dnl distribution.
dnl
dnl THIS SOFTWARE IS PROVIDED BY SASCHA SCHUMANN ``AS IS'' AND ANY
dnl EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
dnl PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SASCHA SCHUMANN OR
dnl HIS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
dnl SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
dnl NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
dnl LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
dnl HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
dnl STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
dnl ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
dnl OF THE POSSIBILITY OF SUCH DAMAGE.
dnl
dnl PTHREADS_FLAGS
dnl
dnl Set some magic defines to achieve POSIX threads conformance
dnl
AC_DEFUN(PTHREADS_FLAGS,[
if test -z "$host_alias"; then
AC_MSG_ERROR(host_alias is not set. Make sure to run config.guess)
fi
case "$host_alias" in
*solaris*)
PTHREAD_FLAGS="-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT";;
*freebsd*)
PTHREAD_FLAGS="-D_REENTRANT -D_THREAD_SAFE";;
*linux*)
PTHREAD_FLAGS="-D_REENTRANT";;
*aix*)
PTHREAD_FLAGS="-D_THREAD_SAFE";;
*irix*)
PTHREAD_FLAGS="-D_POSIX_THREAD_SAFE_FUNCTIONS";;
*hpux*)
PTHREAD_FLAGS="-D_REENTRANT";;
*sco*)
PTHREAD_FLAGS="-D_REENTRANT";;
dnl Solves sigwait() problem, creates problems with u_long etc.
dnl PTHREAD_FLAGS="-D_REENTRANT -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=199506 -D_XOPEN_SOURCE_EXTENDED=1";;
esac
if test -n "$PTHREAD_FLAGS"; then
CPPFLAGS="$CPPFLAGS $PTHREAD_FLAGS"
fi
])dnl
dnl
dnl PTHREADS_CHECK_COMPILE
dnl
dnl Check whether the current setup can use POSIX threads calls
dnl
AC_DEFUN(PTHREADS_CHECK_COMPILE, [
AC_TRY_RUN( [
#include <pthread.h>
#include <stddef.h>
void *thread_routine(void *data) {
return data;
}
int main() {
pthread_t thd;
pthread_mutexattr_t mattr;
int data = 1;
pthread_mutexattr_init(&mattr);
return pthread_create(&thd, NULL, thread_routine, &data);
} ], [
pthreads_working="yes"
], [
pthreads_working="no"
], pthreads_working="no" ) ] )dnl
dnl
dnl PTHREADS_CHECK()
dnl
dnl Try to find a way to enable POSIX threads
dnl
dnl Magic flags
dnl -kthread gcc (FreeBSD)
dnl -Kthread UDK cc (UnixWare)
dnl -mt WorkShop cc (Solaris)
dnl -mthreads gcc (AIX)
dnl -pthread gcc (Linux, FreeBSD, NetBSD, OpenBSD)
dnl -pthreads gcc (Solaris)
dnl -qthreaded AIX cc V5
dnl -threads gcc (HP-UX)
dnl
AC_DEFUN(PTHREADS_CHECK,[
save_CFLAGS="$CFLAGS"
save_LIBS="$LIBS"
PTHREADS_ASSIGN_VARS
PTHREADS_CHECK_COMPILE
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
AC_CACHE_CHECK(for pthreads_cflags,ac_cv_pthreads_cflags,[
ac_cv_pthreads_cflags=""
if test "$pthreads_working" != "yes"; then
for flag in -kthread -pthread -pthreads -mthreads -Kthread -threads -mt -qthreaded; do
ac_save="$CFLAGS"
CFLAGS="$CFLAGS $flag"
PTHREADS_CHECK_COMPILE
CFLAGS="$ac_save"
if test "$pthreads_working" = "yes"; then
ac_cv_pthreads_cflags="$flag"
break
fi
done
fi
])
AC_CACHE_CHECK(for pthreads_lib, ac_cv_pthreads_lib,[
ac_cv_pthreads_lib=""
if test "$pthreads_working" != "yes"; then
for lib in pthread pthreads c_r; do
ac_save="$LIBS"
LIBS="$LIBS -l$lib"
PTHREADS_CHECK_COMPILE
LIBS="$ac_save"
if test "$pthreads_working" = "yes"; then
ac_cv_pthreads_lib="$lib"
break
fi
done
fi
])
if test "$pthreads_working" = "yes"; then
threads_result="POSIX Threads found"
else
threads_result="POSIX Threads not found"
fi
])dnl
dnl
dnl
AC_DEFUN(PTHREADS_ASSIGN_VARS,[
if test -n "$ac_cv_pthreads_lib"; then
LIBS="$LIBS -l$ac_cv_pthreads_lib"
fi
if test -n "$ac_cv_pthreads_cflags"; then
CFLAGS="$CFLAGS $ac_cv_pthreads_cflags"
fi
])dnl
-98
View File
@@ -1,98 +0,0 @@
dnl TSRM_CHECK_GCC_ARG(ARG, ACTION-IF-FOUND, ACTION-IF-NOT_FOUND)
AC_DEFUN(TSRM_CHECK_GCC_ARG,[
gcc_arg_name=[ac_cv_gcc_arg]translit($1,A-Z-,a-z_)
AC_CACHE_CHECK([whether $CC supports $1], [ac_cv_gcc_arg]translit($1,A-Z-,a-z_), [
echo 'void somefunc() { };' > conftest.c
cmd='$CC $1 -c conftest.c'
if eval $cmd 2>&1 | egrep -e $1 >/dev/null ; then
ac_result=no
else
ac_result=yes
fi
eval $gcc_arg_name=$ac_result
rm -f conftest.*
])
if eval test "\$$gcc_arg_name" = "yes"; then
$2
else
:
$3
fi
])
AC_DEFUN(TSRM_BASIC_CHECKS,[
AC_REQUIRE([AC_PROG_CC])dnl
dnl AC_REQUIRE([AM_PROG_CC_STDC])dnl
AC_REQUIRE([AC_PROG_CC_C_O])dnl
AC_REQUIRE([AC_PROG_RANLIB])dnl
AC_CHECK_HEADERS(stdarg.h)
])
AC_DEFUN(TSRM_CHECK_PTH,[
AC_MSG_CHECKING(for GNU Pth)
PTH_PREFIX="`$1 --prefix`"
if test -z "$PTH_PREFIX"; then
AC_MSG_RESULT(Please check your Pth installation)
fi
CPPFLAGS="$CPPFLAGS `$1 --cflags`"
LDFLAGS="$LDFLAGS `$1 --ldflags`"
LIBS="$LIBS `$1 --libs`"
AC_DEFINE(GNUPTH, 1, [Whether you use GNU Pth])
AC_MSG_RESULT(yes - installed in $PTH_PREFIX)
])
sinclude(threads.m4)
sinclude(TSRM/threads.m4)
AC_DEFUN(TSRM_CHECK_PTHREADS,[
PTHREADS_CHECK
if test "$pthreads_working" != "yes"; then
AC_MSG_ERROR(Your system seems to lack POSIX threads.)
fi
AC_DEFINE(PTHREADS, 1, Whether to use Pthreads)
AC_MSG_CHECKING(for POSIX threads)
AC_MSG_RESULT(yes)
])
AC_DEFUN(TSRM_THREADS_CHECKS,[
dnl For the thread implementations, we always use --with-*
dnl to maintain consistency
AC_ARG_WITH(tsrm-pth,
[ --with-tsrm-pth[=pth-config] Use GNU Pth.],[
TSRM_PTH=$withval
],[
TSRM_PTH=no
])
AC_ARG_WITH(tsrm-pthreads,
[ --with-tsrm-pthreads Use POSIX threads (default)],[
TSRM_PTHREADS=$withval
],[
TSRM_PTHREADS=yes
])
test "$TSRM_PTH" = "yes" && TSRM_PTH=pth-config
if test "$TSRM_PTH" != "no"; then
TSRM_CHECK_PTH($TSRM_PTH)
elif test "$TSRM_PTHREADS" != "no"; then
TSRM_CHECK_PTHREADS
fi
])
-15
View File
@@ -1,15 +0,0 @@
#ifndef TSRM_CONFIG_W32_H
#define TSRM_CONFIG_W32_H
#define HAVE_UTIME 1
#define HAVE_ALLOCA 1
#undef inline
#ifdef ZEND_WIN32_FORCE_INLINE
# define inline __forceinline
#else
# define inline
#endif
#endif
-47
View File
@@ -1,47 +0,0 @@
#ifndef TSRM_CONFIG_COMMON_H
#define TSRM_CONFIG_COMMON_H
#if WINNT|WIN32
# define TSRM_WIN32
#endif
#ifndef TSRM_WIN32
# include "tsrm_config.h"
# include <sys/param.h>
#else
# include "tsrm_config.w32.h"
#endif
#ifdef TSRM_WIN32
#include <malloc.h>
#endif
#if HAVE_ALLOCA_H
#include <alloca.h>
#endif
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#if HAVE_LIMITS_H
#include <limits.h>
#endif
#ifndef MAXPATHLEN
# ifdef PATH_MAX
# define MAXPATHLEN PATH_MAX
# else
# define MAXPATHLEN 256
# endif
#endif
#if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2))
# define tsrm_do_alloca(p) alloca(p)
# define tsrm_free_alloca(p)
#else
# define tsrm_do_alloca(p) malloc(p)
# define tsrm_free_alloca(p) free(p)
#endif
#endif /* TSRM_CONFIG_COMMON_H */
-63
View File
@@ -1,63 +0,0 @@
#include <stdio.h>
#include "tsrm_config_common.h"
#include "tsrm_strtok_r.h"
static inline int in_character_class(char ch, const char *delim)
{
while (*delim) {
if (*delim == ch) {
return 1;
}
delim++;
}
return 0;
}
char *tsrm_strtok_r(char *s, const char *delim, char **last)
{
char *token;
if (s == NULL) {
s = *last;
}
while (*s && in_character_class(*s, delim)) {
s++;
}
if (!*s) {
return NULL;
}
token = s;
while (*s && !in_character_class(*s, delim)) {
s++;
}
if (!*s) {
*last = s;
} else {
*s = '\0';
*last = s + 1;
}
return token;
}
#if 0
main()
{
char foo[] = "/foo/bar//\\barbara";
char *last;
char *token;
token = tsrm_strtok_r(foo, "/\\", &last);
while (token) {
printf ("Token = '%s'\n", token);
token = tsrm_strtok_r(NULL, "/\\", &last);
}
return 0;
}
#endif
-6
View File
@@ -1,6 +0,0 @@
#ifndef TSRM_STRTOK_R
#define TSRM_STRTOK_R
char *tsrm_strtok_r(char *s, const char *delim, char **last);
#endif
-787
View File
@@ -1,787 +0,0 @@
/*
+----------------------------------------------------------------------+
| PHP version 4.0 |
+----------------------------------------------------------------------+
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Sascha Schumann <sascha@schumann.cx> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>
#include <stdio.h>
#include <limits.h>
#include <errno.h>
#include <stdlib.h>
#include <fcntl.h>
#include "tsrm_virtual_cwd.h"
#include "tsrm_strtok_r.h"
#ifdef TSRM_WIN32
#include <io.h>
#endif
#define VIRTUAL_CWD_DEBUG 0
#ifdef ZTS
#include "TSRM.h"
#endif
/* Only need mutex for popen() in Windows because it doesn't chdir() on UNIX */
#if defined(TSRM_WIN32) && defined(ZTS)
MUTEX_T cwd_mutex;
#endif
#ifdef ZTS
static ts_rsrc_id cwd_globals_id;
#else
static virtual_cwd_globals cwd_globals;
#endif
cwd_state main_cwd_state; /* True global */
#ifndef TSRM_WIN32
#include <unistd.h>
#else
#include <direct.h>
#endif
#ifndef S_ISDIR
#define S_ISDIR(mode) ((mode) & _S_IFDIR)
#endif
#ifndef S_ISREG
#define S_ISREG(mode) ((mode) & _S_IFREG)
#endif
#ifdef TSRM_WIN32
#define tsrm_strtok_r(a,b,c) strtok((a),(b))
#define TOKENIZER_STRING "/\\"
static int php_check_dots(const char *element, int n)
{
while (n-- > 0) if (element[n] != '.') break;
return (n != -1);
}
#define IS_DIRECTORY_UP(element, len) \
(len >= 2 && !php_check_dots(element, len))
#define IS_DIRECTORY_CURRENT(element, len) \
(len == 1 && ptr[0] == '.')
#else
#define TOKENIZER_STRING "/"
#endif
/* default macros */
#ifndef IS_DIRECTORY_UP
#define IS_DIRECTORY_UP(element, len) \
(len == 2 && memcmp(element, "..", 2) == 0)
#endif
#ifndef IS_DIRECTORY_CURRENT
#define IS_DIRECTORY_CURRENT(element, len) \
(len == 1 && ptr[0] == '.')
#endif
/* define this to check semantics */
#define IS_DIR_OK(s) (1)
#ifndef IS_DIR_OK
#define IS_DIR_OK(state) (php_is_dir_ok(state) == 0)
#endif
#define CWD_STATE_COPY(d, s) \
(d)->cwd_length = (s)->cwd_length; \
(d)->cwd = (char *) malloc((s)->cwd_length+1); \
memcpy((d)->cwd, (s)->cwd, (s)->cwd_length+1);
#define CWD_STATE_FREE(s) \
free((s)->cwd);
static int php_is_dir_ok(const cwd_state *state)
{
struct stat buf;
if (stat(state->cwd, &buf) == 0 && S_ISDIR(buf.st_mode))
return (0);
return (1);
}
static int php_is_file_ok(const cwd_state *state)
{
struct stat buf;
if (stat(state->cwd, &buf) == 0 && S_ISREG(buf.st_mode))
return (0);
return (1);
}
static void cwd_globals_ctor(virtual_cwd_globals *cwd_globals)
{
CWD_STATE_COPY(&cwd_globals->cwd, &main_cwd_state);
}
static void cwd_globals_dtor(virtual_cwd_globals *cwd_globals)
{
CWD_STATE_FREE(&cwd_globals->cwd);
}
static char *tsrm_strndup(const char *s, size_t length)
{
char *p;
p = (char *) malloc(length+1);
if (!p) {
return (char *)NULL;
}
if (length) {
memcpy(p,s,length);
}
p[length]=0;
return p;
}
CWD_API void virtual_cwd_startup(void)
{
char cwd[MAXPATHLEN];
char *result;
result = getcwd(cwd, sizeof(cwd));
if (!result) {
cwd[0] = '\0';
}
main_cwd_state.cwd = strdup(cwd);
main_cwd_state.cwd_length = strlen(cwd);
#ifdef ZTS
cwd_globals_id = ts_allocate_id(sizeof(virtual_cwd_globals), (ts_allocate_ctor) cwd_globals_ctor, (ts_allocate_dtor) cwd_globals_dtor);
#else
cwd_globals_ctor(&cwd_globals);
#endif
#if defined(TSRM_WIN32) && defined(ZTS)
cwd_mutex = tsrm_mutex_alloc();
#endif
}
CWD_API void virtual_cwd_shutdown(void)
{
#ifndef ZTS
cwd_globals_dtor(&cwd_globals);
#endif
#if defined(TSRM_WIN32) && defined(ZTS)
tsrm_mutex_free(cwd_mutex);
#endif
free(main_cwd_state.cwd); /* Don't use CWD_STATE_FREE because the non global states will probably use emalloc()/efree() */
}
CWD_API char *virtual_getcwd_ex(size_t *length)
{
cwd_state *state;
CWDLS_FETCH();
state = &CWDG(cwd);
if (state->cwd_length == 0) {
char *retval;
*length = 1;
retval = (char *) malloc(2);
retval[0] = DEFAULT_SLASH;
retval[1] = '\0';
return retval;
}
#ifdef TSRM_WIN32
/* If we have something like C: */
if (state->cwd_length == 2 && state->cwd[state->cwd_length-1] == ':') {
char *retval;
*length = state->cwd_length+1;
retval = (char *) malloc(*length+1);
memcpy(retval, state->cwd, *length);
retval[*length-1] = DEFAULT_SLASH;
retval[*length] = '\0';
return retval;
}
#endif
*length = state->cwd_length;
return strdup(state->cwd);
}
/* Same semantics as UNIX getcwd() */
CWD_API char *virtual_getcwd(char *buf, size_t size)
{
size_t length;
char *cwd;
cwd = virtual_getcwd_ex(&length);
if (buf == NULL) {
return cwd;
}
if (length > size-1) {
free(cwd);
errno = ERANGE; /* Is this OK? */
return NULL;
}
memcpy(buf, cwd, length+1);
free(cwd);
return buf;
}
/* Resolve path relatively to state and put the real path into state */
/* returns 0 for ok, 1 for error */
CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func verify_path)
{
int path_length = strlen(path);
char *ptr, *path_copy;
char *tok = NULL;
int ptr_length;
cwd_state *old_state;
int ret = 0;
int copy_amount = -1;
char *free_path;
unsigned char is_absolute = 0;
#ifndef TSRM_WIN32
char resolved_path[MAXPATHLEN];
#endif
if (path_length == 0)
return (0);
#if !defined(TSRM_WIN32) && !defined(__BEOS__)
if (IS_ABSOLUTE_PATH(path, path_length)) {
if (realpath(path, resolved_path)) {
path = resolved_path;
path_length = strlen(path);
}
} else { /* Concat current directory with relative path and then run realpath() on it */
char *tmp;
char *ptr;
ptr = tmp = (char *) malloc(state->cwd_length+path_length+sizeof("/"));
if (!tmp) {
return 1;
}
memcpy(ptr, state->cwd, state->cwd_length);
ptr += state->cwd_length;
*ptr++ = DEFAULT_SLASH;
memcpy(ptr, path, path_length);
ptr += path_length;
*ptr = '\0';
if (realpath(tmp, resolved_path)) {
path = resolved_path;
path_length = strlen(path);
}
free(tmp);
}
#endif
free_path = path_copy = tsrm_strndup(path, path_length);
old_state = (cwd_state *) malloc(sizeof(cwd_state));
CWD_STATE_COPY(old_state, state);
#if VIRTUAL_CWD_DEBUG
fprintf(stderr,"cwd = %s path = %s\n", state->cwd, path);
#endif
if (IS_ABSOLUTE_PATH(path_copy, path_length)) {
copy_amount = COPY_WHEN_ABSOLUTE;
is_absolute = 1;
#ifdef TSRM_WIN32
} else if(IS_SLASH(path_copy[0])) {
copy_amount = 2;
#endif
}
if (copy_amount != -1) {
state->cwd = (char *) realloc(state->cwd, copy_amount + 1);
if (copy_amount) {
if (is_absolute) {
memcpy(state->cwd, path_copy, copy_amount);
path_copy += copy_amount;
} else {
memcpy(state->cwd, old_state->cwd, copy_amount);
}
}
state->cwd[copy_amount] = '\0';
state->cwd_length = copy_amount;
}
ptr = tsrm_strtok_r(path_copy, TOKENIZER_STRING, &tok);
while (ptr) {
ptr_length = strlen(ptr);
if (IS_DIRECTORY_UP(ptr, ptr_length)) {
char save;
save = DEFAULT_SLASH;
#define PREVIOUS state->cwd[state->cwd_length - 1]
while (IS_ABSOLUTE_PATH(state->cwd, state->cwd_length) &&
!IS_SLASH(PREVIOUS)) {
save = PREVIOUS;
PREVIOUS = '\0';
state->cwd_length--;
}
if (!IS_ABSOLUTE_PATH(state->cwd, state->cwd_length)) {
state->cwd[state->cwd_length++] = save;
state->cwd[state->cwd_length] = '\0';
} else {
PREVIOUS = '\0';
state->cwd_length--;
}
} else if (!IS_DIRECTORY_CURRENT(ptr, ptr_length)) {
state->cwd = (char *) realloc(state->cwd, state->cwd_length+ptr_length+1+1);
state->cwd[state->cwd_length] = DEFAULT_SLASH;
memcpy(&state->cwd[state->cwd_length+1], ptr, ptr_length+1);
state->cwd_length += (ptr_length+1);
}
ptr = tsrm_strtok_r(NULL, TOKENIZER_STRING, &tok);
}
if (state->cwd_length == COPY_WHEN_ABSOLUTE) {
state->cwd = (char *) realloc(state->cwd, state->cwd_length+1+1);
state->cwd[state->cwd_length] = DEFAULT_SLASH;
state->cwd[state->cwd_length+1] = '\0';
state->cwd_length++;
}
if (verify_path && verify_path(state)) {
CWD_STATE_FREE(state);
*state = *old_state;
ret = 1;
} else {
CWD_STATE_FREE(old_state);
ret = 0;
}
free(old_state);
free(free_path);
#if VIRTUAL_CWD_DEBUG
fprintf (stderr, "virtual_file_ex() = %s\n",state->cwd);
#endif
return (ret);
}
CWD_API int virtual_chdir(const char *path)
{
CWDLS_FETCH();
return virtual_file_ex(&CWDG(cwd), path, php_is_dir_ok)?-1:0;
}
CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path))
{
int length = strlen(path);
char *temp;
int retval;
if (length == 0) {
return 1; /* Can't cd to empty string */
}
while(--length >= 0 && !IS_SLASH(path[length])) {
}
if (length == -1) {
/* No directory only file name */
errno = ENOENT;
return -1;
}
if (length == COPY_WHEN_ABSOLUTE && IS_ABSOLUTE_PATH(path, length+1)) { /* Also use trailing slash if this is absolute */
length++;
}
temp = (char *) tsrm_do_alloca(length+1);
memcpy(temp, path, length);
temp[length] = 0;
#if VIRTUAL_CWD_DEBUG
fprintf (stderr, "Changing directory to %s\n", temp);
#endif
retval = p_chdir(temp);
tsrm_free_alloca(temp);
return retval;
}
CWD_API char *virtual_realpath(const char *path, char *real_path)
{
cwd_state new_state;
int retval;
CWDLS_FETCH();
CWD_STATE_COPY(&new_state, &CWDG(cwd));
retval = virtual_file_ex(&new_state, path, NULL);
if (!retval) {
int len = new_state.cwd_length>MAXPATHLEN-1?MAXPATHLEN-1:new_state.cwd_length;
memcpy(real_path, new_state.cwd, len);
real_path[len] = '\0';
return real_path;
}
return NULL;
}
CWD_API int virtual_filepath_ex(const char *path, char **filepath, verify_path_func verify_path)
{
cwd_state new_state;
int retval;
CWDLS_FETCH();
CWD_STATE_COPY(&new_state, &CWDG(cwd));
retval = virtual_file_ex(&new_state, path, verify_path);
*filepath = new_state.cwd;
return retval;
}
CWD_API int virtual_filepath(const char *path, char **filepath)
{
return virtual_filepath_ex(path, filepath, php_is_file_ok);
}
CWD_API FILE *virtual_fopen(const char *path, const char *mode)
{
cwd_state new_state;
FILE *f;
CWDLS_FETCH();
if (path[0] == '\0') { /* Fail to open empty path */
return NULL;
}
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, path, NULL);
f = fopen(new_state.cwd, mode);
CWD_STATE_FREE(&new_state);
return f;
}
#if HAVE_UTIME
CWD_API int virtual_utime(const char *filename, struct utimbuf *buf)
{
cwd_state new_state;
int ret;
CWDLS_FETCH();
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, filename, NULL);
ret = utime(new_state.cwd, buf);
CWD_STATE_FREE(&new_state);
return ret;
}
#endif
CWD_API int virtual_chmod(const char *filename, mode_t mode)
{
cwd_state new_state;
int ret;
CWDLS_FETCH();
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, filename, NULL);
ret = chmod(new_state.cwd, mode);
CWD_STATE_FREE(&new_state);
return ret;
}
#ifndef TSRM_WIN32
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group)
{
cwd_state new_state;
int ret;
CWDLS_FETCH();
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, filename, NULL);
ret = chown(new_state.cwd, owner, group);
CWD_STATE_FREE(&new_state);
return ret;
}
#endif
CWD_API int virtual_open(const char *path, int flags, ...)
{
cwd_state new_state;
int f;
CWDLS_FETCH();
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, path, NULL);
if (flags & O_CREAT) {
mode_t mode;
va_list arg;
va_start(arg, flags);
mode = va_arg(arg, mode_t);
va_end(arg);
f = open(new_state.cwd, flags, mode);
} else {
f = open(new_state.cwd, flags);
}
CWD_STATE_FREE(&new_state);
return f;
}
CWD_API int virtual_creat(const char *path, mode_t mode)
{
cwd_state new_state;
int f;
CWDLS_FETCH();
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, path, NULL);
f = creat(new_state.cwd, mode);
CWD_STATE_FREE(&new_state);
return f;
}
CWD_API int virtual_rename(char *oldname, char *newname)
{
cwd_state old_state;
cwd_state new_state;
int retval;
CWDLS_FETCH();
CWD_STATE_COPY(&old_state, &CWDG(cwd));
virtual_file_ex(&old_state, oldname, NULL);
oldname = old_state.cwd;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, newname, NULL);
newname = new_state.cwd;
retval = rename(oldname, newname);
CWD_STATE_FREE(&old_state);
CWD_STATE_FREE(&new_state);
return retval;
}
CWD_API int virtual_stat(const char *path, struct stat *buf)
{
cwd_state new_state;
int retval;
CWDLS_FETCH();
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, path, NULL);
retval = stat(new_state.cwd, buf);
CWD_STATE_FREE(&new_state);
return retval;
}
#ifndef TSRM_WIN32
CWD_API int virtual_lstat(const char *path, struct stat *buf)
{
cwd_state new_state;
int retval;
CWDLS_FETCH();
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, path, NULL);
retval = lstat(new_state.cwd, buf);
CWD_STATE_FREE(&new_state);
return retval;
}
#endif
CWD_API int virtual_unlink(const char *path)
{
cwd_state new_state;
int retval;
CWDLS_FETCH();
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, path, NULL);
retval = unlink(new_state.cwd);
CWD_STATE_FREE(&new_state);
return retval;
}
CWD_API int virtual_mkdir(const char *pathname, mode_t mode)
{
cwd_state new_state;
int retval;
CWDLS_FETCH();
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, pathname, NULL);
#ifdef TSRM_WIN32
retval = mkdir(new_state.cwd);
#else
retval = mkdir(new_state.cwd, mode);
#endif
CWD_STATE_FREE(&new_state);
return retval;
}
CWD_API int virtual_rmdir(const char *pathname)
{
cwd_state new_state;
int retval;
CWDLS_FETCH();
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, pathname, NULL);
retval = rmdir(new_state.cwd);
CWD_STATE_FREE(&new_state);
return retval;
}
#ifdef TSRM_WIN32
DIR *opendir(const char *name);
#endif
CWD_API DIR *virtual_opendir(const char *pathname)
{
cwd_state new_state;
DIR *retval;
CWDLS_FETCH();
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, pathname, NULL);
retval = opendir(new_state.cwd);
CWD_STATE_FREE(&new_state);
return retval;
}
#ifndef TSRM_WIN32
CWD_API FILE *virtual_popen(const char *command, const char *type)
{
int command_length;
char *command_line;
char *ptr;
FILE *retval;
CWDLS_FETCH();
command_length = strlen(command);
ptr = command_line = (char *) malloc(command_length + sizeof("cd ; ") + CWDG(cwd).cwd_length+1);
if (!command_line) {
return NULL;
}
memcpy(ptr, "cd ", sizeof("cd ")-1);
ptr += sizeof("cd ")-1;
if (CWDG(cwd).cwd_length == 0) {
*ptr++ = DEFAULT_SLASH;
} else {
memcpy(ptr, CWDG(cwd).cwd, CWDG(cwd).cwd_length);
ptr += CWDG(cwd).cwd_length;
}
*ptr++ = ' ';
*ptr++ = ';';
*ptr++ = ' ';
memcpy(ptr, command, command_length+1);
#ifdef TSRM_WIN32
retval = _popen(command_line, type);
#else
retval = popen(command_line, type);
#endif
free(command_line);
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)
{
char prev_cwd[MAXPATHLEN];
char *getcwd_result;
FILE *retval;
CWDLS_FETCH();
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
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
-212
View File
@@ -1,212 +0,0 @@
/*
+----------------------------------------------------------------------+
| PHP version 4.0 |
+----------------------------------------------------------------------+
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Sascha Schumann <sascha@schumann.cx> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
#ifndef VIRTUAL_CWD_H
#define VIRTUAL_CWD_H
#include "tsrm_config_common.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <ctype.h>
#ifdef HAVE_UTIME_H
#include <utime.h>
#endif
#ifdef HAVE_STDARG_H
#include <stdarg.h>
#endif
#ifndef TSRM_WIN32
#include <unistd.h>
#endif
#ifdef TSRM_WIN32
#include "readdir.h"
#include <sys/utime.h>
/* mode_t isn't defined on Windows */
typedef unsigned short mode_t;
#define DEFAULT_SLASH '\\'
#define IS_SLASH(c) ((c) == '/' || (c) == '\\')
#define COPY_WHEN_ABSOLUTE 2
#define IS_ABSOLUTE_PATH(path, len) \
(len >= 2 && isalpha(path[0]) && path[1] == ':')
#else
#ifdef HAVE_DIRENT_H
#include <dirent.h>
#endif
#define DEFAULT_SLASH '/'
#define IS_SLASH(c) ((c) == '/')
#endif
#ifndef COPY_WHEN_ABSOLUTE
#define COPY_WHEN_ABSOLUTE 0
#endif
#ifndef IS_ABSOLUTE_PATH
#define IS_ABSOLUTE_PATH(path, len) \
(IS_SLASH(path[0]))
#endif
#ifdef TSRM_EXPORTS
#define CWD_EXPORTS
#endif
#ifdef TSRM_WIN32
# ifdef CWD_EXPORTS
# define CWD_API __declspec(dllexport)
# else
# define CWD_API __declspec(dllimport)
# endif
#else
#define CWD_API
#endif
typedef struct _cwd_state {
char *cwd;
int cwd_length;
} cwd_state;
typedef int (*verify_path_func)(const cwd_state *);
CWD_API void virtual_cwd_startup(void);
CWD_API void virtual_cwd_shutdown(void);
CWD_API char *virtual_getcwd_ex(size_t *length);
CWD_API char *virtual_getcwd(char *buf, size_t size);
CWD_API int virtual_chdir(const char *path);
CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path));
CWD_API int virtual_filepath(const char *path, char **filepath);
CWD_API int virtual_filepath_ex(const char *path, char **filepath, verify_path_func verify_path);
CWD_API char *virtual_realpath(const char *path, char *real_path);
CWD_API FILE *virtual_fopen(const char *path, const char *mode);
CWD_API int virtual_open(const char *path, int flags, ...);
CWD_API int virtual_creat(const char *path, mode_t mode);
CWD_API int virtual_rename(char *oldname, char *newname);
CWD_API int virtual_stat(const char *path, struct stat *buf);
#ifndef TSRM_WIN32
CWD_API int virtual_lstat(const char *path, struct stat *buf);
#endif
CWD_API int virtual_unlink(const char *path);
CWD_API int virtual_mkdir(const char *pathname, mode_t mode);
CWD_API int virtual_rmdir(const char *pathname);
CWD_API DIR *virtual_opendir(const char *pathname);
CWD_API FILE *virtual_popen(const char *command, const char *type);
#if HAVE_UTIME
CWD_API int virtual_utime(const char *filename, struct utimbuf *buf);
#endif
CWD_API int virtual_chmod(const char *filename, mode_t mode);
#ifndef TSRM_WIN32
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group);
#endif
CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func verify_path);
typedef struct _virtual_cwd_globals {
cwd_state cwd;
} virtual_cwd_globals;
#ifdef ZTS
# define CWDLS_D virtual_cwd_globals *cwd_globals
# define CWDLS_DC , CWDLS_D
# define CWDLS_C cwd_globals
# define CWDLS_CC , CWDLS_C
# define CWDG(v) (cwd_globals->v)
# define CWDLS_FETCH() virtual_cwd_globals *cwd_globals = ts_resource(cwd_globals_id)
#else
# define CWDLS_D void
# define CWDLS_DC
# define CWDLS_C
# define CWDLS_CC
# define CWDG(v) (cwd_globals.v)
# define CWDLS_FETCH()
#endif
/* The actual macros to be used in programs using TSRM
* If the program defines VIRTUAL_DIR it will use the
* virtual_* functions
*/
#ifdef VIRTUAL_DIR
#define V_GETCWD(buff, size) virtual_getcwd(buff,size)
#define V_FOPEN(path, mode) virtual_fopen(path, mode)
/* The V_OPEN macro will need to be used as V_OPEN((path, flags, ...)) */
#define V_OPEN(open_args) virtual_open open_args
#define V_CREAT(path, mode) virtual_creat(path, mode)
#define V_CHDIR(path) virtual_chdir(path)
#define V_CHDIR_FILE(path) virtual_chdir_file(path, virtual_chdir)
#define V_GETWD(buf)
#define V_REALPATH(path,real_path) virtual_realpath(path,real_path)
#define V_RENAME(oldname,newname) virtual_rename(oldname,newname)
#define V_STAT(path, buff) virtual_stat(path, buff)
#ifdef TSRM_WIN32
#define V_LSTAT(path, buff) virtual_stat(path, buff)
#else
#define V_LSTAT(path, buff) virtual_lstat(path, buff)
#endif
#define V_UNLINK(path) virtual_unlink(path)
#define V_MKDIR(pathname, mode) virtual_mkdir(pathname, mode)
#define V_RMDIR(pathname) virtual_rmdir(pathname)
#define V_OPENDIR(pathname) virtual_opendir(pathname)
#define V_POPEN(command, type) virtual_popen(command, type)
#if HAVE_UTIME
#define V_UTIME(path,time) virtual_utime(path,time)
#endif
#define V_CHMOD(path,mode) virtual_chmod(path,mode)
#ifndef TSRM_WIN32
#define V_CHOWN(path,owner,group) virtual_chown(path,owner,group)
#endif
#else
#define V_GETCWD(buff, size) getcwd(buff,size)
#define V_FOPEN(path, mode) fopen(path, mode)
#define V_OPEN(open_args) open open_args
#define V_CREAT(path, mode) creat(path, mode)
#define V_RENAME(oldname,newname) rename(oldname,newname)
#define V_CHDIR(path) chdir(path)
#define V_CHDIR_FILE(path) virtual_chdir_file(path, chdir)
#define V_GETWD(buf) getwd(buf)
#define V_STAT(path, buff) stat(path, buff)
#define V_LSTAT(path, buff) lstat(path, buff)
#define V_UNLINK(path) unlink(path)
#define V_MKDIR(pathname, mode) mkdir(pathname, mode)
#define V_RMDIR(pathname) rmdir(pathname)
#define V_OPENDIR(pathname) opendir(pathname)
#define V_POPEN(command, type) popen(command, type)
#define V_REALPATH(path,real_path) realpath(path,real_path)
#if HAVE_UTIME
#define V_UTIME(path,time) utime(path,time)
#endif
#define V_CHMOD(path,mode) chmod(path,mode)
#ifndef TSRM_WIN32
#define V_CHOWN(path,owner,group) chown(path,owner,group)
#endif
#endif
#endif /* VIRTUAL_CWD_H */
-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
-116
View File
@@ -1,116 +0,0 @@
---------------------------------------------------------------------------
The Zend License, version 0.92
Copyright (C) 1999-2001 Zend Technologies Ltd.
---------------------------------------------------------------------------
The Zend scripting engine library is a product of Zend Technologies Ltd.
It may be used and/or distributed under the terms of the Q Public
License (QPL) version 1.0, enclosed below.
For more information about Zend please visit http://www.zend.com/
For license related questions please mail license@zend.com
===========================================================================
THE Q PUBLIC LICENSE
version 1.0
Copyright (C) 1999 Troll Tech AS, Norway.
Everyone is permitted to copy and
distribute this license document.
The intent of this license is to establish freedom to share and change the
software regulated by this license under the open source model.
This license applies to any software containing a notice placed by the
copyright holder saying that it may be distributed under the terms of
the Q Public License version 1.0. Such software is herein referred to as
the Software. This license covers modification and distribution of the
Software, use of third-party application programs based on the Software,
and development of free software which uses the Software.
Granted Rights
1. You are granted the non-exclusive rights set forth in this license
provided you agree to and comply with any and all conditions in this
license. Whole or partial distribution of the Software, or software
items that link with the Software, in any form signifies acceptance of
this license.
2. You may copy and distribute the Software in unmodified form provided
that the entire package, including - but not restricted to - copyright,
trademark notices and disclaimers, as released by the initial developer
of the Software, is distributed.
3. You may make modifications to the Software and distribute your
modifications, in a form that is separate from the Software, such as
patches. The following restrictions apply to modifications:
a. Modifications must not alter or remove any copyright notices in
the Software.
b. When modifications to the Software are released under this
license, a non-exclusive royalty-free right is granted to the
initial developer of the Software to distribute your modification
in future versions of the Software provided such versions remain
available under these terms in addition to any other license(s) of
the initial developer.
4. You may distribute machine-executable forms of the Software or
machine-executable forms of modified versions of the Software, provided
that you meet these restrictions:
a. You must include this license document in the distribution.
b. You must ensure that all recipients of the machine-executable forms
are also able to receive the complete machine-readable source code
to the distributed Software, including all modifications, without
any charge beyond the costs of data transfer, and place prominent
notices in the distribution explaining this.
c. You must ensure that all modifications included in the
machine-executable forms are available under the terms of this
license.
5. You may use the original or modified versions of the Software to
compile, link and run application programs legally developed by you
or by others.
6. You may develop application programs, reusable components and other
software items that link with the original or modified versions of the
Software. These items, when distributed, are subject to the following
requirements:
a. You must ensure that all recipients of machine-executable forms of
these items are also able to receive and use the complete
machine-readable source code to the items without any charge
beyond the costs of data transfer.
b. You must explicitly license all recipients of your items to use
and re-distribute original and modified versions of the items in
both machine-executable and source code forms. The recipients must
be able to do so without any charges whatsoever, and they must be
able to re-distribute to anyone they choose.
c. If the items are not available to the general public, and the
initial developer of the Software requests a copy of the items,
then you must supply one.
Limitations of Liability
In no event shall the initial developers or copyright holders be liable
for any damages whatsoever, including - but not restricted to - lost
revenue or profits or other direct, indirect, special, incidental or
consequential damages, even if they have been advised of the possibility
of such damages, except to the extent invariable law, if any, provides
otherwise.
No Warranty
The Software and this license document are provided AS IS with NO WARRANTY
OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE.
===========================================================================
-60
View File
@@ -1,60 +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
EXTRA_LTLIBRARIES=libZend_cc.la libZend_c.la
noinst_LTLIBRARIES=$(ZEND_SCANNER) libZend.la
libZend_cc_la_SOURCES=zend_language_scanner_cc.cc zend_ini_scanner_cc.cc
libZend_c_la_SOURCES=zend_language_scanner.c zend_ini_scanner.c
libZend_la_SOURCES=\
zend_language_parser.y \
zend_ini_parser.y \
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
libZend_la_LIBADD = $(ZEND_SCANNER)
libZend_la_LDFLAGS = @EXTRA_LIBS@
libZend_la_DEPENDENCIES = $(ZEND_SCANNER)
# automake isn't too clever about "non-standard" use of lex and yacc
$(libZend_la_OBJECTS) zend_language_scanner.lo zend_language_scanner_cc.lo: zend_language_parser.h
zend_ini_scanner.lo zend_ini_scanner_cc.lo: zend_ini_parser.h
# Language parser/scanner rules
zend_language_scanner.c: $(srcdir)/zend_language_scanner.l
$(LEX) -Pzend -o$@ -i $(srcdir)/zend_language_scanner.l
zend_language_scanner_cc.cc: $(srcdir)/zend_language_scanner.l
$(LEX) -+ -B -i -S$(srcdir)/flex.skl -Pzend -o$@ $(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_ -o$@ -i $(srcdir)/zend_ini_scanner.l
zend_ini_scanner_cc.cc: $(srcdir)/zend_ini_scanner.l
$(LEX) -+ -B -i -S$(srcdir)/flex.skl -Pini_ -o$@ $(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) $(INCLUDES) $(CPPFLAGS) $(INLINE_CFLAGS) -c $(srcdir)/zend_execute.c
-112
View File
@@ -1,112 +0,0 @@
Improvements
------------
Zend 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.
Zend 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.
In Zend, 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.
* Boolean type. 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).
Incompatabilities
-----------------
Zend 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.
* return statement from a require()'d file no longer works. 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. It was never
documented as a function so the impact should be no bigger than
nada.
* 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 under Zend. 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 Zend.
-494
View File
@@ -1,494 +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_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_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_modules.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_operators.h
# End Source File
# Begin Source File
SOURCE=.\zend_ptr_stack.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=.\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
-222
View File
@@ -1,222 +0,0 @@
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| sed -e 's/^GNU Bison version //' -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])
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 \
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 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_SUBST(ZEND_SCANNER)
])
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,[ ])
ZEND_SCANNER_TYPE=cc
CPPFLAGS="$CPPFLAGS -I../TSRM"
LIBZEND_CPLUSPLUS_CHECKS
else
ZEND_SCANNER_TYPE=c
fi
ZEND_SCANNER="libZend_${ZEND_SCANNER_TYPE}.la"
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,[
dnl extra check to avoid C++ preprocessor testing if in non-ZTS mode
if test "$ZEND_EXPERIMENTAL_ZTS" = "yes"; then
AC_PROG_CXX
AC_PROG_CXXCPP
AC_LANG_CPLUSPLUS
AC_CHECK_HEADER(stdiostream.h, [ AC_DEFINE(HAVE_STDIOSTREAM_H, [], Whether you have stdiostream.h) ])
AC_CHECK_LIB(C, cin)
AC_CHECK_LIB(g++, cin)
AC_CHECK_LIB(stdc++, cin)
dnl Digital Unix 4.0
AC_CHECK_LIB(cxx, cin)
AC_CHECK_LIB(cxxstd, __array_delete)
AC_CACHE_CHECK(for class istdiostream,ac_cv_class_istdiostream,[
AC_TRY_COMPILE([
#include <sys/types.h>
#include <unistd.h>
#include <fstream.h>
#include <stdiostream.h>
],[
istdiostream *foo = new istdiostream((FILE *) 0);
],[
ac_cv_class_istdiostream=yes
],[
ac_cv_class_istdiostream=no
])
])
if test "$ac_cv_class_istdiostream" = "yes"; then
AC_DEFINE(HAVE_CLASS_ISTDIOSTREAM, 1, [Whether you have class istdiostream])
fi
AC_LANG_C
fi
])
-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
-645
View File
@@ -1,645 +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.cpp
# End Source File
# Begin Source File
SOURCE=".\zend_language_parser.c"
# End Source File
# Begin Source File
SOURCE=".\zend_language_scanner.cpp"
# 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_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_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_modules.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_operators.h
# End Source File
# Begin Source File
SOURCE=.\zend_ptr_stack.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=.\zend_ini_scanner.l
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
# Begin Custom Build
InputPath=.\zend_ini_scanner.l
"zend_ini_scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -+ -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.cpp zend_ini_scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
# Begin Custom Build
InputPath=.\zend_ini_scanner.l
"zend_ini_scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -+ -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.cpp 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.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -+ -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.cpp zend_ini_scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
# Begin Custom Build
InputPath=.\zend_ini_scanner.l
"zend_ini_scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -+ -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.cpp 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.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -+ -B -i -Sflex.skl -Pzend -ozend_language_scanner.cpp zend_language_scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
# Begin Custom Build
InputPath=".\zend_language_scanner.l"
"zend_language_scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -+ -B -i -Sflex.skl -Pzend -ozend_language_scanner.cpp 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.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -+ -B -i -Sflex.skl -Pzend -ozend_language_scanner.cpp zend_language_scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
# Begin Custom Build
InputPath=".\zend_language_scanner.l"
"zend_language_scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -+ -B -i -Sflex.skl -Pzend -ozend_language_scanner.cpp 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
EXTRA_LIBS="$LIBS"
LIBS=""
AC_SUBST(EXTRA_LIBS)
AC_OUTPUT(Makefile)
# Local Variables:
# tab-width: 4
# End:
-1541
View File
File diff suppressed because it is too large. Load diff
-789
View File
@@ -1,789 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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_function_table
# define GLOBAL_CLASS_TABLE global_class_table
# define GLOBAL_CONSTANTS_TABLE global_constants_table
#else
# define GLOBAL_FUNCTION_TABLE CG(function_table)
# define GLOBAL_CLASS_TABLE CG(class_table)
# define GLOBAL_CONSTANTS_TABLE CG(zend_constants)
#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;
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;
HashTable *global_function_table;
HashTable *global_class_table;
HashTable *global_constants_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-2001 Zend Technologies\n"
#define PRINT_ZVAL_INDENT 4
static void print_hash(HashTable *ht, int indent)
{
zval **tmp;
char *string_key;
HashPosition iterator;
unsigned long num_key, 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.len = sizeof("Object")-1;
expr_copy->value.str.val = estrndup("Object", expr_copy->value.str.len);
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:
if (++expr->value.obj.properties->nApplyCount>1) {
ZEND_PUTS(" *RECURSION*");
expr->value.obj.properties->nApplyCount=0;
return;
}
zend_printf("%s Object\n", expr->value.obj.ce->name);
print_hash(expr->value.obj.properties, indent);
expr->value.obj.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.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.function_table, 0, NULL, ZEND_FUNCTION_DTOR, 1, 0);
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 = (int *) malloc(sizeof(int));
*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(CLS_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)
{
zend_function tmp_func;
zend_class_entry tmp_class;
compiler_globals->compiled_filename = NULL;
compiler_globals->function_table = (HashTable *) malloc(sizeof(HashTable));
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 = (HashTable *) malloc(sizeof(HashTable));
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(CLS_C);
}
static void compiler_globals_dtor(zend_compiler_globals *compiler_globals)
{
if (compiler_globals->function_table != global_function_table) {
zend_hash_destroy(compiler_globals->function_table);
free(compiler_globals->function_table);
}
if (compiler_globals->class_table != global_class_table) {
zend_hash_destroy(compiler_globals->class_table);
free(compiler_globals->class_table);
}
}
static void executor_globals_ctor(zend_executor_globals *executor_globals)
{
if (global_constants_table) {
zend_startup_constants(ELS_C);
zend_copy_constants(executor_globals->zend_constants, global_constants_table);
}
zend_init_rsrc_plist(ELS_C);
EG(lambda_count)=0;
EG(user_error_handler) = NULL;
}
static void executor_globals_dtor(zend_executor_globals *executor_globals)
{
zend_shutdown_constants(ELS_C);
zend_destroy_rsrc_plist(ELS_C);
zend_ini_shutdown(ELS_C);
}
static void alloc_globals_ctor(zend_alloc_globals *alloc_globals)
{
start_memory_manager(ALS_C);
}
#endif
#ifdef __FreeBSD__
/* FreeBSD floating point precision fix */
#include <floatingpoint.h>
#endif
#ifdef ZTS
static void zend_new_thread_end_handler(THREAD_T thread_id)
{
ELS_FETCH();
zend_copy_ini_directives(ELS_C);
zend_ini_refresh_caches(ZEND_INI_STAGE_STARTUP ELS_CC);
}
#endif
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;
alloc_globals_id = ts_allocate_id(sizeof(zend_alloc_globals), (ts_allocate_ctor) alloc_globals_ctor, NULL);
#else
start_memory_manager(ALS_C);
#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;
GLOBAL_FUNCTION_TABLE = (HashTable *) malloc(sizeof(HashTable));
GLOBAL_CLASS_TABLE = (HashTable *) malloc(sizeof(HashTable));
zend_hash_init_ex(GLOBAL_FUNCTION_TABLE, 100, NULL, ZEND_FUNCTION_DTOR, 1, 0);
zend_hash_init_ex(GLOBAL_CLASS_TABLE, 10, NULL, ZEND_CLASS_DTOR, 1, 0);
register_standard_class();
zend_hash_init_ex(&module_registry, 50, NULL, ZEND_MODULE_DTOR, 1, 0);
zend_init_rsrc_list_dtors();
/* This zval can be used to initialize allocate zval's to an uninit'ed value */
zval_used_for_init.is_ref = 0;
zval_used_for_init.refcount = 1;
zval_used_for_init.type = IS_NULL;
#ifdef ZTS
global_constants_table = NULL;
compiler_globals_id = ts_allocate_id(sizeof(zend_compiler_globals), (void (*)(void *)) compiler_globals_ctor, (void (*)(void *)) compiler_globals_dtor);
executor_globals_id = ts_allocate_id(sizeof(zend_executor_globals), (void (*)(void *)) executor_globals_ctor, (void (*)(void *)) executor_globals_dtor);
compiler_globals = ts_resource(compiler_globals_id);
executor_globals = ts_resource(executor_globals_id);
compiler_globals_dtor(compiler_globals);
compiler_globals->function_table = GLOBAL_FUNCTION_TABLE;
compiler_globals->class_table = GLOBAL_CLASS_TABLE;
zend_startup_constants(executor_globals);
GLOBAL_CONSTANTS_TABLE = EG(zend_constants);
#else
zend_startup_constants();
zend_set_default_compile_time_values(CLS_C);
EG(user_error_handler) = NULL;
#endif
zend_register_standard_constants(ELS_C);
#ifndef ZTS
zend_init_rsrc_plist(ELS_C);
#endif
if (start_builtin_functions) {
zend_startup_builtin_functions();
}
zend_ini_startup(ELS_C);
#ifdef ZTS
tsrm_set_new_thread_end_handler(zend_new_thread_end_handler);
#endif
return SUCCESS;
}
void zend_shutdown()
{
#ifdef ZEND_WIN32
zend_shutdown_timeout_thread();
#endif
#ifndef ZTS
zend_destroy_rsrc_plist();
#endif
zend_destroy_rsrc_list_dtors();
zend_hash_destroy(&module_registry);
zend_hash_destroy(GLOBAL_FUNCTION_TABLE);
free(GLOBAL_FUNCTION_TABLE);
zend_hash_destroy(GLOBAL_CLASS_TABLE);
free(GLOBAL_CLASS_TABLE);
zend_shutdown_extensions();
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()
{
CLS_FETCH();
ELS_FETCH();
CG(unclean_shutdown) = 1;
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(CLS_D ELS_DC)
{
init_compiler(CLS_C ELS_CC);
init_executor(CLS_C ELS_CC);
startup_scanner(CLS_C);
}
void zend_activate_modules()
{
zend_hash_apply(&module_registry, (int (*)(void *)) module_registry_request_startup);
}
void zend_deactivate_modules()
{
ELS_FETCH();
EG(opline_ptr) = NULL; /* we're no longer executing anything */
if (setjmp(EG(bailout))==0) {
zend_hash_apply(&module_registry, (int (*)(void *)) module_registry_cleanup);
}
}
void zend_deactivate(CLS_D ELS_DC)
{
/* we're no longer executing anything */
EG(opline_ptr) = NULL;
EG(active_symbol_table) = NULL;
if (setjmp(EG(bailout))==0) {
shutdown_scanner(CLS_C);
}
if (setjmp(EG(bailout))==0) {
shutdown_executor(ELS_C);
}
if (setjmp(EG(bailout))==0) {
shutdown_compiler(CLS_C);
}
if (setjmp(EG(bailout))==0) {
zend_ini_deactivate(ELS_C);
}
}
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;
ELS_FETCH();
CLS_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()) {
error_filename = zend_get_compiled_filename(CLS_C);
error_lineno = zend_get_compiled_lineno(CLS_C);
} else if (zend_is_executing()) {
error_filename = zend_get_executed_filename(ELS_C);
error_lineno = zend_get_executed_lineno(ELS_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)==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);
}
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 CLS_DC ELS_DC, int file_count, ...)
{
va_list files;
int i;
zend_file_handle *file_handle;
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 CLS_CC);
zend_destroy_file_handle(file_handle CLS_CC);
if (EG(active_op_array)) {
zend_execute(EG(active_op_array) ELS_CC);
zval_ptr_dtor(EG(return_value_ptr_ptr));
EG(return_value_ptr_ptr) = &EG(global_return_value_ptr);
EG(global_return_value_ptr) = NULL;
destroy_op_array(EG(active_op_array));
efree(EG(active_op_array));
} else if (type==ZEND_REQUIRE) {
va_end(files);
return FAILURE;
}
}
va_end(files);
return SUCCESS;
}
#define COMPILED_STRING_DESCRIPTION_FORMAT "%s(%d) : %s"
ZEND_API char *zend_make_compiled_string_description(char *name)
{
char *cur_filename;
int cur_lineno;
char *compiled_string_description;
CLS_FETCH();
ELS_FETCH();
if (zend_is_compiling()) {
cur_filename = zend_get_compiled_filename(CLS_C);
cur_lineno = zend_get_compiled_lineno(CLS_C);
} else if (zend_is_executing()) {
cur_filename = zend_get_executed_filename(ELS_C);
cur_lineno = zend_get_executed_lineno(ELS_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);
}
-463
View File
@@ -1,463 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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_H
#define ZEND_H
#define ZEND_VERSION "1.0.5"
#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 ';'
#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
# define DL_FETCH_SYMBOL dlsym
# define DL_HANDLE void *
# define ZEND_EXTENSIONS_SUPPORT 1
#elif defined(ZEND_WIN32)
# define DL_LOAD(libname) LoadLibrary(libname)
# define DL_FETCH_SYMBOL GetProcAddress
# define DL_UNLOAD FreeLibrary
# define DL_HANDLE HMODULE
# define ZEND_EXTENSIONS_SUPPORT 1
#else
# define DL_HANDLE void *
# define ZEND_EXTENSIONS_SUPPORT 0
#endif
#if HAVE_ALLOCA_H
# include <alloca.h>
#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;
#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 ELS_DC
#define INTERNAL_FUNCTION_PARAM_PASSTHRU ht, return_value, this_ptr, return_value_used ELS_CC
/*
* zval
*/
typedef struct _zval_struct zval;
typedef struct _zend_class_entry zend_class_entry;
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;
} 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
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;
zend_function_entry *builtin_functions;
/* handlers */
void (*handle_function_call)(INTERNAL_FUNCTION_PARAMETERS, zend_property_reference *property_reference);
zval (*handle_property_get)(zend_property_reference *property_reference);
int (*handle_property_set)(zend_property_reference *property_reference, zval *value);
};
typedef struct _zend_utility_functions {
void (*error_function)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
int (*printf_function)(const char *format, ...);
int (*write_function)(const char *str, uint str_length);
FILE *(*fopen_function)(const char *filename, char **opened_path);
void (*message_handler)(long message, void *data);
void (*block_interruptions)(void);
void (*unblock_interruptions)(void);
int (*get_configuration_directive)(char *name, uint name_length, zval *contents);
void (*ticks_function)(int ticks);
} 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 */
/* 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(void);
void zend_set_utility_values(zend_utility_values *utility_values);
BEGIN_EXTERN_C()
ZEND_API void zend_bailout(void);
END_EXTERN_C()
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);
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

-1006
View File
File diff suppressed because it is too large. Load diff
-459
View File
@@ -1,459 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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_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) zend_if_##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_MINIT(module) zend_minit_##module
#define ZEND_MSHUTDOWN(module) zend_mshutdown_##module
#define ZEND_RINIT(module) zend_rinit_##module
#define ZEND_RSHUTDOWN(module) zend_rshutdown_##module
#define ZEND_MINFO(module) zend_info_##module
#define ZEND_GINIT(module) zend_ginit_##module
#define ZEND_GSHUTDOWN(module) zend_gshutdown_##module
#define ZEND_MINIT_FUNCTION(module) int ZEND_MINIT(module)(INIT_FUNC_ARGS)
#define ZEND_MSHUTDOWN_FUNCTION(module) int ZEND_MSHUTDOWN(module)(SHUTDOWN_FUNC_ARGS)
#define ZEND_RINIT_FUNCTION(module) int ZEND_RINIT(module)(INIT_FUNC_ARGS)
#define ZEND_RSHUTDOWN_FUNCTION(module) int ZEND_RSHUTDOWN(module)(SHUTDOWN_FUNC_ARGS)
#define ZEND_MINFO_FUNCTION(module) void ZEND_MINFO(module)(ZEND_MODULE_INFO_FUNC_ARGS)
#define ZEND_GINIT_FUNCTION(module) int ZEND_GINIT(module)(GINIT_FUNC_ARGS)
#define ZEND_GSHUTDOWN_FUNCTION(module) int ZEND_GSHUTDOWN(module)(void)
#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) \
static ts_rsrc_id module_name##_globals_id;
#define ZEND_INIT_MODULE_GLOBALS(module_name, globals_ctor, globals_dtor) \
module_name##_globals_id = ts_allocate_id(sizeof(zend_##module_name##_globals), (ts_allocate_ctor) globals_ctor, (ts_allocate_dtor) globals_dtor);
#else
#define ZEND_DECLARE_MODULE_GLOBALS(module_name) \
static 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.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.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);
ZEND_API int zend_get_parameters_ex(int param_count, ...);
ZEND_API int zend_get_parameters_array_ex(int param_count, zval ***argument_array);
ZEND_API int ParameterPassedByReference(int ht, uint n);
int zend_register_functions(zend_function_entry *functions, HashTable *function_table, int type);
void zend_unregister_functions(zend_function_entry *functions, int count, HashTable *function_table);
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);
ZEND_API zend_class_entry *zend_register_internal_class_ex(zend_class_entry *class_entry, zend_class_entry *parent_ce, char *parent_name);
ZEND_API zend_module_entry *zend_get_module(int module_number);
ZEND_API int zend_disable_function(char *function_name, uint function_name_length);
ZEND_API void wrong_param_count(void);
ZEND_API zend_bool zend_is_callable(zval *callable, zend_bool syntax_only, char **callable_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() { wrong_param_count(); return; }
#define ZEND_WRONG_PARAM_COUNT_WITH_RETVAL(ret) { wrong_param_count(); 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)
#define object_init_ex(arg, ce) _object_init_ex((arg), (ce) ZEND_FILE_LINE_CC)
ZEND_API int _array_init(zval *arg ZEND_FILE_LINE_DC);
ZEND_API int _object_init(zval *arg ZEND_FILE_LINE_DC);
ZEND_API int _object_init_ex(zval *arg, zend_class_entry *ce ZEND_FILE_LINE_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[]);
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);
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))
#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)->value.lval = 0; (z)->type = IS_BOOL; }
#define ZVAL_TRUE { (z)->value.lval = 1; (z)->type = IS_BOOL; }
#define RETVAL_RESOURCE(l) { \
return_value->type = IS_RESOURCE;\
return_value->value.lval = l; \
}
#define RETVAL_BOOL(b) { \
return_value->type = IS_BOOL; \
return_value->value.lval = b; \
}
#define RETVAL_NULL() { \
return_value->type = IS_NULL; \
}
#define RETVAL_LONG(l) { \
return_value->type = IS_LONG; \
return_value->value.lval = l; \
}
#define RETVAL_DOUBLE(d) { \
return_value->type = IS_DOUBLE; \
return_value->value.dval = d; \
}
#define RETVAL_STRING(s,duplicate) { \
char *__s=(s); \
return_value->value.str.len = strlen(__s); \
return_value->value.str.val = (duplicate?estrndup(__s,return_value->value.str.len):__s); \
return_value->type = IS_STRING; \
}
#define RETVAL_STRINGL(s,l,duplicate) { \
char *__s=(s); int __l=l; \
return_value->value.str.len = __l; \
return_value->value.str.val = (duplicate?estrndup(__s,__l):__s); \
return_value->type = IS_STRING; \
}
#define RETVAL_EMPTY_STRING() { \
return_value->value.str.len = 0; \
return_value->value.str.val = empty_string; \
return_value->type = IS_STRING; \
}
#define RETVAL_FALSE { return_value->value.lval = 0; return_value->type = IS_BOOL; }
#define RETVAL_TRUE { return_value->value.lval = 1; return_value->type = IS_BOOL; }
#define RETURN_RESOURCE(l) { \
return_value->type = IS_RESOURCE;\
return_value->value.lval = l; \
return; \
}
#define RETURN_BOOL(b) { \
return_value->type = IS_BOOL; \
return_value->value.lval = b; \
return; \
}
#define RETURN_NULL() { \
return_value->type = IS_NULL; \
return; \
}
#define RETURN_LONG(l) { \
return_value->type = IS_LONG; \
return_value->value.lval = l; \
return; \
}
#define RETURN_DOUBLE(d) { \
return_value->type = IS_DOUBLE; \
return_value->value.dval = d; \
return; \
}
#define RETURN_STRING(s,duplicate) { \
char *__s=(s); \
return_value->value.str.len = strlen(__s); \
return_value->value.str.val = (duplicate?estrndup(__s,return_value->value.str.len):__s); \
return_value->type = IS_STRING; \
return; \
}
#define RETURN_STRINGL(s,l,duplicate) { \
char *__s=(s); int __l=l; \
return_value->value.str.len = __l; \
return_value->value.str.val = (duplicate?estrndup(__s,__l):__s); \
return_value->type = IS_STRING; \
return; \
}
#define RETURN_EMPTY_STRING() { \
return_value->value.str.len = 0; \
return_value->value.str.val = empty_string; \
return_value->type = IS_STRING; \
return; \
}
#define RETURN_FALSE { RETVAL_FALSE; return; }
#define RETURN_TRUE { RETVAL_TRUE; return; }
#define SET_VAR_STRING(n,v) { \
{ \
zval *var; \
char *str=(v); /* prevent 'v' from being evaluated more than once */ \
\
ALLOC_ZVAL(var); \
var->value.str.val = (str); \
var->value.str.len = strlen((str)); \
var->type = IS_STRING; \
ZEND_SET_GLOBAL_VAR(n, var); \
} \
}
#define SET_VAR_STRINGL(n,v,l) { \
{ \
zval *var; \
\
ALLOC_ZVAL(var); \
var->value.str.val = (v); \
var->value.str.len = (l); \
var->type = IS_STRING; \
ZEND_SET_GLOBAL_VAR(n, var); \
} \
}
#define SET_VAR_LONG(n,v) { \
{ \
zval *var; \
\
ALLOC_ZVAL(var); \
var->value.lval = (v); \
var->type = IS_LONG; \
ZEND_SET_GLOBAL_VAR(n, var); \
} \
}
#define SET_VAR_DOUBLE(n,v) { \
{ \
zval *var; \
\
ALLOC_ZVAL(var); \
var->value.dval = (v); \
var->type = IS_DOUBLE; \
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 ? (p)->value.obj.properties : NULL)))
#define ZVAL_IS_NULL(z) ((z)->type==IS_NULL)
#endif /* ZEND_API_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
-721
View File
@@ -1,721 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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
#if ZEND_DEBUG
# define END_MAGIC_SIZE sizeof(long)
# define END_ALIGNMENT(size) (((size)%PLATFORM_ALIGNMENT)?(PLATFORM_ALIGNMENT-((size)%PLATFORM_ALIGNMENT)):0)
#else
# define END_MAGIC_SIZE 0
# define END_ALIGNMENT(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
ALS_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]++;
#endif
p->persistent = 0;
p->cached = 0;
p->size = size;
HANDLE_BLOCK_INTERRUPTIONS();
ADD_POINTER_TO_LIST(p);
HANDLE_UNBLOCK_INTERRUPTIONS();
return (void *)((char *)p + sizeof(zend_mem_header) + PLATFORM_PADDING);
} else {
#if ZEND_DEBUG
if (CACHE_INDEX<MAX_CACHED_MEMORY) {
AG(cache_stats)[CACHE_INDEX][0]++;
}
#endif
p = (zend_mem_header *) malloc(sizeof(zend_mem_header) + SIZE + PLATFORM_PADDING + END_ALIGNMENT(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
*((long *)(((char *) p) + sizeof(zend_mem_header)+SIZE+PLATFORM_PADDING+END_ALIGNMENT(SIZE))) = MEM_BLOCK_END_MAGIC;
#endif
#if MEMORY_LIMIT
CHECK_MEMORY_LIMIT(size, SIZE);
#endif
HANDLE_UNBLOCK_INTERRUPTIONS();
return (void *)((char *)p + sizeof(zend_mem_header) + PLATFORM_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) - PLATFORM_PADDING);
DECLARE_CACHE_VARS
ALS_FETCH();
#if defined(ZTS) && ZEND_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, 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
HANDLE_BLOCK_INTERRUPTIONS();
REMOVE_POINTER_FROM_LIST(p);
HANDLE_UNBLOCK_INTERRUPTIONS();
return;
}
HANDLE_BLOCK_INTERRUPTIONS();
REMOVE_POINTER_FROM_LIST(p);
#if MEMORY_LIMIT
AG(allocated_memory) -= SIZE;
#endif
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,(int)NULL, 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 *) ((char *)ptr-sizeof(zend_mem_header)-PLATFORM_PADDING);
zend_mem_header *orig = p;
DECLARE_CACHE_VARS
ALS_FETCH();
if (!ptr) {
return _emalloc(size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
}
#if defined(ZTS) && ZEND_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 *) realloc(p,sizeof(zend_mem_header)+SIZE+PLATFORM_PADDING+END_ALIGNMENT(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;
*((long *)(((char *) p) + sizeof(zend_mem_header)+SIZE+PLATFORM_PADDING+END_ALIGNMENT(SIZE))) = MEM_BLOCK_END_MAGIC;
#endif
#if MEMORY_LIMIT
CHECK_MEMORY_LIMIT(size - p->size, SIZE - REAL_SIZE(p->size));
#endif
p->size = size;
HANDLE_UNBLOCK_INTERRUPTIONS();
return (void *)((char *)p+sizeof(zend_mem_header)+PLATFORM_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
ALS_FETCH();
AG(memory_limit) = memory_limit;
return SUCCESS;
#else
return FAILURE;
#endif
}
ZEND_API void start_memory_manager(ALS_D)
{
#ifndef ZTS
int i, j;
void *cached_entries[MAX_CACHED_MEMORY][MAX_CACHED_ENTRIES];
#endif
AG(phead) = AG(head) = NULL;
#if MEMORY_LIMIT
AG(memory_limit)=1<<30; /* rediculous limit, effectively no limit */
AG(allocated_memory)=0;
AG(memory_exhausted)=0;
#endif
memset(AG(fast_cache_list_head), 0, sizeof(AG(fast_cache_list_head)));
memset(AG(cache_count),0,sizeof(AG(cache_count)));
#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
#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)
{
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;
ALS_FETCH();
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;
}
p=AG(head);
t=AG(head);
while (t) {
if (!t->cached || clean_cache) {
#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);
free(t);
t = p;
} else {
t = t->pNext;
}
}
if(clean_cache) {
for (i=1; i<MAX_CACHED_MEMORY; i++) {
for (j=0; j<AG(cache_count)[i]; j++) {
free(AG(cache)[i][j]);
}
}
}
#if MEMORY_LIMIT
AG(memory_exhausted)=0;
#endif
#if (ZEND_DEBUG)
do {
zval display_memory_cache_stats;
int i, j;
if (clean_cache) {
/* we're shutting down completely, don't even touch the INI subsystem */
break;
}
if (zend_get_configuration_directive("display_memory_cache_stats", sizeof("display_memory_cache_stats"), &display_memory_cache_stats)==FAILURE) {
break;
}
if (!atoi(display_memory_cache_stats.value.str.val)) {
break;
}
fprintf(stderr, "Memory cache statistics\n"
"-----------------------\n\n"
"[zval, %2ld]\t\t%d / %d (%.2f%%)\n"
"[hash, %2ld]\t\t%d / %d (%.2f%%)\n",
(long) sizeof(zval),
AG(fast_cache_stats)[ZVAL_CACHE_LIST][1], AG(fast_cache_stats)[ZVAL_CACHE_LIST][0]+AG(fast_cache_stats)[ZVAL_CACHE_LIST][1],
((double) AG(fast_cache_stats)[ZVAL_CACHE_LIST][1] / (AG(fast_cache_stats)[ZVAL_CACHE_LIST][0]+AG(fast_cache_stats)[ZVAL_CACHE_LIST][1]))*100,
(long) sizeof(HashTable),
AG(fast_cache_stats)[HASHTABLE_CACHE_LIST][1], AG(fast_cache_stats)[HASHTABLE_CACHE_LIST][0]+AG(fast_cache_stats)[HASHTABLE_CACHE_LIST][1],
((double) AG(fast_cache_stats)[HASHTABLE_CACHE_LIST][1] / (AG(fast_cache_stats)[HASHTABLE_CACHE_LIST][0]+AG(fast_cache_stats)[HASHTABLE_CACHE_LIST][1]))*100);
for (i=0; i<MAX_CACHED_MEMORY; i+=2) {
fprintf(stderr, "[%2d, %2d]\t\t", i, i+1);
for (j=0; j<2; j++) {
fprintf(stderr, "%d / %d (%.2f%%)\t\t",
AG(cache_stats)[i+j][1], AG(cache_stats)[i+j][0]+AG(cache_stats)[i+j][1],
((double) AG(cache_stats)[i+j][1] / (AG(cache_stats)[i+j][0]+AG(cache_stats)[i+j][1]))*100);
}
fprintf(stderr, "\n");
}
} while (0);
#endif
}
#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) - PLATFORM_PADDING);
int no_cache_notice=0;
int valid_beginning=1;
int had_problems=0;
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;
}
if (valid_beginning
&& *((long *)(((char *) p)+sizeof(zend_mem_header)+REAL_SIZE(p->size)+PLATFORM_PADDING+END_ALIGNMENT(REAL_SIZE(p->size)))) != MEM_BLOCK_END_MAGIC) {
long magic_num = MEM_BLOCK_END_MAGIC;
char *overflow_ptr, *magic_ptr=(char *) &magic_num;
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 *) p)+sizeof(zend_mem_header)+REAL_SIZE(p->size)+PLATFORM_PADDING;
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",
*((long *)(((char *) p) + sizeof(zend_mem_header)+REAL_SIZE(p->size)+PLATFORM_PADDING+END_ALIGNMENT(REAL_SIZE(p->size)))), 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;
ALS_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) + PLATFORM_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)-PLATFORM_PADDING);
ALS_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)+PLATFORM_PADDING;
}
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
-144
View File
@@ -1,144 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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>
#ifdef ZTS
#include "../TSRM/TSRM.h"
#endif
#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 PLATFORM_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(ALS_D);
ZEND_API void shutdown_memory_manager(int silent, int clean_cache);
#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-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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(void);
#endif /* ZEND_BUILTIN_FUNCTIONS_H */
-2354
View File
File diff suppressed because it is too large. Load diff
-634
View File
@@ -1,634 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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
#ifdef __cplusplus
#include <iostream.h>
#endif
#include "zend_llist.h"
#define DEBUG_ZEND 0
#ifndef ZTS
# define SUPPORT_INTERACTIVE 1
#else
# define SUPPORT_INTERACTIVE 0
#endif
#define FREE_PNODE(znode) zval_dtor(&znode->u.constant);
#define FREE_OP(op, should_free) if (should_free) zval_dtor(&Ts[(op)->u.var].tmp_var);
#define SET_UNUSED(op) (op).op_type = IS_UNUSED
#if SUPPORT_INTERACTIVE
#define INC_BPC(op_array) ((op_array)->backpatch_count++)
#define DEC_BPC(op_array) ((op_array)->backpatch_count--)
#define HANDLE_INTERACTIVE() if (EG(interactive)) { execute_new_code(CLS_C); }
#else
#define INC_BPC(op_array)
#define DEC_BPC(op_array)
#define HANDLE_INTERACTIVE()
#endif
typedef struct _zend_op_array zend_op_array;
typedef struct _znode {
int op_type;
union {
zval constant;
zend_uint var;
zend_uint opline_num; /* Needs to be signed */
zend_uint fetch_type;
zend_op_array *op_array;
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_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;
zend_bool uses_globals;
/* static variables support */
HashTable *static_variables;
#if SUPPORT_INTERACTIVE
int start_op_number, end_op_number;
int last_executed_op_number;
int backpatch_count;
#endif
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 */
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_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;
} 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;
#ifdef __cplusplus
istream *is;
#endif
} 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(CLS_D ELS_DC);
void shutdown_compiler(CLS_D);
extern ZEND_API zend_op_array *(*zend_compile_file)(zend_file_handle *file_handle, int type CLS_DC);
void zend_activate(CLS_D ELS_DC);
void zend_deactivate(CLS_D ELS_DC);
void zend_activate_modules(void);
void zend_deactivate_modules(void);
int lex_scan(zval *zendlval CLS_DC);
void startup_scanner(CLS_D);
void shutdown_scanner(CLS_D);
ZEND_API char *zend_set_compiled_filename(char *new_compiled_filename);
ZEND_API void zend_restore_compiled_filename(char *original_compiled_filename);
ZEND_API char *zend_get_compiled_filename(CLS_D);
ZEND_API int zend_get_compiled_lineno(CLS_D);
#ifdef ZTS
const char *zend_get_zendtext(CLS_D);
int zend_get_zendleng(CLS_D);
#endif
/* parser-driven code generators */
void zend_do_binary_op(int op, znode *result, znode *op1, znode *op2 CLS_DC);
void zend_do_unary_op(int op, znode *result, znode *op1 CLS_DC);
void zend_do_binary_assign_op(int op, znode *result, znode *op1, znode *op2 CLS_DC);
void zend_do_assign(znode *result, znode *variable, znode *value CLS_DC);
void zend_do_assign_ref(znode *result, znode *lvar, znode *rvar CLS_DC);
void fetch_simple_variable(znode *result, znode *varname, int bp CLS_DC);
void fetch_simple_variable_ex(znode *result, znode *varname, int bp, int op CLS_DC);
void zend_do_indirect_references(znode *result, znode *num_references, znode *variable CLS_DC);
void zend_do_fetch_global_or_static_variable(znode *varname, znode *static_assignment, int fetch_type CLS_DC);
void zend_do_fetch_globals(znode *varname CLS_DC);
void fetch_array_begin(znode *result, znode *varname, znode *first_dim CLS_DC);
void fetch_array_dim(znode *result, znode *parent, znode *dim CLS_DC);
void fetch_string_offset(znode *result, znode *parent, znode *offset CLS_DC);
void zend_do_print(znode *result, znode *arg CLS_DC);
void zend_do_echo(znode *arg CLS_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 CLS_DC);
void zend_do_while_end(znode *while_token, znode *close_bracket_token CLS_DC);
void zend_do_do_while_begin(CLS_D);
void zend_do_do_while_end(znode *do_token, znode *expr_open_bracket, znode *expr CLS_DC);
void zend_do_if_cond(znode *cond, znode *closing_bracket_token CLS_DC);
void zend_do_if_after_statement(znode *closing_bracket_token, unsigned char initialize CLS_DC);
void zend_do_if_end(CLS_D);
void zend_do_for_cond(znode *expr, znode *second_semicolon_token CLS_DC);
void zend_do_for_before_statement(znode *cond_start, znode *second_semicolon_token CLS_DC);
void zend_do_for_end(znode *second_semicolon_token CLS_DC);
void zend_do_pre_incdec(znode *result, znode *op1, int op CLS_DC);
void zend_do_post_incdec(znode *result, znode *op1, int op CLS_DC);
void zend_do_begin_variable_parse(CLS_D);
void zend_do_end_variable_parse(int type, int arg_offset CLS_DC);
void zend_do_free(znode *op1 CLS_DC);
void zend_do_init_string(znode *result CLS_DC);
void zend_do_add_char(znode *result, znode *op1, znode *op2 CLS_DC);
void zend_do_add_string(znode *result, znode *op1, znode *op2 CLS_DC);
void zend_do_add_variable(znode *result, znode *op1, znode *op2 CLS_DC);
void zend_do_begin_function_declaration(znode *function_token, znode *function_name, int is_method, int return_reference CLS_DC);
void zend_do_end_function_declaration(znode *function_token CLS_DC);
void zend_do_receive_arg(int op, znode *var, znode *offset, znode *initialization, unsigned char pass_type CLS_DC);
int zend_do_begin_function_call(znode *function_name CLS_DC);
void zend_do_begin_dynamic_function_call(znode *function_name CLS_DC);
void zend_do_begin_class_member_function_call(znode *class_name, znode *function_name CLS_DC);
void zend_do_end_function_call(znode *function_name, znode *result, znode *argument_list, int is_method, int is_dynamic_fcall CLS_DC);
void zend_do_return(znode *expr, int do_end_vparse CLS_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(CLS_D);
void zend_do_pass_param(znode *param, int op, int offset CLS_DC);
void zend_do_boolean_or_begin(znode *expr1, znode *op_token CLS_DC);
void zend_do_boolean_or_end(znode *result, znode *expr1, znode *expr2, znode *op_token CLS_DC);
void zend_do_boolean_and_begin(znode *expr1, znode *op_token CLS_DC);
void zend_do_boolean_and_end(znode *result, znode *expr1, znode *expr2, znode *op_token CLS_DC);
void zend_do_brk_cont(int op, znode *expr CLS_DC);
void zend_do_switch_cond(znode *cond CLS_DC);
void zend_do_switch_end(znode *case_list CLS_DC);
void zend_do_case_before_statement(znode *case_list, znode *case_token, znode *case_expr CLS_DC);
void zend_do_case_after_statement(znode *result, znode *case_token CLS_DC);
void zend_do_default_before_statement(znode *case_list, znode *default_token CLS_DC);
void zend_do_begin_class_declaration(znode *class_name, znode *parent_class_name CLS_DC);
void zend_do_end_class_declaration(CLS_D);
void zend_do_declare_property(znode *var_name, znode *value CLS_DC);
void zend_do_fetch_property(znode *result, znode *object, znode *property CLS_DC);
void zend_do_push_object(znode *object CLS_DC);
void zend_do_pop_object(znode *object CLS_DC);
void zend_do_begin_new_object(znode *new_token, znode *class_name CLS_DC);
void zend_do_end_new_object(znode *result, znode *class_name, znode *new_token, znode *argument_list CLS_DC);
void zend_do_fetch_constant(znode *result, znode *constant_name, int mode CLS_DC);
void zend_do_shell_exec(znode *result, znode *cmd CLS_DC);
void zend_do_init_array(znode *result, znode *expr, znode *offset, int is_ref CLS_DC);
void zend_do_add_array_element(znode *result, znode *expr, znode *offset, int is_ref CLS_DC);
void zend_do_add_static_array_element(znode *result, znode *offset, znode *expr);
void zend_do_list_init(CLS_D);
void zend_do_list_end(znode *result, znode *expr CLS_DC);
void zend_do_add_list_element(znode *element CLS_DC);
void zend_do_new_list_begin(CLS_D);
void zend_do_new_list_end(CLS_D);
void zend_do_cast(znode *result, znode *expr, int type CLS_DC);
void zend_do_include_or_eval(int type, znode *result, znode *op1 CLS_DC);
void zend_do_unset(znode *variable CLS_DC);
void zend_do_isset_or_isempty(int type, znode *result, znode *variable CLS_DC);
void zend_do_foreach_begin(znode *foreach_token, znode *array, znode *open_brackets_token, znode *as_token, int variable CLS_DC);
void zend_do_foreach_cont(znode *value, znode *key, znode *as_token CLS_DC);
void zend_do_foreach_end(znode *foreach_token, znode *open_brackets_token CLS_DC);
void zend_do_declare_begin(CLS_D);
void zend_do_declare_stmt(znode *var, znode *val CLS_DC);
void zend_do_declare_end(CLS_D);
void zend_do_end_heredoc(CLS_D);
void zend_do_exit(znode *result, znode *message CLS_DC);
void zend_do_begin_silence(znode *strudel_token CLS_DC);
void zend_do_end_silence(znode *strudel_token CLS_DC);
void zend_do_begin_qm_op(znode *cond, znode *qm_token CLS_DC);
void zend_do_qm_true(znode *true_value, znode *qm_token, znode *colon_token CLS_DC);
void zend_do_qm_false(znode *result, znode *false_value, znode *qm_token, znode *colon_token CLS_DC);
void zend_do_extended_info(CLS_D);
void zend_do_extended_fcall_begin(CLS_D);
void zend_do_extended_fcall_end(CLS_D);
void zend_do_ticks(CLS_D);
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 CLS_DC);
ZEND_API zend_op_array *compile_string(zval *source_string, char *filename CLS_DC);
ZEND_API zend_op_array *compile_filename(int type, zval *filename CLS_DC ELS_DC);
ZEND_API int zend_execute_scripts(int type CLS_DC ELS_DC, int file_count, ...);
ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC);
ZEND_API void init_op_array(zend_op_array *op_array, int type, int initial_ops_size CLS_DC);
ZEND_API void destroy_op_array(zend_op_array *op_array);
ZEND_API void zend_destroy_file_handle(zend_file_handle *file_handle CLS_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 *ce);
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 CLS_DC);
void init_op(zend_op *op CLS_DC);
int get_next_op_number(zend_op_array *op_array);
int print_class(zend_class_entry *class_entry);
void print_op_array(zend_op_array *op_array, int optimizations);
int pass_two(zend_op_array *op_array);
zend_brk_cont_element *get_next_brk_cont_element(zend_op_array *op_array);
ZEND_API zend_bool zend_is_compiling(void);
ZEND_API char *zend_make_compiled_string_description(char *name);
int zendlex(znode *zendlval CLS_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_ISSET_ISEMPTY 76
#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
/* end of block */
/* global/local fetches */
#define ZEND_FETCH_GLOBAL 0
#define ZEND_FETCH_LOCAL 1
#define ZEND_FETCH_STATIC 2
/* 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_CTOR_CALL 1<<1
#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 */
-86
View File
@@ -1,86 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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_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 */
-267
View File
@@ -1,267 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include "zend.h"
#include "zend_constants.h"
#include "zend_variables.h"
#include "zend_operators.h"
#include "zend_globals.h"
void free_zend_constant(zend_constant *c)
{
if (!(c->flags & CONST_PERSISTENT)) {
zval_dtor(&c->value);
}
free(c->name);
}
void copy_zend_constant(zend_constant *c)
{
c->name = zend_strndup(c->name, c->name_len);
if (!(c->flags & CONST_PERSISTENT)) {
zval_copy_ctor(&c->value);
}
}
void zend_copy_constants(HashTable *target, HashTable *source)
{
zend_constant tmp_constant;
zend_hash_copy(target, source, (copy_ctor_func_t) copy_zend_constant, &tmp_constant, sizeof(zend_constant));
}
static int clean_non_persistent_constant(zend_constant *c)
{
if (c->flags & CONST_PERSISTENT) {
return 0;
} else {
return 1;
}
}
static int clean_module_constant(zend_constant *c, int *module_number)
{
if (c->module_number == *module_number) {
return 1;
} else {
return 0;
}
}
void clean_module_constants(int module_number)
{
ELS_FETCH();
zend_hash_apply_with_argument(EG(zend_constants), (int (*)(void *,void *)) clean_module_constant, (void *) &module_number);
}
int zend_startup_constants(ELS_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) = (HashTable *) malloc(sizeof(HashTable));
if (zend_hash_init(EG(zend_constants), 20, NULL, ZEND_CONSTANT_DTOR, 1)==FAILURE) {
return FAILURE;
}
return SUCCESS;
}
void zend_register_standard_constants(ELS_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 ELS_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 ELS_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 ELS_CC);
c.name = zend_strndup(ZEND_STRL("NULL"));
c.name_len = sizeof("NULL");
c.value.type = IS_NULL;
zend_register_constant(&c ELS_CC);
}
}
int zend_shutdown_constants(ELS_D)
{
zend_hash_destroy(EG(zend_constants));
free(EG(zend_constants));
return SUCCESS;
}
void clean_non_persistent_constants(void)
{
ELS_FETCH();
zend_hash_apply(EG(zend_constants), (int (*)(void *)) clean_non_persistent_constant);
}
ZEND_API void zend_register_long_constant(char *name, uint name_len, long lval, int flags, int module_number ELS_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 ELS_CC);
}
ZEND_API void zend_register_double_constant(char *name, uint name_len, double dval, int flags, int module_number ELS_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 ELS_CC);
}
ZEND_API void zend_register_stringl_constant(char *name, uint name_len, char *strval, uint strlen, int flags, int module_number ELS_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 ELS_CC);
}
ZEND_API void zend_register_string_constant(char *name, uint name_len, char *strval, int flags, int module_number ELS_DC)
{
zend_register_stringl_constant(name, name_len, strval, strlen(strval), flags, module_number ELS_CC);
}
ZEND_API int zend_get_constant(char *name, uint name_len, zval *result)
{
zend_constant *c;
char *lookup_name = estrndup(name,name_len);
int retval;
ELS_FETCH();
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;
}
efree(lookup_name);
return retval;
}
ZEND_API int zend_register_constant(zend_constant *c ELS_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) {
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:
*/
-64
View File
@@ -1,64 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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 0x1 /* Case Sensitive */
#define CONST_PERSISTENT 0x2
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 ELS_CC)
#define REGISTER_DOUBLE_CONSTANT(name,dval,flags) zend_register_double_constant((name),sizeof(name),(dval),(flags),module_number ELS_CC)
#define REGISTER_STRING_CONSTANT(name,str,flags) zend_register_string_constant((name),sizeof(name),(str),(flags),module_number ELS_CC)
#define REGISTER_STRINGL_CONSTANT(name,str,len,flags) zend_register_stringl_constant((name),sizeof(name),(str),(len),(flags),module_number ELS_CC)
#define REGISTER_MAIN_LONG_CONSTANT(name,lval,flags) zend_register_long_constant((name),sizeof(name),(lval),(flags),0 ELS_CC)
#define REGISTER_MAIN_DOUBLE_CONSTANT(name,dval,flags) zend_register_double_constant((name),sizeof(name),(dval),(flags),0 ELS_CC)
#define REGISTER_MAIN_STRING_CONSTANT(name,str,flags) zend_register_string_constant((name),sizeof(name),(str),(flags),0 ELS_CC)
#define REGISTER_MAIN_STRINGL_CONSTANT(name,str,len,flags) zend_register_stringl_constant((name),sizeof(name),(str),(len),(flags),0 ELS_CC)
void clean_module_constants(int module_number);
void free_zend_constant(zend_constant *c);
int zend_startup_constants(ELS_D);
int zend_shutdown_constants(ELS_D);
void zend_register_standard_constants(ELS_D);
void clean_non_persistent_constants(void);
ZEND_API int zend_get_constant(char *name, uint name_len, zval *result);
ZEND_API void zend_register_long_constant(char *name, uint name_len, long lval, int flags, int module_number ELS_DC);
ZEND_API void zend_register_double_constant(char *name, uint name_len, double dval, int flags, int module_number ELS_DC);
ZEND_API void zend_register_string_constant(char *name, uint name_len, char *strval, int flags, int module_number ELS_DC);
ZEND_API void zend_register_stringl_constant(char *name, uint name_len, char *strval, uint strlen, int flags, int module_number ELS_DC);
ZEND_API int zend_register_constant(zend_constant *c ELS_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-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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 */
-2350
View File
File diff suppressed because it is too large. Load diff
-213
View File
@@ -1,213 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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_execute_locks.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;
} EA;
} temp_variable;
ZEND_API extern void (*zend_execute)(zend_op_array *op_array ELS_DC);
void init_executor(CLS_D ELS_DC);
void shutdown_executor(ELS_D);
void execute(zend_op_array *op_array ELS_DC);
ZEND_API int zend_is_true(zval *op);
static inline void safe_free_zval_ptr(zval *p)
{
ELS_FETCH();
if (p!=EG(uninitialized_zval_ptr)) {
FREE_ZVAL(p);
}
}
ZEND_API int zend_eval_string(char *str, zval *retval_ptr, char *string_name CLS_DC ELS_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:
result = (zend_hash_num_elements(op->value.obj.properties)?1:0);
break;
default:
result = 0;
break;
}
return result;
}
ZEND_API int zval_update_constant(zval **pp, void *arg);
/* dedicated Zend executor functions - do not use! */
static inline void zend_ptr_stack_clear_multiple(ELS_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 ELS_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;
}
#if SUPPORT_INTERACTIVE
void execute_new_code(CLS_D);
#endif
/* services */
ZEND_API char *get_active_function_name(void);
ZEND_API char *zend_get_executed_filename(ELS_D);
ZEND_API uint zend_get_executed_lineno(ELS_D);
ZEND_API zend_bool zend_is_executing(void);
ZEND_API void zend_set_timeout(long seconds);
ZEND_API void zend_unset_timeout(void);
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))
static inline void zend_assign_to_variable_reference(znode *result, zval **variable_ptr_ptr, zval **value_ptr_ptr, temp_variable *Ts ELS_DC)
{
zval *variable_ptr;
zval *value_ptr;
if (!value_ptr_ptr || !variable_ptr_ptr) {
zend_error(E_ERROR, "Cannot create references to/from string offsets nor overloaded objects");
return;
}
variable_ptr = *variable_ptr_ptr;
value_ptr = *value_ptr_ptr;
if (variable_ptr == EG(error_zval_ptr) || value_ptr==EG(error_zval_ptr)) {
variable_ptr_ptr = &EG(uninitialized_zval_ptr);
/* } else if (variable_ptr==&EG(uninitialized_zval) || variable_ptr!=value_ptr) { */
} else if (variable_ptr_ptr != value_ptr_ptr) {
variable_ptr->refcount--;
if (variable_ptr->refcount==0) {
zendi_zval_dtor(*variable_ptr);
FREE_ZVAL(variable_ptr);
}
if (!PZVAL_IS_REF(value_ptr)) {
/* break it away */
value_ptr->refcount--;
if (value_ptr->refcount>0) {
ALLOC_ZVAL(*value_ptr_ptr);
**value_ptr_ptr = *value_ptr;
value_ptr = *value_ptr_ptr;
zendi_zval_copy_ctor(*value_ptr);
}
value_ptr->refcount = 1;
value_ptr->is_ref = 1;
}
*variable_ptr_ptr = value_ptr;
value_ptr->refcount++;
} else {
if (variable_ptr->refcount>1) { /* we need to break away */
SEPARATE_ZVAL(variable_ptr_ptr);
}
(*variable_ptr_ptr)->is_ref = 1;
}
if (result && !(result->u.EA.type & EXT_TYPE_UNUSED)) {
Ts[result->u.var].var.ptr_ptr = variable_ptr_ptr;
SELECTIVE_PZVAL_LOCK(*variable_ptr_ptr, result);
AI_USE_PTR(Ts[result->u.var].var);
}
}
#define IS_OVERLOADED_OBJECT 1
#define IS_STRING_OFFSET 2
#endif /* ZEND_EXECUTE_H */
-737
View File
@@ -1,737 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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"
#include "zend_execute_locks.h"
#if HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
ZEND_API void (*zend_execute)(zend_op_array *op_array ELS_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);
}
{
ELS_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(),
zend_get_executed_filename(ELS_C),
zend_get_executed_lineno(ELS_C));
}
if (original_sigsegv_handler!=zend_handle_sigsegv) {
original_sigsegv_handler(dummy);
}
}
#endif
static void zend_extension_activator(zend_extension *extension)
{
if (extension->activate) {
extension->activate();
}
}
static void zend_extension_deactivator(zend_extension *extension)
{
if (extension->deactivate) {
extension->deactivate();
}
}
static int is_not_internal_function(zend_function *function)
{
return(function->type != ZEND_INTERNAL_FUNCTION);
}
static int is_not_internal_class(zend_class_entry *ce)
{
return(ce->type != ZEND_INTERNAL_CLASS);
}
void init_executor(CLS_D ELS_DC)
{
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) = &EG(global_return_value_ptr);
EG(global_return_value_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);
EG(active_symbol_table) = &EG(symbol_table);
zend_llist_apply(&zend_extensions, (void (*)(void *)) zend_extension_activator);
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);
#ifdef ZEND_WIN32
EG(timed_out) = 0;
#endif
}
void shutdown_executor(ELS_D)
{
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, (void (*)(void *)) zend_extension_deactivator);
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 */
zend_hash_apply(EG(function_table), (int (*)(void *)) is_not_internal_function);
zend_hash_apply(EG(class_table), (int (*)(void *)) is_not_internal_class);
zend_destroy_rsrc_list(ELS_C); /* must be destroyed after the main symbol table and
* op arrays are destroyed.
*/
clean_non_persistent_constants();
#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_API char *get_active_function_name()
{
ELS_FETCH();
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(ELS_D)
{
if (EG(active_op_array)) {
return EG(active_op_array)->filename;
} else {
return "[no active file]";
}
}
ZEND_API uint zend_get_executed_lineno(ELS_D)
{
if (EG(opline_ptr)) {
return active_opline->lineno;
} else {
return 0;
}
}
ZEND_API zend_bool zend_is_executing()
{
ELS_FETCH();
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)->type != IS_OBJECT)) {
(*zval_ptr)->is_ref = 0;
}
}
ZEND_API int zend_is_true(zval *op)
{
return i_zend_is_true(op);
}
ZEND_API int zval_update_constant(zval **pp, void *arg)
{
zval *p = *pp;
zend_bool inline_change = (zend_bool) (unsigned long) arg;
if (p->type == IS_CONSTANT) {
zval c;
int refcount;
SEPARATE_ZVAL(pp);
p = *pp;
refcount = p->refcount;
if (!zend_get_constant(p->value.str.val, p->value.str.len, &c)) {
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 = c;
}
INIT_PZVAL(p);
p->refcount = refcount;
} else if (p->type == IS_CONSTANT_ARRAY) {
SEPARATE_ZVAL(pp);
p = *pp;
p->type = IS_ARRAY;
zend_hash_apply_with_argument(p->value.ht, (int (*)(void *,void *)) zval_update_constant, (void *) 1);
}
return 0;
}
int call_user_function(HashTable *function_table, zval **object_pp, zval *function_name, zval *retval_ptr, int param_count, zval *params[])
{
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);
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)
{
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);
ELS_FETCH();
*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) {
if (Z_TYPE_PP(object_pp) == IS_OBJECT) {
function_table = &(*object_pp)->value.obj.ce->function_table;
} 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;
object_pp = NULL;
} else
return FAILURE;
}
if (function_name->type!=IS_STRING) {
return FAILURE;
}
original_function_state_ptr = EG(function_state_ptr);
zend_str_tolower(function_name->value.str.val, function_name->value.str.len);
if (zend_hash_find(function_table, function_name->value.str.val, function_name->value.str.len+1, (void **) &function_state.function)==FAILURE) {
return FAILURE;
}
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;
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);
}
if (object_pp) {
zval *dummy, **this_ptr;
ALLOC_ZVAL(dummy);
INIT_ZVAL(*dummy);
zend_hash_update(EG(active_symbol_table), "this", sizeof("this"), &dummy, sizeof(zval *), (void **) &this_ptr);
zend_assign_to_variable_reference(NULL, this_ptr, object_pp, NULL ELS_CC);
}
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) ELS_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 ELS_CC);
INIT_PZVAL(*retval_ptr_ptr);
}
zend_ptr_stack_clear_multiple(ELS_C);
EG(function_state_ptr) = original_function_state_ptr;
return SUCCESS;
}
ZEND_API int zend_eval_string(char *str, zval *retval_ptr, char *string_name CLS_DC ELS_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 CLS_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 ELS_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;
}
#if SUPPORT_INTERACTIVE
void execute_new_code(CLS_D)
{
ELS_FETCH();
if (!EG(interactive)
|| CG(active_op_array)->backpatch_count>0
|| CG(active_op_array)->function_name
|| CG(active_op_array)->type!=ZEND_USER_FUNCTION) {
return;
}
CG(active_op_array)->start_op_number = CG(active_op_array)->last_executed_op_number;
CG(active_op_array)->end_op_number = CG(active_op_array)->last;
EG(active_op_array) = CG(active_op_array);
zend_execute(CG(active_op_array) ELS_CC);
zval_ptr_dtor(EG(return_value_ptr_ptr));
CG(active_op_array)->start_op_number = CG(active_op_array)->last_executed_op_number;
}
#endif
ZEND_API void zend_timeout(int dummy)
{
ELS_FETCH();
/* is there any point in this? we're terminating the request anyway...
PLS_FETCH();
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
zend_executor_globals *executor_globals;
executor_globals = ts_resource_ex(executor_globals_id, &wParam);
if (!executor_globals) {
/* 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)
{
ELS_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(void)
{
ELS_FETCH();
#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
}
-22
View File
@@ -1,22 +0,0 @@
#ifndef ZEND_EXECUTE_LOCKS_H
#define ZEND_EXECUTE_LOCKS_H
#define PZVAL_LOCK(z) ((z)->refcount++)
#define PZVAL_UNLOCK(z) { ((z)->refcount--); \
if (!(z)->refcount) { \
(z)->refcount = 1; \
(z)->is_ref = 0; \
if (EG(garbage_ptr) == 4) { \
zval_ptr_dtor(&EG(garbage)[0]); \
zval_ptr_dtor(&EG(garbage)[1]); \
EG(garbage)[0] = EG(garbage)[2]; \
EG(garbage)[1] = EG(garbage)[3]; \
EG(garbage_ptr) -= 2; \
} \
EG(garbage)[EG(garbage_ptr)++] = (z); \
} \
}
#define SELECTIVE_PZVAL_LOCK(pzv, pzn) if (!((pzn)->u.EA.type & EXT_TYPE_UNUSED)) { PZVAL_LOCK(pzv); }
#endif /* ZEND_EXECUTE_LOCKS_H */
-216
View File
@@ -1,216 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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 installed Zend Engine API version is %d\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 designed to be used with the Zend Engine API %d is outdated\n"
"It requires a more recent version of the Zend Engine\n"
"The installed Zend Engine API version is %d\n"
"Contact %s at %s for a later version of this module.\n\n",
new_extension->name,
extension_version_info->zend_extension_api_no,
ZEND_EXTENSION_API_NO,
new_extension->author,
new_extension->URL);
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)
{
#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()
{
zend_llist_apply(&zend_extensions, (void (*)(void *)) zend_extension_shutdown);
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)
{
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)
{
zend_llist_apply_with_arguments(&zend_extensions, (llist_apply_with_args_func_t) zend_extension_message_dispatcher, 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-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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 20001224
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(void);
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-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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) \
{ \
ALS_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) \
{ \
ALS_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:
*/
-222
View File
@@ -1,222 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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"
/* Define ZTS if you want a thread-safe Zend */
/*#undef ZTS*/
#ifdef ZTS
#include "../TSRM/TSRM.h"
#ifdef __cplusplus
class ZendFlexLexer;
class ZendIniFlexLexer;
#endif
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 class_entry, *active_class_entry;
/* variables for list() compilation */
zend_llist list_llist;
zend_llist dimension_llist;
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;
HashTable *function_table; /* function symbol table */
HashTable *class_table; /* class table */
HashTable filenames_table;
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;
#if defined(ZTS) && defined(__cplusplus)
ZendFlexLexer *ZFL;
ZendIniFlexLexer *ini_scanner;
#else
void *ZFL;
void *ini_parser;
#endif
};
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;
/* for global return() support */
zval *global_return_value_ptr;
/* 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 */
long precision;
int ticks_count;
zend_bool in_execution;
/* 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);
zval *garbage[4];
int garbage_ptr;
zval *user_error_handler;
zend_ptr_stack user_error_handlers;
/* timeout support */
int timeout_seconds;
int lambda_count;
HashTable ini_directives;
void *reserved[ZEND_MAX_RESERVED_RESOURCES];
#if SUPPORT_INTERACTIVE
int interactive;
#endif
};
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];
#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 char memory_exhausted;
#endif
};
#endif /* ZEND_GLOBALS_H */
-89
View File
@@ -1,89 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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;
/* Compiler */
#ifdef ZTS
# define CLS_D zend_compiler_globals *compiler_globals
# define CLS_DC , CLS_D
# define CLS_C compiler_globals
# define CLS_CC , CLS_C
# define CG(v) (((zend_compiler_globals *) compiler_globals)->v)
# define CLS_FETCH() zend_compiler_globals *compiler_globals = (zend_compiler_globals *) ts_resource(compiler_globals_id)
BEGIN_EXTERN_C()
int zendparse(void *compiler_globals);
END_EXTERN_C()
#else
# define CLS_D void
# define CLS_DC
# define CLS_C
# define CLS_CC
# define CG(v) (compiler_globals.v)
# define CLS_FETCH()
extern ZEND_API struct _zend_compiler_globals compiler_globals;
int zendparse(void);
#endif
/* Executor */
#ifdef ZTS
# define ELS_D zend_executor_globals *executor_globals
# define ELS_DC , ELS_D
# define ELS_C executor_globals
# define ELS_CC , ELS_C
# define EG(v) (executor_globals->v)
# define ELS_FETCH() zend_executor_globals *executor_globals = (zend_executor_globals *) ts_resource(executor_globals_id)
#else
# define ELS_D void
# define ELS_DC
# define ELS_C
# define ELS_CC
# define EG(v) (executor_globals.v)
# define ELS_FETCH()
extern ZEND_API zend_executor_globals executor_globals;
#endif
/* Memory Manager */
#ifdef ZTS
# define ALS_D zend_alloc_globals *alloc_globals
# define ALS_DC , ALS_D
# define ALS_C alloc_globals
# define ALS_CC , ALS_C
# define AG(v) (((zend_alloc_globals *) alloc_globals)->v)
# define ALS_FETCH() zend_alloc_globals *alloc_globals = (zend_alloc_globals *) ts_resource(alloc_globals_id)
#else
# define ALS_D void
# define ALS_DC
# define ALS_C
# define ALS_CC
# define AG(v) (alloc_globals.v)
# define ALS_FETCH()
extern ZEND_API zend_alloc_globals alloc_globals;
#endif
#endif /* ZEND_GLOBALS_MACROS_H */
-1281
View File
File diff suppressed because it is too large. Load diff
-199
View File
@@ -1,199 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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 int (*compare_func_t)(const void *, const void *);
typedef void (*sort_func_t)(void *, size_t, register size_t, compare_func_t);
typedef void (*dtor_func_t)(void *pDest);
typedef int (*apply_func_t)(void *pDest);
typedef int (*apply_func_arg_t)(void *pDest, void *argument);
typedef ulong (*hash_func_t)(char *arKey, uint nKeyLength);
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 nHashSizeIndex;
uint nNumOfElements;
ulong nNextFreeElement;
hash_func_t pHashFunction;
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)
typedef struct _zend_hash_key {
char *arKey;
uint nKeyLength;
ulong h;
} zend_hash_key;
typedef int (*apply_func_args_t)(void *pDest, int num_args, va_list args, zend_hash_key *hash_key);
#define ZEND_STD_HASH_APPLIER \
int (*)(void *element, 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);
ZEND_API void zend_hash_apply_with_argument(HashTable *ht, apply_func_arg_t apply_func, void *);
ZEND_API void zend_hash_apply_with_arguments(HashTable *ht, ZEND_STD_HASH_APPLIER, int, ...);
/* 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, ulong *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);
ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t compar, zend_bool ordered);
ZEND_API int zend_hash_minmax(HashTable *ht, int (*compar)(const void *, const void *), int flag, void **pData);
ZEND_API int zend_hash_num_elements(HashTable *ht);
ZEND_API int zend_hash_rehash(HashTable *ht);
ZEND_API ulong hashpjw(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 */
-181
View File
@@ -1,181 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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"
#ifndef ZTS
extern char *zendtext;
extern int zendleng;
#else
#define zendtext ((char *) zend_get_zendtext(CLS_C))
#define zendleng zend_get_zendleng(CLS_C)
#endif
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) {
zend_html_putc(*ptr++);
}
}
ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini)
{
zval token;
int token_type;
char *last_color = syntax_highlighter_ini->highlight_html;
char *next_color;
int in_string=0;
CLS_FETCH();
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 CLS_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(zendtext, zendleng); /* 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(zendtext, zendleng);
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 CLS_CC);
}
}
token.type = 0;
}
if (last_color != syntax_highlighter_ini->highlight_html) {
zend_printf("</font>\n");
}
zend_printf("</font>\n");
zend_printf("</code>");
}
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
-51
View File
@@ -1,51 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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);
ZEND_API int highlight_file(char *filename, zend_syntax_highlighter_ini *syntax_highlighter_ini);
ZEND_API int highlight_string(zval *str, zend_syntax_highlighter_ini *syntax_highlighter_ini, char *str_name);
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
-152
View File
@@ -1,152 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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"
#ifndef ZTS
extern char *zendtext;
extern int zendleng;
#else
#define zendtext ((char *) zend_get_zendtext(CLS_C))
#define zendleng zend_get_zendleng(CLS_C)
#endif
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;
CLS_FETCH();
memset(emit_whitespace, 0, sizeof(int)*256);
/* highlight stuff coming back from zendlex() */
token.type = 0;
while ((token_type=lex_scan(&token CLS_CC))) {
switch (token_type) {
case T_INLINE_HTML:
zend_write(zendtext, zendleng);
break;
case T_WHITESPACE: {
token.type = 0;
/* eat whitespace, emit newlines */
for (i=0; i<zendleng; i++) {
emit_whitespace[(unsigned char) zendtext[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(zendtext, zendleng);
break;
}
} else {
handle_whitespace(emit_whitespace);
if (in_string) {
zend_write(zendtext, zendleng);
/* a part of a string */
} else {
zend_write(zendtext, zendleng);
}
}
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-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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 */
-499
View File
@@ -1,499 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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_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)
{
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)
{
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);
}
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(ELS_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(ELS_D)
{
zend_hash_destroy(&EG(ini_directives));
return SUCCESS;
}
ZEND_API int zend_ini_deactivate(ELS_D)
{
zend_hash_apply_with_argument(&EG(ini_directives), (int (*)(void *, void *)) zend_restore_ini_entry_cb, (void *) ZEND_INI_STAGE_DEACTIVATE);
return SUCCESS;
}
ZEND_API int zend_copy_ini_directives(ELS_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 ELS_CC);
return SUCCESS;
}
static int ini_key_compare(const void *a, const void *b)
{
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(ELS_D)
{
zend_hash_sort(&EG(ini_directives), qsort, ini_key_compare, 0);
}
/*
* Registration / unregistration
*/
ZEND_API int zend_register_ini_entries(zend_ini_entry *ini_entry, int module_number)
{
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);
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)==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);
}
}
p++;
}
return SUCCESS;
}
ZEND_API void zend_unregister_ini_entries(int module_number)
{
zend_hash_apply_with_argument(registered_zend_ini_directives, (int (*)(void *, void *)) zend_remove_ini_entries, (void *) &module_number);
}
static int zend_ini_refresh_cache(zend_ini_entry *p, int stage)
{
if (p->on_modify) {
p->on_modify(p, p->value, p->value_length, p->mh_arg1, p->mh_arg2, p->mh_arg3, stage);
}
return 0;
}
ZEND_API void zend_ini_refresh_caches(int stage ELS_DC)
{
zend_hash_apply_with_argument(&EG(ini_directives), (int (*)(void *, void *)) zend_ini_refresh_cache, (void *)(long) stage);
}
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;
ELS_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)==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;
ELS_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);
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;
ELS_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;
ELS_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;
ELS_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 "";
}
zend_ini_entry *get_ini_entry(char *name, uint name_length)
{
zend_ini_entry *ini_entry;
ELS_FETCH();
if (zend_hash_find(&EG(ini_directives), name, name_length, (void **) &ini_entry)==SUCCESS) {
return ini_entry;
} else {
return NULL;
}
}
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:
*/
-195
View File
@@ -1,195 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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)
#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(ELS_D);
ZEND_API int zend_ini_shutdown(ELS_D);
ZEND_API int zend_ini_deactivate(ELS_D);
ZEND_API int zend_copy_ini_directives(ELS_D);
ZEND_API void zend_ini_sort_entries(ELS_D);
ZEND_API int zend_register_ini_entries(zend_ini_entry *ini_entry, int module_number);
ZEND_API void zend_unregister_ini_entries(int module_number);
ZEND_API void zend_ini_refresh_caches(int stage ELS_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_ini_entry *get_ini_entry(char *name, uint name_length);
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)
#define UNREGISTER_INI_ENTRIES() zend_unregister_ini_entries(module_number)
#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
#endif /* ZEND_INI_H */
-231
View File
@@ -1,231 +0,0 @@
%{
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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
typedef struct _zend_ini_parser_param {
zend_ini_parser_cb_t ini_parser_cb;
void *arg;
} zend_ini_parser_param;
#define YYSTYPE zval
#define YYPARSE_PARAM ini_parser_param
#define ZEND_INI_PARSER_CB ((zend_ini_parser_param *) ini_parser_param)->ini_parser_cb
#define ZEND_INI_PARSER_ARG ((zend_ini_parser_param *) ini_parser_param)->arg
int ini_lex(zval *ini_lval);
int ini_parse(void *ini_parser_param);
zval yylval;
#ifndef ZTS
extern int ini_lex(zval *ini_lval);
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;
if (zend_get_constant(name->value.str.val, name->value.str.len, &z_constant)) {
/* 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 = zend_ini_scanner_get_filename();
CLS_FETCH();
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());
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)
{
zend_ini_parser_param ini_parser_param;
int retval;
CLS_FETCH();
ini_parser_param.ini_parser_cb = ini_parser_cb;
ini_parser_param.arg = arg;
if (zend_ini_open_file_for_scanning(fh)==FAILURE) {
return FAILURE;
}
CG(ini_parser_unbuffered_errors) = unbuffered_errors;
retval = ini_parse(&ini_parser_param);
zend_ini_close_file(fh);
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:
*/
-24
View File
@@ -1,24 +0,0 @@
#ifndef _ZEND_INI_SCANNER_H
#define _ZEND_INI_SCANNER_H
#if defined(ZTS) && defined(__cplusplus)
class ZendIniFlexLexer : public yyFlexLexer
{
public:
virtual ~ZendIniFlexLexer();
int lex_scan(zval *zendlval);
void BeginState(int state);
char *filename;
};
#endif /* ZTS && __cplusplus */
BEGIN_EXTERN_C()
int zend_ini_scanner_get_lineno(void);
char *zend_ini_scanner_get_filename(void);
int zend_ini_open_file_for_scanning(zend_file_handle *fh);
void zend_ini_close_file(zend_file_handle *fh);
int ini_lex(zval *ini_lval);
END_EXTERN_C()
#endif /* _ZEND_INI_SCANNER_H */
-286
View File
@@ -1,286 +0,0 @@
%{
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include "zend.h"
#include "zend_globals.h"
#include "zend_ini_parser.h"
#include "zend_ini_scanner.h"
#ifdef ZTS
# ifdef HAVE_STDIOSTR_H
# include <stdiostr.h>
# endif
# ifdef HAVE_STDIOSTREAM_H
# include <stdiostream.h>
# endif
# ifdef ZEND_WIN32
# include <strstrea.h>
# else
# include <strstream.h>
# endif
#endif
#undef YYSTYPE
#define YYSTYPE zval
#ifdef ZTS
#define YY_DECL int ZendIniFlexLexer::lex_scan(zval *ini_lval)
#else
#define YY_DECL int ini_lex(zval *ini_lval)
#endif
#include "zend_istdiostream.h"
#ifndef ZTS
static char *ini_filename;
void init_ini_scanner()
{
ini_lineno=1;
}
int zend_ini_scanner_get_lineno()
{
return ini_lineno;
}
char *zend_ini_scanner_get_filename()
{
return ini_filename;
}
#else /* ZTS */
int zend_ini_scanner_get_lineno()
{
CLS_FETCH();
return CG(ini_scanner)->lineno();
}
char *zend_ini_scanner_get_filename()
{
CLS_FETCH();
return CG(ini_scanner)->filename;
}
int ini_lex(zval *ini_lval)
{
CLS_FETCH();
return CG(ini_scanner)->lex_scan(ini_lval);
}
ZendIniFlexLexer::~ZendIniFlexLexer()
{
if (yy_start_stack) {
yy_flex_free(yy_start_stack);
}
}
int yyFlexLexer::yylex()
{
fprintf(stderr, "Error: yyFlexLexer::yylex() called\n");
return -1;
}
#endif
int zend_ini_open_file_for_scanning(zend_file_handle *fh)
{
FILE *fp;
CLS_FETCH();
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;
}
#ifdef ZTS
if (!fp) {
return FAILURE;
}
fh->handle.is = new istdiostream(fp);
fh->type = ZEND_HANDLE_STDIOSTREAM;
CG(ini_scanner) = new ZendIniFlexLexer;
CG(ini_scanner)->switch_streams(fh->handle.is, &cout);
CG(ini_scanner)->filename = fh->filename;
#else
init_ini_scanner();
yyin = fp;
yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE));
ini_filename = fh->filename;
#endif
return SUCCESS;
}
void zend_ini_close_file(zend_file_handle *fh)
{
switch (fh->type) {
case ZEND_HANDLE_FP:
fclose(fh->handle.fp);
break;
#ifdef ZTS
case ZEND_HANDLE_STDIOSTREAM: {
CLS_FETCH();
delete CG(ini_scanner);
}
break;
#endif
}
}
%}
%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>[[][^[]+[\]]([\n]?|"\r\n"?) {
/* 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>"\r\n" {
return '\n';
}
<INITIAL>[;][^\r\n]*[\r\n]? {
/* 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);
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
-726
View File
@@ -1,726 +0,0 @@
%{
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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 compiler_globals
# define YYLEX_PARAM compiler_globals
#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
%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_USE
%token T_GLOBAL
%token T_STATIC
%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
%% /* Rules */
start:
top_statement_list
;
top_statement_list:
top_statement_list { zend_do_extended_info(CLS_C); } top_statement { HANDLE_INTERACTIVE(); }
| /* empty */
;
top_statement:
statement
| declaration_statement { zend_do_early_binding(CLS_C); }
;
inner_statement_list:
inner_statement_list { zend_do_extended_info(CLS_C); } inner_statement { HANDLE_INTERACTIVE(); }
| /* empty */
;
inner_statement:
statement
| declaration_statement
;
statement:
unticked_statement { zend_do_ticks(CLS_C); }
;
unticked_statement:
'{' inner_statement_list '}'
| T_IF '(' expr ')' { zend_do_if_cond(&$3, &$4 CLS_CC); } statement { zend_do_if_after_statement(&$4, 1 CLS_CC); } elseif_list else_single { zend_do_if_end(CLS_C); }
| T_IF '(' expr ')' ':' { zend_do_if_cond(&$3, &$4 CLS_CC); } inner_statement_list { zend_do_if_after_statement(&$4, 1 CLS_CC); } new_elseif_list new_else_single T_ENDIF ';' { zend_do_if_end(CLS_C); }
| T_WHILE '(' { $1.u.opline_num = get_next_op_number(CG(active_op_array)); } expr ')' { zend_do_while_cond(&$4, &$5 CLS_CC); } while_statement { zend_do_while_end(&$1, &$5 CLS_CC); }
| T_DO { $1.u.opline_num = get_next_op_number(CG(active_op_array)); zend_do_do_while_begin(CLS_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 CLS_CC); }
| T_FOR
'('
for_expr
';' { zend_do_free(&$3 CLS_CC); $4.u.opline_num = get_next_op_number(CG(active_op_array)); }
for_expr
';' { zend_do_extended_info(CLS_C); zend_do_for_cond(&$6, &$7 CLS_CC); }
for_expr
')' { zend_do_free(&$9 CLS_CC); zend_do_for_before_statement(&$4, &$7 CLS_CC); }
for_statement { zend_do_for_end(&$7 CLS_CC); }
| T_SWITCH '(' expr ')' { zend_do_switch_cond(&$3 CLS_CC); } switch_case_list { zend_do_switch_end(&$6 CLS_CC); }
| T_BREAK ';' { zend_do_brk_cont(ZEND_BRK, NULL CLS_CC); }
| T_BREAK expr ';' { zend_do_brk_cont(ZEND_BRK, &$2 CLS_CC); }
| T_CONTINUE ';' { zend_do_brk_cont(ZEND_CONT, NULL CLS_CC); }
| T_CONTINUE expr ';' { zend_do_brk_cont(ZEND_CONT, &$2 CLS_CC); }
| T_RETURN ';' { zend_do_return(NULL, 0 CLS_CC); }
| T_RETURN expr_without_variable ';' { zend_do_return(&$2, 0 CLS_CC); }
| T_RETURN cvar ';' { zend_do_return(&$2, 1 CLS_CC); }
| T_GLOBAL global_var_list ';'
| T_STATIC static_var_list ';'
| T_ECHO echo_expr_list ';'
| T_INLINE_HTML { zend_do_echo(&$1 CLS_CC); }
| expr ';' { zend_do_free(&$1 CLS_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 '(' w_cvar T_AS { zend_do_foreach_begin(&$1, &$3, &$2, &$4, 1 CLS_CC); } w_cvar foreach_optional_arg ')' { zend_do_foreach_cont(&$6, &$7, &$4 CLS_CC); } foreach_statement { zend_do_foreach_end(&$1, &$2 CLS_CC); }
| T_FOREACH '(' expr_without_variable T_AS { zend_do_foreach_begin(&$1, &$3, &$2, &$4, 0 CLS_CC); } w_cvar foreach_optional_arg ')' { zend_do_foreach_cont(&$6, &$7, &$4 CLS_CC); } foreach_statement { zend_do_foreach_end(&$1, &$2 CLS_CC); }
| T_DECLARE { zend_do_declare_begin(CLS_C); } '(' declare_list ')' declare_statement { zend_do_declare_end(CLS_C); }
| ';' /* empty statement */
;
unset_variables:
unset_variable
| unset_variables ',' unset_variable
;
unset_variable:
cvar { zend_do_end_variable_parse(BP_VAR_UNSET, 0 CLS_CC); zend_do_unset(&$1 CLS_CC); }
;
use_filename:
T_CONSTANT_ENCAPSED_STRING { $$ = $1; }
| '(' T_CONSTANT_ENCAPSED_STRING ')' { $$ = $2; }
;
declaration_statement:
unticked_declaration_statement { zend_do_ticks(CLS_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 CLS_CC); }
'(' parameter_list ')' '{' inner_statement_list '}' { zend_do_end_function_declaration(&$1 CLS_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 CLS_CC); }
parameter_list '(' inner_statement_list ')' ';' { zend_do_end_function_declaration(&$1 CLS_CC); }
| T_CLASS T_STRING { zend_do_begin_class_declaration(&$2, NULL CLS_CC); } '{' class_statement_list '}' { zend_do_end_class_declaration(CLS_C); }
| T_CLASS T_STRING T_EXTENDS T_STRING { zend_do_begin_class_declaration(&$2, &$4 CLS_CC); } '{' class_statement_list '}' { zend_do_end_class_declaration(CLS_C); }
;
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 CLS_CC); }
| declare_list ',' T_STRING '=' static_scalar { zend_do_declare_stmt(&$3, &$5 CLS_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(CLS_C); zend_do_case_before_statement(&$1, &$2, &$3 CLS_CC); } inner_statement_list { zend_do_case_after_statement(&$$, &$2 CLS_CC); $$.op_type = IS_CONST }
| case_list T_DEFAULT case_separator { zend_do_extended_info(CLS_C); zend_do_default_before_statement(&$1, &$2 CLS_CC); } inner_statement_list { zend_do_case_after_statement(&$$, &$2 CLS_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 CLS_CC); } statement { zend_do_if_after_statement(&$5, 0 CLS_CC); }
;
new_elseif_list:
/* empty */
| new_elseif_list T_ELSEIF '(' expr ')' ':' { zend_do_if_cond(&$4, &$5 CLS_CC); } inner_statement_list { zend_do_if_after_statement(&$5, 0 CLS_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 CLS_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 CLS_CC); }
| '&' T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$2, 0 CLS_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 CLS_CC); }
| T_CONST T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$2, 0 CLS_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 CLS_CC); }
| T_VARIABLE '=' static_scalar { znode tmp; fetch_simple_variable(&tmp, &$1, 0 CLS_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 CLS_CC); }
| non_empty_parameter_list ',' T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$3, 0 CLS_CC); $$=$1; $$.u.constant.value.lval++; zend_do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
| non_empty_parameter_list ',' '&' T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$4, 0 CLS_CC); $$=$1; $$.u.constant.value.lval++; zend_do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_FORCE CLS_CC); }
| non_empty_parameter_list ',' T_CONST T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$4, 0 CLS_CC); $$=$1; $$.u.constant.value.lval++; zend_do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
| non_empty_parameter_list ',' T_VARIABLE '=' static_scalar { znode tmp; fetch_simple_variable(&tmp, &$3, 0 CLS_CC); $$=$1; $$.u.constant.value.lval++; zend_do_receive_arg(ZEND_RECV_INIT, &tmp, &$$, &$5, BYREF_NONE CLS_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 CLS_CC); }
| cvar { $$.u.constant.value.lval = 1; zend_do_pass_param(&$1, ZEND_SEND_VAR, $$.u.constant.value.lval CLS_CC); }
| '&' w_cvar { $$.u.constant.value.lval = 1; zend_do_pass_param(&$2, ZEND_SEND_REF, $$.u.constant.value.lval CLS_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 CLS_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 CLS_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 CLS_CC); }
;
global_var_list:
global_var_list ',' global_var { zend_do_fetch_global_or_static_variable(&$3, NULL, ZEND_FETCH_GLOBAL CLS_CC); }
| global_var { zend_do_fetch_global_or_static_variable(&$1, NULL, ZEND_FETCH_GLOBAL CLS_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 CLS_CC); }
| static_var_list ',' T_VARIABLE '=' static_scalar { zend_do_fetch_global_or_static_variable(&$3, &$5, ZEND_FETCH_STATIC CLS_CC); }
| T_VARIABLE { zend_do_fetch_global_or_static_variable(&$1, NULL, ZEND_FETCH_STATIC CLS_CC); }
| T_VARIABLE '=' static_scalar { zend_do_fetch_global_or_static_variable(&$1, &$3, ZEND_FETCH_STATIC CLS_CC); }
;
class_statement_list:
class_statement_list class_statement
| /* empty */
;
class_statement:
T_VAR class_variable_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 CLS_CC); } '('
parameter_list ')' '{' inner_statement_list '}' { zend_do_end_function_declaration(&$1 CLS_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 CLS_CC); }
parameter_list '(' inner_statement_list ')' ';' { zend_do_end_function_declaration(&$1 CLS_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 CLS_CC); }
| class_variable_decleration ',' T_VARIABLE '=' static_scalar { zend_do_declare_property(&$3, &$5 CLS_CC); }
| T_VARIABLE { zend_do_declare_property(&$1, NULL CLS_CC); }
| T_VARIABLE '=' static_scalar { zend_do_declare_property(&$1, &$3 CLS_CC); }
;
echo_expr_list:
| echo_expr_list ',' expr { zend_do_echo(&$3 CLS_CC); }
| expr { zend_do_echo(&$1 CLS_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 CLS_CC); } expr { $$ = $4; }
| expr { $$ = $1; }
;
expr_without_variable:
T_LIST '(' { zend_do_list_init(CLS_C); } assignment_list ')' '=' expr { zend_do_list_end(&$$, &$7 CLS_CC); }
| cvar '=' expr { zend_do_end_variable_parse(BP_VAR_W, 0 CLS_CC); zend_do_assign(&$$, &$1, &$3 CLS_CC); }
| cvar '=' '&' w_cvar { zend_do_end_variable_parse(BP_VAR_W, 0 CLS_CC); zend_do_assign_ref(&$$, &$1, &$4 CLS_CC); }
| cvar '=' '&' function_call { zend_do_end_variable_parse(BP_VAR_W, 0 CLS_CC); zend_do_assign_ref(&$$, &$1, &$4 CLS_CC); }
| cvar '=' '&' T_NEW class_name { zend_do_extended_fcall_begin(CLS_C); zend_do_begin_new_object(&$4, &$5 CLS_CC); } ctor_arguments { zend_do_end_new_object(&$3, &$5, &$4, &$7 CLS_CC); zend_do_extended_fcall_end(CLS_C); zend_do_end_variable_parse(BP_VAR_W, 0 CLS_CC); zend_do_assign_ref(&$$, &$1, &$3 CLS_CC); }
| T_NEW class_name { zend_do_extended_fcall_begin(CLS_C); zend_do_begin_new_object(&$1, &$2 CLS_CC); } ctor_arguments { zend_do_end_new_object(&$$, &$2, &$1, &$4 CLS_CC); zend_do_extended_fcall_end(CLS_C);}
| cvar T_PLUS_EQUAL expr { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_ADD, &$$, &$1, &$3 CLS_CC); }
| cvar T_MINUS_EQUAL expr { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_SUB, &$$, &$1, &$3 CLS_CC); }
| cvar T_MUL_EQUAL expr { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_MUL, &$$, &$1, &$3 CLS_CC); }
| cvar T_DIV_EQUAL expr { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_DIV, &$$, &$1, &$3 CLS_CC); }
| cvar T_CONCAT_EQUAL expr { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_CONCAT, &$$, &$1, &$3 CLS_CC); }
| cvar T_MOD_EQUAL expr { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_MOD, &$$, &$1, &$3 CLS_CC); }
| cvar T_AND_EQUAL expr { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_BW_AND, &$$, &$1, &$3 CLS_CC); }
| cvar T_OR_EQUAL expr { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_BW_OR, &$$, &$1, &$3 CLS_CC); }
| cvar T_XOR_EQUAL expr { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_BW_XOR, &$$, &$1, &$3 CLS_CC); }
| cvar T_SL_EQUAL expr { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_SL, &$$, &$1, &$3 CLS_CC); }
| cvar T_SR_EQUAL expr { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_SR, &$$, &$1, &$3 CLS_CC); }
| rw_cvar T_INC { zend_do_post_incdec(&$$, &$1, ZEND_POST_INC CLS_CC); }
| T_INC rw_cvar { zend_do_pre_incdec(&$$, &$2, ZEND_PRE_INC CLS_CC); }
| rw_cvar T_DEC { zend_do_post_incdec(&$$, &$1, ZEND_POST_DEC CLS_CC); }
| T_DEC rw_cvar { zend_do_pre_incdec(&$$, &$2, ZEND_PRE_DEC CLS_CC); }
| expr T_BOOLEAN_OR { zend_do_boolean_or_begin(&$1, &$2 CLS_CC); } expr { zend_do_boolean_or_end(&$$, &$1, &$4, &$2 CLS_CC); }
| expr T_BOOLEAN_AND { zend_do_boolean_and_begin(&$1, &$2 CLS_CC); } expr { zend_do_boolean_and_end(&$$, &$1, &$4, &$2 CLS_CC); }
| expr T_LOGICAL_OR { zend_do_boolean_or_begin(&$1, &$2 CLS_CC); } expr { zend_do_boolean_or_end(&$$, &$1, &$4, &$2 CLS_CC); }
| expr T_LOGICAL_AND { zend_do_boolean_and_begin(&$1, &$2 CLS_CC); } expr { zend_do_boolean_and_end(&$$, &$1, &$4, &$2 CLS_CC); }
| expr T_LOGICAL_XOR expr { zend_do_binary_op(ZEND_BOOL_XOR, &$$, &$1, &$3 CLS_CC); }
| expr '|' expr { zend_do_binary_op(ZEND_BW_OR, &$$, &$1, &$3 CLS_CC); }
| expr '&' expr { zend_do_binary_op(ZEND_BW_AND, &$$, &$1, &$3 CLS_CC); }
| expr '^' expr { zend_do_binary_op(ZEND_BW_XOR, &$$, &$1, &$3 CLS_CC); }
| expr '.' expr { zend_do_binary_op(ZEND_CONCAT,&$$,&$1,&$3 CLS_CC); }
| expr '+' expr { zend_do_binary_op(ZEND_ADD,&$$,&$1,&$3 CLS_CC); }
| expr '-' expr { zend_do_binary_op(ZEND_SUB,&$$,&$1,&$3 CLS_CC); }
| expr '*' expr { zend_do_binary_op(ZEND_MUL,&$$,&$1,&$3 CLS_CC); }
| expr '/' expr { zend_do_binary_op(ZEND_DIV,&$$,&$1,&$3 CLS_CC); }
| expr '%' expr { zend_do_binary_op(ZEND_MOD,&$$,&$1,&$3 CLS_CC); }
| expr T_SL expr { zend_do_binary_op(ZEND_SL, &$$, &$1, &$3 CLS_CC); }
| expr T_SR expr { zend_do_binary_op(ZEND_SR, &$$, &$1, &$3 CLS_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 CLS_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 CLS_CC); }
| '!' expr { zend_do_unary_op(ZEND_BOOL_NOT, &$$, &$2 CLS_CC); }
| '~' expr { zend_do_unary_op(ZEND_BW_NOT, &$$, &$2 CLS_CC); }
| expr T_IS_IDENTICAL expr { zend_do_binary_op(ZEND_IS_IDENTICAL, &$$, &$1, &$3 CLS_CC); }
| expr T_IS_NOT_IDENTICAL expr { zend_do_binary_op(ZEND_IS_NOT_IDENTICAL, &$$, &$1, &$3 CLS_CC); }
| expr T_IS_EQUAL expr { zend_do_binary_op(ZEND_IS_EQUAL, &$$, &$1, &$3 CLS_CC); }
| expr T_IS_NOT_EQUAL expr { zend_do_binary_op(ZEND_IS_NOT_EQUAL, &$$, &$1, &$3 CLS_CC); }
| expr '<' expr { zend_do_binary_op(ZEND_IS_SMALLER, &$$, &$1, &$3 CLS_CC); }
| expr T_IS_SMALLER_OR_EQUAL expr { zend_do_binary_op(ZEND_IS_SMALLER_OR_EQUAL, &$$, &$1, &$3 CLS_CC); }
| expr '>' expr { zend_do_binary_op(ZEND_IS_SMALLER, &$$, &$3, &$1 CLS_CC); }
| expr T_IS_GREATER_OR_EQUAL expr { zend_do_binary_op(ZEND_IS_SMALLER_OR_EQUAL, &$$, &$3, &$1 CLS_CC); }
| '(' expr ')' { $$ = $2; }
| expr '?' { zend_do_begin_qm_op(&$1, &$2 CLS_CC); }
expr ':' { zend_do_qm_true(&$4, &$2, &$5 CLS_CC); }
expr { zend_do_qm_false(&$$, &$7, &$2, &$5 CLS_CC); }
| function_call { $$ = $1; }
| internal_functions_in_yacc { $$ = $1; }
| T_INT_CAST expr { zend_do_cast(&$$, &$2, IS_LONG CLS_CC); }
| T_DOUBLE_CAST expr { zend_do_cast(&$$, &$2, IS_DOUBLE CLS_CC); }
| T_STRING_CAST expr { zend_do_cast(&$$, &$2, IS_STRING CLS_CC); }
| T_ARRAY_CAST expr { zend_do_cast(&$$, &$2, IS_ARRAY CLS_CC); }
| T_OBJECT_CAST expr { zend_do_cast(&$$, &$2, IS_OBJECT CLS_CC); }
| T_BOOL_CAST expr { zend_do_cast(&$$, &$2, IS_BOOL CLS_CC); }
| T_UNSET_CAST expr { zend_do_cast(&$$, &$2, IS_NULL CLS_CC); }
| T_EXIT exit_expr { zend_do_exit(&$$, &$2 CLS_CC); }
| '@' { zend_do_begin_silence(&$1 CLS_CC); } expr { zend_do_end_silence(&$1 CLS_CC); $$ = $3; }
| scalar { $$ = $1; }
| T_ARRAY '(' array_pair_list ')' { $$ = $3; }
| '`' encaps_list '`' { zend_do_shell_exec(&$$, &$2 CLS_CC); }
| T_PRINT expr { zend_do_print(&$$, &$2 CLS_CC); }
;
function_call:
T_STRING '(' { $2.u.opline_num = zend_do_begin_function_call(&$1 CLS_CC); }
function_call_parameter_list
')' { zend_do_end_function_call(&$1, &$$, &$4, 0, $2.u.opline_num CLS_CC); zend_do_extended_fcall_end(CLS_C); }
| cvar '(' { zend_do_begin_dynamic_function_call(&$1 CLS_CC); }
function_call_parameter_list
')' { zend_do_end_function_call(&$1, &$$, &$4, 0, 1 CLS_CC); zend_do_extended_fcall_end(CLS_C);}
| T_STRING T_PAAMAYIM_NEKUDOTAYIM T_STRING '(' { zend_do_extended_fcall_begin(CLS_C); zend_do_begin_class_member_function_call(&$1, &$3 CLS_CC); }
function_call_parameter_list
')' { zend_do_end_function_call(&$3, &$$, &$6, 1, 1 CLS_CC); zend_do_extended_fcall_end(CLS_C);}
;
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; }
;
class_name:
T_STRING { $$ = $1; }
| r_cvar { $$ = $1; }
;
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(&$$, &$1, ZEND_CT CLS_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); $$ = $2; }
| T_ARRAY '(' static_array_pair_list ')' { $$ = $3; $$.u.constant.type = IS_CONSTANT_ARRAY; }
;
scalar:
T_STRING { zend_do_fetch_constant(&$$, &$1, ZEND_RT CLS_CC); }
| T_STRING_VARNAME { $$ = $1; }
| common_scalar { $$ = $1; }
| '"' encaps_list '"' { $$ = $2; }
| '\'' encaps_list '\'' { $$ = $2; }
| T_START_HEREDOC encaps_list T_END_HEREDOC { $$ = $2; zend_do_end_heredoc(CLS_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; }
;
/*
w_expr:
w_cvar { $$ = $1; }
| expr_without_variable { $$ = $1; }
;
*/
r_cvar:
cvar { zend_do_end_variable_parse(BP_VAR_R, 0 CLS_CC); $$ = $1; }
;
w_cvar:
cvar { zend_do_end_variable_parse(BP_VAR_W, 0 CLS_CC); $$ = $1; }
;
rw_cvar:
cvar { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); $$ = $1; }
;
cvar:
cvar_without_objects { $$ = $1; }
| cvar_without_objects T_OBJECT_OPERATOR { zend_do_push_object(&$1 CLS_CC); } ref_list { $$ = $4; }
;
cvar_without_objects:
reference_variable { $$ = $1; }
| simple_indirect_reference reference_variable { zend_do_indirect_references(&$$, &$1, &$2 CLS_CC); }
;
reference_variable:
reference_variable '[' dim_offset ']' { fetch_array_dim(&$$, &$1, &$3 CLS_CC); }
| reference_variable '{' expr '}' { fetch_string_offset(&$$, &$1, &$3 CLS_CC); }
| compound_variable { zend_do_fetch_globals(&$1 CLS_CC); zend_do_begin_variable_parse(CLS_C); fetch_simple_variable(&$$, &$1, 1 CLS_CC); }
;
compound_variable:
T_VARIABLE { $$ = $1; }
| '$' '{' expr '}' { $$ = $3; }
;
dim_offset:
/* empty */ { $$.op_type = IS_UNUSED; }
| expr { $$ = $1; }
;
ref_list:
object_property { $$ = $1; }
| ref_list T_OBJECT_OPERATOR { zend_do_push_object(&$1 CLS_CC); } object_property { $$ = $4; }
;
object_property:
object_dim_list { $$ = $1; }
| cvar_without_objects { zend_do_end_variable_parse(BP_VAR_R, 0 CLS_CC); } { znode tmp_znode; zend_do_pop_object(&tmp_znode CLS_CC); zend_do_fetch_property(&$$, &tmp_znode, &$1 CLS_CC);}
;
object_dim_list:
object_dim_list '[' dim_offset ']' { fetch_array_dim(&$$, &$1, &$3 CLS_CC); }
| object_dim_list '{' expr '}' { fetch_string_offset(&$$, &$1, &$3 CLS_CC); }
| variable_name { znode tmp_znode; zend_do_pop_object(&tmp_znode CLS_CC); zend_do_fetch_property(&$$, &tmp_znode, &$1 CLS_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 CLS_CC); }
| T_LIST '(' { zend_do_new_list_begin(CLS_C); } assignment_list ')' { zend_do_new_list_end(CLS_C); }
| /* empty */ { zend_do_add_list_element(NULL CLS_CC); }
;
array_pair_list:
/* empty */ { zend_do_init_array(&$$, NULL, NULL, 0 CLS_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 CLS_CC); }
| non_empty_array_pair_list ',' expr { zend_do_add_array_element(&$$, &$3, NULL, 0 CLS_CC); }
| expr T_DOUBLE_ARROW expr { zend_do_init_array(&$$, &$3, &$1, 0 CLS_CC); }
| expr { zend_do_init_array(&$$, &$1, NULL, 0 CLS_CC); }
| non_empty_array_pair_list ',' expr T_DOUBLE_ARROW '&' w_cvar { zend_do_add_array_element(&$$, &$6, &$3, 1 CLS_CC); }
| non_empty_array_pair_list ',' '&' w_cvar { zend_do_add_array_element(&$$, &$4, NULL, 1 CLS_CC); }
| expr T_DOUBLE_ARROW '&' w_cvar { zend_do_init_array(&$$, &$4, &$1, 1 CLS_CC); }
| '&' w_cvar { zend_do_init_array(&$$, &$2, NULL, 1 CLS_CC); }
;
encaps_list:
encaps_list encaps_var { zend_do_end_variable_parse(BP_VAR_R, 0 CLS_CC); zend_do_add_variable(&$$, &$1, &$2 CLS_CC); }
| encaps_list T_STRING { zend_do_add_string(&$$, &$1, &$2 CLS_CC); }
| encaps_list T_NUM_STRING { zend_do_add_string(&$$, &$1, &$2 CLS_CC); }
| encaps_list T_ENCAPSED_AND_WHITESPACE { zend_do_add_string(&$$, &$1, &$2 CLS_CC); }
| encaps_list T_CHARACTER { zend_do_add_char(&$$, &$1, &$2 CLS_CC); }
| encaps_list T_BAD_CHARACTER { zend_do_add_string(&$$, &$1, &$2 CLS_CC); }
| encaps_list '[' { $2.u.constant.value.lval = (long) '['; zend_do_add_char(&$$, &$1, &$2 CLS_CC); }
| encaps_list ']' { $2.u.constant.value.lval = (long) ']'; zend_do_add_char(&$$, &$1, &$2 CLS_CC); }
| encaps_list '{' { $2.u.constant.value.lval = (long) '{'; zend_do_add_char(&$$, &$1, &$2 CLS_CC); }
| encaps_list '}' { $2.u.constant.value.lval = (long) '}'; zend_do_add_char(&$$, &$1, &$2 CLS_CC); }
| encaps_list T_OBJECT_OPERATOR { znode tmp; $2.u.constant.value.lval = (long) '-'; zend_do_add_char(&tmp, &$1, &$2 CLS_CC); $2.u.constant.value.lval = (long) '>'; zend_do_add_char(&$$, &tmp, &$2 CLS_CC); }
| /* empty */ { zend_do_init_string(&$$ CLS_CC); }
;
encaps_var:
T_VARIABLE { zend_do_fetch_globals(&$1 CLS_CC); zend_do_begin_variable_parse(CLS_C); fetch_simple_variable(&$$, &$1, 1 CLS_CC); }
| T_VARIABLE '[' { zend_do_begin_variable_parse(CLS_C); } encaps_var_offset ']' { zend_do_fetch_globals(&$1 CLS_CC); fetch_array_begin(&$$, &$1, &$4 CLS_CC); }
| T_VARIABLE T_OBJECT_OPERATOR T_STRING { zend_do_begin_variable_parse(CLS_C); fetch_simple_variable(&$2, &$1, 1 CLS_CC); zend_do_fetch_property(&$$, &$2, &$3 CLS_CC); }
| T_DOLLAR_OPEN_CURLY_BRACES expr '}' { zend_do_begin_variable_parse(CLS_C); fetch_simple_variable(&$$, &$2, 1 CLS_CC); }
| T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '[' expr ']' '}' { zend_do_begin_variable_parse(CLS_C); fetch_array_begin(&$$, &$2, &$4 CLS_CC); }
| T_CURLY_OPEN cvar '}' { $$ = $2; }
;
encaps_var_offset:
T_STRING { $$ = $1; }
| T_NUM_STRING { $$ = $1; }
| T_VARIABLE { fetch_simple_variable(&$$, &$1, 1 CLS_CC); }
;
internal_functions_in_yacc:
T_ISSET '(' cvar ')' { zend_do_isset_or_isempty(ZEND_ISSET, &$$, &$3 CLS_CC); }
| T_EMPTY '(' cvar ')' { zend_do_isset_or_isempty(ZEND_ISEMPTY, &$$, &$3 CLS_CC); }
| T_INCLUDE expr { zend_do_include_or_eval(ZEND_INCLUDE, &$$, &$2 CLS_CC); }
| T_INCLUDE_ONCE expr { zend_do_include_or_eval(ZEND_INCLUDE_ONCE, &$$, &$2 CLS_CC); }
| T_EVAL '(' expr ')' { zend_do_include_or_eval(ZEND_EVAL, &$$, &$3 CLS_CC); }
| T_REQUIRE expr { zend_do_include_or_eval(ZEND_REQUIRE, &$$, &$2 CLS_CC); }
| T_REQUIRE_ONCE expr { zend_do_include_or_eval(ZEND_REQUIRE_ONCE, &$$, &$2 CLS_CC); }
;
%%
-56
View File
@@ -1,56 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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
#ifdef ZTS
class ZendFlexLexer : public yyFlexLexer
{
public:
virtual ~ZendFlexLexer();
int lex_scan(zval *zendlval CLS_DC);
void BeginState(int state);
};
#endif /* ZTS */
typedef struct _zend_lex_state {
#ifndef ZTS
YY_BUFFER_STATE buffer_state;
int state;
FILE *in;
#else
ZendFlexLexer *ZFL;
istream *input_file;
#endif
uint lineno;
char *filename;
} zend_lex_state;
void zend_fatal_scanner_error(char *);
inline void restore_lexical_state(zend_lex_state * CLS_DC);
BEGIN_EXTERN_C()
int zend_compare_file_handles(zend_file_handle *fh1, zend_file_handle *fh2);
END_EXTERN_C()
#endif
File diff suppressed because it is too large. Load diff
-428
View File
@@ -1,428 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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;
static inline int zend_list_do_insert(HashTable *list, void *ptr, int type, zend_bool valid)
{
int index;
zend_rsrc_list_entry le;
index = zend_hash_next_free_element(list);
if (index==0) index++;
le.ptr=ptr;
le.type=type;
le.refcount=1;
le.valid = valid;
zend_hash_index_update(list, index, (void *) &le, sizeof(zend_rsrc_list_entry), NULL);
return index;
}
static inline int zend_list_do_delete(HashTable *list,int id)
{
zend_rsrc_list_entry *le;
ELS_FETCH();
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;
}
}
static inline void *zend_list_do_find(HashTable *list,int id, int *type)
{
zend_rsrc_list_entry *le;
if (zend_hash_index_find(list, id, (void **) &le)==SUCCESS) {
*type = le->type;
return le->ptr;
} else {
*type = -1;
return NULL;
}
}
ZEND_API int zend_list_insert(void *ptr, int type)
{
ELS_FETCH();
return zend_list_do_insert(&EG(regular_list), ptr, type, 1);
}
ZEND_API int zend_plist_insert(void *ptr, int type)
{
ELS_FETCH();
return zend_list_do_insert(&EG(persistent_list), ptr, type, 1);
}
ZEND_API int zend_list_addref(int id)
{
zend_rsrc_list_entry *le;
ELS_FETCH();
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_list_delete(int id)
{
ELS_FETCH();
return zend_list_do_delete(&EG(regular_list), id);
}
ZEND_API int zend_plist_delete(int id)
{
ELS_FETCH();
return zend_list_do_delete(&EG(persistent_list), id);
}
ZEND_API int zend_list_convert_to_number(int id)
{
zend_rsrc_list_entry *le;
ELS_FETCH();
if (zend_hash_index_find(&EG(regular_list), id, (void **) &le)==SUCCESS
&& le->valid) {
return id;
}
return 0;
}
ZEND_API void *zend_list_find(int id, int *type)
{
ELS_FETCH();
return zend_list_do_find(&EG(regular_list), id, type);
}
ZEND_API void *zend_plist_find(int id, int *type)
{
ELS_FETCH();
return zend_list_do_find(&EG(persistent_list), id, type);
}
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 int zend_register_false_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type)
{
int rsrc_id;
ELS_FETCH();
rsrc_id = zend_list_do_insert(&EG(regular_list), rsrc_pointer, rsrc_type, 0);
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, 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, "No %s resource supplied", resource_type_name);
}
return NULL;
} else if ((*passed_id)->type != IS_RESOURCE) {
if (resource_type_name) {
zend_error(E_WARNING, "Supplied argument is not a valid %s resource", 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, "%d is not a valid %s resource", 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, "Supplied resource is not a valid %s resource", 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;
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);
}
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;
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);
}
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(ELS_D)
{
return zend_hash_init(&EG(regular_list), 0, NULL, list_entry_destructor, 0);
}
int zend_init_rsrc_plist(ELS_D)
{
return zend_hash_init_ex(&EG(persistent_list), 0, NULL, plist_entry_destructor, 1, 0);
}
void zend_destroy_rsrc_list(ELS_D)
{
zend_hash_graceful_destroy(&EG(regular_list));
}
void zend_destroy_rsrc_plist(ELS_D)
{
zend_hash_graceful_destroy(&EG(persistent_list));
}
static int clean_module_resource(zend_rsrc_list_entry *le, int *resource_id)
{
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)
{
if (ld->module_number == *module_number) {
ELS_FETCH();
zend_hash_apply_with_argument(&EG(regular_list), (int (*)(void *,void *)) clean_module_resource, (void *) &(ld->resource_id));
zend_hash_apply_with_argument(&EG(persistent_list), (int (*)(void *,void *)) clean_module_resource, (void *) &(ld->resource_id));
return 1;
} else {
return 0;
}
}
void zend_clean_module_rsrc_dtors(int module_number)
{
zend_hash_apply_with_argument(&list_destructors, (int (*)(void *,void *)) zend_clean_module_rsrc_dtors_cb, (void *) &module_number);
}
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;
}
int zend_init_rsrc_list_dtors(void)
{
return zend_hash_init(&list_destructors, 50, NULL, NULL, 1);
}
void zend_destroy_rsrc_list_dtors(void)
{
zend_hash_destroy(&list_destructors);
}
char *zend_rsrc_list_get_rsrc_type(int resource)
{
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:
*/
-110
View File
@@ -1,110 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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_bool valid;
} zend_rsrc_list_entry;
typedef void (*rsrc_dtor_func_t)(zend_rsrc_list_entry *rsrc);
#define ZEND_RSRC_DTOR_FUNC(name) void name(zend_rsrc_list_entry *rsrc)
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);
enum list_entry_type {
LE_DB=1000
};
void list_entry_destructor(void *ptr);
void plist_entry_destructor(void *ptr);
void zend_clean_module_rsrc_dtors(int module_number);
int zend_init_rsrc_list(ELS_D);
int zend_init_rsrc_plist(ELS_D);
void zend_destroy_rsrc_list(ELS_D);
void zend_destroy_rsrc_plist(ELS_D);
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_plist_insert(void *ptr, int type);
ZEND_API int zend_list_addref(int id);
ZEND_API int zend_list_delete(int id);
ZEND_API int zend_plist_delete(int id);
ZEND_API int zend_list_convert_to_number(int id);
ZEND_API void *zend_list_find(int id, int *type);
ZEND_API void *zend_plist_find(int id, int *type);
ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type);
ZEND_API int zend_register_false_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type);
ZEND_API void *zend_fetch_resource(zval **passed_id, 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);
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, 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, 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);
#endif
-294
View File
@@ -1,294 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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"
ZEND_API void zend_llist_init(zend_llist *l, size_t size, void (*dtor)(void *data), unsigned char persistent)
{
l->head = NULL;
l->tail = NULL;
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);
}
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);
}
#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);\
}
ZEND_API void zend_llist_del_element(zend_llist *l, void *element, int (*compare)(void *element1, void *element2))
{
zend_llist_element *current=l->head;
while (current) {
if (compare(current->data, element)) {
DEL_LLIST_ELEMENT(current,l);
break;
}
current = 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;
}
}
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;
if ((old_tail = l->tail)) {
if (l->tail->prev) {
l->tail->prev->next = NULL;
}
l->tail = l->tail->prev;
pefree(old_tail, l->persistent);
}
}
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, void (*func)(void *data))
{
zend_llist_element *element;
for (element=l->head; element; element=element->next) {
func(element->data);
}
}
ZEND_API void zend_llist_sort(zend_llist *l, llist_compare_func_t comp_func)
{
int list_size=0, i;
zend_llist_element **elements;
zend_llist_element *element, **ptr;
for (element=l->head; element; element=element->next) {
list_size++;
}
if (list_size == 0) {
return;
}
elements = (zend_llist_element **) emalloc(list_size*sizeof(zend_llist_element *));
ptr = &elements[0];
for (element=l->head; element; element=element->next) {
*ptr++ = element;
}
qsort(elements, list_size, sizeof(zend_llist_element *), (int (*)(const void *, const void *)) comp_func);
l->head = elements[0];
elements[0]->prev = NULL;
for (i=1; i<list_size; 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, void (*func)(void *data, void *arg), void *arg)
{
zend_llist_element *element;
for (element=l->head; element; element=element->next) {
func(element->data, arg);
}
}
ZEND_API void zend_llist_apply_with_arguments(zend_llist *l, llist_apply_with_args_func_t func, 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);
}
va_end(args);
}
ZEND_API int zend_llist_count(zend_llist *l)
{
zend_llist_element *element;
int element_count=0;
for (element=l->head; element; element=element->next) {
element_count++;
}
return element_count;
}
ZEND_API void *zend_llist_get_first_ex(zend_llist *l, zend_llist_position *pos)
{
zend_llist_position *current = pos ? pos : &l->traverse_ptr;
*current = l->head;
if (*current) {
return (*current)->data;
} else {
return NULL;
}
}
ZEND_API void *zend_llist_get_last_ex(zend_llist *l, zend_llist_position *pos)
{
zend_llist_position *current = pos ? pos : &l->traverse_ptr;
*current = l->tail;
if (*current) {
return (*current)->data;
} else {
return NULL;
}
}
ZEND_API void *zend_llist_get_next_ex(zend_llist *l, zend_llist_position *pos)
{
zend_llist_position *current = pos ? pos : &l->traverse_ptr;
if (*current) {
*current = (*current)->next;
if (*current) {
return (*current)->data;
}
}
return NULL;
}
ZEND_API void *zend_llist_get_prev_ex(zend_llist *l, zend_llist_position *pos)
{
zend_llist_position *current = pos ? pos : &l->traverse_ptr;
if (*current) {
*current = (*current)->prev;
if (*current) {
return (*current)->data;
}
}
return NULL;
}
-77
View File
@@ -1,77 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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 struct _zend_llist {
zend_llist_element *head;
zend_llist_element *tail;
size_t size;
void (*dtor)(void *data);
unsigned char persistent;
zend_llist_element *traverse_ptr;
} zend_llist;
typedef int (*llist_compare_func_t)(const zend_llist_element *, const zend_llist_element *);
typedef void(*llist_apply_with_arg_func_t)(void *data, void *arg);
typedef void(*llist_apply_with_args_func_t)(void *data, int num_args, va_list args);
typedef void (*llist_apply_func_t)(void *);
typedef zend_llist_element* zend_llist_position;
BEGIN_EXTERN_C()
ZEND_API void zend_llist_init(zend_llist *l, size_t size, void (*dtor)(void *data), 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);
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, void *arg);
ZEND_API void zend_llist_apply_with_arguments(zend_llist *l, llist_apply_with_args_func_t func, 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);
/* 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 */
-85
View File
@@ -1,85 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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 ELS_DC
#define INIT_FUNC_ARGS_PASSTHRU type, module_number ELS_CC
#define SHUTDOWN_FUNC_ARGS int type, int module_number
#define SHUTDOWN_FUNC_ARGS_PASSTHRU type, module_number
#define ZEND_MODULE_INFO_FUNC_ARGS zend_module_entry *zend_module
#define ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU zend_module
#define GINIT_FUNC_ARGS void
#define GINIT_FUNC_ARGS_PASSTHRU
ZEND_API extern unsigned char first_arg_force_ref[];
ZEND_API extern unsigned char first_arg_allow_ref[];
ZEND_API extern unsigned char second_arg_force_ref[];
ZEND_API extern unsigned char second_arg_allow_ref[];
#define ZEND_MODULE_API_NO 20001222
#ifdef ZTS
#define USING_ZTS 1
#else
#define USING_ZTS 0
#endif
#define STANDARD_MODULE_PROPERTIES_EX 0, 0, 0, NULL, 0, ZEND_DEBUG, USING_ZTS, ZEND_MODULE_API_NO
#define STANDARD_MODULE_PROPERTIES \
NULL, NULL, STANDARD_MODULE_PROPERTIES_EX
#define MODULE_PERSISTENT 1
#define MODULE_TEMPORARY 2
typedef struct _zend_module_entry zend_module_entry;
struct _zend_module_entry {
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);
int (*global_startup_func)(void);
int (*global_shutdown_func)(void);
int globals_id;
int module_started;
unsigned char type;
void *handle;
int module_number;
unsigned char zend_debug;
unsigned char zts;
unsigned int zend_api;
};
extern ZEND_API HashTable module_registry;
void module_destructor(zend_module_entry *module);
int module_registry_cleanup(zend_module_entry *module);
int module_registry_request_startup(zend_module_entry *module);
#define ZEND_MODULE_DTOR (void (*)(void *)) module_destructor
#endif
-404
View File
@@ -1,404 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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)
{
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)
{
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 CLS_DC)
{
op_array->type = type;
#if SUPPORT_INTERACTIVE
{
ELS_FETCH();
op_array->start_op_number = op_array->end_op_number = op_array->last_executed_op_number = 0;
op_array->backpatch_count = 0;
if (EG(interactive)) {
/* We must avoid a realloc() on the op_array in interactive mode, since pointers to constants
* will become invalid
*/
initial_ops_size = 8192;
}
}
#endif
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(CLS_C);
op_array->arg_types = 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->uses_globals = 0;
op_array->return_reference = 0;
op_array->done_pass_two = 0;
zend_llist_apply_with_argument(&zend_extensions, (void (*)(void *, void *)) zend_extension_op_array_ctor_handler, op_array);
}
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 *ce)
{
if (--(*ce->refcount)>0) {
return;
}
switch (ce->type) {
case ZEND_USER_CLASS:
efree(ce->name);
efree(ce->refcount);
zend_hash_destroy(&ce->function_table);
zend_hash_destroy(&ce->default_properties);
break;
case ZEND_INTERNAL_CLASS:
free(ce->name);
free(ce->refcount);
zend_hash_destroy(&ce->function_table);
zend_hash_destroy(&ce->default_properties);
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;
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, (void (*)(void *, void *)) zend_extension_op_array_dtor_handler, op_array);
}
}
void init_op(zend_op *op CLS_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 CLS_DC)
{
zend_uint next_op_num = op_array->last++;
zend_op *next_op;
if (next_op_num >= op_array->size) {
#if SUPPORT_INTERACTIVE
ELS_FETCH();
if (EG(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();
}
#endif
op_array->size *= 4;
op_array_alloc_ops(op_array);
}
next_op = &(op_array->opcodes[next_op_num]);
init_op(next_op CLS_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 CLS_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++;
}
opline = get_next_op(op_array CLS_CC);
opline->opcode = ZEND_EXT_STMT;
SET_UNUSED(opline->op1);
SET_UNUSED(opline->op2);
}
static void zend_extension_op_array_handler(zend_extension *extension, zend_op_array *op_array)
{
if (extension->op_array_handler) {
extension->op_array_handler(op_array);
}
}
int pass_two(zend_op_array *op_array)
{
zend_op *opline=op_array->opcodes, *end=opline+op_array->last;
CLS_FETCH();
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 CLS_CC);
}
if (CG(handle_op_arrays)) {
zend_llist_apply_with_argument(&zend_extensions, (void (*)(void *, void *)) zend_extension_op_array_handler, op_array);
}
while (opline<end) {
if (opline->op1.op_type==IS_CONST) {
opline->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)
{
printf("Class %s:\n", class_entry->name);
zend_hash_apply(&class_entry->function_table, (int (*)(void *)) pass_two);
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
-238
View File
@@ -1,238 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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);
ZEND_API int sub_function(zval *result, zval *op1, zval *op2);
ZEND_API int mul_function(zval *result, zval *op1, zval *op2);
ZEND_API int div_function(zval *result, zval *op1, zval *op2);
ZEND_API int mod_function(zval *result, zval *op1, zval *op2);
ZEND_API int boolean_xor_function(zval *result, zval *op1, zval *op2);
ZEND_API int boolean_not_function(zval *result, zval *op1);
ZEND_API int bitwise_not_function(zval *result, zval *op1);
ZEND_API int bitwise_or_function(zval *result, zval *op1, zval *op2);
ZEND_API int bitwise_and_function(zval *result, zval *op1, zval *op2);
ZEND_API int bitwise_xor_function(zval *result, zval *op1, zval *op2);
ZEND_API int shift_left_function(zval *result, zval *op1, zval *op2);
ZEND_API int shift_right_function(zval *result, zval *op1, zval *op2);
ZEND_API int concat_function(zval *result, zval *op1, zval *op2);
ZEND_API int is_equal_function(zval *result, zval *op1, zval *op2);
ZEND_API int is_identical_function(zval *result, zval *op1, zval *op2);
ZEND_API int is_not_identical_function(zval *result, zval *op1, zval *op2);
ZEND_API int is_not_equal_function(zval *result, zval *op1, zval *op2);
ZEND_API int is_smaller_function(zval *result, zval *op1, zval *op2);
ZEND_API int is_smaller_or_equal_function(zval *result, zval *op1, zval *op2);
static inline int is_numeric_string(char *str, int length, long *lval, double *dval)
{
long local_lval;
double local_dval;
char *end_ptr;
if (!length) {
return 0;
}
errno=0;
local_lval = strtol(str, &end_ptr, 10);
if (errno!=ERANGE && end_ptr == str+length) { /* integer string */
if (lval) {
*lval = local_lval;
}
return IS_LONG;
}
errno=0;
local_dval = strtod(str, &end_ptr);
if (errno!=ERANGE && end_ptr == 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
}
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);
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);
ZEND_API int numeric_compare_function(zval *result, zval *op1, zval *op2);
ZEND_API int string_compare_function(zval *result, zval *op1, zval *op2);
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);
ZEND_API void zend_compare_arrays(zval *result, zval *a1, zval *a2);
ZEND_API void zend_compare_objects(zval *result, zval *o1, zval *o2);
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); \
}
#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_OBJPROP(zval) (zval).value.obj.properties
#define Z_OBJCE(zval) (zval).value.obj.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_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_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_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_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
-125
View File
@@ -1,125 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 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/0_92.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 inline void zend_ptr_stack_push(zend_ptr_stack *stack, void *ptr)
{
if (stack->top >= stack->max) { /* we need to allocate more memory */
stack->elements = (void **) erealloc(stack->elements, (sizeof(void *) * (stack->max *= 2 )));
stack->top_element = stack->elements+stack->top;
}
stack->top++;
*(stack->top_element++) = ptr;
}
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 inline void *zend_ptr_stack_pop(zend_ptr_stack *stack)
{
stack->top--;
return *(--stack->top_element);
}
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 1569 files, more files were not shown because too many files have changed in this diff. Show more