Compare commits

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

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

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

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

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

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

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

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

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

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

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

<?php

class IEEventSinker {
	var $terminated = false;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reported by c@cornelia-boenigk.de

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

Suggested By:   Cliff Woolley

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Also factorize the header file checks.

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

	2) mysql_character_set_name	returns the current character set for the connection

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

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

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

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

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

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

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

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

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

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

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

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

		function Trampoline()
		{
			Hello();
		}
	}

	import function Trampoline from MyClass;

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

No files matched your search

+15
View File
@@ -60,6 +60,19 @@ Exceptions:
check its man page again, and only then, consider using it, and even then,
try avoiding it.
[7] Use ZEND_* macros instead of PHP_* macros. Use of PHP_* macros is not
recommended. Since most of the PHP_* macros are ZEND_* macro aliases, using
the PHP_* macros makes browsing the source code with a tag search harder.
[8] Use assert(). assert.h is included in php.h if it is available. Not only
does good assertion catch bugs, but it also helps with code readability.
- Do not use assert for error handling. Use assert only for the
condition that must be always true.
- Do not use assignments in assert conditions. If you assign inside an
assert condition, you risk an elusive bug that would be very difficult
to spot in a debug build, due to the side effect of the assignment.
Function calls in assert conditions may also cause this problem, if
they modify one of their arguments or global variables.
Naming Conventions
------------------
@@ -134,6 +147,8 @@ Syntax and indentation
style. This applies to just about everything, starting with
indentation and comment styles and up to function declaration
syntax.
(see also http://www.tuxedo.org/~esr/jargon/html/entry/indent-style.html)
[3] Be generous with whitespace and braces. Always prefer:
+1 -1
View File
@@ -1,2 +1,2 @@
For the list of people who've put work into PHP 4.0, please see
For the list of people who've put work into PHP, please see
http://www.php.net/credits.php
+14480 -25699
View File
File diff suppressed because it is too large. Load diff
BIN
View File
Binary file not shown.
+42 -13
View File
@@ -36,6 +36,11 @@ PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: apache2
PRIMARY MAINTAINER: Aaron Bannert <aaron@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: cgi
MAINTENANCE: Unknown
STATUS: Working
@@ -98,7 +103,7 @@ PRIMARY MAINTAINER: Marc Boeren <M.Boeren@guidance.nl>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 4.0.6
COMMENT: DB abstraction for odbc, mysql, pgsql, mssql, fbsql
COMMENT: DB abstraction for odbc, mysql, pgsql, mssql, fbsql and more, see documentation
-------------------------------------------------------------------------------
EXTENSION: filepro
MAINTENANCE: Unknown
@@ -129,6 +134,12 @@ EXTENSION: msql
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: msession
PRIMARY MAINTAINER Mark L. Woodward mlwmohawk@mohawksoft.com
MAINTENANCE: Maintained
STATUS: Working/Experimental
COMMENT: Tested on Linux, should work on other UNIX platforms. Backend server code can compile under Windows.
-------------------------------------------------------------------------------
EXTENSION: mssql
PRIMARY MAINTAINER: Frank M. Kromann <fmk@swwwing.com>
MAINTENANCE: Maintained
@@ -143,6 +154,7 @@ EXTENSION: pgsql
PRIMARY MAINTAINER: Yasuo Ohgaki <yohgaki@php.net>
MAINTENANCE: Maintained
STATUS: Working
COMMENT: Use PostgreSQL 7.0.x or later. PostgreSQL 6.5.3 or less have fatal bug.
-------------------------------------------------------------------------------
EXTENSION: sybase
MAINTENANCE: Unknown
@@ -158,7 +170,7 @@ MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: odbc
PRIMARY MAINTAINER: Andreas Karajannis <Karajannis@gmd.de>
PRIMARY MAINTAINER: Daniel R. Kalowsky <kalowsky@php.net>
MAINTENANCE: Maintained
STATUS: Working
COMMENT: Working except for persistent connections
@@ -190,8 +202,9 @@ STATUS: Working
SINCE: 4.0.3
-------------------------------------------------------------------------------
EXTENSION: calendar
MAINTENANCE: Unknown
STATUS: Unknown
PRIMARY MAINTAINER: Hartmut Holzgraefe <hartmut@six.de>
MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: com
PRIMARY MAINTAINER: Harald Radi <h.radi@nme.at>
@@ -208,6 +221,11 @@ MAINTENANCE: Unknown
STATUS: Experimental
SINCE: 4.0.5
-------------------------------------------------------------------------------
EXTENSION: ctype
PRIMARY MAINTAINER: Hartmut Holzgraefe <hartmut@six.de>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: curl
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
MAINTENANCE: Maintained
@@ -230,9 +248,10 @@ MAINTENANCE: Maintained
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: exif
MAINTENANCE: Unknown
STATUS: Unknown
SINCE: 4.0.1
PRIMARY MAINTAINER: Marcus Boerger <helly@php.net>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 4.2
-------------------------------------------------------------------------------
EXTENSION: fdf
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
@@ -272,8 +291,13 @@ MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: ldap
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
MAINTENANCE: Odd Fixes
PRIMARY MAINTAINER: Stig Venaas <venaas@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: mbstring
PRIMARY MAINTAINER: Rui Hirokawa <hirokawa@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: mcal
@@ -282,7 +306,7 @@ MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: mcrypt
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
PRIMARY MAINTAINER: Derick Rethans <d.rethans@jdimedia.nl>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
@@ -359,7 +383,7 @@ STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: sablot
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
MAINTENANCE: Maintained
MAINTENANCE: Obsolete
STATUS: Experimental
SINCE: 4.0.3
-------------------------------------------------------------------------------
@@ -375,8 +399,8 @@ MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: shmop
PRIMARY MAINTAINER: Unknown
MAINTENANCE: Unknown
PRIMARY MAINTAINER: Ilia Alshanetsky <iliaa@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
SINCE: 4.0.3
-------------------------------------------------------------------------------
@@ -420,6 +444,11 @@ PRIMARY MAINTAINER: Thies C. Arntzen <thies@thieso.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: xslt
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
MAINTENANC: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: yaz
PRIMARY MAINTAINER: Adam Dickmeiss <adam@indexdata.dk>
MAINTENANCE: Maintained
+44 -39
View File
@@ -1,9 +1,17 @@
Installation Instructions for PHP 4.0
-------------------------------------
Installation Instructions for PHP 4
-----------------------------------
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.
STOP!
Before going any further, please remember you are going to find more
up to date instructions in the online manual, located here:
http://www.php.net/manual/en/install.apache.php
It is strongly recommended that you read the manual page before going
further. However, for the impatient, here is a quick set of steps that
will build PHP as (first) a dynamic Apache module (DSO) for Apache 1.3.x
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:
@@ -14,24 +22,26 @@ files:
sapi/thttpd/README
README.Zeus
Note! Only install either the static module or the dynamic one. Do not
install both.
Some notes:
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.
1: Only install either the static module or the dynamic one. Do not
install both.
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:
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.
/usr/local/lib/mysql/libmysqlclient.so
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:
Make sure /etc/ld.so.conf contains:
/usr/local/lib/mysql/libmysqlclient.so
/usr/local/lib/mysql
Make sure /etc/ld.so.conf contains:
Then run ldconfig.
/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.
@@ -52,8 +62,8 @@ Compiled-in modules:
Chances are you will see a lot more modules than these two. That's ok,
as long as mod_so.c shows up you can proceed with the following steps:
$ gunzip -c php-4.0.x.tar.gz | tar xf -
$ cd php-4.0.x
$ gunzip -c php-4.x.y.tar.gz | tar xf -
$ cd php-4.x.y
$ ./configure --with-mysql --with-apxs
$ make
$ make install
@@ -83,9 +93,9 @@ $ 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
$ gunzip -c php-4.x.y.tar.gz | tar xf -
$ cd php-4.x.y
$ ./configure --with-mysql --with-apache=../apache_1.3.x
$ make
$ make install
@@ -96,7 +106,7 @@ $ ./configure --prefix=/www --activate-module=src/modules/php4/libphp4.a
$ make
(you should now have an httpd binary which you can copy to your Apache bin dir if
is is your first install then you need to "make install" as well)
$ cd ../php-4.0.x
$ cd ../php-4.x.y
$ cp php.ini-dist /usr/local/lib/php.ini
You can edit /usr/local/lib/php.ini file to set PHP options.
Edit your httpd.conf or srm.conf file and add:
@@ -115,12 +125,12 @@ Installing PHP can be done in four simple steps:
1. Unpack your distribution file.
You will have downloaded a file named something like php-4.0.x.tar.gz.
Unzip this file with a command like: gunzip php-4.0.x.tar.gz
You will have downloaded a file named something like php-4.x.y.tar.gz.
Unzip this file with a command like: gunzip php-4.x.y.tar.gz
Next you have to untar it with: tar -xvf php-4.0.x.tar
Next you have to untar it with: tar -xvf php-4.x.y.tar
This will create a php-4.0.x directory. cd into this new directory.
This will create a php-4.x.y directory. cd into this new directory.
2a. Configure PHP (Dynamic Module) - Skip to 2b if you wish to build
a static module
@@ -380,16 +390,11 @@ WHY DISABLING -fPIC WORKS ON LINUX
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:
With some (newer) installations of Apache, it's possible to compile both
PHP 3 and PHP 4, and run them concurrently.
- 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
Note, it's only really wise to do this if you need to use the PHP 3 engine
to maintain backwards compatibility.
To enable it, configure PHP 3 and PHP 4 to use APXS (--with-apxs) and the
necessary link extensions (--enable-versioning). Otherwise, all standard
@@ -399,8 +404,8 @@ USING PHP 3 AND PHP 4 AS CONCURRENT APACHE MODULES
--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
+5 -16
View File
@@ -1,6 +1,6 @@
--------------------------------------------------------------------
The PHP License, version 2.02
Copyright (c) 1999, 2000 The PHP Group. All rights reserved.
The PHP License, version 3.0a1
Copyright (c) 1999 - 2002 The PHP Group. All rights reserved.
--------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -37,20 +37,6 @@ are met:
"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
@@ -73,3 +59,6 @@ The PHP Group can be contacted via Email at group@php.net.
For more information on the PHP Group and the PHP project,
please see <http://www.php.net>.
This product includes the Zend Engine, freely available at
<http://www.zend.com>.
+18
View File
@@ -0,0 +1,18 @@
$(builddir)/zend_language_scanner.lo: $(builddir)/zend_language_parser.h
$(builddir)/zend_ini_scanner.lo: $(builddir)/zend_ini_parser.h
$(builddir)/zend_language_scanner.c: $(srcdir)/zend_language_scanner.l
$(LEX) -Pzend -S$(srcdir)/flex.skl -o$@ -i $(srcdir)/zend_language_scanner.l
$(builddir)/zend_language_parser.h: $(builddir)/zend_language_parser.c
$(builddir)/zend_language_parser.c: $(srcdir)/zend_language_parser.y
$(YACC) -p zend -v -d $(srcdir)/zend_language_parser.y -o $@
$(builddir)/zend_ini_parser.h: $(builddir)/zend_ini_parser.c
$(builddir)/zend_ini_parser.c: $(srcdir)/zend_ini_parser.y
$(YACC) -p ini_ -v -d $(srcdir)/zend_ini_parser.y -o $@
$(builddir)/zend_ini_scanner.c: $(srcdir)/zend_ini_scanner.l
$(LEX) -Pini_ -S$(srcdir)/flex.skl -o$@ -i $(srcdir)/zend_ini_scanner.l
$(builddir)/zend_indent.lo $(builddir)/zend_highlight.lo $(builddir)/zend_compile.lo: $(builddir)/zend_language_parser.h
+72
View File
@@ -0,0 +1,72 @@
mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p
INSTALL = $(top_srcdir)/build/shtool install -c
INSTALL_DATA = $(INSTALL) -m 644
DEFS = -DPHP_ATOM_INC -I$(top_builddir)/include -I$(top_builddir)/main -I$(top_srcdir)
COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS)
all: $(all_targets)
build-modules: $(PHP_MODULES)
libphp4.la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
libs/libphp4.bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
$(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp4.so
php: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
$(LIBTOOL) --mode=link $(CC) -export-dynamic $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
sapi/cli/php: $(PHP_GLOBAL_OBJS) $(PHP_CLI_OBJS)
$(LIBTOOL) --mode=link $(CC) -export-dynamic $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_CLI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
install: $(install_targets)
install-cli: sapi/cli/php
$(INSTALL_CLI)
install-sapi: libphp4.la
-@$(LIBTOOL) --silent --mode=install cp libphp4.la $(phptempdir)/libphp4.la >/dev/null 2>&1
-@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
-@if test ! -r $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME); then \
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) $(INSTALL_ROOT)$(EXTENSION_DIR) && \
echo "installing shared modules into $(EXTENSION_DIR)" && \
rm -f modules/*.la && \
cp modules/* $(INSTALL_ROOT)$(EXTENSION_DIR) >/dev/null 2>&1 || true
install-tester:
@echo "Installing regression tester"
@$(mkinstalldirs) $(PEAR_INSTALLDIR)
@$(INSTALL) -m 755 $(top_srcdir)/run-tests.php $(INSTALL_ROOT)$(PEAR_INSTALLDIR)
install-su: install-pear install-tester
test: sapi/cli/php
@TEST_PHP_EXECUTABLE=$(top_builddir)/sapi/cli/php \
$(top_builddir)/sapi/cli/php -c php.ini-dist $(top_srcdir)/run-tests.php
clean:
find . -name \*.lo -o -name \*.o -o -name \*.la -o -name \*.a| xargs rm -f
find . -name .libs -a -type d|xargs rm -rf
rm -f libphp4.la php sapi/cli/php modules/* libs/*
distclean: clean
rm -f config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h php4.spec sapi/apache/libphp4.module buildmk.stamp
find . -name Makefile | xargs rm -f
.PHONY: all clean install distclean test
.NOEXPORT:
-63
View File
@@ -1,63 +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) $(INSTALL_ROOT)$(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) $(INSTALL_ROOT)$(moduledir) && \
echo "installing shared modules into $(moduledir)" && \
rm -f modules/*.la && \
cp modules/* $(INSTALL_ROOT)$(moduledir) >/dev/null 2>&1 || true
install-tester:
@echo "Installing regression tester"
@$(mkinstalldirs) $(PEAR_INSTALLDIR)
@$(INSTALL) -m 755 $(srcdir)/run-tests.php $(INSTALL_ROOT)$(PEAR_INSTALLDIR)
install-pear: install-modules
(cd pear && $(MAKE) install)
install-su: install-pear install-tester
.NOEXPORT:
+351 -34
View File
@@ -1,25 +1,317 @@
PHP 4 NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 200?, Version 4.2.0-dev
?? ??? 2002, Version 4.3.0
- Added preliminary SAX-Input support. It's now possible to build a DomDocument
with SAX-Events (added domxml_parser_start_document(), domxml_parser_end_document(),
domxml_parser_start_element(tagname[,attributes]), domxml_parser_end_element(tagname),
domxml_parser_characters(characters), domxml_parser_cdata_block(cdata),
domxml_parser_comment(comment), domxml_parser_get_document(). (chregu)
- Bundle gd library 2.0.1 with php (ext/gd/libgd) (Rasmus), tweak config.m4 to
work with it (Jani), smallers tweaks for Win32 (Markus, Edin)
- Fixed bug with Apache which let PHP_AUTH_* variables to be set when
external basic auth mechanism was used. (Jani)
- Fixed bzopen() crash in thread-safe mode. (Andrei)
- Added better error-messages (3rd parameter) and validating of DTDs (2nd
parameter) to domxml_open_mem() and domxml_open_file(). (Christian)
- Added domxml_doc_validate() for validating existing DomDocuments with a DTD.
(Christian)
- Added ability to capture string offsets in preg_match_*() results.
(David Brown, Andrei)
- Fixed set_error_handler() to accept methods as callbacks and also report
invalid callbacks. (Andrei)
- Fixed a memory corruption bug in overload extension. (Andrei)
- Fixed error handling in fsockopen() on win32. (Jason)
- Added win32 support for the timeout parameter of fsockopen(). (Jason)
- Fixed shuffle() to provide equal distribution of values. (Andrei)
- Added --with-mysql-sock configure option which can be used to override
the unix socket location. (e.g. NFS compiles, etc.) (James Cox)
- Fixed is_a() to properly work on extension registered classes. (Andrei)
- Added new constants: PHP_PREFIX and PHP_SHLIB_SUFFIX. (Stig)
- Added STDIN, STDOUT and STDERR constants for CLI sapi reflecting opened
streams to their respective I/O counterparts. (Edin)
- Added pctnl_alarm() function. (Edin)
- Fixed array_rand() on thread-safe platforms such as Windows. (Edin)
- If zlib.output_compression is enabled and a page is compressed
a "Vary: Accept-Encoding" header is added. (Stefan)
- Renamed getallheaders() to apache_request_headers() and kept getallheaders()
as an alias to it. Also added apache_response_headers() which returns the
current response headers from Apache. (Rasmus)
- Added missing AddRef() calls in the COM extension. This should fix weird
behaviour (in particular with ADODB). (Harald)
- Fixed some dummy errors. (dets)
- Fix segfault in version_compare(). (Stig)
- Added compressed Flash MX files support to getimagesize(). (Derick)
- Added ability to capture string offsets in preg_split() results.
(David Brown, Andrei)
- Fixed a crash bug in token_get_all(). (Andrei)
- Implemented glob() for Unix/Win32. (Hartmut, Edin, Markus)
- Added domxml_doc_set_root() to change the root node. (Lukas Schroeder)
- Fixed a crash bug in stripslashes() when working in sybase mode. (Rasmus)
- Added experimental support for Simplified Chinese, Traditional Chinese and
Korean encodings into mbstring. (Rui)
- Misc. Win32 mail() enhancements: support 'From:' header (msisolak@yahoo.com),
support Bcc header, case-insensitive headers, enhanced error reporting,
automatic proper line ending conversion, fix crash with Cc, fix buffer
overflows with $header. (Markus)
- Improved IMAP extension performance. (adam.kauffman@mindspring.com,
rjs3@andrew.cmu.edu, Jon)
- Added optional 5th parameter to domxml_xslt_process(). When set, profiling
information is saved to the specified file. (chregu)
- Added MD5 support for crypt() on Windows. (Edin)
- Fixed resource bug in LDAP extension. (Stig Venaas)
- Fixed crash in output buffering when buffer is overwritten in a callback.
(Yasuo)
- Added output_add_rewrite_var() and output_remove_rewrite_var() to inject
and remove variables from the URL-Rewriter. (Thies)
- The Windows build can now be configured more comfortably, for example
when dealing with built-in extensions. (Sebastian)
- Added optional 3rd parameter to mysql_select_db() which makes it return
the previously selected database name. (Jani)
- Added large OID value (2^31 to 2^32) support for pg_lo_import(),
pg_lo_unlink(), pg_lo_open() and pg_lo_export(). (Yasuo)
- Made the mbstring extension to be enabled by default. (Yasuo)
- Fixed mixing OCIPlogon() and OCINLogon() to not leak Oracle-Sessions. (Thies)
- Added php.ini options for EXIF extension to encode and decode Unicode/JIS
user comments. (Marcus)
- Changed the "-c" CLI/CGI option to allow both 'filename' and
'path to php.ini'. (Yasuo)
- Added version information to the .dll and .exe files created under Windows.
(jtate)
- Added __FUNCTION__ and __CLASS__ constants. (Jani, Zend Engine)
- Added pg_metadate(), pg_convert(), pg_insert(), pg_select(), pg_update()
and pg_delete(). (Yasuo)
- Added optional 2nd parameter for pg_result_status() to specify return type.
(Yasuo)
- Added "log_errors_max_len" php.ini option which controls maximum length for
error messages. (Marcus)
- Added "ignore_repeated_errors" and "ignore_repeated_source" php.ini options
which can be used to disable logging of repeated error messages. (Marcus)
- Made pg_last_notice() work correctly. (Yasuo)
- Added "pgsql.ignore_notice" and "pgsql.log_notice" php.ini options. (Yasuo)
- Added "zlib.output_compression_level" php.ini option. (Stig)
- Added support for --with-apxs build on Mac OS X / Darwin. (markonen)
- Added support for dynamically loaded extensions on OS X / Darwin.
NOTE: This requires Apache 1.3.25 or later. (kalowsky, markonen)
- Fixed CR/LF processing in quoted_printable_decode() on Win32. (kir)
- Made crack extension available on Win32. Cracklib libraries for Win32 are
available at http://www.jtatesoftware.com/cracklib/. (jtate)
- Added mysql_info() function. (Jan)
- Added mysql_list_processes() and mysql_stat() functions. (Georg)
- Added file_get_contents() which returns the contents of a file as a string.
This function also supports the URL wrappers. (Wez)
- Changed 'zlib:' fopen wrapper to 'compress.zlib://' to avoid ambiguities
when filenames have ':' characters. (Wez)
- Added URL-wrapper support to exif. (Marcus)
- PHP now has a new stream system that allows it to do some clever stuff with
fopen() and fsockopen(). As a result:
. URL wrappers natively supports https:// URLs
. fsockopen() adds support for ssl:// and tls:// connections via TCP/IP
. copy($srcfilename, $destfilename) can now be used with URL wrappers
. zlib wrappers/streams can be used even on systems without fopencookie()
. Added 'compress.bzip2://' stream and wrapper support.
. Added user-space streams - it is now possible to define a class in PHP
code and register it as a URL wrapper.
. Most extensions now support streams when passing files, which means
that those extensions will support URL wrappers. (Wez)
. Added memory stream support. (Marcus)
- Fixed memory allocation problem on systems that have iconv() support in libc.
(Yasuo)
- Made var_dump() handle recursive structures better. (Yasuo)
- Added exif_imagetype() function. (Marcus)
- New improved build system. Among other improvements, replaces the slow
recursive make with one global Makefile and eases the integration of proper
dependencies. Automake is only needed for its aclocal tool. The build
process is now more portable and less resource-consuming. (Sascha)
13 May 2002, Version 4.2.1
- Added safe-mode checks to show_source(), parse_ini_file() and rmdir(). Also
fixed security problems with safe_mode_include_dir directive. (Rasmus)
- Changed HTTP upload code to accept 0 byte file uploads. (Zeev)
- Major update of domxml. New functions, better DOM compliance and bug fixes:
* Changed the old $node->append_child() to $node->append_sibling() since
the new append_child() behaves correctly (= W3C standard).
* Added domxml functions:
. domxml_elem_get_elements_by_tagname()
. domxml_doc_get_elements_by_tagname()
. domxml_doc_get_element_by_id()
. domxml_elem_remove_attribute()
. domxml_elem_get_attribute_node()
* Fixed a segfault in domxml_unlink().
* Added formatting option to domxml_dump_mem().
(Uwe, jtate, Chregu)
- Fixed a bug in socket_select() that could cause unexpected behavior when
using a statement like $w = $e = array($sock); This change unfortunately
prevents the use of constant values (e.g. NULL) for the socket array
paramaters. Instead, use a temporary variable or an expression with the
leftmost member being a temporary variable. ex.:
socket_select($w, $r, $e = NULL, 10); (Jason)
- Fixed crashes in the session serializer. (Stas)
- Fixed malformed atime/mtime with touch(). (Yasuo)
- Fixed a couple of bugs in array_sum() and array_merge(). (Andrei)
- Fixed SJIS directory name handling under Windows. (Rui)
- Fixed empty mb_output_handler() output when Content-Type is specified.
(Yasuo)
- Fixed the false logic in ext/session which made SID constant not to be
defined when cookies are disabled. (Sascha)
- Fixed possible crash bug in HTTP uploads. (Patch: Lucas Schroeder)
- Fixed possible NULL-pointer dereferencing in the COM extension which
caused 'Error in php_OLECHAR_to_char()' warnings on various places.
Also modified the API to consistently return NULL in case of an error.
(Alan, Harald)
- Fixed a bug in the COM extension that caused outproc servers to 'hang'
because of a missing Release() call. (Alan, Harald)
22 Apr 2002, Version 4.2.0
- ATTENTION!! register_globals defaults to 'off' now !!!
- Note: Apache2 support is EXPERIMENTAL.
- PostgreSQL functions are renamed, but all old function names are available.
Old function names will be available long enough. User can safely use old
function names. (Yasuo)
- Moved ext/mailparse to PECL. See http://thebrainroom.com/opensource/php/
for more information and to download the extension. (Wez/Jim)
- Fixed pg_last_notice() crash. (Yasuo)
- Modified the mysql extension to disable 'LOAD LOCAL' when safe mode is
enabled. (Jason)
- Added CLI (command line interface) sapi which is more suitable for writing
shell scripts. Some of the differences to CGI sapi are: no HTTP headers,
plain text error messages, does not change working directory, have a new -r
option which executes a piece of PHP code directly from the commmand line, etc.
"make install" will install CLI SAPI version of php in {PREFIX}/bin/php while
CGI is renamed and installed as {PREFIX}/bin/php-cgi. (Edin)
- Fixed HTTP file upload support to handle big files better. (Jani)
- Major modifications to the Sockets Extension and its API (Jason):
. Fixed numerous bugs.
. Added automatic host lookup capability to all functions that take addr's.
example: socket_connect($sock, 'www.yahoo.com', 80);
. Corrected and standardized host lookup errors
. Modified socket_recv() behavior. [$r=socket_recv($sock, $buf, $len, $flags)]
. Added socket_set_block() which changes a socket into blocking IO mode
. Modified socket_last_error() to not clear the last error
. Added socket_clear_error() which clears the last error on a socket
. Removed all code pertaining to fd_sets (socket_fd_*)
. Modified/Improved socket_select() to accept array of resources instead of
fd_sets. example:
<?php
$wfds=$rfds=array($sock1, $sock2, $sock3, $sock7);
$r=socket_select($rfds, $wfds, NULL, 1);
print "Ready to read:\n"; var_dump($rfds);
?>
- Fixed segfault in ibase_close() if user does not free the resultset.
Bugs #15419, #15992. (daniela)
- Added optional 3rd parameter "int encoding_mode" to gzencode() and fixed
parameters to conform documentation. (Stefan)
- Changed read_exif_data() to be an alias of exif_read_data(). (Marcus)
- Added exif_tagname() function which returns the names of tags and
exif_thumbnail() function to extract embedded thumbnails. (Marcus)
- Fixed iconv support with FreeBSD. (kalowsky)
- Cleaned up the posix extension: (Markus)
. Removed unwanted warning messages
. Added posix_errno() and posix_strerror() for fetching error messages
. Changed the way posix_getgrnam() and posix_getgrgid() return their values
(breaks BC but makes more sense)
. Does not include functions in symbol table which aren't supported on host
system.
- Added TIFF support for getimagesize() and read_exif_data(). (Marcus)
- Changed the Velocis extension namespace to Birdstep to reflect new product
name. Added aliases for BC. (James)
- Added safe_mode checks for opendir(). (jflemer)
- Changed the 2nd parameter in pgsql_fetch_*() functions to support NULL if
all 3 parameters are supplied, but you do not want to provide a row number.
(Derick)
- Improved iconv() when using libc's iconv. (Yasuo)
- Added PHP_SAPI constant which contains the name of running SAPI. (Edin)
- Added ob_get_status() which returns an array of buffers with their status.
(Yasuo)
- Fixed a crash bug in ob_end_*() functions. ob_end_*() will not delete
buffers that may not be deleted. (Yasuo)
- Added 3rd parameter "bool erase" to ob_start(). If FALSE, the buffer may not
be deleted until script finishes. (Yasuo)
- Changed ob_*() functions to return TRUE for success, FALSE for failure.
(Yasuo)
- Added sybase_ct support to dbx module. (Marc)
- Fixed error message handling with PostgreSQL 7.2. (Rui)
- Added object aggregation capability, see aggregation_*() functions. (Andrei)
- Added debug_zval_dump() which works similarly to var_dump, but displays
extra internal information such as refcounts and true type names. (Jason)
- Added Andrei's tokenizer extension. (Stig)
- Fixed a bug in the COM extension which caused php to crash in
php_COM_get_ids_of_names(). (Paul, Harald)
- Removed ext/satellite. It is now part of PEAR. (eriksson)
- Changed php.ini directive 'safe_mode_include_dir' to accept a (semi)colon
separated path (like 'include_path') rather than a single directory.
(jflemer)
- Added is_a() function that can be used to test whether object is of a certain
class or is derived from it. (Andrei, Zend Engine)
- Added optional parameter to highlight_string() and highlight_file() which
makes these functions to return a highlighted string instead of dumping
it to standard output. (Derick)
- Added EXTR_IF_EXISTS and EXTR_PREFIX_IF_EXISTS flags to extract(). (Rasmus)
- Fixed a segfault in pg_pconnect(). If PostgreSQL server is restarted, broken
connection is detected and reconnected. (Yasuo)
- Fixed --enable-safe-mode configure option. (Yasuo)
- Added function domxml_dump_node($doc,$node). Dumps a node plus all children
into a string. (chregu)
- Added function domxml_node_get_content(). (chregu)
- Added function domxml_dump_file($filename,[$compression]). Dumps XML to
a file and uses compression, if specified. (chregu)
- Added exslt integration to domxml extension (http://exslt.org for details).
Configure with --with-dom-exslt[=DIR] (and --with-dom-xslt).
(chregu,jaroslaw)
- Fixed session_unset() to not touch any globals if register_globals is off.
(Thies)
- Added 3 new optional parameters to OCIFetchStatement(). They control
the number of rows to skip at the beginning of the cursor, the
maximun numer of rows that should be fetched and the format of the
returned array. (Thies)
- Updated the XSLT extension to support Sablotron 0.8. (Petr Cimprich)
- Fixed a bug in preg_match() and preg_match_all() when matching strings
contain null bytes. (Andrei)
- Added xpath_register_ns() function. This makes it possible to issue XPath
queries with namespaces like for example: "//namespace:sampletag".
(Chris Jarecki)
- Added multi-byte enabled regular expression functions. (Rui)
- Added optional second parameter to count() which can be used to specify
either normal or recursive counting. (patch by Vlad Bosinceanu <glipy@fx.ro>)
- Added mb_get_info() to get internal settings of mbstring. (Rui)
- Added async query functions to PostgreSQL module. (Yasuo)
- Added pg_copy_to()/pg_copy_from() for PostgreSQL module. (Youichi, Yasuo)
- Added IPv6 support for FTP extension. (Stig Venaas)
- Improved the speed of wordwrap() significantly. (Jim)
- Fixed pow()'s incorrect behaviour when dealing with powers of 0. (Jim)
- Added is_finite(), is_infinite() and is_nan(). (Jim)
- Fixed segfault in wordwrap() when wrapping to zero width and using
multi-character break or trying to force cut (bug #12768). (Jim)
- Fixed several bugs in dbase extension (dbase_pack() truncate file to right
size, fix 6852 #1 and 6852 #2). (Vlad)
- Fixed bug in krsort() where an extra character was being compared. (Andi)
- Fixed bug that made pspell include pspell.h from a wrong location. (Vlad)
- Added function overload in mbstring to add multibyte support for
string and mail functions. (Rui)
- 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)
- Fixed several crash bugs in the xslt extension. (Markus, Derick)
- Fixed problem with dbase not returning very large (larger than long)
integers properly. (Vlad)
- Added concepts to IRCG: bailout-on-trivial issue, write output to
files, fetch a ressource upon connection end. (Sascha)
files, fetch a resource upon connection end. (Sascha)
- Fixed POST-related bugs in thttpd, added QUERY_STRING, HTTP_HOST,
HTTP_ACCEPT_LANGUAGE to the script environment, improved patch
to send correct MIME types, and added support for /nocache/. (Sascha)
- Fixed several bugs and memleaks in the domxml extension. (Markus)
- Added var_export() which outputs a representation of a variable as reusable
PHP code. (Derick)
- Added -w option to the cgi-version which strips all comments and whitespace
- Added -w option to the CGI-version to strip all comments and whitespace
from the script. (Thies)
- Added support for SO_RCVTIMEO and SO_SNDTIMEO to ext/sockets. (Jason)
- Added ob_get_level() which returns the nesting level of the output buffering
mechanism. (Yasuo, Derick)
- Added ob_flush() and ob_clean() functions which flush and clean an output
buffer without destroying the buffer. (Derick)
- Added a parameter to mysql_connect() to force a new database link to be
created. (Markus, Derick)
- Added new optional parameter to mysql_connect() which forces a new database
link to be created. (Markus, Derick)
- Added ldap_sort() function. (Stig Venaas)
- Added md5_file(), which calculaties the MD5 sum of a file.
- Added md5_file() function which calculates the MD5 sum of a file.
Patch by Alessandro Astarita <aleast@capri.it> (Derick)
- Added support for parsing recordsets contained in WDDX packets. (Andrei)
- Renamed key_exists() to array_key_exists(). (Derick)
@@ -27,25 +319,21 @@ PHP 4 NEWS
images. (Rasmus)
- Added support for bind_textdomain_codeset(). (rudib@email.si)
- Added generic Win 32 API extension. (jmoore)
- Fixed Bug #9878. Patch by bfoddy@mediaone.net. (jmoore)
- Removed warning message about NONEXISTENT character set from mysql_connect()
when the server's default character set != latin1. (Mysql Team)
- Added Direct I/O extension for lowlevel access to the POSIX layer. (sterling)
- New SAPI module for the WebJames server on RISC OS. (Alex Waugh)
- Made ldap_add (and modify) functions to throw a warning with illegal value
arrays. Previously segfaulted or added wrong value. (Stig Venaas)
- Added Udm_Check_Charset() function into mnoGoSearch extension. (gluke)
- Added Direct I/O extension for lowlevel access to the POSIX layer. (Sterling)
- Added SAPI module for the WebJames server on RISC OS. (Alex Waugh)
- Fixed ldap_add() and ldap_modify() functions to throw a warning with illegal
value arrays. Previously segfaulted or added wrong value. (Stig Venaas)
- Added udm_check_charset() function into mnoGoSearch extension. (gluke)
- Fixed mnoGoSearch extension to support mnogosearch-3.2.x. (gluke)
- Fixed bug #13885 (gmdate() timezone handling on windows). (jmoore)
- Fixed behaviour of strtok(). Bug #13866. (jmoore)
- Made fbsql_num_rows() to return the correct value on all select statements.
(Frank)
- Fixed HTTP file upload support to handle big files better. (Jani)
- Added array_chunk() function that splits an array into chunks of specified
- Added array_chunk() function which splits an array into chunks of specified
size. (Andrei)
- Fixed a bug which caused $HTTP_RAW_POST_DATA not to be populated on a missing
content-type even when always_populate_raw_post_data was On - fixed. (Rasmus)
- Added session_cache_expire() function. Patch by anuradha@gnu.org (Andrei)
- Fixed $HTTP_RAW_POST_DATA to be populated on a missing content-type when
always_populate_raw_post_data is on. (Rasmus)
- Added session_cache_expire() function. (patch by anuradha@gnu.org) (Andrei)
- Added array_fill() function. (Rasmus)
- Made Authorization header to be hidden from phpinfo() output in safe_mode.
(Rasmus)
@@ -54,12 +342,12 @@ PHP 4 NEWS
array entries to string. (Andrei)
- Added user-space object overloading extension. (Andrei)
- Added ldap_start_tls() function. (Stig Venaas, patch by kuenne@rentec.com)
- Have rand() and mt_rand() seed automatically if srand() or mt_srand() has
not been called. (Sterling)
- Fixed is_dir(), is_writeable(), is_readable(), is_executable(), is_link() and
is_file() functions to not throw a 'file does not exist' warning. (Sterling)
- Added array_change_key_case() function that returns array with
with all string keys lowercased or uppercased. (EdinK)
- Changed rand() and mt_rand() to be seed automatically if srand() or
mt_srand() has not been called. (Sterling)
- Changed the seed options to srand() and mt_srand() to be optional. If the
seed is not specified the most random seed possible is generated. (Sterling)
- Added array_change_key_case() function which returns an array with all
string keys lowercased or uppercased. (Edin)
- Added parameter to ircg_pconnect to suppress treating non-fatal errors
as fatal, and added conversion of Windows quotes to &quot;. (Sascha)
- Added pcntl_exec() function which behaves similar to the system execve.
@@ -70,22 +358,51 @@ PHP 4 NEWS
- Added mcrypt_generic_deinit() to replace mcrypt_generic_end(). (Derick)
- Added apache_setenv() function for injecting variables into Apache's
subprocess_env table. (Rasmus)
- Added support for 'int', 'bool', 'float' and 'null' for settype(). (Jeroen)
- Added support for 'int', 'bool', 'float' and 'null' in settype(). (Jeroen)
- Added IPv6 support to gethostbyaddr().
(Patch by Matthias Wimmer <matthias@charente.de> and venaas)
- Made the seed options to srand() and mt_srand() optional. If the seed is
not specified generate the most random seed possible. (Sterling)
- Fixed LONG_VARCHAR type crashing in ODBC extension. Patch by Walter Franzini.
(kalowsky)
- Made in_array() and search_array() allow the needle to be an array in itself.
(Andrei)
- Changed in_array() and search_array() to allow the needle to be an array
in itself. (Andrei)
- Added ini_get_all() function which returns all registered ini entries
or entries for the specified extension. (Jani)
- Added mailparse_uudecode_all() which extracts all uuencoded attachments
- Added support for chinese encodings to htmlentities() and htmlspecialchars().
- Added mailparse_uudecode_all() which extracts all uuencoded attachments.
(Wez)
- Added support for chinese encodings in htmlentities() and htmlspecialchars().
(Patch by Alan Knowles <alan_k@hklc.com> and Wez)
- Improved support for autoconf-2.50+/libtool 1.4b+. (Jan Kneschke, Sascha)
27 Feb 2002, Version 4.1.2
- Fixed start up failure when mm save handler is used and there are multiple
SAPIs working at the same time. (Yasuo)
- Fixed the Roxen SAPI. (Yasuo)
- Fixed a buffer overflow in the RFC-1867 file upload code. (Stefan)
- Fixed a crash bug in the session module. (Yasuo)
- Fixed a crash bug in the pspell module. (Yasuo)
- Changed the default output encoding of mbstring 'pass' to fix
initialization problem. (Rui)
26 Dec 2001, Version 4.1.1
- Fixed incompatibility with Windows .NET / IIS 6 - may improve stability
under other versions of IIS. (Zeev)
- Fixed bug that caused crashes or error notices on shutdown on threaded
platforms. (Zeev)
- Fixed several crash bugs in the xslt extension. (Markus, Derick)
- Fixed problem with dbase not returning very large (larger than long)
integers properly. (Vlad)
- Fixed several bugs and memleaks in the domxml extension. (Markus)
- Fixed bug in gmmktime() which was one hour off during standard time -
bug #9878. Patch by bfoddy@mediaone.net. (jmoore)
- Fixed bug in gmdate() timezone handling on Windows - bug #13885. (jmoore)
- Fixed several crash bugs in the mcrypt extension. (Derick)
- Made the mcrypt extension compile with the libmcrypt 2.2 series again.
(Sterling)
- Fixed a bug where the is_file() family of functions would in-correctly give
an error when they were given filenames that didn't exist. (Sterling)
- Fixed a bug in the strtotime() function where it was incorrectly recognizing
GMT +0100 and GMT -0100. (Derick)
10 Dec 2001, Version 4.1.0
- Worked around a bug in the MySQL client library that could cause PHP to hang
when using unbuffered queries. (Zeev)
@@ -121,7 +438,7 @@ PHP 4 NEWS
- Fixed a crash in dbase_replace_record. (Patch by robin.marlow@dps-int.com)
- Fixed a crash in msql_result(). (Zeev)
- Added support for single dimensional SafeArrays and Enumerations.
Added an is_enum() function to check if a component implements an
Added com_isenum() function to check if a component implements an
enumeration. (Alan, Harald)
- Fixed a bug in dbase_get_record() and dbase_get_record_with_names().
boolean fields are now returned correctly.
@@ -161,7 +478,7 @@ PHP 4 NEWS
string to the gmp-number. (Troels)
- Added the Cyrus-IMAP extension, which allows a direct interface to Cyrus'
more advanced capabilities. (Sterling)
- Enhance read_exif_data() to support multiple comment tags (Rasmus)
- Enhanced read_exif_data() to support multiple comment tags. (Rasmus)
- Fixed a crash bug in array_map() when NULL callback was passed in. (Andrei)
- Change from E_ERROR to E_WARNING in the exif extension (Rasmus)
- New pow() implementation, which returns an integer when possible,
+11 -1
View File
@@ -1,6 +1,7 @@
This is the first file you should be reading after you get your CVS account.
We'll assume you're basically familiar with CVS, but feel free to post
your questions on the mailing list.
your questions on the mailing list. Please have a look at
http://cvsbook.red-bean.com/ for more detailed information on CVS.
PHP is developed through the efforts of a large number of people.
Collaboration is a Good Thing(tm), and CVS lets us do this. Thus, following
@@ -89,6 +90,15 @@ 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 fix some bugs, you should note the bug ID numbers in your
commit message. Bug ID should be prefixed by "#" for easier access to
bug report when developers are browsing CVS via. LXR or Bonsai.
Example:
Fixed pgsql notice handler double free crash bug. Bug #14016
@ Fixed pgsql notice handler double free crash bug. Bug #14016
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 @
+10 -5
View File
@@ -13,11 +13,16 @@ HOW TO USE IT
./ext_skel --extname=module_name
and everything you need is placed in directory module_name. In fact, if you
don't need to test the existence of any external header files, libraries or
functions in them, the module is already almost ready to be compiled in PHP.
Just remove 3 comments in your_module_name/config.m4, cd back up to PHP
sources top directory, and do
and everything you need is placed in directory module_name.
[ Note that GNU awk is likely required for this script to work. Debian
systems seem to default to using mawk, so you may need to change the
#! line in skeleton/create_stubs to use gawk explicitly. ]
If you don't need to test the existence of any external header files,
libraries or functions in them, the module is already almost ready to be
compiled in PHP. Just remove 3 comments in your_module_name/config.m4,
cd back up to PHP sources top directory, and do
./buildconf; ./configure --enable-module_name; make
+12 -32
View File
@@ -7,7 +7,6 @@ HOW TO CREATE A SELF-CONTAINED PHP EXTENSION
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
@@ -74,28 +73,9 @@ DEFINING THE NEW EXTENSION
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
@@ -107,13 +87,17 @@ PHP_ARG_ENABLE(foobar,whether to enable foobar,
[ --enable-foobar Enable foobar])
if test "$PHP_FOOBAR" != "no"; then
PHP_EXTENSION(foobar, $ext_shared)
PHP_NEW_EXTENSION(foobar, foo.c bar.c, $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.
that the extension will be enabled by PHP_NEW_EXTENSION in shared mode.
The first argument of PHP_NEW_EXTENSION describes the name of the
extension. The second names the source-code files. The third passes
$ext_shared which is set by PHP_ARG_ENABLE/WITH to PHP_NEW_EXTENSION.
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.
@@ -131,8 +115,8 @@ CREATING SOURCE FILES
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).
Put config.m4 and the source files into one directory. Afterwards,
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
@@ -157,17 +141,13 @@ ADDING SHARED MODULE SUPPORT TO A 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.
automatically be able to use --with-foo=shared[,..] or
--enable-foo=shared[,..].
2. In config.m4, use PHP_EXTENSION(foo, $ext_shared) to enable
2. In config.m4, use PHP_NEW_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:
3. Add the following lines to your C source file:
#ifdef COMPILE_DL_FOO
ZEND_GET_MODULE(foo)
+181 -57
View File
@@ -4,9 +4,6 @@ $Id$
Please send comments to: Wez Furlong <wez@thebrainroom.com>
Note: this doc is preliminary and is intended to give the reader an idea of
how streams work and should be used.
Why Streams?
============
You may have noticed a shed-load of issock parameters flying around the PHP
@@ -26,7 +23,7 @@ The main functions are:
PHPAPI size_t php_stream_read(php_stream * stream, char * buf, size_t count);
PHPAPI size_t php_stream_write(php_stream * stream, const char * buf, size_t
count);
count);
PHPAPI int php_stream_eof(php_stream * stream);
PHPAPI int php_stream_getc(php_stream * stream);
PHPAPI char *php_stream_gets(php_stream * stream, char *buf, size_t maxlen);
@@ -40,16 +37,119 @@ names: fread, fwrite, feof, fgetc, fgets, fclose, fflush, fseek, ftell.
Opening Streams
===============
Ultimately, I aim to implement an fopen_wrapper-like call to do this with
minimum fuss.
Currently, mostly for testing purposes, you can use php_stream_fopen to open a
stream on a regular file.
In most cases, you should use this API:
PHPAPI php_stream * php_stream_fopen(const char * filename, const char *
mode);
PHPAPI php_stream *php_stream_open_wrapper(char *path, char *mode,
int options, char **opened_path TSRMLS_DC);
This call behaves just like fopen(), except it returns a stream instead of a
FILE *
Where:
path is the file or resource to open.
mode is the stdio compatible mode eg: "wb", "rb" etc.
options is a combination of the following values:
IGNORE_PATH (default) - don't use include path to search for the file
USE_PATH - use include path to search for the file
IGNORE_URL - do not use plugin wrappers
REPORT_ERRORS - show errors in a standard format if something
goes wrong.
STREAM_MUST_SEEK - If you really need to be able to seek the stream
and don't need to be able to write to the original
file/URL, use this option to arrange for the stream
to be copied (if needed) into a stream that can
be seek()ed.
opened_path is used to return the path of the actual file opened,
but if you used STREAM_MUST_SEEK, may not be valid. You are
responsible for efree()ing opened_path. opened_path may be (and usually
is) NULL.
If you need to open a specific stream, or convert standard resources into
streams there are a range of functions to do this defined in php_streams.h.
A brief list of the most commonly used functions:
PHPAPI php_stream *php_stream_fopen_from_file(FILE *file, const char *mode);
Convert a FILE * into a stream.
PHPAPI php_stream *php_stream_fopen_tmpfile(void);
Open a FILE * with tmpfile() and convert into a stream.
PHPAPI php_stream *php_stream_fopen_temporary_file(const char *dir,
const char *pfx, char **opened_path TSRMLS_DC);
Generate a temporary file name and open it.
There are some network enabled relatives in php_network.h:
PHPAPI php_stream *php_stream_sock_open_from_socket(int socket, int persistent);
Convert a socket into a stream.
PHPAPI php_stream *php_stream_sock_open_host(const char *host, unsigned short port,
int socktype, int timeout, int persistent);
Open a connection to a host and return a stream.
PHPAPI php_stream *php_stream_sock_open_unix(const char *path, int persistent,
struct timeval *timeout);
Open a UNIX domain socket.
Stream Utilities
================
If you need to copy some data from one stream to another, you will be please
to know that the streams API provides a standard way to do this:
PHPAPI size_t php_stream_copy_to_stream(php_stream *src,
php_stream *dest, size_t maxlen);
If you want to copy all remaining data from the src stream, pass
PHP_STREAM_COPY_ALL as the maxlen parameter, otherwise maxlen indicates the
number of bytes to copy.
This function will try to use mmap where available to make the copying more
efficient.
If you want to read the contents of a stream into an allocated memory buffer,
you should use:
PHPAPI size_t php_stream_copy_to_mem(php_stream *src, char **buf,
size_t maxlen, int persistent);
This function will set buf to the address of the buffer that it allocated,
which will be maxlen bytes in length, or will be the entire length of the
data remaining on the stream if you set maxlen to PHP_STREAM_COPY_ALL.
The buffer is allocated using pemalloc(); you need to call pefree() to
release the memory when you are done.
As with copy_to_stream, this function will try use mmap where it can.
If you have an existing stream and need to be able to seek() it, you
can use this function to copy the contents into a new stream that can
be seek()ed:
PHPAPI int php_stream_make_seekable(php_stream *origstream, php_stream **newstream);
It returns one of the following values:
#define PHP_STREAM_UNCHANGED 0 /* orig stream was seekable anyway */
#define PHP_STREAM_RELEASED 1 /* newstream should be used; origstream is no longer valid */
#define PHP_STREAM_FAILED 2 /* an error occurred while attempting conversion */
#define PHP_STREAM_CRITICAL 3 /* an error occurred; origstream is in an unknown state; you should close origstream */
make_seekable will always set newstream to be the stream that is valid
if the function succeeds.
When you have finished, remember to close the stream.
NOTE: If you only need to seek forwards, there is no need to call this
function, as the php_stream_seek can emulate forward seeking when the
whence parameter is SEEK_CUR.
NOTE: Writing to the stream may not affect the original source, so it
only makes sense to use this for read-only use.
NOTE: If the origstream is network based, this function will block
until the whole contents have been downloaded.
NOTE: Never call this function with an origstream that is referenced
as a resource! It will close the origstream on success, and this
can lead to a crash when the resource is later used/released.
NOTE: If you are opening a stream and need it to be seekable, use the
STREAM_MUST_SEEK option to php_stream_open_wrapper();
Casting Streams
===============
@@ -59,14 +159,14 @@ You need to "cast" the stream into a FILE*, and this is how you do it:
FILE * fp;
php_stream * stream; /* already opened */
if (php_stream_cast(stream, PHP_STREAM_AS_STDIO, &fp, 1) == FAILURE) {
RETURN_FALSE;
if (php_stream_cast(stream, PHP_STREAM_AS_STDIO, (void*)&fp, REPORT_ERRORS) == FAILURE) {
RETURN_FALSE;
}
The prototype is:
PHPAPI int php_stream_cast(php_stream * stream, int castas, void ** ret, int
show_err);
show_err);
The show_err parameter, if non-zero, will cause the function to display an
appropriate error message of type E_WARNING if the cast fails.
@@ -83,8 +183,14 @@ if you mix ANSI stdio calls on the FILE* with php stream calls on the stream.
If your system has the fopencookie function, php streams can synthesize a
FILE* on top of any stream, which is useful for SSL sockets, memory based
streams, data base streams etc. etc.
NOTE: There might be situations where this is not desireable, and we need to
provide a flag to inform the casting routine of this.
In situations where this is not desireable, you should query the stream
to see if it naturally supports FILE *. You can use this code snippet
for this purpose:
if (php_stream_is(stream, PHP_STREAM_IS_STDIO)) {
/* can safely cast to FILE* with no adverse side effects */
}
You can use:
@@ -93,10 +199,15 @@ PHPAPI int php_stream_can_cast(php_stream * stream, int castas)
to find out if a stream can be cast, without actually performing the cast, so
to check if a stream is a socket you might use:
if (php_stream_can_cast(stream, PHP_STREAM_AS_SOCKETD) == SUCCESS) {
/* it's a socket */
if (php_stream_can_cast(stream, PHP_STREAM_AS_SOCKETD) == SUCCESS) {
/* it can be a socket */
}
Please note the difference between php_stream_is and php_stream_can_cast;
stream_is tells you if the stream is a particular type of stream, whereas
can_cast tells you if the stream can be forced into the form you request.
The former doesn't change anything, while the later *might* change some
state in the stream.
Stream Internals
================
@@ -109,10 +220,10 @@ underlying implementation.
The php_streams ops struct consists of pointers to methods that implement
read, write, close, flush, seek, gets and cast operations. Of these, an
implementation need only implement write, read, close and flush. The gets
method is intended to be used for non-buffered streams if there is an
underlying method that can efficiently behave as fgets. The ops struct also
contains a label for the implementation that will be used when printing error
messages - the stdio implementation has a label of "STDIO" for example.
method is intended to be used for streams if there is an underlying method
that can efficiently behave as fgets. The ops struct also contains a label
for the implementation that will be used when printing error messages - the
stdio implementation has a label of "STDIO" for example.
The idea is that a stream implementation defines a php_stream_ops struct, and
associates it with a php_stream using php_stream_alloc.
@@ -121,17 +232,17 @@ As an example, the php_stream_fopen() function looks like this:
PHPAPI php_stream * php_stream_fopen(const char * filename, const char * mode)
{
FILE * fp = fopen(filename, mode);
php_stream * ret;
if (fp) {
ret = php_stream_alloc(&php_stream_stdio_ops, fp, 0, 0, mode);
if (ret)
return ret;
FILE * fp = fopen(filename, mode);
php_stream * ret;
if (fp) {
ret = php_stream_alloc(&php_stream_stdio_ops, fp, 0, 0, mode);
if (ret)
return ret;
fclose(fp);
}
return NULL;
fclose(fp);
}
return NULL;
}
php_stream_stdio_ops is a php_stream_ops structure that can be used to handle
@@ -143,7 +254,7 @@ to be passed back to fopen_wrapper (or it's yet to be implemented successor).
The prototype for php_stream_alloc is this:
PHPAPI php_stream * php_stream_alloc(php_stream_ops * ops, void * abstract,
size_t bufsize, int persistent, const char * mode)
size_t bufsize, int persistent, const char * mode)
ops is a pointer to the implementation,
abstract holds implementation specific data that is relevant to this instance
@@ -164,6 +275,19 @@ into a FILE*, so it should be compatible with the mode parameter of fopen().
Writing your own stream implementation
======================================
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
RULE #1: when writing your own streams: make sure you have configured PHP with
--enable-debug.
I've taken some great pains to hook into the zend memory manager to help track
down allocation problems. It will also help you spot incorrect use of the
STREAMS_DC, STREAMS_CC and the semi-private STREAMS_REL_CC macros for function
definitions.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
RULE #2: Please use the stdio stream as a reference; it will help you
understand the semantics of the stream operations, and it will always
be more up to date than these docs :-)
First, you need to figure out what data you need to associate with the
php_stream. For example, you might need a pointer to some memory for memory
based streams, or if you were making a stream to read data from an RDBMS like
@@ -176,9 +300,9 @@ appropriately), and use the abstract pointer to refer to it.
For structured state you might have this:
struct my_state {
MYSQL conn;
MYSQL_RES * result;
struct my_state {
MYSQL conn;
MYSQL_RES * result;
};
struct my_state * state = pemalloc(sizeof(struct my_state), persistent);
@@ -201,32 +325,32 @@ For example, for reading from this wierd mysql stream:
static size_t php_mysqlop_read(php_stream * stream, char * buf, size_t count)
{
struct my_state * state = (struct my_state*)stream->abstract;
struct my_state * state = (struct my_state*)stream->abstract;
if (buf == NULL && count == 0) {
/* in this special case, php_streams is asking if we have reached the
* end of file */
if (... at end of file ...)
return EOF;
else
return 0;
}
/* pull out some data from the stream and put it in buf */
... mysql_fetch_row(state->result) ...
/* we could do something strange, like format the data as XML here,
and place that in the buf, but that brings in some complexities,
such as coping with a buffer size too small to hold the data,
so I won't even go in to how to do that here */
if (buf == NULL && count == 0) {
/* in this special case, php_streams is asking if we have reached the
* end of file */
if (... at end of file ...)
return EOF;
else
return 0;
}
/* pull out some data from the stream and put it in buf */
... mysql_fetch_row(state->result) ...
/* we could do something strange, like format the data as XML here,
and place that in the buf, but that brings in some complexities,
such as coping with a buffer size too small to hold the data,
so I won't even go in to how to do that here */
}
Implement the other operations - remember that write, read, close and flush
are all mandatory. The rest are optional. Declare your stream ops struct:
php_stream_ops my_ops = {
php_mysqlop_write, php_mysqlop_read, php_mysqlop_close,
php_mysqlop_flush, NULL, NULL, NULL,
"Strange mySQL example"
php_mysqlop_write, php_mysqlop_read, php_mysqlop_close,
php_mysqlop_flush, NULL, NULL, NULL,
"Strange mySQL example"
}
Thats it!
@@ -240,4 +364,4 @@ connection and then use pefree to dispose of the struct you allocated.
You may read the stream->persistent field to determine if your struct was
allocated in persistent mode or not.
vim:tw=78
vim:tw=78:et
+121
View File
@@ -0,0 +1,121 @@
Submitting Patch for PHP
========================
This document describes how to submit a patch for PHP. Since you are
reading this document, you are willing to submit a patch for PHP.
Please keep reading! Submitting a patch for PHP is easy. The hard
part is making it acceptable for inclusion into our repository. :-)
How to create patch?
--------------------
We are working with CVS. You need to get CVS source to create a patch
that we accept. Visit http://www.php.net/anoncvs.php to get CVS
source. You can check out older versions, but make sure you get
the default branch (i.e. Do not use -r option when you check out the
CVS source)
Read CODING_STANDARDS file before you start working.
Now you are ready to create a patch. Modify source to fix a bug in PHP or
add a new feature to PHP. After you finished editing, please test your
patch. Read README.TESTING for testing.
After you finish testing your patch, take diff file using
"cvs diff > your.patch" command.
Read README.TESTING for submitting a test script for your patch. This is
not strictly required, but it is preferred to submit a test script along
with your patch. Making new test script is very easy. It also helps us
to understand what you have been fixed or added to PHP.
Tips for creating patch
-----------------------
If you would like to fix multiple bugs. It is easier for us if you
could create 1 patch for 1 bug, but this is not strictly required.
Note though that you might get little response, if your patch is
too hard to review.
If you would like change/add many lines, it is better to ask module
maintainer and/or php-dev@lists.php.net, or pear-dev@lists.php.net if
you are patching PEAR. Official module maintainers can be found in
EXTENSIONS file in PHP source.
If you are new to CVS (Concurrent Versions System), visit
http://cvshome.org/ for details.
Recommended CVS client settings for creating patch file
------------------------------------------------------
Recommended ~/.cvsrc file setting is:
------
cvs -z3
update -d -P
checkout -P
diff -u
------
diff -u means:
-u Use the unified output format.
With this CVS setting, you don't have to worry about adding/deleting
newlines and spaces.
Check list for submitting patch
-------------------------------
- Did you run "make test" to check if your patch didn't break
other features?
- Did you compile PHP with --enable-debug and check php/webserver
error logs when you test your patch?
- Did you build PHP for multi-threaded web servers. (Optional)
- Did you create test script for "make test"? (Recommended)
- Did you check your patch is unified format and it does not
contain white space changes? (If you are not using recommended
cvs setting)
- Did you update CVS source before you take final patch?
- Did you read the patch again?
Where to send your patch?
-------------------------
If you are patching C source, send the patch to php-dev@lists.php.net.
If you are patching a module, you should also send the patch to the
maintainer. Official module maintainers are listed in EXTENSION file
in source.
If you are patching PEAR, send the patch to pear-dev@lists.php.net.
Please add the prefix "[PATCH]" to your email subject and make sure
to include the patch as a MIME attachment even if it is short.
Test scripts should be included in the same email.
Explain what has been fixed/added/changed by your patch.
Finally, add the bug Id(s) which can be closed by your patch, if any.
What happens after you submit your patch
--------------------------------------
If your patch is easy to review and has obviously no side-effects,
it might take up to a few hours until someone commits it.
Because this is a volunteer-driven effort, more complex patches will
require more patience on your side.
If you did not receive any feedback in a few days, please consider
resubmitting the description of your patch, along-side with
these questions:
- Is my patch too hard to review? Because of which factors?
- Should I split it up in multiple parts?
- Are there any unwanted whitespace changes?
What happens when your patch is applied?
----------------------------------------
Your name will be included together with your email address in the CVS
commit log. If your patch affects end-users, a brief description
and your name might be added to the NEWS file.
Thank you for submitting patch for PHP!
+175
View File
@@ -0,0 +1,175 @@
[IMPORTANT NOTICE]
------------------
Do _not_ ask to developers why some or all tests are failed under
your environment! Let us know if you find why it fails. Thank you.
[Testing Basics]
----------------
To execute test scripts, you must build PHP with some SAPI, then you
type "make test" to execute all or some test scripts saved under
"tests" directory under source root directory.
Usage:
make test
"make test" basically executes "run-tests.php" script
under source root. Therefore you can execute the script
as follows
./sapi/cli/php -c /path/to/php.ini/ run-tests.php [ext/some_extension_name]
[Which "php" executable "make test" look for]
---------------------------------------------
"make test" executes "run-tests.php" script with "php" binary. Some
test scripts such as session must be executed by CGI SAPI. Therefore,
you must build PHP with CGI SAPI to perform all tests.
If PHP is not build with CGI SAPI, "run-tests.php" script uses CLI
SAPI. Tests that may not executed by CLI SAPI will be skipped.
NOTE: PHP binary executing "run-tests.php" and php binary used for
executing test scripts may differ. If you use different PHP binary for
executing "run-tests.php" script, you may get errors.
[Which php.ini is used]
-----------------------
"make test" force to use php.ini-dist as default config file. If
you would like to test with other configuration file, user
"run-tests.php" script.
Example:
./sapi/cli/php -c /path/to/php.ini/ ext/standard
If you use php.ini other than php.ini-dist, you may see more failed
tests.
[Which test scripts are executed]
---------------------------------
"run-tests.php" ("make test") executes all test scripts by default
by looking all directory named "tests". If there are files have "phpt"
extension, "run-tests.php" takes test php code from the file and
executes it.
Tester can easily executes tests selectively with as follows.
Example:
./sapi/cli/php -c /path/to/php.ini/ run-tests.php ext/mbstring
[Test results]
--------------
Test results are printed to standard output. If there is a failed test,
"run-tests.php" script saves the result, expected result and code
executed to the test script directory. For example, if
ext/myext/tests/myext.phpt is failed to pass, following files are
created:
ext/myext/tests/myext.out - output from test script
ext/myext/tests/myext.exp - expected output
ext/myext/tests/myext.php - test script executed
Tester can verify these files, if failed test is actually a bug
or not.
[Creating new test files]
-------------------------
Writing test file is very easy if you are used to PHP. Test file
has following format. Here is a actual test file from iconv module.
===== ext/iconv/002.phpt =======
--TEST--
UCS4BE to ASCII
--SKIPIF--
<?php include('skipif.inc'); ?>
--POST--
--GET--
--FILE--
<?php include('002.inc'); ?>
--EXPECT--
&#97;&#98;&#99;&#100;
abcd
===== end of ext/iconv/002.phpt =======
"--TEST--" is title of the test.
"--SKIPIF--" is condition when to skip this test.
"--POST--" is POST variable passed to test script.
"--GET--" is GET variable passed to test script.
"--FILE--" is the test script.
"--EXPECT--" is the expected output from the test script.
ext/iconv/002.phpt uses 2 files. "skipif.inc" is used to skip
test when test cannot be performed such as iconv module is not
compiled or loaded.
==== ext/iconv/skipif.inc ====
<?php
// This script prints "skip" if condition does not meet.
if (!extension_loaded("iconv") && ini_get("enable_dl")) {
$dlext = (substr(PHP_OS, 0, 3) == "WIN") ? ".dll" : ".so";
@dl("iconv$dlext");
}
if (!extension_loaded("iconv")) {
die("skip\n");
}
?>
==== end of ext/iconv/skipif.inc ====
ext/inconv/002.inc is the test script. "run-tests.php" script
executes test script with CGI executable.
==== ext/iconv/002.inc ===
<?php
/*
Expected output:
&#97;&#98;&#99;&#100;
abcd
*/
$s = unpack("V*", iconv("ascii","UCS-4LE", "abcd"));
foreach($s as $c) { print "&#$c;"; } print "\n";
$s = pack("NNNN", 97, 98, 99, 100);
$q = iconv("UCS-4BE", "ascii", $s);
print $q; print "\n";
?>
=== end of ext/iconv/002.inc ===
Test script and skipif code may be directly write into *.phpt.
However, it is recommended to use other files for ease of writing
test script. For instance, you can execute test script under
ext/iconv as follows:
./sapi/cli/php -c /path/to/php.ini/ ext/iconv
[How to help us]
----------------
If you find bug in PHP, you can submit bug report AND test script
for us. You don't have to write complete script, just give us test
script with following format. Please test the script and make sure
you write the correct ACTUAL OUTPUT and EXPECTED OUTPUT before you
submit.
<?php
/*
Bug #12345
substr() bug. Do not return expected string.
ACTUAL OUTPUT
XYXA
EXPECTED OUTPUT
ABCD
*/
$str = "XYZABCD";
echo substr($str,3,7);
?>
+123
View File
@@ -0,0 +1,123 @@
PHP Build System V5 Overview
- supports Makefile.ins during transition phase
- not-really-portable Makefile includes have been eliminated
- supports seperate build directories without VPATH by using
explicit rules only
- does not waste disk-space/CPU-time for building temporary libraries
=> especially noticeable on slower systems
- slow recursive make replaced with one global Makefile
- eases integration of proper dependencies
- adds PHP_DEFINE(what[, value]) which creates a single include-file
per what. This will allow more fine-grained dependencies.
- abandoning the "one library per directory" concept
- improved integration of the CLI
- several new targets
build-modules: builds and copies dynamic modules into modules/
install-cli: installs the CLI only, so that the install-sapi
target does only what its name says
- finally abandoned automake (still requires aclocal at this time)
- changed some configure-time constructs to run at buildconf-time
- upgraded shtool to 1.5.4
- removed $(moduledir) (use EXTENSION_DIR)
The Reason For a New System
It became more and more apparent that there is a severe need
for addressing the portability concerns and improving the chance
that your build is correct (how often have you been told to
"make clean"? When this is done, you won't need to anymore).
If You Build PHP on a Unix System
You, as a user of PHP, will notice no changes. Of course, the build
system will be faster, look better and work smarter.
If You Are Developing PHP
Extension developers:
Makefile.ins are abandoned. The files which are to be compiled
are specified in the config.m4 now using the following macro:
PHP_NEW_EXTENSION(foo, foo.c bar.c baz.cpp, $ext_shared)
E.g. this enables the extension foo which consists of three source-code
modules, two in C and one in C++. And dependending on the user's
wishes, the extension will even be built as a dynamic module.
The full syntax:
PHP_NEW_EXTENSION(extname, sources [, shared [,sapi_class[, extra-cflags]]])
Please have a look at acinclude.m4 for the gory details and meanings
of the other parameters.
And that's basically it for the extension side.
If you previously built sub-libraries for this module, add
the source-code files here as well. If you need to specify
separate include directories, do it this way:
PHP_NEW_EXTENSION(foo, foo.c mylib/bar.c mylib/gregor.c,,,-I@ext_srcdir@/lib)
E.g. this builds the three files which are located relative to the
extension source directory and compiles all three files with the
special include directive (@ext_srcdir@ is automatically replaced).
Now, you need to tell the build system that you want to build files
in a directory called $ext_builddir/lib:
PHP_ADD_BUILD_DIR($ext_builddir/lib)
Make sure to call this after PHP_NEW_EXTENSION, because $ext_builddir
is only set by the latter.
If you have a complex extension, you might to need add special
Make rules. You can do this by calling PHP_ADD_MAKEFILE_FRAGMENT
in your config.m4 after PHP_NEW_EXTENSION.
This will read a file in the source-dir of your extension called
Makefile.frag. In this file, $(builddir) and $(srcdir) will be
replaced by the values which are correct for your extension
and which are again determined by the PHP_NEW_EXTENSION macro.
Make sure to prefix *all* relative paths correctly with either
$(builddir) or $(srcdir). Because the build system does not
change the working directory anymore, we must use either
absolute paths or relative ones to the top build-directory.
Correct prefixing ensures that.
SAPI developers:
Instead of using PHP_SAPI=foo/PHP_BUILD_XYZ, you will need to type
PHP_SELECT_SAPI(name, type, sources.c)
I.e. specify the source-code files as above and also pass the
information regarding how PHP is supposed to be built (shared
module, program, etc).
For example for APXS:
PHP_SELECT_SAPI(apache, shared, sapi_apache.c mod_php4.c php_apache.c)
General info
The foundation for the new system is the flexible handling of
sources and their contexts. With the help of macros you
can define special flags for each source-file, where it is
located, in which target context it can work, etc.
Have a look at the well documented macros
PHP_ADD_SOURCES(_X) in acinclude.m4.
-186
View File
@@ -1,186 +0,0 @@
Advisory on the PHP Release Cycle
Copyright & Liciencing
This Document is (c) Copyright 2000,2001 by The PHP Group
This Document is distributed under the terms of the GNU General
Public License as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later
version.
Table of Contents
1. Introduction
2. Dealing with bugs
2.1 As a QA Team Member
2.2 As a Developer
3. Releaseing another RC
4. CVS During the Release Process
4.1 Useful CVS Commands
5 The Final Release
6 Summary
1. Introduction
This cycle should take place over roughly 10 days. When it is
decided it is time for an Release to occur Andi/Zeev (Or
Whoever) will tarball RC1, Tag & Branch CVS (see section 4)
and then announce the RC on PHP-QA and PHP-DEV. At this
point the build tracker and QA Bug System come into play.
If you successfully build PHP then report it in the build
tracker, If you then run and complete all the tests you
should report this too in the build tracker when
these features become avalible.
2. Dealing with Bugs
2.1 As a QA Team member
If you find a bug in an RC that you think is a showstopper
then, even if it is a known bug, you should report it in the
QA Bug system. This marks the bug for discussion at least,
and preferably fixing before the actual release. This system
is separate from the main bugs system so that important bugs
dont get lost in the midst if lots of feature/change request
in the approach to a release. It is imperitive where
appropraite that as a QA'er a test script, Configure options
and PHP.ini files are provided to enable the developer to
reproduce the bug, this is an important part of our job. If
you have a serious bug then you should also create a test
script to be added to the tests dir of the php source so
that at the end of the process to enable us to make sure bug
does not return. It is not difficult to create these test
scripts and a readme on it can be found in
php4/tests/README.
2.2 As a Developer
What should happen is that when a bug is reported it
is send to php-dev and php-qa as with other bugs. We should
have far stricter assignment system in this bug cycle rather
than just leaving them. Once again bugs should be able to be
marked as To Be Fixed Before release or moved to other bug
system. (This is currently the Release Masters responsibility)
Then before the actual release the qa bugs system can be
checked and if there are outstanding To Be Fixed Before
release bugs the Developers can see this easyly rather than
show stoppers being dismissed and not worried about.
When a bug is fixed the QAer who reported the bug is emailed
and asked to test again and see if the bug is fixed.
3 Releasing another RC
If it is felt necessary that a 2nd RC is needed then it
should be packaged as before and announced to both lists
again. The testing process then starts again, the RC2 is
added to the build tracker and QA'ers are asked to build and
retest the scripts as appropriate, espectially if you
reported a bug, you should test thourghly for your
bug and make sure it no longer occurs. This will normally
add anouther 3 days to the cycle, giving QA'ers time to
build test and report back, then for developers to
fix any problems.
4 CVS during the release process
At the point where the first RC is create a branch is
formed. This branch is not altered form that point onward
other than major bug fixes. Minor non important bug
fixes should not be applied to this branch but to the main
tree instead. Any major bug fixes should be applied to both
trees. The developer should test and check the RC tree then
also test and check the MAIN tree. This is their
responsibility to make sure (as far as possible) that the
bug fix works on both trees.
4.1 Useful CVS Commands
To create a Branch <Should only be done by person tarballing
the RC (The Release Master)>:
$ cvs tag -b php_4_0_<Version>RC<NUMBER>
IE:
$ cvs tag -b php_4_0_1RC1
This should be executed in the PHP directory of an up to
date checkout. Remember to also tag the Zend and TSRM repositories.
You can retrieve a branch in one of two ways: by checking it
out fresh from the repository, or by switching an existing
working copy over to the branch, I would suggest you
checkout a new copy.
To check out a new copy:
$ cvs checkout -r php_4_0_<Version>RC<NUMBER> php4
IE:
$ cvs checkout -r php_4_0_1RC1 php4
To switch a working copy (Not recomended due to possible
commiting to wrong branch)
$ cvs update -r php_4_0_<Version>RC<NUMBER> php4
IE:
$ cvs update -r php_4_0_1RC1 php4
This should be done in the PHP4 directory itself.
To revert back to normal branch you should use the
following:
$ cvs update -A
To Commit to the branch you follow exactly the same
procedure as normal
$ cvs commit file.c
MAKE SURE YOU DO NOT COMMIT TO THE WRONG BRANCH.
5 The Final Release
When it is time to make the final release the following
proceedure should be followed. The person who is tarballing
the final release should check the QA bugs system and make
sure there are no showstoppers left unfixed. If there are
then bug the person the bug is assigned to until they fix
it. If there are no more qa bugs then they should tag the
branch as php_4_0_<Version> and tarball as usual. An email
should be sent to PHP-GEN, PHP_DEV and PHP-QA about the new
release and it should be added to php.net. The windows
binaries and servelets should be built as soon as possible
and added too, as should the windows installer.
6 Summary
Here is a summary of what a release cycle might look like:
Thurs: RC is agreed on and packaged, an email is sent to
PHP_QA and PHP-DEV, the CVS is Branched and the
Release Cycle Begins.
Mon: After a weekends testing most show stoppers should
have been found (Hopefully) and the developers get to
work on fixing them.
Thurs: A second RC is released if needed with the new bug
fixes in and the QAers test again.
Sun: A review is made of all outstanding bugs and any show
stoppers should be fixed. if there are no show
stoppers then the final release is packaged and
released on the monday morning on php.net
Mon: Release is made.
James
--
James Moore
PHP QA Team
jmoore@php.net
+98 -73
View File
@@ -3,117 +3,149 @@ parenthesis means that person has taken on this project.
Zend
----
* allow foreach ($array as $k => &$val) syntax. right now we cannot
For PHP 4.3.0:
* 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
* 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
* Look at replacing c-lib call tolower().
* Make hash API functions work with HASH_OF() to save time.
* Allow to set a default value for call-by-reference-parameters.
eg: function hello (&$pallo = NULL) {}
* Disallow function(method) redefinition in class.
* Add configure test to determine if dlsym() requires underscore and set
DLSYM_NEEDS_UNDERSCORE accordingly. Perl and zsh have it in configure,
for example.
for example. (DONE?)
For PHP 5.0.0:
* 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.
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()
For PHP 4.3.0:
* Add aliases to functions to conform to new naming conventions, e.g.
str_to_upper().
* Make all extensions thread-safe.
* Make everything on the language-level independent of your locale
settings.
* Change PHP error messages, so that they point to pages or sections
in the PHP Manual.
* 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)
* Activate all extensions by default that don't rely on external
dependencies. (eg ftp) (DONE?)
* on some platforms unimplemented function will just do nothing
(e.g. symlink) they should print a warning or not even be defined!
(DONE ?)
* Use arg_separator.input to implode args in the CGI sapi extension
and arg_separator.input to explode in php_build_argv(). (DONE?)
* Change the odbc_fetch_into() function to require ALWAYS the first two
parameters ($conn_id and $array), and make the third (row) be optional.
* Remove --with-openlink configure option (--with-iodbc replaces it).
* Implement flush feature suitable for nested output buffers.
For PHP 5.0.0
* bundle and use curl lib for fopen wrapper.
* --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.
* see what functions might need to be changed to use HashPosition, so
that the internal array pointer is not affected.
* Move most extensions and PEAR packages out of the PHP CVS tree,
include them again during release packaging.
Other
* use thread-safe resolver functions (either require BIND 8 or adns).
* implement javadoc based function docs template system.
* provide optional IPv6 support.
* 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
* Add remarks in the documentation which functions are not implemented
on win32.
* Add remarks in the documentation which functions are not binary-safe.
* Update curl documentation (DONE?)
* Add developer documentation.
* Add detailed documentation for Java extension.
ext/bz2
-------
* Add ini setting for decompression buffer size. The default 4k is to small
for big files and takes ages to decompress. However, 40k which perform
quite good with big files may be to much under certain environments as
default setting. There should be consideren different default sizes for
different SAPIS (e.g. apache and cli).
ext/curl
--------
* Use the cURL write handler to save data for use when returning data or outputting
data.
* Have a warning scheme for when people use unsupported features.
ext/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
* 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/pcntl
---------
* Change internal callback handler to use TICKS
* Remove all zend_extension code
* Add object callback support to pcntl_signal()
ext/pgsql
---------
For PHP 4.3.0:
* Add pg_metadata() with metadata cache feature.
* Add pg_convert() to check and convert array value for query.
* Add pg_insert/pg_update/pg_delete/pg_select for simple query.
ext/session
-----------
* maybe implement finer-grained session variables that could be
For PHP 4.3.0:
* session_abort() to abort session. ie: Do not save session data.
* Allow unset($_SESSION) or unset($HTTP_SESSION_VARS) to unset
session vars regardless of register_globals setting.
Other:
* Maybe implement finer-grained session variables that could be
locked individually.
* write a network-transparent storage back-end with fallover
* Write a network-transparent storage back-end with fallover
facilities
* provide a callback facility which is executed upon encountering
an unknown classname during deserialization
* Provide a callback facility which is executed upon encountering
an unknown class name during deserialization
ext/sockets
-----------
* Make the extension work on windows (Daniel Beulshausen)
* Make the extension work with Solaris and the Sun GCC
* Implement IPv6
* Review/Fix vectors
ext/standard
------------
* add a version number to data serialized via serialize().
* array_add(). (Andrei)
* possibly modify parsing of GPC data to automatically create arrays if
* Add a version number to data serialized via serialize().
* Possibly modify parsing of GPC data to automatically create arrays if
variable name is seen more than once.
* implement regex-cache for url-functions.
* Implement regex-cache for url-functions.
* stri_replace(). (Andrei)
* move socket related functions to fsock.c.
* Move socket related functions to fsock.c.
* NOT binary safe:
strtok()
basename()
@@ -121,19 +153,12 @@ ext/standard
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:
* See if we can support the remaining data types:
dateTime
binary
recordset
http://www.wddx.org/WDDX_SDK_10a/7__References/WDDX_DTD.htm
(Andrei)
-35
View File
@@ -1,35 +0,0 @@
* Change the odbc_fetch_into() function to require ALWAYS the first two
parameters ($conn_id and $array), and make the third (row) be optional.
* Remove --with-openlink configure option (--with-iodbc replaces it).
* Always build CGI (--disable-cgi option to disable).
* Move most extensions and PEAR packages out of the PHP CVS tree,
include them again during release packaging.
* Renaming functions, so that they all are conform to one standard form.
* Allow foreach($array as $key => &$value).
* Allow foreach($array as list($var1, $var2)).
* Clean up "$instance = &new object" syntax (default to the =& behaviour?).
* Allow to set a default value for call-by-reference-parameters. eg:
function hallo (&$pallo = NULL) {}
* Change PHP error messages, so that they point to pages or sections in the
PHP Manual.
* Fix Zend shallow copy issues with objects and arrays.
* Make all extensions thread-safe.
* Finish PHP streams abstraction, nuke all that issock stuff, implement SSL
socket support. (wez)
- ext/ftp/ -> all FILEs to streams
- ext/bz2/ -> convert to stream impl.
* Using arg_separator.input to implode args in the CGI sapi extension
and arg_separator.input to explode in php_build_argv().
+3
View File
@@ -0,0 +1,3 @@
- clean up .cvsignores
- purge Makefile.ins and replace PHP_EXTENSION in config.m4s
with appropiate calls to PHP_NEW_EXTENSION
+26
View File
@@ -0,0 +1,26 @@
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
@@ -0,0 +1,6 @@
## 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
@@ -0,0 +1,2 @@
- Improve the lock in ts_resource_ex() in order to cover less code.
This can probably be done by more careful hash table access
+603
View File
@@ -0,0 +1,603 @@
/*
+----------------------------------------------------------------------+
| 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;
/* 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 tsrm_thread_begin_func_t tsrm_new_thread_begin_handler;
static tsrm_thread_end_func_t tsrm_new_thread_end_handler;
/* Debug support */
int tsrm_error(int level, const char *format, ...);
/* Read a resource from a thread's resource storage */
static int tsrm_error_level;
static FILE *tsrm_error_file;
#if TSRM_DEBUG
#define TSRM_ERROR(args) tsrm_error args
#define TSRM_SAFE_RETURN_RSRC(array, offset, range) \
{ \
int unshuffled_offset = TSRM_UNSHUFFLE_RSRC_ID(offset); \
\
if (offset==0) { \
return &array; \
} else if ((unshuffled_offset)>=0 && (unshuffled_offset)<(range)) { \
TSRM_ERROR((TSRM_ERROR_LEVEL_INFO, "Successfully fetched resource id %d for thread id %ld - 0x%0.8X", \
unshuffled_offset, (long) thread_resources->thread_id, array[unshuffled_offset])); \
return array[unshuffled_offset]; \
} else { \
TSRM_ERROR((TSRM_ERROR_LEVEL_ERROR, "Resource id %d is out of range (%d..%d)", \
unshuffled_offset, TSRM_SHUFFLE_RSRC_ID(0), TSRM_SHUFFLE_RSRC_ID(thread_resources->count-1))); \
return NULL; \
} \
}
#else
#define TSRM_ERROR
#define TSRM_SAFE_RETURN_RSRC(array, offset, range) \
if (offset==0) { \
return &array; \
} else { \
return array[TSRM_UNSHUFFLE_RSRC_ID(offset)]; \
}
#endif
#if defined(PTHREADS)
/* Thread local storage */
static pthread_key_t tls_key;
#elif defined(TSRM_ST)
static int tls_key;
#elif defined(TSRM_WIN32)
static DWORD 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 );
#elif defined(TSRM_ST)
st_init();
st_key_create(&tls_key, 0);
#elif defined(TSRM_WIN32)
tls_key = TlsAlloc();
#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);
#elif defined(TSRM_WIN32)
TlsFree(tls_key);
#endif
}
/* allocates a new thread-safe-resource id */
TSRM_API ts_rsrc_id ts_allocate_id(ts_rsrc_id *rsrc_id, size_t size, ts_allocate_ctor ctor, ts_allocate_dtor dtor)
{
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 */
*rsrc_id = TSRM_SHUFFLE_RSRC_ID(id_count++);
TSRM_ERROR((TSRM_ERROR_LEVEL_CORE, "Obtained resource id %d", *rsrc_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"));
*rsrc_id = 0;
return 0;
}
resource_types_table_size = id_count;
}
resource_types_table[TSRM_UNSHUFFLE_RSRC_ID(*rsrc_id)].size = size;
resource_types_table[TSRM_UNSHUFFLE_RSRC_ID(*rsrc_id)].ctor = ctor;
resource_types_table[TSRM_UNSHUFFLE_RSRC_ID(*rsrc_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->storage);
}
}
p->count = id_count;
}
p = p->next;
}
}
tsrm_mutex_unlock(tsmm_mutex);
TSRM_ERROR((TSRM_ERROR_LEVEL_CORE, "Successfully allocated new resource id %d", *rsrc_id));
return *rsrc_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);
#elif defined(TSRM_ST)
st_thread_setspecific(tls_key, (void *) *thread_resources_ptr);
#elif defined(TSRM_WIN32)
TlsSetValue(tls_key, (void *) *thread_resources_ptr);
#endif
if (tsrm_new_thread_begin_handler) {
tsrm_new_thread_begin_handler(thread_id, &((*thread_resources_ptr)->storage));
}
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], &(*thread_resources_ptr)->storage);
}
}
tsrm_mutex_unlock(tsmm_mutex);
if (tsrm_new_thread_end_handler) {
tsrm_new_thread_end_handler(thread_id, &((*thread_resources_ptr)->storage));
}
}
/* 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);
#elif defined(TSRM_ST)
thread_resources = st_thread_getspecific(tls_key);
#elif defined(TSRM_WIN32)
thread_resources = TlsGetValue(tls_key);
#else
thread_resources = NULL;
#endif
if (thread_resources) {
TSRM_ERROR((TSRM_ERROR_LEVEL_INFO, "Fetching resource id %d for current thread %d", id, (long) thread_resources->thread_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.
*/
TSRM_SAFE_RETURN_RSRC(thread_resources->storage, id, thread_resources->count);
}
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);
/* 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.
*/
TSRM_SAFE_RETURN_RSRC(thread_resources->storage, id, thread_resources->count);
}
/* 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], &thread_resources->storage);
}
}
for (i=0; i<thread_resources->count; i++) {
free(thread_resources->storage[i]);
}
free(thread_resources->storage);
if (last) {
last->next = thread_resources->next;
} else {
tsrm_tls_table[hash_value] = thread_resources->next;
}
#if defined(PTHREADS)
pthread_setspecific(tls_key, 0);
#elif defined(TSRM_WIN32)
TlsSetValue(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(NETWARE)
return NXThreadGetId();
#elif defined(GNUPTH)
return pth_self();
#elif defined(PTHREADS)
return pthread_self();
#elif defined(NSAPI)
return systhread_current();
#elif defined(PI3WEB)
return PIThread_getCurrent();
#elif defined(TSRM_ST)
return st_thread_self();
#endif
}
/* Allocate a mutex */
TSRM_API MUTEX_T tsrm_mutex_alloc(void)
{
MUTEX_T mutexp;
#ifdef NETWARE
long flags = 0; /* Don't require NX_MUTEX_RECURSIVE, I guess */
NXHierarchy_t order = 0;
NX_LOCK_INFO_ALLOC (lockInfo, "PHP-TSRM", 0);
#endif
#ifdef TSRM_WIN32
mutexp = malloc(sizeof(CRITICAL_SECTION));
InitializeCriticalSection(mutexp);
#elif defined(NETWARE)
mutexp = NXMutexAlloc(flags, order, &lockInfo); /* return value ignored for now */
#elif defined(GNUPTH)
mutexp = (MUTEX_T) malloc(sizeof(*mutexp));
pth_mutex_init(mutexp);
#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();
#elif defined(TSRM_ST)
mutexp = st_mutex_new();
#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(NETWARE)
NXMutexFree(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);
#elif defined(TSRM_ST)
st_mutex_destroy(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(NETWARE)
return NXLock(mutexp);
#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);
#elif defined(TSRM_ST)
return st_mutex_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(NETWARE)
return NXUnlock(mutexp);
#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);
#elif defined(TSRM_ST)
return st_mutex_unlock(mutexp);
#endif
}
TSRM_API void *tsrm_set_new_thread_begin_handler(tsrm_thread_begin_func_t new_thread_begin_handler)
{
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(tsrm_thread_end_func_t new_thread_end_handler)
{
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 */
+186
View File
@@ -0,0 +1,186 @@
# 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
# Begin Source File
SOURCE=.\tsrm_win32.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\readdir.h
# End Source File
# 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
# Begin Source File
SOURCE=.\tsrm_win32.h
# End Source File
# End Group
# End Target
# End Project
+150
View File
@@ -0,0 +1,150 @@
/*
+----------------------------------------------------------------------+
| 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
/* #ifndef WIN32 */
#if !defined(WIN32) && !defined(NETWARE)
# include "tsrm_config.h"
#endif
#ifdef WIN32
# define TSRM_WIN32
#endif
#ifdef TSRM_WIN32
# ifdef TSRM_EXPORTS
# define TSRM_API __declspec(dllexport)
# else
# define TSRM_API __declspec(dllimport)
# endif
#else
# define TSRM_API
#endif
/* Only compile multi-threading functions if we're in ZTS mode */
#ifdef ZTS
#ifdef TSRM_WIN32
# include <windows.h>
#elif defined(NETWARE)
# include <nks/thread.h>
# include <nks/synch.h>
#elif defined(GNUPTH)
# include <pth.h>
#elif defined(PTHREADS)
# include <pthread.h>
#elif defined(TSRM_ST)
# include <st.h>
#endif
typedef int ts_rsrc_id;
/* Define THREAD_T and MUTEX_T */
#ifdef TSRM_WIN32
# define THREAD_T DWORD
# define MUTEX_T CRITICAL_SECTION *
#elif defined(NETWARE)
# define THREAD_T NXThreadId_t
# define MUTEX_T NXMutex_t *
#elif defined(GNUPTH)
# define THREAD_T pth_t
# define MUTEX_T pth_mutex_t *
#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 *
#elif defined(TSRM_ST)
# define THREAD_T st_thread_t
# define MUTEX_T st_mutex_t
#endif
typedef void (*ts_allocate_ctor)(void *, void ***);
typedef void (*ts_allocate_dtor)(void *, 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(ts_rsrc_id *rsrc_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
typedef void (*tsrm_thread_begin_func_t)(THREAD_T thread_id, void ***tsrm_ls);
typedef void (*tsrm_thread_end_func_t)(THREAD_T thread_id, void ***tsrm_ls);
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(tsrm_thread_begin_func_t new_thread_begin_handler);
TSRM_API void *tsrm_set_new_thread_end_handler(tsrm_thread_end_func_t new_thread_end_handler);
#define TSRM_SHUFFLE_RSRC_ID(rsrc_id) ((rsrc_id)+1)
#define TSRM_UNSHUFFLE_RSRC_ID(rsrc_id) ((rsrc_id)-1)
#define TSRMLS_FETCH() void ***tsrm_ls = (void ***) ts_resource_ex(0, NULL)
#define TSRMG(id, type, element) (((type) (*((void ***) tsrm_ls))[TSRM_UNSHUFFLE_RSRC_ID(id)])->element)
#define TSRMLS_D void ***tsrm_ls
#define TSRMLS_DC , TSRMLS_D
#define TSRMLS_C tsrm_ls
#define TSRMLS_CC , TSRMLS_C
#ifdef __cplusplus
}
#endif
#else /* non ZTS */
#define TSRMLS_FETCH()
#define TSRMLS_D void
#define TSRMLS_DC
#define TSRMLS_C
#define TSRMLS_CC
#endif /* ZTS */
#endif /* TSRM_H */
+1
View File
@@ -0,0 +1 @@
#undef PTHREADS
+5
View File
@@ -0,0 +1,5 @@
AC_DEFUN(AM_SET_LIBTOOL_VARIABLE,[
LIBTOOL='$(SHELL) $(top_builddir)/libtool $1'
])
+43
View File
@@ -0,0 +1,43 @@
# 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
Executable
+33
View File
@@ -0,0 +1,33 @@
#!/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
+31
View File
@@ -0,0 +1,31 @@
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_OUTPUT(Makefile)
+44
View File
@@ -0,0 +1,44 @@
#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 */
+160
View File
@@ -0,0 +1,160 @@
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" && test -n "$host"; then
host_alias=$host
fi
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
+124
View File
@@ -0,0 +1,124 @@
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)
])
AC_DEFUN(TSRM_CHECK_ST,[
if test -r "$1/include/st.h"; then
CPPFLAGS="$CPPFLAGS -I$1/include"
LDFLAGS="$LDFLAGS -L$1/lib"
elif test -r "$1/st.h"; then
CPPFLAGS="$CPPFLAGS -I$1"
LDFLAGS="$LDFLAGS -L$1"
fi
AC_CHECK_HEADERS(st.h,[],[
AC_MSG_ERROR([Sorry[,] I was unable to locate the State Threads header file. Please specify the prefix using --with-tsrm-st=/prefix])
])
LIBS="$LIBS -lst"
AC_MSG_CHECKING(for SGI's State Threads)
AC_MSG_RESULT(yes)
AC_DEFINE(TSRM_ST, 1, [ ])
])
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-st,
[ --with-tsrm-st],[
TSRM_ST=$withval
],[
TSRM_ST=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_ST" != "no"; then
TSRM_CHECK_ST($TSRM_ST)
elif test "$TSRM_PTHREADS" != "no"; then
TSRM_CHECK_PTHREADS
fi
])
+9
View File
@@ -0,0 +1,9 @@
#ifndef TSRM_CONFIG_NW_H
#define TSRM_CONFIG_NW_H
#define HAVE_UTIME 1
/* Though we have alloca(), this seems to be causing some problem with the stack pointer -- hence not using it */
/* #define HAVE_ALLOCA 1 */
#endif
+15
View File
@@ -0,0 +1,15 @@
#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
+60
View File
@@ -0,0 +1,60 @@
#ifndef TSRM_CONFIG_COMMON_H
#define TSRM_CONFIG_COMMON_H
#if WINNT|WIN32
# define TSRM_WIN32
#endif
#ifdef TSRM_WIN32
# include "tsrm_config.w32.h"
#elif defined(NETWARE)
# include "tsrm_config.nw.h"
#else
# include "tsrm_config.h"
# include <sys/param.h>
#endif
#ifdef TSRM_WIN32
#include <malloc.h>
#endif
/* AIX requires this to be the first thing in the file. */
#ifndef __GNUC__
# if HAVE_ALLOCA_H
# include <alloca.h>
# else
# ifdef _AIX
#pragma alloca
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
# endif
# endif
# endif
#endif
#if HAVE_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 */
+260
View File
@@ -0,0 +1,260 @@
/*
+----------------------------------------------------------------------+
| PHP Version 4 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2002 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Venkat Raghavan S <rvenkat@novell.com> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include "TSRM.h"
#ifdef NETWARE
#ifdef USE_MKFIFO
#include <sys/stat.h>
#elif !defined(USE_PIPE_OPEN) /* NXFifoOpen */
#include <nks/fsio.h>
#endif
#include <nks/vm.h>
#include <nks/memory.h>
#include <string.h>
#include "mktemp.h"
/* strtok() call in LibC is abending when used in a different address space -- hence using
PHP's version itself for now : Venkat (30/4/02) */
#include "tsrm_strtok_r.h"
#define tsrm_strtok_r(a,b,c) strtok((a),(b))
#define WHITESPACE " \t"
#define MAX_ARGS 10
TSRM_API FILE* popen(const char *commandline, const char *type)
{
char *command = NULL, *argv[MAX_ARGS] = {'\0'}, **env = NULL;
char *tempName = "sys:/php/temp/phpXXXXXX.tmp";
char *filePath = NULL;
char *ptr = NULL;
int ptrLen = 0, argc = 0, i = 0, envCount = 0, err = 0;
FILE *stream = NULL;
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
int pipe_handle;
int mode = O_RDONLY;
#else
NXHandle_t pipe_handle;
NXMode_t mode = NX_O_RDONLY;
#endif
NXExecEnvSpec_t envSpec;
NXNameSpec_t nameSpec;
NXVmId_t newVM = 0;
/* Check for validity of input parameters */
if (!commandline || !type)
return NULL;
/* Get temporary file name */
filePath = mktemp(tempName);
/*consoleprintf ("PHP | popen: file path = %s, mode = %s\n", filePath, type);*/
if (!filePath)
return NULL;
/* Set pipe mode according to type -- for now allow only "r" or "w" */
if (strcmp(type, "r") == 0)
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
mode = O_RDONLY;
#else
mode = NX_O_RDONLY;
#endif
else if (strcmp(type, "w") == 0)
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
mode = O_WRONLY;
#else
mode = NX_O_WRONLY;
#endif
else
return NULL;
#ifdef USE_PIPE_OPEN
pipe_handle = pipe_open(filePath, mode);
/*consoleprintf ("PHP | popen: pipe_open() returned %d\n", pipe_handle);*/
if (pipe_handle == -1)
return NULL;
#elif defined(USE_MKFIFO)
pipe_handle = mkfifo(filePath, mode);
consoleprintf ("PHP | popen: mkfifo() returned %d\n", pipe_handle);
if (pipe_handle == -1)
return NULL;
#else
/*
- NetWare doesn't require first parameter
- Allowing LibC to choose the buffer size for now
*/
err = NXFifoOpen(0, filePath, mode, 0, &pipe_handle);
/*consoleprintf ("PHP | popen: NXFifoOpen() returned %d\n", err);*/
if (err)
return NULL;
#endif
/* Copy the environment variables in preparation for the spawn call */
envCount = NXGetEnvCount() + 1; /* add one for NULL */
env = (char**)NXMemAlloc(sizeof(char*) * envCount, 0);
if (!env)
return NULL;
err = NXCopyEnv(env, envCount);
consoleprintf ("PHP | popen: NXCopyEnv() returned %d\n", err);
if (err)
{
NXMemFree (env);
return NULL;
}
/* Separate commandline string into words */
consoleprintf ("PHP | popen: commandline = %s\n", commandline);
ptr = tsrm_strtok_r((char*)commandline, WHITESPACE, NULL);
ptrLen = strlen(ptr);
command = (char*)malloc(ptrLen + 1);
if (!command)
{
NXMemFree (env);
return NULL;
}
strcpy (command, ptr);
ptr = tsrm_strtok_r(NULL, WHITESPACE, NULL);
while (ptr && (argc < MAX_ARGS))
{
ptrLen = strlen(ptr);
argv[argc] = (char*)malloc(ptrLen + 1);
if (!argv[argc])
{
NXMemFree (env);
if (command)
free (command);
for (i = 0; i < argc; i++)
{
if (argv[i])
free (argv[i]);
}
return NULL;
}
strcpy (argv[argc], ptr);
argc++;
ptr = tsrm_strtok_r(NULL, WHITESPACE, NULL);
}
consoleprintf ("PHP | popen: commandline string parsed into tokens\n");
/* Setup the execution environment and spawn new process */
envSpec.esFlags = 0; /* Not used */
envSpec.esArgc = argc;
envSpec.esArgv = (void**)argv;
envSpec.esEnv = (void**)env;
envSpec.esStdin.ssType =
envSpec.esStdout.ssType = NX_OBJ_FIFO;
envSpec.esStderr.ssType = NX_OBJ_FILE;
/*
envSpec.esStdin.ssHandle =
envSpec.esStdout.ssHandle =
envSpec.esStderr.ssHandle = -1;
*/
envSpec.esStdin.ssPathCtx =
envSpec.esStdout.ssPathCtx =
envSpec.esStderr.ssPathCtx = NULL;
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
if (mode == O_RDONLY)
#else
if (mode == NX_O_RDONLY)
#endif
{
envSpec.esStdin.ssPath = filePath;
envSpec.esStdout.ssPath = stdout;
}
else /* Write Only */
{
envSpec.esStdin.ssPath = stdin;
envSpec.esStdout.ssPath = filePath;
}
envSpec.esStderr.ssPath = stdout;
nameSpec.ssType = NX_OBJ_FIFO;
/* nameSpec.ssHandle = 0; */ /* Not used */
nameSpec.ssPathCtx = NULL; /* Not used */
nameSpec.ssPath = argv[0];
consoleprintf ("PHP | popen: environment setup\n");
err = NXVmSpawn(&nameSpec, &envSpec, 0, &newVM);
consoleprintf ("PHP | popen: NXVmSpawn() returned %d\n", err);
if (!err)
/* Get file pointer corresponding to the pipe (file) opened */
stream = fdopen(pipe_handle, type);
/* Clean-up */
if (env)
NXMemFree (env);
if (pipe_handle)
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
close(pipe_handle);
#else
NXClose(pipe_handle);
#endif
if (command)
free (command);
for (i = 0; i < argc; i++)
{
if (argv[i])
free (argv[i]);
}
consoleprintf ("PHP | popen: all clean-up done, returning...\n");
return stream;
}
TSRM_API int pclose(FILE* stream)
{
int err = 0;
NXHandle_t fd = 0;
/* Get the process associated with this pipe (file) handle and terminate it */
fd = fileno(stream);
NXClose (fd);
err = fclose(stream);
return err;
}
#endif
+8 -14
View File
@@ -12,23 +12,17 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: David Eriksson <david@2good.com> |
| Authors: Venkat Raghavan S <rvenkat@novell.com> |
+----------------------------------------------------------------------+
*/
*/
/*
* $Id$
* vim: syntax=c tabstop=2 shiftwidth=2
*/
/*
* OrbitEnum class
*/
#ifndef __enum_h__
#define __enum_h__
#ifndef TSRM_NW_H
#define TSRM_NW_H
#include "class.h"
#include "TSRM.h"
DECLARE_CLASS(OrbitEnum);
TSRM_API FILE* popen(const char *command, const char *type);
TSRM_API int pclose(FILE* stream);
#endif /* __enum_h__ */
#endif
+63
View File
@@ -0,0 +1,63 @@
#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
@@ -0,0 +1,6 @@
#ifndef TSRM_STRTOK_R
#define TSRM_STRTOK_R
char *tsrm_strtok_r(char *s, const char *delim, char **last);
#endif
+864
View File
@@ -0,0 +1,864 @@
/*
+----------------------------------------------------------------------+
| PHP Version 4 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2002 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: 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>
#include "tsrm_win32.h"
#endif
#ifdef NETWARE
/*#include "pipe.h"*/
#include "tsrm_nw.h"
#endif
#define VIRTUAL_CWD_DEBUG 0
#include "TSRM.h"
/* Only need mutex for popen() in Windows and NetWare, because it doesn't chdir() on UNIX */
#if (defined(TSRM_WIN32) || defined(NETWARE)) && 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
#include <tchar.h>
#define tsrm_strtok_r(a,b,c) _tcstok((a),(b))
#define TOKENIZER_STRING "/\\"
static int php_check_dots(const char *element, int n)
{
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] == '.')
#elif defined(NETWARE)
/* NetWare has strtok() (in LibC) and allows both slashes in paths, like Windows --
but rest of the stuff is like Unix */
/* strtok() call in LibC is abending when used in a different address space -- hence using
PHP's version itself for now */
/*#define tsrm_strtok_r(a,b,c) strtok((a),(b))*/
#define TOKENIZER_STRING "/\\"
#else
#define TOKENIZER_STRING "/"
#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)
{
#if !(defined(NETWARE) && defined(CLIB_STAT_PATCH))
struct stat buf;
if (stat(state->cwd, &buf) == 0 && S_ISDIR(buf.st_mode))
#else
struct stat_libc buf;
if (stat(state->cwd, (struct stat*)(&buf)) == 0 && S_ISDIR(buf.st_mode))
#endif
return (0);
return (1);
}
static int php_is_file_ok(const cwd_state *state)
{
#if !(defined(NETWARE) && defined(CLIB_STAT_PATCH))
struct stat buf;
if (stat(state->cwd, &buf) == 0 && S_ISREG(buf.st_mode))
#else
struct stat_libc buf;
if (stat(state->cwd, (struct stat*)(&buf)) == 0 && S_ISREG(buf.st_mode))
#endif
return (0);
return (1);
}
static void cwd_globals_ctor(virtual_cwd_globals *cwd_globals TSRMLS_DC)
{
CWD_STATE_COPY(&cwd_globals->cwd, &main_cwd_state);
}
static void cwd_globals_dtor(virtual_cwd_globals *cwd_globals TSRMLS_DC)
{
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
ts_allocate_id(&cwd_globals_id, sizeof(virtual_cwd_globals), (ts_allocate_ctor) cwd_globals_ctor, (ts_allocate_dtor) cwd_globals_dtor);
#else
cwd_globals_ctor(&cwd_globals TSRMLS_CC);
#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 TSRMLS_CC);
#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 TSRMLS_DC)
{
cwd_state *state;
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 TSRMLS_DC)
{
size_t length;
char *cwd;
cwd = virtual_getcwd_ex(&length TSRMLS_CC);
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__) && !defined(NETWARE)
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_WHEN_ABSOLUTE needs to account for volume name that is unique to NetWare absolute paths */
#ifndef NETWARE
copy_amount = COPY_WHEN_ABSOLUTE;
#else
copy_amount = COPY_WHEN_ABSOLUTE(path_copy);
#endif
is_absolute = 1;
#ifdef TSRM_WIN32
} else if (IS_UNC_PATH(path_copy, path_length)) {
copy_amount = 2;
is_absolute = 1;
} 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);
#ifdef TSRM_WIN32
/* Windows 9x will consider C:\\Foo as a network path. Avoid it. */
if ((state->cwd[state->cwd_length-1]!='\\' && state->cwd[state->cwd_length-1]!='/') ||
IsDBCSLeadByte(state->cwd[state->cwd_length-2])) {
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
}
#elif defined(NETWARE)
/* If the token is a volume name, it will have colon at the end -- so, no slash before it */
if (ptr[ptr_length-1] != ':') {
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
}
#else
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
#endif
memcpy(&state->cwd[state->cwd_length], ptr, ptr_length+1);
state->cwd_length += ptr_length;
}
ptr = tsrm_strtok_r(NULL, TOKENIZER_STRING, &tok);
}
/* COPY_WHEN_ABSOLUTE needs to account for volume name that is unique to NetWare absolute paths */
#ifndef NETWARE
if (state->cwd_length == COPY_WHEN_ABSOLUTE) {
#else
if (state->cwd_length == COPY_WHEN_ABSOLUTE(state->cwd)) {
#endif
state->cwd = (char *) realloc(state->cwd, state->cwd_length+1+1);
state->cwd[state->cwd_length] = DEFAULT_SLASH;
state->cwd[state->cwd_length+1] = '\0';
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 TSRMLS_DC)
{
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 TSRMLS_DC) TSRMLS_DC)
{
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;
}
/* COPY_WHEN_ABSOLUTE needs to account for volume name that is unique to NetWare absolute paths */
#ifndef NETWARE
if (length == COPY_WHEN_ABSOLUTE && IS_ABSOLUTE_PATH(path, length+1)) { /* Also use trailing slash if this is absolute */
#else
if (length == COPY_WHEN_ABSOLUTE(path) && IS_ABSOLUTE_PATH(path, length+1)) { /* Also use trailing slash if this is absolute */
#endif
length++;
}
temp = (char *) tsrm_do_alloca(length+1);
memcpy(temp, path, length);
temp[length] = 0;
#if VIRTUAL_CWD_DEBUG
fprintf (stderr, "Changing directory to %s\n", temp);
#endif
retval = p_chdir(temp TSRMLS_CC);
tsrm_free_alloca(temp);
return retval;
}
CWD_API char *virtual_realpath(const char *path, char *real_path TSRMLS_DC)
{
cwd_state new_state;
int retval;
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 TSRMLS_DC)
{
cwd_state new_state;
int retval;
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 TSRMLS_DC)
{
return virtual_filepath_ex(path, filepath, php_is_file_ok TSRMLS_CC);
}
CWD_API FILE *virtual_fopen(const char *path, const char *mode TSRMLS_DC)
{
cwd_state new_state;
FILE *f;
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 TSRMLS_DC)
{
cwd_state new_state;
int ret;
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 TSRMLS_DC)
{
cwd_state new_state;
int ret;
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;
}
#if !defined(TSRM_WIN32) && !defined(NETWARE)
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group TSRMLS_DC)
{
cwd_state new_state;
int ret;
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 TSRMLS_DC, int flags, ...)
{
cwd_state new_state;
int f;
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 = (mode_t) va_arg(arg, int);
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 TSRMLS_DC)
{
cwd_state new_state;
int f;
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 TSRMLS_DC)
{
cwd_state old_state;
cwd_state new_state;
int retval;
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;
}
#if !(defined(NETWARE) && defined(CLIB_STAT_PATCH))
CWD_API int virtual_stat(const char *path, struct stat *buf TSRMLS_DC)
{
cwd_state new_state;
int retval;
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;
}
#else
CWD_API int virtual_stat(const char *path, struct stat_libc *buf TSRMLS_DC)
{
cwd_state new_state;
int retval;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, path, NULL);
retval = stat(new_state.cwd, (struct stat*)buf);
CWD_STATE_FREE(&new_state);
return retval;
}
#endif
#if !defined(TSRM_WIN32) && !defined(NETWARE)
CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC)
{
cwd_state new_state;
int retval;
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 TSRMLS_DC)
{
cwd_state new_state;
int retval;
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 TSRMLS_DC)
{
cwd_state new_state;
int retval;
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 TSRMLS_DC)
{
cwd_state new_state;
int retval;
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 TSRMLS_DC)
{
cwd_state new_state;
DIR *retval;
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;
}
#ifdef TSRM_WIN32
/* On Windows the trick of prepending "cd cwd; " doesn't work so we need to perform
a real chdir() and mutex it
*/
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
{
char prev_cwd[MAXPATHLEN];
char *getcwd_result;
FILE *retval;
getcwd_result = getcwd(prev_cwd, MAXPATHLEN);
if (!getcwd_result) {
return NULL;
}
#ifdef ZTS
tsrm_mutex_lock(cwd_mutex);
#endif
chdir(CWDG(cwd).cwd);
retval = popen(command, type);
chdir(prev_cwd);
#ifdef ZTS
tsrm_mutex_unlock(cwd_mutex);
#endif
return retval;
}
#elif defined(NETWARE)
/* On NetWare, the trick of prepending "cd cwd; " doesn't work so we need to perform
a VCWD_CHDIR() and mutex it
*/
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
{
char prev_cwd[MAXPATHLEN];
char *getcwd_result;
FILE *retval;
getcwd_result = VCWD_GETCWD(prev_cwd, MAXPATHLEN);
if (!getcwd_result) {
return NULL;
}
#ifdef ZTS
tsrm_mutex_lock(cwd_mutex);
#endif
VCWD_CHDIR(CWDG(cwd).cwd);
retval = popen(command, type);
VCWD_CHDIR(prev_cwd);
#ifdef ZTS
tsrm_mutex_unlock(cwd_mutex);
#endif
return retval;
}
#else /* Unix */
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
{
int command_length;
char *command_line;
char *ptr;
FILE *retval;
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);
retval = popen(command_line, type);
free(command_line);
return retval;
}
#endif
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
+241
View File
@@ -0,0 +1,241 @@
/*
+----------------------------------------------------------------------+
| PHP Version 4 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2002 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Sascha Schumann <sascha@schumann.cx> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
#ifndef VIRTUAL_CWD_H
#define VIRTUAL_CWD_H
#include "TSRM.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 DEFAULT_DIR_SEPARATOR ';'
#define IS_SLASH(c) ((c) == '/' || (c) == '\\')
#define IS_SLASH_P(c) (*(c) == '/' || \
(*(c) == '\\' && !IsDBCSLeadByte(*(c-1))))
#define COPY_WHEN_ABSOLUTE 2
#define IS_ABSOLUTE_PATH(path, len) \
(len >= 2 && isalpha(path[0]) && path[1] == ':')
#define IS_UNC_PATH(path, len) \
(len >= 2 && IS_SLASH(path[0]) && IS_SLASH(path[1]))
#elif defined(NETWARE)
#ifdef HAVE_DIRENT_H
#include <dirent.h>
#endif
#define DEFAULT_SLASH '/'
#define DEFAULT_DIR_SEPARATOR ';'
#define IS_SLASH(c) ((c) == '/' || (c) == '\\')
#define COPY_WHEN_ABSOLUTE(path) \
(strchr(path, ':') - path + 1) /* Take the volume name which ends with a colon */
#define IS_ABSOLUTE_PATH(path, len) \
(strchr(path, ':') != NULL) /* Colon indicates volume name */
#else
#ifdef HAVE_DIRENT_H
#include <dirent.h>
#endif
#define DEFAULT_SLASH '/'
#ifdef __riscos__
#define DEFAULT_DIR_SEPARATOR ';'
#else
#define DEFAULT_DIR_SEPARATOR ':'
#endif
#define IS_SLASH(c) ((c) == '/')
#define IS_SLASH_P(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 TSRMLS_DC);
CWD_API char *virtual_getcwd(char *buf, size_t size TSRMLS_DC);
CWD_API int virtual_chdir(const char *path TSRMLS_DC);
CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path TSRMLS_DC) TSRMLS_DC);
CWD_API int virtual_filepath(const char *path, char **filepath TSRMLS_DC);
CWD_API int virtual_filepath_ex(const char *path, char **filepath, verify_path_func verify_path TSRMLS_DC);
CWD_API char *virtual_realpath(const char *path, char *real_path TSRMLS_DC);
CWD_API FILE *virtual_fopen(const char *path, const char *mode TSRMLS_DC);
CWD_API int virtual_open(const char *path TSRMLS_DC, int flags, ...);
CWD_API int virtual_creat(const char *path, mode_t mode TSRMLS_DC);
CWD_API int virtual_rename(char *oldname, char *newname TSRMLS_DC);
#if !(defined(NETWARE) && defined(CLIB_STAT_PATCH))
CWD_API int virtual_stat(const char *path, struct stat *buf TSRMLS_DC);
#else
CWD_API int virtual_stat(const char *path, struct stat_libc *buf TSRMLS_DC);
#endif
#if !defined(TSRM_WIN32) && !defined(NETWARE)
CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC);
#endif
CWD_API int virtual_unlink(const char *path TSRMLS_DC);
CWD_API int virtual_mkdir(const char *pathname, mode_t mode TSRMLS_DC);
CWD_API int virtual_rmdir(const char *pathname TSRMLS_DC);
CWD_API DIR *virtual_opendir(const char *pathname TSRMLS_DC);
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC);
#if HAVE_UTIME
CWD_API int virtual_utime(const char *filename, struct utimbuf *buf TSRMLS_DC);
#endif
CWD_API int virtual_chmod(const char *filename, mode_t mode TSRMLS_DC);
#if !defined(TSRM_WIN32) && !defined(NETWARE)
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group TSRMLS_DC);
#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 CWDG(v) TSRMG(cwd_globals_id, virtual_cwd_globals *, v)
#else
# define CWDG(v) (cwd_globals.v)
#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 VCWD_GETCWD(buff, size) virtual_getcwd(buff, size TSRMLS_CC)
#define VCWD_FOPEN(path, mode) virtual_fopen(path, mode TSRMLS_CC)
/* Because open() has two modes, we have to macros to replace it */
#define VCWD_OPEN(path, flags) virtual_open(path TSRMLS_CC, flags)
#define VCWD_OPEN_MODE(path, flags, mode) virtual_open(path TSRMLS_CC, flags, mode)
#define VCWD_CREAT(path, mode) virtual_creat(path, mode TSRMLS_CC)
#define VCWD_CHDIR(path) virtual_chdir(path TSRMLS_CC)
#define VCWD_CHDIR_FILE(path) virtual_chdir_file(path, virtual_chdir TSRMLS_CC)
#define VCWD_GETWD(buf)
#define VCWD_REALPATH(path, real_path) virtual_realpath(path, real_path TSRMLS_CC)
#define VCWD_RENAME(oldname, newname) virtual_rename(oldname, newname TSRMLS_CC)
#define VCWD_STAT(path, buff) virtual_stat(path, buff TSRMLS_CC)
#if !defined(TSRM_WIN32) && !defined(NETWARE)
#define VCWD_LSTAT(path, buff) virtual_stat(path, buff TSRMLS_CC)
#else
#define VCWD_LSTAT(path, buff) virtual_lstat(path, buff TSRMLS_CC)
#endif
#define VCWD_UNLINK(path) virtual_unlink(path TSRMLS_CC)
#define VCWD_MKDIR(pathname, mode) virtual_mkdir(pathname, mode TSRMLS_CC)
#define VCWD_RMDIR(pathname) virtual_rmdir(pathname TSRMLS_CC)
#define VCWD_OPENDIR(pathname) virtual_opendir(pathname TSRMLS_CC)
#define VCWD_POPEN(command, type) virtual_popen(command, type TSRMLS_CC)
#if HAVE_UTIME
#define VCWD_UTIME(path, time) virtual_utime(path, time TSRMLS_CC)
#endif
#define VCWD_CHMOD(path, mode) virtual_chmod(path, mode TSRMLS_CC)
#if !defined(TSRM_WIN32) && !defined(NETWARE)
#define VCWD_CHOWN(path, owner, group) virtual_chown(path, owner, group TSRMLS_CC)
#endif
#else
#define VCWD_GETCWD(buff, size) getcwd(buff, size)
#define VCWD_FOPEN(path, mode) fopen(path, mode)
#define VCWD_OPEN(path, flags) open(path, flags)
#define VCWD_OPEN_MODE(path, flags, mode) open(path, flags, mode)
#define VCWD_CREAT(path, mode) creat(path, mode)
#define VCWD_RENAME(oldname, newname) rename(oldname, newname)
#define VCWD_CHDIR(path) chdir(path)
#define VCWD_CHDIR_FILE(path) virtual_chdir_file(path, chdir)
#define VCWD_GETWD(buf) getwd(buf)
#define VCWD_STAT(path, buff) stat(path, buff)
#define VCWD_LSTAT(path, buff) lstat(path, buff)
#define VCWD_UNLINK(path) unlink(path)
#define VCWD_MKDIR(pathname, mode) mkdir(pathname, mode)
#define VCWD_RMDIR(pathname) rmdir(pathname)
#define VCWD_OPENDIR(pathname) opendir(pathname)
#define VCWD_POPEN(command, type) popen(command, type)
#if !defined(TSRM_WIN32) && !defined(NETWARE)
#define VCWD_REALPATH(path, real_path) realpath(path, real_path)
#else
#define VCWD_REALPATH(path, real_path) strcpy(real_path, path)
#endif
#if HAVE_UTIME
#define VCWD_UTIME(path, time) utime(path, time)
#endif
#define VCWD_CHMOD(path, mode) chmod(path, mode)
#if !defined(TSRM_WIN32) && !defined(NETWARE)
#define VCWD_CHOWN(path, owner, group) chown(path, owner, group)
#endif
#endif
#endif /* VIRTUAL_CWD_H */
+359
View File
@@ -0,0 +1,359 @@
/*
+----------------------------------------------------------------------+
| PHP Version 4 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2002 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Daniel Beulshausen <daniel@php4win.de> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <io.h>
#include <process.h>
#include <time.h>
#include "TSRM.h"
#ifdef TSRM_WIN32
#include <windows.h>
#include "tsrm_win32.h"
#ifdef ZTS
static ts_rsrc_id win32_globals_id;
#else
static tsrm_win32_globals win32_globals;
#endif
static void tsrm_win32_ctor(tsrm_win32_globals *globals TSRMLS_DC)
{
globals->process = NULL;
globals->shm = NULL;
globals->process_size = 0;
globals->shm_size = 0;
globals->comspec = _strdup((GetVersion()<0x80000000)?"cmd.exe":"command.com");
}
static void tsrm_win32_dtor(tsrm_win32_globals *globals TSRMLS_DC)
{
shm_pair *ptr;
if (globals->process) {
free(globals->process);
}
if (globals->shm) {
for (ptr = globals->shm; ptr < (globals->shm + globals->shm_size); ptr++) {
UnmapViewOfFile(ptr->addr);
CloseHandle(ptr->segment);
UnmapViewOfFile(ptr->descriptor);
CloseHandle(ptr->info);
}
free(globals->shm);
}
free(globals->comspec);
}
TSRM_API void tsrm_win32_startup(void)
{
#ifdef ZTS
ts_allocate_id(&win32_globals_id, sizeof(tsrm_win32_globals), (ts_allocate_ctor)tsrm_win32_ctor, (ts_allocate_ctor)tsrm_win32_dtor);
#else
tsrm_win32_ctor(&win32_globals TSRMLS_CC);
#endif
}
TSRM_API void tsrm_win32_shutdown(void)
{
#ifndef ZTS
tsrm_win32_dtor(&win32_globals TSRMLS_CC);
#endif
}
static process_pair *process_get(FILE *stream TSRMLS_DC)
{
process_pair *ptr;
process_pair *newptr;
for (ptr = TWG(process); ptr < (TWG(process) + TWG(process_size)); ptr++) {
if (ptr->stream == stream) {
break;
}
}
if (ptr < (TWG(process) + TWG(process_size))) {
return ptr;
}
newptr = (process_pair*)realloc((void*)TWG(process), (TWG(process_size)+1)*sizeof(process_pair));
if (newptr == NULL) {
return NULL;
}
TWG(process) = newptr;
ptr = newptr + TWG(process_size);
TWG(process_size)++;
return ptr;
}
static shm_pair *shm_get(int key, void *addr)
{
shm_pair *ptr;
shm_pair *newptr;
TSRMLS_FETCH();
for (ptr = TWG(shm); ptr < (TWG(shm) + TWG(shm_size)); ptr++) {
if (!ptr->descriptor) {
continue;
}
if (!addr && ptr->descriptor->shm_perm.key == key) {
break;
} else if (ptr->addr == addr) {
break;
}
}
if (ptr < (TWG(shm) + TWG(shm_size))) {
return ptr;
}
newptr = (shm_pair*)realloc((void*)TWG(shm), (TWG(shm_size)+1)*sizeof(shm_pair));
if (newptr == NULL) {
return NULL;
}
TWG(shm) = newptr;
ptr = newptr + TWG(shm_size);
TWG(shm_size)++;
return ptr;
}
static HANDLE dupHandle(HANDLE fh, BOOL inherit) {
HANDLE copy, self = GetCurrentProcess();
if (!DuplicateHandle(self, fh, self, &copy, 0, inherit, DUPLICATE_SAME_ACCESS|DUPLICATE_CLOSE_SOURCE)) {
return NULL;
}
return copy;
}
TSRM_API FILE *popen(const char *command, const char *type)
{
FILE *stream = NULL;
int fno, str_len = strlen(type), read, mode;
STARTUPINFO startup;
PROCESS_INFORMATION process;
SECURITY_ATTRIBUTES security;
HANDLE in, out;
char *cmd;
process_pair *proc;
TSRMLS_FETCH();
security.nLength = sizeof(SECURITY_ATTRIBUTES);
security.bInheritHandle = TRUE;
security.lpSecurityDescriptor = NULL;
if (!str_len || !CreatePipe(&in, &out, &security, 2048L)) {
return NULL;
}
memset(&startup, 0, sizeof(STARTUPINFO));
memset(&process, 0, sizeof(PROCESS_INFORMATION));
startup.cb = sizeof(STARTUPINFO);
startup.dwFlags = STARTF_USESTDHANDLES;
startup.hStdError = GetStdHandle(STD_ERROR_HANDLE);
read = (type[0] == 'r') ? TRUE : FALSE;
mode = ((str_len == 2) && (type[1] == 'b')) ? O_BINARY : O_TEXT;
if (read) {
in = dupHandle(in, FALSE);
startup.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
startup.hStdOutput = out;
} else {
out = dupHandle(out, FALSE);
startup.hStdInput = in;
startup.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
}
cmd = (char*)malloc(strlen(command)+strlen(TWG(comspec))+sizeof(" /c "));
sprintf(cmd, "%s /c %s", TWG(comspec), command);
if (!CreateProcess(NULL, cmd, &security, &security, security.bInheritHandle, NORMAL_PRIORITY_CLASS, NULL, NULL, &startup, &process)) {
return NULL;
}
free(cmd);
CloseHandle(process.hThread);
proc = process_get(NULL TSRMLS_CC);
if (read) {
fno = _open_osfhandle((long)in, _O_RDONLY | mode);
CloseHandle(out);
} else {
fno = _open_osfhandle((long)out, _O_WRONLY | mode);
CloseHandle(in);
}
stream = _fdopen(fno, type);
proc->prochnd = process.hProcess;
proc->stream = stream;
return stream;
}
TSRM_API int pclose(FILE *stream)
{
DWORD termstat = 0;
process_pair *process;
TSRMLS_FETCH();
if ((process = process_get(stream TSRMLS_CC)) == NULL) {
return 0;
}
fflush(process->stream);
fclose(process->stream);
WaitForSingleObject(process->prochnd, INFINITE);
GetExitCodeProcess(process->prochnd, &termstat);
process->stream = NULL;
CloseHandle(process->prochnd);
return termstat;
}
TSRM_API int shmget(int key, int size, int flags)
{
shm_pair *shm;
char shm_segment[26], shm_info[29];
HANDLE shm_handle, info_handle;
BOOL created = FALSE;
if (size < 0) {
return -1;
}
sprintf(shm_segment, "TSRM_SHM_SEGMENT:%d", key);
sprintf(shm_info, "TSRM_SHM_DESCRIPTOR:%d", key);
shm_handle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, shm_segment);
info_handle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, shm_info);
if ((!shm_handle && !info_handle)) {
if (flags & IPC_EXCL) {
return -1;
}
if (flags & IPC_CREAT) {
shm_handle = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, size, shm_segment);
info_handle = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, sizeof(shm->descriptor), shm_info);
created = TRUE;
}
if ((!shm_handle || !info_handle)) {
return -1;
}
}
shm = shm_get(key, NULL);
shm->segment = shm_handle;
shm->info = info_handle;
shm->descriptor = MapViewOfFileEx(shm->info, FILE_MAP_ALL_ACCESS, 0, 0, 0, NULL);
if (created) {
shm->descriptor->shm_perm.key = key;
shm->descriptor->shm_segsz = size;
shm->descriptor->shm_ctime = time(NULL);
shm->descriptor->shm_cpid = getpid();
shm->descriptor->shm_perm.mode = flags;
shm->descriptor->shm_perm.cuid = shm->descriptor->shm_perm.cgid= 0;
shm->descriptor->shm_perm.gid = shm->descriptor->shm_perm.uid = 0;
shm->descriptor->shm_atime = shm->descriptor->shm_dtime = 0;
shm->descriptor->shm_lpid = shm->descriptor->shm_nattch = 0;
shm->descriptor->shm_perm.mode = shm->descriptor->shm_perm.seq = 0;
}
if (shm->descriptor->shm_perm.key != key || size > shm->descriptor->shm_segsz ) {
CloseHandle(shm->segment);
UnmapViewOfFile(shm->descriptor);
CloseHandle(shm->info);
return -1;
}
return key;
}
TSRM_API void *shmat(int key, const void *shmaddr, int flags)
{
shm_pair *shm = shm_get(key, NULL);
if (!shm->segment) {
return (void*)-1;
}
shm->descriptor->shm_atime = time(NULL);
shm->descriptor->shm_lpid = getpid();
shm->descriptor->shm_nattch++;
shm->addr = MapViewOfFileEx(shm->segment, FILE_MAP_ALL_ACCESS, 0, 0, 0, NULL);
return shm->addr;
}
TSRM_API int shmdt(const void *shmaddr)
{
shm_pair *shm = shm_get(0, (void*)shmaddr);
if (!shm->segment) {
return -1;
}
shm->descriptor->shm_dtime = time(NULL);
shm->descriptor->shm_lpid = getpid();
shm->descriptor->shm_nattch--;
return UnmapViewOfFile(shm->addr) ? 0 : -1;
}
TSRM_API int shmctl(int key, int cmd, struct shmid_ds *buf) {
shm_pair *shm = shm_get(key, NULL);
if (!shm->segment) {
return -1;
}
switch (cmd) {
case IPC_STAT:
memcpy(buf, shm->descriptor, sizeof(struct shmid_ds));
return 0;
case IPC_SET:
shm->descriptor->shm_ctime = time(NULL);
shm->descriptor->shm_perm.uid = buf->shm_perm.uid;
shm->descriptor->shm_perm.gid = buf->shm_perm.gid;
shm->descriptor->shm_perm.mode = buf->shm_perm.mode;
return 0;
case IPC_RMID:
if (shm->descriptor->shm_nattch < 1) {
shm->descriptor->shm_perm.key = -1;
}
return 0;
default:
return -1;
}
}
#endif
+107
View File
@@ -0,0 +1,107 @@
/*
+----------------------------------------------------------------------+
| PHP Version 4 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2002 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Daniel Beulshausen <daniel@php4win.de> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
#ifndef TSRM_WIN32_H
#define TSRM_WIN32_H
#include "TSRM.h"
#ifdef TSRM_WIN32
#include <windows.h>
struct ipc_perm {
int key;
unsigned short uid;
unsigned short gid;
unsigned short cuid;
unsigned short cgid;
unsigned short mode;
unsigned short seq;
};
struct shmid_ds {
struct ipc_perm shm_perm;
int shm_segsz;
time_t shm_atime;
time_t shm_dtime;
time_t shm_ctime;
unsigned short shm_cpid;
unsigned short shm_lpid;
short shm_nattch;
};
typedef struct {
FILE *stream;
HANDLE prochnd;
} process_pair;
typedef struct {
void *addr;
HANDLE info;
HANDLE segment;
struct shmid_ds *descriptor;
} shm_pair;
typedef struct {
process_pair *process;
shm_pair *shm;
int process_size;
int shm_size;
char *comspec;
} tsrm_win32_globals;
#ifdef ZTS
# define TWG(v) TSRMG(win32_globals_id, tsrm_win32_globals *, v)
#else
# define TWG(v) (win32_globals.v)
#endif
#endif
#define IPC_PRIVATE 0
#define IPC_CREAT 00001000
#define IPC_EXCL 00002000
#define IPC_NOWAIT 00004000
#define IPC_RMID 0
#define IPC_SET 1
#define IPC_STAT 2
#define IPC_INFO 3
#define SHM_R PAGE_READONLY
#define SHM_W PAGE_READWRITE
#define SHM_RDONLY FILE_MAP_READ
#define SHM_RND FILE_MAP_WRITE
#define SHM_REMAP FILE_MAP_COPY
TSRM_API void tsrm_win32_startup(void);
TSRM_API void tsrm_win32_shutdown(void);
TSRM_API FILE *popen(const char *command, const char *type);
TSRM_API int pclose(FILE *stream);
TSRM_API int shmget(int key, int size, int flags);
TSRM_API void *shmat(int key, const void *shmaddr, int flags);
TSRM_API int shmdt(const void *shmaddr);
TSRM_API int shmctl(int key, int cmd, struct shmid_ds *buf);
#endif
+450 -144
View File
@@ -2,8 +2,148 @@ dnl $Id$
dnl
dnl This file contains local autoconf functions.
sinclude(dynlib.m4)
dnl PHP_ADD_MAKEFILE_FRAGMENT([srcfile[, ext_srcdir[, ext_builddir]]])
dnl
dnl Processes a file called Makefile.frag in the source directory
dnl of the most recently added extension. $(srcdir) and $(builddir)
dnl are substituted with the proper paths. Can be used to supply
dnl custom rules and/or additional targets.
dnl
AC_DEFUN(PHP_ADD_MAKEFILE_FRAGMENT,[
ifelse($1,,src=$ext_srcdir/Makefile.frag,src=$1)
ifelse($2,,ac_srcdir=$ext_srcdir,ac_srcdir=$2)
ifelse($3,,ac_builddir=$ext_builddir,ac_builddir=$3)
sed -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src >> Makefile.fragments
])
dnl PHP_DEFINE(WHAT[, value])
dnl
dnl Creates builddir/include/what.h and in there #define WHAT value
dnl
AC_DEFUN(PHP_DEFINE,[
[echo "#define ]$1[]ifelse([$2],,[ 1],[ $2])[" > include/php_]translit($1,A-Z,a-z)[.h]
])
dnl PHP_INIT_BUILD_SYSTEM
dnl
AC_DEFUN(PHP_INIT_BUILD_SYSTEM,[
mkdir include >/dev/null 2>&1
> Makefile.objects
> Makefile.fragments
dnl We need to play tricks here to avoid matching the egrep line itself
pattern=define
egrep $pattern'.*include/php' $srcdir/configure|sed 's/.*>//'|xargs touch 2>/dev/null
])
dnl PHP_GEN_GLOBAL_MAKEFILE
dnl
dnl Generates the global makefile.
dnl
AC_DEFUN(PHP_GEN_GLOBAL_MAKEFILE,[
cat >Makefile <<EOF
srcdir = $abs_srcdir
builddir = $abs_builddir
top_srcdir = $abs_srcdir
top_builddir = $abs_builddir
EOF
for i in $PHP_VAR_SUBST; do
eval echo "$i = \$$i" >> Makefile
done
cat $abs_srcdir/Makefile.global Makefile.fragments Makefile.objects >> Makefile
])
dnl PHP_ADD_SOURCES(source-path, sources[, special-flags[, type]])
dnl
dnl Adds sources which are located relative to source-path to the
dnl array of type type. Sources are processed with optional
dnl special-flags which are passed to the compiler. Sources
dnl can be either written in C or C++ (filenames shall end in .c
dnl or .cpp, respectively).
dnl
dnl Note: If source-path begins with a "/", the "/" is removed and
dnl the path is interpreted relative to the top build-directory.
dnl
dnl which array to append to?
AC_DEFUN(PHP_ADD_SOURCES,[
PHP_ADD_SOURCES_X($1, $2, $3, ifelse($4,cli,PHP_CLI_OBJS,ifelse($4,sapi,PHP_SAPI_OBJS,PHP_GLOBAL_OBJS)))
])
dnl
dnl PHP_ASSIGN_BUILD_VARS(type)
dnl internal, don't use
AC_DEFUN(PHP_ASSIGN_BUILD_VARS,[
ifelse($1,shared,[
b_c_pre=$shared_c_pre
b_cxx_pre=$shared_cxx_pre
b_c_meta=$shared_c_meta
b_cxx_meta=$shared_cxx_meta
b_c_post=$shared_c_post
b_cxx_post=$shared_cxx_post
],[
b_c_pre=$php_c_pre
b_cxx_pre=$php_cxx_pre
b_c_meta=$php_c_meta
b_cxx_meta=$php_cxx_meta
b_c_post=$php_c_post
b_cxx_post=$php_cxx_post
])dnl
b_lo=[$]$1_lo
])
dnl PHP_ADD_SOURCES_X(source-path, sources[, special-flags[, target-var[, shared[, special-post-flags]]]])
dnl
dnl Additional to PHP_ADD_SOURCES (see above), this lets you set the
dnl name of the array target-var directly, as well as whether
dnl shared objects will be built from the sources. Should not be
dnl used directly.
dnl
AC_DEFUN(PHP_ADD_SOURCES_X,[
dnl relative to source- or build-directory?
dnl ac_srcdir/ac_bdir include trailing slash
case $1 in
""[)] ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
/*[)] ac_srcdir=`echo $ac_n "$1$ac_c"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
*[)] ac_srcdir="$abs_srcdir/$1/"; ac_bdir="$1/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
esac
dnl how to build .. shared or static?
ifelse($5,yes,PHP_ASSIGN_BUILD_VARS(shared),PHP_ASSIGN_BUILD_VARS(php))
dnl iterate over the sources
old_IFS=[$]IFS
for ac_src in $2; do
dnl remove the suffix
IFS=.
set $ac_src
ac_obj=[$]1
IFS=$old_IFS
dnl append to the array which has been dynamically chosen at m4 time
$4="[$]$4 [$]ac_bdir[$]ac_obj.lo"
dnl choose the right compiler/flags/etc. for the source-file
case $ac_src in
*.c[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;;
*.cpp[)] ac_comp="$b_cxx_pre $3 $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_cxx_post" ;;
esac
dnl create a rule for the object/source combo
cat >>Makefile.objects<<EOF
$ac_bdir[$]ac_obj.lo: $ac_srcdir[$]ac_src
$ac_comp
EOF
done
])
dnl
dnl Disable building CLI
dnl
AC_DEFUN(PHP_DISABLE_CLI,[
disable_cli=1
])
dnl
dnl Separator into the configure --help display.
dnl
@@ -43,31 +183,37 @@ AC_DEFUN(PHP_REMOVE_USR_LIB,[
done
$1=[$]ac_new_flags
])
AC_DEFUN(PHP_SETUP_OPENSSL,[
if test "$PHP_OPENSSL" = "no"; then
if test "$PHP_OPENSSL" = "yes"; then
PHP_OPENSSL="/usr/local/ssl /usr/local /usr /usr/local/openssl"
fi
for i in $PHP_OPENSSL; do
if test -r $i/include/openssl/evp.h; then
OPENSSL_DIR=$i
OPENSSL_INC=$i/include
OPENSSL_INCDIR=$i/include
fi
if test -r $i/lib/libssl.a -o -r $i/lib/libssl.$SHLIB_SUFFIX_NAME; then
OPENSSL_LIBDIR=$i/lib
fi
done
if test -z "$OPENSSL_DIR"; then
if test -z "$OPENSSL_INCDIR"; then
AC_MSG_ERROR([Cannot find OpenSSL's <evp.h>])
fi
if test -z "$OPENSSL_LIBDIR"; then
AC_MSG_ERROR([Cannot find OpenSSL's libraries])
fi
old_CPPFLAGS=$CPPFLAGS
CPPFLAGS=-I$OPENSSL_INC
CPPFLAGS=-I$OPENSSL_INCDIR
AC_MSG_CHECKING([for OpenSSL version])
AC_EGREP_CPP(yes,[
#include <openssl/opensslv.h>
#if OPENSSL_VERSION_NUMBER >= 0x0090500fL
#include <openssl/opensslv.h>
#if OPENSSL_VERSION_NUMBER >= 0x0090500fL
yes
#endif
#endif
],[
AC_MSG_RESULT([>= 0.9.5])
],[
@@ -75,20 +221,27 @@ AC_DEFUN(PHP_SETUP_OPENSSL,[
])
CPPFLAGS=$old_CPPFLAGS
PHP_ADD_LIBPATH($OPENSSL_DIR/lib)
PHP_ADD_INCLUDE($OPENSSL_INCDIR)
PHP_ADD_LIBPATH($OPENSSL_LIBDIR)
AC_CHECK_LIB(crypto, CRYPTO_free, [
PHP_CHECK_LIBRARY(crypto, CRYPTO_free, [
PHP_ADD_LIBRARY(crypto)
],[
AC_MSG_ERROR([libcrypto not found!])
],[
-L$OPENSSL_LIBDIR
])
AC_CHECK_LIB(ssl, SSL_CTX_set_ssl_version, [
PHP_CHECK_LIBRARY(ssl, SSL_CTX_set_ssl_version, [
PHP_ADD_LIBRARY(ssl)
],[
AC_MSG_ERROR([libssl not found!])
],[
-L$OPENSSL_LIBDIR
])
PHP_ADD_INCLUDE($OPENSSL_INC)
OPENSSL_INCDIR_OPT=-I$OPENSSL_INCDIR
AC_SUBST(OPENSSL_INCDIR_OPT)
])
dnl PHP_EVAL_LIBLINE(LINE, SHARED-LIBADD)
@@ -187,6 +340,9 @@ AC_DEFUN(PHP_SHLIB_SUFFIX_NAME,[
*hpux*)
SHLIB_SUFFIX_NAME=sl
;;
*darwin*)
SHLIB_SUFFIX_NAME=dylib
;;
esac
])
@@ -245,6 +401,8 @@ AC_DEFUN(PHP_MISSING_PREAD_DECL,[
],[
ac_cv_pread=no
])
],[
ac_cv_pread=no
])
])
])
@@ -279,6 +437,8 @@ AC_DEFUN(PHP_MISSING_PWRITE_DECL,[
],[
ac_cv_pwrite=no
])
],[
ac_cv_pwrite=no
])
])
])
@@ -328,16 +488,14 @@ AC_DEFUN(PHP_LIBGCC_LIBPATH,[
changequote([,])
])
AC_DEFUN(PHP_ARG_ANALYZE,[
AC_DEFUN(PHP_ARG_ANALYZE_EX,[
ext_output="yes, shared"
ext_shared=yes
case [$]$1 in
shared,*)
ext_output="yes, shared"
ext_shared=yes
$1=`echo "[$]$1"|sed 's/^shared,//'`
;;
shared)
ext_output="yes, shared"
ext_shared=yes
$1=yes
;;
no)
@@ -350,13 +508,12 @@ no)
;;
esac
if test "$php_always_shared" = "yes"; then
ext_output="yes, shared"
ext_shared=yes
test "[$]$1" = "no" && $1=yes
fi
PHP_ALWAYS_SHARED([$1])
])
AC_MSG_RESULT([$ext_output])
AC_DEFUN(PHP_ARG_ANALYZE,[
PHP_ARG_ANALYZE_EX([$1])
ifelse([$2],,,[AC_MSG_RESULT([$ext_output])])
])
dnl
@@ -370,9 +527,9 @@ PHP_REAL_ARG_WITH([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z0-9-,A-Z0-9_))
])
AC_DEFUN(PHP_REAL_ARG_WITH,[
AC_MSG_CHECKING([$2])
ifelse([$2],,,[AC_MSG_CHECKING([$2])])
AC_ARG_WITH($1,[$3],$5=[$]withval,$5=ifelse($4,,no,$4))
PHP_ARG_ANALYZE($5)
PHP_ARG_ANALYZE($5,[$2])
])
dnl
@@ -386,9 +543,9 @@ PHP_REAL_ARG_ENABLE([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z-,A-Z_))
])
AC_DEFUN(PHP_REAL_ARG_ENABLE,[
AC_MSG_CHECKING([$2])
ifelse([$2],,,[AC_MSG_CHECKING([$2])])
AC_ARG_ENABLE($1,[$3],$5=[$]enableval,$5=ifelse($4,,no,$4))
PHP_ARG_ANALYZE($5)
PHP_ARG_ANALYZE($5,[$2])
])
AC_DEFUN(PHP_MODULE_PTR,[
@@ -473,10 +630,6 @@ AC_DEFUN(PHP_SUBST_OLD,[
AC_SUBST($1)
])
AC_DEFUN(PHP_FAST_OUTPUT,[
PHP_FAST_OUTPUT_FILES="$PHP_FAST_OUTPUT_FILES $1"
])
AC_DEFUN(PHP_MKDIR_P_CHECK,[
AC_CACHE_CHECK(for working mkdir -p, ac_cv_mkdir_p,[
test -d conftestdir && rm -rf conftestdir
@@ -492,19 +645,6 @@ dnl `mkdir -p' must be quiet about creating existing directories
])
])
AC_DEFUN(PHP_GEN_CONFIG_VARS,[
PHP_MKDIR_P_CHECK
echo creating config_vars.mk
> config_vars.mk
for i in $PHP_VAR_SUBST; do
eval echo "$i = \$$i" >> config_vars.mk
done
])
AC_DEFUN(PHP_GEN_MAKEFILES,[
$SHELL $srcdir/build/fastgen.sh $srcdir $ac_cv_mkdir_p $BSD_MAKEFILE $1
])
AC_DEFUN(PHP_TM_GMTOFF,[
AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff,
[AC_TRY_COMPILE([#include <sys/types.h>
@@ -625,13 +765,34 @@ dnl
dnl PHP_BUILD_SHARED
dnl
AC_DEFUN(PHP_BUILD_SHARED,[
PHP_BUILD_PROGRAM
OVERALL_TARGET=libphp4.la
php_build_target=shared
php_c_pre=$shared_c_pre
php_c_meta=$shared_c_meta
php_c_post=$shared_c_post
php_cxx_pre=$shared_cxx_pre
php_cxx_meta=$shared_cxx_meta
php_cxx_post=$shared_cxx_post
php_lo=$shared_lo
])
dnl
dnl PHP_BUILD_STATIC
dnl
AC_DEFUN(PHP_BUILD_STATIC,[
PHP_BUILD_PROGRAM
OVERALL_TARGET=libphp4.la
php_build_target=static
])
dnl
dnl PHP_BUILD_BUNDLE
dnl
AC_DEFUN(PHP_BUILD_BUNDLE,[
PHP_BUILD_PROGRAM
OVERALL_TARGET=libs/libphp4.bundle
php_build_target=static
])
@@ -639,6 +800,23 @@ dnl
dnl PHP_BUILD_PROGRAM
dnl
AC_DEFUN(PHP_BUILD_PROGRAM,[
OVERALL_TARGET=php
php_c_pre='$(CC)'
php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)'
php_c_post=' && echo > $[@]'
php_cxx_pre='$(CXX)'
php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
php_cxx_post=' && echo > $[@]'
php_lo=o
shared_c_pre='$(LIBTOOL) --mode=compile $(CC)'
shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -prefer-pic'
shared_c_post=
shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)'
shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -prefer-pic'
shared_cxx_post=
shared_lo=lo
php_build_target=program
])
@@ -674,7 +852,17 @@ AC_DEFUN(PHP_EXPAND_PATH,[
$2="$ep_realdir/`basename \"$1\"`"
fi
])
dnl
dnl internal, don't use
AC_DEFUN(PHP_ADD_LIBPATH_GLOBAL,[
AC_PHP_ONCE(LIBPATH, $1, [
test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$1"
LDFLAGS="$LDFLAGS -L$1"
PHP_RPATHS="$PHP_RPATHS $1"
])
])dnl
dnl
dnl
dnl
dnl PHP_ADD_LIBPATH(path[, shared-libadd])
dnl
@@ -683,15 +871,15 @@ dnl
AC_DEFUN(PHP_ADD_LIBPATH,[
if test "$1" != "/usr/lib"; then
PHP_EXPAND_PATH($1, ai_p)
if test "$ext_shared" = "yes" && test -n "$2"; then
$2="-R$1 -L$1 [$]$2"
else
AC_PHP_ONCE(LIBPATH, $ai_p, [
test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
LDFLAGS="$LDFLAGS -L$ai_p"
PHP_RPATHS="$PHP_RPATHS $ai_p"
])
fi
ifelse([$2],,[
PHP_ADD_LIBPATH_GLOBAL([$ai_p])
],[
if test "$ext_shared" = "yes"; then
$2="-R$ai_p -L$ai_p [$]$2"
else
PHP_ADD_LIBPATH_GLOBAL([$ai_p])
fi
])
fi
])
@@ -702,7 +890,7 @@ dnl builds RPATH from PHP_RPATHS
dnl
AC_DEFUN(PHP_BUILD_RPATH,[
if test "$PHP_RPATH" = "yes" && test -n "$PHP_RPATHS"; then
OLD_RPATHS="$PHP_RPATHS"
OLD_RPATHS=$PHP_RPATHS
unset PHP_RPATHS
for i in $OLD_RPATHS; do
PHP_LDFLAGS="$PHP_LDFLAGS -L$i"
@@ -730,31 +918,36 @@ AC_DEFUN(PHP_ADD_INCLUDE,[
])
fi
])
AC_DEFUN(PHP_X_ADD_LIBRARY,[
ifelse($2,,$3="-l$1 [$]$3", $3="[$]$3 -l$1")
])
dnl
dnl internal, don't use
AC_DEFUN(PHP_X_ADD_LIBRARY,[dnl
ifelse([$2],,$3="-l$1 [$]$3", $3="[$]$3 -l$1") dnl
])dnl
dnl
dnl internal, don't use
AC_DEFUN(PHP_ADD_LIBRARY_SKELETON,[
case $1 in
c|c_r|pthread*) ;;
*) ifelse($3,,[
PHP_X_ADD_LIBRARY($1,$2,$5)
],[
if test "$ext_shared" = "yes"; then
PHP_X_ADD_LIBRARY($1,$2,$3)
else
$4($1,$2)
fi
]) ;;
esac
])dnl
dnl
dnl
dnl
dnl PHP_ADD_LIBRARY(library[, append[, shared-libadd]])
dnl
dnl add a library to the link line
dnl
AC_DEFUN(PHP_ADD_LIBRARY,[
case $1 in
c|c_r|pthread*) ;;
*)
ifelse($3,,[
PHP_X_ADD_LIBRARY($1,$2,LIBS)
],[
if test "$ext_shared" = "yes"; then
PHP_X_ADD_LIBRARY($1,$2,$3)
else
PHP_ADD_LIBRARY($1,$2)
fi
])
;;
esac
PHP_ADD_LIBRARY_SKELETON([$1],[$2],[$3],[PHP_ADD_LIBRARY],[LIBS])
])
dnl
@@ -763,22 +956,9 @@ dnl
dnl add a library to the link line (deferred)
dnl
AC_DEFUN(PHP_ADD_LIBRARY_DEFER,[
case $1 in
c|c_r|pthread*) ;;
*)
ifelse($3,,[
PHP_X_ADD_LIBRARY($1,$2,DLIBS)
],[
if test "$ext_shared" = "yes"; then
PHP_X_ADD_LIBRARY($1,$2,$3)
else
PHP_ADD_LIBRARY_DEFER($1,$2)
fi
PHP_ADD_LIBRARY_SKELETON([$1],[$2],[$3],[PHP_ADD_LIBRARY_DEFER],[DLIBS])
])
;;
esac
])
dnl
dnl PHP_ADD_LIBRARY_WITH_PATH(library, path[, shared-libadd])
dnl
@@ -818,8 +998,8 @@ AC_DEFUN(PHP_ADD_LIBRARY_DEFER_WITH_PATH,[
dnl
dnl Set libtool variable
dnl
AC_DEFUN(AM_SET_LIBTOOL_VARIABLE,[
LIBTOOL='$(SHELL) $(top_builddir)/libtool $1'
AC_DEFUN(PHP_SET_LIBTOOL_VARIABLE,[
LIBTOOL='$(SHELL) libtool $1'
])
dnl
@@ -850,21 +1030,15 @@ AC_DEFUN(PHP_CHECK_CC_OPTION,[
AC_DEFUN(PHP_REGEX,[
if test "$REGEX_TYPE" = "php"; then
REGEX_LIB=regex/libregex.la
REGEX_DIR=regex
AC_DEFINE(HSREGEX,1,[ ])
AC_DEFINE(REGEX,1,[ ])
PHP_FAST_OUTPUT(regex/Makefile)
PHP_ADD_SOURCES(regex, regcomp.c regexec.c regerror.c regfree.c)
elif test "$REGEX_TYPE" = "system"; then
AC_DEFINE(REGEX,0,[ ])
fi
AC_MSG_CHECKING([which regex library to use])
AC_MSG_RESULT([$REGEX_TYPE])
PHP_SUBST(REGEX_DIR)
PHP_SUBST(REGEX_LIB)
PHP_SUBST(HSREGEX)
])
dnl
@@ -901,40 +1075,115 @@ AC_DEFUN(PHP_AC_BROKEN_SPRINTF,[
fi
])
dnl PHP_SHARED_MODULE(module-name, object-var, build-dir)
dnl
dnl PHP_EXTENSION(extname [, shared])
dnl Basically sets up the link-stage for building module-name
dnl from object_var in build-dir.
dnl
AC_DEFUN(PHP_SHARED_MODULE,[
PHP_MODULES="$PHP_MODULES \$(phplibdir)/$1.la"
PHP_SUBST($2)
cat >>Makefile.objects<<EOF
\$(phplibdir)/$1.la: $3/$1.la
\$(LIBTOOL) --mode=install cp $3/$1.la \$(phplibdir)
$3/$1.la: \$($2) \$(translit($1,a-z-,A-Z_)_SHARED_DEPENDENCIES)
\$(LIBTOOL) --mode=link \$(CC) \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) -o \[$]@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$($2) \$(translit($1,a-z-,A-Z_)_SHARED_LIBADD)
EOF
])
dnl
dnl PHP_SELECT_SAPI(name, type[, sources [, extra-cflags]])
dnl
dnl Selects the SAPI name and type (static, shared, programm)
dnl and optionally also the source-files for the SAPI-specific
dnl objects.
dnl
AC_DEFUN(PHP_SELECT_SAPI,[
PHP_SAPI=$1
case "$2" in
static) PHP_BUILD_STATIC;;
shared) PHP_BUILD_SHARED;;
bundle) PHP_BUILD_BUNDLE;;
program) PHP_BUILD_PROGRAM;;
esac
ifelse($3,,,[PHP_ADD_SOURCES([sapi/$1],[$3],[$4],[sapi])])
])
dnl deprecated
AC_DEFUN(PHP_EXTENSION,[
sources=`awk -f $abs_srcdir/scan_makefile_in.awk < []PHP_EXT_SRCDIR($1)[]/Makefile.in`
PHP_NEW_EXTENSION($1, $sources, $2, $3)
if test -r "$ext_srcdir/Makefile.frag"; then
PHP_ADD_MAKEFILE_FRAGMENT
fi
])
AC_DEFUN(PHP_ADD_BUILD_DIR,[
BUILD_DIR="$BUILD_DIR $1"
])
AC_DEFUN(PHP_GEN_BUILD_DIRS,[
PHP_MKDIR_P_CHECK
if test "$ac_cv_mkdir_p" = "yes"; then
mkdir -p $BUILD_DIR
fi
])
dnl
dnl PHP_NEW_EXTENSION(extname, sources [, shared [,sapi_class[, extra-cflags]]])
dnl
dnl Includes an extension in the build.
dnl
dnl "extname" is the name of the ext/ subdir where the extension resides
dnl "extname" is the name of the ext/ subdir where the extension resides.
dnl "sources" is a list of files relative to the subdir which are used
dnl to build the extension.
dnl "shared" can be set to "shared" or "yes" to build the extension as
dnl a dynamically loadable library.
dnl
AC_DEFUN(PHP_EXTENSION,[
EXT_SUBDIRS="$EXT_SUBDIRS $1"
if test -d "$abs_srcdir/ext/$1"; then
dnl ---------------------------------------------- Internal Module
ext_builddir=ext/$1
ext_srcdir=$abs_srcdir/ext/$1
else
dnl ---------------------------------------------- External Module
ext_builddir=.
ext_srcdir=$abs_srcdir
fi
dnl a dynamically loadable library. Optional parameter "sapi_class" can
dnl be set to "cli" to mark extension build only with CLI or CGI sapi's.
dnl extra-cflags are passed to the compiler, with @ext_srcdir@ being
dnl substituted.
AC_DEFUN(PHP_NEW_EXTENSION,[
ext_builddir=[]PHP_EXT_BUILDDIR($1)
ext_srcdir=[]PHP_EXT_SRCDIR($1)
if test "$2" != "shared" && test "$2" != "yes"; then
ifelse($5,,ac_extra=,[ac_extra=`echo $ac_n "$5$ac_c"|sed s#@ext_srcdir@#$ext_srcdir#g`])
if test "$3" != "shared" && test "$3" != "yes" && test "$4" != "cli"; then
dnl ---------------------------------------------- Static module
LIB_BUILD($ext_builddir)
EXT_LTLIBS="$EXT_LTLIBS $ext_builddir/lib$1.la"
PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,)
EXT_STATIC="$EXT_STATIC $1"
else
if test "$3" != "nocli"; then
EXT_CLI_LTLIBS="$EXT_CLI_LTLIBS $abs_builddir/$ext_builddir/lib$1.la"
EXT_CLI_STATIC="$EXT_CLI_STATIC $1"
fi
else
if test "$3" = "shared" || test "$3" = "yes"; then
dnl ---------------------------------------------- Shared module
LIB_BUILD($ext_builddir,yes)
AC_DEFINE_UNQUOTED([COMPILE_DL_]translit($1,a-z-,A-Z_), 1, Whether to build $1 as dynamic module)
PHP_ADD_SOURCES_X(PHP_EXT_DIR($1),$2,$ac_extra,shared_objects_$1,yes)
PHP_SHARED_MODULE($1,shared_objects_$1, $ext_builddir)
AC_DEFINE_UNQUOTED([COMPILE_DL_]translit($1,a-z-,A-Z_), 1, Whether to build $1 as dynamic module)
fi
fi
PHP_FAST_OUTPUT($ext_builddir/Makefile)
if test "$3" != "shared" && test "$3" != "yes" && test "$4" = "cli"; then
dnl ---------------------------------------------- CLI static module
if test "$PHP_SAPI" = "cgi"; then
PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,)
EXT_STATIC="$EXT_STATIC $1"
else
PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cli)
fi
EXT_CLI_LTLIBS="$EXT_CLI_LTLIBS $abs_builddir/$ext_builddir/lib$1.la"
EXT_CLI_STATIC="$EXT_CLI_STATIC $1"
fi
PHP_ADD_BUILD_DIR($ext_builddir)
])
dnl
@@ -969,22 +1218,9 @@ dnl and sets $shared to "yes" or "no", and removes "shared,?" stuff
dnl from $withval.
dnl
AC_DEFUN(PHP_WITH_SHARED,[
case $withval in
shared)
shared=yes
withval=yes
;;
shared,*)
shared=yes
withval=`echo $withval | sed -e 's/^shared,//'`
;;
*)
shared=no
;;
esac
if test -n "$php_always_shared"; then
shared=yes
fi
PHP_ARG_ANALYZE_EX(withval)
shared=$ext_shared
unset ext_shared ext_output
])
dnl The problem is that the default compilation flags in Solaris 2.6 won't
@@ -1087,11 +1323,6 @@ int main(void) {
fi
])
AC_DEFUN(AC_ADD_LIBPATH, [indir([PHP_ADD_LIBPATH], $@)])
AC_DEFUN(AC_ADD_LIBRARY, [indir([PHP_ADD_LIBRARY], $@)])
AC_DEFUN(AC_ADD_LIBRARY_WITH_PATH, [indir([PHP_ADD_LIBRARY_WITH_PATH], $@)])
AC_DEFUN(AC_ADD_INCLUDE, [indir([PHP_ADD_INCLUDE], $@)])
AC_DEFUN(PHP_FOPENCOOKIE,[
AC_CHECK_FUNC(fopencookie, [ have_glibc_fopencookie=yes ])
@@ -1150,3 +1381,78 @@ AC_DEFUN(PHP_CHECK_LIBRARY, [
])dnl
])
dnl
dnl PHP_SETUP_ICONV(shared-add [, action-found [, action-not-found]])
dnl
dnl Common setup macro for iconv
dnl
AC_DEFUN(PHP_SETUP_ICONV, [
found_iconv=no
unset ICONV_DIR
dnl
dnl Check libc first if no path is provided in --with-iconv
dnl
if test "$PHP_ICONV" = "yes"; then
AC_CHECK_FUNC(iconv, [
PHP_DEFINE(HAVE_ICONV)
found_iconv=yes
],[
AC_CHECK_FUNC(libiconv,[
PHP_DEFINE(HAVE_LIBICONV)
found_iconv=yes
])
])
fi
dnl
dnl Check external libs for iconv funcs
dnl
if test "$found_iconv" = "no"; then
for i in $PHP_ICONV /usr/local /usr; do
if test -r $i/include/giconv.h; then
AC_DEFINE(HAVE_GICONV_H, 1, [ ])
ICONV_DIR=$i
iconv_lib_name=giconv
break
elif test -r $i/include/iconv.h; then
ICONV_DIR=$i
iconv_lib_name=iconv
break
fi
done
if test -z "$ICONV_DIR"; then
AC_MSG_ERROR([Please specify the install prefix of iconv with --with-iconv=<DIR>])
fi
if test -f $ICONV_DIR/lib/lib$iconv_lib_name.a ||
test -f $ICONV_DIR/lib/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME
then
PHP_CHECK_LIBRARY($iconv_lib_name, libiconv, [
found_iconv=yes
PHP_DEFINE(HAVE_LIBICONV)
], [
PHP_CHECK_LIBRARY($iconv_lib_name, iconv, [
found_iconv=yes
PHP_DEFINE(HAVE_ICONV)
], [], [
-L$ICONV_DIR/lib
])
], [
-L$ICONV_DIR/lib
])
fi
fi
if test "$found_iconv" = "yes"; then
if test -n "$ICONV_DIR"; then
AC_DEFINE(HAVE_ICONV, 1, [ ])
PHP_ADD_LIBRARY_WITH_PATH($iconv_lib_name, $ICONV_DIR/lib, $1)
PHP_ADD_INCLUDE($ICONV_DIR/include)
fi
$2
ifelse([$3],[],,[else $3])
fi
])
+4
View File
@@ -150,6 +150,10 @@ LS stands for 'Local Storage', _C stands for Call and _CC stands for Call
Comma, _D stands for Declaration and _DC stands for Declaration Comma.
Note that there's NO comma between the last argument and ???LS_DC or ???LS_CC.
If you do not pass the structure as an argument you can always fetch it by
using the appropriate ???LS_FETCH() macros within a functions variable
declarations.
In general, every module that makes use of globals should use this approach
if it plans to be thread safe.
-34
View File
@@ -1,34 +0,0 @@
#! /bin/sh
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Authors: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id$
#
# cwd must be top_srcdir
test -f build/bsd_makefile || exit 2
test -f bsd_converted && exit 0
tmpfile=`mktemp /tmp/bsd_makefile.XXXXXX 2>/dev/null` || tmpfile="tmp.$$"
for i in build/*.mk; do
sed 's/^include \(.*\)/.include "\1"/' $i >$tmpfile \
&& cp $tmpfile $i
done
rm -f $tmpfile
touch bsd_converted
exit 0
+1 -1
View File
@@ -11,7 +11,7 @@
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Authors: Sascha Schumann <sascha@schumann.cx> |
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id$
+7 -25
View File
@@ -11,7 +11,7 @@
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Authors: Sascha Schumann <sascha@schumann.cx> |
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id$
@@ -30,37 +30,16 @@ config_h_in = main/php_config.h.in
acconfig_h_SOURCES = acconfig.h.in $(config_h_files)
targets = $(TOUCH_FILES) $(makefile_in_files) configure $(config_h_in)
targets = $(TOUCH_FILES) configure $(config_h_in)
all: Zend/Makefile.am TSRM/Makefile.am $(targets)
Zend/Makefile.am:
test -d Zend || (test -d ../Zend && ln -s ../Zend Zend)
TSRM/Makefile.am:
test -d TSRM || (test -d ../TSRM && ln -s ../TSRM TSRM)
all: $(targets)
acconfig.h: $(acconfig_h_SOURCES)
@echo rebuilding $@
cat $(acconfig_h_SOURCES) > $@
$(makefile_in_files): $(makefile_am_files) aclocal.m4 configure.in $(config_m4_files)
@echo rebuilding Makefile templates
@for i in $(LT_TARGETS); do \
if test -f "$$i"; then \
mv $$i $$i.bak; \
cp $$i.bak $$i; \
fi; \
done
@test -f want_dependencies || flag=-i; \
automake -a $$flag $(AMFLAGS) $(makefile_files) 2>&1 | $(SUPPRESS_WARNINGS)
@for i in $(LT_TARGETS); do mv $$i.bak $$i; done
aclocal.m4: configure.in acinclude.m4 dynlib.m4
aclocal 2>&1 | $(SUPPRESS_WARNINGS)
SUPPRESS_WARNINGS = (egrep -v '(AC_TRY_RUN called without default to allow cross compiling|AC_PROG_CXXCPP was called before AC_PROG_CXX|.*AM_PROG_LEX.*|defined in acinclude.m4 but never used|AC_PROG_LEX invoked multiple times)'||true)
SUPPRESS_WARNINGS = (egrep -v '(AC_TRY_RUN called without default to allow cross compiling|AC_PROG_CXXCPP was called before AC_PROG_CXX|defined in acinclude.m4 but never used|AC_PROG_LEX invoked multiple times|AC_PROG_CPP was called before AC_PROG_CC)'||true)
$(config_h_in): configure acconfig.h
# explicitly remove target since autoheader does not seem to work
@@ -72,6 +51,9 @@ $(config_h_in): configure acconfig.h
$(TOUCH_FILES):
touch $(TOUCH_FILES)
aclocal.m4: configure.in acinclude.m4
aclocal 2>&1 | $(SUPPRESS_WARNINGS)
configure: aclocal.m4 configure.in $(config_m4_files)
@echo rebuilding $@
@autoconf 2>&1 | $(SUPPRESS_WARNINGS)
+3 -2
View File
@@ -16,7 +16,7 @@
# | Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id: buildcheck.sh,v 1.13 2001-12-11 15:28:53 sebastian Exp $
# $Id: buildcheck.sh,v 1.16 2002-03-04 08:28:57 sas Exp $
#
echo "buildconf: checking installation..."
@@ -39,6 +39,7 @@ else
echo "buildconf: autoconf version $ac_version (ok)"
fi
# automake 1.4 or newer
am_version=`automake --version 2>/dev/null|head -1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
am_version_clean=`echo $am_version|sed -e 's/-p[0-9]*$//'`
@@ -61,7 +62,7 @@ fi
# libtool 1.4 or newer
libtool=`which libtool`
if test ! -f "$libtool"; then libtool=`which glibtool`; fi
lt_pversion=`$libtool --version 2>/dev/null|sed -e 's/^[^0-9]*//' -e 's/[- ].*//'`
lt_pversion=`$libtool --version 2>/dev/null|sed -n -e 's/^[^0-9]*//' -e 1's/[- ].*//p'`
if test "$lt_pversion" = ""; then
echo "buildconf: libtool not found."
echo " You need libtool version 1.4 or newer installed"
-24
View File
@@ -1,24 +0,0 @@
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Authors: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id$
#
all: all-recursive
include $(builddir)/libs.mk
include $(top_srcdir)/build/rules.mk
-80
View File
@@ -1,80 +0,0 @@
#! /bin/sh
#
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Authors: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id: fastgen.sh,v 1.13 2001-12-11 15:28:53 sebastian Exp $
#
if test "$#" = "0"; then
echo "Usage: fastgen.sh <srcdir> <mkdir_p> <bsdmakefile_p> <file>"
fi
srcdir=$1
shift
mkdir_p=$1
shift
bsd_makefile=$1
shift
top_srcdir=`(cd $srcdir; pwd)`
top_builddir=`pwd`
if test "$mkdir_p" = "yes"; then
mkdir_p="mkdir -p"
else
mkdir_p="$top_srcdir/build/shtool mkdir -p"
fi
if test "$bsd_makefile" = "yes"; then
(cd $top_srcdir; ./build/bsd_makefile)
for makefile in $@; do
echo "fastgen.sh: creating $makefile"
dir=`echo $makefile|sed 's%/*[^/][^/]*$%%'`
$mkdir_p "$dir/"
cat - $top_srcdir/$makefile.in <<EOF |sed 's/^include \(.*\)/.include "\1"/' >$makefile
top_srcdir = $top_srcdir
top_builddir = $top_builddir
srcdir = $top_srcdir/$dir
builddir = $top_builddir/$dir
VPATH = $top_srcdir/$dir
EOF
test -z "$dir" && dir=.
touch $dir/.deps
done
else
for makefile in $@; do
echo "fastgen.sh: creating $makefile"
dir=`echo $makefile|sed 's%/*[^/][^/]*$%%'`
$mkdir_p "$dir/"
cat - $top_srcdir/$makefile.in <<EOF >$makefile
top_srcdir = $top_srcdir
top_builddir = $top_builddir
srcdir = $top_srcdir/$dir
builddir = $top_builddir/$dir
VPATH = $top_srcdir/$dir
EOF
test -z "$dir" && dir=.
touch $dir/.deps
done
fi
+8 -8
View File
@@ -1,24 +1,24 @@
#! /bin/sh
# $Id: genif.sh,v 1.2 2001-03-30 14:02:20 sas Exp $
# $Id: genif.sh,v 1.3 2002-03-22 10:22:41 sas Exp $
# replacement for genif.pl
infile="$1"
infile=$1
shift
srcdir="$1"
srcdir=$1
shift
extra_module_ptrs="$1"
extra_module_ptrs=$1
shift
awk="$1"
awk=$1
shift
if test "$infile" = "" -o "$srcdir" = ""; then
if test -z "$infile" || test -z "$srcdir"; then
echo "please supply infile and srcdir"
exit 1
fi
module_ptrs="$extra_module_ptrs"
header_list=""
module_ptrs=$extra_module_ptrs
header_list=
olddir=`pwd`
cd $srcdir
-23
View File
@@ -1,23 +0,0 @@
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Authors: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id$
#
LTLIBRARY_OBJECTS = $(LTLIBRARY_SOURCES:.c=.lo) $(LTLIBRARY_OBJECTS_X)
$(LTLIBRARY_NAME): $(LTLIBRARY_OBJECTS) $(LTLIBRARY_DEPENDENCIES)
$(LINK) $(LTLIBRARY_LDFLAGS) $(LTLIBRARY_OBJECTS) $(LTLIBRARY_LIBADD)
-24
View File
@@ -1,24 +0,0 @@
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Authors: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id$
#
targets = $(LTLIBRARY_NAME)
include $(top_srcdir)/build/rules.mk
include $(top_srcdir)/build/library.mk
+1 -1
View File
@@ -11,7 +11,7 @@
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Authors: Sascha Schumann <sascha@schumann.cx> |
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id$
-23
View File
@@ -1,23 +0,0 @@
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Authors: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id$
#
PROGRAM_OBJECTS = $(PROGRAM_SOURCES:.c=.lo)
$(PROGRAM_NAME): $(PROGRAM_DEPENDENCIES) $(PROGRAM_OBJECTS)
$(LINK_CLEAN) $(PROGRAM_LDFLAGS) $(PROGRAM_OBJECTS) $(PROGRAM_LDADD)
-68
View File
@@ -1,68 +0,0 @@
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Authors: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id$
#
include $(top_srcdir)/build/rules_common.mk
all: all-recursive
install: install-recursive
distclean-recursive depend-recursive clean-recursive all-recursive install-recursive:
@otarget=`echo $@|sed s/-recursive//`; \
list='$(SUBDIRS)'; for i in $$list; do \
target="$$otarget"; \
echo "Making $$target in $$i"; \
if test "$$i" = "."; then \
ok=yes; \
target="$$target-p"; \
fi; \
(cd $$i && $(MAKE) $$target) || exit 1; \
done; \
if test "$$otarget" = "all" && test -z '$(targets)'; then ok=yes; fi; \
if test "$$ok" != "yes"; then $(MAKE) "$$otarget-p" || exit 1; fi
all-p: $(targets)
install-p: $(targets) $(install_targets)
distclean-p depend-p clean-p:
depend: depend-recursive
@echo $(top_srcdir) $(top_builddir) $(srcdir) $(CPP) $(INCLUDES) $(EXTRA_INCLUDES) $(DEFS) $(CPPFLAGS) $(srcdir)/*.c *.c | $(AWK) -f $(top_srcdir)/build/mkdep.awk > $(builddir)/.deps || true
clean: clean-recursive clean-x
clean-x:
rm -f $(targets) *.lo *.slo *.la *.o $(CLEANFILES)
rm -rf .libs
distclean: distclean-recursive clean-x
rm -f config.cache config.log config.status config_vars.mk libtool \
php_config.h stamp-h Makefile build-defs.h php4.spec libphp4.module
test: $(top_builddir)/php
@if test "$(TESTS)" = ""; then \
TOP_BUILDDIR=$(top_builddir) TOP_SRCDIR=$(top_srcdir) $(top_builddir)/php -C -q $(top_srcdir)/run-tests.php $(srcdir); \
else \
TOP_BUILDDIR=$(top_builddir) TOP_SRCDIR=$(top_srcdir) $(top_builddir)/php -C -q $(top_srcdir)/run-tests.php $(TESTS); \
fi
include $(builddir)/.deps
.PHONY: all-recursive clean-recursive install-recursive \
$(install_targets) install all clean depend depend-recursive shared \
distclean-recursive distclean clean-x all-p install-p distclean-p \
depend-p clean-p
-77
View File
@@ -1,77 +0,0 @@
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Authors: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id$
#
include $(top_builddir)/config_vars.mk
COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS)
COMPILE = $(CC) $(COMMON_FLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
CXX_COMPILE = $(CXX) $(COMMON_FLAGS) $(CXXFLAGS) $(EXTRA_CXXFLAGS)
SHARED_COMPILE = $(SHARED_LIBTOOL) --mode=compile $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) -prefer-pic $(EXTRA_CFLAGS) -c $< && touch $@
CXX_SHARED_COMPILE = $(SHARED_LIBTOOL) --mode=compile $(CXX) $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) -prefer-pic $(EXTRA_CXXFLAGS) -c $< && touch $@
LINK = $(LIBTOOL) --mode=link $(COMPILE) $(LDFLAGS) -o $@
LINK_CLEAN = $(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@
mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p
INSTALL = $(top_srcdir)/build/shtool install -c
INSTALL_DATA = $(INSTALL) -m 644
DEFS = -I. -I$(srcdir) -I$(top_builddir)/main -I$(top_srcdir)
moduledir = $(EXTENSION_DIR)
CXX_SUFFIX = .cpp
.SUFFIXES:
.SUFFIXES: .slo .c $(CXX_SUFFIX) .lo .o .s .y .l
.c.o:
$(COMPILE) -c $<
$(CXX_SUFFIX).o:
$(CXX_COMPILE) -c $<
.s.o:
$(COMPILE) -c $<
.c.lo:
$(PHP_COMPILE)
$(CXX_SUFFIX).lo:
$(CXX_PHP_COMPILE)
.s.lo:
$(PHP_COMPILE)
.c.slo:
$(SHARED_COMPILE)
$(CXX_SUFFIX).slo:
$(CXX_SHARED_COMPILE)
.y.c:
$(YACC) $(YFLAGS) $< && mv y.tab.c $*.c
if test -f y.tab.h; then \
if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \
else :; fi
.l.c:
$(LEX) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@
-76
View File
@@ -1,76 +0,0 @@
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Authors: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id$
#
include $(top_srcdir)/build/rules_common.mk
install_targets = install-modules
all: all-recursive
install: install-recursive
distclean-recursive depend-recursive clean-recursive all-recursive install-recursive:
@otarget=`echo $@|sed s/-recursive//`; \
list='$(SUBDIRS)'; for i in $$list; do \
target="$$otarget"; \
echo "Making $$target in $$i"; \
if test "$$i" = "."; then \
ok=yes; \
target="$$target-p"; \
fi; \
(cd $$i && $(MAKE) $$target) || exit 1; \
done; \
if test "$$otarget" = "all" && test -z '$(targets)'; then ok=yes; fi; \
if test "$$ok" != "yes"; then $(MAKE) "$$otarget-p" || exit 1; fi
all-p: $(targets)
install-p: $(targets) $(install_targets)
distclean-p depend-p clean-p:
depend: depend-recursive
@echo $(top_srcdir) $(top_builddir) $(srcdir) $(CPP) $(INCLUDES) $(EXTRA_INCLUDES) $(DEFS) $(CPPFLAGS) $(srcdir)/*.c *.c | $(AWK) -f $(top_srcdir)/build/mkdep.awk > $(builddir)/.deps || true
clean: clean-recursive clean-x
clean-x:
rm -f $(targets) *.lo *.slo *.la *.o $(CLEANFILES)
rm -rf .libs
distclean: distclean-recursive clean-x
rm -f config.cache config.log config.status config_vars.mk libtool \
config.h stamp-h Makefile build-defs.h php4.spec libphp4.module
cvsclean:
@for i in `find . -name .cvsignore`; do \
(cd `dirname $$i` 2>/dev/null && rm -rf `cat .cvsignore` *.o *.a || true); \
done
@rm -f $(SUBDIRS) 2>/dev/null || true
install-modules:
@test -d modules && \
$(mkinstalldirs) $(moduledir) && \
echo "installing shared modules into $(moduledir)" && \
rm -f modules/*.la && \
cp modules/* $(moduledir) || true
include $(builddir)/.deps
.PHONY: all-recursive clean-recursive install-recursive \
$(install_targets) install all clean depend depend-recursive shared \
distclean-recursive distclean clean-x all-p install-p distclean-p \
depend-p clean-p
+181 -110
View File
@@ -1,13 +1,13 @@
#!/bin/sh
##
## GNU shtool -- The GNU Portable Shell Tool
## Copyright (c) 1994-2000 Ralf S. Engelschall <rse@engelschall.com>
## Copyright (c) 1994-2001 Ralf S. Engelschall <rse@engelschall.com>
##
## See http://www.gnu.org/software/shtool/ for more information.
## See ftp://ftp.gnu.org/gnu/shtool/ for latest version.
##
## Version 1.4.9 (16-Apr-2000)
## Ingredients: 3/17 available modules
## Version: 1.5.4 (14-Jun-2001)
## Contents: 3/17 available modules
##
##
@@ -26,7 +26,7 @@
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
## USA, or contact Ralf S. Engelschall <rse@engelschall.com>.
##
## Notice: Given that you include this file verbatim into your own
## NOTICE: Given that you include this file verbatim into your own
## source tree, you are justified in saying that it remains separate
## from your package, and that this way you are simply just using GNU
## shtool. So, in this situation, there is no requirement that your
@@ -55,7 +55,7 @@
## arx Extended archive command
## slo Separate linker options by library class
## scpp Sharing C Pre-Processor
## version Generate and maintain a version information file
## version Maintain a version information file
## path Deal with program paths
##
@@ -65,21 +65,22 @@ if [ $# -eq 0 ]; then
exit 1
fi
if [ ".$1" = ".-h" -o ".$1" = ".--help" ]; then
echo "This is GNU shtool, version 1.4.9 (16-Apr-2000)"
echo "Copyright (c) 1994-2000 Ralf S. Engelschall <rse@engelschall.com>"
echo "This is GNU shtool, version 1.5.4 (14-Jun-2001)"
echo "Copyright (c) 1994-2001 Ralf S. Engelschall <rse@engelschall.com>"
echo "Report bugs to <bug-shtool@gnu.org>"
echo ''
echo "Usage: shtool [<options>] [<cmd-name> [<cmd-options>] [<cmd-args>]]"
echo "Usage: shtool [<options>] [<cmd-name> [<cmd-options>] [<cmd-args>]]"
echo ''
echo 'Available global <options>:'
echo ' -v, --version display shtool version information'
echo ' -h, --help display shtool usage help page (this one)'
echo ' -d, --debug display shell trace information'
echo ' -r, --recreate recreate this shtool script via shtoolize'
echo ''
echo 'Available <cmd-name> [<cmd-options>] [<cmd-args>]:'
echo ' echo [-n] [-e] [<str> ...]'
echo ' install [-v] [-t] [-c] [-C] [-s] [-m<mode>] [-o<owner>] [-g<group>]'
echo ' [-e<ext>] <file> <path>'
echo ' [-e<sed-cmd>] <file> [<file> ...] <path>'
echo ' mkdir [-t] [-f] [-p] [-m<mode>] <dir> [<dir> ...]'
echo ''
echo 'Not available <cmd-name> (because module was not built-in):'
@@ -90,21 +91,25 @@ if [ ".$1" = ".-h" -o ".$1" = ".--help" ]; then
echo ' mkln [-t] [-f] [-s] <src-path> [<src-path> ...] <dst-path>'
echo ' mkshadow [-v] [-t] [-a] <src-dir> <dst-dir>'
echo ' fixperm [-v] [-t] <path> [<path> ...]'
echo ' tarball [-t] [-v] [-o <tarball>] [-c <prog>] [-d <dir>] [-u'
echo ' <user>] [-g <group>] [-e <pattern>] <path> [<path> ...]'
echo ' tarball [-t] [-v] [-o<tarball>] [-c<prog>] [-d<dir>] [-u<user>]'
echo ' [-g<group>] [-e<pattern>] <path> [<path> ...]'
echo ' guessos '
echo ' arx [-t] [-C<cmd>] <op> <archive> [<file> ...]'
echo ' slo [-p<str>] -- -L<dir> -l<lib> [-L<dir> -l<lib> ...]'
echo ' scpp [-v] [-p] [-f<filter>] [-o<ofile>] [-t<tfile>] [-M<mark>]'
echo ' [-D<dname>] [-C<cname>] <file> [<file> ...]'
echo ' version [-l<lang>] [-n<name>] [-p<prefix>] [-s<version>] [-i<knob>]'
echo ' [-d<type>] <file>'
echo ' version [-l<lang>] [-n<name>] [-p<prefix>] [-s<version>] [-e]'
echo ' [-i<knob>] [-d<type>] <file>'
echo ' path [-s] [-r] [-d] [-b] [-m] [-p<path>] <str> [<str> ...]'
echo ''
exit 0
fi
if [ ".$1" = ".-v" -o ".$1" = ."--version" ]; then
echo "GNU shtool 1.4.9 (16-Apr-2000)"
echo "GNU shtool 1.5.4 (14-Jun-2001)"
exit 0
fi
if [ ".$1" = ".-r" -o ".$1" = ."--recreate" ]; then
shtoolize -ofoo echo install mkdir
exit 0
fi
if [ ".$1" = ".-d" -o ".$1" = ."--debug" ]; then
@@ -142,15 +147,15 @@ case $tool in
;;
install )
str_tool="install"
str_usage="[-v] [-t] [-c] [-C] [-s] [-m<mode>] [-o<owner>] [-g<group>] [-e<ext>] <file> <path>"
arg_spec="2="
opt_spec="v.t.c.C.s.m:o:g:e:"
str_usage="[-v] [-t] [-c] [-C] [-s] [-m<mode>] [-o<owner>] [-g<group>] [-e<sed-cmd>] <file> [<file> ...] <path>"
arg_spec="2+"
opt_spec="v.t.c.C.s.m:o:g:e+"
opt_v=no
opt_t=no
opt_c=no
opt_C=no
opt_s=no
opt_m=""
opt_m="0755"
opt_o=""
opt_g=""
opt_e=""
@@ -312,6 +317,7 @@ if [ ".$gen_tmpfile" = .yes ]; then
tmpfile="$tmpdir/.shtool.$$"
rm -f $tmpfile >/dev/null 2>&1
touch $tmpfile
chmod 600 $tmpfile
fi
##
@@ -323,7 +329,7 @@ case $tool in
echo )
##
## echo -- Print string with optional construct expansion
## Copyright (c) 1998-2000 Ralf S. Engelschall <rse@engelschall.com>
## Copyright (c) 1998-2001 Ralf S. Engelschall <rse@engelschall.com>
## Originally written for WML as buildinfo
##
@@ -347,7 +353,7 @@ echo )
fi
# determine terminal bold sequence
term_bold=''
term_bold=''
term_norm=''
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%[Bb]'`" != . ]; then
case $TERM in
@@ -398,7 +404,7 @@ echo )
# determine user name
username=''
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%[uU]'`" != . ]; then
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%[uUgG]'`" != . ]; then
username="$LOGNAME"
if [ ".$username" = . ]; then
username="$USER"
@@ -440,8 +446,38 @@ echo )
fi
fi
# determine host name
# determine (primary) group id
groupid=''
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%[gG]'`" != . ]; then
groupid=`egrep "^${username}:" /etc/passwd 2>/dev/null | \
sed -e 's/[^:]*:[^:]*:[^:]*://' -e 's/:.*$//'`
if [ ".$groupid" = . ]; then
groupid=`(ypcat passwd) 2>/dev/null | egrep "^${username}:" | \
sed -e 's/[^:]*:[^:]*:[^:]*://' -e 's/:.*$//'`
if [ ".$groupid" = . ]; then
groupid='?'
fi
fi
fi
# determine (primary) group name
groupname=''
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%g'`" != . ]; then
groupname=`egrep "^[^:]*:[^:]*:${groupid}:" /etc/group 2>/dev/null | \
sed -e 's/:.*$//'`
if [ ".$groupname" = . ]; then
groupname=`(ypcat group) 2>/dev/null | \
egrep "^[^:]*:[^:]*:${groupid}:" | \
sed -e 's/:.*$//'`
if [ ".$groupname" = . ]; then
groupname='?'
fi
fi
fi
# determine host and domain name
hostname=''
domainname=''
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%h'`" != . ]; then
hostname="`(uname -n) 2>/dev/null |\
awk '{ printf("%s", $1); }'`"
@@ -459,9 +495,6 @@ echo )
;;
esac
fi
# determine domain name
domainname=''
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%d'`" != . ]; then
if [ ".$domainname" = . ]; then
if [ -f /etc/resolv.conf ]; then
@@ -521,6 +554,8 @@ echo )
-e "s/%b/${term_norm}/g" \
-e "s/%u/${username}/g" \
-e "s/%U/${userid}/g" \
-e "s/%g/${groupname}/g" \
-e "s/%G/${groupid}/g" \
-e "s/%h/${hostname}/g" \
-e "s/%d/${domainname}/g" \
-e "s/%D/${time_day}/g" \
@@ -546,114 +581,144 @@ echo )
install )
##
## install -- Install a program, script or datafile
## Copyright (c) 1997-2000 Ralf S. Engelschall <rse@engelschall.com>
## Copyright (c) 1997-2001 Ralf S. Engelschall <rse@engelschall.com>
## Originally written for shtool
##
src="$1"
dst="$2"
# determine source(s) and destination
argc=$#
srcs=""
while [ $# -gt 1 ]; do
srcs="$srcs $1"
shift
done
dstpath="$1"
# If destination is a directory, append the input filename
if [ -d $dst ]; then
dst=`echo "$dst" | sed -e 's:/$::'`
dstfile=`echo "$src" | sed -e 's;.*/\([^/]*\)$;\1;'`
dst="$dst/$dstfile"
# type check for destination
dstisdir=0
if [ -d $dstpath ]; then
dstpath=`echo "$dstpath" | sed -e 's:/$::'`
dstisdir=1
fi
# Add a possible extension to src and dst
if [ ".$opt_e" != . ]; then
src="$src$opt_e"
dst="$dst$opt_e"
fi
# Check for correct arguments
if [ ".$src" = ".$dst" ]; then
echo "$msgprefix:Error: source and destination are the same" 1>&2
# consistency check for destination
if [ $argc -gt 2 -a $dstisdir = 0 ]; then
echo "$msgprefix:Error: multiple sources require destination to be directory" 1>&2
exit 1
fi
# Make a temp file name in the destination directory
dstdir=`echo $dst | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;' -e 's;^$;.;'`
dsttmp="$dstdir/#INST@$$#"
# iterate over all source(s)
for src in $srcs; do
dst=$dstpath
# Verbosity
if [ ".$opt_v" = .yes ]; then
echo "$src -> $dst" 1>&2
fi
# if destination is a directory, append the input filename
if [ $dstisdir = 1 ]; then
dstfile=`echo "$src" | sed -e 's;.*/\([^/]*\)$;\1;'`
dst="$dst/$dstfile"
fi
# Copy or move the file name to the temp name
# (because we might be not allowed to change the source)
if [ ".$opt_C" = .yes ]; then
opt_c=yes
fi
if [ ".$opt_c" = .yes ]; then
if [ ".$opt_t" = .yes ]; then
echo "cp $src $dsttmp" 1>&2
# check for correct arguments
if [ ".$src" = ".$dst" ]; then
echo "$msgprefix:Warning: source and destination are the same - skipped" 1>&2
continue
fi
cp $src $dsttmp || exit $?
else
if [ ".$opt_t" = .yes ]; then
echo "mv $src $dsttmp" 1>&2
if [ -d "$src" ]; then
echo "$msgprefix:Warning: source \`$src' is a directory - skipped" 1>&2
continue
fi
mv $src $dsttmp || exit $?
fi
# Adjust the target file
# (we do chmod last to preserve setuid bits)
if [ ".$opt_s" = .yes ]; then
if [ ".$opt_t" = .yes ]; then
echo "strip $dsttmp" 1>&2
fi
strip $dsttmp || exit $?
fi
if [ ".$opt_o" != . ]; then
if [ ".$opt_t" = .yes ]; then
echo "chown $opt_o $dsttmp" 1>&2
fi
chown $opt_o $dsttmp || exit $?
fi
if [ ".$opt_g" != . ]; then
if [ ".$opt_t" = .yes ]; then
echo "chgrp $opt_g $dsttmp" 1>&2
fi
chgrp $opt_g $dsttmp || exit $?
fi
if [ ".$opt_m" != . ]; then
if [ ".$opt_t" = .yes ]; then
echo "chmod $opt_m $dsttmp" 1>&2
fi
chmod $opt_m $dsttmp || exit $?
fi
# make a temp file name in the destination directory
dsttmp=`echo $dst |\
sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;' -e 's;^$;.;' \
-e "s;\$;/#INST@$$#;"`
# Determine whether to do a quick install
# (has to be done _after_ the strip was already done)
quick=no
if [ ".$opt_C" = .yes ]; then
if [ -r $dst ]; then
if cmp -s $src $dst; then
quick=yes
# verbosity
if [ ".$opt_v" = .yes ]; then
echo "$src -> $dst" 1>&2
fi
# copy or move the file name to the temp name
# (because we might be not allowed to change the source)
if [ ".$opt_C" = .yes ]; then
opt_c=yes
fi
if [ ".$opt_c" = .yes ]; then
if [ ".$opt_t" = .yes ]; then
echo "cp $src $dsttmp" 1>&2
fi
cp $src $dsttmp || exit $?
else
if [ ".$opt_t" = .yes ]; then
echo "mv $src $dsttmp" 1>&2
fi
mv $src $dsttmp || exit $?
fi
# adjust the target file
if [ ".$opt_e" != . ]; then
sed='sed'
for e in $opt_e; do
sed="$sed -e '$e'"
done
cp $dsttmp $dsttmp.old
eval "$sed <$dsttmp.old >$dsttmp" || exit $?
rm -f $dsttmp.old
fi
if [ ".$opt_s" = .yes ]; then
if [ ".$opt_t" = .yes ]; then
echo "strip $dsttmp" 1>&2
fi
strip $dsttmp || exit $?
fi
if [ ".$opt_o" != . ]; then
if [ ".$opt_t" = .yes ]; then
echo "chown $opt_o $dsttmp" 1>&2
fi
chown $opt_o $dsttmp || exit $?
fi
if [ ".$opt_g" != . ]; then
if [ ".$opt_t" = .yes ]; then
echo "chgrp $opt_g $dsttmp" 1>&2
fi
chgrp $opt_g $dsttmp || exit $?
fi
if [ ".$opt_m" != ".-" ]; then
if [ ".$opt_t" = .yes ]; then
echo "chmod $opt_m $dsttmp" 1>&2
fi
chmod $opt_m $dsttmp || exit $?
fi
# determine whether to do a quick install
# (has to be done _after_ the strip was already done)
quick=no
if [ ".$opt_C" = .yes ]; then
if [ -r $dst ]; then
if cmp -s $src $dst; then
quick=yes
fi
fi
fi
fi
# Finally install the file to the real destination
if [ $quick = yes ]; then
if [ ".$opt_t" = .yes ]; then
echo "rm -f $dsttmp" 1>&2
# finally, install the file to the real destination
if [ $quick = yes ]; then
if [ ".$opt_t" = .yes ]; then
echo "rm -f $dsttmp" 1>&2
fi
rm -f $dsttmp
else
if [ ".$opt_t" = .yes ]; then
echo "rm -f $dst && mv $dsttmp $dst" 1>&2
fi
rm -f $dst && mv $dsttmp $dst
fi
rm -f $dsttmp
else
if [ ".$opt_t" = .yes ]; then
echo "rm -f $dst && mv $dsttmp $dst" 1>&2
fi
rm -f $dst && mv $dsttmp $dst
fi
done
;;
mkdir )
##
## mkdir -- Make one or more directories
## Copyright (c) 1996-2000 Ralf S. Engelschall <rse@engelschall.com>
## Copyright (c) 1996-2001 Ralf S. Engelschall <rse@engelschall.com>
## Originally written for public domain by Noah Friedman <friedman@prep.ai.mit.edu>
## Cleaned up and enhanced for shtool
##
@@ -662,7 +727,7 @@ mkdir )
for p in ${1+"$@"}; do
# if the directory already exists...
if [ -d "$p" ]; then
if [ ".$opt_f" = .no ] && [ ".$opt_p" = .no ]; then
if [ ".$opt_f" = .no -a ".$opt_p" = .no ]; then
echo "$msgprefix:Error: directory already exists: $p" 1>&2
errstatus=1
break
@@ -676,6 +741,12 @@ mkdir )
echo "mkdir $p" 1>&2
fi
mkdir $p || errstatus=$?
if [ ".$opt_m" != . ]; then
if [ ".$opt_t" = .yes ]; then
echo "chmod $opt_m $p" 1>&2
fi
chmod $opt_m $p || errstatus=$?
fi
else
# the smart situation
set fnord `echo ":$p" |\
-34
View File
@@ -1,34 +0,0 @@
#! /bin/sh
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Authors: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id$
#
# cwd must be top_srcdir
test -f build/sysv_makefile || exit 2
test -f bsd_converted || exit 1
tmpfile=`mktemp /tmp/sysv_makefile.XXXXXX` || tmpfile="tmp.$$"
for i in build/*.mk; do
sed 's/^\.include "\(.*\)"/include \1/' $i >$tmpfile \
&& cp $tmpfile $i
done
rm -f $tmpfile
rm bsd_converted
exit 0
+406 -190
View File
@@ -3,37 +3,9 @@ dnl ## Process this file with autoconf to produce a configure script.
divert(1)
AC_INIT(README.CVS-RULES)
PHP_FAST_OUTPUT(sapi/Makefile ext/Makefile Makefile pear/Makefile main/Makefile)
if test "$with_shared_apache" != "no" && test -n "$with_shared_apache" ; then
AC_MSG_ERROR([--with-shared-apache is not supported. Please refer to the documentation for using APXS])
fi
if test -n "$with_apache" && test -n "$with_apxs"; then
AC_MSG_ERROR([--with-apache and --with-apxs cannot be used together])
fi
cwd=`pwd`
PHP_CONFIG_NICE(config.nice)
for arg in $0 "$@"; do
CONFIGURE_COMMAND="$CONFIGURE_COMMAND '$arg'"
done
php_shtool=$srcdir/build/shtool
T_MD=`$php_shtool echo -n -e %B`
T_ME=`$php_shtool echo -n -e %b`
dnl Because ``make install'' is often performed by the superuser,
dnl we create the libs subdirectory as the user who configures PHP.
dnl Otherwise, the current user will not be able to delete libs
dnl or the contents of libs.
$php_shtool mkdir -p libs
rm -f libs/*
dnl ## Diversion 1 is the autoconf + automake setup phase. We also
dnl ## set the PHP version, deal with platform-specific compile
dnl ## options and check for the basic compile tools.
dnl ## Diversion 2 is the initial checking of OS features, programs,
dnl ## libraries and so on.
@@ -45,49 +17,79 @@ dnl ## tags are enabled, and the default behaviour of php.ini options.
dnl ## This is also where an SAPI interface is selected (choosing between
dnl ## Apache module, CGI etc.)
dnl ## In diversion 4 we check which extensions should be compiled.
dnl ## All of these are normally in the extension directories.
dnl ## In diversion 4 we check user-configurable general settings.
dnl ## In diversion 5 we check which extensions should be compiled.
dnl ## All of these are normally in the extension directories.
dnl ## Diversion 5 is the last one. Here we generate files and clean up.
dnl ## This is where the version number is changed from now on!
AM_INIT_AUTOMAKE(php, 4.2.0-dev, nodefine)
dnl Basic autoconf + automake initialization, generation of config.nice.
dnl -------------------------------------------------------------------------
AC_INIT(README.CVS-RULES)
PHP_CONFIG_NICE(config.nice)
for arg in $0 "$@"; do
CONFIGURE_COMMAND="$CONFIGURE_COMMAND '$arg'"
done
AC_CANONICAL_HOST
AC_CONFIG_HEADER(main/php_config.h)
MAJOR_VERSION=4
MINOR_VERSION=3
RELEASE_VERSION=0
EXTRA_VERSION="-dev"
VERSION="$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION"
dnl Define where extension directories are located in the configure context
AC_DEFUN(PHP_EXT_BUILDDIR,[ext/$1])dnl
AC_DEFUN(PHP_EXT_DIR,[ext/$1])dnl
AC_DEFUN(PHP_EXT_SRCDIR,[$abs_srcdir/ext/$1])dnl
AC_DEFUN(PHP_ALWAYS_SHARED,[])dnl
dnl Setting up the PHP version based on the information above.
dnl -------------------------------------------------------------------------
PHP_VERSION=$VERSION
echo "/* automatically generated by configure */" > php_version.h.new
echo "/* edit configure.in to change version number */" >> php_version.h.new
echo "#define PHP_MAJOR_VERSION $MAJOR_VERSION" >> php_version.h.new
echo "#define PHP_MINOR_VERSION $MINOR_VERSION" >> php_version.h.new
echo "#define PHP_RELEASE_VERSION $RELEASE_VERSION" >> php_version.h.new
echo "#define PHP_EXTRA_VERSION \"$EXTRA_VERSION\"" >> php_version.h.new
echo "#define PHP_VERSION \"$PHP_VERSION\"" >> php_version.h.new
cmp php_version.h.new php_version.h >/dev/null 2>&1
if test $? -ne 0 ; then
rm -f php_version.h && mv php_version.h.new php_version.h && \
echo 'Updated php_version.h'
else
rm -f php_version.h.new
rm -f php_version.h.new
fi
AM_CONFIG_HEADER(main/php_config.h)
AM_MAINTAINER_MODE
AC_CANONICAL_HOST
dnl We want this one before the checks, so the checks can modify CFLAGS.
test -z "$CFLAGS" && auto_cflags=1
dnl Checks for programs.
AC_PROG_AWK
AC_PROG_YACC
if test "$YACC" != "bison -y"; then
AC_MSG_WARN([You will need bison if you want to regenerate the PHP parsers.])
else
AC_MSG_CHECKING([bison version])
set `bison --version| grep 'GNU Bison' | cut -d ' ' -f 4 | sed -e 's/\./ /'`
if test "${1}" = "1" -a "${2}" -lt "28"; then
AC_MSG_WARN(You will need bison 1.28 if you want to regenerate the Zend parser (found ${1}.${2}).)
fi
AC_MSG_RESULT(${1}.${2} (ok))
dnl Catch common errors here to save a few seconds of our users' time
dnl -------------------------------------------------------------------------
if test "$with_shared_apache" != "no" && test -n "$with_shared_apache" ; then
AC_MSG_ERROR([--with-shared-apache is not supported. Please refer to the documentation for using APXS])
fi
AC_PROG_CC
AC_AIX
if test -n "$with_apache" && test -n "$with_apxs"; then
AC_MSG_ERROR([--with-apache and --with-apxs cannot be used together])
fi
dnl Platform-specific compile settings.
dnl -------------------------------------------------------------------------
dnl if host_alias is empty, ac_cv_host_alias may still have the info
if test -z "$host_alias"; then
host_alias=$ac_cv_host_alias
fi
BSD_MAKEFILE=no
@@ -101,7 +103,7 @@ case $host_alias in
*dgux*)
CPPFLAGS="$CPPFLAGS -D_BSD_TIMEOFDAY_FLAVOR";;
*darwin*|*rhapsody*)
CPPFLAGS="$CPPFLAGS -traditional-cpp";;
CPPFLAGS="$CPPFLAGS -no-cpp-precomp";;
*bsdi*)
BSD_MAKEFILE=yes;;
*beos*)
@@ -111,18 +113,95 @@ case $host_alias in
CPPFLAGS="$CPPFLAGS -D_XPG_IV";;
esac
AM_PROG_CC_STDC
AC_PROG_RANLIB
dnl Settings we want to make before the checks.
dnl -------------------------------------------------------------------------
cwd=`pwd`
PHP_INIT_BUILD_SYSTEM
php_shtool=$srcdir/build/shtool
T_MD=`$php_shtool echo -n -e %B`
T_ME=`$php_shtool echo -n -e %b`
dnl We want this one before the checks, so the checks can modify CFLAGS.
test -z "$CFLAGS" && auto_cflags=1
dnl AC_AIX needs to be before any macros that run the C compiler.
AC_AIX
abs_srcdir=`(cd $srcdir; pwd)`
abs_builddir=`pwd`
php_abs_top_srcdir=$abs_srcdir
php_abs_top_builddir=$abs_builddir
dnl Because ``make install'' is often performed by the superuser,
dnl we create the libs subdirectory as the user who configures PHP.
dnl Otherwise, the current user will not be able to delete libs
dnl or the contents of libs.
$php_shtool mkdir -p libs
rm -f libs/*
dnl Checks for programs.
dnl -------------------------------------------------------------------------
AC_PROG_CC
AC_PROG_CC_C_O
dnl Change to AC_PROG_CC_STDC when we start requiring a post-2.13 autoconf
dnl AC_PROG_CC_STDC
AC_PROG_CPP
dnl AC_PROG_CXX
dnl AC_PROG_CXXCPP
dnl check for -R, etc. switch
AC_MSG_CHECKING([whether compiler supports -R])
AC_CACHE_VAL(php_cv_cc_dashr,[
SAVE_LIBS=$LIBS
LIBS="-R /usr/lib $LIBS"
AC_TRY_LINK([], [], php_cv_cc_dashr=yes, php_cv_cc_dashr=no)
LIBS=$SAVE_LIBS
])
AC_MSG_RESULT([$php_cv_cc_dashr])
if test $php_cv_cc_dashr = "yes"; then
ld_runpath_switch=-R
else
AC_MSG_CHECKING([whether compiler supports -Wl,-rpath,])
AC_CACHE_VAL(php_cv_cc_rpath, [
SAVE_LIBS=$LIBS
LIBS="-Wl,-rpath,/usr/lib $LIBS"
AC_TRY_LINK([], [], php_cv_cc_rpath=yes, php_cv_cc_rpath=no)
LIBS=$SAVE_LIBS
])
AC_MSG_RESULT([$php_cv_cc_rpath])
if test $php_cv_cc_rpath = "yes"; then
ld_runpath_switch=-Wl,-rpath,
else
dnl something innocuous
ld_runpath_switch=-L
fi
fi
AC_PROG_RANLIB
AC_PROG_LN_S
AC_PROG_AWK
AC_PROG_YACC
if test "$YACC" != "bison -y"; then
AC_MSG_WARN([You will need bison if you want to regenerate the PHP parsers.])
else
AC_MSG_CHECKING([bison version])
set `bison --version| grep 'GNU Bison' | cut -d ' ' -f 4 | sed -e 's/\./ /'`
if test "${1}" = "1" -a "${2}" -lt "28"; then
AC_MSG_WARN(You will need bison 1.28 if you want to regenerate the Zend parser (found ${1}.${2}).)
fi
AC_MSG_RESULT(${1}.${2} (ok))
fi
AC_PROG_LEX
if test -n "$LEX"; then
AC_DECL_YYTEXT
:
fi
dnl ## Make flex scanners use const if they can, even if __STDC__ is not
dnl ## true, for compilers like Sun's that only set __STDC__ true in
dnl ## "limit-to-ANSI-standard" mode, not in "ANSI-compatible" mode
@@ -131,22 +210,39 @@ if test "$ac_cv_c_const" = "yes" ; then
LEX_CFLAGS="-DYY_USE_CONST"
fi
abs_srcdir=`(cd $srcdir; pwd)`
abs_builddir=`pwd`
dnl Include Zend and TSRM configurations.
dnl -------------------------------------------------------------------------
sinclude(Zend/acinclude.m4)
sinclude(Zend/Zend.m4)
sinclude(TSRM/tsrm.m4)
divert(2)
PHP_HELP_SEPARATOR([SAPI modules:])
dnl ## Diversion 2 is where we set PHP-specific options and come up
dnl ## with reasonable default values for them. We check for pthreads here
dnl ## because the information is needed by the SAPI configuration.
dnl ## This is also where an SAPI interface is selected (choosing between
dnl ## Apache module, CGI etc.)
dnl .
dnl -------------------------------------------------------------------------
PTHREADS_CHECK
PHP_HELP_SEPARATOR([SAPI modules:])
PHP_SHLIB_SUFFIX_NAME
PHP_SAPI=cgi
PHP_SAPI=default
PHP_BUILD_PROGRAM
dnl SAPI configuration.
dnl -------------------------------------------------------------------------
dnl paths to the targets are relative to the build directory
SAPI_PROGRAM=php
SAPI_SHARED=libs/libphp4.$SHLIB_SUFFIX_NAME
@@ -157,6 +253,10 @@ PHP_CONFIGURE_PART(Configuring SAPI modules)
esyscmd(./scripts/config-stubs sapi)
if test "$PHP_SAPI" = "default"; then
PHP_SELECT_SAPI(cgi, program, cgi_main.c getopt.c)
fi
AC_MSG_CHECKING([for chosen SAPI module])
AC_MSG_RESULT([$PHP_SAPI])
@@ -165,55 +265,38 @@ if test "$enable_experimental_zts" = "yes"; then
PTHREADS_FLAGS
fi
divert(3)
dnl ## In diversion 3 we check for compile-time options to the PHP
dnl ## core and how to deal with different system dependencies. This
dnl ## includes what regex library is used and whether debugging or short
dnl ## tags are enabled, and the default behaviour of php.ini options.
dnl Starting system checks.
dnl -------------------------------------------------------------------------
PHP_CONFIGURE_PART(Running system checks)
PHP_MISSING_TIME_R_DECL
dnl check for -R, etc. switch
AC_MSG_CHECKING([whether compiler supports -R])
AC_CACHE_VAL(php_cv_cc_dashr,[
SAVE_LIBS=$LIBS
LIBS="-R /usr/lib $LIBS"
AC_TRY_LINK([], [], php_cv_cc_dashr=yes, php_cv_cc_dashr=no)
LIBS=$SAVE_LIBS])
AC_MSG_RESULT([$php_cv_cc_dashr])
if test $php_cv_cc_dashr = "yes"; then
ld_runpath_switch=-R
else
AC_MSG_CHECKING([whether compiler supports -Wl,-rpath,])
AC_CACHE_VAL(php_cv_cc_rpath,[
SAVE_LIBS=$LIBS
LIBS="-Wl,-rpath,/usr/lib $LIBS"
AC_TRY_LINK([], [], php_cv_cc_rpath=yes, php_cv_cc_rpath=no)
LIBS=$SAVE_LIBS])
AC_MSG_RESULT([$php_cv_cc_rpath])
if test $php_cv_cc_rpath = "yes"; then
ld_runpath_switch=-Wl,-rpath,
else
dnl something innocuous
ld_runpath_switch=-L
fi
fi
PHP_PROG_SENDMAIL
dnl Check whether the system uses EBCDIC (not ASCII) as its native codeset
PHP_EBCDIC
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
CPPFLAGS="$CPPFLAGS -I/usr/pkg/include"
LDFLAGS="$LDFLAGS -L/usr/pkg/lib"
fi
INCLUDES="$INCLUDES -I\$(top_builddir)/Zend"
test -d /usr/ucblib && PHP_ADD_LIBPATH(/usr/ucblib)
dnl First, library checks.
dnl -------------------------------------------------------------------------
AC_CHECK_LIB(socket, socket, [
PHP_ADD_LIBRARY(socket)
AC_DEFINE(HAVE_LIBSOCKET,1,[ ]) ], [
@@ -224,10 +307,18 @@ AC_CHECK_LIB(socket, socket, [
dnl Some systems (OpenServer 5) dislike -lsocket -lnsl, so we try
dnl to avoid -lnsl checks, if we already have the functions which
dnl are usually in libnsl
dnl Also, uClibc will bark at linking with glibc's libnsl.
unset ac_cv_func_gethostname
unset ac_cv_func_yp_get_default_domain
AC_CHECK_FUNC(yp_get_default_domain,
[php_no_nsl_checks=yes],[])
AC_CHECK_FUNC(gethostname, [
php_no_nsl_checks=yes
],[
AC_CHECK_FUNC(yp_get_default_domain, [
php_no_nsl_checks=yes
])
])
unset ac_cv_func_gethostname
unset ac_cv_func_yp_get_default_domain
if test "$php_no_nsl_checks" != "yes"; then
@@ -273,21 +364,28 @@ AC_CHECK_LIB(socket, res_search, [
])
])
dnl Then headers.
dnl -------------------------------------------------------------------------
dnl Checks for header files.
AC_HEADER_STDC
dnl In QNX opendir resides in libc but dirent.h is still required
if test "`uname -s 2>/dev/null`" != "QNX"; then
AC_HEADER_DIRENT
AC_HEADER_DIRENT
else
AC_CHECK_HEADERS(dirent.h)
AC_CHECK_HEADERS(dirent.h)
fi
PHP_MISSING_FCLOSE_DECL
dnl QNX requires unix.h to allow functions in libunix to work properly
AC_CHECK_HEADERS(
ApplicationServices/ApplicationServices.h \
alloca.h \
arpa/inet.h \
arpa/nameser.h \
assert.h \
crypt.h \
fcntl.h \
grp.h \
@@ -295,6 +393,7 @@ ieeefp.h \
langinfo.h \
limits.h \
locale.h \
mach-o/dyld.h \
netinet/in.h \
pwd.h \
resolv.h \
@@ -307,6 +406,7 @@ sysexits.h \
sys/file.h \
sys/mman.h \
sys/mount.h \
sys/poll.h \
sys/resource.h \
sys/select.h \
sys/socket.h \
@@ -321,9 +421,14 @@ sys/wait.h \
unistd.h \
unix.h \
utime.h \
sys/utsname.h \
)
dnl Checks for typedefs, structures, and compiler characteristics.
dnl -------------------------------------------------------------------------
AC_STRUCT_TM
AC_STRUCT_TIMEZONE
@@ -334,17 +439,15 @@ PHP_SOCKLEN_T
AC_CHECK_SIZEOF(long, 8)
AC_CHECK_SIZEOF(int, 4)
test -d /usr/ucblib && PHP_ADD_LIBPATH(/usr/ucblib)
dnl Check for members of the stat structure
AC_STRUCT_ST_BLKSIZE
dnl AC_STRUCT_ST_BLOCKS will screw QNX because fileblocks.o does not exists
dnl The WARNING_LEVEL required because cc in QNX hates -w option without an argument
if test "`uname -s 2>/dev/null`" != "QNX"; then
AC_STRUCT_ST_BLOCKS
AC_STRUCT_ST_BLOCKS
else
AC_MSG_WARN([warnings level for cc set to 0])
WARNING_LEVEL=0
AC_MSG_WARN([warnings level for cc set to 0])
WARNING_LEVEL=0
fi
AC_STRUCT_ST_RDEV
@@ -352,17 +455,30 @@ dnl Checks for types
AC_TYPE_SIZE_T
AC_TYPE_UID_T
dnl Check for struct sockaddr_storage
AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_sockaddr_storage,
[AC_TRY_COMPILE([ #include <sys/types.h>
#include <sys/socket.h>], [struct sockaddr_storage s; s],
ac_cv_sockaddr_storage=yes, ac_cv_sockaddr_storage=no)])
if test "$ac_cv_sockaddr_storage" = yes; then
AC_DEFINE(HAVE_SOCKADDR_STORAGE,1,[Whether you have struct sockaddr_storage])
fi
dnl Check for IPv6 support
AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support,
[AC_TRY_COMPILE([ #include <sys/types.h>
[AC_TRY_LINK([ #include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>], [struct sockaddr_in6 s; int i=AF_INET6; s],
ac_cv_ipv6_support=yes, ac_cv_ipv6_support=no)])
#include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] = 0;],
[ac_cv_ipv6_support=yes], [ac_cv_ipv6_support=no])])
if test "$ac_cv_ipv6_support" = yes; then
AC_DEFINE(HAVE_IPV6,1,[Whether you have IPv6 support])
fi
dnl Checks for library functions.
dnl -------------------------------------------------------------------------
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(
asctime_r \
@@ -465,7 +581,16 @@ if test $ac_cv_type_in_addr_t = no; then
AC_DEFINE(in_addr_t, u_int, [ ])
fi
divert(4)
dnl ## In diversion 4 we check user-configurable general settings.
dnl General settings.
dnl -------------------------------------------------------------------------
PHP_HELP_SEPARATOR([General settings:])
PHP_ARG_ENABLE(debug, whether to include debugging symbols,
@@ -483,6 +608,15 @@ PHP_ARG_WITH(layout,[layout of installed files],
[ --with-layout=TYPE Sets how installed files will be laid out. Type is
one of "PHP" (default) or "GNU"], PHP)
case $PHP_LAYOUT in
GNU)
oldstyleextdir=no
;;
*)
oldstyleextdir=yes
;;
esac
PHP_ARG_WITH(config-file-path,[path to configuration file],
[ --with-config-file-path=PATH
Sets the path in which to look for php.ini,
@@ -492,28 +626,28 @@ if test "$PHP_CONFIG_FILE_PATH" = "DEFAULT"; then
case $PHP_LAYOUT in
GNU)
PHP_CONFIG_FILE_PATH=$sysconfdir
oldstyleextdir=no;;
;;
*)
PHP_CONFIG_FILE_PATH=$libdir
oldstyleextdir=yes;;
;;
esac
fi
# compatibility
if test "x$with_pear" = "x" -a "x$enable_pear" = "xno"; then
with_pear=no
if test -z "$with_pear" && test "$enable_pear" = "no"; then
with_pear=no
fi
PHP_ARG_WITH(pear, [whether to install PEAR, and where],
[ --with-pear=DIR Install PEAR in DIR (default PREFIX/lib/php)
--without-pear Do not install PEAR], DEFAULT)
if test "$PHP_PEAR" != "no"; then
PEAR_DIR=pear
if test "$PHP_PEAR" != "no" && test "$disable_cli" != "1"; then
install_pear="install-pear install-build install-headers install-programs"
PEAR_INSTALLDIR=$PHP_PEAR
fi
if test "$PHP_PEAR" = "DEFAULT" -o "x$PHP_PEAR" = "xyes"; then
if test "$PHP_PEAR" = "DEFAULT" || test "$PHP_PEAR" = "yes"; then
case $PHP_LAYOUT in
GNU) PEAR_INSTALLDIR=$datadir/pear;;
*) PEAR_INSTALLDIR=$libdir/php;;
@@ -537,29 +671,27 @@ AC_ARG_WITH(exec-dir,
defaults to /usr/local/php/bin],
[
if test "$withval" != "no"; then
if test "$withval" = "yes"; then
AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin", [ ])
AC_MSG_RESULT([/usr/local/php/bin])
else
AC_DEFINE_UNQUOTED(PHP_SAFE_MODE_EXEC_DIR,"$withval", [ ])
AC_MSG_RESULT([$withval])
fi
if test "$withval" = "yes"; then
AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin", [ ])
AC_MSG_RESULT([/usr/local/php/bin])
else
AC_DEFINE_UNQUOTED(PHP_SAFE_MODE_EXEC_DIR,"$withval", [ ])
AC_MSG_RESULT([$withval])
fi
else
AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin", [ ])
AC_MSG_RESULT([/usr/local/php/bin])
AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin", [ ])
AC_MSG_RESULT([/usr/local/php/bin])
fi
],[
AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin", [ ])
AC_MSG_RESULT([/usr/local/php/bin])
AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin", [ ])
AC_MSG_RESULT([/usr/local/php/bin])
])
PHP_ARG_WITH(openssl,for OpenSSL support,
[ --with-openssl[=DIR] Include OpenSSL support (requires OpenSSL >= 0.9.5) ])
if test "$PHP_OPENSSL" = "yes"; then
PHP_OPENSSL="/usr/local/ssl /usr/local /usr /usr/local/openssl"
fi
if test "$PHP_OPENSSL" != "no"; then
ext_openssl_shared=$ext_shared
PHP_SETUP_OPENSSL
fi
@@ -621,22 +753,24 @@ if test "$PHP_DMALLOC" = "yes"; then
])
fi
# temporary until streams are better integrated
PHP_ARG_ENABLE(php-streams,whether to enable php streams,
[ --enable-php-streams Include experimental php streams.
Do not use unless you are testing the code!])
if test "$PHP_PHP_STREAMS" = "yes"; then
AC_DEFINE(HAVE_PHP_STREAM, 1, [Whether to use php streams])
fi
AC_CHECK_LIB(crypt, crypt, [
PHP_ADD_LIBRARY(crypt)
PHP_ADD_LIBRARY(crypt, 1)
AC_DEFINE(HAVE_CRYPT,1,[ ])
])
divert(5)
dnl ## In diversion 5 we check which extensions should be compiled.
dnl ## All of these are normally in the extension directories.
dnl Extension configuration.
dnl -------------------------------------------------------------------------
PHP_HELP_SEPARATOR([Extensions:
--with-EXTENSION=[shared[,PATH]]
@@ -654,8 +788,9 @@ PHP_CONFIGURE_PART(Configuring extensions)
# reading config stubs
esyscmd(./scripts/config-stubs ext)
PHP_FAST_OUTPUT(sapi/$PHP_SAPI/Makefile)
dnl Other settings.
dnl -------------------------------------------------------------------------
PHP_HELP_SEPARATOR([Other settings:])
@@ -683,30 +818,25 @@ unset with_pic
case $php_build_target in
program|static)
standard_libtool_flag='-prefer-non-pic -static'
if test "$lib_build_shared" != "yes"; then
if test -z "$PHP_MODULES"; then
enable_shared=no
fi
PHP_COMPILE='$(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c $< && touch $@'
CXX_PHP_COMPILE='$(CXX) $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c $< && touch $@'
;;
shared)
enable_static=no
standard_libtool_flag=-prefer-pic
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -avoid-version"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -avoid-version -module"
;;
esac
if test "$PHP_SAPI" = "cgi"; then
PHP_PROGRAM=php
fi
if test "$PHP_SAPI" = "fastcgi"; then
PHP_PROGRAM=php
fi
PHP_REGEX
EXTRA_LIBS="$EXTRA_LIBS $DLIBS $LIBS"
unset LIBS LDFLAGS
dnl Configuring Zend and TSRM.
dnl -------------------------------------------------------------------------
PHP_CONFIGURE_PART(Configuring Zend)
LIBZEND_BASIC_CHECKS
LIBZEND_OTHER_CHECKS
@@ -727,7 +857,7 @@ if test "$abs_srcdir" != "$abs_builddir"; then
INCLUDES="$INCLUDES -I\$(top_srcdir)/TSRM"
fi
EXTRA_LIBS="$EXTRA_LIBS $DLIBS $LIBS"
ZEND_EXTRA_LIBS="$LIBS"
unset LIBS LDFLAGS
PHP_CONFIGURE_PART(Configuring TSRM)
@@ -783,16 +913,16 @@ if test -z "$EXTENSION_DIR"; then
part2=non-zts
fi
extbasedir=$part1-$part2-$extbasedir
EXTENSION_DIR=$libdir/extensions/$extbasedir
EXTENSION_DIR=$libdir/extensions/$extbasedir
else
if test "$enable_experimental_zts" = "yes"; then
extbasedir=$extbasedir-zts
fi
if test "$PHP_DEBUG" = "1"; then
extbasedir=$extbasedir-debug
fi
EXTENSION_DIR=$libdir/$extbasedir
if test "$enable_experimental_zts" = "yes"; then
extbasedir=$extbasedir-zts
fi
if test "$PHP_DEBUG" = "1"; then
extbasedir=$extbasedir-debug
fi
EXTENSION_DIR=$libdir/$extbasedir
fi
fi
@@ -835,15 +965,26 @@ AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME",[uname -a output])
PHP_OS=`uname`
AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS",[uname output])
if test "$disable_cli" != "1"; then
PHP_CLI_TARGET=sapi/cli/php
PHP_INSTALL_CLI_TARGET="install-cli"
PHP_ADD_SOURCES(sapi/cli, php_cli.c getopt.c,, cli)
fi
PHP_SUBST(PHP_CLI_TARGET)
PHP_SUBST(PHP_SAPI_OBJS)
PHP_SUBST(PHP_CLI_OBJS)
PHP_SUBST(PHP_GLOBAL_OBJS)
PHP_SUBST(PHP_MODULES)
PHP_SUBST(EXT_SUBDIRS)
PHP_SUBST(EXT_STATIC)
PHP_SUBST(EXT_SHARED)
PHP_SUBST(EXT_LIBS)
PHP_SUBST(EXT_LTLIBS)
PHP_SUBST_OLD(abs_builddir)
PHP_SUBST_OLD(abs_srcdir)
PHP_SUBST_OLD(php_abs_top_builddir)
PHP_SUBST_OLD(php_abs_top_srcdir)
PHP_SUBST(bindir)
PHP_SUBST(exec_prefix)
PHP_SUBST(includedir)
@@ -871,7 +1012,9 @@ PHP_SUBST(DEFS)
PHP_SUBST_OLD(EXTENSION_DIR)
PHP_SUBST(EXTRA_LDFLAGS)
PHP_SUBST_OLD(EXTRA_LIBS)
PHP_SUBST(INCLUDES)
PHP_SUBST_OLD(ZEND_EXTRA_LIBS)
PHP_SUBST_OLD(INCLUDES)
PHP_SUBST_OLD(EXTRA_INCLUDES)
PHP_SUBST_OLD(INCLUDE_PATH)
PHP_SUBST_OLD(INSTALL_IT)
PHP_SUBST(LEX)
@@ -880,16 +1023,15 @@ PHP_SUBST(LFLAGS)
PHP_SUBST(LIBTOOL)
PHP_SUBST(LN_S)
PHP_SUBST_OLD(NATIVE_RPATHS)
PHP_SUBST(PEAR_DIR)
PHP_SUBST_OLD(PEAR_INSTALLDIR)
PHP_SUBST(PHP_BUILD_DATE)
PHP_SUBST(PHP_COMPILE)
PHP_SUBST_OLD(PHP_LDFLAGS)
PHP_SUBST_OLD(PHP_LIBS)
PHP_SUBST(PHP_PROGRAM)
PHP_SUBST(OVERALL_TARGET)
PHP_SUBST(PHP_RPATHS)
PHP_SUBST(PHP_SAPI)
PHP_SUBST(PHP_VERSION)
PHP_SUBST_OLD(PHP_VERSION)
PHP_SUBST(PROG_SENDMAIL)
PHP_SUBST(SHELL)
PHP_SUBST(SHARED_LIBTOOL)
@@ -897,6 +1039,7 @@ PHP_SUBST(TSRM_DIR)
PHP_SUBST(TSRM_LIB)
PHP_SUBST(WARNING_LEVEL)
PHP_SUBST_OLD(YACC)
PHP_SUBST_OLD(SHLIB_SUFFIX_NAME)
old_CC=$CC
@@ -917,9 +1060,9 @@ if test "$PHP_THREAD_SAFETY" = "yes" && test "$PHP_MYSQL" = "yes"; then
CPPFLAGS="$CPPFLAGS -DTHREAD=1"
fi
AM_PROG_LIBTOOL
AC_PROG_LIBTOOL
if test "$enable_debug" != "yes"; then
AM_SET_LIBTOOL_VARIABLE([--silent])
PHP_SET_LIBTOOL_VARIABLE([--silent])
fi
@@ -933,32 +1076,80 @@ PHP_CONFIGURE_PART(Generating files)
CXXFLAGS_CLEAN=$CXXFLAGS
CFLAGS_CLEAN=$CFLAGS
CFLAGS="$CFLAGS $standard_libtool_flag"
CFLAGS="\$(CFLAGS_CLEAN) $standard_libtool_flag"
INLINE_CFLAGS="$INLINE_CFLAGS $standard_libtool_flag"
CXXFLAGS="$CXXFLAGS $standard_libtool_flag"
PHP_GEN_CONFIG_VARS
all_targets='$(OVERALL_TARGET) $(PHP_MODULES) $(PHP_CLI_TARGET)'
install_targets="install-sapi install-modules $PHP_INSTALL_CLI_TARGET $install_pear"
PHP_SUBST(all_targets)
PHP_SUBST(install_targets)
PHP_ADD_SOURCES(TSRM, TSRM.c tsrm_strtok_r.c tsrm_virtual_cwd.c)
PHP_ADD_SOURCES(main, main.c snprintf.c spprintf.c php_sprintf.c \
safe_mode.c fopen_wrappers.c alloca.c \
php_ini.c SAPI.c rfc1867.c php_content_types.c strlcpy.c \
strlcat.c mergesort.c reentrancy.c php_variables.c php_ticks.c \
streams.c network.c php_open_temporary_file.c php_logos.c \
output.c memory_streams.c user_streams.c)
PHP_ADD_SOURCES(/main, internal_functions.c,, sapi)
PHP_ADD_SOURCES(/main, internal_functions_cli.c,, cli)
PHP_ADD_SOURCES(/Zend, zend_language_parser.c zend_language_scanner.c \
zend_ini_parser.c zend_ini_scanner.c)
PHP_ADD_SOURCES(Zend, \
zend_alloc.c zend_compile.c zend_constants.c zend_dynamic_array.c \
zend_execute_API.c zend_highlight.c zend_llist.c \
zend_opcode.c zend_operators.c zend_ptr_stack.c zend_stack.c \
zend_variables.c zend.c zend_API.c zend_extensions.c zend_hash.c \
zend_list.c zend_indent.c zend_builtin_functions.c zend_sprintf.c \
zend_ini.c zend_qsort.c zend_multibyte.c)
if test -r "$abs_srcdir/Zend/zend_objects.c"; then
PHP_ADD_SOURCES(Zend, zend_objects.c zend_object_handlers.c zend_objects_API.c)
fi
dnl Selectively disable optimization due to high RAM usage during
dnl compiling the executor.
if test -n "$GCC" && test "$ZEND_INLINE_OPTIMIZATION" != "yes"; then
flag=-O0
else
flag=
fi
PHP_ADD_SOURCES_X(Zend, zend_execute.c,,PHP_GLOBAL_OBJS,,$flag)
PHP_ADD_BUILD_DIR(main)
PHP_ADD_BUILD_DIR(regex)
PHP_ADD_BUILD_DIR(sapi/$PHP_SAPI sapi/cli)
PHP_ADD_BUILD_DIR(TSRM)
PHP_ADD_BUILD_DIR(Zend)
PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/pear/Makefile.frag,$abs_srcdir/pear,pear)
PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/Makefile.frag,$abs_srcdir/Zend,Zend)
PHP_GEN_BUILD_DIRS
PHP_GEN_GLOBAL_MAKEFILE
$php_shtool mkdir -p pear/scripts
ALL_OUTPUT_FILES="php4.spec Zend/Makefile main/build-defs.h \
pear/scripts/pear pear/scripts/phpize pear/scripts/php-config \
pear/scripts/pearize pear/scripts/phptar TSRM/Makefile $PHP_OUTPUT_FILES"
ALL_OUTPUT_FILES="php4.spec main/build-defs.h \
pear/scripts/phpize pear/scripts/php-config \
$PHP_OUTPUT_FILES"
AC_OUTPUT($ALL_OUTPUT_FILES, [], [
if test "\$CONFIG_FILES" = "$ALL_OUTPUT_FILES" || test -z "\$CONFIG_FILES"; then
if test "\$CONFIG_FILES" = "$ALL_OUTPUT_FILES" || test "\$CONFIG_FILES" = " $ALL_OUTPUT_FILES" || test -z "\$CONFIG_FILES"; then
REDO_ALL=yes
fi
if test -n "\$REDO_ALL"; then
PHP_GEN_MAKEFILES($PHP_FAST_OUTPUT_FILES)
fi
if test ! -f $srcdir/ext/bcmath/number.c; then
echo "creating number.c"
echo "/* Dummy File */" > $srcdir/ext/bcmath/number.c
echo "creating number.h"
echo "/* Dummy File */" > $srcdir/ext/bcmath/number.h
echo "creating number.c"
echo "/* Dummy File */" > $srcdir/ext/bcmath/number.c
echo "creating number.h"
echo "/* Dummy File */" > $srcdir/ext/bcmath/number.h
fi
################################################################
@@ -985,6 +1176,11 @@ if test -n "\$REDO_ALL"; then
extensions="$EXT_STATIC"
dnl mv -f main/internal_functions.c main/internal_functions.c.old 2>/dev/null
sh $srcdir/build/genif.sh $srcdir/main/internal_functions.c.in $srcdir "$EXTRA_MODULE_PTRS" $AWK \$extensions > main/internal_functions.c
echo "creating main/internal_functions_cli.c"
cli_extensions="$EXT_CLI_STATIC"
sh $srcdir/build/genif.sh $srcdir/main/internal_functions.c.in $srcdir "$EXTRA_MODULE_PTRS" $AWK \$cli_extensions > main/internal_functions_cli.c
dnl if cmp main/internal_functions.c.old main/internal_functions.c > /dev/null 2>&1; then
dnl echo "main/internal_functions.c is unchanged"
dnl mv main/internal_functions.c.old main/internal_functions.c
@@ -992,11 +1188,20 @@ dnl else
dnl rm -f main/internal_functions.c.old
dnl fi
if test $UNAME = "FreeBSD" && test $PHP_SAPI = "apache2filter" && test $TSRM_PTH != "pth-config" ; then
echo "+--------------------------------------------------------------------+"
echo "| *** WARNING *** |"
echo "| |"
echo "| In order to build PHP as a Apache2 module on FreeBSD, you have to |"
echo "| add --with-tsrm-pth to your ./configure line. Therefore you need |"
echo "| to install gnu-pth from /usr/ports/devel/pth. |"
fi
if test -n "$PHP_APXS_BROKEN"; then
echo "+--------------------------------------------------------------------+"
echo "| WARNING: Your $APXS script is most likely broken."
echo "| |"
echo "| Please go read http://www.php.net/manual/en/faq.build.php#AEN61338 |"
echo "| Please go read http://www.php.net/faq.build#faq.build.apxs |"
echo "| and make the changes described there and try again. |"
fi
@@ -1034,7 +1239,7 @@ cat <<X
X
fi
if test "$MYSQL_MODULE_TYPE" = "builtin" ; then
if test "$MYSQL_MODULE_TYPE" = "builtin" && test "$PHP_SAPI" != "cgi" && test "$PHP_SAPI" != "cli"; then
cat <<X
+--------------------------------------------------------------------+
| *** WARNING *** |
@@ -1083,6 +1288,17 @@ cat<<X
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point. |
+--------------------------------------------------------------------+
| *** NOTE *** |
| The default for register_globals is now OFF! |
| |
| If your application relies on register_globals being ON, you |
| should explicitly set it to on in your php.ini file. |
| Note that you are strongly encouraged to read |
| http://www.php.net/manual/en/security.registerglobals.php |
| about the implications of having register_globals set to on, and |
| avoid using it if possible. |
+--------------------------------------------------------------------+
Thank you for using PHP.
-88
View File
@@ -1,88 +0,0 @@
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Authors: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id$
#
AC_DEFUN(LIB_SHARED_CONVENIENCE,[
lib_target="\$(LTLIBRARY_NAME)"
cat >>$1<<EOF
\$(LTLIBRARY_NAME): \$(LTLIBRARY_SHARED_OBJECTS) \$(LTLIBRARY_DEPENDENCIES)
\$(SHARED_LIBTOOL) --mode=link \$(COMPILE) \$(LDFLAGS) -o \[$]@ \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_SHARED_LIBADD)
EOF
])
AC_DEFUN(LIB_SHARED_MODULE,[
lib_target="\$(LTLIBRARY_SHARED_NAME)"
cat >>$1<<EOF
\$(LTLIBRARY_SHARED_NAME): \$(LTLIBRARY_SHARED_OBJECTS) \$(LTLIBRARY_DEPENDENCIES)
\$(SHARED_LIBTOOL) --mode=link \$(CC) \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) -o \[$]@ -avoid-version -module -rpath \$(phplibdir) \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_SHARED_LIBADD)
\$(SHARED_LIBTOOL) --mode=install cp \[$]@ \$(phplibdir)
EOF
])
AC_DEFUN(LIB_STATIC_CONVENIENCE,[
lib_target="\$(LTLIBRARY_NAME)"
cat >>$1<<EOF
\$(LTLIBRARY_NAME): \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_DEPENDENCIES)
\$(LINK) \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_LIBADD)
EOF
])
dnl LIB_BUILD(path, shared, convenience)
dnl sets up path to build a shared/static convenience/module
AC_DEFUN(LIB_BUILD,[
lib_makefile="$1/libs.mk"
lib_target=""
$php_shtool mkdir -p $1
if test "$BSD_MAKEFILE" = "yes"; then
lib_include_conf=".include \"\$(top_builddir)/config_vars.mk\""
else
lib_include_conf="include \$(top_builddir)/config_vars.mk"
fi
cat >$lib_makefile<<EOF
$lib_include_conf
LTLIBRARY_OBJECTS = \$(LTLIBRARY_SOURCES:.c=.lo) \$(LTLIBRARY_OBJECTS_X)
LTLIBRARY_SHARED_OBJECTS = \$(LTLIBRARY_OBJECTS:.lo=.slo)
EOF
if test "$2" = "shared" || test "$2" = "yes"; then
lib_build_shared=yes
if test -n "$3"; then
dnl ---------------------------------------- Shared Convenience
LIB_SHARED_CONVENIENCE($lib_makefile)
else
dnl ---------------------------------------- Shared Module
LIB_SHARED_MODULE($lib_makefile)
fi
else
dnl ---------------------------------------- Static Convenience = Static Module
LIB_STATIC_CONVENIENCE($lib_makefile)
fi
dnl ---------------------------------------- Generate build targets
if test -n "$lib_target"; then
cat >>$lib_makefile<<EOF
targets = $lib_target
EOF
fi
])
-4
View File
@@ -1,4 +0,0 @@
SUBDIRS = $(EXT_SUBDIRS)
include $(top_srcdir)/build/rules.mk
-5
View File
@@ -1,5 +0,0 @@
LTLIBRARY_NAME = libaspell.la
LTLIBRARY_SOURCES = aspell.c
include $(top_srcdir)/build/dynlib.mk
+1 -1
View File
@@ -12,7 +12,7 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: |
| Author: Rasmus Lerdorf <rasmus@php.net> |
+----------------------------------------------------------------------+
*/
+1 -1
View File
@@ -21,7 +21,7 @@ AC_ARG_WITH(aspell,
fi
AC_DEFINE(HAVE_ASPELL,1,[Whether you have aspell])
AC_MSG_RESULT(yes)
PHP_EXTENSION(aspell)
PHP_NEW_EXTENSION(aspell, aspell.c)
else
AC_MSG_RESULT(no)
fi
+1 -1
View File
@@ -12,7 +12,7 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Rasmus Lerdorf <rasmus@lerdorf.on.ca> |
| Author: Rasmus Lerdorf <rasmus@php.net> |
+----------------------------------------------------------------------+
*/
-11
View File
@@ -1,11 +0,0 @@
LTLIBRARY_NAME = libbcmath.la
LTLIBRARY_SOURCES = bcmath.c number.c
LTLIBRARY_SHARED_NAME = bcmath.la
LTLIBRARY_DEPENDENCIES = libbcmath/libbcmath.la
LTLIBRARY_LIBADD = $(LTLIBRARY_DEPENDENCIES)
LTLIBRARY_SHARED_LIBADD = $(LTLIBRARY_LIBADD)
SUBDIRS = libbcmath
include $(top_srcdir)/build/dynlib.mk
+1 -1
View File
@@ -12,7 +12,7 @@
| 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> |
| Author: Andi Gutmans <andi@zend.com> |
+----------------------------------------------------------------------+
*/
+7 -4
View File
@@ -7,8 +7,11 @@ PHP_ARG_ENABLE(bcmath, whether to enable bc style precision math functions,
if test "$PHP_BCMATH" != "no"; then
AC_DEFINE(WITH_BCMATH, 1, [Whether you have bcmath])
PHP_EXTENSION(bcmath, $ext_shared)
PHP_FAST_OUTPUT($ext_builddir/libbcmath/Makefile $ext_builddir/libbcmath/src/Makefile)
LIB_BUILD($ext_builddir/libbcmath,$ext_shared,yes)
LIB_BUILD($ext_builddir/libbcmath/src,$ext_shared,yes)
PHP_NEW_EXTENSION(bcmath, bcmath.c number.c \
libbcmath/src/add.c libbcmath/src/div.c libbcmath/src/init.c libbcmath/src/neg.c libbcmath/src/outofmem.c libbcmath/src/raisemod.c libbcmath/src/rt.c libbcmath/src/sub.c \
libbcmath/src/compare.c libbcmath/src/divmod.c libbcmath/src/int2num.c libbcmath/src/num2long.c libbcmath/src/output.c libbcmath/src/recmul.c \
libbcmath/src/sqrt.c libbcmath/src/zero.c libbcmath/src/debug.c libbcmath/src/doaddsub.c libbcmath/src/nearzero.c libbcmath/src/num2str.c libbcmath/src/raise.c \
libbcmath/src/rmzero.c libbcmath/src/str2num.c,
$ext_shared,,-I@ext_srcdir@/libbcmath/src)
PHP_ADD_BUILD_DIR($ext_builddir/libbcmath/src)
fi
-9
View File
@@ -1,9 +0,0 @@
LTLIBRARY_NAME = libbcmath.la
LTLIBRARY_DEPENDENCIES = src/libbcmath.la
LTLIBRARY_LIBADD = $(LTLIBRARY_DEPENDENCIES)
LTLIBRARY_SHARED_LIBADD = $(LTLIBRARY_LIBADD)
SUBDIRS = src
include $(top_srcdir)/build/dynlib.mk
-3
View File
@@ -1,3 +0,0 @@
# Documentation makefile
MAINTAINERCLEANFILES= Makefile.in
-171
View File
@@ -1,171 +0,0 @@
# Makefile.in generated automatically by automake 1.4 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
# Documentation makefile
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
CC = @CC@
MAKEINFO = @MAKEINFO@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
VERSION = @VERSION@
MAINTAINERCLEANFILES = Makefile.in
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES =
DIST_COMMON = Makefile.am Makefile.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps doc/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
tags: TAGS
TAGS:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = doc
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am: all-am
check: check-am
installcheck-am:
installcheck: installcheck-am
install-exec-am:
install-exec: install-exec-am
install-data-am:
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am:
uninstall: uninstall-am
all-am: Makefile
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs:
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
mostlyclean-am: mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-generic mostlyclean-am
clean: clean-am
distclean-am: distclean-generic clean-am
distclean: distclean-am
maintainer-clean-am: maintainer-clean-generic distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-am
.PHONY: tags distdir info-am info dvi-am dvi check check-am \
installcheck-am installcheck install-exec-am install-exec \
install-data-am install-data install-am install uninstall-am uninstall \
all-redirect all-am all installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
-1
View File
@@ -1 +0,0 @@
./" bcmath library documentation
-7
View File
@@ -1,7 +0,0 @@
LTLIBRARY_NAME = libbcmath.la
LTLIBRARY_SOURCES = add.c div.c init.c neg.c outofmem.c raisemod.c rt.c sub.c \
compare.c divmod.c int2num.c num2long.c output.c recmul.c \
sqrt.c zero.c debug.c doaddsub.c nearzero.c num2str.c raise.c \
rmzero.c str2num.c
include $(top_srcdir)/build/dynlib.mk
+1 -1
View File
@@ -12,7 +12,7 @@
| 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> |
| Author: Andi Gutmans <andi@zend.com> |
+----------------------------------------------------------------------+
*/
-6
View File
@@ -1,6 +0,0 @@
# $Source$
# $Id$
define_option enable-bcmath 'Enable bc style precision math functions' yesno \
yes \
' Enables bc style arbitrary precision math functions.'
-6
View File
@@ -1,6 +0,0 @@
LTLIBRARY_NAME = libcalendar.la
LTLIBRARY_SOURCES = calendar.c dow.c french.c gregor.c jewish.c julian.c easter.c cal_unix.c
LTLIBRARY_SHARED_NAME = calendar.la
include $(top_srcdir)/build/dynlib.mk
+5 -1
View File
@@ -127,7 +127,11 @@ PHP_MINIT_FUNCTION(calendar)
REGISTER_LONG_CONSTANT("CAL_MONTH_JULIAN_LONG", CAL_MONTH_JULIAN_LONG, CONST_CS|CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CAL_MONTH_JEWISH", CAL_MONTH_JEWISH, CONST_CS|CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CAL_MONTH_FRENCH", CAL_MONTH_FRENCH, CONST_CS|CONST_PERSISTENT);
/* constants for easter calculation */
REGISTER_LONG_CONSTANT("CAL_EASTER_DEFAULT", CAL_EASTER_DEFAULT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CAL_EASTER_ROMAN", CAL_EASTER_ROMAN, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CAL_EASTER_ALWAYS_GREGORIAN", CAL_EASTER_ALWAYS_GREGORIAN, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CAL_EASTER_ALWAYS_JULIAN", CAL_EASTER_ALWAYS_JULIAN, CONST_CS | CONST_PERSISTENT);
return SUCCESS;
}
+1 -1
View File
@@ -7,5 +7,5 @@ PHP_ARG_ENABLE(calendar,whether to enable calendar conversion support,
if test "$PHP_CALENDAR" = "yes"; then
AC_DEFINE(HAVE_CALENDAR,1,[ ])
PHP_EXTENSION(calendar, $ext_shared)
PHP_NEW_EXTENSION(calendar, calendar.c dow.c french.c gregor.c jewish.c julian.c easter.c cal_unix.c, $ext_shared)
fi
+20 -21
View File
@@ -29,36 +29,35 @@ static void _cal_easter(INTERNAL_FUNCTION_PARAMETERS, int gm)
/* based on code by Simon Kershaw, <webmaster@ely.anglican.org> */
pval *year_arg;
struct tm *ta, te;
time_t the_time;
struct tm te;
long year, golden, solar, lunar, pfm, dom, tmp, easter;
long method = CAL_EASTER_DEFAULT;
switch(ZEND_NUM_ARGS()) {
case 0:
the_time = time(NULL);
ta = localtime(&the_time);
year = ta->tm_year + 1900;
break;
case 1:
if (getParameters(ht, 1, &year_arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(year_arg);
year = Z_LVAL_P(year_arg);
break;
default:
WRONG_PARAM_COUNT;
/* Default to the current year if year parameter is not given */
{
time_t a;
struct tm b;
time(&a);
php_localtime_r(&a, &b);
year = 1900 + b.tm_year;
}
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
"|ll", &year, &method) == FAILURE) {
return;
}
if (gm && (year<1970 || year>2037)) { /* out of range for timestamps */
php3_error(E_WARNING, "easter_date() is only valid for years between 1970 and 2037 inclusive");
php_error(E_WARNING, "easter_date() is only valid for years between 1970 and 2037 inclusive");
RETURN_FALSE;
}
golden = (year % 19) + 1; /* the Golden number */
if ( year <= 1752 ) { /* JULIAN CALENDAR */
if ((year <= 1582 && method != CAL_EASTER_ALWAYS_GREGORIAN) ||
(year >= 1583 && year <= 1752 && method != CAL_EASTER_ROMAN && method != CAL_EASTER_ALWAYS_GREGORIAN) ||
method == CAL_EASTER_ALWAYS_JULIAN) { /* JULIAN CALENDAR */
dom = (year + (year/4) + 5) % 7; /* the "Dominical number" - finding a Sunday */
if (dom < 0) {
dom += 7;
@@ -126,7 +125,7 @@ PHP_FUNCTION(easter_date)
}
/* }}} */
/* {{{ proto int easter_days([int year])
/* {{{ proto int easter_days([int year, [int method]])
Return the number of days after March 21 that Easter falls on for a given year (defaults to current year) */
PHP_FUNCTION(easter_days)
{
+3 -3
View File
@@ -86,7 +86,7 @@
#include "sdncal.h"
#define SDN_OFFSET 2375474
#define FRENCH_SDN_OFFSET 2375474
#define DAYS_PER_4_YEARS 1461
#define DAYS_PER_MONTH 30
#define FIRST_VALID 2375840
@@ -107,7 +107,7 @@ void SdnToFrench(
*pDay = 0;
return;
}
temp = (sdn - SDN_OFFSET) * 4 - 1;
temp = (sdn - FRENCH_SDN_OFFSET) * 4 - 1;
*pYear = temp / DAYS_PER_4_YEARS;
dayOfYear = (temp % DAYS_PER_4_YEARS) / 4;
*pMonth = dayOfYear / DAYS_PER_MONTH + 1;
@@ -128,7 +128,7 @@ long int FrenchToSdn(
return ((year * DAYS_PER_4_YEARS) / 4
+ (month - 1) * DAYS_PER_MONTH
+ day
+ SDN_OFFSET);
+ FRENCH_SDN_OFFSET);
}
char *FrenchMonthName[14] =
+3 -3
View File
@@ -128,7 +128,7 @@
#include "sdncal.h"
#define SDN_OFFSET 32045
#define GREGOR_SDN_OFFSET 32045
#define DAYS_PER_5_MONTHS 153
#define DAYS_PER_4_YEARS 1461
#define DAYS_PER_400_YEARS 146097
@@ -152,7 +152,7 @@ void SdnToGregorian(
*pDay = 0;
return;
}
temp = (sdn + SDN_OFFSET) * 4 - 1;
temp = (sdn + GREGOR_SDN_OFFSET) * 4 - 1;
/* Calculate the century (year/100). */
century = temp / DAYS_PER_400_YEARS;
@@ -227,7 +227,7 @@ long int GregorianToSdn(
+ ((year % 100) * DAYS_PER_4_YEARS) / 4
+ (month * DAYS_PER_5_MONTHS + 2) / 5
+ inputDay
- SDN_OFFSET);
- GREGOR_SDN_OFFSET);
}
char *MonthNameShort[13] =
+4 -4
View File
@@ -267,7 +267,7 @@
#define HALAKIM_PER_LUNAR_CYCLE ((29 * HALAKIM_PER_DAY) + 13753)
#define HALAKIM_PER_METONIC_CYCLE (HALAKIM_PER_LUNAR_CYCLE * (12 * 19 + 7))
#define SDN_OFFSET 347997
#define JEWISH_SDN_OFFSET 347997
#define NEW_MOON_OF_CREATION 31524
#define SUNDAY 0
@@ -497,13 +497,13 @@ void SdnToJewish(
int tishri1After;
int yearLength;
if (sdn <= SDN_OFFSET) {
if (sdn <= JEWISH_SDN_OFFSET) {
*pYear = 0;
*pMonth = 0;
*pDay = 0;
return;
}
inputDay = sdn - SDN_OFFSET;
inputDay = sdn - JEWISH_SDN_OFFSET;
FindTishriMolad(inputDay, &metonicCycle, &metonicYear, &day, &halakim);
tishri1 = Tishri1(metonicYear, day, halakim);
@@ -728,7 +728,7 @@ long int JewishToSdn(
return (0);
}
}
return (sdn + SDN_OFFSET);
return (sdn + JEWISH_SDN_OFFSET);
}
/*
+3 -3
View File
@@ -147,7 +147,7 @@
#include "sdncal.h"
#define SDN_OFFSET 32083
#define JULIAN_SDN_OFFSET 32083
#define DAYS_PER_5_MONTHS 153
#define DAYS_PER_4_YEARS 1461
@@ -169,7 +169,7 @@ void SdnToJulian(
*pDay = 0;
return;
}
temp = (sdn + SDN_OFFSET) * 4 - 1;
temp = (sdn + JULIAN_SDN_OFFSET) * 4 - 1;
/* Calculate the year and day of year (1 <= dayOfYear <= 366). */
year = temp / DAYS_PER_4_YEARS;
@@ -236,7 +236,7 @@ long int JulianToSdn(
return ((year * DAYS_PER_4_YEARS) / 4
+ (month * DAYS_PER_5_MONTHS + 2) / 5
+ inputDay
- SDN_OFFSET);
- JULIAN_SDN_OFFSET);
}
/*
+15
View File
@@ -32,4 +32,19 @@ PHP_FUNCTION(cal_info);
#define phpext_calendar_ptr calendar_module_ptr
/*
* Specifying the easter calculation method
*
* DEFAULT is Anglican, ie. use Julian calendar before 1753
* and Gregorian after that. With ROMAN, the cutoff year is 1582.
* ALWAYS_GREGORIAN and ALWAYS_JULIAN force the calendar
* regardless of date.
*
*/
#define CAL_EASTER_DEFAULT 0
#define CAL_EASTER_ROMAN 1
#define CAL_EASTER_ALWAYS_GREGORIAN 2
#define CAL_EASTER_ALWAYS_JULIAN 3
#endif
-8
View File
@@ -1,8 +0,0 @@
# $Id$
LTLIBRARY_NAME = libccvs.la
LTLIBRARY_SOURCES = ccvs.c
LTLIBRARY_SHARED_NAME = ccvs.la
LTLIBRARY_SHARED_LIBADD = $(CCVS_SHARED_LIBADD)
include $(top_srcdir)/build/dynlib.mk
+18 -18
View File
@@ -12,8 +12,8 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Brendan W. McAdams <bmcadams@php.net> |
| Doug DeJulio <ddj@redhat.com> |
| Authors: Brendan W. McAdams <bmcadams@php.net> |
| Doug DeJulio <ddj@redhat.com> |
+----------------------------------------------------------------------+
*/
/*
@@ -113,7 +113,7 @@ ZEND_GET_MODULE(ccvs)
/* Full Functions (The actual CCVS functions and any internal php hooked functions such as MINFO) */
/* {{{ proto string ccvs_init(string name)
??? */
Initialize CCVS for use */
PHP_FUNCTION(ccvs_init) /* cv_init() */
{
zval **name;
@@ -161,7 +161,7 @@ PHP_FUNCTION(ccvs_init) /* cv_init() */
/* }}} */
/* {{{ proto string ccvs_done(string sess)
??? */
Terminate CCVS engine and do cleanup work */
PHP_FUNCTION(ccvs_done) /* cv_done() */
{
zval **sess;
@@ -183,7 +183,7 @@ PHP_FUNCTION(ccvs_done) /* cv_done() */
/* }}} */
/* {{{ proto string ccvs_new(string session, string invoice)
??? */
Create a new, blank transaction */
PHP_FUNCTION(ccvs_new) /* cv_new() */
{
zval **psess;
@@ -215,7 +215,7 @@ PHP_FUNCTION(ccvs_new) /* cv_new() */
/* }}} */
/* {{{ proto string ccvs_add(string session, string invoice, string argtype, string argval)
??? */
Add data to a transaction */
PHP_FUNCTION(ccvs_add) /* cv_add() */
{
zval **psess;
@@ -260,7 +260,7 @@ PHP_FUNCTION(ccvs_add) /* cv_add() */
*/
/* {{{ proto string ccvs_delete(string session, string invoice)
??? */
Delete a transaction */
PHP_FUNCTION(ccvs_delete) /* cv_delete() */
{
zval **psess;
@@ -286,7 +286,7 @@ PHP_FUNCTION(ccvs_delete) /* cv_delete() */
/* }}} */
/* {{{ proto string ccvs_auth(string session, string invoice)
??? */
Perform credit authorization test on a transaction */
PHP_FUNCTION(ccvs_auth) /* cv_auth() */
{
zval **psess;
@@ -312,7 +312,7 @@ PHP_FUNCTION(ccvs_auth) /* cv_auth() */
/* }}} */
/* {{{ proto string ccvs_return(string session, string invoice)
??? */
Transfer funds from the merchant to the credit card holder */
PHP_FUNCTION(ccvs_return) /* cv_return() */
{
zval **psess;
@@ -338,7 +338,7 @@ PHP_FUNCTION(ccvs_return) /* cv_return() */
/* }}} */
/* {{{ proto string ccvs_reverse(string session, string invoice)
??? */
Perform a full reversal on an already-processed authorization */
PHP_FUNCTION(ccvs_reverse) /* cv_reverse() */
{
zval **psess;
@@ -364,7 +364,7 @@ PHP_FUNCTION(ccvs_reverse) /* cv_reverse() */
/* }}} */
/* {{{ proto string ccvs_sale(string session, string invoice)
??? */
Transfer funds from the credit card holder to the merchant */
PHP_FUNCTION(ccvs_sale) /* cv_sale() */
{
zval **psess;
@@ -390,7 +390,7 @@ PHP_FUNCTION(ccvs_sale) /* cv_sale() */
/* }}} */
/* {{{ proto string ccvs_void(string session, string invoice)
??? */
Perform a full reversal on a completed transaction */
PHP_FUNCTION(ccvs_void) /* cv_void() */
{
zval **psess;
@@ -416,7 +416,7 @@ PHP_FUNCTION(ccvs_void) /* cv_void() */
/* }}} */
/* {{{ proto string ccvs_status(string session, string invoice)
??? */
Check the status of an invoice */
PHP_FUNCTION(ccvs_status) /* cv_status() */
{
zval **psess;
@@ -442,7 +442,7 @@ PHP_FUNCTION(ccvs_status) /* cv_status() */
/* }}} */
/* {{{ proto int ccvs_count(string session, string type)
??? */
Find out how many transactions of a given type are stored in the system */
PHP_FUNCTION(ccvs_count) /* cv_count() */
{
zval **psess;
@@ -468,7 +468,7 @@ PHP_FUNCTION(ccvs_count) /* cv_count() */
/* }}} */
/* {{{ proto string ccvs_lookup(string session, string invoice, int inum)
??? */
Look up an item of a particular type in the database */
PHP_FUNCTION(ccvs_lookup) /* cv_lookup() */
{
zval **psess;
@@ -498,7 +498,7 @@ PHP_FUNCTION(ccvs_lookup) /* cv_lookup() */
/* }}} */
/* {{{ proto string ccvs_report(string session, string type)
??? */
Return the status of the background communication process */
PHP_FUNCTION(ccvs_report) /* cv_report() */
{
zval **psess;
@@ -525,7 +525,7 @@ PHP_FUNCTION(ccvs_report) /* cv_report() */
/* }}} */
/* {{{ proto string ccvs_command(string session, string type, string argval)
??? */
Performs a command which is peculiar to a single protocol, and thus is not available in the general CCVS API */
PHP_FUNCTION(ccvs_command) /* cv_command() */
{
zval **psess;
@@ -555,7 +555,7 @@ PHP_FUNCTION(ccvs_command) /* cv_command() */
/* }}} */
/* {{{ proto string ccvs_textvalue(string session)
??? */
Get text return value for previous function call */
PHP_FUNCTION(ccvs_textvalue) /* cv_textvalue() */
{
zval **psess;
+2 -2
View File
@@ -12,8 +12,8 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Brendan W. McAdams <bmcadams@php.net> |
| Doug DeJulio <ddj@redhat.com> |
| Authors: Brendan W. McAdams <bmcadams@php.net> |
| Doug DeJulio <ddj@redhat.com> |
+----------------------------------------------------------------------+
*/
+1 -1
View File
@@ -22,6 +22,6 @@ if test "$PHP_CCVS" != "no"; then
PHP_ADD_INCLUDE($CCVS_DIR/include)
PHP_ADD_LIBRARY_WITH_PATH(ccvs, $CCVS_DIR/lib, CCVS_SHARED_LIBADD)
PHP_EXTENSION(ccvs, $ext_shared)
PHP_NEW_EXTENSION(ccvs, ccvs.c, $ext_shared)
PHP_SUBST(CCVS_SHARED_LIBADD)
fi
+587 -92
View File
@@ -15,9 +15,10 @@
| Author: Zeev Suraski <zeev@zend.com> |
| Harald Radi <h.radi@nme.at> |
| Alan Brown <abrown@pobox.com> |
| Wez Furlong <wez@thebrainroom.com> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
/*
* This module implements support for COM components that support the IDispatch
* interface. Both local (COM) and remote (DCOM) components can be accessed.
@@ -57,6 +58,7 @@
#include <iostream.h>
#include <math.h>
#include <ocidl.h>
#include "php.h"
#include "php_ini.h"
@@ -65,11 +67,12 @@
#include "php_VARIANT.h"
static ITypeLib *php_COM_find_typelib(char *search_string, int mode TSRMLS_DC);
static int php_COM_load_typelib(ITypeLib *TypeLib, int mode TSRMLS_DC);
static int do_COM_offget(VARIANT *result, comval *array, pval *property, int cleanup TSRMLS_DC);
static int do_COM_propget(VARIANT *var_result, comval *obj, pval *arg_property, int cleanup TSRMLS_DC);
static void php_register_COM_class(TSRMLS_D);
static void php_COM_init(int module_number TSRMLS_DC);
static char *php_string_from_clsid(const CLSID *clsid TSRMLS_DC);
static int com_enable_events(comval *obj, int enable);
static int le_comval;
static int codepage;
@@ -78,6 +81,9 @@ static int codepage;
int resourcecounter = 1;
#endif
static unsigned char arg1and2_force_ref[] =
{ 2, BYREF_FORCE, BYREF_FORCE };
function_entry COM_functions[] = {
PHP_FE(com_load, NULL)
PHP_FE(com_invoke, NULL)
@@ -87,6 +93,9 @@ function_entry COM_functions[] = {
PHP_FE(com_propput, NULL)
PHP_FE(com_load_typelib, NULL)
PHP_FE(com_isenum, NULL)
PHP_FE(com_event_sink, arg1and2_force_ref)
PHP_FE(com_message_pump, NULL)
PHP_FE(com_print_typeinfo, NULL)
PHP_FALIAS(com_get, com_propget, NULL)
PHP_FALIAS(com_propset, com_propput, NULL)
@@ -133,18 +142,21 @@ PHPAPI HRESULT php_COM_invoke(comval *obj, DISPID dispIdMember, WORD wFlags, DIS
if (FAILED(hr)) {
switch (hr) {
case DISP_E_EXCEPTION: {
int srclen=0;
char *src=estrdup("");
int desclen=0;
char *desc=estrdup("");
char *src=estrdup("Unavailable");
int srclen=strlen(src);
char *desc=estrdup("Unavailable");
int desclen=strlen(desc);
if (ExceptInfo.bstrSource)
{
efree(src);
src = php_OLECHAR_to_char(ExceptInfo.bstrSource, &srclen, codepage TSRMLS_CC);
SysFreeString(ExceptInfo.bstrSource);
}
if (ExceptInfo.bstrDescription)
{
efree(desc);
desc = php_OLECHAR_to_char(ExceptInfo.bstrDescription, &desclen, codepage TSRMLS_CC);
SysFreeString(ExceptInfo.bstrDescription);
}
@@ -159,6 +171,7 @@ PHPAPI HRESULT php_COM_invoke(comval *obj, DISPID dispIdMember, WORD wFlags, DIS
SysFreeString(ExceptInfo.bstrHelpFile);
}
}
break;
case DISP_E_PARAMNOTFOUND:
case DISP_E_TYPEMISMATCH:
*ErrString = pemalloc(25, 1);
@@ -257,7 +270,7 @@ PHPAPI HRESULT php_COM_set(comval *obj, IDispatch FAR* FAR* ppDisp, int cleanup
C_REFCOUNT(obj) = 1;
C_DISPATCH(obj) = pDisp;
C_HASTLIB(obj) = SUCCEEDED(C_DISPATCH_VT(obj)->GetTypeInfo(C_DISPATCH(obj), 0, LANG_NEUTRAL, &C_TYPEINFO(obj)));
dispparams.rgvarg = NULL;
dispparams.rgdispidNamedArgs = NULL;
dispparams.cArgs = 0;
@@ -268,9 +281,11 @@ PHPAPI HRESULT php_COM_set(comval *obj, IDispatch FAR* FAR* ppDisp, int cleanup
if (C_HASENUM(obj) = SUCCEEDED(C_DISPATCH_VT(obj)->Invoke(C_DISPATCH(obj), DISPID_NEWENUM, &IID_NULL, LOCALE_SYSTEM_DEFAULT,
DISPATCH_METHOD|DISPATCH_PROPERTYGET, &dispparams, var_result, NULL, NULL))) {
if (V_VT(var_result) == VT_UNKNOWN) {
V_UNKNOWN(var_result)->lpVtbl->AddRef(V_UNKNOWN(var_result));
C_HASENUM(obj) = SUCCEEDED(V_UNKNOWN(var_result)->lpVtbl->QueryInterface(V_UNKNOWN(var_result), &IID_IEnumVARIANT,
(void**)&C_ENUMVARIANT(obj)));
} else if (V_VT(var_result) == VT_DISPATCH) {
V_DISPATCH(var_result)->lpVtbl->AddRef(V_DISPATCH(var_result));
C_HASENUM(obj) = SUCCEEDED(V_DISPATCH(var_result)->lpVtbl->QueryInterface(V_DISPATCH(var_result), &IID_IEnumVARIANT,
(void**)&C_ENUMVARIANT(obj)));
}
@@ -354,6 +369,10 @@ PHPAPI HRESULT php_COM_destruct(comval *obj TSRMLS_DC)
{
HRESULT hr = S_OK;
com_enable_events(obj, FALSE);
if (obj->sinkdispatch)
obj->sinkdispatch->lpVtbl->Release(obj->sinkdispatch);
if (C_ISREFD(obj)) {
C_REFCOUNT(obj) = 1;
hr = php_COM_release(obj TSRMLS_CC);
@@ -497,49 +516,40 @@ PHP_FUNCTION(com_load)
}
if (server_name != NULL) {
/* if a server is passed, one obviously wants to instanciate a
* remote server
*/
flags = CLSCTX_REMOTE_SERVER;
/* What is server name? A String or an array? */
if (Z_TYPE_P(server_name) == IS_ARRAY) {
if (Z_TYPE_P(server_name) == IS_NULL) {
server_name = NULL;
} else if (Z_TYPE_P(server_name) == IS_ARRAY) {
pval **tmp;
/* DAB: 22 Sept 2001 */
/* Aha - we have a number of possible */
/* arguments. They are in the hash */
/* By name: Server, Domain, Username, Password */
/* Flags. */
/* This has been crafted to maintian maximum backward */
/* compatability, If the server name is specified as a */
/* string, then the function shoule behave as before */
/* by defaulting username and password and using the */
/* (I believe) incorrect CLSCTX_SERVER instantiation */
/* paramter. However if server is specified in this array */
/* then we use either CLSCTX_REMOTE_SERVER or whatever */
/* flags are specified in the array */
/* DAB: 22 Sept 2001
* Aha - we have a number of possible arguments.
* They are in the hash By name: Server, Domain, Username, Password
* Flags.
* This has been crafted to maintian maximum backward compatability.
* If the server name is specified as a string, then the function
* should behave as before by defaulting username and password and
* using the (I believe) incorrect CLSCTX_SERVER instantiation
* paramter. However if server is specified in this array then we
* use either CLSCTX_REMOTE_SERVER or whatever flags are specified
* in the array */
HashTable *ht = Z_ARRVAL(*server_name);
if (FAILURE == zend_hash_find(ht, "Server", 7, (void **) &tmp)) {
server_name = NULL;
} else {
server_name = *tmp;
convert_to_string_ex(&server_name);
/* CLSCTX_SERVER includes INPROC and LOCAL */
/* SERVER. This means that any local server */
/* will be instantiated BEFORE even looking */
/* on a remote server. Thus if we have a */
/* server name, probably we want to access */
/* a remote machine or we would not have */
/* bothered specifying it. So it would be */
/* wrong to to connect locally. Futher, */
/* unless the name passed is a GUID, there has */
/* to be something to map the Prog.Id to GUID */
/* and unless that has been modified to remove */
/* the information about local instantiation */
/* CLSCTX_SERVER would force a local instantiation */
/* This setting can be overridden below if the user */
/* specifies a flags element */
/* CLSCTX_SERVER includes INPROC and LOCAL SERVER. This means
* that any local server will be instantiated BEFORE even
* looking on a remote server. Thus if we have a server name,
* probably we want to access a remote machine or we would not
* have bothered specifying it. So it would be wrong to to
* connect locally. Futher, unless the name passed is a GUID,
* there has to be something to map the Prog.Id to GUID and
* unless that has been modified to remove the information
* about local instantiation CLSCTX_SERVER would force a local
* instantiation This setting can be overridden below if the
* user specifies a flags element */
flags = CLSCTX_REMOTE_SERVER;
}
if (FAILURE == zend_hash_find(ht, "Username", 9, (void **) &tmp)) {
@@ -564,14 +574,12 @@ PHP_FUNCTION(com_load)
convert_to_long_ex(tmp);
flags = (CLSCTX) Z_LVAL_PP(tmp);
}
}
if (Z_TYPE_P(server_name) == IS_NULL) {
server_name = NULL;
} else {
if (!INI_INT("com.allow_dcom")) {
php_error(E_WARNING, "DCOM is disabled");
RETURN_FALSE;
RETURN_NULL();
} else {
flags = CLSCTX_REMOTE_SERVER;
convert_to_string_ex(&server_name);
}
}
@@ -615,7 +623,7 @@ PHP_FUNCTION(com_load)
error_message = php_COM_error_message(hr TSRMLS_CC);
php_error(E_WARNING,"Invalid ProgID, GUID string, or Moniker: %s", error_message);
LocalFree(error_message);
RETURN_FALSE;
RETURN_NULL();
}
} else {
efree(ProgID);
@@ -675,7 +683,7 @@ PHP_FUNCTION(com_load)
LocalFree(error_message);
efree(clsid_str);
php_COM_destruct(obj TSRMLS_CC);
RETURN_FALSE;
RETURN_NULL();
}
}
@@ -710,7 +718,7 @@ PHP_FUNCTION(com_load)
}
}
RETURN_LONG(zend_list_insert(obj, IS_COM));
RETURN_RESOURCE(zend_list_insert(obj, IS_COM));
}
/* }}} */
@@ -912,7 +920,7 @@ PHP_FUNCTION(com_invoke)
}
arguments = (pval **) emalloc(sizeof(pval *)*arg_count);
if (zend_get_parameters_array(ht, arg_count, arguments) == FAILURE) {
RETURN_FALSE;
RETURN_NULL();
}
object = arguments[0];
@@ -923,7 +931,7 @@ PHP_FUNCTION(com_invoke)
obj = (comval *)zend_list_find(Z_LVAL_P(object), &type);
if (!obj || (type != IS_COM)) {
php_error(E_WARNING,"%d is not a COM object handler", Z_STRVAL_P(function_name));
RETURN_FALSE;
RETURN_NULL();
}
/* obtain property/method handler */
@@ -935,7 +943,7 @@ PHP_FUNCTION(com_invoke)
FREE_VARIANT(var_result);
efree(arguments);
RETURN_FALSE;
RETURN_NULL();
}
RETVAL_VARIANT(var_result);
@@ -1005,6 +1013,461 @@ PHP_FUNCTION(com_addref)
}
/* }}} */
/* {{{ proto bool com_message_pump([int timeoutms])
Process COM messages, sleeping for up to timeoutms milliseconds */
PHP_FUNCTION(com_message_pump)
{
long timeoutms = 0;
MSG msg;
DWORD result;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &timeoutms) == FAILURE)
RETURN_FALSE;
result = MsgWaitForMultipleObjects(0, NULL, FALSE, timeoutms, QS_ALLINPUT);
if (result == WAIT_OBJECT_0) {
while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
TranslateMessage(&msg);
DispatchMessage(&msg);
}
/* we processed messages */
RETVAL_TRUE;
} else {
/* we did not process messages (timed out) */
RETVAL_FALSE;
}
}
/* }}} */
static int com_enable_events(comval *obj, int enable)
{
if (obj->sinkdispatch) {
IConnectionPointContainer *cont;
IConnectionPoint *point;
if (SUCCEEDED(C_DISPATCH_VT(obj)->QueryInterface(C_DISPATCH(obj), &IID_IConnectionPointContainer, (void**)&cont))) {
if (SUCCEEDED(cont->lpVtbl->FindConnectionPoint(cont, &obj->sinkid, &point))) {
if (enable) {
point->lpVtbl->Advise(point, (IUnknown*)obj->sinkdispatch, &obj->sinkcookie);
} else {
point->lpVtbl->Unadvise(point, obj->sinkcookie);
}
point->lpVtbl->Release(point);
}
cont->lpVtbl->Release(cont);
}
}
return 0;
}
static const struct {
VARTYPE vt;
const char *name;
} vt_names[] = {
{ VT_NULL, "VT_NULL" },
{ VT_EMPTY, "VT_EMPTY" },
{ VT_UI1, "VT_UI1" },
{ VT_I2, "VT_I2" },
{ VT_I4, "VT_I4" },
{ VT_R4, "VT_R4" },
{ VT_R8, "VT_R8" },
{ VT_BOOL, "VT_BOOL" },
{ VT_ERROR, "VT_ERROR" },
{ VT_CY, "VT_CY" },
{ VT_DATE, "VT_DATE" },
{ VT_BSTR, "VT_BSTR" },
{ VT_DECIMAL, "VT_DECIMAL" },
{ VT_UNKNOWN, "VT_UNKNOWN" },
{ VT_DISPATCH, "VT_DISPATCH" },
{ VT_VARIANT, "VT_VARIANT" },
{ VT_I1, "VT_I1" },
{ VT_UI2, "VT_UI2" },
{ VT_UI4, "VT_UI4" },
{ VT_INT, "VT_INT" },
{ VT_UINT, "VT_UINT" },
{ VT_ARRAY, "VT_ARRAY" },
{ VT_BYREF, "VT_BYREF" },
{ VT_VOID, "VT_VOID" },
{ VT_PTR, "VT_PTR" },
{ VT_HRESULT, "VT_HRESULT" },
{ 0, NULL }
};
static inline const char *vt_to_string(VARTYPE vt)
{
int i;
for (i = 0; vt_names[i].name != NULL; i++) {
if (vt_names[i].vt == vt)
return vt_names[i].name;
}
return "?";
}
static int process_typeinfo(ITypeInfo *typeinfo, HashTable *id_to_name, int printdef, GUID *guid TSRMLS_DC)
{
TYPEATTR *attr;
FUNCDESC *func;
int i;
OLECHAR *olename;
char *ansiname = NULL;
unsigned int ansinamelen;
int ret = 0;
if (FAILED(typeinfo->lpVtbl->GetTypeAttr(typeinfo, &attr)))
return 0;
/* verify that it is suitable */
if (id_to_name == NULL || attr->typekind == TKIND_DISPATCH) {
if (guid)
memcpy(guid, &attr->guid, sizeof(GUID));
if (printdef) {
char *guidstring;
typeinfo->lpVtbl->GetDocumentation(typeinfo, MEMBERID_NIL, &olename, NULL, NULL, NULL);
ansiname = php_OLECHAR_to_char(olename, &ansinamelen, codepage TSRMLS_CC);
SysFreeString(olename);
guidstring = php_string_from_clsid(&attr->guid TSRMLS_CC);
php_printf("class %s { /* GUID=%s */\n", ansiname, guidstring);
efree(guidstring);
efree(ansiname);
}
if (id_to_name)
zend_hash_init(id_to_name, 0, NULL, ZVAL_PTR_DTOR, 0);
/* So we've got the dispatch interface; lets list the event methods */
for (i = 0; i < attr->cFuncs; i++) {
zval *tmp;
DISPID lastid = 0; /* for props */
int isprop;
if (FAILED(typeinfo->lpVtbl->GetFuncDesc(typeinfo, i, &func)))
break;
isprop = (func->invkind & DISPATCH_PROPERTYGET || func->invkind & DISPATCH_PROPERTYPUT);
if (!isprop || lastid != func->memid) {
lastid = func->memid;
typeinfo->lpVtbl->GetDocumentation(typeinfo, func->memid, &olename, NULL, NULL, NULL);
ansiname = php_OLECHAR_to_char(olename, &ansinamelen, codepage TSRMLS_CC);
SysFreeString(olename);
if (printdef) {
int j;
char *funcdesc;
unsigned int funcdesclen, cnames = 0;
BSTR *names;
names = (BSTR*)emalloc((func->cParams + 1) * sizeof(BSTR));
typeinfo->lpVtbl->GetNames(typeinfo, func->memid, names, func->cParams + 1, &cnames);
/* first element is the function name */
SysFreeString(names[0]);
php_printf("\t/* DISPID=%d */\n", func->memid);
if (func->elemdescFunc.tdesc.vt != VT_VOID) {
php_printf("\t/* %s [%d] */\n",
vt_to_string(func->elemdescFunc.tdesc.vt),
func->elemdescFunc.tdesc.vt
);
}
if (isprop) {
typeinfo->lpVtbl->GetDocumentation(typeinfo, func->memid, NULL, &olename, NULL, NULL);
if (olename) {
funcdesc = php_OLECHAR_to_char(olename, &funcdesclen, codepage TSRMLS_CC);
SysFreeString(olename);
php_printf("\t/* %s */\n", funcdesc);
efree(funcdesc);
}
php_printf("\tvar $%s;\n\n", ansiname);
} else {
/* a function */
php_printf("\tfunction %s(\n", ansiname);
for (j = 0; j < func->cParams; j++) {
ELEMDESC *elem = &func->lprgelemdescParam[j];
php_printf("\t\t/* %s [%d] ", vt_to_string(elem->tdesc.vt), elem->tdesc.vt);
if (elem->paramdesc.wParamFlags & PARAMFLAG_FIN)
php_printf("[in]");
if (elem->paramdesc.wParamFlags & PARAMFLAG_FOUT)
php_printf("[out]");
if (elem->tdesc.vt == VT_PTR) {
/* what does it point to ? */
php_printf(" --> %s [%d] ",
vt_to_string(elem->tdesc.lptdesc->vt),
elem->tdesc.lptdesc->vt
);
}
/* when we handle prop put and get, this will look nicer */
if (j+1 < (int)cnames) {
funcdesc = php_OLECHAR_to_char(names[j+1], &funcdesclen, codepage TSRMLS_CC);
SysFreeString(names[j+1]);
} else {
funcdesc = "???";
}
php_printf(" */ %s%s%c\n",
elem->tdesc.vt == VT_PTR ? "&$" : "$",
funcdesc,
j == func->cParams - 1 ? ' ' : ','
);
if (j+1 < (int)cnames)
efree(funcdesc);
}
php_printf("\t\t)\n\t{\n");
typeinfo->lpVtbl->GetDocumentation(typeinfo, func->memid, NULL, &olename, NULL, NULL);
if (olename) {
funcdesc = php_OLECHAR_to_char(olename, &funcdesclen, codepage TSRMLS_CC);
SysFreeString(olename);
php_printf("\t\t/* %s */\n", funcdesc);
efree(funcdesc);
}
php_printf("\t}\n");
}
efree(names);
}
if (id_to_name) {
zend_str_tolower(ansiname, ansinamelen);
MAKE_STD_ZVAL(tmp);
ZVAL_STRINGL(tmp, ansiname, ansinamelen, 0);
zend_hash_index_update(id_to_name, func->memid, (void*)&tmp, sizeof(zval *), NULL);
}
}
typeinfo->lpVtbl->ReleaseFuncDesc(typeinfo, func);
}
if (printdef)
php_printf("}\n");
ret = 1;
} else {
zend_error(E_WARNING, "Thats not a dispatchable interface!! type kind = %08x\n", attr->typekind);
}
typeinfo->lpVtbl->ReleaseTypeAttr(typeinfo, attr);
return ret;
}
static ITypeInfo *locate_typeinfo(char *typelibname, comval *obj, char *dispname, int sink TSRMLS_DC)
{
ITypeInfo *typeinfo = NULL;
ITypeLib *typelib = NULL;
int gotguid = 0;
GUID iid;
if (obj) {
if (dispname == NULL && sink) {
IProvideClassInfo2 *pci2;
IProvideClassInfo *pci;
if (SUCCEEDED(C_DISPATCH_VT(obj)->QueryInterface(C_DISPATCH(obj), &IID_IProvideClassInfo2, (void**)&pci2))) {
gotguid = SUCCEEDED(pci2->lpVtbl->GetGUID(pci2, GUIDKIND_DEFAULT_SOURCE_DISP_IID, &iid));
pci2->lpVtbl->Release(pci2);
}
if (!gotguid && SUCCEEDED(C_DISPATCH_VT(obj)->QueryInterface(C_DISPATCH(obj), &IID_IProvideClassInfo, (void**)&pci))) {
/* examine the available interfaces */
/* TODO: write some code here */
pci->lpVtbl->Release(pci);
}
} else if (dispname && C_HASTLIB(obj)) {
unsigned int idx;
/* get the library from the object; the rest will be dealt with later */
C_TYPEINFO_VT(obj)->GetContainingTypeLib(C_TYPEINFO(obj), &typelib, &idx);
} else if (typelibname == NULL) {
C_DISPATCH_VT(obj)->GetTypeInfo(C_DISPATCH(obj), 0, LANG_NEUTRAL, &typeinfo);
}
} else if (typelibname) {
/* Fetch the typelibrary and use that to look things up */
typelib = php_COM_find_typelib(typelibname, CONST_CS TSRMLS_CC);
}
if (!gotguid && dispname && typelib) {
unsigned short cfound;
MEMBERID memid;
OLECHAR *olename = php_char_to_OLECHAR(dispname, strlen(dispname), CP_ACP TSRMLS_CC);
cfound = 1;
if (FAILED(typelib->lpVtbl->FindName(typelib, olename, 0, &typeinfo, &memid, &cfound)) || cfound == 0) {
CLSID coclass;
ITypeInfo *coinfo;
/* assume that it might be a progid instead */
if (SUCCEEDED(CLSIDFromProgID(olename, &coclass)) &&
SUCCEEDED(typelib->lpVtbl->GetTypeInfoOfGuid(typelib, &coclass, &coinfo))) {
/* enumerate implemented interfaces and pick the one as indicated by sink */
TYPEATTR *attr;
int i;
coinfo->lpVtbl->GetTypeAttr(coinfo, &attr);
for (i = 0; i < attr->cImplTypes; i++) {
HREFTYPE rt;
int tf;
if (FAILED(coinfo->lpVtbl->GetImplTypeFlags(coinfo, i, &tf)))
continue;
if ((sink && tf == (IMPLTYPEFLAG_FSOURCE|IMPLTYPEFLAG_FDEFAULT)) ||
(!sink && (tf & IMPLTYPEFLAG_FSOURCE) == 0)) {
/* flags match what we are looking for */
if (SUCCEEDED(coinfo->lpVtbl->GetRefTypeOfImplType(coinfo, i, &rt)))
if (SUCCEEDED(coinfo->lpVtbl->GetRefTypeInfo(coinfo, rt, &typeinfo)))
break;
}
}
coinfo->lpVtbl->ReleaseTypeAttr(coinfo, attr);
coinfo->lpVtbl->Release(coinfo);
}
}
efree(olename);
} else if (gotguid) {
typelib->lpVtbl->GetTypeInfoOfGuid(typelib, &iid, &typeinfo);
}
if (typelib)
typelib->lpVtbl->Release(typelib);
return typeinfo;
}
/* {{{ proto bool com_print_typeinfo(mixed comobject | string typelib, string dispinterface, bool wantsink)
Print out a PHP class definition for a dispatchable interface */
PHP_FUNCTION(com_print_typeinfo)
{
zval *arg1;
char *ifacename = NULL;
char *typelibname = NULL;
int ifacelen;
zend_bool wantsink = 0;
comval *obj = NULL;
ITypeInfo *typeinfo;
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z/s!b", &arg1, &ifacename,
&ifacelen, &wantsink)) {
RETURN_FALSE;
}
if (Z_TYPE_P(arg1) == IS_OBJECT && (Z_OBJCE_P(arg1) == &COM_class_entry || !strcmp(Z_OBJCE_P(arg1)->name, "COM"))) {
zval **tmp;
zend_hash_index_find(Z_OBJPROP_P(arg1), 0, (void**)&tmp);
ZEND_FETCH_RESOURCE(obj, comval*, tmp, -1, "comval", IS_COM);
} else if (Z_TYPE_P(arg1) == IS_RESOURCE) {
ZEND_FETCH_RESOURCE(obj, comval*, &arg1, -1, "comval", IS_COM);
} else {
convert_to_string(arg1);
typelibname = Z_STRVAL_P(arg1);
}
typeinfo = locate_typeinfo(typelibname, obj, ifacename, wantsink TSRMLS_CC);
if (typeinfo) {
process_typeinfo(typeinfo, NULL, 1, NULL TSRMLS_CC);
typeinfo->lpVtbl->Release(typeinfo);
RETURN_TRUE;
} else {
zend_error(E_WARNING, "Unable to find typeinfo using the parameters supplied");
}
RETURN_FALSE;
}
/* }}} */
/* {{{ proto bool com_event_sink(mixed comobject, object sinkobject [, mixed sinkinterface])
Connect events from a COM object to a PHP object */
PHP_FUNCTION(com_event_sink)
{
zval *object, *sinkobject, *sink=NULL;
char *dispname = NULL, *typelibname = NULL;
zend_bool gotguid = 0;
comval *obj;
ITypeInfo *typeinfo = NULL;
RETVAL_FALSE;
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zz|z/", &object, &sinkobject, &sink)) {
RETURN_FALSE;
}
if (Z_TYPE_P(object) == IS_OBJECT && (Z_OBJCE_P(object) == &COM_class_entry || !strcmp(Z_OBJCE_P(object)->name, "COM"))) {
zval **tmp;
zend_hash_index_find(Z_OBJPROP_P(object), 0, (void**)&tmp);
ZEND_FETCH_RESOURCE(obj, comval*, tmp, -1, "comval", IS_COM);
} else {
ZEND_FETCH_RESOURCE(obj, comval*, &object, -1, "comval", IS_COM);
}
if (sink && Z_TYPE_P(sink) == IS_ARRAY) {
/* 0 => typelibname, 1 => dispname */
zval **tmp;
if (zend_hash_index_find(Z_ARRVAL_P(sink), 0, (void**)&tmp) == SUCCESS)
typelibname = Z_STRVAL_PP(tmp);
if (zend_hash_index_find(Z_ARRVAL_P(sink), 1, (void**)&tmp) == SUCCESS)
dispname = Z_STRVAL_PP(tmp);
} else if (sink != NULL) {
convert_to_string(sink);
dispname = Z_STRVAL_P(sink);
}
typeinfo = locate_typeinfo(typelibname, obj, dispname, 1 TSRMLS_CC);
if (typeinfo) {
HashTable *id_to_name;
ALLOC_HASHTABLE(id_to_name);
if (process_typeinfo(typeinfo, id_to_name, 0, &obj->sinkid TSRMLS_CC)) {
/* Create the COM wrapper for this sink */
obj->sinkdispatch = php_COM_export_as_sink(sinkobject, &obj->sinkid, id_to_name TSRMLS_CC);
/* Now hook it up to the source */
com_enable_events(obj, TRUE);
RETVAL_TRUE;
} else {
FREE_HASHTABLE(id_to_name);
}
}
if (typeinfo)
typeinfo->lpVtbl->Release(typeinfo);
}
/* }}} */
static int do_COM_offget(VARIANT *result, comval *array, pval *property, int cleanup TSRMLS_DC)
{
@@ -1103,7 +1566,7 @@ static void do_COM_propput(pval *return_value, comval *obj, pval *arg_property,
FREE_VARIANT(var_result);
FREE_VARIANT(new_value);
RETURN_FALSE;
RETURN_NULL();
}
php_pval_to_variant(value, new_value, codepage TSRMLS_CC);
@@ -1123,33 +1586,36 @@ static void do_COM_propput(pval *return_value, comval *obj, pval *arg_property,
php_error(E_WARNING,"PropPut() failed: %s", error_message);
}
LocalFree(error_message);
efree(propname);
FREE_VARIANT(var_result);
FREE_VARIANT(new_value);
RETURN_FALSE;
efree(new_value);
efree(propname);
RETURN_NULL();
}
dispparams.cArgs = 0;
dispparams.cNamedArgs = 0;
if (return_value) {
dispparams.cArgs = 0;
dispparams.cNamedArgs = 0;
hr = php_COM_invoke(obj, dispid, DISPATCH_PROPERTYGET, &dispparams, var_result, &ErrString TSRMLS_CC);
hr = php_COM_invoke(obj, dispid, DISPATCH_PROPERTYGET, &dispparams, var_result, &ErrString TSRMLS_CC);
if (SUCCEEDED(hr)) {
php_variant_to_pval(var_result, return_value, codepage TSRMLS_CC);
} else {
*return_value = *value;
zval_copy_ctor(return_value);
}
if (SUCCEEDED(hr)) {
php_variant_to_pval(var_result, return_value, codepage TSRMLS_CC);
} else {
*return_value = *value;
zval_copy_ctor(return_value);
}
if (ErrString) {
pefree(ErrString, 1);
if (ErrString) {
pefree(ErrString, 1);
}
}
FREE_VARIANT(var_result);
FREE_VARIANT(new_value);
efree(new_value); // FREE_VARIANT does a VariantClear() which is not desired here !
efree(propname);
}
@@ -1172,6 +1638,7 @@ PHP_FUNCTION(com_propget)
obj = (comval *)zend_list_find(Z_LVAL_P(arg_comval), &type);
if (!obj || (type != IS_COM)) {
php_error(E_WARNING,"%d is not a COM object handler", Z_LVAL_P(arg_comval));
RETURN_NULL();
}
convert_to_string_ex(&arg_property);
@@ -1179,7 +1646,7 @@ PHP_FUNCTION(com_propget)
if (do_COM_propget(var_result, obj, arg_property, FALSE TSRMLS_CC) == FAILURE) {
FREE_VARIANT(var_result);
RETURN_FALSE;
RETURN_NULL();
}
RETVAL_VARIANT(var_result);
@@ -1205,6 +1672,7 @@ PHP_FUNCTION(com_propput)
obj = (comval *)zend_list_find(Z_LVAL_P(arg_comval), &type);
if (!obj || (type != IS_COM)) {
php_error(E_WARNING,"%d is not a COM object handler", Z_LVAL_P(arg_comval));
RETURN_NULL();
}
convert_to_string_ex(&arg_property);
@@ -1321,6 +1789,7 @@ PHPAPI pval php_COM_get_property_handler(zend_property_reference *property_refer
obj = obj_prop;
php_COM_set(obj, &V_DISPATCH(var_result), TRUE TSRMLS_CC);
VariantInit(var_result); // to protect C_DISPATCH(obj) from being freed when var_result is destructed
} else {
php_variant_to_pval(var_result, &return_value, codepage TSRMLS_CC);
@@ -1328,7 +1797,6 @@ PHPAPI pval php_COM_get_property_handler(zend_property_reference *property_refer
obj_prop = NULL;
}
VariantInit(var_result); // to protect C_DISPATCH(obj) from being freed when var_result is destructed
pval_destructor(&overloaded_property->element);
}
@@ -1345,7 +1813,6 @@ PHPAPI pval php_COM_get_property_handler(zend_property_reference *property_refer
PHPAPI int php_COM_set_property_handler(zend_property_reference *property_reference, pval *value)
{
pval result;
zend_overloaded_element *overloaded_property;
zend_llist_element *element;
pval **comval_handle;
@@ -1415,7 +1882,7 @@ PHPAPI int php_COM_set_property_handler(zend_property_reference *property_refere
FREE_VARIANT(var_result);
overloaded_property = (zend_overloaded_element *) element->data;
do_COM_propput(&result, obj, &overloaded_property->element, value TSRMLS_CC);
do_COM_propput(NULL, obj, &overloaded_property->element, value TSRMLS_CC);
FREE_COM(obj_prop);
pval_destructor(&overloaded_property->element);
@@ -1423,6 +1890,20 @@ PHPAPI int php_COM_set_property_handler(zend_property_reference *property_refere
return SUCCESS;
}
/* create an overloaded COM object from a dispatch pointer */
PHPAPI zval *php_COM_object_from_dispatch(IDispatch *disp, zval *val TSRMLS_DC)
{
comval *obj;
zval *zobj;
ALLOC_COM(obj);
MAKE_STD_ZVAL(zobj);
php_COM_set(obj, &disp, FALSE TSRMLS_CC);
ZVAL_COM_EX(zobj, obj, val);
return zobj;
}
PHPAPI void php_COM_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_property_reference *property_reference)
{
@@ -1438,34 +1919,38 @@ PHPAPI void php_COM_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_pro
pval *object_handle;
PHP_FN(com_load)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
if (!zend_is_true(return_value)) {
ZVAL_FALSE(object);
return;
if (zend_is_true(return_value)) {
ALLOC_ZVAL(object_handle);
*object_handle = *return_value;
pval_copy_constructor(object_handle);
INIT_PZVAL(object_handle);
zend_hash_index_update(Z_OBJPROP_P(object), 0, &object_handle, sizeof(pval *), NULL);
pval_destructor(&function_name->element);
} else {
ZVAL_NULL(object);
}
ALLOC_ZVAL(object_handle);
*object_handle = *return_value;
pval_copy_constructor(object_handle);
INIT_PZVAL(object_handle);
zend_hash_index_update(Z_OBJPROP_P(object), 0, &object_handle, sizeof(pval *), NULL);
pval_destructor(&function_name->element);
return;
}
RETVAL_NULL();
property = php_COM_get_property_handler(property_reference);
if (Z_TYPE(property) == IS_NULL) {
if (property.refcount == 1) {
pval_destructor(&property);
}
if (Z_TYPE(property) != IS_OBJECT) {
pval_destructor(&property);
pval_destructor(&function_name->element);
/* error message - function call on a non-object */
return;
}
zend_hash_index_find(Z_OBJPROP(property), 0, (void **) &handle);
obj = (comval *)zend_list_find(Z_LVAL_PP(handle), &type);
if (!obj || (type != IS_COM)) {
pval_destructor(&property);
pval_destructor(&function_name->element);
return;
}
@@ -1485,9 +1970,7 @@ PHPAPI void php_COM_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_pro
arguments = (pval **) emalloc(sizeof(pval *)*arg_count);
zend_get_parameters_array(ht, arg_count, arguments);
if (do_COM_invoke(obj , &function_name->element, var_result, arguments, arg_count TSRMLS_CC) == FAILURE) {
RETVAL_FALSE;
} else {
if (do_COM_invoke(obj , &function_name->element, var_result, arguments, arg_count TSRMLS_CC) == SUCCESS) {
php_variant_to_pval(var_result, return_value, codepage TSRMLS_CC);
}
@@ -1495,9 +1978,12 @@ PHPAPI void php_COM_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_pro
efree(arguments);
}
if (property.refcount == 1) {
if (zend_llist_count(property_reference->elements_list) > 1) {
/* destruct temporary object */
zend_list_delete(Z_LVAL_PP(handle));
pval_destructor(&property);
}
pval_destructor(&function_name->element);
}
@@ -1520,6 +2006,10 @@ static ITypeLib *php_COM_find_typelib(char *search_string, int mode TSRMLS_DC)
*/
search_string = php_strtok_r(search_string, ",", &strtok_buf);
if (search_string == NULL)
return NULL;
major = php_strtok_r(NULL, ",", &strtok_buf);
minor = php_strtok_r(NULL, ",", &strtok_buf);
@@ -1666,7 +2156,7 @@ static ITypeLib *php_COM_find_typelib(char *search_string, int mode TSRMLS_DC)
}
static int php_COM_load_typelib(ITypeLib *TypeLib, int mode TSRMLS_DC)
PHPAPI int php_COM_load_typelib(ITypeLib *TypeLib, int mode TSRMLS_DC)
{
ITypeComp *TypeComp;
int i;
@@ -1748,7 +2238,6 @@ static int php_COM_load_typelib(ITypeLib *TypeLib, int mode TSRMLS_DC)
return SUCCESS;
}
/* {{{ proto bool com_isenum(object com_module)
Grabs an IEnumVariant */
PHP_FUNCTION(com_isenum)
@@ -1794,11 +2283,18 @@ static void php_COM_init(int module_number TSRMLS_DC)
php_register_COM_class(TSRMLS_C);
}
PHPAPI ZEND_DECLARE_MODULE_GLOBALS(com)
static void php_com_init_globals(zend_com_globals *com_globals)
{
}
PHP_MINIT_FUNCTION(COM)
{
ZEND_INIT_MODULE_GLOBALS(com, php_com_init_globals, NULL);
php_COM_init(module_number TSRMLS_CC);
php_VARIANT_init(module_number TSRMLS_CC);
php_COM_dispatch_init(module_number TSRMLS_CC);
REGISTER_LONG_CONSTANT("CLSCTX_INPROC_SERVER", CLSCTX_INPROC_SERVER, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CLSCTX_INPROC_HANDLER", CLSCTX_INPROC_HANDLER, CONST_CS | CONST_PERSISTENT);
@@ -1812,7 +2308,6 @@ PHP_MINIT_FUNCTION(COM)
return SUCCESS;
}
PHP_MSHUTDOWN_FUNCTION(COM)
{
UNREGISTER_INI_ENTRIES();
@@ -1829,7 +2324,7 @@ zend_module_entry COM_module_entry = {
PHP_MSHUTDOWN(COM),
NULL,
NULL,
PHP_MINFO(COM),
PHP_MINFO(COM),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
+1 -1
View File
@@ -1,2 +1,2 @@
Win32 COM
Zeev Suraski, Harald Radi, Alan Brown
Alan Brown, Wez Furlong, Harald Radi, Zeev Suraski
+13 -12
View File
@@ -1,27 +1,28 @@
1) Multi-dimenstional array support
-- done 2) IErrorInfo
-- done 13) export VARIANT through the COM module
14) trap exceptions and errors
3) WithEvents
4) Documentation (internal and user) and howtos
5) IEnumVariant::All() which would be like IEnumVariant::Next(IDispatch::Count)
6) Look for memory leaks and AdRef/Release problems - I KNOW there are some...
7) Test component (goes with the docs)
8) Test suite (Needs test component)
9) reduce the need for VARIANT()
10) lets try if we are able to call non IDispatch - only Typelib components
-- done 11) IEnumVariant::Next() without parameter should only return an object, not an array with one element
-- done 12) VARIANT->value as lvalue
-- delayed till PHP5: 3) WithEvents
-- delayed till PHP5: 9) reduce the need for VARIANT()
ad 6.) check vbsample.php (new VARIANT(*, *|VT_BYREF)) GPs
ad 4.) faq (i've collected a few questions from various lists)
-- done 2) IErrorInfo
-- done 6) Look for memory leaks and AdRef/Release problems - I KNOW there are some...
-- done 11) IEnumVariant::Next() without parameter should only return an object, not an array with one element
-- done 12) VARIANT->value as lvalue
-- done 13) export VARIANT through the COM module
-- done 14) trap exceptions and errors
-- donne ad 4.) faq (i've collected a few questions from various lists)
variant attributes !!
to be discussed:
- dcom inporc issue
- mts support (getcontext)
- adsi support (ads* functions)
- winapi interface
- try serialisation support (if component implements IPersist)
-- delayed till PHP 5: try serialisation support (if component implements IPersist)
+1
View File
@@ -181,6 +181,7 @@ static pval php_VARIANT_get_property_handler(zend_property_reference *property_r
case OE_IS_OBJECT:
if (!strcmp(Z_STRVAL(overloaded_property->element), "value")) {
// var_arg can't be an idispatch, so we don't care for the implicit AddRef() call here
php_variant_to_pval(var_arg, &result, codepage TSRMLS_CC);
} else if (!strcmp(Z_STRVAL(overloaded_property->element), "type")) {
ZVAL_LONG(&result, V_VT(var_arg))
+14 -6
View File
@@ -19,20 +19,28 @@ typedef struct comval_ {
ITypeInfo *typeinfo;
IEnumVARIANT *enumvariant;
} i;
IDispatch *sinkdispatch;
GUID sinkid;
DWORD sinkcookie;
} comval;
END_EXTERN_C()
#define ZVAL_COM(z,o) { \
zval *handle; \
zval *handle = NULL; \
ZVAL_COM_EX(z,o,handle) \
}
#define ZVAL_COM_EX(z,o,handle) { \
HashTable *properties; \
\
ALLOC_HASHTABLE(properties); \
zend_hash_init(properties, 0, NULL, ZVAL_PTR_DTOR, 0); \
\
ALLOC_ZVAL(handle); \
INIT_PZVAL(handle); \
ZVAL_LONG(handle, zend_list_insert((o), IS_COM)); \
if (handle == NULL) { \
MAKE_STD_ZVAL(handle); \
} \
ZVAL_RESOURCE(handle, zend_list_insert((o), IS_COM)); \
\
zval_copy_ctor(handle); \
zend_hash_index_update(properties, 0, &handle, sizeof(zval *), NULL); \
@@ -43,10 +51,10 @@ END_EXTERN_C()
#define RETURN_COM(o) RETVAL_COM(o) \
return;
#define ALLOC_COM(z) (z) = (comval *) emalloc(sizeof(comval)); \
#define ALLOC_COM(z) (z) = (comval *) ecalloc(1, sizeof(comval)); \
C_REFCOUNT(z) = 0;
#define FREE_COM(z) efree(z);
#define FREE_COM(z) php_COM_destruct(z TSRMLS_CC);
#define IS_COM php_COM_get_le_comval()
Loaded 100 of 1357 files, more files were not shown because too many files have changed in this diff. Show more