Compare commits

...
Author SHA1 Message Date
SVN Migration e7ee48ede1 This commit was manufactured by cvs2svn to create tag 'php_4_3_4RC2'. 2003-10-20 16:08:18 +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 <)
# 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 (& -> & 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
311 changed files with 6174 additions and 3403 deletions

No files matched your search

+2 -2
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
-------------------------------------------------------------------------------
@@ -340,7 +340,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
-------------------------------------------------------------------------------
+202 -60
View File
@@ -1,14 +1,138 @@
PHP 4 NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
30 Jul 2003, Version 4.3.3RC2
?? Oct 2003, Version 4.3.4RC2
- Fixed multibyte regex engine to properly handle ".*" pattern under
POSIX compatible mode. (K.Kosako <kosako at sofnec.co.jp>, Moriyoshi)
- Fixed bug #25923 (mail() modifies the to & subject arguments). (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 #25669 (eregi() with non-ascii characters). (Moriyoshi)
- Fixed bug #25558 (ext/dbase: reverted fix for bug #23463). (Vlad)
- Fixed bug #18534 (ifx_close() leaves open session). (nobbie@php.net)
29 Sep 2003, Version 4.3.4RC1
- Made MCVE extension available on win32. (Jani)
- 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 bug #25671 (str_replace() corrupts subarrays). (Sara)
- 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 #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 #23488 (zlib.output_compression overrides Vary header). (Stefan)
- 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 #23326 (ext/domxml: Attributes via append_child not supported).
(Melvyn)
- Fixed bug #21220 (Wrong Apache version shown in phpinfo() output). (Jani)
- 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 +143,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 +180,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 +199,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 +231,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)
+1
View File
@@ -181,6 +181,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);
+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
+113 -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,7 +1153,7 @@ 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.
@@ -1221,8 +1165,8 @@ AC_DEFUN([PHP_SHARED_MODULE],[
\$(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 +1193,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 +1211,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 +1241,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 +1540,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 +1583,108 @@ 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_ADD_LIBPATH($OPENSSL_LIBDIR, $1)
PHP_CHECK_LIBRARY(crypto, CRYPTO_free, [
PHP_ADD_LIBRARY(crypto,,$1)
],[
AC_MSG_ERROR([libcrypto not found!])
],[
-L$OPENSSL_LIBDIR
])
PHP_CHECK_LIBRARY(ssl, SSL_CTX_set_ssl_version, [
PHP_ADD_LIBRARY(ssl,,$1)
found_openssl=yes
],[
AC_MSG_ERROR([libssl not found!])
],[
-L$OPENSSL_LIBDIR
])
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
+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"
+92 -62
View File
@@ -40,8 +40,8 @@ AC_CONFIG_HEADER(main/php_config.h)
MAJOR_VERSION=4
MINOR_VERSION=3
RELEASE_VERSION=3
EXTRA_VERSION="RC3-dev"
RELEASE_VERSION=4
EXTRA_VERSION="RC2"
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
@@ -316,17 +317,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 +368,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
@@ -613,27 +615,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 +712,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 +761,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 +789,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 +799,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."
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."
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."
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."
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,12 +886,14 @@ 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
@@ -967,6 +993,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])
@@ -1022,6 +1049,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 +1072,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 +1106,7 @@ dnl
dnl Libtool creation
dnl
PHP_HELP_SEPARATOR([Libtool:])
PHP_CONFIGURE_PART(Configuring libtool)
LDFLAGS="$LDFLAGS $PHP_AIX_LDFLAGS"
+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);
+11 -5
View File
@@ -23,11 +23,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)];
+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)
+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
+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
-1
View File
@@ -349,7 +349,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]);
+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;
}
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -674,7 +674,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;
}
+1 -1
View File
@@ -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);
+2 -2
View File
@@ -161,7 +161,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 +240,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;
}
+255 -217
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;
@@ -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}
};
@@ -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.
@@ -1949,6 +1923,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 +1931,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 +1992,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 +2021,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 +2416,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 +2455,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);
@@ -3053,11 +3078,11 @@ PHP_FUNCTION(domxml_doc_get_elements_by_tagname)
DOMXML_GET_OBJ(contextnodep, contextnode, le_domxmlnodep);
}
ctxp->node = contextnodep;
str = (char*) emalloc((name_len+3) * sizeof(char)) ;
str = (char*) emalloc((name_len+23) * sizeof(char)) ;
if (str == NULL) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot allocate memory for string");
}
sprintf(str ,"//%s",name);
sprintf(str ,"//*[local-name() = '%s']", name);
xpathobjp = xmlXPathEval(str, ctxp);
efree(str);
@@ -3933,6 +3958,89 @@ 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 = 1, 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;
if (data != NULL) {
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;
}
xmlFreeParserCtxt(ctxt);
return(ret);
}
/* {{{ proto object xmldoc(string xmldoc[, int mode[, array error]])
Creates DOM object of XML document */
PHP_FUNCTION(xmldoc)
@@ -3943,76 +4051,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 +4085,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 +4297,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 +4310,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 +4322,6 @@ PHP_FUNCTION(domxml_doc_validate)
} else {
RETVAL_FALSE;
}
xmlDoValidityCheckingDefaultValue = oldvalue;
}
/* }}} */
@@ -4426,7 +4433,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 +4723,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 +4828,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;
}
@@ -4936,6 +4942,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 +5000,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 +5191,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 +5259,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);
@@ -5351,7 +5381,7 @@ PHP_FUNCTION(domxml_xslt_process)
xmlDocPtr xmldocp;
xmlDocPtr docp;
char **params = NULL;
int ret;
int ret, clone = 0;
char *filename;
int filename_len = 0;
@@ -5363,7 +5393,7 @@ 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;
}
@@ -5373,6 +5403,10 @@ PHP_FUNCTION(domxml_xslt_process)
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");
@@ -5382,6 +5416,10 @@ PHP_FUNCTION(domxml_xslt_process)
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 */
+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"/>
+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));
}
+8 -6
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
@@ -3791,15 +3791,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
+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
@@ -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
+1 -1
View File
@@ -2278,7 +2278,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
#ifdef FB_TinyInteger
case FB_TinyInteger:
{
short int v = *((short int*)data);
short int v = *((FBTinyInteger*)data);
char b[128];
sprintf(b, "%d", v);
phpfbestrdup(b, length, value);
+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
+1 -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);
}
-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;
}
+17 -18
View File
@@ -421,9 +421,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 +443,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;
@@ -715,8 +717,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 +725,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 +798,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;
}
/* }}} */
@@ -1498,7 +1498,7 @@ 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;
@@ -1537,8 +1537,7 @@ ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path TSRMLS_DC)
return ret;
bail:
if (data)
data_close(ftp, data);
ftp->data = data_close(ftp, data);
fclose(tmpfp);
if (ret)
efree(ret);
@@ -1594,7 +1593,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 +1646,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 +1656,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 +1708,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 +1763,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;
}
+20 -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) {
@@ -674,15 +674,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 +694,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) {
@@ -881,11 +881,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 +943,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 +1161,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 +1190,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;
}
+16 -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
@@ -301,7 +303,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"
+1 -1
View File
@@ -3166,7 +3166,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;
}
+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
+2 -2
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
+2 -4
View File
@@ -6,10 +6,8 @@ PHP_ARG_WITH(gettext,for GNU gettext support,
[ --with-gettext[=DIR] Include GNU gettext support.])
if test "$PHP_GETTEXT" != "no"; then
for i in /usr /usr/local $PHP_GETTEXT; do
if test -r $i/include/libintl.h; then
GETTEXT_DIR=$i
fi
for i in $PHP_GETTEXT /usr/local /usr; do
test -r $i/include/libintl.h && GETTEXT_DIR=$i && break
done
if test -z "$GETTEXT_DIR"; then
+26 -27
View File
@@ -18,56 +18,55 @@
/* $Id$ */
#include <stdio.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "php.h"
#include "php_gettext.h"
#if HAVE_LIBINTL
#include <stdio.h>
#include <libintl.h>
#include "ext/standard/info.h"
#include "php_gettext.h"
/* {{{ php_gettext_functions[]
*/
function_entry php_gettext_functions[] = {
PHP_FE(textdomain, NULL)
PHP_FE(gettext, NULL)
PHP_FALIAS(_, gettext, NULL)
PHP_FE(dgettext, NULL)
PHP_FE(dcgettext, NULL)
PHP_FE(bindtextdomain, NULL)
PHP_NAMED_FE(textdomain, zif_textdomain, NULL)
PHP_NAMED_FE(gettext, zif_gettext, NULL)
/* Alias for gettext() */
PHP_NAMED_FE(_, zif_gettext, NULL)
PHP_NAMED_FE(dgettext, zif_dgettext, NULL)
PHP_NAMED_FE(dcgettext, zif_dcgettext, NULL)
PHP_NAMED_FE(bindtextdomain, zif_bindtextdomain, NULL)
#if HAVE_NGETTEXT
PHP_FE(ngettext, NULL)
PHP_NAMED_FE(ngettext, zif_ngettext, NULL)
#endif
#if HAVE_DNGETTEXT
PHP_FE(dngettext, NULL)
PHP_NAMED_FE(dngettext, zif_dngettext, NULL)
#endif
#if HAVE_DCNGETTEXT
PHP_FE(dcngettext, NULL)
PHP_NAMED_FE(dcngettext, zif_dcngettext, NULL)
#endif
#if HAVE_BIND_TEXTDOMAIN_CODESET
PHP_FE(bind_textdomain_codeset, NULL)
PHP_NAMED_FE(bind_textdomain_codeset, zif_bind_textdomain_codeset, NULL)
#endif
{NULL, NULL, NULL}
};
/* }}} */
zend_module_entry php_gettext_module_entry = {
STANDARD_MODULE_HEADER,
STANDARD_MODULE_HEADER,
"gettext",
php_gettext_functions,
NULL,
NULL,
NULL,
NULL,
PHP_MINFO(gettext),
NO_VERSION_YET,
PHP_MINFO(php_gettext),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
@@ -75,7 +74,7 @@ zend_module_entry php_gettext_module_entry = {
ZEND_GET_MODULE(php_gettext)
#endif
PHP_MINFO_FUNCTION(gettext)
PHP_MINFO_FUNCTION(php_gettext)
{
php_info_print_table_start();
php_info_print_table_row(2, "GetText Support", "enabled");
@@ -84,7 +83,7 @@ PHP_MINFO_FUNCTION(gettext)
/* {{{ proto string textdomain(string domain)
Set the textdomain to "domain". Returns the current domain */
PHP_FUNCTION(textdomain)
PHP_NAMED_FUNCTION(zif_textdomain)
{
zval **domain;
char *domain_name, *retval;
@@ -110,7 +109,7 @@ PHP_FUNCTION(textdomain)
/* {{{ proto string gettext(string msgid)
Return the translation of msgid for the current domain, or msgid unaltered if a translation does not exist */
PHP_FUNCTION(gettext)
PHP_NAMED_FUNCTION(zif_gettext)
{
zval **msgid;
char *msgstr;
@@ -128,7 +127,7 @@ PHP_FUNCTION(gettext)
/* {{{ proto string dgettext(string domain_name, string msgid)
Return the translation of msgid for domain_name, or msgid unaltered if a translation does not exist */
PHP_FUNCTION(dgettext)
PHP_NAMED_FUNCTION(zif_dgettext)
{
zval **domain_name, **msgid;
char *msgstr;
@@ -147,7 +146,7 @@ PHP_FUNCTION(dgettext)
/* {{{ proto string dcgettext(string domain_name, string msgid, long category)
Return the translation of msgid for domain_name and category, or msgid unaltered if a translation does not exist */
PHP_FUNCTION(dcgettext)
PHP_NAMED_FUNCTION(zif_dcgettext)
{
zval **domain_name, **msgid, **category;
char *msgstr;
@@ -167,7 +166,7 @@ PHP_FUNCTION(dcgettext)
/* {{{ proto string bindtextdomain(string domain_name, string dir)
Bind to the text domain domain_name, looking for translations in dir. Returns the current domain */
PHP_FUNCTION(bindtextdomain)
PHP_NAMED_FUNCTION(zif_bindtextdomain)
{
zval **domain_name, **dir;
char *retval, dir_name[MAXPATHLEN];
@@ -198,7 +197,7 @@ PHP_FUNCTION(bindtextdomain)
#if HAVE_NGETTEXT
/* {{{ proto string ngettext(string MSGID1, string MSGID2, int N)
Plural version of gettext() */
PHP_FUNCTION(ngettext)
PHP_NAMED_FUNCTION(zif_ngettext)
{
zval **msgid1, **msgid2, **count;
char *msgstr;
@@ -224,7 +223,7 @@ PHP_FUNCTION(ngettext)
#if HAVE_DNGETTEXT
/* {{{ proto string dngettext (string domain, string msgid1, string msgid2, int count)
Plural version of dgettext() */
PHP_FUNCTION(dngettext)
PHP_NAMED_FUNCTION(zif_dngettext)
{
zval **domain, **msgid1, **msgid2, **count;
@@ -252,7 +251,7 @@ PHP_FUNCTION(dngettext)
#if HAVE_DCNGETTEXT
/* {{{ proto string dcngettext (string domain, string msgid1, string msgid2, int n, int category)
Plural version of dcgettext() */
PHP_FUNCTION(dcngettext)
PHP_NAMED_FUNCTION(zif_dcngettext)
{
zval **domain, **msgid1, **msgid2, **count, **category;
@@ -283,7 +282,7 @@ PHP_FUNCTION(dcngettext)
/* {{{ proto string bind_textdomain_codeset (string domain, string codeset)
Specify the character encoding in which the messages from the DOMAIN message catalog will be returned. */
PHP_FUNCTION(bind_textdomain_codeset)
PHP_NAMED_FUNCTION(zif_bind_textdomain_codeset)
{
zval **domain, **codeset;
char *retval;
+10 -13
View File
@@ -22,31 +22,28 @@
#define PHP_GETTEXT_H
#if HAVE_LIBINTL
#ifndef INIT_FUNC_ARGS
#include "zend_modules.h"
#endif
extern zend_module_entry php_gettext_module_entry;
#define gettext_module_ptr &php_gettext_module_entry
PHP_MINFO_FUNCTION(gettext);
PHP_MINFO_FUNCTION(php_gettext);
PHP_FUNCTION(textdomain);
PHP_FUNCTION(gettext);
PHP_FUNCTION(dgettext);
PHP_FUNCTION(dcgettext);
PHP_FUNCTION(bindtextdomain);
PHP_NAMED_FUNCTION(zif_textdomain);
PHP_NAMED_FUNCTION(zif_gettext);
PHP_NAMED_FUNCTION(zif_dgettext);
PHP_NAMED_FUNCTION(zif_dcgettext);
PHP_NAMED_FUNCTION(zif_bindtextdomain);
#if HAVE_NGETTEXT
PHP_FUNCTION(ngettext);
PHP_NAMED_FUNCTION(zif_ngettext);
#endif
#if HAVE_DNGETTEXT
PHP_FUNCTION(dngettext);
PHP_NAMED_FUNCTION(zif_dngettext);
#endif
#if HAVE_DCNGETTEXT
PHP_FUNCTION(dcngettext);
PHP_NAMED_FUNCTION(zif_dcngettext);
#endif
#if HAVE_BIND_TEXTDOMAIN_CODESET
PHP_FUNCTION(bind_textdomain_codeset);
PHP_NAMED_FUNCTION(zif_bind_textdomain_codeset);
#endif
#else
+18
View File
@@ -0,0 +1,18 @@
--TEST--
Gettext basic test
--SKIPIF--
<?php if (!extension_loaded("gettext")) print "skip"; ?>
--FILE--
<?php // $Id$
chdir(dirname(__FILE__));
setlocale(LC_ALL, 'fi_FI');
bindtextdomain ("messages", "./locale");
textdomain ("messages");
echo gettext("Basic test"), "\n";
echo _("Basic test"), "\n";
?>
--EXPECT--
Perustesti
Perustesti
Binary file not shown.
@@ -0,0 +1,15 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
#: gettext_basic.phpt:11
msgid "Basic test"
msgstr "Perustesti"
+5 -6
View File
@@ -7,19 +7,18 @@ PHP_ARG_WITH(gmp, for GNU MP support,
if test "$PHP_GMP" != "no"; then
for i in /usr/local /usr $PHP_GMP; do
if test -f $i/include/gmp.h; then
GMP_DIR=$i
fi
for i in $PHP_GMP /usr/local /usr; do
test -f $i/include/gmp.h && GMP_DIR=$i && break
done
if test -z "$GMP_DIR"; then
AC_MSG_ERROR(Unable to locate gmp.h)
fi
PHP_ADD_LIBRARY_WITH_PATH(gmp, $GMP_DIR/lib, GMP_SHARED_LIBADD)
PHP_ADD_INCLUDE($GMP_DIR/include)
PHP_NEW_EXTENSION(gmp, gmp.c, $ext_shared)
AC_DEFINE(HAVE_GMP, 1, [ ])
PHP_SUBST(GMP_SHARED_LIBADD)
PHP_ADD_LIBRARY_WITH_PATH(gmp, $GMP_DIR/lib, GMP_SHARED_LIBADD)
AC_DEFINE(HAVE_GMP, 1, [ ])
fi
+1 -1
View File
@@ -311,7 +311,7 @@ static inline void gmp_zval_binary_ui_op2_ex(zval *return_value, zval **a_arg, z
mpz_t *gmpnum_a, *gmpnum_b, *gmpnum_result1, *gmpnum_result2;
zval r;
int use_ui=0;
unsigned long long_result;
unsigned long long_result = 0;
FETCH_GMP_ZVAL(gmpnum_a, a_arg);
if(gmp_ui_op && Z_TYPE_PP(b_arg) == IS_LONG && Z_LVAL_PP(b_arg) >= 0) {
+2 -2
View File
@@ -766,7 +766,7 @@ static void php_hw_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
list_entry new_le;
if (HwSG(max_links)!=-1 && HwSG(num_links)>=HwSG(max_links)) {
php_error(E_ERROR, "%s(): Too many open links (%d)", get_active_function_name(TSRMLS_C), HwSG(num_links));
php_error(E_ERROR, "%s(): Too many open links (%ld)", get_active_function_name(TSRMLS_C), HwSG(num_links));
if(host) efree(host);
if(username) efree(username);
if(password) efree(password);
@@ -774,7 +774,7 @@ static void php_hw_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
RETURN_FALSE;
}
if (HwSG(max_persistent!=-1) && HwSG(num_persistent)>=HwSG(max_persistent)) {
php_error(E_ERROR, "%s(): Too many open persistent links (%d)", get_active_function_name(TSRMLS_C), HwSG(num_persistent));
php_error(E_ERROR, "%s(): Too many open persistent links (%ld)", get_active_function_name(TSRMLS_C), HwSG(num_persistent));
if(host) efree(host);
if(username) efree(username);
if(password) efree(password);
+13 -4
View File
@@ -114,13 +114,22 @@ int main() {
AC_DEFINE([ICONV_SUPPORTS_ERRNO],0,[Whether iconv supports error no or not])
])
AC_MSG_CHECKING([if your cpp allows macro usage in include lines])
AC_TRY_COMPILE([
#define FOO <$PHP_ICONV_H_PATH>
#include FOO
], [], [
AC_MSG_RESULT([yes])
PHP_DEFINE([PHP_ICONV_H_PATH], [<$PHP_ICONV_H_PATH>])
AC_DEFINE_UNQUOTED([PHP_ICONV_H_PATH], [<$PHP_ICONV_H_PATH>], [Path to iconv.h])
], [
AC_MSG_RESULT([no])
])
CFLAGS="$iconv_cflags_save"
LDFLAGS="$iconv_ldflags_save"
PHP_DEFINE([PHP_ICONV_H_PATH], [<$PHP_ICONV_H_PATH>])
AC_DEFINE_UNQUOTED([PHP_ICONV_H_PATH], [<$PHP_ICONV_H_PATH>], [Path to iconv.h])
PHP_NEW_EXTENSION(iconv, iconv.c, $ext_shared)
PHP_NEW_EXTENSION(iconv, iconv.c, $ext_shared,, [-I\"$PHP_ICONV_PREFIX/include\"])
PHP_SUBST(ICONV_SHARED_LIBADD)
else
AC_MSG_ERROR(Please reinstall the iconv library.)
+5 -5
View File
@@ -36,11 +36,11 @@
#ifdef HAVE_ICONV
#ifndef PHP_ICONV_H_PATH
#define PHP_ICONV_H_PATH <iconv.h>
#endif
#ifdef PHP_ICONV_H_PATH
#include PHP_ICONV_H_PATH
#else
#include <iconv.h>
#endif
#ifdef HAVE_GLIBC_ICONV
#include <gnu/libc-version.h>
@@ -269,7 +269,7 @@ php_iconv_err_t php_iconv_string(const char *in_p, size_t in_len,
out_p = out_buf;
while (in_left > 0) {
result = iconv(cd, (const char **) &in_p, &in_left, (char **) &out_p, &out_left);
result = iconv(cd, (char **) &in_p, &in_left, (char **) &out_p, &out_left);
out_size = bsz - out_left;
if (result == (size_t)(-1)) {
if (errno == E2BIG && in_left > 0) {
+4 -5
View File
@@ -6,18 +6,17 @@ AC_DEFUN(IMAP_INC_CHK,[if test -r "$i$1/c-client.h"; then
AC_DEFINE(HAVE_IMAP2000, 1, [ ])
IMAP_DIR=$i
IMAP_INC_DIR=$i$1
break
elif test -r "$i$1/rfc822.h"; then
IMAP_DIR=$i;
IMAP_INC_DIR=$i$1
break
])
AC_DEFUN(IMAP_LIB_CHK,[
str="$IMAP_DIR/$1/lib$lib.*"
for i in `echo $str`; do
if test -r $i; then
IMAP_LIBDIR=$IMAP_DIR/$1
break 2
fi
test -r $i && IMAP_LIBDIR=$IMAP_DIR/$1 && break 2
done
])
@@ -137,7 +136,7 @@ if test "$PHP_IMAP" != "no"; then
PHP_NEW_EXTENSION(imap, php_imap.c, $ext_shared)
AC_DEFINE(HAVE_IMAP,1,[ ])
for i in /usr/local /usr $PHP_IMAP; do
for i in $PHP_IMAP /usr/local /usr; do
IMAP_INC_CHK()
el[]IMAP_INC_CHK(/include/c-client)
el[]IMAP_INC_CHK(/include/imap)
+3 -1
View File
@@ -578,6 +578,7 @@ PHP_MINIT_FUNCTION(imap)
REGISTER_LONG_CONSTANT("TYPEAUDIO", TYPEAUDIO , CONST_PERSISTENT | CONST_CS);
REGISTER_LONG_CONSTANT("TYPEIMAGE", TYPEIMAGE , CONST_PERSISTENT | CONST_CS);
REGISTER_LONG_CONSTANT("TYPEVIDEO", TYPEVIDEO , CONST_PERSISTENT | CONST_CS);
REGISTER_LONG_CONSTANT("TYPEMODEL", TYPEMODEL , CONST_PERSISTENT | CONST_CS);
REGISTER_LONG_CONSTANT("TYPEOTHER", TYPEOTHER , CONST_PERSISTENT | CONST_CS);
/*
TYPETEXT unformatted text
@@ -587,6 +588,7 @@ PHP_MINIT_FUNCTION(imap)
TYPEAUDIO audio
TYPEIMAGE static image (GIF, JPEG, etc.)
TYPEVIDEO video
TYPEMODEL model
TYPEOTHER unknown
*/
@@ -632,7 +634,7 @@ PHP_RSHUTDOWN_FUNCTION(imap)
if (EG(error_reporting) & E_NOTICE) {
ecur = IMAPG(imap_errorstack);
while (ecur != NIL) {
php_error(E_NOTICE, "%s(): %s (errflg=%d)", get_active_function_name(TSRMLS_C), ecur->LTEXT, ecur->errflg);
php_error(E_NOTICE, "%s(): %s (errflg=%ld)", get_active_function_name(TSRMLS_C), ecur->LTEXT, ecur->errflg);
ecur = ecur->next;
}
}
+8 -4
View File
@@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\main" /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL" /D HAVE_IFX=1 /D HAVE_IUS=1 /D "ZTS" /D ZEND_WIN32=1 /D PHP_WIN32=1 /D IFX_VERSION=921 /D COMPILE_DL_INFORMIX=1 /D ZEND_DEBUG=0 /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\main" /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL" /D HAVE_IFX=1 /D HAVE_IUS=1 /D "ZTS" /D ZEND_WIN32=1 /D PHP_WIN32=1 /D IFX_VERSION=921 /D COMPILE_DL_INFORMIX=1 /D ZEND_DEBUG=0 /D HAVE_IFX_IUS=1 /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x406 /d "NDEBUG"
@@ -69,7 +69,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\main" /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /D "_DEBUG" /D ZEND_DEBUG=1 /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL" /D HAVE_IFX=1 /D HAVE_IUS=1 /D "ZTS" /D ZEND_WIN32=1 /D PHP_WIN32=1 /D IFX_VERSION=921 /D COMPILE_DL_INFORMIX=1 /YX /FD /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\main" /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /D "_DEBUG" /D ZEND_DEBUG=1 /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL" /D HAVE_IFX=1 /D HAVE_IUS=1 /D "ZTS" /D ZEND_WIN32=1 /D PHP_WIN32=1 /D IFX_VERSION=921 /D COMPILE_DL_INFORMIX=1 /D HAVE_IFX_IUS=1 /YX /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x406 /d "_DEBUG"
@@ -104,7 +104,7 @@ SOURCE=.\ifx.ec
InputPath=.\ifx.ec
".\ifx.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
esql.exe -dcmdl -p -G -subsystem:windows -thread -I..\.. ifx.ec
esql.exe -dcmdl -p -G -subsystem:windows -EDHAVE_IFX_IUS=1 -thread -I..\.. ifx.ec
# End Custom Build
@@ -114,7 +114,7 @@ InputPath=.\ifx.ec
InputPath=.\ifx.ec
".\ifx.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
esql.exe -dcmdl -p -G -subsystem:windows -thread -I..\.. ifx.ec
esql.exe -dcmdl -p -G -subsystem:windows -EDHAVE_IFX_IUS=1 -thread -I..\.. ifx.ec
# End Custom Build
@@ -129,6 +129,10 @@ InputPath=.\ifx.ec
SOURCE=.\php_informix.h
# End Source File
# Begin Source File
SOURCE=.\php_informix_includes.h
# End Source File
# End Group
# End Target
# End Project
+49 -15
View File
@@ -278,36 +278,70 @@ EXEC SQL END DECLARE SECTION;
return(ifx_err_msg);
}
static void ifx_do_close(link)
EXEC SQL BEGIN DECLARE SECTION;
PARAMETER char *link;
EXEC SQL END DECLARE SECTION;
{
EXEC SQL SET CONNECTION :link;
if (ifx_check() >= 0) {
EXEC SQL DISCONNECT :link;
/* check if were in a transaction */
if (SQLCODE == -1800) {
EXEC SQL SET CONNECTION :link;
EXEC SQL ROLLBACK WORK;
if (ifx_check() == 0) {
/* DISCONNECT again, after rollback */
EXEC SQL DISCONNECT :link;
if (ifx_check() < 0) {
IFXG(sv_sqlcode) = SQLCODE;
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Disconnect link %s after Automatic Rollback fails (%s)", link, ifx_error(link));
}
}
if (ifx_check() < 0) {
/* CLOSE database if rollback or disconnect fails */
EXEC SQL CLOSE DATABASE;
if (ifx_check() < 0) {
IFXG(sv_sqlcode) = SQLCODE;
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Close database fails %s (%s)", link, ifx_error(link));
}
}
}
else if (SQLCODE < 0) {
IFXG(sv_sqlcode) = SQLCODE;
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Disconnect link %s fails (%s)", link, ifx_error(link));
}
}
else {
IFXG(sv_sqlcode) = SQLCODE;
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Set connection %s fails (%s)", link, ifx_error(link));
}
}
static void _close_ifx_link(zend_rsrc_list_entry *rsrc TSRMLS_DC)
{
EXEC SQL BEGIN DECLARE SECTION;
char *link;
EXEC SQL END DECLARE SECTION;
link=(char *)rsrc->ptr;
EXEC SQL SET CONNECTION :link;
if (ifx_check() >= 0) {
EXEC SQL close database;
EXEC SQL DISCONNECT CURRENT;
}
ifx_do_close(link);
efree(link);
IFXG(num_links)--;
}
static void _close_ifx_plink(zend_rsrc_list_entry *rsrc TSRMLS_DC)
{
EXEC SQL BEGIN DECLARE SECTION;
char *link;
EXEC SQL END DECLARE SECTION;
link = (char *)rsrc->ptr;
EXEC SQL SET CONNECTION :link;
if (ifx_check() >= 0) {
EXEC SQL close database;
EXEC SQL DISCONNECT CURRENT;
}
ifx_do_close(link);
free(link);
IFXG(num_persistent)--;
IFXG(num_links)--;
@@ -923,7 +957,7 @@ EXEC SQL END DECLARE SECTION;
}
len++;
EXEC SQL SET DESCRIPTOR :descrpid VALUE :i
EXEC SQL SET DESCRIPTOR :i_descrpid VALUE :i
DATA= :char_tmp,
LENGTH= :len,
INDICATOR= :indicator,
+286 -314
View File
@@ -53,6 +53,11 @@ A lot... */
#if HAVE_IBASE
#include <ibase.h>
#ifndef SQLDA_CURRENT_VERSION
#define SQLDA_CURRENT_VERSION SQLDA_VERSION1
#endif
#include <time.h>
#include "ext/standard/fsock.h"
#include "ext/standard/info.h"
@@ -526,7 +531,6 @@ static void php_ibase_init_globals(zend_ibase_globals *ibase_globals)
ibase_globals->timestampformat = NULL;
ibase_globals->dateformat = NULL;
ibase_globals->timeformat = NULL;
ibase_globals->errmsg = NULL;
ibase_globals->num_persistent = 0;
}
@@ -583,10 +587,7 @@ PHP_RINIT_FUNCTION(ibase)
}
IBG(timeformat) = DL_STRDUP(IBG(cfg_timeformat));
if (IBG(errmsg)) {
DL_FREE(IBG(errmsg));
}
IBG(errmsg) = DL_MALLOC(sizeof(char)*MAX_ERRMSG+1);
RESET_ERRMSG;
return SUCCESS;
}
@@ -614,11 +615,6 @@ PHP_RSHUTDOWN_FUNCTION(ibase)
}
IBG(timeformat) = NULL;
if (IBG(errmsg)) {
DL_FREE(IBG(errmsg));
}
IBG(errmsg) = NULL;
return SUCCESS;
}
@@ -1080,9 +1076,9 @@ static int _php_ibase_alloc_query(ibase_query **ib_queryp, isc_db_handle link, i
goto _php_ibase_alloc_query_error;
}
IB_QUERY->out_sqlda = (XSQLDA *) emalloc(XSQLDA_LENGTH(0));
IB_QUERY->out_sqlda->sqln = 0;
IB_QUERY->out_sqlda->version = SQLDA_VERSION1;
IB_QUERY->out_sqlda = (XSQLDA *) emalloc(XSQLDA_LENGTH(1));
IB_QUERY->out_sqlda->sqln = 1;
IB_QUERY->out_sqlda->version = SQLDA_CURRENT_VERSION;
if (isc_dsql_prepare(IB_STATUS, &IB_QUERY->trans, &IB_QUERY->stmt, 0, query, dialect, IB_QUERY->out_sqlda)) {
_php_ibase_error(TSRMLS_C);
@@ -1093,18 +1089,18 @@ static int _php_ibase_alloc_query(ibase_query **ib_queryp, isc_db_handle link, i
if (IB_QUERY->out_sqlda->sqld > IB_QUERY->out_sqlda->sqln) {
IB_QUERY->out_sqlda = erealloc(IB_QUERY->out_sqlda, XSQLDA_LENGTH(IB_QUERY->out_sqlda->sqld));
IB_QUERY->out_sqlda->sqln = IB_QUERY->out_sqlda->sqld;
IB_QUERY->out_sqlda->version = SQLDA_VERSION1;
if (isc_dsql_describe(IB_STATUS, &IB_QUERY->stmt, SQLDA_VERSION1, IB_QUERY->out_sqlda)) {
IB_QUERY->out_sqlda->version = SQLDA_CURRENT_VERSION;
if (isc_dsql_describe(IB_STATUS, &IB_QUERY->stmt, SQLDA_CURRENT_VERSION, IB_QUERY->out_sqlda)) {
_php_ibase_error(TSRMLS_C);
goto _php_ibase_alloc_query_error;
}
}
/* maybe have input placeholders? */
IB_QUERY->in_sqlda = emalloc(XSQLDA_LENGTH(0));
IB_QUERY->in_sqlda->sqln = 0;
IB_QUERY->in_sqlda->version = SQLDA_VERSION1;
if (isc_dsql_describe_bind(IB_STATUS, &IB_QUERY->stmt, SQLDA_VERSION1, IB_QUERY->in_sqlda)) {
IB_QUERY->in_sqlda = emalloc(XSQLDA_LENGTH(1));
IB_QUERY->in_sqlda->sqln = 1;
IB_QUERY->in_sqlda->version = SQLDA_CURRENT_VERSION;
if (isc_dsql_describe_bind(IB_STATUS, &IB_QUERY->stmt, SQLDA_CURRENT_VERSION, IB_QUERY->in_sqlda)) {
_php_ibase_error(TSRMLS_C);
goto _php_ibase_alloc_query_error;
}
@@ -1113,8 +1109,8 @@ static int _php_ibase_alloc_query(ibase_query **ib_queryp, isc_db_handle link, i
if (IB_QUERY->in_sqlda->sqln < IB_QUERY->in_sqlda->sqld) {
IB_QUERY->in_sqlda = erealloc(IB_QUERY->in_sqlda, XSQLDA_LENGTH(IB_QUERY->in_sqlda->sqld));
IB_QUERY->in_sqlda->sqln = IB_QUERY->in_sqlda->sqld;
IB_QUERY->in_sqlda->version = SQLDA_VERSION1;
if (isc_dsql_describe_bind(IB_STATUS, &IB_QUERY->stmt, SQLDA_VERSION1, IB_QUERY->in_sqlda)) {
IB_QUERY->in_sqlda->version = SQLDA_CURRENT_VERSION;
if (isc_dsql_describe_bind(IB_STATUS, &IB_QUERY->stmt, SQLDA_CURRENT_VERSION, IB_QUERY->in_sqlda)) {
_php_ibase_error(TSRMLS_C);
goto _php_ibase_alloc_query_error;
}
@@ -1161,206 +1157,191 @@ _php_ibase_alloc_query_error:
}
/* }}} */
/* ((( _php_ibase_blob_add */
static int _php_ibase_blob_add(zval **string_arg, ibase_blob_handle *ib_blob TSRMLS_DC)
{
unsigned long put_cnt = 0, rem_cnt;
unsigned short chunk_size;
convert_to_string_ex(string_arg);
for (rem_cnt = Z_STRLEN_PP(string_arg); rem_cnt > 0; rem_cnt -= chunk_size) {
chunk_size = rem_cnt > USHRT_MAX ? USHRT_MAX : (unsigned short)rem_cnt;
if (isc_put_segment(IB_STATUS, &ib_blob->bl_handle, chunk_size, &Z_STRVAL_PP(string_arg)[put_cnt] )) {
_php_ibase_error(TSRMLS_C);
return FAILURE;
}
put_cnt += chunk_size;
}
return SUCCESS;
}
/* }}} */
/* {{{ _php_ibase_bind()
Bind parameter placeholders in a previously prepared query */
static int _php_ibase_bind(XSQLDA *sqlda, zval **b_vars, BIND_BUF *buf, ibase_query *ib_query TSRMLS_DC)
{
XSQLVAR *var;
zval *b_var;
int i;
var = sqlda->sqlvar;
for (i = 0; i < sqlda->sqld; var++, i++) { /* binded vars */
int i , rv = SUCCESS;
XSQLVAR *var = sqlda->sqlvar;
for (i = 0; i < sqlda->sqld; ++var, ++i) { /* bound vars */
buf[i].sqlind = 0;
zval *b_var = b_vars[i];
var->sqlind = &buf[i].sqlind;
b_var = b_vars[i];
if (Z_TYPE_P(b_var) == IS_NULL) {
static char nothing[64];
static short null_flag = -1;
var->sqldata = nothing;
var->sqltype |= 1;
var->sqlind = &null_flag;
if (var->sqllen > 64) {
var->sqllen = 64;
if ((var->sqltype & 1) != 1) {
_php_ibase_module_error("Parameter %d must have a value" TSRMLS_CC, i+1);
rv = FAILURE;
}
} else
switch (var->sqltype & ~1) {
case SQL_TEXT: /* direct to variable */
case SQL_VARYING:
convert_to_string(b_var);
var->sqldata = (void ISC_FAR *) Z_STRVAL_P(b_var);
var->sqllen = Z_STRLEN_P(b_var);
var->sqltype = SQL_TEXT + (var->sqltype & 1);
break;
case SQL_SHORT:
convert_to_long(b_var);
if (Z_LVAL_P(b_var) > SHRT_MAX || Z_LVAL_P(b_var) < SHRT_MIN) {
_php_ibase_module_error("Field %*s overflow", var->aliasname_length, var->aliasname);
return FAILURE;
}
buf[i].val.sval = (short) Z_LVAL_P(b_var);
var->sqldata = (void ISC_FAR *) (&buf[i].val.sval);
break;
case SQL_LONG:
if (var->sqlscale < 0) {
/*
DECIMAL or NUMERIC field stored internally as scaled integer.
Coerce it to string and let InterBase's internal routines
handle it.
*/
buf[i].sqlind = -1;
} else {
buf[i].sqlind = 0;
if (var->sqlscale < 0) {
/*
DECIMAL or NUMERIC field are stored internally as scaled integers.
Coerce it to string and let InterBase's internal routines handle it.
*/
var->sqltype = SQL_TEXT;
}
switch (var->sqltype & ~1) {
case SQL_SHORT:
convert_to_long(b_var);
if (Z_LVAL_P(b_var) > SHRT_MAX || Z_LVAL_P(b_var) < SHRT_MIN) {
_php_ibase_module_error("Parameter %d exceeds field width" TSRMLS_CC, i+1);
rv = FAILURE;
}
buf[i].val.sval = (short) Z_LVAL_P(b_var);
var->sqldata = (void *) &buf[i].val.sval;
break;
case SQL_LONG:
convert_to_long(b_var);
var->sqldata = (void *) &Z_LVAL_P(b_var);
break;
case SQL_FLOAT:
convert_to_double(b_var);
buf[i].val.fval = (float) Z_DVAL_P(b_var);
var->sqldata = (void *) &buf[i].val.fval;
break;
case SQL_DOUBLE:
convert_to_double(b_var);
var->sqldata = (void *) &Z_DVAL_P(b_var);
break;
#ifndef SQL_TIMESTAMP
case SQL_DATE:
convert_to_string(b_var);
var->sqldata = (void ISC_FAR *) Z_STRVAL_P(b_var);
{
struct tm t;
#ifdef HAVE_STRPTIME
strptime(Z_STRVAL_P(b_var), IBG(timestampformat), &t);
#else
/* Parsing doesn't seem to happen with older versions... */
int n;
t.tm_year = t.tm_mon = t.tm_mday = t.tm_hour = t.tm_min = t.tm_sec = 0;
n = sscanf(Z_STRVAL_P(b_var), "%d%*[/]%d%*[/]%d %d%*[:]%d%*[:]%d", &t.tm_mon, &t.tm_mday, &t.tm_year, &t.tm_hour, &t.tm_min, &t.tm_sec);
if (n != 3 && n != 6) {
_php_ibase_module_error("Parameter %d: invalid date/time format (expected 3 or 6 fields, got %d. Use format m/d/Y H:i:s. You gave '%s')" TSRMLS_CC, i+1, n, Z_STRVAL_P(b_var));
rv = FAILURE;
}
t.tm_year -= 1900;
t.tm_mon--;
#endif
isc_encode_date(&t, &buf[i].val.qval);
var->sqldata = (void *) (&buf[i].val.qval);
}
#else
#ifdef HAVE_STRPTIME
case SQL_TIMESTAMP:
case SQL_TYPE_DATE:
case SQL_TYPE_TIME:
{
struct tm t;
convert_to_string(b_var);
switch (var->sqltype & ~1) {
case SQL_TIMESTAMP:
strptime(Z_STRVAL_P(b_var), IBG(timestampformat), &t);
isc_encode_timestamp(&t, &buf[i].val.tsval);
var->sqldata = (void *) (&buf[i].val.tsval);
break;
case SQL_TYPE_DATE:
strptime(Z_STRVAL_P(b_var), IBG(dateformat), &t);
isc_encode_sql_date(&t, &buf[i].val.dtval);
var->sqldata = (void *) (&buf[i].val.dtval);
break;
case SQL_TYPE_TIME:
strptime(Z_STRVAL_P(b_var), IBG(timeformat), &t);
isc_encode_sql_time(&t, &buf[i].val.tmval);
var->sqldata = (void *) (&buf[i].val.tmval);
break;
}
}
#endif
#endif
break;
case SQL_BLOB:
{
ibase_blob_handle *ib_blob_id;
if (Z_TYPE_P(b_var) != IS_STRING || Z_STRLEN_P(b_var) != sizeof(ibase_blob_handle) ||
((ibase_blob_handle *)(Z_STRVAL_P(b_var)))->bl_handle != 0) {
ibase_blob_handle *ib_blob;
ib_blob = (ibase_blob_handle *) emalloc(sizeof(ibase_blob_handle));
ib_blob->trans_handle = ib_query->trans;
ib_blob->link = ib_query->link;
ib_blob->bl_handle = NULL;
if (isc_create_blob(IB_STATUS, &ib_blob->link, &ib_blob->trans_handle, &ib_blob->bl_handle, &ib_blob->bl_qd)) {
efree(ib_blob);
_php_ibase_error(TSRMLS_C);
return FAILURE;
}
if (_php_ibase_blob_add(&b_var, ib_blob TSRMLS_CC) != SUCCESS) {
efree(ib_blob);
return FAILURE;
}
if (isc_close_blob(IB_STATUS, &ib_blob->bl_handle)) {
_php_ibase_error(TSRMLS_C);
efree(ib_blob);
return FAILURE;
}
buf[i].val.qval = ib_blob->bl_qd;
var->sqldata = (void ISC_FAR *) &buf[i].val.qval;
efree(ib_blob);
} else {
ib_blob_id = (ibase_blob_handle *) Z_STRVAL_P(b_var);
var->sqldata = (void ISC_FAR *) &ib_blob_id->bl_qd;
}
}
break;
case SQL_ARRAY:
_php_ibase_module_error("Parameter %d: arrays not supported" TSRMLS_CC, i+1);
rv = FAILURE;
break;
default:
convert_to_string(b_var);
var->sqldata = Z_STRVAL_P(b_var);
var->sqllen = Z_STRLEN_P(b_var);
var->sqltype = SQL_TEXT;
} else {
convert_to_long(b_var);
var->sqldata = (void ISC_FAR *) (&Z_LVAL_P(b_var));
}
break;
case SQL_FLOAT:
convert_to_double(b_var);
buf[i].val.fval = (float) Z_DVAL_P(b_var);
var->sqldata = (void ISC_FAR *) (&buf[i].val.fval);
break;
case SQL_DOUBLE: /* direct to variable */
convert_to_double(b_var);
var->sqldata = (void ISC_FAR *) (&Z_DVAL_P(b_var));
break;
#ifdef SQL_INT64
case SQL_INT64:
/*
Just let InterBase's internal routines handle it.
Besides, it might even have originally been a string
to avoid rounding errors...
*/
convert_to_string(b_var);
var->sqldata = (void ISC_FAR *) Z_STRVAL_P(b_var);
var->sqllen = Z_STRLEN_P(b_var);
var->sqltype = SQL_TEXT;
break;
#endif
#ifndef SQL_TIMESTAMP
case SQL_DATE:
#else
case SQL_TIMESTAMP:
case SQL_TYPE_DATE:
case SQL_TYPE_TIME:
#endif
#ifndef HAVE_STRPTIME
#ifndef SQL_TIMESTAMP
/* Parsing doesn't seem to happen with older versions... */
{
struct tm t;
int n;
t.tm_year = t.tm_mon = t.tm_mday = t.tm_hour = t.tm_min = t.tm_sec = 0;
convert_to_string(b_var);
n = sscanf(Z_STRVAL_P(b_var), "%d%*[/]%d%*[/]%d %d%*[:]%d%*[:]%d", &t.tm_mon, &t.tm_mday, &t.tm_year, &t.tm_hour, &t.tm_min, &t.tm_sec);
if (n != 3 && n != 6) {
_php_ibase_module_error("Invalid date/time format: Expected 3 or 6 fields, got %d. Use format m/d/Y H:i:s. You gave '%s'", n, Z_STRVAL_P(b_var));
return FAILURE;
}
t.tm_year -= 1900;
t.tm_mon--;
isc_encode_date(&t, &buf[i].val.qval);
var->sqldata = (void ISC_FAR *) (&buf[i].val.qval);
}
#else
/*
Once again, InterBase's internal parsing routines
seems to be a good solution... Might change this on
platforms that have strptime()? Code is there and works,
but the functions existence is not yet tested...
ask Sascha?
*/
convert_to_string(b_var);
var->sqldata = (void ISC_FAR *) Z_STRVAL_P(b_var);
var->sqllen = Z_STRLEN_P(b_var);
var->sqltype = SQL_TEXT;
#endif
#else
{
struct tm t;
convert_to_string(b_var);
#ifndef SQL_TIMESTAMP
strptime(Z_STRVAL_P(b_var), IBG(timestampformat), &t);
isc_encode_date(&t, &buf[i].val.qval);
var->sqldata = (void ISC_FAR *) (&buf[i].val.qval);
#else
switch (var->sqltype & ~1) {
case SQL_TIMESTAMP:
strptime(Z_STRVAL_P(b_var), IBG(timestampformat), &t);
isc_encode_timestamp(&t, &buf[i].val.tsval);
var->sqldata = (void ISC_FAR *) (&buf[i].val.tsval);
break;
case SQL_TYPE_DATE:
strptime(Z_STRVAL_P(b_var), IBG(dateformat), &t);
isc_encode_sql_date(&t, &buf[i].val.dtval);
var->sqldata = (void ISC_FAR *) (&buf[i].val.dtval);
break;
case SQL_TYPE_TIME:
strptime(Z_STRVAL_P(b_var), IBG(timeformat), &t);
isc_encode_sql_time(&t, &buf[i].val.tmval);
var->sqldata = (void ISC_FAR *) (&buf[i].val.tmval);
break;
}
#endif
}
#endif
break;
case SQL_BLOB:
{
ibase_blob_handle *ib_blob_id;
if (Z_TYPE_P(b_var) != IS_STRING || Z_STRLEN_P(b_var) != sizeof(ibase_blob_handle) ||
((ibase_blob_handle *)(Z_STRVAL_P(b_var)))->bl_handle != 0) {
ibase_blob_handle *ib_blob;
ib_blob = (ibase_blob_handle *) emalloc(sizeof(ibase_blob_handle));
ib_blob->trans_handle = ib_query->trans;
ib_blob->link = ib_query->link;
ib_blob->bl_handle = NULL;
if (isc_create_blob(IB_STATUS, &ib_blob->link, &ib_blob->trans_handle, &ib_blob->bl_handle, &ib_blob->bl_qd)) {
efree(ib_blob);
_php_ibase_error(TSRMLS_C);
return FAILURE;
}
convert_to_string(b_var);
if (isc_put_segment(IB_STATUS, &ib_blob->bl_handle, (unsigned short) Z_STRLEN_P(b_var), Z_STRVAL_P(b_var))) {
_php_ibase_error(TSRMLS_C);
return FAILURE;
}
if (isc_close_blob(IB_STATUS, &ib_blob->bl_handle)) {
_php_ibase_error(TSRMLS_C);
return FAILURE;
}
ib_blob_id = ib_blob;
var->sqldata = (void ISC_FAR *) &ib_blob_id->bl_qd;
/*
_php_ibase_module_error("Invalid blob id string");
return FAILURE;
*/
} else {
ib_blob_id = (ibase_blob_handle *) Z_STRVAL_P(b_var);
var->sqldata = (void ISC_FAR *) &ib_blob_id->bl_qd;
}
}
break;
case SQL_ARRAY:
_php_ibase_module_error("Binding arrays not supported yet");
return FAILURE;
break;
} /* switch */
} /* switch */
} /* if */
} /* for */
return SUCCESS;
return rv;
}
/* }}} */
@@ -1445,6 +1426,7 @@ static int _php_ibase_exec(ibase_result **ib_resultp, ibase_query *ib_query, int
IB_RESULT->trans = ib_query->trans;
IB_RESULT->stmt = ib_query->stmt;
IB_RESULT->drop_stmt = 0; /* when free result close but not drop!*/
IB_RESULT->has_more_rows = 1;
out_sqlda = IB_RESULT->out_sqlda = emalloc(XSQLDA_LENGTH(ib_query->out_sqlda->sqld));
memcpy(out_sqlda, ib_query->out_sqlda, XSQLDA_LENGTH(ib_query->out_sqlda->sqld));
@@ -1980,6 +1962,41 @@ static int _php_ibase_arr_zval(zval *ar_zval, char **datap, ibase_array *ib_arra
}
/* }}} */
/* {{{ _php_ibase_blob_get */
static int _php_ibase_blob_get(zval *return_value, ibase_blob_handle *ib_blob, unsigned long max_len TSRMLS_DC)
{
if (ib_blob->bl_qd.gds_quad_high || ib_blob->bl_qd.gds_quad_low) { /*not null ?*/
ISC_STATUS stat;
char *bl_data;
unsigned long cur_len;
unsigned short seg_len;
bl_data = emalloc(max_len + 1);
for (cur_len = stat = 0; (stat == 0 || stat == isc_segment) && cur_len < max_len; cur_len += seg_len) {
unsigned short chunk_size = (max_len-cur_len) > USHRT_MAX ? USHRT_MAX : (unsigned short)(max_len-cur_len);
stat = isc_get_segment(IB_STATUS, &ib_blob->bl_handle, &seg_len, chunk_size, &bl_data[cur_len]);
}
bl_data[cur_len] = '\0';
if (IB_STATUS[0] == 1 && (stat != 0 && stat != isc_segstr_eof && stat != isc_segment)) {
efree(bl_data);
_php_ibase_error(TSRMLS_C);
return FAILURE;
}
RETVAL_STRINGL(bl_data, cur_len, 0);
} else { /* null blob */
RETVAL_STRING("", 1); /* empty string */
}
return SUCCESS;
}
/* }}} */
/* {{{ _php_ibase_fetch_hash() */
#define FETCH_ROW 2
@@ -2015,17 +2032,16 @@ static void _php_ibase_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int fetch_type)
ZEND_FETCH_RESOURCE(ib_result, ibase_result *, result_arg, -1, "InterBase result", le_result);
if (ib_result->out_sqlda == NULL) {
_php_ibase_module_error("Trying to fetch results from a non-select query");
if (ib_result->out_sqlda == NULL || !ib_result->has_more_rows) {
RETURN_FALSE;
}
if (isc_dsql_fetch(IB_STATUS, &ib_result->stmt, 1, ib_result->out_sqlda) == 100L) {
RETURN_FALSE; /* end of cursor */
}
if (IB_STATUS[0] && IB_STATUS[1]) { /* error in fetch */
_php_ibase_error(TSRMLS_C);
if (isc_dsql_fetch(IB_STATUS, &ib_result->stmt, 1, ib_result->out_sqlda)) {
ib_result->has_more_rows = 0;
if (IB_STATUS[0] && IB_STATUS[1]) { /* error in fetch */
_php_ibase_error(TSRMLS_C);
}
RETURN_FALSE;
}
@@ -2035,8 +2051,8 @@ static void _php_ibase_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int fetch_type)
var = ib_result->out_sqlda->sqlvar;
for (i = 0; i < ib_result->out_sqlda->sqld; i++, var++) {
if (((var->sqltype & 1) == 0) || *var->sqlind != -1) {
zval *tmp;
tmp = emalloc(sizeof(zval));
zval tmp;
switch (var->sqltype & ~1) {
case SQL_VARYING:
case SQL_TEXT:
@@ -2054,85 +2070,72 @@ static void _php_ibase_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int fetch_type)
case SQL_TYPE_DATE:
case SQL_TYPE_TIME:
#endif
_php_ibase_var_zval(tmp, var->sqldata, var->sqltype, var->sqllen, var->sqlscale, flag TSRMLS_CC);
_php_ibase_var_zval(&tmp, var->sqldata, var->sqltype, var->sqllen, var->sqlscale, flag TSRMLS_CC);
break;
case SQL_BLOB:
if (flag & PHP_IBASE_TEXT) { /* text ? */
int stat;
isc_blob_handle bl_handle = NULL;
ISC_LONG max_len = 0, cur_len = 0;
char bl_items[1], *bl_data, bl_info[20], *p;
if (isc_open_blob(IB_STATUS, &ib_result->link, &ib_result->trans, &bl_handle, (ISC_QUAD ISC_FAR *) var->sqldata)) {
ibase_blob_handle blob_handle;
unsigned long max_len = 0;
static char bl_items[] = {isc_info_blob_total_length};
char bl_info[20];
unsigned short i;
blob_handle.bl_handle = NULL;
blob_handle.bl_qd = *(ISC_QUAD ISC_FAR *) var->sqldata;
if (isc_open_blob(IB_STATUS, &ib_result->link, &ib_result->trans, &blob_handle.bl_handle, &blob_handle.bl_qd)) {
_php_ibase_error(TSRMLS_C);
RETURN_FALSE;
}
bl_items[0] = isc_info_blob_total_length;
if (isc_blob_info(IB_STATUS, &bl_handle, sizeof(bl_items), bl_items, sizeof(bl_info), bl_info)) {
if (isc_blob_info(IB_STATUS, &blob_handle.bl_handle, sizeof(bl_items), bl_items, sizeof(bl_info), bl_info)) {
_php_ibase_error(TSRMLS_C);
RETURN_FALSE;
}
/* find total length of blob's data */
for (p = bl_info; *p != isc_info_end && p < bl_info + sizeof(bl_info);) {
unsigned short item_len, item = *p++;
for (i = 0; i < sizeof(bl_info); ) {
unsigned short item_len;
char item = bl_info[i++];
if (item == isc_info_end || item == isc_info_truncated ||
item == isc_info_error || i >= sizeof(bl_info)) {
item_len = (short) isc_vax_integer(p, 2);
p += 2;
if (item == isc_info_blob_total_length) {
max_len = isc_vax_integer(p, item_len);
}
p += item_len;
}
bl_data = emalloc(max_len+1);
for (cur_len = stat = 0; stat == 0 && cur_len < max_len;) {
unsigned short seg_len;
unsigned short max_seg = (unsigned short) (max_len - cur_len > USHRT_MAX ? USHRT_MAX : max_len-cur_len);
stat = isc_get_segment(IB_STATUS, &bl_handle, &seg_len, max_seg, &bl_data[cur_len]);
cur_len += seg_len;
if (cur_len > max_len) { /* never! */
efree(bl_data);
_php_ibase_module_error("PHP module internal error");
_php_ibase_module_error("Could not determine BLOB size (internal error)");
RETURN_FALSE;
}
item_len = (unsigned short) isc_vax_integer(&bl_info[i], 2);
if (item == isc_info_blob_total_length) {
max_len = isc_vax_integer(&bl_info[i+2], item_len);
break;
}
i += item_len+2;
}
if (IB_STATUS[0] && IB_STATUS[1] && (IB_STATUS[1] != isc_segstr_eof)) {
efree(bl_data);
if (max_len == 0) {
ZVAL_STRING(&tmp, "", 1);
} else if (_php_ibase_blob_get(&tmp, &blob_handle, max_len TSRMLS_CC) != SUCCESS) {
RETURN_FALSE;
}
if (isc_close_blob(IB_STATUS, &blob_handle.bl_handle)) {
zval_dtor(&tmp);
_php_ibase_error(TSRMLS_C);
RETURN_FALSE;
}
bl_data[cur_len] = '\0';
if (isc_close_blob(IB_STATUS, &bl_handle)) {
efree(bl_data);
_php_ibase_error(TSRMLS_C);
RETURN_FALSE;
}
Z_TYPE_P(tmp) = IS_STRING;
Z_STRLEN_P(tmp) = cur_len;
Z_STRVAL_P(tmp) = estrndup(bl_data, cur_len);
efree(bl_data);
} else { /* blob id only */
ISC_QUAD *bl_qd = (ISC_QUAD ISC_FAR *) var->sqldata;
ibase_blob_handle *ib_blob_id;
ib_blob_id = (ibase_blob_handle *) emalloc(sizeof(ibase_blob_handle));
ibase_blob_handle *ib_blob_id = (ibase_blob_handle *) ecalloc(1, sizeof(ibase_blob_handle) + 1);
ib_blob_id->link = ib_result->link;
ib_blob_id->trans_handle = ib_result->trans;
ib_blob_id->bl_qd.gds_quad_high = bl_qd->gds_quad_high;
ib_blob_id->bl_qd.gds_quad_low = bl_qd->gds_quad_low;
ib_blob_id->bl_handle = NULL;
ib_blob_id->bl_qd = *(ISC_QUAD ISC_FAR *) var->sqldata;
Z_TYPE_P(tmp) = IS_STRING;
Z_STRLEN_P(tmp) = sizeof(ibase_blob_handle);
Z_STRVAL_P(tmp) = estrndup((char *) ib_blob_id, sizeof(ibase_blob_handle));
efree(ib_blob_id);
ZVAL_STRINGL(&tmp, (char *) ib_blob_id, sizeof(ibase_blob_handle),0);
}
break;
case SQL_ARRAY: {
@@ -2149,7 +2152,7 @@ static void _php_ibase_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int fetch_type)
}
tmp_ptr = ar_data; /* avoid changes in _arr_zval */
if (_php_ibase_arr_zval(tmp, &tmp_ptr, ib_array, 0, flag TSRMLS_CC) == FAILURE) {
if (_php_ibase_arr_zval(&tmp, &tmp_ptr, ib_array, 0, flag TSRMLS_CC) == FAILURE) {
RETURN_FALSE;
}
efree(ar_data);
@@ -2160,31 +2163,30 @@ static void _php_ibase_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int fetch_type)
} /* switch */
if (fetch_type & FETCH_ROW) {
switch (Z_TYPE_P(tmp)) {
switch (Z_TYPE(tmp)) {
case IS_STRING:
add_index_stringl(return_value, i, Z_STRVAL_P(tmp), Z_STRLEN_P(tmp), 0);
add_index_stringl(return_value, i, Z_STRVAL(tmp), Z_STRLEN(tmp), 0);
break;
case IS_LONG:
add_index_long(return_value, i, Z_LVAL_P(tmp));
add_index_long(return_value, i, Z_LVAL(tmp));
break;
case IS_DOUBLE:
add_index_double(return_value, i, Z_DVAL_P(tmp));
add_index_double(return_value, i, Z_DVAL(tmp));
break;
}
} else {
switch (Z_TYPE_P(tmp)) {
switch (Z_TYPE(tmp)) {
case IS_STRING:
add_assoc_stringl(return_value, var->aliasname, Z_STRVAL_P(tmp), Z_STRLEN_P(tmp), 0);
add_assoc_stringl(return_value, var->aliasname, Z_STRVAL(tmp), Z_STRLEN(tmp), 0);
break;
case IS_LONG:
add_assoc_long(return_value, var->aliasname, Z_LVAL_P(tmp));
add_assoc_long(return_value, var->aliasname, Z_LVAL(tmp));
break;
case IS_DOUBLE:
add_assoc_double(return_value, var->aliasname, Z_DVAL_P(tmp));
add_assoc_double(return_value, var->aliasname, Z_DVAL(tmp));
break;
}
}
efree(tmp);
} else {
if (fetch_type & FETCH_ROW) {
add_index_null(return_value, i);
@@ -2680,13 +2682,9 @@ PHP_FUNCTION(ibase_blob_add)
GET_BLOB_HANDLE_ARG(blob_arg, ib_blob);
convert_to_string_ex(string_arg);
if (isc_put_segment(IB_STATUS, &ib_blob->bl_handle, (unsigned short) Z_STRLEN_PP(string_arg), Z_STRVAL_PP(string_arg))) {
_php_ibase_error(TSRMLS_C);
if (_php_ibase_blob_add(string_arg, ib_blob TSRMLS_CC) != SUCCESS) {
RETURN_FALSE;
}
RETURN_TRUE;
}
/* }}} */
@@ -2695,9 +2693,6 @@ PHP_FUNCTION(ibase_blob_add)
PHP_FUNCTION(ibase_blob_get)
{
zval **blob_arg, **len_arg;
int stat;
char *bl_data;
unsigned short max_len = 0, cur_len, seg_len;
ibase_blob_handle *ib_blob;
RESET_ERRMSG;
@@ -2706,34 +2701,11 @@ PHP_FUNCTION(ibase_blob_get)
WRONG_PARAM_COUNT;
}
convert_to_long_ex(len_arg);
max_len = (unsigned short) Z_LVAL_PP(len_arg);
GET_BLOB_HANDLE_ARG(blob_arg, ib_blob);
if (ib_blob->bl_qd.gds_quad_high || ib_blob->bl_qd.gds_quad_low) { /*not null ?*/
bl_data = emalloc(max_len + 1);
for (cur_len = stat = 0; stat == 0;) {
stat = isc_get_segment(IB_STATUS, &ib_blob->bl_handle, &seg_len, (unsigned short) (max_len-cur_len), &bl_data[cur_len]);
cur_len += seg_len;
if (cur_len > max_len) { /* never!*/
efree(bl_data);
_php_ibase_module_error("PHP module internal error");
RETURN_FALSE;
}
}
bl_data[cur_len] = '\0';
if (IB_STATUS[0] && (IB_STATUS[1] != isc_segstr_eof && IB_STATUS[1] != isc_segment)) {
efree(bl_data);
_php_ibase_error(TSRMLS_C);
RETURN_FALSE;
}
RETURN_STRINGL(bl_data, cur_len, 0);
} else { /* null blob */
RETURN_STRING("", 1); /* empty string */
convert_to_long_ex(len_arg);
if (_php_ibase_blob_get(return_value, ib_blob, Z_LVAL_PP(len_arg) TSRMLS_CC) != SUCCESS) {
RETURN_FALSE;
}
}
/* }}} */
+2 -1
View File
@@ -102,7 +102,7 @@ ZEND_BEGIN_MODULE_GLOBALS(ibase)
char *cfg_dateformat;
char *timeformat;
char *cfg_timeformat;
char *errmsg;
char errmsg[MAX_ERRMSG];
ZEND_END_MODULE_GLOBALS(ibase)
typedef struct {
@@ -149,6 +149,7 @@ typedef struct {
int drop_stmt;
XSQLDA *out_sqlda;
ibase_array *out_array;
unsigned char has_more_rows;
} ibase_result;
typedef struct _php_ibase_varchar {
-2
View File
@@ -9,8 +9,6 @@ InterBase: connect, close and pconnect
require("interbase.inc");
$test_base = dirname(__FILE__)."/ibase_test.tmp";
ibase_connect($test_base);
out_table("test1");
ibase_close();
+17 -19
View File
@@ -17,8 +17,8 @@ InterBase: BLOB test
v_blob blob)");
ibase_commit();
/* create 10k blob file */
$blob_str = rand_binstr(10*1024);
/* create 100k blob file */
$blob_str = rand_binstr(100*1024);
$name = tempnam(dirname(__FILE__),"blob.tmp");
$ftmp = fopen($name,"w");
@@ -36,36 +36,34 @@ InterBase: BLOB test
$bl_h = ibase_blob_open($row->V_BLOB);
$blob = '';
while($piece = ibase_blob_get($bl_h, rand() % 1024))
while($piece = ibase_blob_get($bl_h, 1 + rand() % 1024))
$blob .= $piece;
if($blob != $blob_str)
echo " BLOB 1 fail\n";
echo " BLOB 1 fail (1)\n";
ibase_blob_close($bl_h);
$bl_h = ibase_blob_open($row->V_BLOB);
$blob = '';
while($piece = ibase_blob_get($bl_h, 100 * 1024))
$blob .= $piece;
if($blob != $blob_str)
echo " BLOB 1 fail (2)\n";
ibase_blob_close($bl_h);
ibase_free_result($q);
unset($blob);
echo "create blob 2\n";
$bl_h = ibase_blob_create();
$ftmp = fopen($name,"r");
while($piece = fread($ftmp, rand() % 1024)){
ibase_blob_add($bl_h, $piece);
}
fclose($ftmp);
$bl_s = ibase_blob_close($bl_h);
ibase_query("insert into test4 (v_integer, v_blob) values (2, ?)", $bl_s);
ibase_query("insert into test4 (v_integer, v_blob) values (2, ?)", $blob_str);
echo "test blob 2\n";
$q = ibase_query("select v_blob from test4 where v_integer = 2");
$row = ibase_fetch_object($q);
$bl_h = ibase_blob_open($row->V_BLOB);
$blob = '';
while($piece = ibase_blob_get($bl_h, rand() % 1024))
$blob .= $piece;
if($blob != $blob_str)
$row = ibase_fetch_object($q,IBASE_TEXT);
if($row->V_BLOB != $blob_str)
echo " BLOB 2 fail\n";
ibase_blob_close($bl_h);
ibase_free_result($q);
unset($blob);
+173 -157
View File
@@ -7,182 +7,198 @@ InterBase: binding (may take a while)
--FILE--
<?php
require("interbase.inc");
ibase_connect($test_base);
require("interbase.inc");
ibase_connect($test_base);
ibase_query(
"create table test6 (
iter integer,
v_char char(1000),
v_date timestamp,
v_decimal decimal(12,3),
v_double double precision,
v_float float,
v_integer integer,
v_numeric numeric(4,2),
v_smallint smallint,
v_varchar varchar(10000)
)");
ibase_commit();
ibase_query(
"create table test6 (
iter integer,
v_char char(1000),
v_date timestamp,
v_decimal decimal(12,3),
v_double double precision,
v_float float,
v_integer integer,
v_numeric numeric(4,2),
v_smallint smallint,
v_varchar varchar(10000)
)");
ibase_commit();
/* if timefmt not supported, hide error */
@ibase_timefmt("%m/%d/%Y %H:%M:%S");
/* if timefmt not supported, hide error */
@ibase_timefmt("%m/%d/%Y %H:%M:%S");
echo "insert\n";
echo "insert\n";
for($iter = 0; $iter < 3; $iter++){
/* prepare data */
$v_char = rand_str(1000);
$v_date = rand_datetime();
$v_decimal = rand_number(12,3);
$v_double = rand_number(20);
$v_float = rand_number(7);
$v_integer = rand_number(9,0);
$v_numeric = rand_number(4,2);
$v_smallint = rand_number(5) % 32767;
$v_varchar = rand_str(10000);
for($iter = 0; $iter < 3; $iter++){
/* prepare data */
$v_char = rand_str(1000);
$v_date = rand_datetime();
$v_decimal = rand_number(12,3);
$v_double = rand_number(20);
$v_float = rand_number(7);
$v_integer = rand_number(9,0);
$v_numeric = rand_number(4,2);
$v_smallint = rand_number(5) % 32767;
$v_varchar = rand_str(10000);
ibase_query("insert into test6
(iter,v_char,v_date,v_decimal,v_double,v_float,
v_integer,v_numeric,v_smallint,v_varchar)
values (?,?,?,?,?,?,?,?,?,?)",
$iter, $v_char, $v_date, $v_decimal, $v_double, $v_float,
$v_integer, $v_numeric, $v_smallint, $v_varchar);
$sel = ibase_query("select * from test6 where iter = $iter");
$row = ibase_fetch_object($sel);
if(substr($row->V_CHAR,0,strlen($v_char)) != $v_char){
echo " CHAR fail:\n";
echo " in: $v_char\n";
echo " out: $row->V_CHAR\n";
}
if($row->V_DATE != $v_date){
echo " DATE fail\n";
echo " in: $v_date\n";
echo " out: $row->V_DATE\n";
}
if($row->V_DECIMAL != $v_decimal){
echo " DECIMAL fail\n";
echo " in: $v_decimal\n";
echo " out: $row->V_DECIMAL\n";
}
if(abs($row->V_DOUBLE - $v_double) > abs($v_double / 1E15)){
echo " DOUBLE fail\n";
echo " in: $v_double\n";
echo " out: $row->V_DOUBLE\n";
}
if(abs($row->V_FLOAT - $v_float) > abs($v_float / 1E7)){
echo " FLOAT fail\n";
echo " in: $v_float\n";
echo " out: $row->V_FLOAT\n";
}
if($row->V_INTEGER != $v_integer){
echo " INTEGER fail\n";
echo " in: $v_integer\n";
echo " out: $row->V_INTEGER\n";
}
ibase_free_result($sel);
}/* for($iter)*/
echo "select\n";
for($iter = 0; $iter < 3; $iter++){
/* prepare data */
$v_char = rand_str(1000);
$v_date = rand_datetime();
$v_decimal = rand_number(12,3);
$v_double = rand_number(20);
$v_float = rand_number(7);
$v_integer = rand_number(9,0);
$v_numeric = rand_number(4,2);
$v_smallint = rand_number(5) % 32767;
$v_varchar = rand_str(10000);
/* clear table*/
ibase_query("delete from test6");
/* make one record */
ibase_query("insert into test6
(iter, v_char,v_date,v_decimal,
v_integer,v_numeric,v_smallint,v_varchar)
values (666, '$v_char','$v_date',$v_decimal, $v_integer,
$v_numeric, $v_smallint, '$v_varchar')");
/* test all types */
if(!($sel = ibase_query(
"select iter from test6 where v_char = ?", $v_char)))
echo "CHAR fail\n";
ibase_free_result($sel);
if(!($sel = ibase_query(
"select iter from test6 where v_date = ?", $v_date)))
echo "DATE fail\n";
ibase_free_result($sel);
if(!($sel = ibase_query(
"select iter from test6 where v_decimal = ?", $v_decimal)))
echo "DECIMAL fail\n";
ibase_free_result($sel);
if(!($sel = ibase_query(
"select iter from test6 where v_integer = ?", $v_integer)))
echo "INTEGER fail\n";
ibase_free_result($sel);
if(!($sel = ibase_query(
"select iter from test6 where v_numeric = ?", $v_numeric)))
echo "NUMERIC fail\n";
ibase_free_result($sel);
if(!($sel = ibase_query(
"select iter from test6 where v_smallint = ?", $v_smallint)))
echo "SMALLINT fail\n";
ibase_free_result($sel);
if(!($sel = ibase_query(
"select iter from test6 where v_varchar = ?", $v_varchar)))
echo "VARCHAR fail\n";
ibase_free_result($sel);
}/*for iter*/
(iter,v_char,v_date,v_decimal,v_double,v_float,
v_integer,v_numeric,v_smallint,v_varchar)
values (?,?,?,?,?,?,?,?,?,?)",
$iter, $v_char, $v_date, $v_decimal, $v_double, $v_float,
$v_integer, $v_numeric, $v_smallint, $v_varchar);
$sel = ibase_query("select * from test6 where iter = $iter");
echo "prepare and exec insert\n";
$row = ibase_fetch_object($sel);
if(substr($row->V_CHAR,0,strlen($v_char)) != $v_char){
echo " CHAR fail:\n";
echo " in: $v_char\n";
echo " out: $row->V_CHAR\n";
}
if($row->V_DATE != $v_date){
echo " DATE fail\n";
echo " in: $v_date\n";
echo " out: $row->V_DATE\n";
}
if($row->V_DECIMAL != $v_decimal){
echo " DECIMAL fail\n";
echo " in: $v_decimal\n";
echo " out: $row->V_DECIMAL\n";
}
if(abs($row->V_DOUBLE - $v_double) > abs($v_double / 1E15)){
echo " DOUBLE fail\n";
echo " in: $v_double\n";
echo " out: $row->V_DOUBLE\n";
}
if(abs($row->V_FLOAT - $v_float) > abs($v_float / 1E7)){
echo " FLOAT fail\n";
echo " in: $v_float\n";
echo " out: $row->V_FLOAT\n";
}
if($row->V_INTEGER != $v_integer){
echo " INTEGER fail\n";
echo " in: $v_integer\n";
echo " out: $row->V_INTEGER\n";
}
if ($row->V_NUMERIC != $v_numeric){
echo " NUMERIC fail\n";
echo " in: $v_numeric\n";
echo " out: $row->V_NUMERIC\n";
}
if ($row->V_SMALLINT != $v_smallint){
echo " SMALLINT fail\n";
echo " in: $v_smallint\n";
echo " out: $row->V_SMALLINT\n";
}
if ($row->V_VARCHAR != $v_varchar){
echo " VARCHAR fail:\n";
echo " in: $v_varchar\n";
echo " out: $row->V_VARCHAR\n";
}
ibase_free_result($sel);
}/* for($iter)*/
echo "select\n";
for($iter = 0; $iter < 3; $iter++){
/* prepare data */
$v_char = rand_str(1000);
$v_date = rand_datetime();
$v_decimal = rand_number(12,3);
$v_double = rand_number(20);
$v_float = rand_number(7);
$v_integer = rand_number(9,0);
$v_numeric = rand_number(4,2);
$v_smallint = rand_number(5) % 32767;
$v_varchar = rand_str(10000);
/* clear table*/
ibase_query("delete from test6");
/* make one record */
ibase_query("insert into test6
(iter, v_char,v_date,v_decimal,
v_integer,v_numeric,v_smallint,v_varchar)
values (666, '$v_char','$v_date',$v_decimal, $v_integer,
$v_numeric, $v_smallint, '$v_varchar')");
/* test all types */
if(!($sel = ibase_query(
"select iter from test6 where v_char = ?", $v_char)))
echo "CHAR fail\n";
ibase_free_result($sel);
if(!($sel = ibase_query(
"select iter from test6 where v_date = ?", $v_date)))
echo "DATE fail\n";
ibase_free_result($sel);
if(!($sel = ibase_query(
"select iter from test6 where v_decimal = ?", $v_decimal)))
echo "DECIMAL fail\n";
ibase_free_result($sel);
if(!($sel = ibase_query(
"select iter from test6 where v_integer = ?", $v_integer)))
echo "INTEGER fail\n";
ibase_free_result($sel);
if(!($sel = ibase_query(
"select iter from test6 where v_numeric = ?", $v_numeric)))
echo "NUMERIC fail\n";
ibase_free_result($sel);
if(!($sel = ibase_query(
"select iter from test6 where v_smallint = ?", $v_smallint)))
echo "SMALLINT fail\n";
ibase_free_result($sel);
if(!($sel = ibase_query(
"select iter from test6 where v_varchar = ?", $v_varchar)))
echo "VARCHAR fail\n";
ibase_free_result($sel);
}/*for iter*/
echo "prepare and exec insert\n";
/* prepare table */
ibase_query("delete from test6");
/* prepare query */
$query = ibase_prepare(
"insert into test6 (v_integer) values (?)");
/* prepare query */
$query = ibase_prepare(
"insert into test6 (v_integer) values (?)");
for($i = 0; $i < 10; $i++)
for($i = 0; $i < 10; $i++)
ibase_execute($query, $i);
out_table("test6");
ibase_free_query($query);
echo "prepare and exec select\n";
out_table("test6");
/* prepare query */
$query = ibase_prepare("select * from test6
where v_integer between ? and ?");
ibase_free_query($query);
$low_border = 2;
$high_border = 6;
$res = ibase_execute($query, $low_border, $high_border);
out_result($res, "test6");
ibase_free_result($res);
echo "prepare and exec select\n";
$low_border = 0;
$high_border = 4;
$res = ibase_execute($query, $low_border, $high_border);
out_result($res, "test6");
ibase_free_result($res);
/* prepare query */
$query = ibase_prepare("select * from test6
where v_integer between ? and ?");
$res = ibase_execute($query, "5", 7.5);
out_result($res, "test6");
ibase_free_result($res);
$low_border = 2;
$high_border = 6;
ibase_free_query($query);
ibase_close();
echo "end of test\n";
$res = ibase_execute($query, $low_border, $high_border);
out_result($res, "test6");
ibase_free_result($res);
$low_border = 0;
$high_border = 4;
$res = ibase_execute($query, $low_border, $high_border);
out_result($res, "test6");
ibase_free_result($res);
$res = ibase_execute($query, "5", 7.5);
out_result($res, "test6");
ibase_free_result($res);
ibase_free_query($query);
ibase_close();
echo "end of test\n";
?>
--EXPECT--
insert
+13 -6
View File
@@ -374,7 +374,7 @@ PHP_FUNCTION(ldap_connect)
#endif
if (LDAPG(max_links) != -1 && LDAPG(num_links) >= LDAPG(max_links)) {
php_error(E_WARNING, "%s(): Too many open links (%d)", get_active_function_name(TSRMLS_C), LDAPG(num_links));
php_error(E_WARNING, "%s(): Too many open links (%ld)", get_active_function_name(TSRMLS_C), LDAPG(num_links));
RETURN_FALSE;
}
@@ -1208,7 +1208,10 @@ PHP_FUNCTION(ldap_explode_dn)
convert_to_string_ex(dn);
convert_to_long_ex(with_attrib);
ldap_value = ldap_explode_dn(Z_STRVAL_PP(dn), Z_LVAL_PP(with_attrib));
if (!(ldap_value = ldap_explode_dn(Z_STRVAL_PP(dn), Z_LVAL_PP(with_attrib)))) {
/* Invalid parameters were passed to ldap_explode_dn */
RETURN_FALSE;
}
i=0;
while(ldap_value[i] != NULL) i++;
@@ -1601,7 +1604,7 @@ PHP_FUNCTION(ldap_get_option)
RETURN_FALSE;
}
zval_dtor(*retval);
ZVAL_LONG(*retval, val);
ZVAL_LONG(*retval, val);
} break;
/* options with string value */
case LDAP_OPT_HOST_NAME:
@@ -1609,9 +1612,13 @@ PHP_FUNCTION(ldap_get_option)
#ifdef LDAP_OPT_MATCHED_DN
case LDAP_OPT_MATCHED_DN:
#endif
{
char *val;
if (ldap_get_option(ld->link, opt, &val)) {
{
char *val = NULL;
if (ldap_get_option(ld->link, opt, &val) || val == NULL || *val == '\0') {
if (val) {
ldap_memfree(val);
}
RETURN_FALSE;
}
zval_dtor(*retval);
+3 -1
View File
@@ -3,7 +3,9 @@ dnl $Id$
dnl
PHP_ARG_ENABLE(mbstring, whether to enable multibyte string support,
[ --enable-mbstring Enable multibyte string support])
[ --enable-mbstring[=LANG]
Enable multibyte string support.
LANG can be any one of ja, cn, tw, kr, ru, or "all".])
if test "$PHP_MBSTRING" != "no"; then
AC_DEFINE(HAVE_MBSTRING,1,[whether to have multibyte string support])
+5 -1
View File
@@ -23,6 +23,10 @@
#include "php.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#if HAVE_MBREGEX
#define re_compile_pattern mbre_compile_pattern
@@ -3322,7 +3326,7 @@ re_search(bufp, string, size, startpos, range, regs)
}
}
if (bufp->options & MBRE_OPTIMIZE_ANCHOR) {
if (bufp->options&MBRE_OPTION_SINGLELINE) {
if (bufp->options&MBRE_OPTION_MULTILINE && range > 0) {
goto begbuf_match;
}
anchor = 1;
+50 -39
View File
@@ -191,8 +191,12 @@ struct def_mbctype_tbl {
const struct def_mbctype_tbl mbctype_tbl[] = {
{mbfl_no_encoding_ascii,MBCTYPE_ASCII},
{mbfl_no_encoding_7bit,MBCTYPE_ASCII},
{mbfl_no_encoding_8bit,MBCTYPE_ASCII},
{mbfl_no_encoding_euc_jp,MBCTYPE_EUC},
{mbfl_no_encoding_eucjp_win,MBCTYPE_EUC},
{mbfl_no_encoding_sjis,MBCTYPE_SJIS},
{mbfl_no_encoding_sjis_win,MBCTYPE_SJIS},
{mbfl_no_encoding_utf8,MBCTYPE_UTF8},
{mbfl_no_encoding_pass,-1}
};
@@ -516,45 +520,12 @@ php_mbregex_free_cache(mb_regex_t *pre)
static PHP_INI_MH(OnUpdate_mbstring_language)
{
enum mbfl_no_language no_language;
char *default_enc = NULL;
no_language = mbfl_name2no_language(new_value);
if (no_language != mbfl_no_language_invalid) {
MBSTRG(language) = no_language;
switch (no_language) {
case mbfl_no_language_uni:
default_enc = "UTF-8";
break;
case mbfl_no_language_japanese:
default_enc = "EUC-JP";
break;
case mbfl_no_language_korean:
default_enc = "EUC-KR";
break;
case mbfl_no_language_simplified_chinese:
default_enc = "EUC-CN";
break;
case mbfl_no_language_traditional_chinese:
default_enc = "EUC-TW";
break;
case mbfl_no_language_russian:
default_enc = "KOI8-R";
break;
case mbfl_no_language_english:
default:
default_enc = "ISO-8859-1";
break;
}
MBSTRG(current_language) = MBSTRG(language);
if (default_enc) {
zend_alter_ini_entry("mbstring.internal_encoding",
sizeof("mbstring.internal_encoding"),
default_enc, strlen(default_enc),
PHP_INI_PERDIR, stage);
}
} else {
if (no_language == mbfl_no_language_invalid) {
return FAILURE;
}
MBSTRG(language) = no_language;
return SUCCESS;
}
/* }}} */
@@ -623,6 +594,9 @@ static PHP_INI_MH(OnUpdate_mbstring_internal_encoding)
#if HAVE_MBREGEX
const struct def_mbctype_tbl *p = NULL;
#endif
if (new_value == NULL) {
return SUCCESS;
}
no_encoding = mbfl_name2no_encoding(new_value);
if (no_encoding != mbfl_no_encoding_invalid) {
@@ -720,7 +694,7 @@ PHP_INI_BEGIN()
PHP_INI_ENTRY("mbstring.detect_order", NULL, PHP_INI_ALL, OnUpdate_mbstring_detect_order)
PHP_INI_ENTRY("mbstring.http_input", "pass", PHP_INI_ALL, OnUpdate_mbstring_http_input)
PHP_INI_ENTRY("mbstring.http_output", "pass", PHP_INI_ALL, OnUpdate_mbstring_http_output)
PHP_INI_ENTRY("mbstring.internal_encoding", "none", PHP_INI_ALL, OnUpdate_mbstring_internal_encoding)
PHP_INI_ENTRY("mbstring.internal_encoding", NULL, PHP_INI_ALL, OnUpdate_mbstring_internal_encoding)
#ifdef ZEND_MULTIBYTE
PHP_INI_ENTRY("mbstring.script_encoding", NULL, PHP_INI_ALL, OnUpdate_mbstring_script_encoding)
#endif /* ZEND_MULTIBYTE */
@@ -740,7 +714,7 @@ php_mb_init_globals(zend_mbstring_globals *pglobals TSRMLS_DC)
{
MBSTRG(language) = mbfl_no_language_uni;
MBSTRG(current_language) = MBSTRG(language);
MBSTRG(internal_encoding) = mbfl_no_encoding_pass;
MBSTRG(internal_encoding) = mbfl_no_encoding_invalid;
MBSTRG(current_internal_encoding) = MBSTRG(internal_encoding);
#ifdef ZEND_MULTIBYTE
MBSTRG(script_encoding_list) = NULL;
@@ -875,6 +849,44 @@ PHP_RINIT_FUNCTION(mbstring)
const struct mb_overload_def *p;
MBSTRG(current_language) = MBSTRG(language);
if (MBSTRG(internal_encoding) == mbfl_no_encoding_invalid) {
char *default_enc = NULL;
switch (MBSTRG(current_language)) {
case mbfl_no_language_uni:
default_enc = "UTF-8";
break;
case mbfl_no_language_japanese:
default_enc = "EUC-JP";
break;
case mbfl_no_language_korean:
default_enc = "EUC-KR";
break;
case mbfl_no_language_simplified_chinese:
default_enc = "EUC-CN";
break;
case mbfl_no_language_traditional_chinese:
default_enc = "EUC-TW";
break;
case mbfl_no_language_russian:
default_enc = "KOI8-R";
break;
case mbfl_no_language_german:
default_enc = "ISO-8859-15";
break;
case mbfl_no_language_english:
default:
default_enc = "ISO-8859-1";
break;
}
if (default_enc) {
zend_alter_ini_entry("mbstring.internal_encoding",
sizeof("mbstring.internal_encoding"),
default_enc, strlen(default_enc),
PHP_INI_PERDIR, PHP_INI_STAGE_RUNTIME);
}
}
MBSTRG(current_internal_encoding) = MBSTRG(internal_encoding);
MBSTRG(current_http_output_encoding) = MBSTRG(http_output_encoding);
MBSTRG(current_filter_illegal_mode) = MBSTRG(filter_illegal_mode);
@@ -2477,7 +2489,7 @@ MBSTRING_API char * php_mb_convert_encoding(char *input, size_t length, char *_t
if (output_len) {
*output_len = 0;
}
if ( !input || !length) {
if (!input) {
return NULL;
}
/* new encoding */
@@ -3684,7 +3696,6 @@ MBSTRING_API int php_mb_gpc_encoding_converter(char **str, int *len, const char
MBSTRING_API int php_mb_gpc_encoding_detector(const char *arg_string, int arg_length, char *arg_list TSRMLS_DC)
{
mbfl_string string;
const char *ret;
enum mbfl_no_encoding *elist;
enum mbfl_no_encoding encoding;
+20 -5
View File
@@ -94,7 +94,8 @@ static int _php_mb_regex_name2mbctype(const char *pname)
|| strcasecmp("X-EUC-JP", pname) == 0
|| strcasecmp("UJIS", pname) == 0
|| strcasecmp("EUCJP", pname) == 0
|| strcasecmp("EUC_JP", pname) == 0) {
|| strcasecmp("EUC_JP", pname) == 0
|| strcasecmp("EUCJP-WIN", pname) == 0) {
mbctype = MBCTYPE_EUC;
} else if (strcasecmp("UTF-8", pname) == 0
|| strcasecmp("UTF8", pname) == 0) {
@@ -102,7 +103,8 @@ static int _php_mb_regex_name2mbctype(const char *pname)
} else if (strcasecmp("SJIS", pname) == 0
|| strcasecmp("CP932", pname) == 0
|| strcasecmp("MS932", pname) == 0
|| strcasecmp("SHIFT_JIS", pname) == 0 ) {
|| strcasecmp("SHIFT_JIS", pname) == 0
|| strcasecmp("SJIS-WIN", pname) == 0) {
mbctype = MBCTYPE_SJIS;
} else if (strcasecmp("ASCII", pname) == 0) {
mbctype = MBCTYPE_ASCII;
@@ -507,7 +509,7 @@ _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, int option)
}
if (err >= 0) {
#if moriyoshi_0
if ( regs.beg[0] == regs.end[0] ) {
if (regs.beg[0] == regs.end[0]) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty regular expression");
break;
}
@@ -552,12 +554,16 @@ _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, int option)
if (pos < n) {
pos = n;
} else {
_php_mb_regex_strbuf_ncat(&outdev, (const unsigned char *)&string[pos], 1 );
if (pos < string_len) {
_php_mb_regex_strbuf_ncat(&outdev, (const unsigned char *)&string[pos], 1);
}
pos++;
}
} else { /* nomatch */
/* stick that last bit of string on our output */
_php_mb_regex_strbuf_ncat(&outdev, (const unsigned char *)&string[pos], string_len - pos);
if (pos < string_len) {
_php_mb_regex_strbuf_ncat(&outdev, (const unsigned char *)&string[pos], string_len - pos);
}
}
}
@@ -1083,3 +1089,12 @@ PHP_FUNCTION(mb_regex_set_options)
/* }}} */
#endif /* HAVE_MBREGEX */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: fdm=marker
* vim: noet sw=4 ts=4
*/
+10
View File
@@ -0,0 +1,10 @@
--TEST--
Bug #25140 (mb_convert_encoding returns FALSE on an empty string)
--SKIPIF--
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--FILE--
<?php
var_dump( mb_convert_encoding( '', 'SJIS', 'EUC-JP' ) );
?>
--EXPECT--
string(0) ""
+2 -2
View File
@@ -11,5 +11,5 @@ var_dump(ini_get('mbstring.internal_encoding'));
var_dump(mb_internal_encoding());
?>
--EXPECT--
string(6) "EUC-JP"
string(6) "EUC-JP"
string(9) "Shift_JIS"
string(4) "SJIS"
+1
View File
@@ -4,6 +4,7 @@ mb_http_input()
<?php
extension_loaded('mbstring') or die('skip mbstring not available');
(php_sapi_name()=='cgi') or die("skip sapi is not a cgi version");
die("skip disabled temporarily");
?>
--POST--
a=日本語0123456789日本語カタカナひらがな
+1 -1
View File
@@ -7,7 +7,7 @@ if (@mb_send_mail() === false || !mb_language("neutral")) {
}
?>
--INI--
sendmail_path=cat
sendmail_path=/bin/cat
--FILE--
<?php
$to = 'example@example.com';
+1 -1
View File
@@ -7,7 +7,7 @@ if (@mb_send_mail() === false || !mb_language("japanese")) {
}
?>
--INI--
sendmail_path=cat
sendmail_path=/bin/cat
--FILE--
<?php
$to = 'example@example.com';
+1 -1
View File
@@ -7,7 +7,7 @@ if (@mb_send_mail() === false || !mb_language("english")) {
}
?>
--INI--
sendmail_path=cat
sendmail_path=/bin/cat
--FILE--
<?php
$to = 'example@example.com';
+1 -1
View File
@@ -7,7 +7,7 @@ if (@mb_send_mail() === false || !mb_language("german")) {
}
?>
--INI--
sendmail_path=cat
sendmail_path=/bin/cat
--FILE--
<?php
$to = 'example@example.com';
+1 -1
View File
@@ -10,7 +10,7 @@ if (!@mb_internal_encoding('GB2312')) {
}
?>
--INI--
sendmail_path=cat
sendmail_path=/bin/cat
--FILE--
<?php
$to = 'example@example.com';
+1 -1
View File
@@ -10,7 +10,7 @@ if (!@mb_internal_encoding('BIG5')) {
}
?>
--INI--
sendmail_path=cat
sendmail_path=/bin/cat
--FILE--
<?php
$to = 'example@example.com';
+41
View File
@@ -0,0 +1,41 @@
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
+33
View File
@@ -0,0 +1,33 @@
--TEST--
php-users@php.gr.jp #16242
--SKIPIF--
<?php
extension_loaded('mbstring') or die('skip mbstring not available');
?>
--FILE--
<?php
$ini = <<< HERE
mbstring.language=Japanese
mbstring.internal_encoding=UTF-8
HERE;
$tmpfile = tempnam(dirname(__FILE__), "t");
$fp = fopen($tmpfile, 'w');
fwrite($fp, $ini);
fclose($fp);
$cmd = 'echo "<?php ';
$cmd .= "var_dump(ini_get('mbstring.language'));";
$cmd .= "var_dump(ini_get('mbstring.internal_encoding'));";
$cmd .= 'var_dump(mb_internal_encoding());';
$cmd .= ' ?>" |'.getenv("TEST_PHP_EXECUTABLE").' -c '.$tmpfile;
system($cmd);
unlink($tmpfile);
?>
--EXPECT--
string(8) "Japanese"
string(5) "UTF-8"
string(5) "UTF-8"
@@ -0,0 +1,18 @@
--TEST--
php-dev@php.gr.jp #884 (1)
--SKIPIF--
<?php
extension_loaded('mbstring') or die('skip mbstring not available');
function_exists('mb_ereg_replace') or die("skip mb_ereg_replace() is not available in this build");
?>
--FILE--
<?php
set_time_limit(2);
var_dump(ereg_replace(".*", "b", "a"));
var_dump(preg_replace("/.*/", "b", "a"));
var_dump(mb_ereg_replace(".*", "b", "a"));
?>
--EXPECT--
string(2) "bb"
string(2) "bb"
string(2) "bb"
@@ -0,0 +1,19 @@
--TEST--
php-dev@php.gr.jp #884 (2)
--SKIPIF--
<?php
extension_loaded('mbstring') or die('skip mbstring not available');
function_exists('mb_ereg_replace') or die("skip mb_ereg_replace() is not available in this build");
?>
--FILE--
<?php
var_dump(mb_ereg_replace("C?$", "Z", "ABC"));
var_dump(ereg_replace("C?$", "Z", "ABC"));
var_dump(mb_ereg_replace("C*$", "Z", "ABC"));
var_dump(ereg_replace("C*$", "Z", "ABC"));
?>
--EXPECT--
string(4) "ABZZ"
string(4) "ABZZ"
string(4) "ABZZ"
string(4) "ABZZ"
+4 -6
View File
@@ -6,10 +6,8 @@ PHP_ARG_WITH(mcrypt, for mcrypt support,
[ --with-mcrypt[=DIR] Include mcrypt support.])
if test "$PHP_MCRYPT" != "no"; then
for i in /usr/local /usr $PHP_MCRYPT; do
if test -f $i/include/mcrypt.h; then
MCRYPT_DIR=$i
fi
for i in $PHP_MCRYPT /usr/local /usr; do
test -f $i/include/mcrypt.h && MCRYPT_DIR=$i && break
done
if test -z "$MCRYPT_DIR"; then
@@ -57,8 +55,8 @@ if test "$PHP_MCRYPT" != "no"; then
PHP_ADD_LIBRARY_WITH_PATH(mcrypt, $MCRYPT_DIR/lib, MCRYPT_SHARED_LIBADD)
PHP_ADD_INCLUDE($MCRYPT_DIR/include)
AC_DEFINE(HAVE_LIBMCRYPT,1,[ ])
PHP_SUBST(MCRYPT_SHARED_LIBADD)
PHP_NEW_EXTENSION(mcrypt, mcrypt.c, $ext_shared)
PHP_SUBST(MCRYPT_SHARED_LIBADD)
AC_DEFINE(HAVE_LIBMCRYPT,1,[ ])
fi
+1 -1
View File
@@ -13,7 +13,7 @@
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Sascha Schumann <sascha@schumann.cx> |
| Derick Rethans <d.rethans@jdimedia.nl> |
| Derick Rethans <derick@derickrethans.nl> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
+1 -1
View File
@@ -13,7 +13,7 @@
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Sascha Schumann <sascha@schumann.cx> |
| Derick Rethans <d.rethans@jdimedia.nl> |
| Derick Rethans <derick@derickrethans.nl> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
+54 -11
View File
@@ -1,25 +1,68 @@
dnl config.m4 for PHP4 MCVE Extension
PHP_ARG_WITH(mcve, for MCVE support,
[ --with-mcve[=DIR] Include MCVE support])
[ --with-mcve[=DIR] Include MCVE support. libmcve >= 3.2.2 required])
PHP_ARG_WITH(openssl-dir,OpenSSL dir for MCVE,
[ --with-openssl-dir[=DIR] MCVE: openssl install prefix.], no, no)
if test "$PHP_MCVE" != "no"; then
if test -r $PHP_MCVE/include/mcve.h; then
MCVE_DIR=$PHP_MCVE
else
for i in /usr /usr/local /usr/local/mcve ; do
if test -r $i/include/mcve.h; then
MCVE_DIR=$i
fi
done
if test "$PHP_OPENSSL_DIR" != "no"; then
PHP_OPENSSL=$PHP_OPENSSL_DIR
PHP_SETUP_OPENSSL(SNMP_SHARED_LIBADD, [], [
AC_MSG_ERROR([MCVE: OpenSSL check failed. Please check config.log for more information.])
])
else
AC_MSG_RESULT([If configure fails, try adding --with-openssl-dir=<DIR>])
fi
case "$PHP_MCVE" in
yes [)]
for i in /usr/local/mcve /usr/local /usr; do
if test -r $i/include/mcve.h; then
MCVE_DIR=$i
break
fi
done
;;
* [)]
test -r "$PHP_MCVE/include/mcve.h" && MCVE_DIR=$PHP_MCVE
;;
esac
if test -z "$MCVE_DIR"; then
AC_MSG_ERROR(not found. Please check your MCVE installation; mcve.h NOT FOUND)
AC_MSG_ERROR([mcve.h NOT FOUND. Please check your MCVE installation.])
fi
dnl Check version (M_EXPORT exists in >= 3.2.2)
saved_CPPFLAGS=$CPPFLAGS
AC_MSG_CHECKING([for correct libmcve version])
AC_EGREP_CPP(yes,[
#include "$MCVE_DIR/include/mcve.h"
#ifdef M_EXPORT
yes
#endif
],[
AC_MSG_RESULT([ok])
],[
AC_MSG_ERROR([libmcve 3.2.2 or greater required.])
])
CPPFLAGS=$saved_CPPFLAGS
PHP_ADD_INCLUDE($MCVE_DIR/include)
PHP_ADD_LIBRARY_WITH_PATH(mcve, $MCVE_DIR/lib, MCVE_SHARED_LIBADD)
dnl Build test
PHP_CHECK_LIBRARY(mcve, MCVE_DestroyEngine,
[
AC_DEFINE(HAVE_MCVE, 1, [ ])
], [
AC_MSG_ERROR([MCVE: Sanity check failed. Please check config.log for more information.])
], [
$MCVE_SHARED_LIBADD
])
PHP_NEW_EXTENSION(mcve, mcve.c, $ext_shared)
PHP_SUBST(MCVE_SHARED_LIBADD)
fi
+23 -6
View File
@@ -19,8 +19,15 @@
/* $Id$ */
/* standard php include(s) */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "php.h"
#if HAVE_MCVE
/* standard php include(s) */
#include "ext/standard/head.h"
#include "ext/standard/php_standard.h"
#include "ext/standard/info.h"
@@ -39,8 +46,7 @@ static int mcve_init; /* For Safe Memory Deallocation */
/* }}} */
/* {{{ extension definition structures */
static unsigned char second_arg_force_ref[] = { 2, BYREF_NONE, BYREF_FORCE };
static unsigned char second_args_force_ref[] = { 2, BYREF_NONE, BYREF_FORCE };
function_entry mcve_functions[] = {
PHP_FE(mcve_initengine, NULL)
PHP_FE(mcve_initconn, NULL)
@@ -77,7 +83,7 @@ function_entry mcve_functions[] = {
PHP_FE(mcve_monitor, NULL)
PHP_FE(mcve_transinqueue, NULL)
PHP_FE(mcve_checkstatus, NULL)
PHP_FE(mcve_completeauthorizations, second_arg_force_ref)
PHP_FE(mcve_completeauthorizations, second_args_force_ref)
PHP_FE(mcve_sale, NULL)
PHP_FE(mcve_preauth, NULL)
PHP_FE(mcve_void, NULL)
@@ -148,7 +154,7 @@ ZEND_GET_MODULE(mcve)
#endif
/* {{{ MCVE_CONN destructor */
static void _free_mcve_conn(zend_rsrc_list_entry *rsrc)
static void _free_mcve_conn(zend_rsrc_list_entry *rsrc TSRMLS_DC)
{
MCVE_CONN *conn;
@@ -503,16 +509,25 @@ PHP_FUNCTION(mcve_deletetrans)
Destroy the connection and MCVE_CONN structure */
PHP_FUNCTION(mcve_destroyconn)
{
#if 0
MCVE_CONN *conn;
#endif
zval **arg;
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE)
WRONG_PARAM_COUNT;
/* If MCVE_DestroyConn() is called within a PHP script, the Resource handle is
never cleared, as there does not appear to be an UNREGISTER or DESTROY resource
call in the Zend API. What happens is this uninitialized memory location is
passed again to the MCVE_DestroyConn() function at script exit (cleanup), and
causes weird stuff. So we just go ahead and let the PHP garbage collector call
our _free_mcve_conn() we registered (le_conn) to clean up */
#if 0
ZEND_FETCH_RESOURCE(conn, MCVE_CONN *, arg, -1, "mcve connection", le_conn);
MCVE_DestroyConn(conn);
#endif
RETURN_TRUE;
}
/* }}} */
@@ -2243,6 +2258,8 @@ PHP_FUNCTION(mcve_text_cv)
}
/* }}} */
#endif
/* END OF MCVE PHP EXTENSION */
/*
+107
View File
@@ -0,0 +1,107 @@
# Microsoft Developer Studio Project File - Name="mcve" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=mcve - Win32 Debug_TS
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "mcve.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "mcve.mak" CFG="mcve - Win32 Debug_TS"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "mcve - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "mcve - Win32 Debug_TS" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "mcve - Win32 Release_TS"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release_TS"
# PROP BASE Intermediate_Dir "Release_TS"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release_TS"
# PROP Intermediate_Dir "Release_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MCVE_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\TSRM" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_MCVE" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_MCVE=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"
# ADD RSC /l 0x407 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# 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 php4ts.lib libmcve.lib ssleay32.lib libeay32.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 /machine:I386 /out:"..\..\Release_TS/php_mcve.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline"
!ELSEIF "$(CFG)" == "mcve - Win32 Debug_TS"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug_TS"
# PROP BASE Intermediate_Dir "Debug_TS"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug_TS"
# PROP Intermediate_Dir "Debug_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "mcve_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\TSRM" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_MCVE" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_MCVE=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"
# ADD RSC /l 0x407 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# 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 php4ts_debug.lib libmcve.lib ssleay32.lib libeay32.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 /debug /machine:I386 /out:"..\..\Debug_TS/php_mcve.dll" /pdbtype:sept /libpath:"..\..\Debug_TS"
!ENDIF
# Begin Target
# Name "mcve - Win32 Release_TS"
# Name "mcve - Win32 Debug_TS"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\mcve.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\php_mcve.h
# End Source File
# End Group
# End Target
# End Project
+5 -7
View File
@@ -6,20 +6,18 @@ PHP_ARG_WITH(mhash, for mhash support,
[ --with-mhash[=DIR] Include mhash support.])
if test "$PHP_MHASH" != "no"; then
for i in /usr/local /usr /opt/mhash $PHP_MHASH; do
if test -f $i/include/mhash.h; then
MHASH_DIR=$i
fi
for i in $PHP_MHASH /usr/local /usr /opt/mhash; do
test -f $i/include/mhash.h && MHASH_DIR=$i && break
done
if test -z "$MHASH_DIR"; then
AC_MSG_ERROR(Please reinstall libmhash - I cannot find mhash.h)
fi
PHP_ADD_INCLUDE($MHASH_DIR/include)
PHP_ADD_LIBRARY_WITH_PATH(mhash, $MHASH_DIR/lib, MHASH_SHARED_LIBADD)
PHP_SUBST(MHASH_SHARED_LIBADD)
AC_DEFINE(HAVE_LIBMHASH,1,[ ])
PHP_NEW_EXTENSION(mhash, mhash.c, $ext_shared)
PHP_SUBST(MHASH_SHARED_LIBADD)
AC_DEFINE(HAVE_LIBMHASH,1,[ ])
fi
+3 -2
View File
@@ -3,8 +3,9 @@ dnl $Id$
dnl
PHP_ARG_WITH(mime-magic, whether to include mime_magic support,
[ --with-mime-magic[=FILE] Include mime_magic support. FILE is the optional
pathname to the magic.mime file.])
[ --with-mime-magic[=FILE]
Include mime_magic support. FILE is the optional
pathname to the magic.mime file.])
if test "$PHP_MIME_MAGIC" != "no"; then
Loaded 100 of 311 files, more files were not shown because too many files have changed in this diff. Show more