Compare commits

..
1183 Commits
Author SHA1 Message Date
SVN Migration 9f5cbd22c8 This commit was manufactured by cvs2svn to create tag 'php_4_3_8'. 2004-07-13 13:15:36 +00:00
Ilia Alshanetsky ccfe4bf736 4.3.8 patches. 2004-07-13 13:15:35 +00:00
Derick Rethans aa72ed1ce7 - Fixed typo 2004-07-13 12:59:59 +00:00
Derick Rethans a64b0ae39d - Create a branch PHP_4_3_7 based on php 4.3.7 to form 4.3.8
- Updated version numbers in branch
2004-07-13 12:58:34 +00:00
SVN Migration 1bd95d5fd3 This commit was manufactured by cvs2svn to create branch 'PHP_4_3_7'. 2004-06-02 13:25:47 +00:00
Ilia Alshanetsky 2053bc60d2 Prepare for 4.3.7 release. 2004-06-02 13:25:45 +00:00
Ilia Alshanetsky 25f5ea0398 MFH: No need to NULL terminate manually, snprintf() does it for us already. 2004-06-01 21:05:33 +00:00
Ilia Alshanetsky 1618452e53 MFH: Fixed bug #28597 (xmlrpc_encode_request() incorrectly encodes chars in
200-210 range).
2004-06-01 20:16:18 +00:00
Andrei Zmievski 307eedeffe *** empty log message *** 2004-06-01 16:55:55 +00:00
Ard Biesheuvel aad180c93f #28569 2004-06-01 01:12:01 +00:00
Ard Biesheuvel b38423c7f6 MFH: Fixed bug #28569 (connection id is not thread safe) 2004-06-01 00:52:22 +00:00
Ilia Alshanetsky f62069244a MFH: Added missing argument check. 2004-05-31 21:01:38 +00:00
Pierre Joye 6aecc4c6d6 - Missing ';' 2004-05-31 20:59:57 +00:00
Ard Biesheuvel a8d2d22d9b Fix build 2004-05-31 08:33:43 +00:00
Ilia Alshanetsky 8f5c250266 MFH: Fixed memory leak on ifx_error(). 2004-05-30 18:58:49 +00:00
Ilia Alshanetsky 8ee3553aa4 MFH: Fixed bug #28564 (Problem building informix as a shared extension). 2004-05-30 17:57:37 +00:00
Brad House 12e1c89041 Manually check for egrep 2004-05-30 14:33:16 +00:00
Ilia Alshanetsky 40329bff38 MFH: Fixed bug #28311 (Transparency detection code is off by 1). 2004-05-28 13:47:26 +00:00
Stefan Esser b9d3aafe55 MFH 2004-05-28 13:38:19 +00:00
Stefan Esser 7966bb1186 MFH 2004-05-28 11:33:42 +00:00
Ilia Alshanetsky 5e2f6ea744 MFH: Turn off session.auto_start to prevent test failures. 2004-05-26 18:23:23 +00:00
Ilia Alshanetsky 354eff7e1e MFH: Prevent test failure when fi_FI locale is not available. 2004-05-26 18:18:19 +00:00
Ilia Alshanetsky 9a5f0ef61a Fixed test failure due to incorrect library check. 2004-05-26 18:08:32 +00:00
Wez Furlong df0d52bd78 Fix build 2004-05-26 12:29:56 +00:00
Derick Rethans baed8167d6 - MFH: Fixed bug #28523 (Typo in ext/sockets/sockets.c) 2004-05-26 06:54:00 +00:00
Stefan Esser 47b6b1e28a MFH 2004-05-25 22:13:10 +00:00
Brad House a063cc2956 PHP_SETUP_OPENSSL is NOT SNMP_SHARED_LIBADD, it's MCVE_SHARED_LIBADD
requires AC_PROG_EGREP when you phpize
2004-05-25 17:05:57 +00:00
Ilia Alshanetsky 5e5de1960f Back to dev. 2004-05-25 13:52:04 +00:00
Ilia Alshanetsky 893aee30e8 Prepare for 4.3.7RC1. 2004-05-25 13:02:53 +00:00
Pierre Joye 30b2af9511 - MFH: Fix #28506, negative angle returns "random arcs"
while (s < 0) s += 360 is used now
2004-05-24 20:03:08 +00:00
Ilia Alshanetsky 03edfa1677 MFH: Fixed bug #28508 (Do not make hypot() available if not supported by
libc).
2004-05-24 17:02:31 +00:00
Wez Furlong 1a9d759fc4 BFN 2004-05-23 11:05:17 +00:00
Wez Furlong b8a8640846 MFH: Bugfix for #23220: IIS messes up SSL shutdown 2004-05-23 10:43:15 +00:00
Stefan Esser e384ab1666 MFH. 2004-05-23 10:15:24 +00:00
Edin Kadribasic c50ef2e715 The other bit of MFH 2004-05-21 21:00:19 +00:00
Timm Friebe f17eff3a6c - MFH: Fixed bug #28354 2004-05-21 20:30:44 +00:00
Timm Friebe e7e54fccac - MFH: Fixed TSRM build 2004-05-21 19:39:01 +00:00
Derick Rethans 9c488ef4f2 - MFH: Fixed TSRM problem in latest commit. 2004-05-21 08:16:26 +00:00
Derick Rethans 5a3baf610b - MFH: Fixed bug #28456 (Problem with enclosed / in uploaded files). 2004-05-21 08:14:24 +00:00
Ilia Alshanetsky 9dd0472573 MFH: Fixed stream leak on error. 2004-05-20 23:38:05 +00:00
Ilia Alshanetsky 900eaa32f3 MFH: Free vars before calling E_ERROR. 2004-05-20 00:11:33 +00:00
Ilia Alshanetsky 8635889231 MFH: Fixed possible memory leak. 2004-05-18 23:27:03 +00:00
Ilia Alshanetsky c0cea96139 MFH: Fixed command line escaping routines for win32. 2004-05-18 13:43:33 +00:00
Edin Kadribasic 45fa60d315 MFH 2004-05-18 12:17:40 +00:00
Ilia Alshanetsky b7479f6c29 MFH: Correct output. 2004-05-17 20:59:07 +00:00
Derick Rethans 27c3401da5 - MFH: Document the smtp_post setting in php.ini* 2004-05-17 16:31:14 +00:00
Marcus Boerger 8761f766d4 MFH: Fix printf with floats 2004-05-16 21:20:30 +00:00
Timm Friebe 22214bc11e - MFH: Fixed auto-conversion from long to double when LONG_MAX /
LONG_MIN where overflown
2004-05-16 20:36:41 +00:00
Ilia Alshanetsky 5eaf82b6eb MFH: Do not allocate error buffer at the start of every request. 2004-05-16 15:34:56 +00:00
SVN Migration f93672da8e This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-05-16 14:48:46 +00:00
Ilia Alshanetsky 7be44d2b6d MFH: Added missing safe_mode & open_basedir checks. 2004-05-16 14:38:26 +00:00
Brad House e864dc5b13 update config.m4 for libmonetra 4.0 compatability.
Library no longer has MCVE_ symbols, the header file has #define\'s to
convert MCVE_ -> M_ to reflect the Monetra name change from MCVE.
More updates to follow.
2004-05-16 03:01:38 +00:00
Ilia Alshanetsky 41da69f20f MFH: Fixed possible memory leak inside popen(). 2004-05-14 16:12:06 +00:00
Ilia Alshanetsky 879cbe7961 MFH: Fixed bug #28386 (wordwrap() wraps lines 1 character too soon). 2004-05-13 17:44:33 +00:00
SVN Migration 739846a6a8 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-05-13 17:44:24 +00:00
Ilia Alshanetsky e5d7aef143 MFH: Make isapi more compatible with apache sapis as far as the creation
$_COOKIE super-global and various $_SERVER values.
2004-05-13 17:21:42 +00:00
Edin Kadribasic 47692de95f Make curl compile with the latest win32 libcurl 2004-05-13 16:54:45 +00:00
Ilia Alshanetsky 6be3e2d751 MFH: Skip session tests if session.save_path is not writable. 2004-05-13 12:53:49 +00:00
Ilia Alshanetsky e69edbeac2 MFH: Fixed various possible memory leaks. 2004-05-12 20:17:21 +00:00
Ilia Alshanetsky 86b31b56de MFH: Fixed bug #28374 (Possible unterminated loop inside
_php_pgsql_trim_message()).
2004-05-12 16:49:56 +00:00
Wez Furlong efb6da662d Avoid Bug #28363 by not seeking if we don't have a read buffer 2004-05-12 10:46:30 +00:00
Ilia Alshanetsky 7f8bbde609 MFH: Make vprintf() and printf() return the length of the string printed. 2004-05-11 19:51:50 +00:00
Ilia Alshanetsky 338de41cf9 MFH: Fixed bug #28355 (glob() does not return error on Linux when it does
not have permission to open the directory).
2004-05-11 13:34:31 +00:00
Ilia Alshanetsky 139deb5ddb MFH: Fixed crash inside cpdf_place_inline_image() when working with
truecolor images.
2004-05-10 22:13:39 +00:00
Marcus Boerger 6d859da0da MFH Decouple NAN and INF 2004-05-10 07:25:11 +00:00
Ilia Alshanetsky 8f242bb48b Added missing upgrade bit. 2004-05-10 02:19:22 +00:00
Marcus Boerger 7afbc02392 BFN 2004-05-10 02:12:17 +00:00
Marcus Boerger e3aa91d3f3 MFH Fix problems with c mode 2004-05-10 01:47:51 +00:00
Ilia Alshanetsky 8838b0f114 MFH: Fixed bug #28289 (incorrect resolving of relative paths by glob() in
windows).
2004-05-09 19:01:27 +00:00
Ilia Alshanetsky 349514ed2d MFH:
Upgrade bundled GD library to 2.0.23.
Fixed bug #28175 (build problem for people using FreeType 2.1.0-2.1.2).
2004-05-09 17:34:02 +00:00
Sara Golemon d676db7541 MFH: if statement logic would never eval to false. 2004-05-08 06:01:11 +00:00
Ard Biesheuvel b7c800e6fb MFH: fixed unregistered pointer juggling bug 2004-05-07 15:17:12 +00:00
Uwe Schindler ba9faa42a0 Security fix: Put '\0' string termination before loop 2004-05-03 12:22:54 +00:00
Stefan Esser 164703f306 MFH 2004-05-02 10:17:36 +00:00
Marcus Boerger a9d700c5c7 MFH Bugfix #28229 (PATCH run-tests tripped up by spaces in names) 2004-04-30 17:54:45 +00:00
Greg Beaver a750e94013 MFH fix included files and put error messages in PEAR_Downloader where they are needed 2004-04-30 16:37:41 +00:00
Ilia Alshanetsky bbf5e08fa3 MFH: Fixed bug #28228 (number_format() does not allow empty decimal
separator).
2004-04-30 13:26:06 +00:00
SVN Migration 1be1a0b472 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-04-30 13:26:02 +00:00
Greg Beaver 072961be7b MFH update to begin process for next release (release is not imminent) 2004-04-30 02:09:01 +00:00
Greg Beaver 9f7829fb47 MFH fix 1186: notice in PEAR_Common undeclared $_packageName 2004-04-30 02:05:47 +00:00
Ilia Alshanetsky 80dfa0ba37 MFH: Fixed bug #28196 (missing error constants in cURL extension). 2004-04-29 16:25:54 +00:00
Sara Golemon d1be87446b MFH Don't strip off those []s, it'll only create problems in wrappers and elsewhere. 2004-04-27 19:28:21 +00:00
Sara Golemon 4c9527044b MFH BugFix 28187 parse_url does not handle scheme://[0123:4567::89]:12345/etc style IPv6 embedded address URLs 2004-04-27 19:21:36 +00:00
Ilia Alshanetsky 7de0f803d1 MFH: Removed C++ style comments. 2004-04-27 17:34:05 +00:00
Ilia Alshanetsky 208a735a85 MFH: Fixed bug #28184 (C++ comments in GD library sources). 2004-04-27 14:59:25 +00:00
Derick Rethans 58466f957f - Fixed bug #28147 (Crash with drawing anti-aliased lines) 2004-04-25 19:43:30 +00:00
Derick Rethans 06fd453fb9 Reorder NEWS 2004-04-23 18:20:39 +00:00
Rasmus Lerdorf 2d9549455d bug #27810 from Joe Orton 2004-04-23 17:51:39 +00:00
Ilia Alshanetsky 7aa63c6209 MFH: Fixed bug #28087 (Do not force mysql.trace_mode to 0 on every request) 2004-04-23 17:04:36 +00:00
Marcus Boerger bc594f1506 BFN 2004-04-22 22:53:18 +00:00
Ilia Alshanetsky b5d2a4aa12 MFH: Fixed possible crash inside pg_copy_(to|from) function if delimiter is
more then 1 character long.
2004-04-22 00:32:07 +00:00
Ilia Alshanetsky a20b67c30f Correct news entry order. 2004-04-21 00:12:12 +00:00
Ilia Alshanetsky 1aad1b4291 MFH:
Fixed possible memory leaks.
	Prevent shm_attach() from destroying non-shm resources.
2004-04-21 00:11:30 +00:00
Frank M. Kromann 6fc504ce16 mssql related fixes 2004-04-20 23:54:20 +00:00
Frank M. Kromann b24de2d58a MFH: Fix #28007. Compile fails when the SHORT type is undefined (older versions of FreeTDS) 2004-04-20 23:37:26 +00:00
Frank M. Kromann 4c5521ad81 MFH: Fix problem getting return value from stored procedure when it returns multiple results 2004-04-20 23:31:39 +00:00
Wez Furlong 808dee23d7 news! 2004-04-19 13:37:43 +00:00
Wez Furlong 4c722bee9c MFH: timeout duration too long in liveness checks for sockets.
Fixes Bug #28055
2004-04-19 12:43:26 +00:00
Derick Rethans 19db79ff1d - Fix for bug #28042 (greek letters in html to entitity mapping not correct) 2004-04-17 23:07:27 +00:00
Uwe Schindler e3727d1061 MFH: set Sybase default APPNAME to ("PHP " PHP_VERSION) 2004-04-16 16:28:01 +00:00
Ilia Alshanetsky 43d81b700a MFH: Fixed test failure if session.use_trans_sid is enabled. 2004-04-15 13:37:58 +00:00
Ilia Alshanetsky a6ea6cc87c Fixed bug #27995 (imagefilltoborder() stops the fill process prematurely).
# Already in PHP5
2004-04-14 22:40:16 +00:00
Ilia Alshanetsky 9f6f2471f0 Back to dev. 2004-04-14 16:39:03 +00:00
Ilia Alshanetsky 90adf3ec54 Prepare for 4.3.6 2004-04-14 15:00:36 +00:00
Edin Kadribasic de83567151 News update 2004-04-14 14:51:24 +00:00
Ilia Alshanetsky c6af3e463a MFH: Fixed bug #27963 (Session lifetime setting may leak between requests). 2004-04-13 18:23:10 +00:00
Derick Rethans 09d9532952 - MFH: Add default fontpath for win98/xp 2004-04-12 21:43:19 +00:00
Greg Beaver 4e9e5c1913 re-organize as per PEAR-Core discussion 2004-04-09 07:43:52 +00:00
SVN Migration 9a9864a0e9 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-04-09 07:38:49 +00:00
foobar 065d0986aa fix typo 2004-04-08 23:56:45 +00:00
foobar 8a088529c9 PHP_ADD_LIBPATH checks that the path is not /usr/lib.. 2004-04-08 23:54:10 +00:00
Andi Gutmans 908f37b08b - News 2004-04-08 21:23:31 +00:00
Derick Rethans ea2fa14acb - Added missing CEST zone 2004-04-08 19:21:46 +00:00
Ilia Alshanetsky ebf7a4f847 Back to dev. 2004-04-08 19:15:13 +00:00
Ilia Alshanetsky 46d273a2b9 4.3.6RC3 2004-04-08 19:13:58 +00:00
Ilia Alshanetsky 4293672558 Prepare news file for release. 2004-04-08 12:42:29 +00:00
Ilia Alshanetsky f5865d02d0 Missing news entries. 2004-04-07 22:44:07 +00:00
Edin Kadribasic cf3d459815 Merged wrongly s/#ifdef/#if/ 2004-04-07 22:31:29 +00:00
Edin Kadribasic fcfe6ff818 MFH: Allow compilation with gdlib 1.8 2004-04-07 22:28:29 +00:00
Ilia Alshanetsky 88b30630b2 Removed test for a problem inside the GD library. 2004-04-07 20:52:44 +00:00
Adam Dickmeiss 9d4bd52adf Fixed bug #27803 (YAZ lib path) 2004-04-07 19:37:22 +00:00
foobar bf45f6d5ba MFH: Revert the patch to "fix" #27664 and added more informal error msg. 2004-04-07 13:56:48 +00:00
Greg Beaver 76c42836b2 developer -> lead for cellog 2004-04-07 00:29:46 +00:00
Greg Beaver fd4dea3500 MFH 2004-04-06 23:22:16 +00:00
Greg Beaver c1134d6bb9 change release date 2004-04-06 22:09:05 +00:00
Derick Rethans 9166d10260 - Update NEWS with fugbix. 2004-04-06 18:12:03 +00:00
Rob Richards fa843198d4 Fix Bug #27769 crash using domxml_xmltree 2004-04-06 17:56:11 +00:00
foobar e5a94e640e update credits 2004-04-06 10:10:41 +00:00
foobar 3a95b4b173 rtd 2004-04-06 09:38:27 +00:00
Ilia Alshanetsky 8a6f9ab5c0 Back to dev. 2004-04-05 15:43:52 +00:00
Ilia Alshanetsky 9a87c59f72 Prepare for 4.3.6RC2 2004-04-05 15:34:37 +00:00
Ilia Alshanetsky 831caad432 Restore wddx tests, without the troublesome date conversions. 2004-04-05 14:10:19 +00:00
Moriyoshi Koizumi 0ef09b9609 - MFH(r-1.49): Let it work safely 2004-04-04 19:23:43 +00:00
Moriyoshi Koizumi df1e5064e7 - Remove test, as it's never worked as expected. 2004-04-04 19:19:45 +00:00
Ilia Alshanetsky ad63c6c086 MFH: Fixed a bug that prevented building of the GD extension against
external GD lib 1.X.
2004-04-04 18:00:23 +00:00
Derick Rethans 8d802f10f0 - MFH: Fixed comment and double 0 2004-04-04 12:45:34 +00:00
Derick Rethans 6c192034a2 - MFH: One more test for DST bugs. 2004-04-04 12:43:17 +00:00
SVN Migration 3bab4824f0 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-04-04 12:42:14 +00:00
Marcus Boerger 951f80976b MFH: Add comment 2004-04-04 12:31:38 +00:00
Ard Biesheuvel 0e00c049c7 MFH: gcc-2.95/sparc test 2004-04-04 10:24:09 +00:00
Derick Rethans e85ca0efce - Fixed bug #27849 (configure craps out on trivial syntax error). 2004-04-03 17:23:14 +00:00
Greg Beaver 56c1fec8d8 MFH
fixed #534 for real (remove notice if state=stable doesn't exist, and use "none" for stable version number)
2004-04-03 15:56:11 +00:00
Ard Biesheuvel 4b1deca2e1 2nd try for glibc2.2/sparc64 2004-04-03 12:37:45 +00:00
Ard Biesheuvel c40ac6b268 Changed test to include returning HUGE_VAL as well (intended to resolve #27830) 2004-04-03 09:46:20 +00:00
Greg Beaver 8e07a4fd52 MFH
fix Bug #937 throwError() treats every call as static
fix Bug #964 PEAR_ERROR_EXCEPTION causes fatal error
2004-04-03 06:28:48 +00:00
Greg Beaver 5336ad6dbd MFH fix #534: pear search doesn't list unstable releases 2004-04-03 06:09:27 +00:00
Greg Beaver e1fa70df9a not devel any more 2004-04-03 00:42:14 +00:00
Ilia Alshanetsky 85923625fe Fixed bug #27730. 2004-04-02 16:54:44 +00:00
Derick Rethans de9e6e1f1b - Fixed unintialized variables. 2004-04-02 09:33:49 +00:00
Ilia Alshanetsky b145f87d40 MFH: Fixed reversed condition for error reporting. 2004-04-01 22:05:38 +00:00
Ilia Alshanetsky f579d02059 Back to dev. 2004-04-01 21:48:32 +00:00
Ilia Alshanetsky 2058fec25b Prepare for 4.3.6RC1. 2004-04-01 20:51:34 +00:00
Derick Rethans 6c63a9e153 - Fixed bug #27780 (strtotime(+1 xxx) returns a wrong date/time) 2004-04-01 20:35:41 +00:00
Ilia Alshanetsky 4de55b50dc Revert patch for bug #27782. 2004-04-01 19:07:02 +00:00
Ilia Alshanetsky bbdbfa8563 Bug fixing news & test for bug #27819. 2004-04-01 17:49:21 +00:00
Derick Rethans cc5e0df571 - MFH: Fixed bug #27822 (is_resource() returns TRUE for closed resources) 2004-04-01 08:56:33 +00:00
SVN Migration d528916296 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-04-01 08:54:45 +00:00
Ilia Alshanetsky 0cd7e11430 Bug fixing news. 2004-03-31 23:27:40 +00:00
Ilia Alshanetsky 772523e4a8 MFH: Fixed bug #27809 (ftp_systype returns null on some ftp servers). 2004-03-31 20:44:04 +00:00
Hartmut Holzgraefe 5f1a942add MFH 2004-03-31 17:59:28 +00:00
Ilia Alshanetsky ddbc35b39c MFH: Fixed bug #27802 (default number of children to 8 when
PHP_FCGI_CHILDREN is not defined).
2004-03-31 17:01:45 +00:00
Ard Biesheuvel ea3c36078c MFH 2004-03-31 10:31:43 +00:00
Ilia Alshanetsky 24e9c2b3ff MFH: Fixed bug #27782 (Wrong behaviour of next(), prev() and each()). 2004-03-30 19:09:10 +00:00
SVN Migration 6241abce94 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-03-30 19:08:44 +00:00
Frank M. Kromann 53b5689016 MFH: Fix for #27764. Get return value from a stored procedure not returning any result sets 2004-03-30 17:54:38 +00:00
Stanislav Malyshev 7eed89deb7 Disabled calling dtors on tsrm_shutdown - calling dtors in tsrm_shutdown makes
modules registering TSRM ids to crash, if they have dtors,
since the module is unloaded before tsrm_shutdown is called.
Can be re-enabled after tsrm_free_id is implemented.
2004-03-30 16:54:20 +00:00
Ilia Alshanetsky 06f91140fe Bug fixing news. 2004-03-30 13:43:53 +00:00
Wez Furlong 0825bb2386 Fix for Bug #27762: SCO Openserver doesn't have S_ISSOCK
Possible side effect from this is that CLI scripts run from inetd won't
realize that stdin/stdout are sockets.  But thats not our problem.
2004-03-30 11:04:32 +00:00
Marcus Boerger 64fe4952b6 MFH: NAN==NAN doest work (Ard) 2004-03-29 23:26:32 +00:00
Ilia Alshanetsky 96b2eaca0d MFH: Removed extra spaces that cause the test to fail. 2004-03-29 21:57:54 +00:00
Wez Furlong ffe1113b3d Fix for Bug #26757: session.save_path default is bogus for win32
Based on a patch found in the bug report.
Concept approved by Ilia.
2004-03-29 21:28:47 +00:00
Ilia Alshanetsky db9a8f2f5e Bug fixing news. 2004-03-29 19:35:19 +00:00
Marcus Boerger 6efb1b369c MFH: Found a NAN/INF solution that should be portable everywhere(?) 2004-03-29 19:03:59 +00:00
Frank M. Kromann 538a818db0 MFH: Fix for #27743. Make sure Money types are converted and returned correct 2004-03-29 18:33:13 +00:00
Ilia Alshanetsky 9934670186 MFH: Synchronized bundled GD library with GD 2.0.22. 2004-03-29 18:21:00 +00:00
Ilia Alshanetsky 89206cfca4 MFH: Fixed bug #27731 (error_reporting() inside @ block fails to set
error_reporting level).
2004-03-29 00:52:20 +00:00
Ilia Alshanetsky cb8e1f16ee Fixed build. 2004-03-29 00:27:17 +00:00
Ilia Alshanetsky 1af4d7724f Fixed bug #27732 (Fixed compilation bug inside php_sab_info.h). 2004-03-29 00:09:34 +00:00
Marcus Boerger 7e941eefe8 MFH: Improve portability (idea by Ard) 2004-03-28 21:50:01 +00:00
Rasmus Lerdorf 885e837b2a - Merge whitespace and trivial changes from HEAD back to the branch so the
diff between HEAD and PHP_4_3 only shows feature changes
- Fix test case for bug #27719 (TZ=EST means no DST so the test was wrong)
2004-03-28 14:57:32 +00:00
Marcus Boerger 6a3fc10b05 MFH: Add new #undef's 2004-03-27 01:53:18 +00:00
Marcus Boerger e96b4d55bd BFN 2004-03-27 01:48:04 +00:00
Marcus Boerger 5188dd875f Fixed bug #27687 (Bug Adding Default Charset to 'text/*' Content-Type Header 2004-03-27 01:45:44 +00:00
Marcus Boerger 6f431d5d6d MFH: Move defines to proper location 2004-03-27 01:41:46 +00:00
Marcus Boerger 4e78551db1 Touch after .c 2004-03-27 01:28:00 +00:00
Marcus Boerger 9de151b2ce BFN 2004-03-27 01:18:40 +00:00
Marcus Boerger 91786ab7a5 MFH: bugfix #27646 2004-03-27 01:17:07 +00:00
SVN Migration 0bf404dbeb This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-03-27 00:50:42 +00:00
Derick Rethans e566c744d1 - MFH: Fix for bug #27717. 2004-03-26 22:14:35 +00:00
Ard Biesheuvel a96a6a2b7f Alignment fix 2004-03-26 20:53:09 +00:00
Ard Biesheuvel f51237d726 MFH 2004-03-26 20:07:34 +00:00
Ard Biesheuvel b1061c7443 MFH: Calculate pow(long,long) in a way that works on 64-bit platforms 2004-03-26 20:01:53 +00:00
Derick Rethans 5d3a542a08 - COmmit the test, not the diff 2004-03-26 19:50:45 +00:00
Ilia Alshanetsky 20c0fb5e9c MFH: Fixed bug #27664 (--disable-cli doesn't force --without-pear). 2004-03-26 19:48:53 +00:00
Derick Rethans e89ac09125 - Add test for #27719 2004-03-26 19:44:18 +00:00
Rasmus Lerdorf 94728f7301 The 2am offset was a bad choice as this hour doesn't necessarily exist
on a DST switch.  So use 4am instead.  Fixes bug #27719
2004-03-26 19:29:31 +00:00
Ilia Alshanetsky e65f145d46 Bug fixing news. 2004-03-26 19:07:49 +00:00
Ilia Alshanetsky 2986565c79 MFH: Fixes to allow curl extension to compile against libcurl 7.11.1 2004-03-26 19:04:17 +00:00
Ilia Alshanetsky e2088baab4 Back to dev. 2004-03-25 14:14:21 +00:00
Ilia Alshanetsky 3263cdd42e Go with 4.3.5 2004-03-25 13:57:01 +00:00
Ilia Alshanetsky c6a2f0628d Prepare NEWS file for 4.3.5 release. 2004-03-23 19:53:27 +00:00
Frank M. Kromann 39dc110f91 MFH Fix for #26589. Crash when selecting many columns of type Money 2004-03-19 18:47:02 +00:00
Greg Beaver a3b179d916 MFH update to 1.3.1dev 2004-03-19 03:16:45 +00:00
Greg Beaver 84b6a9dfb3 MFH new PEAR_ErrorStack and tests 2004-03-19 00:55:53 +00:00
SVN Migration c6b98d3891 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-03-19 00:48:40 +00:00
Ilia Alshanetsky 8621923a5e Back to dev. 2004-03-18 18:02:42 +00:00
Ilia Alshanetsky c096e54196 Go for PHP 4.3.5RC4 2004-03-18 17:17:25 +00:00
Ilia Alshanetsky 663841fd31 MFH: Fixed bug #27633 (Incorrect EOL translation by ftp_get() in ASCII
mode).
2004-03-18 17:15:47 +00:00
Uwe Schindler 02ab9ce41d hint to raise stacksize (bug #27231) 2004-03-18 13:37:41 +00:00
Ard Biesheuvel 442c6c9c6f Added myself 2004-03-18 10:55:35 +00:00
Ilia Alshanetsky 5df1e69be1 MFH: Fixed bug #27300 (Improved regex for pg_convert()). 2004-03-18 01:35:50 +00:00
Pierre Joye f7226bcc2d - Add entry, crash in imagecolortransparent 2004-03-17 17:26:13 +00:00
Pierre Joye 0b9b69be38 - MFH (crash in imagecolortransparent with invalid color index) 2004-03-17 17:25:24 +00:00
Ilia Alshanetsky 5888fd4024 MFH: Fixed bug #27498 (bogus safe_mode error on nonexistent directories for
chdir() and opendir() functions).
2004-03-16 23:23:26 +00:00
Ilia Alshanetsky 1b2b9a6a0d MFH:
Fixed bug #27580 (pre-initialization errors in ap2 handler are not
	being written to vhost error log).
	Stop using depreciated and ignored APLOG_NOERRNO directive.
	Make file not found & directory as script invocation error messages
	more descriptive.
2004-03-16 22:38:17 +00:00
Stanislav Malyshev a207ace664 MFH registry fixes:
fix off-by-one in registry per-dir values
add IniFilePath value for setting php.ini path via registry
2004-03-16 18:27:55 +00:00
Stanislav Malyshev 38b637bdfc MFH: export session globals 2004-03-16 18:21:02 +00:00
Ilia Alshanetsky a96582f13b MFH: Fixed bug #27600 (GCC 3.0.4 does not like __attribute__ directive). 2004-03-16 16:38:00 +00:00
Ilia Alshanetsky 8cf790dea1 MFH: Fixed bug #27559 (Corrected open_basedir resolving logic). 2004-03-16 00:32:09 +00:00
Jay Smith e58b48e89c MFH: Fixed bug #27291 (get_browser matches browscap.ini patterns
incorrectly).
2004-03-15 21:27:01 +00:00
Frank M. Kromann 210d34a088 MFH: Fix for #27594. Comuted columns does not return a column source 2004-03-15 19:45:39 +00:00
Rasmus Lerdorf ed5a974ab0 Forgot to add NEWS entries for these 2004-03-15 18:20:16 +00:00
Jon Parise bb7f2e4210 MFH 1.243:
Fixed crash in php_ini_scanned_files() when no additional INI files were
actually parsed.
2004-03-15 16:39:53 +00:00
foobar 31b2848051 BFN 2004-03-15 16:07:57 +00:00
Zeev Suraski 5ebe7edcb3 Add misisng library path 2004-03-15 10:04:12 +00:00
Ilia Alshanetsky ed68bc6095 Bug fixing news. 2004-03-14 20:12:17 +00:00
Sascha Schumann 6a9e52543b Renaming cvsclean target -- IRIX make seems to ignore the .PHONY target. 2004-03-14 17:43:46 +00:00
foobar f1c31423d7 reorder 2004-03-14 10:45:51 +00:00
Pierre Joye 441dc97d75 - missing restoreAlphaBleding declaration 2004-03-14 00:46:45 +00:00
Pierre Joye 8378373527 - entry for fix #27582 2004-03-13 23:41:00 +00:00
Pierre Joye d76514d892 - MFH bug #27582 (imagefilltoborder crashes) 2004-03-13 23:36:29 +00:00
SVN Migration 2bbfddb533 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-03-13 23:22:57 +00:00
Greg Beaver 85e5585a1c oops 2004-03-13 18:29:29 +00:00
Greg Beaver e6840ed921 fix #1008: safe mode raises warning
fix register_argc_argv in pear.bat
2004-03-13 17:34:36 +00:00
Sara Golemon cb20f5cafe BFN 2004-03-12 21:49:01 +00:00
Ilia Alshanetsky a95a14cebf MFH: Add checks of return values from user callback functions. 2004-03-12 17:43:17 +00:00
Rasmus Lerdorf 8b9cc5ba81 MFH
getopt() doesn't work if variables_order does not include "S" because it
  only looks in $_SERVER for argv.  So, if we don't find argv in $_SERVER
  fall back to looking in the global symbol table where register_argc_argv
  would have put it.
2004-03-12 17:42:09 +00:00
Rasmus Lerdorf 259a07f733 Fix/workaround for http://bugs.php.net/27533 2004-03-12 17:27:55 +00:00
Ilia Alshanetsky a9674113d1 MFH: Fixed bug #22127 (Invalid response code when force-cgi-redirect safety
mechanism is triggered).
2004-03-12 14:07:14 +00:00
Sara Golemon 168786cfcf Test getaddrinfo() for brokenness. Pretend it doesn't exist if it misbehaves. 2004-03-12 00:16:38 +00:00
Sara Golemon 3f43cfbb6a BFN 2004-03-11 18:44:26 +00:00
Moriyoshi Koizumi 93578a5789 - MFH (r-1.212): Revert ini setting patch as I notified in... 2004-03-10 20:56:07 +00:00
Rasmus Lerdorf 89eaec22b5 Make curl_setopt($ch,CURLOPT_RETURNTRANSFER,0) reset the RETURNTRANSFER to
stdout as is implied in the documentation.  Currently it simply does
absolutely nothing and there is no way to reset it to stdout.
2004-03-09 17:06:53 +00:00
foobar a99c6916f3 test for bug #27457 2004-03-09 14:20:14 +00:00
SVN Migration 30c8d9b166 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-03-09 14:19:51 +00:00
foobar 5a6d9048e5 order 2004-03-09 12:52:08 +00:00
Ilia Alshanetsky 0e9275fb37 MFH: Fixed bug #27530 (broken http auth when safe_mode is on and PCRE is
disabled).
2004-03-09 02:24:20 +00:00
Ard Biesheuvel b08b041503 Possible fix for #27408 (wordsize/alignment issue) 2004-03-08 18:52:40 +00:00
Ilia Alshanetsky 9c340ef86f MFH: Fixed bug #27424 (headers missing on flush() in apache 2 SAPIs). 2004-03-08 03:16:13 +00:00
Marcus Boerger baf702a009 MFH: recognize db-4.2.x 2004-03-08 00:01:03 +00:00
Ilia Alshanetsky 65ab4040fc MFH: Fixed bug #27421 (mbstring.func_overload should be system ini setting) 2004-03-06 19:30:35 +00:00
Ilia Alshanetsky c3d0c735b8 MFH: Fixed bug #27460 (base64_decode() does not handle extra padding). 2004-03-06 19:06:12 +00:00
Ilia Alshanetsky 1a5342e468 MFH: Fixed bug #27505 (htmlentities() does not handle BIG5 correctly). 2004-03-06 18:35:53 +00:00
Ilia Alshanetsky eeaaaf7fce Fixed bug #27437 (wrong freetype include inside GD library). 2004-03-06 18:26:06 +00:00
Pierre Joye 5dd18df5eb - Add #27238 entry 2004-03-06 17:47:16 +00:00
Pierre Joye 6deb70d17d - MFH #27238 fix (ilia ok) 2004-03-06 17:41:31 +00:00
Sara Golemon 5babe27344 MFH: Don't rely on ANSI tmpfile(), use the streams layer instead, it'll deal with platform issues. 2004-03-04 22:29:23 +00:00
Christian Stocker ac4adcc2f7 MFH (fix a linefeed problem, if more than one configureoption) 2004-03-04 13:38:10 +00:00
Derick Rethans 46e793d8dc - MFH: Fixed bug #27443 (defined() returns wrong type). 2004-03-01 08:11:46 +00:00
SVN Migration cc2149097f This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-03-01 08:07:26 +00:00
Anil Madhavapeddy cdb852e21f MFH 'pear install -R' fix, ilia@ ok 2004-02-29 15:59:18 +00:00
Ilia Alshanetsky c18cbd0f35 MFH: Remove unused variable. 2004-02-28 22:59:03 +00:00
Ilia Alshanetsky 40fe027642 MFH: Memory allocation check. 2004-02-28 21:00:40 +00:00
Greg Beaver 2184a5a584 MFH 2004-02-27 02:27:12 +00:00
foobar b2f06ce507 Remove bogus test: see bug #20993 2004-02-26 01:07:32 +00:00
foobar 80553d8fc7 typofix 2004-02-26 00:13:02 +00:00
Ilia Alshanetsky 5b4eeb628c MFH: Handle situation where feof() occurs before the HTTP header is
retrieved.
2004-02-26 00:03:57 +00:00
Ilia Alshanetsky 2af0c3bbdf MFH:
Fixed bug #21760 (Use of uninitialized pointer inside php_read()).
	Fixed 3 possible crashes due to integer overflow or invalid user input
	inside the sockets extension.
2004-02-25 22:12:03 +00:00
foobar d4e86c36ed MFH: Test for bug #27395 2004-02-25 18:54:33 +00:00
SVN Migration fe4a118383 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-02-25 18:54:16 +00:00
foobar ada04f382d MFH: ZTS build fix 2004-02-25 13:20:31 +00:00
foobar e1505662ad MFH: Fixed bug #27384 (unpack() misbehaves with 1 char string). (GeorgeS) 2004-02-25 12:36:24 +00:00
Ilia Alshanetsky 3766f870d4 MFH: Fixed bug #27383 (Potential crash inside fopen_wrapper, while parsing
response code).
2004-02-24 21:53:57 +00:00
Christian Stocker e4c30e6b89 fix for bug 27349 "Invalid parsing of CDATA sections in XSL templates" 2004-02-24 14:26:27 +00:00
foobar 9543e9c111 MFH: - Fixed bug #26005 (Random "cannot change the session ini settings" errors). 2004-02-24 08:49:41 +00:00
Ilia Alshanetsky d0551c2a7c MFH: Fixed bug #27341 (HEAD requests fail to return data). 2004-02-23 19:50:47 +00:00
foobar 66df106383 MFH: fixed bug #27337 (missing sapi_shutdown()) 2004-02-23 19:15:05 +00:00
Christian Stocker 4c6e92bdb8 skip test, if no XSLT support is compiled in 2004-02-23 10:33:51 +00:00
Derick Rethans b2732089f2 - MFH: Fixed bug #27354 (Modulus operator crashes PHP). 2004-02-22 20:07:17 +00:00
SVN Migration 8e8f8ece29 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-02-22 20:04:31 +00:00
Ilia Alshanetsky 7275b5a177 MFH: wbmp conversion warning fix. 2004-02-22 18:03:24 +00:00
Sara Golemon 5f0305e605 MFH 2004-02-21 19:37:59 +00:00
Sara Golemon 2a0e69c111 MFH: long is not always 32-bit 2004-02-20 21:09:08 +00:00
Greg Beaver 74c2e50253 stupid oversight, no 4.2 dep 2004-02-20 17:17:04 +00:00
Pierre Joye cb915e0498 - Update to DB-1.6.0 2004-02-20 15:38:29 +00:00
SVN Migration 3379ffa7ed This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-02-20 15:36:25 +00:00
Pierre Joye 0053324a83 - 1.3b6=>1.3 stable, prepare stable release 2004-02-20 15:33:59 +00:00
Ilia Alshanetsky a0c001aa70 MFH: missing safe_mode & open_basedir checks. 2004-02-20 01:09:25 +00:00
Greg Beaver 7b6a710bd0 MFH 2004-02-19 15:55:37 +00:00
Ilia Alshanetsky 221d4b346b MFH: Fixed possible resource/memory leak. 2004-02-19 02:20:14 +00:00
foobar 1e60e670ba MFH: emalloc -> safe_emalloc 2004-02-19 02:13:39 +00:00
foobar fdec1ab00e MFH: improve error message 2004-02-19 01:54:44 +00:00
Ilia Alshanetsky 1aac6063a4 MFH: Fixed bug #27295 (memory leak inside sscanf()). 2004-02-18 19:49:17 +00:00
SVN Migration 0808ccd417 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-02-18 19:48:14 +00:00
foobar 61c00477b4 MFH 2004-02-18 00:01:05 +00:00
SVN Migration 9ea8c7ddd4 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-02-18 00:00:37 +00:00
Ilia Alshanetsky d6cc9d4f01 MFH: Fixed bug #27293 (two crashes inside image2wbmp()). 2004-02-17 21:30:57 +00:00
Ard Biesheuvel c07cd30cd0 Really disallow persistent connections if ini option is set 2004-02-17 20:57:26 +00:00
foobar c9af2f28e2 - Fixed bug #26753 (zend_fetch_list_dtor_id() does not check NULL strings). 2004-02-17 10:39:17 +00:00
foobar ea54e26972 MFH 2004-02-16 17:44:55 +00:00
foobar 0ac2170517 typofix :) 2004-02-16 17:42:22 +00:00
Ilia Alshanetsky bd6b53c1d8 MFH: Fixed bug #27278 (*printf() functions treat arguments as if passed by
reference).
2004-02-16 17:09:52 +00:00
foobar ca90ec2cac MFH 2004-02-16 16:51:23 +00:00
SVN Migration 91abce9917 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-02-16 16:50:54 +00:00
Sergey Kartashoff 4cc252ca16 - A fix to make UDM_LIMIT_DATE work was applied. Thanks to
d.rousseau at nnx.com
2004-02-16 16:40:27 +00:00
Ilia Alshanetsky 1ed5d89106 Back to dev. 2004-02-16 16:03:35 +00:00
Ilia Alshanetsky c262cf962c Go with RC3 2004-02-16 15:34:16 +00:00
Ilia Alshanetsky 8e510ef9b9 Bug fixing news. 2004-02-16 15:15:22 +00:00
Ilia Alshanetsky 1aaadf3ca3 MFH: Better gmp fix. 2004-02-16 15:13:49 +00:00
Derick Rethans ca98ed755c - Update news too 2004-02-16 14:29:31 +00:00
Derick Rethans 2fe16812bd - MFH: Fixed zero bytes memory allocation when no extra ini files are found in
the --with-config-file-scan-dir specified directory. (Eric Colinet, Derick)
2004-02-16 14:29:07 +00:00
Pierre Joye a300b68b08 - DB 1.6RC6 2004-02-15 23:07:30 +00:00
Pierre Joye b9d98f0098 - remove DB 1.6RC1 2004-02-15 23:06:56 +00:00
Ard Biesheuvel deb89ce2f4 CS/WS 2004-02-15 20:47:21 +00:00
Ard Biesheuvel 405101d10d MFH 2004-02-15 18:45:56 +00:00
Ard Biesheuvel bc11725188 MFH reverted fix for #26777 2004-02-15 18:43:46 +00:00
Ilia Alshanetsky 938e964beb MFH: Fixed bug #27258 (moved FPE check to correct location).
Fixed several possible FPE.
2004-02-15 17:23:11 +00:00
Timm Friebe 49118556bb - Fixed bug #26407 (Result set fetching broken around transactions) 2004-02-15 10:55:55 +00:00
Timm Friebe 47d30e40e4 - Changed initialization of function arguments to message handler
# Hopefully fixes bug #27157 (Compile Failure on Solaris 8), user does
# not know how to use patch and therefore couldn't verify this works.
2004-02-15 10:38:57 +00:00
Greg Beaver 4135978add re-add as binary 2004-02-14 20:30:31 +00:00
Greg Beaver 86bdf2b049 remove in order to re-add binary 2004-02-14 20:29:45 +00:00
Greg Beaver 1d6cca1b2f MFH 2004-02-14 20:29:10 +00:00
Ard Biesheuvel 1e12ed5e1a BFN 2004-02-13 10:51:02 +00:00
Ard Biesheuvel 6fe6810c8a Fixed bug #27235 (NUMERIC x.0 field returns empty string on 0)
CS/WS
# MFB not necessary, bug doesn't apply to HEAD
2004-02-13 10:43:24 +00:00
Stefan Esser 408c183013 MFH 2004-02-12 18:36:57 +00:00
SVN Migration cdb4683c30 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-02-12 14:09:54 +00:00
foobar 3a6eb48e1e BFN 2004-02-12 01:35:49 +00:00
foobar 2706fda4a6 MFH: ws fix 2004-02-12 01:32:40 +00:00
foobar fafe8a19b8 MFH: - Fixed bug #23467 (Showing incorrect Time Zone)
# patch by scottmacvicar at ntlworld dot com
2004-02-12 01:29:13 +00:00
Marcus Boerger 69eaab8aac MFH: Bug #27104 CLI/CGI SAPI module variable name conflict 2004-02-11 22:00:38 +00:00
Ilia Alshanetsky 6035439314 MFH: 'Touch' the file to make sure re2c is not needed. 2004-02-11 17:32:41 +00:00
Ilia Alshanetsky 79ed81e971 Fixed bug #27183 (userland stream wrapper segfaults on stream_write). 2004-02-11 17:09:09 +00:00
Ilia Alshanetsky ca53f68729 MFH: Fixed bug #26862 (ob_flush() followed by output_reset_rewrite_vars()
may result in data loss).
2004-02-11 17:00:56 +00:00
SVN Migration 2b66aa860f This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-02-11 17:00:49 +00:00
Ilia Alshanetsky 17cef37fd1 MFH: fixed a compilation error. 2004-02-11 16:53:03 +00:00
Ilia Alshanetsky fa2f1ac2a4 Back to dev tree (forgot to restore versions). 2004-02-11 16:49:24 +00:00
Ilia Alshanetsky a9e21b0a18 MFH: Win32 build fix. 2004-02-11 14:52:34 +00:00
Ilia Alshanetsky 353b838a13 MFH:
Fixed win32 build.
	Added missing headers needed for wait().
	Removed duplicate signal.h header.
2004-02-10 17:44:44 +00:00
Ilia Alshanetsky a68c033bf9 MFH: Fixed bug #26653 (open_basedir incorrectly resolved on win32). 2004-02-10 16:09:56 +00:00
foobar 8c7af900cf typos 2004-02-10 02:00:02 +00:00
Ilia Alshanetsky 8e46f4b273 MFH: Fixed bug #26758 (FastCGI exits immediately with status 255). 2004-02-10 00:30:03 +00:00
Ilia Alshanetsky 86337bac18 MFH: Fixed bug #27026 (Added cgi.nph that allows forcing of the Status: 200
header that is not normally needed).
2004-02-10 00:03:44 +00:00
Ilia Alshanetsky 125d5a2b73 MFH: Fixed bug #27196 (Missing content_length initialization in apache 2
sapis).
2004-02-09 23:28:48 +00:00
Frank M. Kromann de23ffbee3 Delay creation of exec handle til it's needed 2004-02-09 17:58:24 +00:00
Ilia Alshanetsky 6af73a9f5e MFH: Fixed bug #27172 (Possible floating point exception in gmp_powm()). 2004-02-09 04:28:07 +00:00
Ilia Alshanetsky df8c668559 Bug fixing news. 2004-02-09 04:08:25 +00:00
Ilia Alshanetsky c346be31a1 MFH: Fixed bug #27175 (tzset() is not being called by PHP on startup). 2004-02-09 04:05:56 +00:00
foobar a360d7d794 MFH: fixed bug #27171 2004-02-07 19:15:09 +00:00
Ilia Alshanetsky a9b6b75a02 MFH: Fixed possible memory leak with INI values. 2004-02-06 03:08:39 +00:00
Ilia Alshanetsky fa8c24ff7a MFH: Fixed bug #27135 (Possible crash inside mb_strlen()).
# Patch by Moriyoshi
2004-02-06 02:28:38 +00:00
foobar fb4f76e78d MFH: emalloc -> safe_emalloc 2004-02-05 12:19:32 +00:00
Antony Dovgal f261a8f571 MFH:
fix bug #27149
2004-02-05 08:30:17 +00:00
Ilia Alshanetsky 5bffdef46d MFH: Parse command line ini directives passed using -d before -i, to ensure
correct settings output.
2004-02-04 22:49:55 +00:00
Ilia Alshanetsky d48d599294 Go with RC2 2004-02-03 14:47:29 +00:00
Ilia Alshanetsky 2b637a2c03 RC2 news bit. 2004-02-03 14:46:32 +00:00
Ilia Alshanetsky e26531e7c3 MFH: Fixed possible overflow. 2004-02-03 14:44:17 +00:00
Antony Dovgal 55142148ad MFH (making oci8 able to compile with Oracle 10) 2004-02-03 14:22:34 +00:00
Andrey Hristov b9147e80a6 typo fix 2004-02-02 22:43:06 +00:00
Moriyoshi Koizumi 96338f74c5 MFH(r-1.153): POSIX / ISO compliancy.
# this commit is granted by Ilia.
2004-02-01 19:56:16 +00:00
Ilia Alshanetsky 0bf4ee95b6 MFH: Apache 2 portion of the fix for bug #25753. 2004-01-29 15:18:37 +00:00
Ilia Alshanetsky 697102558f Fix for a possible crash in fgetcsv(). (Patch by Moriyoshi Koizumi) 2004-01-29 14:35:34 +00:00
foobar e5a2da9811 typofix 2004-01-29 03:21:22 +00:00
Ilia Alshanetsky 1ca21fdf96 MFH: Fixed bug #27007 (missing connection closure when connect fails in
pgsql)
2004-01-29 02:55:33 +00:00
Ilia Alshanetsky 66fee7dd46 MFH: Fixed bug #27037 (fixed possible crash in apache2handler output code). 2004-01-29 02:18:17 +00:00
Sara Golemon f62beb8487 BFN 2004-01-29 00:11:41 +00:00
Sara Golemon 25d980f23c This should not have been an INI_ALL directive. 2004-01-29 00:09:26 +00:00
Ilia Alshanetsky 33d0cdb426 MFH: Fixed bug #27011 (64bit int/long confusion in preg_match*() functions) 2004-01-28 21:49:15 +00:00
foobar 99bcc186f6 BFN 2004-01-28 19:26:44 +00:00
Rasmus Lerdorf e596539840 If we have a text/html file with the executable bit set, we load up the
current ini, but if php's xbithack option is not set we forgot to restore
the previous ini settings potentially leaking ini settings from one request
to the next.  Closes bug #25753 and a few others.
2004-01-28 17:42:20 +00:00
Martin Kraemer 0a00d25a28 Bug fix: Images would be broken on big-endian machines because the putc
function wrote the first (instead of "the low order") byte. That resulted
in unexpected zero bytes.
2004-01-28 16:27:42 +00:00
Ilia Alshanetsky 6467ac57d6 Bug fixing news. 2004-01-28 01:43:59 +00:00
Ilia Alshanetsky dd4d0ba050 MFH: Fixed bug #27058 (crash in sybase_connect() with 2 arguments). 2004-01-28 01:43:55 +00:00
Ilia Alshanetsky 7afa3484c0 MFH: Fixed bug #27056 (ints used instead of longs inside some GD functions) 2004-01-28 01:38:15 +00:00
Marcus Boerger d525845531 still version 4 here 2004-01-27 01:24:17 +00:00
Marcus Boerger ce983dad77 Use RPM variables
# as discussed with ilia
2004-01-27 00:32:35 +00:00
Antony Dovgal 5e8bee0b4d MFH 2004-01-26 14:04:22 +00:00
Marcus Boerger 4e151b1c7d MFH 2004-01-26 08:38:38 +00:00
SVN Migration ca47777e5f This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-01-26 08:37:24 +00:00
Pierre Joye 0ffeb8f5cd MFH, I'm done 2004-01-26 01:37:13 +00:00
Pierre Joye 195dcc7eda - MFH 2004-01-26 01:34:03 +00:00
Pierre Joye c28909f9d9 MFH 2004-01-26 01:26:47 +00:00
Moriyoshi Koizumi 2667855bad BFN 2004-01-26 00:30:42 +00:00
Moriyoshi Koizumi 3887735c4c - MFH(r-1.3): Suppress a compiler warning by a rather useless typecasting. 2004-01-26 00:27:54 +00:00
Moriyoshi Koizumi 056bb1ad7c - MFH(r-1.2): Fix bug #26699 (mbstring doesn't identify "binary" as a valid encoding name) 2004-01-26 00:21:57 +00:00
foobar 50f57d6cbb MFH: - Fixed bug #27040 (passing an array of form-fields to CURLOPT_POSTFIELDS does not work). 2004-01-26 00:18:25 +00:00
Ilia Alshanetsky 074b68fe73 A better bug description, for people without the official Ilia decoder
ring.
2004-01-26 00:15:10 +00:00
Ilia Alshanetsky bb0973e294 bug fixing news. 2004-01-25 23:55:43 +00:00
Pierre Joye 223398e0fa MFH 2004-01-25 23:54:49 +00:00
Pierre Joye aef84ceb00 MFH 2004-01-25 23:42:43 +00:00
Pierre Joye 55f2a16d01 - 2004 (c) 2004-01-25 23:35:02 +00:00
Pierre Joye 65fa341a3e - year++; 2004-01-25 23:20:01 +00:00
Pierre Joye 643b271bea - wassup... really add Mail-1.1.2 2004-01-25 23:04:55 +00:00
Pierre Joye 3b61fc5389 - Update: HTTP-1.2.2 Mail-1.1.2 DB-1.6.0RC1 2004-01-25 23:00:11 +00:00
Pierre Joye 8a67145847 - Prepare 4.3.5, remove old archives 2004-01-25 22:58:50 +00:00
Ilia Alshanetsky cef2c74845 sybase_ct extension fixes and improvements by Timm Friebe. 2004-01-25 20:43:32 +00:00
Timm Friebe 202500193d - MFH 2004-01-25 20:14:05 +00:00
foobar 6505875c9a MFH: typofix 2004-01-23 07:02:54 +00:00
foobar c49fdf4dd8 Nuke unused variable 2004-01-22 03:25:37 +00:00
foobar ed53d131ea MFH 2004-01-21 22:50:32 +00:00
SVN Migration 8bb1db38f8 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-01-21 22:48:29 +00:00
Ard Biesheuvel 29f088a033 Fixed bug #26968 (Segfault with Interbase module built as shared) 2004-01-21 10:12:17 +00:00
Marcus Boerger a081107225 Add these files to the actual package 2004-01-21 07:19:07 +00:00
Marcus Boerger d16b06c185 Make this thing actually work again
# look at changelog
# pdf shouldn't be a default extension in this script it's seldom available
2004-01-21 06:58:04 +00:00
foobar c1b09a29f2 MFH 2004-01-21 05:04:50 +00:00
foobar 7b25877fec MFH: - Fixed bug #26973 (*printf() + modifier broken) 2004-01-21 04:00:47 +00:00
foobar 27959e82ec MFH 2004-01-21 03:59:05 +00:00
foobar c74a480546 MFH 2004-01-21 03:49:26 +00:00
SVN Migration 935ed0d844 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-01-21 03:49:16 +00:00
Ilia Alshanetsky bfc284dfb5 MFH: Fixed bug #26974 (rename() doesn't check the destination file against
safe_mode/open_basedir).
2004-01-21 02:33:22 +00:00
Antony Dovgal 92deeac732 fix savelob() to make it possible to write data at the beginning of LOB 2004-01-20 11:37:17 +00:00
foobar 6e22b67233 MFH: Fixed bug #26969 (shared openssl build fails) 2004-01-20 01:11:40 +00:00
Marcus Boerger 31f10bc418 Correct license 2004-01-19 19:58:57 +00:00
Marcus Boerger 331b6605c3 Fix a memleak 2004-01-19 19:57:17 +00:00
foobar e902399d15 - Fixed bug #26381 (rand() without srand() doesn't work with certain php.ini)
# This was no prob in PHP5, some memory corruption / leaks, whatever fixed
# in ZE2 but not in ZE1?
2004-01-19 19:07:08 +00:00
Ilia Alshanetsky 90583839db Bug fixing news. 2004-01-19 18:42:07 +00:00
Ilia Alshanetsky bdfe271088 MFH: Fixed bug #26967 (make various file operations return FALSE on error). 2004-01-19 18:40:45 +00:00
foobar fe2eb8697f BFN 2004-01-19 17:45:26 +00:00
Moriyoshi Koizumi d8d8abeee8 - MFH(r-1.3): Turn off mbstring.func_overload as this test uses plain strlen()
for comparison.
2004-01-19 16:54:22 +00:00
Ilia Alshanetsky 5207463590 MFH: Added fgetcsv() tests. 2004-01-19 03:55:44 +00:00
SVN Migration fc6aba5bea This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-01-19 03:55:30 +00:00
foobar f22177b7e4 MFH: Moved php_srand() call into php_rand(). 2004-01-19 03:16:04 +00:00
foobar 633a7470d1 MFH: - Fixed bug #26949 (rand(min,max) always returns min when ZTS enabled) 2004-01-19 02:31:19 +00:00
Ilia Alshanetsky 17d0b30415 Corrections for various fgetcsv() issues. 2004-01-18 18:46:32 +00:00
foobar 12d27576f3 MFH: Fixed bug #26923 (ext/imap: pam and crypt libraries missing when build as shared) 2004-01-17 00:01:06 +00:00
foobar 0b74da4a4a MFH: - Fixed bug #26937 (Warning in xml.c) 2004-01-16 19:12:46 +00:00
Ilia Alshanetsky 09f6f3244b Added Antony Dovgal as OCI8 maintainer. 2004-01-16 16:46:59 +00:00
foobar 5f19e3c747 BFN 2004-01-16 11:27:00 +00:00
Ilia Alshanetsky 936b7e8e82 MFH: Fixed Bug #26927 (preg_quote() does not escape \0). 2004-01-16 02:31:26 +00:00
SVN Migration 41904eb4b2 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-01-16 02:29:51 +00:00
Marcus Boerger baa7c1746e Add missing fd creation 2004-01-15 21:28:37 +00:00
Antony Dovgal f9ee999b71 MFH: fix bug #26892 2004-01-15 15:14:41 +00:00
foobar 28686f683f Fix overflow 2004-01-15 06:09:43 +00:00
Ilia Alshanetsky fea2f6e689 MFH: Fixed bug #26909 (crash in imap_mime_header_decode() when no encoding is
used).
2004-01-15 00:36:09 +00:00
Wez Furlong cbc8c32567 Probable fix for:
Bug #25575 stream_set_blocking with STDIN doesnt block
2004-01-14 14:54:14 +00:00
Wez Furlong 70e26f8ebc Fixed bug #26772 (fgets returns NULL instead of FALSE). (Wez) 2004-01-14 14:31:27 +00:00
Ilia Alshanetsky a6dcd940b5 MFH: Fixed bug #26878 (problem with multiple references to the same variable
with different types).
2004-01-13 23:31:46 +00:00
SVN Migration a8202c83d3 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-01-13 23:11:32 +00:00
foobar a5952e9c8b BFN 2004-01-13 19:00:17 +00:00
foobar 4da78a716c MFH: - Fixed bug #26896 (ext/ftp does not work as shared extension) 2004-01-13 18:59:08 +00:00
Derick Rethans e41bc6906c - Fixed year in version notices 2004-01-13 09:13:44 +00:00
Ilia Alshanetsky 1f0fe33edb Back to dev. 2004-01-12 15:10:17 +00:00
Ilia Alshanetsky 422dfcaf3e Set release date. 2004-01-12 14:31:27 +00:00
Ilia Alshanetsky 0f7556a1b8 Go with 4.3.5RC1 2004-01-12 14:30:23 +00:00
Ilia Alshanetsky bea9ba8fc2 MFH: Fixed bug #26864 (pg_(update|delete) ignore PGSQL_DML_EXEC option). 2004-01-11 21:18:29 +00:00
foobar 3b61552cd7 MFH: test for bug #26869 2004-01-11 14:00:07 +00:00
SVN Migration 77e02d2e30 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-01-11 13:59:49 +00:00
Ilia Alshanetsky 9058adacc8 MFH: Fixed bug #26847 (memory leak in mail() when to/subject contain only
spaces).
2004-01-09 01:35:58 +00:00
foobar ab99e92450 MFH: Added missing constants (bug #26831) 2004-01-08 01:02:03 +00:00
foobar b539f500fc BFN 2004-01-07 23:51:10 +00:00
Ard Biesheuvel a85cfe5b14 MFH: Let DB handle NULL params, fixes bug #26777 2004-01-07 09:44:21 +00:00
Ilia Alshanetsky f7aef14323 MFH: 64 bit stuff. 2004-01-06 00:56:10 +00:00
Georg Richter 8ea0a2c1c8 s/2003/2004 :) 2004-01-05 14:42:26 +00:00
Ilia Alshanetsky 7f529a8361 Fixed compile warnings.
Fixed crash in crack_closedict();
Switched from zend_error() to php_error_docref();
2004-01-04 20:01:07 +00:00
Edin Kadribasic 9a0060e27c BFN 2004-01-03 23:33:01 +00:00
Edin Kadribasic 90f72e11bf More proper news format. 2004-01-03 21:45:47 +00:00
Edin Kadribasic c0d963299a MFH: cli overrides php.ini and switches output buffering off. 2004-01-03 21:36:18 +00:00
Ilia Alshanetsky cc6dd2f296 MFH: s/then/than/ 2004-01-03 00:50:01 +00:00
Ilia Alshanetsky 1fc017d8a3 MFH: Fixed bug #26752 (Silent unterminated loop when length parameter for
fgets(), fread() and fgetss() is 0).
2004-01-02 00:58:15 +00:00
Derick Rethans aa288c1f7a - MFH: Fixed bug #26751 (PHP can't find the MySQL socket on a case sensitive
file system).
2003-12-31 11:28:39 +00:00
Ilia Alshanetsky f899afbfca Boundry check. 2003-12-28 19:31:48 +00:00
Marcus Boerger f9279a6b81 Fixed Bug #25329 sqlite_create_function with method and reference to $this 2003-12-27 22:20:55 +00:00
Ilia Alshanetsky 3cee600ed8 GD news 2003-12-25 22:33:50 +00:00
Ilia Alshanetsky a0c6c4f59f MFH: Synchronized bundled GD library with GD 2.0.17 2003-12-25 22:33:03 +00:00
Ilia Alshanetsky f2307f1623 Bug fixing news. 2003-12-25 18:58:30 +00:00
Ilia Alshanetsky e03bd905ad MFH: Fixed Bug #26703 (Certain characters inside strings incorrectly
treated as keywords).
2003-12-25 18:57:30 +00:00
SVN Migration 03db21ee2c This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-12-25 18:57:27 +00:00
Ilia Alshanetsky 9235a5d001 MFH: Fixed bug #26707 (Incorrect error for disabled functions/classes).
# Direct MFH of the patch in PHP 5.0 cannot be used because that would
# require the change of API. So we'll need to make do with a one time
# (small) memory leak on startup when disable_functions and/or classes are
# used.
2003-12-24 16:43:23 +00:00
Ilia Alshanetsky 2a7a76c93e MFH: Make test work with PostgreSQL 7.4 2003-12-23 17:33:16 +00:00
Marcus Boerger 1fe64c5ffb Add inifile handler in windows build too. 2003-12-23 13:42:12 +00:00
Moriyoshi Koizumi eb74b414a8 Oops. 2003-12-23 11:06:42 +00:00
Moriyoshi Koizumi 0fa2ebc0f2 Fix fgetcsv()'s null line handling.
# Thanks Takeshi Nakamura for reporting this bug.
2003-12-23 11:02:26 +00:00
Ilia Alshanetsky 160852eaf0 Fixed memory leak. 2003-12-22 21:03:54 +00:00
Rob Richards 338a796166 define LIBXML_THREAD_ENABLED 2003-12-22 16:51:50 +00:00
Ilia Alshanetsky ba634aacd4 MFH: Define INADDR_NONE for systems that don't have it (apparently solaris) 2003-12-22 16:00:54 +00:00
Ilia Alshanetsky 437a1e90c9 MFH: Missing bit for bug #26625. 2003-12-22 15:56:52 +00:00
Wez Furlong c8dbe95e7a Fix Bug #25597 pfsockopen crashes when recycling a persistent list entry. 2003-12-20 20:24:36 +00:00
Antony Dovgal f8fa606849 add .cvsignore to oci8/tests 2003-12-19 17:02:03 +00:00
Antony Dovgal 60cd2d0604 add test 2003-12-19 17:01:24 +00:00
Pierre Joye 9349ad79ff - MFH 1.3b5 release tag 2003-12-19 13:55:45 +00:00
Ilia Alshanetsky 6aeafbd611 MFH: Check correction 2003-12-19 13:50:01 +00:00
Ilia Alshanetsky 4f3b9cd691 MFH: Fixed bug #26667 (Added safety checks to ip2long()). 2003-12-19 13:33:57 +00:00
Moriyoshi Koizumi 348078406d MFH(r-1.206): Fixed bug #26639 (mb_convert_variables() clutters variables beyond the references) 2003-12-18 09:52:51 +00:00
SVN Migration f9bc86556e This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-12-18 09:50:21 +00:00
foobar d7d8388543 wet 2003-12-17 21:10:23 +00:00
Marcus Boerger 7e950b6a31 MFH: Fix warning 2003-12-17 09:08:37 +00:00
Marcus Boerger 98dc115fab MFH: Fix warnings 2003-12-17 09:02:07 +00:00
Andrei Zmievski 1c9c0f592c Umm, let's not enable NO_RECURSE by default. The matches on some
patterns can be more than twice as slow as before.
# Maybe we should add a --disable-pcre-stack-recursion compile option
2003-12-16 22:14:55 +00:00
Andrei Zmievski bf93051fff Fix function name. 2003-12-16 21:55:22 +00:00
Andrei Zmievski fc3db427b2 - Upgraded library to version 4.5
- Define NO_RECURSE to avoid stack problems.
- Moved contents of RINIT hook to MINIT and removed RINIT.
- Removed a couple of extraneous files.
2003-12-16 21:52:14 +00:00
Marcus Boerger f3543b425f MFH: Fix winbuild 2003-12-16 21:41:57 +00:00
foobar 6741fc0883 MFH: fix compile warnings 2003-12-16 21:00:36 +00:00
Derick Rethans cf2b96f84b - MFH memleak fix from rev 1.50 2003-12-16 19:59:58 +00:00
Sara Golemon 49e7c1eb7a MFH: Fail loudly. This is too often reported as a "bug". 2003-12-16 19:45:35 +00:00
Ilia Alshanetsky 1018001888 ZTS fix. 2003-12-16 17:23:27 +00:00
Ilia Alshanetsky 4d2cdc8224 MFH: Fixed Bug #26625 (pg_convert sets NULL incorrectly for character data
types).
2003-12-16 01:00:45 +00:00
Ilia Alshanetsky 4ae82d2189 MFH: Fixed bug #26635 (fixed look up for fonts in the current directory
w/ZTS)
2003-12-15 20:34:57 +00:00
Andrei Zmievski 0e6a306e68 *** empty log message *** 2003-12-15 19:35:34 +00:00
Ilia Alshanetsky a4935ca741 Fixed bug #26634 & added test case. 2003-12-15 18:53:26 +00:00
foobar 162fb6f465 BFN 2003-12-15 01:18:46 +00:00
foobar f72080cb48 MFH: Fix from Michael Sisolak (destructors weren't always properly called) 2003-12-15 01:14:54 +00:00
Marcus Boerger e0eaa22d19 BFN 2003-12-14 22:20:55 +00:00
Marcus Boerger 046da9b906 MFH: Synch (as far as possible) and fix #26304 2003-12-14 22:20:05 +00:00
Christian Stocker 3d3d33c018 fix for bug #26595 "`XSLT_NAMESPACE' undeclared" 2003-12-13 11:36:14 +00:00
Ilia Alshanetsky 76a19ecdf8 More fgetcsv() fixes. 2003-12-13 01:44:24 +00:00
Ilia Alshanetsky 09d6b582ae For BC reasons we need to do ltrim() on csv entries. 2003-12-12 19:25:33 +00:00
Ilia Alshanetsky e61a8d577c MFH: Fixed bug #26604 (Apache2 SAPIs implicitly disable Keep-Alive). (Ilia) 2003-12-12 17:19:18 +00:00
Uwe Schindler 8c0e3568a9 remove revision tag from module version entry 2003-12-12 16:21:44 +00:00
foobar cdbfc6a8fb MFH: Fixed bug #26461 (-lssl missing from LIBS) 2003-12-12 05:20:24 +00:00
foobar 5a7f4ada80 generated, ignored files should not be in CVS.. 2003-12-12 05:05:34 +00:00
Greg Beaver bf7636d282 MFH 2003-12-12 00:04:17 +00:00
Greg Beaver 9973b97212 fix error message, it shouldn't attempt to display a version if none is installed 2003-12-11 23:55:03 +00:00
Greg Beaver e5b8ff2641 remove obsolete parameters to constructor 2003-12-11 23:54:39 +00:00
Greg Beaver 6d227b5775 MFH 2003-12-11 23:46:55 +00:00
foobar d5a0cf3575 reword 2003-12-11 23:14:55 +00:00
Andrei Zmievski 30f6668c7d Implement getopt2() method and keep BC for getopt(). 2003-12-11 19:28:25 +00:00
Greg Beaver 5f32f2e6a1 MFH fix #391, PHP 5 reference fix 2003-12-11 16:08:19 +00:00
Edin Kadribasic aade4a6069 Mention new pgsql libs 2003-12-11 12:58:17 +00:00
Edin Kadribasic 45b85c504b Standard header file locations 2003-12-11 10:06:39 +00:00
Edin Kadribasic 2d5754d69f Nuke unused local vars 2003-12-11 10:06:12 +00:00
Moriyoshi Koizumi 10b70c23ae This file is automagically generated in the custom build process on win32. 2003-12-11 08:40:30 +00:00
Moriyoshi Koizumi 1ceef81ac8 Eliminate compiler warnings. 2003-12-10 17:44:12 +00:00
Moriyoshi Koizumi f26881fdc0 Eliminate compiler warnings. 2003-12-10 17:36:05 +00:00
Moriyoshi Koizumi 2f7e889009 DOS line endings... 2003-12-10 17:26:24 +00:00
Moriyoshi Koizumi 6119dad1ec Fix win32 build. 2003-12-10 17:25:40 +00:00
Moriyoshi Koizumi a450efff4e MFH(1.4): Remove leftover 2003-12-10 17:10:05 +00:00
foobar ceda30930a MFH: Fixed bug #26565 (strtotime("this month") resolving to the wrong month) 2003-12-10 14:09:44 +00:00
Pierre Joye 1729d3ca75 - Fix pecl installer
package::info() _must_ be called with PECL in mind
  There should be other issues, more later.
2003-12-09 20:51:49 +00:00
foobar 4115b9aa6c MFH: Fixed bug #26564 (ncurses5 has headers in PREFIX/include/ncurses/) 2003-12-09 20:33:22 +00:00
Ard Biesheuvel 1303e186e5 Fix build 2003-12-08 10:01:11 +00:00
Ard Biesheuvel 7ba00c2563 Corrected ibase_close() fix 2003-12-08 09:46:07 +00:00
Sergey Kartashoff 112bc3df71 - A bug in Udm_Hash32 function was fixed. 2003-12-08 08:24:59 +00:00
Moriyoshi Koizumi 318fc44c8a MFH(r-1.45): Avoid using non-portable test syntax. 2003-12-08 07:18:46 +00:00
Moriyoshi Koizumi 6771367c95 Those casts are really necessary.
# Heads up; please be careful using is*() functions. The function of that kind
# takes an integer value as its argument and expects the value to be range of
# 0-255 as a parameter. So if you pass a plain char value to it, the char
# value will be converted implicitly to an integer value of the range
# -128 ~ 127, which will end up with an unwanted result, most likely with
# non-ASCII characters. This has been considered to be a big flaw in the
# specification of the ctype functions. However, the malfunction is not
# reproducible with the recent versions of the GNU C library because it is
# made to deal with such exceptional cases, while Microsoft's C library
# and several standard C libraries of BSD origin aren't.
#
# See also bug #10896, #12127, #18318, and #21689.
#
2003-12-07 21:55:16 +00:00
foobar 7999d1a384 BFN 2003-12-07 17:02:26 +00:00
foobar 82321ff0d4 MFH: Fix for bug #26548: Malformed HTTP dates in headers 2003-12-07 16:53:30 +00:00
Stanislav Malyshev da74ef221f fix potential buffer overrun 2003-12-07 12:57:26 +00:00
Greg Beaver 2c28506fcf MFH 2003-12-07 00:31:50 +00:00
Greg Beaver 592380ac7c MFH last 2 commits 2003-12-07 00:11:45 +00:00
Greg Beaver a4c86a50bb MFH 2003-12-06 23:52:44 +00:00
Greg Beaver d28971a2b6 MFH 2003-12-06 23:44:23 +00:00
Greg Beaver 9b225deeb2 MFH 2003-12-06 22:19:53 +00:00
Greg Beaver 3f5a393d9c MFH 2003-12-06 22:14:49 +00:00
Greg Beaver 2361a14e0f MFH 2003-12-06 22:08:58 +00:00
Ilia Alshanetsky 5d7f648f83 Fixed memory corruption occuring in fgetcsv() on certain files. 2003-12-06 22:07:00 +00:00
Greg Beaver f766cea8af MFH 2003-12-06 21:54:06 +00:00
Greg Beaver 6cdf895b62 getting ready for both packages to be released 2003-12-06 21:47:54 +00:00
Marcus Boerger 60661a012b Update error/warning messages 2003-12-06 21:28:07 +00:00
Marcus Boerger b93038396e MFH: Do not dynamically load the extension in skipif 2003-12-06 20:46:48 +00:00
foobar 12defebcf0 No maintainer for oci8 / oracle 2003-12-06 16:28:19 +00:00
SVN Migration 8e0820820a This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-12-06 06:06:51 +00:00
Andrei Zmievski 087326527e Remove erroneous array_shift(). The args passed to Getopt are supposed
to be without leading command name anyway. This has been the rule since
the first release.
2003-12-05 21:57:01 +00:00
Rob Richards 5061d1ca32 Fix bug #26531: get_elements_by_tag_name() wildcard fails 2003-12-05 19:21:05 +00:00
Moriyoshi Koizumi 7f504d30ea MFH 2003-12-04 22:53:38 +00:00
Moriyoshi Koizumi 0479203e55 MFH: it'd be a bad idea to make subpackages dependent on the php build system. 2003-12-04 22:50:54 +00:00
foobar ee840f1ff6 MFH: Only add 'install-modules' into install targets when there are such
modules to install
2003-12-04 15:59:04 +00:00
foobar 580d5e80b5 MFH: Fix for "make install" with empty INSTALL_IT 2003-12-04 13:42:25 +00:00
foobar 8c4361d2f1 MFH: Fix compile with c++ (bug #26519) 2003-12-04 12:45:32 +00:00
Uwe Schindler c6e131f9a4 Fix bug #25916: get_browser() -> PHP Fatal error: Nesting level too deep - recursive dependency? 2003-12-04 08:56:07 +00:00
foobar 83bec74173 BFN 2003-12-04 06:37:14 +00:00
Ilia Alshanetsky a1f00c0bae MFH: Typo fix. 2003-12-04 00:14:50 +00:00
Ilia Alshanetsky ed54147a4b MFH: Test case for bug #24773. 2003-12-03 23:00:36 +00:00
Ilia Alshanetsky e4b49f2de7 MFH: Remove unnecessary casts. 2003-12-03 22:51:54 +00:00
Moriyoshi Koizumi b8cd29330d MFH(r-1.71): Possible fix for bug #26391 (parse_url() destroys strings
that contain a character in range of 0x80-0xff)
# I couldn't reproduce it with Panther though.
2003-12-03 20:59:12 +00:00
Moriyoshi Koizumi a4d189ed94 BFN 2003-12-03 19:33:25 +00:00
Rob Richards 53d0e56f42 require libxml 2.5.11 for threaded error handling
certain cases crash unlocking libxml mutex with earlier versions
2003-12-03 12:30:02 +00:00
Frank M. Kromann 37871089e1 set freed pointer to null to avoid reuse 2003-12-02 18:37:50 +00:00
Rob Richards 396074e1cc Fix bug 26443: No errror reporting for Errors in the domxml extension 2003-12-02 15:09:31 +00:00
Ilia Alshanetsky da55f714a9 MFH: Optimize substr_replace 2003-12-01 23:21:25 +00:00
foobar 8d025a62fb MFH: ws fixes 2003-12-01 16:40:59 +00:00
foobar 74540e51a7 MFH: - Fixed bug #26488 (Missing declaration of CRTSCTS in ext/dio/dio.c) 2003-12-01 16:38:23 +00:00
Rob Richards 1592b88645 Fix bug #26443: No errror reporting for Errors in the domxml extension 2003-12-01 16:19:15 +00:00
foobar 9dfae5b28d MFH 2003-12-01 16:12:42 +00:00
foobar bdf9ed31c0 MFH 2003-12-01 14:01:49 +00:00
Greg Beaver cd5ef04293 MFH: bugfixes 2003-12-01 00:21:21 +00:00
foobar 67674a77c7 BFN 2003-11-30 09:39:48 +00:00
Wez Furlong 8633a4fb0e Fix:
#26467 flock does not force wouldblock argument to be passed by reference
Thanks to Manuel Lemos
2003-11-29 20:48:49 +00:00
Ilia Alshanetsky 7efed1c11d Bug fixing news. 2003-11-29 19:06:45 +00:00
Ilia Alshanetsky e0f235787c MFH: Fixed bug #26463 (Incorrect handling of semicolons after heredoc) 2003-11-29 19:05:59 +00:00
SVN Migration ac05068dd2 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-11-29 19:05:15 +00:00
Ilia Alshanetsky ee1077aad0 MFH: Fixed a memory leak when tokenizing scripts with heredoc. 2003-11-29 18:22:46 +00:00
Greg Beaver 6c22098068 add dependency on xml extension - we need it for every installation/package function 2003-11-29 17:54:39 +00:00
Greg Beaver de3937a88f MFH Bug #324 2003-11-29 16:39:31 +00:00
foobar 5f4df19833 MFH: - fixed Bug #26462 (phpize + ext/bcmath -> compile error) 2003-11-29 13:35:33 +00:00
foobar cfeec1e72b BFN 2003-11-29 12:10:14 +00:00
foobar c77e4951c5 - Fixed bug #26447 (--with-openssl=shared causes compile errors).NEWS 2003-11-29 12:08:03 +00:00
Wez Furlong 5f0729c281 fix zts build... 2003-11-29 12:02:40 +00:00
foobar 1525e15d4f MFH 2003-11-29 07:16:16 +00:00
Ilia Alshanetsky 4c86e3b2bf Bug fixing news & corrections. 2003-11-29 04:50:03 +00:00
Ilia Alshanetsky 680dd335bc Added missing skip conditon. 2003-11-29 04:47:40 +00:00
Ilia Alshanetsky 575bd9e537 MFH: Fixed bug #26458 (var_dump(), var_export(), debug_zval_dump() not
binary safe for array keys).
2003-11-29 04:43:11 +00:00
SVN Migration f8fed9d571 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-11-29 04:43:07 +00:00
Sara Golemon 6aa5175259 MFH 2003-11-29 03:41:09 +00:00
foobar fe4e7d7b43 MFH 2003-11-29 02:29:05 +00:00
SVN Migration 188d80b7cf This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-11-29 02:28:50 +00:00
Christian Stocker 04a57e2f54 add xml files for bug26384.phpt 2003-11-29 00:53:34 +00:00
Christian Stocker 68d477c66a enhanced bug-26384-fix. It now only does an DocCopy, if xsl:key was
found in xslt-document by default.
2003-11-29 00:43:38 +00:00
Wez Furlong 5fd7263f01 Probable fix for #25575; STDIN/STDOUT/STDERR streams not registered
as network sockets when PHP run from x?inetd.
2003-11-28 22:48:31 +00:00
Wez Furlong f93c6a6a13 Fix for bug #25939; feof not working correctly for sockets.
Possibly also fixes #23220; warnings issued by fgets on ssl sockets.
2003-11-28 22:11:34 +00:00
Greg Beaver c878f2708e odd merge conflict fixed 2003-11-28 20:07:14 +00:00
Ilia Alshanetsky c16bbec898 Fixed bug #26440 (MFH missing context options). 2003-11-28 18:51:14 +00:00
Ilia Alshanetsky 91f0d18894 MFH: More memory leak fixes for stream contexts. 2003-11-28 18:33:18 +00:00
Ilia Alshanetsky ead22712c9 Bug fixing news. 2003-11-28 18:15:23 +00:00
Rob Richards 405fcde229 Fix for bug #26446: domxml_open_file() returns an empty error-Array 2003-11-28 17:39:25 +00:00
Wez Furlong e1823b67c2 MFH: Fix for Bug #25664; calling ITypeInfo::Invoke with bogus params. 2003-11-28 17:14:12 +00:00
Ilia Alshanetsky 37f824c02a MFH: Fixed a memory leak. 2003-11-28 00:00:34 +00:00
foobar b3f36ce142 BFN 2003-11-27 23:18:13 +00:00
foobar ed1af8a375 MFH: - Fixed bug #26438 (error in thttpd SAPI installation) 2003-11-27 23:04:49 +00:00
Ilia Alshanetsky 19d34e9304 MFH: Removed dead code.
# This fixes memory corruption reported by valgrind.
2003-11-27 01:08:51 +00:00
Greg Beaver 6f718d420d MFH Bug #293 2003-11-26 15:11:19 +00:00
Ard Biesheuvel a844072181 Fix crash bug reported by jani/ilia 2003-11-26 14:04:56 +00:00
foobar 3a09eb44cf MFH: On error do not leave content_type_dup unitialized. 2003-11-26 00:33:48 +00:00
Ilia Alshanetsky 67ba3f4c30 MFH: Fixed bug #25963 (PostgreSQL error message include \n characters). 2003-11-25 22:23:54 +00:00
Ilia Alshanetsky bbbf8effb4 Replace fopen() inside domxml_xslt_process() with streams code to prevent
a possible crash and enforce safe_mode & open_basedir restrictions.

Revert workaround for bug #26384, which is due to a bug in libxslt.
Christian will commit a better workaround shortly.
2003-11-25 16:05:18 +00:00
foobar 16f65cff5b MFH: for regression..this works in PHP 4 2003-11-25 09:22:09 +00:00
SVN Migration d20c4bc95a This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-11-25 09:20:57 +00:00
foobar 34c2d8f7a2 MFH: - Fixed bug #26376 (typo in ext/odbc/config.m4: DBMaker test fails) 2003-11-25 08:08:30 +00:00
Ilia Alshanetsky bbd07ddfff Fixed bug #26384 (crash inside domxslt->process() due to a double free). 2003-11-25 02:19:47 +00:00
foobar 3f5a2f35e6 MFH: Fix build for other archs than x86. 2003-11-24 16:10:17 +00:00
Ilia Alshanetsky 5354a79497 MFH: Fixed bug #26355 (flock() doesn't initialize the wouldblock argument) 2003-11-24 01:43:59 +00:00
Rob Richards 27298684b2 fix default recovery mode 2003-11-22 14:43:08 +00:00
Moriyoshi Koizumi d038c0e046 BFN 2003-11-22 13:40:39 +00:00
Moriyoshi Koizumi d95ee6d92a MFH(r-1.98): Fixed bug #26194 (iconv() not properly defined with libiconv). 2003-11-22 13:38:46 +00:00
Rasmus Lerdorf d3e82a6876 Compile fix 2003-11-22 00:55:29 +00:00
Hartmut Holzgraefe a8e94dd8c3 removed ext/standard/tests/time/bug26320.phpt 2003-11-19 16:44:50 +00:00
Hartmut Holzgraefe c3b2390ea8 MFH 2003-11-19 16:40:01 +00:00
SVN Migration 90957978ab This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-11-19 16:37:51 +00:00
Hartmut Holzgraefe 06659b28ba MFH 2003-11-19 16:22:10 +00:00
SVN Migration 894f2c9be2 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-11-19 16:19:29 +00:00
Ilia Alshanetsky c85bca1758 MFH: Fixed bug #26309 (Fixed argument parsing for imageftbbox()). 2003-11-19 15:50:05 +00:00
Ilia Alshanetsky 12b32d871f MFH: Fixed bug #26285 (escapeshellarg() uses wrong quotes on windows). 2003-11-19 15:34:36 +00:00
foobar 02ca709afd MFH: - Fixed bug #26267 (gmp_random() leaks memory and does not produce random numbers) 2003-11-19 04:44:24 +00:00
foobar 4ffec49140 Fix build 2003-11-19 00:10:03 +00:00
foobar 460d1dfaeb MFH: fixed parameters for gmp_random() 2003-11-18 10:28:34 +00:00
Ilia Alshanetsky 5e6d8ed2d1 MFH: Fixed Bug #25694 (round() and number_format() give inconsistent
results).
2003-11-18 02:50:50 +00:00
SVN Migration 79c6c1efbe This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-11-18 02:50:42 +00:00
Frank M. Kromann ffa0515b59 Fix for bug #25817
Check for a return value from a stored procedure right after fetching rows
2003-11-17 20:53:28 +00:00
foobar 69796efc37 MFH: - Fixed bug #26253 (ext/tokenizer: build as shared extension fails) 2003-11-17 19:32:05 +00:00
Greg Beaver d6541cb740 MFH 2003-11-17 06:07:44 +00:00
Greg Beaver f0b9f4beca fix bug #248 MFH 2003-11-17 05:57:40 +00:00
Greg Beaver 7765e06ef7 fix bug #249 MFH 2003-11-17 05:47:51 +00:00
Frank M. Kromann 6e105b5751 MFH Fix win32 compilation. 2003-11-15 05:44:02 +00:00
Ard Biesheuvel 52e0410d8e Fix the fix [ibase_trans()] 2003-11-14 10:38:41 +00:00
Moriyoshi Koizumi c30dfcbd20 MFH(r-1.10): ctime (#10) may differ on several filesystems. 2003-11-14 09:01:47 +00:00
foobar 176f804d75 MFH 2003-11-14 03:21:15 +00:00
Ilia Alshanetsky 7d60c49e0e MFH: Fixed bug #26235 (yp_first/yp_next do not specify correct key length). 2003-11-14 00:32:40 +00:00
Marcus Boerger c4871a7329 MFH: Proto fixes (Friedhelm Betz <holliwell|gmx.net>) 2003-11-13 19:09:24 +00:00
foobar 0d260304dc MFH 2003-11-13 14:18:02 +00:00
Marcus Boerger 61a601cb12 BFN 2003-11-13 09:00:48 +00:00
Marcus Boerger 26d3d83a4d MFH Bugfix #25794: Cannot open existing hash db3 file with write 2003-11-13 08:59:17 +00:00
Marcus Boerger 6d124bfc5e BFN 2003-11-12 22:58:00 +00:00
Marcus Boerger 10a18840da MFH Bugfix #26216: ("getimagesize(): stream does not support seeking" when
using remote files)
2003-11-12 22:56:09 +00:00
Stefan Esser e58611c0c7 Fix odd increments to repair the boundary checks. 2003-11-12 22:34:34 +00:00
Sergey Kartashoff d71244b42b - A WORDINFO calculation in mnogosearch extension was fixed 2003-11-12 07:52:57 +00:00
Ilia Alshanetsky c26e78f88a Fixed bug #26201 (crash in ibase_trans() on invalid link handle). 2003-11-12 03:05:24 +00:00
Ilia Alshanetsky b5fb634af4 MFH: Fixed bug #26198 (strtotime() handling of M/F Y date format). 2003-11-12 02:58:38 +00:00
SVN Migration 5bc3f3656a This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-11-12 02:55:04 +00:00
Rui Hirokawa 13a5ff7119 fixed compilation warning. (patched by Joe Orton) 2003-11-11 22:18:24 +00:00
Ilia Alshanetsky 8d9bd14c18 MFH: Compiler warning fix (patch by Joe Orton). 2003-11-11 20:04:19 +00:00
Moriyoshi Koizumi c47c73519e MFH(r-1.204): Compiler warning fix (patch by Joe Orton). 2003-11-11 19:57:48 +00:00
Ilia Alshanetsky 174f14c76b Fixed bug #26168 (shtool availability check in phpize). 2003-11-10 04:33:57 +00:00
Ilia Alshanetsky bafccc7dbf MFH: Fixed bug #26176 (Fixed handling of numeric keys in INI files). 2003-11-10 04:12:50 +00:00
Derick Rethans 7b1f6c319e - Expose the base64 functions to external extensions on windows. 2003-11-09 20:30:15 +00:00
Sergey Kartashoff a5a3d7b657 - Mnogosearch extension wsa updated to include mnogosearch-3.2.16 features. 2003-11-08 14:39:15 +00:00
Marcus Boerger 10b71e08e1 MFH (#26056: Warnings while compiling exif.c) 2003-11-08 14:16:14 +00:00
Moriyoshi Koizumi 869f61fcf8 touch 2003-11-08 04:45:18 +00:00
Wez Furlong fa90d82b27 Fix shared/pecl build for extensions that rely on mbstring... 2003-11-08 01:09:11 +00:00
Frank M. Kromann c3fd539306 Reverting. New features are not supposed to go into the 4.3 branch 2003-11-08 00:33:58 +00:00
Ilia Alshanetsky eae45bec5c Fixed bug #26003 (Make fgetcsv() binary safe). (Ilia) 2003-11-07 21:40:47 +00:00
Ilia Alshanetsky 812f7748a6 Bug fixing news. 2003-11-06 20:34:57 +00:00
Frank M. Kromann 58a2f7d6a9 Getting rid of c++ style comments 2003-11-06 16:49:53 +00:00
Rui Hirokawa 2dabb19a5a bug fixed: name parameter of multipart form was not converted into internal encoding when mbstring.encoding_translation is on. 2003-11-06 15:41:37 +00:00
Sascha Schumann e08feebfd5 WS 2003-11-06 14:31:14 +00:00
Sascha Schumann aa359d95e3 Fix a format string
Nuke a sprintf (slooow)

And embed the charset as part of the hashed details (persistent conn key),
because the function otherwise happily returns incompatible connections.
(e.g. US7ASCII vs. UTF8; the client-side charset is not alterable once a
 connection has been established.)
2003-11-06 14:27:34 +00:00
Frank M. Kromann 02b56d1709 Adding new features from ming 0.3a. 2003-11-06 07:29:02 +00:00
Uwe Schindler 202d0cb224 remove unix crap 2003-11-05 08:32:34 +00:00
Sascha Schumann 7aa8ca5e6f Forgot to add that.. 2003-11-05 08:05:31 +00:00
Moriyoshi Koizumi 95e990757d BFN 2003-11-05 04:32:15 +00:00
Moriyoshi Koizumi 9e1dd60032 Fixed bug #26128 (mbstring prints out wrong information on phpinfo()) 2003-11-05 04:28:00 +00:00
Moriyoshi Koizumi e2cce3325b *** empty log message *** 2003-11-05 04:24:54 +00:00
Ilia Alshanetsky 40ffe5ed82 MFH: Fixed bug #26113 (remove leftover local file when ftp_get/ftp_nb_get
fails).
2003-11-04 20:56:56 +00:00
Ilia Alshanetsky 5958582185 Bug fixing news. 2003-11-04 20:40:31 +00:00
foobar b564d1f137 BFN 2003-11-04 13:23:44 +00:00
Uwe Schindler b828a3c43c SunONE servers 2003-11-04 09:02:01 +00:00
foobar bd5b1ff74f MFH: - limit writing of field data to field len + 1
This fixed many memory overrun errors which appeared
       in several scripts when writing a record.

by: Uwe Steinmann <steinm@php.net>
2003-11-04 06:09:19 +00:00
foobar e246ca1ef6 MFH: Possible fix for bug #26103 2003-11-04 05:15:55 +00:00
SVN Migration b6752a1393 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-11-04 05:15:20 +00:00
Ilia Alshanetsky 00203d2968 MFH: Fixed bug #26097 (gdImageColorClosestAlpha() returns incorrect
results).
2003-11-04 01:56:07 +00:00
Ilia Alshanetsky 038e99660f Bug fixing news 2003-11-04 01:40:22 +00:00
Ilia Alshanetsky ed5212ca70 MFH: Fixed bug #25581 (getimagesize () return incorrect values on bitmap
(os2) files).
2003-11-04 01:38:33 +00:00
Ilia Alshanetsky 7dc3d8bd0e MFH: Fixed bug #26042 (memory leak if mcrypt_generic_deinit() is not called
after every mcrypt_generic_init() call).
2003-11-04 01:32:40 +00:00
foobar 701b075782 cosmetics 2003-11-03 23:16:28 +00:00
Edin Kadribasic 0fff37b01a Fix tsrm build 2003-11-02 23:14:18 +00:00
Ilia Alshanetsky 3af4920403 back to dev. 2003-11-02 23:12:02 +00:00
Ilia Alshanetsky d6bb1fd35a Go with 4.3.4 2003-11-02 22:15:05 +00:00
Ilia Alshanetsky 94f7723659 Prepare NEWS file for 4.3.4 release. 2003-11-02 21:56:26 +00:00
Uwe Schindler 571ca7f26e this is not needed 2003-11-01 23:56:58 +00:00
Sascha Schumann 3d08aea7da not really adequate here 2003-11-01 22:34:02 +00:00
Uwe Schindler 4c9381c538 news update 2003-11-01 12:50:48 +00:00
Greg Beaver bc087095be ack 2003-11-01 05:18:55 +00:00
Greg Beaver 61e6878898 might as well, someone will try it someday 2003-11-01 05:17:40 +00:00
Greg Beaver 43209b4bf6 rework some odd code 2003-11-01 05:16:04 +00:00
Greg Beaver ca763cac46 PATH_SEPARATOR is very handy 2003-11-01 05:14:11 +00:00
Greg Beaver 43cf3d6f66 MFH all fixes found by unit tests 2003-11-01 05:07:55 +00:00
Uwe Schindler 005dfa3c04 MFH 2003-10-31 17:32:04 +00:00
Uwe Schindler 112c1def73 Send correct default content type from php.ini not static text/html (important for other charsets than iso-8859-1) 2003-10-31 12:17:43 +00:00
Greg Beaver 9c1611188c MFH #171 2003-10-31 04:55:00 +00:00
foobar 1406239f9a Fix "bug" #26039 2003-10-31 01:28:11 +00:00
Uwe Schindler 0958e5a5cb Fix ZTS build #2 2003-10-30 01:05:25 +00:00
Moriyoshi Koizumi ac0a394ffa A bit pickier about platform. 2003-10-29 21:58:33 +00:00
Moriyoshi Koizumi d80b742e44 BFN 2003-10-29 21:56:16 +00:00
Moriyoshi Koizumi 227088c36b MFH(r-1.131): This check's always necessary. 2003-10-29 21:51:22 +00:00
Moriyoshi Koizumi 09529af3b0 A possible fix for bug #26026.
# Actually a revisit of the patch on 1.112, mysteriously backed out on 1.119.
2003-10-29 18:46:40 +00:00
Frank M. Kromann e8a8dac741 Adding missing TSRMLS_CC to fix zts build 2003-10-29 17:37:10 +00:00
Ilia Alshanetsky 0bf7c7781c Back to dev. 2003-10-29 14:03:29 +00:00
Ilia Alshanetsky f03caa7b35 Go with RC3 release. 2003-10-29 13:18:12 +00:00
Frank M. Kromann 84eb811be9 Fix typo in parameter 2003-10-29 05:34:21 +00:00
foobar 86da4546de MFH 2003-10-28 15:24:16 +00:00
Moriyoshi Koizumi 9006d8e97b Remove test because the problem won't be fixed for 4.x releases. 2003-10-27 18:14:04 +00:00
Moriyoshi Koizumi e189a15dbf Fix VPATH build (patch by Joe Orton <jorton at redhat dot com>) 2003-10-27 17:50:07 +00:00
Moriyoshi Koizumi 88ccac85f3 No need to have ze2 specific tests in this branch. 2003-10-26 16:27:40 +00:00
Moriyoshi Koizumi f22b3a19cf Prevent leaks in the overload extension that occur in some special cases. 2003-10-26 16:10:07 +00:00
Rui Hirokawa 78f795af80 revert my previous patch. 2003-10-26 07:47:42 +00:00
Moriyoshi Koizumi 4b18e8086a Remove just unnecessary leftovers 2003-10-26 03:42:27 +00:00
Moriyoshi Koizumi 73b34fff94 Backport some patch already in HEAD to assure backwards compatibility 2003-10-26 03:41:19 +00:00
Rui Hirokawa dc04255655 fixed windows build. 2003-10-25 12:41:54 +00:00
Rui Hirokawa c254e0f3ee mbfilter is replaced with libmbfl to maintain the licence compatibility. mbregex.[ch] is moved to mbregex/ for the same reason. 2003-10-25 11:58:46 +00:00
Rui Hirokawa dca5128c58 name/value in multipart/form-date will be converted into internal encoding when mbstring.encoding_translation is On. 2003-10-25 10:30:51 +00:00
Moriyoshi Koizumi 64ee4a850e Add test case for bug #25831 2003-10-25 04:43:47 +00:00
foobar 8ff5296643 hrm 2003-10-24 22:44:41 +00:00
Ilia Alshanetsky 9a24af562c MFH: Fixed bug #25955 (Compile failure on MacOSX 10.3 (Panther)). 2003-10-24 17:51:03 +00:00
Greg Beaver e943420bbb MFH 2003-10-24 05:35:42 +00:00
Greg Beaver 4608fd6e3f MFH #25174 2003-10-24 05:34:16 +00:00
Ilia Alshanetsky 370a9e6266 News & test regarding bug #25922 2003-10-22 23:48:48 +00:00
SVN Migration 59835d886b This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-10-22 23:42:56 +00:00
Moriyoshi Koizumi 17a411d422 typo 2003-10-21 02:22:55 +00:00
Moriyoshi Koizumi 393dfba684 Add regression test for bug #25900 2003-10-21 02:21:29 +00:00
Ilia Alshanetsky 6d369a51c8 Back to dev. 2003-10-20 16:58:56 +00:00
Moriyoshi Koizumi 9decf616c9 MFH(r-1.4): Fix typo 2003-10-20 16:10:00 +00:00
Ilia Alshanetsky f4d96cee48 RC2 is a go. 2003-10-20 16:08:17 +00:00
Tomas V.V.Cox afd5493707 MFH for 4.3.4RC2 2003-10-20 15:51:46 +00:00
Ilia Alshanetsky 7df5e203c6 Bug fixing news. 2003-10-20 15:45:56 +00:00
Rob Richards 36478058f4 Fix bug #25900 (document->get_elements_by_tag_name with default xmlns) 2003-10-20 15:43:02 +00:00
Moriyoshi Koizumi fe871be5ca MFH(r-1.108): Fix compiler warnings 2003-10-20 15:42:10 +00:00
Ilia Alshanetsky 25679a60c7 MFH: Fixed bug #25918 (Possible crash in mime_content_type()). 2003-10-20 14:37:02 +00:00
Ilia Alshanetsky afd9e80cb1 MFH: Fixed bug #25923 (mail() modifies the to & subject arguments). 2003-10-20 14:22:10 +00:00
Ilia Alshanetsky 2361e1e342 MFH: Fixed bug #25895 (Incorrect detection of safe_mode limited ini options) 2003-10-20 01:59:48 +00:00
Wez Furlong e41125d052 chech -> check 2003-10-18 09:44:12 +00:00
Uwe Schindler 5be79b203b new SunONE server 2003-10-17 21:57:45 +00:00
Rob Richards 9c4b602ee2 Fix bug #25888 (Crash of php.exe when xpath_eval of a namespace)
memleak fix in domxml_node_name
keep blanks loading document fix
2003-10-17 15:56:06 +00:00
Sascha Schumann 27879d0f0d Fix comment 2003-10-17 11:09:49 +00:00
Ilia Alshanetsky 800b1765ae MFH: Fixed formatting issues (patch by: Joe Orton) 2003-10-17 02:21:37 +00:00
foobar 0e93bfdbc3 - Fixed the real reason for build problems: dos eols 2003-10-16 14:24:59 +00:00
foobar 7b7543afad - Fixed ZTS build (Nuked extra TSRMLS_FETCH) 2003-10-16 09:08:42 +00:00
foobar 4bd822a180 - config.w32.h is in main/ not ext/standard.. 2003-10-16 04:50:03 +00:00
Ilia Alshanetsky 35e0567b62 MFH: Do not strip trailing spaces. 2003-10-16 04:24:13 +00:00
Ilia Alshanetsky 4191d2bde1 MFH: Fixed bug #25777 (Do not rtrim() of text fields fetched from mssql). 2003-10-15 03:32:18 +00:00
Wez Furlong ef14bdb691 Don't forget to check for tzset... 2003-10-15 00:19:30 +00:00
Wez Furlong 69cfb62619 Fix bug #25825. tzset() was not called when resetting the TZ env var.
In addition, fix a slight error (made by sniper!) which would trigger
tzset() to be called for any env var beginning with TZ, and not just
TZ itself.
2003-10-15 00:14:37 +00:00
Sascha Schumann adfb56c304 Embed date of last modification 2003-10-14 08:11:18 +00:00
Ilia Alshanetsky f335d5447e MFH: Fixed bug #25836 (last key of multi-dimensional array passed via GPC
not being escaped when magic_quotes_gpc is on).
2003-10-14 03:48:09 +00:00
Wez Furlong ef89c82c02 Unintialized variable fix from Joe Orton. 2003-10-13 11:47:05 +00:00
Wez Furlong 4c28ca442f Fix uninitialized value.
Patch from Joe Orton.
2003-10-13 11:42:22 +00:00
Derick Rethans 3a63f098bd - Email address change 2003-10-13 09:30:53 +00:00
Ilia Alshanetsky c0ddfe89e2 MFH: Fixed bug #25800 (parse_url() could not parse urls with empty port). 2003-10-13 04:28:34 +00:00
Ilia Alshanetsky da62e960e2 MFH: Remove sendmail patch check. 2003-10-13 04:15:25 +00:00
foobar d0d3b02de7 BFN 2003-10-12 23:49:34 +00:00
Vlad Krupin 2ce3e8cdec MFH fix for 25558 in case there is ever another 4.3 release. 2003-10-12 01:09:28 +00:00
Ilia Alshanetsky 2a1bfae434 Fixed bug #25814 (Make flock() return correct value when 3rd argument is
used).

# This bug is 4.3.X specific, no need to MFB into 5.X tree.
2003-10-10 01:38:02 +00:00
Ilia Alshanetsky ac534dbf37 MFH: Fixed bug #25746 (Do not bail out when unable to chdir original dir on
systems with broken getcwd()).
2003-10-09 02:59:03 +00:00
Wez Furlong 2aeb246874 Don't forget these EOF flags either... 2003-10-08 11:22:47 +00:00
foobar 18a2f7bab4 - Reverted the 'fix' for bug #25494
# Can we now get peace on internals@ about this stupid issue?
2003-10-08 11:16:22 +00:00
Wez Furlong 8b2def80d0 Backport from HEAD; set EOF marker after each read attempt to avoid it
being stuck in the on position.
Partial "fix" for #25649.
2003-10-08 10:58:28 +00:00
foobar f0ae93e466 - Fixed bug #25780 (MFH: ext/session: invalid session.cookie_lifetime causes crash in win32). 2003-10-08 10:25:39 +00:00
Moriyoshi Koizumi 21616c7854 MFH(r-1.174): Better fix for bug #25758 2003-10-08 01:52:07 +00:00
Ilia Alshanetsky 116956cc64 MFH: Fixed bug #25758 (var_export does not escape ' & \ inside array keys) 2003-10-08 01:17:12 +00:00
SVN Migration 2dd02323c0 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-10-08 01:16:45 +00:00
Marcus Boerger a85a72e29a MFH: Bugfix #25770 Segfault with PHP and bison 1.875 2003-10-07 10:04:51 +00:00
foobar 7492d02cb2 BFN 2003-10-07 09:59:50 +00:00
Corne' Cornelius 52d5dd4da5 MFH: - Fixed bug #18534 (ifx_close() leaves open session)
MFH: - (ifx_do_close) Added
2003-10-07 09:36:41 +00:00
Ilia Alshanetsky 16ab834b5e MFH: Cleaned up previous patch. 2003-10-07 00:36:27 +00:00
Ard Biesheuvel 1b60fa245e Fix typo 2003-10-07 00:11:03 +00:00
foobar c057fc931a MFH: - Fixed bug #25764 (ldap_get_option() crashes with unbinded ldap link) 2003-10-06 23:34:16 +00:00
foobar 10243d019d MFH: ws fix 2003-10-06 23:31:03 +00:00
Ilia Alshanetsky a13710455c MFH: Fixed clobbering of the source array, when merging complex
multi-dimensional arrays. Bug reported by Lukas Smith.
2003-10-05 19:37:06 +00:00
Sergey Kartashoff cfac03af3c - README in mnogosearch extension is updated 2003-10-04 09:43:49 +00:00
Greg Beaver 39894c69cd MFH fix PHP notice in rare case 2003-10-04 03:58:53 +00:00
foobar 59d28ed4df MFH: - Fixed bug #25752 (ext/ncurses: ncurses.h instead of curses.h with BSD). 2003-10-04 01:04:54 +00:00
foobar e2cf657294 MFH: ws fix 2003-10-04 00:43:31 +00:00
Moriyoshi Koizumi d18b7a533a BFN 2003-10-03 23:30:14 +00:00
Ilia Alshanetsky 9308d262d0 MFH: More ZTS stuff. 2003-10-03 18:05:50 +00:00
Moriyoshi Koizumi ad791c135c MFH(r-1.5, r-1.5, r-1.4): Specify full path to cat for mb_send_mail() tests 2003-10-03 17:07:50 +00:00
Moriyoshi Koizumi 48900111a8 MFH(r-1.1): Add regression test for bug #25745 2003-10-03 17:01:45 +00:00
SVN Migration 61e4791abe This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-10-03 16:59:45 +00:00
Moriyoshi Koizumi 9b708216d5 BFN 2003-10-03 15:54:06 +00:00
Moriyoshi Koizumi f692aeb36b MFH(r-1.28): Fixed bug #25745 (ctype functions don't deal with non-ascii characters properly) 2003-10-03 15:53:47 +00:00
Ilia Alshanetsky 3a867aad64 MFH: Fixed bug #25744 (make ZTS build of ext/sybase compile) 2003-10-03 13:03:47 +00:00
foobar e4a63807a1 MFH 2003-10-03 05:48:17 +00:00
SVN Migration 1a92434b06 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-10-03 05:47:08 +00:00
foobar 2dfed48c99 MFH: Aligned configure help texts. 2003-10-03 05:26:30 +00:00
foobar 1c2b48e0ca MFH 2003-10-03 04:29:24 +00:00
Moriyoshi Koizumi fea1d6c1fb MFH: Alignment fix 2003-10-03 01:13:56 +00:00
Moriyoshi Koizumi a754abdc5f MFH(r-1.1): Add a test case for bug #25708 2003-10-02 22:50:46 +00:00
SVN Migration a56a817706 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-10-02 22:50:29 +00:00
Moriyoshi Koizumi e547d66316 MFH(r-1.252): Fixed bug #25708 (extract($GLOBALS, EXTR_REFS) mangles $GLOBALS) 2003-10-02 22:22:15 +00:00
Frank M. Kromann d6f18bd5f3 FrontBase uses ws2_win32 lib now 2003-10-02 18:48:47 +00:00
Frank M. Kromann 6d0d0172f3 Fixing type cast 2003-10-02 18:48:18 +00:00
foobar e2e0cfb6fa MFH 2003-10-02 14:55:58 +00:00
foobar ec1d763fd2 Removed extra [] 2003-10-02 14:09:12 +00:00
foobar d88229acba strawberry fields.. 2003-10-02 14:03:17 +00:00
Moriyoshi Koizumi eb00f1dd54 Add some description to the help text 2003-10-02 10:59:38 +00:00
Moriyoshi Koizumi adec65bea6 MFH(r-1.15): Alignment fix 2003-10-02 10:48:16 +00:00
Moriyoshi Koizumi a82bc1b50c MFH(r-1.55): Alignment fix 2003-10-02 10:48:02 +00:00
Moriyoshi Koizumi 7620efc274 Forgot to commit this one. 2003-10-02 10:10:52 +00:00
Moriyoshi Koizumi 45775e2029 Silly typo 2003-10-02 08:05:06 +00:00
Moriyoshi Koizumi 46eecba03b BFN 2003-10-02 08:04:11 +00:00
Moriyoshi Koizumi 6e6732ae6a Fix for a regex bug that leads into an infinite loop due to optimization
failure when the pattern is ".*" and both MULTILINE and SINGLELINE options are
specified.
# This bug was already squashed in HEAD, as it adopts an alternative
# implementation.
2003-10-02 08:01:14 +00:00
Moriyoshi Koizumi 9c33e3d3ce MFH(r-1.46): fix php_regex_encoding() so it can handle two additional encoding
names mbfilter supports by default. (Patch by Seiji Masugata)
2003-10-02 07:50:19 +00:00
Moriyoshi Koizumi fff1d6a533 BFN 2003-10-02 07:01:24 +00:00
Moriyoshi Koizumi ab2ba0f49f Fixed bug #25707 (html_entity_decode over-decodes &amp;lt;)
# note: not MFH stuff
2003-10-02 07:00:56 +00:00
SVN Migration bda27d167f This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-10-02 06:57:22 +00:00
Ilia Alshanetsky edff9053e8 MFH: Fixed bug #25701 (On flush() set headers_sent in apache2handler) 2003-10-02 03:24:43 +00:00
foobar 60d11d734c MFH: fix for bug #25719 2003-10-02 00:35:31 +00:00
Andrei Zmievski 5e9a4ecc0e Make sure to clear out the refcount. 2003-10-01 23:13:04 +00:00
Andrei Zmievski 0d59c975a0 @- Made $argc and $argv always available as globals in CLI. No more
@  silliness. (Andrei)
2003-10-01 21:24:19 +00:00
foobar 6db270f8fc MFH 2003-10-01 02:54:39 +00:00
Ilia Alshanetsky a11f040979 MFH: Always prefer user specified paths over the default /usr /usr/local. 2003-09-30 22:38:29 +00:00
foobar e2a74cf344 MFH: Fixed bug #25703 (openssl checks failed) 2003-09-30 18:08:57 +00:00
Moriyoshi Koizumi 89dde23f32 Move entry to the right place 2003-09-30 04:24:18 +00:00
Greg Beaver a07e4ef2ff MFH better #45 fix 2003-09-30 02:57:28 +00:00
Moriyoshi Koizumi a60b5db89e BFN 2003-09-30 00:41:56 +00:00
Moriyoshi Koizumi 85bffe131e MFH: Fixed bug #25669 (eregi() with non-ascii characters) 2003-09-30 00:41:00 +00:00
Ilia Alshanetsky 361aa7dd32 Back to dev. 2003-09-30 00:35:52 +00:00
Ilia Alshanetsky e5b50cede5 4.3.4RC1 is a go. 2003-09-29 23:48:16 +00:00
Ilia Alshanetsky b5b29e267e MFH: More NaN & INF handling fixes. 2003-09-29 23:44:17 +00:00
Greg Beaver d632dba1ef MFH 2003-09-29 17:43:16 +00:00
Greg Beaver 4704bb7186 MFH #45, whitespace, bug in return of install() 2003-09-29 17:38:37 +00:00
Pierre Joye b1eafc6a75 - Upgrade DB to 1.5.0RC2 2003-09-29 14:49:18 +00:00
Pierre Joye c2a66c59c6 MFH 4.3.4RC1 2003-09-29 14:06:44 +00:00
Stanislav Malyshev cb9b99262e allow realpath() for win32 non-ZTS 2003-09-29 14:04:16 +00:00
Stanislav Malyshev 480e8dd7fc Have realpath now 2003-09-29 13:57:43 +00:00
Stanislav Malyshev f1b478c291 add realpath for Win32 non-ZTS 2003-09-29 13:57:03 +00:00
Moriyoshi Koizumi a23dfb3b11 MFH(r-1.399): simplification 2003-09-29 02:23:52 +00:00
Ilia Alshanetsky 5646e5f747 MFH: Fixed Bug #25665 (var_dump() hangs on Nan and INF). 2003-09-29 01:09:36 +00:00
Tal Peer ee9deb187a MFH 2003-09-28 13:37:59 +00:00
foobar 806c28b5c2 MFH 2003-09-27 20:54:00 +00:00
SVN Migration 8103e07a23 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-09-27 18:48:49 +00:00
Sara Golemon de85bccf03 MFH BugFix# 25671 subarray corruption in str_replace 2003-09-26 18:00:00 +00:00
Moriyoshi Koizumi 18557cba09 MFH(r-1.45): repatch fixes for the problem that was reported at php-dev@php.gr.jp (#884) 2003-09-26 17:47:10 +00:00
Moriyoshi Koizumi 2fb568e65e Fix typo 2003-09-26 16:33:58 +00:00
Moriyoshi Koizumi 94f05e60c2 Fix typo 2003-09-26 11:06:39 +00:00
Hartmut Holzgraefe 2bf4ba798f MFH 2003-09-26 10:13:35 +00:00
foobar 0d6bac093d MFH 2003-09-26 09:56:57 +00:00
SVN Migration f17845f9bd This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-09-26 09:56:25 +00:00
foobar 40a1c4b4f4 MFH 2003-09-25 14:53:58 +00:00
Ilia Alshanetsky 283476972f MFH: Fixed bug #25070 (Don't forget to unlock session files on win32 before
closing them).
2003-09-24 23:39:22 +00:00
Ilia Alshanetsky 8acd0a3835 MFH: Fixed bug #25293 (Output correct EOL to error_log) 2003-09-24 23:22:32 +00:00
foobar 925a3b6ba8 - Fixed bug #25648 (xslt_set_encoding() being not detected correctly) 2003-09-24 22:55:59 +00:00
foobar 149d034a81 MFH: use pkg-config if available for openssl setup 2003-09-24 14:31:18 +00:00
foobar b485c4f26c BEFH 2003-09-24 08:28:26 +00:00
Ilia Alshanetsky db8d5a7fb0 Bug fixing news. 2003-09-24 02:30:16 +00:00
Ilia Alshanetsky ee3c85162f MFH: Specify full path for the cat utility for mbstring e-mail tests.
MFH: Previously made fixes to tests that address bug #25635
2003-09-24 02:29:15 +00:00
foobar ccc0fb6122 MFH: Fixed bug #24402 (Compile failure with gettext 0.12.x) 2003-09-24 02:08:48 +00:00
foobar d18b757655 MFH: basic gettext test 2003-09-24 00:44:23 +00:00
Ilia Alshanetsky 08604e5d44 MFH: Fixed bug #25636 (SNMP Session not closed on success). 2003-09-23 18:26:10 +00:00
foobar ce2f1ce4bc MFH: Removed unnecessary ssl.h include 2003-09-23 16:04:55 +00:00
Wez Furlong 872948f21a "Fix" for bug #25614.
The openssl_pkey_get_public() doesn't work as advertized in the docs; it can't
get a public key from a private key (because a key is a key), but would return
the private key anyway.  The function was originally designed to get the public
key from a certificate.
2003-09-23 14:52:28 +00:00
SVN Migration 491cf63bab This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-09-23 10:06:20 +00:00
foobar 675a41bee2 MFH: - Fixed bug #25604 (HAVE_SNMP_PARSE_OID undefined with phpize build) 2003-09-23 08:16:47 +00:00
Rui Hirokawa 5714f48f4c removed unnessesary null byte (patched by komura). 2003-09-23 02:54:28 +00:00
Ilia Alshanetsky 05331829c6 MFH: string format stuff. 2003-09-22 23:28:09 +00:00
Ilia Alshanetsky 258d90d101 MFH: String formating. 2003-09-22 04:18:39 +00:00
Sascha Schumann 8d28cb5737 Major bug fix upgrade to the bundled libfcgi
A delta between libfcgi 2.2.2 and 2.4.1-SNAP has been applied to the
source.  Shane's impersonation, putenv and exit->return improvements
have been carried over.  One of Shane's changes caused the first process
to hang after one request.  The modification has been deactived (os_win32.c).

These changes together with a patch to mod_fastcgi, make Apache/mod_fastcgi
and PHP work under Win32.  It was basically unusable before that.
2003-09-21 22:08:17 +00:00
foobar c1a998a604 MFH: typo fix in error message 2003-09-21 15:40:28 +00:00
Sascha Schumann ca4d592e11 Avoid zero-length keys which result in a spinning process 2003-09-20 16:09:41 +00:00
Sascha Schumann 42d1578fb4 Fix potential buffer overrun 2003-09-20 12:44:13 +00:00
foobar 36e88551eb MFH 2003-09-20 03:22:54 +00:00
Ilia Alshanetsky fea99094df MFH: Fixed bug #25583 (Incorrect handling of paths starting with / on win32
inside glob() function).
2003-09-20 02:52:45 +00:00
Ilia Alshanetsky 5b3a654f07 Revert previous patch. 2003-09-20 02:08:12 +00:00
Ilia Alshanetsky 0e09bbae14 Bug fixing news. 2003-09-20 01:41:45 +00:00
Ilia Alshanetsky 3fcd022dc5 MFH: Fixed bug #25583 (Incorrect handling of absolute path without drive). 2003-09-20 01:41:18 +00:00
Derick Rethans 66ac209938 MFH: - Fixed typo 2003-09-19 12:24:48 +00:00
foobar bbbf1df01d Make sure phpize/php-config are build 2003-09-19 05:35:21 +00:00
Ilia Alshanetsky 3857aa4f7d MFH: Fixed bug #25570 (Possible crash in apache2handler when zend_bailout
called outside of zend_try {} block).
2003-09-19 00:44:58 +00:00
Rob Richards b4bed3fd88 fix some threading issues
fix mem leaks in append_child with attribute nodes
2003-09-17 19:34:42 +00:00
foobar 776587fdac --enable-track-vars does not exist 2003-09-17 05:28:42 +00:00
Ilia Alshanetsky d0d8c4a6a3 MFH: Fixed bug #25106 (Added more stringent checks on bzopen() mode). 2003-09-15 23:49:41 +00:00
Marcus Boerger 353dd2444a MFH: Test for bug #25547 2003-09-15 20:40:56 +00:00
SVN Migration 472aaf3f50 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-09-15 20:30:33 +00:00
foobar 186e6dc1ba crap removal 2003-09-15 04:13:41 +00:00
Ilia Alshanetsky 46afe5a792 MFH: Fixed bug #25530 (checkdate incorrectly handles floats) 2003-09-15 00:08:05 +00:00
Sara Golemon 99ab17375d MFH(r-1.147): Fix Bug #25525 ldap_explode_dn() crashes when passed invalid params 2003-09-13 17:31:25 +00:00
Ilia Alshanetsky 6d36221995 When opening file for write, it may not exist. 2003-09-12 04:53:39 +00:00
foobar 2dadbe3855 MFH: - Fixed bug #25504 (pcre_match_all() crashes when passed only 2 parameters) 2003-09-12 01:32:38 +00:00
foobar a11e7affc8 BFN 2003-09-11 23:51:27 +00:00
foobar fbed1b901c MFH: - Fixed bug #25483 (ext/informix: bogus -469 error from ifx_query()) 2003-09-11 23:51:14 +00:00
foobar 75d44d8c07 fff 2003-09-11 18:16:18 +00:00
Jay Smith 491347fba6 Fixed bug #25494 (array_merge allowing "false" as argument (silent when
non-array is passed))
# Now throws E_NOTICE for non-array args as per Ilia's suggestion.
2003-09-11 17:28:27 +00:00
foobar b2a44d9327 MFH: - Fixed bug #25463 (ext/cpdf: compile failure with bundled GD) 2003-09-11 15:26:53 +00:00
Ilia Alshanetsky 3e59eb2be9 MFH: Fixed bug #25316 (Possible infinite loop inside _php_stream_write()). 2003-09-11 05:07:47 +00:00
Ilia Alshanetsky 32f67e7664 MFH: Cleanup r1.76 patch 2003-09-11 04:46:31 +00:00
foobar 010213e4ca wtf is w/ZTS? (for users? :) 2003-09-11 02:00:52 +00:00
Hartmut Holzgraefe 6afa7b45ef MFH 2003-09-11 01:45:02 +00:00
Stefan Roehrich 6e1032c30d MFH: Fix for bug #23488 zlib.output_compression overrides vary header.
It was already fixed for ob_gzhandler (#24827).
2003-09-10 08:49:46 +00:00
foobar 70c3e3e95f buf -> bug 2003-09-10 01:28:34 +00:00
foobar c290f39e3b - Fixed bug #25385 (ob_gzhandler(): typo in sapi_add_header_ex() call) 2003-09-10 01:23:38 +00:00
Ilia Alshanetsky b0fe9422e4 #if -> #ifdef 2003-09-10 01:03:41 +00:00
Ilia Alshanetsky 2f695ba37d MFH: Fixed bug #25429 (fix copying of stdin using copy() function) 2003-09-10 00:59:46 +00:00
Ilia Alshanetsky 72e5f9d395 MFH: Fixed bug #14049 (realpath() w/ZTS returns invalid results for non-existent
paths)
2003-09-10 00:22:20 +00:00
foobar 1ba3c62c8b BFN 2003-09-09 21:47:20 +00:00
foobar e56b9397d9 MFH: runtime apache version 2003-09-09 21:42:57 +00:00
Melvyn Sopacua 4aacd42826 Fix testcases, failing with 'America/New_York' vs. 'US/Eastern' systems
and fallback to POSIX-style. The fallback is based on tzset(3)  manpage [1]
for these systems and may apply to past and future unknowns as well.

Affected systems:   4.4BSD

Possible problem:   OSF

Proposed solution:  leave testcase as is, and if OSF systems start
                    failing during next qa-cycle, always use POSIX style in
                    testcases and add portability note to docs.

# [1] If the TZ environment variable does not specify a tzfile(5)-format
#     file and cannot be interpreted as a direct specification, UTC is
#     used.
2003-09-09 21:31:51 +00:00
Sara Golemon ac848809b5 BFN 25294 2003-09-09 21:20:07 +00:00
Sara Golemon 3f585ac923 MFH(r-1.91) Fix Bug #25294 LIST/NLST can cause segfault because ftp->data not cleaned properly 2003-09-09 21:15:20 +00:00
foobar f7972bc8be BFN 2003-09-09 19:58:06 +00:00
Melvyn Sopacua cd8ba5af5b Fix #23326: Attributes via append_child not supported
Add testcase
2003-09-09 19:43:45 +00:00
foobar fc787ac20f BFN 2003-09-09 19:27:56 +00:00
foobar 72cafaaabf MFH: - Fixed bug #25211 (image.c compile failure with AIX) 2003-09-09 19:27:41 +00:00
foobar 968eb65b01 BFN 2003-09-08 22:51:53 +00:00
foobar c872775134 BFN 2003-09-08 22:44:58 +00:00
Sara Golemon 55ec6edbfb BFN Bug#25314 2003-09-08 22:43:08 +00:00
Ilia Alshanetsky 7a06046d74 MFH: Fixed bug #25333 (Possible body corruption & crash in win32 mail()). 2003-09-08 22:37:51 +00:00
Sara Golemon 9761587fc6 Bug #25314 ASCII mode transfers behaving like binary when initiated from windows. 2003-09-08 22:32:33 +00:00
foobar 65b33edeee MFH: revert JIS addition 2003-09-08 22:19:56 +00:00
Moriyoshi Koizumi 62b4710d9e MFH(r-1.66): fix build in VC++7. 2003-09-08 21:01:37 +00:00
Ilia Alshanetsky e60d220d5c MFH: Re-enable sendmail binary check, now with parameter detection. 2003-09-08 20:15:43 +00:00
foobar e8d32e9779 MFH: - Fixed bug #25424 (ext/informix: lvarchar not supported in win32 build) 2003-09-08 15:07:43 +00:00
foobar 32505ff927 - nuke warning about MSVCRT in debug build 2003-09-08 14:09:40 +00:00
foobar 5bda30d1bb - fix the mcve addition, removed unused project (gd_bundled) 2003-09-08 14:08:46 +00:00
foobar 40bc834210 MFH: Fix for bug #25295 2003-09-08 13:15:44 +00:00
foobar 24f458a004 - MFH: build problems fix with CLI 2003-09-08 13:10:34 +00:00
Marcus Boerger aa405f4114 MFH: Allow to search for section FILE with 2nd parameter (found by Derick) 2003-09-07 23:50:25 +00:00
foobar 13e0c93f0c BFN 2003-09-06 23:57:40 +00:00
Marcus Boerger 9ec1245550 MFH: Bugfix #25404 2003-09-06 15:31:14 +00:00
foobar aa1c8bdee5 really sync 2003-09-04 16:46:46 +00:00
Jon Parise 0934056575 MFH 1.176: Register the TYPEMODEL constant from c-client's mail.h. 2003-09-04 07:48:30 +00:00
foobar f59a6aceea MFH 2003-09-03 22:54:13 +00:00
Ard Biesheuvel 28dabfb7a6 MFH WS 2003-09-03 22:07:31 +00:00
foobar bd5f18bdf7 MFH 2003-09-03 16:41:12 +00:00
SVN Migration 95c6f3e8a0 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-09-03 16:40:53 +00:00
foobar 1f2cc89995 sync 2003-09-03 16:26:50 +00:00
foobar d20b3d0ed5 MFH: - Fixed bug #25378 (Invalid data passed to unserialize() causes segfault) 2003-09-03 16:26:42 +00:00
Ard Biesheuvel 94e8d2ec62 MFH Test correct binding of 16-bit NUMERIC parameters 2003-09-03 15:25:03 +00:00
Ard Biesheuvel d5bb4753c8 MFH Fix binding of 16-bit NUMERIC parameters 2003-09-03 15:22:24 +00:00
Sascha Schumann 8ab1c72867 Fixed FastCGI being unable to bind to a specific IP 2003-09-03 14:56:11 +00:00
foobar bfb188eff5 MFH: - Fixed bug #25372 (sscanf() does not work with %X) 2003-09-03 11:55:30 +00:00
Sascha Schumann cbb59ee1b0 Update documentation, -b ip:port works 2003-09-03 08:24:17 +00:00
Sascha Schumann b02ce8bdc7 fix heuristic: if someone passed "-b IP:port", this check would
falsely recognize the parameter as defining only a port.
2003-09-03 08:14:14 +00:00
Sascha Schumann 4d98201217 centralize cflags 2003-09-03 08:07:51 +00:00
foobar 189fe6e665 - Added JISX0208=1 and USE_GD_JISX0208 defines 2003-09-03 05:28:10 +00:00
Sascha Schumann 20a35aa472 enable re2c check for self-contained extensions 2003-09-02 19:42:03 +00:00
Sascha Schumann 889eb2234e provide RE2C to external extensions 2003-09-02 19:33:52 +00:00
Sascha Schumann b4a6c9fe75 fetch fd correctly in fastcgi case 2003-09-02 16:16:12 +00:00
Ard Biesheuvel b1e3eaacaf MFH: Don't choke on repeated fetch() after result is exhausted 2003-09-02 15:35:11 +00:00
Sascha Schumann 2457ddb3ba implement get_fd/force_http_10 methods for CGI SAPI 2003-09-02 11:23:57 +00:00
Sascha Schumann e225eee248 nuke unused var 2003-09-02 11:15:14 +00:00
Stanislav Malyshev 1c65d69485 ws 2003-09-02 10:33:18 +00:00
Stanislav Malyshev 1eb9a119af fix typo 2003-09-02 10:21:02 +00:00
Stanislav Malyshev 7651ed0925 don't report errors if asked not to report 2003-09-02 09:17:09 +00:00
foobar 901af0e106 MFH: - Fixed bug #25348 ("make install" fails with --enable-short-tags). 2003-09-02 01:30:13 +00:00
foobar b485be88da MFH: - Fixed bug #25343 (is_dir() gives warning on FreeBSD). 2003-09-02 01:23:21 +00:00
foobar 7c728e6b9e BFNHR 2003-09-01 23:02:46 +00:00
Sara Golemon 049eaa886a BFN leak in gethostbynamel 2003-09-01 22:40:47 +00:00
Sara Golemon a2f21f3e8c Plug leak when invalid domain name provided. 2003-09-01 22:37:46 +00:00
foobar 4ac705885e MFH 2003-09-01 16:25:23 +00:00
Stanislav Malyshev 5f003af4d4 The sendmail_path executable check breaks setups that use parameters
for sendmail - including the default setup - so I'm disabling it for now.
2003-09-01 08:18:31 +00:00
Ilia Alshanetsky 6ce26891e8 MFH: Make sure that ftp->data is nulled after it's freed. This may fix bug
#25294 & bug #25296.
2003-08-31 21:09:14 +00:00
Sergey Kartashoff 3d9aed8039 - mnogosearch extension updated to compile with mnogosearch-3.2.15
- a new UDM_PARAM_SEARCH_RESULTS mnogosearch API command added to limit
  maximum number of search results
2003-08-31 06:58:58 +00:00
foobar c298c075f4 BFN 2003-08-30 22:01:49 +00:00
foobar 84c5c7da97 MFH 2003-08-30 11:01:46 +00:00
foobar 17d5386bb3 MFH 2003-08-30 10:57:59 +00:00
foobar 5fdef05cb0 stupid winblows 2003-08-30 10:50:52 +00:00
Sascha Schumann ce4fbe580d Never overwrite .c files when re2c does not exist. 2003-08-30 07:29:55 +00:00
Rob Richards 9f8be37c4e fix case for include 2003-08-29 20:50:52 +00:00
Rob Richards bf26b9a7e1 fix builds using libxml 2.5.10+ 2003-08-29 17:36:34 +00:00
Rob Richards c23ec177d5 workaround for bug #25268. libxslt issue with xsl:key 2003-08-29 15:29:24 +00:00
foobar 1a283a6c42 BFN 2003-08-29 14:41:08 +00:00
foobar ca64fae35d header sync 2003-08-29 14:22:13 +00:00
Sascha Schumann 485cba185b MFH
Fix a segfault which occured when using a storage format not capable
of expressing references (e.g. WDDX) and deserializing a session variable
whose name conflicted with an existing symbol in the global scope.

PR: #25307
Submitted by: Jani Taskinen
Speling fixes: me
2003-08-29 12:35:15 +00:00
foobar 43eddf7a58 MFH 2003-08-29 09:05:27 +00:00
foobar 5896ff7e80 fix build 2003-08-29 00:53:16 +00:00
Andrey Hristov 0767e6f1e2 MFH : str is string not a long 2003-08-28 21:09:21 +00:00
Andrey Hristov 4f2153fd14 format string fix and \n at the end of the message is not needed 2003-08-28 20:29:13 +00:00
Andrey Hristov 8edac7234d format string fixes 2003-08-28 20:27:55 +00:00
Andrey Hristov b767129303 \n at the end of the message is not needed 2003-08-28 20:26:32 +00:00
Andrey Hristov 6d57013b3e format string fix 2003-08-28 20:25:31 +00:00
Ilia Alshanetsky f137ee87f7 One more warning fix. 2003-08-28 20:05:24 +00:00
Ilia Alshanetsky fa55a5a826 Compiler warning fixes. 2003-08-28 20:01:37 +00:00
Ilia Alshanetsky 0be182e1ba MFH: Compiler warning fixes. 2003-08-28 19:18:57 +00:00
Ilia Alshanetsky c3757b1f05 MFH: Fixed format error. 2003-08-28 17:56:51 +00:00
Ilia Alshanetsky 21af3e8c4e Fixed format errors & warning. 2003-08-28 17:54:03 +00:00
Ilia Alshanetsky 4df567fe9d MFH: Fixed format bug 2003-08-28 17:49:08 +00:00
Sascha Schumann 1c662bee50 format string fix 2003-08-28 17:34:30 +00:00
Sascha Schumann e7f085d84b fix error message 2003-08-28 17:16:01 +00:00
Rasmus Lerdorf fc12da950c Fix the build
The DOS line endings in this file caused buildconf to build a broken
configure script on fbsd
2003-08-28 17:14:29 +00:00
foobar 1f27563128 sync with HEAD 2003-08-28 16:31:51 +00:00
foobar e2782d9e1d MFH: some emalloc() -> safe_emalloc() fixes 2003-08-28 16:28:27 +00:00
foobar 3782f21222 - Fixed bug #23682 (sybase_query() and multiple result sets: not returning first row set) 2003-08-28 16:16:59 +00:00
Stefan Roehrich bc24daedc3 MFH: Fixed bug #25218 ("deflate" compressed pages had a gzip header, which
should only be sent with "gzip" compressed pages).
2003-08-28 16:05:17 +00:00
Sascha Schumann 41c1ea1b05 fix format strings 2003-08-28 16:04:18 +00:00
Sascha Schumann 415df9168f fix format strings 2003-08-28 15:54:35 +00:00
Sascha Schumann e98926be3f add PHP_ATTRIBUTE_FORMAT to more functions
# uncovers a nice number of incorrect format strings
2003-08-28 15:52:15 +00:00
Sascha Schumann 488f26359a fix format (long port) 2003-08-28 15:15:35 +00:00
Sascha Schumann e5cc26627a Use ZEND_GCC_VERSION and ZEND_ATTRIBUTE_MALLOC 2003-08-28 14:48:34 +00:00
foobar 619d34b7f8 remove dos line feeds.. 2003-08-28 14:36:50 +00:00
foobar 58fa31451a - Made MCVE extension available on win32.
# requires libmcve 3.2.2 (http://www.mcve.com)
2003-08-28 14:34:15 +00:00
foobar 4942844edb missing entries 2003-08-28 14:25:12 +00:00
foobar f4d7971b7f missing .cvsignore 2003-08-28 14:08:44 +00:00
Stanislav Malyshev ab9ceb9526 Null dtor so that extensions won't be unloaded prematurely by list
destruction
2003-08-28 11:34:51 +00:00
Moriyoshi Koizumi 9e07fed96e MFH(r-1.25): add further check for "#include MACRO" style syntax 2003-08-28 06:05:13 +00:00
Sascha Schumann 0ea4d57d56 MFH automatic format checks 2003-08-28 05:25:26 +00:00
Ilia Alshanetsky 77005be687 MFH: Fixed bug #25109 (Possible crash when fetching field names in pgsql) 2003-08-28 00:33:48 +00:00
Ilia Alshanetsky aef886e34c MFH: mail.c r1.74 2003-08-27 23:53:31 +00:00
foobar b21f1582dd - Backported several improvements/cleanups for the build/configure stuff.
. PEAR dependancies checked during configure
  . OpenSSL config moved from configure.in to ext/openssl/config0.m4
    (and also improved the PHP_OPENSSL_SETUP macro a bit)
  + Some other minor issues
2003-08-27 17:57:32 +00:00
Sascha Schumann f8f72bd52e Use INSTALL to install build files 2003-08-27 13:55:24 +00:00
Ilia Alshanetsky 7cd06f5088 MFH: Prevent a crash when expand_filepath() fails. 2003-08-27 01:10:25 +00:00
foobar db7baa737f BFN 2003-08-26 02:52:39 +00:00
foobar bb83f93954 MFH: - Fixed bug #25166 (WDDX serializer handler missing in win32). (Jani) 2003-08-26 02:51:21 +00:00
foobar 008b424ee9 More crap from previous commits 2003-08-26 02:16:23 +00:00
foobar 720d3804fc Fix typo 2003-08-26 02:15:19 +00:00
foobar 9d61de0ec9 MFH: - Fixed crash bug when non-existing save/serializer handler is used 2003-08-26 02:05:53 +00:00
Sascha Schumann 16f3c4b7fb Use $(INSTALL_DATA) instead of cp 2003-08-26 00:03:33 +00:00
Ilia Alshanetsky 65c28b0cc6 zero-size BLOB fetch fix went into 4.3.3 2003-08-25 23:53:10 +00:00
foobar c0edbc5eee MFH 2003-08-25 23:24:42 +00:00
Sara Golemon a170be820e BFN 2003-08-25 22:28:31 +00:00
Sara Golemon 652147def5 MFH(r-1.61) Bugfix#25239 Closing control stream while data stream is open violates RFC959 section 2.3 2003-08-25 22:26:37 +00:00
Ilia Alshanetsky 343a1f081c Added place-holder for 4.3.4 2003-08-24 20:51:52 +00:00
Ilia Alshanetsky c82c3a41b4 No RC1 just yet :) 2003-08-24 20:46:36 +00:00
Ilia Alshanetsky e2ee8d0edb Back to dev 2003-08-24 20:43:19 +00:00
Ilia Alshanetsky d702e37902 Fixed typo. 2003-08-24 19:44:47 +00:00
Ilia Alshanetsky e0d22f195b Set 4.3.3 version bit. 2003-08-24 19:30:16 +00:00
Ilia Alshanetsky 88004a6208 Prepare NEWS file for 4.3.3 release. 2003-08-24 19:24:39 +00:00
Ilia Alshanetsky a2a30ca7d3 MFH: Fixed bug #25127 (reset memory_limit before terminating the request) 2003-08-22 20:02:11 +00:00
Jon Parise d7264e744d MFH configure.in:1.460, filestat.c:1.125:
Fix disk_total_space() and disk_free_space() under FreeBSD.
2003-08-22 05:11:31 +00:00
Ard Biesheuvel 7f04983ed3 MFH Fix false warning on zero-size BLOB fetch (introduced in RC3) 2003-08-20 23:01:32 +00:00
Brad House ac99c5ab03 allow destructor to clean up connection data 2003-08-20 19:43:07 +00:00
Ilia Alshanetsky 60097c2661 MFH: Fixed bug #25170 (Problem with generation of random numbers on solaris) 2003-08-20 16:40:46 +00:00
foobar 72f98037f4 MFH: - Fixed bug #25163 (OSX: phpize has to use glibtoolize instead) 2003-08-20 08:16:18 +00:00
foobar 6465017e05 MFH 2003-08-20 08:15:42 +00:00
Marcus Boerger f75ae95c8f MFH: Add test for #25145 2003-08-19 22:50:38 +00:00
SVN Migration 26ff74d670 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-08-19 22:47:31 +00:00
Moriyoshi Koizumi b34666a014 MFH(r-1.189): more accurate fix for bug #25140 2003-08-19 14:49:39 +00:00
Moriyoshi Koizumi d8bbff45c1 Revert the last patch. This patch should not be included in the forthcoming
release.
2003-08-19 14:32:10 +00:00
Derick Rethans 39a8fc274a - MFH: Fix for bug #25140 (mb_convert_encoding returns FALSE when it tries to
convert empty string)
2003-08-19 08:34:51 +00:00
SVN Migration b6006ed2fc This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-08-19 08:29:58 +00:00
Ilia Alshanetsky 4ceecd3e5e RC5 not RC4 2003-08-18 14:04:30 +00:00
Ilia Alshanetsky ab74b63ff2 Back to dev 2003-08-18 14:02:28 +00:00
Pierre Joye 3214d963ec - MFH 2003-08-18 13:28:38 +00:00
Ilia Alshanetsky 6bacb29c98 RC4 is a go 2003-08-18 12:27:01 +00:00
foobar 339427de12 fix typo 2003-08-17 21:27:55 +00:00
Ard Biesheuvel f1dd5c2406 MFH Fixed leak in _php_ibase_bind() 2003-08-17 16:43:49 +00:00
Ard Biesheuvel bb4ea41589 MFH 2003-08-17 16:40:26 +00:00
Ard Biesheuvel c5a669caa6 MFH 2003-08-17 15:01:07 +00:00
Ard Biesheuvel cee27dd710 MFH 2003-08-17 13:26:13 +00:00
foobar 879fb489f3 made some entries more meaningful for users.. 2003-08-17 05:57:10 +00:00
Ilia Alshanetsky 1ab01b470b BFN 2003-08-16 23:05:19 +00:00
Ard Biesheuvel e25d006476 MFH Fixed bug #24224 2003-08-16 20:12:43 +00:00
Ard Biesheuvel 2732fbadbe MFH 2003-08-16 20:10:51 +00:00
Ard Biesheuvel 418cada107 MFH 2003-08-16 20:05:36 +00:00
Ard Biesheuvel 850a158531 MFH Fixed bug #18744 2003-08-16 17:11:25 +00:00
foobar 4282e55dfe ws fix 2003-08-15 18:47:02 +00:00
foobar 05a0c36072 fix typo 2003-08-15 18:42:11 +00:00
Derick Rethans 05ae3f22ab - Fix library path problems 2003-08-14 20:12:51 +00:00
Ilia Alshanetsky 903275e887 MFH: Fixed bug #25093 (Various leaks due to non-freed queries) 2003-08-14 17:49:48 +00:00
Marcus Boerger 88b48b5376 MFH: Don't test other functionality than wddx here. 2003-08-14 17:25:17 +00:00
Ilia Alshanetsky 88e0b419f2 Set RC4 date 2003-08-14 14:38:50 +00:00
Ilia Alshanetsky 33d7423950 MFH: Fixed bug #25081 (odbc_fetch_array() may mangle numeric fields). 2003-08-14 14:37:33 +00:00
Ilia Alshanetsky 30c26df348 MFH: Fixed bug #25084 (Make refer check not dependant on register_globals) 2003-08-14 01:32:02 +00:00
Ilia Alshanetsky cadd668aac MFH: missing skip condition. 2003-08-14 00:54:42 +00:00
Ilia Alshanetsky b2c85181d0 MFH: Fixed a possible crash due to invalid handling of assert ini options. 2003-08-14 00:38:21 +00:00
Brian France 7da8651511 Reverted part of the last patch. It changed -prefer-pic to -prefer-non-pic.
Now back to -prefer-pic
2003-08-14 00:24:25 +00:00
foobar 22aab1e328 MFH: boolean (not long) 2003-08-13 23:39:03 +00:00
Edin Kadribasic 919f53ee51 Added standard location for the headers 2003-08-13 23:02:57 +00:00
Brian France 3b2cf9ddef Fixed two translit so they don't remove underscores 2003-08-13 22:50:34 +00:00
Tomas V.V.Cox 3f11a2a6a8 1.2b5 becomes 1.2 final, no more changes 2003-08-13 22:32:28 +00:00
Vlad Krupin 2725d3534f MFH adding win32 support 2003-08-13 20:59:44 +00:00
SVN Migration 48c975a333 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-08-13 18:57:20 +00:00
Moriyoshi Koizumi fe042a90b9 MFH(r-1.96): Slight improvement. Hope this will make some difference. 2003-08-13 18:22:17 +00:00
foobar fab70dea69 Be a bit more wordy.. 2003-08-13 18:16:00 +00:00
Ilia Alshanetsky 7b1548e798 BFN 2003-08-13 16:14:08 +00:00
Ard Biesheuvel e084903eab Fixed crash in _php_ibase_error() after request shutdown (also fixes #7014) 2003-08-13 13:27:36 +00:00
foobar 3f71921c58 MFH 2003-08-13 10:40:56 +00:00
foobar 806f9145de MFH 2003-08-13 09:48:32 +00:00
Ilia Alshanetsky bd3cb846c0 MFH: Don't forget to flush() buffers for -w -s 2003-08-13 02:01:59 +00:00
foobar 9356017daa MFH: revert previous commit 2003-08-13 01:37:58 +00:00
Ilia Alshanetsky 351a686a7c MFH: Fixed bug #20896 (-s -w modes with php-cli cause php to hang). 2003-08-13 01:30:39 +00:00
Ard Biesheuvel 61c05dfc9f Fixed bug #23936 (fail to select and fetch) MFH 2003-08-13 01:28:32 +00:00
foobar 553fb5a3be MFH 2003-08-13 01:24:48 +00:00
Ilia Alshanetsky 35f457c92e Fix compile warning (unused variable) 2003-08-12 15:04:52 +00:00
foobar b855ab0dd4 MFH: fix test results (negative indices are not strings anymore) 2003-08-11 23:56:18 +00:00
Marcus Boerger 238aa7baee BFN 2003-08-11 20:24:58 +00:00
Marcus Boerger 46174f8ac8 BFN 2003-08-11 20:19:50 +00:00
Marcus Boerger 379040771d MFH: Bugfix 21918 2003-08-11 20:19:19 +00:00
SVN Migration 37a02a3984 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-08-11 20:14:26 +00:00
Marcus Boerger 575b38ee2f MFH: Bugfix #25044 2003-08-11 19:40:52 +00:00
Ilia Alshanetsky 977ec5eb4a MFH: Fixed bug #22245 (References inside $_SESSION not being handled). 2003-08-11 19:21:22 +00:00
Marcus Boerger 064cab8ac8 Add Ard as interbase maintainer 2003-08-11 18:54:57 +00:00
Ilia Alshanetsky d5fe19eb92 MFH: Fixed bug #22947 (Ack() inside win32/sendmail.c may stall in certain
situations). (Ilia)
2003-08-11 18:08:35 +00:00
Ilia Alshanetsky c2eb068c8a MFH: Fixed bug #25037 (Possible infinite loop inside SendText()) 2003-08-11 16:38:08 +00:00
Ilia Alshanetsky efc550eea3 MFH: Fixed bug #21957 (serialize() mangles objects with __sleep). 2003-08-11 04:57:55 +00:00
SVN Migration 3f54dd40b6 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-08-11 03:22:25 +00:00
foobar 7c0dd1251c MFH: fix compile warning 2003-08-11 02:08:32 +00:00
foobar 0d8beb77f6 MFH: nuked unused variable 2003-08-11 01:57:10 +00:00
foobar 1cab24458b MFH: fix compile warnings about unused variables 2003-08-11 01:55:14 +00:00
foobar cfc97c7d71 MFH: moved RINIT(crypt) stuff to crypt() itself. 2003-08-11 00:53:26 +00:00
foobar 30f1001553 MFH: - Fixed bug #25007 (rand() & mt_rand() seed RNG every call). 2003-08-11 00:43:32 +00:00
Ilia Alshanetsky 92d3c2a08e MFH: timeout fix 2003-08-09 23:15:19 +00:00
Ilia Alshanetsky 9cfcbd137b MFH: fixed test 2003-08-09 21:00:53 +00:00
Ilia Alshanetsky b74daafbcd MFH: Fixed bug #24897 (inconsistent behavior of shuffle() &
array_multisort())
2003-08-09 20:50:25 +00:00
SVN Migration af01cf787d This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-08-09 20:49:01 +00:00
foobar 6da25bdae8 MFH 2003-08-09 18:43:58 +00:00
Ilia Alshanetsky 6ffa3e1780 MFH: test correction 2003-08-09 18:40:53 +00:00
Ilia Alshanetsky ff35f925b7 BFN 2003-08-09 16:49:08 +00:00
Ilia Alshanetsky 6b0aaabc98 MFH: Added/improved tests for bugs 24142, 24063, 24951, 24980 2003-08-09 16:48:30 +00:00
Ilia Alshanetsky e60da236ae MFH: Do not assume array contains numeric values. 2003-08-09 16:47:21 +00:00
SVN Migration d58f597885 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-08-09 16:44:34 +00:00
Ilia Alshanetsky a25742e18f MFH: Detection of buggy compiler (gcc) 2003-08-09 16:13:47 +00:00
foobar b75c57e521 MFH 2003-08-09 15:46:48 +00:00
foobar 77a22a2835 BFN 2003-08-09 15:41:09 +00:00
foobar 0690aff6b5 - Fix possible crashes if PHP is linked with external libexpat and also
the bundled one is compiled in.
2003-08-09 14:26:40 +00:00
Derick Rethans f877a76a0e - MFH: Memleak fix 2003-08-09 11:22:40 +00:00
Moriyoshi Koizumi 605563c0a8 Test updates. 2003-08-09 06:14:51 +00:00
Moriyoshi Koizumi b2a7d2ed4e MFH(r-1.186): fix wrong behaviour under ZTS that was inconsistent with the
behaviour under non-ZTS
2003-08-09 06:12:41 +00:00
Ilia Alshanetsky b2bd6e465c MFH: Fixed bug #24980 (array_reduce() uses first element as default running
total).
2003-08-08 23:54:25 +00:00
Ilia Alshanetsky ceb065f9eb MFH: Fixed bug #24951 (ob_flush() needlessly destroys output handler). 2003-08-08 23:44:04 +00:00
Ilia Alshanetsky c2302046dd MFH: Avoid a round() bug that occurs due to over optimization of C code by
gcc.
2003-08-08 23:42:10 +00:00
Marcus Boerger bd6bd53646 Bugfix #24063 2003-08-08 20:23:07 +00:00
Ilia Alshanetsky c95bd4ad87 BFN 2003-08-08 13:55:06 +00:00
Ilia Alshanetsky 1167e85cf3 MFH: Fixed bug #24977 (Revert mysql_select_db optimization) 2003-08-08 13:36:44 +00:00
Ilia Alshanetsky 77225b912f MFH: Fixed bug #24909 (Bad random numbers with ZTS builds on Solaris) 2003-08-08 13:34:52 +00:00
foobar aa3a1426e8 correct version 2003-08-08 12:39:11 +00:00
Masaki Fujimoto 0072a36646 BFN 2003-08-08 11:44:25 +00:00
SVN Migration cecfd0ace4 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-08-08 10:52:51 +00:00
Ilia Alshanetsky d7409a9797 RC4 (hopefully it'll actually be the final) 2003-08-07 18:42:40 +00:00
Moriyoshi Koizumi 1560aabbaf MFH(r-1.10): Tru64 requires TZ values be POSIX styled 2003-08-07 17:46:40 +00:00
Ilia Alshanetsky 6ff7c1cedf RC3 is a go. 2003-08-07 17:42:02 +00:00
Zeev Suraski 6c7394101b Remove 'proto' from internal functions 2003-08-07 16:44:11 +00:00
Zeev Suraski c4845a8b65 Another broken prototype 2003-08-07 16:03:05 +00:00
Zeev Suraski 728ca44dff Fix prototype 2003-08-07 16:02:04 +00:00
Zeev Suraski 1af7f512bc That's slightly more accurate 2003-08-07 15:50:18 +00:00
Ilia Alshanetsky 07ff7f16c7 MFH: Fixed bug #24839 (& -> &amp; in php credits) 2003-08-07 15:41:43 +00:00
Ilia Alshanetsky bfcbf4bc19 BFN 2003-08-07 15:37:54 +00:00
Ilia Alshanetsky 69322ae43b MFH: Fixed bug #21958 (workaround for unusual realpath() on AIX & Tru64). 2003-08-07 15:32:37 +00:00
foobar 2dea730e08 MFH: dlfcn.h not found in solaris when using forte cc 2003-08-07 12:05:00 +00:00
Ilia Alshanetsky 84cc58d013 MFH: Fixed bug #24958 (Incorrect handling of 404s) 2003-08-06 22:34:20 +00:00
Moriyoshi Koizumi 165a1d62c8 Add missing NLS entry for German. 2003-08-06 21:59:42 +00:00
Vlad Krupin d5fba05f61 Fix for bug 23463. Dbase2 is not supported.
AFAICT, no newer versions of dbase, even those use
version byte as a bitmask will ever have it <3.
2003-08-06 19:01:08 +00:00
Pierre Joye 9868377fa0 - HTTP 1.2.1 2003-08-06 07:59:09 +00:00
Pierre Joye c25ed56914 - Remove old http 2003-08-06 07:58:16 +00:00
Tomas V.V.Cox a6aef8844f Added Mirror.php to PHP_4_3 branch 2003-08-06 02:13:05 +00:00
Tomas V.V.Cox 7d96d95a5e MFH for RC3 2003-08-06 01:58:30 +00:00
SVN Migration 79ff9f2fa3 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2003-08-05 23:22:09 +00:00
Brian France 79f338488e added include config.h so shared extensions builds work correctly 2003-08-05 20:54:43 +00:00
Ilia Alshanetsky 7c70a8f8c2 MFH: Fixed bug #18291 (escapeshellcmd() can now handle quoted arguments) 2003-08-05 20:16:47 +00:00
Ilia Alshanetsky 1e76a63719 MFH: Fixed bug #17414 (pthreads bug workaround). 2003-08-05 20:05:17 +00:00
foobar 29c92b6d91 MFH: fixed typos 2003-08-05 16:02:41 +00:00
Ilia Alshanetsky 7ec8b0bcba MFH: memory leak fix 2003-08-05 13:34:20 +00:00
foobar 370eecd336 correct blame :) 2003-08-05 12:36:57 +00:00
foobar f89eae47f2 BFN 2003-08-05 12:35:14 +00:00
foobar 3d598476ec MFH: - Fixed bug #21611 (version_compare() does not support "p" suffix) 2003-08-05 12:34:49 +00:00
Moriyoshi Koizumi b7d673db52 MFH(r-1.2): putenv() should be put here as well. 2003-08-05 12:29:41 +00:00
foobar e3d9b17e53 BFN 2003-08-05 11:22:24 +00:00
foobar dfba9a0ab0 MFH 2003-08-05 11:19:35 +00:00
foobar 47e16d8ad6 MFH: - Fixed bug #24936 (ext/fdf is not linked properly when compiled as shared extension). (Jani) 2003-08-05 11:17:25 +00:00
Ilia Alshanetsky f3618527a6 MFH: remove useless variable when mbstring is not used. 2003-08-05 01:01:40 +00:00
Edin Kadribasic ad2fa621bd Sync to LICENSE file in the distro 2003-08-04 22:30:04 +00:00
Sascha Schumann f2565109ea don't overwrite script_path_translated if no PATH_TRANSLATED was received 2003-08-04 19:05:05 +00:00
Ilia Alshanetsky b1a7a8d572 BFN 2003-08-04 17:15:06 +00:00
Ilia Alshanetsky 519c152527 MFH: Fixed bug #23104 (hash position of static arrays not being reset) 2003-08-04 17:14:16 +00:00
foobar 2e783c4dac MFH: Typo fixes 2003-08-04 14:36:52 +00:00
Uwe Schindler e95fbd1f2c MFH 2003-08-04 12:46:38 +00:00
Uwe Schindler fa40ecfec1 MFH 2003-08-03 19:31:13 +00:00
Moriyoshi Koizumi be27697628 MFH(r-1.3): disable the test temporarily because "-d" flags in the command
line doesn't take effect under CGI mode. (See the relevant portion of
cgi_main.c that begins at line 996)
2003-08-03 13:59:48 +00:00
Uwe Schindler 86842904be MFH 2003-08-03 11:23:25 +00:00
Ilia Alshanetsky 2556aa7b2a MFH: Fixed bug #24177 (Status not set correctly after flush() in Apache 2) 2003-08-02 18:30:22 +00:00
Ilia Alshanetsky 9f7f4f5bb8 MFH: Fixed bug #22072 (Apache2 sapis do not detect aborted connections) 2003-08-01 20:21:21 +00:00
Ilia Alshanetsky 85f4e2b191 MFH: Preserve exit status for non-php execution modes. 2003-08-01 16:53:03 +00:00
Ilia Alshanetsky e945608fa4 MFH: Fixed bug #23509 (exit code lost when exit() called from
register_shutdown_function())
2003-08-01 12:29:48 +00:00
foobar d892bf5333 MFH 2003-08-01 11:24:20 +00:00
foobar d3b271d04f hothothot 2003-08-01 10:08:57 +00:00
Ilia Alshanetsky 498c4ce19d Fixed bug #24871 (methods misidentified as constructors) 2003-08-01 02:17:31 +00:00
Ilia Alshanetsky 6f53bb90e4 Added skip condition 2003-08-01 02:15:56 +00:00
Ilia Alshanetsky e57d86daef MFH: Fixed bug #24883 (variables created through register_globals, ignore
gpc_order and variables_order).
2003-07-31 23:00:21 +00:00
Ilia Alshanetsky b050f6e430 MFH: Fixed bug #22154 (Possible crash when memory_limit is reached and
output buffering in addition to session.use_trans_sid is used).
2003-07-31 19:48:05 +00:00
806 changed files with 57460 additions and 29144 deletions

No files matched your search

+4 -5
View File
@@ -136,7 +136,7 @@ STATUS: Experimental
SINCE: 4.0.2
-------------------------------------------------------------------------------
EXTENSION: interbase
PRIMARY MAINTAINER: Jouni Ahto <jouni.ahto@exdec.fi>
PRIMARY MAINTAINER: Jouni Ahto <jouni.ahto@exdec.fi>, Ard Biesheuvel <ard@ard.nu>
MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
@@ -176,7 +176,7 @@ MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: oci8
PRIMARY MAINTAINER: Thies C. Arntzen <thies@thieso.net>
PRIMARY MAINTAINER: Antony Dovgal <tony2001@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
@@ -187,8 +187,7 @@ STATUS: Working
COMMENT: Working
-------------------------------------------------------------------------------
EXTENSION: oracle
PRIMARY MAINTAINER: Thies C. Arntzen <thies@thieso.net>
MAINTENANCE: Maintained
MAINTENANCE: Orphaned
STATUS: Working
COMMENT: Using the new OCI8 driver is encouraged where possible.
-------------------------------------------------------------------------------
@@ -340,7 +339,7 @@ MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: mcrypt
PRIMARY MAINTAINER: Derick Rethans <d.rethans@jdimedia.nl>
PRIMARY MAINTAINER: Derick Rethans <derick@derickrethans.nl>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
+4 -4
View File
@@ -38,10 +38,10 @@ install-sapi: $(OVERALL_TARGET)
install-modules: build-modules
@test -d modules && \
$(mkinstalldirs) $(INSTALL_ROOT)$(EXTENSION_DIR) && \
echo "Installing shared extensions: $(INSTALL_ROOT)$(EXTENSION_DIR)/" && \
rm -f modules/*.la && \
$(INSTALL) modules/* $(INSTALL_ROOT)$(EXTENSION_DIR) >/dev/null 2>&1 || true
$(mkinstalldirs) $(INSTALL_ROOT)$(EXTENSION_DIR)
@echo "Installing shared extensions: $(INSTALL_ROOT)$(EXTENSION_DIR)/"
@rm -f modules/*.la >/dev/null 2>&1
@$(INSTALL) modules/* $(INSTALL_ROOT)$(EXTENSION_DIR)
install-tester:
@echo "Installing regression tester: $(INSTALL_ROOT)$(PEAR_INSTALLDIR)/"
+554 -60
View File
@@ -1,14 +1,490 @@
PHP 4 NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
30 Jul 2003, Version 4.3.3RC2
14 Jul 2004, Version 4.3.8
- Fixed strip_tags() to correctly handle '\0' characters. (Stefan)
- Fixed memory_limit during request startup. (Stefan)
- Replace alloca() with emalloc() for better stack protection. (Ilia)
- Added missing safe_mode checks inside ftok and itpc. (Ilia)
- Fixed bug #28963 (Missing space for \0 in address allocation in IMAP). (Ilia)
- Fixed bug #28632 (Prevent open_basedir bypass via MySQL's LOAD DATA LOCAL).
(Ilia)
03 Jun 2004, Version 4.3.7
- Upgraded bundled GD library to 2.0.23. (Ilia)
- Changed user error handler mechanism to relay to built-in error handler if it
returns false. (Andrei)
- Fixed command line escaping routines for win32. (Ilia)
- Fixed problems with *printf() functions and '%f' formatting. (Marcus)
- Fixed possible crash inside pg_copy_(to|from) function if delimiter is more
then 1 character long. (Ilia)
- Fixed crash inside cpdf_place_inline_image() when working with truecolor
images. (Ilia)
- Fixed handling of return values from storred procedures in mssql_execute()
with multiple result sets returned. (Frank)
- Fixed logic bug in session_register() which allowed registering _SESSION
and/or HTTP_SESSION_VARS. (Sara)
- Fixed bug #28597 (xmlrpc_encode_request() incorrectly encodes chars in
200-210 range). (fernando dot nemec at folha dot com dot br, Ilia)
- Fixed bug #28569 (informix connection id is not thread safe).
(novicky at aarongroup dot cz, Ard)
- Fixed bug #28564 (Problem building informix as a shared extension).
(roques at mti dot ag, Ilia)
- Fixed bug #28508 (Do not make hypot() available if not supported by libc).
(Ilia)
- Fixed bug #28506 (Allow negative start angle in imagearc and imagefilledarc.
(Pierre)
- Fixed bug #28456 (Problem with enclosed / in uploaded files). (Antony)
- Fixed bug #28386 (wordwrap() wraps lines 1 character too soon). (Ilia)
- Fixed bug #28374 (Possible unterminated loop inside
_php_pgsql_trim_message()). (Ilia)
- Fixed bug #28355 (glob() does not return error on Linux when it does not
have permission to open the directory). (Ilia)
- Fixed bug #28289 (incorrect resolving of relative paths by glob() in
windows). (Ilia)
- Fixed bug #28229 (run-tests tripped up by spaces in names). (Marcus)
- Fixed bug #28228 (number_format() does not allow empty decimal separator).
(Ilia)
- Fixed bug #28196 (missing error constants in cURL extension). (Ilia)
- Fixed bug #28187 (parse_url() not handling embedded IPv6 in URLs). (Sara)
- Fixed bug #28175 (build problem for people using FreeType 2.1.0-2.1.2).
(Ilia)
- Fixed bug #28147 (Crash with drawing anti-aliased lines). (Derick)
- Fixed bug #28122 (dba_open db3: Permission denied). (Marcus)
- Fixed bug #28112 (sqlite_query() crashing apache on malformed query). (Ilia,
Marcus)
- Fixed bug #28055 (timeout duration too long in feof()/pfsockopen() liveness
checks). (Wez)
- Fixed bug #28087 (Do not force mysql.trace_mode to 0 on every request).
(Ilia)
- Fixed bug #28042 (greek letters in html to entitity mapping not correct).
(Derick)
- Fixed bug #28007 (compile mssql extension with old versions of FreeTDS
fails). (Frank)
- Fixed bug #27995 (imagefilltoborder() stops the fill process prematurely).
(Ilia)
- Fixed bug #27810 (don't use php's pemalloc in ext/pcre). (Joe Orton)
- Fixed bug #23220 (SSL: fatal protocol error when talking to IIS). (Wez)
15 Apr 2004, Version 4.3.6
- Updated bundled PDFLib library to version 5.0.3p1 in Windows distribution.
(Edin)
- Fixed a crash in multi-threaded environments when a thread is shutdown by
the web server. (Stas)
- Fixed a bug that prevented building of the GD extension against external GD
lib 1.X. (Ilia, Edin, Nick Talbott).
- Synchronized bundled GD library with GD 2.0.22. (Ilia)
- Fixed bug #27963 (Session lifetime setting may leak between requests). (Ilia)
- Fixed bug #27849 (configure craps out on trivial syntax error). (Derick)
- Fixed bug #27822 (is_resource() returns TRUE for closed resources). (Derick)
- Fixed bug #27819 (problems returning reference to a reference parameter).
(Ilia)
- Fixed bug #27809 (ftp_systype returns null on some ftp servers). (Ilia)
- Fixed bug #27802 (default number of children to 8 when PHP_FCGI_CHILDREN is
not defined). (Ilia)
- Fixed bug #27780 (strtotime(+1 xxx) returns a wrong date/time). (Derick)
- Fixed bug #27769 (domxml_xmltree crashes). (Rob)
- Fixed bug #27764 (Get return value from a stored procedure not returning any
result sets). (Frank)
- Fixed bug #27762 (SCO Openserver doesn't have S_ISSOCK). (Wez)
- Fixed bug #27743 (Make sure Money types are converted and returned
correctly). (Frank)
- Fixed bug #27732 (Fixed compilation bug inside php_sab_info.h). (Ilia)
- Fixed bug #27731 (error_reporting() inside @ block fails to set
error_reporting level). (Ilia)
- Fixed bug #27719 (mktime issues on and around DST changeover). (Rasmus)
- Fixed bug #27717 (Test Failures when compiled on 64-bit mode). (Ard, Derick)
- Fixed bug #27687 (Bug Adding Default Charset to 'text/*' Content-Type
Header). (Marcus)
- Fixed bug #27663 (compile failure with cURL 7.11.1). (Ilia)
- Fixed bug #27646 (Cannot serialize/unserialize non-finite numeric values).
(Marcus)
- Fixed bug #26757 (session.save_path default is bogus for win32). (Wez)
- Fixed bug #26589 (Crash inside mssql extension when selecting many columns
of type money). (Frank)
- Fixed bug #25547 (error_handler and array index with function call).
(cschneid at cschneid dot com)
26 Mar 2004, Version 4.3.5
- Fixed possible crash using an invalid color index with a palette image in
imagecolortransparent. (Pierre)
- Fixed php-cgi to not ignore command-line switches when run in a web context.
This fixes our test cases allowing INI with GET sections to work. (Rasmus)
- Fixed getopt() so it works without $_SERVER. (Rasmus, bfrance)
- Fixed crash in php_ini_scanned_files() when no additional INI files were
actually parsed. (Jon)
- Fixed possible crashes inside socket extension, due to missing check inside
allocation functions. (Ilia)
- Fixed zero bytes memory allocation when no extra ini files are found in the
--with-config-file-scan-dir specified directory. (Eric Colinet, Derick)
- Changed "allow_url_fopen" php.ini option to be PHP_INI_SYSTEM. (Sara)
- Improved the sybase_ct module: (Timm)
. Added ability to define a message handler not only globally, but also per
connection.
. Added "sybct.packet_size" php.ini option.
. Changed "sybct.login_timeout" php.ini option changeable at runtime.
. Fixed memory leak in sybase_set_message_handler().
- Synchronized bundled GD library with GD 2.0.17. (Ilia)
- Upgraded PCRE library to version 4.5. (Andrei)
- Updated bundled PostgreSQL library to version 7.4 in Windows distribution.
(Edin)
- Added support for --program-prefix and --program-suffix configure options.
(Jani)
- Added a warning when creating temp stream fails with ftp_(n)list(). (Sara)
- Fixed header handler in NSAPI SAPI module (header->replace was ignored,
send_default_content_type now sends value from php.ini). (Uwe Schindler)
- Fixed bug #27633 (Incorrect EOL translation by ftp_get() in ASCII mode).
(Ilia)
- Fixed bug #27600 (GCC 3.0.4 does not like __attribute__ directive). (Sascha)
- Fixed bug #27590 (crash during shutdown when freeing persistent resources in
ZTS mode). (Ilia)
- Fixed bug #27582 (possible crashes in imagefilltoborder()). (Pierre)
- Fixed bug #27580 (pre-initialization errors in ap2 handler are not being
written to vhost error log). (Ilia)
- Fixed bug #27559 (Corrected open_basedir resolving logic). (Ilia)
- Fixed bug #27530 (broken http auth when safe_mode is on and PCRE is disabled).
(Ilia)
- Fixed bug #27509 (broken getaddrinfo() causes fsockopen() error). (Sara)
- Fixed bug #27505 (htmlentities() does not handle BIG5 correctly). (Ilia,
ywliu at hotmail dot com)
- Fixed bug #27498 (bogus safe_mode error on nonexistent directories for
chdir() and opendir() functions). (Ilia)
- Fixed bug #27460 (base64_decode() does not handle extra padding).
(Ilia, naish at klanen dot net)
- Fixed bug #27443 (defined() returns wrong type). (Derick)
- Fixed bug #27437 (wrong freetype include inside GD library). (Ilia)
- Fixed bug #27424 (headers missing on flush() in apache 2 SAPIs). (Ilia)
- Fixed bug #27421 (mbstring.func_overload should be system ini setting).
(Ilia)
- Fixed bug #27384 (unpack() misbehaves with 1 char string). (GeorgeS)
- Fixed bug #27383 (Potential crash inside fopen_wrapper, while
parsing response code). (Ilia)
- Fixed bug #27354 (Modulus operator crashes PHP). (Derick)
- Fixed bug #27341 (HEAD requests fail to return data). (Ilia)
- Fixed bug #27337 (missing sapi_shutdown() in sapi/isapi causes memory leak).
(Jani, msisolak at yahoo dot com)
- Fixed bug #27328 (ftp extension relies on 32-bit longs). (Sara)
- Fixed bug #27300 (Improved regex for pg_convert()).
(benjcarson at digitaljunkies dot ca, Ilia)
- Fixed bug #27295 (memory leak inside sscanf()). (Ilia)
- Fixed bug #27293 (two crashes inside image2wbmp()). (Ilia)
- Fixed bug #27291 (get_browser matches browscap.ini patterns incorrectly).
(Jay)
- Fixed bug #27278 (*printf() functions treat arguments as if passed by
reference). (Ilia)
- Fixed bug #27238 (iptcparse() function misses some fields). (Pierre)
- Fixed bug #27235 (Interbase NUMERIC x.0 field returns empty string on 0).
(Ard)
- Fixed bug #27196 (Missing content_length initialization in apache 2 sapis).
(Ilia, pdoru at kappa dot ro)
- Fixed bug #27183 (userland stream wrapper segfaults on stream_write).
(Moriyoshi)
- Fixed bug #27175 (tzset() is not being called by PHP on startup).
(Ilia, sagawa at sohgoh dot net)
- Fixed bug #27172 (Possible floating point exception in gmp_powm()).
(Ilia)
- Fixed bug #27171 (crash inside gmp_hamdist()). (Jani)
- Fixed bug #27157 (Compile Failure on Solaris 8). (Timm)
- Fixed bug #27149 (broken CLOB support in oci8 extension). (Antony)
- Fixed bug #27135 (Possible crash inside mb_strlen()). (Moriyoshi)
- Fixed bug #27104 (CLI/CGI SAPI module variable name conflict). (Marcus)
- Fixed bug #27058 (crash in sybase_connect() with 2 arguments). (Ilia)
- Fixed bug #27056 (ints used instead of longs inside some GD functions).
(Ilia)
- Fixed bug #27040 (passing an array of form-fields to CURLOPT_POSTFIELDS
does not work). (Ilia, Jani)
- Fixed bug #27037 (fixed possible crash in apache2handler output code).
(Ilia)
- Fixed bug #27026 (Added "cgi.nph" php.ini option to allow forcing of the
'Status: 200' header that is not normally needed). (Ilia)
- Fixed bug #27011 (64bit int/long confusion in preg_match*() functions).
(Ilia)
- Fixed bug #27007 (missing connection closure when connect fails in pgsql).
(Ilia)
- Fixed bug #26974 (rename() doesn't check the destination file against
safe_mode/open_basedir). (Ilia)
- Fixed bug #26973 (*printf() '+' modifier broken). (Jani)
- Fixed bug #26969 (--with-openssl=shared build fails). (Jani)
- Fixed bug #26968 (Segfault with Interbase module built as shared). (Ard)
- Fixed bug #26949 (rand(min,max) always returns min when ZTS enabled). (Jani)
- Fixed bug #26937 (Warning in xml.c). (Jani)
- Fixed bug #26927 (preg_quote() does not escape \0). (Ilia)
- Fixed bug #26923 (ext/imap: pam and crypt libraries missing when build as
shared extension). (Jani)
- Fixed bug #26909 (crash in imap_mime_header_decode() when no encoding is
used). (Ilia)
- Fixed bug #26896 (ext/ftp does not work as shared extension). (Jani)
- Fixed bug #26892 (ORA-21301 in ocinewcollection() call). (Antony)
- Fixed bug #26878 (problem with multiple references to the same variable with
different types). (Ilia)
- Fixed bug #26864 (pg_(update|delete) ignore PGSQL_DML_EXEC option). (Ilia)
- Fixed bug #26862 (ob_flush() followed by output_reset_rewrite_vars() may
result in data loss). (Ilia, scottmacvicar at ntlworld dot com)
- Fixed bug #26847 (memory leak in mail() when to/subject contain only spaces).
(Ilia)
- Fixed bug #26814 (When included file has a parse error, terminate script
execution). (Ilia)
- Fixed bug #26777 (ext/interbase: Let DB handle NULL params). (Ard)
- Fixed bug #26772, #26967 (file operations return NULL instead of FALSE).
(Wez, Ilia)
- Fixed bug #26758 (FastCGI exits immediately with status 255).
(Ilia, tcarter at noggin dot com dot au)
- Fixed bug #26755 (CLI now overrides php.ini settings and switches off output
buffering). (Edin)
- Fixed bug #26753 (zend_fetch_list_dtor_id() doesn't check NULL strings).
(Jani, Markus dot Lidel at shadowconnect dot com)
- Fixed bug #26752 (Silent unterminated loop when length parameter for fgets(),
fread() and fgetss() is 0). (Ilia)
- Fixed bug #26751 (PHP can't find the MySQL socket on a case sensitive file
system). (Derick)
- Fixed bug #26703 (Certain characters inside strings incorrectly treated
as keywords). (vrana [at] php [dot] net, Ilia)
- Fixed bug #26699 (mbstring doesn't identify "binary" as a valid encoding).
(nirva-php at ishiboo dot com, Moriyoshi)
- Fixed bug #26667 (Added safety checks to ip2long()). (Ilia)
- Fixed bug #26653 (open_basedir incorrectly resolved on win32).
(Ilia, scottmacvicar at ntlworld dot com)
- Fixed bug #26639 (mb_convert_variables() clutters variables beyond the
references). (Moriyoshi)
- Fixed bug #26635 (fixed look up for fonts in the current directory w/ZTS).
(Ilia)
- Fixed bug #26625 (pg_convert sets NULL incorrectly for character data types).
(Ilia)
- Fixed bug #26604 (Apache2 SAPIs implicitly disable Keep-Alive). (Ilia)
- Fixed bug #26595 (ext/domxml: XSLT_NAMESPACE undeclared). (Christian)
- Fixed bug #26565 (strtotime("this month") resolving to the wrong month).
(Jani)
- Fixed bug #26564 (ncurses5 has headers in PREFIX/include/ncurses/). (Jani)
- Fixed bug #26548 (ext/session: Malformed HTTP dates headers). (Derick)
- Fixed bug #26531 (ext/domxml: get_elements_by_tag_name() wildcard fails).
(Rob Richards)
- Fixed bug #26488 (Missing declaration of CRTSCTS in ext/dio/dio.c). (Jani)
- Fixed bug #26467 (flock() does not force the "wouldblock" parameter to be
passed by reference). (Wez)
- Fixed bug #26463 (Incorrect handling of semicolons after heredoc). (Ilia)
- Fixed bug #26462 (phpize + ext/bcmath -> compile error). (Jani)
- Fixed bug #26461 (-lssl missing from LIBS). (Jani)
- Fixed bug #26458 (var_dump(), var_export(), debug_zval_dump() not binary safe
for array keys). (Ilia)
- Fixed bug #26447 (--with-openssl=shared causes compile errors). (Jani)
- Fixed bug #26446 (domxml_open_file() returns an empty error-Array). (Rob)
- Fixed bug #26440 (MFH missing context options). (Ilia)
- Fixed bug #26438 (error in thttpd SAPI installation). (Jani)
- Fixed bug #26415 (Updated bundled OpenSSL DLLs in the Windows distribution
to 0.9.7c). (Edin)
- Fixed bug #26407 (Result set fetching broken around transactions). (Timm)
- Fixed bug #26391 (parse_url() destroys strings that contain a character in
range of \x80-\xff)). (Moriyoshi)
- Fixed bug #26384 (crash in domxslt->process()). (Christian)
- Fixed bug #26381 (rand() without srand() doesn't work with certain php.ini).
(Jani)
- Fixed bug #26376 (typo in ext/odbc/config.m4: DBMaker test fails). (Jani)
- Fixed bug #26355 (flock() doesn't initialize the wouldblock argument). (Ilia)
- Fixed bug #26309 (Fixed argument parsing for imageftbbox()). (Ilia)
- Fixed bug #26304 (Unexpected data loss when opening dba file). (Marcus)
- Fixed bug #26285 (escapeshellarg() uses wrong quotes on windows). (Ilia)
- Fixed bug #26267 (gmp_random() leaks memory and does not produce random
numbers). (Jani)
- Fixed bug #26253 (ext/tokenizer: build as shared extension fails). (Jani)
- Fixed bug #26235 (yp_first/yp_next do not specify correct key length). (Ilia)
- Fixed bug #26216 ("getimagesize(): stream does not support seeking" when
using remote files). (Marcus)
- Fixed bug #26201 (crash in ibase_trans() on invalid link handle). (Ilia)
- Fixed bug #26198 (strtotime() handling of M/F Y date format). (Ilia)
- Fixed bug #26194 (iconv() not properly defined with libiconv).
(Steph, Frank, Moriyoshi)
- Fixed bug #26176 (Fixed handling of numeric keys in INI files). (Ilia)
- Fixed bug #26168 (shtool availability check in phpize).
(robbat2 at gentoo dot org, Ilia)
- Fixed bug #26148 (Print the notice before modifying variable on type
mismatch). (morten-bugs dot php dot net at afdelingp dot dk, Ilia)
- Fixed bug #26128 (mbstring prints out wrong information on phpinfo()).
(Moriyoshi)
- Fixed bug #26113 (remove leftover local file when ftp_get/ftp_nb_get
fails). (Ilia)
- Fixed bug #26105 (Compile failure on GCC version 3.0.X). (Ilia)
- Fixed bug #26103 (ext/mime_magic causes compile failure in ext/mssql). (Jani)
- Fixed bug #26097 (gdImageColorClosestAlpha() returns incorrect results).
(sprice at wisc dot edu, Ilia)
- Fixed bug #26042 (memory leak if mcrypt_generic_deinit() is not called after
every mcrypt_generic_init() call). (Ilia)
- Fixed bug #26025 (Segfault on glob() without GLOB_NOCHECK or GLOB_NOMAGIC
under *BSD platforms). (Moriyoshi)
- Fixed bug #26005 (Random "cannot change the session ini settings" errors).
(Jani, jsnajdr at kerio dot com)
- Fixed bug #26003 (Make fgetcsv() binary safe). (Ilia, Moriyoshi)
- Fixed bug #25963 (PostgreSQL error message include \n characters).
(Marcus, Ilia)
- Fixed bug #25939 (feof() not working correctly for sockets). (Wez)
- Fixed bug #25916 (get_browser() -> PHP Fatal error: Nesting level too
deep - recursive dependency?). (Uwe Schindler)
- Fixed bug #25794 (Cannot open existing hash db3 file with write" ext/dba).
(Marcus)
- Fixed bug #25753 (php.ini settings "leak" from vhosts/.htaccess files).
(Patch by: rover at tob dot ru)
- Fixed bug #25694 (round() and number_format() give inconsistent results).
(Ilia)
- Fixed bug #25664 (calling ITypeInfo::Invoke with bogus params). (Wez)
- Fixed bug #25581 (getimagesize () return incorrect values on bitmap (os2)
files). (Marcus)
- Fixed bug #25329 (sqlite_create_function with method and reference to
$this). (Marcus).
- Fixed bug #24773 (unsetting string as array causes a crash). (Sara)
- Fixed bug #24773 (Unsetting string offsets crashes PHP). (Moriyoshi, Sara)
- Fixed bug #24582 (extensions can't be loaded dynamically in Solaris/iPlanet).
(Jani)
- Fixed bug #23467 (date('T') outputs incorrect Time Zone).
(Jani, scottmacvicar at ntlworld dot com)
- Fixed bug #22403 (PHP crashes when executing a sql procedure without
parameters). (Timm)
- Fixed bug #22127 (Invalid response code when force-cgi-redirect safety
mechanism is triggered). (Ilia, scottmacvicar at ntlworld dot com)
- Fixed bug #21760 (Use of uninitialized pointer inside php_read()).
(Ilia, uce at ftc dot gov)
- Fixed bug #21513 (shutdown functions not executed if timed out). (Zeev)
- Fixed bug #21070 (ftp_genlist/ANSI-tmpfile() fail w/ some platform). (Sara)
3 Nov 2003, Version 4.3.4
- Made MCVE extension available on win32. (Jani)
- Upgraded bundled libfcgi and made FastCGI support viable on Win32. (Sascha)
- Added apache_get_version() function. (Ilia)
- Fixed disk_total_space() and disk_free_space() under FreeBSD. (Jon Parise)
- Fixed crash bug when non-existing save/serializer handler was used. (Jani)
- Fixed memory leak in gethostbynamel() if an error occurs. (Sara)
- Fixed FastCGI being unable to bind to a specific IP. (Sascha)
- Fixed multibyte regex engine to properly handle ".*" pattern under
POSIX compatible mode. (K.Kosako <kosako at sofnec.co.jp>, Moriyoshi)
- Fixed bug #25955 (Compile failure on MacOSX 10.3 Panther). (Marko, Dan)
- Fixed bug #25923 (mail() modifies the to & subject arguments). (Ilia)
- Fixed bug #25922 (Crash in error handler when 5th argument is modified).
(Ilia)
- Fixed bug #25918 (Possible crash in mime_content_type()). (Ilia)
- Fixed bug #25900 (document->get_elements_by_tag_name with default xmlns).
(Rob)
- Fixed bug #25895 (Incorrect detection of safe_mode limited ini options).
(Ilia)
- Fixed bug #25888 (Crash of php.exe when xpath_eval of a namespace). (Rob)
- Fixed bug #25836 (last key of multi-dimensional array passed via GPC not
being escaped when magic_quotes_gpc is on). (Ilia)
- Fixed bug #25825 (tzset() was not called to reset libc environment on
request shutdown). (Wez)
- Fixed bug #25814 (Make flock() return correct value when 3rd argument is
used). (Ilia)
- Fixed bug #25800 (parse_url() could not parse urls with empty port). (Ilia)
- Fixed bug #25780 (ext/session: invalid "session.cookie_lifetime" makes
session_start() to crash in win32). (Jani)
- Fixed bug #25777 (Do not rtrim() of text fields fetched from mssql). (Ilia)
- Fixed bug #25770 (Segfault with PHP and bison 1.875).
(eggert@gnu.org, Marcus)
- Fixed bug #25764 (ldap_get_option() crashes with unbound ldap link). (Jani)
- Fixed bug #25758 (var_export does not escape ' & \ inside array keys).
(Ilia)
- Fixed bug #25752 (ext/ncurses: ncurses.h instead of curses.h with BSD).
(Jani)
- Fixed bug #25746 (Do not bail out when unable to chdir original dir on
systems with broken getcwd()). (Ilia)
- Fixed bug #25745 (ctype functions fail with non-ascii characters).
(Moriyoshi)
- Fixed bug #25744 (make ZTS build of ext/sybase compile). (Ilia)
- Fixed bug #25738 (alloca() related issues on the Darwin platform).
(Moriyoshi)
- Fixed bug #25708 (extract($GLOBALS, EXTR_REFS) mangles $GLOBALS).
(Moriyoshi)
- Fixed bug #25707 (html_entity_decode() over-decodes &amp;lt;). (Moriyoshi)
- Fixed bug #25703 (openssl configure check failed). (Jani)
- Fixed bug #25701 (On flush() set headers_sent in apache2handler). (Ilia)
- Fixed bug #25671 (str_replace() corrupts subarrays). (Sara)
- Fixed bug #25669 (eregi() with non-ascii characters). (Moriyoshi)
- Fixed bug #25665 (var_dump() hangs on Nan and INF). (Ilia)
- Fixed bug #25648 (xslt_set_encoding() not detected correctly). (Jani)
- Fixed bug #25636 (SNMP Session not closed on success).
(Ilia, patch by: nesslage at mwsc dot edu)
- Fixed bug #25635 (Make "make tests" to fail due to invalid include_path).
(Ilia)
- Fixed bug #25604 (HAVE_SNMP_PARSE_OID undefined with phpize build). (Jani)
- Fixed bug #25583 (Incorrect handling of paths starting with "/" on win32
inside glob() function). (Ilia)
- Fixed bug #25570 (Possible crash in apache2handler when zend_bailout called
outside of zend_try {} block). (Ilia)
- Fixed bug #25558 (ext/dbase: reverted fix for bug #23463). (Vlad)
- Fixed bug #25530 (checkdate() incorrectly handles floats). (Ilia)
- Fixed bug #25525 (ldap_explode_dn() crashes when passed invalid dn).
(Sara, patch by: mikael dot suvi at trigger dot ee)
- Fixed bug #25504 (pcre_match_all() crashes when passed only 2 parameters).
(Jani)
- Fixed bug #25483 (ext/informix: bogus -469 error from ifx_query()).
(Jani, patch by: denisov at kubsu dot ru)
- Fixed bug #25463 (ext/cpdf: compile failure with bundled GD)
- Fixed bug #25429 (fix copying of stdin using copy() function). (Ilia)
- Fixed bug #25424 (ext/informix: lvarchar not supported in win32). (Jani)
- Fixed bug #25404 (ext/pgsql: open transactions not closed when script ends).
(Marcus)
- Fixed bug #25385 (ob_gzhandler(): typo in sapi_add_header_ex() call). (Jani)
- Fixed bug #25378 (unserialize() crashes with invalid data). (Jani)
- Fixed bug #25372 (sscanf() does not work with %X). (Jani)
- Fixed bug #25348 ("make install" fails with --enable-short-tags). (Jani)
- Fixed bug #25343 (is_dir() gives warning on FreeBSD). (Jani)
- Fixed bug #25333 (Possible body corruption & crash in win32 mail()). (Ilia)
- Fixed bug #25316 (Possible infinite loop inside _php_stream_write()). (Ilia)
- Fixed bug #25314 (FTP_ASCII mode behaving like binary from Win->Unix).
(Sara)
- Fixed bug #25308 (php -m crashes when zend extensions are loaded). (Stas)
- Fixed bug #25307 (Crash with WDDX serializer). (Sascha, Jani)
- Fixed bug #25295 (QNX6: php_ini.c:414: 'alphasort' undeclared). (Jani)
- Fixed bug #25294 (ext/ftp: NLST failure leads to crash on exit). (Sara, Rob)
- Fixed bug #25293 (Output correct EOL to error_log). (Ilia)
- Fixed bug #25239 (ftp_fopen_wrapper not RFC compliant). (Sara)
- Fixed bug #25218 ("deflate" compressed pages had a gzip header). (Stefan)
- Fixed bug #25211 (image.c compile failure with AIX). (Marcus)
- Fixed bug #25166 (WDDX serializer handler missing in win32). (Jani)
- Fixed bug #25109 (Possible crash when fetching field names in pgsql). (Ilia)
- Fixed bug #25106 (Added more stringent checks on bzopen() mode). (Ilia)
- Fixed bug #25070 (unlock session files on win32 before closing them). (Ilia)
- Fixed bug #24402 (Compile failure with gettext 0.12.x). (Jani)
- Fixed bug #23488 (zlib.output_compression overrides Vary header). (Stefan)
- Fixed bug #23326 (ext/domxml: Attributes via append_child not supported).
(Melvyn)
- Fixed bug #21220 (Wrong Apache version shown in phpinfo() output). (Jani)
- Fixed bug #18534 (ifx_close() leaves open session). (nobbie@php.net)
- Fixed bug #14049 (realpath() returns invalid results for non-existent
paths). (Ilia)
25 Aug 2003, Version 4.3.3
- Upgraded the bundled Expat library to version 1.95.6. (Jani)
- Upgraded the bundled PCRE library to version 4.3. (Andrei)
- Upgraded the bundled GD library to version GD 2.0.15. (Ilia)
- Improved the engine to use POSIX/socket IO where feasible. (Sascha)
- Improved the IMAP extension (Ilia)
. Added imap_timeout() function. (bug #24161)
. Added optional 'charset' parameter to imap_search() and imap_sort().
(bug #22505)
- Improved the InterBase extension (Daniela)
. Added transaction constants: IBASE_REC_VERSION, IBASE_REC_NO_VERSION,
IBASE_WRITE, IBASE_WAIT and IBASE_CONCURRENCY. (bugs #8797, #23887)
. Made numeric/decimal datatype handling work on any platform.
- Improved the NSAPI SAPI module (Uwe Schindler)
. Added possibility to use PHP to generate HTTP error pages (404 Not Found..)
. Added possibility to use PHP to generate directory listings for directories
without index.html
- Upgraded the bundled Expat library to version 1.95.6. (Jani)
- Upgraded the bundled PCRE library to version 4.3. (Andrei)
. php4_init (magnus.conf): new parameter to set alternate path to php.ini.
(php_ini="/path/to/php.ini")
. php4_execute (obj.conf): support for additional php.ini values.
Allows different settings per virtual server.
(See sapi/nsapi/nsapi-readme.txt for more information)
. Added support for virtual().
. Added nsapi_request_headers() and nsapi_response_headers() with aliases
for apache compatibility.
. Added "nsapi.read_timeout" php.ini option.
. Synced $_SERVER variables to be similar to Apache variables.
- Added DBA handler 'inifile' to support ini files. (Marcus)
- Added a "DEBUG" note to 'php -v' output when --enable-debug is used. (Derick)
- Added long options into CLI & CGI (e.g. --version). (Marcus)
- Added a new parameter to preg_match*() that can be used to specify
the starting offset in the subject string to match from. (Andrei)
- Fixed possible integer overflows in:
. base64_encode(). (Moriyoshi)
. bundled GD library. (Ilia)
- Fixed "mysql.connect_timeout" php.ini option to be settable with ini_set().
(Rasmus)
- Fixed FastCGI IIS document root problem. (Shane)
- Fixed corruption of multibyte character including 0x5c as second
byte in multipart/form-data. (Rui)
@@ -19,11 +495,36 @@ PHP 4 NEWS
- Fixed certificate version and allowed setting of the serial number in
openssl_csr_sign(). (Stefan Roehrich)
- Fixed each() to be binary safe for keys. (Zeev)
- Fixed ext/yaz to not log if "yaz.log_file" php.ini option is not set. (Adam)
- Fixed a bug in bundled libmysql (mysql bug #564). (Georg)
- Fixed ext/exif to honor "magic_quotes_runtime" php.ini option. (Marcus)
- Fixed bug #25093 (ext/pgsql: Various leaks due to non-freed queries). (Ilia)
- Fixed bug #25084 (ext/session: Fixed session.referer_check to be independent
on register_globals). (Ilia)
- Fixed bug #25081 (odbc_fetch_array() may mangle numeric fields). (Ilia)
- Fixed bug #25044 (header("Location:") changing HTTP status). (Marcus)
- Fixed bug #25037 (win32 mail(): Possible infinite loop inside SendText()).
(Ilia)
- Fixed bug #25007 (rand() & mt_rand() seed RNG every call). (Jani)
- Fixed bug #24989 (external libexpat conflicts with bundled libexpat). (Jani)
- Fixed bug #24980 (array_reduce() uses first element as default running
total). (Ilia)
- Fixed bug #24977 (Reverted mysql_select_db() optimization). (Ilia)
- Fixed bug #24958 (Apache2 SAPIs: Incorrect handling of 404s). (Ilia, Justin)
- Fixed bug #24951 (ob_flush() needlessly destroys output handler). (Ilia)
- Fixed bug #24936 (ext/fdf not linked properly as shared extension). (Jani)
- Fixed bug #24909 (Bad random numbers with ZTS builds on Solaris). (Ilia)
- Fixed bug #24897 (inconsistent behavior of shuffle() & array_multisort()).
(Ilia, Jani)
- Fixed bug #24883 ("variables_order" and "gpc_order" being ignored). (Ilia)
- Fixed bug #24873 (incorrect handling of / inside open_basedir). (Ilia)
- Fixed bug #24871 (aggregate(): methods misidentified as constructors). (Ilia)
- Fixed bug #24827 (ob_gzhandler overrides Vary header). (Ilia)
- Fixed bug #24792 (--enable-zend-multibyte causes random segfaults with ZTS).
(Fujimoto)
- Fixed bug #24783 (foreach($ar as $key => $val), $key not binary safe). (Zeev)
- Fixed bug #24760 (non-default SNMP port number not working). (Jani)
- Fixed bug #24752 (Unhandled "uniqueidentifier" field type).
- Fixed bug #24752 (Unhandled "uniqueidentifier" field type).
(Ilia, s.sonnenberg[at]coolspot.de)
- Fixed bug #24710 (Crash when $obj->{0} is used). (Zeev)
- Fixed bug #24663 (\n. sequences were not being escaped). (Ilia)
@@ -31,14 +532,14 @@ PHP 4 NEWS
(Marcus)
- Fixed bug #24629 (FreeBSD select() does not like large microseconds values).
(Mirco Bauer).
- Fixed bug #24609 (ext/domxml: segfault when using replace node across
- Fixed bug #24609 (ext/domxml: segfault when using replace node across
different docs). (Rob Richards)
- Fixed bug #24594 (Rewrite of the imagefill() function). (Pierre-Alain Joye)
- Fixed bug #24592 (NULL related crash in session extension). (Sascha)
- Fixed bug #24573 (debug_backtrace() crashes if $this set to null). (Jani)
- Fixed bug #24560 (parse_url() incorrectly handling certain file:// based
- Fixed bug #24560 (parse_url() incorrectly handling certain file:// based
schemas). (Ilia)
- Fixed bug #24557 (make fclose() respect refcount on the resource).
- Fixed bug #24557 (make fclose() respect refcount on the resource).
(Wez, Ilia)
- Fixed bug #24537 (apache2 compile misses some include directories). (Jani)
- Fixed bug #24535 (ext/mysql: crash when retrieving data from unbuffered
@@ -50,72 +551,30 @@ PHP 4 NEWS
(gereon.steffens[at]onvista.de, Ilia)
- Fixed bug #24284 (Fixed memory leak inside pg_ping()). (Ilia)
- Fixed bug #24249 (fdf_add_doc_javascript() not available on Windows). (Edin)
- Fixed bug #24063 (scientific notation broken in *printf()). (Ilia)
- Fixed bug #24028 (Reading raw post message by php://input failed). (Jani)
- Fixed bug #24009 (FastCGI handling of file not found). (Shane)
- Fixed bug #23808 (broken imagecopymerge()). (Pierre-Alain Joye)
- Fixed bug #23798 (Spaces were not being stripped from Bcc header). (Ilia)
- Fixed bug #23792 (imagerotate() problems with limited platte, the function
will always return true color image from now on). (Pierre-Alain Joye)
- Fixed bug #23664 (FastCGI socket listenting). (Shane)
- Fixed bug #23685 (fake values returned when OID value is an empty string).
(Jani)
- Fixed bug #22690 (ob_start() did not work with create_function() callbacks).
(Marcus)
- Fixed bug #21855 (Threading issue on HP-UX). (Roshan Naik, Andi, Moriyoshi)
- Fixed bug #21074 (Apache2: "ErrorDocument xxx /error.php" broken). (Jani)
- Fixed bug #19613 (putenv("VAR=") does not empty VAR on win32). (Zeev)
- Fixed bug #13142 (strtotime not handling "M d H:i:s Y" format). (Ilia)
- Fixed bug #11924 (ibase_query(), ibase_execute() mangled passed parameters).
(Jani)
19 Jun 2003, Version 4.3.3RC1
- Synchronized bundled GD library with GD 2.0.15. (Ilia)
- Improved the engine to use POSIX/socket IO where feasible. (Sascha)
- Improved the NSAPI SAPI module (Uwe Schindler)
. php4_init (magnus.conf): new parameter to set alternate path to php.ini.
(php_ini="/path/to/php.ini")
. php4_execute (obj.conf): support for additional php.ini values.
Allows different settings per virtual server.
(See sapi/nsapi/nsapi-readme.txt for more information)
. Added support for virtual().
. Added nsapi_request_headers() and nsapi_response_headers() with aliases
for apache compatibility.
. Added "nsapi.read_timeout" php.ini option.
. Synced $_SERVER variables to be similar to Apache variables.
- Improved the IMAP extension (Ilia)
. Added imap_timeout() function. (bug #24161)
. Added optional 'charset' parameter to imap_search() and imap_sort().
(bug #22505)
- Improved the InterBase extension (Daniela)
. Added transaction constants: IBASE_REC_VERSION, IBASE_REC_NO_VERSION,
IBASE_WRITE, IBASE_WAIT and IBASE_CONCURRENCY. (bugs #8797, #23887)
. Made numeric/decimal datatype handling work on any platform.
- Added DBA handler 'inifile' to support ini files. (Marcus)
- Added a "DEBUG" note to 'php -v' output when --enable-debug is used. (Derick)
- Added long options into CLI & CGI (e.g. --version). (Marcus)
- Fixed possible integer overflows in:
. base64_encode(). (Moriyoshi)
. bundled GD library. (Ilia)
- Fixed "mysql.connect_timeout" php.ini option to be settable with ini_set().
(Rasmus)
- Fixed ext/yaz to not log if "yaz.log_file" php.ini option is not set. (Adam)
- Fixed a bug in bundled libmysql (mysql bug #564). (Georg)
- Fixed ext/exif to honor "magic_quotes_runtime" php.ini option. (Marcus)
- Fixed bug #24224 (ibase_blob_get() overflow). (Ard)
- Fixed bug #24223 (missing variable initialization in bundled gd). (Ilia)
- Fixed bug #24220 (range() didn't handle numeric strings correctly). (Ilia)
- Fixed bug #24210 (not detecting assume_default_colors - typo). (Sara)
- Fixed bug #24198 (Invalid recursion detection in array_merge_recurcive()).
(Ilia)
- Fixed bug #24177 (Apache2 SAPIs: status set incorrectly after flush()).
(Ilia)
- Fixed bug #24155 (gdImageRotate270 incorrectly use x parameter for y axis).
(tom@gksystems.com, Ilia)
- Fixed bug #24150 (crash in imap_fetch_overview() &
- Fixed bug #24150 (crash in imap_fetch_overview() &
imap_rfc822_write_address()). (Ilia)
- Fixed bug #24142 (workaround for a gcc bug affecting round()). (Marcus, Ilia)
- Fixed bug #24063 (serialize() missing 0 after the . on scientific notation).
(Marcus, Ilia)
- Fixed bug #24063 (scientific notation broken in *printf()). (Ilia)
- Fixed bug #24060 (ncurses_del_panel() causes segfault). (Georg)
- Fixed bug #24054 (Integer overflow failure with GCC/x86 for *=). (Sascha)
- Fixed bug #24028 (Reading raw post message by php://input failed). (Jani)
- Fixed bug #24009 (FastCGI handling of file not found). (Shane)
- Fixed bug #24007 (Problem with register_globals & arrays). (Ilia)
- Fixed bug #23951 (constants in static initializers clobbered by inheritance).
(Wez, Zend Engine)
- Fixed bug #23936 (ext/interbase: fail to select and fetch). (Ard)
- Fixed bug #23913 (make rename() work across partitions on *nix). (Ilia)
- Fixed bug #23912 (Invalid CSS in phpinfo() output). (Ilia)
- Fixed bug #23902 (NULL in CGI header output). (Shane)
@@ -124,15 +583,50 @@ PHP 4 NEWS
- Fixed bug #23897 (Fixed a check for mbfilter_ru.h). (aleks@m2media.ru, Ilia)
- Fixed bug #23894 (sprintf() decimal specifiers problem). (Moriyoshi)
- Fixed bug #23888 (Missing input validation for flags parameter). (Ilia)
- Fixed bug #23808 (broken imagecopymerge()). (Pierre-Alain Joye)
- Fixed bug #23798 (Spaces were not being stripped from Bcc header). (Ilia)
- Fixed bug #23792 (imagerotate() problems with limited platte, the function
will always return true color image from now on). (Pierre-Alain Joye)
- Fixed bug #23779 (mysql_connect(): disable local infile option if php.ini
option "open_basedir" is set). (Georg)
- Fixed bug #23769 (In FreeBSD glob() gives wrong result when pattern not
found). (Hartmut)
- Fixed bug #23733 (Coredump on startup with Oracle 9+). (Edin)
- Fixed bug #23685 (fake values returned when OID value is an empty string).
(Jani)
- Fixed bug #23664 (FastCGI socket listenting). (Shane)
- Fixed bug #23509 (exit code lost when exit() called from
register_shutdown_function()). (Ilia)
- Fixed bug #23463 (ext/dbase: added Dbase2 version check). (Vlad Krupin)
- Fixed bug #23285 (Potential Stack overflow in zendlex). (Wez)
- Fixed bug #23104 (hash position of static arrays not being reset). (Ilia)
- Fixed bug #23038, #23574 (aggregate() related leaks and crashes). (Andrei)
- Fixed bug #22947 (Ack() inside win32/sendmail.c may stall in certain
situations). (Ilia)
- Fixed bug #22690 (ob_start() did not work with create_function() callbacks).
(Marcus)
- Fixed bug #22592 (Cascading assignments to strings with curly braces broken).
(Stas)
- Fixed bug #22245 (References inside $_SESSION not being handled). (Ilia)
- Fixed bug #22154 (Possible crash when memory_limit is reached and output
buffering in addition to session.use_trans_sid is used). (Ilia)
- Fixed bug #22072 (Apache2 sapis do not detect aborted connections). (Ilia)
- Fixed bug #21958 (workaround for unusual realpath() on AIX & Tru64). (Ilia)
- Fixed bug #21957 (serialize() mangles objects with __sleep). (Ilia)
- Fixed bug #21918 (strange behaviour of mixed type in array-keys). (Marcus)
- Fixed bug #21855 (Threading issue on HP-UX). (Roshan Naik, Andi, Moriyoshi)
- Fixed bug #21611 (version_compare() does not support "p" as suffix).
(Stefan Walk)
- Fixed bug #21074 (Apache2: "ErrorDocument xxx /error.php" broken). (Jani)
- Fixed bug #20896 (-s -w modes with php-cli cause php to hang). (Ilia)
- Fixed bug #19613 (putenv("VAR=") does not empty VAR on win32). (Zeev)
- Fixed bug #18744 (ibase_blob_add() has max limit of 64k). (Ard)
- Fixed bug #18291 (escapeshellcmd() can now handle quoted arguments). (Ilia)
- Fixed bug #17414 (pthreads bug workaround). (timo.teras[at]iki.fi)
- Fixed bug #13142 (strtotime not handling "M d H:i:s Y" format). (Ilia)
- Fixed bug #11924 (ibase_query(), ibase_execute() mangled passed parameters).
(Jani)
- Fixed bug #7014 (crash in _php_ibase_error() after request shutdown). (Ard)
29 May 2003, Version 4.3.2
- Syncronized bundled GD library with GD 2.0.12. (Ilia)
-3
View File
@@ -1,3 +0,0 @@
- clean up .cvsignores
- purge Makefile.ins and replace PHP_EXTENSION in config.m4s
with appropiate calls to PHP_NEW_EXTENSION
+12 -1
View File
@@ -157,7 +157,16 @@ TSRM_API void tsrm_shutdown(void)
int j;
next_p = p->next;
for (j=0; j<id_count; j++) {
for (j=0; j<p->count; j++) {
/* Disabled - calling dtors in tsrm_shutdown makes
modules registering TSRM ids to crash, if they have
dtors, since the module is unloaded before tsrm_shutdown
is called. Can be re-enabled after tsrm_free_id is
implemented.
if (resource_types_table && resource_types_table[j].dtor) {
resource_types_table[j].dtor(p->storage[j], &p->storage);
}
*/
free(p->storage[j]);
}
free(p->storage);
@@ -181,6 +190,7 @@ TSRM_API void tsrm_shutdown(void)
#if defined(GNUPTH)
pth_kill();
#elif defined(PTHREADS)
pthread_setspecific(tls_key, 0);
pthread_key_delete(tls_key);
#elif defined(TSRM_WIN32)
TlsFree(tls_key);
@@ -481,6 +491,7 @@ TSRM_API void tsrm_mutex_free(MUTEX_T mutexp)
if (mutexp) {
#ifdef TSRM_WIN32
DeleteCriticalSection(mutexp);
free(mutexp);
#elif defined(NETWARE)
NXMutexFree(mutexp);
#elif defined(GNUPTH)
+3 -2
View File
@@ -95,14 +95,15 @@ 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.],[
[ --with-tsrm-pth[=pth-config]
Use GNU Pth.],[
TSRM_PTH=$withval
],[
TSRM_PTH=no
])
AC_ARG_WITH(tsrm-st,
[ --with-tsrm-st],[
[ --with-tsrm-st Use SGI's State Threads],[
TSRM_ST=$withval
],[
TSRM_ST=no
+1
View File
@@ -3,6 +3,7 @@
#define HAVE_UTIME 1
#define HAVE_ALLOCA 1
#define HAVE_REALPATH 1
#include <malloc.h>
#include <stdlib.h>
+1 -1
View File
@@ -22,7 +22,7 @@
#ifndef __GNUC__
# ifndef HAVE_ALLOCA_H
# ifdef _AIX
#pragma alloca
#pragma alloca
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
+29 -2
View File
@@ -41,6 +41,10 @@
#include <unistd.h>
#endif
#if defined(__osf__) || defined(_AIX)
#include <errno.h>
#endif
#ifdef TSRM_WIN32
#include "readdir.h"
#include <sys/utime.h>
@@ -57,10 +61,10 @@ typedef unsigned short mode_t;
* to account for volume name that is unique to NetWare absolute paths
*/
#define COPY_WHEN_ABSOLUTE(path) 2
#define IS_ABSOLUTE_PATH(path, len) \
(len >= 2 && ((isalpha(path[0]) && path[1] == ':') || (IS_SLASH(path[0]) && IS_SLASH(path[1]))))
#define IS_UNC_PATH(path, len) \
(len >= 2 && IS_SLASH(path[0]) && IS_SLASH(path[1]))
#define IS_ABSOLUTE_PATH(path, len) \
(len >= 2 && ((isalpha(path[0]) && path[1] == ':') || IS_UNC_PATH(path, len)))
#elif defined(NETWARE)
#ifdef HAVE_DIRENT_H
@@ -155,6 +159,25 @@ CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC);
CWD_API int virtual_access(const char *pathname, int mode TSRMLS_DC);
#endif
/* On AIX & Tru64 when a file does not exist realpath() returns
* NULL, and sets errno to ENOENT. Unlike in other libc implementations
* the destination is not filled and remains undefined. Therefor, we
* must populate it manually using strcpy as done on systems with no
* realpath() function.
*/
#if defined(__osf__) || defined(_AIX)
static char *php_realpath_hack(char *src, char *dest)
{
char *ret;
if ((ret = realpath(src, dest)) == NULL && errno == ENOENT) {
return strcpy(dest, src);
} else {
return ret;
}
}
#endif
#if HAVE_UTIME
CWD_API int virtual_utime(const char *filename, struct utimbuf *buf TSRMLS_DC);
#endif
@@ -232,7 +255,11 @@ typedef struct _virtual_cwd_globals {
#define VCWD_ACCESS(pathname, mode) access(pathname, mode)
#ifdef HAVE_REALPATH
#if defined(__osf__) || defined(_AIX)
#define VCWD_REALPATH(path, real_path) php_realpath_hack(path, real_path)
#else
#define VCWD_REALPATH(path, real_path) realpath(path, real_path)
#endif
#else
#define VCWD_REALPATH(path, real_path) strcpy(real_path, path)
#endif
+9
View File
@@ -359,4 +359,13 @@ TSRM_API int shmctl(int key, int cmd, struct shmid_ds *buf) {
return -1;
}
}
TSRM_API char *realpath(char *orig_path, char *buffer)
{
int ret = GetFullPathName(orig_path, _MAX_PATH, buffer, NULL);
if(!ret || ret > _MAX_PATH) {
return NULL;
}
return buffer;
}
#endif
+1
View File
@@ -101,4 +101,5 @@ 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);
TSRM_API char *realpath(char *orig_path, char *buffer);
#endif
+118 -67
View File
@@ -16,6 +16,9 @@ AC_DEFUN([PHP_ADD_MAKEFILE_FRAGMENT],[
sed -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src >> Makefile.fragments
])
AC_DEFUN(PHP_PROG_RE2C,[
AC_CHECK_PROG(RE2C, re2c, re2c, [exit 0;])
])
dnl PHP_DEFINE(WHAT[, value])
dnl
@@ -184,66 +187,6 @@ AC_DEFUN([PHP_REMOVE_USR_LIB],[
$1=[$]ac_new_flags
])
AC_DEFUN([PHP_SETUP_OPENSSL],[
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_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_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_INCDIR
AC_MSG_CHECKING([for OpenSSL version])
AC_EGREP_CPP(yes,[
#include <openssl/opensslv.h>
#if OPENSSL_VERSION_NUMBER >= 0x0090600fL
yes
#endif
],[
AC_MSG_RESULT([>= 0.9.6])
],[
AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.])
])
CPPFLAGS=$old_CPPFLAGS
PHP_ADD_INCLUDE($OPENSSL_INCDIR)
PHP_ADD_LIBPATH($OPENSSL_LIBDIR)
PHP_CHECK_LIBRARY(crypto, CRYPTO_free, [
PHP_ADD_LIBRARY(crypto)
],[
AC_MSG_ERROR([libcrypto not found!])
],[
-L$OPENSSL_LIBDIR
])
PHP_CHECK_LIBRARY(ssl, SSL_CTX_set_ssl_version, [
PHP_ADD_LIBRARY(ssl)
],[
AC_MSG_ERROR([libssl not found!])
],[
-L$OPENSSL_LIBDIR
])
OPENSSL_INCDIR_OPT=-I$OPENSSL_INCDIR
AC_SUBST(OPENSSL_INCDIR_OPT)
])
dnl PHP_EVAL_LIBLINE(LINE, SHARED-LIBADD)
dnl
dnl Use this macro, if you need to add libraries and or library search
@@ -1124,6 +1067,7 @@ AC_DEFUN([PHP_CHECK_CC_OPTION],[
AC_MSG_RESULT([no])
fi
fi
rm -rf conftest*
])
AC_DEFUN([PHP_REGEX],[
@@ -1209,20 +1153,21 @@ main() {
fi
])
dnl PHP_SHARED_MODULE(module-name, object-var, build-dir)
dnl PHP_SHARED_MODULE(module-name, object-var, build-dir, cxx)
dnl
dnl Basically sets up the link-stage for building module-name
dnl from object_var in build-dir.
dnl
AC_DEFUN([PHP_SHARED_MODULE],[
install_modules="install-modules"
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)
$3/$1.la: \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_DEPENDENCIES)
\$(LIBTOOL) --mode=link ifelse($4,,[\$(CC)],[\$(CXX)]) \$(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
])
@@ -1249,7 +1194,7 @@ AC_DEFUN([PHP_SELECT_SAPI],[
dnl deprecated
AC_DEFUN([PHP_EXTENSION],[
sources=`$AWK -f $abs_srcdir/scan_makefile_in.awk < []PHP_EXT_SRCDIR($1)[]/Makefile.in`
sources=`$AWK -f $abs_srcdir/build/scan_makefile_in.awk < []PHP_EXT_SRCDIR($1)[]/Makefile.in`
PHP_NEW_EXTENSION($1, $sources, $2, $3)
@@ -1267,7 +1212,7 @@ AC_DEFUN([PHP_GEN_BUILD_DIRS],[
])
dnl
dnl PHP_NEW_EXTENSION(extname, sources [, shared [,sapi_class[, extra-cflags]]])
dnl PHP_NEW_EXTENSION(extname, sources [, shared [,sapi_class[, extra-cflags[, cxx]]]])
dnl
dnl Includes an extension in the build.
dnl
@@ -1297,7 +1242,7 @@ dnl ---------------------------------------------- Static module
if test "$3" = "shared" || test "$3" = "yes"; then
dnl ---------------------------------------------- Shared 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)
PHP_SHARED_MODULE($1,shared_objects_$1, $ext_builddir, $6)
AC_DEFINE_UNQUOTED([COMPILE_DL_]translit($1,a-z_-,A-Z__), 1, Whether to build $1 as dynamic module)
fi
fi
@@ -1596,7 +1541,7 @@ main() {
dnl
dnl PHP_CHECK_LIBRARY(library, function [, action-found [, action-not-found [, extra-ldflags]]])
dnl PHP_CHECK_LIBRARY(library, function [, action-found [, action-not-found [, extra-libs]]])
dnl
dnl Wrapper for AC_CHECK_LIB
dnl
@@ -1639,6 +1584,112 @@ AC_DEFUN([PHP_CHECK_FRAMEWORK], [
])
])
dnl
dnl PHP_SETUP_OPENSSL(shared-add [, action-found [, action-not-found]])
dnl
dnl Common setup macro for openssl
dnl
AC_DEFUN([PHP_SETUP_OPENSSL],[
found_openssl=no
unset OPENSSL_INCDIR
unset OPENSSL_LIBDIR
dnl First try to find pkg-config
if test -z "$PKG_CONFIG"; then
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
fi
dnl If pkg-config is found try using it
if test "$PHP_OPENSSL" = "yes" && test -x "$PKG_CONFIG" && $PKG_CONFIG --exists openssl; then
if $PKG_CONFIG --atleast-version=0.9.6 openssl; then
found_openssl=yes
OPENSSL_LIBS=`$PKG_CONFIG --libs openssl`
OPENSSL_INCS=`$PKG_CONFIG --cflags-only-I openssl`
OPENSSL_INCDIR=`$PKG_CONFIG --variable=includedir openssl`
else
AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.])
fi
if test -n "$OPENSSL_LIBS" && test -n "$OPENSSL_INCS"; then
PHP_EVAL_LIBLINE($OPENSSL_LIBS, $1)
PHP_EVAL_INCLINE($OPENSSL_INCS)
fi
else
dnl If pkg-config fails for some reason, revert to the old method
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_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
test -n "$OPENSSL_INCDIR" && test -n "$OPENSSL_LIBDIR" && break
done
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_INCDIR
AC_MSG_CHECKING([for OpenSSL version])
AC_EGREP_CPP(yes,[
#include <openssl/opensslv.h>
#if OPENSSL_VERSION_NUMBER >= 0x0090600fL
yes
#endif
],[
AC_MSG_RESULT([>= 0.9.6])
],[
AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.])
])
CPPFLAGS=$old_CPPFLAGS
PHP_ADD_INCLUDE($OPENSSL_INCDIR)
PHP_CHECK_LIBRARY(crypto, CRYPTO_free, [
PHP_ADD_LIBRARY(crypto,,$1)
],[
AC_MSG_ERROR([libcrypto not found!])
],[
-L$OPENSSL_LIBDIR
])
old_LIBS=$LIBS
LIBS="$LIBS -lcrypto"
PHP_CHECK_LIBRARY(ssl, SSL_CTX_set_ssl_version, [
found_openssl=yes
],[
AC_MSG_ERROR([libssl not found!])
],[
-L$OPENSSL_LIBDIR
])
LIBS=$old_LIBS
PHP_ADD_LIBRARY(ssl,,$1)
PHP_ADD_LIBPATH($OPENSSL_LIBDIR, $1)
fi
dnl For apache 1.3.x static build
OPENSSL_INCDIR_OPT=-I$OPENSSL_INCDIR
AC_SUBST(OPENSSL_INCDIR_OPT)
if test "$found_openssl" = "yes"; then
ifelse([$2],[],:,[$2])
ifelse([$3],[],,[else $3])
fi
])
dnl
dnl PHP_SETUP_ICONV(shared-add [, action-found [, action-not-found]])
dnl
+1 -1
View File
@@ -65,7 +65,7 @@ snapshot:
md5sum $$distname.tar.bz2; \
bzip2 -t $$distname.tar.bz2
cvsclean:
cvsclean-work:
@for i in `find . -name .cvsignore`; do \
(cd `dirname $$i` 2>/dev/null && rm -rf `cat .cvsignore | grep -v config.nice` *.o *.a .libs || true); \
done
+3 -3
View File
@@ -16,7 +16,7 @@
# | Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id: buildcheck.sh,v 1.21.2.5 2003-07-01 04:25:32 sas Exp $
# $Id: buildcheck.sh,v 1.21.2.6 2003-09-28 13:37:59 tal Exp $
#
echo "buildconf: checking installation..."
@@ -24,7 +24,7 @@ echo "buildconf: checking installation..."
stamp=$1
# autoconf 2.13 or newer
ac_version=`autoconf --version 2>/dev/null|head -1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
ac_version=`autoconf --version 2>/dev/null|head -n 1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
if test -z "$ac_version"; then
echo "buildconf: autoconf not found."
echo " You need autoconf version 2.13 or newer installed"
@@ -53,7 +53,7 @@ fi
# libtoolize 1.4.3 or newer
# Prefer glibtoolize over libtoolize for Mac OS X compatibility
libtoolize=`./build/shtool path glibtoolize libtoolize 2> /dev/null`
lt_pversion=`$libtoolize --version 2>/dev/null|head -1|sed -e 's/^[^0-9]*//'`
lt_pversion=`$libtoolize --version 2>/dev/null|head -n 1|sed -e 's/^[^0-9]*//'`
if test "$lt_pversion" = ""; then
echo "buildconf: libtool not found."
echo " You need libtool version 1.4.3 or newer installed"
File renamed without changes.
+147 -75
View File
@@ -40,8 +40,8 @@ AC_CONFIG_HEADER(main/php_config.h)
MAJOR_VERSION=4
MINOR_VERSION=3
RELEASE_VERSION=3
EXTRA_VERSION="RC2"
RELEASE_VERSION=8
EXTRA_VERSION=""
VERSION="$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION"
dnl Define where extension directories are located in the configure context
@@ -127,6 +127,7 @@ dnl AC_PROG_CXXCPP
dnl check for -R, etc. switch
PHP_RUNPATH_SWITCH
PHP_PROG_RE2C
AC_PROG_RANLIB
AC_PROG_LN_S
AC_PROG_AWK
@@ -136,8 +137,8 @@ if test "$YACC" != "bison -y"; then
else
AC_MSG_CHECKING([bison version])
set `bison --version| grep 'GNU Bison' | cut -d ' ' -f 4 | sed -e 's/\./ /'|tr -d a-z`
if test "${1}" = "1" -a "(" "${2}" -lt "75" -a "${2}" -ne "28" -a "${2}" -ne "35" -o "${2}" -ge "875" ")"; then
AC_MSG_WARN(You will need bison 1.28, 1.35 or 1.75 if you want to regenerate the Zend parser (found ${1}.${2}).)
if test "${1}" -ne "1" -o "(" "${2}" != "28" -a "${2}" != "35" -a "${2}" != "75" -a "${2}" != "875" ")"; then
AC_MSG_WARN(You will need bison 1.28, 1.35, 1.75 or 1.875 if you want to regenerate the Zend parser (found ${1}.${2}).)
fi
AC_MSG_RESULT(${1}.${2} (ok))
fi
@@ -188,6 +189,7 @@ case $host_alias in
CPPFLAGS="$CPPFLAGS -D_BSD_TIMEOFDAY_FLAVOR";;
*darwin*|*rhapsody*)
CPPFLAGS="$CPPFLAGS -no-cpp-precomp"
AC_DEFINE(BIND_8_COMPAT, 1, [Enabling BIND8 compatibility for Panther])
php_multiple_shlib_versions_ok=yes;;
*beos*)
beos_threads=1
@@ -316,17 +318,14 @@ dnl -------------------------------------------------------------------------
dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_DIRENT
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
else
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([ \
dirent.h \
ApplicationServices/ApplicationServices.h \
sys/param.h \
sys/types.h \
sys/time.h \
netinet/in.h \
@@ -370,7 +369,11 @@ unix.h \
utime.h \
sys/utsname.h \
sys/ipc.h \
dlfcn.h
],[],[],[
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@@ -518,10 +521,45 @@ vsnprintf \
)
dnl Check for getaddrinfo, should be a better way, but...
dnl Also check for working getaddrinfo
AC_CACHE_CHECK([for getaddrinfo], ac_cv_func_getaddrinfo,
[AC_TRY_LINK([#include <netdb.h>],
[struct addrinfo *g,h;g=&h;getaddrinfo("","",g,&g);],
ac_cv_func_getaddrinfo=yes, ac_cv_func_getaddrinfo=no)])
[struct addrinfo *g,h;g=&h;getaddrinfo("","",g,&g);],
AC_TRY_RUN([
#include <netdb.h>
#include <sys/types.h>
int main(void) {
struct addrinfo *ai, *pai, hints;
memset(&hints, 0, sizeof(hints));
hints.ai_flags = AI_NUMERICHOST;
if (getaddrinfo("127.0.0.1", NULL, &hints, &ai) < 0) {
exit(1);
}
if (ai == NULL) {
exit(1);
}
pai = ai;
while (pai) {
if (pai->ai_family != AF_INET) {
/* 127.0.0.1/NUMERICHOST should only resolve ONE way */
exit(1);
}
if (pai->ai_addr->sa_family != AF_INET) {
/* 127.0.0.1/NUMERICHOST should only resolve ONE way */
exit(1);
}
pai = pai->ai_next;
}
freeaddrinfo(ai);
exit(0);
}
],ac_cv_func_getaddrinfo=yes, ac_cv_func_getaddrinfo=no),
ac_cv_func_getaddrinfo=no)])
if test "$ac_cv_func_getaddrinfo" = yes; then
AC_DEFINE(HAVE_GETADDRINFO,1,[Define if you have the getaddrinfo function])
fi
@@ -613,27 +651,6 @@ if test "$PHP_CONFIG_FILE_SCAN_DIR" = "DEFAULT"; then
PHP_CONFIG_FILE_SCAN_DIR=""
fi
# compatibility
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, yes)
if test "$PHP_PEAR" != "no" && test "$disable_cli" != "1"; then
install_pear="install-pear"
PEAR_INSTALLDIR=$PHP_PEAR
fi
if test "$PHP_PEAR" = "DEFAULT" || test "$PHP_PEAR" = "yes"; then
case $PHP_LAYOUT in
GNU) PEAR_INSTALLDIR=$datadir/pear;;
*) PEAR_INSTALLDIR=$libdir/php;;
esac
fi
test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLAGS $DEBUG_CFLAGS"
PHP_ARG_ENABLE(safe-mode, whether to enable safe mode by default,
@@ -731,17 +748,19 @@ if test "$PHP_IPV6" != "no" && test "$ac_cv_ipv6_support" = yes; then
AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
fi
dnl
dnl OpenSSL configure
dnl
PHP_ARG_WITH(openssl,for OpenSSL support,
[ --with-openssl[=DIR] Include OpenSSL support (requires OpenSSL >= 0.9.6) ])
if test "$PHP_OPENSSL" != "no"; then
ext_openssl_shared=$ext_shared
PHP_SETUP_OPENSSL
fi
AC_MSG_CHECKING([whether to enable versioning])
AC_ARG_ENABLE(versioning,
[ --enable-versioning Export only required symbols.
See INSTALL for more information], [
if test "x$APXS" != "x"; then
PHP_VERSIONING=$enableval
else
PHP_VERSIONING=no
fi
],[
PHP_VERSIONING=no
])
AC_MSG_RESULT([$PHP_VERSIONING])
divert(5)
@@ -778,26 +797,9 @@ AC_ARG_ENABLE(all,
# reading config stubs
esyscmd(./build/config-stubs ext)
dnl Other settings.
dnl Extensions post-config
dnl -------------------------------------------------------------------------
PHP_HELP_SEPARATOR([Other settings:])
AC_MSG_CHECKING([whether to enable versioning])
AC_ARG_ENABLE(versioning,
[ --enable-versioning Export only required symbols.
See INSTALL for more information], [
if test "x$APXS" != "x"; then
PHP_VERSIONING=$enableval
else
PHP_VERSIONING=no
fi
],[
PHP_VERSIONING=no
])
AC_MSG_RESULT([$PHP_VERSIONING])
if test "$PHP_VERSIONING" = "yes"; then
test -z "$PHP_SYM_FILE" && PHP_SYM_FILE="$abs_srcdir/sapi/$PHP_SAPI/php.sym"
if test -f "$PHP_SYM_FILE"; then
@@ -823,8 +825,6 @@ shared)
;;
esac
PHP_REGEX
EXTRA_LIBS="$EXTRA_LIBS $DLIBS $LIBS"
dnl this has to be here to prevent the openssl crypt() from
@@ -835,10 +835,70 @@ fi
unset LIBS LDFLAGS
dnl PEAR
dnl -------------------------------------------------------------------------
PHP_HELP_SEPARATOR([PEAR:])
PHP_CONFIGURE_PART(Configuring PEAR)
# compatibility
if test -z "$with_pear" && test "$enable_pear" = "no"; then
with_pear=no
fi
PHP_ARG_WITH(pear, [whether to install PEAR],
[ --with-pear=DIR Install PEAR in DIR (default PREFIX/lib/php)
--without-pear Do not install PEAR], DEFAULT, yes)
if test "$PHP_PEAR" != "no"; then
dnl
dnl PEAR dependancies
dnl
if test "$PHP_SAPI_CLI" = "no"; then
pear_error_msg="$pear_error_msg
PEAR requires CLI to be enabled. Add --enable-cli to the configure line. (or --disable-pear)"
fi
if test "$PHP_PCRE_REGEX" = "no"; then
pear_error_msg="$pear_error_msg
PEAR requires PCRE to be enabled. Add --with-pcre-regex to the configure line. (or --disable-pear)"
fi
if test "$PHP_XML" = "no"; then
pear_error_msg="$pear_error_msg
PEAR requires XML to be enabled. Add --enable-xml to the configure line. (or --disable-pear)"
fi
dnl
dnl ext/xmlrpc is not really there yet to be a requirement..
dnl
dnl if test "$PHP_XMLRPC" = "no"; then
dnl pear_error_msg="$pear_error_msg
dnl PEAR requires XML-RPC to be enabled. Add --with-xmlrpc to the configure line. (or --disable-pear)"
dnl fi
dnl
if test "$pear_error_msg"; then
AC_MSG_ERROR([$pear_error_msg])
fi
install_pear="install-pear"
PEAR_INSTALLDIR=$PHP_PEAR
if test "$PHP_PEAR" = "DEFAULT" || test "$PHP_PEAR" = "yes"; then
case $PHP_LAYOUT in
GNU) PEAR_INSTALLDIR=$datadir/pear;;
*) PEAR_INSTALLDIR=$libdir/php;;
esac
fi
fi
dnl Configuring Zend and TSRM.
dnl -------------------------------------------------------------------------
PHP_HELP_SEPARATOR([Zend:])
PHP_CONFIGURE_PART(Configuring Zend)
LIBZEND_BASIC_CHECKS
LIBZEND_DLSYM_CHECK
LIBZEND_OTHER_CHECKS
@@ -862,17 +922,21 @@ fi
ZEND_EXTRA_LIBS="$LIBS"
unset LIBS LDFLAGS
PHP_HELP_SEPARATOR([TSRM:])
PHP_CONFIGURE_PART(Configuring TSRM)
TSRM_BASIC_CHECKS
if test "$PHP_THREAD_SAFETY" = "yes"; then
TSRM_THREADS_CHECKS
fi
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LDFLAGS"
EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $LDFLAGS"
EXTRA_LIBS="$EXTRA_LIBS $LIBS"
unset LIBS LDFLAGS
test "$prefix" = "NONE" && prefix=/usr/local
test "$exec_prefix" = "NONE" && exec_prefix='${prefix}'
test "$program_prefix" = "NONE" && program_prefix=
test "$program_suffix" = "NONE" && program_suffix=
case $libdir in
'${exec_prefix}/lib')
@@ -967,6 +1031,7 @@ if test -z "$php_ldflags_add_usr_lib"; then
fi
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS"
EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $PHP_LDFLAGS"
PHP_BUILD_DATE=`date '+%Y-%m-%d'`
AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build date])
@@ -997,6 +1062,8 @@ PHP_SUBST_OLD(php_abs_top_srcdir)
PHP_SUBST(bindir)
PHP_SUBST(exec_prefix)
PHP_SUBST(program_prefix)
PHP_SUBST(program_suffix)
PHP_SUBST(includedir)
PHP_SUBST(libdir)
PHP_SUBST(mandir)
@@ -1022,6 +1089,7 @@ PHP_SUBST_OLD(DEBUG_CFLAGS)
PHP_SUBST(DEFS)
PHP_SUBST_OLD(EXTENSION_DIR)
PHP_SUBST_OLD(EXTRA_LDFLAGS)
PHP_SUBST_OLD(EXTRA_LDFLAGS_PROGRAM)
PHP_SUBST_OLD(EXTRA_LIBS)
PHP_SUBST_OLD(ZEND_EXTRA_LIBS)
PHP_SUBST_OLD(INCLUDES)
@@ -1044,6 +1112,7 @@ PHP_SUBST(PHP_RPATHS)
PHP_SUBST(PHP_SAPI)
PHP_SUBST_OLD(PHP_VERSION)
PHP_SUBST(PROG_SENDMAIL)
PHP_SUBST(RE2C)
PHP_SUBST(SHELL)
PHP_SUBST(SHARED_LIBTOOL)
PHP_SUBST(TSRM_DIR)
@@ -1077,6 +1146,7 @@ dnl
dnl Libtool creation
dnl
PHP_HELP_SEPARATOR([Libtool:])
PHP_CONFIGURE_PART(Configuring libtool)
LDFLAGS="$LDFLAGS $PHP_AIX_LDFLAGS"
@@ -1103,10 +1173,19 @@ INLINE_CFLAGS="$INLINE_CFLAGS $standard_libtool_flag"
CXXFLAGS="$CXXFLAGS $standard_libtool_flag"
all_targets='$(OVERALL_TARGET) $(PHP_MODULES) $(PHP_CLI_TARGET)'
install_targets="install-sapi install-modules $install_pear install-build install-headers install-programs"
if test "$PHP_SAPI" != "cgi"; then
install_targets="$PHP_INSTALL_CLI_TARGET $install_targets"
fi
install_targets="$install_modules $install_pear install-build install-headers install-programs"
case $PHP_SAPI in
cgi)
install_targets="install-sapi $install_targets"
;;
cli)
install_targets="$PHP_INSTALL_CLI_TARGET $install_targets"
;;
*)
install_targets="install-sapi $PHP_INSTALL_CLI_TARGET $install_targets"
;;
esac
PHP_SUBST(all_targets)
PHP_SUBST(install_targets)
@@ -1175,13 +1254,6 @@ if test "\$CONFIG_FILES" = "$ALL_OUTPUT_FILES" || test "\$CONFIG_FILES" = " $ALL
REDO_ALL=yes
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
fi
################################################################
# Create configuration headers
#
+1 -1
View File
@@ -1,3 +1,3 @@
#! /bin/sh
${MAKE:-make} -f build/build.mk cvsclean
${MAKE:-make} -f build/build.mk cvsclean-work
+1 -1
View File
@@ -7,7 +7,7 @@ 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_NEW_EXTENSION(bcmath, bcmath.c number.c \
PHP_NEW_EXTENSION(bcmath, bcmath.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 \
+5 -2
View File
@@ -52,9 +52,12 @@ typedef struct bc_struct
in the case of leading zeros generated. */
} bc_struct;
#include <php.h>
#include <ext/bcmath/php_bcmath.h>
#ifdef HAVE_CONFIG_H
#include "../../config.h"
#endif
#include "php.h"
#include "../../php_bcmath.h"
/* The base used in storing the numbers in n_value above.
Currently this MUST be 10. */
+16 -2
View File
@@ -165,9 +165,12 @@ PHP_BZ2_API php_stream *_php_stream_bz2open(php_stream_wrapper *wrapper,
if (strncasecmp("compress.bzip2://", path, 17) == 0) {
path += 17;
}
if (mode[0] != 'w' && mode[0] != 'r' && mode[1] != '\0') {
return NULL;
}
#ifdef VIRTUAL_DIR
virtual_filepath(path, &path_copy TSRMLS_CC);
virtual_filepath_ex(path, &path_copy, NULL TSRMLS_CC);
#else
path_copy = path;
#endif
@@ -190,6 +193,12 @@ PHP_BZ2_API php_stream *_php_stream_bz2open(php_stream_wrapper *wrapper,
bz_file = BZ2_bzdopen(fd, mode);
}
}
/* remove the file created by php_stream_open_wrapper(), it is not needed since BZ2 functions
* failed.
*/
if (!bz_file && mode[0] == 'w') {
VCWD_UNLINK(*opened_path);
}
}
if (bz_file) {
@@ -302,7 +311,12 @@ PHP_FUNCTION(bzopen)
WRONG_PARAM_COUNT;
}
convert_to_string_ex(mode);
if (Z_STRVAL_PP(mode)[0] != 'r' && Z_STRVAL_PP(mode)[0] != 'w' && Z_STRVAL_PP(mode)[1] != '\0') {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "'%s' is not a valid mode for bzopen(). Only 'w' and 'r' are supported.", Z_STRVAL_PP(mode));
RETURN_FALSE;
}
/* If it's not a resource its a string containing the filename to open */
if (Z_TYPE_PP(file) != IS_RESOURCE) {
convert_to_string_ex(file);
+12 -5
View File
@@ -14,6 +14,7 @@ if test "$PHP_BZ2" != "no"; then
if test -r $i/include/bzlib.h; then
BZIP_DIR=$i
AC_MSG_RESULT(found in $i)
break
fi
done
fi
@@ -23,11 +24,17 @@ if test "$PHP_BZ2" != "no"; then
AC_MSG_ERROR(Please reinstall the BZip2 distribution)
fi
PHP_ADD_INCLUDE($BZIP_DIR/include)
PHP_SUBST(BZ2_SHARED_LIBADD)
PHP_ADD_LIBRARY_WITH_PATH(bz2, $BZIP_DIR/lib, BZ2_SHARED_LIBADD)
AC_CHECK_LIB(bz2, BZ2_bzerror, [AC_DEFINE(HAVE_BZ2,1,[ ])], [AC_MSG_ERROR(bz2 module requires libbz2 >= 1.0.0)],)
PHP_CHECK_LIBRARY(bz2, BZ2_bzerror,
[
PHP_ADD_INCLUDE($BZIP_DIR/include)
PHP_ADD_LIBRARY_WITH_PATH(bz2, $BZIP_DIR/lib, BZ2_SHARED_LIBADD)
AC_DEFINE(HAVE_BZ2,1,[ ])
], [
AC_MSG_ERROR(bz2 module requires libbz2 >= 1.0.0)
], [
-L$BZIP_DIR/lib
])
PHP_NEW_EXTENSION(bz2, bz2.c, $ext_shared)
PHP_SUBST(BZ2_SHARED_LIBADD)
fi
+1 -2
View File
@@ -22,8 +22,7 @@ $blaat2 = bzdecompress(bzcompress($blaat));
$tests = <<<TESTS
\$blaat === \$blaat2
TESTS;
include('tests/quicktester.inc');
include(dirname(__FILE__) . '/../../../tests/quicktester.inc');
--EXPECT--
OK
+4 -4
View File
@@ -161,7 +161,7 @@ PHP_FUNCTION(cal_info)
}
convert_to_long_ex(cal);
if (Z_LVAL_PP(cal) < 0 || Z_LVAL_PP(cal) >= CAL_NUM_CALS) {
zend_error(E_WARNING, "%s(): invalid calendar ID %d", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal));
zend_error(E_WARNING, "%s(): invalid calendar ID %ld", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal));
RETURN_FALSE;
}
@@ -203,7 +203,7 @@ PHP_FUNCTION(cal_days_in_month)
convert_to_long_ex(year);
if (Z_LVAL_PP(cal) < 0 || Z_LVAL_PP(cal) >= CAL_NUM_CALS) {
zend_error(E_WARNING, "%s(): invalid calendar ID %d", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal));
zend_error(E_WARNING, "%s(): invalid calendar ID %ld", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal));
RETURN_FALSE;
}
@@ -239,7 +239,7 @@ PHP_FUNCTION(cal_to_jd)
convert_to_long_ex(year);
if (Z_LVAL_PP(cal) < 0 || Z_LVAL_PP(cal) >= CAL_NUM_CALS) {
zend_error(E_WARNING, "%s(): invalid calendar ID %d", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal));
zend_error(E_WARNING, "%s(): invalid calendar ID %ld", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal));
RETURN_FALSE;
}
@@ -265,7 +265,7 @@ PHP_FUNCTION(cal_from_jd)
convert_to_long_ex(cal);
if (Z_LVAL_PP(cal) < 0 || Z_LVAL_PP(cal) >= CAL_NUM_CALS) {
zend_error(E_WARNING, "%s(): invalid calendar ID %d", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal));
zend_error(E_WARNING, "%s(): invalid calendar ID %ld", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal));
RETURN_FALSE;
}
calendar = &cal_conversion_table[Z_LVAL_PP(cal)];
+3 -20
View File
@@ -122,24 +122,7 @@ PHPAPI HRESULT php_COM_invoke(comval *obj, DISPID dispIdMember, WORD wFlags, DIS
*ErrString = NULL;
/* @todo use DispInvoke here ? */
if (C_ISREFD(obj)) {
if (C_HASTLIB(obj)) {
hr = C_TYPEINFO_VT(obj)->Invoke(C_TYPEINFO(obj), C_DISPATCH(obj), dispIdMember, wFlags, pDispParams, pVarResult, &ExceptInfo, &ArgErr);
if (FAILED(hr) && (hr != DISP_E_EXCEPTION)) {
hr = C_DISPATCH_VT(obj)->Invoke(C_DISPATCH(obj), dispIdMember, &IID_NULL, LOCALE_SYSTEM_DEFAULT, wFlags, pDispParams, pVarResult, &ExceptInfo, &ArgErr);
if (SUCCEEDED(hr)) {
/*
* ITypLib doesn't work
* Release ITypeLib and fall back to IDispatch
*/
C_TYPEINFO_VT(obj)->Release(C_TYPEINFO(obj));
C_HASTLIB(obj) = FALSE;
C_TYPEINFO(obj) = NULL;
}
}
} else {
hr = C_DISPATCH_VT(obj)->Invoke(C_DISPATCH(obj), dispIdMember, &IID_NULL, LOCALE_SYSTEM_DEFAULT, wFlags, pDispParams, pVarResult, &ExceptInfo, &ArgErr);
}
hr = C_DISPATCH_VT(obj)->Invoke(C_DISPATCH(obj), dispIdMember, &IID_NULL, LOCALE_SYSTEM_DEFAULT, wFlags, pDispParams, pVarResult, &ExceptInfo, &ArgErr);
if (FAILED(hr)) {
switch (hr) {
@@ -1866,7 +1849,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
VariantInit(var_result); /* to protect C_DISPATCH(obj) from being freed when var_result is destructed */
} else {
php_variant_to_pval(var_result, &retval, codepage TSRMLS_CC);
@@ -1951,7 +1934,7 @@ PHPAPI int php_COM_set_property_handler(zend_property_reference *property_refere
return FAILURE;
}
VariantInit(var_result); // to protect C_DISPATCH(obj) from being freed when var_result is destructed
VariantInit(var_result); /* to protect C_DISPATCH(obj) from being freed when var_result is destructed */
zval_dtor(&overloaded_property->element);
}
FREE_VARIANT(var_result);
+1 -1
View File
@@ -181,7 +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
/* 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))
+1 -1
View File
@@ -119,7 +119,7 @@ PHPAPI void php_pval_to_variant_ex2(pval *pval_arg, VARIANT *var_arg, VARTYPE ty
var_arg = V_VARIANTREF(var_arg); /* put the array in that VARIANT */
}
if (!type) {
// if no type is given we take the variant type
/* if no type is given we take the variant type */
type = VT_VARIANT;
}
+1 -1
View File
@@ -280,7 +280,7 @@ static HRESULT STDMETHODCALLTYPE disp_invokeex(
ZVAL_NULL(zarg);
}
} else {
// arg can't be an idispatch, so we don't care for the implicit AddRef() call here
/* arg can't be an idispatch, so we don't care for the implicit AddRef() call here */
if (FAILURE == php_variant_to_pval(arg, zarg, codepage TSRMLS_CC)) {
trace("failed to convert arg %d to zval\n", i);
ZVAL_NULL(zarg);
+2 -2
View File
@@ -53,12 +53,12 @@ AC_ARG_WITH(cpdflib,
PHP_WITH_SHARED
if test "$withval" != "no"; then
cpdf_withval=$withval
PHP_NEW_EXTENSION(cpdf, cpdf.c, $ext_shared)
PHP_NEW_EXTENSION(cpdf, cpdf.c, $ext_shared,, \\$(GDLIB_CFLAGS))
PHP_SUBST(CPDF_SHARED_LIBADD)
CPDF_JPEG_TEST
CPDF_TIFF_TEST
for i in $cpdf_withval /usr /usr/local; do
for i in $cpdf_withval /usr/local /usr; do
if test -f "$i/include/cpdflib.h"; then
CPDFLIB_INCLUDE=$i/include
AC_MSG_CHECKING(for cpdflib.h)
+21 -6
View File
@@ -476,6 +476,7 @@ PHP_FUNCTION(cpdf_open)
php_error(E_WARNING, "%s(): Writing to stdout as described in the ClibPDF manual is not possible if php is used as an Apache module. Write to a memory stream and use cpdf_output_buffer() instead.", get_active_function_name(TSRMLS_C));
#endif
if (php_check_open_basedir(Z_STRVAL_P(arg2) TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(Z_STRVAL_P(arg2), "rb+", CHECKUID_CHECK_MODE_PARAM))) {
cpdf_close(cpdf);
RETURN_FALSE;
}
@@ -2521,16 +2522,30 @@ PHP_FUNCTION(cpdf_place_inline_image)
}
count = 3 * im->sx * im->sy;
if(NULL == (buffer = (unsigned char *) emalloc(count)))
RETURN_FALSE;
buffer = (unsigned char *) safe_emalloc(3 * im->sx, im->sy, 0);
ptr = buffer;
for(i=0; i<im->sy; i++) {
for(j=0; j<im->sx; j++) {
color = im->pixels[i][j];
*ptr++ = im->red[color];
*ptr++ = im->green[color];
*ptr++ = im->blue[color];
#if HAVE_LIBGD20
if(gdImageTrueColor(im)) {
if (im->tpixels && gdImageBoundsSafe(im, j, i)) {
color = gdImageTrueColorPixel(im, j, i);
*ptr++ = (color >> 16) & 0xFF;
*ptr++ = (color >> 8) & 0xFF;
*ptr++ = color & 0xFF;
}
} else {
#endif
if (im->pixels && gdImageBoundsSafe(im, j, i)) {
color = im->pixels[i][j];
*ptr++ = im->red[color];
*ptr++ = im->green[color];
*ptr++ = im->blue[color];
}
#if HAVE_LIBGD20
}
#endif
}
}
+18 -19
View File
@@ -7,27 +7,26 @@ PHP_ARG_WITH(crack, for CRACKlib support,
if test "$PHP_CRACK" != "no"; then
for i in /usr/local/lib /usr/lib $PHP_CRACK/lib $PHP_CRACK/cracklib; do
test -f $i/libcrack.$SHLIB_SUFFIX_NAME -o -f $i/libcrack.a && CRACK_LIBDIR=$i
done
for i in $PHP_CRACK/lib $PHP_CRACK/cracklib /usr/local/lib /usr/lib; do
test -f $i/libcrack.$SHLIB_SUFFIX_NAME -o -f $i/libcrack.a && CRACK_LIBDIR=$i && break
done
for i in /usr/local/include /usr/include $PHP_CRACK/include $PHP_CRACK/cracklib; do
test -f $i/packer.h && CRACK_INCLUDEDIR=$i
done
if test -z "$CRACK_LIBDIR"; then
AC_MSG_ERROR(Cannot find the cracklib library file)
fi
for i in $PHP_CRACK/include $PHP_CRACK/cracklib /usr/local/include /usr/include; do
test -f $i/packer.h && CRACK_INCLUDEDIR=$i && break
done
if test -z "$CRACK_LIBDIR"; then
AC_MSG_ERROR(Cannot find the cracklib library file)
fi
if test -z "$CRACK_INCLUDEDIR"; then
AC_MSG_ERROR(Cannot find a cracklib header file)
fi
if test -z "$CRACK_INCLUDEDIR"; then
AC_MSG_ERROR(Cannot find a cracklib header file)
fi
PHP_ADD_INCLUDE($CRACK_INCLUDEDIR)
PHP_ADD_LIBRARY_WITH_PATH(crack, $CRACK_LIBDIR, CRACK_SHARED_LIBADD)
PHP_ADD_INCLUDE($CRACK_INCLUDEDIR)
PHP_ADD_LIBRARY_WITH_PATH(crack, $CRACK_LIBDIR, CRACK_SHARED_LIBADD)
PHP_NEW_EXTENSION(crack, crack.c, $ext_shared)
PHP_SUBST(CRACK_SHARED_LIBADD)
AC_DEFINE(HAVE_CRACK, 1, [ ])
PHP_NEW_EXTENSION(crack, crack.c, $ext_shared)
PHP_SUBST(CRACK_SHARED_LIBADD)
AC_DEFINE(HAVE_CRACK, 1, [ ])
fi
+16 -5
View File
@@ -29,6 +29,9 @@
#include <packer.h>
extern char * FascistLook(PWDICT *pwp, char *instring);
extern int PWClose(PWDICT *pwp);
ZEND_DECLARE_MODULE_GLOBALS(crack)
/* True global resources - no need for thread safety here */
@@ -69,11 +72,16 @@ long _crack_open_dict(char *dictpath TSRMLS_DC)
long resource;
if (CRACKG(current_id) != -1) {
zend_error(E_WARNING, "Can not use more than one open dictionary with this implementation of libcrack");
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Can not use more than one open dictionary with this implementation of libcrack");
return -1;
}
if ((PG(safe_mode) && (!php_checkuid(dictpath, NULL, CHECKUID_CHECK_FILE_AND_DIR))) || php_check_open_basedir(dictpath TSRMLS_CC)) {
return -1;
}
if (NULL == (pwdict = PWOpen(dictpath, "r"))) {
zend_error(E_WARNING, "Unable to open a crack dictionary");
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to open a crack dictionary");
return -1;
}
@@ -156,7 +164,7 @@ ZEND_FUNCTION(crack_opendict)
if (-1 == (resource = _crack_open_dict(Z_STRVAL_PP(dictpath) TSRMLS_CC))) {
RETURN_FALSE;
}
RETURN_RESOURCE(resource);
}
/* }}} */
@@ -184,6 +192,10 @@ ZEND_FUNCTION(crack_closedict)
break;
}
if (id < 1) {
RETURN_FALSE;
}
ZEND_FETCH_RESOURCE(pwdict, PWDICT *, dictionary, id, "cracklib dictionary", le_crack);
if (CRACKG(current_id) == id) {
CRACKG(current_id) = -1;
@@ -218,7 +230,6 @@ ZEND_FUNCTION(crack_check)
if (zend_get_parameters_ex(2, &dictionary, &password) == FAILURE) {
RETURN_FALSE;
}
id = -1;
break;
default:
WRONG_PARAM_COUNT;
@@ -256,7 +267,7 @@ ZEND_FUNCTION(crack_getlastmessage)
}
if (NULL == CRACKG(last_message)) {
zend_error(E_WARNING, "No obscure checks in this session");
php_error_docref(NULL TSRMLS_CC, E_WARNING, "No obscure checks in this session");
RETURN_FALSE;
}
+1 -1
View File
@@ -105,7 +105,7 @@ PHP_MINFO_FUNCTION(ctype)
p=Z_STRVAL_P(c); \
len = Z_STRLEN_P(c); \
for(n=0;n<len;n++) { \
if(!iswhat(*p++)) RETURN_FALSE; \
if(!iswhat((int)*(unsigned char *)(p++))) RETURN_FALSE; \
} \
RETURN_TRUE; \
} \
+24
View File
@@ -0,0 +1,24 @@
--TEST--
Bug #25745 (ctype functions fail with non-ascii characters)
--FILE--
<?php
$funcs = array(
"ctype_alnum", "ctype_alpha", "ctype_cntrl", "ctype_digit",
"ctype_graph", "ctype_lower", "ctype_print", "ctype_punct",
"ctype_space", "ctype_upper", "ctype_xdigit"
);
foreach ($funcs as $ctype_func) {
for ($i = 0; $i < 256; $i++) {
$a = $ctype_func($i);
$b = $ctype_func(chr($i));
if ($a != $b) {
echo "broken... $ctype_func($i) = $a, $ctype_func(chr($i)) = $b\n";
exit;
}
}
}
echo "ok\n";
?>
--EXPECT--
ok
+72 -20
View File
@@ -22,6 +22,10 @@
#include "config.h"
#endif
#ifdef PHP_WIN32
#include <winsock2.h>
#endif
#include "php.h"
#if HAVE_CURL
@@ -30,13 +34,17 @@
#include <string.h>
#ifdef PHP_WIN32
#include <winsock.h>
#include <sys/types.h>
#endif
#include <curl/curl.h>
#include <curl/easy.h>
/* As of curl 7.11.1 this is no longer defined inside curl.h */
#ifndef HttpPost
#define HttpPost curl_httppost
#endif
#define SMART_STR_PREALLOC 4096
#include "ext/standard/php_smart_str.h"
@@ -133,7 +141,9 @@ PHP_MINIT_FUNCTION(curl)
REGISTER_CURL_CONSTANT(CURLOPT_FOLLOWLOCATION);
REGISTER_CURL_CONSTANT(CURLOPT_FTPASCII);
REGISTER_CURL_CONSTANT(CURLOPT_PUT);
#if CURLOPT_MUTE != 0
REGISTER_CURL_CONSTANT(CURLOPT_MUTE);
#endif
REGISTER_CURL_CONSTANT(CURLOPT_USERPWD);
REGISTER_CURL_CONSTANT(CURLOPT_PROXYUSERPWD);
REGISTER_CURL_CONSTANT(CURLOPT_RANGE);
@@ -277,6 +287,35 @@ PHP_MINIT_FUNCTION(curl)
REGISTER_CURL_CONSTANT(CURLE_TELNET_OPTION_SYNTAX);
REGISTER_CURL_CONSTANT(CURLE_OBSOLETE);
REGISTER_CURL_CONSTANT(CURLE_SSL_PEER_CERTIFICATE);
REGISTER_CURL_CONSTANT(CURLE_GOT_NOTHING);
REGISTER_CURL_CONSTANT(CURLE_SSL_ENGINE_NOTFOUND);
REGISTER_CURL_CONSTANT(CURLE_SSL_ENGINE_SETFAILED);
REGISTER_CURL_CONSTANT(CURLE_SEND_ERROR);
REGISTER_CURL_CONSTANT(CURLE_RECV_ERROR);
#ifdef CURLE_SHARE_IN_USE
REGISTER_CURL_CONSTANT(CURLE_SHARE_IN_USE);
#endif
#ifdef CURLE_SSL_CERTPROBLEM
REGISTER_CURL_CONSTANT(CURLE_SSL_CERTPROBLEM);
#endif
#ifdef CURLE_SSL_CIPHER
REGISTER_CURL_CONSTANT(CURLE_SSL_CIPHER);
#endif
#ifdef CURLE_SSL_CACERT
REGISTER_CURL_CONSTANT(CURLE_SSL_CACERT);
#endif
#ifdef CURLE_BAD_CONTENT_ENCODING
REGISTER_CURL_CONSTANT(CURLE_BAD_CONTENT_ENCODING);
#endif
#ifdef CURLE_LDAP_INVALID_URL
REGISTER_CURL_CONSTANT(CURLE_LDAP_INVALID_URL);
#endif
#ifdef CURLE_FILESIZE_EXCEEDED
REGISTER_CURL_CONSTANT(CURLE_FILESIZE_EXCEEDED);
#endif
#ifdef CURLE_FTP_SSL_FAILED
REGISTER_CURL_CONSTANT(CURLE_FTP_SSL_FAILED);
#endif
REGISTER_CURL_CONSTANT(CURL_NETRC_OPTIONAL);
REGISTER_CURL_CONSTANT(CURL_NETRC_IGNORED);
@@ -349,7 +388,6 @@ static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx)
zval *argv[2];
zval *retval;
int error;
TSRMLS_FETCH();
MAKE_STD_ZVAL(argv[0]);
MAKE_STD_ZVAL(argv[1]);
@@ -369,6 +407,9 @@ static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx)
length = -1;
}
else {
if (Z_TYPE_P(retval) != IS_LONG) {
convert_to_long_ex(&retval);
}
length = Z_LVAL_P(retval);
}
@@ -401,7 +442,6 @@ static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
case PHP_CURL_USER: {
zval *argv[3];
zval *retval;
int length;
int error;
TSRMLS_FETCH();
@@ -423,11 +463,9 @@ static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
if (error == FAILURE) {
php_error(E_WARNING, "%s(): Cannot call the CURLOPT_READFUNCTION",
get_active_function_name(TSRMLS_C));
length = -1;
}
else {
memcpy(data, Z_STRVAL_P(retval), size * nmemb);
length = Z_STRLEN_P(retval);
} else if (Z_TYPE_P(retval) == IS_STRING) {
length = MIN(size * nmemb, Z_STRLEN_P(retval));
memcpy(data, Z_STRVAL_P(retval), length);
}
zval_ptr_dtor(&argv[0]);
@@ -486,6 +524,9 @@ static size_t curl_write_header(char *data, size_t size, size_t nmemb, void *ctx
length = -1;
}
else {
if (Z_TYPE_P(retval) != IS_LONG) {
convert_to_long_ex(&retval);
}
length = Z_LVAL_P(retval);
}
zval_ptr_dtor(&argv[0]);
@@ -493,13 +534,18 @@ static size_t curl_write_header(char *data, size_t size, size_t nmemb, void *ctx
zval_ptr_dtor(&retval);
break;
}
case PHP_CURL_IGNORE:
return length;
default:
return -1;
}
return length;
}
/* }}} */
#if CURLOPT_PASSWDFUNCTION != 0
/* {{{ curl_passwd
*/
static size_t curl_passwd(void *ctx, char *prompt, char *buf, int buflen)
@@ -509,7 +555,7 @@ static size_t curl_passwd(void *ctx, char *prompt, char *buf, int buflen)
zval *argv[3];
zval *retval = NULL;
int error;
int ret = 0;
int ret = -1;
TSRMLS_FETCH();
MAKE_STD_ZVAL(argv[0]);
@@ -527,17 +573,15 @@ static size_t curl_passwd(void *ctx, char *prompt, char *buf, int buflen)
retval, 2, argv TSRMLS_CC);
if (error == FAILURE) {
php_error(E_WARNING, "%s(): Couldn't call the CURLOPT_PASSWDFUNCTION", get_active_function_name(TSRMLS_C));
ret = -1;
}
else {
} else if (Z_TYPE_P(retval) == IS_STRING) {
if (Z_STRLEN_P(retval) > buflen) {
php_error(E_WARNING, "%s(): Returned password is too long for libcurl to handle",
get_active_function_name(TSRMLS_C));
ret = -1;
}
else {
strlcpy(buf, Z_STRVAL_P(retval), buflen);
} else {
strlcpy(buf, Z_STRVAL_P(retval), Z_STRLEN_P(retval));
}
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "User handler '%s' did not return a string.", Z_STRVAL_P(func));
}
zval_ptr_dtor(&argv[0]);
@@ -548,6 +592,7 @@ static size_t curl_passwd(void *ctx, char *prompt, char *buf, int buflen)
return ret;
}
/* }}} */
#endif
/* {{{ curl_free_string
*/
@@ -693,7 +738,9 @@ PHP_FUNCTION(curl_setopt)
case CURLOPT_NETRC:
case CURLOPT_FOLLOWLOCATION:
case CURLOPT_PUT:
case CURLOPT_MUTE:
#if CURLOPT_MUTE != 0
case CURLOPT_MUTE:
#endif
case CURLOPT_TIMEOUT:
case CURLOPT_FTP_USE_EPSV:
case CURLOPT_LOW_SPEED_LIMIT:
@@ -803,7 +850,9 @@ PHP_FUNCTION(curl_setopt)
if (Z_LVAL_PP(zvalue)) {
ch->handlers->write->method = PHP_CURL_RETURN;
}
} else {
ch->handlers->write->method = PHP_CURL_STDOUT;
}
break;
case CURLOPT_BINARYTRANSFER:
convert_to_long_ex(zvalue);
@@ -836,6 +885,7 @@ PHP_FUNCTION(curl_setopt)
ch->handlers->write_header->func = *zvalue;
ch->handlers->write_header->method = PHP_CURL_USER;
break;
#if CURLOPT_PASSWDFUNCTION != 0
case CURLOPT_PASSWDFUNCTION:
if (ch->handlers->passwd) {
zval_ptr_dtor(&ch->handlers->passwd);
@@ -845,6 +895,7 @@ PHP_FUNCTION(curl_setopt)
error = curl_easy_setopt(ch->cp, CURLOPT_PASSWDFUNCTION, curl_passwd);
error = curl_easy_setopt(ch->cp, CURLOPT_PASSWDDATA, (void *) ch);
break;
#endif
case CURLOPT_POSTFIELDS:
if (Z_TYPE_PP(zvalue) == IS_ARRAY || Z_TYPE_PP(zvalue) == IS_OBJECT) {
zval **current;
@@ -887,7 +938,7 @@ PHP_FUNCTION(curl_setopt)
error = curl_formadd(&first, &last,
CURLFORM_COPYNAME, string_key,
CURLFORM_NAMELENGTH, string_key_len - 1,
CURLFORM_PTRCONTENTS, postval,
(ZVAL_REFCOUNT(*zvalue) > 1 ? CURLFORM_PTRCONTENTS : CURLFORM_COPYCONTENTS), postval,
CURLFORM_CONTENTSLENGTH, Z_STRLEN_PP(current),
CURLFORM_END);
}
@@ -1021,7 +1072,8 @@ PHP_FUNCTION(curl_exec)
error = curl_easy_perform(ch->cp);
SAVE_CURL_ERROR(ch, error);
if (error != CURLE_OK) {
/* CURLE_PARTIAL_FILE is returned by HEAD requests */
if (error != CURLE_OK && error != CURLE_PARTIAL_FILE) {
if (ch->handlers->write->buf.len > 0) {
smart_str_free(&ch->handlers->write->buf);
}
+1 -1
View File
@@ -3,7 +3,7 @@ dnl $Id$
dnl
PHP_ARG_WITH(cyrus, for cyrus imap support,
[ --with-cyrus[=dir] Include Cyrus IMAP support])
[ --with-cyrus[=DIR] Include Cyrus IMAP support])
if test "$PHP_CYRUS" != "no"; then
found_cyrus=no
+1 -1
View File
@@ -26,7 +26,7 @@ AC_DEFUN(AC_PREFERRED_DB_LIB,[
PHP_ARG_WITH(db, for xDBM support,
[ --with-db Include old xDBM support (deprecated use --with-dba)])
[ --with-db Include old xDBM support (deprecated, use --enable-dba instead)])
if test "$PHP_DB" != "no"; then
+7 -7
View File
@@ -513,7 +513,7 @@ PHP_FUNCTION(dbminsert)
info = php_find_dbm(id TSRMLS_CC);
if (!info) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %d", Z_LVAL_P(id));
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %ld", Z_LVAL_P(id));
RETURN_FALSE;
}
@@ -539,7 +539,7 @@ PHP_FUNCTION(dbmreplace)
info = php_find_dbm(id TSRMLS_CC);
if (!info) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %d", Z_LVAL_P(id));
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %ld", Z_LVAL_P(id));
RETURN_FALSE;
}
@@ -607,7 +607,7 @@ PHP_FUNCTION(dbmfetch)
info = php_find_dbm(id TSRMLS_CC);
if (!info) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %d", Z_LVAL_P(id));
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %ld", Z_LVAL_P(id));
RETURN_FALSE;
}
@@ -683,7 +683,7 @@ PHP_FUNCTION(dbmexists)
info = php_find_dbm(id TSRMLS_CC);
if (!info) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %d", Z_LVAL_P(id));
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %ld", Z_LVAL_P(id));
RETURN_FALSE;
}
@@ -732,7 +732,7 @@ PHP_FUNCTION(dbmdelete)
info = php_find_dbm(id TSRMLS_CC);
if (!info) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %d", Z_LVAL_P(id));
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %ld", Z_LVAL_P(id));
RETURN_FALSE;
}
@@ -779,7 +779,7 @@ PHP_FUNCTION(dbmfirstkey)
info = php_find_dbm(id TSRMLS_CC);
if (!info) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %d", Z_LVAL_P(id));
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %ld", Z_LVAL_P(id));
RETURN_FALSE;
}
@@ -841,7 +841,7 @@ PHP_FUNCTION(dbmnextkey)
info = php_find_dbm(id TSRMLS_CC);
if (!info) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %d", Z_LVAL_P(id));
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %ld", Z_LVAL_P(id));
RETURN_FALSE;
}
Executable
+48
View File
@@ -0,0 +1,48 @@
These functions build the foundation for accessing Berkeley DB style
databases.
This is a general abstraction layer for several file-based databases. As
such, functionality is limited to a common subset of features supported
by modern databases such as Sleepycat Software's DB2. (This is not to be
confused with IBM's DB2 software, which is supported through the ODBC
functions.)
This extensions allows to work with the following databases:
dbm DBM is the oldest (original) type of Berkeley DB style databases.
You should avoid it, if possible. We do not support the
compatibility functions built into DB2 and gdbm, because they are
only compatible on the source code level, but cannot handle the
original dbm format.
ndbm NDBM is a newer type and more flexible than dbm. It still has
most of the arbitrary limits of dbm (therefore it is deprecated).
gdbm GDBM is the GNU database manager.
db2 DB2 is Sleepycat Software's DB2. It's described as "a programmatic
toolkit that provides high-performance built-in database support
for both standalone and client/server applications.
db3 DB3 is Sleepycat Software's DB3.
db4 DB4 is Sleepycat Software's DB4. This is available since PHP 5.0.
cdb CDB is "a fast, reliable, lightweight package for creating and
reading constant databases." It is from the author of qmail and
can be found at http://cr.yp.to/cdb.html. Since it is constant,
we support only reading operations. And since PHP 4.3.0 we support
writing (not updating) through the internal cdb library.
cdb_make Since PHP 4.3.0 we support creation (not updating) of cdb files
when the bundled cdb library is used.
flatfile This is available since PHP 4.3.0 for compatibility with the
deprecated dbm extension only and should be avoided. However you
may use this where files were created in this format. That happens
when configure could not find any external library.
inifile This is available since PHP 4.3.3 to be able to modify php.ini
files from within PHP scripts. When working with ini files you
can pass arrays of the form array(0=>group,1=>value_name) or
strings of the form "[group]value_name" where group is optional.
After configuring and compiling PHP you must execute the following test
from commandline:
php run-tests.php ext/dba.
This shows whether your combination of handlers works. Most problematic
are dbm and ndbm which conflict with many installations. The reason for
this is that on several systems these libraries are part of more than one
other library. The configuration test only prevents you from configuring
malfaunctioning single handlers but not combinations.
+3 -3
View File
@@ -198,7 +198,7 @@ AC_ARG_WITH(db4,
[ --with-db4[=DIR] DBA: Include Berkeley DB4 support],[
if test "$withval" != "no"; then
PHP_DBA_STD_BEGIN
for i in $withval /usr/local/BerkeleyDB.4.1 /usr/local/BerkeleyDB.4.0 /usr/local /usr; do
for i in $withval /usr/local/BerkeleyDB.4.2 /usr/local/BerkeleyDB.4.1 /usr/local/BerkeleyDB.4.0 /usr/local /usr; do
if test -f "$i/db4/db.h"; then
THIS_PREFIX=$i
THIS_INCLUDE=$i/db4/db.h
@@ -221,7 +221,7 @@ AC_ARG_WITH(db4,
break
fi
done
PHP_DBA_DB_CHECK(4, db-4.1 db-4.0 db-4 db4 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)])
PHP_DBA_DB_CHECK(4, db-4.2 db-4.1 db-4.0 db-4 db4 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)])
fi
])
AC_DBA_STD_RESULT(db4,Berkeley DB4)
@@ -258,7 +258,7 @@ AC_ARG_WITH(db3,
done
PHP_DBA_DB_CHECK(3, db-3.3 db-3.2 db-3.1 db-3.0 db-3 db3 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)])
fi
])
])
AC_DBA_STD_RESULT(db3,Berkeley DB3)
AC_ARG_WITH(db2,
+35 -22
View File
@@ -27,7 +27,6 @@
#if HAVE_DBA
#include "ext/standard/flock_compat.h"
#include "php_ini.h"
#include <stdio.h>
#include <fcntl.h>
@@ -38,6 +37,7 @@
#include "php_dba.h"
#include "ext/standard/info.h"
#include "ext/standard/php_string.h"
#include "ext/standard/flock_compat.h"
#include "php_gdbm.h"
#include "php_ndbm.h"
@@ -651,22 +651,36 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
case 'c':
modenr = DBA_CREAT;
lock_mode = (lock_flag & DBA_LOCK_CREAT) ? LOCK_EX : 0;
if (lock_mode) {
if (lock_dbf) {
/* the create/append check will be done on the lock
* when the lib opens the file it is already created
*/
file_mode = "r+b"; /* read & write, seek 0 */
lock_file_mode = "a+b"; /* append */
} else {
file_mode = "a+b"; /* append */
lock_file_mode = "w+b"; /* create/truncate */
}
} else {
file_mode = "a+b";
if (!lock_mode || !lock_dbf) {
break;
}
/* When we lock the db file it will be created before the handler
* even tries to open it, hence we must change to truncate mode.
/* In case of the 'a+b' append mode, the handler is responsible
* to handle any rewind problems (see flatfile handler).
*/
break;
case 'n':
modenr = DBA_TRUNC;
lock_mode = (lock_flag & DBA_LOCK_TRUNC) ? LOCK_EX : 0;
file_mode = "w+b";
break;
default:
modenr = 0;
lock_mode = 0;
file_mode = "";
php_error_docref2(NULL TSRMLS_CC, Z_STRVAL_PP(args[0]), Z_STRVAL_PP(args[1]), E_WARNING, "Illegal DBA mode");
FREENOW;
RETURN_FALSE;
}
if (!lock_file_mode) {
lock_file_mode = file_mode;
}
if (*pmode=='d' || *pmode=='l' || *pmode=='-') {
pmode++; /* done already - skip here */
@@ -674,7 +688,7 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
if (*pmode=='t') {
pmode++;
if (!lock_flag) {
php_error_docref2(NULL TSRMLS_CC, Z_STRVAL_PP(args[0]), Z_STRVAL_PP(args[1]), E_WARNING, "You cannot combine modifiers - (no lock) and t (test lock)", hptr->name);
php_error_docref2(NULL TSRMLS_CC, Z_STRVAL_PP(args[0]), Z_STRVAL_PP(args[1]), E_WARNING, "You cannot combine modifiers - (no lock) and t (test lock)");
FREENOW;
RETURN_FALSE;
}
@@ -692,7 +706,7 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
lock_mode |= LOCK_NB; /* test =: non blocking */
}
}
if (*pmode || !modenr) {
if (*pmode) {
php_error_docref2(NULL TSRMLS_CC, Z_STRVAL_PP(args[0]), Z_STRVAL_PP(args[1]), E_WARNING, "Illegal DBA mode");
FREENOW;
RETURN_FALSE;
@@ -724,7 +738,6 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
if (!error && lock_mode) {
if (lock_dbf) {
info->lock.name = pestrdup(info->path, persistent);
lock_file_mode = file_mode;
} else {
spprintf(&info->lock.name, 0, "%s.lck", info->path);
if (!strcmp(file_mode, "r")) {
@@ -747,13 +760,13 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
FREENOW;
RETURN_FALSE;
}
if (php_stream_cast(info->lock.fp, PHP_STREAM_AS_FD, (void*)&info->lock.fd, 1) == FAILURE) {
if (php_stream_cast(info->lock.fp, PHP_STREAM_AS_FD, (void*)&info->lock.fd, 1) == FAILURE) {
dba_close(info TSRMLS_CC);
/* stream operation already wrote an error message */
FREENOW;
RETURN_FALSE;
}
if (php_flock(info->lock.fd, lock_mode)) {
if (php_flock(info->lock.fd, lock_mode)) {
error = "Unable to establish lock"; /* force failure exit */
}
}
@@ -829,7 +842,7 @@ PHP_FUNCTION(dba_close)
}
/* }}} */
/* {{{ proto bool dba_exists(string key, int handle)
/* {{{ proto bool dba_exists(string key, resource handle)
Checks, if the specified key exists */
PHP_FUNCTION(dba_exists)
{
@@ -844,7 +857,7 @@ PHP_FUNCTION(dba_exists)
}
/* }}} */
/* {{{ proto string dba_fetch(string key, [int skip ,] int handle)
/* {{{ proto string dba_fetch(string key, [int skip ,] resource handle)
Fetches the data associated with key */
PHP_FUNCTION(dba_fetch)
{
@@ -888,7 +901,7 @@ PHP_FUNCTION(dba_fetch)
}
/* }}} */
/* {{{ proto string dba_firstkey(int handle)
/* {{{ proto string dba_firstkey(resource handle)
Resets the internal key pointer and returns the first key */
PHP_FUNCTION(dba_firstkey)
{
@@ -903,7 +916,7 @@ PHP_FUNCTION(dba_firstkey)
}
/* }}} */
/* {{{ proto string dba_nextkey(int handle)
/* {{{ proto string dba_nextkey(resource handle)
Returns the next key */
PHP_FUNCTION(dba_nextkey)
{
@@ -918,7 +931,7 @@ PHP_FUNCTION(dba_nextkey)
}
/* }}} */
/* {{{ proto bool dba_delete(string key, int handle)
/* {{{ proto bool dba_delete(string key, resource handle)
Deletes the entry associated with key
If inifile: remove all other key lines */
PHP_FUNCTION(dba_delete)
@@ -937,7 +950,7 @@ PHP_FUNCTION(dba_delete)
}
/* }}} */
/* {{{ proto bool dba_insert(string key, string value, int handle)
/* {{{ proto bool dba_insert(string key, string value, resource handle)
If not inifile: Insert value as key, return false, if key exists already
If inifile: Add vakue as key (next instance of key) */
PHP_FUNCTION(dba_insert)
@@ -946,7 +959,7 @@ PHP_FUNCTION(dba_insert)
}
/* }}} */
/* {{{ proto bool dba_replace(string key, string value, int handle)
/* {{{ proto bool dba_replace(string key, string value, resource handle)
Inserts value as key, replaces key, if key exists already
If inifile: remove all other key lines */
PHP_FUNCTION(dba_replace)
@@ -955,7 +968,7 @@ PHP_FUNCTION(dba_replace)
}
/* }}} */
/* {{{ proto bool dba_optimize(int handle)
/* {{{ proto bool dba_optimize(resource handle)
Optimizes (e.g. clean up, vacuum) database */
PHP_FUNCTION(dba_optimize)
{
@@ -969,7 +982,7 @@ PHP_FUNCTION(dba_optimize)
}
/* }}} */
/* {{{ proto bool dba_sync(int handle)
/* {{{ proto bool dba_sync(resource handle)
Synchronizes database */
PHP_FUNCTION(dba_sync)
{
+18 -2
View File
@@ -44,7 +44,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_DBA" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_DBA=1 /D DBA_DB3=1 /D DB3_INCLUDE_FILE="db.h" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=0 /D DBA_DB3=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_DBA" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_DBA=1 /D DBA_FLATFILE=1 /D DBA_CDB=1 /D DBA_CDB_MAKE=1 /D DBA_CDB_BUILTIN=1 /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=0 /D DBA_DB3=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_DBA" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_DBA=1 /D DBA_FLATFILE=1 /D DBA_CDB=1 /D DBA_CDB_MAKE=1 /D DBA_CDB_BUILTIN=1 /D DBA_INIFILE=1 /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x407 /d "NDEBUG"
@@ -71,7 +71,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_DBA" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_DBA=1 /D "DBA_DB3" /D DB3_INCLUDE_FILE="db.h" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=1 /D "DBA_DB3" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_DBA" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_DBA=1 /D DBA_FLATFILE=1 /D DBA_CDB=1 /D DBA_CDB_MAKE=1 /D DBA_CDB_BUILTIN=1 /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=1 /D "DBA_DB3" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_DBA" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_DBA=1 /D DBA_FLATFILE=1 /D DBA_CDB=1 /D DBA_CDB_MAKE=1 /D DBA_CDB_BUILTIN=1 /D DBA_INIFILE=1 /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x407 /d "_DEBUG"
@@ -130,6 +130,10 @@ SOURCE=.\dba_gdbm.c
# End Source File
# Begin Source File
SOURCE=.\dba_inifile.c
# End Source File
# Begin Source File
SOURCE=.\dba_ndbm.c
# End Source File
# Begin Source File
@@ -138,6 +142,10 @@ SOURCE=.\libflatfile\flatfile.c
# End Source File
# Begin Source File
SOURCE=.\libinifile\inifile.c
# End Source File
# Begin Source File
SOURCE=.\libcdb\uint32.c
# End Source File
# End Group
@@ -186,12 +194,20 @@ SOURCE=.\php_gdbm.h
# End Source File
# Begin Source File
SOURCE=.\php_inifile.h
# End Source File
# Begin Source File
SOURCE=.\php_ndbm.h
# End Source File
# Begin Source File
SOURCE=.\libcdb\uint32.h
# End Source File
# Begin Source File
SOURCE=.\libinifile\inifile.h
# End Source File
# End Group
# End Target
# End Project
+5 -1
View File
@@ -53,9 +53,13 @@ DBA_OPEN_FUNC(db2)
struct stat check_stat;
int s = VCWD_STAT(info->path, &check_stat);
if (!s && !check_stat.st_size) {
info->mode = DBA_TRUNC; /* force truncate */
}
type = info->mode == DBA_READER ? DB_UNKNOWN :
info->mode == DBA_TRUNC ? DB_BTREE :
!s ? DB_BTREE : DB_UNKNOWN;
s ? DB_BTREE : DB_UNKNOWN;
gmode = info->mode == DBA_READER ? DB_RDONLY :
(info->mode == DBA_CREAT && s) ? DB_CREATE :
+6 -2
View File
@@ -62,9 +62,13 @@ DBA_OPEN_FUNC(db3)
struct stat check_stat;
int s = VCWD_STAT(info->path, &check_stat);
type = info->mode == DBA_READER ? DB_UNKNOWN :
if (!s && !check_stat.st_size) {
info->mode = DBA_TRUNC; /* force truncate */
}
type = info->mode == DBA_READER ? DB_UNKNOWN :
info->mode == DBA_TRUNC ? DB_BTREE :
!s? DB_BTREE : DB_UNKNOWN;
s ? DB_BTREE : DB_UNKNOWN;
gmode = info->mode == DBA_READER ? DB_RDONLY :
(info->mode == DBA_CREAT && s) ? DB_CREATE :
+6 -2
View File
@@ -62,9 +62,13 @@ DBA_OPEN_FUNC(db4)
struct stat check_stat;
int s = VCWD_STAT(info->path, &check_stat);
type = info->mode == DBA_READER ? DB_UNKNOWN :
if (!s && !check_stat.st_size) {
info->mode = DBA_TRUNC; /* force truncate */
}
type = info->mode == DBA_READER ? DB_UNKNOWN :
info->mode == DBA_TRUNC ? DB_BTREE :
!s? DB_BTREE : DB_UNKNOWN;
s ? DB_BTREE : DB_UNKNOWN;
gmode = info->mode == DBA_READER ? DB_RDONLY :
(info->mode == DBA_CREAT && s) ? DB_CREATE :
+38 -11
View File
@@ -41,6 +41,25 @@
DBA_OPEN_FUNC(flatfile)
{
int fd;
#ifdef F_SETFL
int flags;
#endif
if (info->mode != DBA_READER) {
if (SUCCESS != php_stream_cast(info->fp, PHP_STREAM_AS_FD, (void*)&fd, 1)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not cast stream");
return FAILURE;
}
#ifdef F_SETFL
/* Needed becasue some systems do not allow to write to the original
* file contents with O_APPEND being set.
*/
flags = fcntl(fd, F_SETFL);
fcntl(fd, F_SETFL, flags & ~O_APPEND);
#endif
}
info->dbf = pemalloc(sizeof(flatfile), info->flags&DBA_PERSISTENT);
memset(info->dbf, 0, sizeof(flatfile));
@@ -53,8 +72,9 @@ DBA_CLOSE_FUNC(flatfile)
{
FLATFILE_DATA;
if (dba->nextkey.dptr)
if (dba->nextkey.dptr) {
efree(dba->nextkey.dptr);
}
pefree(dba, info->flags&DBA_PERSISTENT);
}
@@ -67,8 +87,10 @@ DBA_FETCH_FUNC(flatfile)
FLATFILE_GKEY;
gval = flatfile_fetch(dba, gkey TSRMLS_CC);
if(gval.dptr) {
if(newlen) *newlen = gval.dsize;
if (gval.dptr) {
if (newlen) {
*newlen = gval.dsize;
}
new = estrndup(gval.dptr, gval.dsize);
efree(gval.dptr);
}
@@ -104,7 +126,7 @@ DBA_EXISTS_FUNC(flatfile)
FLATFILE_GKEY;
gval = flatfile_fetch(dba, gkey TSRMLS_CC);
if(gval.dptr) {
if (gval.dptr) {
efree(gval.dptr);
return SUCCESS;
}
@@ -122,12 +144,14 @@ DBA_FIRSTKEY_FUNC(flatfile)
{
FLATFILE_DATA;
if (dba->nextkey.dptr)
if (dba->nextkey.dptr) {
efree(dba->nextkey.dptr);
}
dba->nextkey = flatfile_firstkey(dba TSRMLS_CC);
if(dba->nextkey.dptr) {
if(newlen)
if (dba->nextkey.dptr) {
if (newlen) {
*newlen = dba->nextkey.dsize;
}
return estrndup(dba->nextkey.dptr, dba->nextkey.dsize);
}
return NULL;
@@ -137,15 +161,18 @@ DBA_NEXTKEY_FUNC(flatfile)
{
FLATFILE_DATA;
if(!dba->nextkey.dptr)
if (!dba->nextkey.dptr) {
return NULL;
}
if (dba->nextkey.dptr)
if (dba->nextkey.dptr) {
efree(dba->nextkey.dptr);
}
dba->nextkey = flatfile_nextkey(dba TSRMLS_CC);
if(dba->nextkey.dptr) {
if(newlen)
if (dba->nextkey.dptr) {
if (newlen) {
*newlen = dba->nextkey.dsize;
}
return estrndup(dba->nextkey.dptr, dba->nextkey.dsize);
}
return NULL;
+1 -1
View File
@@ -499,7 +499,7 @@ static int inifile_delete_replace_append(inifile *dba, const key_type *key, cons
ret = FAILURE;
} else {
php_stream_seek(dba->fp, 0, SEEK_END);
if (pos_grp_next != php_stream_tell(dba->fp)) {
if (pos_grp_next != (size_t)php_stream_tell(dba->fp)) {
php_stream_seek(dba->fp, pos_grp_next, SEEK_SET);
if (!php_stream_copy_to_stream(dba->fp, fp_tmp, PHP_STREAM_COPY_ALL)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not copy remainder to temporary stream");
+1 -1
View File
@@ -42,4 +42,4 @@ array(3) {
string(%d) "%s/dba/tests/test1.dbm"
[%d]=>
string(%d) "%s/dba/tests/test2.dbm"
}
}
+1 -1
View File
@@ -36,7 +36,7 @@
echo "Error creating database\n";
}
if ($handler != 'cdb') {
$db_writer = dba_open($db_filename, 'w'.$lock_flag, $handler);
$db_writer = dba_open($db_filename, 'c'.$lock_flag, $handler);
if (($dba_reader = @dba_open($db_filename, 'r'.$lock_flag.($lock_flag ? 't' : ''), $handler))===false) {
echo "Read during write: not allowed\n";
} else {
+4 -4
View File
@@ -298,7 +298,7 @@ PHP_FUNCTION(dbase_add_record)
tmp = **field;
zval_copy_ctor(&tmp);
convert_to_string(&tmp);
sprintf(t_cp, cur_f->db_format, Z_STRVAL(tmp));
snprintf(t_cp, cur_f->db_flen+1, cur_f->db_format, Z_STRVAL(tmp));
zval_dtor(&tmp);
t_cp += cur_f->db_flen;
}
@@ -310,7 +310,7 @@ PHP_FUNCTION(dbase_add_record)
RETURN_FALSE;
}
put_dbf_info(dbh);
put_dbf_info(dbh);
efree(cp);
RETURN_TRUE;
@@ -369,7 +369,7 @@ PHP_FUNCTION(dbase_replace_record)
RETURN_FALSE;
}
convert_to_string_ex(field);
sprintf(t_cp, cur_f->db_format, Z_STRVAL_PP(field));
snprintf(t_cp, cur_f->db_flen+1, cur_f->db_format, Z_STRVAL_PP(field));
t_cp += cur_f->db_flen;
}
@@ -674,7 +674,7 @@ PHP_FUNCTION(dbase_create)
/* field type */
if (zend_hash_index_find(Z_ARRVAL_PP (field), 1, (void **)&value) == FAILURE) {
php_error(E_WARNING, "expected field type as sececond element of list in field %d", i);
php_error(E_WARNING, "expected field type as second element of list in field %d", i);
RETURN_FALSE;
}
convert_to_string_ex(value);
+21 -8
View File
@@ -31,6 +31,15 @@
#include <fcntl.h>
#include <termios.h>
/* e.g. IRIX does not have CRTSCTS */
#ifndef CRTSCTS
# ifdef CNEW_RTSCTS
# define CRTSCTS CNEW_RTSCTS
# else
# define CRTSCTS 0
# endif /* CNEW_RTSCTS */
#endif /* !CRTSCTS */
#define le_fd_name "Direct I/O File Descriptor"
static int le_fd;
@@ -43,7 +52,7 @@ function_entry dio_functions[] = {
PHP_FE(dio_read, NULL)
PHP_FE(dio_write, NULL)
PHP_FE(dio_close, NULL)
PHP_FE(dio_tcsetattr, NULL)
PHP_FE(dio_tcsetattr, NULL)
{NULL, NULL, NULL}
};
@@ -154,6 +163,10 @@ PHP_FUNCTION(dio_open)
return;
}
if (php_check_open_basedir(file_name TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(file_name, "wb+", CHECKUID_CHECK_MODE_PARAM))) {
RETURN_FALSE;
}
if (ZEND_NUM_ARGS() == 3) {
fd = open(file_name, flags, mode);
} else {
@@ -161,7 +174,7 @@ PHP_FUNCTION(dio_open)
}
if (fd == -1) {
php_error(E_WARNING, "%s(): cannot open file %s with flags %d and permissions %d: %s",
php_error(E_WARNING, "%s(): cannot open file %s with flags %ld and permissions %ld: %s",
get_active_function_name(TSRMLS_C), file_name, flags, mode, strerror(errno));
RETURN_FALSE;
}
@@ -240,7 +253,7 @@ PHP_FUNCTION(dio_truncate)
ZEND_FETCH_RESOURCE(f, php_fd_t *, &r_fd, -1, le_fd_name, le_fd);
if (ftruncate(f->fd, offset) == -1) {
php_error(E_WARNING, "%s(): couldn't truncate %d to %d bytes: %s",
php_error(E_WARNING, "%s(): couldn't truncate %d to %ld bytes: %s",
get_active_function_name(TSRMLS_C), f->fd, offset, strerror(errno));
RETURN_FALSE;
}
@@ -426,13 +439,13 @@ PHP_FUNCTION(dio_tcsetattr)
long BAUD,DATABITS,STOPBITS,PARITYON,PARITY;
HashTable *fh;
zval **element;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rz", &r_fd, &arg) == FAILURE) {
return;
}
ZEND_FETCH_RESOURCE(f, php_fd_t *, &r_fd, -1, le_fd_name, le_fd);
if (Z_TYPE_P(arg) != IS_ARRAY) {
zend_error(E_WARNING,"tcsetattr, third argument should be an associative array");
return;
@@ -464,8 +477,8 @@ PHP_FUNCTION(dio_tcsetattr)
Parity = Z_LVAL_PP(element);
}
/* assign to correct values... */
switch (Baud_Rate) {
/* assign to correct values... */
switch (Baud_Rate) {
case 38400:
BAUD = B38400;
break;
@@ -561,7 +574,7 @@ PHP_FUNCTION(dio_tcsetattr)
zend_error(E_WARNING, "invalid parity %d", Parity);
RETURN_FALSE;
}
newtio.c_cflag = BAUD | CRTSCTS | DATABITS | STOPBITS | PARITYON | PARITY | CLOCAL | CREAD;
newtio.c_iflag = IGNPAR;
newtio.c_oflag = 0;
+3 -3
View File
@@ -44,7 +44,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\Zend" /I "..\..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_DOMXML" /D ZTS=1 /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DOMXML_EXPORTS" /D "COMPILE_DL_DOMXML" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_DOMXML=1 /D HAVE_DOMXSLT=1 /D LIBXML_STATIC=1 /D LIBXSLT_STATIC=1 /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DOMXML_EXPORTS" /D "COMPILE_DL_DOMXML" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_DOMXML=1 /D HAVE_DOMXSLT=1 /D LIBXML_STATIC=1 /D LIBXSLT_STATIC=1 /D "LIBXML_THREAD_ENABLED" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x406 /d "NDEBUG"
@@ -72,7 +72,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "mssql-70" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_DOMXML" /D ZTS=1 /YX /FD /c
# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DOMXML_EXPORTS" /D "COMPILE_DL_DOMXML" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_DOMXML=1 /D HAVE_DOMXSLT=1 /D LIBXML_STATIC=1 /D LIBXSLT_STATIC=1 /FR /YX /FD /c
# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DOMXML_EXPORTS" /D "COMPILE_DL_DOMXML" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_DOMXML=1 /D HAVE_DOMXSLT=1 /D LIBXML_STATIC=1 /D LIBXSLT_STATIC=1 /D "LIBXML_THREAD_ENABLED" /FR /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x406 /d "NDEBUG"
@@ -82,7 +82,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386
# ADD LINK32 php4ts_debug.lib libxml2_a.lib libxslt_a.lib iconv.lib resolv.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /debug /machine:I386 /out:"..\..\Debug_TS/php_domxml.dll" /libpath:"..\..\Debug_TS" /libpath:"..\..\..\bindlib_w32\Release" /libpath:"..\..\..\php_build\lib\libxslt"
# ADD LINK32 php4ts_debug.lib libxml2_a.lib libxslt_a.lib iconv.lib resolv.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /debug /machine:I386 /nodefaultlib:"msvcrt" /out:"..\..\Debug_TS/php_domxml.dll" /libpath:"..\..\Debug_TS" /libpath:"..\..\..\bindlib_w32\Release" /libpath:"..\..\..\php_build\lib\libxslt"
!ENDIF
+313 -290
View File
@@ -146,6 +146,8 @@
#define DOMXML_LOAD_SUBSTITUTE_ENTITIES 4
#define DOMXML_LOAD_COMPLETE_ATTRS 8
#define DOMXML_LOAD_DONT_KEEP_BLANKS 16
#define DOMXML_LOAD_FILE 1
static int le_domxmldocp;
static int le_domxmldoctypep;
static int le_domxmldtdp;
@@ -158,6 +160,7 @@ static int le_domxmlpip;
static int le_domxmlcommentp;
static int le_domxmlnotationp;
static int le_domxmlparserp;
static int le_domxmlnamespacep;
/*static int le_domxmlentityp;*/
static int le_domxmlentityrefp;
@@ -170,7 +173,6 @@ static int le_domxsltstylesheetp;
static void domxml_error(void *ctx, const char *msg, ...);
static void domxml_error_ext(void *ctx, const char *msg, ...);
static void domxml_error_validate(void *ctx, const char *msg, ...);
static xmlDocPtr php_dom_xmlSAXParse(xmlSAXHandlerPtr sax, const char *buffer, int size, int recovery, void *data);
#if defined(LIBXML_XPATH_ENABLED)
static int le_xpathctxp;
@@ -198,9 +200,9 @@ zend_class_entry *xpathobject_class_entry;
#endif
#if HAVE_DOMXSLT
zend_class_entry *domxsltstylesheet_class_entry;
static int xslt_has_xsl_keys (xmlDocPtr doc);
#endif
static int node_attributes(zval **attributes, xmlNode *nodep TSRMLS_DC);
static int node_children(zval **children, xmlNode *nodep TSRMLS_DC);
@@ -512,6 +514,13 @@ static zend_function_entry php_domxmlattr_class_functions[] = {
};
static zend_function_entry php_domxmlns_class_functions[] = {
PHP_FALIAS(node_name, domxml_node_name, NULL)
PHP_FALIAS(node_type, domxml_node_type, NULL)
PHP_FALIAS(node_value, domxml_node_value, NULL)
PHP_FALIAS(prefix, domxml_node_prefix, NULL)
PHP_FALIAS(namespace_uri, domxml_node_namespace_uri, NULL)
PHP_FALIAS(owner_document, domxml_node_owner_document, NULL)
PHP_FALIAS(parent_node, domxml_node_parent, NULL)
{NULL, NULL, NULL}
};
@@ -698,9 +707,9 @@ static xmlNodeSetPtr php_get_elements_by_tagname(xmlNodePtr n, xmlChar* name, xm
Namespace support
*/
if ( n != NULL && name != NULL ) {
cld = n->children;
cld = n;
while ( cld != NULL ) {
if ( xmlStrcmp( name, cld->name ) == 0 ){
if (cld->type == XML_ELEMENT_NODE && (xmlStrEqual(name, "*") || xmlStrcmp(name, cld->name) == 0)){
if ( rv == NULL ) {
rv = xmlXPathNodeSetCreate( cld ) ;
}
@@ -708,7 +717,7 @@ static xmlNodeSetPtr php_get_elements_by_tagname(xmlNodePtr n, xmlChar* name, xm
xmlXPathNodeSetAdd( rv, cld );
}
}
rv = php_get_elements_by_tagname(cld, name, rv);
rv = php_get_elements_by_tagname(cld->children, name, rv);
cld = cld->next;
}
}
@@ -732,11 +741,19 @@ static void php_free_xml_node(zend_rsrc_list_entry *rsrc TSRMLS_DC)
/* if node has no parent, it will not be freed by php_free_xml_doc, so do it here
and for all children as well. */
if (node->parent == NULL) {
if (node->parent == NULL || node->type == XML_NAMESPACE_DECL) {
/* Attribute Nodes ccontain accessible children
attr_list_wrapper_dtor(node->properties); */
xmlSetTreeDoc(node, NULL);
node_list_wrapper_dtor((xmlNodePtr) node->properties, 1 TSRMLS_CC);
if (node->type == XML_NAMESPACE_DECL) {
if (node->ns) {
xmlFreeNs(node->ns);
node->ns = NULL;
}
node->type = XML_ELEMENT_NODE;
} else {
node_list_wrapper_dtor((xmlNodePtr) node->properties, 1 TSRMLS_CC);
}
node_list_wrapper_dtor(node->children, 1 TSRMLS_CC);
node_wrapper_dtor(node);
xmlFreeNode(node);
@@ -1370,6 +1387,22 @@ PHPAPI zval *php_domobject_new(xmlNodePtr obj, int *found, zval *wrapper_in TSR
break;
}
case XML_NAMESPACE_DECL:
{
xmlNodePtr nodep = obj;
if(!wrapper_in)
object_init_ex(wrapper, domxmlns_class_entry);
rsrc_type = le_domxmlnamespacep;
add_property_long(wrapper, "type", Z_TYPE_P(nodep));
add_property_stringl(wrapper, "name", (char *) nodep->name, strlen(nodep->name), 1);
content = xmlNodeGetContent(nodep->children);
if (content) {
add_property_stringl(wrapper, "value", (char *) content, strlen(content), 1);
xmlFree(content);
}
break;
}
default:
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unsupported node type: %d\n", Z_TYPE_P(obj));
FREE_ZVAL(wrapper);
@@ -1414,7 +1447,7 @@ static void domxml_error_ext(void *ctx, const char *msg, ...)
add_assoc_string(errormessages,"errormessage",buf,1);
input = ctxt->input;
if (ctxt->name) {
add_assoc_string(errormessages,"nodename",ctxt->name,1);
add_assoc_string(errormessages,"nodename",(char *) ctxt->name,1);
}
if (input != NULL) {
add_assoc_long(errormessages,"line",input->line);
@@ -1450,7 +1483,7 @@ static void domxml_error_validate(void *ctx, const char *msg, ...)
}
if (ctxt->parser != NULL) {
if (ctxt->parser->name) {
add_assoc_string(errormessages,"nodename",ctxt->parser->name,1);
add_assoc_string(errormessages,"nodename",(char *)ctxt->parser->name,1);
}
if (ctxt->parser->input != NULL) {
@@ -1477,73 +1510,13 @@ static void domxml_error_validate(void *ctx, const char *msg, ...)
}
static xmlDocPtr php_dom_xmlSAXParse(xmlSAXHandlerPtr sax, const char *buffer, int size, int recovery, void *data)
{
xmlDocPtr ret;
xmlParserCtxtPtr ctxt;
domxml_ErrorCtxt errorCtxt;
char *directory = NULL;
xmlInitParser();
/*if size == -1, we assume, it's a filename not a inmemory xml doc*/
if (size == -1) {
ctxt = (xmlParserCtxt *) xmlCreateFileParserCtxt( buffer);
} else {
ctxt = (xmlParserCtxt *) xmlCreateMemoryParserCtxt((xmlChar *) buffer, size);
}
if (ctxt == NULL) {
return(NULL);
}
if (sax != NULL) {
if (ctxt->sax != NULL)
xmlFree(ctxt->sax);
ctxt->sax = sax;
}
if (data!=NULL) {
ctxt->_private=data;
}
/* store directory name */
if (size == -1) {
if ((ctxt->directory == NULL) && (directory == NULL))
directory = xmlParserGetDirectory(buffer);
if ((ctxt->directory == NULL) && (directory != NULL))
ctxt->directory = (char *) xmlStrdup((xmlChar *) directory);
}
errorCtxt.valid = &ctxt->vctxt;
errorCtxt.errors = data;
errorCtxt.parser = ctxt;
ctxt->sax->error = domxml_error_ext;
ctxt->sax->warning = domxml_error_ext;
ctxt->vctxt.userData= (void *) &errorCtxt;
ctxt->vctxt.error = (xmlValidityErrorFunc) domxml_error_validate;
ctxt->vctxt.warning = (xmlValidityWarningFunc) domxml_error_validate;
xmlParseDocument(ctxt);
if ((ctxt->wellFormed) || recovery) {
ret = ctxt->myDoc;
} else {
ret = NULL;
xmlFreeDoc(ctxt->myDoc);
ctxt->myDoc = NULL;
}
if (sax != NULL)
ctxt->sax = NULL;
xmlFreeParserCtxt(ctxt);
return(ret);
}
PHP_MSHUTDOWN_FUNCTION(domxml)
{
#if HAVE_DOMXSLT
xsltCleanupGlobals();
#endif
xmlCleanupParser();
/* If you want do find memleaks in this module, compile libxml2 with --with-mem-debug and
uncomment the following line, this will tell you the amount of not freed memory
and the total used memory into apaches error_log */
@@ -1567,6 +1540,7 @@ PHP_MINIT_FUNCTION(domxml)
le_domxmlpip = zend_register_list_destructors_ex(php_free_xml_node, NULL, "dompi", module_number);
le_domxmlparserp = zend_register_list_destructors_ex(php_free_xml_parser, NULL, "domparser", module_number);
le_domxmldoctypep = zend_register_list_destructors_ex(php_free_xml_node, NULL, "domdocumenttype", module_number);
le_domxmlnamespacep = zend_register_list_destructors_ex(php_free_xml_node, NULL, "domnamespacenode", module_number);
le_domxmldocp = zend_register_list_destructors_ex(php_free_xml_doc, NULL, "domdocument", module_number);
/* Freeing the document contains freeing the complete tree.
Therefore nodes, attributes etc. may not be freed seperately.
@@ -1695,6 +1669,9 @@ PHP_MINIT_FUNCTION(domxml)
REGISTER_LONG_CONSTANT("DOMXML_LOAD_COMPLETE_ATTRS",DOMXML_LOAD_COMPLETE_ATTRS, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DOMXML_LOAD_DONT_KEEP_BLANKS",DOMXML_LOAD_DONT_KEEP_BLANKS, CONST_CS | CONST_PERSISTENT);
xmlSetGenericErrorFunc(xmlGenericErrorContext, (xmlGenericErrorFunc)domxml_error);
#if (defined(LIBXML_THREAD_ENABLED) && LIBXML_VERSION >= 20511)
xmlThrDefSetGenericErrorFunc(xmlGenericErrorContext, (xmlGenericErrorFunc)domxml_error);
#endif
#if HAVE_DOMXSLT
xsltSetGenericErrorFunc(xsltGenericErrorContext, (xmlGenericErrorFunc)domxml_error);
#if HAVE_DOMEXSLT
@@ -1949,6 +1926,7 @@ PHP_FUNCTION(domxml_node_name)
zval *id;
xmlNode *n;
int fullQName = 0;
xmlChar *qname = NULL;
const char *str = NULL;
DOMXML_PARAM_ONE(n, id, le_domxmlnodep,"|b",&fullQName);
@@ -1956,16 +1934,24 @@ PHP_FUNCTION(domxml_node_name)
switch (Z_TYPE_P(n)) {
case XML_ELEMENT_NODE:
if (fullQName && n->ns && n->ns->prefix) {
/* there is maybe a better way of doing this...*/
char *tmpstr;
tmpstr = (char*) emalloc((strlen(n->ns->prefix)+strlen(n->name)) * sizeof(char)) ;
sprintf(tmpstr,"%s:%s", (char*) n->ns->prefix, (char*) n->name);
str = strdup(tmpstr);
efree(tmpstr);
qname = xmlStrdup(n->ns->prefix);
qname = xmlStrcat(qname, ":");
qname = xmlStrcat(qname, n->name);
str = qname;
} else {
str = n->name;
}
break;
case XML_NAMESPACE_DECL:
if (n->ns != NULL && n->ns->prefix) {
qname = xmlStrdup("xmlns");
qname = xmlStrcat(qname, ":");
qname = xmlStrcat(qname, n->name);
str = qname;
} else {
str = (char *) n->name;
}
break;
case XML_TEXT_NODE:
str = "#text";
@@ -2009,7 +1995,10 @@ PHP_FUNCTION(domxml_node_name)
}
if(str != NULL) {
RETURN_STRING((char *) str, 1);
RETVAL_STRING((char *) str, 1);
if (qname) {
xmlFree(qname);
}
} else {
RETURN_EMPTY_STRING();
}
@@ -2035,6 +2024,11 @@ PHP_FUNCTION(domxml_node_value)
case XML_PI_NODE:
str = n->content;
break;
case XML_NAMESPACE_DECL:
if (n->children) {
str = n->children->content;
}
break;
default:
str = NULL;
break;
@@ -2425,11 +2419,6 @@ PHP_FUNCTION(domxml_node_append_child)
DOMXML_GET_OBJ(child, node, le_domxmlnodep);
if (child->type == XML_ATTRIBUTE_NODE) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Can't append attribute node");
RETURN_FALSE;
}
/* XXX:ls */
if (child == parent) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Can't append node to itself");
@@ -2469,6 +2458,45 @@ PHP_FUNCTION(domxml_node_append_child)
}
}
/* end libxml2 code */
else if (child->type == XML_ATTRIBUTE_NODE) {
if (parent->properties != NULL) {
/* Check if an attribute with the same name exists */
xmlAttrPtr foundattrp;
if (child->ns == NULL)
foundattrp = xmlHasProp(parent, child->name);
else
foundattrp = xmlHasNsProp(parent, child->name, child->ns->href);
if (foundattrp != (xmlAttrPtr) child) {
if (foundattrp != NULL) {
if (dom_object_get_data((xmlNodePtr) foundattrp) == NULL) {
node_list_unlink(foundattrp->children);
xmlUnlinkNode((xmlNodePtr) foundattrp);
xmlFreeProp(foundattrp);
} else {
xmlUnlinkNode((xmlNodePtr) foundattrp);
}
new_child = (xmlNodePtr) xmlCopyProp(parent, (xmlAttrPtr) child);
if (!new_child) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "No such attribute '%s'", child->name);
RETURN_FALSE;
} else {
xmlAttr *prop;
prop = parent->properties;
while (prop->next != NULL) {
prop = prop->next;
}
prop->next = (xmlAttrPtr) new_child;
((xmlAttrPtr) new_child)->prev = prop;
}
}
} else {
new_child = (xmlNodePtr) foundattrp;
}
}
/* For all other intents and purposes fall through to the xmlAddChild
* call
*/
}
if (NULL == new_child) {
new_child = xmlAddChild(parent, child);
@@ -3027,88 +3055,43 @@ PHP_FUNCTION(domxml_elem_has_attribute)
PHP_FUNCTION(domxml_doc_get_elements_by_tagname)
{
zval *id, *rv, *contextnode = NULL,*ctxpin = NULL;
xmlXPathContextPtr ctxp;
xmlDocPtr docp;
xmlNode *contextnodep = NULL, *nodep = NULL;
int name_len,i;
char *name;
xmlNodeSet *nodesetp = NULL;
xmlXPathObjectPtr xpathobjp;
xmlNode *contextnodep;
int name_len;
int free_context = 0;
char *str,*name;
contextnode = NULL;
contextnodep = NULL;
DOMXML_PARAM_FOUR(docp, id, le_domxmldocp, "s|oo", &name, &name_len,&ctxpin,&contextnodep);
/* if no xpath_context was submitted, create a new one */
if (ctxpin == NULL) {
ctxp = xmlXPathNewContext(docp);
free_context = 1;
} else {
DOMXML_GET_OBJ(ctxp, ctxpin, le_xpathctxp);
}
DOMXML_PARAM_FOUR(docp, id, le_domxmldocp, "s|oo", &name, &name_len,&ctxpin,&contextnode);
if (contextnode) {
DOMXML_GET_OBJ(contextnodep, contextnode, le_domxmlnodep);
if (contextnodep->type == XML_ELEMENT_NODE) {
nodep = contextnodep->children;
}
} else {
nodep = xmlDocGetRootElement(docp);
}
ctxp->node = contextnodep;
str = (char*) emalloc((name_len+3) * sizeof(char)) ;
if (str == NULL) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot allocate memory for string");
}
sprintf(str ,"//%s",name);
xpathobjp = xmlXPathEval(str, ctxp);
efree(str);
ctxp->node = NULL;
if (!xpathobjp) {
RETURN_FALSE;
}
MAKE_STD_ZVAL(rv);
if(array_init(rv) != SUCCESS)
{
if(array_init(rv) != SUCCESS) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot create required array");
RETURN_FALSE;
}
switch (Z_TYPE_P(xpathobjp)) {
nodesetp = php_get_elements_by_tagname(nodep, name, NULL);
case XPATH_NODESET:
{
int i;
xmlNodeSetPtr nodesetp;
if(nodesetp) {
for (i = 0; i < nodesetp->nodeNr; i++) {
xmlNodePtr node = nodesetp->nodeTab[i];
zval *child;
int retnode;
if (NULL == (nodesetp = xpathobjp->nodesetval)) {
zval_dtor(rv);
xmlXPathFreeObject (xpathobjp);
if (free_context) {
xmlXPathFreeContext(ctxp);
}
RETURN_FALSE;
}
for (i = 0; i < nodesetp->nodeNr; i++) {
xmlNodePtr node = nodesetp->nodeTab[i];
zval *child;
int retnode;
/* construct a node object */
child = php_domobject_new(node, &retnode, NULL TSRMLS_CC);
zend_hash_next_index_insert(Z_ARRVAL_P(rv), &child, sizeof(zval *), NULL);
}
break;
child = php_domobject_new(node, &retnode, NULL TSRMLS_CC);
zend_hash_next_index_insert(Z_ARRVAL_P(rv), &child, sizeof(zval *), NULL);
}
default:
break;
}
xmlXPathFreeObject(xpathobjp);
if (free_context) {
xmlXPathFreeContext(ctxp);
}
xmlXPathFreeNodeSet(nodesetp);
*return_value = *rv;
FREE_ZVAL(rv);
}
@@ -3176,7 +3159,7 @@ PHP_FUNCTION(domxml_elem_get_elements_by_tagname)
RETURN_FALSE;
}
nodesetp = php_get_elements_by_tagname(nodep, name, NULL);
nodesetp = php_get_elements_by_tagname(nodep->children, name, NULL);
if(nodesetp) {
for (i = 0; i < nodesetp->nodeNr; i++) {
@@ -3933,6 +3916,93 @@ PHP_FUNCTION(domxml_doc_ids)
}
/* }}} */
static xmlDocPtr domxml_document_parser(int mode, int loadtype, char *source, void *data TSRMLS_DC) {
xmlDocPtr ret;
xmlParserCtxtPtr ctxt;
domxml_ErrorCtxt errorCtxt;
char *directory = NULL;
int validate = 0, resolve_externals = 0;
int keep_blanks = 1, recovery = 0, substitute_ent;
substitute_ent = xmlSubstituteEntitiesDefaultValue;
if (mode & DOMXML_LOAD_DONT_KEEP_BLANKS)
keep_blanks = 0;
if(mode & DOMXML_LOAD_SUBSTITUTE_ENTITIES)
substitute_ent = 1;
if(mode & DOMXML_LOAD_COMPLETE_ATTRS)
resolve_externals = XML_COMPLETE_ATTRS;
if(mode & DOMXML_LOAD_VALIDATING)
validate = 1;
if(mode & DOMXML_LOAD_RECOVERING)
recovery = 1;
xmlInitParser();
keep_blanks = xmlKeepBlanksDefault(keep_blanks);
if (loadtype == DOMXML_LOAD_FILE) {
ctxt = xmlCreateFileParserCtxt(source);
} else {
ctxt = xmlCreateDocParserCtxt(source);
}
xmlKeepBlanksDefault(keep_blanks);
/* xmlIndentTreeOutput default is changed in xmlKeepBlanksDefault
reset back to 1 which is default value */
xmlIndentTreeOutput = 1;
if (ctxt == NULL) {
return(NULL);
}
if (loadtype == DOMXML_LOAD_FILE) {
if ((ctxt->directory == NULL) && (directory == NULL))
directory = xmlParserGetDirectory(source);
if ((ctxt->directory == NULL) && (directory != NULL))
ctxt->directory = (char *) xmlStrdup((xmlChar *) directory);
}
ctxt->validate = validate;
ctxt->loadsubset = resolve_externals;
ctxt->replaceEntities = substitute_ent;
/* Always set error handling as threaded libxml doesnt pick up the global handling
set by xmlSetGenericErrorFunc for child threads */
ctxt->_private = data;
errorCtxt.valid = &ctxt->vctxt;
errorCtxt.errors = data;
errorCtxt.parser = ctxt;
ctxt->sax->error = domxml_error_ext;
ctxt->sax->warning = domxml_error_ext;
#if LIBXML_VERSION >= 20600
ctxt->sax->cdataBlock = NULL;
#endif
ctxt->vctxt.userData= (void *) &errorCtxt;
ctxt->vctxt.error = (xmlValidityErrorFunc) domxml_error_validate;
ctxt->vctxt.warning = (xmlValidityWarningFunc) domxml_error_validate;
xmlParseDocument(ctxt);
if (ctxt->wellFormed || recovery)
ret = ctxt->myDoc;
else {
ret = NULL;
xmlFreeDoc(ctxt->myDoc);
ctxt->myDoc = NULL;
}
xmlFreeParserCtxt(ctxt);
return(ret);
}
/* {{{ proto object xmldoc(string xmldoc[, int mode[, array error]])
Creates DOM object of XML document */
PHP_FUNCTION(xmldoc)
@@ -3943,76 +4013,23 @@ PHP_FUNCTION(xmldoc)
char *buffer;
int buffer_len;
long mode = 0;
int prevSubstValue;
int oldvalue = xmlDoValidityCheckingDefaultValue;
int oldvalue_keepblanks;
int prevLoadExtDtdValue = xmlLoadExtDtdDefaultValue;
zval *errors ;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lz", &buffer, &buffer_len, &mode, &errors) == FAILURE) {
return;
}
/* Either of the following line force validation */
/* xmlLoadExtDtdDefaultValue = XML_DETECT_IDS; */
/* xmlDoValidityCheckingDefaultValue = 1; */
if (ZEND_NUM_ARGS() == 3 ) {
if (ZEND_NUM_ARGS() == 3) {
zval_dtor(errors);
array_init(errors);
docp = domxml_document_parser(mode, 0, buffer, errors TSRMLS_CC);
} else {
docp = domxml_document_parser(mode, 0, buffer, NULL TSRMLS_CC);
}
if (mode & DOMXML_LOAD_DONT_KEEP_BLANKS)
oldvalue_keepblanks = xmlKeepBlanksDefault(0);
else
oldvalue_keepblanks = xmlKeepBlanksDefault(1);
if(mode & DOMXML_LOAD_SUBSTITUTE_ENTITIES)
prevSubstValue = xmlSubstituteEntitiesDefault (1);
else
prevSubstValue = xmlSubstituteEntitiesDefault (0);
if(mode & DOMXML_LOAD_COMPLETE_ATTRS)
xmlLoadExtDtdDefaultValue |= XML_COMPLETE_ATTRS;
switch (mode & (DOMXML_LOAD_PARSING | DOMXML_LOAD_VALIDATING | DOMXML_LOAD_RECOVERING)) {
case DOMXML_LOAD_PARSING:
xmlDoValidityCheckingDefaultValue = 0;
if (ZEND_NUM_ARGS() == 3) {
docp = php_dom_xmlSAXParse( NULL, (char *) buffer, buffer_len, 0 , errors);
} else {
docp = xmlParseDoc(buffer);
}
break;
case DOMXML_LOAD_VALIDATING:
xmlDoValidityCheckingDefaultValue = 1;
if (ZEND_NUM_ARGS() == 3) {
docp = php_dom_xmlSAXParse(NULL, (char *) buffer, buffer_len, 0, errors);
} else {
docp = xmlParseDoc(buffer);
}
break;
case DOMXML_LOAD_RECOVERING:
xmlDoValidityCheckingDefaultValue = 0;
if (ZEND_NUM_ARGS() == 3) {
docp = php_dom_xmlSAXParse(NULL, (char *) buffer, buffer_len, 1, errors);
} else {
docp = xmlRecoverDoc(buffer);
}
break;
}
xmlSubstituteEntitiesDefault (prevSubstValue);
xmlDoValidityCheckingDefaultValue = oldvalue;
xmlLoadExtDtdDefaultValue = prevLoadExtDtdValue;
xmlKeepBlanksDefault(oldvalue_keepblanks);
if (!docp)
RETURN_FALSE;
/* dtd = xmlGetIntSubset(docp);
if(dtd) {
xmlParseDTD(dtd->ExternalID, dtd->SystemID);
}
*/
if(DOMXML_IS_TYPE(getThis(), domxmldoc_class_entry)) {
DOMXML_DOMOBJ_NEW(getThis(), (xmlNodePtr) docp, &ret);
} else {
@@ -4030,68 +4047,24 @@ PHP_FUNCTION(xmldocfile)
int ret, file_len;
char *file;
long mode = 0;
int prevSubstValue;
int oldvalue = xmlDoValidityCheckingDefaultValue;
int oldvalue_keepblanks;
zval *errors = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lz", &file, &file_len, &mode, &errors) == FAILURE) {
return;
}
if (ZEND_NUM_ARGS() == 3 ) {
if (ZEND_NUM_ARGS() == 3) {
zval_dtor(errors);
array_init(errors);
docp = domxml_document_parser(mode, 1, file, errors TSRMLS_CC);
} else {
docp = domxml_document_parser(mode, 1, file, NULL TSRMLS_CC);
}
if (mode & DOMXML_LOAD_DONT_KEEP_BLANKS)
oldvalue_keepblanks = xmlKeepBlanksDefault(0);
else
oldvalue_keepblanks = xmlKeepBlanksDefault(1);
if(mode & DOMXML_LOAD_SUBSTITUTE_ENTITIES)
prevSubstValue = xmlSubstituteEntitiesDefault (1);
else
prevSubstValue = xmlSubstituteEntitiesDefault (0);
if(mode & DOMXML_LOAD_COMPLETE_ATTRS)
xmlLoadExtDtdDefaultValue |= XML_COMPLETE_ATTRS;
switch (mode & (DOMXML_LOAD_PARSING | DOMXML_LOAD_VALIDATING | DOMXML_LOAD_RECOVERING)) {
case DOMXML_LOAD_PARSING:
xmlDoValidityCheckingDefaultValue = 0;
if (ZEND_NUM_ARGS() == 3) {
docp = php_dom_xmlSAXParse( NULL, (char *) file, -1 , 0 , errors);
} else {
docp = xmlParseFile(file);
}
break;
case DOMXML_LOAD_VALIDATING:
xmlDoValidityCheckingDefaultValue = 1;
if (ZEND_NUM_ARGS() == 3) {
docp = php_dom_xmlSAXParse(NULL, (char *) file, -1, 0, errors);
} else {
docp = xmlParseFile(file);
}
break;
case DOMXML_LOAD_RECOVERING:
xmlDoValidityCheckingDefaultValue = 0;
if (ZEND_NUM_ARGS() == 3) {
docp = php_dom_xmlSAXParse(NULL, (char*) file, -1, 1, errors);
} else {
docp = xmlRecoverFile(file);
}
break;
}
xmlSubstituteEntitiesDefault (prevSubstValue);
xmlDoValidityCheckingDefaultValue = oldvalue;
xmlKeepBlanksDefault(oldvalue_keepblanks);
if (!docp) {
RETURN_FALSE;
}
if(DOMXML_IS_TYPE(getThis(), domxmldoc_class_entry)) {
DOMXML_DOMOBJ_NEW(getThis(), (xmlNodePtr) docp, &ret);
} else {
@@ -4286,7 +4259,6 @@ PHP_FUNCTION(domxml_doc_validate)
xmlDoc *docp;
domxml_ErrorCtxt errorCtxt;
zval *errors ;
int oldvalue = xmlDoValidityCheckingDefaultValue;
DOMXML_PARAM_ONE(docp, id, le_domxmldocp,"|z",&errors);
errorCtxt.valid = &cvp;
@@ -4300,7 +4272,6 @@ PHP_FUNCTION(domxml_doc_validate)
}
errorCtxt.parser = NULL;
xmlDoValidityCheckingDefaultValue = 1;
cvp.userData = (void *) &errorCtxt;
cvp.error = (xmlValidityErrorFunc) domxml_error_validate;
cvp.warning = (xmlValidityWarningFunc) domxml_error_validate;
@@ -4313,8 +4284,6 @@ PHP_FUNCTION(domxml_doc_validate)
} else {
RETVAL_FALSE;
}
xmlDoValidityCheckingDefaultValue = oldvalue;
}
/* }}} */
@@ -4426,7 +4395,7 @@ PHP_FUNCTION(domxml_parser_start_element)
char *tagname;
int tagname_len;
char **atts = NULL;
DOMXML_PARAM_THREE(parserp, id, le_domxmlparserp,"s|a", &tagname, &tagname_len, &params);
if (params != NULL) {
atts = php_xmlparser_make_params(params TSRMLS_CC);
@@ -4716,9 +4685,7 @@ static int node_namespace(zval **attributes, xmlNode *nodep TSRMLS_DC)
/* }}} */
#endif
/* We don't have a type zval. **attributes is also very unusual. */
/* {{{ proto int node_attributes(zval **attributes, int node)
/* {{{ int node_attributes(zval **attributes, int node)
Returns list of children nodes */
static int node_attributes(zval **attributes, xmlNode *nodep TSRMLS_DC)
{
@@ -4823,7 +4790,8 @@ PHP_FUNCTION(domxml_xmltree)
}
/* Create a new xml document */
docp = xmlParseDoc(buf);
docp = domxml_document_parser(0, 0, buf, NULL TSRMLS_CC);
if (!docp) {
RETURN_FALSE;
}
@@ -4835,15 +4803,17 @@ PHP_FUNCTION(domxml_xmltree)
RETURN_FALSE;
}
DOMXML_RET_OBJ(rv, (xmlNodePtr) docp, &ret);
DOMXML_DOMOBJ_NEW(rv, (xmlNodePtr) docp, &ret);
/* The root itself maybe an array. Though you may not have two Elements
as root, you may have a comment, pi and and element as root.
Thanks to Paul DuBois for pointing me at this.
*/
if (node_children(&children, root TSRMLS_CC) >= 0) {
zend_hash_update(Z_OBJPROP_P(return_value), "children",sizeof("children"), (void *) &children, sizeof(zval *), NULL);
zend_hash_update(Z_OBJPROP_P(rv), "children",sizeof("children"), (void *) &children, sizeof(zval *), NULL);
}
DOMXML_RET_ZVAL(rv);
/* xmlFreeDoc(docp); */
}
/* }}} */
@@ -4936,6 +4906,8 @@ static void php_xpathptr_eval(INTERNAL_FUNCTION_PARAMETERS, int mode, int expr)
if (contextnode) {
DOMXML_GET_OBJ(contextnodep, contextnode, le_domxmlnodep);
} else {
contextnodep = xmlDocGetRootElement(ctxp->doc);
}
ctxp->node = contextnodep;
@@ -4992,9 +4964,27 @@ static void php_xpathptr_eval(INTERNAL_FUNCTION_PARAMETERS, int mode, int expr)
xmlNodePtr node = nodesetp->nodeTab[i];
zval *child;
int retnode;
xmlNsPtr curns;
xmlNodePtr nsparent;
if (node->type == XML_NAMESPACE_DECL) {
nsparent = node->_private;
curns = xmlNewNs(NULL, node->name, NULL);
if (node->children) {
curns->prefix = xmlStrdup((char *) node->children);
}
if (node->children) {
node = xmlNewDocNode(ctxp->doc, NULL, (char *) node->children, node->name);
} else {
node = xmlNewDocNode(ctxp->doc, NULL, "xmlns", node->name);
}
node->type = XML_NAMESPACE_DECL;
node->parent = nsparent;
node->ns = curns;
}
/* construct a node object */
child = php_domobject_new(node, &retnode, NULL TSRMLS_CC);
zend_hash_next_index_insert(Z_ARRVAL_P(arr), &child, sizeof(zval *), NULL);
}
zend_hash_update(Z_OBJPROP_P(rv), "nodeset", sizeof("nodeset"), (void *) &arr, sizeof(zval *), NULL);
@@ -5165,28 +5155,26 @@ PHP_FUNCTION(domxml_xslt_stylesheet)
zval *rv;
xmlDocPtr docp;
xsltStylesheetPtr sheetp;
int ret;
int ret, mode, prevSubstValue, prevExtDtdValue;
char *buffer;
int buffer_len;
int prevSubstValue, prevExtDtdValue;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &buffer, &buffer_len) == FAILURE) {
RETURN_FALSE;
}
prevSubstValue = xmlSubstituteEntitiesDefault (1);
prevExtDtdValue = xmlLoadExtDtdDefaultValue;
xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
docp = xmlParseDoc(buffer);
xmlSubstituteEntitiesDefault (prevSubstValue);
xmlLoadExtDtdDefaultValue = prevExtDtdValue;
mode = DOMXML_LOAD_SUBSTITUTE_ENTITIES | DOMXML_LOAD_COMPLETE_ATTRS;
docp = domxml_document_parser(mode, 0, buffer, NULL TSRMLS_CC);
if (!docp)
RETURN_FALSE;
prevSubstValue = xmlSubstituteEntitiesDefault(1);
prevExtDtdValue = xmlLoadExtDtdDefaultValue;
xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
sheetp = xsltParseStylesheetDoc(docp);
xmlSubstituteEntitiesDefault(prevSubstValue);
xmlLoadExtDtdDefaultValue = prevExtDtdValue;
if (!sheetp) {
xmlFreeDoc(docp);
@@ -5235,26 +5223,32 @@ PHP_FUNCTION(domxml_xslt_stylesheet_doc)
PHP_FUNCTION(domxml_xslt_stylesheet_file)
{
zval *rv;
xmlDocPtr docp;
xsltStylesheetPtr sheetp;
int ret, file_len;
int ret, file_len, mode, prevSubstValue, prevExtDtdValue;
char *file;
int prevSubstValue, prevExtDtdValue;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &file, &file_len) == FAILURE) {
RETURN_FALSE;
}
prevSubstValue = xmlSubstituteEntitiesDefault (1);
mode = DOMXML_LOAD_SUBSTITUTE_ENTITIES | DOMXML_LOAD_COMPLETE_ATTRS;
docp = domxml_document_parser(mode, 1, file, NULL TSRMLS_CC);
if (!docp)
RETURN_FALSE;
prevSubstValue = xmlSubstituteEntitiesDefault(1);
prevExtDtdValue = xmlLoadExtDtdDefaultValue;
xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
sheetp = xsltParseStylesheetFile(file);
xmlSubstituteEntitiesDefault (prevSubstValue);
sheetp = xsltParseStylesheetDoc(docp);
xmlSubstituteEntitiesDefault(prevSubstValue);
xmlLoadExtDtdDefaultValue = prevExtDtdValue;
if (!sheetp)
if (!sheetp) {
xmlFreeDoc(docp);
RETURN_FALSE;
}
rv = php_xsltstylesheet_new(sheetp, &ret TSRMLS_CC);
DOMXML_RET_ZVAL(rv);
@@ -5336,6 +5330,21 @@ static char **php_domxslt_make_params(zval *idvars, int xpath_params TSRMLS_DC)
}
/* }}} */
static int xslt_has_xsl_keys (xmlDocPtr doc) {
xmlNode *nodep;
nodep = xmlDocGetRootElement(doc)->children;
while (nodep) {
if (nodep->type == XML_ELEMENT_NODE && xmlStrEqual(nodep->name, "key") && xmlStrEqual(nodep->ns->href, XSLT_NAMESPACE)) {
return 1;
break;
}
nodep = nodep->next;
}
return 0;
}
/* {{{ proto object domxml_xslt_process(object xslstylesheet, object xmldoc [, array xslt_parameters [, bool xpath_parameters [, string profileFilename]]])
Perform an XSLT transformation */
PHP_FUNCTION(domxml_xslt_process)
@@ -5351,9 +5360,10 @@ PHP_FUNCTION(domxml_xslt_process)
xmlDocPtr xmldocp;
xmlDocPtr docp;
char **params = NULL;
int ret;
int ret, clone = -1;
char *filename;
int filename_len = 0;
FILE *f;
DOMXML_GET_THIS(idxsl);
@@ -5363,25 +5373,38 @@ PHP_FUNCTION(domxml_xslt_process)
RETURN_FALSE;
}
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o|abs", &idxml, &idparams, &xpath_params, &filename, &filename_len) == FAILURE) {
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o|a!b!s!l", &idxml, &idparams, &xpath_params, &filename, &filename_len, &clone) == FAILURE) {
RETURN_FALSE;
}
if (filename_len && !(f = php_stream_open_wrapper_as_file(filename, "w", ENFORCE_SAFE_MODE|REPORT_ERRORS, NULL))) {
RETURN_FALSE;
}
DOMXML_GET_OBJ(xmldocp, idxml, le_domxmldocp);
if (clone == -1 && xslt_has_xsl_keys(xsltstp->doc) == 1) {
clone = 1;
}
if (idparams) {
params = php_domxslt_make_params(idparams, xpath_params TSRMLS_CC);
}
if (clone == 1) {
xmldocp = xmlCopyDoc(xmldocp, 1);
}
if (filename_len) {
FILE *f;
f = fopen (filename,"w");
docp = xsltProfileStylesheet(xsltstp, xmldocp, (const char**)params, f);
fclose(f);
} else {
docp = xsltApplyStylesheet(xsltstp, xmldocp, (const char**)params);
}
if (clone == 1) {
xmlFreeDoc(xmldocp);
}
if (params) {
efree(params);
}
+2 -1
View File
@@ -24,6 +24,7 @@
#if HAVE_DOMXML
#include <libxml/parser.h>
#include <libxml/parserInternals.h>
#include <libxml/SAX.h>
#include <libxml/tree.h>
#include <libxml/xmlerror.h>
#include <libxml/xinclude.h>
@@ -245,4 +246,4 @@ typedef struct {
#endif /* HAVE_DOMXML */
#define phpext_domxml_ptr domxml_module_ptr
#endif /* _PHP_DIR_H */
#endif /* _PHP_DOMXML_H */
+11
View File
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" encoding="UTF-8"/>
<xsl:key name="area" match="ROW" use="substring(translate(AREA_NAME, '&quot;', ''), 1, 1)"/>
<xsl:template match="*">
</xsl:template>
</xsl:stylesheet>
+9
View File
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<AREA_NAME>
<ROW>
<AREA_CODE>13</AREA_CODE>
<AREA_NAME>&quot;Автово&quot; м.</AREA_NAME>
<AREA_NAME_ENG>m.&quot;Avtovo&quot;</AREA_NAME_ENG>
</ROW>
</AREA_NAME>
+21
View File
@@ -0,0 +1,21 @@
--TEST--
Attributes via append_child not supported (bug #23326)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
$document = domxml_new_doc('1.0');
$test = $document->create_element('test');
$j = 0;
for($i=0;$i<10;$i++)
{
if( $j < 5 )
$j = $i;
$test->append_child($document->create_attribute("key$j", $i));
}
$document->append_child($test);
echo $document->dump_mem(1);
?>
--EXPECT--
<?xml version="1.0"?>
<test key0="0" key1="1" key2="2" key3="3" key4="4" key5="9"/>
+37
View File
@@ -0,0 +1,37 @@
--TEST--
Bug #25900 (DomDocument->get_elements_by_tagname() doesn't work with default ns)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
$xml = <<<HERE
<?xml version="1.0" encoding="ISO-8859-1" ?>
<foo xmlns="http://www.example.com/ns/foo">
<bar><test1 /></bar>
<bar><test2 /></bar>
</foo>
HERE;
function dump($elems) {
foreach ($elems as $elem) {
var_dump($elem->node_name());
if ($elem->node_type() == XML_ELEMENT_NODE) {
dump($elem->child_nodes());
}
}
}
$dom = xmldoc($xml);
$doc = $dom->document_element();
dump($dom->get_elements_by_tagname('bar'));
dump($doc->get_elements_by_tagname('bar'));
?>
--EXPECT--
string(3) "bar"
string(5) "test1"
string(3) "bar"
string(5) "test2"
string(3) "bar"
string(5) "test1"
string(3) "bar"
string(5) "test2"
+14
View File
@@ -0,0 +1,14 @@
--TEST--
Bug #26384 (domxslt->process causes segfault with xsl:key)
--SKIPIF--
<?php require_once('skipif.inc');
if (!function_exists("domxml_xslt_stylesheet_file")) { die("skip No XSLT support found");};
?>
--FILE--
<?php
$xml = domxml_open_mem(file_get_contents(dirname(__FILE__)."/area_name.xml"));
$xslt = domxml_xslt_stylesheet_file(dirname(__FILE__).'/area_list.xsl');
print $xslt->process($xml, Array(), null, null);
--EXPECT--
Object
+3 -3
View File
@@ -1,8 +1,8 @@
/* character-class table */
static struct cclass {
char *name;
char *chars;
char *multis;
unsigned char *name;
unsigned char *chars;
unsigned char *multis;
} cclasses[] = {
{"alnum", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", ""},
{"alpha", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
+4 -4
View File
@@ -124,9 +124,9 @@ FILE *d;
break;
case OCHAR:
if (strchr("\\|()^$.[+*?{}!<> ", (char)opnd) != NULL)
fprintf(d, "\\%c", (char)opnd);
fprintf(d, "\\%c", (unsigned char)opnd);
else
fprintf(d, "%s", regchar((char)opnd));
fprintf(d, "%s", regchar((unsigned char)opnd));
break;
case OBOL:
fprintf(d, "^");
@@ -228,11 +228,11 @@ FILE *d;
- regchar - make a character printable
== static char *regchar(int ch);
*/
static char * /* -> representation */
static unsigned char * /* -> representation */
regchar(ch)
int ch;
{
static char buf[10];
static unsigned char buf[10];
if (isprint(ch) || ch == ' ')
sprintf(buf, "%c", ch);
+63 -63
View File
@@ -33,11 +33,11 @@ struct match {
struct re_guts *g;
int eflags;
regmatch_t *pmatch; /* [nsub+1] (0 element unused) */
char *offp; /* offsets work from here */
char *beginp; /* start of string -- virtual NUL precedes */
char *endp; /* end of string -- virtual NUL here */
char *coldp; /* can be no match starting before here */
char **lastpos; /* [nplus+1] */
unsigned char *offp; /* offsets work from here */
unsigned char *beginp; /* start of string -- virtual NUL precedes */
unsigned char *endp; /* end of string -- virtual NUL here */
unsigned char *coldp; /* can be no match starting before here */
unsigned char **lastpos; /* [nplus+1] */
STATEVARS;
states st; /* current states */
states fresh; /* states for a fresh start */
@@ -65,20 +65,20 @@ struct match {
static int /* 0 success, REG_NOMATCH failure */
matcher(g, string, nmatch, pmatch, eflags)
register struct re_guts *g;
char *string;
unsigned char *string;
size_t nmatch;
regmatch_t pmatch[];
int eflags;
{
register char *endp;
register unsigned char *endp;
register size_t i;
struct match mv;
register struct match *m = &mv;
register char *dp;
register unsigned char *dp;
const register sopno gf = g->firststate+1; /* +1 for OEND */
const register sopno gl = g->laststate;
char *start;
char *stop;
unsigned char *start;
unsigned char *stop;
/* simplify the situation where possible */
if (g->cflags&REG_NOSUB)
@@ -156,10 +156,10 @@ int eflags;
dp = dissect(m, m->coldp, endp, gf, gl);
} else {
if (g->nplus > 0 && m->lastpos == NULL)
m->lastpos = (char **)malloc((g->nplus+1) *
sizeof(char *));
m->lastpos = (unsigned char **)malloc((g->nplus+1) *
sizeof(unsigned char *));
if (g->nplus > 0 && m->lastpos == NULL) {
free(m->pmatch);
free((char *)m->pmatch);
STATETEARDOWN(m);
return(REG_ESPACE);
}
@@ -225,30 +225,30 @@ int eflags;
/*
- dissect - figure out what matched what, no back references
== static char *dissect(register struct match *m, char *start, \
== char *stop, sopno startst, sopno stopst);
== static unsigned char *dissect(register struct match *m, unsigned char *start, \
== unsigned char *stop, sopno startst, sopno stopst);
*/
static char * /* == stop (success) always */
static unsigned char * /* == stop (success) always */
dissect(m, start, stop, startst, stopst)
register struct match *m;
char *start;
char *stop;
unsigned char *start;
unsigned char *stop;
sopno startst;
sopno stopst;
{
register int i;
register sopno ss; /* start sop of current subRE */
register sopno es; /* end sop of current subRE */
register char *sp; /* start of string matched by it */
register char *stp; /* string matched by it cannot pass here */
register char *rest; /* start of rest of string */
register char *tail; /* string unmatched by rest of RE */
register unsigned char *sp; /* start of string matched by it */
register unsigned char *stp; /* string matched by it cannot pass here */
register unsigned char *rest; /* start of rest of string */
register unsigned char *tail; /* string unmatched by rest of RE */
register sopno ssub; /* start sop of subsubRE */
register sopno esub; /* end sop of subsubRE */
register char *ssp; /* start of string matched by subsubRE */
register char *sep; /* end of string matched by subsubRE */
register char *oldssp; /* previous ssp */
register char *dp;
register unsigned char *ssp; /* start of string matched by subsubRE */
register unsigned char *sep; /* end of string matched by subsubRE */
register unsigned char *oldssp; /* previous ssp */
register unsigned char *dp;
AT("diss", start, stop, startst, stopst);
sp = start;
@@ -413,25 +413,25 @@ sopno stopst;
/*
- backref - figure out what matched what, figuring in back references
== static char *backref(register struct match *m, char *start, \
== char *stop, sopno startst, sopno stopst, sopno lev);
== static unsigned char *backref(register struct match *m, unsigned char *start, \
== unsigned char *stop, sopno startst, sopno stopst, sopno lev);
*/
static char * /* == stop (success) or NULL (failure) */
static unsigned char * /* == stop (success) or NULL (failure) */
backref(m, start, stop, startst, stopst, lev)
register struct match *m;
char *start;
char *stop;
unsigned char *start;
unsigned char *stop;
sopno startst;
sopno stopst;
sopno lev; /* PLUS nesting level */
{
register int i;
register sopno ss; /* start sop of current subRE */
register char *sp; /* start of string matched by it */
register unsigned char *sp; /* start of string matched by it */
register sopno ssub; /* start sop of subsubRE */
register sopno esub; /* end sop of subsubRE */
register char *ssp; /* start of string matched by subsubRE */
register char *dp;
register unsigned char *ssp; /* start of string matched by subsubRE */
register unsigned char *dp;
register size_t len;
register int hard;
register sop s;
@@ -446,7 +446,7 @@ sopno lev; /* PLUS nesting level */
for (ss = startst; !hard && ss < stopst; ss++)
switch (OP(s = m->g->strip[ss])) {
case OCHAR:
if (sp == stop || *sp++ != (char)OPND(s))
if (sp == stop || *sp++ != (unsigned char)OPND(s))
return(NULL);
break;
case OANY:
@@ -613,31 +613,31 @@ sopno lev; /* PLUS nesting level */
/* "can't happen" */
assert(nope);
/* NOTREACHED */
return((char *)NULL); /* dummy */
return((unsigned char *)NULL); /* dummy */
}
/*
- fast - step through the string at top speed
== static char *fast(register struct match *m, char *start, \
== char *stop, sopno startst, sopno stopst);
== static unsigned char *fast(register struct match *m, unsigned char *start, \
== unsigned char *stop, sopno startst, sopno stopst);
*/
static char * /* where tentative match ended, or NULL */
static unsigned char * /* where tentative match ended, or NULL */
fast(m, start, stop, startst, stopst)
register struct match *m;
char *start;
char *stop;
unsigned char *start;
unsigned char *stop;
sopno startst;
sopno stopst;
{
register states st = m->st;
register states fresh = m->fresh;
register states tmp = m->tmp;
register char *p = start;
register unsigned char *p = start;
register int c = (start == m->beginp) ? OUT : *(start-1);
register int lastc; /* previous c */
register int flagch;
register int i;
register char *coldp; /* last p after which no match was underway */
register unsigned char *coldp; /* last p after which no match was underway */
CLEAR(st);
SET1(st, startst);
@@ -709,26 +709,26 @@ sopno stopst;
/*
- slow - step through the string more deliberately
== static char *slow(register struct match *m, char *start, \
== char *stop, sopno startst, sopno stopst);
== static unsigned char *slow(register struct match *m, unsigned char *start, \
== unsigned char *stop, sopno startst, sopno stopst);
*/
static char * /* where it ended */
static unsigned char * /* where it ended */
slow(m, start, stop, startst, stopst)
register struct match *m;
char *start;
char *stop;
unsigned char *start;
unsigned char *stop;
sopno startst;
sopno stopst;
{
register states st = m->st;
register states empty = m->empty;
register states tmp = m->tmp;
register char *p = start;
register unsigned char *p = start;
register int c = (start == m->beginp) ? OUT : *(start-1);
register int lastc; /* previous c */
register int flagch;
register int i;
register char *matchp; /* last p at which a match ended */
register unsigned char *matchp; /* last p at which a match ended */
AT("slow", start, stop, startst, stopst);
CLEAR(st);
@@ -805,8 +805,8 @@ sopno stopst;
== #define BOW (BOL+4)
== #define EOW (BOL+5)
== #define CODEMAX (BOL+5) // highest code used
== #define NONCHAR(c) ((c) > CHAR_MAX)
== #define NNONCHAR (CODEMAX-CHAR_MAX)
== #define NONCHAR(c) ((c) > UCHAR_MAX)
== #define NNONCHAR (CODEMAX-UCHAR_MAX)
*/
static states
step(g, start, stop, bef, ch, aft)
@@ -832,8 +832,8 @@ register states aft; /* states already known reachable after */
break;
case OCHAR:
/* only characters can match */
assert(!NONCHAR(ch) || ch != (char)OPND(s));
if (ch == (char)OPND(s))
assert(!NONCHAR(ch) || ch != (unsigned char)OPND(s));
if (ch == (unsigned char)OPND(s))
FWD(aft, bef, 1);
break;
case OBOL:
@@ -926,14 +926,14 @@ register states aft; /* states already known reachable after */
/*
- print - print a set of states
== #ifdef REDEBUG
== static void print(struct match *m, char *caption, states st, \
== static void print(struct match *m, unsigned char *caption, states st, \
== int ch, FILE *d);
== #endif
*/
static void
print(m, caption, st, ch, d)
struct match *m;
char *caption;
unsigned char *caption;
states st;
int ch;
FILE *d;
@@ -959,16 +959,16 @@ FILE *d;
/*
- at - print current situation
== #ifdef REDEBUG
== static void at(struct match *m, char *title, char *start, char *stop, \
== static void at(struct match *m, unsigned char *title, unsigned char *start, unsigned char *stop, \
== sopno startst, sopno stopst);
== #endif
*/
static void
at(m, title, start, stop, startst, stopst)
struct match *m;
char *title;
char *start;
char *stop;
unsigned char *title;
unsigned char *start;
unsigned char *stop;
sopno startst;
sopno stopst;
{
@@ -985,7 +985,7 @@ sopno stopst;
/*
- pchar - make a character printable
== #ifdef REDEBUG
== static char *pchar(int ch);
== static unsigned char *pchar(int ch);
== #endif
*
* Is this identical to regchar() over in debug.c? Well, yes. But a
@@ -993,11 +993,11 @@ sopno stopst;
* a matching debug.o, and this is convenient. It all disappears in
* the non-debug compilation anyway, so it doesn't matter much.
*/
static char * /* -> representation */
static unsigned char * /* -> representation */
pchar(ch)
int ch;
{
static char pbuf[10];
static unsigned char pbuf[10];
if (isprint(ch) || ch == ' ')
sprintf(pbuf, "%c", ch);
+10 -10
View File
@@ -4,11 +4,11 @@ extern "C" {
#endif
/* === engine.c === */
static int matcher(register struct re_guts *g, char *string, size_t nmatch, regmatch_t pmatch[], int eflags);
static char *dissect(register struct match *m, char *start, char *stop, sopno startst, sopno stopst);
static char *backref(register struct match *m, char *start, char *stop, sopno startst, sopno stopst, sopno lev);
static char *fast(register struct match *m, char *start, char *stop, sopno startst, sopno stopst);
static char *slow(register struct match *m, char *start, char *stop, sopno startst, sopno stopst);
static int matcher(register struct re_guts *g, unsigned char *string, size_t nmatch, regmatch_t pmatch[], int eflags);
static unsigned char *dissect(register struct match *m, unsigned char *start, unsigned char *stop, sopno startst, sopno stopst);
static unsigned char *backref(register struct match *m, unsigned char *start, unsigned char *stop, sopno startst, sopno stopst, sopno lev);
static unsigned char *fast(register struct match *m, unsigned char *start, unsigned char *stop, sopno startst, sopno stopst);
static unsigned char *slow(register struct match *m, unsigned char *start, unsigned char *stop, sopno startst, sopno stopst);
static states step(register struct re_guts *g, sopno start, sopno stop, register states bef, int ch, register states aft);
#define BOL (OUT+1)
#define EOL (BOL+1)
@@ -17,16 +17,16 @@ static states step(register struct re_guts *g, sopno start, sopno stop, register
#define BOW (BOL+4)
#define EOW (BOL+5)
#define CODEMAX (BOL+5) /* highest code used */
#define NONCHAR(c) ((c) > CHAR_MAX)
#define NNONCHAR (CODEMAX-CHAR_MAX)
#define NONCHAR(c) ((c) > UCHAR_MAX)
#define NNONCHAR (CODEMAX-UCHAR_MAX)
#ifdef REDEBUG
static void print(struct match *m, char *caption, states st, int ch, FILE *d);
static void print(struct match *m, unsigned char *caption, states st, int ch, FILE *d);
#endif
#ifdef REDEBUG
static void at(struct match *m, char *title, char *start, char *stop, sopno startst, sopno stopst);
static void at(struct match *m, unsigned char *title, unsigned char *start, unsigned char *stop, sopno startst, sopno stopst);
#endif
#ifdef REDEBUG
static char *pchar(int ch);
static unsigned char *pchar(int ch);
#endif
#ifdef __cplusplus
+45 -45
View File
@@ -19,8 +19,8 @@
* other clumsinesses
*/
struct parse {
char *next; /* next character in RE */
char *end; /* end of string (-> NUL normally) */
unsigned char *next; /* next character in RE */
unsigned char *end; /* end of string (-> NUL normally) */
int error; /* has an error been seen? */
sop *strip; /* malloced strip */
sopno ssize; /* malloced strip size (allocated) */
@@ -34,7 +34,7 @@ struct parse {
#include "regcomp.ih"
static char nuls[10]; /* place to point scanner in event of error */
static unsigned char nuls[10]; /* place to point scanner in event of error */
/*
* macros for use with parse structure
@@ -127,7 +127,7 @@ int cflags;
/* set things up */
p->g = g;
p->next = (char *)pattern; /* convenience; we do not modify it */
p->next = (unsigned char *)pattern; /* convenience; we do not modify it */
p->end = p->next + len;
p->error = 0;
p->ncsalloc = 0;
@@ -147,7 +147,7 @@ int cflags;
g->mlen = 0;
g->nsub = 0;
g->ncategories = 1; /* category 0 is "everything else" */
g->categories = &g->catspace[-(CHAR_MIN)];
g->categories = &g->catspace[0];
(void) memset((char *)g->catspace, 0, NC*sizeof(cat_t));
g->backrefs = 0;
@@ -193,7 +193,7 @@ p_ere(p, stop)
register struct parse *p;
int stop; /* character this ERE should end at */
{
register char c;
register unsigned char c;
register sopno prevback = 0;
register sopno prevfwd = 0;
register sopno conc;
@@ -238,7 +238,7 @@ static void
p_ere_exp(p)
register struct parse *p;
{
register char c;
register unsigned char c;
register sopno pos;
register int count;
register int count2;
@@ -518,7 +518,7 @@ int starordinary; /* is a leading * an ordinary character? */
REQUIRE(starordinary, REG_BADRPT);
/* FALLTHROUGH */
default:
ordinary(p, (char)c); /* takes off BACKSL, if any */
ordinary(p, (unsigned char)c); /* takes off BACKSL, if any */
break;
}
@@ -657,8 +657,8 @@ p_b_term(p, cs)
register struct parse *p;
register cset *cs;
{
register char c;
register char start, finish;
register unsigned char c;
register unsigned char start, finish;
register int i;
/* classify what we've got */
@@ -723,11 +723,11 @@ p_b_cclass(p, cs)
register struct parse *p;
register cset *cs;
{
register char *sp = p->next;
register unsigned char *sp = p->next;
register struct cclass *cp;
register size_t len;
register char *u;
register char c;
register unsigned char *u;
register unsigned char c;
while (MORE() && isalpha(PEEK()))
NEXT();
@@ -759,7 +759,7 @@ p_b_eclass(p, cs)
register struct parse *p;
register cset *cs;
{
register char c;
register unsigned char c;
c = p_b_coll_elem(p, '=');
CHadd(cs, c);
@@ -769,11 +769,11 @@ register cset *cs;
- p_b_symbol - parse a character or [..]ed multicharacter collating symbol
== static char p_b_symbol(register struct parse *p);
*/
static char /* value of symbol */
static unsigned char /* value of symbol */
p_b_symbol(p)
register struct parse *p;
{
register char value;
register unsigned char value;
REQUIRE(MORE(), REG_EBRACK);
if (!EATTWO('[', '.'))
@@ -789,12 +789,12 @@ register struct parse *p;
- p_b_coll_elem - parse a collating-element name and look it up
== static char p_b_coll_elem(register struct parse *p, int endc);
*/
static char /* value of collating element */
static unsigned char /* value of collating element */
p_b_coll_elem(p, endc)
register struct parse *p;
int endc; /* name ended by endc,']' */
{
register char *sp = p->next;
register unsigned char *sp = p->next;
register struct cname *cp;
register int len;
@@ -818,7 +818,7 @@ int endc; /* name ended by endc,']' */
- othercase - return the case counterpart of an alphabetic
== static char othercase(int ch);
*/
static char /* if no counterpart, return ch */
static unsigned char /* if no counterpart, return ch */
othercase(ch)
int ch;
{
@@ -842,9 +842,9 @@ bothcases(p, ch)
register struct parse *p;
int ch;
{
register char *oldnext = p->next;
register char *oldend = p->end;
char bracket[3];
register unsigned char *oldnext = p->next;
register unsigned char *oldend = p->end;
unsigned char bracket[3];
assert(othercase(ch) != ch); /* p_bracket() would recurse */
p->next = bracket;
@@ -888,9 +888,9 @@ static void
nonnewline(p)
register struct parse *p;
{
register char *oldnext = p->next;
register char *oldend = p->end;
char bracket[4];
register unsigned char *oldnext = p->next;
register unsigned char *oldend = p->end;
unsigned char bracket[4];
p->next = bracket;
p->end = bracket+3;
@@ -1015,19 +1015,19 @@ register struct parse *p;
if (p->g->sets == NULL)
p->g->sets = (cset *)malloc(nc * sizeof(cset));
else
p->g->sets = (cset *)realloc((char *)p->g->sets,
p->g->sets = (cset *)realloc((unsigned char *)p->g->sets,
nc * sizeof(cset));
if (p->g->setbits == NULL)
p->g->setbits = (uch *)malloc(nbytes);
else {
p->g->setbits = (uch *)realloc((char *)p->g->setbits,
p->g->setbits = (uch *)realloc((unsigned char *)p->g->setbits,
nbytes);
/* xxx this isn't right if setbits is now NULL */
for (i = 0; i < no; i++)
p->g->sets[i].ptr = p->g->setbits + css*(i/CHAR_BIT);
}
if (p->g->sets != NULL && p->g->setbits != NULL)
(void) memset((char *)p->g->setbits + (nbytes - css),
(void) memset((unsigned char *)p->g->setbits + (nbytes - css),
0, css);
else {
no = 0;
@@ -1120,7 +1120,7 @@ register cset *cs;
for (i = 0; i < css; i++)
if (CHIN(cs, i))
return((char)i);
return((unsigned char)i);
assert(never);
return(0); /* arbitrary */
}
@@ -1153,7 +1153,7 @@ static void
mcadd(p, cs, cp)
register struct parse *p;
register cset *cs;
register char *cp;
register unsigned char *cp;
{
register size_t oldend = cs->smultis;
@@ -1174,14 +1174,14 @@ register char *cp;
#if 0
/*
- mcsub - subtract a collating element from a cset
== static void mcsub(register cset *cs, register char *cp);
== static void mcsub(register cset *cs, register unsigned char *cp);
*/
static void
mcsub(cs, cp)
register cset *cs;
register char *cp;
register unsigned cset *cs;
register unsigned char *cp;
{
register char *fp = mcfind(cs, cp);
register unsigned char *fp = mcfind(cs, cp);
register size_t len = strlen(fp);
assert(fp != NULL);
@@ -1201,12 +1201,12 @@ register char *cp;
/*
- mcin - is a collating element in a cset?
== static int mcin(register cset *cs, register char *cp);
== static int mcin(register cset *cs, register unsigned char *cp);
*/
static int
mcin(cs, cp)
register cset *cs;
register char *cp;
register unsigned char *cp;
{
return(mcfind(cs, cp) != NULL);
}
@@ -1214,14 +1214,14 @@ register char *cp;
/*
- mcfind - find a collating element in a cset
== static char *mcfind(register cset *cs, register char *cp);
== static unsigned char *mcfind(register cset *cs, register unsigned char *cp);
*/
static char *
static unsigned char *
mcfind(cs, cp)
register cset *cs;
register char *cp;
register unsigned char *cp;
{
register char *p;
register unsigned char *p;
if (cs->multis == NULL)
return(NULL);
@@ -1322,11 +1322,11 @@ register struct re_guts *g;
if (p->error != 0)
return;
for (c = CHAR_MIN; c <= CHAR_MAX; c++)
for (c = 0; c <= UCHAR_MAX; c++)
if (cats[c] == 0 && isinsets(g, c)) {
cat = g->ncategories++;
cats[c] = cat;
for (c2 = c+1; c2 <= CHAR_MAX; c2++)
for (c2 = c+1; c2 <= UCHAR_MAX; c2++)
if (cats[c2] == 0 && samesets(g, c, c2))
cats[c2] = cat;
}
@@ -1477,7 +1477,7 @@ register struct parse *p;
register struct re_guts *g;
{
g->nstates = p->slen;
g->strip = (sop *)realloc((char *)p->strip, p->slen * sizeof(sop));
g->strip = (sop *)realloc((unsigned char *)p->strip, p->slen * sizeof(sop));
if (g->strip == NULL) {
SETERROR(REG_ESPACE);
g->strip = p->strip;
@@ -1504,7 +1504,7 @@ register struct re_guts *g;
register sop *newstart = NULL;
register sopno newlen;
register sop s;
register char *cp;
register unsigned char *cp;
register sopno i;
/* avoid making error situations worse */
@@ -1565,7 +1565,7 @@ register struct re_guts *g;
while (OP(s = *scan++) != OCHAR)
continue;
assert(cp < g->must + g->mlen);
*cp++ = (char)OPND(s);
*cp++ = (unsigned char)OPND(s);
}
assert(cp == g->must + g->mlen);
*cp++ = '\0'; /* just on general principles */
+7 -7
View File
@@ -14,9 +14,9 @@ static void p_bracket(register struct parse *p);
static void p_b_term(register struct parse *p, register cset *cs);
static void p_b_cclass(register struct parse *p, register cset *cs);
static void p_b_eclass(register struct parse *p, register cset *cs);
static char p_b_symbol(register struct parse *p);
static char p_b_coll_elem(register struct parse *p, int endc);
static char othercase(int ch);
static unsigned char p_b_symbol(register struct parse *p);
static unsigned char p_b_coll_elem(register struct parse *p, int endc);
static unsigned char othercase(int ch);
static void bothcases(register struct parse *p, int ch);
static void ordinary(register struct parse *p, register int ch);
static void nonnewline(register struct parse *p);
@@ -27,11 +27,11 @@ static void freeset(register struct parse *p, register cset *cs);
static int freezeset(register struct parse *p, register cset *cs);
static int firstch(register struct parse *p, register cset *cs);
static int nch(register struct parse *p, register cset *cs);
static void mcadd(register struct parse *p, register cset *cs, register char *cp);
static void mcadd(register struct parse *p, register cset *cs, register unsigned char *cp);
#if 0
static void mcsub(register cset *cs, register char *cp);
static int mcin(register cset *cs, register char *cp);
static char *mcfind(register cset *cs, register char *cp);
static void mcsub(register cset *cs, register unsigned char *cp);
static int mcin(register cset *cs, register unsigned char *cp);
static unsigned char *mcfind(register cset *cs, register unsigned char *cp);
#endif
static void mcinvert(register struct parse *p, register cset *cs);
static void mccase(register struct parse *p, register cset *cs);
+5 -5
View File
@@ -10,7 +10,7 @@
= typedef struct {
= int re_magic;
= size_t re_nsub; // number of parenthesized subexpressions
= const char *re_endp; // end pointer for REG_PEND
= const unsigned char *re_endp; // end pointer for REG_PEND
= struct re_guts *re_g; // none of your business :-)
= } regex_t;
= typedef struct {
@@ -90,7 +90,7 @@ typedef struct {
uch mask; /* bit within array */
uch hash; /* hash code */
size_t smultis;
char *multis; /* -> char[smulti] ab\0cd\0ef\0\0 */
unsigned char *multis; /* -> char[smulti] ab\0cd\0ef\0\0 */
} cset;
/* note that CHadd and CHsub are unsafe, and CHIN doesn't yield 0/1 */
#define CHadd(cs, c) ((cs)->ptr[(uch)(c)] |= (cs)->mask, (cs)->hash += (c))
@@ -125,8 +125,8 @@ struct re_guts {
int nbol; /* number of ^ used */
int neol; /* number of $ used */
int ncategories; /* how many character categories */
cat_t *categories; /* ->catspace[-CHAR_MIN] */
char *must; /* match must contain this string */
cat_t *categories; /* ->catspace[-UCHAR_MIN] */
unsigned char *must; /* match must contain this string */
int mlen; /* length of must */
size_t nsub; /* copy of re_nsub */
int backrefs; /* does it use back references? */
@@ -136,5 +136,5 @@ struct re_guts {
};
/* misc utilities */
#define OUT (CHAR_MAX+1) /* a non-character value */
#define OUT (UCHAR_MAX+1) /* a non-character value */
#define ISWORD(c) (isalnum(c) || (c) == '_')
+4 -4
View File
@@ -67,14 +67,14 @@ static int nope = 0; /* for use in asserts; shuts lint up */
#undef SNAMES
/* macros for manipulating states, large version */
#define states char *
#define states unsigned char *
#define CLEAR(v) memset(v, 0, m->g->nstates)
#define SET0(v, n) ((v)[n] = 0)
#define SET1(v, n) ((v)[n] = 1)
#define ISSET(v, n) ((v)[n])
#define ASSIGN(d, s) memcpy(d, s, m->g->nstates)
#define EQ(a, b) (memcmp(a, b, m->g->nstates) == 0)
#define STATEVARS int vn; char *space
#define STATEVARS int vn; unsigned char *space
#define STATESETUP(m, nv) { (m)->space = malloc((nv)*(m)->g->nstates); \
if ((m)->space == NULL) return(REG_ESPACE); \
(m)->vn = 0; }
@@ -132,7 +132,7 @@ int eflags;
eflags = GOODFLAGS(eflags);
if (g->nstates <= CHAR_BIT*sizeof(states1) && !(eflags&REG_LARGE))
return(smatcher(g, (char *)string, nmatch, pmatch, eflags));
return(smatcher(g, (unsigned char *)string, nmatch, pmatch, eflags));
else
return(lmatcher(g, (char *)string, nmatch, pmatch, eflags));
return(lmatcher(g, (unsigned char *)string, nmatch, pmatch, eflags));
}
+28 -27
View File
@@ -243,10 +243,10 @@ static const char * EXIF_ERROR_CORRUPT = "File structure corrupted";
static const char * EXIF_ERROR_THUMBEOF = "Thumbnail goes IFD boundary or end of file reached";
static const char * EXIF_ERROR_FSREALLOC = "Illegal reallocating of undefined file section";
#define EXIF_ERRLOG_FILEEOF php_error_docref(NULL TSRMLS_CC, E_WARNING, EXIF_ERROR_FILEEOF);
#define EXIF_ERRLOG_CORRUPT php_error_docref(NULL TSRMLS_CC, E_WARNING, EXIF_ERROR_CORRUPT);
#define EXIF_ERRLOG_THUMBEOF php_error_docref(NULL TSRMLS_CC, E_WARNING, EXIF_ERROR_THUMBEOF);
#define EXIF_ERRLOG_FSREALLOC php_error_docref(NULL TSRMLS_CC, E_WARNING, EXIF_ERROR_FSREALLOC);
#define EXIF_ERRLOG_FILEEOF php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", EXIF_ERROR_FILEEOF);
#define EXIF_ERRLOG_CORRUPT php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", EXIF_ERROR_CORRUPT);
#define EXIF_ERRLOG_THUMBEOF php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", EXIF_ERROR_THUMBEOF);
#define EXIF_ERRLOG_FSREALLOC php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", EXIF_ERROR_FSREALLOC);
/* }}} */
/* {{{ format description defines
@@ -1301,7 +1301,7 @@ static char *exif_get_sectionname(int section)
return "";
}
static const tag_table_type exif_get_tag_table(int section)
static tag_table_type exif_get_tag_table(int section)
{
switch(section) {
case SECTION_FILE: return &tag_table_IFD[0];
@@ -1525,7 +1525,7 @@ static int exif_file_sections_free(image_info_type *ImageInfo)
/* {{{ exif_iif_add_value
Add a value to image_info
*/
static void exif_iif_add_value(image_info_type *image_info, int section_index, char *name, int tag, int format, size_t length, void* value, int motorola_intel TSRMLS_DC)
static void exif_iif_add_value(image_info_type *image_info, int section_index, char *name, int tag, int format, int length, void* value, int motorola_intel TSRMLS_DC)
{
size_t idex;
void *vptr;
@@ -1606,7 +1606,7 @@ static void exif_iif_add_value(image_info_type *image_info, int section_index, c
} else {
info_value = &info_data->value;
}
for (idex=0,vptr=value; idex<length; idex++,vptr=(char *) vptr + php_tiff_bytes_per_format[format]) {
for (idex=0,vptr=value; idex<(size_t)length; idex++,vptr=(char *) vptr + php_tiff_bytes_per_format[format]) {
if (length>1) {
info_value = &info_data->value.list[idex];
}
@@ -1662,7 +1662,7 @@ static void exif_iif_add_value(image_info_type *image_info, int section_index, c
*/
static void exif_iif_add_tag(image_info_type *image_info, int section_index, char *name, int tag, int format, size_t length, void* value TSRMLS_DC)
{
exif_iif_add_value(image_info, section_index, name, tag, format, length, value, image_info->motorola_intel TSRMLS_CC);
exif_iif_add_value(image_info, section_index, name, tag, format, (int)length, value, image_info->motorola_intel TSRMLS_CC);
}
/* }}} */
@@ -1819,7 +1819,7 @@ static void exif_iif_free(image_info_type *image_info, int section_index) {
static void add_assoc_image_info(pval *value, int sub_array, image_info_type *image_info, int section_index TSRMLS_DC)
{
char buffer[64], *val, *name, uname[64];
int i, ap, l, b, idx=0, done, unknown=0;
int i, ap, l, b, idx=0, unknown=0;
#ifdef EXIF_DEBUG
int info_tag;
#endif
@@ -1839,7 +1839,6 @@ static void add_assoc_image_info(pval *value, int sub_array, image_info_type *im
}
for(i=0; i<image_info->info_list[section_index].count; i++) {
done = 0;
info_data = &image_info->info_list[section_index].list[i];
#ifdef EXIF_DEBUG
info_tag = info_data->tag; /* conversion */
@@ -2218,7 +2217,7 @@ static char * exif_get_markername(int marker)
#endif
/* }}} */
/* {{{ proto string|false exif_tagname(index)
/* {{{ proto string exif_tagname(index)
Get headername for index or false if not defined */
PHP_FUNCTION(exif_tagname)
{
@@ -2713,7 +2712,7 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha
// JPEG does not use absolute pointers instead its pointers are relative to the start
// of the TIFF header in APP1 section.
*/
if (offset_val<0 || offset_val+byte_count>ImageInfo->FileSize || (ImageInfo->FileType!=IMAGE_FILETYPE_TIFF_II && ImageInfo->FileType!=IMAGE_FILETYPE_TIFF_MM)) {
if (offset_val+byte_count>ImageInfo->FileSize || (ImageInfo->FileType!=IMAGE_FILETYPE_TIFF_II && ImageInfo->FileType!=IMAGE_FILETYPE_TIFF_MM)) {
if (value_ptr < dir_entry) {
/* we can read this if offset_val > 0 */
/* some files have their values in other parts of the file */
@@ -3113,7 +3112,7 @@ static int exif_scan_JPEG_header(image_info_type *ImageInfo TSRMLS_DC)
{
int section, sn;
int marker = 0, last_marker = M_PSEUDO, comment_correction=1;
int ll, lh;
unsigned int ll, lh;
uchar *Data;
size_t fpos, size, got, itemlen;
jpeg_sof_info sof_info;
@@ -3176,7 +3175,7 @@ static int exif_scan_JPEG_header(image_info_type *ImageInfo TSRMLS_DC)
Data[0] = (uchar)lh;
Data[1] = (uchar)ll;
got = php_stream_read(ImageInfo->infile, Data+2, itemlen-2); /* Read the whole section. */
got = php_stream_read(ImageInfo->infile, (char*)(Data+2), itemlen-2); /* Read the whole section. */
if (got != itemlen-2) {
exif_error_docref(NULL TSRMLS_CC, ImageInfo, E_WARNING, "error reading from file: got=x%04X(=%d) != itemlen-2=x%04X(=%d)", got, got, itemlen-2, itemlen-2);
return FALSE;
@@ -3194,7 +3193,7 @@ static int exif_scan_JPEG_header(image_info_type *ImageInfo TSRMLS_DC)
size = ImageInfo->FileSize - fpos;
sn = exif_file_sections_add(ImageInfo, M_PSEUDO, size, NULL);
Data = ImageInfo->file.list[sn].data;
got = php_stream_read(ImageInfo->infile, Data, size);
got = php_stream_read(ImageInfo->infile, (char*)Data, size);
if (got != size) {
EXIF_ERRLOG_FILEEOF
return FALSE;
@@ -3265,7 +3264,7 @@ static int exif_scan_JPEG_header(image_info_type *ImageInfo TSRMLS_DC)
* scan JPEG in thumbnail (memory) */
static int exif_scan_thumbnail(image_info_type *ImageInfo TSRMLS_DC)
{
uchar c, *data = ImageInfo->Thumbnail.data;
uchar c, *data = (uchar*)ImageInfo->Thumbnail.data;
int n, marker;
size_t length=2, pos=0;
jpeg_sof_info sof_info;
@@ -3362,7 +3361,7 @@ static int exif_process_IFD_in_TIFF(image_info_type *ImageInfo, size_t dir_offse
exif_error_docref(NULL TSRMLS_CC, ImageInfo, E_NOTICE, "read from TIFF: filesize(x%04X), IFD dir(x%04X + x%04X)", ImageInfo->FileSize, dir_offset, 2);
#endif
php_stream_seek(ImageInfo->infile, dir_offset, SEEK_SET); /* we do not know the order of sections */
php_stream_read(ImageInfo->infile, ImageInfo->file.list[sn].data, 2);
php_stream_read(ImageInfo->infile, (char*)ImageInfo->file.list[sn].data, 2);
num_entries = php_ifd_get16u(ImageInfo->file.list[sn].data, ImageInfo->motorola_intel);
dir_size = 2/*num dir entries*/ +12/*length of entry*/*num_entries +4/* offset to next ifd (points to thumbnail or NULL)*/;
if (ImageInfo->FileSize >= dir_offset+dir_size) {
@@ -3372,8 +3371,8 @@ static int exif_process_IFD_in_TIFF(image_info_type *ImageInfo, size_t dir_offse
if (exif_file_sections_realloc(ImageInfo, sn, dir_size TSRMLS_CC)) {
return FALSE;
}
php_stream_read(ImageInfo->infile, ImageInfo->file.list[sn].data+2, dir_size-2);
/*exif_error_docref(NULL TSRMLS_CC, ImageInfo, E_NOTICE, "Dump: %s", exif_char_dump(ImageInfo->file.list[sn].data, dir_size, 0));*/
php_stream_read(ImageInfo->infile, (char*)(ImageInfo->file.list[sn].data+2), dir_size-2);
/*exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, "Dump: %s", exif_char_dump(ImageInfo->file.list[sn].data, dir_size, 0));*/
next_offset = php_ifd_get32u(ImageInfo->file.list[sn].data + dir_size - 4, ImageInfo->motorola_intel);
#ifdef EXIF_DEBUG
exif_error_docref(NULL TSRMLS_CC, ImageInfo, E_NOTICE, "read from TIFF done, next offset x%04X", next_offset);
@@ -3461,7 +3460,7 @@ static int exif_process_IFD_in_TIFF(image_info_type *ImageInfo, size_t dir_offse
#ifdef EXIF_DEBUG
exif_error_docref(NULL TSRMLS_CC, ImageInfo, E_NOTICE, "read from TIFF: filesize(x%04X), IFD(x%04X + x%04X)", ImageInfo->FileSize, dir_offset, ifd_size);
#endif
php_stream_read(ImageInfo->infile, ImageInfo->file.list[sn].data+dir_size, ifd_size-dir_size);
php_stream_read(ImageInfo->infile, (char*)(ImageInfo->file.list[sn].data+dir_size), ifd_size-dir_size);
#ifdef EXIF_DEBUG
exif_error_docref(NULL TSRMLS_CC, ImageInfo, E_NOTICE, "read from TIFF, done");
#endif
@@ -3524,8 +3523,8 @@ static int exif_process_IFD_in_TIFF(image_info_type *ImageInfo, size_t dir_offse
exif_error_docref(NULL TSRMLS_CC, ImageInfo, E_NOTICE, "next IFD: %s done", exif_get_sectionname(sub_section_index));
#endif
} else {
if (!exif_process_IFD_TAG(ImageInfo, dir_entry,
ImageInfo->file.list[sn].data-dir_offset,
if (!exif_process_IFD_TAG(ImageInfo, (char*)dir_entry,
(char*)(ImageInfo->file.list[sn].data-dir_offset),
ifd_size, 0, section_index, 0, tag_table TSRMLS_CC)) {
return FALSE;
}
@@ -3582,7 +3581,7 @@ static int exif_scan_FILE_header(image_info_type *ImageInfo TSRMLS_DC)
if (ImageInfo->FileSize >= 2) {
php_stream_seek(ImageInfo->infile, 0, SEEK_SET);
php_stream_read(ImageInfo->infile, file_header, 2);
php_stream_read(ImageInfo->infile, (char*)file_header, 2);
if ((file_header[0]==0xff) && (file_header[1]==M_SOI)) {
ImageInfo->FileType = IMAGE_FILETYPE_JPEG;
if (exif_scan_JPEG_header(ImageInfo TSRMLS_CC)) {
@@ -3722,7 +3721,7 @@ static int exif_read_file(image_info_type *ImageInfo, char *FileName, int read_t
}
/* }}} */
/* {{{ proto array|false exif_read_data(string filename [, sections_needed [, sub_arrays[, read_thumbnail]]])
/* {{{ proto array exif_read_data(string filename [, sections_needed [, sub_arrays[, read_thumbnail]]])
Reads header data from the JPEG/TIFF image filename and optionally reads the internal thumbnails */
PHP_FUNCTION(exif_read_data)
{
@@ -3791,15 +3790,17 @@ PHP_FUNCTION(exif_read_data)
exif_error_docref(NULL TSRMLS_CC, &ImageInfo, E_NOTICE, "sections found: %s", sections_str[0] ? sections_str : "None");
#endif
ImageInfo.sections_found |= FOUND_COMPUTED;/* do not inform about in debug*/
ImageInfo.sections_found |= FOUND_COMPUTED|FOUND_FILE;/* do not inform about in debug*/
if (ret==FALSE || (sections_needed && !(sections_needed&ImageInfo.sections_found)) || array_init(return_value) == FAILURE) {
if (ret==FALSE || (sections_needed && !(sections_needed&ImageInfo.sections_found))) {
/* array_init must be checked at last! otherwise the array must be freed if a later test fails. */
exif_discard_imageinfo(&ImageInfo);
EFREE_IF(sections_str);
RETURN_FALSE;
}
array_init(return_value);
#ifdef EXIF_DEBUG
exif_error_docref(NULL TSRMLS_CC, &ImageInfo, E_NOTICE, "generate section FILE");
#endif
@@ -3913,7 +3914,7 @@ PHP_FUNCTION(exif_read_data)
}
/* }}} */
/* {{{ proto string|false exif_thumbnail(string filename [, &width, &height [, &imagetype]])
/* {{{ proto string exif_thumbnail(string filename [, &width, &height [, &imagetype]])
Reads the embedded thumbnail */
PHP_FUNCTION(exif_thumbnail)
{
+1 -1
View File
@@ -150,7 +150,7 @@ if test "\$PHP_$EXTNAME" != "no"; then
dnl # --with-$extname -> add include path
dnl PHP_ADD_INCLUDE(\$${EXTNAME}_DIR/include)
dnl # --with-$extname -> chech for lib and symbol presence
dnl # --with-$extname -> check for lib and symbol presence
dnl LIBNAME=$extname # you may want to change this
dnl LIBSYMBOL=$extname # you most likely want to change this
+1 -1
View File
@@ -11,7 +11,7 @@ if (php_sapi_name() != "cli") {
1) Make sure you have CygWin installed
2) Adjust the $cygwin_path to match your installation
3) Change the environment cariable PATHEXT to include .PHP
4) run ext_skel --ext_name=...
4) run ext_skel --extname=...
the first time you run this script you will be asked to
associate it with a program. chooses the CLI version of php.
*/
+1 -1
View File
@@ -13,7 +13,7 @@ if test "$PHP_FBSQL" != "no"; then
FBSQL_INSTALLATION_DIR=""
if test "$PHP_FBSQL" = "yes"; then
for i in /Local/Library /usr /usr/local /opt /Library /usr/lib; do
for i in /Local/Library /usr/local /usr /opt /Library /usr/lib; do
if test -f $i/FrontBase/include/FBCAccess/FBCAccess.h; then
FBSQL_INSTALLATION_DIR=$i/FrontBase
break
+2 -2
View File
@@ -107,7 +107,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib php4ts_debug.lib FBCAccess.lib /nologo /dll /debug /machine:I386 /nodefaultlib:"LIBC" /out:"..\..\Debug_TS/php_fbsql.dll" /pdbtype:sept /libpath:"..\..\Debug_TS" /libpath:"\usr\FrontBase\lib"
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib php4ts_debug.lib FBCAccess.lib /nologo /dll /debug /machine:I386 /nodefaultlib:"LIBC" /out:"..\..\Debug_TS/php_fbsql.dll" /pdbtype:sept /libpath:"..\..\Debug_TS" /libpath:"\usr\FrontBase\lib"
!ELSEIF "$(CFG)" == "fbsql - Win32 Release_TS"
@@ -133,7 +133,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib FBCAccess.lib wsock32.lib /nologo /dll /machine:I386 /nodefaultlib:"LIBC" /out:"..\..\Release_TS/php_fbsql.dll" /libpath:"..\..\Release_TS" /libpath:"\usr\FrontBase\lib" /libpath:"..\..\Release_TS_inline"
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib FBCAccess.lib ws2_32.lib /nologo /dll /machine:I386 /nodefaultlib:"LIBC" /out:"..\..\Release_TS/php_fbsql.dll" /libpath:"..\..\Release_TS" /libpath:"\usr\FrontBase\lib" /libpath:"..\..\Release_TS_inline"
!ENDIF
+68 -75
View File
@@ -83,30 +83,28 @@ typedef struct PHPFBLink PHPFBLink;
required buffereing from of results.
In the PHP code the 3 above a data structures are referenced by means of integers in the
range from 1 to som configurable maximum. You can put a limit to the number of links, databases
and results. The integer identifications is implemented by insertion in the list, which is passed
range from 1 to som configurable maximum. You can put a limit to the number of links, databases
and results. The integer identifications is implemented by insertion in the list, which is passed
as an argument to all the functions, please note the list is polymorph.
Database objects and link objects are all reused, base on the host name user name, host name database name
user name. So connecting twice to the same database as the same user will return the same database id.
user name. So connecting twice to the same database as the same user will return the same database id.
We use the same coding for that as fbsql does, explioiting the underlying implementation of the lists.
Persistent objects are put in the persistent list as well, but only by name, if you connect to a persistent object
and it is not in the list it is simply added and get a new index, and refcounted. Tricky, tricky ...
and it is not in the list it is simply added and get a new index, and refcounted. Tricky, tricky ...
*/
/* Some functions which should be exported from FBCAccess */
void* fbaObjectAtIndex();
void fbaRelease();
unsigned int fbaCount();
void* fbaObjectAtIndex();
void fbaRelease();
unsigned int fbaCount();
struct FBCAutoStartInfo {
FBArray* infoLines;
FBArray* infoLines;
};
struct PHPFBResult
{
PHPFBLink* link; /* The link for the result, may be NULL if no link */
@@ -115,7 +113,7 @@ struct PHPFBResult
FBCMetaData* ResultmetaData; /* The metadata describing the result */
FBCRowHandler* rowHandler; /* The row handler, the Frontbase structure used for accessing rows in the result */
unsigned int batchSize; /* The number of row to fetch when expanding the number of rows in the row handler */
unsigned int rowCount; /* The number of rows in the results set. The number of row is not in */
unsigned int rowCount; /* The number of rows in the results set. The number of row is not in */
/* general known when the select is done, one typically needs to fetch all the row
to figure out how many row you got. When the rowCount is unknown the value is
0x7ffffffff */
@@ -280,10 +278,10 @@ static void phpfbReleaseResult(zend_rsrc_list_entry *rsrc TSRMLS_DC)
FBCMetaData *md = fbcdcCancelFetch(result->link->connection, result->fetchHandle);
fbcmdRelease(md);
}
if (result->rowHandler) fbcrhRelease(result->rowHandler);
if (result->ResultmetaData) fbcmdRelease(result->ResultmetaData);
if (result->list) fbcplRelease(result->list);
if (result->array) fbaRelease(result->array);
if (result->rowHandler) fbcrhRelease(result->rowHandler);
if (result->ResultmetaData) fbcmdRelease(result->ResultmetaData);
if (result->list) fbcplRelease(result->list);
if (result->array) fbaRelease(result->array);
efree(result);
}
}
@@ -389,7 +387,7 @@ static void php_fbsql_init_globals(zend_fbsql_globals *fbsql_globals)
fbsql_globals->persistentCount = 0;
fbsql_globals->linkCount = 0;
}
PHP_MINIT_FUNCTION(fbsql)
{
ZEND_INIT_MODULE_GLOBALS(fbsql, php_fbsql_init_globals, NULL);
@@ -397,7 +395,7 @@ PHP_MINIT_FUNCTION(fbsql)
REGISTER_INI_ENTRIES();
fbcInitialize();
fbcehSetMultiThreaded(True);
le_result = zend_register_list_destructors_ex(phpfbReleaseResult, NULL, "fbsql result", module_number);
le_link = zend_register_list_destructors_ex(phpfbReleaseLink, NULL, "fbsql link", module_number);
le_plink = zend_register_list_destructors_ex(NULL, phpfbReleasePLink, "fbsql plink", module_number);
@@ -497,12 +495,12 @@ static void php_fbsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
if (argc >= 2)
{
convert_to_string_ex(argv[1]);
userName = Z_STRVAL_PP(argv[1]);
}
userName = Z_STRVAL_PP(argv[1]);
}
if (argc == 3)
{
convert_to_string_ex(argv[2]);
userPassword = Z_STRVAL_PP(argv[2]);
userPassword = Z_STRVAL_PP(argv[2]);
}
if (hostName == NULL) hostName = FB_SQL_G(hostName);
@@ -543,7 +541,7 @@ static void php_fbsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
phpLink->userPassword = strdup(userPassword);
phpLink->databasePassword = strdup(FB_SQL_G(databasePassword));
phpLink->databaseName = NULL;
phpLink->execHandler = fbcehHandlerForHost(hostName, 128);
phpLink->execHandler = NULL;
phpLink->affectedRows = 0;
phpLink->autoCommit = FB_SQL_G(autoCommit);
phpLink->errorNo = 0;
@@ -604,7 +602,7 @@ static void php_fbsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
phpLink->userPassword = strdup(userPassword);
phpLink->databasePassword = strdup(FB_SQL_G(databasePassword));
phpLink->databaseName = NULL;
phpLink->execHandler = fbcehHandlerForHost(hostName, 128);
phpLink->execHandler = NULL;
phpLink->affectedRows = 0;
phpLink->autoCommit = FB_SQL_G(autoCommit);
phpLink->errorNo = 0;
@@ -613,7 +611,7 @@ static void php_fbsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
ZEND_REGISTER_RESOURCE(return_value, phpLink, le_link);
le.ptr = (void *)Z_LVAL_P(return_value);
le.ptr = (void *)Z_LVAL_P(return_value);
Z_TYPE(le) = le_index_ptr;
if (zend_hash_update(&EG(regular_list), name, strlen(name) + 1, &le, sizeof(le), NULL)==FAILURE)
{
@@ -751,7 +749,7 @@ static int php_fbsql_select_db(char *databaseName, PHPFBLink *link TSRMLS_DC)
php_error_docref(NULL TSRMLS_CC, E_WARNING, "No message");
}
link->errorText = strdup(emg);
link->errorNo = fbcemdErrorCodeAtIndex(emd, 0);;
link->errorNo = fbcemdErrorCodeAtIndex(emd, 0);;
free(emg);
fbcemdRelease(emd);
fbcmdRelease(md);
@@ -786,7 +784,7 @@ static int php_fbsql_select_db(char *databaseName, PHPFBLink *link TSRMLS_DC)
void phpfbestrdup(const char * s, int* length, char** value)
{
int l = s?strlen(s):0;
int l = s?strlen(s):0;
if (value)
{
char* r = emalloc(l+1);
@@ -794,7 +792,7 @@ void phpfbestrdup(const char * s, int* length, char** value)
strcpy(r, s);
else
r[0] = 0;
*value = r;
*value = r;
}
*length = l;
}
@@ -1290,7 +1288,7 @@ PHP_FUNCTION(fbsql_username)
/* {{{ proto string fbsql_password(resource link_identifier [, string password])
Get or set the user password used with a connection */
PHP_FUNCTION(fbsql_password)
{
{
PHPFBLink* phpLink = NULL;
zval **fbsql_link_index = NULL, **password = NULL;
@@ -1359,17 +1357,6 @@ PHP_FUNCTION(fbsql_select_db)
}
ZEND_FETCH_RESOURCE2(phpLink, PHPFBLink *, fbsql_link_index, id, "FrontBase-Link", le_link, le_plink);
if (phpLink->execHandler == NULL)
{
int port = atoi(name);
if (port == 0 || port > 64535) {
if (FB_SQL_G(generateWarnings)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot connect to FBExec for database '%s'. (%s)", name, fbcehClassErrorMessage());
}
RETURN_FALSE;
}
}
if (!php_fbsql_select_db(name, phpLink TSRMLS_CC)) {
RETURN_FALSE;
}
@@ -1469,6 +1456,7 @@ PHP_FUNCTION(fbsql_create_db)
convert_to_string_ex(database_name);
databaseName = Z_STRVAL_PP(database_name);
if (phpLink->execHandler == NULL) phpLink->execHandler = fbcehHandlerForHost(phpLink->hostName, 128);
status = fbcehStatusForDatabaseNamed(phpLink->execHandler, databaseName);
if (status != FBUnknownStatus)
{
@@ -1542,6 +1530,7 @@ PHP_FUNCTION(fbsql_drop_db)
convert_to_string_ex(database_name);
databaseName = Z_STRVAL_PP(database_name);
if (phpLink->execHandler == NULL) phpLink->execHandler = fbcehHandlerForHost(phpLink->hostName, 128);
status = fbcehStatusForDatabaseNamed(phpLink->execHandler, databaseName);
if (status != FBStopped)
{
@@ -1616,6 +1605,7 @@ PHP_FUNCTION(fbsql_start_db)
convert_to_string_ex(database_name);
databaseName = Z_STRVAL_PP(database_name);
if (phpLink->execHandler == NULL) phpLink->execHandler = fbcehHandlerForHost(phpLink->hostName, 128);
status = fbcehStatusForDatabaseNamed(phpLink->execHandler, databaseName);
if ((status != FBStopped) && (status != FBRunning) && (status != FBStarting))
{
@@ -1752,6 +1742,7 @@ PHP_FUNCTION(fbsql_db_status)
convert_to_string_ex(database_name);
databaseName = Z_STRVAL_PP(database_name);
if (phpLink->execHandler == NULL) phpLink->execHandler = fbcehHandlerForHost(phpLink->hostName, 128);
if (phpLink->execHandler) {
RETURN_LONG(fbcehStatusForDatabaseNamed(phpLink->execHandler, databaseName));
}
@@ -1795,7 +1786,7 @@ int mdOk(PHPFBLink* link, FBCMetaData* md, char* sql)
php_error_docref(NULL TSRMLS_CC, E_WARNING, "No message");
}
link->errorText = strdup(emg);
link->errorNo = fbcemdErrorCodeAtIndex(emd, 0);;
link->errorNo = fbcemdErrorCodeAtIndex(emd, 0);;
free(emg);
fbcemdRelease(emd);
result = 0;
@@ -1806,7 +1797,7 @@ int mdOk(PHPFBLink* link, FBCMetaData* md, char* sql)
static void phpfbQuery(INTERNAL_FUNCTION_PARAMETERS, char* sql, PHPFBLink* link)
{
PHPFBResult* result = NULL;
PHPFBResult* result = NULL;
FBCMetaData* md, *meta;
char* tp;
char* fh;
@@ -1827,7 +1818,7 @@ static void phpfbQuery(INTERNAL_FUNCTION_PARAMETERS, char* sql, PHPFBLink* link)
else
md = meta;
tp = fbcmdStatementType(md);
tp = fbcmdStatementType(md);
if ((tp[0] == 'C') || (tp[0] == 'R'))
{
@@ -1866,7 +1857,7 @@ static void phpfbQuery(INTERNAL_FUNCTION_PARAMETERS, char* sql, PHPFBLink* link)
fbcrhConvertToOutputCharSet(fbcdcOutputCharacterSet(link->connection), (unsigned char *)r);
if ((result->list = fbcplParse(r)))
{
result->rowCount = fbcplCount(result->list);
result->rowCount = fbcplCount(result->list);
result->columnCount = 7;
}
}
@@ -1964,7 +1955,7 @@ PHP_FUNCTION(fbsql_db_query)
Retreive a list of all databases on the server */
PHP_FUNCTION(fbsql_list_dbs)
{
PHPFBResult* phpResult;
PHPFBResult* phpResult;
PHPFBLink* phpLink = NULL;
zval **fbsql_link_index = NULL;
int id;
@@ -1986,6 +1977,7 @@ PHP_FUNCTION(fbsql_list_dbs)
}
ZEND_FETCH_RESOURCE2(phpLink, PHPFBLink *, fbsql_link_index, id, "FrontBase-Link", le_link, le_plink);
if (phpLink->execHandler == NULL) phpLink->execHandler = fbcehHandlerForHost(phpLink->hostName, 128);
phpResult = emalloc(sizeof(PHPFBResult));
phpResult->link = phpLink;
phpResult->fetchHandle = NULL;
@@ -2053,10 +2045,10 @@ PHP_FUNCTION(fbsql_list_tables)
PHP_FUNCTION(fbsql_list_fields)
{
PHPFBLink* phpLink = NULL;
zval **fbsql_link_index = NULL, **database_name, **table_name;
zval **fbsql_link_index = NULL, **database_name, **table_name;
int id;
char *databaseName, *tableName;
char sql[1024];
char sql[1024];
switch (ZEND_NUM_ARGS()) {
case 2:
@@ -2160,8 +2152,8 @@ PHP_FUNCTION(fbsql_errno)
Enable or disable FrontBase warnings */
PHP_FUNCTION(fbsql_warnings)
{
int argc = ARG_COUNT(ht);
zval **argv[1];
int argc = ARG_COUNT(ht);
zval **argv[1];
if ((argc < 0) || (argc > 1)) WRONG_PARAM_COUNT;
if (zend_get_parameters_ex(argc, &argv[0])==FAILURE) RETURN_FALSE;
@@ -2265,12 +2257,12 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
phpfbestrdup("True", length, value);
}
break;
case FB_PrimaryKey:
case FB_Integer:
{
int v = *((int*)data);
char b[128];
int v = *((int*)data);
char b[128];
sprintf(b, "%d", v);
phpfbestrdup(b, length, value);
}
@@ -2278,8 +2270,8 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
#ifdef FB_TinyInteger
case FB_TinyInteger:
{
short int v = *((short int*)data);
char b[128];
short int v = *((FBTinyInteger*)data);
char b[128];
sprintf(b, "%d", v);
phpfbestrdup(b, length, value);
}
@@ -2289,7 +2281,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
case FB_LongInteger:
{
FBLongInteger v = *((FBLongInteger*)data);
char b[128];
char b[128];
#ifdef PHP_WIN32
sprintf(b, "%I64i", v);
#else
@@ -2302,7 +2294,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
case FB_SmallInteger:
{
short v = *((short*)data);
char b[128];
char b[128];
sprintf(b, "%d", v);
phpfbestrdup(b, length, value);
}
@@ -2315,7 +2307,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
case FB_Decimal:
{
double v = *((double*)data);
char b[128];
char b[128];
sprintf(b, "%f", v);
phpfbestrdup(b, length, value);
}
@@ -2332,13 +2324,13 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
case FB_Bit:
case FB_VBit:
{
const FBCColumnMetaData* clmd = fbcmdColumnMetaDataAtIndex(md, column);
const FBCColumnMetaData* clmd = fbcmdColumnMetaDataAtIndex(md, column);
struct bitValue
{
unsigned int nBytes;
unsigned int nBytes;
unsigned char* bytes;
};
struct bitValue* ptr = data;
struct bitValue* ptr = data;
unsigned nBits = ptr->nBytes * 8;
if (dtc == FB_Bit) nBits = fbcdmdLength(fbccmdDatatype(clmd));
@@ -2349,7 +2341,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
*length = l*2+3+1;
if (value)
{
char* r = emalloc(l*2+3+1);
char* r = emalloc(l*2+3+1);
r[0] = 'X';
r[1] = '\'';
for (i = 0; i < nBits / 8; i++)
@@ -2361,7 +2353,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
}
r[i*2+2] = '\'';
r[i*2+3] = 0;
*value = r;
*value = r;
}
}
else
@@ -2371,7 +2363,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
*length = l*2+3+1;
if (value)
{
char* r = emalloc(l*2+3+1);
char* r = emalloc(l*2+3+1);
r[0] = 'B';
r[1] = '\'';
for (i = 0; i < nBits; i++)
@@ -2382,7 +2374,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
}
r[i*2+2] = '\'';
r[i*2+3] = 0;
*value = r;
*value = r;
}
}
}
@@ -2402,7 +2394,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
case FB_YearMonth:
{
char b[128];
int v = *((unsigned int*)data);
int v = *((unsigned int*)data);
sprintf(b, "%d", v);
phpfbestrdup(b, length, value);
}
@@ -2455,14 +2447,14 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
/* {{{ phpfbSqlResult
*/
void phpfbSqlResult(INTERNAL_FUNCTION_PARAMETERS, PHPFBResult* result, int rowIndex, int columnIndex)
void phpfbSqlResult(INTERNAL_FUNCTION_PARAMETERS, PHPFBResult* result, int rowIndex, int columnIndex)
{
void** row;
if (result->list)
{
FBCPList* columns = (FBCPList*)fbcplValueForKey(result->list, "COLUMNS");
FBCPList* column = (FBCPList*)fbcplValueAtIndex(columns, result->rowIndex);
if (columnIndex == 0)
if (columnIndex == 0)
{ /* Name */
FBCPList* name = (FBCPList*)fbcplValueForKey(column, "NAME");
RETURN_STRING((char *)fbcplString((FBCPList*)name), 1);
@@ -2521,7 +2513,7 @@ void phpfbSqlResult(INTERNAL_FUNCTION_PARAMETERS, PHPFBResult* result, int rowIn
}
}
/* }}} */
/* {{{ proto mixed fbsql_result(int result [, int row [, mixed field]])
??? */
PHP_FUNCTION(fbsql_result)
@@ -2560,7 +2552,7 @@ PHP_FUNCTION(fbsql_result)
rowIndex = Z_LVAL_PP(row);
}
columnIndex = result->columnIndex;
columnIndex = result->columnIndex;
if (field)
{
if ((Z_TYPE_PP(field) == IS_STRING) && (result->metaData))
@@ -2584,8 +2576,8 @@ PHP_FUNCTION(fbsql_result)
RETURN_FALSE;
}
}
}
}
phpfbSqlResult(INTERNAL_FUNCTION_PARAM_PASSTHRU, result, rowIndex, columnIndex);
result->columnIndex++;
@@ -2616,9 +2608,9 @@ PHP_FUNCTION(fbsql_next_result)
}
ZEND_FETCH_RESOURCE(result, PHPFBResult *, fbsql_result_index, -1, "FrontBase-Result", le_result);
result->currentResult++;
result->currentResult++;
if (result->currentResult < result->selectResults) {
if (result->fetchHandle) {
if (result->fetchHandle) {
FBCMetaData *md = fbcdcCancelFetch(result->link->connection, result->fetchHandle);
fbcmdRelease(md);
}
@@ -2927,7 +2919,7 @@ static void php_fbsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type,
{
if (row[i])
{
char* value;
char* value;
unsigned int length;
unsigned int c = 0;
phpfbColumnAsString(result, i, row[i], &length, &value TSRMLS_CC);
@@ -3023,7 +3015,7 @@ PHP_FUNCTION(fbsql_fetch_lengths)
if (array_init(return_value)==FAILURE) RETURN_FALSE;
for (i=0; i < result->columnCount; i++)
{
unsigned length = 0;
unsigned length = 0;
if (result->row[i]) phpfbColumnAsString(result, i, result->row[i], &length, NULL TSRMLS_CC);
add_index_long(return_value, i, length);
}
@@ -3414,9 +3406,9 @@ PHP_FUNCTION(fbsql_field_flags)
PHP_FUNCTION(fbsql_table_name)
{
PHPFBResult* result = NULL;
zval **fbsql_result_index = NULL, **table_index;
zval **fbsql_result_index = NULL, **table_index;
unsigned index;
char* value;
char* value;
unsigned int length;
void** row;
@@ -3502,6 +3494,7 @@ PHP_FUNCTION(fbsql_get_autostart_info)
}
ZEND_FETCH_RESOURCE2(phpLink, PHPFBLink *, fbsql_link_index, id, "FrontBase-Link", le_link, le_plink);
if (phpLink->execHandler == NULL) phpLink->execHandler = fbcehHandlerForHost(phpLink->hostName, 128);
if (phpLink->execHandler == NULL) {
if (FB_SQL_G(generateWarnings))
php_error_docref(NULL TSRMLS_CC, E_WARNING, "No valid Exec handler available for this connection");
+7 -7
View File
@@ -8,22 +8,22 @@ PHP_ARG_WITH(fdftk, for FDF support,
if test "$PHP_FDFTK" != "no"; then
case $host_os in
aix*)
aix*[)]
libtype=aix
;;
solaris* )
solaris*[)]
libtype=solaris
;;
linux*)
linux*[)]
libtype=linux
;;
*)
*[)]
AC_MSG_ERROR([The fdf toolkit is not available for $host_os.])
;;
esac
if test "$PHP_FDFTK" = "yes"; then
PHP_FDFTK="/usr /usr/local ../FDFToolkitForUNIX ext/fdf/FDFToolkitForUNIX ../fdftk ext/fdf/fdftk"
PHP_FDFTK="/usr/local /usr ../FDFToolkitForUNIX ext/fdf/FDFToolkitForUNIX ../fdftk ext/fdf/fdftk"
fi
for dir in $PHP_FDFTK; do
@@ -65,9 +65,9 @@ if test "$PHP_FDFTK" != "no"; then
AC_MSG_ERROR(no usable fdf library found)
fi
PHP_ADD_LIBRARY_WITH_PATH($FDFLIBRARY, $FDFTK_LIB_DIR, FDFTK_SHARED_LIBADD)
PHP_ADD_LIBRARY_WITH_PATH($FDFLIBRARY, $FDFTK_LIB_DIR, FDF_SHARED_LIBADD)
PHP_NEW_EXTENSION(fdf, fdf.c, $ext_shared)
PHP_SUBST(FDFTK_SHARED_LIBADD)
PHP_SUBST(FDF_SHARED_LIBADD)
AC_DEFINE(HAVE_FDFLIB,1,[ ])
fi
+9 -2
View File
@@ -382,13 +382,12 @@ PHP_FUNCTION(fdf_get_value)
}
which++;
} while (err == FDFErcOK);
if(err == FDFErcNoValue) err = FDFErcOK;
efree(buffer);
buffer = NULL;
#endif
}
if(err != FDFErcOK) {
if ((err != FDFErcOK) && (err != FDFErcNoValue)) {
if(buffer) efree(buffer);
FDF_FAILURE(err);
}
@@ -722,6 +721,10 @@ PHP_FUNCTION(fdf_set_file)
return;
}
if (php_check_open_basedir(filename TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(filename, "wb+", CHECKUID_CHECK_MODE_PARAM))) {
RETURN_FALSE;
}
ZEND_FETCH_RESOURCE(fdf, FDFDoc *, &r_fdf, -1, "fdf", le_fdf);
err = FDFSetFile(fdf, filename);
@@ -1482,6 +1485,10 @@ PHP_FUNCTION(fdf_get_attachment) {
ZEND_FETCH_RESOURCE(fdf, FDFDoc *, &r_fdf, -1, "fdf", le_fdf);
if (php_check_open_basedir(savepath TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(savepath, "wb+", CHECKUID_CHECK_MODE_PARAM))) {
RETURN_FALSE;
}
strncpy(pathbuf , savepath, MAXPATHLEN-1);
pathbuf[MAXPATHLEN-1] = '\0';
-2
View File
@@ -2,8 +2,6 @@ dnl
dnl $Id$
dnl
AC_ARG_WITH(filepro,[],[enable_filepro=$withval])
PHP_ARG_ENABLE(filepro,whether to enable the bundled filePro support,
[ --enable-filepro Enable the bundled read-only filePro support.])
+3 -3
View File
@@ -386,7 +386,7 @@ PHP_FUNCTION(filepro_fieldname)
}
php_error(E_WARNING,
"%s(): Unable to locate field number %d.", get_active_function_name(TSRMLS_C),
"%s(): Unable to locate field number %ld.", get_active_function_name(TSRMLS_C),
Z_LVAL_P(fno));
RETVAL_FALSE;
@@ -426,7 +426,7 @@ PHP_FUNCTION(filepro_fieldtype)
}
}
php_error(E_WARNING,
"%s(): Unable to locate field number %d.", get_active_function_name(TSRMLS_C),
"%s(): Unable to locate field number %ld.", get_active_function_name(TSRMLS_C),
Z_LVAL_P(fno));
RETVAL_FALSE;
}
@@ -465,7 +465,7 @@ PHP_FUNCTION(filepro_fieldwidth)
}
}
php_error(E_WARNING,
"%s(): Unable to locate field number %d.", get_active_function_name(TSRMLS_C),
"%s(): Unable to locate field number %ld.", get_active_function_name(TSRMLS_C),
Z_LVAL_P(fno));
RETVAL_FALSE;
}
+68 -46
View File
@@ -19,6 +19,10 @@
/* $Id$ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "php.h"
#if HAVE_FTP
@@ -104,7 +108,7 @@ static char** ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path TSRM
/* IP and port conversion box */
union ipbox {
unsigned long l[2];
struct in_addr ia[2];
unsigned short s[4];
unsigned char c[8];
};
@@ -358,6 +362,9 @@ ftp_syst(ftpbuf_t *ftp)
return NULL;
syst = ftp->inbuf;
while (*syst == ' ') {
syst++;
}
if ((end = strchr(syst, ' ')))
*end = 0;
ftp->syst = estrdup(syst);
@@ -421,9 +428,10 @@ ftp_chdir(ftpbuf_t *ftp, const char *dir)
{
if (ftp == NULL)
return 0;
if (ftp->pwd)
if (ftp->pwd) {
efree(ftp->pwd);
ftp->pwd = NULL;
ftp->pwd = NULL;
}
if (!ftp_putcmd(ftp, "CWD", dir))
return 0;
@@ -442,9 +450,10 @@ ftp_cdup(ftpbuf_t *ftp)
if (ftp == NULL)
return 0;
if (ftp->pwd)
if (ftp->pwd) {
efree(ftp->pwd);
ftp->pwd = NULL;
ftp->pwd = NULL;
}
if (!ftp_putcmd(ftp, "CDUP", NULL))
return 0;
@@ -632,9 +641,8 @@ ftp_pasv(ftpbuf_t *ftp, int pasv)
sin = (struct sockaddr_in *) sa;
sin->sin_family = AF_INET;
sin->sin_addr.s_addr = ipbox.l[0];
sin->sin_addr = ipbox.ia[0];
sin->sin_port = ipbox.s[2];
ftp->pasv = 2;
return 1;
@@ -647,7 +655,6 @@ int
ftp_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t type, int resumepos)
{
databuf_t *data = NULL;
char *ptr;
int lastch;
size_t rcvd;
char arg[11];
@@ -698,12 +705,39 @@ ftp_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t type,
}
if (type == FTPTYPE_ASCII) {
for (ptr = data->buf; rcvd; rcvd--, ptr++) {
if (lastch == '\r' && *ptr != '\n')
char *s;
char *ptr = data->buf;
char *e = ptr + rcvd;
/* logic depends on the OS EOL
* Win32 -> \r\n
* Everything Else \n
*/
#ifdef PHP_WIN32
while ((s = strpbrk(ptr, "\r\n"))) {
if (*s == '\n') {
php_stream_putc(outstream, '\r');
if (*ptr != '\r')
php_stream_putc(outstream, *ptr);
lastch = *ptr;
} else if (*s == '\r' && *(s + 1) == '\n') {
s++;
}
s++;
php_stream_write(outstream, ptr, (s - ptr));
if (*(s - 1) == '\r') {
php_stream_putc(outstream, '\n');
}
ptr = s;
}
#else
while ((s = memchr(ptr, '\r', (e - ptr)))) {
php_stream_write(outstream, ptr, (s - ptr));
if (*(s + 1) == '\n') {
s++;
}
php_stream_putc(outstream, '\n');
ptr = s + 1;
}
#endif
if (ptr < e) {
php_stream_write(outstream, ptr, (e - ptr));
}
}
else {
@@ -712,11 +746,7 @@ ftp_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t type,
}
}
if (type == FTPTYPE_ASCII && lastch == '\r')
php_stream_putc(outstream, '\r');
data = data_close(ftp, data);
ftp->data = NULL;
ftp->data = data = data_close(ftp, data);
if (!ftp_getresp(ftp) || (ftp->resp != 226 && ftp->resp != 250)) {
goto bail;
@@ -724,8 +754,7 @@ ftp_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t type,
return 1;
bail:
data_close(ftp, data);
ftp->data = NULL;
ftp->data = data_close(ftp, data);
return 0;
}
/* }}} */
@@ -798,14 +827,14 @@ ftp_put(ftpbuf_t *ftp, const char *path, php_stream *instream, ftptype_t type, i
if (size && my_send(ftp, data->fd, data->buf, size) != size)
goto bail;
data = data_close(ftp, data);
ftp->data = data = data_close(ftp, data);
if (!ftp_getresp(ftp) || (ftp->resp != 226 && ftp->resp != 250))
goto bail;
return 1;
bail:
data_close(ftp, data);
ftp->data = data_close(ftp, data);
return 0;
}
/* }}} */
@@ -1324,7 +1353,7 @@ ftp_getdata(ftpbuf_t *ftp TSRMLS_DC)
#endif
/* send the PORT */
ipbox.l[0] = ((struct sockaddr_in*) sa)->sin_addr.s_addr;
ipbox.ia[0] = ((struct sockaddr_in*) sa)->sin_addr;
ipbox.s[2] = ((struct sockaddr_in*) &addr)->sin_port;
sprintf(arg, "%u,%u,%u,%u,%u,%u",
ipbox.c[0], ipbox.c[1], ipbox.c[2], ipbox.c[3],
@@ -1450,7 +1479,7 @@ data_close(ftpbuf_t *ftp, databuf_t *data)
char**
ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path TSRMLS_DC)
{
FILE *tmpfp = NULL;
php_stream *tmpstream = NULL;
databuf_t *data = NULL;
char *ptr;
int ch, lastch;
@@ -1460,8 +1489,10 @@ ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path TSRMLS_DC)
char **entry;
char *text;
if ((tmpfp = tmpfile()) == NULL)
if ((tmpstream = php_stream_fopen_tmpfile()) == NULL) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to create temporary file. Check permissions in temporary files directory.");
return NULL;
}
if (!ftp_type(ftp, FTPTYPE_ASCII))
goto bail;
@@ -1486,7 +1517,7 @@ ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path TSRMLS_DC)
if (rcvd == -1)
goto bail;
fwrite(data->buf, rcvd, 1, tmpfp);
php_stream_write(tmpstream, data->buf, rcvd);
size += rcvd;
for (ptr = data->buf; rcvd; rcvd--, ptr++) {
@@ -1498,14 +1529,9 @@ ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path TSRMLS_DC)
}
}
data = data_close(ftp, data);
ftp->data = data = data_close(ftp, data);
if (ferror(tmpfp))
goto bail;
rewind(tmpfp);
php_stream_rewind(tmpstream);
ret = emalloc((lines + 1) * sizeof(char**) + size * sizeof(char*));
@@ -1513,7 +1539,7 @@ ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path TSRMLS_DC)
text = (char*) (ret + lines + 1);
*entry = text;
lastch = 0;
while ((ch = getc(tmpfp)) != EOF) {
while ((ch = php_stream_getc(tmpstream)) != EOF) {
if (ch == '\n' && lastch == '\r') {
*(text - 1) = 0;
*++entry = text;
@@ -1525,10 +1551,7 @@ ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path TSRMLS_DC)
}
*entry = NULL;
if (ferror(tmpfp))
goto bail;
fclose(tmpfp);
php_stream_close(tmpstream);
if (!ftp_getresp(ftp) || (ftp->resp != 226 && ftp->resp != 250)) {
efree(ret);
@@ -1537,9 +1560,8 @@ ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path TSRMLS_DC)
return ret;
bail:
if (data)
data_close(ftp, data);
fclose(tmpfp);
ftp->data = data_close(ftp, data);
php_stream_close(tmpstream);
if (ret)
efree(ret);
return NULL;
@@ -1594,7 +1616,7 @@ ftp_nb_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t typ
return (ftp_nb_continue_read(ftp));
bail:
data_close(ftp, data);
ftp->data = data_close(ftp, data);
return PHP_FTP_FAILED;
}
/* }}} */
@@ -1647,7 +1669,7 @@ ftp_nb_continue_read(ftpbuf_t *ftp)
if (type == FTPTYPE_ASCII && lastch == '\r')
php_stream_putc(ftp->stream, '\r');
data = data_close(ftp, data);
ftp->data = data = data_close(ftp, data);
if (!ftp_getresp(ftp) || (ftp->resp != 226 && ftp->resp != 250)) {
goto bail;
@@ -1657,7 +1679,7 @@ ftp_nb_continue_read(ftpbuf_t *ftp)
return PHP_FTP_FINISHED;
bail:
ftp->nb = 0;
data_close(ftp, data);
ftp->data = data_close(ftp, data);
return PHP_FTP_FAILED;
}
/* }}} */
@@ -1709,7 +1731,7 @@ ftp_nb_put(ftpbuf_t *ftp, const char *path, php_stream *instream, ftptype_t type
return (ftp_nb_continue_write(ftp));
bail:
data_close(ftp, data);
ftp->data = data_close(ftp, data);
return PHP_FTP_FAILED;
}
@@ -1764,7 +1786,7 @@ ftp_nb_continue_write(ftpbuf_t *ftp)
ftp->nb = 0;
return PHP_FTP_FINISHED;
bail:
data_close(ftp, ftp->data);
ftp->data = data_close(ftp, ftp->data);
ftp->nb = 0;
return PHP_FTP_FAILED;
}
+22 -20
View File
@@ -139,7 +139,7 @@ PHP_MINFO_FUNCTION(ftp)
}
/* {{{ proto resource ftp_connect(string host [, int port [, int timeout)]])
/* {{{ proto resource ftp_connect(string host [, int port [, int timeout]])
Opens a FTP stream */
PHP_FUNCTION(ftp_connect)
{
@@ -176,7 +176,7 @@ PHP_FUNCTION(ftp_connect)
/* }}} */
#ifdef HAVE_OPENSSL_EXT
/* {{{ proto resource ftp_ssl_connect(string host [, int port [, int timeout)]])
/* {{{ proto resource ftp_ssl_connect(string host [, int port [, int timeout]])
Opens a FTP-SSL stream */
PHP_FUNCTION(ftp_ssl_connect)
{
@@ -603,15 +603,15 @@ PHP_FUNCTION(ftp_get)
}
if (ftp->autoseek && resumepos) {
if (PG(safe_mode) && (!php_checkuid(local, "rb+", CHECKUID_CHECK_MODE_PARAM))) {
if (PG(safe_mode) && (!php_checkuid(local, mode == FTPTYPE_ASCII ? "rt+" : "rb+", CHECKUID_CHECK_MODE_PARAM))) {
RETURN_FALSE;
}
outstream = php_stream_fopen(local, "rb+", NULL);
outstream = php_stream_fopen(local, mode == FTPTYPE_ASCII ? "rt+" : "rb+", NULL);
if (outstream == NULL) {
if (PG(safe_mode) && (!php_checkuid(local, "wb", CHECKUID_CHECK_MODE_PARAM))) {
if (PG(safe_mode) && (!php_checkuid(local, mode == FTPTYPE_ASCII ? "wt" : "wb", CHECKUID_CHECK_MODE_PARAM))) {
RETURN_FALSE;
}
outstream = php_stream_fopen(local, "wb", NULL);
outstream = php_stream_fopen(local, mode == FTPTYPE_ASCII ? "wt" : "wb", NULL);
}
if (outstream != NULL) {
/* if autoresume is wanted seek to end */
@@ -623,10 +623,10 @@ PHP_FUNCTION(ftp_get)
}
}
} else {
if (PG(safe_mode) && (!php_checkuid(local, "wb", CHECKUID_CHECK_MODE_PARAM))) {
if (PG(safe_mode) && (!php_checkuid(local, mode == FTPTYPE_ASCII ? "wt" : "wb", CHECKUID_CHECK_MODE_PARAM))) {
RETURN_FALSE;
}
outstream = php_stream_fopen(local, "wb", NULL);
outstream = php_stream_fopen(local, mode == FTPTYPE_ASCII ? "wt" : "wb", NULL);
}
if (outstream == NULL) {
@@ -636,6 +636,7 @@ PHP_FUNCTION(ftp_get)
if (!ftp_get(ftp, outstream, remote, xtype, resumepos)) {
php_stream_close(outstream);
VCWD_UNLINK(local);
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ftp->inbuf);
RETURN_FALSE;
}
@@ -674,15 +675,15 @@ PHP_FUNCTION(ftp_nb_get)
}
if (ftp->autoseek && resumepos) {
if (PG(safe_mode) && (!php_checkuid(local, "rb+", CHECKUID_CHECK_MODE_PARAM))) {
if (PG(safe_mode) && (!php_checkuid(local, mode == FTPTYPE_ASCII ? "rt+" : "rb+", CHECKUID_CHECK_MODE_PARAM))) {
RETURN_FALSE;
}
outstream = php_stream_fopen(local, "rb+", NULL);
outstream = php_stream_fopen(local, mode == FTPTYPE_ASCII ? "rt+" : "rb+", NULL);
if (outstream == NULL) {
if (PG(safe_mode) && (!php_checkuid(local, "wb", CHECKUID_CHECK_MODE_PARAM))) {
if (PG(safe_mode) && (!php_checkuid(local, mode == FTPTYPE_ASCII ? "wt" : "wb", CHECKUID_CHECK_MODE_PARAM))) {
RETURN_FALSE;
}
outstream = php_stream_fopen(local, "wb", NULL);
outstream = php_stream_fopen(local, mode == FTPTYPE_ASCII ? "wt" : "wb", NULL);
}
if (outstream != NULL) {
/* if autoresume is wanted seek to end */
@@ -694,10 +695,10 @@ PHP_FUNCTION(ftp_nb_get)
}
}
} else {
if (PG(safe_mode) && (!php_checkuid(local, "wb", CHECKUID_CHECK_MODE_PARAM))) {
if (PG(safe_mode) && (!php_checkuid(local, mode == FTPTYPE_ASCII ? "wt" : "wb", CHECKUID_CHECK_MODE_PARAM))) {
RETURN_FALSE;
}
outstream = php_stream_fopen(local, "wb", NULL);
outstream = php_stream_fopen(local, mode == FTPTYPE_ASCII ? "wt" : "wb", NULL);
}
if (outstream == NULL) {
@@ -711,6 +712,7 @@ PHP_FUNCTION(ftp_nb_get)
if ((ret = ftp_nb_get(ftp, outstream, remote, xtype, resumepos TSRMLS_CC)) == PHP_FTP_FAILED) {
php_stream_close(outstream);
VCWD_UNLINK(local);
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ftp->inbuf);
RETURN_LONG(PHP_FTP_FAILED);
}
@@ -881,11 +883,11 @@ PHP_FUNCTION(ftp_put)
if (php_check_open_basedir(local TSRMLS_CC)) {
RETURN_FALSE;
}
if (PG(safe_mode) && (!php_checkuid(local, "rb", CHECKUID_CHECK_MODE_PARAM))) {
if (PG(safe_mode) && (!php_checkuid(local, mode == FTPTYPE_ASCII ? "rt" : "rb", CHECKUID_CHECK_MODE_PARAM))) {
RETURN_FALSE;
}
instream = php_stream_fopen(local, "rb", NULL);
instream = php_stream_fopen(local, mode == FTPTYPE_ASCII ? "rt" : "rb", NULL);
if (instream == NULL) {
RETURN_FALSE;
@@ -943,11 +945,11 @@ PHP_FUNCTION(ftp_nb_put)
if (php_check_open_basedir(local TSRMLS_CC)) {
RETURN_FALSE;
}
if (PG(safe_mode) && (!php_checkuid(local, "rb", CHECKUID_CHECK_MODE_PARAM))) {
if (PG(safe_mode) && (!php_checkuid(local, mode == FTPTYPE_ASCII ? "rt" : "rb", CHECKUID_CHECK_MODE_PARAM))) {
RETURN_FALSE;
}
instream = php_stream_fopen(local, "rb", NULL);
instream = php_stream_fopen(local, mode == FTPTYPE_ASCII ? "rt" : "rb", NULL);
if (instream == NULL) {
RETURN_FALSE;
@@ -1161,7 +1163,7 @@ PHP_FUNCTION(ftp_set_option)
RETURN_TRUE;
break;
default:
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown option '%d'", option);
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown option '%ld'", option);
RETURN_FALSE;
break;
}
@@ -1190,7 +1192,7 @@ PHP_FUNCTION(ftp_get_option)
RETURN_BOOL(ftp->autoseek);
break;
default:
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown option '%d'", option);
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown option '%ld'", option);
RETURN_FALSE;
break;
}
+17 -13
View File
@@ -50,8 +50,8 @@ dnl
AC_DEFUN(PHP_GD_JPEG,[
if test "$PHP_JPEG_DIR" != "no"; then
for i in /usr /usr/local $PHP_JPEG_DIR; do
test -f $i/lib/libjpeg.$SHLIB_SUFFIX_NAME -o -f $i/lib/libjpeg.a && GD_JPEG_DIR=$i
for i in $PHP_JPEG_DIR /usr/local /usr; do
test -f $i/lib/libjpeg.$SHLIB_SUFFIX_NAME -o -f $i/lib/libjpeg.a && GD_JPEG_DIR=$i && break
done
if test -z "$GD_JPEG_DIR"; then
@@ -75,8 +75,8 @@ AC_DEFUN(PHP_GD_JPEG,[
AC_DEFUN(PHP_GD_PNG,[
if test "$PHP_PNG_DIR" != "no"; then
for i in /usr /usr/local $PHP_PNG_DIR; do
test -f $i/lib/libpng.$SHLIB_SUFFIX_NAME -o -f $i/lib/libpng.a && GD_PNG_DIR=$i
for i in $PHP_PNG_DIR /usr/local /usr; do
test -f $i/lib/libpng.$SHLIB_SUFFIX_NAME -o -f $i/lib/libpng.a && GD_PNG_DIR=$i && break
done
if test -z "$GD_PNG_DIR"; then
@@ -110,8 +110,8 @@ AC_DEFUN(PHP_GD_PNG,[
AC_DEFUN(PHP_GD_XPM,[
if test "$PHP_XPM_DIR" != "no"; then
for i in /usr /usr/local /usr/X11R6 $PHP_XPM_DIR; do
test -f $i/lib/libXpm.$SHLIB_SUFFIX_NAME -o -f $i/lib/libXpm.a && GD_XPM_DIR=$i
for i in $PHP_XPM_DIR /usr/local /usr/X11R6 /usr; do
test -f $i/lib/libXpm.$SHLIB_SUFFIX_NAME -o -f $i/lib/libXpm.a && GD_XPM_DIR=$i && break
done
if test -z "$GD_XPM_DIR"; then
@@ -144,9 +144,9 @@ AC_DEFUN(PHP_GD_XPM,[
AC_DEFUN(PHP_GD_FREETYPE1,[
if test "$PHP_TTF" != "no"; then
if test "$PHP_FREETYPE_DIR" = "no" -o "$PHP_FREETYPE_DIR" = ""; then
if test -n "$PHP_TTF" ; then
for i in /usr /usr/local $PHP_TTF; do
if test -f "$i/include/freetype.h" ; then
if test -n "$PHP_TTF"; then
for i in $PHP_TTF /usr/local /usr; do
if test -f "$i/include/freetype.h"; then
TTF_DIR=$i
unset TTF_INC_DIR
fi
@@ -158,6 +158,7 @@ AC_DEFUN(PHP_GD_FREETYPE1,[
TTF_DIR=$i
TTF_INC_DIR=$i/include/freetype1/freetype
fi
test -n "$TTF_DIR" && break
done
fi
if test -n "$TTF_DIR" ; then
@@ -177,10 +178,11 @@ AC_DEFUN(PHP_GD_FREETYPE1,[
AC_DEFUN(PHP_GD_FREETYPE2,[
if test "$PHP_FREETYPE_DIR" != "no"; then
for i in /usr /usr/local $PHP_FREETYPE_DIR; do
for i in $PHP_FREETYPE_DIR /usr/local /usr; do
if test -f "$i/include/freetype2/freetype/freetype.h"; then
FREETYPE2_DIR=$i
FREETYPE2_INC_DIR=$i/include/freetype2
break
fi
done
@@ -201,8 +203,8 @@ AC_DEFUN(PHP_GD_FREETYPE2,[
AC_DEFUN(PHP_GD_T1LIB,[
if test "$PHP_T1LIB" != "no"; then
for i in /usr /usr/local $PHP_T1LIB; do
test -f "$i/include/t1lib.h" && GD_T1_DIR=$i
for i in $PHP_T1LIB /usr/local /usr; do
test -f "$i/include/t1lib.h" && GD_T1_DIR=$i && break
done
if test -z "$GD_T1_DIR"; then
@@ -255,6 +257,7 @@ AC_DEFUN(PHP_GD_CHECK_VERSION,[
PHP_CHECK_LIBRARY(gd, gdImageColorResolve, [AC_DEFINE(HAVE_GDIMAGECOLORRESOLVE, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
PHP_CHECK_LIBRARY(gd, gdImageGifCtx, [AC_DEFINE(HAVE_GD_GIF_CTX, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
PHP_CHECK_LIBRARY(gd, gdCacheCreate, [AC_DEFINE(HAVE_GD_CACHE_CREATE, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
PHP_CHECK_LIBRARY(gd, gdFontCacheShutdown, [AC_DEFINE(HAVE_GD_THREAD_SAFE, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
])
dnl
@@ -301,7 +304,8 @@ dnl These are always available with bundled library
AC_DEFINE(HAVE_GD_PNG, 1, [ ])
AC_DEFINE(HAVE_GD_XBM, 1, [ ])
AC_DEFINE(HAVE_GD_BUNDLED, 1, [ ])
AC_DEFINE(HAVE_GD_GIF_READ, 1, [ ])
AC_DEFINE(HAVE_GD_GIF_READ, 1, [ ])
AC_DEFINE(HAVE_GD_IMAGEELLIPSE, 1, [ ])
dnl Make sure the libgd/ is first in the include path
GDLIB_CFLAGS="-DHAVE_LIBPNG"
+41 -15
View File
@@ -379,14 +379,18 @@ PHP_MINIT_FUNCTION(gd)
#if HAVE_LIBGD20 && HAVE_GD_STRINGFT
PHP_RSHUTDOWN_FUNCTION(gd)
{
#if defined(HAVE_GD_THREAD_SAFE) || defined(HAVE_GD_BUNDLED)
gdFontCacheShutdown();
#else
gdFreeFontCache();
#endif
return SUCCESS;
}
#endif
/* }}} */
#if HAVE_GD_BUNDLED
#define PHP_GD_VERSION_STRING "bundled (2.0.15 compatible)"
#define PHP_GD_VERSION_STRING "bundled (2.0.23 compatible)"
#elif HAVE_LIBGD20
#define PHP_GD_VERSION_STRING "2.0 or higher"
#elif HAVE_GDIMAGECOLORRESOLVE
@@ -644,6 +648,7 @@ PHP_FUNCTION(imageloadfont)
if (body_size != body_size_check) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error reading font");
efree(font);
php_stream_close(stream);
RETURN_FALSE;
}
@@ -963,7 +968,7 @@ PHP_FUNCTION(imagelayereffect)
PHP_FUNCTION(imagecolorallocatealpha)
{
zval *IM;
int red, green, blue, alpha;
long red, green, blue, alpha;
gdImagePtr im;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zllll", &IM, &red, &green, &blue, &alpha) == FAILURE) {
@@ -1612,10 +1617,17 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char
}
switch(image_type) {
#ifdef HAVE_GD_WBMP
case PHP_GDIMG_CONVERT_WBM:
if(q<0||q>255) {
if (q == -1) {
q = 0;
} else if (q < 0 || q > 255) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid threshold value '%d'. It must be between 0 and 255", q);
q = 0;
}
gdImageWBMP(im, q, fp);
break;
#endif
case PHP_GDIMG_TYPE_JPG:
(*func_p)(im, fp, q);
break;
@@ -1654,10 +1666,17 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char
}
switch(image_type) {
#ifdef HAVE_GD_WBMP
case PHP_GDIMG_CONVERT_WBM:
if(q<0||q>255) {
if (q == -1) {
q = 0;
} else if (q < 0 || q > 255) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid threshold value '%d'. It must be between 0 and 255", q);
q = 0;
}
gdImageWBMP(im, q, tmp);
break;
#endif
case PHP_GDIMG_TYPE_JPG:
(*func_p)(im, tmp, q);
break;
@@ -2960,7 +2979,7 @@ static void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int mode, int
char *error = NULL;
int argc;
#if HAVE_GD_STRINGFTEX
gdFTStringExtra strex;
gdFTStringExtra strex = {0};
#endif
#if !HAVE_GD_STRINGFTEX
@@ -2970,13 +2989,11 @@ static void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int mode, int
argc = ZEND_NUM_ARGS();
if (mode == TTFTEXT_BBOX) {
if ((extended && argc != 5) || (!extended && argc != 4) ||
zend_get_parameters_ex(argc, &PTSIZE, &ANGLE, &FONTNAME, &C, &EXT) == FAILURE) {
if (argc < 4 || argc > 5 || zend_get_parameters_ex(argc, &PTSIZE, &ANGLE, &FONTNAME, &C, &EXT) == FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
} else {
if ((extended && argc != 9) || (!extended && argc != 8) ||
zend_get_parameters_ex(argc, &IM, &PTSIZE, &ANGLE, &X, &Y, &COL, &FONTNAME, &C, &EXT) == FAILURE) {
if (argc < 8 || argc > 9 || zend_get_parameters_ex(argc, &IM, &PTSIZE, &ANGLE, &X, &Y, &COL, &FONTNAME, &C, &EXT) == FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, "Image", le_gd);
@@ -3005,7 +3022,6 @@ static void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int mode, int
HashPosition pos;
convert_to_array_ex(EXT);
memset(&strex, 0, sizeof(strex));
/* walk the assoc array */
zend_hash_internal_pointer_reset_ex(HASH_OF(*EXT), &pos);
@@ -3038,15 +3054,19 @@ static void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int mode, int
str = (unsigned char *) Z_STRVAL_PP(C);
l = strlen(str);
/* VCWD_REALPATH(Z_STRVAL_PP(FONTNAME), fontname); */
#ifdef VIRTUAL_DIR
if(virtual_filepath(Z_STRVAL_PP(FONTNAME), (char**)&fontname TSRMLS_CC)) {
fontname = (unsigned char*)Z_STRVAL_PP(FONTNAME);
{
char tmp_font_path[MAXPATHLEN];
if (VCWD_REALPATH(Z_STRVAL_PP(FONTNAME), tmp_font_path)) {
fontname = (unsigned char *) Z_STRVAL_PP(FONTNAME);
}
}
#else
fontname = (unsigned char*)Z_STRVAL_PP(FONTNAME);
#endif
#ifdef USE_GD_IMGSTRTTF
# if HAVE_GD_STRINGFTEX
if (extended) {
@@ -3166,7 +3186,7 @@ PHP_FUNCTION(imagepscopyfont)
of_ind = zend_list_find(Z_LVAL_PP(fnt), &type);
if (type != le_ps_font) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not a Type 1 font index", Z_LVAL_PP(fnt));
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a Type 1 font index", Z_LVAL_PP(fnt));
RETURN_FALSE;
}
@@ -3301,7 +3321,7 @@ PHP_FUNCTION(imagepstext)
{
zval *img, *fnt;
int i, j;
int _fg, _bg, x, y, size, space = 0, aa_steps = 4, width = 0;
long _fg, _bg, x, y, size, space = 0, aa_steps = 4, width = 0;
int *f_ind;
int h_lines, v_lines, c_ind;
int rd, gr, bl, fg_rd, fg_gr, fg_bl, bg_rd, bg_gr, bg_bl;
@@ -3620,6 +3640,12 @@ static void _php_image_bw_convert( gdImagePtr im_org, gdIOCtx *out, int threshol
return;
}
#if HAVE_LIBGD20
if (im_org->trueColor) {
gdImageTrueColorToPalette(im_org, 1, 256);
}
#endif
for (y = 0; y < dest_height; y++) {
for (x = 0; x < dest_width; x++) {
color_org = gdImageGetPixel (im_org, x, y);
+40 -1
View File
@@ -86,7 +86,7 @@ BSC32=bscmake.exe
LINK32=link.exe
# ADD BASE LINK32 php4ts_debug.lib libjpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /debug /machine:I386 /out:"..\..\Debug_TS/php_gd2.dll" /libpath:"..\..\Debug_TS"
# SUBTRACT BASE LINK32 /pdb:none
# ADD LINK32 php4ts_debug.lib libpng.lib zlib.lib libjpeg.lib freetype2.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /debug /machine:I386 /out:"..\..\Debug_TS/php_gd2.dll" /libpath:"..\..\Debug_TS" /libpath:"..\..\..\zlib\Debug"
# ADD LINK32 php4ts_debug.lib libpng.lib zlib.lib libjpeg.lib freetype2.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /debug /machine:I386 /nodefaultlib:"MSVCRT" /out:"..\..\Debug_TS/php_gd2.dll" /libpath:"..\..\Debug_TS" /libpath:"..\..\..\zlib\Debug"
# SUBTRACT LINK32 /pdb:none
!ENDIF
@@ -144,6 +144,7 @@ SOURCE=.\libgd\gd.c
!ELSEIF "$(CFG)" == "gd - Win32 Debug_TS GD2"
# PROP Intermediate_Dir "Debug_TS_bundled"
# ADD CPP /FR
!ENDIF
@@ -159,6 +160,7 @@ SOURCE=.\libgd\gd2copypal.c
!ELSEIF "$(CFG)" == "gd - Win32 Debug_TS GD2"
# PROP Intermediate_Dir "Debug_TS_bundled"
# ADD CPP /FR
!ENDIF
@@ -174,6 +176,7 @@ SOURCE=.\libgd\gd_arc_f_buggy.c
!ELSEIF "$(CFG)" == "gd - Win32 Debug_TS GD2"
# PROP Intermediate_Dir "Debug_TS_bundled"
# ADD CPP /FR
!ENDIF
@@ -189,6 +192,7 @@ SOURCE=.\libgd\gd_gd.c
!ELSEIF "$(CFG)" == "gd - Win32 Debug_TS GD2"
# PROP Intermediate_Dir "Debug_TS_bundled"
# ADD CPP /FR
!ENDIF
@@ -204,6 +208,7 @@ SOURCE=.\libgd\gd_gd2.c
!ELSEIF "$(CFG)" == "gd - Win32 Debug_TS GD2"
# PROP Intermediate_Dir "Debug_TS_bundled"
# ADD CPP /FR
!ENDIF
@@ -211,6 +216,18 @@ SOURCE=.\libgd\gd_gd2.c
# Begin Source File
SOURCE=.\libgd\gd_gif_in.c
!IF "$(CFG)" == "gd - Win32 Release_TS GD2"
# PROP Intermediate_Dir "Release_TS_bundled"
!ELSEIF "$(CFG)" == "gd - Win32 Debug_TS GD2"
# PROP Intermediate_Dir "Debug_TS_bundled"
# ADD CPP /FR
!ENDIF
# End Source File
# Begin Source File
@@ -223,6 +240,7 @@ SOURCE=.\libgd\gd_io.c
!ELSEIF "$(CFG)" == "gd - Win32 Debug_TS GD2"
# PROP Intermediate_Dir "Debug_TS_bundled"
# ADD CPP /FR
!ENDIF
@@ -238,6 +256,7 @@ SOURCE=.\libgd\gd_io_dp.c
!ELSEIF "$(CFG)" == "gd - Win32 Debug_TS GD2"
# PROP Intermediate_Dir "Debug_TS_bundled"
# ADD CPP /FR
!ENDIF
@@ -253,6 +272,7 @@ SOURCE=.\libgd\gd_io_file.c
!ELSEIF "$(CFG)" == "gd - Win32 Debug_TS GD2"
# PROP Intermediate_Dir "Debug_TS_bundled"
# ADD CPP /FR
!ENDIF
@@ -268,6 +288,7 @@ SOURCE=.\libgd\gd_io_ss.c
!ELSEIF "$(CFG)" == "gd - Win32 Debug_TS GD2"
# PROP Intermediate_Dir "Debug_TS_bundled"
# ADD CPP /FR
!ENDIF
@@ -283,6 +304,7 @@ SOURCE=.\libgd\gd_jpeg.c
!ELSEIF "$(CFG)" == "gd - Win32 Debug_TS GD2"
# PROP Intermediate_Dir "Debug_TS_bundled"
# ADD CPP /FR
!ENDIF
@@ -298,6 +320,7 @@ SOURCE=.\libgd\gd_png.c
!ELSEIF "$(CFG)" == "gd - Win32 Debug_TS GD2"
# PROP Intermediate_Dir "Debug_TS_bundled"
# ADD CPP /FR
!ENDIF
@@ -313,6 +336,7 @@ SOURCE=.\libgd\gd_ss.c
!ELSEIF "$(CFG)" == "gd - Win32 Debug_TS GD2"
# PROP Intermediate_Dir "Debug_TS_bundled"
# ADD CPP /FR
!ENDIF
@@ -328,6 +352,7 @@ SOURCE=.\libgd\gd_topal.c
!ELSEIF "$(CFG)" == "gd - Win32 Debug_TS GD2"
# PROP Intermediate_Dir "Debug_TS_bundled"
# ADD CPP /FR
!ENDIF
@@ -343,6 +368,7 @@ SOURCE=.\libgd\gd_wbmp.c
!ELSEIF "$(CFG)" == "gd - Win32 Debug_TS GD2"
# PROP Intermediate_Dir "Debug_TS_bundled"
# ADD CPP /FR
!ENDIF
@@ -358,6 +384,7 @@ SOURCE=.\libgd\gdcache.c
!ELSEIF "$(CFG)" == "gd - Win32 Debug_TS GD2"
# PROP Intermediate_Dir "Debug_TS_bundled"
# ADD CPP /FR
!ENDIF
@@ -373,6 +400,7 @@ SOURCE=.\libgd\gdfontg.c
!ELSEIF "$(CFG)" == "gd - Win32 Debug_TS GD2"
# PROP Intermediate_Dir "Debug_TS_bundled"
# ADD CPP /FR
!ENDIF
@@ -388,6 +416,7 @@ SOURCE=.\libgd\gdfontl.c
!ELSEIF "$(CFG)" == "gd - Win32 Debug_TS GD2"
# PROP Intermediate_Dir "Debug_TS_bundled"
# ADD CPP /FR
!ENDIF
@@ -403,6 +432,7 @@ SOURCE=.\libgd\gdfontmb.c
!ELSEIF "$(CFG)" == "gd - Win32 Debug_TS GD2"
# PROP Intermediate_Dir "Debug_TS_bundled"
# ADD CPP /FR
!ENDIF
@@ -418,6 +448,7 @@ SOURCE=.\libgd\gdfonts.c
!ELSEIF "$(CFG)" == "gd - Win32 Debug_TS GD2"
# PROP Intermediate_Dir "Debug_TS_bundled"
# ADD CPP /FR
!ENDIF
@@ -433,6 +464,7 @@ SOURCE=.\libgd\gdfontt.c
!ELSEIF "$(CFG)" == "gd - Win32 Debug_TS GD2"
# PROP Intermediate_Dir "Debug_TS_bundled"
# ADD CPP /FR
!ENDIF
@@ -448,6 +480,7 @@ SOURCE=.\libgd\gdft.c
!ELSEIF "$(CFG)" == "gd - Win32 Debug_TS GD2"
# PROP Intermediate_Dir "Debug_TS_bundled"
# ADD CPP /FR
!ENDIF
@@ -463,6 +496,7 @@ SOURCE=.\libgd\gdhelpers.c
!ELSEIF "$(CFG)" == "gd - Win32 Debug_TS GD2"
# PROP Intermediate_Dir "Debug_TS_bundled"
# ADD CPP /FR
!ENDIF
@@ -478,6 +512,7 @@ SOURCE=.\libgd\gdkanji.c
!ELSEIF "$(CFG)" == "gd - Win32 Debug_TS GD2"
# PROP Intermediate_Dir "Debug_TS_bundled"
# ADD CPP /FR
!ENDIF
@@ -493,6 +528,7 @@ SOURCE=.\libgd\gdtables.c
!ELSEIF "$(CFG)" == "gd - Win32 Debug_TS GD2"
# PROP Intermediate_Dir "Debug_TS_bundled"
# ADD CPP /FR
!ENDIF
@@ -508,6 +544,7 @@ SOURCE=.\libgd\gdxpm.c
!ELSEIF "$(CFG)" == "gd - Win32 Debug_TS GD2"
# PROP Intermediate_Dir "Debug_TS_bundled"
# ADD CPP /FR
!ENDIF
@@ -523,6 +560,7 @@ SOURCE=.\libgd\wbmp.c
!ELSEIF "$(CFG)" == "gd - Win32 Debug_TS GD2"
# PROP Intermediate_Dir "Debug_TS_bundled"
# ADD CPP /FR
!ENDIF
@@ -538,6 +576,7 @@ SOURCE=.\libgd\xbm.c
!ELSEIF "$(CFG)" == "gd - Win32 Debug_TS GD2"
# PROP Intermediate_Dir "Debug_TS_bundled"
# ADD CPP /FR
!ENDIF
+23 -1
View File
@@ -1,3 +1,20 @@
/*
+----------------------------------------------------------------------+
| PHP Version 4 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2003 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_0.txt. |
| 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: Stanislav Malyshev <stas@php.net> |
+----------------------------------------------------------------------+
*/
#include "php_gd.h"
@@ -5,8 +22,13 @@
static void _php_image_output_putc(struct gdIOCtx *ctx, int c)
{
/* without the following downcast, the write will fail
* (i.e., will write a zero byte) for all
* big endian architectures:
*/
unsigned char ch = (unsigned char) c;
TSRMLS_FETCH();
php_write(&c, 1 TSRMLS_CC);
php_write(&ch, 1 TSRMLS_CC);
}
static int _php_image_output_putbuf(struct gdIOCtx *ctx, const void* buf, int l)
+58 -35
View File
@@ -9,8 +9,8 @@
#ifdef _MSC_VER
# if _MSC_VER >= 1300
/* in MSVC.NET the these are available but only for __cplusplus and not _MSC_EXTENSIONS */
# ifdef _MSC_EXTENSIONS
/* in MSVC.NET these are available but only for __cplusplus and not _MSC_EXTENSIONS */
# if !defined(_MSC_EXTENSIONS) && defined(__cplusplus)
# define HAVE_FABSF 1
extern float fabsf(float x);
# define HAVE_FLOORF 1
@@ -94,7 +94,7 @@ static int gdFullAlphaBlend(int dst, int src);
static int gdLayerOverlay(int dst, int src);
static int gdAlphaBlendColor(int b1, int b2, int a1, int a2);
static int gdAlphaOverlayColor(int src, int dst, int max);
static int gdImageGetTrueColorPixel(gdImagePtr im, int x, int y);
int gdImageGetTrueColorPixel(gdImagePtr im, int x, int y);
void php_gd_error_ex(int type, const char *format, ...)
{
@@ -255,7 +255,7 @@ int gdImageColorClosestAlpha (gdImagePtr im, int r, int g, int b, int a)
gd = im->green[i] - g;
bd = im->blue[i] - b;
/* gd 2.02: whoops, was - b (thanks to David Marwood) */
ad = im->blue[i] - a;
ad = im->alpha[i] - a;
dist = rd * rd + gd * gd + bd * bd + ad * ad;
if (first || (dist < mindist)) {
mindist = dist;
@@ -571,7 +571,7 @@ void gdImageColorTransparent (gdImagePtr im, int color)
if (im->transparent != -1) {
im->alpha[im->transparent] = gdAlphaOpaque;
}
if (color > -1 && color<=gdMaxColors) {
if (color > -1 && color<im->colorsTotal && color<=gdMaxColors) {
im->alpha[color] = gdAlphaTransparent;
} else {
return;
@@ -751,7 +751,7 @@ void gdImageSetPixel (gdImagePtr im, int x, int y, int color)
}
}
static int gdImageGetTrueColorPixel (gdImagePtr im, int x, int y)
int gdImageGetTrueColorPixel (gdImagePtr im, int x, int y)
{
int p = gdImageGetPixel(im, x, y);
@@ -1290,7 +1290,9 @@ void gdImageAALine (gdImagePtr im, int x1, int y1, int x2, int y2, int col)
inc = (dy * 65536) / dx;
while ((x >> 16) < x2) {
gdImageSetAAPixelColor(im, x >> 16, y >> 16, col, (y >> 8) & 0xFF);
gdImageSetAAPixelColor(im, x >> 16, (y >> 16) + 1,col, (~y >> 8) & 0xFF);
if ((y >> 16) + 1 < im->sy) {
gdImageSetAAPixelColor(im, x >> 16, (y >> 16) + 1,col, (~y >> 8) & 0xFF);
}
x += (1 << 16);
y += inc;
}
@@ -1310,7 +1312,9 @@ void gdImageAALine (gdImagePtr im, int x1, int y1, int x2, int y2, int col)
inc = (dx * 65536) / dy;
while ((y>>16) < y2) {
gdImageSetAAPixelColor(im, x >> 16, y >> 16, col, (x >> 8) & 0xFF);
gdImageSetAAPixelColor(im, (x >> 16) + 1, (y >> 16),col, (~x >> 8) & 0xFF);
if ((x >> 16) + 1 < im->sx) {
gdImageSetAAPixelColor(im, (x >> 16) + 1, (y >> 16),col, (~x >> 8) & 0xFF);
}
x += inc;
y += (1<<16);
}
@@ -1603,9 +1607,14 @@ void gdImageFilledArc (gdImagePtr im, int cx, int cy, int w, int h, int s, int e
int lx = 0, ly = 0;
int fx = 0, fy = 0;
while (s<0) {
s += 360;
}
while (e < s) {
e += 360;
}
for (i = s; i <= e; i++) {
int x, y;
x = ((long) gdCosT[i % 360] * (long) w / (2 * 1024)) + cx;
@@ -1762,13 +1771,18 @@ void gdImageFillToBorder (gdImagePtr im, int x, int y, int border, int color)
int lastBorder;
/* Seek left */
int leftLimit = -1, rightLimit;
int i;
int i, restoreAlphaBleding=0;
if (border < 0) {
/* Refuse to fill to a non-solid border */
return;
}
if (im->alphaBlendingFlag) {
restoreAlphaBleding = 1;
im->alphaBlendingFlag = 0;
}
if (x >= im->sx) {
x = im->sx - 1;
}
@@ -1784,6 +1798,9 @@ void gdImageFillToBorder (gdImagePtr im, int x, int y, int border, int color)
leftLimit = i;
}
if (leftLimit == -1) {
if (restoreAlphaBleding) {
im->alphaBlendingFlag = 1;
}
return;
}
/* Seek right */
@@ -1827,6 +1844,9 @@ void gdImageFillToBorder (gdImagePtr im, int x, int y, int border, int color)
}
}
}
if (restoreAlphaBleding) {
im->alphaBlendingFlag = 1;
}
}
@@ -1860,7 +1880,7 @@ void gdImageFill(gdImagePtr im, int x, int y, int nc)
int oc; /* old pixel value */
int wx2,wy2;
/* stack of filled segments */
//struct seg stack[FILL_MAX],*sp = stack;;
/* struct seg stack[FILL_MAX],*sp = stack;; */
struct seg *stack;
struct seg *sp;
@@ -2255,20 +2275,12 @@ void gdImageCopyResized (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int
sty = (int *) safe_emalloc(sizeof(int), srcH, 0);
accum = 0;
/* Fixed by Mao Morimoto 2.0.16 */
for (i = 0; (i < srcW); i++) {
int got;
accum += (double) dstW / (double) srcW;
got = (int) floor (accum);
stx[i] = got;
accum -= got;
stx[i] = dstW * (i+1) / srcW - dstW * i / srcW ;
}
accum = 0;
for (i = 0; (i < srcH); i++) {
int got;
accum += (double) dstH / (double) srcH;
got = (int) floor (accum);
sty[i] = got;
accum -= got;
sty[i] = dstH * (i+1) / srcH - dstH * i / srcH ;
}
for (i = 0; (i < gdMaxColors); i++) {
colorMap[i] = (-1);
@@ -2289,7 +2301,8 @@ void gdImageCopyResized (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int
int tmp = gdImageGetPixel (src, x, y);
mapTo = gdImageGetTrueColorPixel (src, x, y);
if (gdImageGetTransparent (src) == tmp) {
tox++;
/* 2.0.21, TK: not tox++ */
tox += stx[x - srcX];
continue;
}
} else {
@@ -2297,7 +2310,8 @@ void gdImageCopyResized (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int
mapTo = gdImageGetTrueColorPixel (src, x, y);
/* Added 7/24/95: support transparent copies */
if (gdImageGetTransparent (src) == mapTo) {
tox++;
/* 2.0.21, TK: not tox++ */
tox += stx[x - srcX];
continue;
}
}
@@ -2353,22 +2367,24 @@ void gdImageCopyResized (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int
void gdImageCopyResampled (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX, int srcY, int dstW, int dstH, int srcW, int srcH)
{
int x, y;
double sy1, sy2, sx1, sx2;
if (!dst->trueColor) {
gdImageCopyResized (dst, src, dstX, dstY, srcX, srcY, dstW, dstH, srcW, srcH);
return;
}
for (y = dstY; (y < dstY + dstH); y++) {
sy1 = ((double) y - (double) dstY) * (double) srcH / (double) dstH;
sy2 = ((double) (y + 1) - (double) dstY) * (double) srcH / (double) dstH;
for (x = dstX; (x < dstX + dstW); x++) {
float sy1, sy2, sx1, sx2;
float sx, sy;
float spixels = 0.0f;
float red = 0.0f, green = 0.0f, blue = 0.0f, alpha = 0.0f;
float alpha_factor, alpha_sum = 0.0f, contrib_sum = 0.0f;
sy1 = ((float)(y - dstY)) * (float)srcH / (float)dstH;
sy2 = ((float)(y + 1 - dstY)) * (float) srcH / (float) dstH;
double sx, sy;
double spixels = 0;
double red = 0.0, green = 0.0, blue = 0.0, alpha = 0.0;
double alpha_factor, alpha_sum = 0.0, contrib_sum = 0.0;
sx1 = ((double) x - (double) dstX) * (double) srcW / dstW;
sx2 = ((double) (x + 1) - (double) dstX) * (double) srcW / dstW;
sy = sy1;
do {
float yportion;
double yportion;
if (floor_cast(sy) == floor_cast(sy1)) {
yportion = 1.0f - (sy - floor_cast(sy));
if (yportion > sy2 - sy1) {
@@ -2380,12 +2396,10 @@ void gdImageCopyResampled (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, i
} else {
yportion = 1.0f;
}
sx1 = ((float)(x - dstX)) * (float) srcW / dstW;
sx2 = ((float)(x + 1 - dstX)) * (float) srcW / dstW;
sx = sx1;
do {
float xportion;
float pcontribution;
double xportion;
double pcontribution;
int p;
if (floorf(sx) == floor_cast(sx1)) {
xportion = 1.0f - (sx - floor_cast(sx));
@@ -3027,6 +3041,15 @@ void gdImageFilledPolygon (gdImagePtr im, gdPointPtr p, int n, int c)
maxy = p[i].y;
}
}
/* 2.0.16: Optimization by Ilia Chipitsine -- don't waste time offscreen */
if (miny < 0) {
miny = 0;
}
if (maxy >= gdImageSY(im)) {
maxy = gdImageSY(im) - 1;
}
/* Fix in 1.3: count a vertex only once */
for (y = miny; y <= maxy; y++) {
/*1.4 int interLast = 0; */
+15 -3
View File
@@ -11,7 +11,7 @@ extern "C" {
#define PATHSEPARATOR ":"
#else
/* default fontpath for windows systems */
#define DEFAULT_FONTPATH "c:\\winnt\\fonts;."
#define DEFAULT_FONTPATH "c:\\winnt\\fonts;c:\\windows\\fonts;."
#define PATHSEPARATOR ";"
#endif
@@ -294,8 +294,16 @@ void gdImageStringUp(gdImagePtr im, gdFontPtr f, int x, int y, unsigned char *s,
void gdImageString16(gdImagePtr im, gdFontPtr f, int x, int y, unsigned short *s, int color);
void gdImageStringUp16(gdImagePtr im, gdFontPtr f, int x, int y, unsigned short *s, int color);
/* clean up after using fonts in gdImageStringFT() */
void gdFreeFontCache();
/* 2.0.16: for thread-safe use of gdImageStringFT and friends,
* call this before allowing any thread to call gdImageStringFT.
* Otherwise it is invoked by the first thread to invoke
* gdImageStringFT, with a very small but real risk of a race condition.
* Return 0 on success, nonzero on failure to initialize freetype.
*/
int gdFontCacheSetup(void);
/* Optional: clean up after application is done using fonts in gdImageStringFT(). */
void gdFontCacheShutdown(void);
/* Calls gdImageStringFT. Provided for backwards compatibility only. */
char *gdImageStringTTF(gdImage *im, int *brect, int fg, char *fontlist,
@@ -312,11 +320,14 @@ typedef struct {
gdFTEX_Shift_JIS, or gdFTEX_Big5;
when not specified, maps are searched
for in the above order. */
int hdpi;
int vdpi;
}
gdFTStringExtra, *gdFTStringExtraPtr;
#define gdFTEX_LINESPACE 1
#define gdFTEX_CHARMAP 2
#define gdFTEX_RESOLUTION 4
/* These are NOT flags; set one in 'charmap' if you set the gdFTEX_CHARMAP bit in 'flags'. */
#define gdFTEX_Unicode 0
@@ -570,6 +581,7 @@ void gdImageSaveAlpha(gdImagePtr im, int saveAlphaArg);
gdIOCtx* gdNewFileCtx(FILE*);
gdIOCtx* gdNewDynamicCtx(int, void*);
gdIOCtx *gdNewDynamicCtxEx(int size, void *data, int freeFlag);
gdIOCtx* gdNewSSCtx(gdSourcePtr in, gdSinkPtr out);
void* gdDPExtractData(struct gdIOCtx* ctx, int *size);
+10
View File
@@ -147,6 +147,16 @@ gdImagePtr gdImageCreateFromGd (FILE * inFile)
return im;
}
gdImagePtr gdImageCreateFromGdPtr (int size, void *data)
{
gdImagePtr im;
gdIOCtx *in = gdNewDynamicCtxEx(size, data, 0);
im = gdImageCreateFromGdCtx(in);
in->gd_free(in);
return im;
}
gdImagePtr gdImageCreateFromGdCtx (gdIOCtxPtr in)
{
int sx, sy;
+21 -1
View File
@@ -237,6 +237,16 @@ gdImagePtr gdImageCreateFromGd2 (FILE * inFile)
return im;
}
gdImagePtr gdImageCreateFromGd2Ptr (int size, void *data)
{
gdImagePtr im;
gdIOCtx *in = gdNewDynamicCtxEx(size, data, 0);
im = gdImageCreateFromGd2Ctx(in);
in->gd_free(in);
return im;
}
gdImagePtr gdImageCreateFromGd2Ctx (gdIOCtxPtr in)
{
int sx, sy;
@@ -378,6 +388,16 @@ fail2:
return 0;
}
gdImagePtr gdImageCreateFromGd2PartPtr (int size, void *data, int srcx, int srcy, int w, int h)
{
gdImagePtr im;
gdIOCtx *in = gdNewDynamicCtxEx(size, data, 0);
im = gdImageCreateFromGd2PartCtx(in, srcx, srcy, w, h);
in->gd_free(in);
return im;
}
gdImagePtr gdImageCreateFromGd2Part (FILE * inFile, int srcx, int srcy, int w, int h)
{
gdImagePtr im;
@@ -540,7 +560,7 @@ gdImagePtr gdImageCreateFromGd2PartCtx (gdIOCtx * in, int srcx, int srcy, int w,
}
} else {
ch = gdGetC(in);
if (ch == EOF) {
if ((int)ch == EOF) {
ch = 0;
}
}
+1 -1
View File
@@ -3,7 +3,7 @@
/*
* io.c
*
* Implements the imple I/O 'helper' routines.
* Implements the simple I/O 'helper' routines.
*
* Not really essential, but these routines were used extensively in GD,
* so they were moved here. They also make IOCtx calls look better...
+24 -6
View File
@@ -33,6 +33,7 @@ typedef struct dpStruct
int realSize;
int dataGood;
int pos;
int freeOK;
}
dynamicPtr;
@@ -52,7 +53,7 @@ static int appendDynamic (dynamicPtr * dp, const void *src, int size);
static int gdReallocDynamic (dynamicPtr * dp, int required);
static int trimDynamic (dynamicPtr * dp);
static void gdFreeDynamicCtx (struct gdIOCtx *ctx);
static dynamicPtr *newDynamic (int initialSize, void *data);
static dynamicPtr *newDynamic (int initialSize, void *data, int freeOKFlag);
static int dynamicPutbuf (struct gdIOCtx *, const void *, int);
static void dynamicPutchar (struct gdIOCtx *, int a);
@@ -66,6 +67,11 @@ static long dynamicTell (struct gdIOCtx *);
/* return data as a dynamic pointer */
gdIOCtx *
gdNewDynamicCtx (int initialSize, void *data)
{
return gdNewDynamicCtxEx(initialSize, data, 1);
}
gdIOCtx * gdNewDynamicCtxEx (int initialSize, void *data, int freeOKFlag)
{
dpIOCtx *ctx;
dynamicPtr *dp;
@@ -76,7 +82,7 @@ gdNewDynamicCtx (int initialSize, void *data)
return NULL;
}
dp = newDynamic (initialSize, data);
dp = newDynamic (initialSize, data, freeOKFlag);
if (!dp)
{
gdFree (ctx);
@@ -120,7 +126,7 @@ gdDPExtractData (struct gdIOCtx *ctx, int *size)
{
*size = 0;
data = NULL;
if (dp->data != NULL)
if (dp->data != NULL && dp->freeOK)
{
gdFree (dp->data);
}
@@ -177,6 +183,10 @@ dynamicSeek (struct gdIOCtx *ctx, const int pos)
bytesNeeded = pos;
if (bytesNeeded > dp->realSize)
{
/* 2.0.21 */
if (!dp->freeOK) {
return FALSE;
}
if (!gdReallocDynamic (dp, dp->realSize * 2))
{
dp->dataGood = FALSE;
@@ -199,8 +209,7 @@ dynamicSeek (struct gdIOCtx *ctx, const int pos)
}
/* return data as a dynamic pointer */
static dynamicPtr *
newDynamic (int initialSize, void *data)
static dynamicPtr * newDynamic (int initialSize, void *data, int freeOKFlag)
{
dynamicPtr *dp;
dp = (dynamicPtr *) gdMalloc (sizeof (dynamicPtr));
@@ -213,6 +222,7 @@ newDynamic (int initialSize, void *data)
return NULL;
dp->pos = 0;
dp->freeOK = freeOKFlag;
return dp;
}
@@ -348,6 +358,10 @@ appendDynamic (dynamicPtr * dp, const void *src, int size)
if (bytesNeeded > dp->realSize)
{
/* 2.0.21 */
if (!dp->freeOK) {
return FALSE;
}
if (!gdReallocDynamic (dp, bytesNeeded * 2))
{
dp->dataGood = FALSE;
@@ -407,5 +421,9 @@ gdReallocDynamic (dynamicPtr * dp, int required)
static int
trimDynamic (dynamicPtr * dp)
{
return gdReallocDynamic (dp, dp->logicalSize);
/* 2.0.21: we don't reallocate memory we don't own */
if (!dp->freeOK) {
return FALSE;
}
return gdReallocDynamic (dp, dp->logicalSize);
}
-2
View File
@@ -35,8 +35,6 @@ typedef struct fileIOCtx
}
fileIOCtx;
struct fileIOCtx *fileIOCtxPtr;
gdIOCtx *newFileCtx (FILE * f);
static int fileGetbuf (gdIOCtx *, void *, int);
+92 -17
View File
@@ -221,8 +221,20 @@ gdImagePtr gdImageCreateFromJpeg (FILE * inFile)
return im;
}
gdImagePtr gdImageCreateFromJpegPtr (int size, void *data)
{
gdImagePtr im;
gdIOCtx *in = gdNewDynamicCtxEx(size, data, 0);
im = gdImageCreateFromJpegCtx(in);
in->gd_free(in);
return im;
}
void jpeg_gdIOCtx_src (j_decompress_ptr cinfo, gdIOCtx * infile);
static int CMYKToRGB(int c, int m, int y, int k, int inverted);
/*
* Create a gd-format image from the JPEG-format INFILE. Returns the
* image, or NULL upon error.
@@ -239,6 +251,8 @@ gdImagePtr gdImageCreateFromJpegCtx (gdIOCtx * infile)
unsigned int i, j;
int retval;
JDIMENSION nrows;
int channels = 3;
int inverted = 0;
memset (&cinfo, 0, sizeof (cinfo));
memset (&jerr, 0, sizeof (jerr));
@@ -262,6 +276,9 @@ gdImagePtr gdImageCreateFromJpegCtx (gdIOCtx * infile)
jpeg_gdIOCtx_src (&cinfo, infile);
/* 2.0.22: save the APP14 marker to check for Adobe Photoshop CMYK files with inverted components. */
jpeg_save_markers(&cinfo, JPEG_APP0 + 14, 256);
retval = jpeg_read_header (&cinfo, TRUE);
if (retval != JPEG_HEADER_OK) {
php_gd_error_ex(E_WARNING, "gd-jpeg: warning: jpeg_read_header returned %d, expected %d", retval, JPEG_HEADER_OK);
@@ -281,8 +298,14 @@ gdImagePtr gdImageCreateFromJpegCtx (gdIOCtx * infile)
goto error;
}
/* Force the image into RGB colorspace, but don't reduce the number of colors anymore (GD 2.0) */
cinfo.out_color_space = JCS_RGB;
/* 2.0.22: very basic support for reading CMYK colorspace files. Nice for
* thumbnails but there's no support for fussy adjustment of the
* assumed properties of inks and paper. */
if ((cinfo.jpeg_color_space == JCS_CMYK) || (cinfo.jpeg_color_space == JCS_YCCK)) {
cinfo.out_color_space = JCS_CMYK;
} else {
cinfo.out_color_space = JCS_RGB;
}
if (jpeg_start_decompress (&cinfo) != TRUE) {
php_gd_error("gd-jpeg: warning: jpeg_start_decompress reports suspended data source");
@@ -301,8 +324,29 @@ gdImagePtr gdImageCreateFromJpegCtx (gdIOCtx * infile)
gdImageInterlace (im, cinfo.progressive_mode != 0);
#endif
if (cinfo.output_components != 3) {
php_gd_error_ex(E_WARNING, "gd-jpeg: error: JPEG color quantization request resulted in output_components == %d (expected 3)", cinfo.output_components);
if (cinfo.out_color_space == JCS_RGB) {
if (cinfo.output_components != 3) {
php_gd_error_ex(E_WARNING, "gd-jpeg: error: JPEG color quantization request resulted in output_components == %d (expected 3 for RGB)", cinfo.output_components);
goto error;
}
channels = 3;
} else if (cinfo.out_color_space == JCS_CMYK) {
jpeg_saved_marker_ptr marker;
if (cinfo.output_components != 4) {
php_gd_error_ex(E_WARNING, "gd-jpeg: error: JPEG color quantization request resulted in output_components == %d (expected 4 for CMYK)", cinfo.output_components);
goto error;
}
channels = 4;
marker = cinfo.marker_list;
while (marker) {
if ((marker->marker == (JPEG_APP0 + 14)) && (marker->data_length >= 12) && (!strncmp((const char *) marker->data, "Adobe", 5))) {
inverted = 1;
break;
}
marker = marker->next;
}
} else {
php_gd_error_ex(E_WARNING, "gd-jpeg: error: unexpected colorspace.");
goto error;
}
@@ -311,27 +355,47 @@ gdImagePtr gdImageCreateFromJpegCtx (gdIOCtx * infile)
goto error;
#endif /* BITS_IN_JSAMPLE == 12 */
row = safe_emalloc(cinfo.output_width * 3, sizeof(JSAMPLE), 0);
memset(row, 0, cinfo.output_width * 3 * sizeof(JSAMPLE));
row = safe_emalloc(cinfo.output_width * channels, sizeof(JSAMPLE), 0);
memset(row, 0, cinfo.output_width * channels * sizeof(JSAMPLE));
rowptr[0] = row;
for (i = 0; i < cinfo.output_height; i++) {
register JSAMPROW currow = row;
register int *tpix = im->tpixels[i];
nrows = jpeg_read_scanlines (&cinfo, rowptr, 1);
if (nrows != 1) {
php_gd_error_ex(E_WARNING, "gd-jpeg: error: jpeg_read_scanlines returns %u, expected 1", nrows);
goto error;
if (cinfo.out_color_space == JCS_CMYK) {
for (i = 0; i < cinfo.output_height; i++) {
register JSAMPROW currow = row;
register int *tpix = im->tpixels[i];
nrows = jpeg_read_scanlines (&cinfo, rowptr, 1);
if (nrows != 1) {
php_gd_error_ex(E_WARNING, "gd-jpeg: error: jpeg_read_scanlines returns %u, expected 1", nrows);
goto error;
}
for (j = 0; j < cinfo.output_width; j++, currow += 4, tpix++) {
*tpix = CMYKToRGB (currow[0], currow[1], currow[2], currow[3], inverted);
}
}
for (j = 0; j < cinfo.output_width; j++, currow += 3, tpix++) {
*tpix = gdTrueColor (currow[0], currow[1], currow[2]);
} else {
for (i = 0; i < cinfo.output_height; i++) {
register JSAMPROW currow = row;
register int *tpix = im->tpixels[i];
nrows = jpeg_read_scanlines (&cinfo, rowptr, 1);
if (nrows != 1) {
php_gd_error_ex(E_WARNING, "gd-jpeg: error: jpeg_read_scanlines returns %u, expected 1", nrows);
goto error;
}
for (j = 0; j < cinfo.output_width; j++, currow += 3, tpix++) {
*tpix = gdTrueColor (currow[0], currow[1], currow[2]);
}
}
}
}
if (jpeg_finish_decompress (&cinfo) != TRUE) {
php_gd_error("gd-jpeg: warning: jpeg_finish_decompress reports suspended data source");
}
/* Thanks to Truxton Fulton */
if (cinfo.err->num_warnings > 0) {
goto error;
}
jpeg_destroy_decompress (&cinfo);
gdFree (row);
@@ -348,8 +412,19 @@ error:
return 0;
}
/*
/* A very basic conversion approach, TBB */
static int CMYKToRGB(int c, int m, int y, int k, int inverted)
{
if (inverted) {
c = 255 - c;
m = 255 - m;
y = 255 - y;
k = 255 - k;
}
return gdTrueColor((255 - c) * (255 - k) / 255, (255 - m) * (255 - k) / 255, (255 - y) * (255 - k) / 255);
}
/*
* gdIOCtx JPEG data sources and sinks, T. Boutell
* almost a simple global replace from T. Lane's stdio versions.
*
+28 -9
View File
@@ -93,6 +93,14 @@ gdImagePtr gdImageCreateFromPng (FILE * inFile)
return im;
}
gdImagePtr gdImageCreateFromPngPtr (int size, void *data)
{
gdImagePtr im;
gdIOCtx *in = gdNewDynamicCtxEx(size, data, 0);
im = gdImageCreateFromPngCtx(in);
in->gd_free(in);
return im;
}
/* This routine is based in part on the Chapter 13 demo code in "PNG: The
* Definitive Guide" (http://www.cdrom.com/pub/png/pngbook.html).
@@ -622,28 +630,39 @@ void gdImagePngCtxEx (gdImagePtr im, gdIOCtx * outfile, int level)
*/
if (im->trueColor) {
/* performance optimizations by Phong Tran */
int channels = im->saveAlphaFlag ? 4 : 3;
/* Our little 7-bit alpha channel trick costs us a bit here. */
png_bytep *row_pointers;
unsigned char* pOutputRow;
int **ptpixels = im->tpixels;
int *pThisRow;
unsigned char a;
int thisPixel;
png_bytep *prow_pointers;
int saveAlphaFlag = im->saveAlphaFlag;
row_pointers = safe_emalloc(sizeof(png_bytep), height, 0);
prow_pointers = row_pointers;
for (j = 0; j < height; ++j) {
int bo = 0;
row_pointers[j] = (png_bytep) safe_emalloc(width, channels, 0);
*prow_pointers = (png_bytep) safe_emalloc(width, channels, 0);
pOutputRow = *prow_pointers++;
pThisRow = *ptpixels++;
for (i = 0; i < width; ++i) {
unsigned char a;
row_pointers[j][bo++] = gdTrueColorGetRed(im->tpixels[j][i]);
row_pointers[j][bo++] = gdTrueColorGetGreen(im->tpixels[j][i]);
row_pointers[j][bo++] = gdTrueColorGetBlue(im->tpixels[j][i]);
if (im->saveAlphaFlag) {
thisPixel = *pThisRow++;
*pOutputRow++ = gdTrueColorGetRed(thisPixel);
*pOutputRow++ = gdTrueColorGetGreen(thisPixel);
*pOutputRow++ = gdTrueColorGetBlue(thisPixel);
if (saveAlphaFlag) {
/* convert the 7-bit alpha channel to an 8-bit alpha channel.
* We do a little bit-flipping magic, repeating the MSB
* as the LSB, to ensure that 0 maps to 0 and
* 127 maps to 255. We also have to invert to match
* PNG's convention in which 255 is opaque.
*/
a = gdTrueColorGetAlpha(im->tpixels[j][i]);
a = gdTrueColorGetAlpha(thisPixel);
/* Andrew Hull: >> 6, not >> 7! (gd 2.0.5) */
row_pointers[j][bo++] = 255 - ((a << 1) + (a >> 6));
*pOutputRow++ = 255 - ((a << 1) + (a >> 6));
}
}
}
+12 -5
View File
@@ -703,7 +703,7 @@ LOCAL (void)
histptr histp;
int c0, c1, c2;
int c0min, c0max, c1min, c1max, c2min, c2max;
long count;
long count = 0;
long total = 0;
long c0total = 0;
long c1total = 0;
@@ -735,9 +735,16 @@ LOCAL (void)
cinfo->colormap[1][icolor] = (JSAMPLE) ((c1total + (total >> 1)) / total);
cinfo->colormap[2][icolor] = (JSAMPLE) ((c2total + (total >> 1)) / total);
#else
im->red[icolor] = (int) ((c0total + (total >> 1)) / total);
im->green[icolor] = (int) ((c1total + (total >> 1)) / total);
im->blue[icolor] = (int) ((c2total + (total >> 1)) / total);
/* 2.0.16: Paul den Dulk found an occasion where total can be 0 */
if (count) {
im->red[icolor] = (int) ((c0total + (total >> 1)) / total);
im->green[icolor] = (int) ((c1total + (total >> 1)) / total);
im->blue[icolor] = (int) ((c2total + (total >> 1)) / total);
} else {
im->red[icolor] = 255;
im->green[icolor] = 255;
im->blue[icolor] = 255;
}
#endif
}
@@ -1253,7 +1260,7 @@ pass2_no_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf, JSAMPARRAY output
* will later be added at the end of the palette as the transparent
* index.
*/
if ((im->transparent >= 0) && (im->transparent == *inptr)) {
if ((im->transparent >= 0) && (im->transparent == *(inptr - 1))) {
*outptr++ = im->colorsTotal;
continue;
}
+9
View File
@@ -192,6 +192,15 @@ gdImageCreateFromWBMP (FILE * inFile)
return (im);
}
gdImagePtr gdImageCreateFromWBMPPtr (int size, void *data)
{
gdImagePtr im;
gdIOCtx *in = gdNewDynamicCtxEx(size, data, 0);
im = gdImageCreateFromWBMPCtx(in);
in->gd_free(in);
return im;
}
/* gdImageWBMP
** -----------
*/
+5
View File
@@ -4381,4 +4381,9 @@ gdFont gdFontGiantRep =
gdFontPtr gdFontGiant = &gdFontGiantRep;
gdFontPtr gdFontGetGiant(void)
{
return gdFontGiant;
}
/* This file has not been truncated. */
+1
View File
@@ -20,6 +20,7 @@ extern "C" {
#include "gd.h"
extern gdFontPtr gdFontGiant;
extern gdFontPtr gdFontGetGiant(void);
#ifdef __cplusplus
}
+5
View File
@@ -4638,4 +4638,9 @@ gdFont gdFontLargeRep =
gdFontPtr gdFontLarge = &gdFontLargeRep;
gdFontPtr gdFontGetLarge(void)
{
return gdFontLarge;
}
/* This file has not been truncated. */
+1
View File
@@ -21,6 +21,7 @@ extern "C" {
#include "gd.h"
extern gdFontPtr gdFontLarge;
extern gdFontPtr gdFontGetLarge(void);
#ifdef __cplusplus
}
+5
View File
@@ -3868,4 +3868,9 @@ gdFont gdFontMediumBoldRep =
gdFontPtr gdFontMediumBold = &gdFontMediumBoldRep;
gdFontPtr gdFontGetMediumBold(void)
{
return gdFontMediumBold;
}
/* This file has not been truncated. */
+1
View File
@@ -19,6 +19,7 @@ extern "C" {
#include "gd.h"
extern gdFontPtr gdFontMediumBold;
extern gdFontPtr gdFontGetMediumBold(void);
#ifdef __cplusplus
}
+5
View File
@@ -3868,4 +3868,9 @@ gdFont gdFontSmallRep =
gdFontPtr gdFontSmall = &gdFontSmallRep;
gdFontPtr gdFontGetSmall(void)
{
return gdFontSmall;
}
/* This file has not been truncated. */
Loaded 100 of 806 files, more files were not shown because too many files have changed in this diff. Show more