Compare commits

...
4605 Commits
Author SHA1 Message Date
SVN Migration 674328d1fa This commit was manufactured by cvs2svn to create tag 'php_4_1_2'. 2002-02-27 09:06:34 +00:00
Zeev Suraski ef03277c51 Go with 4.1.2 2002-02-27 09:06:33 +00:00
Derick Rethans 02cc197a77 - Bring error message back 2002-02-26 19:32:52 +00:00
Rasmus Lerdorf 253b53296c There are no fdf changes in this branch as far as I can see. Not
sure where this NEWS item came from.
2002-02-26 18:01:37 +00:00
Rasmus Lerdorf 40796e5be2 Remove gd NEWS item 2002-02-26 17:55:33 +00:00
Rasmus Lerdorf bcdbc527b6 This line makes no sense to me 2002-02-26 17:52:36 +00:00
Zeev Suraski 7e5fd5048a Beautify 2002-02-26 17:46:15 +00:00
Yasuo Ohgaki 2da6392297 Fix pspell function entry 2002-02-25 23:00:11 +00:00
Yasuo Ohgaki 5ead13b0d7 Add news for mm save handler and multiple SAPI start up problem fix 2002-02-25 00:25:07 +00:00
Yasuo Ohgaki e0108f79e1 MFH
- Fixed CGI (or other SAPI) start up failure when mm save handler is used
# More fixes will be merged when I commit session & output control patch
2002-02-25 00:21:14 +00:00
Rui Hirokawa d28453af34 NEWS updated. 2002-02-23 08:36:11 +00:00
Rui Hirokawa bb369d7f91 - fixed configuration problem as shared extension for fdf.
- fixed configuration problem as shared extension for gd with freetype1.
- default output encoding of mbstring changed to pass to fix initialization problem.
2002-02-23 02:01:41 +00:00
Rasmus Lerdorf f8159f4f20 Keep track of what has gone into 4.1.2 so far 2002-02-22 18:00:22 +00:00
Yasuo Ohgaki f7a54490c0 Fix crash bug. 4th parameter is not incremental value, but it's assigned.
# Are we going to have 4.1.2?
2002-02-22 15:01:20 +00:00
Stefan Esser d1336b2fce fixing boundary check before someone other does it... 2002-02-21 18:46:45 +00:00
Yasuo Ohgaki cfe1d84628 MFH 2002-02-03 00:38:00 +00:00
Stefan Esser 882415354a MFH: fix for bug #14776 2002-01-14 13:43:03 +00:00
Yasuo Ohgaki c4f239e6ab Revert last commit 2002-01-10 08:48:23 +00:00
Yasuo Ohgaki 3ea732bb4f MFH 2002-01-10 06:15:46 +00:00
Yasuo Ohgaki f4a3603d48 MFH.
Bugs 10530,10656,14784
2002-01-09 08:40:13 +00:00
Yasuo Ohgaki 2da3aa1e3c MFH
# Disable bogus error message when external session save handler
# (mm, msession, pgsql) is specified in php.ini.
# This is not a real fix, but a tmp workaround.
2002-01-07 08:20:08 +00:00
Yasuo Ohgaki debfb9626c Fix crash (MFH) 2001-12-30 01:44:17 +00:00
Markus Fischer 647ecadc0e - MFH fix for crash in get_defined_constants(). 2001-12-27 01:10:08 +00:00
Derick Rethans 3256f775cd - MFH for bug 14690 2001-12-26 10:36:11 +00:00
Derick Rethans e5f7ed8d21 - MFH: Remove redundant code 2001-12-25 16:35:41 +00:00
Derick Rethans 1e5919277c - Fix for bug 14691: Invalidate mcrypt resource if the key size is 0 2001-12-25 16:31:44 +00:00
Derick Rethans 5385e1f258 - Last fixes to NEWS 2001-12-23 01:27:41 +00:00
Zeev Suraski 0f958cdf3b Update NEWS 2001-12-22 03:14:18 +00:00
Zeev Suraski e835de81f2 MFH 2001-12-22 03:12:37 +00:00
Derick Rethans 05fc73701f - More cleanup 2001-12-21 13:31:57 +00:00
Derick Rethans e28724787b - Typo 2001-12-21 13:20:54 +00:00
Derick Rethans 0e5b273b0f Go with 4.1.1 2001-12-20 21:18:34 +00:00
Derick Rethans 7e15bdcb58 Make it look purty 2001-12-17 21:41:09 +00:00
Derick Rethans 25fa7f7411 MFH 2001-12-17 21:19:51 +00:00
Derick Rethans adffaad9f4 MFH backward compability issues with libmcrypt 2001-12-17 20:23:38 +00:00
Stefan Esser e2fb9282aa fixed: fix for my broken patch 2001-12-16 23:20:07 +00:00
Derick Rethans f04e7b251c - More MHFs 2001-12-16 22:41:36 +00:00
Derick Rethans dfa94d4b9f Update NEWS 2001-12-16 22:32:42 +00:00
Stefan Esser 2fdac23dfb whitespace. 2001-12-16 21:46:20 +00:00
Stefan Esser 86bb6388c0 MFH : one byte heap corruption fixed 2001-12-16 21:41:25 +00:00
Derick Rethans 0215d17907 Make this compile again 2001-12-16 19:06:20 +00:00
Stefan Esser 2c25be52f4 MFH : fixed bufferoverflow in sapi_add_header_ex 2001-12-16 16:09:04 +00:00
Derick Rethans b337bf3f97 MFH for bug #14??? (pow() thing) 2001-12-16 11:05:28 +00:00
Derick Rethans f63dd3cc7e - MFH for bug 14162 2001-12-15 13:19:37 +00:00
Markus Fischer bb31b98137 - MFH fix for possible crash in xslt_set_scheme_handlers() with
invalid handler names.
2001-12-15 13:08:24 +00:00
Derick Rethans a686d91177 - MFH crash bug fix in xslt_error 2001-12-15 12:30:24 +00:00
Sebastian Bergmann 34f95edd9b Change version to 4.1.1-dev. 2001-12-14 12:23:49 +00:00
Markus Fischer f5ce52c8f1 - MFH bug fixes. 2001-12-14 10:45:46 +00:00
Vlad Krupin 6a92f0dcc5 MFH 2001-12-14 10:21:04 +00:00
Sterling Hughes 0d46db0ded the datetime.c fixes 2001-12-14 10:14:16 +00:00
Sterling Hughes 5ba92f6b53 MFH'ed::
use zval macro's (not exactly necessary, but not harmful).
    jmoore's fix for timezones.
2001-12-14 10:08:43 +00:00
Sterling Hughes 6b13a53a20 Derick MFH'ed 2001-12-14 10:03:42 +00:00
Derick Rethans 31be1c0ce1 - Remove debug crap 2001-12-13 21:11:32 +00:00
Derick Rethans 605e8a0502 - MFH for bugs 10324, 12777, 14488, 13399 and probably 13239 2001-12-13 21:04:57 +00:00
Sterling Hughes a9914c9a99 Fix mcrypt compile on systems that don't have mcrypt 2001-12-13 16:23:59 +00:00
Sterling Hughes 52a26baead MFH 2001-12-13 13:51:42 +00:00
Sterling Hughes e152dd3cee MFH timezone fix 2001-12-13 12:17:32 +00:00
Zeev Suraski cbce251dab Go with 4.1.0 2001-12-10 15:21:43 +00:00
Zeev Suraski c939250414 Go with 4.1.0 2001-12-09 23:02:07 +00:00
Zeev Suraski a36c434dbb MFH - fix unbuffered queries 2001-12-09 13:53:56 +00:00
Thies C. Arntzen 8e46600166 fix #13801 (imap_rfc822_parse_adrlist changes arg1) 2001-12-07 16:47:59 +00:00
Derick Rethans d07a60c3d0 - MFH for the session fix 2001-12-06 14:23:29 +00:00
Zeev Suraski 0858af07ec Here we go again 2001-12-03 10:56:13 +00:00
Sterling Hughes a096235f8f MFH 2001-12-03 09:26:02 +00:00
Sterling Hughes 8244f0f628 No need to create this, automatically done (automagically even) by
call_user_function_ex()
2001-12-03 08:12:18 +00:00
SVN Migration 3cdc24790e This commit was manufactured by cvs2svn to create branch 'PHP_4_0_7'. 2001-12-02 21:17:56 +00:00
Thies C. Arntzen 80df8e6b0a MFH
fix for $_SESSION
!!! please TEST, TEST, TEST !!!
2001-12-02 12:21:54 +00:00
Thies C. Arntzen b228115b64 fix problem when __sleep() returned non-existant variables 2001-12-01 15:22:24 +00:00
Stig Venaas cdedea01c1 Fixing ldap_first/next_attribute() 2001-12-01 14:17:43 +00:00
Thies C. Arntzen c0e263c1a1 MFH - make sockets extension usable 2001-11-30 18:18:01 +00:00
Zeev Suraski 91889eeb93 go with RC4 2001-11-30 14:44:56 +00:00
Sterling Hughes 5c74aa0f0f Cleanup the function entries a tidbit 2001-11-30 09:04:49 +00:00
Zeev Suraski 501aa09789 Prepare 4.1.0 2001-11-25 22:47:50 +00:00
Rui Hirokawa 16d5e9f108 restriction is relaxed because output handler couldn't be used even if zlib.output_compression is set to off. 2001-11-23 02:37:27 +00:00
Derick Rethans 195a756477 - MFH crash bug in shm_remove (not critical enough to include in the release,
but critical enough to MFH)
2001-11-22 14:35:55 +00:00
Derick Rethans 09fb81a8f3 - MFH for crash bug #14169
#- IMO, this should be included in the release. The fix has little impact
#  on the release in a whole.
2001-11-22 07:49:46 +00:00
Sebastian Bergmann 21ff8ec819 MFH (Remove sablot from php_modules.dsw, its no longer in repository) 2001-11-20 18:18:57 +00:00
Sterling Hughes 6d1374480e Temporary fix not for the HEAD branch, this is the only way to avoid the
segfault and *really* not fuck up the release cycle
2001-11-20 11:55:34 +00:00
Sterling Hughes 7e33f0b17b MFH latest cURL fixes, these are tested and important 2001-11-20 11:32:50 +00:00
Zeev Suraski 0be29a4861 Go with final RC 2001-11-19 20:53:26 +00:00
Derick Rethans bcf3204bd3 - Add bugfix 2001-11-19 15:19:39 +00:00
Zeev Suraski dee465139f MFH 2001-11-19 15:00:42 +00:00
foobar f5b7714238 MFH 2001-11-19 00:52:02 +00:00
foobar 747258e34f MFH 2001-11-18 23:54:57 +00:00
Derick Rethans 66c1d632c1 - Fix typo 2001-11-18 13:52:08 +00:00
Derick Rethans b9d6136a28 - Updated NEWS to reflect removal of ext/sablotron 2001-11-18 13:50:56 +00:00
Sterling Hughes aaa9baa57f Remove the sablotron extension from the release branch 2001-11-18 13:27:32 +00:00
Derick Rethans 549164e1fe - MFH (fix build under FreeBSD) 2001-11-18 12:02:34 +00:00
foobar 36f572a5b9 Some typos.. 2001-11-18 03:11:06 +00:00
Andrei Zmievski 2a985b94e0 MFH 2001-11-18 01:23:14 +00:00
Derick Rethans 3f783ff20b - MFH 2001-11-18 00:33:19 +00:00
Zeev Suraski 43a661c2ac MFH 2001-11-17 21:15:57 +00:00
Rasmus Lerdorf 958a5a1311 MFH
(I wish people would stop committing whitespace fixes to code that has
 been around forever.  It really makes merging and checking diffs a pain
 in the ass as real changes end up hidden within a sea of useless
 whitespace fixes)
2001-11-16 12:02:30 +00:00
Derick Rethans 0aca2443d7 - MFH name change
#- This is to minimize BBC
2001-11-15 07:28:35 +00:00
Stig Bakken 032765f467 * install Archive_Tar 2001-11-14 15:01:37 +00:00
Christian Stocker ef3912a195 adding PEAR/Registry.php 2001-11-14 09:54:46 +00:00
Christian Stocker 0a862aff6f checking if package.xml.gz exists, before checking if it's writeable 2001-11-14 09:20:49 +00:00
foobar 38cd9d70d5 Added missing .cvsignore files and added *.reg into pear/tests/.cvsignore 2001-11-13 14:01:03 +00:00
Rasmus Lerdorf 5031e0dab8 MFH 2001-11-13 13:54:20 +00:00
Rasmus Lerdorf 40b988316b MFH 2001-11-13 13:13:26 +00:00
Rasmus Lerdorf bca8ddd083 Let's just use the quicktester from HEAD since it seems to work and the
one in this branch is quite broken.  Still plenty of failing tests we need
to work through here.
2001-11-13 12:57:26 +00:00
foobar 6d47a2d60f Partial MFH. 2001-11-13 12:42:11 +00:00
Rasmus Lerdorf 96c421553f MFH 2001-11-13 12:39:35 +00:00
foobar 30f0fa9262 MFH 2001-11-13 12:21:03 +00:00
foobar 2a1ac78a9d MFH 2001-11-13 12:07:25 +00:00
foobar 6b702ced00 MFH (the use of strings for locale setting is deprecated) 2001-11-13 11:54:13 +00:00
Derick Rethans edc32c8faa - Check for cURL >= 7.8.1 2001-11-13 11:53:01 +00:00
Zeev Suraski 18e7796470 Fix name 2001-11-13 11:48:28 +00:00
Zeev Suraski 4e7c35b1e2 Improve OpenSSL compatibility 2001-11-13 11:46:33 +00:00
foobar 5d1e3b81d4 MFH 2001-11-13 11:38:56 +00:00
James Moore e8a7dbe010 Lets cast this explicitly. 2001-11-13 11:27:42 +00:00
Derick Rethans d205634a58 - Fixed scheme/sax handlers (patch by Lenar Lõhmus <lenar@vision.ee>) 2001-11-13 09:53:18 +00:00
Derick Rethans 91f27074fc - MFH 2001-11-13 08:19:43 +00:00
Zeev Suraski c3a83e4c12 Go with RC2 2001-11-13 01:40:17 +00:00
Stig Bakken 989fc05c1c MFH: pear updates 2001-11-13 01:26:54 +00:00
Zeev Suraski 63f504192e MFH - SSL fixes 2001-11-13 01:15:51 +00:00
SVN Migration 07156d5fc5 This commit was manufactured by cvs2svn to create branch 'PHP_4_0_7'. 2001-11-13 01:06:49 +00:00
James Moore dd96ef8151 MFH 2001-11-13 00:00:18 +00:00
foobar f467121516 MFH 2001-11-12 23:16:00 +00:00
Rui Hirokawa 27592372cc fixed output problem with output buffering handler. 2001-11-12 14:52:17 +00:00
Rui Hirokawa b73a2081ab fixed a bug in http input processing patched by Yasuo Ohgaki. 2001-11-12 14:51:39 +00:00
Daniel Beulshausen 2b85be3c48 MFH latest changes 2001-11-12 10:52:16 +00:00
Stanislav Malyshev 87166f6978 MFH: Fix crash bug on malformed .ini file 2001-11-11 12:44:00 +00:00
Zeev Suraski cab6cfa680 MFH output buffering fixes 2001-11-11 09:03:47 +00:00
Rasmus Lerdorf 3c2de4ce6f MFH 2001-11-11 00:08:33 +00:00
Andrei Zmievski 896cf60aff MFH 2001-11-10 23:58:40 +00:00
Andrei Zmievski 2c7191b5ce Added crash fix news. 2001-11-10 23:56:16 +00:00
Andrei Zmievski 896e2e810d MFH 2001-11-10 23:50:53 +00:00
Derick Rethans 1a3f3309a5 - MFH (Bug #13918) 2001-11-03 21:26:27 +00:00
Christian Stocker 1bc5e9ffc4 typo 2001-11-02 17:56:20 +00:00
foobar 33e4ade668 MFH 2001-11-02 14:34:23 +00:00
foobar 2e8fc85965 MFH 2001-11-02 01:39:30 +00:00
foobar 4a04971bed MFH 2001-11-02 01:09:09 +00:00
foobar cd9e4f37a2 MFH 2001-10-30 23:22:52 +00:00
foobar 8a58067dd5 MFH 2001-10-29 16:45:38 +00:00
Derick Rethans 84f1093658 - MFH for bug fix of #9640 and #13789 2001-10-27 17:56:20 +00:00
foobar 1103c8306f MFH 2001-10-27 06:28:44 +00:00
Thies C. Arntzen 7755c18735 fix compile 2001-10-25 07:10:58 +00:00
foobar 19f20337f4 MFH 2001-10-24 10:43:26 +00:00
foobar 684c1fefc3 MFH 2001-10-23 11:18:48 +00:00
Zeev Suraski 45e8587fa3 MFH 2001-10-23 01:19:59 +00:00
Jeroen van Wolffelaar 120e9fa63f MFH (math tests pass now - at least on my system) 2001-10-22 09:46:23 +00:00
SVN Migration 8b4d5cefea This commit was manufactured by cvs2svn to create branch 'PHP_4_0_7'. 2001-10-22 09:44:28 +00:00
foobar f10d1f8f01 MFH 2001-10-22 02:36:04 +00:00
foobar 740073c795 MFH 2001-10-22 02:30:42 +00:00
Rasmus Lerdorf 8e0cad5b50 MFH 2001-10-21 17:59:35 +00:00
Sterling Hughes 040e59eb6d fix zts build 2001-10-21 17:17:18 +00:00
foobar e75fa38d9d MFH 2001-10-21 03:06:18 +00:00
Rasmus Lerdorf 0a1c75a106 MFH 2001-10-21 00:20:44 +00:00
Rasmus Lerdorf b9f4c04888 MFH
(oops, should have been in one commit)
2001-10-21 00:17:17 +00:00
Derick Rethans 49beadaa03 - MFH for bug #13413 2001-10-20 10:59:29 +00:00
Edin Kadribasic 2eee05cb5d Fixed last argument in strlcat() call. 2001-10-19 18:09:21 +00:00
Derick Rethans f5a5a7e518 - Fix for bug #13760 2001-10-19 17:59:24 +00:00
Edin Kadribasic 43f418accd Merged change strncpy=>strlcpy; strncat=>strlcat into the release brach. 2001-10-19 15:57:17 +00:00
Derick Rethans 725100424b - Fix bug in detecting libexpat with the sablotron extension 2001-10-19 09:22:13 +00:00
Derick Rethans 9261ba3e70 - MFH 2001-10-19 08:04:24 +00:00
Stig Bakken 73b91a7d8f * another update 2001-10-19 05:13:09 +00:00
Stig Bakken 0cb64cb8b6 * update NEWS file 2001-10-18 23:32:40 +00:00
Harald Radi 854223474e MFH 2001-10-18 08:26:45 +00:00
Stig Bakken 7c93ef371b MFH 2001-10-17 15:32:56 +00:00
Edin Kadribasic fa6a7710ca Meged fix for bug #13083 into the release branch. 2001-10-16 08:55:30 +00:00
Stig Bakken aaec7c8c2b * fix version number 2001-10-16 00:07:57 +00:00
Stig Bakken cde2734237 MFH 2001-10-15 19:37:45 +00:00
Stig Bakken b892e3c8f8 MFH 2001-10-14 07:19:09 +00:00
SVN Migration 031ce49972 This commit was manufactured by cvs2svn to create branch 'PHP_4_0_7'. 2001-10-13 06:22:10 +00:00
Stig Bakken b32cdd7637 MFH 2001-10-12 11:56:37 +00:00
Thies C. Arntzen 017856111c MFH 2001-10-12 08:02:42 +00:00
foobar 6994c80835 MFH 2001-10-12 00:22:38 +00:00
Stig Bakken 69f304f0ac MFH 2001-10-11 23:55:49 +00:00
Stig Bakken bd561b7f57 MFH: phpVersionIs -> version_compare 2001-10-11 22:28:26 +00:00
Stig Bakken 8aa81d5045 MFH: add versioning files 2001-10-11 19:05:52 +00:00
Stig Bakken 051623a43c MFH 2001-10-11 15:00:48 +00:00
Stig Bakken bdd9c56790 * add note about version_compare() 2001-10-11 10:46:04 +00:00
Stig Bakken bb5c3b8bcc MFH 2001-10-11 10:40:14 +00:00
Stig Bakken e1285b4f3c MFH 2001-10-11 10:31:12 +00:00
Stig Bakken 8bc67a4ec1 MFH: versioning test 2001-10-11 01:13:51 +00:00
Stig Bakken 444ec0f591 MFH 2001-10-11 01:03:27 +00:00
Stig Bakken cc9c4064ab MFH test fix 2001-10-11 00:46:34 +00:00
Stig Bakken 709a8d3a0d MFH: version_compare & friends 2001-10-10 22:23:16 +00:00
SVN Migration 3a4b329cc3 This commit was manufactured by cvs2svn to create branch 'PHP_4_0_7'. 2001-10-10 10:14:52 +00:00
Stig Bakken a3084031b1 * include the PEAR version of usefulinc's xmlrpc library in this release
too, with security fix (in case people overwrite their old installation)
2001-10-09 22:58:09 +00:00
Stig Bakken ce2a30427b MFH 2001-10-09 22:54:11 +00:00
SVN Migration af10fc656d This commit was manufactured by cvs2svn to create branch 'PHP_4_0_7'. 2001-10-06 23:22:38 +00:00
Harald Radi 5fd3346aac typo
TRUE -> FALSE
2001-10-06 10:39:57 +00:00
Harald Radi 5091a18158 MFH
fixed boolean -1 vs. 1 conflict
2001-10-05 09:49:45 +00:00
Derick Rethans 3c7529f4b8 MFH
# (thought this already has been done)
2001-10-04 06:42:45 +00:00
Rasmus Lerdorf 8c98829721 MFH 2001-10-04 06:24:13 +00:00
Derick Rethans 04d2d6b3bc - Fix build 2001-10-04 05:34:09 +00:00
Hartmut Holzgraefe 41b3015125 MFH 2001-10-01 12:51:12 +00:00
Rasmus Lerdorf 42b7601378 MFH 2001-09-30 04:43:19 +00:00
Jon Parise 86c32174be Build pear/scripts/phptar in the configure run. 2001-09-29 17:57:37 +00:00
Rasmus Lerdorf c5bf17f0a5 MFH 2001-09-27 07:39:24 +00:00
Zeev Suraski 730359dc4d MFH the list of 4.0.7 changes 2001-09-26 21:56:23 +00:00
Zeev Suraski 4053948470 MFH 2001-09-26 21:47:18 +00:00
Harald Radi 333ce2d050 changed flags 2001-09-25 16:29:45 +00:00
Andi Gutmans a84618a3de - MFH. File uploads need to be tested thoroughly in RC3! 2001-09-24 17:48:22 +00:00
Wez Furlong eff475de14 MFH 2001-09-20 15:05:37 +00:00
Joey Smith 7114dae40d MFH, Close bug #13322 2001-09-19 02:35:49 +00:00
Daniel Beulshausen ec9bda9e5c MFH 2001-09-17 13:43:15 +00:00
Daniel Beulshausen 74dbaf655b MFH 2001-09-17 13:21:58 +00:00
Daniel Beulshausen 137b57c5ba MFH 2001-09-17 12:23:43 +00:00
Thies C. Arntzen 6d00133ce2 fixed memory_peak reporting 2001-09-16 15:49:55 +00:00
Sascha Schumann 087fd4c609 this is not pure rc2 anymore 2001-09-13 21:52:40 +00:00
Sascha Schumann 1b740da6d4 MFH.. necessary fix 2001-09-13 21:41:30 +00:00
Jason Greene 0d3ce62b63 Merge recent socket fixes 2001-09-11 16:08:28 +00:00
Sascha Schumann d90cd52b89 MFH 2001-09-10 11:24:18 +00:00
Harald Radi 973dbce2b9 MFH 2001-09-10 09:28:55 +00:00
Sascha Schumann f51c000bac MFH 2001-09-09 14:53:38 +00:00
Sterling Hughes 39812d33f7 ws fix 2001-09-09 09:48:16 +00:00
Sterling Hughes 2e9991865e MFH 2001-09-09 09:45:10 +00:00
Harald Radi 016ac5d400 MFH 2001-09-08 21:02:35 +00:00
Sterling Hughes bf344046b3 add proto 2001-09-07 11:35:44 +00:00
Sterling Hughes 26a5bb3fc7 MFH 2001-09-07 10:47:44 +00:00
Derick Rethans c117b30950 - MFH (Fix for bug 13052) 2001-09-07 07:51:06 +00:00
Rasmus Lerdorf b7a1b19734 MFH 2001-09-07 06:44:21 +00:00
foobar 3ba574871c MFH 2001-09-07 00:28:28 +00:00
Zeev Suraski 6122d87789 Go with RC2 2001-09-06 23:17:05 +00:00
Rasmus Lerdorf 8dffa18aec Interbase fixes 2001-09-05 15:41:45 +00:00
Stanislav Malyshev f51e3d044a MFH 2001-09-04 14:12:11 +00:00
Rasmus Lerdorf 6cc67717b1 MFH 2001-09-03 19:08:49 +00:00
Zeev Suraski 30812e3707 MFH 2001-09-01 14:57:32 +00:00
Zeev Suraski 0550e954e0 MFH 2001-09-01 01:45:51 +00:00
Zeev Suraski 73941736ca Fix TSRM.dsp's line endings (was causing trouble if used with tools that
didn't have auto-conversion of line endings)
2001-08-30 18:08:29 +00:00
foobar 80754851bd MFH 2001-08-30 16:30:14 +00:00
Joey Smith 2ae1766c1c MFH 2001-08-29 22:26:53 +00:00
Wez Furlong 96462f90a0 MFH 2001-08-29 11:33:06 +00:00
Wez Furlong c4cc49f487 MFH 2001-08-28 22:19:52 +00:00
Rasmus Lerdorf 07b4a21631 MFH 2001-08-28 21:52:38 +00:00
Stig Bakken 9c30514661 * MFH: Archive_Tar is no longer experimental 2001-08-28 12:27:27 +00:00
Stig Bakken a9d8aa7e08 * MFH: Log/Observer.php rename fix 2001-08-28 12:12:24 +00:00
Stig Bakken 28caf732a7 * MFH PEAR stuff
* copied in Archive_Tar class from pear/Archive_Tar
2001-08-28 11:41:13 +00:00
Andrei Zmievski 513874acc7 MFH 2001-08-27 16:52:49 +00:00
Stig Bakken d2363cdd19 * be smarter when trying to locate PHP binary 2001-08-27 16:34:30 +00:00
Joey Smith 30cd11ced1 MFH: Fix 1st case reported in #9893. 2nd case was fixed in previous commit. 2001-08-26 11:56:41 +00:00
Rasmus Lerdorf 8bed40bc2f MFH 2001-08-26 01:12:07 +00:00
foobar 4c6c14ac5e MFH 2001-08-24 20:07:07 +00:00
Christian Stocker a85d4245a3 Merge From 1.84 (XML/RPC stuff has gone to /pear) 2001-08-24 09:06:26 +00:00
Christian Stocker afe0765c0a changed the URL from my testing server to pear.php.net 2001-08-24 07:46:33 +00:00
foobar 0e57f1324b MFH 2001-08-22 10:26:56 +00:00
Joey Smith 938b31d395 MFH: Make stat() act like stat, not filesize(). 2001-08-21 23:59:21 +00:00
Joey Smith f3ffe2d258 MFH
Some changes to help out previous users of domxml...
node::tagname == node::name.
Add property "type" to textnode types.
2001-08-21 21:51:22 +00:00
Zeev Suraski 1563fa9a67 MFH 2001-08-21 18:14:38 +00:00
Sascha Schumann a4cf06cecd MFH 2001-08-20 15:30:33 +00:00
Stanislav Malyshev bd5d7bba59 MFH 2001-08-20 15:28:53 +00:00
foobar b404501183 MFH 2001-08-20 14:08:04 +00:00
Harald Radi b3655b0e12 MFH 2001-08-20 08:56:14 +00:00
foobar e8f9edd7a7 MFH 2001-08-19 06:39:58 +00:00
SVN Migration 95061e9ad2 This commit was manufactured by cvs2svn to create branch 'PHP_4_0_7'. 2001-08-19 00:34:09 +00:00
foobar 0f5dea39ad MFH 2001-08-18 21:09:41 +00:00
foobar 8ca2454ce2 Fixed the NEWS. 2001-08-18 20:23:13 +00:00
foobar e455e7cbca MFH 2001-08-18 18:15:22 +00:00
Zeev Suraski b33f9a00d2 MFH 2001-08-18 17:00:30 +00:00
Zeev Suraski e017ca8b72 MFH 2001-08-17 16:54:16 +00:00
foobar 6e75cfbd8c MFH 2001-08-17 16:43:00 +00:00
Harald Radi a1c9bd2bfb MFH 2001-08-17 08:19:28 +00:00
foobar 70a7172018 MFH 2001-08-17 06:55:38 +00:00
foobar 0dcfb7341f MFH 2001-08-17 00:48:33 +00:00
Zeev Suraski 91bd1d25e1 MFH 2001-08-16 23:59:35 +00:00
Zeev Suraski 766eaa4078 MFH 2001-08-16 23:35:09 +00:00
Zeev Suraski 8248d8cf2c MFH 2001-08-16 21:09:10 +00:00
Rasmus Lerdorf 0fd9dcc4bc MFH 2001-08-16 20:35:33 +00:00
Chuck Hagenbuch b381ad0f9d MFH 2001-08-16 20:21:31 +00:00
Thies C. Arntzen e53366609d MFH: move php_shutdown_config further down 2001-08-16 09:41:25 +00:00
Zeev Suraski bace148543 MFH 2001-08-15 23:21:05 +00:00
foobar 6549c08dfe MFH 2001-08-15 21:41:01 +00:00
Jeroen van Wolffelaar 1910df096c MFH 2001-08-15 19:11:39 +00:00
Jeroen van Wolffelaar dda54f4271 It was agreed that log2, exp2 and exp10 shouldn't be added to PHP. log10
already existed.

# Forgot to do this yesterday :(
2001-08-15 18:59:20 +00:00
Harald Radi 37f511a835 com entry was missing 2001-08-15 17:49:14 +00:00
Thies C. Arntzen 00bb550264 MFH the recursion-hack 2001-08-15 16:12:00 +00:00
Zeev Suraski eb6428126b Reroll 4.0.7RC1 2001-08-15 15:18:25 +00:00
SVN Migration 896bbc92e5 This commit was manufactured by cvs2svn to create branch 'PHP_4_0_7'. 2001-08-15 10:40:00 +00:00
Harald Radi c674638dd0 removed CoInitialize() and CoUninitialize() 2001-08-15 10:39:59 +00:00
Sterling Hughes 8300abe367 Removed select(), fd_set(), etc. (wasn't present in the first place, and
these are implemented in the sockwasn't present in the first place, and
 these are implemented in the sockets extension))
2001-08-15 05:21:43 +00:00
5917e31097 ChangeLog update 2001-08-15 00:11:10 +00:00
c9220c12c0 NEWS update 2001-08-15 00:11:06 +00:00
Zeev Suraski 8021e65569 Revert an old bogus patch 2001-08-14 23:17:02 +00:00
Zeev Suraski 2cf25894a8 improve typedef definition 2001-08-14 22:57:09 +00:00
Stig Bakken d400f78079 * expected error codes are stored on a stack now, PEAR::expectError()
pushes into it, PEAR::popExpect() pops off it
* made pear_error test work on other boxes than my own :-)
2001-08-14 21:11:33 +00:00
Andrei Zmievski e0c3120a11 Uh-oh, didn't mean to eliminate all folds. 2001-08-14 20:38:56 +00:00
Andrei Zmievski 90cc710351 Be more safe about freeing zvals. 2001-08-14 20:33:19 +00:00
John Donagher 02b431b6d5 Add compile-time versioning for default hostname 2001-08-14 20:28:07 +00:00
John Donagher d53cb7cd2f Update hostname 2001-08-14 20:23:26 +00:00
Daniel Beulshausen 48d75026ad depreciated, but should build anyway... 2001-08-14 17:46:19 +00:00
Andi Gutmans 4580df1080 - This code looks OK so remove FIXME comment 2001-08-14 17:43:39 +00:00
Daniel Beulshausen 388dfa0483 TSRMLS fixes 2001-08-14 17:31:00 +00:00
Daniel Beulshausen 21cac086e4 TSRMLS fixes 2001-08-14 17:16:19 +00:00
Daniel Beulshausen ba761ce9b1 TSRMLS fixes 2001-08-14 17:05:53 +00:00
Zeev Suraski f72d907105 MFZE1 2001-08-14 15:24:20 +00:00
Zeev Suraski ac0bee7ec9 MFZE1 2001-08-14 15:22:34 +00:00
Harald Radi ed126f68d5 fixed com_invoke retval 2001-08-14 13:38:36 +00:00
Andrei Zmievski 4e89fa671e I'm sure you meant 'l' here, Sterling. 2001-08-14 13:01:11 +00:00
Stig Bakken 3c801213c6 * updated test (currently passes only on my laptop, sorry...) 2001-08-14 12:49:51 +00:00
Stig Bakken c49f8aa0ef * added expectError() method 2001-08-14 12:49:25 +00:00
Zeev Suraski eb52f75407 - Avoid using malloc()
- Improve and fix leaks in the typelib constants registration mechanism
2001-08-14 12:47:09 +00:00
Harald Radi 0fbbadbd2f fixed bug in com_load_typelib 2001-08-14 11:50:16 +00:00
foobar 80277be8e3 @- Fixed a bug in dbase_get_record() and dbase_get_record_with_names().
@  boolean fields are now returned correctly.
@  Patch by Lawrence E. Widman <widman@cardiothink.com> (Jani)
2001-08-14 11:07:18 +00:00
Zeev Suraski b3e96d34f3 Whitespace 2001-08-14 10:53:42 +00:00
Zeev Suraski 17a36fb659 more whitespace 2001-08-14 10:15:43 +00:00
Zeev Suraski cf5bf23b32 Whitespace & API updates 2001-08-14 10:13:35 +00:00
Zeev Suraski 4b3dea31e6 Whitespace and API updates (please keep code in the repository in K&R style
like the CODING_STANDARDS ask, guys...)
2001-08-14 10:04:59 +00:00
Zeev Suraski f09302da07 Add missing break 2001-08-14 09:55:22 +00:00
Sascha Schumann 0ccda62835 use an absolute path for symlinking the php library archive 2001-08-14 09:37:25 +00:00
foobar 601b4727b6 If the header file is not found, bail out. 2001-08-14 08:53:48 +00:00
foobar 5b2f8a0c22 Fixed bug: #12726. If --with-xxx is used in configure line without any
value, it gets value 'yes'.
2001-08-14 08:49:39 +00:00
Thies C. Arntzen e8e401bc2d ypo;-) 2001-08-14 08:33:21 +00:00
Joey Smith 862472efdc Obviously not complete, but somewhere to start. 2001-08-14 08:28:34 +00:00
Joey Smith df7967729e Kill some duplicate PHP_FALIAS()'s.
Many of these were commented out, but I killed them anyways just to be
consistent.
2001-08-14 08:23:22 +00:00
Joey Smith 14f05c17dd Group PHP_FE and PHP_FALIAS with their own kind. 2001-08-14 07:49:28 +00:00
Joey Smith a26110de2c Fix my own ws errors. 2001-08-14 07:44:21 +00:00
Joey Smith b79868c28c Register le_domxmltextp. 2001-08-14 07:37:14 +00:00
Joey Smith 109f414557 Don't hammer the resource type right off the bat. 2001-08-14 07:36:18 +00:00
Joey Smith e3d6fc72e5 Trim ws only lines. 2001-08-14 07:34:20 +00:00
foobar a870fd2757 ws fix. Also added some missing protos and fold tags. 2001-08-14 07:14:23 +00:00
foobar 2983993b59 Fix ZTS build. 2001-08-14 07:09:20 +00:00
foobar 442669055b Another TSRMLS_FETCH() nuke. 2001-08-14 05:44:33 +00:00
Alan Brown 292d27bf6a Whenever typelibrary constants were loaded, there was a GP Fault at process exit as shutdown_memory_manager seemed to delete constants that were supposed to have been deleted earlier. It seems as though CONST_PERSISTENT is a bad thing to use. Resetting that bit on the constant creation still seems to work and the GP Fault at exit is gone. 2001-08-14 03:52:32 +00:00
Joey Smith 5e21a4afad More Z_* macro changes. 2001-08-14 01:07:42 +00:00
Harald Radi c4022601e2 hresult is returned if no return type is specified 2001-08-14 00:48:15 +00:00
Harald Radi 44ee05ae23 update todo 2001-08-14 00:29:51 +00:00
Harald Radi d041982a9c make next() return a single value instead of an array with one element 2001-08-14 00:28:54 +00:00
f7c0bc955c ChangeLog update 2001-08-14 00:15:46 +00:00
cbce9eb95b NEWS update 2001-08-14 00:15:42 +00:00
Joey Smith 022626a8f0 Remove unused variable and fix small mental error. 2001-08-14 00:10:39 +00:00
Harald Radi 9c6b9eb76b merged from EXPERIMENTAL
lots of cleanup work
2001-08-13 23:39:11 +00:00
Harald Radi bb0858db34 initial 2001-08-13 23:30:16 +00:00
Sascha Schumann 98304ba6a0 Use a symlink instead of copying the +6MB library archive during install 2001-08-13 22:34:25 +00:00
Jeroen van Wolffelaar d1881c8e26 Reverted - Didn't yet read Torben's mail - Sorry! 2001-08-13 22:34:02 +00:00
Jeroen van Wolffelaar 6be14623c5 Fixed proto's 2001-08-13 22:30:55 +00:00
Sascha Schumann 96aa97f8b4 Don't display egrep result 2001-08-13 22:17:18 +00:00
Sascha Schumann f42acb0cd6 whoops, forgot to apply cgi/poll patch before diff'ing 2001-08-13 22:01:55 +00:00
Sterling Hughes a24e3174a0 remove "i" 2001-08-13 22:01:39 +00:00
Sascha Schumann e09ed038e7 . 2001-08-13 21:58:58 +00:00
Sascha Schumann 7efc4d8b54 Add check for thttpd-2.21b. We support nothing else for now, because
this version is rock-stable using the combined set of patches.
2001-08-13 21:57:31 +00:00
Sascha Schumann 75c22e9a4a improved thttpd-2.21b patch.. I got tired of applying my patches for
these bugs.

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

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

Anyone who can possibly test this, please do.

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

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

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

Dynamically resize hash-table.

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

ps_sd_new has been restructured to avoid code duplication.

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

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

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

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

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

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

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

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

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

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

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

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

This needs to be tested on non-UNIX platforms.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Cleaned up stringhandling for binary safeness.

All functions now maintain a global 'errno' variable.

All functions now print warning messages on failure.

Added error code constants.

Fixed bug #8041 while maintaining backward compatibility.

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

Also, please maintain K&R code layout, it's very messy to have different
styles intermixed in the same codebase, and especially in the same files!
2001-03-18 02:32:04 +00:00
f8178f3d48 ChangeLog update 2001-03-18 02:09:17 +00:00
Zeev Suraski 9db5589161 Recode delayed loading in a much simpler way (switched back to php_ini.c 1.49) 2001-03-17 23:35:32 +00:00
Stephen van Egmond 3b8140e47c fixed a (C++) warning about implicit conversion from void* 2001-03-17 20:35:38 +00:00
Christian Stocker fcdd641539 GarbageCollection was moved into a PEAR-Deconstructor 2001-03-17 16:06:31 +00:00
Daniel Beulshausen e438a6d48f fix dependencys 2001-03-17 12:30:27 +00:00
Zeev Suraski 34b2fc4a6c Fix the output buffering bug Andre found 2001-03-17 03:03:50 +00:00
b89dc4b4d8 ChangeLog update 2001-03-17 02:09:18 +00:00
cda95e161d NEWS update 2001-03-17 02:09:15 +00:00
Andrei Zmievski 770c66125d @- Added array_filter(), which allows filtering of array elements via
@  the specified callback. (Andrei)
2001-03-16 20:46:33 +00:00
Andrei Zmievski f7f2cf9de5 All user callbacks should be to EG(function_table). 2001-03-16 19:51:08 +00:00
Frank M. Kromann 6195f14633 Fixing build on Win32 by adding missing BLS_FETCH(); 2001-03-16 19:48:40 +00:00
Andrei Zmievski 561cc74389 @- Fixed all relevant array functions to avoid moving the internal array
@ pointer during operations. (Andrei)
2001-03-16 19:29:23 +00:00
foobar 88f41b4e91 This has got to be the last one.. 2001-03-16 18:18:01 +00:00
Uwe Steinmann 5dcf391497 - Inserting links without any delimiters is now possible 2001-03-16 17:40:38 +00:00
foobar 530ed2eb50 .php files should not be ignored. Typo? 2001-03-16 17:10:46 +00:00
Derick Rethans 9720ac01fc - Fixed mem leak 2001-03-16 15:59:45 +00:00
foobar 8913a7350e Missed this one. 2001-03-16 14:45:46 +00:00
foobar 21d158229b Make compile again when ZTS is enabled and imap-2000 is used. Bug #9762 2001-03-16 13:17:54 +00:00
Sascha Schumann 59eb57e42a Don't do anything, if the user wants no PDF. 2001-03-16 12:23:31 +00:00
foobar ab560941ee This should fix problems in systems without libbind. 2001-03-16 07:13:06 +00:00
fb41f6730e ChangeLog update 2001-03-16 02:09:22 +00:00
foobar 4567d57c61 Added a check for the one function missing in <= 0.1.0 versions of ming lib. 2001-03-16 02:06:34 +00:00
Brian Bruns bb5369fc62 sybase_affected_rows implementation submitted by John F. Dumas <jdumas@locutus.kingwoodcable.com> 2001-03-16 01:21:32 +00:00
foobar 847e0d996c Killed a compile warning + made ming extension compile with the older ming libs. 2001-03-16 00:37:35 +00:00
foobar 7b6a385c95 Missing files. 2001-03-16 00:36:47 +00:00
foobar e92ff40bc7 Beutify + fix some errors in finding libs and header files. 2001-03-16 00:36:31 +00:00
Daniel Beulshausen 0688feeba4 fix win32 build 2001-03-15 20:45:49 +00:00
Andi Gutmans baa92cc540 - Nuke commented code 2001-03-15 18:58:07 +00:00
Jon Parise 01008bb03c Whitespace (spaces to four-column tabs) 2001-03-15 05:07:31 +00:00
4d26e630d8 ChangeLog update 2001-03-15 02:09:19 +00:00
James Moore 2e22b01cf1 Adding webteam to credits. 2001-03-14 21:28:58 +00:00
foobar 3f64aa6a94 Forgot this one.. 2001-03-14 13:43:58 +00:00
foobar f35cb7d89b Missing. 2001-03-14 13:42:33 +00:00
Sascha Schumann a4ec164698 Fix ZTS build 2001-03-14 13:38:03 +00:00
Uwe Steinmann 46eb8d8def -fixed prototype and indention 2001-03-14 06:33:46 +00:00
e3312da133 ChangeLog update 2001-03-14 02:09:18 +00:00
f6afb343c9 NEWS update 2001-03-14 02:09:15 +00:00
Zeev Suraski 8b5a768640 Make get_browser() read its information from $HTTP_SERVER_VARS[] if available 2001-03-13 23:20:23 +00:00
Zeev Suraski e6f3fb39cb Implement mysql_unbuffered_query() - uses mysql_use_result() instead of
mysql_store_result()
2001-03-13 22:52:53 +00:00
foobar 256537a7cf cleanup. 2001-03-13 22:50:02 +00:00
Jason Greene ba553edc06 fix broken m4, you should have all checking code withing your withval test
-Jason
2001-03-13 22:44:49 +00:00
foobar c45884c5fb Extension was enabled by default.. 2001-03-13 22:33:53 +00:00
Zeev Suraski fdf21452ed Centralize query code 2001-03-13 21:42:43 +00:00
Zeev Suraski f5ddc2826d Use a container struct instead of MYSQL directly 2001-03-13 21:13:19 +00:00
Frank M. Kromann cbbbb1b1df Adding FrontBase extension to modules 2001-03-13 21:02:52 +00:00
Frank M. Kromann d5e1266dc5 Initial check-in of FrontBase extension 2001-03-13 20:58:47 +00:00
Stanislav Malyshev 5c1f7a2f60 Fix off-by-one on config values set from Apache config
# It didn't really hurt, since the extra character was always \0,
# but the phpinfo() display came out ugly.
2001-03-13 18:39:38 +00:00
Andrei Zmievski 6626f902a8 Remove config.h instead of php_config.h 2001-03-13 17:54:38 +00:00
Sascha Schumann 5708ddf171 Replace memcpy and sprintf with smart_strs. 2001-03-13 17:14:47 +00:00
Sascha Schumann 667a1f1fdb buf is gone. Don't reference it. 2001-03-13 17:11:43 +00:00
Adam Dickmeiss 91554d8b9c Added yaz_database. Option bit ExtendedServices set for InitRequest. 2001-03-13 17:04:06 +00:00
Sascha Schumann 2b6698aaa9 Replace another sprintf 2001-03-13 16:58:36 +00:00
Sascha Schumann 86cf74a169 Nuke calls to sprintf, snprintf, strcat, strcpy and rely on
memcpy and smart_strs.
2001-03-13 16:53:34 +00:00
Frank M. Kromann f49d04fb12 Fixing compiler warning on win32 2001-03-13 16:39:47 +00:00
Frank M. Kromann 0981778351 Changed email 2001-03-13 16:33:39 +00:00
Daniel Beulshausen a37a9db454 fix bug in php_gmtime_r 2001-03-13 11:09:37 +00:00
Andrei Zmievski 285ec0ca2c @- IMPORTANT: removed /F modifier handling from preg_replace(). Instead
@  one should use new preg_replace_callback() function. (Andrei)
2001-03-13 05:24:03 +00:00
c3a10fe0d1 ChangeLog update 2001-03-13 02:09:20 +00:00
78cd4cdbe1 NEWS update 2001-03-13 02:09:17 +00:00
Dave Hayden f2427f42fa changed scalar args and returns to doubles, added Ming_setScale function,
added SWFTEXTFIELD_HTML flag, fixed SWFTextField_setIndentation glitch
2001-03-13 01:57:43 +00:00
Colin Viebrock 83848d2e1f Forgot to add it here 2001-03-12 19:35:28 +00:00
Andrei Zmievski 3b2a83b942 Name length is already known. 2001-03-12 16:40:55 +00:00
Andi Gutmans 7db391b054 - Missed second place. 2001-03-12 16:27:26 +00:00
Andi Gutmans 123491aeac - Nuke snprintf() 2001-03-12 16:23:19 +00:00
Andi Gutmans 3118af8293 - White space 2001-03-12 15:45:01 +00:00
Andi Gutmans 714d083cb8 - Fix by Jani Taskinen <sniper@iki.fi> for whole path also to work
with include_once()/require_once().
2001-03-12 15:42:18 +00:00
Sean Bright 48caa74c20 Fixed prototype. 2001-03-12 15:14:38 +00:00
Alexander Feldman ebf7c99391 Added NEWS. 2001-03-12 14:07:36 +00:00
Alexander Feldman 1791658112 A small fix to make the function imageloadfont portable. 2001-03-12 13:57:53 +00:00
Stanislav Malyshev 0fa068e1fa Prevent memory leak 2001-03-12 10:14:00 +00:00
Stig Bakken 7a7590002c HEADS UP: renamed config header file in "phpize"d extensions to
"config.h" rather than "php_config.h".
2001-03-12 09:54:26 +00:00
Stanislav Malyshev be83ba17da Use hash position with array_flip 2001-03-12 08:07:00 +00:00
Andrei Zmievski 40dd7eef96 This will have to do until the docs come along. 2001-03-12 03:10:15 +00:00
Andrei Zmievski 13148b5491 Improve zend_is_callable() to the point where it's actually useful.
Now it just needs to be invoked everywhere in PHP where a callback is
expected.
2001-03-12 03:08:28 +00:00
Andrei Zmievski d73ef12429 @- Added array_reduce(), which allows iterative reduction of an array
@  to a single value via a callback function. (Andrei)
- Added array_reduce(), which allows iterative reduction of an array
  to a single value via a callback function.
- Fixed usage of zend_is_callable() in PCRE.
2001-03-12 03:06:53 +00:00
Andrei Zmievski 2d54fb39b9 Use proper class name. 2001-03-12 03:05:04 +00:00
23a446c429 ChangeLog update 2001-03-12 02:09:11 +00:00
foobar 12503baa55 Cleaning this a little bit. 2001-03-12 02:06:06 +00:00
foobar 48545dd7b9 ws fixes. Plus removed unnecessary AC_MSG_ calls. 2001-03-12 01:20:16 +00:00
foobar 5b4d6e7db3 ws fix. 2001-03-12 00:46:26 +00:00
Jon Parise cf48573277 Revised version of the parseDSN function.
Submitted by: "Tomas V.V.Cox" <cox@idecnet.com>
2001-03-11 23:26:18 +00:00
Andi Gutmans dde50d6afd - Fix for Solaris. 2001-03-11 19:35:26 +00:00
Alexander Feldman 397c76d787 Fixed a compatibility problem is some file functions (fgets, fputs, fread,
fwrite). The ANSI standard says that if a file is opened in read/write
mode, fseek() should be called before switching from reading to writing
and vice versa.
2001-03-11 10:08:27 +00:00
foobar ba12d0b4b1 Added missing alias. PR: #9550 2001-03-11 04:13:53 +00:00
foobar 6795032cb8 HAVE_BINDLIB --> HAVE_LIBBIND 2001-03-11 03:49:21 +00:00
foobar 85980139b2 Check for inet_aton only if libbind is not found (or inet_aton is not in
libbind). Fixes bug: #8814
2001-03-11 03:46:24 +00:00
bdcaa8ec44 ChangeLog update 2001-03-11 02:09:15 +00:00
foobar 499b63a354 If AC_CHECK_LIB fails, assume that --with-openssl is needed 2001-03-11 00:49:16 +00:00
foobar 3db6f55748 This should fix the problems with not including -lz. 2001-03-10 17:33:33 +00:00
Stig Bakken adc498e705 * only register the destructor if it exists 2001-03-10 09:59:15 +00:00
Andi Gutmans 492a619be3 - Whitespace 2001-03-10 09:21:48 +00:00
Rui Hirokawa 0e9581bddb just reversed a previous patch. 2001-03-10 02:21:39 +00:00
e2e49e7b84 ChangeLog update 2001-03-10 02:09:28 +00:00
e826651d7e NEWS update 2001-03-10 02:09:25 +00:00
Rui Hirokawa f3c9c8dd07 initialized some strings in global variable structure. 2001-03-10 02:03:26 +00:00
Frank M. Kromann f98710c870 Adding a new function odbc_next_result() allowing the query to return more than one result.
This can be done with a stored procedure or by sending more than one select to the server.
2001-03-09 23:44:55 +00:00
Frank M. Kromann 4230bdd3ed Adding a new function mssql_next_result() allowing the query to return more than one result.
This can be done with a stored procedure or by sending more than one select to the server.
2001-03-09 23:37:56 +00:00
Andrei Zmievski 8d677828b9 @- Fixed argument checking for call_user_func* functions and allowed
@  specifying array($obj, 'method') syntax for call_user_func_array. (Andrei)
2001-03-09 21:42:26 +00:00
068fd3b24f ChangeLog update 2001-03-09 02:09:17 +00:00
Ulf Wendel dc5f1ed519 Formatting and minor inline doc changes. 2001-03-08 20:41:39 +00:00
Ulf Wendel 78c050114c Added a basic Cache_Error class. 2001-03-08 20:39:15 +00:00
Stanislav Malyshev e30d8e4abf Better use buffer_to_buffer, since zval is really buffer, not string (it can
contain \0's and not end in \0).
# and recode_string is recode_buffer_to_buffer internally anyways
2001-03-08 17:11:57 +00:00
Zeev Suraski a4a8369f7d *** empty log message *** 2001-03-08 11:21:18 +00:00
Zeev Suraski be8a991ccc Point people to the Windows mailing list... 2001-03-08 10:43:52 +00:00
154bba297b ChangeLog update 2001-03-08 02:09:19 +00:00
Daniel Beulshausen 177f9bd1f5 add missing globals fetches 2001-03-07 17:23:30 +00:00
Zeev Suraski 31775e9706 Add missing #define's 2001-03-07 17:05:03 +00:00
Frank M. Kromann 4578c9af93 Removing a compiler warning 2001-03-07 16:33:13 +00:00
Andrei Zmievski 02cc050108 That came from php-gtk. 2001-03-07 14:00:52 +00:00
foobar f4917d49c3 Fixed the help for other options too. 2001-03-07 13:24:12 +00:00
Ben Mansell 515c20da47 Added support for Zeus SSL client certificate information.
Added SERVER_SIGNATURE to the environment.

Submitted by: daniel@zeus.com
2001-03-07 10:28:00 +00:00
Zeev Suraski d7e17582da Update .ini's and NEWS 2001-03-07 10:08:19 +00:00
Zeev Suraski 36ded42156 Make parent:: work in runtime bindings as well 2001-03-07 10:07:25 +00:00
f4dfa7df00 ChangeLog update 2001-03-07 02:09:20 +00:00
b2dc847c0a NEWS update 2001-03-07 02:09:17 +00:00
Zeev Suraski 0b65578ec7 Implement internal output compression?\0020:wq 2001-03-06 20:43:54 +00:00
Zeev Suraski 9a04f870ab Fix freeing of buffers 2001-03-06 19:38:33 +00:00
Zeev Suraski 93e9e7521a Fixes to internal output buffering 2001-03-06 18:29:00 +00:00
Sascha Schumann aed7d01138 We actually only need AC_PROG_LEX here. 2001-03-06 16:59:28 +00:00
Sascha Schumann 34cb5dff68 Replace AM_PROG_LEX with a separated call to AC_PROG_LEX and AC_DECL_YYTEXT.
The latter is only called, if lex was found, so that PHP configures now
on setups without (f)lex.
2001-03-06 16:51:53 +00:00
Zeev Suraski 0ece429a16 More internal output buffering fixes 2001-03-06 16:28:51 +00:00
Zeev Suraski 20d2432c86 Fix internal output buffering 2001-03-06 16:25:14 +00:00
Zeev Suraski 13a97fefeb Initial work on internal output handlers - should be much quicker 2001-03-06 15:54:49 +00:00
Sebastian Bergmann 9e43c35158 Whitespace only. 2001-03-06 15:27:30 +00:00
Zeev Suraski 800950c5a7 Avoid using ret uninitialized 2001-03-06 15:10:53 +00:00
Ben Mansell a40f208ab8 Thread hashtable was being initialized with a size of 1! Changed to 128 as
a more sensible number.
# Also could change the 'expected resources' parameter from 1, but I
# haven't tested that bit yet
----------------------------------------------------------------------
2001-03-06 15:09:15 +00:00
Ben Mansell 5d6cb2fc32 Speedup for pthread implementation. We make use of thread local storage
to allow access to the current thread's resources without having to
obtain the memory mutex and traverse our hash table. This is a big
performance win!
2001-03-06 15:07:57 +00:00
Zeev Suraski 559c254f8f Avoid writing to error_log in case of aborted connections. 2001-03-06 15:00:08 +00:00
Stanislav Malyshev 7c2ea02288 Don't insert empty path if PHPRC is empty 2001-03-06 11:38:55 +00:00
Sean Bright 5d3939ac39 Typo.
# I don't know where I got 4.02 from
2001-03-06 04:42:04 +00:00
Sean Bright 64ad839328 get_meta_tags now allows attributes that are not quoted as well as those
that are.  It follows the HTML 4.01 specification for attribute values
outlined here -> http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.2.2
2001-03-06 04:34:05 +00:00
31d1714779 ChangeLog update 2001-03-06 02:09:13 +00:00
Rainer Schaaf 929551891e fixed bug in PDF_getbuffer (happend only on Windows)
When using PDFlib V4.0 the pdf_set(grey/rgbcolor) functions are replaced
by the PDFlib V4.0 function pdf_setcolor
2001-03-05 16:18:51 +00:00
foobar 356fc41a0a Fix help text for -f 2001-03-05 15:08:36 +00:00
0ac039536f ChangeLog update 2001-03-05 02:09:11 +00:00
foobar 81a2669216 Can't output any error messages if there isn't any function initialized
to do it..
# Bug report: #7650
2001-03-05 01:26:36 +00:00
Sean Bright dca3c8753f get_meta_tags now handles single quoted attributes as well as those that
are double quoted.
2001-03-05 00:20:41 +00:00
Zeev Suraski 87ee97e303 Fix bug #8899 (thanks Jani) 2001-03-04 22:27:56 +00:00
Zeev Suraski 1b38207410 I don't know German, but I imagine that was the problem :) 2001-03-04 22:03:23 +00:00
Zeev Suraski 1000a86e5f Fix phpinfo() bug that crept in 2001-03-04 15:49:38 +00:00
Zeev Suraski a22ada795f Improve memory consumption on chunked output buffering 2001-03-04 15:46:13 +00:00
Zeev Suraski 39724f6e4a Implemented chunked output buffering support - it's quite cool! 2001-03-04 15:12:38 +00:00
Martin Jansen b9749a40cc fixed typo 2001-03-04 14:26:58 +00:00
Frank M. Kromann f6f67ffd62 Changed code layout to remove PHP warning when running php as a CGI. 2001-03-04 02:41:27 +00:00
ac30c36dc0 ChangeLog update 2001-03-04 02:09:13 +00:00
Zeev Suraski c64fe7fbe1 Fix non-thread safe mode 2001-03-04 01:45:19 +00:00
Zeev Suraski 0117c7848e this function will never return true... 2001-03-04 01:17:21 +00:00
Zeev Suraski 0a98aa6ada Improve chunked output buffering - the output handler now knows at which stage it is 2001-03-04 01:09:36 +00:00
Zeev Suraski ce39c56c8b whitespace fix 2001-03-04 01:08:46 +00:00
Ulf Wendel 0cf7edb4a5 The main file with new features.
- added support for cache dataset groups
  - added extSave() - see my next PEAR list posting
  - added getUserdata()
2001-03-03 19:21:49 +00:00
Sascha Schumann 5c1724177d -Os is a valid GCC optimization level. 2001-03-03 18:07:52 +00:00
Sebastian Bergmann 9be9e95f06 Jan says: 'Do not load php_gtk.dll through php.ini, only use dl(), otherwise it crashes (atleast on Win32).' Me thinks: 'There should be no crash, but a warning. Anyways, remove it from php.ini-dist, so others do not run into this... :-) 2001-03-03 13:10:13 +00:00
Sylvain PAGES a5c676e91f - modified line 161 to be xml compliant 2001-03-03 07:58:31 +00:00
Sebastian Bergmann f494aff5c3 Whitespace only. 2001-03-03 07:37:18 +00:00
Sebastian Bergmann e4ef496ee5 Whitespace Fixes. Added another Win32 extension DLL. Removed configuration for non-existent debugger. 2001-03-03 07:31:43 +00:00
Sebastian Bergmann 1dcda7c92b Added some more Win32 extension DLLs. 2001-03-03 06:55:06 +00:00
30b242f832 ChangeLog update 2001-03-03 02:09:33 +00:00
9d7148531f NEWS update 2001-03-03 02:09:30 +00:00
Sterling Hughes d1fdea8373 add a warn not available for curl_getinfo().
remove unneccessary error checking.
2001-03-03 01:06:55 +00:00
Zeev Suraski bdacbc4c94 Whitespace fix 2001-03-02 23:56:03 +00:00
Andrei Zmievski 80cdb812c1 @- Forced call_user_method() and call_user_method_array() to take the
@  object argument by reference. (Andrei)
* Forced call_user_method() and call_user_method_array() to take the
  object argument by reference.
* Also cleaned up the protos for those functions and brought
  call_user_method_array() into functional equivalence with
  call_user_method().
2001-03-02 20:22:14 +00:00
Sascha Schumann de6c69f716 Combine all HTTP headers into a single writev 2001-03-02 17:01:52 +00:00
Andi Gutmans abb18a7918 - Commit NSAPI patches. 2001-03-02 15:25:51 +00:00
Zeev Suraski 9f5b255b3f Add CyberMut extension from Sylvain PAGES <spages@free.fr> 2001-03-02 14:36:29 +00:00
Sergey Kartashoff f262b2a738 # TODO updates in mnoGoSearch module README 2001-03-02 12:14:31 +00:00
Sergey Kartashoff 5a8b126d21 # mnoGoSearch example fix 2001-03-02 11:43:27 +00:00
Sergey Kartashoff 8bc7344f0b UDM_ISPELL_TYPE_SERVER parameter in udm_load_ispell_data has been added
to work with ispell server. This feature is available starting from
mnoGoSearch 3.1.12 or later. Fixed Udm_Free_Ispell_Data(). Example updated.
2001-03-02 11:41:35 +00:00
Sebastian Bergmann fdadc6342d Whitespace only. 2001-03-02 10:29:34 +00:00
Thies C. Arntzen 1b7eaa76c4 @- Fixed binding of ROWIDs in OCI8. (Thies) 2001-03-02 09:12:55 +00:00
Sebastian Bergmann 6fcde257f3 Added experimental version of Cache_Function module. 2001-03-02 07:52:56 +00:00
4360a5a4c7 ChangeLog update 2001-03-02 02:09:13 +00:00
foobar d3ce7f294c ws fix 2001-03-02 00:15:49 +00:00
Rainer Schaaf fa0085b495 - integrated new functions vor PDFlib V4.0 (beta1)
- all functions accepting strings now support binary strings, by calling
  the appropriate PDF*2() functions.
2001-03-01 19:51:55 +00:00
Sebastian Bergmann 78db58502c Added note about PEAR/Cache. 2001-03-01 19:42:07 +00:00
Sebastian Bergmann 34f81476f1 Added Graphics and Output Cache. 2001-03-01 19:22:25 +00:00
Chuck Hagenbuch 217ac2778c missing a backslash 2001-03-01 17:02:05 +00:00
Chuck Hagenbuch e591ae24cb update the makefile for the new Cache classes. 2001-03-01 16:33:34 +00:00
Chuck Hagenbuch b917f1e159 use standard naming/capitalization, and do a bit of error checking when
instantiating the storage classfile.
2001-03-01 16:32:28 +00:00
Sergey Kartashoff 9a109425fe UDM_PARAM_CROSS_WORDS mnoGoSearch extension session parameter has been
added to use crosswords available since version 3.1.11 of mnogosearch.
Example updated.
2001-03-01 14:51:12 +00:00
Sergey Kartashoff 474a59eacb # mnoGoSearch example updated. 2001-03-01 14:18:07 +00:00
Sergey Kartashoff 4202409b26 # Corrected NEWS entry about mnoGoSearch extension. 2001-03-01 13:44:04 +00:00
Sergey Kartashoff cfe2412081 Udm_Api_Version function has been added.
Example updated.
2001-03-01 13:38:39 +00:00
Sergey Kartashoff 423fcaf2dc Udm_Get_Doc_Count function from mnoGoSearch 3.1.11 has been added.
mnoGoSearch library version printing in phpinfo() has been added.
Example updated.
2001-03-01 13:26:26 +00:00
Sergey Kartashoff 035d2b3077 Added UdmFreeEnv call to mnoGoSearch link list destructor to
free memory allocated for environment.
2001-03-01 11:38:18 +00:00
Chuck Hagenbuch e2f632e1f2 If php is compiled --with-imap-ssl, link in the SSL authenticator from
c-client so that we can use php to make ssl imap connections.
2001-03-01 07:06:54 +00:00
2d89bf1fcb ChangeLog update 2001-03-01 02:09:11 +00:00
Zeev Suraski b22a6ef2b1 Fix a TSRM bug (possibly fixing a sporadic crash in the timeout window
under Windows) - fix from Ben Mansell
2001-03-01 01:06:36 +00:00
Sascha Schumann 2da359bb84 httpd-2.0 cvs seems to be busted. I'm getting very strange backtraces
and the header filter still seems to be broken.  Will try later.
2001-02-28 14:19:15 +00:00
Sascha Schumann a824c87e6d Now it actually loads, but it segfaults upon a request. 2001-02-28 14:11:34 +00:00
Sascha Schumann 6ed0cbb140 Make the module compile again with the latest httpd-2.0 cvs. 2001-02-28 14:03:58 +00:00
Andrei Zmievski 145a319f43 Do case-insensitive class name matching when parsing
array('Class', 'method') structure.
You guys can clean it up, if there is a better way.
2001-02-28 03:53:00 +00:00
0e729b502f ChangeLog update 2001-02-28 02:09:10 +00:00
Dan Kalowsky 63ec8d7eaf #adding name to credits. nothing to see here, keep moving.
PR:
Submitted by:
Reviewed by:
Obtained from:
2001-02-28 01:02:48 +00:00
Andi Gutmans d3625c0a90 - Nuke zval_del_ref() 2001-02-27 20:26:16 +00:00
Andi Gutmans 01ed33d1b6 - Pointed out by Andrei. zval_ptr_dtor() should be used instead of the
zval_del_ref() function which should be nuked.
2001-02-27 20:16:35 +00:00
Ben Mansell 5e5f5886ff Added PHP_AUTH_USER, PHP_AUTH_PW and PHP_AUTH_TYPE environment variables
for Zeus/ISAPI, so basic authenication works.

Submitted by: daniel@zeus.com
2001-02-27 13:29:21 +00:00
Sebastian Bergmann 043dcb64af PHP3_TLS_*() macros are no longer used in ext/dav/dav.c, ext/ldap/ldap.c. 2001-02-27 09:16:48 +00:00
Stanislav Malyshev ade8417ad9 ws fix 2001-02-27 09:15:02 +00:00
Sebastian Bergmann 18f3c3900a Daniel told me he is working on this one, and he is pretty close to finishing the job. 2001-02-27 09:11:56 +00:00
Stanislav Malyshev 7335076b8a Add UNC in the "todo" list 2001-02-27 09:07:01 +00:00
Andrei Zmievski cb00ed2bd3 Don't overwrite existing handlers with parent ones. 2001-02-27 05:18:34 +00:00
18396f9875 ChangeLog update 2001-02-27 02:09:11 +00:00
Zeev Suraski b8787bf2d8 Fix chunked output buffering support 2001-02-27 00:09:14 +00:00
Sascha Schumann 95b3347d8b Provide proper function aliases, if the sendmail functions
don't exist.

Submitted by: Nadir Amra <amra@us.ibm.com>
2001-02-26 20:26:07 +00:00
Andi Gutmans 7080fa5b53 - Rename modules.h to zend_modules.h 2001-02-26 18:18:34 +00:00
Andi Gutmans a0d3c5a88e - Finally rename modules.h to zend_modules.h for consistency (first try
was 2000-03-11).
- Remove the first_arg_force_ref[]; and friends extern from php.h as they
  are included via zend_API.h
2001-02-26 18:14:50 +00:00
Dan Kalowsky 17444700d4 # Bad patch job on the last commit by me. I take the BAD_CODER award for
# the day.
Removes two unnecessary REGISTER_MAIN_LONG_CONSTANT's.
# what should be done about the PHP_MINFO_FUNCTION
2001-02-26 16:36:08 +00:00
Daniel Beulshausen ab128eedaa nuke warnings 2001-02-26 16:32:57 +00:00
Andi Gutmans 7fbdc83318 - Fix whitespace 2001-02-26 15:49:38 +00:00
Rui Hirokawa f901783074 ob_iconv_handler changed to use for text data only. 2001-02-26 15:41:38 +00:00
Dan Kalowsky c7a4e718fd #Just adding in proper id (forgot to do it on the initial)
PR:
Submitted by:
Reviewed by:
Obtained from:
2001-02-26 15:20:53 +00:00
Dan Kalowsky d883ff47ed Correctly checks for the proper header files, and excludes the QUOTA functions
from non-imap2000 systems (unavailable for testing at this time).
# anyone willing to test this out on non-imap2000?
PR:
Submitted by:
Reviewed by: Sascha Schumann
Obtained from:
2001-02-26 15:17:12 +00:00
James Moore 08d3e700fa Fix for bug #9449 to stop infinate loop in wordwrap. 2001-02-26 13:04:00 +00:00
Andi Gutmans eb6ba01d1c - Fix copyright notices with 2001 2001-02-26 06:11:02 +00:00
Andi Gutmans 13b88fc18f - One more copyright year update 2001-02-26 05:44:29 +00:00
Andi Gutmans d2c9e8074c - Update copyright year 2001-02-26 05:43:27 +00:00
121d71c54d ChangeLog update 2001-02-26 02:09:15 +00:00
f812a8a77e NEWS update 2001-02-26 02:09:11 +00:00
Andi Gutmans 7513a2f972 - Fix dll linkage warnings 2001-02-25 05:21:31 +00:00
Dan Kalowsky 6b80554404 Updating the IMAP client to include quota support via the imap c-client2000 libraries.
# Y2K support is good...
Removes the SA_QUOTA and SA_QUOTA_ALL defines
# After speaking with Mark Crispin, it is believed these never existed.
Cleans up the imap_status() function to remove notion of quotas in a status message.
# There is no quota setting in a STATUS message from c-client.

Changes the config.m4 to support the client.h include
# This should include all the approriate headers for c-client (as defined by
# c-client maintainers) such as mail.h, and rfc822.h.
Changed the directory search order for the include files as well.
# Place the /usr/local/include last, and searched the
# /usr/local/include/{c-client|imap} directories first

(PHP imap_get_quota) Added
(PHP imap_set_quota) Added

@- IMAP quota support (imap_set_quota, imap_get_quota) enabled/added via
@  c-client2000

PR:
Submitted by:
Reviewed by:
Obtained from:
2001-02-25 04:41:18 +00:00
9a1c4e5328 ChangeLog update 2001-02-25 02:09:16 +00:00
Sascha Schumann b37b5f93aa Don't assume that tzname exists, if tm_zone does not exist.
PR: #9380
2001-02-24 21:18:28 +00:00
Andi Gutmans 0bed994531 - Add exports from Daniel Beulshausen 2001-02-24 21:16:58 +00:00
Sascha Schumann cb1a89cb64 Declare inet_aton properly, if the system lacks support for it.
PR: #9382
2001-02-24 21:14:18 +00:00
Sascha Schumann a40ee1f181 Actually compile on systems without syslog.
PR: #9412
2001-02-24 21:08:15 +00:00
Sascha Schumann adb3e3992c php_register_command_line_global_vars only needs file scope. 2001-02-24 21:07:07 +00:00
Sascha Schumann 280e10aac7 Neither the CGI nor the Servlet SAPI module call syslog, so remove
references to the syslog include files.
2001-02-24 21:05:02 +00:00
Sascha Schumann d516726329 Change the default to assumption that people don't use AOLserver 3.0 anymore. 2001-02-24 13:14:27 +00:00
6869507071 ChangeLog update 2001-02-24 02:09:12 +00:00
Sebastian Bergmann 54b8f2ee76 That should do the trick. 2001-02-23 22:55:28 +00:00
Sascha Schumann c2fb53bed7 Finish fopen-wrappers rename. 2001-02-23 22:07:16 +00:00
Sascha Schumann e805c1b3c1 Fix another instance of the == bug. 2001-02-23 16:49:58 +00:00
Sergey Kartashoff e6c03422fa mnogosearch example updated. 2001-02-23 10:53:07 +00:00
Sergey Kartashoff f263260d38 Added ispell loading routines and date search limits in mnogosearch module. 2001-02-23 10:34:50 +00:00
André Langhorst 9fa484104e fix stas' last commit, added additional ifdefs PHP_SIGCHILD to fix win32 build 2001-02-23 05:08:15 +00:00
c8a22a3848 ChangeLog update 2001-02-23 02:09:14 +00:00
Hartmut Holzgraefe f1caba9325 removed LC_* warnin 2001-02-22 18:35:22 +00:00
Chuck Hagenbuch 6bbecd4c07 factory-generated classes have lowercase subclass names by our (newly
revised) standards.
2001-02-22 16:01:14 +00:00
Sergey Kartashoff 047e598c3a README for mnoGoSearch module updated. 2001-02-22 13:02:38 +00:00
Andi Gutmans 9a28132876 - Fix indentation and remove comment. 2001-02-22 11:30:53 +00:00
Sergey Kartashoff 8bf6bdc2b9 Added Ispell routines to work with Ispell data loaded into sql tables.
Example updated.
2001-02-22 10:40:44 +00:00
Stanislav Malyshev 77d14126b1 Safer bin2hex 2001-02-22 10:36:40 +00:00
Stanislav Malyshev 4cda96691c Fix #8992, patch by yasushi_takahashi@tsuken.co.jp 2001-02-22 10:15:52 +00:00
Uwe Steinmann 454221ba62 - took out the HwSLS_FETCH to make it compile again on Unix
Is this really neccesary at this point?
2001-02-22 09:38:59 +00:00
Jon Parise b0af96a9fe The php_rand() and php_srand() functions added in the previous commit
require the inclusion of php_rand.h.
2001-02-22 03:37:32 +00:00
bd98f3d124 ChangeLog update 2001-02-22 02:09:16 +00:00
James Moore 118c015529 Adding php_rand() and php_srand(seed) as a wrapper around random, lrand48 and rand. 2001-02-22 00:24:19 +00:00
Shane Caraveo 6e31987376 Initalize some of the global vars. Crashed under ms debugger without having them initialized. 2001-02-21 23:57:28 +00:00
James Moore 977b9ddc01 Adding crypt.c and php_crypt.h to win32 builds, they were missing.. 2001-02-21 23:52:57 +00:00
Rainer Schaaf 28ed45fa72 When using pdf_get_buffer() and doing a correct cleanup by calling pdf_delete()
this always resulted in a coredump (after everything was finished, so only
visible in the logfile).
So it seems to be neccesary to copy the contents of the result of get_buffer,
to avoid this coredump.
2001-02-21 23:30:21 +00:00
Shane Caraveo 09c7116f6e zend_compile_file returns a NULL on error, check for that before
calling destroy_op_array unless we like crashes :-)
2001-02-21 20:50:49 +00:00
Thies C. Arntzen 7139926e84 fix possible leak. 2001-02-21 20:33:46 +00:00
Sascha Schumann 4a32816f9e If we cannot send the header, we don't need to continue with the page. 2001-02-21 20:25:53 +00:00
Stig Bakken 5ed1199b61 * dbmaker fix, shared support 2001-02-21 18:23:53 +00:00
Andrei Zmievski 8d7972b69b Fix memory leak. 2001-02-21 17:22:26 +00:00
Stanislav Malyshev 2b45f38ec9 Add safety check 2001-02-21 15:20:29 +00:00
Hartmut Holzgraefe 5b741dfb58 # make sebastian and compiler happy .) 2001-02-21 11:16:16 +00:00
Sascha Schumann 328ca1b178 There is no need to declare ap_php_(opterr|optopt) with external linkage
as they are not used outside of getopt.c.

PR: #9364
2001-02-21 07:41:01 +00:00
Sascha Schumann 0656a47f3e Instead of assuming that sendmail lives in /usr/lib, if we don't find it,
we also check /usr/lib now.

PR: #9362
2001-02-21 07:39:13 +00:00
Sascha Schumann 47f7795594 Correctly check for the existence of the st_rdev field.
Note that this field is required to exist for SUSv3 conformance.

Submitted by: amra@us.ibm.com
PR: #9358
2001-02-21 07:18:28 +00:00
Sascha Schumann e8ef0d8b2c Preprocessor stuff should go into CPPFLAGS. 2001-02-21 07:09:22 +00:00
Sebastian Bergmann 59a58018a5 Added note about PCRE update. 2001-02-21 06:22:41 +00:00
Jason Greene 7557c0b066 Corrected News entry. 2001-02-21 03:55:17 +00:00
ed64a52d65 ChangeLog update 2001-02-21 02:09:18 +00:00
de4833fc8c NEWS update 2001-02-21 02:09:15 +00:00
Hartmut Holzgraefe b14d2cc0dc will now initialize dynamic extensions *after* static ones 2001-02-21 01:43:15 +00:00
Stig Bakken c685f25d33 * allow empty passwords in dsn (for example "mysql://user:@database") 2001-02-20 23:00:08 +00:00
Zeev Suraski a3775357ec Fix Win32 build 2001-02-20 22:32:29 +00:00
Andrei Zmievski df868616aa Enable UTF8 support (incomplete) by default. 2001-02-20 22:21:06 +00:00
Andrei Zmievski a798fe8d5d Include PHP compatibility header file. 2001-02-20 22:20:47 +00:00
Andrei Zmievski 6542e70473 Upgrade PCRE to version 3.4. 2001-02-20 22:00:33 +00:00
Daniel Beulshausen 714e340a3b proper prefix for lookup_hostname 2001-02-20 20:52:53 +00:00
Daniel Beulshausen adcd6e7b0b make hyperwave build under win32 2001-02-20 20:45:55 +00:00
Daniel Beulshausen a96174dbe3 make socket functions available to the outside 2001-02-20 20:34:14 +00:00
Daniel Beulshausen 721d59948e make gd work again under win32 2001-02-20 18:00:44 +00:00
Daniel Beulshausen 57ce23e3cb add configuration which links again libsasl.lib 2001-02-20 17:11:25 +00:00
Jason Greene ffa08fc26e Changed default behavior of array_search to match in_array
(strict was default on, and is now default off)
2001-02-20 16:44:57 +00:00
David Eriksson f9fe688055 Patch for inherited interfaces by Daniel Stodden <stodden@in.tum.de> 2001-02-20 15:35:56 +00:00
Daniel Beulshausen 10695935e0 added missing ELS_FETCH() 2001-02-20 15:34:10 +00:00
Daniel Beulshausen cef5e966fd define HAVE_LIBICONV 2001-02-20 15:19:38 +00:00
David Eriksson fd4f472928 Stop leaking ParameterType data 2001-02-20 15:18:27 +00:00
Daniel Beulshausen 1ed938ceba no swf under win32 2001-02-20 15:15:10 +00:00
David Eriksson a4d8deb6e5 Corrected typo in config.m4 2001-02-20 15:12:31 +00:00
Daniel Beulshausen 8fd9c6e206 changed zlibstat.lib -> zlib.lib, which is the correct name 2001-02-20 15:05:37 +00:00
Andrei Zmievski 1424e36315 Rename to array_search(). 2001-02-20 14:23:03 +00:00
Adam Dickmeiss 4c04c755dd Yet another bug fix regarding present. 2001-02-20 11:40:36 +00:00
Sergey Kartashoff 3bfea1e627 Phrase search support has been added to mnogosearch extenstion.
Min_word_len and Max_word_len support has been added to mnogosearch
extension. Example updated.
2001-02-20 11:29:16 +00:00
Jason Greene 1888a98a4b Moved the core of in_array into the function php_search_array, which is called by
in_array and search_array (new)

@ Added search_array which works similar to in_array but returns
@ the key instead of a boolean. (jason@php.net)
2001-02-20 05:36:40 +00:00
Zeev Suraski fa8f552fbf Restore COM.c 2001-02-20 05:14:32 +00:00
cdda03cf07 ChangeLog update 2001-02-20 02:09:13 +00:00
179fffbe74 NEWS update 2001-02-20 02:09:10 +00:00
Derick Rethans 82c2851bcc - Fix for bug 9277, two the same boundaries make sense in some cases 2001-02-19 19:20:47 +00:00
Adam Dickmeiss c211778f5d Bug fix: number of records in yaz_range wrongly set to zero. 2001-02-19 17:06:40 +00:00
Sascha Schumann 0eec8cf2f7 Simpler fix for the InvalidOid thing by Tom Lane.
He assured me that InvalidOid has always expanded to (Oid) 0, so this
should be safe.
2001-02-19 16:31:17 +00:00
Sascha Schumann 2403578e35 Include <sys/uio.h>. Apparently, the header cleanup in glibc 2.2.2
caused that file to be included by accident.
2001-02-19 10:28:08 +00:00
Sascha Schumann 1e6be5aaf5 Fix incompatibility with PostgreSQL CVS.
We now perform a check whether we need to include <postgres.h> to
succesfully compile.

PR: #9328
2001-02-19 08:14:45 +00:00
Sascha Schumann b91b1779a5 Fix warning 2001-02-19 07:50:06 +00:00
Sascha Schumann 5db26dd415 Allow passing relative paths to --with-pgsql 2001-02-19 07:49:16 +00:00
e6050684fa ChangeLog update 2001-02-19 02:09:19 +00:00
5941ae891b NEWS update 2001-02-19 02:09:16 +00:00
Sascha Schumann 8c92cdd897 Save 50% of the syscalls when writing the HTTP header. 2001-02-18 19:03:36 +00:00
Thies C. Arntzen e9c4218470 [p]fsockopen: fixed possible leak 2001-02-18 18:54:41 +00:00
Thies C. Arntzen d6aab98541 fixed buffer-overwrite 2001-02-18 18:31:31 +00:00
Thies C. Arntzen 84c243d3cc fixed a possible double-free 2001-02-18 18:15:01 +00:00
Jon Parise a7679d2556 Go back to listing the copyright years explicitly (instead of using a
range).
2001-02-18 17:47:43 +00:00
Egon Schmid a297dbd6f3 Typos in protos. 2001-02-18 16:59:18 +00:00
Harald Radi 176f24c9a5 export global constants for codepage and variant type
VT_* and CP_*
2001-02-18 16:51:27 +00:00
Harald Radi c315e137c3 added a few more variant types for zval <-> variant conversion 2001-02-18 16:49:59 +00:00
Harald Radi a15e465a34 @- Added new object VARIANT() to encapsulate values for use with
@  the COM and DOTNET module. Therefore it is now possible to pass
@  values by reference, convert php values to extended variant types (currency,
@  date, idispatch, iunknown, ...) and define the codepage that should
@  be used for unicode - conversion.
2001-02-18 16:49:06 +00:00
Harald Radi 8d6f13dc2b added myself to CREDITS 2001-02-18 16:40:28 +00:00
Thies C. Arntzen 5f4090d0e0 - Fixed crash in OCI8 when using unitialized LOBs. (Thies) 2001-02-18 11:10:30 +00:00
David Croft 6bf8736737 add year 2001 to header 2001-02-18 09:21:57 +00:00
5a5ae1815f ChangeLog update 2001-02-18 02:09:11 +00:00
Thies C. Arntzen 67c2eaa6ea make oci work again. 2001-02-17 15:54:40 +00:00
Harald Radi 55f25fb942 multiple codepage support
export global constants
2001-02-17 02:16:29 +00:00
08009cfd39 ChangeLog update 2001-02-17 02:09:28 +00:00
Sascha Schumann 69ab3f53f6 Add some old and some recent news 2001-02-16 23:10:12 +00:00
Zeev Suraski 392e9869ee import notes modules from Brad Atkins 2001-02-16 21:36:30 +00:00
Sascha Schumann 7911be587b Add all necessary includes for these header files. 2001-02-16 18:55:58 +00:00
Chuck Hagenbuch 0b11c910f5 All DB modules should return NULL from fetchRow() now if there are no more
results, and a DB_Error object only on an error.

DB::isError() return false when passed null now.
2001-02-16 17:14:39 +00:00
Ben Mansell f49d4de599 Fixed non-threadsafe code: 'isapi_special_server_variables' was a static
buffer, and not allocated per-connection. Bad bad bad!
2001-02-16 16:01:34 +00:00
foobar 2c3b7385bf Fixed a typo in constant definitions and a possible crash in curl_setopt().
# pr: #9181
2001-02-16 14:31:37 +00:00
Egon Schmid d27ebba71f Wrong return type. 2001-02-16 13:13:52 +00:00
eba3660d72 ChangeLog update 2001-02-16 02:09:26 +00:00
d0f235fec0 NEWS update 2001-02-16 02:09:23 +00:00
Egon Schmid bbe53dedcc Small typo. 2001-02-15 20:33:09 +00:00
Sterling Hughes 2f0238dc4e Change e-mail address
# Can I get someone to change my cvsusers e-mail address to
# sterling@designmultimedia.com?
2001-02-15 16:20:13 +00:00
Thies C. Arntzen 8499b430cf @- Fixed some modules to allow using output-buffering. (Thies)
i nuked all unneded calls to php_header() - i'm not too sure how we do
handle HEAD Requests as they were only detected via php_header(). but calling
php_header from a module makes output-buffering unusable.

NOTICE: there is some EBSDIC stuff in gd.c - i think it's obsolete.
2001-02-15 14:49:01 +00:00
Thies C. Arntzen 5ca813a564 0..255 2001-02-15 14:01:18 +00:00
Thies C. Arntzen 72ec2e8f12 fixed SEGFAULT when using xml_set_object. Zend does not yes support
cyclic references!
2001-02-15 13:41:04 +00:00
Sergey Kartashoff cd55dfa3bd Added thow new mnoGoSearch agent session parameters:
UDM_PARAM_WEIGHT_FACTOR and UDM_PARAM_WORD_MATCH.
2001-02-15 11:50:49 +00:00
Sascha Schumann 637e8e14aa There might be more systems which do not support chroot, so we check
for the existence of it.

Additionally, if chroot is not supported, the warn_not_available function
is invoked now.
2001-02-15 05:21:27 +00:00
Zeev Suraski c239da7e66 Fix the PostgreSQL fix... 2001-02-15 02:15:36 +00:00
0a446bc274 ChangeLog update 2001-02-15 02:09:11 +00:00
Derick Rethans 8cef8a9ca1 - chroot does not work on windows 2001-02-15 00:43:44 +00:00
foobar 28b2869ac8 This should make detecting the version of Oracle libs a bit more accurate
to avoid the 'missing libcore4' errors. (e.g. on AIX)
Bug reports: #9027, #8905
2001-02-14 21:41:40 +00:00
Jon Parise 0450aecb8c Fix build. 2001-02-14 20:10:15 +00:00
Sergey Kartashoff 59e1b2cd4e mnoGoSearch config.m4 freebsd compatibility fix. 2001-02-14 14:39:40 +00:00
Sergey Kartashoff 3fc482b207 Added mnogosearch version checking into config.m4.
Some proto fixes.
2001-02-14 14:27:46 +00:00
Stanislav Malyshev e4f4983cdc allow more extensions with resources 2001-02-14 13:17:49 +00:00
Thies C. Arntzen ecaeac5881 ocifreedesc() now spits a NOTICE when called the "wrong" way. 2001-02-14 13:06:03 +00:00
Derick Rethans b972771971 - Added the notification of the chroot function addition
#- I forgot this with the initial commit
2001-02-14 11:27:28 +00:00
Derick Rethans 2648283b5b - Added an extra chdir("/"); as sugested by Sascha 2001-02-14 11:02:54 +00:00
Derick Rethans 4a54a15fc6 - Added the chroot function for changing root in a script.
#- This can be usefull when using PHP in a shell environment, or when PHP
#  runs as CGI which needs a little more security
2001-02-14 10:48:48 +00:00
Sascha Schumann f5874e9758 Add note about removing the requirement that you need to include the
respective class definition before using a session variable of the type
object.

This has been the best suggestion so far and is very likely to be adopted
in the near future.

Submitted by: Hartmut Holzgraefe
2001-02-14 10:12:29 +00:00
Thies C. Arntzen ab6bd757ec *** empty log message *** 2001-02-14 08:16:03 +00:00
9adb1d771b ChangeLog update 2001-02-14 02:09:15 +00:00
a3f0f0c279 NEWS update 2001-02-14 02:09:12 +00:00
Thies C. Arntzen 9d6f117938 remove stupid PGSQL warning 2001-02-13 20:13:14 +00:00
Adam Dickmeiss 9d8c1fb983 Bug fix: Record retrieval (present) is termiated on error. 2001-02-13 20:02:53 +00:00
Thies C. Arntzen f6925611fb @- PostgreSQL now does a rollback at the end of a request on every
@  persistent connection. This is done by doing an "empty" transaction
@  on the connection (This was advised by someone from the PostgreSQL
@  core-team). If you leave transactions open on your page you will see a
@  "NOTICE:  BEGIN: already a transaction in progress" message in your
@  apache error_log. This message is created by the PostgreSQL libs - we can
@  do nothing about it. (Thies)
2001-02-13 18:28:24 +00:00
Thies C. Arntzen 79a38a1c3a @- fixes PostgeSQL pg_connect() bug. We would sometimes close the default
@  link by acciedent. (Patch by: aja@nlgroup.ca)
2001-02-13 16:54:48 +00:00
Thies C. Arntzen 9a631384f3 remove unneded comments 2001-02-13 15:58:58 +00:00
Zeev Suraski f3063553c3 Move version registration to a more correct place 2001-02-13 13:53:42 +00:00
c2f1a45b24 ChangeLog update 2001-02-13 02:09:12 +00:00
880db726f7 NEWS update 2001-02-13 02:09:09 +00:00
Adam Dickmeiss 4ea3336962 Implemented yaz_present, yaz_scan, yaz_scan_result, yaz_ccl_conf,
yaz_ccl_parse and yaz_itemorder. Updated documentation.
2001-02-12 23:31:11 +00:00
Rainer Schaaf 4c21de658f added module support (for dl()) for PDFlib
the PDF files now tell that they are generated by the PHP binding.
2001-02-12 17:50:39 +00:00
Andi Gutmans 4afacc0a7c - Remove two unused functions 2001-02-12 15:49:24 +00:00
Andi Gutmans 033190cbcf - Fix warning
PR:
Submitted by:
Reviewed by:
Obtained from:
2001-02-12 15:47:38 +00:00
Andi Gutmans 488d808748 - Fix whitespace. 2001-02-12 15:18:05 +00:00
Zeev Suraski d854b26e43 Fix a bug that could cause corruption in case of an error during
get_zval_ptr()
2001-02-12 15:16:11 +00:00
Thies C. Arntzen 201342385e @- Improved OCI8 dead-session detection. (Patch by: George Schlossnagle) 2001-02-12 14:36:28 +00:00
Thies C. Arntzen fc7d103b73 fixed possible leak in imap_search 2001-02-12 11:57:22 +00:00
6b906ba742 ChangeLog update 2001-02-12 02:09:16 +00:00
Anders Johannsen c484140cfa Fixed indentation problems related to use of TAB instead of spaces 2001-02-12 00:38:28 +00:00
Anders Johannsen 7eb2ad0d81 The Cmd:: class implements an abstraction for various ways
of executing commands (directly using the backtick operator,
as a background task after the script has terminated using
register_shutdown_function() or as a detached process using nohup).
2001-02-11 21:39:13 +00:00
Sean Bright 733977e4bd Added note about get_meta_tags bugfix 2001-02-11 14:38:25 +00:00
Sean Bright ef2e1a72cf Fix for bug #4556
# This is pretty much a total rewrite of get_meta_tags using a simple
# handwritten tokenizer.  It might be overkill, but it works.
2001-02-11 02:38:40 +00:00
bc26a67a54 ChangeLog update 2001-02-10 02:09:09 +00:00
Hartmut Holzgraefe 766bdbc919 make _php_image_convert configuration-aware 2001-02-09 21:14:30 +00:00
Hartmut Holzgraefe d8a83a3722 libjpeg-not-installed protection 2001-02-09 21:04:45 +00:00
Rasmus Lerdorf e0c4bd742e Stray ] 2001-02-09 16:42:55 +00:00
Rasmus Lerdorf 4877d13ffa What the heck is CUT? Assume someone meant UTC here. And fix a
warning.
2001-02-09 15:28:23 +00:00
Sergey Kartashoff 279588aa12 Added UDM_PARAM_FIRST_DOC and UDM_PARAM_LAST_DOC mnoGoSearch extenstion
result parameters. Example updated.
2001-02-09 13:29:20 +00:00
Andi Gutmans e0b2a5f583 - Remove duplicate code and do a tiny optimization in DO_FCALL 2001-02-09 12:47:57 +00:00
David Hedbor 140279fc7b Fixed PHP authentication and some other minor things. 2001-02-09 05:32:42 +00:00
7a6df789cf ChangeLog update 2001-02-09 02:09:35 +00:00
Boian Bonev e7a148a758 fixed SIGSEGV in vpopmail_auth_user when optional arg apop is not set 2001-02-08 23:31:01 +00:00
Andrei Zmievski 6b0d9e19e1 *** empty log message *** 2001-02-08 19:11:47 +00:00
Sascha Schumann 9db16758b3 Make fprintf's optional 2001-02-08 16:26:18 +00:00
Uwe Steinmann 32b8cdde14 - add domxml_unlink_node(), not tested 2001-02-08 15:12:16 +00:00
Sergey Kartashoff df9803c75f Added UDM_PARAM_SEARCHTIME result parameter.
Now at least mnoGoSearch-3.1.10 required to use this module.
Added some parameters aliases. Example updated.
2001-02-08 13:33:37 +00:00
Sergey Kartashoff e0107c14fc # also Added CREDITS and cvs Template
# added udm_config.h for compatibility with mnoGoSearch-3.1.10pre
2001-02-08 10:14:57 +00:00
Andrei Zmievski 51c535f510 Move todo items. 2001-02-08 04:55:49 +00:00
9976674c6f ChangeLog update 2001-02-08 02:11:16 +00:00
Sascha Schumann 28052724e7 Suppress the other nasty warning 2001-02-08 00:49:24 +00:00
Chuck Hagenbuch 5182488725 may as well go by the capitalization we agreed on sooner rather than later. 2001-02-07 20:22:59 +00:00
Boian Bonev 156207b37b # fixed several warnings - variables not used, functions not declared
# added vclose() declaration - vpopmail does not declare it
2001-02-07 17:48:00 +00:00
Sascha Schumann 271617483a Improve use of $withval. This also cures the problem of adding -Lyes/lib
to $LIBS.
2001-02-07 16:01:29 +00:00
Andrei Zmievski 4aefaf2816 Only one entry for mnoGoSearch is necessary. 2001-02-07 14:10:13 +00:00
Sergey Kartashoff e03125fe60 Added .cvsignore 2001-02-07 10:41:40 +00:00
126f9c2776 ChangeLog update 2001-02-07 02:09:12 +00:00
cc4a1506a4 NEWS update 2001-02-07 02:09:09 +00:00
Jim Jagielski e541a27eed For those lucky systems with both random() and *rand48(), the random()
family is the prefered choice. So if both exist, we now choose that.
2001-02-06 16:27:08 +00:00
Sergey Kartashoff 222ac6e30e UDM_FIELD_ORDER and UDM_FIELD_CRC mnoGoSearch result fields has been added.
Example updated.
@- UDM_FIELD_ORDER and UDM_FIELD_CRC mnoGoSearch result fields
@  has been added. (gluke)
2001-02-06 15:40:33 +00:00
Sergey Kartashoff 0c759c822c UDM_PARAM_WORDINFO mnoGoSearch result parameter has been added.
UDM_PARAM_RATING result field has neen added as alias for UDM_PARAM_SCORE.
Example updated.
@- UDM_PARAM_WORDINFO mnoGoSearch result parameter has been added.
@  UDM_PARAM_RATING result field has neen added as alias for
@  UDM_PARAM_SCORE. (gluke)
2001-02-06 14:30:55 +00:00
Andrei Zmievski 26283a3bcc Preserve API compatibility. 2001-02-06 04:15:50 +00:00
Andrei Zmievski 88fce00cc0 Don't use Z* macros for non-zvals. 2001-02-06 03:57:43 +00:00
Andrei Zmievski 74912b9afb Cleaned up and optimized WDDX serialization - it's about twice
as fast now.
2001-02-06 03:54:15 +00:00
b2873a6cc2 ChangeLog update 2001-02-06 02:09:25 +00:00
b017713c3b NEWS update 2001-02-06 02:09:22 +00:00
Stephen van Egmond b10273781a Added tests for arpa/*.h and resolv.h which don't exist on the BeOS.
The dns functions on BeOS come from socket.h
2001-02-06 00:07:21 +00:00
Stephen van Egmond b2067a1839 Added tests for arpa/nameser.h and resolv.h, which don't exist on the BeOS. 2001-02-06 00:03:44 +00:00
Zeev Suraski c3531b3750 Fix string offset data corruption 2001-02-05 22:27:47 +00:00
Zeev Suraski bf84618244 Fix Windows build 2001-02-05 21:59:17 +00:00
Derick Rethans cf11a4fbc8 - Added a new parameter to mail() which appends aditional command line
parameters to the mail program. This is usefull to set the From headers
  correctly with the -f parameter to sendmail p.e.
@- Added a new parameter to mail() which appends aditional command line
@  parameters to the mail program. (Derick)
2001-02-05 21:30:29 +00:00
Vlad Krupin b5875d9d7c Added myself to CREDITS (vlad) 2001-02-05 19:18:04 +00:00
Harald Radi 3926cc2278 fixes the problem that php.exe compiled on win2k platform won't run on any other 2001-02-05 18:36:54 +00:00
Vlad Krupin ee668c5881 now when pspell/pspell.h is included, it will recognize
that it has to work in compatibility mode. (The previous fix
had the right idea, but was too far down in the source)
2001-02-05 18:15:31 +00:00
Andrei Zmievski 1b2387102d *** empty log message *** 2001-02-05 17:39:58 +00:00
Andrei Zmievski 5355703cf3 Allow calling static methods via call_user_method_* functions. 2001-02-05 17:37:47 +00:00
Andrei Zmievski 5de418fde4 One more notice about using names with NEWS entries. 2001-02-05 17:11:32 +00:00
Sergey Kartashoff fb057e7ea9 Added new Udm_Clear_Search_Limits mnogosearch extension function.
@- Added Udm_Clear_Search_Limits mnoGoSearch extension function.
2001-02-05 15:15:09 +00:00
David Croft f182245c53 2 things to do 2001-02-05 14:29:21 +00:00
Andrei Zmievski fce819effa Whitespace. 2001-02-05 14:27:10 +00:00
Sergey Kartashoff 886cd2d937 Fixed default search path.
@- Fixed default search path. (gluke)
2001-02-05 14:00:36 +00:00
Sergey Kartashoff 83265243d3 Added new Udm_Add_Search_Limit mnoGoSearch extension function.
Some bugfixes and example update.
@- Added new Udm_Add_Search_Limit mnoGoSearch extension function.
@  Some bugfixes and example update. (gluke)
2001-02-05 13:12:16 +00:00
James Moore efa9319c64 Adding Sebastian Bergmann to QA team list. 2001-02-05 10:18:14 +00:00
Sergey Kartashoff fad70e0d98 Fixed mnogosearch protos. Fixed mnogosearch functions return values.
A bug with capital letters break search has been fixed.
@- Fixed mnogosearch protos. Fixed mnogosearch functions return values.
@  A bug with capital letters break search has been fixed. (gluke)
2001-02-05 08:42:54 +00:00
6c08573e42 ChangeLog update 2001-02-05 02:09:11 +00:00
2128e901c7 NEWS update 2001-02-05 02:09:08 +00:00
James Moore 7a85ec55f7 Adding microtime() tests 2001-02-04 16:56:59 +00:00
James Moore 712f09d2a8 Always return a value even if HAVE_GETTIMEOFDAY is not set 2001-02-04 16:18:36 +00:00
James Moore a97e0e1964 Fix for time.c under win32. Patch By: "Vanhanen, Reijo" <Reijo.Vanhanen@helsoft.fi>
@- microtime under windows now returns accurate values (James)
2001-02-04 15:52:32 +00:00
Sterling Hughes 1754a750d0 # *Brain Fart* 2001-02-04 09:20:31 +00:00
Sterling Hughes ae3549d479 Add a bunch of stuff.. 2001-02-04 09:19:01 +00:00
fb28df713f ChangeLog update 2001-02-04 02:09:11 +00:00
Andrei Zmievski 98d8ba8cc4 Allow passing class name as well as an object instance to call methods. 2001-02-04 00:06:08 +00:00
Andrei Zmievski 088a4b7151 Set the correct function state during execution. This is mainly to have
get_active_function_name() to return proper value.
2001-02-03 07:21:35 +00:00
Andrei Zmievski 56d3b036ec Adding delimiter capturing functionality.
As far as NEWS, compilation fixed don't belong here.
2001-02-03 04:53:49 +00:00
Andrei Zmievski 50f28f4372 Inherit overloaded handlers. 2001-02-03 04:52:29 +00:00
4695ff82b9 ChangeLog update 2001-02-03 02:09:23 +00:00
792af4b6b2 NEWS update 2001-02-03 02:09:20 +00:00
Sean Bright bf6ce01b78 Comments didn't reflect rewinddir() 2001-02-03 00:50:48 +00:00
Andrei Zmievski c5baa5ede1 Revert bogus patch and fix it properly. 2001-02-02 21:32:16 +00:00
Colin Viebrock 96343bac90 Fix for http://bugs.php.net/bugs.php?id=9082
I know switch() is expensive, so someone rewrite this "properly" if you
want.
2001-02-02 20:55:27 +00:00
Rasmus Lerdorf 91d91d5052 pspell .12 fix
@ pspell .12 fix (Hugh Jones)
2001-02-02 18:28:48 +00:00
Harald Radi 2ee1ed2138 correct phpinfo() output 2001-02-02 18:11:39 +00:00
Colin Viebrock 2265b5b4c5 I think this should've been changed as well, right? 2001-02-02 17:59:30 +00:00
Egon Schmid c6633698b4 Fixed protos. 2001-02-02 15:49:59 +00:00
Harald Radi 58dc4ad8db correct phpinfo() output 2001-02-02 15:02:05 +00:00
Rasmus Lerdorf 6745b16c82 Fix strip_tags to not strip a lone > character
@ Fix strip_tags to not strip a lone > character (Rasmus)
2001-02-02 13:47:02 +00:00
Sergey Kartashoff ab60971ec4 Added new UDM_PARAM_STOPTABLE and UDM_PARAM_STOPFILE parameters
for Udm_Set_Agent_Params mnoGoSearch module. Now it can use stopwords
stored either in database or in the plain text files. Added php warnings.
Test example updated.
@- Added new UDM_PARAM_STOPTABLE and UDM_PARAM_STOPFILE parameters
@  for Udm_Set_Agent_Params mnoGoSearch module. Now it can use stopwords
@  stored either in database or in the plain text files. Added php warnings.
@  Test example updated. (gluke)
2001-02-02 12:54:15 +00:00
Chuck Hagenbuch 38fae9bae4 make sure to include subclasses before trying to instantiate them. 2001-02-02 05:24:31 +00:00
f4f20f5bb1 ChangeLog update 2001-02-02 02:09:11 +00:00
e684eb390d NEWS update 2001-02-02 02:09:08 +00:00
Colin Viebrock e365fc21e9 trigger_error() should be ($msg,$level), no? 2001-02-01 20:15:08 +00:00
Thies C. Arntzen 9c1abab2db ws-only 2001-02-01 17:16:35 +00:00
Thies C. Arntzen 1366f67d0b @- When using the ob_gzhandler() PHP now automagically also sets the
@  Content-Lengh correctly which enables browsers to use the HTTP
@  Keep-Alive feature. (Thies)
2001-02-01 17:14:18 +00:00
Sascha Schumann a4df53ad1c Fix a huge memory leak in the ob_gzhandler. 2001-02-01 16:29:07 +00:00
Colin Viebrock 138ab8eccf While we're fixing the ini files, change these to web-safe colours
... this always bugged me :)
2001-02-01 15:41:02 +00:00
Stanislav Malyshev bb6d3e60e8 Allow usage of GD contexts and not tempfiles in output functions 2001-02-01 15:40:35 +00:00
Andrei Zmievski 898baa8b54 No need for CLS_FETCH(). 2001-02-01 15:25:53 +00:00
Sascha Schumann 23ddeac9a5 Fix broken ZTS build 2001-02-01 15:24:17 +00:00
Andrei Zmievski b7b7ffbabd Add cvsclean target for standalone extensions. 2001-02-01 14:11:44 +00:00
Sergey Kartashoff d7b7c7283f UDM_PARAM_CHARSET parameter in Udm_Set_Agent_Param() has been added to
set local charset you are using. Example updated also.
@- UDM_PARAM_CHARSET parameter in Udm_Set_Agent_Param() has been added to
@  set local charset you are using. Example updated also. (gluke)
2001-02-01 13:06:26 +00:00
Stanislav Malyshev 5af00138e9 Add utility function 2001-02-01 10:24:02 +00:00
Stig Bakken e07eda31ed did someone poop in the code? :-) 2001-02-01 09:36:52 +00:00
Uwe Steinmann 485c8fb570 ­ some modification from Rainer Schaaf
* fixed prototype for pdf_new()
   * MINFO: included Revision of pdf.c, removed info about CJK + in-memory, this is
     standard with V3.x)
   * repaired PDF_open_CCITT
   * repaired PDF_setfont
   * eliminated many compiler warnings.
   * former resource "pdf document" is now called "pdf object"
2001-02-01 07:07:10 +00:00
Jon Parise 102752abc2 Massive reformatting. 2001-02-01 06:29:41 +00:00
Andrei Zmievski 0651b4ff16 Modified /F handling to allow calling object methods. 2001-02-01 05:04:58 +00:00
Andrei Zmievski 8fe036596f Added zend_is_callable() function that checks whether passed zval
represents a valid and exiting callable construct.
2001-02-01 05:01:26 +00:00
f5bec86645 ChangeLog update 2001-02-01 02:09:11 +00:00
3eb01b1fb2 NEWS update 2001-02-01 02:09:08 +00:00
Egon Schmid 0c450fa966 Only two lines are allowed here. 2001-01-31 23:35:37 +00:00
Sean Bright 31c8104dc6 Added the mysql_get_*_info() functions.
# If anyone knows of a version of mysql lower then 3.20.32 that implements
# all 3 of these functions, please change the conditionals.
@- Added mysql_get_client_info(), mysql_get_server_info(),
@  mysql_get_proto_info(), and mysql_get_host_info() functions. (Sean)
2001-01-31 22:04:30 +00:00
Andi Gutmans 0611acb910 - Change unset() functions to null(). unset() is legacy 2001-01-31 21:53:30 +00:00
Chuck Hagenbuch 00b84703f8 use $HTTP_SERVER_VARS, in case register_globals is Off, and use !empty()
instead of just if () to avoid errors.
2001-01-31 18:34:39 +00:00
Daniel Beulshausen 638ecd26f7 add iconv and ming 2001-01-31 17:12:12 +00:00
Daniel Beulshausen 6859af3ac8 nuke warning, and add dsp 2001-01-31 17:05:00 +00:00
Daniel Beulshausen 04267de3a1 fix typo 2001-01-31 17:00:11 +00:00
Daniel Beulshausen 6f1ca9de3e make iconv compile under win32 using libiconv
# http://clisp.cons.org/~haible/packages-libiconv.html
2001-01-31 16:57:00 +00:00
Sergey Kartashoff 7413c65e31 Added search cache and track query features.
@-Added search cache and track query features.
# For example please refer at ext/mnogosearch/test.php
2001-01-31 14:04:30 +00:00
James Moore b3fd49365a Adding readme for release process, this needs to live somewhere and here seems as good a place as any. 2001-01-31 13:58:20 +00:00
Harald Radi 2242647e64 added currency, date, IUnknown and NULL datatypes 2001-01-31 09:30:13 +00:00
Uwe Steinmann 98b685a515 - note about change of pdf api 2001-01-31 06:13:08 +00:00
Andi Gutmans 2f2d32fa61 - Quick fix. I'm for changing these to add_property_null() as we've nuked
- unset.
2001-01-31 05:21:53 +00:00
fb33db9aa8 ChangeLog update 2001-01-31 02:09:14 +00:00
53d5f91b40 NEWS update 2001-01-31 02:09:11 +00:00
Stig Bakken 1a07f60b92 whitespace 2001-01-31 01:27:09 +00:00
Sean Bright b940c97233 Fixed conditional.
# Woops!
2001-01-31 01:14:54 +00:00
Sean Bright 4086ba9773 Fix for bug #8991. mysql_field_type() now returns "year" for columns of
type YEAR.
2001-01-31 00:55:28 +00:00
Adam Dickmeiss 2dc33e3e71 Fixed problem with looping present requests for Isite targets. 2001-01-30 13:09:25 +00:00
Harald Radi 789182d06c fixing .cvsignore 2001-01-30 13:00:36 +00:00
Harald Radi f904c6b84d adding .cvsignore 2001-01-30 12:59:54 +00:00
Sergey Kartashoff cdf6b7e2c3 mnoGoSearch extension module initial version has been added.
This module currently at the alpha state, but it can be used already.
@- mnoGoSearch extension module initial version has been added.
@  This module currently at the alpha state, but it can be used already.
# For details about mnoGoSearch please refer at http://search.mnogo.ru
PR:
Submitted by:
Reviewed by:
Obtained from:
2001-01-30 12:53:51 +00:00
Stig Bakken 86c5a77ed9 @Allow url encoding in DB usernames and passwords (Stig, PEAR) 2001-01-30 08:34:55 +00:00
David Eriksson 4320dc0a2c Applied patch from Oleg Sharoiko <os@rsu.ru> to fix bug in satellite_any_to_zval_sequence 2001-01-30 06:43:36 +00:00
Harald Radi 79a39e3d39 pass another com object as parameter 2001-01-30 02:09:39 +00:00
608678bbfa ChangeLog update 2001-01-30 02:09:13 +00:00
Stig Bakken 7cf00c7076 @Added raiseError and setErrorHandling methods to PEAR class (Stig, PEAR)
# This allows all objects to have their own default error handling
# or use a global default.
2001-01-30 00:55:27 +00:00
foobar bbca5a86f8 Fixed bug #8946. In some systems the libxml.* is actually libxml2.* 2001-01-29 23:15:11 +00:00
Harald Radi dee2fd1ec4 use *_EXTERN_C() and PHP_WIN32 2001-01-29 21:54:46 +00:00
Harald Radi 7478783b20 fixed unicodeconversion and parameter passing bugs in com and dotnet modules 2001-01-28 03:41:43 +00:00
Harald Radi dac7ab13da fixed unicodeconversion and parameter passing bugs in com and dotnet modules 2001-01-28 03:24:51 +00:00
622ff39185 ChangeLog update 2001-01-28 02:09:16 +00:00
John Donagher f5a369232a PR:
Clean up and add folding
2001-01-28 00:45:28 +00:00
John Donagher c256b323a2 PR:
Remove --with-pfpro warning. Verisign has released a beta SDK which corrects
the problem.
2001-01-28 00:16:55 +00:00
John Donagher 01f800b740 PR:
Submitted by:
Reviewed by:
Obtained from:
Add configure warning message when compiling --with-pfpro
2001-01-27 21:05:40 +00:00
Egon Schmid 35524d3a73 Fixed some protos. 2001-01-27 19:48:58 +00:00
Egon Schmid 5b57490772 File formats in uppercase characters. 2001-01-27 14:20:06 +00:00
Andi Gutmans f67df57491 - That doesn't seem like a smart thing to do :)
- I wonder if gcc optimized it out.
2001-01-27 12:29:02 +00:00
Sascha Schumann eb10bf2358 This config.m4 was obviously not tested at all before being committed.
s/withval/PHP_MING/
2001-01-27 10:05:30 +00:00
e7e0084eeb ChangeLog update 2001-01-27 02:09:08 +00:00
James Moore 4d612e7827 Adding Ming experimental file 2001-01-27 00:33:24 +00:00
Dave Hayden 7896314614 First include of ming (SWF generation) library wrapper
http://www.opaque.net/ming/
2001-01-27 00:26:23 +00:00
Boian Bonev 5f89c6892f # fixed protos in comments for *_ex functions 2001-01-27 00:25:09 +00:00
Egon Schmid 416f4b7e95 Mostly off by one. 2001-01-26 21:41:38 +00:00
Egon Schmid c7f5ad4336 Fixed another proto. 2001-01-26 21:22:33 +00:00
Egon Schmid a8624ac62a Fixed some protos. 2001-01-26 20:56:14 +00:00
Egon Schmid d683a1e18d Whitespace change for funclist.txt. 2001-01-26 20:46:23 +00:00
Egon Schmid 6ec31afcb1 Fixed some protos. 2001-01-26 20:42:51 +00:00
Chuck Hagenbuch b4378dcf80 have DB::isError return true if passed "null". Now you can more consistently
use DB::isError(), since some of the db drivers return nulls from various
functions (like fetchRow()), and others don't... We should probably make all
of them just return errors. I did this for the mysql driver, as a start.
2001-01-26 20:07:22 +00:00
Egon Schmid a06f392ae4 Fixed some protos. 2001-01-26 18:52:38 +00:00
Uwe Steinmann dc1bcb790e - This is major change of the php pdf api to be closer to the pdflib api
done by Rainer Schaaf from pdflib GmbH.
- Some more functions has been implemented as well.
- backwards compatibility has been maintained a much as possible
2001-01-26 08:20:24 +00:00
Uwe Steinmann bcac88e8fb - changed naming of some functions (kept compatibility) 2001-01-26 08:15:57 +00:00
fa0b0286b8 ChangeLog update 2001-01-26 02:09:10 +00:00
Daniel Beulshausen a5064992e9 make msql build under win32 2001-01-25 22:07:31 +00:00
Hartmut Holzgraefe 7ca330741b gd didn't work if no WBMP was available after rev 1.107 -> fixed 2001-01-25 20:52:52 +00:00
Stanislav Malyshev 773b582b1a Fix crash in stdout image output
# Basically, this code sucks. It should use GD contexts, not temp files
2001-01-25 14:35:36 +00:00
f40c1eaeba ChangeLog update 2001-01-25 02:09:19 +00:00
d3aee7591f NEWS update 2001-01-25 02:09:16 +00:00
Sebastian Bergmann f703c4e178 Added my_winthread.c. Thanks to Thimble Smith. 2001-01-24 21:08:12 +00:00
Andrei Zmievski 585e76e121 Already done. 2001-01-24 19:16:43 +00:00
Ben Mansell b5d80647fc Added 'you must use gcc' comment to build instructions. 2001-01-24 18:20:35 +00:00
MySQL Team 5073b97ffb Don't #define HAVE_COMPRESS on windows. 2001-01-24 18:11:25 +00:00
Egon Schmid 5ad27928ac Protos fixed. 2001-01-24 09:42:17 +00:00
Derick Rethans c5b67e119c - Commited a patch that adds support for converting Images to WBMP format.
(Thanx to Denis Gasparin <denis@editnet.it>)
@- Added support for converting images from JPG/PNG on the fly with the GD
@  extension, which is usefull for creating dynamic WAP-sites (Derick)
2001-01-24 09:24:26 +00:00
f275ad0cbe ChangeLog update 2001-01-24 02:09:09 +00:00
Boian Bonev e7da11fd93 changed function names to be like vpopmail_add_user instead vpopmail_adduser
added vpopmail_error to report error string (vpopmail_errno global var)
put exec functions back in with _ex (vpopmail_add_domain_ex)
rewritten README to help users keep secure
fixed protos to state bool instead void return type
2001-01-23 21:46:04 +00:00
Colin Viebrock 35a1731c85 Forgot this too ... 2001-01-23 21:09:55 +00:00
Colin Viebrock f07b32969f Never added this ... 2001-01-23 21:08:13 +00:00
Thies C. Arntzen dd7eb4284b fix a couple of warnings 2001-01-23 17:55:17 +00:00
MySQL Team 800f555b70 Upgrade ext/mysql/libmysql to version 3.23.32. One notable bug fix is
that the client can now connect to a server which is using a default
charset other than latin1.
2001-01-23 16:48:50 +00:00
Thies C. Arntzen d36858681a #found this by playing with phpMyAdmin. 2001-01-23 15:30:27 +00:00
Thies C. Arntzen 373e830117 fixed crash in add_index_bool. 2001-01-23 15:30:18 +00:00
3ffba3d033 ChangeLog update 2001-01-23 02:09:14 +00:00
55f7053c00 NEWS update 2001-01-23 02:09:09 +00:00
jim winstead 36ef109f1a jouni was added as an author of the docs 2001-01-23 00:50:49 +00:00
Andrei Zmievski b56006b5b2 If we can't call custom replacement function, don't change the subject
string.
2001-01-22 22:05:04 +00:00
Andrei Zmievski 63f73bfe13 @- Improved str_replace() to accept an array for any parameter - similar
@  to preg_replace(). (Andrei)
2001-01-22 21:39:55 +00:00
Andrei Zmievski 57f99633ce Make add_index_zval() available to the outside world. 2001-01-22 20:40:41 +00:00
Andrei Zmievski 5afcfc4498 Don't need to check for out-of-memory condition. 2001-01-22 19:42:29 +00:00
Andrei Zmievski 5068444dfe Z-ify the source. 2001-01-22 19:29:44 +00:00
Daniel Beulshausen 7357ee8fa4 rename php_mssql70.dll to php_mssql.dll, as we have only one mssql extension 2001-01-22 19:15:32 +00:00
Andrei Zmievski 21aeba29d0 @- Fixed extract() to properly prefix numeric keys when EXTR_PREFIX_ALL is
@  used. (Andrei)
@- Added EXTR_PREFIX_INVALID flag to extract() to automatically prefix
@  string keys that do not constitute valid variable names. (Andrei)
2001-01-22 17:27:02 +00:00
a4e0f9371a ChangeLog update 2001-01-22 02:09:11 +00:00
544f79b30c NEWS update 2001-01-22 02:09:08 +00:00
Rasmus Lerdorf 0d0a8f55d6 Kill warning 2001-01-22 01:13:49 +00:00
Zeev Suraski 3793dc18f2 Sigh. Even less sleep than I thought :) Really fix it this time. 2001-01-22 01:10:21 +00:00
Zeev Suraski 9a02c9993d Too much work, not enough sleep... Fix hash lookup 2001-01-22 01:08:28 +00:00
Zeev Suraski fbbdb1ddf7 Update and pastify NEWS 2001-01-22 00:11:43 +00:00
Zeev Suraski 6255a24f1c Don't overwrite PATH_TRANSLATED if it exists 2001-01-22 00:06:52 +00:00
Rasmus Lerdorf 67cdb386a4 This probably should have a NEWS entry 2001-01-21 17:36:46 +00:00
Andi Gutmans 8769a693c9 - BeOS apparently doesn't have realpath(). Improve the previously
commited patch.
2001-01-21 17:35:31 +00:00
Rasmus Lerdorf 83cf6629ec @BeOS patch from svanegmond@bang.dhs.org modified somewhat by Rasmus
BeOS patch from svanegmond@bang.dhs.org modified somewhat by Rasmus
2001-01-21 17:29:15 +00:00
Andi Gutmans 3353ad7e6e - Make people happy who like the Zend version number bumped up in parallel
with PHP.
2001-01-21 11:43:34 +00:00
5c867551fe ChangeLog update 2001-01-21 02:09:12 +00:00
Sterling Hughes 95bf259c29 Fix the scheme handler support and make it compile on win32 systems. 2001-01-20 23:42:03 +00:00
Andi Gutmans ef95a346f1 - Patch from Sterling. Add API calls to add zval's as array indeces/
object properties. Add _ex functions which take the string length as an
  argument for better performance.
2001-01-20 19:16:38 +00:00
Sascha Schumann 5d03ac038d Revert last completely broken patch. 2001-01-20 10:10:50 +00:00
Chuck Hagenbuch dea0e01fa8 install the various HTML/* files 2001-01-20 05:39:26 +00:00
Rui Hirokawa d5550b4706 added: EXPERIMENTAL 2001-01-20 02:59:59 +00:00
5a233fb7c2 ChangeLog update 2001-01-20 02:09:19 +00:00
07413645f2 NEWS update 2001-01-20 02:09:16 +00:00
Jason Greene c14a3c5072 Desired functionality can be achieved with array_sum/array_count. 2001-01-19 22:55:41 +00:00
foobar ee73470370 @- Added URL support for getimagesize() function (Jani)
# tested with all imagetypes. Also the iptc works.
2001-01-19 16:52:40 +00:00
Sam Liddicott 60e8fa617a Added muscat to EXTENSIONS as it should be there all along
PR:
Submitted by:
Reviewed by:
Obtained from:
2001-01-19 16:12:36 +00:00
Sascha Schumann fd83f5e1a4 Bump PHP_API_VERSION 2001-01-19 16:04:27 +00:00
Derick Rethans 78c88541f1 - Added a notice about the wordwrap function fix
#- suggested by Jani for people depending on the buggy behaviour
2001-01-19 16:03:22 +00:00
Sascha Schumann 96ba644e9f Make the code match the comment.
Prior to this change, the upload code tried to add mangled names to
the global HTTP_POST_FILES array, resulting in all kind of weird behaviour.

After this change, multi-dimensional form elements are treated correctly
and consistently.
2001-01-19 15:39:35 +00:00
foobar 809bf95a90 Added some missing EXPERIMENTAL files plus some missing extensions
into EXTENSIONS file.
2001-01-19 13:43:41 +00:00
foobar 5dcf6618bc @- Added xslt_set_scheme_handler() function (carmelo@akooe.com) 2001-01-19 11:44:12 +00:00
Andi Gutmans 0a3761e283 - For Sterling. I wonder if not all of the API functions should take the
- key_length as a parameter in order to save that strlen().
2001-01-19 08:40:49 +00:00
2016ae4a79 ChangeLog update 2001-01-19 02:09:24 +00:00
7fe074d752 NEWS update 2001-01-19 02:09:21 +00:00
Derick Rethans 82d58bdc4a - Added the pg_lolseek function, which allows for arbitrary seeking within
a large object, and the pg_lotell call, which can be used to find the
  current file offset for a large object (Submitted by: Adam Haberlach
  <adam@newsnipple.com>).
@- Added the pg_lolseek and pg_lotell functions (Derick)
2001-01-18 22:17:05 +00:00
Derick Rethans 9a3cb4559f - Fix for bug #8367 (wordwrap not cutting correctly) 2001-01-18 21:46:24 +00:00
Sterling Hughes 405d11e604 Fix the proto 2001-01-18 20:49:12 +00:00
Alex Akilov ddf488970c Support AIX/HP shared lib extensions and j2sdk1.3.0 (hotspot) 2001-01-18 18:36:23 +00:00
Sam Liddicott ec966598f4 Some decent credits and such in the phpinfo page 2001-01-18 16:16:29 +00:00
foobar bdb2651c1d Fixed a typo. 2001-01-18 15:09:35 +00:00
Andrei Zmievski 4ea7ba79c5 @- Fixed 'O' and 'r' flags of date() to have correct sign for timezone
@  offset. (Andrei)
2001-01-18 14:36:43 +00:00
Sam Liddicott fd46d9ee9e Aghh. Despite my efforts two files still slipped through 2001-01-18 13:30:02 +00:00
Sam Liddicott 04d7c9815f First checkin of muscat/empower module; been using it here for some time
Developing using aegis and just checking in baseline from time to time

See samjam@php.net for questions
2001-01-18 13:21:34 +00:00
Stanislav Malyshev 66dafaa2c5 Libedit readline replacement support
# Comments are very welcome!
2001-01-18 11:42:09 +00:00
c334520377 ChangeLog update 2001-01-18 02:09:13 +00:00
b5dcd83664 NEWS update 2001-01-18 02:09:10 +00:00
Andrei Zmievski ccd94c4831 @- Changed 'Z' flag to date() to always return timezone offset with
@  negative sign if it's west of UTC. (Andrei)
2001-01-17 21:09:16 +00:00
Sean Bright 457888ac44 Put these back where they belong. They weren't necessary unless ZTS and
HAVE_LOCALECONV were both defined.
2001-01-17 20:37:49 +00:00
Andi Gutmans 62606e7789 - Fix leak in fetch_dim_address() which was already fixed in
- fetch_dim_object(). Take the oppertunity to make both use the same
- function and not duplicate the code.
2001-01-17 17:34:16 +00:00
Sterling Hughes db50ae2e7d Fix (well it works) the error display with sablotron. 2001-01-17 14:14:22 +00:00
Stig Venaas c927c254dd Making parallel search allow different filter for each link 2001-01-17 13:43:39 +00:00
Sascha Schumann 91b0e1a7a8 Fix vpath builds on freebsd 2001-01-17 12:32:45 +00:00
foobar 051dd6108c Make sablot compile again. Typo? 2001-01-17 11:43:17 +00:00
Rasmus Lerdorf f74998a783 Kill a couple of warnings 2001-01-17 06:40:48 +00:00
f5795a56de ChangeLog update 2001-01-17 02:09:11 +00:00
ebf4bf2165 NEWS update 2001-01-17 02:09:08 +00:00
Sean Bright 19689013de Updated configure.in to look for strcoll()
# Woopsie.
2001-01-17 01:15:11 +00:00
Sean Bright a588d65591 Added string comparison function strcoll(). It uses the current locale to
do the comparisons.
@- Added localeconv() and strcoll() functions for localization. (Sean)
2001-01-17 01:10:50 +00:00
Zeev Suraski b8b40f697e Fix persistent resources, once and for all... 2001-01-16 23:49:16 +00:00
foobar 625978cd9c Fixed bug #8733 2001-01-16 22:34:19 +00:00
Rasmus Lerdorf 69abc1e9d7 Kill some warnings 2001-01-16 20:37:51 +00:00
Sterling Hughes fa0727e794 @ Added the xslt_set_base function. (Sterling)
Added the SABLOT_SET_ERROR() macro to set sablotron errors...
2001-01-16 12:02:47 +00:00
Ben Mansell 12537e9787 @ Support Zeus 3.3.8
Added changes to environment variable manipulations, to support Zeus 3.3.8
and increase compatibility between Zeus/IIS/Apache. Now, URLs like
http://foo.org/file.php/a/b/c/d work correctly.
# While testing, it looks like IIS+ISAPI is mishandling URLs like the above.
# The PATH_TRANSLATED given by ISAPI includes the /a/b/c/d bit of the URL,
# so using this var to find the script file to open on disk will not work.
# We now use SCRIPT_FILENAME if it is present (in Zeus 3.3.8)
# IIS doesn't seem to set this variable, it might be necessary to mangle
# SCRIPT_NAME and APPL_PHYSICAL_PATH together?
2001-01-16 10:44:52 +00:00
af6cef27b1 ChangeLog update 2001-01-16 02:09:13 +00:00
4fb349c626 NEWS update 2001-01-16 02:09:10 +00:00
Zeev Suraski a910f8cc80 Fix output dir 2001-01-15 15:16:30 +00:00
Zeev Suraski 9877acdb32 - Implement CompareStringWithFile()
- Remove a stupid NULL assignment that slipped in the last commit
2001-01-15 15:13:50 +00:00
Zeev Suraski 47ea52ca58 - Implement quick file comparing routine
- Fix crash - wait on the threads themselves, not on Event objects.
  It takes time between the time a thread signals the event, and the
  time it actually terminates (shutdown code) - so FreeLibrary() and
  the main() termination could occur before all of the threads
  terminated...
2001-01-15 14:55:30 +00:00
Sascha Schumann f6eae19147 Try harder to push data through the wire.
I just learned that the AOLserver module will be used for a 100k users
webmail service.  Wheee!
2001-01-15 14:48:14 +00:00
Egon Schmid 57d200c21b Some protos fixed. 2001-01-15 12:01:34 +00:00
Zeev Suraski 0e08845eb0 Add free_estring() 2001-01-15 10:52:06 +00:00
Zeev Suraski d294f46f5a - Remove the ini_extension_list global
- Switch to delayed loading of Zend extensions
2001-01-15 10:52:02 +00:00
Zeev Suraski f8522c7fa9 Use free_estring() 2001-01-15 10:50:39 +00:00
Zeev Suraski 0592feb2a1 Nuke a couple of warnings 2001-01-15 10:48:48 +00:00
Zeev Suraski 90c8e2cf75 Fix Win32 build 2001-01-15 10:22:19 +00:00
Sascha Schumann db0b8bc05b Defer loading of extensions until all configuration entries have been
added to the configuration hash.
2001-01-15 03:21:05 +00:00
David Croft 5951b8063a restored vadddomain/vdeldomain to use library functions rather than invoking
vpopmail executables
implemented vaddaliasdomain natively
global variable to store whether vpopmail was used and only vclose() if
 necessary
return the functions to returning true/false for success/failure rather than
 some arbitrary vpopmail return value
return the functions to not doing everything at once as you then lose
 fine-grain control over its operation
change C++ comments to C
2001-01-15 02:14:13 +00:00
c6ffb5389e ChangeLog update 2001-01-15 02:09:12 +00:00
8023907941 NEWS update 2001-01-15 02:09:09 +00:00
Shane Caraveo 42b1b44ad4 test now produce valid OK or FAIL. 2001-01-15 01:52:47 +00:00
Shane Caraveo ebe94513cc dont do results if not using test files 2001-01-15 01:17:44 +00:00
Shane Caraveo 1d40310fa4 clean up temp files 2001-01-15 01:13:51 +00:00
Stig Bakken fcdf6ac680 @- Added odbc_error() and odbc_errormsg() functions (Stig) 2001-01-15 01:11:06 +00:00
Shane Caraveo c88be3f8b3 check files open 2001-01-15 00:57:16 +00:00
Shane Caraveo 833ba12664 fix file reading, add results 2001-01-15 00:56:23 +00:00
Shane Caraveo dd01542bad Multithreaded stress test program for isapi module now supports phpt files
still stuff to do before it's realy done, but does run the tests, just need
to get it to compare results right now.
2001-01-15 00:29:49 +00:00
David Croft 646e796e5a vpopmail's bin dir is unnecessary as the library exports these functions 2001-01-14 22:21:16 +00:00
Boian Bonev 487f211fcf #added simple minimum survival readme 2001-01-14 17:38:30 +00:00
Boian Bonev bd92e10213 merged my version with David Croft's
removed unneccessary php.ini calls and defines
removed module_init, shutdown, request_init declarations and references
added request_shutdown to close mysql/other db connection
	(a must in apache module)
added defines for external binaries from vpopmail
changed functions to present more consistent api from user's point of view
	so that in one call more stuff is done
added more comprehensive MINFO function helping users debug their case
added static int vpopmail_exec(char *cmd) [will change to php_Exec soon]
@ vpopmail extension updated to working alfa. give it a try but keep in
@ mind that it is not ready for production environments (Boian Bonev)
2001-01-14 17:04:22 +00:00
Boian Bonev f6ad8186d6 updated 2001-01-14 16:47:56 +00:00
Rasmus Lerdorf e37d304d35 Name this php_Exec instead 2001-01-14 16:41:06 +00:00
Boian Bonev ef462402f4 rewritten the whole logic of the script
added VPOPMAIL_BIN_DIR to point to ~vpopmail/bin directory
added checks for ALL files needed by the extension
style fixes to the output
2001-01-14 16:40:26 +00:00
Sean Bright 40f3524247 Added localeconv() function. Operates similarly to localeconv() defined in
locale.h.  Should work well under non-ZTS as well as ZTS.
2001-01-14 16:36:30 +00:00
Rasmus Lerdorf 5311bfa5c5 Export _Exec for extensions to use 2001-01-14 16:30:22 +00:00
Thies C. Arntzen 6b84fb1cde fixed readfile() fd-leak.
guys, always remember that every function that *generates output* could cause a
bailout if ignore_user_abort is set to false (and the user _aborts_ the
connection). in this case a longjump will be performed and our function (in
this case readfile) will have no chance to clean-up. having said that it's a
good idea to register all opened files using REGISTER_RESOURCE - that way the
engine will make sure they get closed on request end.
2001-01-14 14:11:38 +00:00
Zeev Suraski 27afea5c6d Don't fetch numeric indices in mysql_fetch_object() 2001-01-14 09:30:17 +00:00
David Croft d9671d5d49 # restored code for latest vpopmail version
@ New extension for vpopmail - http://www.inter7.com/vpopmail (David Croft)
2001-01-14 09:01:26 +00:00
David Croft 560e218ee6 vpopmail extension 2001-01-14 08:54:01 +00:00
Rui Hirokawa c61a557808 added iconv_get_encoding and supported initialization from php.ini 2001-01-14 07:40:16 +00:00
David Croft 00db616ac4 reserve space for quoted characters
fixes buffer overrun bug #8694
2001-01-14 05:37:33 +00:00
c814b08536 ChangeLog update 2001-01-14 02:09:12 +00:00
e1f21f0be4 NEWS update 2001-01-14 02:09:09 +00:00
Zeev Suraski a85da45a66 Both thread-safe and thread-unsafe builds should be ok now 2001-01-13 23:49:44 +00:00
Zeev Suraski 94ca2181fb Add sybase_get_last_message() from Jan Fedak <J.Fedak@sh.cvut.cz>
@- Added sybase_get_last_message() to the Sybase CT module (Jan Fedak)
2001-01-13 22:47:44 +00:00
Derick Rethans 97510346ed - Removed a stale var that broke the build 2001-01-13 22:00:23 +00:00
Derick Rethans 1104639d0a - There was one ret left, changed it to FG(pclose_ret), this fixes the
build
2001-01-13 21:52:09 +00:00
Colin Viebrock 707e7bd938 Support for perl-compatible blowfish encryption (in libmcrypt CVS and
versions later than 2.4.8)
2001-01-13 20:55:15 +00:00
Zeev Suraski 86624dfad9 - Fix exec() bug
- Merge fsock and file globals
2001-01-13 13:59:22 +00:00
Zeev Suraski 93f4fa8d73 cleanup time... 2001-01-13 13:16:56 +00:00
Zeev Suraski 7b7d1d962d Remove some more useless code 2001-01-13 13:14:49 +00:00
Zeev Suraski fc1cdda10d Remove stale code 2001-01-13 13:10:50 +00:00
Zeev Suraski 6562e98afa Fix Windows & thread-safe build 2001-01-13 13:02:19 +00:00
Stig Venaas 30441cda5b Simplified code a bit, added detailed error reporting, and fixed a bug
when getaddrinfo returned a non-IP family before IP families
2001-01-13 11:48:47 +00:00
Sascha Schumann 5d8e3c37d9 arr_index errorneusly included the trailing ']' character, so that
variable names like Data_name[Image]] were passed to the register functions.
2001-01-13 10:19:17 +00:00
Sascha Schumann d0c2255750 Fix make install in VPATH builds 2001-01-13 10:02:08 +00:00
Stig Venaas d9f52a4176 Fixed memory leaks that could happen in some error situations. Also removed
some unnecessary code in ldap_set_option()
2001-01-13 10:00:27 +00:00
Stig Venaas fe98565b60 Realized that emalloc() never returns NULL, simplified code 2001-01-13 09:16:36 +00:00
0dccef294c ChangeLog update 2001-01-13 02:09:14 +00:00
6e7b42cd66 NEWS update 2001-01-13 02:09:10 +00:00
Stig Venaas 2d17c57664 Added parallel search when given array of link identifiers
@- Made ldap_list(), ldap_read() and ldap_search() do parallel search when
@  first parameter is an array of link identifiers (Stig Venaas)
2001-01-12 22:08:26 +00:00
Stig Venaas 5cf503b2a9 Follows redirects again, and $http_response_header now contains all headers
with an empty string as delimiter
@- Made fopen() of HTTP URL follow redirects, $http_response_header will
@  contain all headers with empty string as delimiter (Stig Venaas)
2001-01-12 20:49:25 +00:00
foobar ab6639564c - Fixed a possible crash bug in xmltree().
# PR: #7052
2001-01-12 16:49:06 +00:00
Chuck Hagenbuch 5faaf2436f Add HTTP_Compress::, which provides an easy wrapper around producing
gzip-compressed html. This should be ported to use the ob_gzhandler() output
handler, but I haven't had a chance to look into that yet.
2001-01-12 15:24:21 +00:00
Zeev Suraski dc45d88c47 Add newline 2001-01-12 11:14:46 +00:00
Sterling Hughes 0e6fe30139 Make daniel's changes work in ZTS mode... 2001-01-12 10:49:38 +00:00
Daniel Beulshausen 490cca07de take out emtpy struct
# vc chokes on them
2001-01-12 10:26:29 +00:00
Mika Tuupola 946fe57119 PR:
Submitted by:
Reviewed by:
Obtained from:
Added Image_Remote class.
2001-01-12 09:13:55 +00:00
Rasmus Lerdorf 69d16ee1f9 Fix for bug 6073 from Sean R. Bright <elixer@erols.com> 2001-01-12 08:03:24 +00:00
Rasmus Lerdorf b208f6bc7d Fix for bug number 8666 2001-01-12 06:55:57 +00:00
87f75b51e8 ChangeLog update 2001-01-12 02:09:18 +00:00
910ac866a1 NEWS update 2001-01-12 02:09:15 +00:00
Andrei Zmievski 1346295d86 @- Added Console_Getopt class for parsing command-line args. (Andrei, PEAR) 2001-01-11 18:38:26 +00:00
foobar a8e88c0ddc Fix build. 2001-01-11 18:25:33 +00:00
foobar 1fc035dfa5 If external expat is used, header file is expat.h 2001-01-11 16:19:20 +00:00
Daniel Beulshausen 29714ff530 removed old expat libs 2001-01-11 14:50:52 +00:00
Sterling Hughes 5a610cecef Housekeeping... 2001-01-11 09:35:14 +00:00
dbb15ec671 ChangeLog update 2001-01-11 02:09:15 +00:00
Rui Hirokawa 0841703c32 *** empty log message *** 2001-01-10 14:42:23 +00:00
Rui Hirokawa c2881f7c6b disable directory search for libexpat and disable some macros for libxml-1.95. 2001-01-10 14:41:01 +00:00
Sascha Schumann ae92ebb92b Especially on FreeBSD it seems to be common that send(2) does not
do a decent job.  We handle that better now.
2001-01-10 13:51:58 +00:00
Thies C. Arntzen 6871b839b5 exec'd processes now get cleaned up even if the browser connections was
aborted.
fixes: #8143
2001-01-10 13:08:14 +00:00
David Croft 2b3d9d7ec4 fixed swatch internet time (bugs#8242,7106) 2001-01-10 06:48:06 +00:00
David Croft 0afe88cbc6 Allocate buffer in date() for the actual length of the timezone (bug#8292) 2001-01-10 04:01:02 +00:00
b161bc1593 ChangeLog update 2001-01-10 02:09:11 +00:00
501774946a NEWS update 2001-01-10 02:09:08 +00:00
Stig Bakken a929ef223b * renamed PEAR scripts
* set localstatedir
2001-01-10 01:34:40 +00:00
Stig Bakken 97173871d0 added .cvsignore file 2001-01-10 01:21:04 +00:00
Stig Bakken 6792978aed * updated copyrights (thanks Colin)
* moved scripts to own directory (bug #7635)
2001-01-10 01:01:59 +00:00
Rui Hirokawa c172daa6d1 added a option to dedine libexpat install directory (by Jani Taskinen) 2001-01-09 22:15:56 +00:00
0c7e7324bc *** empty log message *** 2001-01-09 21:47:47 +00:00
Colin Viebrock 4f43188762 I should learn how to spell
PR:
Submitted by:
Reviewed by:
Obtained from:
2001-01-09 21:15:26 +00:00
Colin Viebrock b09b97ff4b Now the coding standards are defined elsewhere ...
PR:
Submitted by:
Reviewed by:
Obtained from:
2001-01-09 21:12:55 +00:00
Sterling Hughes f058a07915 Move the definition of the xslt_set_encoding to the "proper" place in the file and
fix the prototype.
2001-01-09 20:17:11 +00:00
Jon Parise b0234843f8 Update the copyright year range to 1997-2001. 2001-01-09 17:42:40 +00:00
Sascha Schumann 7eb8469679 Avoid possible memory leak in the URL scanner, if the connection is
interrupted during writing the output.
2001-01-09 16:45:19 +00:00
Egon Schmid 8d5d20500b Sorry, two lines are enough. 2001-01-09 15:53:09 +00:00
Egon Schmid 6aef38f590 Fixed protos. 2001-01-09 15:48:15 +00:00
Rui Hirokawa 187828f2f2 moved to ext/iconv. 2001-01-09 15:40:49 +00:00
Rui Hirokawa 0acff20f38 added test code to iconv. 2001-01-09 15:39:25 +00:00
Rui Hirokawa 4e035d035a move iconv related functions to separate iconv extension. 2001-01-09 15:22:45 +00:00
Rui Hirokawa 0afcb03de3 added iconv extension. 2001-01-09 15:11:23 +00:00
Thies C. Arntzen 0719e7e006 @- Allow access to uploaded files in safe_mode. Beware that you can only
@  read the file. If you copy it to new location the copy will not have the
@  right UID and you script won't be able to access that copy. (Thies)
2001-01-09 11:58:57 +00:00
foobar e247b206e0 If TZ environment variable is changed call tzset().
# Although man page for tzset() says it should be called automaticly
# by some of the time related functions, IRL this doesn't happen.
# PR: 3977, 4732, 5510, 6972, 7203, 8502, 8609
2001-01-09 09:02:21 +00:00
Sascha Schumann de847f60ba Propagate the response code/HTTP status code back to thttpd for logging. 2001-01-09 09:01:33 +00:00
Sascha Schumann 7dd166e8c0 Account the number of sent bytes properly 2001-01-09 08:45:05 +00:00
Hartmut Holzgraefe 574eaa8ed4 fix for Bug id #8606 2001-01-09 07:28:27 +00:00
Sascha Schumann dbb3402c0f php_add_var_hash() uses sizeof(id) in the calls to zend_hash_*, implying
that all bytes in the character array have been set (they are used
to compute the hash value using hashpjw).

The function assumes that sprintf's %p modifier would always prefix
the output with "0x".  On HPUX, this is not the case.  Hence, not
all bytes may be properly initialized before being read.

This has been addressed by using only initialized bytes as the key.
2001-01-09 05:49:37 +00:00
Sascha Schumann 426d4104ea Make Apache 2.0 filter build again 2001-01-08 23:18:47 +00:00
Sascha Schumann 7fbc93d57f WS fix 2001-01-08 23:18:07 +00:00
Sascha Schumann 6a6317a403 Fix ZTS build (broken by iconv-related changes). 2001-01-08 23:13:57 +00:00
Andrei Zmievski 145f60a485 @- Changed extract() to check that prefixed name is a valid one. (Andrei)
Changed extract() to check that prefixed name is a valid one.
Optimized extract() a bit too.

# It'd be nice if someone made regression tests for extract().
2001-01-08 21:57:14 +00:00
Derick Rethans aff9ff8356 - Fix for bug #8535 - floating point exception on FreeBSD while initializing
crypt random numbers
2001-01-08 21:13:24 +00:00
Andrei Zmievski 74175e429d @- Changed extract() to return the number of variables extracted. (Andrei) 2001-01-08 20:57:59 +00:00
Stanislav Malyshev b06323cd6e Optimize it a bit - no need to dup empty string (which can be pretty common for .ini) 2001-01-08 20:13:32 +00:00
Stanislav Malyshev 77ebea3a6f Duplicate property value, otherwise parser would free it and we're in bad shape. 2001-01-08 20:10:16 +00:00
Stanislav Malyshev d812ecb75f Fix undefind filehandle type on INI parsing. 2001-01-08 19:45:12 +00:00
Egon Schmid 40a71cfdc7 Corrected some protos. 2001-01-08 18:31:59 +00:00
Stig Venaas 897f293d13 Added ldap_rename(). Currently requires API with ldap_rename().
@- Added ldap_rename() function (Stig Venaas)
2001-01-08 18:13:08 +00:00
Stig Venaas 735b8ed6ed *** empty log message *** 2001-01-08 17:18:56 +00:00
Stanislav Malyshev c7984660fc Use platform's dir separator 2001-01-08 16:39:39 +00:00
Rasmus Lerdorf 7d6d09ec3b Test ACL commit 2001-01-08 05:20:55 +00:00
Stig Bakken 3d158a845c * display a notice when downloading 2001-01-08 02:54:35 +00:00
Stig Bakken c43cad2f40 * no need for this test file anymore 2001-01-08 02:48:35 +00:00
Stig Bakken 12d0b86803 * updated DB status
* updated the "pear" script, it can install basic packages now
2001-01-08 02:45:30 +00:00
Rui Hirokawa 6368933118 added iconv_set_encoding() to change the encoding setting. 2001-01-08 02:39:52 +00:00
75eea8ed1b ChangeLog update 2001-01-08 02:09:15 +00:00
560c9cee30 NEWS update 2001-01-08 02:09:09 +00:00
Rui Hirokawa 517b81ad43 added a output handler function ob_iconv_handler which tranforms output encoding using iconv(). 2001-01-08 01:40:33 +00:00
Shane Caraveo b2cb9ac8fe ignore blank lines 2001-01-08 01:14:49 +00:00
Shane Caraveo d0dbf1ea57 my mistake...freed in a different function. 2001-01-08 00:35:05 +00:00
Shane Caraveo 65eac44f69 be sure to unlock that mutex before returning! 2001-01-08 00:32:18 +00:00
Shane Caraveo 0a1d3aa108 add notes on this program 2001-01-08 00:10:06 +00:00
Shane Caraveo a1c3f92ac7 stresstest is based on cgiwrap. it can be used to debug php4isapi.dll without
the use of an actual web server.
2001-01-07 23:52:18 +00:00
Shane Caraveo f1afd6f487 define flag to turn off exception handling 2001-01-07 23:45:24 +00:00
Stig Venaas 7e79846d10 Added OpenSSL 2001-01-07 21:35:20 +00:00
Stig Venaas 742d339d93 Changed OpenSSL requirements from 0.9.6 to 0.9.5 2001-01-07 21:21:12 +00:00
Stig Venaas 0ecaf2eac6 Minor changes to LDAP_OPT constants, and added support for controls to
ldap_set_option.
@- Made ldap_set_option() support controls (Stig Venaas)
2001-01-07 21:18:02 +00:00
Zeev Suraski 0301041f79 Fix mismatch in return values 2001-01-07 19:04:02 +00:00
Zeev Suraski c4d673a1f9 Fix possible startup crash 2001-01-07 18:56:40 +00:00
Zeev Suraski ceec9203a1 Fix CGI build 2001-01-07 18:56:24 +00:00
Zeev Suraski 903018ef36 - Remove backward dependency from PHP -> Zend
- Rename get_ini_entry() as get_configuration_directive() for clarity
  (it doesn't use the INI subsystem, but the module-supplied function for
  retrieving configuration directives)
2001-01-07 18:39:11 +00:00
Zeev Suraski 7235542cee Change get_ini_entry to get_configuration_directive 2001-01-07 18:38:38 +00:00
Zeev Suraski 5f6bc23931 Remove -S option on all bison calls 2001-01-07 18:31:55 +00:00
Zeev Suraski 412939dd0c Add Release_TSDbg to TSRM as well 2001-01-07 18:28:03 +00:00
Derick Rethans 62375ba7bd - Fix for bug 7035, regarding PHP_MAX_SALT_LENGTH for OpenBsd 2001-01-07 17:22:17 +00:00
Stig Venaas 1b3385cad8 Added LDAPv3 stuff. ldap_search() now treats LDAP_ADMINLIMIT_EXCEEDED like
LDAP_SIZELIMIT_EXCEEDED and returns referral results.
Added new functions ldap_parse_result(), ldap_first_reference(),
ldap_next_reference() and ldap_parse_reference() that among other things
make referrals and search references accessible.
@- Changed ldap_search() and added functions ldap_parse_result(),
@  ldap_first_reference(), ldap_next_reference() and ldap_parse_reference()
@  to cope with LDAPv3 stuff like referrals and references. (Stig Venaas)
2001-01-07 13:03:11 +00:00
Sascha Schumann 3f2a3a9b01 Fix ZTS build which was broken by the last commit 2001-01-07 12:22:50 +00:00
Thies C. Arntzen d79071b2da fix small leak in ociexecute()
fixes: #8573
submitted by: tcarroll@chc-chimes.com
2001-01-07 11:43:07 +00:00
Stig Venaas 59fa3f3d04 Made OpenSSL extension work with 0.9.5 and changed version check to 0.9.5 2001-01-07 11:36:15 +00:00
Sascha Schumann 1b15d1f166 Use MAKE_STD_ZVAL/FREE_ZVAL to handle zval memory allocation. 2001-01-07 10:42:15 +00:00
Sascha Schumann 41cd55dd44 Add a new test and refine the fourth test 2001-01-07 10:40:41 +00:00
Sascha Schumann 24c49a21b9 Use zval_ptr_dtor instead of zval_dtor/FREE_ZVAL pair.
Submitted by: Andi Gutmans
2001-01-07 10:32:06 +00:00
foobar 9f68043524 Fixed bug: 8478 2001-01-07 09:22:53 +00:00
foobar dd2cd995cb imap_user and imap_password were freed too early.
PR: 8424
2001-01-07 07:47:46 +00:00
Jon Parise e14aeb8668 Fix typo. This one was my fault, anyway. 2001-01-07 05:24:21 +00:00
Chuck Hagenbuch fc289c973a list the correct modeline for vi. 2001-01-07 04:39:27 +00:00
Zeev Suraski 1f23e50789 Fix possibility of a crash during startup (very unlikely, but possible) 2001-01-07 02:47:32 +00:00
b7944539a4 ChangeLog update 2001-01-07 02:09:09 +00:00
Zeev Suraski bcf179d047 Remove -S 2001-01-06 20:11:22 +00:00
Andi Gutmans 572e0b78fb - This slipped in by mistake. 2001-01-06 09:56:36 +00:00
Rui Hirokawa 337edb9cf4 fixed option name mismatch. 2001-01-06 08:38:07 +00:00
Rui Hirokawa 20aa57ec0d linked with libexpat. it's necessary to use sablot-0.50. added xslt_set_encoding() function. 2001-01-06 08:37:00 +00:00
56ffa5723c ChangeLog update 2001-01-06 02:09:11 +00:00
Frank M. Kromann e4d1107058 Adding hack to allow odbc_tables to work on Access databases 2001-01-05 22:01:22 +00:00
Chuck Hagenbuch 6005910da2 add File/Passwd.php to the install rules, and change the class name to
File_Passwd to match our standard.
2001-01-05 20:05:27 +00:00
Chuck Hagenbuch 12f2d57caa revert Jon's patch, leaving only the correct one. 2001-01-05 20:03:01 +00:00
Jon Parise 41f165e022 $from_arr is a two-dimensional array here. Treat it as such.
Submitted by: Max Kalika <max@the-triumvirate.net>
2001-01-05 19:59:00 +00:00
Chuck Hagenbuch 6e9061f40a make sure we get back a flat array from parseAddressList(). 2001-01-05 19:53:01 +00:00
Jon Parise 7c4e41f855 Fix the substitution of PEAR_INSTALLDIR. (@PEAR_INSTALLDIR@ in pear/PEAR.php.in) 2001-01-05 18:37:01 +00:00
Daniel Beulshausen 315e790ccc remove stupid ifdef's 2001-01-05 18:09:43 +00:00
Daniel Beulshausen 4d25067387 finally remove -S option from bison
# bison.simple should be stored in the same folder or
# set the 'bison_simple' variable which points to the file
2001-01-05 18:06:24 +00:00
Daniel Beulshausen be5cfa608a fixed date not allocating enough buffer, bug 7963 2001-01-05 17:34:47 +00:00
Daniel Beulshausen fe8238e6e9 include config.w32.h under win32 2001-01-05 17:07:02 +00:00
Daniel Beulshausen 0d258cc523 make threaded apache module build again 2001-01-05 17:00:07 +00:00
Zeev Suraski aae9e7ee59 Merge in some ZEND_API additions from Daniel Beulshausen (needed for the
Win32 Apache module)
2001-01-05 15:01:15 +00:00
Andi Gutmans 5e5c59ebcb - Get rid of C++ comments 2001-01-05 14:34:15 +00:00
Uwe Steinmann db56ddb36c - fixed potential segmfault in xmldoc() and xmldocfile() 2001-01-05 14:11:19 +00:00
foobar 3cb57374a8 Added missing ieeefp.h. (This is needed e.g. by nsapi on some systems) 2001-01-05 11:07:52 +00:00
Rui Hirokawa 32c3af8c39 added libxml-1.95 support and some new functions related to namespace support. changed config.m4 to support xml extension as shared module. 2001-01-05 06:36:51 +00:00
Chuck Hagenbuch 4fe3182b1f initial coding standards doc for all to argue over. 2001-01-05 05:46:59 +00:00
7583c6177d ChangeLog update 2001-01-05 02:09:11 +00:00
Frank M. Kromann 2c3f424e01 Fixing wrong return value when executing statements not returning a record set. 2001-01-04 17:29:50 +00:00
Chuck Hagenbuch 542fa4eace fix the Log::factory() method to assume that the Log stuff is in the
include_path (like all of PEAR does).
2001-01-04 15:56:05 +00:00
Jan Borsodi db0be122d2 Added credits. 2001-01-04 12:35:48 +00:00
Jan Borsodi b849be0b02 Removed some stupid header text.
Implemented functions for returning the error string and starting and stopping the message handler.
Added comments for all functions.
2001-01-04 12:30:20 +00:00
Jan Borsodi fb9c918f1a Removed some stupid header text.
Added a new struct for handling error logs and Qt Message Handler handles.
Added functions for returning the error string and starting and stopping the message handler.
2001-01-04 12:29:08 +00:00
Jan Borsodi 0798a81739 New function qdom_error which returns the error text from the last qdom operation, or FALSE if none occured.
Fixed the documentation for the qdom_tree function.
Added init and shutdown code for some global variables.
Added code for starting and stopping the Qt Message Handler in qdom_tree.
2001-01-04 12:27:39 +00:00
Jan Borsodi c178c3b5e4 New function qdom_error which returns the error text from the last qdom operation, or FALSE if none occured. 2001-01-04 12:26:22 +00:00
Jouni Ahto abcdb47fc2 Changing my email address... 2001-01-04 11:15:35 +00:00
Andi Gutmans e976d8ed1d - Make plist_destructor work like list_destructor to allow it to call
extended destructors.
2001-01-04 06:20:26 +00:00
69f0255a2c ChangeLog update 2001-01-04 02:09:09 +00:00
Zeev Suraski f3258b2426 Fix another case of possible line number corruption 2001-01-03 23:00:01 +00:00
Zeev Suraski 43a7643453 Fix last couple of problematic execution paths that could corrupt the INI values 2001-01-03 22:45:11 +00:00
Chuck Hagenbuch b83ee202c4 Mail.php: use the Mail_rfc822:: class to parse addresses. There is a small
performance penalty, but it handles rfc822 groups, which
imap_rfc822_parse_adrlist doesn't.

rfc822.php: Style fixes, some small tweaks/optimizations, and work around a
bit of object weirdness that caused the test for $this (to see if we were
being called statically) to not be sufficient.
2001-01-03 18:24:20 +00:00
foobar cc51599f4a Added better checking for OpenSSL's libraries. Now configure stops
if the libs aren't found.
# bug report #8365
2001-01-03 18:12:06 +00:00
Jon Parise 8dca8f0e69 Make socket support compile under Solaris 8 with the Sun WorkShop compiler.
PR: 8468
2001-01-03 18:06:10 +00:00
foobar e4a946b3f4 I missed this function.. 2001-01-03 16:53:00 +00:00
foobar d52824c42d Fix pr #8305. 2001-01-03 16:07:55 +00:00
foobar 31a1c0aca6 Trying to bring pdf extension a bit more up to date. 2001-01-03 16:05:45 +00:00
Daniel Beulshausen 2f6a05ecb8 fix filepath handling 2001-01-03 15:50:20 +00:00
Chuck Hagenbuch 3ef382dfcd add Numbers/Roman.php, Net/Curl.php, and XML/RPC.php to the install rules. 2001-01-03 15:13:29 +00:00
Zeev Suraski 60776dbeeb Fix Apache module and remove excess elements from the SAPI structure 2001-01-03 11:56:00 +00:00
Daniel Beulshausen 795025e0dc fix bug 8341 & 8394 2001-01-03 11:41:31 +00:00
foobar c5da386dbd Fix compile. 2001-01-03 11:39:09 +00:00
Stanislav Malyshev ea46f79a97 Fix #8486 (name= without quotes in MIME Content-Disposition header)
Ported fix by kk/sas from PHP 3
2001-01-03 10:52:26 +00:00
Zeev Suraski 6b23ef6cef Commit missing declaration 2001-01-03 08:35:23 +00:00
Chuck Hagenbuch b7c12ab483 add allan@lodestone.co.za's Date_Human calculator class. 2001-01-03 05:14:39 +00:00
Chuck Hagenbuch 29854e9555 here's an initial version of Richard Heyes' rfc822 email address parser. 2001-01-03 05:10:42 +00:00
cec2d1f302 ChangeLog update 2001-01-03 02:09:16 +00:00
fe8a8444bd NEWS update 2001-01-03 02:09:13 +00:00
Zeev Suraski efab051391 Import COM patch from Harald Radi <h.radi@nme.at>
The new code should allow for better international support.
2001-01-02 23:08:20 +00:00
Zeev Suraski bd0ac7fe14 Many patches. I hope I remember them all:
- Make sapi_module available to external modules (PHPAPI)
- Make the php.ini path reported in phpinfo() always point to
  real full path of the php.ini file
- Optimized the ISAPI module not to read unnecessary server
  variables and read necessary variables at most once.
2001-01-02 22:49:31 +00:00
Stig Venaas 348f6c609c I think the order is wrong, switched order of ssl and crypto libs 2001-01-02 22:40:03 +00:00
Jon Parise 175cf6b08a Make this comment readable. 2001-01-02 21:37:21 +00:00
Chuck Hagenbuch ba114dc997 Make the generated <input> lower case and terminated with a /,
to be xhtml-compliant.
2001-01-02 20:39:27 +00:00
Rasmus Lerdorf a35b9c45f5 Fix date('r') overflow
@Fix date('r') overflow
2001-01-02 20:26:51 +00:00
Andi Gutmans 7b5138035c - Remove unreachable code 2001-01-01 17:59:08 +00:00
Zeev Suraski 18603033fb Fix possible corruption in line number information 2000-12-30 15:32:12 +00:00
Zeev Suraski 0048312fa6 Fix a few possible bugs:
- engine=off in one or more vhosts could propogate to other vhosts
- Under some error situations, the default values for INI directives
  could be erroneously replaced for a single request
2000-12-30 00:38:47 +00:00
Stig Venaas c5b11042b0 Hopefully solves some bad behavior in array_unique(), array_intersect()
and array_diff(). Now using SORT_STRING instead of SORT_REGULAR
@- Fixed misbehavior of array_unique(), array_intersect() and array_diff();
@  could in certain cases give wrong result or segfault (Stig Venaas)
2000-12-28 23:50:42 +00:00
Dan Kalowsky fbbaf5b5b5 it seems one section was missing the HAVE_SOLID_30 section... 2000-12-28 22:01:50 +00:00
Dan Kalowsky 8b2dbfca77 added #define(OPENLINK) to the SDWORD instead of SQLINTEGER line.. this is for bug #5526 to allow compiles. 2000-12-28 19:23:09 +00:00
Dan Kalowsky 68fa8f9b0b config file was missing a new line which seemed to cause the if statement to parse the else into an echo. yuck. 2000-12-28 19:12:28 +00:00
Rasmus Lerdorf 2a926135a9 Fix typo 2000-12-28 17:25:11 +00:00
Stanislav Malyshev cf66091554 Add license info 2000-12-28 12:13:21 +00:00
foobar b0adbf8aff Added the arg_separator directive. 2000-12-28 09:36:56 +00:00
Holger Zimmermann 7af7199a17 Minor update regarding new phpinfo table format. Moved pi3web_sapi.h to the sapi module.
PR:
Submitted by:
Reviewed by:
Obtained from: Pi3Web
2000-12-28 08:31:42 +00:00
a0e3802663 ChangeLog update 2000-12-28 02:09:10 +00:00
Jon Parise 4e384e0073 Make nl2br() output <br /> instead of <br> to be XHTML compliant.
Bug: 8390
2000-12-28 01:02:44 +00:00
Zeev Suraski 54d53055c2 Make the INI mechanism thread safe (or at least thread safer :) 2000-12-27 15:43:15 +00:00
Zeev Suraski 338b9b0819 - Make the INI mechanism thread safe (fix necessary API changes from Zend)
- Make the Win32 non-TS configuration build again
2000-12-27 15:43:05 +00:00
Andrei Zmievski 34f5c0c36d Fix argument check (bug #8421). 2000-12-27 13:59:40 +00:00
76a69dfa13 ChangeLog update 2000-12-27 02:09:09 +00:00
Zeev Suraski 6f6e13de54 Use iostream.h instead of istream.h (IBM's compiler doesn't come with istream.h,
and iostream.h should include it)
2000-12-26 23:05:55 +00:00
Zeev Suraski a697d076bc Add Release_TSDbg support. This mode compiles PHP with the release C runtime,
but with optimizations disabled and with debug info.  Some crashes can only
be debugged using this mode.
2000-12-26 22:15:32 +00:00
Zeev Suraski dc2f1d9db7 - Use supplied istdiostream definition for the INI scanner too
- Add Release_TSDbg configuration
2000-12-26 22:15:13 +00:00
David Croft f4a53d0665 #remove cvs [dollar] ID from changelog 2000-12-26 13:22:31 +00:00
d4ff503e3d ChangeLog update 2000-12-26 02:09:09 +00:00
658903cde0 ChangeLog update 2000-12-25 02:09:10 +00:00
Sascha Schumann 60492fa685 Skip mcrypt/gmp tests, if the extensions are not available. 2000-12-24 16:51:04 +00:00
Sascha Schumann 8e22a8a73b Add session_set_save_handler test 2000-12-24 16:33:27 +00:00
Sascha Schumann 3ca8721e99 More instances of s/efree/FREE_ZVAL/ 2000-12-24 16:30:42 +00:00
Sascha Schumann 7574cd4360 Not freeing the zval using FREE_ZVAL caused a segfault in
shutdown_memory_manager.
2000-12-24 16:26:38 +00:00
Sascha Schumann 80ff1a3874 Also call some member functions of the deserialized objects 2000-12-24 16:06:32 +00:00
Sascha Schumann 971e3a6473 Run run-tests.php in srcdir and add top_builddir/pear to the include
path (does not seem to work though yet.  The include path does not
seem to get changed at all).
2000-12-24 16:03:16 +00:00
Sascha Schumann 72f99e668e Add session object deserialization test 2000-12-24 16:01:32 +00:00
Sascha Schumann 5722a0e1ce Add two regression tests for the session module 2000-12-24 15:57:05 +00:00
Sascha Schumann 3a16dc1cac Fix segfault introduced through recent zend_hash_get_current_key* changes. 2000-12-24 15:50:39 +00:00
Zeev Suraski b8be713dd5 This needs updating as well 2000-12-24 15:37:39 +00:00
Sascha Schumann a1322e145c Sync the expected output with Linux dirname output. The test passes now.
Perhaps this should be split into two tests, because the
Win32 paths don't work properly with PHP's dirname on Unix.
2000-12-24 14:40:37 +00:00
Sascha Schumann 14c195a6d8 Fix "make test" in VPATH environments 2000-12-24 14:24:04 +00:00
Thies C. Arntzen 1fb4c6dfe8 revert last fix. the problem is now fixed globally in Zend. 2000-12-24 10:58:44 +00:00
5e4b86d1e8 ChangeLog update 2000-12-24 02:09:07 +00:00
Zeev Suraski cec94760fd More aggressive protection in call_user_function_ex() 2000-12-24 00:29:14 +00:00
Thies C. Arntzen 009064bc4d fix #8363.
fix call_user_function when parser->object is not set.
2000-12-23 21:46:44 +00:00
Sascha Schumann 9defdc6fbb Pass some more variables to AC_SUBST as those are needed for Apache 1.3's
libphp4.module.in.
2000-12-23 13:17:36 +00:00
Zeev Suraski f052eab681 Fix a possible crash bug in call_user_function_ex(), if the function is
in fact not a user function
2000-12-23 12:54:42 +00:00
24361033ed ChangeLog update 2000-12-23 02:09:12 +00:00
Sascha Schumann 92f61634eb (PHP session_unset) Return early, if no session was started.
PR: #8354
2000-12-22 22:53:14 +00:00
Sascha Schumann 0b194cbca6 Support multi-char arg separators.
PR: #8274
2000-12-22 22:52:11 +00:00
Sascha Schumann c334058412 Set the floating-point exception mask on FreeBSD to 0 (as do other
FreeBSD system applications).  Also bump up the module API number
as the zend_hash_get_current_key change affects source and binary
compatibility.
2000-12-22 21:11:34 +00:00
Sascha Schumann 9815d5c94c Signal an error condition, if write was unable to perform the complete
operation.
2000-12-22 19:26:02 +00:00
Sascha Schumann 663d426e74 NULL is a valid return value of mmap. Check against (void *) MAP_FAILED. 2000-12-22 16:39:01 +00:00
Sascha Schumann 3c9f50efaf (php_file_copy) Use mmap to map the source file into our address space
and then simply write it out to the target file.  That avoids switching
between user and kernel land too many times.  If that does not work, we
fall back to the read/write method.
2000-12-22 16:34:11 +00:00
Andrei Zmievski a1614b8411 (PHP preg_replace) Fix to allow proper escaping of captured subpattern
references in the replacement string.
(PHP array_sum) Check that argument is an array.
2000-12-22 16:31:42 +00:00
Zeev Suraski aa6d2ac5d0 Heads up people!
Updated the get_current_key() API - the relevant authors, please take
a look at the updated code and make sure it's ok...
2000-12-22 12:57:09 +00:00
Zeev Suraski 36eaad252f Allow get_current_key() not to return the key itself, instead of a duplicate 2000-12-22 12:49:51 +00:00
Zeev Suraski 0fcce4a77a @* Fixed a possible crash in get_class_methods() (Zeev) 2000-12-22 12:08:04 +00:00
3e28346336 ChangeLog update 2000-12-22 02:09:12 +00:00
3185447c6b NEWS update 2000-12-22 02:09:09 +00:00
foobar c29e24c7e2 @- Changed setlocale() to use LC_* constants. (Jani) 2000-12-21 13:46:50 +00:00
Sascha Schumann 225a08e8dd No need for GCC extensions in non-debugging mode.
PR: #8345
2000-12-21 05:31:18 +00:00
Sascha Schumann e6f9ea5158 Some AC_SUBST substitutions were removed which are still needed.
Submitted by: Andrei Zmievski
2000-12-21 05:26:45 +00:00
30cb5f32f6 ChangeLog update 2000-12-21 02:09:07 +00:00
Chuck Hagenbuch 765b8435cb install the Math/* files. 2000-12-20 19:08:29 +00:00
Sascha Schumann 7f96af83b2 Stop automatically passing vars to AC_SUBST through PHP_SUBST.
There are some variables which are needed for Makefiles and files
created by AC_OUTPUT; we use PHP_SUBST_OLD for those now.

genif.sh was moved to an appropiate place.
2000-12-20 17:21:37 +00:00
Sascha Schumann 060e647e5e Speed up the genif.sh script a little bit. Whereas it took three seconds
previously, it takes now about 100ms on a P233.
2000-12-20 16:29:07 +00:00
Andi Gutmans 73c0f4b4c2 - Use memcmp() instead of ugly char-by-char compare 2000-12-20 15:51:16 +00:00
Zak Greant 9e9688d1de Removed unused variable from is_scalar 2000-12-20 11:07:20 +00:00
foobar 48552b1ba4 Note about fix under correct version. 2000-12-20 09:12:13 +00:00
7f25ef4700 ChangeLog update 2000-12-20 02:09:16 +00:00
ae2af0e14b NEWS update 2000-12-20 02:09:12 +00:00
Zeev Suraski 48b410c41e Add the QA team to the credits 2000-12-19 22:59:14 +00:00
Stanislav Malyshev 1d35ad33c6 Add support for ASP tags in one-line comment 2000-12-19 12:57:38 +00:00
Hartmut Holzgraefe 560a4c1105 @ ctype functions now follow the extension naming conventions (Hartmut)
# removed unneccesary code generated by ext_skel
2000-12-19 11:50:30 +00:00
Stanislav Malyshev f487f5960a Fix possible crash 2000-12-19 11:23:27 +00:00
Ron Chmara 5cc6344edc Updated to reflect recent discussions on php-dev. 2000-12-19 06:22:07 +00:00
aa6e16f495 ChangeLog update 2000-12-19 02:09:09 +00:00
foobar 402d60491b wb fix. 2000-12-19 00:14:58 +00:00
foobar c66c250c41 Fix pr: #7982 2000-12-19 00:12:58 +00:00
Zak Greant bbf41d2116 Adding test for is_scalar(). 2000-12-18 21:24:25 +00:00
Zak Greant e4ca57bb57 Added is_scalar() function. 2000-12-18 19:23:50 +00:00
Andi Gutmans 22854f8016 - No need to generate number.c and number.h anymore. 2000-12-18 16:53:46 +00:00
Andi Gutmans e2f33cb14f - Success! Yay! 2000-12-18 16:11:57 +00:00
Andi Gutmans e0f026c600 - Yet another one. 2000-12-18 16:10:08 +00:00
Andi Gutmans 0a300b9935 - Testing 2000-12-18 16:08:02 +00:00
Andi Gutmans 9e3fa59ac2 - No luck 2000-12-18 16:06:16 +00:00
Andi Gutmans 532210b5ac - Make this damn commit stuff work. 2000-12-18 16:05:12 +00:00
Andi Gutmans d3a04db0f2 - Testing 2000-12-18 16:00:15 +00:00
Stanislav Malyshev 63873aba37 Use HashPosition iterator instead of saving/restoring internal pointer 2000-12-18 15:06:03 +00:00
Stanislav Malyshev 9a135a2b29 Preserve internal pointer over print_r (fix #8289) 2000-12-18 13:56:30 +00:00
Andi Gutmans 43adbdcc72 - Fix leak with useless statements such as "foo"; 2000-12-18 13:28:32 +00:00
Andi Gutmans 9a87dc3bdc - Testing Sascha's CVS commit script which should work with branches. 2000-12-18 13:25:53 +00:00
Andi Gutmans 361d04b84b - Testing 2000-12-18 13:24:58 +00:00
Andi Gutmans 1b5493f819 - Testing 2000-12-18 13:23:45 +00:00
Andi Gutmans 2949dcb6c0 - Testing 2000-12-18 13:21:47 +00:00
Andi Gutmans 9722c1397a - Testing 2000-12-18 13:21:07 +00:00
Andi Gutmans f23ebb7c5e - Testin 2000-12-18 13:20:01 +00:00
Zeev Suraski 603a23ade2 Test, ignore 2000-12-18 13:18:02 +00:00
Zeev Suraski 675985c892 Test, ignore 2000-12-18 13:14:05 +00:00
Zeev Suraski 2ef76284f0 Test, ignore 2000-12-18 13:12:16 +00:00
Zeev Suraski 1f7f2416be Test, ignore 2000-12-18 13:07:50 +00:00
Zeev Suraski 43c94f221a Test, ignore 2000-12-18 13:01:59 +00:00
Hartmut Holzgraefe 96ccf69301 fixed BUG #8306: shmat() returns -1 on errors, not NULL 2000-12-18 12:22:28 +00:00
Stanislav Malyshev 138ea941fa Add notice when auto-converting array to string 2000-12-18 08:47:17 +00:00
d6f0bd3bb8 ChangeLog update 2000-12-18 02:09:08 +00:00
Andi Gutmans d63f8130bc - Clean up the scanner a tiny bit while messing with it. 2000-12-17 20:23:24 +00:00
Andi Gutmans 6529b06618 - %> without asp_tags should not be treated as inline_html but as regular
tokens. Of course the parser will die with a parse error which is the
  correct behavior.
2000-12-17 20:10:16 +00:00
Andi Gutmans 5868427dcf - Fix problem in one line comments with line endings such as ??> 2000-12-17 20:03:35 +00:00
Stanislav Malyshev 98f2db94ec Fix #8279 (-2147483647 > 2147483647).
# Long addition/subtraction may not fit long.
2000-12-17 16:02:59 +00:00
Stanislav Malyshev 8b1377043d No need to link main binary with ODBC libs if we use shared module 2000-12-17 11:17:50 +00:00
Thies C. Arntzen 2c650cd178 add a reminder about #3149 2000-12-17 09:27:42 +00:00
2bb4b1e604 ChangeLog update 2000-12-17 02:09:10 +00:00
Sascha Schumann 2d011afbfd Don't do anything, if the input string has a length of 0.
PR: #7686
2000-12-17 02:09:07 +00:00
Andi Gutmans 9fbd0a24ba - How did CVS let me commit this? Probably it confused with the branch
merge
2000-12-16 21:01:21 +00:00
Andi Gutmans 8518010945 - In PHP we're supposed to only use MAXPATHLEN (defined in php.h) 2000-12-16 20:56:44 +00:00
Andi Gutmans 86a1cace27 - Make all places use MAXPATHLEN in the same way. It includes the
terminating NULL.
2000-12-16 20:52:43 +00:00
93a93c2429 ChangeLog update 2000-12-16 02:09:27 +00:00
c01d3612e9 NEWS update 2000-12-16 02:09:23 +00:00
Sam Ruby a472edb99b AIX's XlC++ does not allow casts as an lvalue. 2000-12-16 00:15:56 +00:00
Hartmut Holzgraefe a0acd8054a removed a warning when testing against a single .phpt file 2000-12-15 23:18:50 +00:00
Rasmus Lerdorf 808da6dbb5 Attempt by Matt Bonneau to get thumbnail extraction working
(no need to bring this into the 4.0.4 branch)
2000-12-15 17:25:20 +00:00
Ben Mansell fbf699adb6 Fix Zeus' behaviour with URL, SCRIPT_NAME, SCRIPT_FILENAME, REQUEST_URI
environment variables
PR:
Submitted by:
Reviewed by:
Obtained from:
2000-12-15 16:18:55 +00:00
Derick Rethans ffd0e06b60 - Added test for bug #8040 2000-12-15 15:59:29 +00:00
Derick Rethans 6caa8c37c2 - Added a patch that changed the checking of which version of libmcrypt is
installed (Thanks to: Anil Madhavapeddy <anil@recoil.org>)
2000-12-15 15:35:48 +00:00
foobar 40677872d5 Removed unused variables. 2000-12-15 12:33:12 +00:00
Frank M. Kromann 1e9acc15cf Fixing compilation on Win32. (and others) 2000-12-15 03:04:09 +00:00
Stig Bakken 73155d10c4 * run-tests.php: fixed a few bugs, including the POST/GET problem reported by
Stas
2000-12-15 02:57:11 +00:00
b76900ed43 ChangeLog update 2000-12-15 02:09:26 +00:00
Stig Bakken 6e1e78d1c6 @Added iconv() function (using libc or libiconv) (Stig) 2000-12-15 01:01:14 +00:00
Stig Bakken ac2e12a9a9 @Added ODBC_TYPE constant (Stig) 2000-12-15 00:57:04 +00:00
Andi Gutmans 11e5f9bd44 - This is the correct way of doing it 2000-12-14 23:05:31 +00:00
Daniel Beulshausen 3b20a425c9 added missing SLS_FETCH() 2000-12-14 22:16:21 +00:00
Sascha Schumann 80e1124c21 New m4 macros should go into acinclude.m4. 2000-12-14 17:29:38 +00:00
Hartmut Holzgraefe 6b5c37a8c5 enforce lenght limit and catch out-ouf-memory conditions 2000-12-14 16:38:15 +00:00
Sascha Schumann c0daf14cb3 Don't define LC_MESSAGES, if LC_MESSAGES is not defined.
PR: #8259
2000-12-14 15:58:14 +00:00
Hartmut Holzgraefe 9b1b253548 fgetcsv() will now work correct with empty fields in tab delimited files
# fix for bug #8258 and regression test
2000-12-14 14:18:36 +00:00
Daniel Beulshausen 9967b2e149 added define for force cgi redirect 2000-12-14 11:46:10 +00:00
Stanislav Malyshev 61f632a0f2 Fix shared description 2000-12-14 10:15:38 +00:00
Stanislav Malyshev 7e032b8b30 Add proto 2000-12-14 10:11:00 +00:00
Uwe Steinmann 89279afdd3 - handled possible case that an Anchor has no Position
(This used to cause a segm fault)
2000-12-14 07:37:37 +00:00
a730ffdc39 ChangeLog update 2000-12-14 02:09:14 +00:00
Zeev Suraski 98ce9ed699 Update module_api_no 2000-12-14 00:23:18 +00:00
Zeev Suraski 944c3b40b4 That slipped in :( 2000-12-13 23:40:44 +00:00
Hartmut Holzgraefe 63e6b0b5bf levenshtein() fixed, regression tests added (bug id #6562 and #7368)
# fallback to unoptimized version for 4.0.4 release
2000-12-13 23:26:19 +00:00
Zeev Suraski be895bcb96 Fix call_user_function() with objects - it could leak under certain circumstances 2000-12-13 22:50:10 +00:00
Uwe Steinmann 0e41e3c7cf - Bodytag is insertet by fnInsAnchors()
- several small bugs which might cause a segm fault
2000-12-13 17:27:13 +00:00
Ben Mansell a017a6c025 (Zeus) Re-added some server variables that will be used.
Also added DOCUMENT_ROOT, was missing before for non-Win32
2000-12-13 17:11:01 +00:00
Stanislav Malyshev e81c9642b8 Add GMP tests 2000-12-13 15:55:40 +00:00
Stig Bakken a70b01b96e * rename write* to dowrite* to avoid clash with ext/sockets
* sapi/cgi seems to ignore command-line options when running in "real"
  CGI mode, need to find a way to pass include_path to it...
2000-12-13 14:24:15 +00:00
Stig Bakken 672a300022 * PEAR: don't require "make install" before "make test" 2000-12-13 14:01:39 +00:00
Sascha Schumann 276cb7cdb1 Add apache_child_terminate() and INI setting apache.child_terminate
which defaults to 0.

Submitted by: Sam Liddicott <sam.liddicott@ananova.com>
2000-12-13 13:19:56 +00:00
Sascha Schumann 08d104e040 Don't increase the refcount of id, if we already have increased the refcount
of the same id before.

PR: #8225
2000-12-13 12:26:25 +00:00
Sascha Schumann b2a016135e Move cracklib entry to 4.0.5 2000-12-13 12:15:48 +00:00
Daniel Beulshausen 199160d4db link against msvcrt(d).lib, ignoring it isn't a good idea 2000-12-13 11:37:00 +00:00
Stanislav Malyshev 16987ca15f Fix crash when first argument to strtr is empty 2000-12-13 10:22:36 +00:00
Stanislav Malyshev 62f626b157 Kill warning 2000-12-13 09:44:06 +00:00
foobar 6072e2fabb Added a missing note. 2000-12-13 09:19:13 +00:00
b750eed22f ChangeLog update 2000-12-13 02:09:35 +00:00
Stanislav Malyshev 0d02c7d337 Open files in binary mode - should fix readfile() on Windows 2000-12-12 17:42:53 +00:00
Stanislav Malyshev 3abdbd3de9 Fix memory leak 2000-12-12 17:02:12 +00:00
Stanislav Malyshev 5dc9742071 Fix socket read returning bad values. 2000-12-12 16:56:34 +00:00
Uwe Steinmann 25e3740bcc - add test for hw_insertanchors() 2000-12-12 16:02:19 +00:00
Uwe Steinmann ba862cc06d - new function hw_insertanchors(). It takes a document, a list of anchors
and its destination and inserts the anchors into the text.
2000-12-12 12:28:26 +00:00
Stanislav Malyshev 0731f54d35 Fix #7987: POST/GET: string with \0(%00) values not parsed correctly 2000-12-12 10:47:47 +00:00
Stanislav Malyshev 868c8769f8 Fix #8195: strncasecmp returns incorrect value 2000-12-12 09:47:30 +00:00
d1d74ec8a4 ChangeLog update 2000-12-12 02:09:12 +00:00
Zeev Suraski 6239ddfe6d Fix Win32 build 2000-12-11 16:27:48 +00:00
foobar 9d87c7a791 Added a note about --enable-versioning working with IRIX 6.5 2000-12-11 16:21:19 +00:00
Andrei Zmievski 9002d1e570 Formatting. 2000-12-11 14:42:05 +00:00
Stanislav Malyshev a1c20a04ff Fix serializer bug that prevented serializer from working on any
variable that had non-reference copies of the same zval
2000-12-11 14:29:25 +00:00
Sterling Hughes e68c902e3b Fix a crash related to the simple sablotron api. (thies)
make sablotron work with zts.
fix a leak or two,
2000-12-11 14:15:09 +00:00
Thies C. Arntzen 889b717a4c fix #6348 2000-12-11 12:52:52 +00:00
Sascha Schumann 104311042c Add TODO note 2000-12-11 08:05:53 +00:00
Andrei Zmievski 753e46657f Make php_array_merge() an API function. 2000-12-11 05:36:24 +00:00
429c4c7922 ChangeLog update 2000-12-11 02:09:23 +00:00
Sascha Schumann 107aa9f71a Align ZTS handling of globals with common usage 2000-12-10 23:22:20 +00:00
Daniel Beulshausen d41137fedf fix win32 apache module
# this is ugly, has someone a better way?
2000-12-10 22:40:07 +00:00
Daniel Beulshausen 1f31360f01 fix windows build 2000-12-10 22:06:07 +00:00
Andi Gutmans ec381d949e - Add NEWS about being able to assign new's by ref 2000-12-10 20:26:56 +00:00
Chuck Hagenbuch a9a1553031 [whitespace] make this code a bit less dense. 2000-12-10 19:18:34 +00:00
Sebastian Bergmann 71348b8b9e Initial commit of Function_Cache. 2000-12-10 18:40:23 +00:00
foobar 8bb668b226 Added constants for locale categories. 2000-12-10 15:55:34 +00:00
foobar 56e718d87e Moved the constants into ext/standard 2000-12-10 15:53:37 +00:00
James Moore 9206955425 Making the shmop phpinfo entry look the same as others. 2000-12-10 14:45:42 +00:00
Sterling Hughes e0e42d336a For nice looking error output. ;) 2000-12-10 10:57:46 +00:00
Sterling Hughes 948c4bebd5 Fix crash on error handler.
Speed up a bit (only loop through errors when necessary).
2000-12-10 09:57:26 +00:00
8405de34b8 ChangeLog update 2000-12-10 02:09:24 +00:00
Stig Bakken 9f0fc7db8b * DB::isManip counts "REPLACE" as a manipulation command (MySQL specific)
* renamed DB_common::execute_emulate_query to DB_common::executeEmulateQuery
* moved "query" DB method to DB_common, there was duplicated logic in query
  and simpleQuery in all backends.
2000-12-10 01:32:16 +00:00
foobar 18cfac40a5 Kills one compile warning. 2000-12-10 00:37:43 +00:00
Sascha Schumann ac3c7fb5de Fetch SWF globals
PR: #8181
2000-12-09 10:35:18 +00:00
foobar 98349a9408 Removed unused variable definitions. And libxml can be build NOT
to have support for either XPath or XPtr.
2000-12-09 03:19:46 +00:00
e01ce716a3 ChangeLog update 2000-12-09 02:09:18 +00:00
27b2c29210 NEWS update 2000-12-09 02:09:15 +00:00
foobar 90d65f1865 wb clean. 2000-12-08 16:25:38 +00:00
Sterling Hughes fe13e4b05d @ Added the call_user_method_array function which allows you to call a method with an
@ arbitrary number of parameters. (Sterling)
2000-12-08 14:37:49 +00:00
Rasmus Lerdorf c9f1fe638d Fix off by one error in file upload code 2000-12-08 14:28:14 +00:00
foobar 41f3d66705 Version checking for domxml. Requires >= 2.2.7 at the moment. 2000-12-08 13:09:32 +00:00
Stig Bakken fe9290e4a9 * output fix for skipped tests 2000-12-08 12:57:11 +00:00
Sascha Schumann 05dc226919 Fix a memory leak 2000-12-08 12:32:16 +00:00
Sterling Hughes 9b3942a79a Fix sablotron.
Add a little beautifying of the extensions name for phpcredits() (Sablotron XSLT not Sablot).

#would somebody please add this to the release tree, thanks much!
2000-12-08 09:29:09 +00:00
Zak Greant 767fa2c6af Added constants to represent the various categories of
locale (LC_ALL, LC_MESSAGES, etc...)
2000-12-08 09:20:42 +00:00
Stig Bakken efbc4a2566 * applied fetch modes patch for odbc by Richard M. Yumul
* added DB::isManip so we have _one_ place for testing whether something
  is a data manipulation query
* when passed a string as its first constructor arg, DB_Error now uses
  the error code DB_ERROR rather than just 0
* implemented auto-commit for ibase (not yet fully tested)
* fixed persistent connections in odbc
2000-12-08 02:30:43 +00:00
3288325bd4 ChangeLog update 2000-12-08 02:09:08 +00:00
Stig Bakken 749ed8568a added TODO comment 2000-12-08 00:21:09 +00:00
Sascha Schumann 4078b3cff9 Namespace protect parse_date interface and implementation 2000-12-08 00:12:35 +00:00
Stig Bakken 8f74a36858 * added Sebastian's affectedRows() and numRows() for MySQL
* added regression test for DB_mysql::affectedRows
* fixed some PEAR_Error based tests that had broken (line number change)
2000-12-07 19:53:27 +00:00
Sascha Schumann acdae3a149 Hardcode strlen due to problems on SCO OpenServer 5.0.4 which defines
strlen to __std_hdr_strlen.
2000-12-07 19:28:13 +00:00
David Hedbor 9147a81a19 Fix for Pike 7.1 (error -> Pike_error). Caudium bug #12486. 2000-12-07 19:01:13 +00:00
Sascha Schumann 6c0ed47a6c Enable libgcc, if we are building on Solaris with GCC. 2000-12-07 16:34:37 +00:00
Sascha Schumann 9fff35ac9f Hardcode the readdir entry as well 2000-12-07 15:33:30 +00:00
Andrei Zmievski 9b46346a23 We don't want any hard errors in PHP scripts unless absolutely necessary. 2000-12-07 14:54:52 +00:00
Kristian Köhntopp f5abd4c50b Fugbix in call_user_func_array() if second argument is empty. 2000-12-07 14:14:00 +00:00
Sascha Schumann 0ddb725f91 Axe rest of DAV leftovers and use STD_PHP_INI_ENTRY in the INI section 2000-12-07 13:07:18 +00:00
Sascha Schumann 4ada3dd3a0 Hardcode all functions which are mentioned in the Large File Support Spec
http://ewe3.sas.com/standards/large.file/specs/api+.007.html
2000-12-07 12:09:38 +00:00
Sascha Schumann 9d50bc0161 Fix Makefile template. 2000-12-07 11:27:35 +00:00
Stanislav Malyshev 7ff9dcacb1 Enable DB2 shared build 2000-12-07 11:13:49 +00:00
foobar 9eaddc999d Fixed bug #8145 2000-12-07 11:01:32 +00:00
foobar 5e4817ec5d Added note that openssl 0.9.6 is required. 2000-12-07 10:44:16 +00:00
Stanislav Malyshev 6a356cf5c8 Whitespace fix 2000-12-07 10:36:45 +00:00
Stanislav Malyshev 8ba3eeabd9 Allow var $foo = array(ABC => 1) constructs
# It still doesn't work good with constants, but at least doesn't leak now
2000-12-07 10:36:10 +00:00
Uwe Steinmann 5ff861bd4a - set propper min version 2000-12-07 10:04:18 +00:00
Sascha Schumann ea251e82e1 Fix ext_skel on Solaris
Submitted by: Sam Liddicott <sam.liddicott@ananova.com>
2000-12-07 10:03:21 +00:00
Stanislav Malyshev b531e43c49 Fix memory leak - get_current_key mallocs it's result, no need to
copy it.
2000-12-07 09:39:16 +00:00
Stig Bakken 52d3777f50 * make it possible to override the start directory for "make test" 2000-12-07 08:06:41 +00:00
Joey Smith eefe6739ee Close bug #7013. 2000-12-07 02:50:46 +00:00
e52ee0d208 ChangeLog update 2000-12-07 02:09:19 +00:00
Chuck Hagenbuch 6ccfc3fb15 Contribute Horde's Log:: abstraction class to PEAR. 2000-12-07 01:06:58 +00:00
foobar 417309262b The new openssl extension requires OpenSSL version >= 0.9.6 2000-12-07 00:22:36 +00:00
Sascha Schumann fb87cc8c8e INIT_DATA/UPDATE_DATA assumed that pData elements of the size of a void
pointer would actually be aligned like a void pointer. This lead
to bus errors on architectures which don't allow unaligned 32-bit accesses.
2000-12-06 21:24:10 +00:00
Andre Langhorst b03af37e19 updated with =& new syntax 2000-12-06 18:55:52 +00:00
Andre Langhorst 5604ae2de4 made run-tests.php windows compatible 2000-12-06 18:29:03 +00:00
Andre Langhorst 45c218968c added $this in constructor test (fails currently) 2000-12-06 17:56:53 +00:00
Sascha Schumann 7e28784de3 Fix indentation of configure output 2000-12-06 17:34:58 +00:00
Andre Langhorst 41f8d621b6 added OO test (will fail currently) 2000-12-06 16:22:01 +00:00
Stanislav Malyshev bbb46b6c0c Fix T1 static build 2000-12-06 15:08:18 +00:00
Stanislav Malyshev 9be60903d7 Update README 2000-12-06 14:28:10 +00:00
Stanislav Malyshev 596c3b7fd5 Fix prototypes
Fix prefect_square return
2000-12-06 14:10:40 +00:00
Stig Bakken cc9d7fc744 * cleanup 2000-12-06 02:53:14 +00:00
Stig Bakken dca0d5852d #With "php -f file.php", file.php is unable to parse command-line
#options because they are swallowed by PHP.  Use "-q" option instead to
#avoid this but still supress HTTP headers.
2000-12-06 02:52:37 +00:00
650e7bff12 ChangeLog update 2000-12-06 02:09:15 +00:00
24373fd1e7 NEWS update 2000-12-06 02:09:12 +00:00
Andrei Zmievski dc4b1c1adf @- Removed ext/dav due to obsolescence. (Andrei) 2000-12-05 22:58:36 +00:00
Chuck Hagenbuch 8ef5afc6fb spaces after commas. all whitespace. 2000-12-05 21:12:45 +00:00
Andi Gutmans 352d23b853 - Support for $var =& new foo() syntax. This allows you to use objects
which create extra references to themselves in the constructor.
2000-12-05 18:45:58 +00:00
Stanislav Malyshev 589a66feda Make GMP use Zend's memory functions 2000-12-05 15:35:20 +00:00
Stanislav Malyshev 76381dbf53 Fix prototypes 2000-12-05 14:47:40 +00:00
Stanislav Malyshev 4a3fdce696 Add check for conversion base 2000-12-05 14:17:38 +00:00
Zeev Suraski 848e51fda5 Expose all timeout functions 2000-12-05 13:04:05 +00:00
Stig Bakken 2b846ec7e5 * applied patch by Stig-Ørjan Smelror <Stig.Orjan.Smelror@lincom.no> 2000-12-05 12:15:18 +00:00
Stig Bakken 92fc209384 Applied IBM DB2 patch by Walter Franzini <walter@sys-net.it>
@ext/odbc: IBM DB2 patch by Walter Franzini <walter@sys-net.it>
2000-12-05 12:11:30 +00:00
Sascha Schumann b97e23c4a8 Pass core_globals to new inline functions
Submitted by: Sebastian Bergmann
2000-12-05 11:05:24 +00:00
Stig Bakken 48e7da206f * MySQL sequence emulation using auto_increment
* fixed indentation
2000-12-05 07:00:57 +00:00
a762072659 ChangeLog update 2000-12-05 02:09:29 +00:00
1c33368211 NEWS update 2000-12-05 02:09:26 +00:00
David Hedbor 694a5620e4 Removed a fatal condition to allow for harmless user error plus some other
small changes.
2000-12-04 23:12:40 +00:00
Chuck Hagenbuch c18ce859cb have PEAR::isError() not take parameters by reference for now. 2000-12-04 21:03:17 +00:00
Andi Gutmans 690812d165 - Fix up the NEWS item. We need to make sure that this release we really
do put a link to the NEWS file on the downloads page.
2000-12-04 20:10:13 +00:00
Andi Gutmans 10b460e7ca - Explanation about Zend change. I'll move it to the branch when I'm happy
with the way it's explained. It's rather hard to explain it well.
2000-12-04 18:28:35 +00:00
Sascha Schumann 2bfb11218f This branch will become 4.0.5. New entries should only be added to the
4.0.4 area, if you merge them.
2000-12-04 17:56:36 +00:00
Sebastian Bergmann 471d0d2f0c Added nextid() method to DB_common. Added lock() and unlock() methods to DB_mysql. 2000-12-04 17:13:29 +00:00
foobar f48c0fbc95 @- Made ldap_get_entries() return an array even if there are no entries
in search result. (Jani)
# This was actually the original behaviour and the correct one.
# I messed it up when I fixed another bug in it a while ago..
# Fixes bug #8054
2000-12-04 17:07:27 +00:00
Uwe Steinmann 81def6d9d5 - new function hw_new_document_from_file() 2000-12-04 16:34:06 +00:00
Sascha Schumann dedec6614e Automatically carry over macro definitions from Apache.
We don't take everything, because apxs' CFLAGS also includes
optimization, debugging, et cetera flags.

PR: #7211
2000-12-04 16:05:00 +00:00
Dan Kalowsky bfe4e5bf37 added name for credits on work for Solid interface.. 2000-12-04 15:47:30 +00:00
Stanislav Malyshev f0744d73de GD shared build fixes - should fix problem with gd.so not being linked
with right libraries
2000-12-04 15:10:58 +00:00
Sterling Hughes 2d322a13a2 close the filehandle if it is a tempfile. 2000-12-04 15:05:23 +00:00
Sascha Schumann 911abe100a Move code from macros to inline functions to ease debugging 2000-12-04 12:26:53 +00:00
Sascha Schumann e052f9f575 Handle the case of no-handlers properly and make handlers a proper C "string". 2000-12-04 10:22:46 +00:00
Sebastian Bergmann c20df37045 No comment. 2000-12-04 07:05:16 +00:00
Sebastian Bergmann 676bb6b9a0 I couldn't read it in order to understand it in order to extend it :-) 2000-12-04 06:56:29 +00:00
844db6ebb1 ChangeLog update 2000-12-04 02:09:17 +00:00
a6e2642ac5 NEWS update 2000-12-04 02:09:10 +00:00
Sterling Hughes a75b19e0f6 - Fix the handling of resource entries
- Fix the fd_dealloc() function
2000-12-03 19:17:09 +00:00
Sterling Hughes aa2d9117d9 Another attempt at fixing 8036 2000-12-03 19:13:41 +00:00
Sterling Hughes 56094458b7 Windows ist ser schlecht 2000-12-03 15:30:14 +00:00
Stanislav Malyshev 5b47d1ef7a Fix #8079 - filetype now knows about sockets 2000-12-03 13:42:54 +00:00
Sascha Schumann 3f38d892c0 Workaround for these two symptoms:
Some sed tools don't match strings which are not terminated with LF.

Some shells still support the ^ as a synonym for the pipe character.

Submitted by: Stanislav Malyshev
2000-12-03 10:58:18 +00:00
Hartmut Holzgraefe 5f683e7d78 changed run-tests.php to use 'php -q' instead of 'php -f' 2000-12-03 10:45:53 +00:00
Sascha Schumann c95a8f39b9 Merge with php_4_0_4 2000-12-03 08:37:43 +00:00
bc042fb841 ChangeLog update 2000-12-03 02:09:18 +00:00
dc72565a91 NEWS update 2000-12-03 02:09:15 +00:00
Zeev Suraski d36c316ac6 Fix DB build (hopefully, untested) 2000-12-03 00:07:29 +00:00
Zeev Suraski cbb2379b5b - Get the MySQL module a bit uptodate.
- Fix a bug in mysql_do_connect() - it would corrupt the host argument, if it contained a port
  (or could corrupt the INI value, so that the port argument would work only the first time
  around)
2000-12-02 17:27:11 +00:00
Sascha Schumann 1e0a87d62b Include <ext/standard/info.h> for php_info-related functions. 2000-12-02 13:43:50 +00:00
Sascha Schumann 1f934084cd Noone defines PACKAGE/VERSION anymore. 2000-12-02 13:27:10 +00:00
Sascha Schumann af97475e93 Use the hardly-documented third parameter of AM_INIT_AUTOMAKE to suppress
defining PACKAGE/VERSION.
2000-12-02 13:27:07 +00:00
Sascha Schumann 15c53ba23c Use the hardly-documented third parameter of AM_INIT_AUTOMAKE to suppress
defining PACKAGE/VERSION.
2000-12-02 13:26:03 +00:00
Alexander Feldman a777149199 @- Added extension for the cracklib library. (Alexander Feldman) 2000-12-02 11:59:20 +00:00
Sterling Hughes e1d314afa2 First attempt at fixing 8036 2000-12-02 10:28:55 +00:00
Sascha Schumann 182724f477 Branched off 4.0.4. This trunk becomes 4.0.5-dev. 2000-12-02 08:21:10 +00:00
d4b4ed3505 ChangeLog update 2000-12-02 02:09:17 +00:00
David Hedbor 1731fb0c67 Minor cosmetic changes. 2000-12-01 23:34:01 +00:00
David Hedbor bb1d16c122 More config.m4 fixes. 2000-12-01 23:10:49 +00:00
David Hedbor 8d48566c6f Updated config test to also work with debian pike 7 cvs etc. 2000-12-01 22:23:37 +00:00
Egon Schmid 10c685112a Fixed some protos. 2000-12-01 15:25:22 +00:00
Egon Schmid 91436356b8 Fixed some protos. 2000-12-01 15:03:25 +00:00
Sascha Schumann 8e3abe8946 Get rid of HAVE_EXTNAME. This dates back to PHP 3 where source files
were unconditionally compiled. It is not necessary in PHP 4.
2000-12-01 14:56:30 +00:00
Egon Schmid b3b277f32a Fixed some protos. 2000-12-01 14:32:14 +00:00
Sascha Schumann 4f4cac9611 Add newline. Recent GCC snapshots segfault, if the input file is completely
empty. Should I report this? This appears to be quite lame.
2000-12-01 13:57:24 +00:00
Sascha Schumann 8476f5b29e Please avoid potential buffer overflows in new code. If you deal
with strings, consider storing the string length along with the string
data. That will make your life easier.
2000-12-01 12:29:29 +00:00
Sascha Schumann a1510f90b0 Remove *.o 2000-12-01 12:14:30 +00:00
Andi Gutmans ae7c036e41 - Fix swf build issues from bug #7612
- Not tested! Someone please compile it.
2000-12-01 09:50:01 +00:00
727e89ab1b ChangeLog update 2000-12-01 02:09:19 +00:00
Frank M. Kromann f9e226fe4a Fixing bug 8061. Position counter starts a 0 but was compared with length.
oops. the fix should be made twice.
2000-12-01 01:55:31 +00:00
Frank M. Kromann 518ab3c62f Fixing bug 8061. Position counter starts a 0 but was compared with length. 2000-12-01 01:26:42 +00:00
foobar 744f1a34ef Beautifying of phpinfo(). 2000-12-01 01:25:36 +00:00
Frank M. Kromann 6cdc90bae3 Changed presentation of default values for textsize and textlimit in phpinfo().
the value -1 means "Server default"
2000-11-30 22:24:00 +00:00
David Eriksson c2f1139738 updated documentation and configuration 2000-11-30 22:03:18 +00:00
David Eriksson 1888009e26 changed variable names to *_class_functions 2000-11-30 22:01:58 +00:00
Sterling Hughes 4daab7c982 fix configure --help option name... 2000-11-30 15:20:40 +00:00
42fc96aaaf ChangeLog update 2000-11-30 02:09:11 +00:00
66e3243ddd NEWS update 2000-11-30 02:09:08 +00:00
Frank M. Kromann ad17d8f0a4 The ODBC extension looks for settings named odbc. and not uodbc. 2000-11-29 22:10:46 +00:00
Frank M. Kromann 20490db03f Removed old version 6.5 code. Clinet Libraries for SQL Server 7.0 can be used with version 6,5.
Minor changes to use som Zend macros to define globals.
2000-11-29 22:06:47 +00:00
Frank M. Kromann 5cb6b6c667 Fixing wring resource handle returned from mssql_query().
The error was introduced when adding mssql_fetch_batch().
2000-11-29 17:08:22 +00:00
Stanislav Malyshev f7650fe8ae Add .cvsignore 2000-11-29 15:50:18 +00:00
Stanislav Malyshev ebffa649c3 Add more GMP functions, fix a couple of bugs 2000-11-29 15:49:18 +00:00
Sterling Hughes 2cc8e2f8c7 @ Added the is_null() function that will return true if a variable is of
@ type null. (Sterling)
2000-11-29 15:37:38 +00:00
Daniel Beulshausen 93b2587876 made gd working correct under win32
# fixes the issues when running php threadsafe
2000-11-29 15:25:42 +00:00
0bc55d8c81 ChangeLog update 2000-11-29 02:09:13 +00:00
69e30c20c1 NEWS update 2000-11-29 02:09:10 +00:00
Jason Greene d8bc7084ee Added the capability to specify a different HTTP Redirection response code
before the Location Header.

Ex. header("HTTP/1.1 307 Temporary Redirect");
    header("Location: URL");
2000-11-29 01:22:49 +00:00
Zeev Suraski 2672602e30 Output buffering was being enabled all the time - fixed 2000-11-29 01:02:27 +00:00
foobar 2fef94cc11 One file missing. 2000-11-28 15:48:21 +00:00
foobar bb69296ddd Added missing .cvsignore files. 2000-11-28 15:43:06 +00:00
foobar 3a930785ec Fixed typo. bug #8001 2000-11-28 09:39:01 +00:00
foobar e5a997ff59 @- Fixed a bug which made readdir() unusable in some systems. (Jani)
# Bug report: #7390
2000-11-28 09:13:22 +00:00
foobar 5c16c9fa1a AC_CHECK_LIB prints out yes/no itself. 2000-11-28 08:06:30 +00:00
Sascha Schumann dcd971e6bf A field of mines
Submitted by: jon@csh.rit.edu
2000-11-28 06:54:16 +00:00
4e1b1fa929 ChangeLog update 2000-11-28 02:09:09 +00:00
Sascha Schumann 6e7a9e2705 Add note about an old change 2000-11-28 01:38:51 +00:00
Sascha Schumann 84f8310e9a Always add top_srcdir to the header file search path. 2000-11-28 01:20:21 +00:00
Andi Gutmans 8d9082563a - Allow passing references which are returned from functions and new
- statements to be passed by reference.
2000-11-27 18:46:23 +00:00
Daniel Beulshausen aa11144649 fix path operations, under win32 2000-11-27 18:21:48 +00:00
Andrei Zmievski 81814c8ddc Update class constants before trying to get default properties. 2000-11-27 17:00:54 +00:00
Sascha Schumann 3b195720e0 Add a note about what a missing const specifier does mean in the context
of the request_info structure.
2000-11-27 13:33:33 +00:00
Sascha Schumann 949b0893dc The result of conv_z_macros and some manual conversion of
"return_value.*=.*IS_STRING" constructs to RETVAL_STRINGL.
2000-11-27 13:31:21 +00:00
Sascha Schumann 1626ba7ee9 Oh man, gcc's logic is really flawed 2000-11-27 13:28:26 +00:00
Sascha Schumann 0644641616 Move build-defs.h(.in) and php_config.h to main 2000-11-27 13:27:51 +00:00
Sascha Schumann aa6a62d96d Kill a warning (code is correct) 2000-11-27 13:13:25 +00:00
Daniel Beulshausen d5af60ca2f update win32 extension section 2000-11-27 11:57:30 +00:00
19bca1a309 ChangeLog update 2000-11-27 02:09:11 +00:00
Jon Parise 45807e6dd9 Added a brief section documenting the preference of tabs over spaces.
There are a few touch-ups in this commit, too.
2000-11-26 21:45:44 +00:00
Stanislav Malyshev dca467faf3 GNU GMP - arbitrary precision nubers library 2000-11-26 18:36:16 +00:00
Zeev Suraski d4fc424554 Fix windows build 2000-11-26 14:25:31 +00:00
Zeev Suraski 8a03f3062f - Add bcmath to the standard UNIX build
- Change a couple of malloc()'s and free()'s to emalloc()'s and efree()'s
2000-11-26 09:34:01 +00:00
203d67ea6b ChangeLog update 2000-11-26 02:09:18 +00:00
Sterling Hughes 939a8b31e7 Add get_defined_functions() and get_defined_vars(). Clean up constant() entry a bit.
# Are we not ready for a release yet?
2000-11-25 16:37:26 +00:00
960cc62e59 ChangeLog update 2000-11-25 02:09:09 +00:00
a33a3925f9 NEWS update 2000-11-25 02:09:06 +00:00
Sterling Hughes 0d1bcd480c @ Added the call_user_func_array() function which gives you the ability to
@ call a user function by passing an array of parameters as the second
@ argument.

@ Added the constant() function which returns the value of a constant given
@ the constant's name.
2000-11-24 21:05:25 +00:00
Sterling Hughes 917cfd14e9 Declaring variables is generally a good thing 2000-11-24 16:26:35 +00:00
Andre Langhorst 96b95bd286 fixed bug 7961 2000-11-24 16:17:58 +00:00
Sterling Hughes fe25ebdd11 Fix segfault when non-array in params or arguments is given to
xslt_transform() or xslt_run().

Update xslt_output_begintransform() to new output buffering syntax (torben@php.net)
2000-11-24 15:07:01 +00:00
ea536c5808 ChangeLog update 2000-11-24 02:09:12 +00:00
b762691d4d NEWS update 2000-11-24 02:09:09 +00:00
Andrei Zmievski def5059f44 Fix the arg array size. 2000-11-24 00:12:19 +00:00
Stig Venaas db0d2c9bd6 Added README on usage, and added myself to CREDITS 2000-11-23 19:30:47 +00:00
Zeev Suraski 888f376e4c Very initial work on chunked output buffering. It's really unoptimized at
this time, and it can crash under some circumstances, but that's the
concept...
2000-11-23 18:43:18 +00:00
Andrei Zmievski 0af5c36d94 This submission introduces two features.
The first one is support for Perl-style matching regexp delimiters, i.e.
using <[{( and )}]> to delimit the regular expressions.

The second one is a new 'F' modifier that allows you to specify a function name
in the replacement argument to preg_replace(). This function will be called
when the replacement needs to be made. It is passed an array of full matched
pattern and captured subpatterns and it is expected to return a string that
will be used for replacement. 'e' and 'F' modifiers cannot be used together.

@- Implemented support for Perl-style matching regexp delimiters in PCRE.
@  You can use <{[( and )]}> to delimit your expressions now. (Andrei)

@- Introduced new 'F' modifier in PCRE that lets you specify a function
@  name in the replacement argument to preg_replace() that will be called
@  at run-time to provide the replacement string. It is passed an array of
@  matched pattern and subpatterns. (Andrei)
2000-11-23 17:25:13 +00:00
foobar f03b949134 Revert bad commit.
# And now I'm ready to sleep..
2000-11-23 16:31:58 +00:00
Daniel Beulshausen 23c3b190c2 oops, libcrypt shouln't be in the linker libs
by default
2000-11-23 16:29:49 +00:00
foobar 78ed6e831f Fixed some compile warnings. 2000-11-23 15:57:24 +00:00
foobar a216a9ad7e Fixed Bug #7939 + some cleaning. 2000-11-23 14:56:09 +00:00
Uwe Steinmann 4a60447800 - optional argument for hw_pipedocument() to specify link prefix 2000-11-23 14:44:10 +00:00
Zeev Suraski 5ebbef16f2 I forgot to commit the .dsp update... 2000-11-23 14:34:09 +00:00
Daniel Beulshausen 819f11c9d2 make ctype ext compile under windows 2000-11-23 14:14:40 +00:00
Sebastian Bergmann ccb857ba81 Fixed typo. 2000-11-23 14:06:50 +00:00
Daniel Beulshausen e6d07d6fa3 added missing SABLOTLS_FETCH() 2000-11-23 14:02:41 +00:00
Hartmut Holzgraefe df7c2eeabc make genfunclist in phpdoc happy 2000-11-23 12:16:35 +00:00
Uwe Steinmann 4bb015938e - The name of the extension has to be fdf and not fdftk 2000-11-23 10:55:51 +00:00
Daniel Beulshausen cabfc674c2 fix libbcmath compile, updated dependencies & add
libbcmath to linker options
2000-11-23 10:17:37 +00:00
Uwe Steinmann fb35b3996c - fixed copy and paste error 2000-11-23 09:56:18 +00:00
Hartmut Holzgraefe c534109bce filename wildcards in a c comment were a bad idea 2000-11-23 06:58:14 +00:00
Frank M. Kromann ee3353e8d3 Adding Win32 project for libbcmath 2000-11-23 05:08:19 +00:00
7ace1a3e8d ChangeLog update 2000-11-23 02:09:11 +00:00
a9f8aa69c9 NEWS update 2000-11-23 02:09:08 +00:00
Frank M. Kromann b24c82e82a changed comment to allow compilation under win32 2000-11-23 01:47:39 +00:00
Hartmut Holzgraefe e3dae1013d added a "DO NOT EDIT!" header and regenerated the credits_*h files 2000-11-22 23:20:35 +00:00
Hartmut Holzgraefe 929197cf83 merged ext/apache/CREDITS and sapi/apache/CREDITS 2000-11-22 23:04:33 +00:00
Hartmut Holzgraefe e7101eb193 this little scripts will collect the CREDITS files from
all the ext/ and sapi/ subdirectories and put them all
together into ext/standard/credit_[ext|sapi].h
2000-11-22 22:53:33 +00:00
Sascha Schumann 3cacf33572 Run through conv_z_macros 2000-11-22 22:05:02 +00:00
Sascha Schumann c1dff68b34 Run through conv_z_macros and make use of RETVAL_STRING where useful 2000-11-22 22:00:39 +00:00
Sascha Schumann 53e3452649 Avoid estrdup and a couple of other minor cleanups 2000-11-22 21:52:53 +00:00
Sascha Schumann e937eeb2e5 Run through conv_z_macros 2000-11-22 21:47:15 +00:00
Sascha Schumann 2f6fe425a4 There is no Apache extension per se. Please leave this directory empty.
I'll remove it from the repository in one week.
2000-11-22 21:43:52 +00:00
Sascha Schumann 781cf450f8 Run through conv_z_macros 2000-11-22 21:40:15 +00:00
Sascha Schumann 2c95d6268c Add ircg 2000-11-22 20:46:40 +00:00
Zeev Suraski c476bce2f1 At long last, import the bcmath library, by Phil Nelson 2000-11-22 20:20:02 +00:00
Andi Gutmans be6ab20415 - Remove code which has been commented out for ages. 2000-11-22 19:53:17 +00:00
Stanislav Malyshev b36afe2957 Fix memory leaks in cURL.
cURL doesn't free strings we pass to him, so let PHP do it.
2000-11-22 15:46:13 +00:00
Dan Kalowsky e7aff0b676 @ Put an end to BUG#4615 (kalowsky & Eric Veldhuyzen)
This should remove the BUG#4615, thanks to Eric Veldhuyzen
(eric@terra.telemediair.nl) for the assistance on this (aka elegence vs
my hack).

This does not fix BUG#7922 though, which is currently being looked into
2000-11-22 15:31:04 +00:00
Sterling Hughes a56c9f8e68 Hmmm, that wasn't good. 2000-11-22 15:19:59 +00:00
Daniel Beulshausen 2fefaba7b6 tsrm realpath implementation is fixed
@ Fixed realpath() in Virtual Directory mode (Daniel)
2000-11-22 10:08:25 +00:00
Andi Gutmans afccae85d9 - Thanks to "Daniel Beulshausen" <daniel@php4win.de> 2000-11-22 04:59:32 +00:00
Sascha Schumann 2ef6b689e8 Pass on the exit status 2000-11-22 04:24:35 +00:00
Sascha Schumann 6c1af20310 Set the exit status from the return value of php_execute_script() 2000-11-22 04:24:04 +00:00
Sascha Schumann 0222f92358 Return the exit status from php_execute_script() 2000-11-22 04:23:26 +00:00
Sascha Schumann 939b72c771 removing '{' was certainly not intended 2000-11-22 04:16:25 +00:00
Sascha Schumann 886fbabb0b Don't access opt, if opt was not set. 2000-11-22 04:15:27 +00:00
Sascha Schumann 5347ef1728 Whitespace fix and initialize ret properly 2000-11-22 04:10:04 +00:00
efa026c86b ChangeLog update 2000-11-22 02:09:10 +00:00
231d1a12d1 NEWS update 2000-11-22 02:09:07 +00:00
Hartmut Holzgraefe 0b981df1b2 some more info on the ctype extension 2000-11-22 01:35:58 +00:00
Hartmut Holzgraefe 9d468a33c4 an experimental extension providing the C ctype function family 2000-11-22 01:00:44 +00:00
Zeev Suraski f8dabac6d5 Fix build 2000-11-21 22:41:49 +00:00
Andi Gutmans 12077112b4 - The baby patch wasn't that innocent :) 2000-11-21 16:14:02 +00:00
Andrei Zmievski 9ca1038535 Sterling's patch to make get_defined_vars() simpler and better. 2000-11-21 15:29:02 +00:00
Sterling Hughes 0a1f0ea22e Major rework of the basic api which provides:
- All Sablotron errors are now caught meaning nothing is
          ever outputted directly to the screen allowing you to
          catch all errors.
        - A mechanism is provided for you to have an error function
          which recieves all sablotron errors.
        - All of the basic functions re-use a single processor increasing
          performance (especially with high loads).
        - Added a bunch of comments, more to come (this way other people
          can easily modify my source).

@ Added the xslt_set_error_handler() function to the Sablotron extension.
@ (Sterling)

@ Improved Sablotron's error handling system allowing you to catch all
@ errors before they are outputted to the screen. (Sterling)
2000-11-21 12:12:19 +00:00
foobar 358731195f Fix bug #7034 2000-11-21 11:07:50 +00:00
Hartmut Holzgraefe f5bf3c10fd make HAVE_FOPENCOOKIE available for other extensions besides zlib 2000-11-21 08:38:20 +00:00
Hartmut Holzgraefe cea34b9dbe added .cvsignore files for tests directories 2000-11-21 08:00:21 +00:00
Daniel Beulshausen fda42b034f fix PDF image open under Win32 2000-11-21 07:08:01 +00:00
Frank M. Kromann 67f66b32c0 Adding php.ini value to set default batch size for mssql extension 2000-11-21 03:11:33 +00:00
Frank M. Kromann 649c59b731 Adding new functions, mssql_affected_rows and mssql_fetch_batch.
Added optional paramter to mssql_query, batchsize used minimize the memery usage during select of large datasats.
2000-11-21 03:09:16 +00:00
7743f5a59d ChangeLog update 2000-11-21 02:09:15 +00:00
Hartmut Holzgraefe 4a8d9df816 # a minor change, but still important :) 2000-11-21 00:43:25 +00:00
Hartmut Holzgraefe cedb39ee56 all the _GNU_SOURCE dependant stuff is now in zlib_fopen_wrapper.c
so all the #define/#include workarounds in zlib.c are no longer needed
2000-11-21 00:40:13 +00:00
Frank M. Kromann ee23c53108 Adding credits.c to project to allow compilation. 2000-11-20 22:32:02 +00:00
Frank M. Kromann 19555e57a8 removing compiler warning by including credits.h 2000-11-20 22:31:38 +00:00
Hartmut Holzgraefe 67bb9d1ae2 fixed a compile problem with glibc<=2.1.1 (#7327, #7892)
# zlib.c still produces a warning, perhaps i should move
# the fopen wrapper to a seperate file to get things right
# but i think i will wait for the autoconf book to arrive
2000-11-20 21:36:38 +00:00
Andi Gutmans b2c957d4b1 - NEVER copy and paste :) 2000-11-20 20:54:10 +00:00
Andi Gutmans b5d5b3a703 - Baby patch towards making the damn pass-by-ref work. 2000-11-20 20:49:42 +00:00
foobar dc70b6172b Fixed typo. #6933 2000-11-20 17:32:46 +00:00
Sterling Hughes b853cd5dc8 Revert. 2000-11-20 17:27:50 +00:00
Zeev Suraski d161e9d1c1 Update API number 2000-11-20 12:59:56 +00:00
Stanislav Malyshev 119ee485c6 Move "replace value" logic to Zend 2000-11-20 12:39:14 +00:00
Stanislav Malyshev 35f4826fea Add macro to replace value of zval with another value while preserving
referencing structure
2000-11-20 12:35:08 +00:00
Hartmut Holzgraefe 1f6878e912 2nd step towards auto-credits 2000-11-20 10:33:33 +00:00
Hartmut Holzgraefe df81663614 first step towards auto-generated credits 2000-11-20 10:05:57 +00:00
Andi Gutmans 6d2a433ec5 - This patch is broken and needs more thorough fixing. 2000-11-20 05:09:21 +00:00
620cda3987 ChangeLog update 2000-11-20 02:09:08 +00:00
Andi Gutmans ce87ae4159 - Try and fix the problem when sending references returned from a function by reference. 2000-11-19 19:49:58 +00:00
Hartmut Holzgraefe c8a56ea11d typo fix (copy/paste bug?) 2000-11-19 19:18:12 +00:00
Sterling Hughes 3b1a3a3f8c *** empty log message *** 2000-11-19 16:54:54 +00:00
Sterling Hughes 3c8cc8ab36 *** empty log message *** 2000-11-19 13:51:48 +00:00
Stanislav Malyshev 92dd81ba7f Fix #3261 - variables declared as "global" in function do not get the right
value after session_start.
2000-11-19 13:13:36 +00:00
Zeev Suraski 769cde2f9f Fix Zend build for non ZTS 2000-11-19 12:28:28 +00:00
David Hedbor 49014ed560 Patch to find module dir 2000-11-19 09:10:16 +00:00
Chuck Hagenbuch 965bb6d211 include checks for cal_misc.h and icalroutines.h 2000-11-19 02:42:06 +00:00
1cf5973ab4 ChangeLog update 2000-11-19 02:09:08 +00:00
Adam Dickmeiss 0ee7fbe41a Added .cvsignore file. 2000-11-18 18:56:47 +00:00
James Moore 2116cfedf3 Stopping Compile Warnings when using old GD 2000-11-18 18:09:42 +00:00
Zeev Suraski 82952f8830 Persist these numbers so that they stay for the duration of the entire process 2000-11-18 12:48:31 +00:00
Zeev Suraski 42b0e1cb1f Forgot to commit the non-debug build fix yesterday... 2000-11-18 11:43:08 +00:00
Zeev Suraski 66c667c974 Fix thread-safety bug in bcmath 2000-11-18 02:59:31 +00:00
Zeev Suraski 030b707296 Update SAPI modules to interface with the new TSRM.
Enable thread-safety memory debugging in ISAPI when in debug mode
2000-11-18 02:44:04 +00:00
Zeev Suraski 9a0b61a619 Add thread-safety debugging information (idea - Dmitri Dmitrienko) 2000-11-18 02:43:23 +00:00
Zeev Suraski 1ebdb6fa14 Beef up debugging support 2000-11-18 02:41:14 +00:00
5b59b51e50 ChangeLog update 2000-11-18 02:09:11 +00:00
3c48053ca8 NEWS update 2000-11-18 02:09:08 +00:00
Zeev Suraski d5a09981d6 Import debug-level improvements to TSRM, by Dmitri Dmitrienko 2000-11-17 23:31:15 +00:00
Stig Venaas 5739ee8799 Added openssl extension info 2000-11-17 19:57:19 +00:00
Stig Venaas b81828864f Added optional passphrase argument to openssl_get_privatekey()
@- Added OpenSSL extension (Stig Venaas)
2000-11-17 19:49:13 +00:00
Stig Venaas 8b500cdcdf Renamed openssl_read_privatekey openssl_get_privatekey, and some minor
fixes including init and shutdown functions
2000-11-17 19:17:07 +00:00
Sascha Schumann 5767ab3f75 Reset the state, if there is garbage in an HTML tag.
PR: #7854
2000-11-17 16:27:37 +00:00
Chuck Hagenbuch eb437a5870 close bug 7851 2000-11-17 16:10:43 +00:00
Sascha Schumann 66d8f798ad PHP does not care about inline at all, so get rid of this block. 2000-11-17 16:02:08 +00:00
Dan Kalowsky b52648efd5 Missed one section that required the addition of a new HAVE_SOLID_30
This should be correct now.
2000-11-17 15:48:09 +00:00
Jason Greene ac5e01e567 Decided not to clutter NEWS file with build fix, It is big enough already. 2000-11-17 15:41:02 +00:00
Dan Kalowsky 3e2ddd1edf Corrected the spelling of verion to version, and cleaned the configuration
code up a bit.  Also added in much better (read: tested) support for
Solid 3.0.   Credit for almost all of the patch goes to Eric Veldhuyzen,
minor modifications done (by me) to make it non-linux specific.

This commit also creates the HAVE_SOLID_30 define

@ Fixed/created support for Solid 3.0 databases (kalowsky)
@ Fixed support for Solid 2.3 databases (kalowsky)
2000-11-17 15:09:46 +00:00
Andrei Zmievski 7059daa7ef Fix. 2000-11-17 14:21:31 +00:00
Kirill Maximov 023a95ae1c @ quoted_printable_decode() function is made RFC-2045 compliant. (Kir)
This hopefully closes bugs #5321, #7138, #7855.
  Test script for the function is added.
2000-11-17 10:55:37 +00:00
86f0184c33 ChangeLog update 2000-11-17 02:09:12 +00:00
280461e06b NEWS update 2000-11-17 02:09:09 +00:00
Jason Greene 9f1eb35d6f Added ext/java fix line - I should learn to use '@' correctly : ) 2000-11-16 23:58:39 +00:00
Jason Greene 608ee593a4 SUN CC does not like like left side casting - see bug #6759
@Fixed ext/java so that it will compile with SUN CC
2000-11-16 22:19:48 +00:00
Thies C. Arntzen 6f79fc7d46 fix ora_fetch_into to allow_call_time_pass_reference = Off; (#7838) 2000-11-16 12:37:35 +00:00
foobar 6a81095313 extname -> openssl 2000-11-16 11:16:25 +00:00
Thies C. Arntzen 31f63bee93 don't use TLS in MINIT function. 2000-11-16 10:16:22 +00:00
ca05afa7fc ChangeLog update 2000-11-16 02:09:07 +00:00
Sascha Schumann 4bb564ad2b Clear idle_read_timer 2000-11-15 23:37:50 +00:00
Jan Borsodi d1cecd1dd2 Removed an unneccesary #warning which was used for testing purposes only. 2000-11-15 19:09:44 +00:00
Jan Borsodi 51011a6672 Initial import, PHP program for testing if the qtdom extension is available. 2000-11-15 19:02:14 +00:00
Jan Borsodi bde531da79 Initial import, since PHP cannot be compiled with a C++ compiler all C++ specific calls had to be moved to a separate file without any php includes.
It has several C functions which are used for initiating a QDomDocument and traversing it.
2000-11-15 19:01:44 +00:00
Jan Borsodi 2fea5bb19c Initial import, contains PHP specific extensions, takes care of converting C++ QDom objects to PHP objects.
This version has only one function: qdom_tree() which returns a tree of a string containing an XML document.
2000-11-15 18:59:59 +00:00
Jan Borsodi 471bcfc8c8 Autoconf configure script for qt dom, needs some more checking in the future. 2000-11-15 18:55:00 +00:00
Jan Borsodi 14350f9aef Makefile source, has a fix for compiling C++ files. 2000-11-15 18:54:05 +00:00
Jan Borsodi d0b3314c77 Initial import, ignores standard files. 2000-11-15 18:52:55 +00:00
Uwe Steinmann 8dcb3fdf3c - fixed silly bug (did check for 5 arguments but expected only 4) 2000-11-15 17:07:56 +00:00
Stanislav Malyshev fb8be26654 Fix crash (#7802) 2000-11-15 09:36:21 +00:00
Andrei Zmievski 3625a729a7 - Modified preg_replace() to take Perl-style $1 backreferences in addition
to \\n ones.
- Modified preg_grep() to always return the results with the keys
  from the original array.
2000-11-15 05:09:55 +00:00
c960bd930d ChangeLog update 2000-11-15 02:09:09 +00:00
Sascha Schumann 008d23bb5c Fix allocation 2000-11-14 20:34:14 +00:00
Stanislav Malyshev 2d57a5b2a4 Restore compatibility with old broken way 2000-11-14 18:33:58 +00:00
Stanislav Malyshev 0b6a8d0458 Better 0x handling - not change non-0x number behaviour 2000-11-14 17:54:11 +00:00
David Eriksson d4f9f83363 # added .cvsignore file 2000-11-14 17:38:06 +00:00
Stig Venaas eca0bd0f39 Changed to use Z_LVAL_PP, Z_STRVAL_PP and Z_STRLEN_PP. 2000-11-14 17:05:39 +00:00
Stanislav Malyshev 89d5983ad9 Attempt at better handling long 0x-numbers, like 0xffffffff 2000-11-14 17:02:52 +00:00
Stig Venaas 8f0d033450 Not using automake here either 2000-11-14 16:06:38 +00:00
Onn Ben-Zvi 218149da14 initial - ONn 2000-11-14 15:51:11 +00:00
Sascha Schumann c509dc6dc7 Add persistent memory handling to smart_str API 2000-11-14 15:36:18 +00:00
Sascha Schumann dba76125e4 Automake is gone. No need to ignore a non-existing file. 2000-11-14 14:32:58 +00:00
Stig Venaas d13547fa7f *** empty log message *** 2000-11-14 14:25:23 +00:00
Stig Venaas f3a17761be Made API simpler 2000-11-14 09:54:25 +00:00
5526248e53 ChangeLog update 2000-11-14 02:09:13 +00:00
60dd569a69 NEWS update 2000-11-14 02:09:10 +00:00
Daniel Beulshausen b4a6acf697 fix link object
# maybe it's too late already...
2000-11-13 22:28:58 +00:00
Daniel Beulshausen fcdf44a1a0 forgot to add... 2000-11-13 22:24:06 +00:00
Daniel Beulshausen 0c3d96c3ba make ingres compile under win32
# no cleanup...
2000-11-13 22:23:16 +00:00
Daniel Beulshausen c1e1bc07ff added dsp for openssl win32 2000-11-13 20:24:23 +00:00
Andrei Zmievski 468068705f @- Modified preg_replace() to ignore backreferences that refer to
@  non-existing subpatterns. (Andrei)
2000-11-13 19:49:41 +00:00
Stig Venaas 86b7cd0572 OpenSSL extension. So far it implements assymetric encryption functions. 2000-11-13 19:47:20 +00:00
Stig Venaas 5d7a485cd7 OpenSSL checking didn't work well, should be better now. Removed check
for include/evp.h, are there versions around that put it there? Recent
versions have it in include/openssl.
2000-11-13 19:13:41 +00:00
Zeev Suraski 6a86b6fad5 Handle unable-to-add-new-headers error nicely 2000-11-13 19:05:25 +00:00
Zeev Suraski 0f7f5c2c0e - Import Jade Nicoletti's transparent gzip encoding support as an output
handler.  Works quite nicely!
- Fix buglets in output buffering
- Add output_handler INI directive
2000-11-13 18:54:37 +00:00
Andi Gutmans 9b42296bab - Remove unused function 2000-11-13 18:14:16 +00:00
Thies C. Arntzen db65d0e076 @- Fixed column-title buffer-overflow in OCIFetchStatement(). (Thies)
fix #7784
2000-11-13 17:30:52 +00:00
Andi Gutmans 4004ef6f25 - Use typedef's for function pointers so that we can easily define arrays
- of these function pointers.
2000-11-13 17:30:42 +00:00
Onn Ben-Zvi 34b0b1fc11 initial - ONn 2000-11-13 16:01:05 +00:00
Stanislav Malyshev 124569d167 Fix zend_llist_apply_with_del - it should remove from list,
not only call dtor
2000-11-13 14:55:28 +00:00
Sascha Schumann 39f8c9807e Update patch and add persistent connection handling 2000-11-13 13:33:12 +00:00
Uwe Steinmann eea750ebc8 - fixed serveral prototypes
- replaced C++ style comments
2000-11-13 13:27:19 +00:00
Sascha Schumann 3fbfbf1f45 Add thttpd-dependent interface for maintaining persistent connections on
an iterative web-server. This will be used by the IRCG extension.
2000-11-13 13:23:56 +00:00
Sascha Schumann 04f180b08a More verbose error message for non-working apxs case 2000-11-13 12:43:44 +00:00
Sascha Schumann 8658cace16 Add note about serialized requests and their impact 2000-11-13 12:39:15 +00:00
1f6edfc779 ChangeLog update 2000-11-13 02:09:10 +00:00
foobar dd83069fff Fixed bug: #7768. Some cleaning up too. 2000-11-13 02:02:40 +00:00
Kristian Köhntopp 89d6b5b5bd Prototype corrected. 2000-11-12 22:13:35 +00:00
Sascha Schumann 6a149caaed Fix aborted connection handling and stop modifying thttpd data 2000-11-12 21:10:09 +00:00
Zeev Suraski 20ab5c58c7 Test, ignore 2000-11-12 17:21:14 +00:00
Sascha Schumann 2325a41346 PHP_FDFTK is always != no. $PHP_FDFTK is not. 2000-11-12 12:01:05 +00:00
Rui Hirokawa 71e53f2a5f enabled shared module. 2000-11-12 05:59:34 +00:00
a2774081c9 ChangeLog update 2000-11-12 02:09:07 +00:00
foobar 40462d1d02 Fix for #7758. Plus some cleaning. 2000-11-11 19:27:46 +00:00
Sascha Schumann 4d6ecaf26b Add Apache 2.0 sapi module and sort alphabetically. 2000-11-11 18:38:26 +00:00
Sascha Schumann 86b8e890dc strdup private AOLserver data before inserting it into SAPI's request_info. 2000-11-11 18:35:15 +00:00
Sascha Schumann 802d716c0d Update README
Make Apache-related functions build

Add get_all_headers()

Fix segfault when SAPI outputs strings of length 0

Move request ctor/dtor into their own functions
2000-11-11 18:24:27 +00:00
Andi Gutmans 1ccf94066c - Move SET_UNUSED() to header 2000-11-11 17:59:47 +00:00
Andi Gutmans 86a13dd94e - Beautify by using the standard #define. 2000-11-11 17:41:28 +00:00
Chuck Hagenbuch b69dd89d34 RFC822 does specify two digit years, but practically every decent mail
client I could check is using 4-digit years these days.
2000-11-11 17:28:20 +00:00
Hartmut Holzgraefe 38569740da fix for #7756 and #6743 : fatal error on 'include("")' instead of warning
(+ some cleanup)
2000-11-11 10:15:59 +00:00
56d673217c ChangeLog update 2000-11-11 02:09:07 +00:00
Ben Mansell 4d48df3339 Further updates to README.Zeus
# Using LD_RUN_PATH to let the libphp4.so library find other libraries.
# Surely there should be a better way, using -rpath? However, libtool
# seems to swallow any extra -rpath options given to the compiler.
2000-11-10 16:14:00 +00:00
Andi Gutmans 5e33cdaef3 - Remove this damn thing once again. 2000-11-10 11:48:12 +00:00
Uwe Steinmann 52aba68aa2 - new function set_content() which is a workaround for bug #6457 2000-11-10 11:40:03 +00:00
Uwe Steinmann 7534b9857a - Note about improved domxml 2000-11-10 10:37:43 +00:00
Uwe Steinmann 7c8f9371e5 - add testing for xpath 2000-11-10 10:28:30 +00:00
Uwe Steinmann 0bbb1906bd - Fixed many problems to make xpath working
- Each function now expects an object and not a resource anymore
  I hope this makes it more straightforward for the PHP-Programmer
2000-11-10 10:27:57 +00:00
Andi Gutmans 25db8b1882 - Some more 2000-11-10 08:15:44 +00:00
Andi Gutmans 86ac33e638 - Add files to .cvsignore thanks to Jon Parise 2000-11-10 08:15:00 +00:00
Uwe Steinmann b98f580143 - Fixed several error including segm fault (but still one left :-( 2000-11-10 06:09:41 +00:00
3374176643 ChangeLog update 2000-11-10 02:09:15 +00:00
Andi Gutmans f950a3724c - Maybe it's OK now? :) 2000-11-09 23:54:18 +00:00
Andi Gutmans 113a5bb8c2 - Undo the previous commit for fixing $obj = new foo(). 2000-11-09 23:43:21 +00:00
Andi Gutmans d9d4824cd3 - Commit experimental patch to fix the problem when doing $a = new foo()
and the constructor assigns $this by reference to other symbol table
  elements. Thanks to Daniel J. Rodriguez on this one.
2000-11-09 22:11:14 +00:00
Colin Viebrock ecaf64a362 oops, forgot to document it :) 2000-11-09 21:33:16 +00:00
Colin Viebrock 2a5f8a8906 some changes, and added 'r' flag which generates an RFC822 compatible date string. 2000-11-09 21:30:03 +00:00
Danny Heijl a46f36a564 - fix crash when using blob_in_file mode (danny). 2000-11-09 19:34:31 +00:00
Uwe Steinmann eaad937f84 - Some more comments
- Initial support to just include anchors into documents
2000-11-09 13:36:54 +00:00
Uwe Steinmann d82bade81c - Started support for XPath/XPtr (completely untested) 2000-11-09 08:42:20 +00:00
foobar ffc95d6125 Beutifying the output of configure a bit.
# I promise, this is the last commit for today. =)
2000-11-09 02:59:17 +00:00
foobar 781816998c Remove duplicate check for xpm support. 2000-11-09 02:31:56 +00:00
foobar 368054d223 Fix to get jpeg/xpm support everytime. 2000-11-09 02:29:15 +00:00
foobar 1f71f1f3c0 Remove duplicates (when curl-7.4.1 is used). 2000-11-09 02:11:45 +00:00
7eb6e8d551 ChangeLog update 2000-11-09 02:09:34 +00:00
foobar 443d289380 Fixed bug: #5460 2000-11-09 00:16:28 +00:00
Marc Pohl 4eece9b1bd add gzdeflate() and gzinflate() for handling of pure gzip-datastreams 2000-11-08 21:40:34 +00:00
Mathieu Kooiman 3e2fa2781a E_WARNING into E_ERROR, Last commit (today)! I PROMISE! :-) 2000-11-08 18:41:22 +00:00
Nikos Mavroyanopoulos f6a8f905b1 Added license 2000-11-08 16:16:49 +00:00
Mathieu Kooiman 63cdbbd56e Alert user if they're trying to use
ImageCreateFromString() with GD < 1.5..
Sorry, should've added this last commit.
2000-11-08 16:08:42 +00:00
Mathieu Kooiman 5e7041615a - Made gd extension build when using gd version < 1.5 2000-11-08 14:56:09 +00:00
Zeev Suraski 41d83c5d95 Add ability to find extensions by name 2000-11-08 14:25:42 +00:00
Zeev Suraski 905e41af5c Will work on a more thorough implementation for mysql_store_result() after 4.0.4 2000-11-08 08:27:27 +00:00
foobar 1afebc69c7 Make this compile with libxml2.2.7. 2000-11-08 02:17:36 +00:00
e4c95b17e6 ChangeLog update 2000-11-08 02:09:14 +00:00
64ef92eafb NEWS update 2000-11-08 02:09:11 +00:00
foobar 95eceee413 Cleaned up a bit. 2000-11-08 01:53:51 +00:00
foobar 3f85e944ab config.m4 2000-11-08 00:18:49 +00:00
Zeev Suraski c824ee09a0 Forgot to commit it... 2000-11-07 21:32:41 +00:00
Daniel Beulshausen 87d8e44c26 win32 sapi symbol export fixes 2000-11-07 21:13:26 +00:00
Zeev Suraski 9e40204f00 @- In CGI mode, $HTTP_SERVER_VARS now includes all of the environment variables
@  as well (Zeev)
2000-11-07 18:25:29 +00:00
Zeev Suraski 50e0d9d34b cookie_data may also be modified... 2000-11-07 18:12:06 +00:00
Stanislav Malyshev ef8fb2767b Enable to use mysql_use_result in query functions.
You may need this if you use real big queries.
@- Allow user to use mysql_use_result in mysql queries (Stas)
2000-11-07 15:46:15 +00:00
Stanislav Malyshev c9e39592b5 Andi says it should be zval_ptr_dtor 2000-11-07 15:06:43 +00:00
4be1fa5ea1 ChangeLog update 2000-11-07 02:09:17 +00:00
407ac966f8 NEWS update 2000-11-07 02:09:08 +00:00
Sascha Schumann 5360d78278 Kill a misleading warning which is intended for old code
which assumes sizeof(int) == sizeof(void *).
2000-11-06 23:40:48 +00:00
Sascha Schumann ae6314468f Use socklen_t for getsockopt 2000-11-06 23:38:15 +00:00
Sascha Schumann 79fd4ad841 zend_hash_find() treats this argument as const, but fails to declare
the function properly.
2000-11-06 23:36:15 +00:00
Sascha Schumann c5e776ec2d sizeof(size_t) != sizeof(int) on 64-bit platforms.
This also makes the API more consistent.
2000-11-06 23:35:33 +00:00
Derick Rethans e2bb93c575 - Added myself to the credits... 2000-11-06 22:53:11 +00:00
Chuck Hagenbuch 65150b8512 add a Crypt_HCEMD5 class. This implements the same algorithm as the perl
Crypt::HCE_MD5 package, and should be cross-compatible with it. It provides
a secret-key based encryption algorithm possibly suitable for those who
don't have mcrypt enabled.
2000-11-06 22:33:09 +00:00
David Hedbor 6f0014982d Noted that setting of multiple headers with the same name is fixed. 2000-11-06 22:12:11 +00:00
David Hedbor 61f2088846 (php_caudium_set_header): Allow for multiple headers with the same name. 2000-11-06 22:11:10 +00:00
David Hedbor 44ecf58519 (ImageCreateFromString) Added forgotten GDLS_FETCH() needed for ZTS. 2000-11-06 22:00:07 +00:00
Andrei Zmievski 65f37060db Fix bug #7667. 2000-11-06 19:41:30 +00:00
Stanislav Malyshev cde5c779dc And now the right fix - should add it still 2000-11-06 18:19:05 +00:00
Stanislav Malyshev 7f1dc85574 Serialize as reference only if it's a true reference 2000-11-06 18:09:51 +00:00
Zeev Suraski efd8117fd4 Fixed a bug in $argv and $argc not being properly defined in command-line mode
@- Fixed a bug that prevented $argv and $argc from being defined in the command
@  line version of PHP (Stas)
2000-11-06 09:55:53 +00:00
Stanislav Malyshev 24035faa29 I guess SG(request_info).argv0 and not !SG(request_info).argv0 was an intent, otherwise it doesn't make much sense. 2000-11-06 09:31:48 +00:00
Stanislav Malyshev dec089e39c Add support to ukrainian characters (by serhiy@society.kiev.ua) 2000-11-06 08:46:12 +00:00
Sebastian Bergmann c5ff85c8bc Fixed windows build. 2000-11-06 06:31:00 +00:00
248b5a32be ChangeLog update 2000-11-06 02:09:10 +00:00
2906e61a06 NEWS update 2000-11-06 02:09:07 +00:00
Sascha Schumann e7a632e950 Add apache_sub_req() 2000-11-06 01:46:28 +00:00
Rasmus Lerdorf 16ca32d057 Make sure these are initialized to NULL 2000-11-06 01:07:53 +00:00
John Donagher ee7821ea7d Bring phpcredits() up to date 2000-11-05 23:34:49 +00:00
Rasmus Lerdorf 5a58b723ec Remove apache2 sapi module in favour of Sascha's apach2filter 2000-11-05 17:41:03 +00:00
Rasmus Lerdorf 1f3273481e We need a space after 'dnl' to comment stuff out. Why not just delete
this stuff now?
2000-11-05 17:31:17 +00:00
Rasmus Lerdorf ed218bb6b4 dnldnl won't work 2000-11-05 17:29:04 +00:00
Sterling Hughes ea9ac669da Fix the other part... 2000-11-05 17:22:05 +00:00
Sterling Hughes f25ccb0a83 This should fix the garbage. 2000-11-05 17:14:16 +00:00
Stanislav Malyshev 41a2b59977 Fix crash from #7577 (torben@php.net) 2000-11-05 16:25:26 +00:00
Sascha Schumann a6a792ecdd Outcomment everything. Since this is an exact duplicate of apache/config.m4,
it might cause conflicts.
2000-11-05 15:59:58 +00:00
Sascha Schumann d381e0702c PHP_EXTENSION_DIR is defined in build-defs.h 2000-11-05 15:10:47 +00:00
Zeev Suraski 1f9ee4857b Fix the problem Sascha reported, about extension_dir
@- Fixed a bug that prevented a changed compile-time extension_dir from
@  affecting modules that were loaded via php.ini (Zeev)
2000-11-05 15:03:41 +00:00
29086bc027 ChangeLog update 2000-11-05 02:09:09 +00:00
Mathieu Kooiman d6e7b4fefa - ImageCreateFromString(): Fixed segfault that occured if an image was tried to be
generate while there was no support for such an image type.
2000-11-04 20:43:53 +00:00
Andi Gutmans e314da896f - Fix build 2000-11-04 17:15:00 +00:00
Thies C. Arntzen b80e71fdac fix #7573
closedir() now really close the directory - used to stay open 'cause the
default-directory resource was "remembered" for arg-less calls.
2000-11-04 14:58:50 +00:00
Zeev Suraski 47654fd021 Now make it work too (thanks for noticing that Andi :) 2000-11-04 10:45:31 +00:00
Zeev Suraski ffde875f70 Fix build 2000-11-04 10:36:13 +00:00
foobar 303fe604e9 Forgot to add one note. Plus some beutifying. 2000-11-04 06:25:13 +00:00
Rasmus Lerdorf c5a87b4fa3 Should be ok to use CC here 2000-11-04 02:42:10 +00:00
41c361dcbc ChangeLog update 2000-11-04 02:09:12 +00:00
f70f0909b6 NEWS update 2000-11-04 02:09:09 +00:00
Jesus M. Castagnetto cc73072804 Updated proto for highlight_file/highlight_string 2000-11-04 01:18:10 +00:00
foobar 6f398a247d Fixed incorrect logic. And NSLDAP does not have LDAP_OPT_MATCHED_DN. 2000-11-03 22:53:49 +00:00
foobar 1f00cff3ab Fixed ftp_mkdir(). It return the dirname passed to it in case of
braindead ftp server which doesn't put the real path into reply.
PR: 7216
2000-11-03 21:53:24 +00:00
Derick Rethans 848d353880 - Fixed gd by adding a define 2000-11-03 20:44:04 +00:00
Derick Rethans 0d04945bfa - Fixing Mathieu's indentation problems
# It does not build, undefined references to getmbi and skipheader
2000-11-03 20:31:36 +00:00
Joey Smith 90f2f64ca8 Include header file for phpi_get_le_gd() 2000-11-03 20:13:46 +00:00
Joey Smith 8e9967be00 Include header file for php_file_le_fopen() 2000-11-03 20:11:38 +00:00
Mathieu Kooiman f391eb7423 - Introduced ImageCreateFromString() function,
works for GIF/JPEG/PNG and WBMP ..
  (Note: This built with the latest snapshot I grabbed
   tonight; Derick seemed to have trouble though..)
@-Introduced ImageCreateFromString(), creates an image
@ stream out of eg a MySQL blob. (Mathieu)
2000-11-03 19:53:42 +00:00
foobar 3e8ac5d7f8 Fix build.
# next time: CHECK that things WORK before committing..
2000-11-03 16:30:55 +00:00
Sascha Schumann 0feb2a21e5 Add some additional checks
Submitted by: mookid@sigent.ru (Mikhail Zabaluev)
2000-11-03 12:00:49 +00:00
Sascha Schumann b4ce4e2634 Fix implementation of hash algorithm 2000-11-03 11:59:41 +00:00
Daniel Beulshausen c0904e1c9e install instructions for more webservers 2000-11-03 11:43:45 +00:00
Daniel Beulshausen 5e48df787a use argv[1] if it's given, thanks to Bob Denny <rdenny@dc3.com> 2000-11-03 09:55:54 +00:00
Ben Mansell b00ef1eb50 Added extra help with library issues, and some performance tuning tips 2000-11-03 09:49:25 +00:00
Andi Gutmans 1f03630846 - Add trailing \n? 2000-11-03 08:39:39 +00:00
Stig Venaas a5c75761c2 Fixed memory leak in array_diff and array_intersect, was introduced with
last change.
2000-11-03 07:20:35 +00:00
Zeev Suraski 6d0749a95b Fix msql_close(), pg_close() and sybase_close() (Sybase CT) 2000-11-03 02:46:49 +00:00
Zeev Suraski 313a459af3 Fix for bug #5571 (by mookid@sigent.ru) 2000-11-03 02:45:55 +00:00
8da331e6ab ChangeLog update 2000-11-03 02:09:09 +00:00
foobar 8ea486c58f fix configure.. 2000-11-03 01:56:58 +00:00
Zeev Suraski b20f8b39b9 Fixed mysql_close() - A bit more complicated than I originally thought 2000-11-03 01:56:47 +00:00
Sterling Hughes 76accf4806 Changed as per discussion with Sablotron folks.
@ Changed the sablot configuration file so that if you use any version of
@ Sablotron below 0.44 you must use Sablotron's built-in Expat libraries.
@ (Sterling)
2000-11-03 01:10:11 +00:00
Andi Gutmans 715ce15a6f *** empty log message *** 2000-11-03 00:57:05 +00:00
Zeev Suraski a43cd1438e Fix msql_close() 2000-11-03 00:52:54 +00:00
Andi Gutmans a3a0fe3797 - Fix dependency. 2000-11-03 00:52:20 +00:00
Zeev Suraski e560ecfa47 Fix pg_close() 2000-11-03 00:51:53 +00:00
Andi Gutmans 139d5c102b - Make the random generator work again. This patch seems to work. 2000-11-03 00:45:24 +00:00
Zeev Suraski 6451d58455 Fix mysql_close() 2000-11-03 00:41:29 +00:00
Zeev Suraski 471d070c94 Fix build 2000-11-03 00:38:33 +00:00
Zeev Suraski 4d3fc68f11 Add RESVAL macros 2000-11-03 00:35:12 +00:00
David Hedbor 1497e148f4 Use V_CHDIR_FILE instead of doing the job of that function myself and
added a define to disable the use of threads for debugging purposes.
@Support for the Caudium webserver (http://caudium.net/) added. It's based
@on the Roxen SAPI module. Many bugs have been identified and fixed. (David)
2000-11-03 00:29:05 +00:00
Sascha Schumann 51ec089429 Setting no_cache causes Expires: to be send, which is not what we want.
Also disable ETag. It does not serve any purpose for dynamic pages.

Finally, disable keep-alive connections again, since we don't know
the content-length for sure.
2000-11-03 00:11:42 +00:00
Andi Gutmans 6da2eaf600 - When mode is specified the flag is a don't care 2000-11-02 23:30:48 +00:00
Andi Gutmans 1956fb48d2 - Missed one of the php_checkuid() places 2000-11-02 23:19:48 +00:00
Zeev Suraski 3c775e6446 Update NEWS 2000-11-02 23:18:08 +00:00
Zeev Suraski 6053f2a118 Fix bug #7599 2000-11-02 23:17:55 +00:00
Andi Gutmans d0ec3df288 - Use CHECKUID_* #define's instead of cryptic numbers in php_checkuid()
- I did not test for validity of the actual php_checkuid() calls and there
- might be mistakes in the previous code.
2000-11-02 23:08:07 +00:00
Zeev Suraski e17df3a7bc Update to reflect the changes in the parsers/scanners 2000-11-02 23:05:32 +00:00
Chuck Hagenbuch 24343cd5c0 spelling. bad chuck. 2000-11-02 21:40:38 +00:00
Chuck Hagenbuch e6b6213619 always prepend Receieved: headers to avoid generating mail that looks like
spam, and remove a silly comment from the sendmail backend.
2000-11-02 20:20:39 +00:00
David Hedbor 2986b89e1d Now correctly detects Pike 7.0 and use the alternative code. It also sends the
number of written bytes to the done callback function.
2000-11-02 20:05:24 +00:00
Zeev Suraski 464a561bb0 Missed those 2000-11-02 19:31:21 +00:00
Zeev Suraski f1a9920bcf Maintain consistency 2000-11-02 19:27:55 +00:00
David Hedbor b06998a7d1 Added Caudium to credit line. 2000-11-02 19:07:15 +00:00
David Hedbor a878709db3 Changed contact information. 2000-11-02 18:56:42 +00:00
David Hedbor 838264de75 Added notice about Caudium websites. 2000-11-02 18:54:21 +00:00
David Hedbor 8aa6f6d55c Initial caudium support. 2000-11-02 18:53:47 +00:00
Andi Gutmans ce501c78a8 - Replace do_exit() with zend_do_exit().
- Problem reported by David Hedbor <david@hedbor.org>
2000-11-02 18:42:54 +00:00
Stanislav Malyshev 1884518cf4 Revert the patch - people don't like it 2000-11-02 18:24:43 +00:00
Sascha Schumann d26cb379c8 Add note 2000-11-02 17:18:21 +00:00
Sascha Schumann 32dcafc669 . 2000-11-02 17:07:19 +00:00
Stanislav Malyshev d949733c70 Fix issue with Sun CC not detecting readdir_r
# This was once fixed in the code, but not in the configure
2000-11-02 16:50:40 +00:00
Zeev Suraski 816f1f7903 - Fixed a bug that caused PHP not to properly flush its output buffer, if more
than one output buffer was used
2000-11-02 16:46:30 +00:00
Sascha Schumann a44361a769 Update. Someone should really write better docs. =) 2000-11-02 16:15:03 +00:00
Sascha Schumann 43ff395b65 Const'ify part of sapi_request_info.
query_string, post_data, path_translated, request_uri, auth_user,
auth_password and argv0 are modified, so they cannot become const.
2000-11-02 15:47:02 +00:00
Sascha Schumann 9866d899e9 Namespace protect mergesort (caused conflict on Darwin). 2000-11-02 15:32:52 +00:00
Sascha Schumann 3ac8e25812 Namespace protect dir_cmds and kill some warnings 2000-11-02 15:19:54 +00:00
Sascha Schumann 1f53d0203c Restrict php_admin_value to *.conf files. 2000-11-02 15:01:25 +00:00
Zeev Suraski a023f9280a - Fix Windows build
- Changed the Apache .dsp to expect the Apache source code files under php_build
2000-11-02 14:53:10 +00:00
Sterling Hughes 0b25301bce Das war nicht gut. 2000-11-02 14:39:16 +00:00
Zeev Suraski e8e3be00d5 Fix a few warnings 2000-11-02 14:18:34 +00:00
Zeev Suraski 18d1ecaa5e update NEWS 2000-11-02 12:14:49 +00:00
Zeev Suraski 8c4852c2cb Fix a nasty bug in the shutdown sequence of PHP under Apache. 2000-11-02 12:05:54 +00:00
Zeev Suraski 3dd6c2d96f Remove unnecessary variables 2000-11-02 11:33:34 +00:00
Zeev Suraski 4462bc2e2d explicit declaration here too - sigh, way too early in the morning 2000-11-02 10:28:17 +00:00
Zeev Suraski 94042d6848 oops 2000-11-02 10:26:03 +00:00
Zeev Suraski c42564f780 explicit declaration 2000-11-02 10:24:34 +00:00
f9e5c33803 ChangeLog update 2000-11-02 02:09:09 +00:00
foobar 648c141cbc Validators are happy now. 2000-11-01 22:53:42 +00:00
Adam Dickmeiss f0c0ea97a8 Updated for ZTS mode. 2000-11-01 22:10:55 +00:00
Andi Gutmans 91622ad7cb - Beautify 2000-11-01 19:55:13 +00:00
Sascha Schumann d9ba87c84c Our context's lifetime differs from the lifetime of a filter's context,
so don't set the filter's context in the INIT_CTX macro.
2000-11-01 19:26:57 +00:00
Sascha Schumann 87e88d5a33 Use Input filters for handling POST data 2000-11-01 19:19:46 +00:00
Andi Gutmans 6139a2c8ce - Define the different possible modes for readibility and use in the rest
- of PHP
2000-11-01 18:05:27 +00:00
Andi Gutmans 8907e17bde - In function declerations the opening { should be on a new line 2000-11-01 17:31:53 +00:00
Andi Gutmans b25b80c147 - Change some estrdup()'s to estrndup()'s 2000-11-01 14:48:00 +00:00
Andi Gutmans 0330643ea2 - Revert patch which seems to have caused the STOP mechanism not to work.
- I'm not quite sure why this should have caused harm even if not completey
- the right way of doing it.
2000-11-01 11:23:52 +00:00
foobar 2ad7083005 No more segfaults. 2000-11-01 05:05:33 +00:00
foobar d6d3f5e9b6 Add line of possible XBM support to the phpinfo() 2000-11-01 04:38:28 +00:00
foobar dfcd4c18e6 Fixed some compile warnings and removed useless code. 2000-11-01 02:30:37 +00:00
f90f30df60 ChangeLog update 2000-11-01 02:09:22 +00:00
Zeev Suraski 0ee12a6488 Fix Apache build 2000-10-31 18:28:04 +00:00
Zeev Suraski 8aecb3c984 mode_t should be an unsigned_int 2000-10-31 18:05:28 +00:00
Zeev Suraski 7ab46420be mode_t fixes 2000-10-31 18:05:19 +00:00
Hartmut Holzgraefe 00b8b66132 generalization of image handling in phpinfo 2000-10-31 17:21:52 +00:00
Stanislav Malyshev 3bc3677439 Fix -d functionality 2000-10-31 16:16:57 +00:00
Zeev Suraski 92d37f688e - Fix phpinfo()
- Fix non-thread-safe build
2000-10-31 16:06:46 +00:00
Zeev Suraski dfe57b01a2 Remove unnecessary code, fix phpinfo() 2000-10-31 16:06:30 +00:00
Zeev Suraski 9e2a591ac6 Require bison 1.28 2000-10-31 14:54:16 +00:00
Zeev Suraski fc466bebd8 Fix memory_limit build problem 2000-10-31 12:46:07 +00:00
Hartmut Holzgraefe 604876542a removed some bogus code 2000-10-31 11:32:05 +00:00
Hartmut Holzgraefe c420d653ee support for short comments was added to ext_skel proto files
theese will be used in proto comments in the source
and as <refpurpose> information in the XML docs
2000-10-31 11:30:11 +00:00
Jesus M. Castagnetto f589a3b587 cosmetic changes (added some "proto"s missing in the function documentations) 2000-10-31 06:33:07 +00:00
dc3f6eaf29 ChangeLog update 2000-10-31 02:09:10 +00:00
1b34b0bd89 NEWS update 2000-10-31 02:09:07 +00:00
foobar 4c2abe7df4 Both RETR and STOR have also 250 as possible return value 2000-10-31 00:30:37 +00:00
foobar 55ccb5a35b Fix the fix. 2000-10-31 00:00:26 +00:00
Zeev Suraski 78194a47b7 - Complete the move to the new INI parser. (Side effect: at last, people
can finally have spaces and tabs in their extension statements...)
2000-10-30 23:39:14 +00:00
Zeev Suraski 4171da016c Fix non-thread-safe Windows build 2000-10-30 23:37:50 +00:00
Zeev Suraski 9596255da8 Final touches on the INI parser 2000-10-30 23:19:48 +00:00
Sascha Schumann ea6985a225 PATH is not optional (we print that message, because php-config isn't in the
PATH).
2000-10-30 18:27:46 +00:00
Derick Rethans 2f5f83f518 - Added the two constants mentioned in bug #6097
# I did not test it, because I don't have access to an Adabase RDBMS
2000-10-30 18:00:58 +00:00
Stanislav Malyshev fad7092ff8 Update to use reference-serializer too 2000-10-30 17:18:39 +00:00
Stanislav Malyshev c31faf0bd9 Add support for serializing references.
@- Add support for serializing references (Stas)
# WDDX and shared memory functions not covered yet
2000-10-30 17:10:06 +00:00
Stanislav Malyshev 4b5eb2cf2c Fix crash in sscanf in error handler (#7533) 2000-10-30 16:44:01 +00:00
Stanislav Malyshev 702b510dc6 Don't try to work with negative timestamps
# It returns the same day as for 0, which is wrong
2000-10-30 16:13:03 +00:00
Stanislav Malyshev 1f7a3b3b11 Remove empty temp file on failed upload 2000-10-30 15:30:27 +00:00
Stanislav Malyshev 76ede5ce5c Another attempt to make it build 2000-10-30 15:27:32 +00:00
Sascha Schumann 622e66b31f LTLIBRARY_DEPENDENCIES might depend on variables defined in config_vars.mk,
so we force inclusion of that file before we use LTLIBRARY_DEPENDENCIES
in a rule.
2000-10-30 14:29:51 +00:00
Stanislav Malyshev 7eed2e5b01 Make "H*" work 2000-10-30 12:26:26 +00:00
Stanislav Malyshev 47a84052e5 Fix build
# At least, it compiles now...
2000-10-30 12:14:37 +00:00
Sascha Schumann 4d0992bb22 Remove --with-aolserver-src directive.
AOLserver 3.1 and up install the include directory as per suggestion.
2000-10-30 11:44:18 +00:00
283531c4e4 ChangeLog update 2000-10-30 02:09:09 +00:00
1e00d43dd6 NEWS update 2000-10-30 02:09:06 +00:00
Chris Vandomelen 7e8074731b Removed INI entry for read() function, made changes to read() so it will
take 4th parameter specifying whether to use the read() wrapper or the
system read() function, and modified the wrapper() so that it worked (mostly)
properly once again.
2000-10-30 01:09:15 +00:00
Zeev Suraski f52a59062d parse_ini_file() supports a new optional 2nd argument that instructs it
to divide the directives to arrays according to the sections in which they
reside
2000-10-29 23:34:33 +00:00
Zeev Suraski 60c0835470 Move browscap code to the new modular INI parser 2000-10-29 23:10:22 +00:00
Zeev Suraski 3c06816532 Fix leaks 2000-10-29 23:10:04 +00:00
Zeev Suraski 668b3e89f5 Forgot the @... 2000-10-29 22:45:46 +00:00
Zeev Suraski 4af433d627 Use the new INI parser for parse_ini_str()
- parse_ini_str() is now thread-safe, and supported under Windows (Zeev)
2000-10-29 22:42:01 +00:00
Zeev Suraski ab3beffad7 The new INI parser is showing some signs of life 2000-10-29 22:40:01 +00:00
Zeev Suraski d0fbddcc2b Fix a corruption bug, when erroneously allowing to send non-variables by reference (several
bug-db reports seem to originate in this bug)
2000-10-29 19:16:29 +00:00
Zeev Suraski 366c16e561 Fix build 2000-10-29 18:30:00 +00:00
Zeev Suraski f3243082a3 Forgot this one 2000-10-29 18:26:21 +00:00
Zeev Suraski 6b4c369164 Generalization work 2000-10-29 18:23:51 +00:00
Sascha Schumann d39c2cf0f1 POSTs work fine 2000-10-29 17:48:13 +00:00
Sascha Schumann b07276c3e2 Add standard license 2000-10-29 17:43:23 +00:00
Stanislav Malyshev ca07586e1e Allow module to proclaim compatibility with any Zend version 2000-10-29 16:25:16 +00:00
Sascha Schumann 009e5df030 This is actually user-visible. 2000-10-29 16:19:09 +00:00
Sascha Schumann af87dfe204 Unify handling of aborted connections 2000-10-29 16:14:27 +00:00
Sascha Schumann bed7034f92 Unify aborted connection handling 2000-10-29 16:02:40 +00:00
Sascha Schumann 27a8480028 Add/unify aborted connection handling 2000-10-29 16:01:02 +00:00
Sascha Schumann 13183ed5c3 Add php_handle_aborted_connection()
Call this from your SAPI module to signal an aborted connection.
2000-10-29 16:00:42 +00:00
Sascha Schumann c38005a4f1 New directive AddRequestBodyFilters
Currently it requires this patch:

http://schumann.cx/request-body-filters
2000-10-29 15:13:23 +00:00
Zeev Suraski e04fd648a6 Some more work on the INI parser/scanner 2000-10-29 15:13:20 +00:00
Sascha Schumann f01e3fbe56 Handle user aborts 2000-10-29 15:10:49 +00:00
Zeev Suraski 9041d4eedd Initial step in rewriting the INI parsing mechanism 2000-10-29 14:56:16 +00:00
Sascha Schumann 86b2d4fefe Add Request Body filters. This is a much nicer concept than
ap_get_req_body, since it is much more flexible and does not
need to buffer everything in memory (PHP still does..).
2000-10-29 14:52:15 +00:00
Zeev Suraski 7b0d92dd18 Unify the names of these last 3 files... 2000-10-29 14:35:34 +00:00
Zeev Suraski 19dad410ec Fix Windows build 2000-10-29 11:56:42 +00:00
Zeev Suraski 1fd09132c2 Initial steps to move the INI mechanism to the Zend engine 2000-10-29 11:38:26 +00:00
Thies C. Arntzen 825457ae64 update my email. 2000-10-29 09:14:55 +00:00
Stig Bakken fc4b704fca Test descriptions showed up blank, fixed. 2000-10-29 07:19:35 +00:00
foobar e76bafd648 Check also that the file isn't empty. 2000-10-29 04:36:33 +00:00
foobar 4a895b6919 @- Fixed conflict with OpenLDAP and Oracle 8.1.x (Jani)
# PR: 4257,4698,5527,6112,6650,7195
2000-10-29 04:10:07 +00:00
a400c594ba ChangeLog update 2000-10-29 01:09:07 +00:00
foobar ac7e22d3c4 Fix for bug #7416. ldap_set|get_option() are also in NSLDAP SDKs. 2000-10-28 19:22:46 +00:00
Stig Venaas 273422f277 Moving --with-openssl to global configure, want OpenSSL for not just snmp 2000-10-28 18:26:45 +00:00
Stanislav Malyshev 06de8e78cf Allow to send secure cookies 2000-10-28 17:13:28 +00:00
Andi Gutmans b74d02dbe4 - Fix from Sascha. It fixes errorneous inclusion of bz2 2000-10-28 10:48:32 +00:00
Zeev Suraski 3dc7fc54a0 - URL-opened files now store the HTTP response header in $http_response_header
- Some layout updates
2000-10-28 01:31:56 +00:00
d77aede9a9 ChangeLog update 2000-10-28 01:09:11 +00:00
f302028e0e NEWS update 2000-10-28 01:09:08 +00:00
Sascha Schumann d943274af7 POST handler for my ubercool new Apache 2.0 function ap_get_req_body. 2000-10-27 23:02:20 +00:00
foobar b45d265c54 Fixed PR: 6730. And it is mentioned also in RFC 959 to be this way. 2000-10-27 20:53:04 +00:00
foobar 11af318a62 Fixes PR: 7245 2000-10-27 20:47:36 +00:00
Frank M. Kromann d313ad8bf5 Making _php_math_longtobase() and _php_math_basetolong() callable from DLL and SO modules 2000-10-27 20:26:16 +00:00
Daniel Beulshausen e252d77d5f added "printer" extension, to access printers under win32 2000-10-27 19:27:21 +00:00
Sterling Hughes 70f262d0c5 New e-mail address. 2000-10-27 19:10:23 +00:00
Frank M. Kromann 02537bd2f2 Kill compiler warning. 2000-10-27 16:16:55 +00:00
Sascha Schumann ea7534a848 use puts instead of fprintf in log handler. no need for a format string. 2000-10-27 15:40:16 +00:00
Sascha Schumann 56ccd8701d Some information about this handler 2000-10-27 15:03:53 +00:00
Andrei Zmievski f136e5cf08 Added macros for object properties and class entry. 2000-10-27 14:13:03 +00:00
Andrei Zmievski d4cf62f86f @- Fixed array_rand() to shuffle results when the number of requested
@  elements is the same as the number of elements in the array. (Andrei)
2000-10-27 14:08:33 +00:00
Sascha Schumann b522397298 Looks like transient buckets are limited to 4096 bytes, so split up writes. 2000-10-27 13:30:41 +00:00
Sascha Schumann 93683d052b Add log message sapi handler.
Reenable pipelining requests. Looks like the problems are caused by the
cache, not pipelining.
2000-10-27 13:19:23 +00:00
Sascha Schumann 50500e680b Apache 2.0 does some funky internal caching which works for static
content, but fails miserably in our context.
2000-10-27 12:52:38 +00:00
Sascha Schumann 4f97ff0096 speling 2000-10-27 12:37:05 +00:00
Hartmut Holzgraefe 6b435870de type fixes to make compilers happy 2000-10-27 10:48:07 +00:00
Sascha Schumann 703a0c1159 Add some comments 2000-10-27 10:41:24 +00:00
Sascha Schumann 6ff371d9f7 Leave initializing of auth_(user|password) to php_handle_auth_data(). 2000-10-27 10:31:10 +00:00
Sascha Schumann 3b02d88b8e Initialize auth_(user|password) to NULL, if data was not suitable. 2000-10-27 10:28:57 +00:00
Sam Ruby 33c8f50534 Allow strings to be passed to methods expecting primitive types. 2000-10-27 10:27:19 +00:00
Sascha Schumann b725c6eef3 The CGI RFC allows servers to pass Authorization data to the script,
if the server did not use the information contained therein.

See 6.1.5 and 11.2 of the proposed spec.
2000-10-27 10:26:57 +00:00
Sascha Schumann 055efb70c3 Handle cookies and make use of php_handle_auth_data. 2000-10-27 10:19:40 +00:00
Sascha Schumann e6dd64e96e Use php_handle_auth_data 2000-10-27 10:19:06 +00:00
Sascha Schumann 85b52234e4 Utility function for sapi modules (it is not in SAPI.c, because it
relies on php_base64_encode).
2000-10-27 10:16:54 +00:00
Sascha Schumann 01b4c07747 bunch of changes 2000-10-27 09:47:28 +00:00
Sascha Schumann 9b2a1110a6 Allow users to specify whether they want to replace existing header fields. 2000-10-27 09:43:06 +00:00
Uwe Steinmann e577215736 - added four functions to do fulltext query 2000-10-27 09:29:40 +00:00
Andi Gutmans 2946f87f00 - Fix new -m on Windows 2000-10-26 23:50:17 +00:00
Mathieu Kooiman 717e934a88 Added -m (Shows list of modules) to commandline.. 2000-10-26 22:31:06 +00:00
Sascha Schumann 3a263dcd99 Handle special queries.
Apache's default handler does not seem to handle flushes correctly yet.
One more project..
2000-10-26 21:23:20 +00:00
Sascha Schumann f367b3dfc8 Move some code to php_handle_special_queries(). 2000-10-26 21:16:12 +00:00
Stig Venaas b3ab7b8948 Removed a warning in getaddrinfo check, not really needed 2000-10-26 20:39:57 +00:00
Daniel Beulshausen 6f0e47f690 it won't work otherwise
# http://support.microsoft.com/support/kb/articles/Q115/8/57.asp
2000-10-26 18:51:12 +00:00
Sascha Schumann 5583203e91 Move some initialization code from php_execute_script() to
php_request_startup() where it should be. AFAICT, it does not
cause any problems, but please it test it with your favorite SAPI
module.
2000-10-26 18:32:38 +00:00
Daniel Beulshausen 4aab269181 added dba extension for win32, currently the dsp is
only configured with db3, adding other configurations
shouldn't be hard
2000-10-26 18:29:10 +00:00
Daniel Beulshausen f610c44190 update 2000-10-26 18:23:51 +00:00
Sascha Schumann 2b060b3bf3 Add sapi_add_header_ex, which lets you specify whether you want
to add or replace a header.
2000-10-26 18:18:21 +00:00
Daniel Beulshausen 52e45f514b use V_RENAME makro instead 2000-10-26 18:17:45 +00:00
Sascha Schumann 00d1d1a347 Protect us from Apache 2.0's pcre-posix stuff 2000-10-26 18:15:56 +00:00
Sascha Schumann 39387c7781 Remove second_arg_force_ref, defined in Zend
Submitted by: Bill Stoddard
2000-10-26 18:15:18 +00:00
Sascha Schumann 2517250b35 The type has changed to size_t. 2000-10-26 18:10:57 +00:00
Sascha Schumann 4f757a3af0 Add session_adapt_url(). 2000-10-26 18:10:43 +00:00
Sascha Schumann c57830c1d2 Reinstantiate single quotes properly.
Add url_adapt_single_url() API which modifies a single URL. Might be used
to modify the Location: URL.
2000-10-26 18:05:47 +00:00
Sascha Schumann 8ef0d01baf Make the API more leaner (sp?) and get rid of *copy*. 2000-10-26 18:01:51 +00:00
Sascha Schumann 5b7ff6f72a Provide name of libtool archive.
Apache 2.0's apxs prefers that.
2000-10-26 18:00:30 +00:00
Sascha Schumann 89aa77d306 Temporary fix for mac os x stuff.
It lets me build/run a DSO on darwin, but according to Fred Sanchez, the
libtool 1.3.5 way is wrong..
2000-10-26 17:58:11 +00:00
Sascha Schumann d504de0f78 An Apache 2.0 Filter for PHP, completely from scratch.
TODO:

	POST, cookies, "flushing", finalizing config framework (it works),
	http auth, PHP Hooks (apache_sub_req is there).

Note that this code depends on some other commits which are pending.
2000-10-26 17:55:05 +00:00
Andrei Zmievski 26f5fe6375 Fix dba after resources patch. 2000-10-26 17:38:01 +00:00
Andrei Zmievski 27a1c12ad8 session_unset() now cleans up $HTTP_SESSION_VARS as well. 2000-10-26 17:37:47 +00:00
Andi Gutmans fd7284a665 - Add V_RENAME() by "Daniel Beulshausen" <daniel@php4win.de>.
- It is untested and all places which use rename() in PHP should now use
- V_RENAME().
2000-10-26 05:21:52 +00:00
Nikos Mavroyanopoulos e5b0945e4c Corrected some checks for errors. 2000-10-25 18:27:55 +00:00
Nikos Mavroyanopoulos 93232c7064 Added keygen_s2k function. Function which generates keys from passwords. 2000-10-25 18:09:23 +00:00
Andrei Zmievski f1dcb32c9f Use zend_register_list_destructors_ex() instead. 2000-10-25 17:44:02 +00:00
Andrei Zmievski 84681b9c81 Remove the patch to register_list_destructors(). 2000-10-25 17:41:34 +00:00
Andrei Zmievski a35bf41670 Added array_sum() function. 2000-10-25 17:40:11 +00:00
foobar 1026416153 gdImageWBMP has some bug in it. Using the php-internal one works. 2000-10-25 17:35:29 +00:00
Chuck Hagenbuch 383a5e7d49 Install the new Mail classes. 2000-10-25 17:23:34 +00:00
Chuck Hagenbuch 167c0a0277 add Mail:: interface and supporting classes. 2000-10-25 17:16:08 +00:00
Sascha Schumann 2d7860edc7 __USE_GNU shall not be defined by application 2000-10-23 14:04:54 +00:00
Daniel Beulshausen 6911ee5b99 it's n.a. on win32 :) 2000-10-23 13:56:22 +00:00
Stanislav Malyshev 48e5d3189f Make zlib compile again 2000-10-23 13:19:07 +00:00
Andrei Zmievski e91a524490 Cleaned up. 2000-10-23 13:15:48 +00:00
Alexander Feldman 7c11cfaf03 Fixed a bug in session.c. If the user calls session_module_name with a
parameter, then the mod_data pointer is initialized to NULL and then
php_session_save_current_state did not check this value before referencing
the pointer. Added a check in php_session_save_current_state.
2000-10-23 13:10:01 +00:00
Hartmut Holzgraefe 86c0d81253 have you ever tried to run the regression tests with error_reporting=E_ALL ?
now it will run smoothly without all theese 'undefined ...' warnings
2000-10-23 07:40:05 +00:00
Hartmut Holzgraefe b17451635d added a regression test skeleton file
plus a partintro in xml documentation template
2000-10-23 07:31:31 +00:00
Andrei Zmievski fa8452bbb2 Fix bug #7397 2000-10-23 02:01:19 +00:00
4fa1a4b468 ChangeLog update 2000-10-23 01:09:12 +00:00
def5cb5332 NEWS update 2000-10-23 01:09:09 +00:00
Rasmus Lerdorf bccdaff6d1 Move server_filter to an extension-specific global 2000-10-23 00:52:11 +00:00
Frank M. Kromann 1bf216ca57 Adding textlimit and textsize parameters to MSSQL sections 2000-10-23 00:45:23 +00:00
Chris Vandomelen 0e705a5f60 Added new INI entries to default php.ini files. 2000-10-22 23:49:57 +00:00
Chris Vandomelen b57f9eb541 Added ini entry for choosing whether to use the read() wrapper or directly
calling the read() system call.
# Some people were commenting about "oddities" in the wrapper that I hadn't
# noticed before, though I've used it in many places before now..
2000-10-22 23:43:48 +00:00
Frank M. Kromann dbdfbd9e0c Adding iisfunc to modules workspace 2000-10-22 23:15:28 +00:00
Rasmus Lerdorf 32b10882e5 Need a global server filter for the Apache 2.0 module 2000-10-22 19:50:05 +00:00
Thies C. Arntzen 248d8527fd @- OCIBindByName() now does better parameter-checking. (Thies) 2000-10-22 19:33:59 +00:00
foobar 7ef3e414e2 Makes curl extension compile again plus some typo fixes. 2000-10-22 17:29:33 +00:00
Rasmus Lerdorf 3c92f6bb50 Output function now passes the data onto the next filter in the chain
Clean up some variables - bb = bucket brigade, b = bucket
2000-10-22 16:56:08 +00:00
Rasmus Lerdorf 8f494c2ad0 Code to flatten Apache 2.0 bucket brigades 2000-10-22 16:03:53 +00:00
Sascha Schumann 61cf1f34a5 We don't need to store NUL of the key which simplifies the lookup
significantly.
2000-10-22 14:42:55 +00:00
Sascha Schumann f69a4a431a Fix php://* being handled by the ftp handler 2000-10-22 14:41:02 +00:00
Rasmus Lerdorf 69d704622d Woops, get rid of some crap 2000-10-22 14:05:29 +00:00
Rasmus Lerdorf 02f599ead5 The start of an Apache 2.0 module 2000-10-22 14:01:18 +00:00
Daniel Beulshausen 667e96f2c8 added reg. files for the pws, thanks to phil 2000-10-22 13:50:42 +00:00
Daniel Beulshausen 7883ddaf51 i'll place the reg file in the win32 folder
cause it doesn't really fit in this folder
2000-10-22 13:48:43 +00:00
Stig Venaas 5741816315 Corrected prototype comments for ldap_get_option and ldap_set_option 2000-10-22 11:25:47 +00:00
Stig Venaas e8c7fd7f5f Fixed array_type_data_compare(). I want strings to always differ from
numbers, but not say 7 and 7.0 to differ.
2000-10-22 11:18:21 +00:00
Chris Vandomelen 989d471643 Hopefully made some compile fixes for Solaris ("sun" is an already defined
symbol on Solaris.. s_un isn't...), and corrected bugs with checking for a
string by checking if Z_STRVAL_PP(ptr) == NULL instead of
Z_STRLEN_PP == 0, causing segfaults when uninitialized values were passed
into certain functions.
@- Attempted to make compile fixes for Solaris in ext/sockets/sockets.c (Chris Vandomelen)
# OK, so I have a tendency to make lots and lots of bug fixes in big spurts..
2000-10-22 07:54:49 +00:00
Chris Vandomelen 4f1a8a763a Oops, forgot to remove those .. thought I had.. 2000-10-22 06:46:43 +00:00
Chris Vandomelen 0646a49386 Corrected some bugs dealing with compile failures (should now compile
on most varieties of Linux, and should hopefully fix at least 3 of the
compile errors that were discovered). Also modified read() slightly
to take an optional parameter as to whether the data was binary or
text so it wouldn't stop reading on a newline or null byte received.
@- Made read() binary-safe in sockets.c (Chris Vandomelen)
@- Attempted fixing some compile failures (Chris Vandomelen)
# Hopefully someone will attempt to compile this on other systems, I
# have no access to other platforms to compile it on ....
2000-10-22 06:45:03 +00:00
6ac8281cf4 ChangeLog update 2000-10-22 01:09:11 +00:00
6cd1273c43 NEWS update 2000-10-22 01:09:08 +00:00
Daniel Beulshausen 1d582b8829 added missing def. 2000-10-21 21:17:31 +00:00
Andi Gutmans 4d676fe9d8 - including php.h automatically includes the PHP config file. 2000-10-21 19:18:55 +00:00
Stig Venaas 4edb210028 Made array_unique use array_type_data_compare instead of array_data_compare 2000-10-21 18:12:30 +00:00
Stig Venaas 508d1993ed Added array_type_data_compare which is like array_data_compare but
compares type first. Also rewrote array_intersect and array_diff,
so that the order is not changed.
@- Made array_intersect and array_diff not alter order (Stig Venaas)
2000-10-21 17:48:11 +00:00
Daniel Beulshausen a953b5ae4d i'm sure this should be ibase_query :) 2000-10-21 17:38:08 +00:00
Daniel Beulshausen bef776742c i can find no php_config.h on win32 :) 2000-10-21 17:19:23 +00:00
Sascha Schumann c10bf6d129 Save url_scanner_ex.c and don't require re2c to be installed on
the release/snapshot machine.
2000-10-21 17:06:05 +00:00
Daniel Beulshausen 9224f8e211 made yaz compile under windows 2000-10-21 14:18:28 +00:00
Rasmus Lerdorf d12c4de6ba Fix annoying $withval interaction in GD configure stuff 2000-10-21 12:03:52 +00:00
Rasmus Lerdorf 04f0f0b12c Gremlins? 2000-10-21 12:03:09 +00:00
Andreas Karajannis 7d3b7d7cb2 Config Patch for DBMaker 2000-10-21 11:11:11 +00:00
Daniel Beulshausen 218c2fa3ae added bz2 and removed ZendTS (not really nedded here) 2000-10-21 10:43:17 +00:00
Daniel Beulshausen 6337c12473 make libmysql compile under win 2000-10-21 10:14:09 +00:00
Sebastian Bergmann 8f280b2656 Removed files from Win32 workspace that were removed in libmysql 3.23 2000-10-21 06:55:08 +00:00
Nikos Mavroyanopoulos 84bcbe7055 more news 2000-10-21 05:41:42 +00:00
15d05bbce3 ChangeLog update 2000-10-21 01:09:11 +00:00
74ce674d27 NEWS update 2000-10-21 01:09:08 +00:00
foobar c663980808 Now checks that the library really exists even if path is specified as /usr
PR: 7358
2000-10-21 00:35:10 +00:00
Sascha Schumann 456ed7ae23 test commit 2000-10-20 23:59:42 +00:00
Sascha Schumann 836df2f798 Parse quoted boundary correctly 2000-10-20 23:40:07 +00:00
Sascha Schumann 8fe7cf26fc Add explicit format string 2000-10-20 23:39:16 +00:00
MySQL Team 625fde5090 Mention the ext/mysql/libmysql upgrade in NEWS. 2000-10-20 22:53:31 +00:00
MySQL Team a2dbb10eb1 Update libmysql to 3.23 version. No major changes visible to the user - mostly
bug fixes and other maintenance-oriented changes.
2000-10-20 22:26:48 +00:00
Nikos Mavroyanopoulos ebaf484830 updated for the new sqlcli 2000-10-20 21:01:31 +00:00
Frank M. Kromann 4682a3fe95 Fixing bug #6000
Return the full content for datetime colums

Make the same fix for smalldatetime
2000-10-20 20:58:57 +00:00
Frank M. Kromann 2c874f745d Fixing bug #6000
Return the full content for datetime colums
2000-10-20 20:49:35 +00:00
Stig Venaas 094d01148a Made ldap_connect() accept URL in host parameter when using OpenLDAP 2.x.
@- Made ldap_connect() accept URL in host parameter when using OpenLDAP
@  2.x. To use SSL, use ldaps://host/ as URL. (Stig Venaas)
2000-10-20 20:22:59 +00:00
Frank M. Kromann a2cb42039f Fixing bug in mssql_fetch_object() and mssql_close() 2000-10-20 19:55:03 +00:00
Frank M. Kromann 222d004714 Changing datatype to remove compiler warning 2000-10-20 19:10:27 +00:00
Frank M. Kromann 878e348ff9 Adding type cast to remove compiler warning 2000-10-20 19:08:59 +00:00
Andrei Zmievski dadb140e2f - Fixed a bug in zend_rsrc_list_get_rsrc_type()
- Switched register_list_destructors() to use
  zend_register_list_destructors_ex() instead
2000-10-20 18:26:15 +00:00
Andrei Zmievski 7b4983c8f8 Mega-patch to get better resource information for modules.
* Fixed a bug in zend_rsrc_list_get_rsrc_type()
  * Switched register_list_destructors() to use
    zend_register_list_destructors_ex() instead
  * Updated all relevant modules to provide the resource type name
    to register_list_destructors() call
  * Updated var_dump() to output resource type name instead of number

@- Made resource type names visible, e.g. var_dump() and
@  get_resource_type() display "file" for file resources. (Andrei)
2000-10-20 18:25:16 +00:00
Monte Ohrt a0cfab65ea Changed array_avg() to array_mean() 2000-10-20 15:53:16 +00:00
Monte Ohrt 07d781be66 added array_sum() and array_avg() to TODO list 2000-10-20 15:40:26 +00:00
Andi Gutmans 6b6b6cd940 - Should lessen confusion 2000-10-20 09:21:49 +00:00
Sterling Hughes 6b8faeb1f2 Fix CURLOPT_REFERER.
@ Added the curl_getinfo() function to find out information about a CURL
transfer.  This function requires cURL 4.0 or above. (Sterling)

@ Added the CURLOPT_KRB4, CURLOPT_INTERFACE, CURLOPT_QUOTE,
CURLOPT_POSTQUOTE, CURLOPT_QUOTE and CURLOPT_HTTPPROXYTUNNELL options.
(Sterling)
2000-10-20 04:57:14 +00:00
foobar d485e7fc29 Regenerate url_scanner_ex.c (always) without '#line' directives for
releases and snapshots. PR: 7154, 7263, 7289
# Sascha: Is this allright?
2000-10-20 01:58:00 +00:00
287fc71ee2 ChangeLog update 2000-10-20 01:09:10 +00:00
2288607fc5 NEWS update 2000-10-20 01:09:07 +00:00
Derick Rethans 6cfcf6e010 - Removed the shm_* aliases
@- Removed the shm_* aliases, only the smhop_* function wiil be
@  supported (Derick)
#I'll change the NEWS file as soon as it has been rebuild
2000-10-19 23:14:51 +00:00
Derick Rethans 2c05a539e5 - Renamed the shm_ to shmop_ and created aliases for the old shm_
functions
@- Renamed the shm_* functions to shmop_* and added aliases for the
@  old functions (Derick)
2000-10-19 22:50:41 +00:00
Sascha Schumann 1d9acd8337 Hack for #7262, not fixed yet 2000-10-19 17:40:56 +00:00
Joey Smith 78493a1b03 Use sybct for INI values. 2000-10-19 17:03:25 +00:00
Joey Smith 52fc5f0cd3 Fix compiler warnings. 2000-10-19 16:10:41 +00:00
Joey Smith dc44e06eeb Fix #7338. 2000-10-19 16:09:30 +00:00
Joey Smith a57ea792c6 Close bug #7325. Patches by djm@web.us.uu.net. 2000-10-19 15:05:44 +00:00
Sascha Schumann 57dcb93324 Remove left over ext_skel comment 2000-10-19 14:34:03 +00:00
Stig Venaas 5fc85205d9 Check that AF_INET6 is defined before using IPv6 2000-10-19 12:18:02 +00:00
Rui Hirokawa e8967fdc58 fixed a mistake. should be . 2000-10-19 12:10:59 +00:00
Andi Gutmans c13cfa040d - Constant expressions which are used multiple times need to be copy_ctored 2000-10-19 09:36:53 +00:00
Chuck Hagenbuch f9606d82fa add an optional parameter to imap_sort to specify a search program that
messages must match to be included in the sorted list.
2000-10-19 01:32:50 +00:00
ed9f9b3cd7 ChangeLog update 2000-10-19 01:09:09 +00:00
Rui Hirokawa 6eb45b5964 modified the configure scripts to make shared extension. 2000-10-18 22:17:41 +00:00
Andi Gutmans a9655b77ab - Fix whitespace 2000-10-18 20:17:18 +00:00
Andi Gutmans 928da71046 - Try #2. Wasn't allowed to delete in the previous manner because we were
in the middle of an llist_apply()
2000-10-18 20:15:53 +00:00
Sascha Schumann ffc6e72604 Add explicit conversion from 'void *', otherwise ANSI C++ compilers
will break out.
2000-10-18 19:53:43 +00:00
Andi Gutmans a953f6bc5b - Fix crash 2000-10-18 19:48:17 +00:00
Sascha Schumann 9f71179ca9 Back out circular references protection patch.
This causes problems with serializing regular variables and object
properties.

We need a smarter way to tell whether we have serialized one node
already.

PR: #7291, #7294
2000-10-18 18:32:32 +00:00
Andrew Skalski 23defd97e9 fixed logic error in the get parameters stage of mcal_list_alarms 2000-10-18 14:24:20 +00:00
foobar 7a54e0b10c Fixed crash (bus error) in readdir() and session cleanup when compiled
with Sun CC.
2000-10-18 14:14:14 +00:00
Stig Venaas 33d15279ac Removed some zval_dtor calls. There were two more than needed, and I had
just added two more...
2000-10-18 13:41:42 +00:00
Stig Venaas afdf0e759f Added some missing zval_dtor calls in php_fsockopen() 2000-10-18 13:21:08 +00:00
foobar adb12b50b5 url_rewriter.tags needs to have " around the parameter to work. 2000-10-18 12:35:53 +00:00
Stig Venaas 2da9a94d38 Added destruction of return value parameter, and using ZVAL_LONG and
ZVAL_STRING to set return value in ldap_get_option.
2000-10-18 07:47:51 +00:00
Ron Chmara d47e48329b As per andi, similar names are for legacy reasons only. 2000-10-18 07:34:56 +00:00
Nikos Mavroyanopoulos 2ecce2dc35 corrected authors notice 2000-10-18 07:25:26 +00:00
Ron Chmara aa203477bc Updated naming standards as per 9/12 dev/doc discussion. 2000-10-18 03:00:07 +00:00
f85a4a7325 ChangeLog update 2000-10-18 01:09:10 +00:00
7cb8ad4ea3 NEWS update 2000-10-18 01:09:07 +00:00
Monte Ohrt 8fbf6ca7c5 update for Date_Calc install 2000-10-17 20:41:28 +00:00
Nikos Mavroyanopoulos 5386c05cd1 Added the mhash HMAC functionality. Now the mhash function can use
keyed hash by added the key as an extra parameter to the function.
2000-10-17 19:43:49 +00:00
Andi Gutmans 610edbc7de - Fix copy&paste bug 2000-10-17 18:25:10 +00:00
Zeev Suraski 9e5ef06ceb Fix warning 2000-10-17 18:13:35 +00:00
Zeev Suraski 98bbb11780 Fix a crash in CGI mode, in case no file is provided 2000-10-17 18:12:31 +00:00
Jouni Ahto 68b899ce26 (ibase_execute) - Oops, trying to free a little bit too much. Maybe fixes
#6721, #7117, #7278.

# Shouldn't have 6 versions of interbase.c lying around. Can't always
# remember which versions were tested, which ones committed and which ones
# actually in CVS... :(
2000-10-17 17:46:14 +00:00
Chuck Hagenbuch 13fa52b881 spaces to tabs. do we have a standard on this? 2000-10-17 17:31:37 +00:00
Chuck Hagenbuch e058cb0648 fix imap_fetchstructure(). msgindex is not valid if we're using FT_UID;
always use Z_LVAL_PP(msgno) in the actual c-client function call.
2000-10-17 16:11:26 +00:00
Stig Venaas ffbd2367e7 Added ldap_get_option() and ldap_set_option() functions
@- Added ldap_get_option() and ldap_set_option() functions (Stig Venaas)
2000-10-17 16:06:04 +00:00
Chuck Hagenbuch 9e693657d9 replace fixed-size buffers for username and password with dynamically
allocated strings in the MCAL extension.
2000-10-17 15:52:04 +00:00
Stig Venaas 0b59e4b821 Removed some redundant convert_to_*_ex() calls. Edited some whitespace. 2000-10-17 15:51:04 +00:00
foobar 142a32b437 cvs commit message disappeared. 2000-10-17 15:45:48 +00:00
foobar 6e09d7cb53 *** empty log message *** 2000-10-17 15:42:05 +00:00
Andreas Karajannis e8861e6d20 Added support for SAP DB 2000-10-17 15:23:18 +00:00
Sascha Schumann d95bc9b3eb Initialize tags properly.
Submitted by: Andreas Karajannis <Andreas.Karajannis@gmd.de>
2000-10-17 14:17:21 +00:00
Sascha Schumann 2d24f03033 Back out ws changes 2000-10-17 03:02:47 +00:00
Sascha Schumann c27ef11305 . 2000-10-17 02:57:26 +00:00
Sascha Schumann 7c0ba95806 fix indentation 2000-10-17 02:50:15 +00:00
8cdff379d6 ChangeLog update 2000-10-17 01:09:07 +00:00
Rasmus Lerdorf b3fb8a6e97 Aha, Sascha made a mistake! ;)
Make this thing compile again without trans-sid
2000-10-16 22:12:28 +00:00
Daniel Beulshausen 1f245a6f73 make compile again 2000-10-16 20:08:27 +00:00
Sascha Schumann 1c85ad029b Enable users to set the HTML tags to rewrite
through a configuration directive
2000-10-16 17:25:36 +00:00
Daniel Beulshausen 8f5e25598a include php.h to have VIRTUAL_DIR defined this
should fix bugs where the ttf functions won't
find the font in the actual working dir
# like under windows :)
2000-10-16 13:55:47 +00:00
Rui Hirokawa 4de105ae4a added a option to use the truetype string handling function in gd.\n it is useful for japanese because the truetype string function in gd supports some japanese encodings. 2000-10-16 13:50:30 +00:00
Daniel Beulshausen 4086197d95 fixes bug 7055 & 7235 2000-10-16 10:35:43 +00:00
9c1097c4db ChangeLog update 2000-10-16 01:09:10 +00:00
6fd1c9a929 NEWS update 2000-10-16 01:09:07 +00:00
foobar d282abf2df Changed to look also for liblber.so (sometimes there are only shared libs)
Fixes bug 6072.
2000-10-15 22:53:43 +00:00
Andi Gutmans 54754242da - Increase op_array size faster and make eralloc() it in the end to save
memory.
2000-10-15 19:52:01 +00:00
David Eriksson 5d98e49cbb Added Satellite to list of extensions
@- The Satellite CORBA client extension is ready for use (eriksson@php.net)
2000-10-15 17:30:39 +00:00
David Eriksson f6b66196e1 Updated build instructions, changed E_ERRORs to E_WARNINGs 2000-10-15 17:27:29 +00:00
Stig Bakken d004ea17c3 PEAR DB: added DB_ERROR_VALUE_COUNT_ON_ROW 2000-10-15 09:02:54 +00:00
Stig Bakken be60fcb11a PEAR DB: added DB_ERROR_NOT_LOCKED, gave DB_common::raiseError an optional
"nativecode" parameter.
2000-10-15 02:22:25 +00:00
bc422640d7 ChangeLog update 2000-10-15 01:09:17 +00:00
0892ae5b25 NEWS update 2000-10-15 01:09:08 +00:00
foobar 83b3818e67 Fix the fix as Sascha suggested. 2000-10-15 00:58:29 +00:00
Marko Karppinen cd7dae0676 We don't support FreeType 2 - let's stop pretending we do 2000-10-14 23:04:26 +00:00
foobar 61a71738ae Missed this from last commit. 2000-10-14 22:53:42 +00:00
foobar e6d03e7a3e config.m4 2000-10-14 22:48:38 +00:00
foobar 5db1090dff Fix to #7162. 2000-10-14 22:13:18 +00:00
Andi Gutmans 154052ff15 - Add another patch from Sterling. 2000-10-14 19:48:53 +00:00
Andi Gutmans 5c6593b505 - Preliminary commit of Sterlings get_defined_functions()/get_defined_vars
functions
2000-10-14 15:52:24 +00:00
Rasmus Lerdorf c3026223f7 This appears to be the correct fix to me.
@ Fix memory leak in x-httpd-source mode (Jason Greene)
2000-10-14 05:06:16 +00:00
beb42300e1 ChangeLog update 2000-10-14 01:09:18 +00:00
Andi Gutmans b8cadf21db - Only run startup() if ZEND_EXTENSIONS is defined to 1.
This fixes a link error on platforms which don't support libdl
2000-10-14 00:16:46 +00:00
Daniel Beulshausen c6e0cef254 trivial output change
# someone urged me too
2000-10-13 19:08:05 +00:00
Zeev Suraski ce51b94461 Fix php_value issue 2000-10-13 17:07:09 +00:00
Andi Gutmans d7969026b3 *** empty log message *** 2000-10-13 16:24:42 +00:00
Andi Gutmans bc37c9b1cd - Make increment of "" become "1" 2000-10-13 16:24:00 +00:00
Hartmut Holzgraefe 545ae277bc post handler registration done right
(never use emalloc in an extension MINIT function)
2000-10-13 12:13:35 +00:00
Hartmut Holzgraefe 6d5f1d97f8 now it works for me as CGI and APXS, with or without --enable-debug ... 2000-10-13 10:04:17 +00:00
Daniel Beulshausen afef79762d step to 4.0.4-dev 2000-10-13 09:29:49 +00:00
Daniel Beulshausen 6fb51171c8 compile fixes & update of win32 dsp 2000-10-13 09:13:01 +00:00
38ad62e6c7 ChangeLog update 2000-10-13 01:09:07 +00:00
Hartmut Holzgraefe cae27179ce fopen wrappers cleanup
- comfiguration is now done by an ini parameter
    instead of a compile time option
  - the implementations of the three standard wrappers
    now live in seperate files in ext/standard
  - the compiler is happy again, no more warnings
2000-10-13 00:09:31 +00:00
Sascha Schumann e07e515a1b Ignore trailing slashes 2000-10-12 23:17:21 +00:00
Andi Gutmans e91c188e85 - Fix memory leak. 2000-10-12 19:58:20 +00:00
Chuck Hagenbuch 9bd721eb10 fix make install for PEAR. (bug 7109) 2000-10-12 14:02:26 +00:00
Stanislav Malyshev d82c344869 I have a dream... 2000-10-12 09:20:29 +00:00
Hartmut Holzgraefe a57282df4b forgot this one yesterday, fdfdata.[ch] is no more ... 2000-10-12 06:32:10 +00:00
Sascha Schumann 3ee228371d Let strtr() use smart_str to reduce complexity 2000-10-12 01:26:26 +00:00
4166063897 ChangeLog update 2000-10-12 01:09:10 +00:00
8e4fe0acf9 NEWS update 2000-10-12 01:09:07 +00:00
Sascha Schumann 174253123e Rewrite php_str_to_str using the smart_str API.
This removes much complexity from the function.

Speed is improved by pre-allocating memory instead of reallocating
the buffer each time the pattern is found.
2000-10-12 00:50:28 +00:00
Sascha Schumann 82d199b639 Move structure definition into its own file, so that public header
files don't need to include the complete source code.
2000-10-12 00:48:12 +00:00
Hartmut Holzgraefe 5a48521049 added generalized SMTP code todo 2000-10-11 22:54:56 +00:00
Hartmut Holzgraefe a70ae211e1 removed fdfdata.h 2000-10-11 22:45:45 +00:00
Hartmut Holzgraefe e880e3fe0c removed fdfdata.c 2000-10-11 22:45:01 +00:00
Hartmut Holzgraefe 22e48a814a @ - POST handler for Adobe FDF format (Hartmut)
the FDF handler is now working and totaly living
in the fdf extension, no more special code in
main is needed
2000-10-11 22:44:15 +00:00
Hartmut Holzgraefe 5423a08558 @ -read and write .gz-files transparently on glibc based systems
@  using the 'zlib:' fopen wrapper (Hartmut)
2000-10-11 22:40:22 +00:00
Zeev Suraski 2b3333f53e This patch didn't make it for 4.0.3... 2000-10-11 22:38:22 +00:00
Nikos Mavroyanopoulos 3156be3fa6 fixed some includes and removed an unneeded file. 2000-10-11 20:32:04 +00:00
Nikos Mavroyanopoulos 68683825ad corrected typo 2000-10-11 20:26:09 +00:00
Sascha Schumann d2d5320ee8 Add session_write_close(). This is primarily intended to enable
script writers to release the lock associated with the session lock
before the request finishes.

You can pass arrays now to session_set_save_handler(), so that the handlers
can be located in an object for better abstraction.
2000-10-11 19:47:15 +00:00
Sascha Schumann 0fd6a7ed18 Provide basic auth info to scripts.
Protect shutdown handler from being called multiple times.
2000-10-11 19:40:56 +00:00
Alexander Feldman aee3c65a8f Fixed a problem in the configuration scanner where two extra NULL bytes
were added to each encapsulated string.
2000-10-11 19:38:16 +00:00
Andi Gutmans e9887156cf Don't use 'new' symbol 2000-10-11 19:11:48 +00:00
Zeev Suraski 0b1b5e3080 NEWS update 2000-10-11 18:52:11 +00:00
Zeev Suraski dee2d85e77 Fix -a interactive mode (no idea how the previous commit got committed) 2000-10-11 18:51:52 +00:00
Zeev Suraski 48167d2b21 *** empty log message *** 2000-10-11 18:36:02 +00:00
Zeev Suraski dea72ba6a4 Added mysql_escape_String() 2000-10-11 18:27:21 +00:00
Andi Gutmans b3d949852f *** empty log message *** 2000-10-11 18:02:45 +00:00
Zeev Suraski ac0880fd8f Remove conflict 2000-10-11 18:00:18 +00:00
Andi Gutmans f3232e99c3 - Commit Kristian's PHP 3 patch to PHP 4. Kristian I hope it's also the
same here.
2000-10-11 17:48:44 +00:00
Zeev Suraski 84f81c50ba Update version 2000-10-11 17:40:40 +00:00
Zeev Suraski 57a5bbd387 Go with 4.0.3 2000-10-11 17:31:34 +00:00
Nikos Mavroyanopoulos c834cbba59 Corrected a wrong include 2000-10-11 17:05:18 +00:00
Nikos Mavroyanopoulos 98038f8228 Added support for Ovrimos SQL Server. 2000-10-11 16:54:23 +00:00
Zeev Suraski 1abd99a443 Fixed a problem that allowed users to override admin_value's and admin_flag's 2000-10-11 16:24:35 +00:00
Zeev Suraski 9aa38aad45 Add zend_hash_merge_ex(), for selective merging 2000-10-11 16:22:40 +00:00
Sascha Schumann 23a96536fa Fix the readdir_r POSIX check 2000-10-11 14:35:45 +00:00
Hartmut Holzgraefe f2ddc10685 proto typo fixes 2000-10-11 13:51:32 +00:00
Hartmut Holzgraefe 0b7745d713 added protos 2000-10-11 13:34:42 +00:00
Zeev Suraski 9a0d7a40be avoid giving the impression that they fix the security bug by upgrading... 2000-10-11 13:32:10 +00:00
Zeev Suraski 8fc4200414 Old PostgreSQL fix I forgot to commit, and NEWS consistency update 2000-10-11 13:27:21 +00:00
Hartmut Holzgraefe 332b7125de added missing protos 2000-10-11 11:40:29 +00:00
Hartmut Holzgraefe be19c812ab added some missing protos 2000-10-11 11:25:13 +00:00
Hartmut Holzgraefe 8716039dec protos fixed 2000-10-11 10:46:53 +00:00
Daniel Beulshausen 83905d9fec added sablotron extension 2000-10-11 09:18:22 +00:00
Daniel Beulshausen 814639b2fc make windows compile 2000-10-11 09:17:10 +00:00
877855a74e ChangeLog update 2000-10-11 01:09:06 +00:00
Sterling Hughes 8759dcc0ce Fix compilation, I wonder when these were omitted?? 2000-10-10 20:51:32 +00:00
Derick Rethans a03858c40b - Reserved the patch
# Please check if it works, as I'm not be able to test it
# Blame CaPS for this one :)
2000-10-10 16:58:27 +00:00
Uwe Steinmann e9ba352023 - added optional argument pdf_show_boxed() to determine if text is
actually shown or not.
2000-10-10 07:42:55 +00:00
Andrei Zmievski ab0f48d506 Fix compiler warnings. 2000-10-09 19:18:42 +00:00
Andrei Zmievski a193c9ce3e Fix a misconfiguration error and missing return statement. 2000-10-09 19:10:39 +00:00
Derick Rethans 92b3dd06e3 - Made ora_close return values like it should (thanks to james@php.net and
mathieu@gginter.net)
2000-10-09 18:45:56 +00:00
Chuck Hagenbuch 046ecab96f revert patch. Sablot won't build anymore, at least in combination with zlib. 2000-10-09 18:32:37 +00:00
Hartmut Holzgraefe 86f2ad3017 I SHALL NOT TOUCH A RELEASE CANDIDATE!
I SHALL NOT TOUCH A RELEASE CANDIDATE!
I SHALL NOT TOUCH A RELEASE CANDIDATE!
(previous patch reverted)
2000-10-09 15:24:26 +00:00
Hartmut Holzgraefe bbc37db2f3 added support for GNU-specific domainname field in uname 2000-10-09 15:12:34 +00:00
Chuck Hagenbuch 85d125c22c No comment on this, so I'm guessing it's okay. 2000-10-09 14:51:17 +00:00
Zeev Suraski 9103cae5e5 Fix bug #6447 2000-10-09 11:48:16 +00:00
97bd1845a6 ChangeLog update 2000-10-09 01:09:07 +00:00
Chuck Hagenbuch 09f89187f4 Add File_SearchReplace class from Richard Heyes. 2000-10-08 14:55:13 +00:00
Daniel Beulshausen d667e05543 more cleanup of info code 2000-10-08 11:45:18 +00:00
Daniel Beulshausen 990a86615d only beautifying 2000-10-08 10:55:09 +00:00
f2f5f5a870 ChangeLog update 2000-10-08 01:09:09 +00:00
c99f72d5ea NEWS update 2000-10-08 01:09:06 +00:00
Sascha Schumann 683ce541c8 Move static declaration to source file. 2000-10-07 20:46:30 +00:00
Thies C. Arntzen 6b5441c30f @- Fixed returning of empty LOB fields in OCI8. (Thies) 2000-10-07 09:10:54 +00:00
b88fc00775 ChangeLog update 2000-10-07 01:09:11 +00:00
Andi Gutmans 996bd9300b - Fix Bug #7061 2000-10-06 17:34:50 +00:00
Sebastian Bergmann 8520f94796 Removed obsolete entries from php.ini. 2000-10-06 05:14:46 +00:00
472c1a099b ChangeLog update 2000-10-06 01:09:16 +00:00
Andi Gutmans a39da32bf0 - News 2000-10-06 00:03:40 +00:00
Andi Gutmans 31a5160a0a - Add calendar to default Win32 build. 2000-10-06 00:03:02 +00:00
Andi Gutmans 9ece8612b8 - Add FTP extension to default Win32 build 2000-10-05 23:25:41 +00:00
Andi Gutmans 7292abefc1 - Update link 2000-10-05 22:22:26 +00:00
Andi Gutmans 4b0db9a47b - Remove old dsw 2000-10-05 22:20:38 +00:00
Rasmus Lerdorf 348079bc3f Get ext_skel working again 2000-10-05 20:48:12 +00:00
Andi Gutmans fb2c23645b - Clean-up original code and add to NEWS. 2000-10-05 18:26:54 +00:00
Brendan W. McAdams 5ab813e1b6 Updated email address to reflect my php.net address.
I am no longer associated with Plexus InterActive (my plexmedia.com address) so
the old address is no longer any good.
2000-10-05 18:20:06 +00:00
Alexander Feldman 791cda209c Fixed posix_addlimit() when adding the string "unlimited" to the result.
Now the posix_getrlimit() function does not cause core dump.
2000-10-05 18:06:55 +00:00
Andi Gutmans d84c5a2238 - Updated included_files() also for plain include()/require(). 2000-10-05 17:58:46 +00:00
Jouni Ahto f06ee6bdba - List entry types should be true globals. 2000-10-05 12:47:39 +00:00
Joey Smith 8538f86ac1 Add more missing protos and make folding style closer to mysql module. 2000-10-05 02:40:53 +00:00
3dd574bb94 ChangeLog update 2000-10-05 01:09:07 +00:00
foobar b3450c2246 Now it really checks that libxml version is >= 2.0 2000-10-05 00:51:46 +00:00
Sascha Schumann 47dfaf232f Use ZEND_DECLARE_MODULE_GLOBALS instead of equivalent #if ZTS/#else/#endif
construct.
2000-10-04 23:11:07 +00:00
Andi Gutmans 6d92ac275d - Fix fprintf 2000-10-04 19:29:28 +00:00
Sascha Schumann 5674f1be45 Ignore close tags and use unsigned char type. 2000-10-04 18:06:20 +00:00
Stig Bakken de527c2379 * changed Andi's "testdirname" into a real regression test
# Andi, could you verify that the expected output really
# is correct?
2000-10-04 07:33:21 +00:00
5bcba1fadf ChangeLog update 2000-10-04 01:09:08 +00:00
Sascha Schumann da6c94f73b typo 2000-10-03 21:56:21 +00:00
Sascha Schumann cc415d699e #include "ext/standard/php_string.h" to get php_memnstr(). 2000-10-03 18:52:46 +00:00
Andi Gutmans acc4a8ed6d - Package RC2 2000-10-03 17:08:41 +00:00
Andi Gutmans 897b701dee - Add dirname() test. Don't have time to create a real regression test 2000-10-03 16:48:48 +00:00
Andi Gutmans a1abfb7643 - Fix dirname() 2000-10-03 16:47:25 +00:00
Andi Gutmans 94bea2902b - Move #define to .h file 2000-10-03 16:36:32 +00:00
Sterling Hughes e97718461b Fix some small issues. 2000-10-03 15:51:39 +00:00
Andi Gutmans 3dab84005d - Fix V_CHDIR_FILE() 2000-10-03 15:08:37 +00:00
Andi Gutmans 18f86e7757 - Fix V_CHDIR_FILE() to only chdir() when a directory part is specified.
Use this instead of broken php_dirname() in fopen-wrappers.c
2000-10-03 15:05:50 +00:00
Andi Gutmans d37b140601 - Fix VC++ warning 2000-10-03 14:43:04 +00:00
Andi Gutmans 38423a895b - Fix request_uri to take it's value from SCRIPT_NAME if PATH_INFO is not
defined
2000-10-03 13:02:30 +00:00
a648a5c2cc ChangeLog update 2000-10-03 01:09:17 +00:00
641f19c68f NEWS update 2000-10-03 01:09:10 +00:00
Rasmus Lerdorf ff9946b264 Add --with-imap-ssl to support SSL'ized imap library in RH7 and others
@Add --with-imap-ssl to support SSL'ized imap library in RH7 and others
@(Rasmus)
2000-10-02 22:16:53 +00:00
Andi Gutmans fe550afba6 - Change zend_extension_api_no 2000-10-02 20:08:46 +00:00
Andi Gutmans bf7603cf83 - Now really fix it. 2000-10-02 18:13:53 +00:00
Andi Gutmans cca7178332 - Update NEWS 2000-10-02 17:54:12 +00:00
Andi Gutmans 28c96e89e1 - Fix bug in parse_url() 2000-10-02 17:51:30 +00:00
Rasmus Lerdorf b189759bcd Clean up the alignment of configure --help output 2000-10-02 17:36:01 +00:00
Andi Gutmans c26b4d8c9f - Aiming for thursday to release 4.0.3 2000-10-02 15:20:40 +00:00
Andi Gutmans a37b138d7c - Darn file is needed for Windows. Maybe it should be called
php_version.w32.h?
2000-10-02 15:12:47 +00:00
Andi Gutmans 79a898697d - Any reason why php_version.h is in the CVS? I'm removing it so if I'm
screwing something up scream *now* :)
2000-10-02 15:04:26 +00:00
Daniel Beulshausen 3f65e03649 forgot that a while ago... 2000-10-02 14:58:42 +00:00
Daniel Beulshausen 7482eb6adc fixed unresolved externals.
# it compiles fine now, and php loads the extension fine
# but there must be definetly something with the paths
# cause mcrypt doesn't want to load any alogrithm
2000-10-02 11:00:54 +00:00
Stig Venaas 113b132639 *** empty log message *** 2000-10-02 05:45:28 +00:00
Sterling Hughes 82070f1cdf Tiny change in copying of buffer. 2000-10-02 04:55:26 +00:00
eac689a606 ChangeLog update 2000-10-02 01:09:10 +00:00
ba90d5d529 NEWS update 2000-10-02 01:09:07 +00:00
James Moore 4dceb59561 Adding note about having to make install if you do not have apache already installed (IE there is no apache dir to copy httpd binary to) 2000-10-01 19:12:08 +00:00
Andi Gutmans 5819b6d4a6 - Remove unneeded IS_SLASH() definition. 2000-10-01 18:13:41 +00:00
Derick Rethans 58294f67d2 @- Added the shmop extension. It allows more general ways of shared memory
@  access. (thanks to Ilia Alshanestky <iliaa@home.com> and Slava Poliakov
@  <slavapl@mailandnews.com> (Derick)
2000-10-01 15:06:04 +00:00
Sterling Hughes 9ccc11ce50 It seems these entries were truncated in my commit, perhaps it was due to
the multiple NEWS entries in the same commit.
2000-10-01 11:28:16 +00:00
Andi Gutmans d4b0d7850d - Fixed conflicts. Those first two lines with the XXX need to be fixed.
I'm not sure if they were meant to be in the Changelog or NEWS file, in
  any case they are broken. Whoever, commited them can you please fix it?
  I couldn't find who commited them in the CVS commit messages
2000-10-01 10:54:11 +00:00
e597dbd0be ChangeLog update 2000-10-01 01:09:10 +00:00
53535918d0 NEWS update 2000-10-01 01:09:07 +00:00
Daniel Beulshausen f6c67cec11 added filepro & snmp 2000-09-30 17:42:10 +00:00
Daniel Beulshausen 01927063d5 move have_snmp to the dsp already 2000-09-30 17:40:52 +00:00
Daniel Beulshausen 0960b3618f snmp win extension 2000-09-30 17:39:13 +00:00
Sascha Schumann 27a819c620 . 2000-09-30 16:36:23 +00:00
Daniel Beulshausen ef1dea5e1e uses php.h define 2000-09-30 16:32:11 +00:00
Andi Gutmans ab8c6ed967 - Cleanup error output 2000-09-30 16:24:53 +00:00
Andi Gutmans 3f80efd660 - Cleanup output functions 2000-09-30 16:14:54 +00:00
Andi Gutmans 2622eba31d - Cleanup some output functions 2000-09-30 16:13:48 +00:00
Daniel Beulshausen 499507ca0e added dsp for the filepro extension 2000-09-30 15:57:45 +00:00
Daniel Beulshausen 1c4207a1f8 made win32 compile 2000-09-30 13:32:25 +00:00
Daniel Beulshausen c7c8ed155c removed zendts.lib from link options 2000-09-30 13:29:20 +00:00
Daniel Beulshausen 8ef9700499 cleanup 2000-09-30 13:25:41 +00:00
Daniel Beulshausen 53e1e33045 fix not producing valid extension 2000-09-30 13:24:16 +00:00
Sterling Hughes 85e2dc34d5 leftovers. 2000-09-30 04:50:39 +00:00
Sterling Hughes 1e6ae4496b Buncha changes, generally makes the module more stable and removes unnecessary
(as of Sablotron 0.44) workarounds.
2000-09-30 04:44:33 +00:00
Chuck Hagenbuch 7b5ba2f1fd install Benchmark/Iterate.php 2000-09-30 04:03:46 +00:00
Sterling Hughes 36dc3e1c20 @ Added the ability for CURLOPT_POSTFIELDS to accept an array of HTTP post
parameters. (Sterling)
@ Added the CURLOPT_HTTPHEADER option that allows for the posting of HTTP
headers to a remote site from cURL. (Sterling)
@ Add the curl_error() and curl_errno() functions. (Sterling)

Buncha other changes...

  - Changed if () else if () in curl_setopt to switch .. case
  - Fixed a couple crashes in certain cases.
  - Finally a decent error reporting scheme.
  - A few formatting changes.
2000-09-30 03:09:54 +00:00
974a0ddf65 ChangeLog update 2000-09-30 01:09:07 +00:00
Sascha Schumann 3f72b744e0 . 2000-09-29 21:56:03 +00:00
Sascha Schumann 11c88a0ff5 Return SUCCESS from write handler, if vallen is 0.
Submitted by: tcarroll@chc-chimes.com
PR: #6958
2000-09-29 21:44:45 +00:00
Sascha Schumann 3be464e4ec UnixWare defines shutdown to _shutdown, which causes problems later
on when using a structure member named shutdown. Since this source
file does not use the system call shutdown, it is safe to #undef it.

PR: #6008, #6362
2000-09-29 19:08:17 +00:00
Dan Kalowsky ca1b12c5a1 corrected lines for Solid 2.3 systems after some advice from users, please test... 2000-09-29 19:03:23 +00:00
Sascha Schumann 4b89b67d1c Don't try to serialize references.
Circular references would otherwise kill PHP, as the serializer
would overrun the stack.
2000-09-29 18:48:40 +00:00
Hénot David a68a224efd Added clean up code for persistent connections to avoid some problems with
autocommit.
2000-09-29 09:29:06 +00:00
foobar 5844b74e22 Fix configure (with Solaris). 2000-09-28 23:46:15 +00:00
Andi Gutmans c4fd954b8a - Another has optimization/fix like the hash_copy one from earlier on 2000-09-28 23:21:08 +00:00
Daniel Beulshausen 7fdb466d14 a little cleanup 2000-09-28 20:29:39 +00:00
Daniel Beulshausen 23b14d4cfb added tsrm dir to include path 2000-09-28 20:26:31 +00:00
Daniel Beulshausen eba5d76078 removed ignoring msvcrt(d) libary 2000-09-28 20:25:03 +00:00
Daniel Beulshausen 97089c0370 major cleanup
# but still doesn't work for me
2000-09-28 20:22:57 +00:00
foobar aee1a49287 @- Changed ext/db not to be enabled by default (Jani) 2000-09-28 20:09:23 +00:00
Frank M. Kromann e048e34e80 Having odbc_tables() and odbc_columns() match the documentation with parameters optionel from the right 2000-09-28 16:42:04 +00:00
Stanislav Malyshev 56c474cf48 Make hash_copy call copy constructor on a real copy, not on a temp 2000-09-28 15:17:50 +00:00
Chuck Hagenbuch 7a4e086d7a move the timer class to Benchmark/Timer.php, and add it to Makefile.in so it
gets installed.
2000-09-28 14:59:41 +00:00
Andi Gutmans 3e0d46d222 - Fix build of db2 2000-09-28 13:08:14 +00:00
Sebastian Bergmann 39752c2ed0 Removed profiling_information() in favour of a more generalized approach with get_profiling(). 2000-09-28 11:45:13 +00:00
Stefan Roehrich 045ee57f04 Line seems to be missing and causing configure test failures for other extensions. 2000-09-28 09:37:30 +00:00
Sebastian Bergmann 7ad1cf5785 Hopefully converted all TABs to SPACEs 2000-09-28 07:27:05 +00:00
Sebastian Bergmann ee11aabc30 Added PEAR/Timer class for timing script execution and generating profiling information. This class is based upon a concept by Allan Kent shown in his article on PHPBuilder.com 2000-09-28 07:21:21 +00:00
Andi Gutmans b4ac6f4fdd - Remove zend_gcc_inline.c 2000-09-28 06:40:57 +00:00
9b118c6bb6 ChangeLog update 2000-09-28 01:09:08 +00:00
Zeev Suraski ec4a36ec12 complementary PHP patch 2000-09-27 19:46:47 +00:00
Sascha Schumann d51fe40c2d Don't convert to BSD-style Makefiles 2000-09-27 18:59:44 +00:00
Sascha Schumann 2e4ab68995 Automatic conversion might cause interpretation of 0xff as EOF, so we store
the result in an object of type int first.

Submitted by: melchers@cis.fu-berlin.de
2000-09-27 16:08:26 +00:00
Sascha Schumann 3823ad3ec0 Recognize single quotes around cdata.
Move smart_str functions to an extra file.
2000-09-27 15:26:39 +00:00
Sascha Schumann 5bf4e7857d Clean up STR_CAT macro (it is still ugly) 2000-09-27 15:24:09 +00:00
Sascha Schumann 1cc3e6b5e6 Move php_memnstr to the header file, so that the function body is available
in all compilation units (note the static linkage).
2000-09-27 15:18:00 +00:00
Rui Hirokawa d4cd24c22d correct the problem configure script doesn't output Makefile as shared extension. 2000-09-26 14:25:02 +00:00
Daniel Beulshausen 5b6d752119 fixed tsrm dir, little cleanups 2000-09-26 13:17:21 +00:00
Sascha Schumann 1e5bf63b6a add some new and old stuff 2000-09-26 12:58:08 +00:00
Daniel Beulshausen b8dabd3fb8 removed redefines 2000-09-26 12:05:37 +00:00
Daniel Beulshausen 77e7617654 cleanup, added configurations for ssl as well 2000-09-26 11:51:31 +00:00
Daniel Beulshausen 58d8ab855f cleanup 2000-09-26 11:34:10 +00:00
Daniel Beulshausen abbfbf18bc added tsrm dir to include path, and release_ts_inline to lib path 2000-09-26 11:23:56 +00:00
Sascha Schumann a2f126c351 Build compat bridge for makes which support only the BSD .include command.
This is only required for BSD/OS, because BSDI did not merge in changes
from 4.4BSD Lite 1.
2000-09-26 11:19:38 +00:00
Sascha Schumann 99771d91ce Remove --enable-c9x-inline option. We now use a syntax which is compatible
with all compilers by providing the function with static linkage in every
compilation unit.
2000-09-26 11:10:11 +00:00
Sascha Schumann 7db874096e Unify memory allocation in smart_str functions 2000-09-26 11:00:39 +00:00
Sascha Schumann d959c647e2 Remove superflucious variable 2000-09-26 11:00:02 +00:00
Sascha Schumann cd151feb19 #include "SAPI.h" once 2000-09-26 10:58:56 +00:00
Sascha Schumann 8ef52cabcf Cleanup 2000-09-26 10:58:42 +00:00
Stanislav Malyshev 9ff7f19e32 Add URL support for GD 2000-09-26 09:08:02 +00:00
Joey Smith 12aca26b5b Add protos from sybase DB Library. 2000-09-26 07:38:47 +00:00
Zeev Suraski 309827ec1d Fix previous update - move extension startup further down the startup sequence 2000-09-25 18:10:45 +00:00
Zeev Suraski 59d3eb5f24 Move extension startup further down the startup sequence 2000-09-25 17:02:05 +00:00
663666e26a ChangeLog update 2000-09-22 01:09:07 +00:00
foobar 0f3ef58fa3 No more empty '-l' caused by this extension. 2000-09-22 00:59:16 +00:00
Stig Venaas 9a9e2e72b0 Small fix to the literal IPv6 parsing, now stops at first ] after [ 2000-09-22 00:33:55 +00:00
Stig Venaas 0776f7d3d7 Parsing of URLs with literal IPv6 addresses, see RFC 2732
@- IPv6 support in fopen (one can access IPv6 ftp/web servers) (Stig Venaas)
2000-09-22 00:12:00 +00:00
Sascha Schumann d9b4f90969 Revert controversial patch 2000-09-21 23:18:25 +00:00
71931b05f0 ChangeLog update 2000-09-21 01:09:30 +00:00
Brian Moon 09e00183bd added mysql_fetch_assoc. Acts like mysql_fetch_array used to. 2000-09-20 21:43:57 +00:00
foobar 7b6d8bfc3c This was missing.. 2000-09-20 20:44:07 +00:00
Sascha Schumann 854c0622f0 Cleanup SCANNER_DEBUG and don't NUL terminate work buffer 2000-09-20 08:59:52 +00:00
Sascha Schumann cfa22547e0 Use emalloc and friends. Since we reuse all buffers, this does not affect
the speed.

The smart_str_* functions don't NUL terminate strings anymore. We can
rely on the length of the strings completely.
2000-09-20 08:40:33 +00:00
Sascha Schumann 16d7cb88fa Remove this pseudo optimization from the previous rewrite.
Since we leave/enter the loop more often, the cost of maintaining
c_arg/c_val is higher than simply copying the tag/arg string once.
2000-09-20 08:13:45 +00:00
Sascha Schumann f27f790f29 Another 5%-10% speed increase achieved by
- making ctx->val read-only
- adding a special appendc function for appending single characters
2000-09-20 08:06:01 +00:00
Joey Smith e5bb148d4e le_link and le_plink are no longer part of the sybase_globals. 2000-09-20 04:12:03 +00:00
Sascha Schumann 7aa23d3ca3 Add support for URLs containing NAME info (for scrolling; #name). 2000-09-20 02:04:19 +00:00
Sascha Schumann 9c6414d6fa Deactivate E_NOTICE message on gc 2000-09-20 01:38:39 +00:00
Sascha Schumann cd9ab22f84 Rename prototype to currently used name. These stupid names will go away once
the transition periode ends.
2000-09-20 01:25:19 +00:00
Sascha Schumann 07e71ce1f1 s/url_scanner.h/url_scanner_ex.h/ 2000-09-20 01:22:55 +00:00
Sascha Schumann 61dc840cdd Make the new url scanner the default.
If there are any problems (especially with characters > 127), let me know.
2000-09-20 01:22:17 +00:00
Sascha Schumann a2dc8a2fa5 2nd Rewrite of the main scanner engine. This version is cleaner and faster.
It handles the following tags currently:

<FRAME .. SRC=URL ..>
<INPUT .. TYPE=IMAGE SRC=URL ..>
<A     .. HREF=URL ..>
<AREA  .. HREF=URL ..>
<IMG   .. SRC=URL ..>

Additional ones can be added within seconds.

The support for HTML forms has been significantly improved. The scanner
will now add proper Hidden Fields for the Session ID.
2000-09-20 01:15:10 +00:00
ceedeb4a7e ChangeLog update 2000-09-20 01:09:22 +00:00
foobar 83987c17ac This fix prevents adding an empty -l to LIBS 2000-09-19 23:52:24 +00:00
Daniel Beulshausen d836f5d4c0 fix unresolved externals 2000-09-19 22:05:26 +00:00
Sascha Schumann cc53ad5166 Reduce the amount of copying in the mainloop. We copy tag/arg only, if we
need to preserve them for a new loop iteration (after we leave mainloop).
Otherwise, we can just let them point to the work area.
2000-09-19 20:19:03 +00:00
Sascha Schumann dd59d14805 Revert part of last commit. I'll refine it later. 2000-09-19 19:18:41 +00:00
Andi Gutmans c54047b0b0 - Change to Z_BVAL macro 2000-09-19 18:19:02 +00:00
Andi Gutmans 813f7b58d6 - Add Z_BVAL* macros 2000-09-19 18:18:26 +00:00
Sascha Schumann a7ef1966ac Another speedup by avoiding string copies.
15% speed gain in test case (rewriting 1M URLs).
2000-09-19 18:17:28 +00:00
Sascha Schumann 95ae21ff1b Remove nextiter label 2000-09-19 18:01:29 +00:00
Sascha Schumann 7f86b7224c s/DEBUG/SCANNER_DEBUG/. "Convert" one macro to inline function to be more
consistent. Also use continue.
2000-09-19 18:00:58 +00:00
Zeev Suraski 5b0ca1585a Fix a few build bugs, still no go 2000-09-19 17:53:09 +00:00
Sascha Schumann 51498e1d3f Kill warning 2000-09-19 17:46:23 +00:00
Sascha Schumann e07e19f271 The rewrite was completely authored by Hartmut 2000-09-19 17:45:44 +00:00
Ben Mansell fd81040420 (Zeus-specific) Don't GetServerVariable() for vars which Zeus doesn't use 2000-09-19 17:43:11 +00:00
Sascha Schumann e2efb3cf06 Remove unnecessary include directive 2000-09-19 17:39:43 +00:00
Zeev Suraski c45b1c2c8b - Fix warnings
- Fix URL scanner startup crash
2000-09-19 17:37:34 +00:00
Sascha Schumann ade9a02eef Don't restore timestamp on internal_functions.c, otherwise rerunning
configure will cause config.status to be run again during make
(due to the rule in main/Makefile.in).
2000-09-19 17:36:36 +00:00
Ben Mansell 4208c264d7 Fixed bug which could truncate PHP_SELF 2000-09-19 17:34:53 +00:00
Sascha Schumann 4b3fb7b05e Add new URL scanner. This version is up to 20% faster. It will be
enabled by default once I'm sure that it works in every case.

To enable it, apply s/url_adapt_ext/url_adapt_ext_ex/ to session.c
2000-09-19 17:32:27 +00:00
Stanislav Malyshev d9d65f18e9 Fix crash on Solaris with function parameter destruction 2000-09-19 17:27:56 +00:00
Sascha Schumann 2ec043606b *** empty log message *** 2000-09-19 17:22:37 +00:00
Sascha Schumann e986a4b0a3 Fix RINIT/RSHUTDOWN functions and add url_adapt_ext() 2000-09-19 17:21:26 +00:00
cfa034a07a ChangeLog update 2000-09-19 01:09:14 +00:00
Stig Bakken f3f3df734c #tiny formatting fix 2000-09-19 00:10:46 +00:00
Daniel Beulshausen 8b23529beb let windows build with trans sid 2000-09-18 17:23:45 +00:00
Andrei Zmievski b84a1bed0a Fix changelog. 2000-09-18 15:21:59 +00:00
5cec06b1a8 ChangeLog update 2000-09-18 15:20:57 +00:00
Stanislav Malyshev 1fbc3945a2 Fix crash 2000-09-18 15:15:27 +00:00
Stanislav Malyshev 5918218872 Made get_included_files() work again, in somewhat different way 2000-09-18 13:43:20 +00:00
Stanislav Malyshev 08e1c852aa Fix decbin 2000-09-17 21:11:55 +00:00
Stanislav Malyshev 27fb7df0d2 Add empty string checks to add?slashes 2000-09-17 09:15:48 +00:00
Stanislav Malyshev 2158bbfa7f Set filename even on recursive include 2000-09-17 08:58:39 +00:00
Andi Gutmans e740042363 - Fix doc_root problem. If you need to limit under which directories the
scripts should reside use open_basedir.
2000-09-17 05:52:26 +00:00
20f43a76ba ChangeLog update 2000-09-17 01:09:06 +00:00
Andi Gutmans a45553cd57 - Add TODO 2000-09-16 19:07:50 +00:00
Zak Greant e9d946d374 Thought that I had just committed something really stupid.
On closer inspection, realized that the proto comments
for chown and chgrp were reversed. :)
I did not realize this and had only fixed chown previously
2000-09-16 05:10:03 +00:00
Zak Greant e7b0cd7ad2 trivial change
corrected mistake in proto comment for chown fold
2000-09-16 05:02:06 +00:00
c4d2d9e14f ChangeLog update 2000-09-16 01:09:08 +00:00
Chris Vandomelen 322891a2dd Changed assignment in read() to be more sane. 2000-09-15 23:44:30 +00:00
Joey Smith 618bfebfaf Remove CVS conflict. Zeev, I assume you wanted context inside the globals? 2000-09-15 20:54:42 +00:00
Sam Ruby 17332d6b21 Indicate the Sun's JDK 1.2.2 now works...and complete a sentence. 2000-09-15 18:06:18 +00:00
15adb9bb42 ChangeLog update 2000-09-15 01:09:07 +00:00
Chris Vandomelen d3ca6394eb Corrected memory leak in read(). 2000-09-14 21:48:15 +00:00
Andi Gutmans 0e874a094c - Use IS_ABSOLUTE_PATH() so that this will work correctly under Windows 2000-09-14 20:47:35 +00:00
Andi Gutmans 962c163cdf - Time to remove these two. 2000-09-14 20:43:13 +00:00
Andi Gutmans 5418b59681 - Fix NULL handling in ARRAY opcode and resolve memory leak 2000-09-14 20:30:06 +00:00
Andrei Zmievski da3c43182a Fix warnings. 2000-09-14 20:22:02 +00:00
Andrei Zmievski b111463f4c Fixed bug #6740.
I happen to think that this is php_addslashes() problem, not PCRE's.
When 0 is passed for the length of the string to php_addslashes() it
assumes that we want to process the whole string and happily runs
strlen() on it. That is bad. It should respect the length and return
an empty string if it's 0.
2000-09-14 15:44:36 +00:00
28690c3d16 ChangeLog update 2000-09-14 01:09:10 +00:00
856a7b766f NEWS update 2000-09-14 01:09:07 +00:00
Chris Vandomelen ce46ccd32b Added prototypes for socketpair() and shutdown(), and corrected an obvious
bug in socketpair (causing it to not return the created sockets to the PHP
script.)
2000-09-13 23:33:39 +00:00
Derick Rethans c7d31495bf - Added ftp_exec to the ftp functions (thanks to <jhennebicq@i-d.net>)
@ Added ftp_exec to the ftp functions (thanks to <jhennebicq@i-d.net>)
@ (Derick)
2000-09-13 22:00:31 +00:00
Andrei Zmievski a6bb6f5df3 Create module info function. 2000-09-13 20:58:19 +00:00
Hénot David 409e2e7e98 Changed the php.ini examples to match the names in the source code. 2000-09-13 16:12:50 +00:00
Andrei Zmievski 09ac5ed748 Really fix the de-allocation. 2000-09-13 15:31:50 +00:00
Andrei Zmievski 84908add07 Fixed block overrun. 2000-09-13 13:55:35 +00:00
Daniel Beulshausen 119ad66740 - a comma sneaked in before the java extension
- added the java configuration section
#can you please add the setting for *nix as well?
2000-09-13 13:27:52 +00:00
Daniel Beulshausen 0f22953a67 added note about odbc support and changed to the appropriate names of the windows extensions 2000-09-13 13:03:01 +00:00
Stig Bakken 7c53e635b2 PEAR:
* added $debuginfo parameter to PEAR_Error constructor
 * put last query in $debuginfo from DB_common::raiseError()
@PEAR: add last executed query as debug info in DB errors (Stig)
2000-09-13 11:27:59 +00:00
Stig Bakken 63aec84825 PEAR:
* show what's going on when PEAR files are installed
 * allow multiple modes (or'ed) in PEAR_Error
@PEAR: allow multiple modes in PEAR_Error (Stig)
2000-09-13 07:39:54 +00:00
Andi Gutmans 526d45e95f - The Sprit of PHP is to have descriptive function names and not
necessarily short ones. Maybe we should have some FAQ for this?
2000-09-13 04:13:36 +00:00
cce70fa84a ChangeLog update 2000-09-13 01:09:10 +00:00
3933ff52a1 NEWS update 2000-09-13 01:09:07 +00:00
Rui Hirokawa 4ffaf35556 updated some functions'name using obsolete name convention. 2000-09-12 23:19:58 +00:00
Zeev Suraski f7054b3561 Thanks, Adam 2000-09-12 20:57:21 +00:00
Zeev Suraski 5d97102f8f @- Made the Sybase CT module thread safe (Zeev) 2000-09-12 20:54:36 +00:00
Zeev Suraski 6c3d7449e1 - Made eval() and several other runtime-evaluated code portions report the
nature and location of errors more accurately (Stas)
2000-09-12 20:48:33 +00:00
Zeev Suraski 5286b3971c Make compile_string() accept a description of the code 2000-09-12 19:47:25 +00:00
Andrei Zmievski 5470222d70 Forgot to update proto. 2000-09-12 19:04:50 +00:00
Andrei Zmievski 34574352be @- Added second argument to array_reverse() that indicatese whether
@  the original array keys should be preserved. (Andrei)
2000-09-12 19:03:59 +00:00
Daniel Beckham b852f3941f reversed chomp alias addition as per Andi Gutmans' request 2000-09-12 19:00:21 +00:00
Rasmus Lerdorf 75d73aaffb # missed proto comments 2000-09-12 17:24:46 +00:00
Rasmus Lerdorf d23ad61dc3 Clean up htmlspecialchars/htmlentities inconsistencies.
@Clean up htmlspecialchars/htmlentities inconsistencies. (Rasmus)
2000-09-12 17:22:37 +00:00
Daniel Beckham 5925071957 added chomp() alias for chop() for us Perl purists. 2000-09-12 15:54:10 +00:00
Andrei Zmievski f6a24fce48 Fix notice. 2000-09-12 13:19:37 +00:00
Stanislav Malyshev 44e04f7688 Make parse_str always register globals with 1 argument and never -
with 2 arguments
2000-09-12 10:56:25 +00:00
Stanislav Malyshev e0a5a4813e A quick attempt to make parse_str($str,$arr) not register globals. 2000-09-12 10:54:45 +00:00
Derick Rethans 7b892ddf5a - Fix contribution 2000-09-12 05:53:49 +00:00
Andi Gutmans 49cb1d620b - Always use V_* macros even if logic seems to be only using fullpath. 2000-09-12 04:18:20 +00:00
Andi Gutmans 88b469203c - Fix bug #5997 2000-09-12 04:13:21 +00:00
Jouni Ahto aa312ec61c - Fix the function names here too. 2000-09-12 02:45:14 +00:00
e5b4099e43 ChangeLog update 2000-09-12 01:09:14 +00:00
49162267a3 NEWS update 2000-09-12 01:09:11 +00:00
Stig Bakken f29b5131d3 @PEAR: renamed DB_GETMODE_* to DB_FETCHMODE_*, added setFetchMode()
@      in DB_common to set the default mode, added some MySQL tests (Stig)
2000-09-12 00:27:50 +00:00
Jouni Ahto 0c1620840f - Renamed functions so that this extension finally starts to follow the
recommended naming scheme of PHP.
2000-09-11 21:28:47 +00:00
Derick Rethans 71066c12dc - Fix for bug #6673
- Added a "cut" option to wordwrap (as per feature request #6429)
@ Added an optional parameter to wordwrap that cuts a string if the length
  of a word is longer than the maximum allowed with (Derick)
2000-09-11 20:06:24 +00:00
Andi Gutmans f5cf7d7eb7 - Windows and UNIX compile fixes 2000-09-11 19:14:42 +00:00
Andi Gutmans b510fcf96e - Get rid of stuff which is already done in php.h
- More can probably be removed as the code doesn't use lots of sys calls.
2000-09-11 19:11:03 +00:00
Andi Gutmans 4b243ebeeb - Remove #if 0 code 2000-09-11 19:04:23 +00:00
Andi Gutmans 228648397e - Add config_common.h to dsp 2000-09-11 18:59:32 +00:00
Andi Gutmans 824fc6a084 - Move php_open_temporary_file() out of file.c 2000-09-11 18:56:47 +00:00
Jouni Ahto d9e180b9b7 - Use the same check for existence of a valid link as the other functions.
- Return TRUE if everything went OK.
- Fixed the number of arguments to pg_endcopy.
- Removed unused variables.
- Indentation, changed spaces to tabs.
2000-09-11 18:34:06 +00:00
Sascha Schumann f45f6d788f Kill a warning 2000-09-11 16:25:36 +00:00
Sascha Schumann 95d2ca8a46 Add proper struct sockaddr * casts and make use of memcpy/memset ('coz we
don't provide any fallbacks for bcopy/bzero).
2000-09-11 16:19:53 +00:00
Derick Rethans 68611e2d55 - Added functions pg_putline and pg_endcopy (thanks to Dirk Elmendorf
<delmendo@rackspace.com>)
@ Added functions pg_putline and pg_endcopy (Dirk Elmendorf)
2000-09-11 15:34:14 +00:00
Sascha Schumann 2e0ae6d25f Solaris-readdir_r-wants-large-buffer fix
Libc5-readdir_r workaround
2000-09-11 15:25:06 +00:00
Sascha Schumann bd616da7ca Libc5-readdir_r workaround 2000-09-11 15:24:28 +00:00
Andi Gutmans 5348058938 - Forgot to create extended info in include()/require() call 2000-09-11 15:15:57 +00:00
Andi Gutmans db1422f10e - Testing 1 2 3 2000-09-11 15:15:29 +00:00
Andi Gutmans 770098eca8 - Testing 1 2 3 2000-09-11 15:14:56 +00:00
Andrei Zmievski 6ac728e179 (PHP parse_str) ParameterPassedByReference() check is not necessary. 2000-09-11 14:54:12 +00:00
Stanislav Malyshev 1ccac6ed55 Add additional parameter to parse_str for saving result (thanks to
John Bafford <dshadow@zort.net>)
@ Added second parameter for parse_str to save result (John Bafford)
2000-09-11 14:50:26 +00:00
Andrei Zmievski 5abacc5413 (PHP pathinfo) Fixed more typos. 2000-09-11 13:54:59 +00:00
Andrei Zmievski 5ed3e24f47 (PHP pathinfo) Fixed leaks, saved some memory allocations, added
more error checking.
2000-09-11 13:52:22 +00:00
Andrei Zmievski 3ab30838d7 Fix attribution. 2000-09-11 13:18:49 +00:00
foobar 9559b88894 Fixed bug #6356. 2000-09-11 13:01:07 +00:00
Andi Gutmans 42c5a9dad7 - Should fix compile warning 2000-09-11 04:31:04 +00:00
Sterling Hughes d44d114b75 @- Fix bug with curl places extra data in the output. (medvitz@medvitz.net) 2000-09-11 03:33:14 +00:00
43e62ac46e ChangeLog update 2000-09-11 01:09:11 +00:00
7fe41da165 NEWS update 2000-09-11 01:09:08 +00:00
Sterling Hughes e9dd13754b Fix compile warning.
Fix proto.
Change PHP_MINFO output to be consistent.
2000-09-10 23:18:11 +00:00
Sterling Hughes 585e338e5e php4ize a bit.
fix a little bit of grammar.
2000-09-10 21:07:18 +00:00
Sterling Hughes 1d64caac88 Fix attribution. 2000-09-10 20:57:22 +00:00
Stanislav Malyshev e8f3025373 Make unpack("H") work like in Perl 2000-09-10 13:47:51 +00:00
Stanislav Malyshev 4237ddadb5 Fix pack() function reading string beyond the end 2000-09-10 13:34:03 +00:00
Stanislav Malyshev e7402d7a50 Allow require_once to take expressions, just like require 2000-09-10 11:24:45 +00:00
Stanislav Malyshev d443fff043 Fix double unpack bug 2000-09-10 11:03:32 +00:00
Stanislav Malyshev a05c35b802 Try once more to remove dups 2000-09-10 09:49:55 +00:00
Stanislav Malyshev bb030e6fa8 Test commit - weed out duplicate messages 2000-09-10 09:49:02 +00:00
Stig Venaas 6ccbc0d37d A tiny fix to the getaddrinfo check 2000-09-10 09:35:48 +00:00
Stig Venaas b32ff568e6 refining getaddrinfo check further, checking that struct addrinfo is there 2000-09-10 08:09:21 +00:00
Sterling Hughes 0b9a78cb1e @- Added the pathinfo() function. (Sterling) 2000-09-10 05:59:16 +00:00
Joey Smith f020f3eaa5 Fix compile warnings. 2000-09-10 05:35:03 +00:00
Joey Smith 1a092713d0 @- Updated sybase_ct module and its sybase_query to use high performance API.
(sybase_query) Use high performance API in sybase_query. Will work on the others later.
2000-09-10 05:24:30 +00:00
Joey Smith 98cb18a7d7 Use new Zend API stuff. 2000-09-10 05:13:56 +00:00
2d5316a11c ChangeLog update 2000-09-10 01:09:09 +00:00
d993b05a5b NEWS update 2000-09-10 01:09:06 +00:00
Derick Rethans eba1b6221d - Fixed missing parameter in php_atoi 2000-09-09 23:21:44 +00:00
Stig Venaas d8a4a9b1dd Added IPv6 support to php_fopen_url_wrap_ftp (EPSV and php_hostconnect()) 2000-09-09 21:29:37 +00:00
David Croft e6c77fde1d fix typo 2000-09-09 20:39:08 +00:00
Zeev Suraski 04eb5270d6 Update NEWS 2000-09-09 20:38:02 +00:00
Chuck Hagenbuch 22edfd2b3b check the range of message numbers in imap_uid. 2000-09-09 20:26:15 +00:00
Andrei Zmievski eb12dfc9e5 Fix attribution. 2000-09-09 16:24:06 +00:00
Zeev Suraski bc00916346 Update NEWS 2000-09-09 16:01:40 +00:00
Zeev Suraski 4acff8f37f Don't use unsafe sprintf() 2000-09-09 15:06:38 +00:00
Zeev Suraski b7ecaacd07 More security-related (control) patches:
- Avoid displaying errors during startup, unless display_startup_errors is enabled.
- Implemented post_size_max limit.  Defaults to 8MB.
- Implemented file_uploads on/off directive (defaults to on).
2000-09-09 15:02:15 +00:00
Derick Rethans 242139d5ac - Fix for bug #6586 2000-09-09 12:24:20 +00:00
Stig Venaas f802468c2a More restrictive getaddrinfo check, better not find it than breaking builds 2000-09-09 12:09:43 +00:00
Zeev Suraski 3115a0ccfe Fix UNIX build 2000-09-09 12:02:31 +00:00
Zeev Suraski 67f59f7b40 Check for mkstemp() 2000-09-09 11:54:04 +00:00
Zeev Suraski 6c4cb4c079 Security related updates:
- Introduce php_open_temporary_file(), in place of tempnam().  Still
  needs testing under UNIX (mkstemp()), works reliably under Windows now.
- Reimplement the mechanism for unlinking uploaded files at the end of the request
  (was it ever tested?).  Files moved with move_uploaded_file() will not be unlink()'d
  again, to avoid (albeit very unlikely) race conditions.
2000-09-09 11:41:14 +00:00
Jouni Ahto 20fe0a5685 Fixed #6627. Wrong logic... 2000-09-09 09:40:16 +00:00
Stig Bakken 971f8b0881 @Added a more configurable error reporting interface to DB.
Added a more configurable error reporting interface to DB.
Also added some more tests, and moved the DB tests to pear/DB/tests.
#Usage example that prints and exits on every error:
#$dbh = DB::connect($dsn);
#$dbh->setErrorHandling(PEAR_ERROR_DIE);
#
#Example with plain callback function:
#$dbh->setErrorHandling(PEAR_ERROR_CALLBACK, "errorHandler");
#
#Example with object callback function:
#$dbh->setErrorHandling(PEAR_ERROR_CALLBACK, array($obj, "errorHandler"));
#
#Handler functions/methods are called with the error object as a parameter.
#
2000-09-09 02:39:56 +00:00
Stig Bakken 7918735b11 * compile fix 2000-09-09 01:15:50 +00:00
8d24db9ac0 ChangeLog update 2000-09-09 01:09:05 +00:00
Stig Bakken e2cb8ec02c * don't require "POST" section to be present (TEST, FILE and EXPECT
are enough)
2000-09-09 00:37:39 +00:00
Zeev Suraski 3edf46ff73 Implement move_uploaded_file() (untested) 2000-09-08 22:31:21 +00:00
Zeev Suraski fa6bb59773 Fix build 2000-09-08 22:26:07 +00:00
Andrei Zmievski b409d2f9ea is_uploaded_file() is probably a better name. 2000-09-08 21:58:28 +00:00
Zeev Suraski 75086e3088 - Implemented is_upload_file() 2000-09-08 21:56:47 +00:00
Jon Parise 9a4c654606 Fix build after last commit. 2000-09-08 15:39:42 +00:00
Zeev Suraski 91c808ecc4 Restore the headers_only test to the centralized SAPI startup. If necessary, it can
be overriden in the activate() callback.
2000-09-08 14:43:57 +00:00
Stanislav Malyshev d10336ec0e Don't trust snprintf return 2000-09-08 13:19:51 +00:00
Stanislav Malyshev 522aec4443 Never trust snprintf return value 2000-09-08 12:52:05 +00:00
Stanislav Malyshev 6426d1c9ce Fix crash on very long error messages
Manual for snprintf says:
       If  the output was truncated, the return value is -1, oth-
       erwise it is the number of characters stored, not  includ-
       ing the terminating null.
And that's a blatant lie - in reality, libc 2.1 always returns number of
characters that _would be_ stored. I hate those libc bugs. Now we should go
and check every place we trusted snprintf return value.
2000-09-08 12:32:29 +00:00
foobar 24b2feff63 Fixed typo. Changed php3_error to php_error. 2000-09-08 12:28:00 +00:00
Stanislav Malyshev df5e0cb0a5 Fix syslog call 2000-09-08 12:07:21 +00:00
foobar 4f0842663f Changed // to /* */ comments. 2000-09-08 11:50:24 +00:00
Stanislav Malyshev 85f42b7f7a Since we don't allow parameters for syslog, we shouln't pass the
string as format
2000-09-08 11:24:08 +00:00
Andi Gutmans 9b1aed8323 - Add another ..\ to the TSRM search path 2000-09-08 08:17:17 +00:00
Andi Gutmans ed8c8539df - Add TSRM to the apache workspace include path 2000-09-08 08:15:25 +00:00
Uwe Steinmann 81fb5a7682 - last parameter of pdf_get_parameter(), pdf_get_value() optional
- fixes to make it compile with sun cc
2000-09-08 06:47:04 +00:00
b0d0a483cc ChangeLog update 2000-09-08 01:09:11 +00:00
51bc85ce5f NEWS update 2000-09-08 01:09:08 +00:00
Derick Rethans f501979c33 - The mcrypt extension also works with 2.4.4 since php 4.0.2 2000-09-07 21:28:28 +00:00
Stig Venaas f68fb8fad2 Better IPv6 checking 2000-09-07 17:56:12 +00:00
Stanislav Malyshev 662c6c6c06 Fix readdir bug in libc5
@Fix readdir bug in libc5
# If libc5 receives 0 in *result of readdir_r, it just returns error
# That's a clear bug, so this is a workaround.
2000-09-07 17:55:53 +00:00
Andrei Zmievski 0fddc30b7a - Converted __string_value() to toString(), since the former is obsolete.
- Made sure DB results are freed where necessary.
- Made DB::getAssoc() use $params if passed.
- Implemented DB::getAll().
2000-09-07 16:36:22 +00:00
Andrei Zmievski 80aa02a197 Wrap long lines. 2000-09-07 15:40:44 +00:00
Andi Gutmans e17614722d - 2000-09-07 15:38:22 +00:00
Andi Gutmans fe434a05b4 - Fix crash bug on NetBSD and OpenBSD. MAXPATHLEN didn't get defined
correctly and caused a stack overrun. This was *hard* to debug.
2000-09-07 15:31:29 +00:00
Andi Gutmans 204f4adca7 - Smarter detection of MAXPATHLEN 2000-09-07 15:20:29 +00:00
Andi Gutmans f390d7e2ab - Get rid of build warning on Windows 2000-09-07 14:11:38 +00:00
Thies C. Arntzen e5d8f20f17 make ZTS mode compile 2000-09-07 12:32:47 +00:00
Zeev Suraski 677d4b9913 Send $HTTP_POST_FILES to the right place 2000-09-07 04:12:31 +00:00
51a4b2411d ChangeLog update 2000-09-07 01:09:04 +00:00
Andi Gutmans b8a95da22a - Centralize some configuration stuff
- Use inline in my strtok_r implementation
2000-09-06 20:27:12 +00:00
Andi Gutmans 180c337885 - Save two lines 2000-09-06 18:42:06 +00:00
Andi Gutmans 6d32e7e59b - Fix header 2000-09-06 18:38:36 +00:00
Sascha Schumann 5669b2dd26 Unless overwritten, default to no optimization in debug mode. 2000-09-06 18:37:39 +00:00
Sascha Schumann 4d2515d6be 4.0.3-dev 2000-09-06 16:52:33 +00:00
Sascha Schumann 89a2e1dbdb Add TSRM include dirs 2000-09-06 15:41:40 +00:00
Sascha Schumann cb410a2f3c Convert some more "complex" expressions manually to Z_* macros. 2000-09-06 14:25:47 +00:00
Sascha Schumann 5bbddee81e Rename symbols whose first character was an underscore. 2000-09-06 14:16:12 +00:00
Sascha Schumann 4fb5088f89 Convert to Z_* macros 2000-09-06 14:13:31 +00:00
Sascha Schumann 8dad7a5cab A little script for converting source files to the Z_* macros 2000-09-06 14:12:53 +00:00
Thies C. Arntzen 573fe4346d fix #6552 & #6577
thanx to Blake Schwendiman" <blake@intechra.net>
2000-09-06 13:50:09 +00:00
Daniel Beulshausen 81daa0899e deleted unnecessary defines
i also plan to let windows build with crypt() support
2000-09-06 10:00:34 +00:00
Daniel Beulshausen 0d8812b15c added LIBGD define
# what's with the 'PHPAPI' on line 274 in gd.c, should it get exported?
# it currently breaks the windows build
2000-09-06 09:53:05 +00:00
Daniel Beulshausen 57a0fcbe00 fixed debug build and removed dsw 2000-09-06 09:37:04 +00:00
Daniel Beulshausen 3f6536d2b8 fix build 2000-09-06 09:15:31 +00:00
Daniel Beulshausen 2ffdb3cda4 little fix for the debug extension 2000-09-06 09:10:50 +00:00
Zeev Suraski bfa301dfd0 Fix ordering 2000-09-06 04:56:22 +00:00
ab111470ce ChangeLog update 2000-09-06 01:09:10 +00:00
abdc36cafd NEWS update 2000-09-06 01:09:07 +00:00
Sascha Schumann 4eb2481830 Why make it more complex than necessary?
These changes should have been committed right after Zeev made the
original change to use the PHP_INI system months ago.

Instead of working around the system, we make proper use of it now.

This includes using php_alter_ini_entry(), so that we change the values
in the php_ps_globals struct indirectly.
2000-09-06 00:50:01 +00:00
Stanislav Malyshev 795083a15c Now it should not crash, though still leaks
# I'll continue with it tomorrow
2000-09-05 22:42:45 +00:00
Zeev Suraski dd0ade23cf This fix wasn't quite right and is no longer necessary after the recent php_ini optimizations 2000-09-05 21:31:56 +00:00
Zeev Suraski 12adebbc3a - Fix leak
- Remove redundant php_ini code
2000-09-05 21:18:00 +00:00
Zeev Suraski 4647bbb71a broken logic fixed. I'm getting old 2000-09-05 20:50:41 +00:00
Stanislav Malyshev 20a6474eae Fix crash
# This is getting worse... Seems that more work is needed
2000-09-05 19:29:03 +00:00
Zeev Suraski eb32144902 - Remove track_vars - it is now always on
- Make the various $HTTP_*_VARS[] arrays be defined always,
  even if they're empty
- Fix Win32 build and warnings
2000-09-05 19:06:29 +00:00
Stanislav Malyshev 3c45b97804 Try to fix session INI variables handling
This should also fix #6538.
# This code gets really hairy, I do not like it,
# but it's the only working thing I could come with.
# If original creator reviews and cleans it up, it'd be great
2000-09-05 18:41:46 +00:00
Stanislav Malyshev 3fb701add0 More fixes fo ini_ handling functions 2000-09-05 18:33:02 +00:00
Colin Viebrock 6f59f8b078 str_repeat() should be able to handle multipliers of 0 gracefully, IMHO ...
Hope no one disagrees. :)
2000-09-05 18:25:58 +00:00
Danny Heijl 81ddcd0b2b - back out unneeded patch (danny). 2000-09-05 18:22:01 +00:00
Andi Gutmans 715774bed7 - Commiting Sterling's new multi_convert* functions 2000-09-05 17:55:57 +00:00
Stig Venaas d57e56ab4c using emalloc and efree, instead of malloc and free 2000-09-05 17:37:44 +00:00
Rasmus Lerdorf 4a22d2e832 Add EscapeShellArg() function which turns a b into 'a b' and
a'b into 'a'\''b'
@Add EscapeShellArg() function (Rasmus)
2000-09-05 16:55:32 +00:00
Stig Venaas 24633f5987 renamed hostconnect() to php_hostconnect() 2000-09-05 16:36:56 +00:00
Stig Venaas b83427db64 using the new hostconnect() for the http wrapper 2000-09-05 15:59:08 +00:00
Stig Venaas 504d44366c Added check for getaddrinfo() 2000-09-05 15:35:52 +00:00
Andrei Zmievski 0fd8685c64 Fix memory overrun. 2000-09-05 14:58:14 +00:00
Stanislav Malyshev be83e732af Fix ini_restore variable length 2000-09-05 14:23:16 +00:00
Stig Venaas 4a7f22123f hostconnect now supports IPv6 if getaddrinfo exists, and also tries to
connect to all addresses of a host before giving up. It should also be
thread safe when using getaddrinfo.
2000-09-05 13:56:11 +00:00
Stanislav Malyshev 951eb9079c Fix crash with trigger_error having no args (#6549) 2000-09-05 12:08:41 +00:00
foobar a58406c030 Missed the Zend..fixed. 2000-09-05 05:25:33 +00:00
Sterling Hughes 6d53c16775 Add:
Support for multiple processors (re-using the old one).
	Support for basic functions when a processor is in use.
2000-09-05 01:12:10 +00:00
fd3a436bd3 ChangeLog update 2000-09-05 01:09:15 +00:00
89e6de2308 NEWS update 2000-09-05 01:09:12 +00:00
Sterling Hughes 9a2726e208 This should fix the multiple-line problem. 2000-09-05 00:26:15 +00:00
Zeev Suraski efdd39207c Protect arrays as well. 2000-09-04 22:26:01 +00:00
Sterling Hughes ade2c31625 Add the session.use_trans_sid option to php.ini file. 2000-09-04 22:22:16 +00:00
Sterling Hughes 9f86ff884f @Add a php.ini option session.use_trans_sid to enable/disable trans-sid. (Sterling) 2000-09-04 22:21:10 +00:00
Zeev Suraski 5dca99232e Prevent exploit in [tmp_name] as well 2000-09-04 22:05:00 +00:00
Zeev Suraski 60825fab88 Fix the logic. Tested. 2000-09-04 21:23:41 +00:00
Danny Heijl 95d92b8be0 - remove a memory leak warning and fix a crash when tempnam()
failed for some reason (danny).
2000-09-04 21:18:07 +00:00
Zeev Suraski 388170ffa5 3rd time's a charm 2000-09-04 20:47:52 +00:00
Zeev Suraski 4396093666 Fix ISAPI compilation 2000-09-04 20:46:46 +00:00
Zeev Suraski b47050630b Fix the fix 2000-09-04 20:46:10 +00:00
Zeev Suraski 925f7854bb update NEWS 2000-09-04 20:33:33 +00:00
Zeev Suraski ed453cc9b4 Fix the file upload security problem with no side effects (untested) 2000-09-04 19:07:50 +00:00
Sascha Schumann 96128460b7 Include "php.h", otherwise we don't have access to the PHP and autoconf
macros.
2000-09-04 12:58:08 +00:00
Rasmus Lerdorf 43fefff150 Quick-fix for the file upload security alert
@Quick-fix for the file upload security alert (Rasmus)
2000-09-04 05:09:46 +00:00
Andi Gutmans 6bfed632c7 - This shouldn't have been commited.
There are quite a few modules which are using VIRTUAL_DIR. I don't think
  this should be happening.
2000-09-04 04:22:47 +00:00
Andi Gutmans 07cfd5754e - Added macros 2000-09-04 04:18:38 +00:00
Andi Gutmans 341a0d465a - Found my bug and managed to move the V_* macros to TSRM 2000-09-04 04:18:04 +00:00
Andi Gutmans 85181ac512 - Remove two tabs 2000-09-04 04:02:17 +00:00
Sterling Hughes 3ed5b2dadd Convert 2 internal functions to follow naming conventions.
Revert small patch made earlier
2000-09-04 03:49:58 +00:00
2c051912b3 ChangeLog update 2000-09-04 01:09:12 +00:00
c33ddea610 NEWS update 2000-09-04 01:09:09 +00:00
foobar b48b561b97 oops. 2000-09-03 21:14:50 +00:00
foobar e5394bbafe This makes flex and bison not to add those #line directives which
cause trouble with some compilers.
2000-09-03 21:07:10 +00:00
Sterling Hughes 6a5ee2a538 If the user wants to use more than one handle reuse the old handle. 2000-09-03 19:58:12 +00:00
Andi Gutmans e47d4fe249 - Increase buffers of output buffering to 40KB and 10KB increments which
makes more sense when web pages are typically like 10KB-20KB.
  I think it would be best to change the reallocation algorithm at least to
  redoubling when it's full instead of incrementing and possibly use
  a data structure similar to Zend/zend_static_allocator which uses memory
  blocks and not realloc().
2000-09-03 19:57:06 +00:00
Andi Gutmans 799a00f19a - Before removing php_virtual_cwd.[ch] #if 0 them to make sure nothing
is broken by this.
2000-09-03 19:44:35 +00:00
Andi Gutmans 4a17400b0a - Remove php_virtual_cwd.[ch] from Windows project 2000-09-03 19:43:09 +00:00
Stig Venaas f0962c33a1 Added timeout argument, but not used yet 2000-09-03 19:12:28 +00:00
Andi Gutmans 1109b9ab57 - More TSRM work 2000-09-03 18:58:46 +00:00
Andi Gutmans da19ff78f3 - Add new files to TSRM windows project 2000-09-03 18:49:35 +00:00
Andi Gutmans 03432bf61f - Make TSRM work on Windows. 2000-09-03 18:47:35 +00:00
Andi Gutmans 6c6471b160 - Move to virtual cwd in TSRM 2000-09-03 18:45:02 +00:00
Andi Gutmans daf926cf5b - Move virtual cwd to TSRM.
In the least this still doesn't work on Windows.
2000-09-03 18:18:13 +00:00
Derick Rethans b378ecda30 - Changed appname from "PHP 3.0" to "PHP 4.0"
Fix for #6517
2000-09-03 17:43:13 +00:00
Zeev Suraski 2183e2b0be Make gcc happy 2000-09-03 15:58:50 +00:00
Zeev Suraski 48f13455be Fix init bug 2000-09-03 15:56:54 +00:00
Sterling Hughes 7089540ec7 Just when you got something working they decide to change the API
on you :-).
2000-09-03 14:03:51 +00:00
Sterling Hughes ce71143fd0 ucd -> sablot. 2000-09-03 13:31:45 +00:00
Sterling Hughes 89b77bfb47 @-Add the Sablotron extension for XSL parsing. (Sterling)
Folks, features include:

- Output Buffering Tie-ins
- Optional Descriptive error reporting (compile option)
- String Transformations
- File Transformations
- Logging
- SAX XML Processing support (slightly different from expat, even though
Sablotron uses expat to do the parsing.)
2000-09-03 13:00:08 +00:00
Stanislav Malyshev f34430de8a Remove deprecated call-time reference 2000-09-03 09:37:20 +00:00
Stig Venaas 7f8917932f Added network.c 2000-09-03 09:34:33 +00:00
Stig Venaas ad95450fc4 To be included by code using functions in network.c 2000-09-03 09:33:14 +00:00
Stanislav Malyshev a103b94876 Fix quoted_printable_decode (also should fix #6511) 2000-09-03 09:31:25 +00:00
Stig Venaas c94933b2fa Network related functions, only for internal use by other PHP code. Tries
to hide the details of address families/protocols, and to reduce duplication
of code.
2000-09-03 09:30:41 +00:00
Stanislav Malyshev bdde2b4303 Remove deprecated call-time reference 2000-09-03 09:12:22 +00:00
Stanislav Malyshev a6aef18606 tests look for skipif.inc, so add it 2000-09-03 09:11:25 +00:00
foobar 436ca5d9bb @- Fixed a bug in checkdate() which caused < 1 years to be valid (Jani)
# Bug #6254
2000-09-03 04:09:48 +00:00
foobar a666910848 Fixed bug #6409.
# And propably numerous other..? Either I am wrong or the documentation is.
2000-09-03 03:50:59 +00:00
6ff7c9afd8 ChangeLog update 2000-09-03 01:09:09 +00:00
459052572f NEWS update 2000-09-03 01:09:06 +00:00
Andi Gutmans 299d1295b6 - Remove another TSRM->Zend dependency 2000-09-02 18:40:41 +00:00
Zeev Suraski cf8e389799 @- Added support for an optional output handler function for output
@  buffering.  This enables transparent rendering of XML through XSL,
@  transparent compression, etc. (Zeev)
2000-09-02 18:03:58 +00:00
Andi Gutmans 77b55ad07d - Revert change of defining TSRM_WIN32 in dsp 2000-09-02 16:28:50 +00:00
Andi Gutmans 570e7e9a13 - Defining TSRM_WIN32 in each and every dsp sucked. Revert this change 2000-09-02 16:28:25 +00:00
Andi Gutmans 97d509cc95 - Get rid of unused code and stop including PHP's win95nt.h 2000-09-02 16:08:24 +00:00
Andi Gutmans 5bc9f72e85 - More Windows build fixes 2000-09-02 16:02:53 +00:00
Andi Gutmans 8d7faf6c12 - Fix windows build 2000-09-02 15:56:18 +00:00
Sam Ruby 0240a571c8 Unitialized variable causes trap on Windows 2000-09-02 15:54:18 +00:00
Andi Gutmans 622b72086b - indent before someone shoots me 2000-09-02 15:26:13 +00:00
Andi Gutmans 5f3d935920 - Change TSRM_OTHER macro to TSRM_THREADS as it should be only to check
for threads
2000-09-02 15:24:18 +00:00
Andi Gutmans a8656beb34 - Make TSRM compile stand-alone again 2000-09-02 15:11:45 +00:00
Andi Gutmans d6d8b51b2c - Define TSRM_WIN32 in Windows dsp 2000-09-02 15:04:57 +00:00
Andi Gutmans 92cfa27ff0 - Use TSRM_WIN32 2000-09-02 15:03:19 +00:00
Sam Ruby f2b0015c9b Allow TSRM to be built on Windows platforms 2000-09-02 14:39:48 +00:00
99a2d5856d ChangeLog update 2000-09-02 01:09:11 +00:00
8d5fe920a5 NEWS update 2000-09-02 01:09:08 +00:00
David Eriksson 5029ae9fe2 # corrected my e-mail address 2000-09-01 22:29:04 +00:00
David Eriksson 2ad0310fd3 - Initial submission of CORBA extension for PHP: Satellite 2000-09-01 22:10:15 +00:00
Andrei Zmievski cd8af6aa44 @- Added support for user defined 'tick' callback functions. This helps
@  emulate background processing. (Andrei)
2000-09-01 16:10:17 +00:00
Sascha Schumann 607486391a Extend HTTP headers for private-caching and add a new PHP function
session_cache_limiter.

Submitted by: Jon Parise <jon@csh.rit.edu>
2000-09-01 15:56:26 +00:00
Sascha Schumann d11012e2c9 s/PATH_MAX/MAXPATHLEN/ 2000-09-01 15:47:53 +00:00
Sascha Schumann 1b5fff695d Speed up standard php encoding function and add new php_binary serializer. 2000-09-01 15:24:58 +00:00
Zeev Suraski e065c308e9 - Fix dir.c
- Begin cleanup of php_error_cb()
2000-09-01 12:06:52 +00:00
Sascha Schumann df273c9d01 Hopefully last round of fixing varargs use.
We don't need to create the log message twice, and by doing it only
once we also avoid the orig_args trap.
2000-09-01 09:54:32 +00:00
Sascha Schumann d60799bf6b Solaris/x86 insists of having a large buffer for storing the result of
readdir_r(), otherwise it will segfault.

PR: #6479
2000-09-01 09:38:19 +00:00
fd49c6ff05 ChangeLog update 2000-09-01 01:09:09 +00:00
0a004934d4 NEWS update 2000-09-01 01:09:06 +00:00
Andi Gutmans f826cc3bdd - This should fix the performance problem with Release builds 2000-08-31 23:49:36 +00:00
Andi Gutmans 3d95c23c96 - Support for always building TSRM into PHP 2000-08-31 23:44:10 +00:00
Andi Gutmans 7ee05bc6b0 - Always include TSRM in PHP build. This will enable us to move virtual
- cwd to TSRM.
- BTW, if I comile with --enable-experimental-zts not from php4/ but from
- php4/cgi (ran ../configure there) then the build doesn't work also b4
- this patch.
2000-08-31 23:43:51 +00:00
Andi Gutmans 27de50012b - Use emalloc() for opened_path now. This was a potential leak before.
- This patch has potential to break stuff but I tested it as much as I
- could. Fixes should be easy.
2000-08-31 22:24:20 +00:00
Stig Bakken 1bb90f5805 * all tests should pass now (expect for the interbase stuff that I haven't
had the chance to test)
2000-08-31 22:21:47 +00:00
Andi Gutmans 88979a11c1 *** empty log message *** 2000-08-31 19:52:34 +00:00
Andi Gutmans 1b282b3521 - Remove support for __string_value() in print $obj 2000-08-31 19:50:19 +00:00
Andi Gutmans e8e5c9d97e - Remove redundant IS_SLASH
- Reverse config.w32.h patches
- Use IS_ABSOLUTE_PATH() in one place in fopen-wrappers.c
2000-08-31 19:49:36 +00:00
Frank M. Kromann be78a31e2b Attemt to fix a lot of bug reports (5582,5614,5633,60,6181,6202) on crashes with php and mssql server. 2000-08-31 19:25:31 +00:00
Andi Gutmans a2ea62d4c9 - Change license of .c and .h files of TSRM. It's still not the complete
- text like in the PHP headers because we don't have it on the web yet but
- it should be enough to allow Sascha to touch TSRM :)
2000-08-31 19:02:14 +00:00
Stig Venaas 6e849e833f Added detection of Netscape LDAP SDK 4.1 2000-08-31 16:46:33 +00:00
Stanislav Malyshev ed3c85261b Make main.c compile again 2000-08-31 16:15:31 +00:00
Stig Venaas 6910e92132 removed some NSLDAP #if's giving more detailed error reporting 2000-08-31 16:14:35 +00:00
Zeev Suraski 0bc2bb05d4 Safer shutdown process. Continue to shut down even if we bail out in the middle of a certain part. 2000-08-31 16:02:51 +00:00
Zeev Suraski 99af3ed8ef Safer shutdown process 2000-08-31 16:01:31 +00:00
Hénot David a0084d5af9 Made ingres extension use --with--ingres instead of --with-ii.
Andi actualy changed only the help line.
2000-08-31 15:10:16 +00:00
Andrei Zmievski 4285af4244 @- Fixed problem with having $this as the XML parser object. (Andrei) 2000-08-31 14:09:59 +00:00
0deb623127 ChangeLog update 2000-08-31 01:09:06 +00:00
Daniel Beulshausen 0b33c074a6 updated with db and mhash 2000-08-30 21:14:17 +00:00
Daniel Beulshausen 74b394640d dsp for mhash
# guess i'll have to add some readme's soon...
2000-08-30 21:11:09 +00:00
Daniel Beulshausen 95ee791d97 should be easier when compiling the modules 2000-08-30 21:07:16 +00:00
Daniel Beulshausen 3522012bb2 dsp for the db(m) extension 2000-08-30 21:05:50 +00:00
Andi Gutmans ca5e0330ca - Missed a space 2000-08-30 20:32:29 +00:00
Andi Gutmans 4a2fa70fc9 - Fix bug when using safe_mode and doc_root together 2000-08-30 20:31:17 +00:00
Zeev Suraski 47f8af85f5 This is no longer relevant... 2000-08-30 18:06:17 +00:00
Zeev Suraski 0e482b1b30 - Truly fix varargs handling - the current situation was a sure-fire crash in most platforms
(the older code worked, even though it didn't compile well for some very odd reason, probably
  a compiler bug;  The new code would cause PHP to crash if both display_errors/log_errors and
  track_errors were enabled)
2000-08-30 18:02:00 +00:00
Colin Viebrock 9d62ac18ce more info for phpinfo() 2000-08-30 15:52:07 +00:00
Colin Viebrock 461f50d50d Remove single quote from HTMLSpecialChars() ... use addslashes(),
htmlentities(), strtr() instead.
2000-08-30 15:27:23 +00:00
Andrei Zmievski af71ec7915 Removing placeholder. 2000-08-30 13:09:08 +00:00
Stig Bakken 168f1aacef * added regression tests for the XML extension 2000-08-30 01:58:58 +00:00
694e04bb39 ChangeLog update 2000-08-30 01:09:10 +00:00
7e86b6b305 NEWS update 2000-08-30 01:09:07 +00:00
Andrei Zmievski ee222667e3 Start on 4.0.3-dev. [placeholder] in NEWS is for automated nightly NEWS
file update script, it'll be removed after the first entry is there.
2000-08-29 19:44:44 +00:00
1463 changed files with 201251 additions and 99087 deletions

No files matched your search

+93 -24
View File
@@ -5,8 +5,9 @@ PHP Coding Standards
This file lists several standards that any programmer, adding or changing
code in PHP, should follow. Since this file was added at a very late
stage of the development of PHP v3.0, the code base does not (yet) fully
follow it, but it's going in that general direction.
This is an initial version - it'll most probably grow as time passes.
follow it, but it's going in that general direction. Since we are now
well into the version 4 releases, many sections have been recoded to use
these rules.
Code Implementation
@@ -43,9 +44,9 @@ Exceptions:
for efficiency and in order for them to be binary-safe.
Functions that change strings and obtain their new lengths while
doing so, should return that new length, so it doesn't have to be
recalculated with strlen() (e.g. _php3_addslashes())
recalculated with strlen() (e.g. php_addslashes())
[5] Use php3_error() to report any errors/warnings during code execution.
[5] Use php_error() to report any errors/warnings during code execution.
Use descriptive error messages, and try to avoid using identical
error strings for different stages of an error. For example,
if in order to obtain a URL you have to parse the URL, connect,
@@ -63,24 +64,57 @@ Exceptions:
Naming Conventions
------------------
[1] Function names for user functions implementation should be prefixed with
"php3_", and followed by a word or an underscore-delimited list of words,
in lowercase letters, that describes the function.
[1] Function names for user-level functions should be enclosed with in
the PHP_FUNCTION() macro. They should be in lowercase, with words
underscore delimited, with care taken to minimize the letter count.
Abbreviations should not be used when they greatly decrease the
readability of the function name itself.
[2] Function names used by user functions implementations should be prefixed
with "_php3_", and followed by a word or an underscore-delimited list of
Good:
'mcrypt_enc_self_test'
'mysql_list_fields'
Ok:
'mcrypt_module_get_algo_supported_key_sizes'
(could be 'mcrypt_mod_get_algo_sup_key_sizes'?)
'get_html_translation_table'
(could be 'html_get_trans_table'?)
Bad:
'hw_GetObjectByQueryCollObj'
'pg_setclientencoding'
'jf_n_s_i'
[2] If they are part of a "parent set" of functions, that parent should
be included in the user function name, and should be clearly related
to the parent program or function family. This should be in the form
of parent_*.
A family of 'foo' functions, for example:
Good:
'foo_select_bar'
'foo_insert_baz'
'foo_delete_baz'
Bad:
'fooselect_bar'
'fooinsertbaz'
'delete_foo_baz'
[3] Function names used by user functions should be prefixed
with "_php_", and followed by a word or an underscore-delimited list of
words, in lowercase letters, that describes the function. If applicable,
they should be declared 'static'.
[3] Variable names must be meaningful. One letter variable names must be
[4] Variable names must be meaningful. One letter variable names must be
avoided, except for places where the variable has no real meaning or
a trivial meaning (e.g. for (i=0; i<100; i++) ...).
[4] Variable names should be in lowercase; Use underscores to seperate
[5] Variable names should be in lowercase; Use underscores to seperate
between words.
Syntax and indentation
----------------------
@@ -94,25 +128,32 @@ Syntax and indentation
is known to accept C++-style comments in C code.
[2] Use K&R-style. Of course, we can't and don't want to
force anybody to use a style she's not used to, but
force anybody to use a style he or she is not used to, but,
at the very least, when you write code that goes into the core
of PHP or one of its standard modules, please maintain the K&R
style. This applies to just about everything, starting with
indentation and comment styles and up to function decleration
syntax.
[3] Be generous with whitespace and braces. Always prefer
if (foo) {
[3] Be generous with whitespace and braces. Always prefer:
if (foo) {
bar;
}
to
to:
if(foo)bar;
Keep one empty line between the variable decleration section and
the statements in a block, as well as between logical statement
groups in a block. Maintain at least one empty line between
two functions, preferably two.
[4] When indenting, use the tab character. A tab is expected to represent
four spaces. It is important to maintain consistency in indenture so
that definitions, comments, and control structures line up correctly.
Documentation and Folding Hooks
-------------------------------
@@ -123,17 +164,17 @@ function does. It would look like this:
/* {{{ proto int abs(int number)
Return the absolute value of the number */
void php3_abs(INTERNAL_FUNCTION_PARAMETERS) {
PHP_FUNCTION(abs)
{
...
}
/* }}} */
The {{{ symbols are the default folding symbols for the folding mode in
Emacs. vim will soon have support for folding as well. Folding is very
useful when dealing with large files because you can scroll through the
file quickly and just unfold the function you wish to work on. The }}}
at the end of each function marks the end of the fold, and should be on
a separate line.
Emacs and vim (set fdm=marker). Folding is very useful when dealing with
large files because you can scroll through the file quickly and just unfold
the function you wish to work on. The }}} at the end of each function marks
the end of the fold, and should be on a separate line.
The "proto" keyword there is just a helper for the doc/genfuncsummary script
which generates a full function summary. Having this keyword in front of the
@@ -143,7 +184,35 @@ messing up the function summary.
Optional arguments are written like this:
/* {{{ proto object imap_header(int stream_id, int msg_no [, int from_length [, int subject_length [, string default_host]]])
Returns a header object with the defined parameters. */
And yes, please keep everything on a single line, even if that line is massive.
And yes, please keep the prototype on a single line, even if that line
is massive.
New and Experimental Functions
-----------------------------------
To reduce the problems normally associated with the first public
implementation of a new set of functions, it has been suggested
that the first implementation include a file labeled 'EXPERIMENTAL'
in the function directory, and that the functions follow the
standard prefixing conventions during their initial implementation.
The file labelled 'EXPERIMENTAL' should include the following
information:
Any authoring infomration (known bugs, future directions of the module).
Ongoing status notes which may not be appropriate for CVS comments.
Aliases & Legacy Documentation
-----------------------------------
You may also have some deprecated aliases with close to duplicate
names, for example, somedb_select_result and somedb_selectresult. For
documentation puposes, these will only be documented by the most
current name, with the aliases listed in the documentation for
the parent function. For ease of reference, user-functions with
completely different names, that alias to the same function (such as
highlight_file and show_source), will be separately documented. The
proto should still be included, describing which function is aliased.
Backwards compatible functions and names should be maintained as long
as the code can be reasonably be kept as part of the codebase. See
/phpdoc/README for me information on documentation.
+1 -2
View File
@@ -1,3 +1,2 @@
For the list of people who've put work into PHP 4.0, please see
http://www.php.net/version4/credits.php
http://www.php.net/credits.php
+16453 -26136
View File
File diff suppressed because it is too large. Load diff
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+86 -13
View File
@@ -109,7 +109,7 @@ STATUS: Experimental
SINCE: 4.0.2
-------------------------------------------------------------------------------
EXTENSION: interbase
PRIMARY MAINTAINER: Jouni Ahto <jah@mork.net>
PRIMARY MAINTAINER: Jouni Ahto <jouni.ahto@exdec.fi>
MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
@@ -128,7 +128,7 @@ MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: pgsql
PRIMARY MAINTAINER: Jouni Ahto <jah@mork.net>
PRIMARY MAINTAINER: Jouni Ahto <jouni.ahto@exdec.fi>
MAINTENANCE: Odd fixes
STATUS: Working
-------------------------------------------------------------------------------
@@ -141,7 +141,7 @@ MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: oci8
PRIMARY MAINTAINER: Thies C. Arntzen <thies@digicol.de>
PRIMARY MAINTAINER: Thies C. Arntzen <thies@thieso.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
@@ -152,7 +152,7 @@ STATUS: Working
COMMENT: Working except for persistent connections
-------------------------------------------------------------------------------
EXTENSION: oracle
PRIMARY MAINTAINER: Thies C. Arntzen <thies@digicol.de>
PRIMARY MAINTAINER: Thies C. Arntzen <thies@thieso.net>
MAINTENANCE: Maintained
STATUS: Working
COMMENT: Using the new OCI8 driver is encouraged where possible.
@@ -171,6 +171,12 @@ EXTENSION: bcmath
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: bz2
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 4.0.3
-------------------------------------------------------------------------------
EXTENSION: calendar
MAINTENANCE: Unknown
STATUS: Unknown
@@ -184,10 +190,15 @@ PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: CURL
EXTENSION: crack
MAINTENANCE: Unknown
STATUS: Experimental
SINCE: 4.0.5
-------------------------------------------------------------------------------
EXTENSION: curl
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
STATUS: Working
SINCE: 4.0.2
-------------------------------------------------------------------------------
EXTENSION: cybercash
@@ -228,6 +239,11 @@ EXTENSION: gettext
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: gmp
MAINTENANCE: Unknown
STATUS: Unknown
SINCE: 4.0.4
-------------------------------------------------------------------------------
EXTENSION: icap
MAINTENANCE: Unknown
STATUS: Obsolete
@@ -256,13 +272,25 @@ EXTENSION: mcrypt
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
MAINTENANCE: Maintained
STATUS: Working
COMMENT: Currently working only with libmcrypt 2.7.7 and earlier
-------------------------------------------------------------------------------
EXTENSION: mhash
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: muscat
PRIMARY MAINTAINER: Sam Liddicott <sam@ananova.com>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 4.0.5
COMMENT: Not tested against windows, only core API completed, rest under development
-------------------------------------------------------------------------------
EXTENSION: openssl
PRIMARY MAINTAINER: Wez Furlong <wez@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
SINCE: 4.0.4
-------------------------------------------------------------------------------
EXTENSION: pcre
PRIMARY MAINTAINER: Andrei Zmievski <andrei@ispi.net>
MAINTENANCE: Maintained
@@ -284,12 +312,24 @@ PRIMARY MAINTAINER: Kristian K
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: printer
PRIMARY MAINTAINER: Daniel Beulshausen <daniel@php4win.de>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 4.0.4
COMMENT: Only for Win32
-------------------------------------------------------------------------------
EXTENSION: pspell
PRIMARY MAINTAINER: Vlad Krupin <phpdevel@echospace.com>
MAINTENANCE: Unknown
STATUS: Unknown
SINCE: 4.0.2
-------------------------------------------------------------------------------
EXTENSION: qtdom
MAINTENANCE: Unknown
STATUS: Experimental
SINCE: 4.0.4
-------------------------------------------------------------------------------
EXTENSION: readline
MAINTENANCE: Unknown
STATUS: Unknown
@@ -299,11 +339,29 @@ PRIMARY MAINTAINER: Kristian K
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: sablot
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
SINCE: 4.0.3
-------------------------------------------------------------------------------
EXTENSION: satellite
PRIMARY MAINTAINER: David Eriksson <eriksson@php.net>
MAINTENANCE: Odd Fixes
STATUS: Experimental
SINCE: 4.0.3
-------------------------------------------------------------------------------
EXTENSION: session
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: shmop
PRIMARY MAINTAINER: Unknown
MAINTENANCE: Unknown
STATUS: Experimental
SINCE: 4.0.3
-------------------------------------------------------------------------------
EXTENSION: snmp
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
MAINTENANCE: Odd Fixes
@@ -311,14 +369,15 @@ STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: sockets
PRIMARY MAINTAINER: Chris Vandomelen <chrisv@b0rked.dhs.org>
MAINTENANCE: Unknown
STATUS: Unknown
MAINTENANCE: Maintained
STATUS: Experimental
SINCE: 4.0.2
-------------------------------------------------------------------------------
EXTENSION: swf
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
MAINTENANCE: Maintained
STATUS: Unix (won't change)
STATUS: Depreciated (Use the ming swf extension instead)
COMMENT: Only for Unix (won't change)
-------------------------------------------------------------------------------
EXTENSION: sysvsem
MAINTENANCE: Unknown
@@ -328,15 +387,20 @@ EXTENSION: sysvshm
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: vpopmail
MAINTENANCE: Unknown
STATUS: Experimental
SINCE: 4.0.5
-------------------------------------------------------------------------------
EXTENSION: wddx
PRIMARY MAINTAINER: Andrei Zmievski <andrei@ispi.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: xml
PRIMARY MAINTAINER: Thies C. Arntzen <thies@digicol.de>
PRIMARY MAINTAINER: Thies C. Arntzen <thies@thieso.net>
MAINTENANCE: Maintained
STATUS: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: yaz
PRIMARY MAINTAINER: Adam Dickmeiss <adam@indexdata.dk>
@@ -344,10 +408,19 @@ MAINTENANCE: Maintained
STATUS: Unknown
SINCE: 4.0.1
-------------------------------------------------------------------------------
EXTENSION: yp
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: zlib
PRIMARY MAINTAINER: Stefan Roehrich <sr@linux.de>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: zziplib
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
SINCE: 4.0.5
-------------------------------------------------------------------------------
# iptc?
-538
View File
@@ -1,538 +0,0 @@
Functions:
Functions marked with 'u' do not work, or may not work correctly under windows.
basic_functions
include
_include
isset
intval
doubleval
strval
short_tags
sleep
u usleep
ksort
asort
sort
count
chr
ord
flush
end
prev
next
reset
current
key
gettype
settype
min
max
addslashes
chop
pos
fsockopen
getimagesize
htmlspecialchars
md5
parse_url
parse_str
phpinfo
phpversion
strlen
strtok
strtoupper
strtolower
strchr
basename
dirname
stripslashes
strstr
strrchr
substr
quotemeta
urlencode
urldecode
ucfirst
strtr
sprintf
printf
exec
system
escapeshellcmd
passthru
soundex
rand
srand
getrandmax
gethostbyaddr
gethostbyname
explode
implode
error_reporting
clearstatcache
get_current_user
getmyuid
getmypid
u getmyinode
getlastmod
base64_decode
base64_encode
abs
ceil
floor
sin
cos
tan
asin
acos
atan
pi
pow
exp
log
log10
sqrt
bindec
hexdec
octdec
decbin
decoct
dechex
getenv
putenv
time
mktime
date
gmdate
getdate
checkdate
microtime
uniqid
u linkinfo
u readlink
u symlink
u link
u unlink
bcmath_functions
bcadd
bcsub
bcmul
bcdiv
bcmod
bcpow
bcsqrt
bcscale
bccomp
dir_functions
opendir
closedir
chdir
rewinddir
readdir
dir
dl_functions
dl(string module_name); dynamicly load a module
dns_functions
gethostbyaddr
gethostbyname
file_functions
pclose
popen
readfile
rewind
rmdir
umask
fclose
feof
fgets
fgetss
fopen
fpassthru
fseek
ftell
fputs
mkdir
rename
copy
tempnam
file
filestat_functions
fileatime
filectime
u filegroup
u fileinode
filemtime
u fileowner
fileperms
filesize
filetype
stat
u chown
u chgrp
u chmod
touch
file_exists
is_executable
is_dir
is_readable
is_writeable
u is_link
header_functions
setcookie
header
mail_functions
mail
reg_functions
ereg
ereg_replace
eregi
eregi_replace
split
sql_regcase
syslog_functions (writes to event log on win NT)
openlog
syslog
closelog
The following are optional modules and may or may not be compiled into php, or may be compiled as a loadable module.
odbc_functions (obsolete, use uodbc below)
sqlconnect
sqldisconnect
sqlfetch
sqlexecdirect
sqlgetdata
sqlfree
sqlrowcount
uodbc_functions
(int) odbc_autocommit($connection_id, $OnOff)
(void) odbc_close($connection_id)
(void) odbc_close_all(void)
(int) odbc_commit($connection_id)
(int) odbc_connect($dsn, $user, $password)
(int) odbc_pconnect($dsn, $user, $password)
(string) odbc_cursor($result_id)
(int) odbc_do($connection_id, $query_string)
(int) odbc_exec($connection_id, $query_string)
(int) odbc_prepare($connection_id, $query_string)
(int) odbc_execute($result_id, $array)
(int) odbc_fetch_row($result_id, $row_number)
(int) odbc_fetch_into($result_id, $row_number, $array_ptr)
(int) odbc_field_len($result_id, $field_number)
(string) odbc_field_name($result_id, $field_number)
(string) odbc_field_type($result_id, $field)
(int) odbc_free_result($result_id)
(int) odbc_num_fields($result_id)
(int) odbc_num_rows($result_id)
(string) odbc_result($result_id, $field)
(int) odbc_result_all($result_id, $format)
(int) odbc_rollback($connection_id)
msql_functions
msql_connect
msql_pconnect
msql_close
msql_select_db
msql_create_db
msql_drop_db
msql_query
msql
msql_list_dbs
msql_list_tables
msql_list_fields
msql_result
msql_num_rows
msql_num_fields
msql_fetch_row
msql_fetch_array
msql_fetch_object
msql_data_seek
msql_fetch_field
msql_field_seek
msql_free_result
msql_fieldname
msql_fieldtable
msql_fieldlen
msql_fieldtype
msql_fieldflags
msql_regcase
/* for downwards compatability */
msql_selectdb
msql_createdb
msql_dropdb
msql_freeresult
msql_numfields
msql_numrows
msql_listdbs
msql_listtables
msql_listfields
msql_dbname
msql_tablename
ldap_functions
ldap_connect
ldap_bind
ldap_unbind
ldap_read
ldap_list
ldap_search
ldap_free_result
ldap_count_entries
ldap_first_entry
ldap_next_entry
ldap_get_entries
ldap_free_entry
ldap_first_attribute
ldap_next_attribute
ldap_get_attributes
ldap_get_values
ldap_get_dn
ldap_dn2ufn
ldap_add
ldap_delete
ldap_modify
gd_functions
imagearc
imagechar
imagecharup
imagecolorallocate
imagecolorclosest
imagecolorexact
imagecolortransparent
imagecopyresized
imagecreate
imagecreatefromgif
imagedestroy
imagefill
imagefilledpolygon
imagefilledrectangle
imagefilltoborder
imagegif
imageinterlace
imageline
imagepolygon
imagerectangle
imagesetpixel
imagestring
imagestringup
imagesx
imagesy
filepro_functions
filepro
filepro_rowcount
filepro_fieldname
filepro_fieldtype
filepro_fieldwidth
filepro_fieldcount
filepro_retrieve
dbm_functions
dblist
dbmopen
dbmclose
dbminsert
dbmfetch
dbmreplace
dbmexists
dbmdelete
dbmfirstkey
dbmnextkey
dbase_functions
dbase_open
dbase_create
dbase_close
dbase_numrecords
dbase_numfields
dbase_add_record
dbase_get_record
dbase_delete_record
dbase_pack
calendar_functions
jdtogregorian
gregoriantojd
jdtojulian
juliantojd
jdtojewish
jewishtojd
jdtofrench
frenchtojd
jddayofweek
jdmonthname
adabas_functions
(int) ada_afetch($result_id, $rownumber, $result array)
(int) ada_autocommit($connection_id, $OnOff)
(void) ada_close($connection_id)
ada_closeall
(int) ada_commit($connection_id)
(int) ada_connect($dsn, $user, $password)
(int) ada_exec($connection_id, $query_string)
(int) ada_fetchrow($result_id, $row?number)
ada_fieldlen
(string) ada_fieldname($result_id, $field_number)
(string) ada_fieldtype($result_id, $field)
(int) ada_freeresult($result_id)
(int) ada_numfields($result_id)
(int) ada_numrows($result_id)
(string) ada_result($result_id, $field)
(int) ada_resultall($result_id, $format)
(int) ada_rollback($connection_id)
***(int) ada_fieldnum($result_id, $field_name) (this function is not in adabase.c
crypt_functions
crypt
mysql_functions
mysql_connect
mysql_pconnect
mysql_close
mysql_select_db
mysql_create_db
mysql_drop_db
mysql_query
mysql
mysql_list_dbs
mysql_list_tables
mysql_list_fields
mysql_affected_rows
mysql_insert_id
mysql_result
mysql_num_rows
mysql_num_fields
mysql_fetch_row
mysql_fetch_array
mysql_fetch_object
mysql_data_seek
mysql_fetch_lengths
mysql_fetch_field
mysql_field_seek
mysql_free_result
mysql_fieldname
mysql_fieldtable
mysql_fieldlen
mysql_fieldtype
mysql_fieldflags
/* for downwards compatability */
mysql_selectdb
mysql_createdb
mysql_dropdb
mysql_freeresult
mysql_numfields
mysql_numrows
mysql_listdbs
mysql_listtables
mysql_listfields
mysql_dbname
mysql_tablename
oracle_functions
ora_close
ora_commit
ora_commitoff
ora_commiton
ora_error
ora_errorcode
ora_exec
ora_fetch
ora_getcolumn
ora_logoff
ora_logon
ora_open
ora_parse
ora_rollback
pgsql_functions
pg_connect
pg_pconnect
pg_close
pg_dbname
pg_errormessage
pg_options
pg_port
pg_tty
pg_host
pg_exec
pg_numrows
pg_numfields
pg_fieldname
pg_fieldsize
pg_fieldtype
pg_fieldnum
pg_result
pg_fieldprtlen
pg_getlastoid
pg_freeresult
pg_locreate
pg_lounlink
pg_loopen
pg_loclose
pg_loread
pg_lowrite
pg_loreadall
sybase_functions
sybase_connect
sybase_pconnect
sybase_close
sybase_select_db
sybase_query
sybase_free_result
sybase_get_last_message
sybase_num_rows
sybase_num_fields
sybase_fetch_row
sybase_fetch_array
sybase_fetch_object
sybase_data_seek
sybase_fetch_field
sybase_field_seek
sybase_result
sybase_old_functions
sybsql_seek
sybsql_exit
sybsql_dbuse
sybsql_query
sybsql_isrow
sybsql_result
sybsql_connect
sybsql_nextrow
sybsql_numrows
sybsql_getfield
sybsql_numfields
sybsql_fieldname
sybsql_result_all
sybsql_checkconnect
+3 -1
View File
@@ -94,7 +94,8 @@ $ ./configure --prefix=/www --activate-module=src/modules/php4/libphp4.a
(The above line is correct! Yes, we know libphp4.a does not exist at this
stage. It isn't supposed to. It will be created.)
$ make
(you should now have an httpd binary which you can copy to your Apache bin dir)
(you should now have an httpd binary which you can copy to your Apache bin dir if
is is your first install then you need to "make install" as well)
$ cd ../php-4.0.x
$ cp php.ini-dist /usr/local/lib/php.ini
You can edit /usr/local/lib/php.ini file to set PHP options.
@@ -388,6 +389,7 @@ USING PHP 3 AND PHP 4 AS CONCURRENT APACHE MODULES
- Linux with recent binutils (binutils 2.9.1.0.25 tested)
- Solaris 2.5 or better
- FreeBSD (3.2, 4.0 tested)
- IRIX64 6.5
To enable it, configure PHP 3 and PHP 4 to use APXS (--with-apxs) and the
necessary link extensions (--enable-versioning). Otherwise, all standard
+11 -5
View File
@@ -18,7 +18,7 @@ LTLIBRARY_LIBADD = $(LTLIBRARY_DEPENDENCIES) $(EXTRA_LIBS)
PROGRAM_NAME = php
PROGRAM_SOURCES = stub.c
PROGRAM_LDADD = libphp4.la
PROGRAM_LDADD = libphp4.la $(EXT_PROGRAM_LDADD)
PROGRAM_LDFLAGS = -export-dynamic
PROGRAM_DEPENDENCIES = $(PROGRAM_LDADD)
@@ -32,7 +32,7 @@ include $(top_srcdir)/build/program.mk
install-sapi:
@$(LIBTOOL) --silent --mode=install cp libphp4.la $(phptempdir)/libphp4.la >/dev/null 2>&1
-@$(mkinstalldirs) $(bindir)
-@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
-@if test ! -r $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME); then \
for i in 0.0.0 0.0 0; do \
if test -r $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME).$$i; then \
@@ -45,12 +45,18 @@ install-sapi:
install-modules:
@test -d modules && \
$(mkinstalldirs) $(moduledir) && \
$(mkinstalldirs) $(INSTALL_ROOT)$(moduledir) && \
echo "installing shared modules into $(moduledir)" && \
rm -f modules/*.la && \
cp modules/* $(moduledir) >/dev/null 2>&1 || true
cp modules/* $(INSTALL_ROOT)$(moduledir) >/dev/null 2>&1 || true
install-su: install-modules
install-tester:
-$(mkinstalldirs) $(datadir)
$(INSTALL) -m 755 $(srcdir)/run-tests.php $(INSTALL_ROOT)$(datadir)
install-pear: install-modules
(cd pear && $(MAKE) install)
install-su: install-pear install-tester
.NOEXPORT:
+705 -4
View File
@@ -1,7 +1,707 @@
PHP 4.0 NEWS
PHP 4 NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
27 Feb 2002, Version 4.1.2
- Fixed start up failure when mm save handler is used and there is multiple
SAPIs are working at the same time. (Yasuo)
- Fixed the Roxen SAPI (Yasuo)
- Fixed a buffer overflow in the RFC-1867 file upload code (Stefan)
- Fixed a crash in the session module (Yasuo)
- Fixed a crash in the pspell module (Yasuo)
- Changed the default output encoding of mbstring 'pass' to fix
initialization problem (Rui)
26 Dec 2001, Version 4.1.1
- Fixed incompatibility with Windows .NET / IIS 6 - may improve stability
under other versions of IIS. (Zeev)
- Fixed bug that caused crashes or error notices on shutdown on threaded
platforms. (Zeev)
- Fixed several crash bugs in the xslt extension. (Markus, Derick)
- Fixed problem with dbase not returning very large (larger than long)
integers properly. (Vlad)
- Fixed several bugs and memleaks in the domxml extension. (Markus)
- Fixed bug in gmmktime() which was one hour off during standard time -
bug #9878. Patch by bfoddy@mediaone.net. (jmoore)
- Fixed bug in gmdate() timezone handling on Windows - bug #13885. (jmoore)
- Fixed several crash bugs in the mcrypt extension. (Derick)
- Made the mcrypt extension compile with the libmcrypt 2.2 series again.
(Sterling)
- Fixed a bug where the is_file() family of functions would in-correctly give
an error when they were given filenames that didn't exist. (Sterling)
- Fixed a bug in the strtotime() function where it was incorrectly recognizing
GMT +0100 and GMT -0100. (Derick)
10 Dec 2001, Version 4.1.0
- Worked around a bug in the MySQL client library that could cause PHP to hang
when using unbuffered queries. (Zeev)
- Fixed a bug which caused set_time_limit() to affect all subsequent requests
to running Apache child process. (Zeev)
- Removed the sablotron extension in favor of the new XSLT extension.
(Sterling)
- Fixed a bug in WDDX deserialization that would sometimes corrupt the root
element if it was a scalar one. (Andrei)
- Make ImageColorAt() and ImageColorsForIndex() work with TrueColor images.
(Rasmus)
- Fixed a bug in preg_match_all() that would return results under improper
indices in certain cases. (Andrei)
- Fixed a crash in str_replace() that would happen if search parameter was an
array and one of the replacements resulted in subject string being empty.
(Andrei)
- Fixed MySQL extension to work with MySQL 4.0. (Jani)
- Fixed a crash bug within Cobalt systems. Patch by tomc@tripac.com. (Jani)
- Bundled Dan Libby's xmlrpc-epi extension.
- Introduced extension version numbers. (Stig)
- Added version_compare() function. (Stig)
- Fixed pg_last_notice() (could cause random crashes in PostgreSQL
applications, even if they didn't use pg_last_notice()). (Zeev)
- Fixed DOM-XML's error reporting, so E_WARNING errors are given instead of
E_ERROR error's, this allows you to trap errors thrown by DOMXML functions.
(Sterling)
- Fixed a bug in the mcrypt extension, where list destructors were not
properly being allocated. (Sterling)
- Better Interbase blob, null and error handling. (Patch by Jeremy Bettis)
- Fixed a crash bug in array_map() if the input arrays had string or
non-sequential keys. Also modified it so that if a single array is passed,
its keys are preserved in the resulting array. (Andrei)
- Fixed a crash in dbase_replace_record. (Patch by robin.marlow@dps-int.com)
- Fixed a crash in msql_result(). (Zeev)
- Added support for single dimensional SafeArrays and Enumerations.
Added an is_enum() function to check if a component implements an
enumeration. (Alan, Harald)
- Fixed a bug in dbase_get_record() and dbase_get_record_with_names().
boolean fields are now returned correctly.
Patch by Lawrence E. Widman <widman@cardiothink.com> (Jani)
- Added --version option to php-config. (Stig)
- Improved support for thttpd-2.21b by incorporating patches for all known
bugs. (Sascha)
- Added ircg_get_username, a roomkey argument to ircg_join, error fetching
infrastructure, a tokenizer to speed up message processing, and fixed
a lot of bugs in the IRCG extension. (Sascha)
- Improved speed of the serializer/deserializer. (Thies, Sascha)
- Floating point numbers are better detected when converting from strings.
(Zeev, Zend Engine)
- Replaced php.ini-optimized with php.ini-recommended. As the name implies,
it's warmly recommended to use this file as the basis for your PHP
configuration, rather than php.ini-dist. (Zeev)
- Restore xpath_eval() and php_xpathptr_eval() for 4.0.7. There
are still some known leaks. (Joey)
- Added import_request_variables(), to allow users to safely import form
variables to the global scope (Zeev)
- Introduced a new $_REQUEST array, which includes any GET, POST or COOKIE
variables. Like the other new variables, this variable is also available
regardless of the context. (Andi & Zeev)
- Introduced $_GET, $_POST, $_COOKIE, $_SERVER and $_ENV variables, which
deprecate the old $HTTP_*_VARS arrays. In addition to be much shorter to
type - these variables are also available regardless of the scope, and
there's no need to import them using the 'global' statement. (Andi & Zeev)
- Added vprintf() and vsprintf() functions that allow passing all arguments
after format as an array. (Andrei)
- Added support for GD2 image type for ImageCreateFromString() (Jani)
- Added ImageCreateFromGD(), ImageCreateFromGD2(), ImageCreateFromGD2part(),
ImageGD() and ImageGD2() functions (Jani)
- addcslashes now warns when charlist is invalid. The returned string
remained the same (Jeroen)
- Added optional extra argument to gmp_init(). The extra argument
indicates which number base gmp should use when converting a
string to the gmp-number. (Troels)
- Added the Cyrus-IMAP extension, which allows a direct interface to Cyrus'
more advanced capabilities. (Sterling)
- Enhance read_exif_data() to support multiple comment tags (Rasmus)
- Fixed a crash bug in array_map() when NULL callback was passed in. (Andrei)
- Change from E_ERROR to E_WARNING in the exif extension (Rasmus)
- New pow() implementation, which returns an integer when possible,
and warnings on wrong input (jeroen)
- Added optional second parameter to trim, chop and ltrim. You can
now specify which characters to trim (jeroen)
- Hugely improved the performance of the thread-safe version of PHP, especially
under Windows (Andi & Zeev)
- Improved request-shutdown performance significantly (Andi & Zeev, Zend
Engine)
- Added a few new math functions. (Jesus)
- Bump bundled expat to 1.95.2 (Thies)
- Improved the stability of OCIPlogon() after a database restart. (Thies)
- Fixed __FILE__ in the CGI & Java servlet modes when used in the main script.
It only worked correctly in included files before this fix (Andi)
- Improved the Zend hash table implementation to be much faster (Andi, Zend
Engine)
- Updated PHP's file open function (used by include()) to check in the calling
script's directory in case the file can't be found in the include_path (Andi)
- Fixed a corruption bug that could cause constants to become corrupted, and
possibly prevent resources from properly being cleaned up at the end of
a request (Zeev)
- Added optional use of Boyer-Moore algorithm to str_replace() (Sascha)
- Fixed and improved shared-memory session storage module (Sascha)
- Add config option (always_populate_raw_post_data) which when enabled
will always populate $HTTP_RAW_POST_DATA regardless of the post mime
type (Rasmus)
- Added support for socket and popen file types to ftp_fput (Jason)
- Fixed various memory leaks in the LDAP extension (Stig Venaas)
- Improved interactive mode - it is now available in all builds of PHP, without
any significant slowdown (Zeev, Zend Engine)
- Fixed crash in iptcparse() if the supplied data was bogus. (Thies)
- Fixed return value for a failed snmpset() - now returns false (Rasmus)
- Added hostname:port support to snmp functions (nbougues@axialys.net, Rasmus)
- Added fdf_set_encoding() function (Masaki YATSU, Rasmus)
- Reversed the destruction-order of resources. This fixes the reported OCI8
"failed to rollback outstanding transactions!" message (Thies, Zend Engine)
- Added option for returning XMLRPC fault packets. (Matt Allen, Sascha
Schumann)
- Improved range() function to support range('a','z') and range(9,0) types of
ranges. (Rasmus)
- Added getmygid() and safe_mode_gid ini directive to allow safe mode to do
a gid check instead of a uid check. (James E. Flemer, Rasmus)
- Made assert() accept the array(&$obj, 'methodname') syntax. (Thies)
- Made sure that OCI8 outbound variables are always zero-terminated. (Thies)
- Fixed a bug that allowed users to spawn processes while using the 5th
parameter to mail(). (Derick)
- Added nl_langinfo() (when OS provides it) that returns locale.
- Fixed a major memory corruption bug in the thread safe version. (Zeev)
- Fixed a crash when using the CURLOPT_WRITEHEADER option. (Sterling)
- Added optional suffix removal parameter to basename(). (Hartmut)
- Added new parameter UDM_PARAM_VARDIR ha in Udm_Set_Agent_Param() function to
support alternative search data directory. This requires mnogoSearch 3.1.13
or later.
- Fixed references in sessions. This doesn't work when using the WDDX
session-serializer. Also improved speed of sessions. (Thies)
- Added new experimental module pcntl (Process Control). (Jason)
- Fixed a bug when com.allow_dcom is set to false. (phanto)
- Added a further parameter to the constructor to load typelibs from file when
instantiating components (e.g. DCOM Components without local registration).
(phanto)
- Added the possibility to specify typelibs by full name in the typelib file
(Alan Brown)
- Renamed the ZZiplib extension to the Zip extension, function names have also
changed accordingly, functionality, has stayed constant. (Sterling)
- Made the length argument (argument 2) to pg_loread() optional, if not
specified data will be read in 1kb chunks. (Sterling)
- Added a third argument to pg_lowrite() which is the length of the data to
write. (Sterling)
- Added the CONNECTION_ABORTED, CONNECTION_TIMEOUT and CONNECTION_NORMAL
constants. (Zak)
- Assigning to a string offset beyond the end of the string now automatically
increases the string length by padding it with spaces, and performs the
assignment. (Zeev, Zend Engine)
- Added warnings in case an uninitialized string offset is read. (Zeev, Zend
Engine)
- Fixed a couple of overflow bugs in case of very large negative integer
numbers. (Zeev, Zend Engine)
- Fixed a crash bug in the string-offsets implementation (Zeev, Zend Engine)
- Improved the implementation of parent::method_name() for classes which use
run-time inheritance. (Zeev, Zend Engine)
- Added 'W' flag to date() function to return week number of year using ISO
8601 standard. (Colin)
- Made the PostgreSQL driver do internal row counting when iterating through
result sets. (gvz@2scale.net)
- Updated ext/mysql/libmysql to version 3.23.39; Portability fixes, minor
bug fixes. (tim@mysql.com)
- Added get_defined_constants() function to return an associative array of
constants mapped to their values. (Sean)
- New mailparse extension for parsing and manipulating MIME mail. (Wez)
- Define HAVE_CONFIG_H when building standalone DSO extensions. (Stig)
- Added the 'u' modifier to printf/sprintf which prints unsigned longs.
(Derick)
- Improved IRIX compatibility. (Sascha)
- Fixed crash bug in bzopen() when specifying an invalid file. (Andi)
- Fixed bugs in the mcrypt extension that caused crashes. (Derick)
- Added the IMG_ARC_ROUNDED option for the ImageFilledArc() function, which
specified that the drawn curve should be rounded. (Sterling)
- Updated the sockets extension to use resources instead of longs for the
socket descriptors. The socket functions have been renamed to conform with
the PHP standard instead of their C counterparts. The sockets extension is
now usable under Win32. (Daniel)
- Added disk_total_space() to return the total size of a filesystem.
(Patch from Steven Bower)
- Renamed diskfreespace() to disk_free_space() to conform to established
naming conventions. (Jon)
- Fixed #2181. Now zero is returned instead of an unset value for
7-bit encoding and plain text body type. (Vlad)
- Fixed a bug in call_user_*() functions that would not allow calling
functions/methods that accepted parameters by reference. (Andrei)
- Added com_release($obj) and com_addref($obj) functions and the related class
members $obj->Release() and $obj->AddRef() to gain more control over the used
COM components. (phanto)
- Added an additional parameter to dotnet_load to specify the codepage (phanto)
- Added peak memory logging. Use --enable-memory-limit to create a new Apache
1.x logging directive "{mod_php_memory_usage}n" which will log the peak
amount of memory used by the script. (Thies)
- Made fstat() and stat() provide identical output by returning a numerical and
string indexed array. (Jason)
- Fixed memory leak upon re-registering constants. (Sascha, Zend Engine)
23 Jun 2001, Version 4.0.6
- Fixed memory fragmention problem which could lead to web server processes
growing much more than they should. (Andi, Zend Engine)
- Made $HTTP_SESSION_VARS['foo'] and $foo be references to the same value
when register_globals is on. (Andrei)
- Fixed disk_free_space() and disk_total_space() under FreeBSD. (Jon)
- Fixed readfile/passthru losing resources during connection abort (Sascha)
- Fixed bug in the mcrypt extension that caused segfaults when using a key
that is too large for the used algorithm, and a bug that caused
mcrypt_generic() to segfault PHP (Derick)
- Fixed getopt so that it accepts command line arguments in the form
-<opt><arg> and -<opt> <arg>. (Jmoore)
- Fixed race in writing session files (Sascha)
- Fixed a possible crash in the PHP CGI when no input file is
specified (Zeev)
- Added is_callable() function that can be used to find out whether
its argument is a valid callable construct. (Andrei)
- Fixed a rare possible crash when generating extended information. (Dmitri
Dmitrienko, Zend Engine)
- Improved virtual() to support PHP-enabled URIs. (Zeev)
- Fixed undefined behavior when using floating point keys in array()
expressions. (Zeev, Zend Engine)
- Fixed a possible crash in case of parse errors in include files or eval
statements. (Zeev, Zend Engine)
- Added --with-layout configure option. (Stig)
- Improved interactive mode - supports function calls, and works in
multithreaded builds. (Zeev, Zend Engine)
- Fixed a crash bug in interactive mode. (Zeev, Zend Engine)
- Added pg_last_notice() function. (Rasmus from suggestion by Dirk@rackspace.com)
- Fixed a bug in preg_split() that would incorrectly limit the number of
results when used along with PREG_SPLIT_NO_EMPTY flag. (Andrei)
- Added connection error support to mysql_error() and mysql_errno(). (Jason)
- Added support to getimagesize to return dimensions of BMP and PSD
files. (Derick)
- Added heuristic to kill stale IRC connections, message scanner caching, and
nickname escaping to IRCG, suppress option to ircg_msg(), and statistics to
IRCG phpinfo() output. (Sascha)
- Added Japanese multibyte string functions support. (Rui)
- Added Mac OS X "\r" line ending support. (Andi, Zend Engine)
- Fixed a bug regarding the $PHP_SELF being incorrectly registered when
force-cgi-redirect was not enabled. (Sterling)
- pfpro extension now supports version 3 of the Verisign SDK. (John Donagher)
- Udm_Cat_List and Udm_Cat_Path functions has been added.
- Added key_exists() to check if a given key or index exists in an
array or object. (David Croft)
- Modify the cURL extension to compile only with the latest cURL release.
Backwards compatibility with regards to the extension api has not been
broken. (Sterling)
- Added the ability to use user-defined callbacks with cURL. (Sterling)
- Added the SSL_VERIFYPEER, CAINFO, MAXREDIRS, FILETIME, RANDOM_FILE, EGDSOCKET
and CONNECTTIMEOUT options to curl_setopt(). (Sterling)
- Added support for persistent connections with cURL. (Sterling)
- Fixed a problem in cURL with file descriptors being allocated, but never
closed. (Sterling)
- Fixed interactive mode (-a). It works again with the same limitations it
has always had. (Andi, Zend Engine)
- Improved memory manager to use less memory and provide better memory overflow
detection abilities in debug mode. (Andi, Zend Engine)
- Fixed resource leaks when resources were being cast to numbers. (Zeev, Zend
Engine)
- Fixed foreach() to not crash when being sent an invalid argument. (Andi, Zend
Engine)
- Fixed a bug in opendir() under Windows when trying to open a non-exisiting
directory. (Andi)
- Fixed popen() and the exec family under Win32 (Unable to fork issue). (Daniel)
- Make the printf family of functions binary clean. (Rasmus)
- Fixed WDDX serialization to HTML-escape key/variable names so as not to
break the XML packet. (Andrei)
- Made WDDX extension enabled by default. (Andrei)
- Added -C command-line option to avoid chdir to the script's directory. (Stig)
- Fixed a bug with /e modifier in preg_replace(), that would not correctly
replace two-digit references if single digit references were present
before them. This fixed bug #10218. (Andrei)
- Added temporary LOB support in OCI8. (Patch by David Benson)
- Fixed crash in pathinfo()
- OCI8 now supports binding of collections. (Patch by Andy Sautins
<asautins@veripost.net>)
- Added GD 2.0.1 support for truecolor and alpha channels, plus some other gd
functions, both old and new - see docs for more info. (Wez)
- Added S/MIME sign/verify encrypt/decrypt functions to openssl extension,
along with some other certificate manipulation and interrogation functions.
See docs for more info. (Wez)
- printf argnum (parameter swapping) support. (Morten Poulsen, Rasmus)
- Add DIRECTORY_SEPARATOR constant ('/' on UNIX, '\' on Windows). (Stig)
- Added small change to php_odbc module, to check for failed SQLDisconnects
and to close any outstanding transactions if the call fails, then disconnect
again. (lurcher)
- Modified get_parent_class() and get_class_methods() to accept a class name as
well as a class instance. (Andrei, Zend Engine)
- Added support for UNC style paths. (\\server\share\file,
//server/share/file). (Daniel, TSRM)
- Added dbx module (database abstraction) to the repository. (Marc)
- Using ITypeInfo instead of IDispatch if possible. This makes DCOM calls
and even COM calls much faster.
All ini settings are now prefixed by 'com.'.
Now you need not provide a path to the file containing the typelib, you can
also provide the GUID of the TypeLib - entry or an IID for preloading
type - information. (phanto)
- Rewrite of domxml. It's now mostly DOM Level 2 conform. (Uwe)
- Added array_map() function that applies a callback to the elements
of given arrays and returns the result. It can also be used with a
null callback to transpose arrays. (Andrei)
- Added array_filter(), which allows filtering of array elements via
the specified callback. (Andrei)
- Fixed all relevant array functions to avoid moving the internal array
pointer during operations. (Andrei)
- Added mysql_unbuffered_query(), which is useful for very large result sets.
(Zeev)
30 Apr 2001, Version 4.0.5
- Added new php.ini directive: arg_separator.input which is used to tell
PHP which characters are considered as argument separators in URLs.
Renamed php.ini directive: arg_separator -> arg_separator.output (Jani)
- Added FastCGI SAPI module. (Ben Mansell)
- Added array_reduce(), which allows iterative reduction of an array
to a single value via a callback function. (Andrei)
- The imageloadfont function of the gd extension should be not platform
dependent after this fix. (alex@zend.com)
- Fixed a compatibility problem in some file functions (fgets, fputs, fread,
fwrite). The ANSI standard says that if a file is opened in read/write
mode, fseek() should be called before switching from reading to writing
and vice versa. (alex@zend.com)
- Fixed argument checking for call_user_func* functions and allowed
specifying array($obj, 'method') syntax for call_user_func_array. (Andrei)
- Fixed parent::method() to also work with runtime bindings.
(Zeev, Zend Engine)
- Implemented high-performance zlib-based output compression - see
zlib.output_compression INI directive. (Zeev)
- Improved ob_gzhandler() to support chunked output buffering - it's
recommended to use it with 4KB chunks. (Zeev)
- Fixed chunked output buffering. (Zeev)
- Forced call_user_method() and call_user_method_array() to take the
object argument by reference. (Andrei)
- Fixed binding of ROWIDs in OCI8. (Thies)
- Added PEAR/Cache as a generic Caching System. (Sebastian, PEAR/Cache)
- Added IMAP quota support (imap_set_quota, imap_get_quota), enabled/added via
c-client2000. (kalowsky)
- Upgraded PCRE to version 3.4. (Andrei)
- Added array_search which works similar to in_array but returns
the key instead of a boolean. (jason@php.net)
- Fixed pgsql transaction support. (Stig, PEAR/DB)
- Added new object VARIANT() to encapsulate values for use with
the COM and DOTNET module. Therefore it is now possible to pass
values by reference, convert php values to extended variant types (currency,
date, idispatch, iunknown, ...) and define the codepage that should
be used for unicode - conversion.
- Improved overall speed of IRCG, added URL handling to message scanner.
(Sascha)
- Fixed some modules to allow using output-buffering. (Thies)
- Added the chroot() function. (Derick)
- PostgreSQL now does a rollback at the end of a request on every
persistent connection. This is done by doing an "empty" transaction
on the connection. This was advised by someone from the PostgreSQL
core-team. (Thies)
- Fixed PostgeSQL pg_connect() bug. We would sometimes close the default
link by accident. (Patch by: aja@nlgroup.ca)
- Improved OCI8 dead-session detection. (Patch by: George Schlossnagle)
- Fixed get_meta_tags() multiline bug #4556. (Sean)
- Prefer random() over *rand48(). (JimJag)
- Sped up WDDX serialization 2x. (Andrei)
- Added a new parameter to mail() which appends aditional command line
parameters to the mail program. (Derick)
- Added Udm_Clear_Search_Limits mnoGoSearch extension function. (gluke)
- Fixed mnogosearch protos. Fixed mnogosearch functions return values.
A bug with capital letters break search has been fixed. (gluke)
- Static methods can now be called via call_user_method_* functions, e.g.
call_user_method('method', 'class'), and also array('class', 'method')
constructs (for array_walk(), for example). (Andrei, Zend Engine)
- microtime() under Windows now returns accurate values. (James)
- Added PREG_SPLIT_DELIM_CAPTURE flag to preg_split() that allows for Perl-like
functionality of capturing parenthesized delimiter expression. (Andrei)
- Fixed strip_tags() to not strip a lone > character. (Rasmus)
- When using the ob_gzhandler() PHP now automagically also sets the
Content-Lengh correctly which enables browsers to use the HTTP
Keep-Alive feature. (Thies)
- Improved handling of preg_replace() /F modifier so that it's possible to
specify array($obj, 'method') construct as a replacement function. (Andrei)
- Added mysql_get_client_info(), mysql_get_server_info(),
mysql_get_proto_info(), and mysql_get_host_info() functions. (Sean)
- Major change of the php pdf api. It could break some functions though
backwards compatibility was tried to maintain. Adding some still
missing functions as well. (Uwe)
- Added mnoGoSearch extension - http://search.mnogo.ru. (Sergey K)
- Allow URL encoding in DB usernames and passwords. (Stig, PEAR)
- Added raiseError and setErrorHandling methods to PEAR class. (Stig, PEAR)
- Added support for converting images from JPG/PNG on the fly with the GD
extension, which is usefull for creating dynamic WAP-sites. (Derick)
- Updated ext/mysql/libmysql to version 3.23.32; bug fixes. (tim@mysql.com)
- Fixed possible crash in all (non-pcre) regex functions. (Thies)
- Improved str_replace() to accept an array for any parameter - similar
to preg_replace(). (Andrei)
- Fixed extract() to properly prefix numeric keys when EXTR_PREFIX_ALL is
used. (Andrei)
- Added EXTR_PREFIX_INVALID flag to extract() to automatically prefix
string keys that do not constitute valid variable names. (Andrei)
- BeOS patch from svanegmond@bang.dhs.org, modified somewhat by Rasmus.
- Fixed the Apache module to overwrite PATH_TRANSLATED with SCRIPT_FILENAME,
only if PATH_TRANSLATED is not previously set. (Zeev)
- Fixed crash bug in highlight_string(). (Rasmus)
- Added URL support for getimagesize() function. (Jani)
- Added xslt_set_scheme_handler() function. (carmelo@akooe.com)
- Added the pg_lolseek and pg_lotell functions. (Derick)
- Fixed wrong breaking with the wordwrap function. (Derick)
- Fixed 'O' and 'r' flags of date() to have correct sign for timezone
offset. (Andrei)
- Changed 'Z' flag to date() to always return timezone offset with
negative sign if it's west of UTC. (Andrei)
- Added the HTML_Processor class which provides common functions for
processing HTML. (Sterling)
- Added localeconv() and strcoll() functions for localization. (Sean)
- Added the xslt_set_base function. (Sterling)
- Added support for Zeus 3.3.8.
- Added odbc_error() and odbc_errormsg() functions. (Stig)
- New extension for vpopmail - http://www.inter7.com/vpopmail,
give it a try, but keep in mind that it is not ready for production
environments. (David Croft, Boian Bonev)
- Added sybase_get_last_message() to the Sybase CT module. (Jan Fedak)
- Made ldap_list(), ldap_read() and ldap_search() do parallel search when
first parameter is an array of link identifiers. (Stig Venaas)
- Made fopen() of HTTP URL follow redirects, $http_response_header will
contain all headers with empty string as delimiter. (Stig Venaas)
- Added Console_Getopt class for parsing command-line args. (Andrei, PEAR)
- Added an experimental version of the ZZipLib extension which provides the
ability to read zip files. (Sterling)
- Allow access to uploaded files in safe_mode. Beware that you can only
read the file. If you copy it to new location the copy will not have the
right UID and you script won't be able to access that copy. (Thies)
- Changed extract() to check that prefixed name is a valid one. (Andrei)
- Changed extract() to return the number of variables extracted. (Andrei)
- Added ldap_rename() function. (Stig Venaas)
- Made ldap_set_option() support controls. (Stig Venaas)
- Changed ldap_search() and added functions ldap_parse_result(),
ldap_first_reference(), ldap_next_reference() and ldap_parse_reference()
to cope with LDAPv3 stuff like referrals and references. (Stig Venaas)
- Fixed date('r') overflow.
- Made the php.ini path reported in phpinfo() always point to the absolute
path that was opened. (Zeev)
- Made the INI mechanism thread safe. (Zeev, Zend Engine)
- Changed setlocale() to use LC_* constants. (Jani)
- ctype functions now follow the extension naming conventions. (Hartmut)
- Added iconv() function (using libc or libiconv). (Stig)
- Added ODBC_TYPE constant. (Stig)
- Added the call_user_method_array function which allows you to call a method
with an arbitrary number of parameters. (Sterling)
- ext/odbc: IBM DB2 patch by Walter Franzini. <walter@sys-net.it>
- Added extension for the cracklib library. (Alexander Feldman)
19 Dec. 2000, Version 4.0.4
- Allow assigning a newly created object by reference. This is needed only if
your constructor makes other data structures reference the $this object (for
example, $GLOBALS["foobar"] =& $this;)
The new syntax is $obj =& new MyClass(); (Andi, Zend Engine)
- Allow for three expression types to be sent to functions which are requesting
the function argument to be passed by reference (only c. was previously
supported):
a. func(new myclass());
b. func(func2()); where func2() returns a reference, i.e. is defined as
function &func2(...)
{
...
}
c. func($var); where func() is defined as function func(&$var) {...}
You CAN'T count on any other expressions to be passable by reference.
(Andi, Zend Engine)
- Made ldap_get_entries() return an array even if there are no entries
in search result. (Jani)
- Fixed bad mod_perl interaction which caused segfaults when using LFS (Sascha)
- const CONSTNAME now gets recognized. Before the patch only @const CONSTNAME
description was recognized.
- Added the is_null() function that will return true if a variable is of
type null. (Sterling)
- Fixed a bug which made readdir() unusable in some systems. (Jani)
- Added the get_defined_functions() function which returns a list of all
currently defined functions. (Sterling)
- Added the get_defined_vars() function which returns an associative array
of all variables defined in the current scope and their subsequent values.
(Sterling)
- Added the call_user_func_array() function which gives you the ability to
call a user function by passing an array of parameters as the second
argument. (Sterling)
- Added the constant() function which returns the value of a constant given
the constant's name. (Sterling)
- Implemented support for Perl-style matching regexp delimiters in PCRE.
You can use <{[( and )]}> to delimit your expressions now. (Andrei)
- Introduced new 'F' modifier in PCRE that lets you specify a function
name in the replacement argument to preg_replace() that will be called
at run-time to provide the replacement string. It is passed an array of
matched pattern and subpatterns. (Andrei)
- Put an end to BUG#4615 (kalowsky & Eric Veldhuyzen)
- Added the IRCG extension (Sascha)
- Fixed realpath() in Virtual Directory mode (Daniel)
- Integrated the Phil Nelson's bc math library routines into PHP, now that
the license allows it (Phil Nelson <phil@cs.wwu.edu>)
- Added the xslt_set_error_handler() function to the Sablotron extension.
(Sterling)
- Improved Sablotron's error handling system allowing you to catch all
errors before they are outputted to the screen. (Sterling)
- Added OpenSSL extension (Stig Venaas)
- Fixed/created support for Solid 3.0 databases (kalowsky)
- Fixed support for Solid 2.3 databases (kalowsky)
- quoted_printable_decode() function is made RFC-2045 compliant. (Kir)
- Modified preg_grep() to always return the results with keys from the original
array. (Andrei)
- Modified preg_replace() to accept Perl-style $n backreferences in addition
to \\n ones. (Andrei)
- Modified preg_replace() to ignore backreferences that refer to
non-existing subpatterns. (Andrei)
- Fixed column-title buffer-overflow in OCIFetchStatement(). (Thies)
- Added 'output_handler' INI directive (Zeev)
- Fixed some buglets in the output buffering mechanism (Zeev)
- Added transparent gzip compression support (Jade Nicoletti, Zeev)
- Major overhaul of domxml. Added basic XPath support as well (Uwe)
- Added 'r' flag to date() which generates an RFC822 formatted date, e.g.
"Thu, 9 Nov 2000 16:33:01 -0500" (Colin)
- In CGI mode, $HTTP_SERVER_VARS now includes all of the environment variables
as well (Zeev)
- Allow user to use mysql_use_result in mysql queries (Stas)
- Fixed a memory leak that would occur when restarting Apache often
(mookid@sigent.ru)
- Fixed a bug that prevented $argv and $argc from being defined in the command
line version of PHP (Stas)
- Fixed a bug that prevented a changed compile-time extension_dir from
affecting modules that were loaded via php.ini (Zeev)
- Fixed a bug in ftp_mkdir() when used on ftp server which doesn't return
the full path (Jani)
- Added ImageCreateFromString() which creates an image stream out of
e.g. a MySQL blob. (Mathieu)
- Fixed a crash bug in imagewbmp() (Jani)
- Changed the sablot configuration file so that if you use any version of
Sablotron below 0.44 you must use Sablotron's built-in Expat libraries.
(Sterling)
- Added basic authentication support to thttpd (Sascha)
- Added support for the Caudium webserver (http://caudium.net/). It's based
on the Roxen SAPI module. Many bugs have been identified and fixed. (David)
- Fixed mysql_close(), pg_close(), msql_close() and sybase_close() - they
weren't properly closing the SQL connections (Zeev)
- Fixed crypt() to supply random seed if none is given (Andi)
- Made print_r() support recursive data structures, e.g. $GLOBALS. (Zeev)
- Fixed a bug that caused PHP not to properly flush its output buffer, if more
than one output buffer was used. (Zeev)
- Fixed a bug that could draw the shutdown sequence of the PHP Apache module
into an endless loop, under certain circumstances. It could cause Apache
processes under Solaris to get stuck, especially when using output
buffering. (Zeev)
- Added support for serializing references (Stas)
- Fixed conflict with OpenLDAP and Oracle 8.1.x (Jani)
- parse_ini_file() supports a new optional 2nd argument that instructs it
to divide the directives to arrays according to the sections in which they
reside (Zeev)
- parse_ini_file() is now thread-safe, and supported under Windows (Zeev)
- Unified aborted-connection semantics of all SAPI modules (Sascha)
- URL-opened files now store the HTTP response header in $http_response_header
(Zeev)
- Fixed array_rand() to shuffle results when the number of requested
elements is the same as the number of elements in the array. (Andrei)
- Added replace parameter to header() (Sascha)
- Fixed handling of single quotes in transparent session-id mode (Sascha)
- Fixed "php://*" fopen handler (Sascha)
- Made rename work in threadsafe enviroments (Daniel)
- Made session_destroy() close files before unlinking (Daniel)
- Added array_sum() function. (Andrei)
- Fixed a bug in session.c. The php_session_save_current_state did not check
if mod_data is NULL and such situation is possible if the user calls
session_module_name with a parameter. (alex@zend.com)
- Added IIS Admin extension. (Frank)
- OCIBindByName() now does better parameter-checking. (Thies)
- Made read() binary-safe in sockets.c (Chris Vandomelen)
- Made array_intersect() and array_diff() not alter order (Stig Venaas)
- Made ldap_connect() accept URL in host parameter when using OpenLDAP
2.x. To use SSL, use ldaps://host/ as URL. (Stig Venaas)
- Made resource type names visible, e.g. var_dump() and
get_resource_type() display "file" for file resources. (Andrei)
- Added the curl_getinfo() function to find out information about a CURL
transfer. This function requires cURL 7.4.0 or above. (Sterling)
- Added the CURLOPT_KRB4, CURLOPT_INTERFACE, CURLOPT_QUOTE, CURLOPT_POSTQUOTE,
CURLOPT_QUOTE and CURLOPT_HTTPPROXYTUNNELL options. (Sterling)
- Renamed the shm_* functions to shmop_* (Derick)
- Updated ext/mysql/libmysql to version 3.23 (tim@mysql.com)
- Added ldap_get_option() and ldap_set_option() functions (Stig Venaas)
- Fixed a crash in CGI mode, in case no file was provided
(Daniel Beulshausen& Zeev)
- Fixed possible crash bug in imap_fetchstructure() (Jani)
- Fixed possible crash bug in imap_open() (Jani & Mark Musone)
- Added url_rewriter.tags configuration directive (Sascha)
- Added CORBA client extension, ready for use (eriksson@php.net)
- Fixed memory leak in x-httpd-source mode (Jason Greene)
- Changed ext/gd not to be enabled by default (Jani)
- Make increment of empty string ("") behave like in PHP 3 and result in "1"
(Andi, Zend Engine)
- Added POST handler for Adobe FDF format (Hartmut)
- Added transparent read and write .gz-files on glibc based systems
using the 'zlib:' fopen wrapper (Hartmut)
- Fixed a problem in the configuration parser (two null bytes were added
to each ENCAPSULATED TC_STRING) (alex@zend.com)
- Added HMAC support in the mhash module (nmav@altera.gr)
- Added module for Ovrimos sql server (nmav@altera.gr)
11 Oct 2000, Version 4.0.3
- Fixed a possible crash in -a interactive mode (Zeev, Zend Engine)
- Added mysql_escape_string() (Peter A. Savitch and & Brian Wang)
- Fixed many possible crash bugs with improper use of the printf() family of
functions (Andi)
- Fixed a problem that allowed users to override admin_value's and admin_flag's
(Zeev)
- Fixed PostgreSQL module to work when the link handle is omitted (Zeev)
- Fixed returning of empty LOB fields in OCI8. (Thies)
- Added Calendar module to default Win32 build (Andi)
- Added FTP module to default Win32 build (Andi)
- Fixed crash in the POSIX getrlimit() function (alex@zend.com)
- Fixed dirname() under certain conditions (Andi)
- Added --with-imap-ssl to support SSL'ized imap library in RH7 and others
(Rasmus)
- Fixed possible crash bug in parse_url() (Andi)
- Added support for trans sid under Win32 (Daniel)
- Added IPv6 support in fopen (Stig Venaas)
- Added the shmop extension. It allows more general ways of shared memory
access. (thanks to Ilia Alshanestky <iliaa@home.com> and Slava Poliakov
<slavapl@mailandnews.com> (Derick)
- Added the ability for CURLOPT_POSTFIELDS to accept an associative array of
HTTP POST variables and values. (Sterling)
- Added the CURLOPT_HTTPHEADER option to curl_setopt(). (Sterling)
- Added the curl_error() and curl_errno() functions. (Sterling)
- Changed ext/db not to be enabled by default (Jani)
- Fixed building Apache SAPI module on SCO UnixWare (Sascha)
- Fixed writing empty session sets to shared memory (tcarroll@chc-chimes.com)
- Added support for BSD/OS make (Sascha)
- Added improved URL rewriter (Sascha)
- Fixed readdir_r() use on Solaris (Sascha)
- Improved HTTP headers for private-caching (jon@csh.rit.edu, Sascha)
- Added new function session_cache_limiter (jon@csh.rit.edu, Sascha)
- Added ftp_exec to the ftp functions (thanks to <jhennebicq@i-d.net>)
(Derick)
- PEAR: add last executed query as debug info in DB errors (Stig)
- PEAR: allow multiple modes in PEAR_Error (Stig)
- Made the Sybase CT module thread safe (Zeev)
- Added second argument to array_reverse() that indicatese whether
the original array keys should be preserved. (Andrei)
- Clean up htmlspecialchars/htmlentities inconsistencies. (Rasmus)
- PEAR: renamed DB_GETMODE_* to DB_FETCHMODE_*, added setFetchMode()
in DB_common to set the default mode, added some MySQL tests (Stig)
- Made eval() and several other runtime-evaluated code portions report the
nature and location of errors more accurately (Stas)
- Added an optional parameter to wordwrap that cuts a string if the length of a
word is longer than the maximum allowed. (Derick)
- Added functions pg_put_line and pg_end_copy (Dirk Elmendorf)
- Added second parameter for parse_str to save result (John Bafford)
- Fixed bug with curl places extra data in the output. (medvitz@medvitz.net)
- Added the pathinfo() function. (Sterling)
- Updated sybase_ct module and its sybase_query to use high performance API.
(Joey)
- Added a more configurable error reporting interface to DB. (Stig)
- Added is_uploaded_file() and move_uploaded_file() (Zeev)
- Added several directives to php.ini - post_max_size, file_uploads,
display_startup_errors - see php.ini-dist for further information (Zeev)
- Worked around a bug in the libc5 implementation of readdir() (Stas)
- Fixed some potential OpenBSD and NetBSD crash bugs when opening files. (Andi)
- Added EscapeShellArg() function (Rasmus)
- Added a php.ini option session.use_trans_sid to enable/disable trans-sid.
(Sterling)
- Added the Sablotron extension for XSL parsing. (Sterling)
- Fixed a bug in checkdate() which caused < 1 years to be valid (Jani)
- Added support for an optional output handler function for output
buffering. This enables transparent rendering of XML through XSL,
transparent compression, etc. (Zeev)
- Added support for user defined 'tick' callback functions. This helps
emulate background processing. (Andrei)
- Fixed problem with having $this as the XML parser object. (Andrei)
- Internal opened_path variable now uses the Zend memory manager so that full
paths of files won't leak on unclean shutdown (Andi)
- Removed support of print $obj automatically calling the __string_value()
method. Instead define yourself a method such as toString() and use
print $obj->toString() (Andi, Zend Engine)
29 Aug 2000, Version 4.0.2
- Added PHP API for Zend's ticks. (Stig)
- PHP 3 regression testing framework re-born (Stig)
- Added php_uname() function (Stig)
- Made a minor change to allow building with OpenLDAP 2.0 (Stig Venaas)
@@ -17,7 +717,8 @@ PHP 4.0 NEWS
syntax for the walk function. (Andrei)
- Fixed segfault with fgets(), fgetcsv(), fgetss(), and fread() when
called with negative length argument. (Torben)
- Fix by-reference parameters passing for xml_ functions and for scanf functions (Stas)
- Fixed by-reference parameters passing for xml_ functions and for scanf
functions (Stas)
- Added experimental Oracle LDAP SDK support. 8.1.6 or later needed. Configure
with something like --with-ldap=/usr/local/oracle/product/8.1.6 (Stig Venaas)
- Fixed memory leaks in eval(); A script that used eval() extensively, could
@@ -183,7 +884,7 @@ PHP 4.0 NEWS
and currently run through a system call. This will speed up the UdmSearch
php frontend significantly. (Rasmus)
- Modified in_array() to not touch array pointer. (Andrei)
- Added restore_error_handler(). (Zeev, Zend engine)
- Added restore_error_handler(). (Zeev, Zend Engine)
- Fixed erroneous file names and line numbers in error situations under the
multithreaded version of PHP - most noticeably Win32 (Zeev, Zend Engine)
- Fixed problem with CGI crashing on certain servers especially Windows Apache
@@ -309,7 +1010,7 @@ PHP 4.0 NEWS
(Patch by daniel.braun@ercom.fr)
- Added extension YAZ (dickmeiss).
- Fixed a crash bug triggered by certain cases of class redeclarations
(Stanislav & Zeev, Zend Engine)
(Stas & Zeev, Zend Engine)
- Fixed min()/max() segfault. (Andrei)
- New module for reading EXIF header data from JPEG files. Most digital
cameras will embed all sorts of information about a picture inside the
-17
View File
@@ -1,17 +0,0 @@
How to install PHP with the BCMath arbitrary precision math library?
--------------------------------------------------------------------
Due to license restrictions, the BC math library can no longer be distributed
along with PHP. The BC math library is distributed under the restrictive
GNU Public License, and PHP is no longer distributed under that license, but
under a less restrictive license, the PHP License.
If you want to enable BC math support (recommended), all you have to do is
simply download http://www.php.net/extra/number4.tar.gz, and untar it on the
top level php4 directory.
A typical way of doing this would be (assuming that you have lynx):
cd ~/php4
lynx -dump -source http://www.php.net/extra/number4.tar.gz | gzip -d | tar xvf -
The PHP Group
+2 -1
View File
@@ -64,7 +64,8 @@ NEWS file. Everything else goes into the ChangeLog.
It is important to note that if your comment or news logline spans multiple
lines, you have to put # or @ at the beginning of _every_ such line. Every
entry in NEWS has to have a name after it, so if you did it with someone's
help, put both your names there.
help, put both your names there. Your name WILL NOT be automatically put
at the end of the NEWS entry - so, please provide it yourself.
Example. Say you modified two files, datetime.c and string.c. In datetime.c
you added a new format option for date() function, and in string.c you fixed
+39
View File
@@ -0,0 +1,39 @@
Between PHP 4.0.6 and 4.1.0, the Zend module struct changed in a way
that broke both source and binary compatibility. If you are
maintaining a third party extension, here's how to update it:
If this was your old module entry:
zend_module_entry foo_module_entry = {
"foo", /* extension name */
foo_functions, /* extension function list */
NULL, /* extension-wide startup function */
NULL, /* extension-wide shutdown function */
PHP_RINIT(foo), /* per-request startup function */
PHP_RSHUTDOWN(foo), /* per-request shutdown function */
PHP_MINFO(foo), /* information function */
STANDARD_MODULE_PROPERTIES
};
Here's how it should look if you want your code to build with PHP
4.1.0 and up:
zend_module_entry foo_module_entry = {
#if ZEND_MODULE_API_NO >= 20010901
STANDARD_MODULE_HEADER,
#endif
"foo", /* extension name */
foo_functions, /* extension function list */
NULL, /* extension-wide startup function */
NULL, /* extension-wide shutdown function */
PHP_RINIT(foo), /* per-request startup function */
PHP_RSHUTDOWN(foo), /* per-request shutdown function */
PHP_MINFO(foo), /* information function */
#if ZEND_MODULE_API_NO >= 20010901
FOO_VERSION, /* extension version number (string) */
#endif
STANDARD_MODULE_PROPERTIES
};
If you don't care about source compatibility with earlier PHP releases
than 4.1.0, you can drop the #if/#endif lines.
+9 -6
View File
@@ -51,9 +51,13 @@ FORMAT OF FUNCTION DEFINITIONS FILE
']'s as there where '['s. Currently, it does not harm if you forget to do it
or there is a wrong amount of ']'s, but this may change in the future.
An additional short description may be added after the parameters.
If present it will be filled into the 'proto' header comments in the stubs
code and the <refpurpose> tag in the XML documentation.
An example:
my_function(int arg1, int arg2 [, int arg3 [, int arg4]])
my_function(int arg1, int arg2 [, int arg3 [, int arg4]]) this is my 1st
Arguments arg3 and arg4 are optional.
@@ -124,8 +128,8 @@ CURRENT LIMITATIONS, BUGS AND OTHER ODDITIES
It can't handle correctly, and probably never will, variable list of
of arguments. (void foo(int bar [, ...])
Don't trust too much the generated code. It tries to be useful in most of
the situations you might encounter, but automatic code generating will never
Don't trust the generated code too much. It tries to be useful in most of
the situations you might encounter, but automatic code generation will never
beat a programmer who knows the real situation at hand. ext_skel is generally
best suited for quickly generating a wrapper for c-library functions you
might want to have available in PHP too.
@@ -150,15 +154,14 @@ PHP_FUNCTION(my_drawtext)
int argc;
int image_id = -1;
int font_id = -1;
???LS_FETCH();
argc = ZEND_NUM_ARGS();
if (argc < 5 || argc > 6 || zend_get_parameters_ex(argc, &image, &text, &font, &x, &y, &color) == FAILURE) {
WRONG_PARAM_COUNT;
}
ZEND_FETCH_RESOURCE(???, ???, image, image_id, "???", ???G());
ZEND_FETCH_RESOURCE(???, ???, font, font_id, "???", ???G());
ZEND_FETCH_RESOURCE(???, ???, image, image_id, "???", ???_rsrc_id);
ZEND_FETCH_RESOURCE(???, ???, font, font_id, "???", ???_rsrc_id);
switch (argc) {
case 6:
+243
View File
@@ -0,0 +1,243 @@
An Overview of the PHP Streams abstraction
==========================================
$Id$
Please send comments to: Wez Furlong <wez@thebrainroom.com>
Note: this doc is preliminary and is intended to give the reader an idea of
how streams work and should be used.
Why Streams?
============
You may have noticed a shed-load of issock parameters flying around the PHP
code; we don't want them - they are ugly and cumbersome and force you to
special case sockets and files everytime you need to work with a "user-level"
PHP file pointer.
Streams take care of that and present the PHP extension coder with an ANSI
stdio-alike API that looks much nicer and can be extended to support non file
based data sources.
Using Streams
=============
Streams use a php_stream* parameter just as ANSI stdio (fread etc.) use a
FILE* parameter.
The main functions are:
PHPAPI size_t php_stream_read(php_stream * stream, char * buf, size_t count);
PHPAPI size_t php_stream_write(php_stream * stream, const char * buf, size_t
count);
PHPAPI int php_stream_eof(php_stream * stream);
PHPAPI int php_stream_getc(php_stream * stream);
PHPAPI char *php_stream_gets(php_stream * stream, char *buf, size_t maxlen);
PHPAPI int php_stream_close(php_stream * stream);
PHPAPI int php_stream_flush(php_stream * stream);
PHPAPI int php_stream_seek(php_stream * stream, off_t offset, int whence);
PHPAPI off_t php_stream_tell(php_stream * stream);
These (should) behave in the same way as the ANSI stdio functions with similar
names: fread, fwrite, feof, fgetc, fgets, fclose, fflush, fseek, ftell.
Opening Streams
===============
Ultimately, I aim to implement an fopen_wrapper-like call to do this with
minimum fuss.
Currently, mostly for testing purposes, you can use php_stream_fopen to open a
stream on a regular file.
PHPAPI php_stream * php_stream_fopen(const char * filename, const char *
mode);
This call behaves just like fopen(), except it returns a stream instead of a
FILE *
Casting Streams
===============
What if your extension needs to access the FILE* of a user level file pointer?
You need to "cast" the stream into a FILE*, and this is how you do it:
FILE * fp;
php_stream * stream; /* already opened */
if (php_stream_cast(stream, PHP_STREAM_AS_STDIO, &fp, 1) == FAILURE) {
RETURN_FALSE;
}
The prototype is:
PHPAPI int php_stream_cast(php_stream * stream, int castas, void ** ret, int
show_err);
The show_err parameter, if non-zero, will cause the function to display an
appropriate error message of type E_WARNING if the cast fails.
castas can be one of the following values:
PHP_STREAM_AS_STDIO - a stdio FILE*
PHP_STREAM_AS_FD - a generic file descriptor
PHP_STREAM_AS_SOCKETD - a socket descriptor
If you ask a socket stream for a FILE*, the abstraction will use fdopen to
create it for you. Be warned that doing so may cause buffered data to be lost
if you mix ANSI stdio calls on the FILE* with php stream calls on the stream.
If your system has the fopencookie function, php streams can synthesize a
FILE* on top of any stream, which is useful for SSL sockets, memory based
streams, data base streams etc. etc.
NOTE: There might be situations where this is not desireable, and we need to
provide a flag to inform the casting routine of this.
You can use:
PHPAPI int php_stream_can_cast(php_stream * stream, int castas)
to find out if a stream can be cast, without actually performing the cast, so
to check if a stream is a socket you might use:
if (php_stream_can_cast(stream, PHP_STREAM_AS_SOCKETD) == SUCCESS) {
/* it's a socket */
}
Stream Internals
================
There are two main structures associated with a stream - the php_stream
itself, which holds some state information (and possibly a buffer) and a
php_stream_ops structure, which holds the "virtual method table" for the
underlying implementation.
The php_streams ops struct consists of pointers to methods that implement
read, write, close, flush, seek, gets and cast operations. Of these, an
implementation need only implement write, read, close and flush. The gets
method is intended to be used for non-buffered streams if there is an
underlying method that can efficiently behave as fgets. The ops struct also
contains a label for the implementation that will be used when printing error
messages - the stdio implementation has a label of "STDIO" for example.
The idea is that a stream implementation defines a php_stream_ops struct, and
associates it with a php_stream using php_stream_alloc.
As an example, the php_stream_fopen() function looks like this:
PHPAPI php_stream * php_stream_fopen(const char * filename, const char * mode)
{
FILE * fp = fopen(filename, mode);
php_stream * ret;
if (fp) {
ret = php_stream_alloc(&php_stream_stdio_ops, fp, 0, 0, mode);
if (ret)
return ret;
fclose(fp);
}
return NULL;
}
php_stream_stdio_ops is a php_stream_ops structure that can be used to handle
FILE* based streams.
A socket based stream would use code similar to that above to create a stream
to be passed back to fopen_wrapper (or it's yet to be implemented successor).
The prototype for php_stream_alloc is this:
PHPAPI php_stream * php_stream_alloc(php_stream_ops * ops, void * abstract,
size_t bufsize, int persistent, const char * mode)
ops is a pointer to the implementation,
abstract holds implementation specific data that is relevant to this instance
of the stream,
bufsize is the size of the buffer to use - if 0, then buffering at the stream
level will be disabled (recommended for underlying sources that implement
their own buffering - such a FILE*),
persistent controls how the memory is to be allocated - persistently so that
it lasts across requests, or non-persistently so that it is freed at the end
of a request (it uses pemalloc),
mode is the stdio-like mode of operation - php streams places no real meaning
in the mode parameter, except that it checks for a 'w' in the string when
attempting to write (this may change).
The mode parameter is passed on to fdopen/fopencookie when the stream is cast
into a FILE*, so it should be compatible with the mode parameter of fopen().
Writing your own stream implementation
======================================
First, you need to figure out what data you need to associate with the
php_stream. For example, you might need a pointer to some memory for memory
based streams, or if you were making a stream to read data from an RDBMS like
mysql, you might want to store the connection and rowset handles.
The stream has a field called abstract that you can use to hold this data.
If you need to store more than a single field of data, define a structure to
hold it, allocate it (use pemalloc with the persistent flag set
appropriately), and use the abstract pointer to refer to it.
For structured state you might have this:
struct my_state {
MYSQL conn;
MYSQL_RES * result;
};
struct my_state * state = pemalloc(sizeof(struct my_state), persistent);
/* initialize the connection, and run a query, using the fields in state to
* hold the results */
state->result = mysql_use_result(&state->conn);
/* now allocate the stream itself */
stream = php_stream_alloc(&my_ops, state, 0, persistent, "r");
/* now stream->abstract == state */
Once you have that part figured out, you can write your implementation and
define the your own php_stream_ops struct (we called it my_ops in the above
example).
For example, for reading from this wierd mysql stream:
static size_t php_mysqlop_read(php_stream * stream, char * buf, size_t count)
{
struct my_state * state = (struct my_state*)stream->abstract;
if (buf == NULL && count == 0) {
/* in this special case, php_streams is asking if we have reached the
* end of file */
if (... at end of file ...)
return EOF;
else
return 0;
}
/* pull out some data from the stream and put it in buf */
... mysql_fetch_row(state->result) ...
/* we could do something strange, like format the data as XML here,
and place that in the buf, but that brings in some complexities,
such as coping with a buffer size too small to hold the data,
so I won't even go in to how to do that here */
}
Implement the other operations - remember that write, read, close and flush
are all mandatory. The rest are optional. Declare your stream ops struct:
php_stream_ops my_ops = {
php_mysqlop_write, php_mysqlop_read, php_mysqlop_close,
php_mysqlop_flush, NULL, NULL, NULL,
"Strange mySQL example"
}
Thats it!
Take a look at the STDIO implementation in streams.c for more information
about how these operations work.
The main thing to remember is that in your close operation you need to release
and free the resources you allocated for the abstract field. In the case of
the example above, you need to use mysql_free_result on the rowset, close the
connection and then use pefree to dispose of the struct you allocated.
You may read the stream->persistent field to determine if your struct was
allocated in persistent mode or not.
vim:tw=78
+103 -79
View File
@@ -1,102 +1,126 @@
Using PHP4 with the Zeus Web Server
-----------------------------------
Zeus fully supports running PHP in combination with our webserver. A
significant improvement in PHP 4 is that you can now run PHP as an
ISAPI module, giving great performance benefits over traditional CGI
code.
Zeus fully supports running PHP in combination with our
webserver. There are three different interfaces that can be used to
enable PHP:
Note that you will need to be running at least version 3.3.6 of the
webserver. If you are running an earlier version, please see our
website (http://www.zeus.com) for upgrade instructions.
* CGI
* ISAPI
* FastCGI
Of the three, we recommend using FastCGI, which has been tested and
benchmarked as providing the best performance and reliability.
Full details of how to install PHP are available from our
website, at:
http://support.zeus.com/products/php.html
If you have any problems, please check the support site for more
up-to-date information and advice.
To build the ISAPI version of PHP, start the configuration with:
Quick guide to installing FastCGI with Zeus
-------------------------------------------
./configure --with-zeus=/usr/local/zeus
Step 1 - obtain and install FastCGI development kit.
Obviously, replace /usr/local/zeus with the location of where you have
installed Zeus on your machine. For PHP to build successfully, you
need to have 3.3.6 already installed, because the code relies on the
presence of header files provided with the latest version.
Grab the package from:
http://www.fastcgi.com/dist/devkit_2.2.0.tar.gz
You may have to adjust the environment variable LDFLAGS and EXTRA_LIBS
in order to link in extra libraries. This depends on the platform on
which you are building and also on the compiler used (see below). A
standard GNU/Linux install with GCC should build fine with no changes.
Extract the package and follow the instructions:
./configure
make
make export
(run the last as root)
This will install to /usr/local/lib/libfcgi.a
and /usr/local/include/*fcgi*
Configuring the webserver
-------------------------
After running 'make' and 'make install', you will have a 'libphp4.so'
file. Copy this file into a directory reserved for ISAPI
binaries. Now, perform the following steps for each virtual server
that you wish to run PHP on:
Step 2 - Compile PHP as FastCGI.
1) On the Admin server, go to 'edit server->path mapping'
2) Add an alias to the directory with libphp4.so in it, mapped to
/isapi/ (or a location of your choice). Make sure you set the alias
type to ISAPI.
3) Click 'update'
4) Add a handler for file extension 'php' to be run by /isapi/libphp4.so
5) Click 'update', then go back to the previous page.
6) Click on the 'module configuration' button, ensure that ISAPI
support is ticked.
7) Click on the ISAPI link. At the bottom of the page, click the
checkbox for running ISAPI extensions 'out of process'.
8) Click 'update'. Then restart the virtual server. Done!
Compile as follows:
./configure --with-fastcgi
make
Note that PHP has many options to the configure script -
e.g. --with-mysql. You will probably want to select your usual options
before compiling; the above is just a bare minimum, for illustration.
After compilation finishes, you will be left with an executable
program called 'php'. Copy this into your document root, under a
dedicated FastCGI directory (e.g. $DOCROOT/fcgi-bin/php)
Troubleshooting
---------------
Step 3 - configure Zeus
*) Why does the compile fail at Zend/zend-scanner-cc.cc
or Zend/zend-parser.c ?
Four stages:
- enable FastCGI
- configure FastCGI
- setup alias for FastCGI
- setup alias for PHP
These source files are auto-generated from the corresponding .y files.
The default distribution of PHP contains pre-generated versions of these
files that have caused problems for some people. The simplest solution is
to delete the files. They will then be rebuilt correctly. You must have the
following GNU tools to do this:
1) Using the admin server, go to the 'module configuration' page for
your virtual server, and ensure that 'fastcgi' is enabled (select the
tickbox to the left).
bison 1.28 or later
flex 2.5.4 or later
2) While we can run FastCGI's locally, there are known problems with
some OS's (specifically, the communication between web server and
FastCGI happens over a unix domain socket, and some OS's have trouble
sustaining high connection rates over these sockets). So instead, we
are going to set up the PHP FastCGI to run 'remotely' over localhost
(this uses TCP sockets, which do not suffer this problem). Go to the
'fastcgi configuration' page, and under 'add remote fastcgi':
Add Remote FastCGI
Docroot path /fcgi-bin/php
Remote machine localhost:8002
The first entry is where you saved PHP, above.
The second entry is localhost:<any unused port>
We will start the FastCGI listening on this port shortly.
Click 'update' to commit these changes.
*) Why does my PHP library fail to load?
3) Go to the path mapping module and add an alias for FastCGI:
Add Alias
Docroot path /fcgi-bin
Filesystem directory /path/to/docroot/fcgi-bin
Alias type fastcgi
Click 'update' to commit these changes
After configuring Zeus, if you get a '502 Bad Gateway' error when
accessing a PHP page, there are problems loading the PHP
library. Check the error log ($ZEUSHOME/web/log/errors) for errors.
4) Also on the path mapping module, add a handler for PHP:
Add handler
File extension php
Handler /fcgi-bin/php
Click 'update' to commit these changes
Failing to load the PHP ISAPI module is likely to be due to unresolved
symbols in the module. A way to check for this is to visit our support
page at http://support.zeus.com/faq/entries/isapi_error.html and run
the program there on your libphp4.so. It will list any unresolved
symbols.
*) My libphp4.so has unresolved symbols. How do I fix this?
You must ensure that the PHP build process links in the appropriate
libraries that contain these symbols! The libraries required will
depend on the platform you are running PHP on.
You may need to set one or two environment variables before running
the 'configure' program to set up PHP; LDFLAGS and EXTRA_LIBS. Make
sure that you also export these variables to the build process.
(Type 'export LDFLAGS EXTRA_LIBS' in the shell to do this.)
Specific examples:
Solaris + gcc:
Ensure you run ./configure with the `--enable-libgcc' parameter. You
may need to set LDFLAGS to '-L/usr/local/egcs/lib' (path depends on
your gcc installation)
FreeBSD 4.0:
Some people may find they need to run ./configure with the
'--enable-libgcc' compile option too.
Finally restart your virtual server for these changes to take effect.
For more information and help with Zeus, please visit our website:
http://www.zeus.com
Step 4 - start PHP as a FastCGI runner
When you start PHP, it will pre-fork a given number of child processes
to handle incoming PHP requests. Each process will handle a given
number of requests before exiting (and being replaced by a newly
forked process). You can control these two parameters by setting the
following environment variables BEFORE starting the FastCGI runner:
PHP_FCGI_CHILDREN - the number of child processes to pre-fork. If not
set, defaults to 8.
PHP_FCGI_MAX_REQUESTS - the number of requests each PHP child process
handles before exiting. If not set, defaults to 500.
To start the FastCGI runner, execute '$ZEUSHOME/web/bin/fcgirunner
8002 $DOCROOT/fcgi-bin/php'. Substitute the appropriate values for
$ZEUSHOME and $DOCROOT; also substitute for 8002 the port you chose,
above.
To stop the runner (e.g. to experiment with the above environment
variables) you will need to manually stop and running PHP
processes. (Use 'ps' and 'kill'). As it is PHP which is forking lots
of children and not the runner, Zeus unfortunately cannot keep track
of what processes are running, sorry. A typical command line may look
like 'ps -efl | grep $DOCROOT/fcgi-bin/php | grep -v grep | awk
'{print $4}' | xargs kill'
+186
View File
@@ -0,0 +1,186 @@
Advisory on the PHP Release Cycle
Copyright & Liciencing
This Document is (c) Copyright 2000,2001 by The PHP Group
This Document is distributed under the terms of the GNU General
Public License as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later
version.
Table of Contents
1. Introduction
2. Dealing with bugs
2.1 As a QA Team Member
2.2 As a Developer
3. Releaseing another RC
4. CVS During the Release Process
4.1 Useful CVS Commands
5 The Final Release
6 Summary
1. Introduction
This cycle should take place over roughly 10 days. When it is
decided it is time for an Release to occur Andi/Zeev (Or
Whoever) will tarball RC1, Tag & Branch CVS (see section 4)
and then announce the RC on PHP-QA and PHP-DEV. At this
point the build tracker and QA Bug System come into play.
If you successfully build PHP then report it in the build
tracker, If you then run and complete all the tests you
should report this too in the build tracker when
these features become avalible.
2. Dealing with Bugs
2.1 As a QA Team member
If you find a bug in an RC that you think is a showstopper
then, even if it is a known bug, you should report it in the
QA Bug system. This marks the bug for discussion at least,
and preferably fixing before the actual release. This system
is separate from the main bugs system so that important bugs
dont get lost in the midst if lots of feature/change request
in the approach to a release. It is imperitive where
appropraite that as a QA'er a test script, Configure options
and PHP.ini files are provided to enable the developer to
reproduce the bug, this is an important part of our job. If
you have a serious bug then you should also create a test
script to be added to the tests dir of the php source so
that at the end of the process to enable us to make sure bug
does not return. It is not difficult to create these test
scripts and a readme on it can be found in
php4/tests/README.
2.2 As a Developer
What should happen is that when a bug is reported it
is send to php-dev and php-qa as with other bugs. We should
have far stricter assignment system in this bug cycle rather
than just leaving them. Once again bugs should be able to be
marked as To Be Fixed Before release or moved to other bug
system. (This is currently the Release Masters responsibility)
Then before the actual release the qa bugs system can be
checked and if there are outstanding To Be Fixed Before
release bugs the Developers can see this easyly rather than
show stoppers being dismissed and not worried about.
When a bug is fixed the QAer who reported the bug is emailed
and asked to test again and see if the bug is fixed.
3 Releasing another RC
If it is felt necessary that a 2nd RC is needed then it
should be packaged as before and announced to both lists
again. The testing process then starts again, the RC2 is
added to the build tracker and QA'ers are asked to build and
retest the scripts as appropriate, espectially if you
reported a bug, you should test thourghly for your
bug and make sure it no longer occurs. This will normally
add anouther 3 days to the cycle, giving QA'ers time to
build test and report back, then for developers to
fix any problems.
4 CVS during the release process
At the point where the first RC is create a branch is
formed. This branch is not altered form that point onward
other than major bug fixes. Minor non important bug
fixes should not be applied to this branch but to the main
tree instead. Any major bug fixes should be applied to both
trees. The developer should test and check the RC tree then
also test and check the MAIN tree. This is their
responsibility to make sure (as far as possible) that the
bug fix works on both trees.
4.1 Useful CVS Commands
To create a Branch <Should only be done by person tarballing
the RC (The Release Master)>:
$ cvs tag -b php_4_0_<Version>RC<NUMBER>
IE:
$ cvs tag -b php_4_0_1RC1
This should be executed in the PHP directory of an up to
date checkout. Remember to also tag the Zend and TSRM repositories.
You can retrieve a branch in one of two ways: by checking it
out fresh from the repository, or by switching an existing
working copy over to the branch, I would suggest you
checkout a new copy.
To check out a new copy:
$ cvs checkout -r php_4_0_<Version>RC<NUMBER> php4
IE:
$ cvs checkout -r php_4_0_1RC1 php4
To switch a working copy (Not recomended due to possible
commiting to wrong branch)
$ cvs update -r php_4_0_<Version>RC<NUMBER> php4
IE:
$ cvs update -r php_4_0_1RC1 php4
This should be done in the PHP4 directory itself.
To revert back to normal branch you should use the
following:
$ cvs update -A
To Commit to the branch you follow exactly the same
procedure as normal
$ cvs commit file.c
MAKE SURE YOU DO NOT COMMIT TO THE WRONG BRANCH.
5 The Final Release
When it is time to make the final release the following
proceedure should be followed. The person who is tarballing
the final release should check the QA bugs system and make
sure there are no showstoppers left unfixed. If there are
then bug the person the bug is assigned to until they fix
it. If there are no more qa bugs then they should tag the
branch as php_4_0_<Version> and tarball as usual. An email
should be sent to PHP-GEN, PHP_DEV and PHP-QA about the new
release and it should be added to php.net. The windows
binaries and servelets should be built as soon as possible
and added too, as should the windows installer.
6 Summary
Here is a summary of what a release cycle might look like:
Thurs: RC is agreed on and packaged, an email is sent to
PHP_QA and PHP-DEV, the CVS is Branched and the
Release Cycle Begins.
Mon: After a weekends testing most show stoppers should
have been found (Hopefully) and the developers get to
work on fixing them.
Thurs: A second RC is released if needed with the new bug
fixes in and the QAers test again.
Sun: A review is made of all outstanding bugs and any show
stoppers should be fixed. if there are no show
stoppers then the final release is packaged and
released on the monday morning on php.net
Mon: Release is made.
James
--
James Moore
PHP QA Team
jmoore@php.net
+47 -27
View File
@@ -5,18 +5,28 @@ Zend
----
* allow foreach ($array as $k => &$val) syntax. right now we cannot
traverse an array without copying each element.
* allow foreach ($array as $k => list($a, $b)) syntax for multi
dimensional arrays.
* look at replacing c-lib call tolower().
* make hash API functions work with HASH_OF() to save time.
* native large number support (probably with GNU GMP)
* Const'ify APIs. Right now, many functions leave parameters untouched,
but don't declare those as const. This makes interaction with other
interfaces difficult which pass const parameters to us.
* add try..catch/throw exception handling
global
------
* when used in standalone (skell-script like) mode don't urldecode
arguments passed to php. right now it's not possible to say
/usr/local/bin/php somescript.php dog+cat.txt
as "dog+cat.txt" will arrive in php as "dog cat.txt".
* make everything on the language-level independent of your locale setings.
* always build the standalone executable as well as the chosen SAPI
target.
* make sure all source files have the "right" copyright.
* the following modules still use PHP3_TLS_*() macros (and thereby don't
work in ZTS mode): ext/dav/dav.c, ext/db/db.c, ext/gd/gd.c, ext/ldap/ldap.c
* INI system causes segfaults in ZTS mode (operates on static HashTable)
work in ZTS mode): ext/db/db.c, ext/gd/gd.c
* make sure that all ZTS globals get destructed. Most ts_allocate_id()
calls should have a dtor entry.
* activate all extensions by default that don't rely on external
@@ -24,7 +34,7 @@ global
* --enable-all in configure. (--enable-shared=max ...)
* make configure print out a summary when it's done (like XEmacs)
* replace standard functions which work on static data with
reentrancy-safe functions.
reentrancy-safe functions (DONE?).
* on some platforms unimplemented function will just do nothing (e.g. symlink)
they should print a warning or not even be defined!
* implement javadoc based function docs template system.
@@ -45,58 +55,62 @@ documentation
-------------
* add remarks in the documentation which functions are not implemented on win32.
* add remarks in the documentation which functions are not binary-safe.
* improve documentation for the sablotron extension
* update curl documentation
* write documentation for the bzip2 extension
* write documentation for the zziplib extension
ext/curl
--------
* Use the cURL write handler to save data for use when returning data or outputting
data.
* Have a warning scheme for when people use unsupported features.
ext/dav
--------
* rewrite.
ext/mcrypt
----------
* port to mcrypt-2.6 or later
ext/oci8
--------
* all OCIFetch*() functions should return 0 for no more data and false on error.
* have a flag that trims trailing spaces from CHAR fields on retrieval.
* make allow_call_time_pass_reference=Off working.
* make allow_call_time_pass_reference=Off working.
* for additional todo information, see oci8.c, in ext/oci8
ext/pcre
--------
* have an option for preg_grep() to return keys as well.
* update the online docs from version 3.1 man page
* Allow user to set PCRE_NOTEMPTY, PCRE_ANCHORED at execution time, maybe
* add option to preg_grep() to return entries that _don't_ match
ext/sablot
----------
* Re-write the error handling and reporting interface
* Cleanup the underlying code a bit
* Add proper support for the message handlers
ext/session
-----------
* implement a call to set a session read-only to overcome
the need to serialize frame-loads.
* maybe implement finer-grained session variables that could be
locked individually.
* write a network-transparent storage back-end with fallover
facilities
* provide a callback facility which is executed upon encountering
an unknown classname during deserialization
ext/sockets
-----------
* Make the extension work on windows (Daniel Beulshausen)
* Make the extension work with Solaris and the Sun GCC
ext/standard
------------
* add a version number to data serialized via serialize().
* array_add(). (Andrei)
* implement pathinfo()
$a = pathinfo("/some/file.bla");
=> array("dirname" => "/some/",
"basename" => "file.bla",
"extension" => "bla");
We could also make it return just one part as a sting if used
like this:
$a = pathinfo("/some/file.bla", PATHINFO_BASENAME);
* possibly modify parsing of GPC data to automatically create arrays if
variable name is seen more than once.
* implement regex-cache for url-functions.
* strcase_replace(). (Andrei)
* stri_replace(). (Andrei)
* move socket related functions to fsock.c.
* get_defined_funcs(), get_defined_vars().
* NOT binary safe:
strtok()
basename()
@@ -104,6 +118,12 @@ ext/standard
strrpos()
strrchr()
strip_tags()
* rewrite win32 SMTP code to be useable for *ix to, maybe as a (default)
module of its own (Hartmut)
ext/zziplib
------------
* more fully support the zziplib api
ext/wddx
--------
+35
View File
@@ -0,0 +1,35 @@
* Change the odbc_fetch_into() function to require ALWAYS the first two
parameters ($conn_id and $array), and make the third (row) be optional.
* Remove --with-openlink configure option (--with-iodbc replaces it).
* Always build CGI (--disable-cgi option to disable).
* Move most extensions and PEAR packages out of the PHP CVS tree,
include them again during release packaging.
* Renaming functions, so that they all are conform to one standard form.
* Allow foreach($array as $key => &$value).
* Allow foreach($array as list($var1, $var2)).
* Clean up "$instance = &new object" syntax (default to the =& behaviour?).
* Allow to set a default value for call-by-reference-parameters. eg:
function hallo (&$pallo = NULL) {}
* Change PHP error messages, so that they point to pages or sections in the
PHP Manual.
* Fix Zend shallow copy issues with objects and arrays.
* Make all extensions thread-safe.
* Finish PHP streams abstraction, nuke all that issock stuff, implement SSL
socket support. (wez)
- ext/ftp/ -> all FILEs to streams
- ext/bz2/ -> convert to stream impl.
* Using arg_separator.input to implode args in the CGI sapi extension
and arg_separator.input to explode in php_build_argv().
+1 -1
View File
@@ -1,4 +1,4 @@
Copyright (c) 1999,2000, Andi Gutmans, Sascha Schumann, Zeev Suraski.
Copyright (c) 1999, 2000, Andi Gutmans, Sascha Schumann, Zeev Suraski.
All rights reserved.
Redistribution and use in source and binary forms, with or without
+1 -1
View File
@@ -1,6 +1,6 @@
## process this file with automake to produce Makefile.am
AUTOMAKE_OPTIONS=foreign
noinst_LTLIBRARIES=libtsrm.la
libtsrm_la_SOURCES = TSRM.c
libtsrm_la_SOURCES = TSRM.c tsrm_strtok_r.c tsrm_virtual_cwd.c
depend:
+2
View File
@@ -0,0 +1,2 @@
- Improve the lock in ts_resource_ex() in order to cover less code.
This can probably be done by more careful hash table access
+204 -76
View File
@@ -2,18 +2,18 @@
+----------------------------------------------------------------------+
| Thread Safe Resource Manager |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Zeev Suraski |
| Copyright (c) 1999, 2000, Andi Gutmans, Sascha Schumann, Zeev Suraski|
| This source file is subject to the TSRM license, that is bundled |
| with this package in the file LICENSE |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
+----------------------------------------------------------------------+
| Author: Zeev Suraski <zeev@zend.com> |
| Authors: Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include "TSRM.h"
#ifdef ZTS
#include <stdio.h>
#include <stdlib.h>
@@ -39,36 +39,87 @@ typedef struct {
/* The memory manager table */
static tsrm_tls_entry **tsrm_tls_table;
static tsrm_tls_entry **tsrm_tls_table=NULL;
static int tsrm_tls_table_size;
static ts_rsrc_id id_count;
/* The resource sizes table */
static tsrm_resource_type *resource_types_table;
static tsrm_resource_type *resource_types_table=NULL;
static int resource_types_table_size;
static MUTEX_T tsmm_mutex; /* thread-safe memory manager mutex */
/* New thread handlers */
static void (*tsrm_new_thread_begin_handler)();
static void (*tsrm_new_thread_end_handler)();
static tsrm_thread_begin_func_t tsrm_new_thread_begin_handler;
static tsrm_thread_end_func_t tsrm_new_thread_end_handler;
/* Debug support */
static int tsrm_debug(const char *format, ...);
static int tsrm_debug_status;
int tsrm_error(int level, const char *format, ...);
/* Read a resource from a thread's resource storage */
static int tsrm_error_level;
static FILE *tsrm_error_file;
#if TSRM_DEBUG
#define TSRM_ERROR(args) tsrm_error args
#define TSRM_SAFE_RETURN_RSRC(array, offset, range) \
{ \
int unshuffled_offset = TSRM_UNSHUFFLE_RSRC_ID(offset); \
\
if (offset==0) { \
return &array; \
} else if ((unshuffled_offset)>=0 && (unshuffled_offset)<(range)) { \
TSRM_ERROR((TSRM_ERROR_LEVEL_INFO, "Successfully fetched resource id %d for thread id %ld - 0x%0.8X", \
unshuffled_offset, (long) thread_resources->thread_id, array[unshuffled_offset])); \
return array[unshuffled_offset]; \
} else { \
TSRM_ERROR((TSRM_ERROR_LEVEL_ERROR, "Resource id %d is out of range (%d..%d)", \
unshuffled_offset, TSRM_SHUFFLE_RSRC_ID(0), TSRM_SHUFFLE_RSRC_ID(thread_resources->count-1))); \
return NULL; \
} \
}
#else
#define TSRM_ERROR
#define TSRM_SAFE_RETURN_RSRC(array, offset, range) \
if (offset==0) { \
return &array; \
} else { \
return array[TSRM_UNSHUFFLE_RSRC_ID(offset)]; \
}
#endif
#if defined(PTHREADS)
/* Thread local storage */
static pthread_key_t tls_key;
#elif defined(TSRM_ST)
static int tls_key;
#elif defined(TSRM_WIN32)
static DWORD tls_key;
#endif
/* Startup TSRM (call once for the entire process) */
TSRM_API int tsrm_startup(int expected_threads, int expected_resources, int debug_status)
TSRM_API int tsrm_startup(int expected_threads, int expected_resources, int debug_level, char *debug_filename)
{
#if defined(GNUPTH)
pth_init();
#elif defined(PTHREADS)
pthread_key_create( &tls_key, 0 );
#elif defined(TSRM_ST)
st_init();
st_key_create(&tls_key, 0);
#elif defined(TSRM_WIN32)
tls_key = TlsAlloc();
#endif
tsrm_error_file = stderr;
tsrm_error_set(debug_level, debug_filename);
tsrm_tls_table_size = expected_threads;
tsrm_tls_table = (tsrm_tls_entry **) calloc(tsrm_tls_table_size, sizeof(tsrm_tls_entry *));
if (!tsrm_tls_table) {
TSRM_ERROR((TSRM_ERROR_LEVEL_ERROR, "Unable to allocate TLS table"));
return 0;
}
id_count=0;
@@ -76,7 +127,9 @@ TSRM_API int tsrm_startup(int expected_threads, int expected_resources, int debu
resource_types_table_size = expected_resources;
resource_types_table = (tsrm_resource_type *) calloc(resource_types_table_size, sizeof(tsrm_resource_type));
if (!resource_types_table) {
TSRM_ERROR((TSRM_ERROR_LEVEL_ERROR, "Unable to allocate resource types table"));
free(tsrm_tls_table);
tsrm_tls_table = NULL;
return 0;
}
@@ -84,9 +137,7 @@ TSRM_API int tsrm_startup(int expected_threads, int expected_resources, int debu
tsrm_new_thread_begin_handler = tsrm_new_thread_end_handler = NULL;
tsrm_debug_status = debug_status;
tsrm_debug("Started up TSRM, %d expected threads, %d expected resources\n", expected_threads, expected_resources);
TSRM_ERROR((TSRM_ERROR_LEVEL_CORE, "Started up TSRM, %d expected threads, %d expected resources", expected_threads, expected_resources));
return 1;
}
@@ -113,43 +164,55 @@ TSRM_API void tsrm_shutdown(void)
}
}
free(tsrm_tls_table);
tsrm_tls_table = NULL;
}
if (resource_types_table) {
free(resource_types_table);
resource_types_table=NULL;
}
tsrm_mutex_free(tsmm_mutex);
tsrm_debug("Shutdown TSRM\n");
tsmm_mutex = NULL;
TSRM_ERROR((TSRM_ERROR_LEVEL_CORE, "Shutdown TSRM"));
if (tsrm_error_file!=stderr) {
fclose(tsrm_error_file);
}
#if defined(GNUPTH)
pth_kill();
#elif defined(PTHREADS)
pthread_key_delete(tls_key);
#elif defined(TSRM_WIN32)
TlsFree(tls_key);
#endif
}
/* allocates a new thread-safe-resource id */
TSRM_API ts_rsrc_id ts_allocate_id(size_t size, ts_allocate_ctor ctor, ts_allocate_dtor dtor)
TSRM_API ts_rsrc_id ts_allocate_id(ts_rsrc_id *rsrc_id, size_t size, ts_allocate_ctor ctor, ts_allocate_dtor dtor)
{
ts_rsrc_id new_id;
int i;
tsrm_debug("Obtaining a new resource id, %d bytes\n", size);
TSRM_ERROR((TSRM_ERROR_LEVEL_CORE, "Obtaining a new resource id, %d bytes", size));
tsrm_mutex_lock(tsmm_mutex);
/* obtain a resource id */
new_id = id_count++;
tsrm_debug("Obtained resource id %d\n", new_id);
*rsrc_id = TSRM_SHUFFLE_RSRC_ID(id_count++);
TSRM_ERROR((TSRM_ERROR_LEVEL_CORE, "Obtained resource id %d", *rsrc_id));
/* store the new resource type in the resource sizes table */
if (resource_types_table_size < id_count) {
resource_types_table = (tsrm_resource_type *) realloc(resource_types_table, sizeof(tsrm_resource_type)*id_count);
if (!resource_types_table) {
return -1;
tsrm_mutex_unlock(tsmm_mutex);
TSRM_ERROR((TSRM_ERROR_LEVEL_ERROR, "Unable to allocate storage for resource"));
*rsrc_id = 0;
return 0;
}
resource_types_table_size = id_count;
}
resource_types_table[new_id].size = size;
resource_types_table[new_id].ctor = ctor;
resource_types_table[new_id].dtor = dtor;
resource_types_table[TSRM_UNSHUFFLE_RSRC_ID(*rsrc_id)].size = size;
resource_types_table[TSRM_UNSHUFFLE_RSRC_ID(*rsrc_id)].ctor = ctor;
resource_types_table[TSRM_UNSHUFFLE_RSRC_ID(*rsrc_id)].dtor = dtor;
/* enlarge the arrays for the already active threads */
for (i=0; i<tsrm_tls_table_size; i++) {
@@ -163,7 +226,7 @@ TSRM_API ts_rsrc_id ts_allocate_id(size_t size, ts_allocate_ctor ctor, ts_alloca
for (j=p->count; j<id_count; j++) {
p->storage[j] = (void *) malloc(resource_types_table[j].size);
if (resource_types_table[j].ctor) {
resource_types_table[j].ctor(p->storage[j]);
resource_types_table[j].ctor(p->storage[j], &p->storage);
}
}
p->count = id_count;
@@ -173,8 +236,8 @@ TSRM_API ts_rsrc_id ts_allocate_id(size_t size, ts_allocate_ctor ctor, ts_alloca
}
tsrm_mutex_unlock(tsmm_mutex);
tsrm_debug("Successfully allocated new resource id %d\n", new_id);
return new_id;
TSRM_ERROR((TSRM_ERROR_LEVEL_CORE, "Successfully allocated new resource id %d", *rsrc_id));
return *rsrc_id;
}
@@ -182,25 +245,36 @@ static void allocate_new_resource(tsrm_tls_entry **thread_resources_ptr, THREAD_
{
int i;
TSRM_ERROR((TSRM_ERROR_LEVEL_CORE, "Creating data structures for thread %x", thread_id));
(*thread_resources_ptr) = (tsrm_tls_entry *) malloc(sizeof(tsrm_tls_entry));
(*thread_resources_ptr)->storage = (void **) malloc(sizeof(void *)*id_count);
(*thread_resources_ptr)->count = id_count;
(*thread_resources_ptr)->thread_id = thread_id;
(*thread_resources_ptr)->next = NULL;
tsrm_mutex_unlock(tsmm_mutex);
#if defined(PTHREADS)
/* Set thread local storage to this new thread resources structure */
pthread_setspecific(tls_key, (void *) *thread_resources_ptr);
#elif defined(TSRM_ST)
st_thread_setspecific(tls_key, (void *) *thread_resources_ptr);
#elif defined(TSRM_WIN32)
TlsSetValue(tls_key, (void *) *thread_resources_ptr);
#endif
if (tsrm_new_thread_begin_handler) {
tsrm_new_thread_begin_handler(thread_id);
tsrm_new_thread_begin_handler(thread_id, &((*thread_resources_ptr)->storage));
}
for (i=0; i<id_count; i++) {
(*thread_resources_ptr)->storage[i] = (void *) malloc(resource_types_table[i].size);
if (resource_types_table[i].ctor) {
resource_types_table[i].ctor((*thread_resources_ptr)->storage[i]);
resource_types_table[i].ctor((*thread_resources_ptr)->storage[i], &(*thread_resources_ptr)->storage);
}
}
tsrm_mutex_unlock(tsmm_mutex);
if (tsrm_new_thread_end_handler) {
tsrm_new_thread_end_handler(thread_id);
tsrm_new_thread_end_handler(thread_id, &((*thread_resources_ptr)->storage));
}
}
@@ -211,14 +285,36 @@ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
THREAD_T thread_id;
int hash_value;
tsrm_tls_entry *thread_resources;
void *resource;
if (th_id) {
thread_id = *th_id;
} else {
if (!th_id) {
#if defined(PTHREADS)
/* Fast path for looking up the resources for the current
* thread. Its used by just about every call to
* ts_resource_ex(). This avoids the need for a mutex lock
* and our hashtable lookup.
*/
thread_resources = pthread_getspecific(tls_key);
#elif defined(TSRM_ST)
thread_resources = st_thread_getspecific(tls_key);
#elif defined(TSRM_WIN32)
thread_resources = TlsGetValue(tls_key);
#else
thread_resources = NULL;
#endif
if (thread_resources) {
TSRM_ERROR((TSRM_ERROR_LEVEL_INFO, "Fetching resource id %d for current thread %d", id, (long) thread_resources->thread_id));
/* Read a specific resource from the thread's resources.
* This is called outside of a mutex, so have to be aware about external
* changes to the structure as we read it.
*/
TSRM_SAFE_RETURN_RSRC(thread_resources->storage, id, thread_resources->count);
}
thread_id = tsrm_thread_id();
} else {
thread_id = *th_id;
}
tsrm_debug("Fetching resource id %d for thread %ld\n", id, (long) thread_id);
TSRM_ERROR((TSRM_ERROR_LEVEL_INFO, "Fetching resource id %d for thread %ld", id, (long) thread_id));
tsrm_mutex_lock(tsmm_mutex);
hash_value = THREAD_HASH_OF(thread_id, tsrm_tls_table_size);
@@ -226,8 +322,7 @@ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
if (!thread_resources) {
allocate_new_resource(&tsrm_tls_table[hash_value], thread_id);
return ts_resource(id);
/* thread_resources = tsrm_tls_table[hash_value]; */
return ts_resource_ex(id, &thread_id);
} else {
do {
if (thread_resources->thread_id == thread_id) {
@@ -237,7 +332,7 @@ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
thread_resources = thread_resources->next;
} else {
allocate_new_resource(&thread_resources->next, thread_id);
return ts_resource(id);
return ts_resource_ex(id, &thread_id);
/*
* thread_resources = thread_resources->next;
* break;
@@ -245,22 +340,22 @@ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
}
} while (thread_resources);
}
resource = thread_resources->storage[id];
tsrm_mutex_unlock(tsmm_mutex);
tsrm_debug("Successfully fetched resource id %d for thread id %ld - %x\n", id, (long) thread_id, (long) resource);
return resource;
/* Read a specific resource from the thread's resources.
* This is called outside of a mutex, so have to be aware about external
* changes to the structure as we read it.
*/
TSRM_SAFE_RETURN_RSRC(thread_resources->storage, id, thread_resources->count);
}
/* frees all resources allocated for the current thread */
void ts_free_thread(void)
{
tsrm_tls_entry *thread_resources;
int i;
THREAD_T thread_id = tsrm_thread_id();
int hash_value;
tsrm_tls_entry *thread_resources;
tsrm_tls_entry *last=NULL;
tsrm_mutex_lock(tsmm_mutex);
@@ -269,20 +364,25 @@ void ts_free_thread(void)
while (thread_resources) {
if (thread_resources->thread_id == thread_id) {
int i;
for (i=0; i<thread_resources->count; i++) {
if (resource_types_table[i].dtor) {
resource_types_table[i].dtor(thread_resources->storage[i]);
resource_types_table[i].dtor(thread_resources->storage[i], &thread_resources->storage);
}
}
for (i=0; i<thread_resources->count; i++) {
free(thread_resources->storage[i]);
}
free(thread_resources->storage);
if (last) {
last->next = thread_resources->next;
} else {
tsrm_tls_table[hash_value]=NULL;
tsrm_tls_table[hash_value] = thread_resources->next;
}
#if defined(PTHREADS)
pthread_setspecific(tls_key, 0);
#elif defined(TSRM_WIN32)
TlsSetValue(tls_key, 0);
#endif
free(thread_resources);
break;
}
@@ -310,7 +410,7 @@ void ts_free_id(ts_rsrc_id id)
/* Obtain the current thread id */
TSRM_API THREAD_T tsrm_thread_id(void)
{
#ifdef WIN32
#ifdef TSRM_WIN32
return GetCurrentThreadId();
#elif defined(GNUPTH)
return pth_self();
@@ -320,16 +420,18 @@ TSRM_API THREAD_T tsrm_thread_id(void)
return systhread_current();
#elif defined(PI3WEB)
return PIThread_getCurrent();
#elif defined(TSRM_ST)
return st_thread_self();
#endif
}
/* Allocate a mutex */
TSRM_API MUTEX_T tsrm_mutex_alloc( void )
TSRM_API MUTEX_T tsrm_mutex_alloc(void)
{
MUTEX_T mutexp;
#ifdef WIN32
#ifdef TSRM_WIN32
mutexp = malloc(sizeof(CRITICAL_SECTION));
InitializeCriticalSection(mutexp);
#elif defined(GNUPTH)
@@ -342,6 +444,8 @@ TSRM_API MUTEX_T tsrm_mutex_alloc( void )
mutexp = crit_init();
#elif defined(PI3WEB)
mutexp = PIPlatform_allocLocalMutex();
#elif defined(TSRM_ST)
mutexp = st_mutex_new();
#endif
#ifdef THR_DEBUG
printf("Mutex created thread: %d\n",mythreadid());
@@ -351,10 +455,10 @@ TSRM_API MUTEX_T tsrm_mutex_alloc( void )
/* Free a mutex */
TSRM_API void tsrm_mutex_free( MUTEX_T mutexp )
TSRM_API void tsrm_mutex_free(MUTEX_T mutexp)
{
if (mutexp) {
#ifdef WIN32
#ifdef TSRM_WIN32
DeleteCriticalSection(mutexp);
#elif defined(GNUPTH)
free(mutexp);
@@ -364,7 +468,9 @@ TSRM_API void tsrm_mutex_free( MUTEX_T mutexp )
#elif defined(NSAPI)
crit_terminate(mutexp);
#elif defined(PI3WEB)
PISync_delete(mutexp)
PISync_delete(mutexp);
#elif defined(TSRM_ST)
st_mutex_destroy(mutexp);
#endif
}
#ifdef THR_DEBUG
@@ -374,12 +480,10 @@ TSRM_API void tsrm_mutex_free( MUTEX_T mutexp )
/* Lock a mutex */
TSRM_API int tsrm_mutex_lock( MUTEX_T mutexp )
TSRM_API int tsrm_mutex_lock(MUTEX_T mutexp)
{
#if 0
tsrm_debug("Mutex locked thread: %ld\n",tsrm_thread_id());
#endif
#ifdef WIN32
TSRM_ERROR((TSRM_ERROR_LEVEL_INFO, "Mutex locked thread: %ld", tsrm_thread_id()));
#ifdef TSRM_WIN32
EnterCriticalSection(mutexp);
return 1;
#elif defined(GNUPTH)
@@ -390,17 +494,17 @@ TSRM_API int tsrm_mutex_lock( MUTEX_T mutexp )
return crit_enter(mutexp);
#elif defined(PI3WEB)
return PISync_lock(mutexp);
#elif defined(TSRM_ST)
return st_mutex_lock(mutexp);
#endif
}
/* Unlock a mutex */
TSRM_API int tsrm_mutex_unlock( MUTEX_T mutexp )
TSRM_API int tsrm_mutex_unlock(MUTEX_T mutexp)
{
#if 0
tsrm_debug("Mutex unlocked thread: %ld\n",tsrm_thread_id());
#endif
#ifdef WIN32
TSRM_ERROR((TSRM_ERROR_LEVEL_INFO, "Mutex unlocked thread: %ld", tsrm_thread_id()));
#ifdef TSRM_WIN32
LeaveCriticalSection(mutexp);
return 1;
#elif defined(GNUPTH)
@@ -411,11 +515,13 @@ TSRM_API int tsrm_mutex_unlock( MUTEX_T mutexp )
return crit_exit(mutexp);
#elif defined(PI3WEB)
return PISync_unlock(mutexp);
#elif defined(TSRM_ST)
return st_mutex_unlock(mutexp);
#endif
}
TSRM_API void *tsrm_set_new_thread_begin_handler(void (*new_thread_begin_handler)(THREAD_T thread_id))
TSRM_API void *tsrm_set_new_thread_begin_handler(tsrm_thread_begin_func_t new_thread_begin_handler)
{
void *retval = (void *) tsrm_new_thread_begin_handler;
@@ -424,7 +530,7 @@ TSRM_API void *tsrm_set_new_thread_begin_handler(void (*new_thread_begin_handler
}
TSRM_API void *tsrm_set_new_thread_end_handler(void (*new_thread_end_handler)(THREAD_T thread_id))
TSRM_API void *tsrm_set_new_thread_end_handler(tsrm_thread_end_func_t new_thread_end_handler)
{
void *retval = (void *) tsrm_new_thread_end_handler;
@@ -438,23 +544,45 @@ TSRM_API void *tsrm_set_new_thread_end_handler(void (*new_thread_end_handler)(TH
* Debug support
*/
static int tsrm_debug(const char *format, ...)
#if TSRM_DEBUG
int tsrm_error(int level, const char *format, ...)
{
if (tsrm_debug_status) {
if (level<=tsrm_error_level) {
va_list args;
int size;
fprintf(tsrm_error_file, "TSRM: ");
va_start(args, format);
size = vprintf(format, args);
size = vfprintf(tsrm_error_file, format, args);
va_end(args);
fprintf(tsrm_error_file, "\n");
fflush(tsrm_error_file);
return size;
} else {
return 0;
}
}
#endif
void tsrm_debug_set(int status)
void tsrm_error_set(int level, char *debug_filename)
{
tsrm_debug_status = status;
tsrm_error_level = level;
#if TSRM_DEBUG
if (tsrm_error_file!=stderr) { /* close files opened earlier */
fclose(tsrm_error_file);
}
if (debug_filename) {
tsrm_error_file = fopen(debug_filename, "w");
if (!tsrm_error_file) {
tsrm_error_file = stderr;
}
} else {
tsrm_error_file = stderr;
}
#endif
}
#endif /* ZTS */
+64 -3
View File
@@ -20,6 +20,7 @@ CFG=TSRM - Win32 Debug_TS
!MESSAGE "TSRM - Win32 Debug_TS" (based on "Win32 (x86) Static Library")
!MESSAGE "TSRM - Win32 Release_TS" (based on "Win32 (x86) Static Library")
!MESSAGE "TSRM - Win32 Release_TS_inline" (based on "Win32 (x86) Static Library")
!MESSAGE "TSRM - Win32 Release_TSDbg" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
@@ -42,7 +43,7 @@ RSC=rc.exe
# PROP Intermediate_Dir "Debug_TS"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "C:\Projects\TSRM" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_DEBUG" /D "TSRM_EXPORTS" /D "_LIB" /D "WIN32" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_DEBUG" /D "ZTS" /D "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D TSRM_DEBUG=1 /YX /FD /GZ /c
# ADD BASE RSC /l 0x40d /d "_DEBUG"
# ADD RSC /l 0x40d /d "_DEBUG"
BSC32=bscmake.exe
@@ -65,7 +66,7 @@ LIB32=link.exe -lib
# PROP Intermediate_Dir "Release_TS"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "ZTS" /D "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D TSRM_DEBUG=0 /YX /FD /c
# ADD BASE RSC /l 0x40d /d "NDEBUG"
# ADD RSC /l 0x40d /d "NDEBUG"
BSC32=bscmake.exe
@@ -88,7 +89,30 @@ LIB32=link.exe -lib
# PROP Intermediate_Dir "Release_TS_inline"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "TSRM_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "ZTS" /D "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D TSRM_DEBUG=0 /YX /FD /c
# ADD BASE RSC /l 0x40d /d "NDEBUG"
# ADD RSC /l 0x40d /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "TSRM - Win32 Release_TSDbg"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "TSRM___Win32_Release_TSDbg"
# PROP BASE Intermediate_Dir "TSRM___Win32_Release_TSDbg"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release_TSDbg"
# PROP Intermediate_Dir "Release_TSDbg"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "ZTS" /D "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D TSRM_DEBUG=0 /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /Zi /Od /I "." /D "NDEBUG" /D "ZTS" /D "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D TSRM_DEBUG=0 /YX /FD /c
# ADD BASE RSC /l 0x40d /d "NDEBUG"
# ADD RSC /l 0x40d /d "NDEBUG"
BSC32=bscmake.exe
@@ -105,6 +129,7 @@ LIB32=link.exe -lib
# Name "TSRM - Win32 Debug_TS"
# Name "TSRM - Win32 Release_TS"
# Name "TSRM - Win32 Release_TS_inline"
# Name "TSRM - Win32 Release_TSDbg"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
@@ -112,14 +137,50 @@ LIB32=link.exe -lib
SOURCE=.\TSRM.c
# End Source File
# Begin Source File
SOURCE=.\tsrm_strtok_r.c
# End Source File
# Begin Source File
SOURCE=.\tsrm_virtual_cwd.c
# End Source File
# Begin Source File
SOURCE=.\tsrm_win32.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\readdir.h
# End Source File
# Begin Source File
SOURCE=.\TSRM.h
# End Source File
# Begin Source File
SOURCE=.\tsrm_config.w32.h
# End Source File
# Begin Source File
SOURCE=.\tsrm_config_common.h
# End Source File
# Begin Source File
SOURCE=.\tsrm_strtok_r.h
# End Source File
# Begin Source File
SOURCE=.\tsrm_virtual_cwd.h
# End Source File
# Begin Source File
SOURCE=.\tsrm_win32.h
# End Source File
# End Group
# End Target
# End Project
+61 -29
View File
@@ -2,40 +2,26 @@
+----------------------------------------------------------------------+
| Thread Safe Resource Manager |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Zeev Suraski |
| Copyright (c) 1999, 2000, Andi Gutmans, Sascha Schumann, Zeev Suraski|
| This source file is subject to the TSRM license, that is bundled |
| with this package in the file LICENSE |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
+----------------------------------------------------------------------+
| Author: Zeev Suraski <zeev@zend.com> |
| Authors: Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef TSRM_H
#define TSRM_H
#ifdef HAVE_CONFIG_H
# undef PACKAGE
# undef VERSION
# include "tsrm_config.h"
# undef PACKAGE
# undef VERSION
#endif
#if WIN32||WINNT
# include <windows.h>
#elif defined(GNUPTH)
# include <pth.h>
#elif defined(PTHREADS)
# include <pthread.h>
#ifdef WIN32
# define TSRM_WIN32
#endif
typedef int ts_rsrc_id;
#if WIN32||WINNT
#ifdef TSRM_WIN32
# ifdef TSRM_EXPORTS
# define TSRM_API __declspec(dllexport)
# else
@@ -45,9 +31,23 @@ typedef int ts_rsrc_id;
# define TSRM_API
#endif
/* Only compile multi-threading functions if we're in ZTS mode */
#ifdef ZTS
#ifdef TSRM_WIN32
# include <windows.h>
#elif defined(GNUPTH)
# include <pth.h>
#elif defined(PTHREADS)
# include <pthread.h>
#elif defined(TSRM_ST)
# include <st.h>
#endif
typedef int ts_rsrc_id;
/* Define THREAD_T and MUTEX_T */
#if defined(WIN32)
#ifdef TSRM_WIN32
# define THREAD_T DWORD
# define MUTEX_T CRITICAL_SECTION *
#elif defined(GNUPTH)
@@ -62,10 +62,13 @@ typedef int ts_rsrc_id;
#elif defined(PI3WEB)
# define THREAD_T PIThread *
# define MUTEX_T PISync *
#elif defined(TSRM_ST)
# define THREAD_T st_thread_t
# define MUTEX_T st_mutex_t
#endif
typedef void (*ts_allocate_ctor)(void *);
typedef void (*ts_allocate_dtor)(void *);
typedef void (*ts_allocate_ctor)(void *, void ***);
typedef void (*ts_allocate_dtor)(void *, void ***);
#define THREAD_HASH_OF(thr,ts) (unsigned long)thr%(unsigned long)ts
@@ -74,11 +77,11 @@ extern "C" {
#endif
/* startup/shutdown */
TSRM_API int tsrm_startup(int expected_threads, int expected_resources, int debug_status);
TSRM_API int tsrm_startup(int expected_threads, int expected_resources, int debug_level, char *debug_filename);
TSRM_API void tsrm_shutdown(void);
/* allocates a new thread-safe-resource id */
TSRM_API ts_rsrc_id ts_allocate_id(size_t size, ts_allocate_ctor ctor, ts_allocate_dtor dtor);
TSRM_API ts_rsrc_id ts_allocate_id(ts_rsrc_id *rsrc_id, size_t size, ts_allocate_ctor ctor, ts_allocate_dtor dtor);
/* fetches the requested resource for the current thread */
TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id);
@@ -92,7 +95,16 @@ TSRM_API void ts_free_id(ts_rsrc_id id);
/* Debug support */
TSRM_API void tsrm_debug_set(int status);
#define TSRM_ERROR_LEVEL_ERROR 1
#define TSRM_ERROR_LEVEL_CORE 2
#define TSRM_ERROR_LEVEL_INFO 3
typedef void (*tsrm_thread_begin_func_t)(THREAD_T thread_id, void ***tsrm_ls);
typedef void (*tsrm_thread_end_func_t)(THREAD_T thread_id, void ***tsrm_ls);
TSRM_API int tsrm_error(int level, const char *format, ...);
TSRM_API void tsrm_error_set(int level, char *debug_filename);
/* utility functions */
TSRM_API THREAD_T tsrm_thread_id(void);
@@ -101,11 +113,31 @@ TSRM_API void tsrm_mutex_free(MUTEX_T mutexp);
TSRM_API int tsrm_mutex_lock(MUTEX_T mutexp);
TSRM_API int tsrm_mutex_unlock(MUTEX_T mutexp);
TSRM_API void *tsrm_set_new_thread_begin_handler(void (*new_thread_begin_handler)(THREAD_T thread_id));
TSRM_API void *tsrm_set_new_thread_end_handler(void (*new_thread_end_handler)(THREAD_T thread_id));
TSRM_API void *tsrm_set_new_thread_begin_handler(tsrm_thread_begin_func_t new_thread_begin_handler);
TSRM_API void *tsrm_set_new_thread_end_handler(tsrm_thread_end_func_t new_thread_end_handler);
#define TSRM_SHUFFLE_RSRC_ID(rsrc_id) ((rsrc_id)+1)
#define TSRM_UNSHUFFLE_RSRC_ID(rsrc_id) ((rsrc_id)-1)
#define TSRMLS_FETCH() void ***tsrm_ls = (void ***) ts_resource_ex(0, NULL)
#define TSRMG(id, type, element) (((type) (*((void ***) tsrm_ls))[TSRM_UNSHUFFLE_RSRC_ID(id)])->element)
#define TSRMLS_D void ***tsrm_ls
#define TSRMLS_DC , TSRMLS_D
#define TSRMLS_C tsrm_ls
#define TSRMLS_CC , TSRMLS_C
#ifdef __cplusplus
}
#endif
#else /* non ZTS */
#define TSRMLS_FETCH()
#define TSRMLS_D void
#define TSRMLS_DC
#define TSRMLS_C
#define TSRMLS_CC
#endif /* ZTS */
#endif /* TSRM_H */
+12 -2
View File
@@ -4,18 +4,28 @@ dnl Minimalistic configure.in for TSRM.
dnl
AC_INIT(TSRM.c)
AM_INIT_AUTOMAKE(TSRM, 1.0)
AM_INIT_AUTOMAKE(TSRM, 1.0, nodefine)
AM_CONFIG_HEADER(tsrm_config.h)
sinclude(tsrm.m4)
TSRM_BASIC_CHECKS
TSRM_THREADS_CHECKS
AM_PROG_LIBTOOL
if test "$enable_debug" != "yes"; then
AM_SET_LIBTOOL_VARIABLE([--silent])
fi
TSRM_PTHREAD
dnl TSRM_PTHREAD
AC_CHECK_HEADERS(
utime.h \
dirent.h \
stdarg.h \
alloca.h \
unistd.h \
limits.h
)
AC_OUTPUT(Makefile)
+44
View File
@@ -0,0 +1,44 @@
#ifndef READDIR_H
#define READDIR_H
/*
* Structures and types used to implement opendir/readdir/closedir
* on Windows 95/NT.
*/
#include <io.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
/* struct dirent - same as Unix */
struct dirent {
long d_ino; /* inode (always 1 in WIN32) */
off_t d_off; /* offset to this dirent */
unsigned short d_reclen; /* length of d_name */
char d_name[_MAX_FNAME + 1]; /* filename (null terminated) */
};
/* typedef DIR - not the same as Unix */
typedef struct {
long handle; /* _findfirst/_findnext handle */
short offset; /* offset into directory */
short finished; /* 1 if there are not more files */
struct _finddata_t fileinfo; /* from _findfirst/_findnext */
char *dir; /* the dir we are reading */
struct dirent dent; /* the dirent to return */
} DIR;
/* Function prototypes */
DIR *opendir(const char *);
struct dirent *readdir(DIR *);
int readdir_r(DIR *, struct dirent *, struct dirent **);
int closedir(DIR *);
void rewinddir(DIR *);
#endif /* READDIR_H */
+27 -1
View File
@@ -50,6 +50,23 @@ AC_MSG_RESULT(yes - installed in $PTH_PREFIX)
])
AC_DEFUN(TSRM_CHECK_ST,[
if test -r "$1/include/st.h"; then
CPPFLAGS="$CPPFLAGS -I$1/include"
LDFLAGS="$LDFLAGS -L$1/lib"
elif test -r "$1/st.h"; then
CPPFLAGS="$CPPFLAGS -I$1"
LDFLAGS="$LDFLAGS -L$1"
fi
AC_CHECK_HEADERS(st.h,[ ],[
AC_MSG_ERROR([Sorry[,] I was unable to locate the State Threads header file. Please specify the prefix using --with-tsrm-st=/prefix])
])
LIBS="$LIBS -lst"
AC_MSG_CHECKING(for SGI's State Threads)
AC_MSG_RESULT(yes)
AC_DEFINE(TSRM_ST, 1, [ ])
])
sinclude(threads.m4)
sinclude(TSRM/threads.m4)
@@ -68,7 +85,7 @@ AC_MSG_RESULT(yes)
])
AC_DEFUN(TSRM_OTHER_CHECKS,[
AC_DEFUN(TSRM_THREADS_CHECKS,[
dnl For the thread implementations, we always use --with-*
dnl to maintain consistency
@@ -80,6 +97,13 @@ AC_ARG_WITH(tsrm-pth,
TSRM_PTH=no
])
AC_ARG_WITH(tsrm-st,
[ --with-tsrm-st],[
TSRM_ST=$withval
],[
TSRM_ST=no
])
AC_ARG_WITH(tsrm-pthreads,
[ --with-tsrm-pthreads Use POSIX threads (default)],[
TSRM_PTHREADS=$withval
@@ -91,6 +115,8 @@ test "$TSRM_PTH" = "yes" && TSRM_PTH=pth-config
if test "$TSRM_PTH" != "no"; then
TSRM_CHECK_PTH($TSRM_PTH)
elif test "$TSRM_ST" != "no"; then
TSRM_CHECK_ST($TSRM_ST)
elif test "$TSRM_PTHREADS" != "no"; then
TSRM_CHECK_PTHREADS
fi
+15
View File
@@ -0,0 +1,15 @@
#ifndef TSRM_CONFIG_W32_H
#define TSRM_CONFIG_W32_H
#define HAVE_UTIME 1
#define HAVE_ALLOCA 1
#undef inline
#ifdef ZEND_WIN32_FORCE_INLINE
# define inline __forceinline
#else
# define inline
#endif
#endif
+47
View File
@@ -0,0 +1,47 @@
#ifndef TSRM_CONFIG_COMMON_H
#define TSRM_CONFIG_COMMON_H
#if WINNT|WIN32
# define TSRM_WIN32
#endif
#ifndef TSRM_WIN32
# include "tsrm_config.h"
# include <sys/param.h>
#else
# include "tsrm_config.w32.h"
#endif
#ifdef TSRM_WIN32
#include <malloc.h>
#endif
#if HAVE_ALLOCA_H
#include <alloca.h>
#endif
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#if HAVE_LIMITS_H
#include <limits.h>
#endif
#ifndef MAXPATHLEN
# ifdef PATH_MAX
# define MAXPATHLEN PATH_MAX
# else
# define MAXPATHLEN 256
# endif
#endif
#if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2))
# define tsrm_do_alloca(p) alloca(p)
# define tsrm_free_alloca(p)
#else
# define tsrm_do_alloca(p) malloc(p)
# define tsrm_free_alloca(p) free(p)
#endif
#endif /* TSRM_CONFIG_COMMON_H */
+63
View File
@@ -0,0 +1,63 @@
#include <stdio.h>
#include "tsrm_config_common.h"
#include "tsrm_strtok_r.h"
static inline int in_character_class(char ch, const char *delim)
{
while (*delim) {
if (*delim == ch) {
return 1;
}
delim++;
}
return 0;
}
char *tsrm_strtok_r(char *s, const char *delim, char **last)
{
char *token;
if (s == NULL) {
s = *last;
}
while (*s && in_character_class(*s, delim)) {
s++;
}
if (!*s) {
return NULL;
}
token = s;
while (*s && !in_character_class(*s, delim)) {
s++;
}
if (!*s) {
*last = s;
} else {
*s = '\0';
*last = s + 1;
}
return token;
}
#if 0
main()
{
char foo[] = "/foo/bar//\\barbara";
char *last;
char *token;
token = tsrm_strtok_r(foo, "/\\", &last);
while (token) {
printf ("Token = '%s'\n", token);
token = tsrm_strtok_r(NULL, "/\\", &last);
}
return 0;
}
#endif
+6
View File
@@ -0,0 +1,6 @@
#ifndef TSRM_STRTOK_R
#define TSRM_STRTOK_R
char *tsrm_strtok_r(char *s, const char *delim, char **last);
#endif
+133 -155
View File
@@ -28,30 +28,32 @@
#include <stdlib.h>
#include <fcntl.h>
#ifdef ZEND_WIN32
#include "win95nt.h"
#include <sys/utime.h>
#endif
#include "tsrm_virtual_cwd.h"
#include "tsrm_strtok_r.h"
#include "php_virtual_cwd.h"
#include "php_reentrancy.h" /* for php_strtok_r */
#ifdef TSRM_WIN32
#include <io.h>
#include "tsrm_win32.h"
#endif
#define VIRTUAL_CWD_DEBUG 0
#ifdef ZTS
#include "TSRM.h"
#endif
/* Only need mutex for popen() in Windows because it doesn't chdir() on UNIX */
#if defined(ZEND_WIN32) && defined(ZTS)
#if defined(TSRM_WIN32) && defined(ZTS)
MUTEX_T cwd_mutex;
#endif
ZEND_DECLARE_MODULE_GLOBALS(cwd);
#ifdef ZTS
static ts_rsrc_id cwd_globals_id;
#else
static virtual_cwd_globals cwd_globals;
#endif
cwd_state main_cwd_state; /* True global */
#ifndef ZEND_WIN32
#ifndef TSRM_WIN32
#include <unistd.h>
#else
#include <direct.h>
@@ -65,12 +67,9 @@ cwd_state main_cwd_state; /* True global */
#define S_ISREG(mode) ((mode) & _S_IFREG)
#endif
#ifdef ZEND_WIN32
#define php_strtok_r(a,b,c) strtok((a),(b))
#define DEFAULT_SLASH '\\'
#ifdef TSRM_WIN32
#define tsrm_strtok_r(a,b,c) strtok((a),(b))
#define TOKENIZER_STRING "/\\"
#define COPY_WHEN_ABSOLUTE 2
static int php_check_dots(const char *element, int n)
{
@@ -87,7 +86,6 @@ static int php_check_dots(const char *element, int n)
#else
#define DEFAULT_SLASH '/'
#define TOKENIZER_STRING "/"
#endif
@@ -104,10 +102,6 @@ static int php_check_dots(const char *element, int n)
(len == 1 && ptr[0] == '.')
#endif
#ifndef COPY_WHEN_ABSOLUTE
#define COPY_WHEN_ABSOLUTE 0
#endif
/* define this to check semantics */
#define IS_DIR_OK(s) (1)
@@ -144,16 +138,31 @@ static int php_is_file_ok(const cwd_state *state)
return (1);
}
static void cwd_globals_ctor(zend_cwd_globals *cwd_globals)
static void cwd_globals_ctor(virtual_cwd_globals *cwd_globals TSRMLS_DC)
{
CWD_STATE_COPY(&cwd_globals->cwd, &main_cwd_state);
}
static void cwd_globals_dtor(zend_cwd_globals *cwd_globals)
static void cwd_globals_dtor(virtual_cwd_globals *cwd_globals TSRMLS_DC)
{
CWD_STATE_FREE(&cwd_globals->cwd);
}
static char *tsrm_strndup(const char *s, size_t length)
{
char *p;
p = (char *) malloc(length+1);
if (!p) {
return (char *)NULL;
}
if (length) {
memcpy(p,s,length);
}
p[length]=0;
return p;
}
CWD_API void virtual_cwd_startup(void)
{
char cwd[MAXPATHLEN];
@@ -166,8 +175,13 @@ CWD_API void virtual_cwd_startup(void)
main_cwd_state.cwd = strdup(cwd);
main_cwd_state.cwd_length = strlen(cwd);
ZEND_INIT_MODULE_GLOBALS(cwd, cwd_globals_ctor, cwd_globals_dtor);
#if defined(ZEND_WIN32) && defined(ZTS)
#ifdef ZTS
ts_allocate_id(&cwd_globals_id, sizeof(virtual_cwd_globals), (ts_allocate_ctor) cwd_globals_ctor, (ts_allocate_dtor) cwd_globals_dtor);
#else
cwd_globals_ctor(&cwd_globals TSRMLS_CC);
#endif
#if defined(TSRM_WIN32) && defined(ZTS)
cwd_mutex = tsrm_mutex_alloc();
#endif
}
@@ -175,19 +189,18 @@ CWD_API void virtual_cwd_startup(void)
CWD_API void virtual_cwd_shutdown(void)
{
#ifndef ZTS
cwd_globals_dtor(&cwd_globals);
cwd_globals_dtor(&cwd_globals TSRMLS_CC);
#endif
#if defined(ZEND_WIN32) && defined(ZTS)
#if defined(TSRM_WIN32) && defined(ZTS)
tsrm_mutex_free(cwd_mutex);
#endif
free(main_cwd_state.cwd); /* Don't use CWD_STATE_FREE because the non global states will probably use emalloc()/efree() */
}
CWD_API char *virtual_getcwd_ex(int *length)
CWD_API char *virtual_getcwd_ex(size_t *length TSRMLS_DC)
{
cwd_state *state;
CWDLS_FETCH();
state = &CWDG(cwd);
@@ -201,7 +214,7 @@ CWD_API char *virtual_getcwd_ex(int *length)
return retval;
}
#ifdef ZEND_WIN32
#ifdef TSRM_WIN32
/* If we have something like C: */
if (state->cwd_length == 2 && state->cwd[state->cwd_length-1] == ':') {
char *retval;
@@ -220,12 +233,12 @@ CWD_API char *virtual_getcwd_ex(int *length)
/* Same semantics as UNIX getcwd() */
CWD_API char *virtual_getcwd(char *buf, size_t size)
CWD_API char *virtual_getcwd(char *buf, size_t size TSRMLS_DC)
{
size_t length;
char *cwd;
cwd = virtual_getcwd_ex(&length);
cwd = virtual_getcwd_ex(&length TSRMLS_CC);
if (buf == NULL) {
return cwd;
@@ -252,15 +265,15 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
int ret = 0;
int copy_amount = -1;
char *free_path;
zend_bool is_absolute = 0;
#ifndef ZEND_WIN32
unsigned char is_absolute = 0;
#ifndef TSRM_WIN32
char resolved_path[MAXPATHLEN];
#endif
if (path_length == 0)
return (0);
#ifndef ZEND_WIN32
#if !defined(TSRM_WIN32) && !defined(__BEOS__)
if (IS_ABSOLUTE_PATH(path, path_length)) {
if (realpath(path, resolved_path)) {
path = resolved_path;
@@ -287,7 +300,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
free(tmp);
}
#endif
free_path = path_copy = estrndup(path, path_length);
free_path = path_copy = tsrm_strndup(path, path_length);
old_state = (cwd_state *) malloc(sizeof(cwd_state));
CWD_STATE_COPY(old_state, state);
@@ -297,8 +310,11 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
if (IS_ABSOLUTE_PATH(path_copy, path_length)) {
copy_amount = COPY_WHEN_ABSOLUTE;
is_absolute = 1;
#ifdef ZEND_WIN32
} else if(IS_SLASH(path_copy[0])) {
#ifdef TSRM_WIN32
} else if (IS_UNC_PATH(path_copy, path_length)) {
copy_amount = 2;
is_absolute = 1;
} else if (IS_SLASH(path_copy[0])) {
copy_amount = 2;
#endif
}
@@ -318,7 +334,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
}
ptr = php_strtok_r(path_copy, TOKENIZER_STRING, &tok);
ptr = tsrm_strtok_r(path_copy, TOKENIZER_STRING, &tok);
while (ptr) {
ptr_length = strlen(ptr);
@@ -345,11 +361,18 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
}
} else if (!IS_DIRECTORY_CURRENT(ptr, ptr_length)) {
state->cwd = (char *) realloc(state->cwd, state->cwd_length+ptr_length+1+1);
state->cwd[state->cwd_length] = DEFAULT_SLASH;
memcpy(&state->cwd[state->cwd_length+1], ptr, ptr_length+1);
state->cwd_length += (ptr_length+1);
#ifdef TSRM_WIN32
/* Windows 9x will consider C:\\Foo as a network path. Avoid it. */
if (state->cwd[state->cwd_length-1]!='\\' && state->cwd[state->cwd_length-1]!='/') {
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
}
#else
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
#endif
memcpy(&state->cwd[state->cwd_length], ptr, ptr_length+1);
state->cwd_length += ptr_length;
}
ptr = php_strtok_r(NULL, TOKENIZER_STRING, &tok);
ptr = tsrm_strtok_r(NULL, TOKENIZER_STRING, &tok);
}
if (state->cwd_length == COPY_WHEN_ABSOLUTE) {
@@ -372,21 +395,19 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
free(old_state);
efree(free_path);
free(free_path);
#if VIRTUAL_CWD_DEBUG
fprintf (stderr, "virtual_file_ex() = %s\n",state->cwd);
#endif
return (ret);
}
CWD_API int virtual_chdir(const char *path)
CWD_API int virtual_chdir(const char *path TSRMLS_DC)
{
CWDLS_FETCH();
return virtual_file_ex(&CWDG(cwd), path, php_is_dir_ok)?-1:0;
}
CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path))
CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path TSRMLS_DC) TSRMLS_DC)
{
int length = strlen(path);
char *temp;
@@ -399,33 +420,34 @@ CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path
}
if (length == -1) {
return virtual_chdir(path);
/* No directory only file name */
errno = ENOENT;
return -1;
}
if (length == COPY_WHEN_ABSOLUTE && IS_ABSOLUTE_PATH(path, length+1)) { /* Also use trailing slash if this is absolute */
length++;
}
temp = (char *) do_alloca(length+1);
temp = (char *) tsrm_do_alloca(length+1);
memcpy(temp, path, length);
temp[length] = 0;
#if VIRTUAL_CWD_DEBUG
fprintf (stderr, "Changing directory to %s\n", temp);
#endif
retval = p_chdir(temp);
free_alloca(temp);
retval = p_chdir(temp TSRMLS_CC);
tsrm_free_alloca(temp);
return retval;
}
CWD_API char *virtual_realpath(const char *path, char *real_path)
CWD_API char *virtual_realpath(const char *path, char *real_path TSRMLS_DC)
{
cwd_state new_state;
int retval;
CWDLS_FETCH();
CWD_STATE_COPY(&new_state, &CWDG(cwd));
retval = virtual_file_ex(&new_state, path, NULL);
if(retval) {
if (!retval) {
int len = new_state.cwd_length>MAXPATHLEN-1?MAXPATHLEN-1:new_state.cwd_length;
memcpy(real_path, new_state.cwd, len);
real_path[len] = '\0';
@@ -435,25 +457,29 @@ CWD_API char *virtual_realpath(const char *path, char *real_path)
return NULL;
}
CWD_API int virtual_filepath(const char *path, char **filepath)
CWD_API int virtual_filepath_ex(const char *path, char **filepath, verify_path_func verify_path TSRMLS_DC)
{
cwd_state new_state;
int retval;
CWDLS_FETCH();
CWD_STATE_COPY(&new_state, &CWDG(cwd));
retval = virtual_file_ex(&new_state, path, php_is_file_ok);
retval = virtual_file_ex(&new_state, path, verify_path);
*filepath = new_state.cwd;
return retval;
}
CWD_API FILE *virtual_fopen(const char *path, const char *mode)
CWD_API int virtual_filepath(const char *path, char **filepath TSRMLS_DC)
{
return virtual_filepath_ex(path, filepath, php_is_file_ok TSRMLS_CC);
}
CWD_API FILE *virtual_fopen(const char *path, const char *mode TSRMLS_DC)
{
cwd_state new_state;
FILE *f;
CWDLS_FETCH();
if (path[0] == '\0') { /* Fail to open empty path */
return NULL;
@@ -469,11 +495,10 @@ CWD_API FILE *virtual_fopen(const char *path, const char *mode)
}
#if HAVE_UTIME
CWD_API int virtual_utime(const char *filename, struct utimbuf *buf)
CWD_API int virtual_utime(const char *filename, struct utimbuf *buf TSRMLS_DC)
{
cwd_state new_state;
int ret;
CWDLS_FETCH();
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, filename, NULL);
@@ -485,11 +510,10 @@ CWD_API int virtual_utime(const char *filename, struct utimbuf *buf)
}
#endif
CWD_API int virtual_chmod(const char *filename, mode_t mode)
CWD_API int virtual_chmod(const char *filename, mode_t mode TSRMLS_DC)
{
cwd_state new_state;
int ret;
CWDLS_FETCH();
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, filename, NULL);
@@ -500,12 +524,11 @@ CWD_API int virtual_chmod(const char *filename, mode_t mode)
return ret;
}
#ifndef PHP_WIN32
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group)
#ifndef TSRM_WIN32
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group TSRMLS_DC)
{
cwd_state new_state;
int ret;
CWDLS_FETCH();
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, filename, NULL);
@@ -517,11 +540,10 @@ CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group)
}
#endif
CWD_API int virtual_open(const char *path, int flags, ...)
CWD_API int virtual_open(const char *path TSRMLS_DC, int flags, ...)
{
cwd_state new_state;
int f;
CWDLS_FETCH();
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, path, NULL);
@@ -531,7 +553,7 @@ CWD_API int virtual_open(const char *path, int flags, ...)
va_list arg;
va_start(arg, flags);
mode = va_arg(arg, mode_t);
mode = (mode_t) va_arg(arg, int);
va_end(arg);
f = open(new_state.cwd, flags, mode);
@@ -542,11 +564,10 @@ CWD_API int virtual_open(const char *path, int flags, ...)
return f;
}
CWD_API int virtual_creat(const char *path, mode_t mode)
CWD_API int virtual_creat(const char *path, mode_t mode TSRMLS_DC)
{
cwd_state new_state;
int f;
CWDLS_FETCH();
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, path, NULL);
@@ -557,12 +578,32 @@ CWD_API int virtual_creat(const char *path, mode_t mode)
return f;
}
CWD_API int virtual_rename(char *oldname, char *newname TSRMLS_DC)
{
cwd_state old_state;
cwd_state new_state;
int retval;
CWD_API int virtual_stat(const char *path, struct stat *buf)
CWD_STATE_COPY(&old_state, &CWDG(cwd));
virtual_file_ex(&old_state, oldname, NULL);
oldname = old_state.cwd;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, newname, NULL);
newname = new_state.cwd;
retval = rename(oldname, newname);
CWD_STATE_FREE(&old_state);
CWD_STATE_FREE(&new_state);
return retval;
}
CWD_API int virtual_stat(const char *path, struct stat *buf TSRMLS_DC)
{
cwd_state new_state;
int retval;
CWDLS_FETCH();
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, path, NULL);
@@ -573,13 +614,12 @@ CWD_API int virtual_stat(const char *path, struct stat *buf)
return retval;
}
#ifndef ZEND_WIN32
#ifndef TSRM_WIN32
CWD_API int virtual_lstat(const char *path, struct stat *buf)
CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC)
{
cwd_state new_state;
int retval;
CWDLS_FETCH();
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, path, NULL);
@@ -592,11 +632,10 @@ CWD_API int virtual_lstat(const char *path, struct stat *buf)
#endif
CWD_API int virtual_unlink(const char *path)
CWD_API int virtual_unlink(const char *path TSRMLS_DC)
{
cwd_state new_state;
int retval;
CWDLS_FETCH();
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, path, NULL);
@@ -607,26 +646,27 @@ CWD_API int virtual_unlink(const char *path)
return retval;
}
CWD_API int virtual_mkdir(const char *pathname, mode_t mode)
CWD_API int virtual_mkdir(const char *pathname, mode_t mode TSRMLS_DC)
{
cwd_state new_state;
int retval;
CWDLS_FETCH();
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, pathname, NULL);
#ifdef TSRM_WIN32
retval = mkdir(new_state.cwd);
#else
retval = mkdir(new_state.cwd, mode);
#endif
CWD_STATE_FREE(&new_state);
return retval;
}
CWD_API int virtual_rmdir(const char *pathname)
CWD_API int virtual_rmdir(const char *pathname TSRMLS_DC)
{
cwd_state new_state;
int retval;
CWDLS_FETCH();
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, pathname, NULL);
@@ -637,11 +677,14 @@ CWD_API int virtual_rmdir(const char *pathname)
return retval;
}
CWD_API DIR *virtual_opendir(const char *pathname)
#ifdef TSRM_WIN32
DIR *opendir(const char *name);
#endif
CWD_API DIR *virtual_opendir(const char *pathname TSRMLS_DC)
{
cwd_state new_state;
DIR *retval;
CWDLS_FETCH();
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, pathname, NULL);
@@ -652,15 +695,14 @@ CWD_API DIR *virtual_opendir(const char *pathname)
return retval;
}
#ifndef ZEND_WIN32
#ifndef TSRM_WIN32
CWD_API FILE *virtual_popen(const char *command, const char *type)
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
{
int command_length;
char *command_line;
char *ptr;
FILE *retval;
CWDLS_FETCH();
command_length = strlen(command);
@@ -684,6 +726,7 @@ CWD_API FILE *virtual_popen(const char *command, const char *type)
memcpy(ptr, command, command_length+1);
retval = popen(command_line, type);
free(command_line);
return retval;
}
@@ -693,12 +736,11 @@ CWD_API FILE *virtual_popen(const char *command, const char *type)
/* On Windows the trick of prepending "cd cwd; " doesn't work so we need to perform
a real chdir() and mutex it
*/
CWD_API FILE *virtual_popen(const char *command, const char *type)
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
{
char prev_cwd[MAXPATHLEN];
char *getcwd_result;
FILE *retval;
CWDLS_FETCH();
getcwd_result = getcwd(prev_cwd, MAXPATHLEN);
if (!getcwd_result) {
@@ -722,70 +764,6 @@ CWD_API FILE *virtual_popen(const char *command, const char *type)
#endif
#if 0
/* taken from Apache 1.3 */
CWD_API void virtual_real_chdir_file(const char *file)
{
const char *x;
char buf[4096];
x = strrchr(file, '/');
if (x == NULL) {
chdir(file);
}
else if (x - file < sizeof(buf) - 1) {
memcpy(buf, file, x - file);
buf[x - file] = '\0';
chdir(buf);
}
/* XXX: well, this is a silly function, no method of reporting an
* error... ah well. */
}
#endif
#if 0
main(void)
{
cwd_state state;
int length;
#ifndef ZEND_WIN32
state.cwd = malloc(PATH_MAX + 1);
state.cwd_length = PATH_MAX;
while (getcwd(state.cwd, state.cwd_length) == NULL && errno == ERANGE) {
state.cwd_length <<= 1;
state.cwd = realloc(state.cwd, state.cwd_length + 1);
}
#else
state.cwd = strdup("d:\\foo\\bar");
#endif
state.cwd_length = strlen(state.cwd);
#define T(a) \
printf("[%s] $ cd %s\n", virtual_getcwd_ex(&state, &length), a); \
virtual_chdir(&state, strdup(a)); \
printf("new path is %s\n", virtual_getcwd_ex(&state, &length));
T("..")
T("...")
T("foo")
T("../bar")
T(".../slash/../dot")
T("//baz")
T("andi/././././././///bar")
T("../andi/../bar")
T("...foo")
T("D:/flash/zone")
T("../foo/bar/../baz")
return 0;
}
#endif
/*
* Local variables:
+215
View File
@@ -0,0 +1,215 @@
/*
+----------------------------------------------------------------------+
| PHP version 4.0 |
+----------------------------------------------------------------------+
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Sascha Schumann <sascha@schumann.cx> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
#ifndef VIRTUAL_CWD_H
#define VIRTUAL_CWD_H
#include "TSRM.h"
#include "tsrm_config_common.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <ctype.h>
#ifdef HAVE_UTIME_H
#include <utime.h>
#endif
#ifdef HAVE_STDARG_H
#include <stdarg.h>
#endif
#ifndef TSRM_WIN32
#include <unistd.h>
#endif
#ifdef TSRM_WIN32
#include "readdir.h"
#include <sys/utime.h>
/* mode_t isn't defined on Windows */
typedef unsigned short mode_t;
#define DEFAULT_SLASH '\\'
#define DEFAULT_DIR_SEPARATOR ';'
#define IS_SLASH(c) ((c) == '/' || (c) == '\\')
#define COPY_WHEN_ABSOLUTE 2
#define IS_ABSOLUTE_PATH(path, len) \
(len >= 2 && isalpha(path[0]) && path[1] == ':')
#define IS_UNC_PATH(path, len) \
(len >= 2 && IS_SLASH(path[0]) && IS_SLASH(path[1]))
#else
#ifdef HAVE_DIRENT_H
#include <dirent.h>
#endif
#define DEFAULT_SLASH '/'
#define DEFAULT_DIR_SEPARATOR ':'
#define IS_SLASH(c) ((c) == '/')
#endif
#ifndef COPY_WHEN_ABSOLUTE
#define COPY_WHEN_ABSOLUTE 0
#endif
#ifndef IS_ABSOLUTE_PATH
#define IS_ABSOLUTE_PATH(path, len) \
(IS_SLASH(path[0]))
#endif
#ifdef TSRM_EXPORTS
#define CWD_EXPORTS
#endif
#ifdef TSRM_WIN32
# ifdef CWD_EXPORTS
# define CWD_API __declspec(dllexport)
# else
# define CWD_API __declspec(dllimport)
# endif
#else
#define CWD_API
#endif
typedef struct _cwd_state {
char *cwd;
int cwd_length;
} cwd_state;
typedef int (*verify_path_func)(const cwd_state *);
CWD_API void virtual_cwd_startup(void);
CWD_API void virtual_cwd_shutdown(void);
CWD_API char *virtual_getcwd_ex(size_t *length TSRMLS_DC);
CWD_API char *virtual_getcwd(char *buf, size_t size TSRMLS_DC);
CWD_API int virtual_chdir(const char *path TSRMLS_DC);
CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path TSRMLS_DC) TSRMLS_DC);
CWD_API int virtual_filepath(const char *path, char **filepath TSRMLS_DC);
CWD_API int virtual_filepath_ex(const char *path, char **filepath, verify_path_func verify_path TSRMLS_DC);
CWD_API char *virtual_realpath(const char *path, char *real_path TSRMLS_DC);
CWD_API FILE *virtual_fopen(const char *path, const char *mode TSRMLS_DC);
CWD_API int virtual_open(const char *path TSRMLS_DC, int flags, ...);
CWD_API int virtual_creat(const char *path, mode_t mode TSRMLS_DC);
CWD_API int virtual_rename(char *oldname, char *newname TSRMLS_DC);
CWD_API int virtual_stat(const char *path, struct stat *buf TSRMLS_DC);
#ifndef TSRM_WIN32
CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC);
#endif
CWD_API int virtual_unlink(const char *path TSRMLS_DC);
CWD_API int virtual_mkdir(const char *pathname, mode_t mode TSRMLS_DC);
CWD_API int virtual_rmdir(const char *pathname TSRMLS_DC);
CWD_API DIR *virtual_opendir(const char *pathname TSRMLS_DC);
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC);
#if HAVE_UTIME
CWD_API int virtual_utime(const char *filename, struct utimbuf *buf TSRMLS_DC);
#endif
CWD_API int virtual_chmod(const char *filename, mode_t mode TSRMLS_DC);
#ifndef TSRM_WIN32
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group TSRMLS_DC);
#endif
CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func verify_path);
typedef struct _virtual_cwd_globals {
cwd_state cwd;
} virtual_cwd_globals;
#ifdef ZTS
# define CWDG(v) TSRMG(cwd_globals_id, virtual_cwd_globals *, v)
#else
# define CWDG(v) (cwd_globals.v)
#endif
/* The actual macros to be used in programs using TSRM
* If the program defines VIRTUAL_DIR it will use the
* virtual_* functions
*/
#ifdef VIRTUAL_DIR
#define VCWD_GETCWD(buff, size) virtual_getcwd(buff, size TSRMLS_CC)
#define VCWD_FOPEN(path, mode) virtual_fopen(path, mode TSRMLS_CC)
/* Because open() has two modes, we have to macros to replace it */
#define VCWD_OPEN(path, flags) virtual_open(path TSRMLS_CC, flags)
#define VCWD_OPEN_MODE(path, flags, mode) virtual_open(path TSRMLS_CC, flags, mode)
#define VCWD_CREAT(path, mode) virtual_creat(path, mode TSRMLS_CC)
#define VCWD_CHDIR(path) virtual_chdir(path TSRMLS_CC)
#define VCWD_CHDIR_FILE(path) virtual_chdir_file(path, virtual_chdir TSRMLS_CC)
#define VCWD_GETWD(buf)
#define VCWD_REALPATH(path, real_path) virtual_realpath(path, real_path TSRMLS_CC)
#define VCWD_RENAME(oldname, newname) virtual_rename(oldname, newname TSRMLS_CC)
#define VCWD_STAT(path, buff) virtual_stat(path, buff TSRMLS_CC)
#ifdef TSRM_WIN32
#define VCWD_LSTAT(path, buff) virtual_stat(path, buff TSRMLS_CC)
#else
#define VCWD_LSTAT(path, buff) virtual_lstat(path, buff TSRMLS_CC)
#endif
#define VCWD_UNLINK(path) virtual_unlink(path TSRMLS_CC)
#define VCWD_MKDIR(pathname, mode) virtual_mkdir(pathname, mode TSRMLS_CC)
#define VCWD_RMDIR(pathname) virtual_rmdir(pathname TSRMLS_CC)
#define VCWD_OPENDIR(pathname) virtual_opendir(pathname TSRMLS_CC)
#define VCWD_POPEN(command, type) virtual_popen(command, type TSRMLS_CC)
#if HAVE_UTIME
#define VCWD_UTIME(path, time) virtual_utime(path, time TSRMLS_CC)
#endif
#define VCWD_CHMOD(path, mode) virtual_chmod(path, mode TSRMLS_CC)
#ifndef TSRM_WIN32
#define VCWD_CHOWN(path, owner, group) virtual_chown(path, owner, group TSRMLS_CC)
#endif
#else
#define VCWD_GETCWD(buff, size) getcwd(buff, size)
#define VCWD_FOPEN(path, mode) fopen(path, mode)
#define VCWD_OPEN(path, flags) open(path, flags)
#define VCWD_OPEN_MODE(path, flags, mode) open(path, flags, mode)
#define VCWD_CREAT(path, mode) creat(path, mode)
#define VCWD_RENAME(oldname, newname) rename(oldname, newname)
#define VCWD_CHDIR(path) chdir(path)
#define VCWD_CHDIR_FILE(path) virtual_chdir_file(path, chdir)
#define VCWD_GETWD(buf) getwd(buf)
#define VCWD_STAT(path, buff) stat(path, buff)
#define VCWD_LSTAT(path, buff) lstat(path, buff)
#define VCWD_UNLINK(path) unlink(path)
#define VCWD_MKDIR(pathname, mode) mkdir(pathname, mode)
#define VCWD_RMDIR(pathname) rmdir(pathname)
#define VCWD_OPENDIR(pathname) opendir(pathname)
#define VCWD_POPEN(command, type) popen(command, type)
#ifndef TSRM_WIN32
#define VCWD_REALPATH(path, real_path) realpath(path, real_path)
#else
#define VCWD_REALPATH(path, real_path) strcpy(real_path, path)
#endif
#if HAVE_UTIME
#define VCWD_UTIME(path, time) utime(path, time)
#endif
#define VCWD_CHMOD(path, mode) chmod(path, mode)
#ifndef TSRM_WIN32
#define VCWD_CHOWN(path, owner, group) chown(path, owner, group)
#endif
#endif
#endif /* VIRTUAL_CWD_H */
+359
View File
@@ -0,0 +1,359 @@
/*
+----------------------------------------------------------------------+
| PHP version 4.0 |
+----------------------------------------------------------------------+
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Daniel Beulshausen <daniel@php4win.de> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <io.h>
#include <process.h>
#include <time.h>
#include "TSRM.h"
#ifdef TSRM_WIN32
#include <windows.h>
#include "tsrm_win32.h"
#ifdef ZTS
static ts_rsrc_id win32_globals_id;
#else
static tsrm_win32_globals win32_globals;
#endif
static void tsrm_win32_ctor(tsrm_win32_globals *globals TSRMLS_DC)
{
globals->process = NULL;
globals->shm = NULL;
globals->process_size = 0;
globals->shm_size = 0;
globals->comspec = _strdup((GetVersion()<0x80000000)?"cmd.exe":"command.com");
}
static void tsrm_win32_dtor(tsrm_win32_globals *globals TSRMLS_DC)
{
shm_pair *ptr;
if (globals->process) {
free(globals->process);
}
if (globals->shm) {
for (ptr = globals->shm; ptr < (globals->shm + globals->shm_size); ptr++) {
UnmapViewOfFile(ptr->addr);
CloseHandle(ptr->segment);
UnmapViewOfFile(ptr->descriptor);
CloseHandle(ptr->info);
}
free(globals->shm);
}
free(globals->comspec);
}
TSRM_API void tsrm_win32_startup(void)
{
#ifdef ZTS
ts_allocate_id(&win32_globals_id, sizeof(tsrm_win32_globals), (ts_allocate_ctor)tsrm_win32_ctor, (ts_allocate_ctor)tsrm_win32_dtor);
#else
tsrm_win32_ctor(&win32_globals TSRMLS_CC);
#endif
}
TSRM_API void tsrm_win32_shutdown(void)
{
#ifndef ZTS
tsrm_win32_dtor(&win32_globals TSRMLS_CC);
#endif
}
static process_pair *process_get(FILE *stream TSRMLS_DC)
{
process_pair *ptr;
process_pair *newptr;
for (ptr = TWG(process); ptr < (TWG(process) + TWG(process_size)); ptr++) {
if (ptr->stream == stream) {
break;
}
}
if (ptr < (TWG(process) + TWG(process_size))) {
return ptr;
}
newptr = (process_pair*)realloc((void*)TWG(process), (TWG(process_size)+1)*sizeof(process_pair));
if (newptr == NULL) {
return NULL;
}
TWG(process) = newptr;
ptr = newptr + TWG(process_size);
TWG(process_size)++;
return ptr;
}
static shm_pair *shm_get(int key, void *addr)
{
shm_pair *ptr;
shm_pair *newptr;
TSRMLS_FETCH();
for (ptr = TWG(shm); ptr < (TWG(shm) + TWG(shm_size)); ptr++) {
if (!ptr->descriptor) {
continue;
}
if (!addr && ptr->descriptor->shm_perm.key == key) {
break;
} else if (ptr->addr == addr) {
break;
}
}
if (ptr < (TWG(shm) + TWG(shm_size))) {
return ptr;
}
newptr = (shm_pair*)realloc((void*)TWG(shm), (TWG(shm_size)+1)*sizeof(shm_pair));
if (newptr == NULL) {
return NULL;
}
TWG(shm) = newptr;
ptr = newptr + TWG(shm_size);
TWG(shm_size)++;
return ptr;
}
static HANDLE dupHandle(HANDLE fh, BOOL inherit) {
HANDLE copy, self = GetCurrentProcess();
if (!DuplicateHandle(self, fh, self, &copy, 0, inherit, DUPLICATE_SAME_ACCESS|DUPLICATE_CLOSE_SOURCE)) {
return NULL;
}
return copy;
}
TSRM_API FILE *popen(const char *command, const char *type)
{
FILE *stream = NULL;
int fno, str_len = strlen(type), read, mode;
STARTUPINFO startup;
PROCESS_INFORMATION process;
SECURITY_ATTRIBUTES security;
HANDLE in, out;
char *cmd;
process_pair *proc;
TSRMLS_FETCH();
security.nLength = sizeof(SECURITY_ATTRIBUTES);
security.bInheritHandle = TRUE;
security.lpSecurityDescriptor = NULL;
if (!str_len || !CreatePipe(&in, &out, &security, 2048L)) {
return NULL;
}
memset(&startup, 0, sizeof(STARTUPINFO));
memset(&process, 0, sizeof(PROCESS_INFORMATION));
startup.cb = sizeof(STARTUPINFO);
startup.dwFlags = STARTF_USESTDHANDLES;
startup.hStdError = GetStdHandle(STD_ERROR_HANDLE);
read = (type[0] == 'r') ? TRUE : FALSE;
mode = ((str_len == 2) && (type[1] == 'b')) ? O_BINARY : O_TEXT;
if (read) {
in = dupHandle(in, FALSE);
startup.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
startup.hStdOutput = out;
} else {
out = dupHandle(out, FALSE);
startup.hStdInput = in;
startup.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
}
cmd = (char*)malloc(strlen(command)+strlen(TWG(comspec))+sizeof(" /c "));
sprintf(cmd, "%s /c %s", TWG(comspec), command);
if (!CreateProcess(NULL, cmd, &security, &security, security.bInheritHandle, NORMAL_PRIORITY_CLASS, NULL, NULL, &startup, &process)) {
return NULL;
}
free(cmd);
CloseHandle(process.hThread);
proc = process_get(NULL TSRMLS_CC);
if (read) {
fno = _open_osfhandle((long)in, _O_RDONLY | mode);
CloseHandle(out);
} else {
fno = _open_osfhandle((long)out, _O_WRONLY | mode);
CloseHandle(in);
}
stream = _fdopen(fno, type);
proc->prochnd = process.hProcess;
proc->stream = stream;
return stream;
}
TSRM_API int pclose(FILE *stream)
{
DWORD termstat = 0;
process_pair *process;
TSRMLS_FETCH();
if ((process = process_get(stream TSRMLS_CC)) == NULL) {
return 0;
}
fflush(process->stream);
fclose(process->stream);
WaitForSingleObject(process->prochnd, INFINITE);
GetExitCodeProcess(process->prochnd, &termstat);
process->stream = NULL;
CloseHandle(process->prochnd);
return termstat;
}
TSRM_API int shmget(int key, int size, int flags)
{
shm_pair *shm;
char shm_segment[26], shm_info[29];
HANDLE shm_handle, info_handle;
BOOL created = FALSE;
if (size < 0) {
return -1;
}
sprintf(shm_segment, "TSRM_SHM_SEGMENT:%d", key);
sprintf(shm_info, "TSRM_SHM_DESCRIPTOR:%d", key);
shm_handle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, shm_segment);
info_handle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, shm_info);
if ((!shm_handle && !info_handle)) {
if (flags & IPC_EXCL) {
return -1;
}
if (flags & IPC_CREAT) {
shm_handle = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, size, shm_segment);
info_handle = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, sizeof(shm->descriptor), shm_info);
created = TRUE;
}
if ((!shm_handle || !info_handle)) {
return -1;
}
}
shm = shm_get(key, NULL);
shm->segment = shm_handle;
shm->info = info_handle;
shm->descriptor = MapViewOfFileEx(shm->info, FILE_MAP_ALL_ACCESS, 0, 0, 0, NULL);
if (created) {
shm->descriptor->shm_perm.key = key;
shm->descriptor->shm_segsz = size;
shm->descriptor->shm_ctime = time(NULL);
shm->descriptor->shm_cpid = getpid();
shm->descriptor->shm_perm.mode = flags;
shm->descriptor->shm_perm.cuid = shm->descriptor->shm_perm.cgid= 0;
shm->descriptor->shm_perm.gid = shm->descriptor->shm_perm.uid = 0;
shm->descriptor->shm_atime = shm->descriptor->shm_dtime = 0;
shm->descriptor->shm_lpid = shm->descriptor->shm_nattch = 0;
shm->descriptor->shm_perm.mode = shm->descriptor->shm_perm.seq = 0;
}
if (shm->descriptor->shm_perm.key != key || size > shm->descriptor->shm_segsz ) {
CloseHandle(shm->segment);
UnmapViewOfFile(shm->descriptor);
CloseHandle(shm->info);
return -1;
}
return key;
}
TSRM_API void *shmat(int key, const void *shmaddr, int flags)
{
shm_pair *shm = shm_get(key, NULL);
if (!shm->segment) {
return (void*)-1;
}
shm->descriptor->shm_atime = time(NULL);
shm->descriptor->shm_lpid = getpid();
shm->descriptor->shm_nattch++;
shm->addr = MapViewOfFileEx(shm->segment, FILE_MAP_ALL_ACCESS, 0, 0, 0, NULL);
return shm->addr;
}
TSRM_API int shmdt(const void *shmaddr)
{
shm_pair *shm = shm_get(0, (void*)shmaddr);
if (!shm->segment) {
return -1;
}
shm->descriptor->shm_dtime = time(NULL);
shm->descriptor->shm_lpid = getpid();
shm->descriptor->shm_nattch--;
return UnmapViewOfFile(shm->addr) ? 0 : -1;
}
TSRM_API int shmctl(int key, int cmd, struct shmid_ds *buf) {
shm_pair *shm = shm_get(key, NULL);
if (!shm->segment) {
return -1;
}
switch (cmd) {
case IPC_STAT:
memcpy(buf, shm->descriptor, sizeof(struct shmid_ds));
return 0;
case IPC_SET:
shm->descriptor->shm_ctime = time(NULL);
shm->descriptor->shm_perm.uid = buf->shm_perm.uid;
shm->descriptor->shm_perm.gid = buf->shm_perm.gid;
shm->descriptor->shm_perm.mode = buf->shm_perm.mode;
return 0;
case IPC_RMID:
if (shm->descriptor->shm_nattch < 1) {
shm->descriptor->shm_perm.key = -1;
}
return 0;
default:
return -1;
}
}
#endif
+107
View File
@@ -0,0 +1,107 @@
/*
+----------------------------------------------------------------------+
| PHP version 4.0 |
+----------------------------------------------------------------------+
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Daniel Beulshausen <daniel@php4win.de> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
#ifndef TSRM_WIN32_H
#define TSRM_WIN32_H
#include "TSRM.h"
#ifdef TSRM_WIN32
#include <windows.h>
struct ipc_perm {
int key;
unsigned short uid;
unsigned short gid;
unsigned short cuid;
unsigned short cgid;
unsigned short mode;
unsigned short seq;
};
struct shmid_ds {
struct ipc_perm shm_perm;
int shm_segsz;
time_t shm_atime;
time_t shm_dtime;
time_t shm_ctime;
unsigned short shm_cpid;
unsigned short shm_lpid;
short shm_nattch;
};
typedef struct {
FILE *stream;
HANDLE prochnd;
} process_pair;
typedef struct {
void *addr;
HANDLE info;
HANDLE segment;
struct shmid_ds *descriptor;
} shm_pair;
typedef struct {
process_pair *process;
shm_pair *shm;
int process_size;
int shm_size;
char *comspec;
} tsrm_win32_globals;
#ifdef ZTS
# define TWG(v) TSRMG(win32_globals_id, tsrm_win32_globals *, v)
#else
# define TWG(v) (win32_globals.v)
#endif
#endif
#define IPC_PRIVATE 0
#define IPC_CREAT 00001000
#define IPC_EXCL 00002000
#define IPC_NOWAIT 00004000
#define IPC_RMID 0
#define IPC_SET 1
#define IPC_STAT 2
#define IPC_INFO 3
#define SHM_R PAGE_READONLY
#define SHM_W PAGE_READWRITE
#define SHM_RDONLY FILE_MAP_READ
#define SHM_RND FILE_MAP_WRITE
#define SHM_REMAP FILE_MAP_COPY
TSRM_API void tsrm_win32_startup(void);
TSRM_API void tsrm_win32_shutdown(void);
TSRM_API FILE *popen(const char *command, const char *type);
TSRM_API int pclose(FILE *stream);
TSRM_API int shmget(int key, int size, int flags);
TSRM_API void *shmat(int key, const void *shmaddr, int flags);
TSRM_API int shmdt(const void *shmaddr);
TSRM_API int shmctl(int key, int cmd, struct shmid_ds *buf);
#endif
-186
View File
@@ -1,186 +0,0 @@
// $Header$
// FlexLexer.h -- define interfaces for lexical analyzer classes generated
// by flex
// Copyright (c) 1993 The Regents of the University of California.
// All rights reserved.
//
// This code is derived from software contributed to Berkeley by
// Kent Williams and Tom Epperly.
//
// Redistribution and use in source and binary forms with or without
// modification are permitted provided that: (1) source distributions retain
// this entire copyright notice and comment, and (2) distributions including
// binaries display the following acknowledgement: ``This product includes
// software developed by the University of California, Berkeley and its
// contributors'' in the documentation or other materials provided with the
// distribution and in all advertising materials mentioning features or use
// of this software. Neither the name of the University nor the names of
// its contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
// THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
// WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
// This file defines FlexLexer, an abstract class which specifies the
// external interface provided to flex C++ lexer objects, and yyFlexLexer,
// which defines a particular lexer class.
//
// If you want to create multiple lexer classes, you use the -P flag
// to rename each yyFlexLexer to some other xxFlexLexer. You then
// include <FlexLexer.h> in your other sources once per lexer class:
//
// #undef yyFlexLexer
// #define yyFlexLexer xxFlexLexer
// #include <FlexLexer.h>
//
// #undef yyFlexLexer
// #define yyFlexLexer zzFlexLexer
// #include <FlexLexer.h>
// ...
#ifndef FLEXLEXER_H
// Never included before - need to define base class.
#define FLEXLEXER_H
#include <iostream.h>
extern "C++" {
struct yy_buffer_state;
typedef int yy_state_type;
class FlexLexer {
public:
virtual ~FlexLexer() { }
const char* YYText() { return yytext; }
int YYLeng() { return yyleng; }
virtual void
yy_switch_to_buffer( struct yy_buffer_state* new_buffer ) = 0;
virtual struct yy_buffer_state*
yy_create_buffer( istream* s, int size ) = 0;
virtual void yy_delete_buffer( struct yy_buffer_state* b ) = 0;
virtual void yyrestart( istream* s ) = 0;
virtual int yylex() = 0;
// Call yylex with new input/output sources.
int yylex( istream* new_in, ostream* new_out = 0 )
{
switch_streams( new_in, new_out );
return yylex();
}
// Switch to new input/output streams. A nil stream pointer
// indicates "keep the current one".
virtual void switch_streams( istream* new_in = 0,
ostream* new_out = 0 ) = 0;
int lineno() const { return yylineno; }
int debug() const { return yy_flex_debug; }
void set_debug( int flag ) { yy_flex_debug = flag; }
protected:
char* yytext;
int yyleng;
int yylineno; // only maintained if you use %option yylineno
int yy_flex_debug; // only has effect with -d or "%option debug"
};
}
#endif
#if defined(yyFlexLexer) || ! defined(yyFlexLexerOnce)
// Either this is the first time through (yyFlexLexerOnce not defined),
// or this is a repeated include to define a different flavor of
// yyFlexLexer, as discussed in the flex man page.
#define yyFlexLexerOnce
class yyFlexLexer : public FlexLexer {
public:
// arg_yyin and arg_yyout default to the cin and cout, but we
// only make that assignment when initializing in yylex().
yyFlexLexer( istream* arg_yyin = 0, ostream* arg_yyout = 0 );
virtual ~yyFlexLexer();
void yy_switch_to_buffer( struct yy_buffer_state* new_buffer );
struct yy_buffer_state* yy_create_buffer( istream* s, int size );
void yy_delete_buffer( struct yy_buffer_state* b );
void yyrestart( istream* s );
virtual int yylex();
virtual void switch_streams( istream* new_in, ostream* new_out );
protected:
virtual int LexerInput( char* buf, int max_size );
virtual void LexerOutput( const char* buf, int size );
virtual void LexerError( const char* msg );
void yyunput( int c, char* buf_ptr );
int yyinput();
void yy_load_buffer_state();
void yy_init_buffer( struct yy_buffer_state* b, istream* s );
void yy_flush_buffer( struct yy_buffer_state* b );
int yy_start_stack_ptr;
int yy_start_stack_depth;
int* yy_start_stack;
void yy_push_state( int new_state );
void yy_pop_state();
int yy_top_state();
yy_state_type yy_get_previous_state();
yy_state_type yy_try_NUL_trans( yy_state_type current_state );
int yy_get_next_buffer();
istream* yyin; // input source for default LexerInput
ostream* yyout; // output sink for default LexerOutput
struct yy_buffer_state* yy_current_buffer;
// yy_hold_char holds the character lost when yytext is formed.
char yy_hold_char;
// Number of characters read into yy_ch_buf.
int yy_n_chars;
// Points to current character in buffer.
char* yy_c_buf_p;
int yy_init; // whether we need to initialize
int yy_start; // start state number
// Flag which is used to allow yywrap()'s to do buffer switches
// instead of setting up a fresh yyin. A bit of a hack ...
int yy_did_buffer_switch_on_eof;
// The following are not always needed, but may be depending
// on use of certain flex features (like REJECT or yymore()).
yy_state_type yy_last_accepting_state;
char* yy_last_accepting_cpos;
yy_state_type* yy_state_buf;
yy_state_type* yy_state_ptr;
char* yy_full_match;
int* yy_full_state;
int yy_full_lp;
int yy_lp;
int yy_looking_for_trail_begin;
int yy_more_flag;
int yy_more_len;
int yy_more_offset;
int yy_prev_more_offset;
};
#endif
-116
View File
@@ -1,116 +0,0 @@
---------------------------------------------------------------------------
The Zend License, version 0.92
Copyright (C) 1999-2000 Zend Technologies Ltd.
---------------------------------------------------------------------------
The Zend scripting engine library is a product of Zend Technologies Ltd.
It may be used and/or distributed under the terms of the Q Public
License (QPL) version 1.0, enclosed below.
For more information about Zend please visit http://www.zend.com/
For license related questions please mail license@zend.com
===========================================================================
THE Q PUBLIC LICENSE
version 1.0
Copyright (C) 1999 Troll Tech AS, Norway.
Everyone is permitted to copy and
distribute this license document.
The intent of this license is to establish freedom to share and change the
software regulated by this license under the open source model.
This license applies to any software containing a notice placed by the
copyright holder saying that it may be distributed under the terms of
the Q Public License version 1.0. Such software is herein referred to as
the Software. This license covers modification and distribution of the
Software, use of third-party application programs based on the Software,
and development of free software which uses the Software.
Granted Rights
1. You are granted the non-exclusive rights set forth in this license
provided you agree to and comply with any and all conditions in this
license. Whole or partial distribution of the Software, or software
items that link with the Software, in any form signifies acceptance of
this license.
2. You may copy and distribute the Software in unmodified form provided
that the entire package, including - but not restricted to - copyright,
trademark notices and disclaimers, as released by the initial developer
of the Software, is distributed.
3. You may make modifications to the Software and distribute your
modifications, in a form that is separate from the Software, such as
patches. The following restrictions apply to modifications:
a. Modifications must not alter or remove any copyright notices in
the Software.
b. When modifications to the Software are released under this
license, a non-exclusive royalty-free right is granted to the
initial developer of the Software to distribute your modification
in future versions of the Software provided such versions remain
available under these terms in addition to any other license(s) of
the initial developer.
4. You may distribute machine-executable forms of the Software or
machine-executable forms of modified versions of the Software, provided
that you meet these restrictions:
a. You must include this license document in the distribution.
b. You must ensure that all recipients of the machine-executable forms
are also able to receive the complete machine-readable source code
to the distributed Software, including all modifications, without
any charge beyond the costs of data transfer, and place prominent
notices in the distribution explaining this.
c. You must ensure that all modifications included in the
machine-executable forms are available under the terms of this
license.
5. You may use the original or modified versions of the Software to
compile, link and run application programs legally developed by you
or by others.
6. You may develop application programs, reusable components and other
software items that link with the original or modified versions of the
Software. These items, when distributed, are subject to the following
requirements:
a. You must ensure that all recipients of machine-executable forms of
these items are also able to receive and use the complete
machine-readable source code to the items without any charge
beyond the costs of data transfer.
b. You must explicitly license all recipients of your items to use
and re-distribute original and modified versions of the items in
both machine-executable and source code forms. The recipients must
be able to do so without any charges whatsoever, and they must be
able to re-distribute to anyone they choose.
c. If the items are not available to the general public, and the
initial developer of the Software requests a copy of the items,
then you must supply one.
Limitations of Liability
In no event shall the initial developers or copyright holders be liable
for any damages whatsoever, including - but not restricted to - lost
revenue or profits or other direct, indirect, special, incidental or
consequential damages, even if they have been advised of the possibility
of such damages, except to the extent invariable law, if any, provides
otherwise.
No Warranty
The Software and this license document are provided AS IS with NO WARRANTY
OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE.
===========================================================================
-43
View File
@@ -1,43 +0,0 @@
## Process this file with automake to produce Makefile.in -*- makefile -*-
#CLEANFILES = zend-parser.c zend-parser.h zend-scanner.c zend-parser.output
AUTOMAKE_OPTIONS=foreign
EXTRA_LTLIBRARIES=libZend_cc.la libZend_c.la libZend_gcc.la
noinst_LTLIBRARIES=$(ZEND_SCANNER) $(ZEND_GCC) libZend.la
libZend_cc_la_SOURCES=zend-scanner-cc.cc
libZend_c_la_SOURCES=zend-scanner.c
libZend_gcc_la_SOURCES=zend_gcc_inline.c
libZend_la_SOURCES=\
zend-parser.y \
zend_alloc.c zend_compile.c zend_constants.c zend_dynamic_array.c \
zend_execute.c zend_execute_API.c zend_highlight.c zend_llist.c \
zend_opcode.c zend_operators.c zend_ptr_stack.c zend_stack.c \
zend_variables.c zend.c zend_API.c zend_extensions.c zend_hash.c \
zend_list.c zend_indent.c zend_builtin_functions.c zend_sprintf.c
libZend_la_LIBADD = $(ZEND_SCANNER) $(ZEND_GCC)
libZend_la_LDFLAGS = @EXTRA_LIBS@
libZend_la_DEPENDENCIES = $(ZEND_SCANNER)
# automake isn't too clever about "non-standard" use of lex and yacc
$(libZend_la_OBJECTS) zend-scanner.lo zend-scanner-cc.lo: zend-parser.h
zend-scanner.c: $(srcdir)/zend-scanner.l
$(LEX) -Pzend -o$@ -i $(srcdir)/zend-scanner.l
zend-scanner-cc.cc: $(srcdir)/zend-scanner.l
$(LEX) -+ -B -i -S$(srcdir)/flex.skl -Pzend -o$@ $(srcdir)/zend-scanner.l
zend-parser.h: zend-parser.c
zend-parser.c: $(srcdir)/zend-parser.y
$(YACC) -p zend -v -d $(srcdir)/zend-parser.y -o zend-parser.c
depend:
zend_execute.lo: $(srcdir)/zend_execute.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(INLINE_CFLAGS) -c $(srcdir)/zend_execute.c
-111
View File
@@ -1,111 +0,0 @@
Improvements
------------
Zend was designed from the ground up for increased speed,
reduced memory consumption and more reliable execution. We dare
say it meets all of these goals and does so pretty well. Beyond
that, there are several improvements in the language engine
features:
* References support. $foo = &$a; would make $foo and $a be two
names to the same variable. This works with arrays as well,
on either side; e.g., $foo = &$a[7]; would make $foo and $a[7]
be two names to the same variable. Changing one would change
the other and vice versa.
* Object overloading support. This feature allows various OO
libraries to use the OO notation of PHP to access their
functionality. Right now, no use is made of that feature,
but we'd have a COM module ready by the time PHP 4.0 is released.
A CORBA module would probably follow.
* include() and eval() are now functions, and not statements.
That means they return a value. The default return value from
include() and eval() is 1, so that you can do if (include())
without further coding. The return value may be changed by
returning a value from the global scope of the included file
or the evaluated string. For example, if 'return 7;' is executed
in the global scope of foo.inc, include("foo.inc") would evaluate
to 7.
* Automatic resource deallocation. Several people have been bitten
by the fact that PHP 3.0 had no concept of reference counting.
Zend adds full reference counting for every value in the system,
including resources. As soon as a resource is no longer referenced
from any variable, it is automatically destroyed to save memory
and resources. The most obvious example for the advantage in this
is a loop that has an SQL query inside it, something like
'$result = sql_query(...);'. In PHP 3.0, every iteration resulted
in another SQL result-set allocated in the memory, and all of the
result sets weren't destroyed until the end of the script's execution.
In Zend, as soon as we overwrite an old result set with a new one,
the old result set which is no longer referenced, is destroyed.
* Full support for nesting arrays and objects within each other, in
as many levels as you want.
* Boolean type. true and false are now constants of type boolean.
Comparing any other value to them would convert that value to a
boolean first, and conduct the comparison later. That means, for
example, that 5==true would evaluate to true (in PHP 3.0, true
was nothing but a constant for the integer value of 1, so 5==true
was identical to 5==1, which was false).
* Runtime binding of function names. This complex name has a simple
explanation - you can now call functions before they're declared!
* Added here-docs support.
* Added foreach. Two syntaxes supported:
foreach(array_expr as $val) statement
foreach(array_expr as $key => $val) statement
* A true unset() implementation. A variable or element that is unset(), is now
sent to oblivion in its entirely, no trace remains from it.
* Output buffering support! Use ob_start() to begin output buffering, ob_end_flush()
to end buffering and send out the buffered contents, ob_end_clean() to end buffering
without sending the buffered contents, and ob_get_contents() to retreive the current
contents of the output buffer.
Header information (header(), content type, cookies) are not buffered. By turning
on output buffering, you can effectively send header information all throughout your
file, regardless of whether you've emitted body output or not.
* Full variable reference within quoted strings:
${expr} - full indirect reference support for scalar variables
{variable} - full variable support
For example:
$foo[5]["bar"] = "foobar";
print "{$foo[5]["bar"]}"; // would print "foobar"
* Ability to call member functions of other classes from within member functions or from
the global scope. You can now, for example, override a parent function with a child function,
and call the parent function from it.
* Runtime information for classes (class name, parent, available functions, etc.).
* Much more efficient syntax highlighter - runs much quicker, performs more reliably, and
generates much tighter HTML.
* A full-featured debugger has been integrated with the language (supports breakpoints,
expression evaluation, step-in/over, function call backtrace, and more).
Incompatabilities
-----------------
Zend claims 100% compatability with the engine of PHP 3.0, and is
shamelessly lying about it. Here's why:
* static variable initializers only accept scalar values
(in PHP 3.0 they accepted any valid expression). The impact
should be somewhere in between void and non existent, since
initializing a static variable with anything but a simple
static value makes no sense at all.
* The scope of break and continue is local to that of an
include()'d file or an eval()'d string. The impact should
be somewhat smaller of the one above.
* return statement from a require()'d file no longer works. It
hardly worked in PHP 3.0, so the impact should be fairly small.
If you want this functionality - use include() instead.
* unset() is no longer a function, but a statement. It was never
documented as a function so the impact should be no bigger than
nada.
* The following letter combination is not supported within encapsulated
strings: "{$". If you have a string that includes this letter
combination, for example, print "{$somevar"; (which printed the
letter { and the contents of the variable $somevar in PHP 3.0),
it will result in a parse error under Zend. In this case, you
would have to change the code to print "\{$somevar";
This incompatability is due to the full variable reference
within quoted strings feature added in Zend.
-436
View File
@@ -1,436 +0,0 @@
# Microsoft Developer Studio Project File - Name="Zend" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=Zend - Win32 Release_inline
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "Zend.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "Zend.mak" CFG="Zend - Win32 Release_inline"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "Zend - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "Zend - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE "Zend - Win32 Release_inline" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "Zend - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDebug" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug" /D "_LIB" /D "Zend_EXPORTS" /D ZEND_DEBUG=0 /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /FR /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x40d /d "NDebug"
# ADD RSC /l 0x40d /d "NDebug"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_Debug" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_Debug" /D "_LIB" /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D ZEND_DEBUG=1 /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c
# ADD BASE RSC /l 0x40d /d "_Debug"
# ADD RSC /l 0x40d /d "_Debug"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
# PROP BASE Use_MFC 0
# PROP BASE Output_Dir "Zend___Win32_Release_inline"
# PROP BASE Intermediate_Dir "Zend___Win32_Release_inline"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Output_Dir "Release_inline"
# PROP Intermediate_Dir "Release_inline"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug" /D "_LIB" /D "Zend_EXPORTS" /D ZEND_DEBUG=0 /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /FR /FD /c
# SUBTRACT BASE CPP /YX
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug" /D "_LIB" /D "Zend_EXPORTS" /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D ZEND_DEBUG=0 /D "ZEND_WIN32_FORCE_INLINE" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /FR /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x40d /d "NDebug"
# ADD RSC /l 0x40d /d "NDebug"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ENDIF
# Begin Target
# Name "Zend - Win32 Release"
# Name "Zend - Win32 Debug"
# Name "Zend - Win32 Release_inline"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=".\zend-parser.c"
# End Source File
# Begin Source File
SOURCE=".\zend-scanner.c"
# End Source File
# Begin Source File
SOURCE=.\zend.c
# End Source File
# Begin Source File
SOURCE=.\zend_alloc.c
# End Source File
# Begin Source File
SOURCE=.\zend_API.c
# End Source File
# Begin Source File
SOURCE=.\zend_builtin_functions.c
# End Source File
# Begin Source File
SOURCE=.\zend_compile.c
# End Source File
# Begin Source File
SOURCE=.\zend_constants.c
# End Source File
# Begin Source File
SOURCE=.\zend_execute.c
# End Source File
# Begin Source File
SOURCE=.\zend_execute_API.c
# End Source File
# Begin Source File
SOURCE=.\zend_extensions.c
# End Source File
# Begin Source File
SOURCE=.\zend_gcc_inline.c
# End Source File
# Begin Source File
SOURCE=.\zend_hash.c
# End Source File
# Begin Source File
SOURCE=.\zend_highlight.c
# End Source File
# Begin Source File
SOURCE=.\zend_indent.c
# End Source File
# Begin Source File
SOURCE=.\zend_list.c
# End Source File
# Begin Source File
SOURCE=.\zend_llist.c
# End Source File
# Begin Source File
SOURCE=.\zend_opcode.c
# End Source File
# Begin Source File
SOURCE=.\zend_operators.c
# End Source File
# Begin Source File
SOURCE=.\zend_ptr_stack.c
# End Source File
# Begin Source File
SOURCE=.\zend_sprintf.c
# End Source File
# Begin Source File
SOURCE=.\zend_stack.c
# End Source File
# Begin Source File
SOURCE=.\zend_variables.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\FlexLexer.h
# End Source File
# Begin Source File
SOURCE=.\modules.h
# End Source File
# Begin Source File
SOURCE=".\zend-parser.h"
# End Source File
# Begin Source File
SOURCE=".\zend-scanner.h"
# End Source File
# Begin Source File
SOURCE=.\zend.h
# End Source File
# Begin Source File
SOURCE=.\zend_alloc.h
# End Source File
# Begin Source File
SOURCE=.\zend_API.h
# End Source File
# Begin Source File
SOURCE=.\zend_builtin_functions.h
# End Source File
# Begin Source File
SOURCE=.\zend_compile.h
# End Source File
# Begin Source File
SOURCE=.\zend_config.w32.h
# End Source File
# Begin Source File
SOURCE=.\zend_constants.h
# End Source File
# Begin Source File
SOURCE=.\zend_errors.h
# End Source File
# Begin Source File
SOURCE=.\zend_execute.h
# End Source File
# Begin Source File
SOURCE=.\zend_extensions.h
# End Source File
# Begin Source File
SOURCE=.\zend_fast_cache.h
# End Source File
# Begin Source File
SOURCE=.\zend_globals.h
# End Source File
# Begin Source File
SOURCE=.\zend_hash.h
# End Source File
# Begin Source File
SOURCE=.\zend_highlight.h
# End Source File
# Begin Source File
SOURCE=.\zend_indent.h
# End Source File
# Begin Source File
SOURCE=.\zend_list.h
# End Source File
# Begin Source File
SOURCE=.\zend_llist.h
# End Source File
# Begin Source File
SOURCE=.\zend_operators.h
# End Source File
# Begin Source File
SOURCE=.\zend_ptr_stack.h
# End Source File
# Begin Source File
SOURCE=.\zend_stack.h
# End Source File
# Begin Source File
SOURCE=.\zend_variables.h
# End Source File
# End Group
# Begin Group "Parsers"
# PROP Default_Filter "y"
# Begin Source File
SOURCE=".\zend-parser.y"
!IF "$(CFG)" == "Zend - Win32 Release"
# Begin Custom Build
InputDir=.
InputPath=".\zend-parser.y"
BuildCmds= \
if not "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p zend zend-parser.y \
if "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p zend zend-parser.y \
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
# Begin Custom Build
InputDir=.
InputPath=".\zend-parser.y"
BuildCmds= \
if not "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p zend zend-parser.y \
if "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p zend zend-parser.y \
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
# Begin Custom Build
InputDir=.
InputPath=".\zend-parser.y"
BuildCmds= \
if not "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p zend zend-parser.y \
if "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p zend zend-parser.y \
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ENDIF
# End Source File
# End Group
# Begin Group "Scanners"
# PROP Default_Filter "l"
# Begin Source File
SOURCE=".\zend-scanner.l"
!IF "$(CFG)" == "Zend - Win32 Release"
# Begin Custom Build
InputPath=".\zend-scanner.l"
"zend-scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -i -Pzend -ozend-scanner.c zend-scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
# Begin Custom Build
InputPath=".\zend-scanner.l"
"zend-scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -i -Pzend -ozend-scanner.c zend-scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
# Begin Custom Build
InputPath=".\zend-scanner.l"
"zend-scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -i -Pzend -ozend-scanner.c zend-scanner.l
# End Custom Build
!ENDIF
# End Source File
# End Group
# Begin Group "Text Files"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\ZEND_BUGS
# End Source File
# Begin Source File
SOURCE=.\ZEND_CHANGES
# End Source File
# Begin Source File
SOURCE=.\ZEND_TODO
# End Source File
# End Group
# Begin Group "Resources"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\zend.ico
# End Source File
# End Group
# End Target
# End Project
-236
View File
@@ -1,236 +0,0 @@
AC_DEFUN(LIBZEND_BISON_CHECK,[
if test "$YACC" != "bison -y"; then
AC_MSG_WARN(You will need bison if you want to regenerate the Zend parser.)
else
AC_MSG_CHECKING(bison version)
set `bison --version| sed -e 's/^GNU Bison version //' -e 's/\./ /'`
if test "${1}" = "1" -a "${2}" -lt "25"; then
AC_MSG_WARN(You will need bison 1.25 if you want to regenerate the Zend parser (found ${1}.${2}).)
fi
AC_MSG_RESULT(${1}.${2} (ok))
fi
])
AC_DEFUN(LIBZEND_BASIC_CHECKS,[
AC_REQUIRE([AC_PROG_YACC])
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_PROG_CC_C_O])
AC_REQUIRE([AM_PROG_LEX])
AC_REQUIRE([AC_HEADER_STDC])
LIBZEND_BISON_CHECK
dnl Ugly hack to get around a problem with gcc on AIX.
if test "$CC" = "gcc" -a "$ac_cv_prog_cc_g" = "yes" -a \
"`uname -sv`" = "AIX 4"; then
CFLAGS=`echo $CFLAGS | sed -e 's/-g//'`
fi
dnl Hack to work around a Mac OS X cpp problem
dnl Known versions needing this workaround are 5.3 and 5.4
if test "$ac_cv_prog_gcc" = "yes" -a "`uname -s`" = "Rhapsody"; then
CPPFLAGS="$CPPFLAGS -traditional-cpp"
fi
AC_CHECK_HEADERS(
limits.h \
malloc.h \
string.h \
unistd.h \
stdarg.h \
sys/types.h \
signal.h \
unix.h \
dlfcn.h)
AC_TYPE_SIZE_T
AC_TYPE_SIGNAL
AC_CHECK_LIB(dl, dlopen, [LIBS="-ldl $LIBS"])
AC_CHECK_FUNC(dlopen,[AC_DEFINE(HAVE_LIBDL, 1,[ ])])
dnl This is required for QNX and may be some BSD derived systems
AC_CHECK_TYPE( uint, unsigned int )
AC_CHECK_TYPE( ulong, unsigned long )
dnl Checks for library functions.
AC_FUNC_VPRINTF
AC_FUNC_MEMCMP
AC_FUNC_ALLOCA
AC_CHECK_FUNCS(memcpy strdup getpid kill strtod strtol finite)
AC_ZEND_BROKEN_SPRINTF
AC_CHECK_FUNCS(finite isfinite isinf isnan)
ZEND_FP_EXCEPT
AC_SUBST(ZEND_SCANNER)
])
AC_DEFUN(LIBZEND_ENABLE_DEBUG,[
AC_ARG_ENABLE(debug,
[ --enable-debug Compile with debugging symbols],[
ZEND_DEBUG=$enableval
],[
ZEND_DEBUG=no
])
])
AC_DEFUN(LIBZEND_OTHER_CHECKS,[
AC_ARG_ENABLE(c9x-inline,
[ --enable-c9x-inline Enable C9x-inline semantics],[
ZEND_C9X_INLINE=$enableval
],[
ZEND_C9X_INLINE=no
])
AC_ARG_ENABLE(experimental-zts,
[ --enable-experimental-zts This will most likely break your build],[
ZEND_EXPERIMENTAL_ZTS=$enableval
],[
ZEND_EXPERIMENTAL_ZTS=no
])
AC_ARG_ENABLE(inline-optimization,
[ --enable-inline-optimization If you have much memory and are using
gcc, you might try this.],[
ZEND_INLINE_OPTIMIZATION=$enableval
],[
ZEND_INLINE_OPTIMIZATION=no
])
AC_ARG_ENABLE(memory-limit,
[ --enable-memory-limit Compile with memory limit support. ], [
ZEND_MEMORY_LIMIT=$enableval
],[
ZEND_MEMORY_LIMIT=no
])
AC_MSG_CHECKING(whether to enable C9x-inline semantics)
AC_MSG_RESULT($ZEND_C9X_INLINE)
AC_MSG_CHECKING(whether to enable experimental ZTS)
AC_MSG_RESULT($ZEND_EXPERIMENTAL_ZTS)
AC_MSG_CHECKING(whether to enable inline optimization for GCC)
AC_MSG_RESULT($ZEND_INLINE_OPTIMIZATION)
AC_MSG_CHECKING(whether to enable a memory limit)
AC_MSG_RESULT($ZEND_MEMORY_LIMIT)
AC_MSG_CHECKING(whether to enable Zend debugging)
AC_MSG_RESULT($ZEND_DEBUG)
if test "$ZEND_DEBUG" = "yes"; then
AC_DEFINE(ZEND_DEBUG,1,[ ])
echo " $CFLAGS" | grep ' -g' >/dev/null || DEBUG_CFLAGS="-g"
test -n "$GCC" && DEBUG_CFLAGS="$DEBUG_CFLAGS -Wall"
test -n "$GCC" && test "$USE_MAINTAINER_MODE" = "yes" && \
DEBUG_CFLAGS="$DEBUG_CFLAGS -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations"
else
AC_DEFINE(ZEND_DEBUG,0,[ ])
fi
test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLAGS $DEBUG_CFLAGS"
if test "$ZEND_EXPERIMENTAL_ZTS" = "yes"; then
AC_DEFINE(ZTS,1,[ ])
ZEND_SCANNER_TYPE=cc
CPPFLAGS="$CPPFLAGS -I../TSRM"
LIBZEND_CPLUSPLUS_CHECKS
else
ZEND_SCANNER_TYPE=c
fi
if test "$ZEND_C9X_INLINE" = "yes"; then
AC_DEFINE(C9X_INLINE_SEMANTICS, 1, [whether to enable C9x-inline semantics])
else
ZEND_GCC=libZend_gcc.la
AC_SUBST(ZEND_GCC)
fi
ZEND_SCANNER="libZend_${ZEND_SCANNER_TYPE}.la"
if test "$ZEND_MEMORY_LIMIT" = "yes"; then
AC_DEFINE(MEMORY_LIMIT, 1, [Memory limit])
else
AC_DEFINE(MEMORY_LIMIT, 0, [Memory limit])
fi
changequote({,})
if test -n "$GCC" && test "$ZEND_INLINE_OPTIMIZATION" != "yes"; then
INLINE_CFLAGS=`echo $ac_n "$CFLAGS $ac_c" | sed s/-O[0-9]*//`
else
INLINE_CFLAGS="$CFLAGS"
fi
changequote([,])
AC_C_INLINE
AC_SUBST(INLINE_CFLAGS)
])
AC_DEFUN(LIBZEND_CPLUSPLUS_CHECKS,[
dnl extra check to avoid C++ preprocessor testing if in non-ZTS mode
if test "$ZEND_EXPERIMENTAL_ZTS" = "yes"; then
AC_PROG_CXX
AC_PROG_CXXCPP
AC_LANG_CPLUSPLUS
AC_CHECK_HEADER(stdiostream.h, [ AC_DEFINE(HAVE_STDIOSTREAM_H, [], Whether you have stdiostream.h) ])
AC_CHECK_LIB(C, cin)
AC_CHECK_LIB(g++, cin)
AC_CHECK_LIB(stdc++, cin)
dnl Digital Unix 4.0
AC_CHECK_LIB(cxx, cin)
AC_CHECK_LIB(cxxstd, __array_delete)
AC_CACHE_CHECK(for class istdiostream,ac_cv_class_istdiostream,[
AC_TRY_COMPILE([
#include <sys/types.h>
#include <unistd.h>
#include <fstream.h>
#include <stdiostream.h>
],[
istdiostream *foo = new istdiostream((FILE *) 0);
],[
ac_cv_class_istdiostream=yes
],[
ac_cv_class_istdiostream=no
])
])
if test "$ac_cv_class_istdiostream" = "yes"; then
AC_DEFINE(HAVE_CLASS_ISTDIOSTREAM, 1, [Whether you have class istdiostream])
fi
AC_LANG_C
fi
])
-258
View File
@@ -1,258 +0,0 @@
# Microsoft Developer Studio Generated Dependency File, included by ZendCore.mak
.\zend_alloc.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_compile.h"\
".\zend_config.w32.h"\
".\zend_execute.h"\
".\zend_llist.h"\
".\zend_ptr_stack.h"\
".\zend_stack.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_globals.h"\
".\zend_hash.h"\
.\alloca.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_config.w32.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_hash.h"\
.\zend_compile.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_compile.h"\
".\zend_config.w32.h"\
".\zend_execute.h"\
".\zend_llist.h"\
".\modules.h"\
".\zend_operators.h"\
".\zend_ptr_stack.h"\
".\zend_stack.h"\
".\zend_variables.h"\
".\zend.h"\
".\zend_API.h"\
".\zend_errors.h"\
".\zend_globals.h"\
".\zend_hash.h"\
".\zend_ini.h"\
.\zend_constants.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_config.w32.h"\
".\zend_constants.h"\
".\zend_operators.h"\
".\zend_variables.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_hash.h"\
.\zend_execute.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_compile.h"\
".\zend_config.w32.h"\
".\zend_constants.h"\
".\zend_execute.h"\
".\zend_llist.h"\
".\modules.h"\
".\zend_operators.h"\
".\zend_ptr_stack.h"\
".\zend_stack.h"\
".\zend_variables.h"\
".\zend.h"\
".\zend_API.h"\
".\zend_errors.h"\
".\zend_globals.h"\
".\zend_hash.h"\
".\zend_ini.h"\
.\zend_highlight.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_compile.h"\
".\zend_config.w32.h"\
".\zend_execute.h"\
".\zend_highlight.h"\
".\zend_llist.h"\
".\zend_ptr_stack.h"\
".\zend_stack.h"\
".\zend-parser.tab.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_globals.h"\
".\zend_hash.h"\
.\zend_llist.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_config.w32.h"\
".\zend_llist.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_hash.h"\
.\zend_opcode.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_compile.h"\
".\zend_config.w32.h"\
".\zend_execute.h"\
".\zend_llist.h"\
".\modules.h"\
".\zend_operators.h"\
".\zend_ptr_stack.h"\
".\zend_stack.h"\
".\zend_variables.h"\
".\zend.h"\
".\zend_API.h"\
".\zend_errors.h"\
".\zend_globals.h"\
".\zend_hash.h"\
".\zend_ini.h"\
.\zend_operators.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_compile.h"\
".\zend_config.w32.h"\
".\zend_execute.h"\
".\zend_llist.h"\
".\zend_operators.h"\
".\zend_ptr_stack.h"\
".\zend_stack.h"\
".\zend_variables.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_globals.h"\
".\zend_hash.h"\
.\zend_ptr_stack.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_config.w32.h"\
".\zend_ptr_stack.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_hash.h"\
.\zend_stack.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_config.w32.h"\
".\zend_stack.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_hash.h"\
.\zend_variables.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_compile.h"\
".\zend_config.w32.h"\
".\zend_constants.h"\
".\zend_execute.h"\
".\zend_llist.h"\
".\modules.h"\
".\zend_ptr_stack.h"\
".\zend_stack.h"\
".\zend_variables.h"\
".\zend.h"\
".\zend_API.h"\
".\zend_errors.h"\
".\zend_globals.h"\
".\zend_hash.h"\
".\zend_ini.h"\
".\zend_list.h"\
.\zend.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_config.w32.h"\
".\zend_operators.h"\
".\zend_variables.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_hash.h"\
.\zend_API.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_compile.h"\
".\zend_config.w32.h"\
".\zend_constants.h"\
".\zend_execute.h"\
".\zend_llist.h"\
".\modules.h"\
".\zend_operators.h"\
".\zend_ptr_stack.h"\
".\zend_stack.h"\
".\zend_variables.h"\
".\zend.h"\
".\zend_API.h"\
".\zend_errors.h"\
".\zend_globals.h"\
".\zend_hash.h"\
".\zend_ini.h"\
".\zend_list.h"\
.\zend_hash.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_config.w32.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_hash.h"\
.\zend_ini.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_config.w32.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_hash.h"\
".\zend_ini.h"\
!IF "$(CFG)" == "ZendCore - Win32 Release"
!ELSEIF "$(CFG)" == "ZendCore - Win32 Debug"
!ENDIF
!IF "$(CFG)" == "ZendCore - Win32 Release"
!ELSEIF "$(CFG)" == "ZendCore - Win32 Debug"
!ENDIF
!IF "$(CFG)" == "ZendCore - Win32 Release"
!ELSEIF "$(CFG)" == "ZendCore - Win32 Debug"
!ENDIF
!IF "$(CFG)" == "ZendCore - Win32 Release"
!ELSEIF "$(CFG)" == "ZendCore - Win32 Debug"
!ENDIF
-452
View File
@@ -1,452 +0,0 @@
# Microsoft Developer Studio Project File - Name="ZendTS" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=ZendTS - Win32 Release_TS_inline
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "ZendTS.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "ZendTS.mak" CFG="ZendTS - Win32 Release_TS_inline"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "ZendTS - Win32 Release_TS" (based on "Win32 (x86) Static Library")
!MESSAGE "ZendTS - Win32 Debug_TS" (based on "Win32 (x86) Static Library")
!MESSAGE "ZendTS - Win32 Release_TS_inline" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
# PROP BASE Use_MFC 0
# PROP BASE Output_Dir "Release_TS"
# PROP BASE Intermediate_Dir "Release_TS"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Output_Dir "Release_TS"
# PROP Intermediate_Dir "Release_TS"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDebug_TS" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x40d /d "NDebug_TS"
# ADD RSC /l 0x40d /d "NDebug_TS"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
# PROP BASE Use_MFC 0
# PROP BASE Output_Dir "Debug_TS"
# PROP BASE Intermediate_Dir "Debug_TS"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Output_Dir "Debug_TS"
# PROP Intermediate_Dir "Debug_TS"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_Debug_TS" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_Debug_TS" /D ZEND_DEBUG=1 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c
# ADD BASE RSC /l 0x40d /d "_Debug_TS"
# ADD RSC /l 0x40d /d "_Debug_TS"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TS_inline"
# PROP BASE Use_MFC 0
# PROP BASE Output_Dir "ZendTS___Win32_Release_TS_inline"
# PROP BASE Intermediate_Dir "ZendTS___Win32_Release_TS_inline"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Output_Dir "Release_TS_inline"
# PROP Intermediate_Dir "Release_TS_inline"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "WIN32" /D "_MBCS" /D ZEND_DEBUG=0 /FR /FD /c
# SUBTRACT BASE CPP /YX
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D "ZEND_WIN32_FORCE_INLINE" /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x40d /d "NDebug_TS"
# ADD RSC /l 0x40d /d "NDebug_TS"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ENDIF
# Begin Target
# Name "ZendTS - Win32 Release_TS"
# Name "ZendTS - Win32 Debug_TS"
# Name "ZendTS - Win32 Release_TS_inline"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=".\zend-parser.c"
# End Source File
# Begin Source File
SOURCE=".\zend-scanner.cpp"
# End Source File
# Begin Source File
SOURCE=.\zend.c
# End Source File
# Begin Source File
SOURCE=.\zend_alloc.c
# End Source File
# Begin Source File
SOURCE=.\zend_API.c
# End Source File
# Begin Source File
SOURCE=.\zend_builtin_functions.c
# End Source File
# Begin Source File
SOURCE=.\zend_compile.c
# End Source File
# Begin Source File
SOURCE=.\zend_constants.c
# End Source File
# Begin Source File
SOURCE=.\zend_dynamic_array.c
# End Source File
# Begin Source File
SOURCE=.\zend_execute.c
# End Source File
# Begin Source File
SOURCE=.\zend_execute_API.c
# End Source File
# Begin Source File
SOURCE=.\zend_extensions.c
# End Source File
# Begin Source File
SOURCE=.\zend_gcc_inline.c
# End Source File
# Begin Source File
SOURCE=.\zend_hash.c
# End Source File
# Begin Source File
SOURCE=.\zend_highlight.c
# End Source File
# Begin Source File
SOURCE=.\zend_indent.c
# End Source File
# Begin Source File
SOURCE=.\zend_list.c
# End Source File
# Begin Source File
SOURCE=.\zend_llist.c
# End Source File
# Begin Source File
SOURCE=.\zend_opcode.c
# End Source File
# Begin Source File
SOURCE=.\zend_operators.c
# End Source File
# Begin Source File
SOURCE=.\zend_ptr_stack.c
# End Source File
# Begin Source File
SOURCE=.\zend_sprintf.c
# End Source File
# Begin Source File
SOURCE=.\zend_stack.c
# End Source File
# Begin Source File
SOURCE=.\zend_variables.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\FlexLexer.h
# End Source File
# Begin Source File
SOURCE=.\modules.h
# End Source File
# Begin Source File
SOURCE=".\zend-parser.h"
# End Source File
# Begin Source File
SOURCE=".\zend-scanner.h"
# End Source File
# Begin Source File
SOURCE=.\zend.h
# End Source File
# Begin Source File
SOURCE=.\zend_alloc.h
# End Source File
# Begin Source File
SOURCE=.\zend_API.h
# End Source File
# Begin Source File
SOURCE=.\zend_builtin_functions.h
# End Source File
# Begin Source File
SOURCE=.\zend_compile.h
# End Source File
# Begin Source File
SOURCE=.\zend_config.w32.h
# End Source File
# Begin Source File
SOURCE=.\zend_constants.h
# End Source File
# Begin Source File
SOURCE=.\zend_dynamic_array.h
# End Source File
# Begin Source File
SOURCE=.\zend_errors.h
# End Source File
# Begin Source File
SOURCE=.\zend_execute.h
# End Source File
# Begin Source File
SOURCE=.\zend_execute_locks.h
# End Source File
# Begin Source File
SOURCE=.\zend_extensions.h
# End Source File
# Begin Source File
SOURCE=.\zend_fast_cache.h
# End Source File
# Begin Source File
SOURCE=.\zend_globals.h
# End Source File
# Begin Source File
SOURCE=.\zend_globals_macros.h
# End Source File
# Begin Source File
SOURCE=.\zend_hash.h
# End Source File
# Begin Source File
SOURCE=.\zend_highlight.h
# End Source File
# Begin Source File
SOURCE=.\zend_indent.h
# End Source File
# Begin Source File
SOURCE=.\zend_list.h
# End Source File
# Begin Source File
SOURCE=.\zend_llist.h
# End Source File
# Begin Source File
SOURCE=.\zend_operators.h
# End Source File
# Begin Source File
SOURCE=.\zend_ptr_stack.h
# End Source File
# Begin Source File
SOURCE=.\zend_stack.h
# End Source File
# Begin Source File
SOURCE=.\zend_variables.h
# End Source File
# End Group
# Begin Group "Parsers"
# PROP Default_Filter "y"
# Begin Source File
SOURCE=".\zend-parser.y"
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
# Begin Custom Build
InputDir=.
InputPath=".\zend-parser.y"
BuildCmds= \
if not "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p zend zend-parser.y \
if "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p zend zend-parser.y \
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
# Begin Custom Build
InputDir=.
InputPath=".\zend-parser.y"
BuildCmds= \
if not "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p zend zend-parser.y \
if "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p zend zend-parser.y \
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TS_inline"
# Begin Custom Build
InputDir=.
InputPath=".\zend-parser.y"
BuildCmds= \
if not "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p zend zend-parser.y \
if "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p zend zend-parser.y \
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ENDIF
# End Source File
# End Group
# Begin Group "Scanners"
# PROP Default_Filter "l"
# Begin Source File
SOURCE=".\zend-scanner.l"
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
# Begin Custom Build
InputPath=".\zend-scanner.l"
"zend-scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -+ -i -Sflex.skl -Pzend -ozend-scanner.cpp zend-scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
# Begin Custom Build
InputPath=".\zend-scanner.l"
"zend-scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -+ -B -i -Sflex.skl -Pzend -ozend-scanner.cpp zend-scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TS_inline"
# Begin Custom Build
InputPath=".\zend-scanner.l"
"zend-scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -+ -i -Sflex.skl -Pzend -ozend-scanner.cpp zend-scanner.l
# End Custom Build
!ENDIF
# End Source File
# End Group
# Begin Group "Text Files"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\LICENSE
# End Source File
# Begin Source File
SOURCE=.\ZEND_BUGS
# End Source File
# Begin Source File
SOURCE=.\ZEND_CHANGES
# End Source File
# End Group
# Begin Group "Resources"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\zend.ico
# End Source File
# End Group
# End Target
# End Project
-72
View File
@@ -1,72 +0,0 @@
#define ZEND_API
#define ZEND_DLEXPORT
@TOP@
/* these are defined by automake */
#undef PACKAGE
#undef VERSION
#undef uint
#undef ulong
/* Define if you want to enable memory limit support */
#define MEMORY_LIMIT 0
@BOTTOM@
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_STRING_H
# include <string.h>
#else
# include <strings.h>
#endif
#if ZEND_BROKEN_SPRINTF
int zend_sprintf(char *buffer, const char *format, ...);
#else
# define zend_sprintf sprintf
#endif
#include <math.h>
#ifdef HAVE_ISNAN
#define zend_isnan(a) isnan(a)
#elif defined(NAN)
#define zend_isnan(a) (((a)==NAN)?1:0)
#else
#define zend_isnan(a) 0
#endif
#ifdef HAVE_ISINF
#define zend_isinf(a) isinf(a)
#elif defined(INFINITY)
/* Might not work, but is required by ISO C99 */
#define zend_isinf(a) (((a)==INFINITY)?1:0)
#else
#define zend_isinf(a) 0
#endif
#ifdef HAVE_FINITE
#define zend_finite(a) finite(a)
#elif defined(HAVE_ISFINITE) || defined(isfinite)
#define zend_finite(a) isfinite(a)
#elif defined(fpclassify)
#define zend_finite(a) ((fpclassify((a))!=FP_INFINITE&&fpclassify((a))!=FP_NAN)?1:0)
#else
#define zend_finite(a) (zend_isnan(a) ? 0 : zend_isinf(a) ? 0 : 1)
#endif
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
-47
View File
@@ -1,47 +0,0 @@
dnl $Id$
dnl
dnl This file contains local autoconf functions.
AC_DEFUN(ZEND_FP_EXCEPT,[
AC_CACHE_CHECK(whether fp_except is defined, ac_cv_type_fp_except,[
AC_TRY_COMPILE([
#include <floatingpoint.h>
],[
fp_except x = (fp_except) 0;
],[
ac_cv_type_fp_except=yes
],[
ac_cv_type_fp_except=no
],[
ac_cv_type_fp_except=no
])])
if test "$ac_cv_type_fp_except" = "yes"; then
AC_DEFINE(HAVE_FP_EXCEPT, 1, [whether floatingpoint.h defines fp_except])
fi
])
dnl
dnl Check for broken sprintf()
dnl
AC_DEFUN(AC_ZEND_BROKEN_SPRINTF,[
AC_CACHE_CHECK(whether sprintf is broken, ac_cv_broken_sprintf,[
AC_TRY_RUN([main() {char buf[20];exit(sprintf(buf,"testing 123")!=11); }],[
ac_cv_broken_sprintf=no
],[
ac_cv_broken_sprintf=yes
],[
ac_cv_broken_sprintf=no
])
])
if test "$ac_cv_broken_sprintf" = "yes"; then
ac_result=1
else
ac_result=0
fi
AC_DEFINE_UNQUOTED(ZEND_BROKEN_SPRINTF, $ac_result, [Whether sprintf is broken])
])
AC_DEFUN(AM_SET_LIBTOOL_VARIABLE,[
LIBTOOL='$(SHELL) $(top_builddir)/libtool $1'
])
-43
View File
@@ -1,43 +0,0 @@
# Makefile to generate build tools
#
# Standard usage:
# make -f build.mk
#
# Written by Sascha Schumann
#
# $Id$
LT_TARGETS = ltmain.sh ltconfig
config_h_in = zend_config.h.in
makefile_am_files = Makefile.am
makefile_in_files = $(makefile_am_files:.am=.in)
makefile_files = $(makefile_am_files:e.am=e)
targets = $(makefile_in_files) $(LT_TARGETS) configure $(config_h_in)
all: $(targets)
clean:
rm -f $(targets)
$(LT_TARGETS):
rm -f $(LT_TARGETS)
libtoolize --automake $(AMFLAGS) -f
$(makefile_in_files): $(makefile_am_files)
automake -a -i $(AMFLAGS) $(makefile_files)
aclocal.m4: configure.in acinclude.m4
aclocal
$(config_h_in): configure.in acconfig.h
# explicitly remove target since autoheader does not seem to work
# correctly otherwise (timestamps are not updated)
@rm -f $@
autoheader
configure: aclocal.m4 configure.in
autoconf
-33
View File
@@ -1,33 +0,0 @@
#!/bin/sh
case "$1" in
--copy)
automake_flags=--copy
shift
;;
esac
libtoolize --force --automake $automake_flags
mv aclocal.m4 aclocal.m4.old 2>/dev/null
aclocal
if cmp aclocal.m4.old aclocal.m4 > /dev/null 2>&1; then
echo "buildconf: keeping ${1}aclocal.m4"
mv aclocal.m4.old aclocal.m4
else
echo "buildconf: created or modified ${1}aclocal.m4"
fi
autoheader
automake --add-missing --include-deps $automake_flags
mv configure configure.old 2>/dev/null
autoconf
if cmp configure.old configure > /dev/null 2>&1; then
echo "buildconf: keeping ${1}configure"
mv configure.old configure
else
echo "buildconf: created or modified ${1}configure"
fi
-45
View File
@@ -1,45 +0,0 @@
dnl $Id$
dnl Process this file with autoconf to produce a configure script.
AC_INIT(zend.c)
AM_INIT_AUTOMAKE(zend, 0.80A)
AM_CONFIG_HEADER(zend_config.h)
AM_SANITY_CHECK
AM_MAINTAINER_MODE
AC_PROG_CC
AM_PROG_LEX
AM_PROG_CC_STDC
ZEND_VERSION=$VERSION
dnl We want this one before the checks, so the checks can modify CFLAGS.
test -z "$CFLAGS" && auto_cflags=1
sinclude(Zend.m4)
LIBZEND_BASIC_CHECKS
AM_PROG_LIBTOOL
if test "$enable_debug" != "yes"; then
AM_SET_LIBTOOL_VARIABLE([--silent])
fi
dnl
dnl Check for /usr/pkg/{lib,include} which is where NetBSD puts binary
dnl and source packages. This should be harmless on other OSs.
dnl
if test -d /usr/pkg/include -a -d /usr/pkg/lib ; then
CFLAGS="$CFLAGS -I/usr/pkg/include"
LDFLAGS="$LDFLAGS -L/usr/pkg/lib"
fi
LIBZEND_ENABLE_DEBUG
LIBZEND_OTHER_CHECKS
EXTRA_LIBS="$LIBS"
LIBS=""
AC_SUBST(EXTRA_LIBS)
AC_OUTPUT(Makefile)
# Local Variables:
# tab-width: 4
# End:
-1541
View File
File diff suppressed because it is too large. Load diff
-725
View File
@@ -1,725 +0,0 @@
%{
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
/*
* LALR shift/reduce conflicts and how they are resolved:
*
* - 2 shift/reduce conflicts due to the dangeling elseif/else ambiguity. Solved by shift.
* - 1 shift/reduce conflict due to arrays within encapsulated strings. Solved by shift.
* - 1 shift/reduce conflict due to objects within encapsulated strings. Solved by shift.
*
*/
#include "zend_compile.h"
#include "zend.h"
#include "zend_list.h"
#include "zend_globals.h"
#include "zend_API.h"
#define YYERROR_VERBOSE
#define YYSTYPE znode
#ifdef ZTS
# define YYPARSE_PARAM compiler_globals
# define YYLEX_PARAM compiler_globals
#endif
%}
%pure_parser
%expect 4
%left T_INCLUDE T_INCLUDE_ONCE T_EVAL T_REQUIRE T_REQUIRE_ONCE
%left ','
%left T_LOGICAL_OR
%left T_LOGICAL_XOR
%left T_LOGICAL_AND
%right T_PRINT
%left '=' T_PLUS_EQUAL T_MINUS_EQUAL T_MUL_EQUAL T_DIV_EQUAL T_CONCAT_EQUAL T_MOD_EQUAL T_AND_EQUAL T_OR_EQUAL T_XOR_EQUAL T_SL_EQUAL T_SR_EQUAL
%left '?' ':'
%left T_BOOLEAN_OR
%left T_BOOLEAN_AND
%left '|'
%left '^'
%left '&'
%nonassoc T_IS_EQUAL T_IS_NOT_EQUAL T_IS_IDENTICAL T_IS_NOT_IDENTICAL
%nonassoc '<' T_IS_SMALLER_OR_EQUAL '>' T_IS_GREATER_OR_EQUAL
%left T_SL T_SR
%left '+' '-' '.'
%left '*' '/' '%'
%right '!' '~' T_INC T_DEC T_INT_CAST T_DOUBLE_CAST T_STRING_CAST T_ARRAY_CAST T_OBJECT_CAST T_BOOL_CAST T_UNSET_CAST '@'
%right '['
%nonassoc T_NEW
%token T_EXIT
%token T_IF
%left T_ELSEIF
%left T_ELSE
%left T_ENDIF
%token T_LNUMBER
%token T_DNUMBER
%token T_STRING
%token T_STRING_VARNAME
%token T_VARIABLE
%token T_NUM_STRING
%token T_INLINE_HTML
%token T_CHARACTER
%token T_BAD_CHARACTER
%token T_ENCAPSED_AND_WHITESPACE
%token T_CONSTANT_ENCAPSED_STRING
%token T_ECHO
%token T_DO
%token T_WHILE
%token T_ENDWHILE
%token T_FOR
%token T_ENDFOR
%token T_FOREACH
%token T_ENDFOREACH
%token T_DECLARE
%token T_ENDDECLARE
%token T_AS
%token T_SWITCH
%token T_ENDSWITCH
%token T_CASE
%token T_DEFAULT
%token T_BREAK
%token T_CONTINUE
%token T_OLD_FUNCTION
%token T_FUNCTION
%token T_CONST
%token T_RETURN
%token T_USE
%token T_GLOBAL
%token T_STATIC
%token T_VAR
%token T_UNSET
%token T_ISSET
%token T_EMPTY
%token T_CLASS
%token T_EXTENDS
%token T_OBJECT_OPERATOR
%token T_DOUBLE_ARROW
%token T_LIST
%token T_ARRAY
%token T_LINE
%token T_FILE
%token T_COMMENT
%token T_ML_COMMENT
%token T_OPEN_TAG
%token T_OPEN_TAG_WITH_ECHO
%token T_CLOSE_TAG
%token T_WHITESPACE
%token T_START_HEREDOC
%token T_END_HEREDOC
%token T_DOLLAR_OPEN_CURLY_BRACES
%token T_CURLY_OPEN
%token T_PAAMAYIM_NEKUDOTAYIM
%% /* Rules */
start:
top_statement_list
;
top_statement_list:
top_statement_list { do_extended_info(CLS_C); } top_statement { HANDLE_INTERACTIVE(); }
| /* empty */
;
top_statement:
statement
| declaration_statement { do_early_binding(CLS_C); }
;
inner_statement_list:
inner_statement_list { do_extended_info(CLS_C); } inner_statement { HANDLE_INTERACTIVE(); }
| /* empty */
;
inner_statement:
statement
| declaration_statement
;
statement:
unticked_statement { do_ticks(CLS_C); }
;
unticked_statement:
'{' inner_statement_list '}'
| T_IF '(' expr ')' { do_if_cond(&$3, &$4 CLS_CC); } statement { do_if_after_statement(&$4, 1 CLS_CC); } elseif_list else_single { do_if_end(CLS_C); }
| T_IF '(' expr ')' ':' { do_if_cond(&$3, &$4 CLS_CC); } inner_statement_list { do_if_after_statement(&$4, 1 CLS_CC); } new_elseif_list new_else_single T_ENDIF ';' { do_if_end(CLS_C); }
| T_WHILE '(' { $1.u.opline_num = get_next_op_number(CG(active_op_array)); } expr ')' { do_while_cond(&$4, &$5 CLS_CC); } while_statement { do_while_end(&$1, &$5 CLS_CC); }
| T_DO { $1.u.opline_num = get_next_op_number(CG(active_op_array)); do_do_while_begin(CLS_C); } statement T_WHILE '(' { $5.u.opline_num = get_next_op_number(CG(active_op_array)); } expr ')' ';' { do_do_while_end(&$1, &$5, &$7 CLS_CC); }
| T_FOR
'('
for_expr
';' { do_free(&$3 CLS_CC); $4.u.opline_num = get_next_op_number(CG(active_op_array)); }
for_expr
';' { do_extended_info(CLS_C); do_for_cond(&$6, &$7 CLS_CC); }
for_expr
')' { do_free(&$9 CLS_CC); do_for_before_statement(&$4, &$7 CLS_CC); }
for_statement { do_for_end(&$7 CLS_CC); }
| T_SWITCH '(' expr ')' { do_switch_cond(&$3 CLS_CC); } switch_case_list { do_switch_end(&$6 CLS_CC); }
| T_BREAK ';' { do_brk_cont(ZEND_BRK, NULL CLS_CC); }
| T_BREAK expr ';' { do_brk_cont(ZEND_BRK, &$2 CLS_CC); }
| T_CONTINUE ';' { do_brk_cont(ZEND_CONT, NULL CLS_CC); }
| T_CONTINUE expr ';' { do_brk_cont(ZEND_CONT, &$2 CLS_CC); }
| T_RETURN ';' { do_return(NULL, 0 CLS_CC); }
| T_RETURN expr_without_variable ';' { do_return(&$2, 0 CLS_CC); }
| T_RETURN cvar ';' { do_return(&$2, 1 CLS_CC); }
| T_GLOBAL global_var_list ';'
| T_STATIC static_var_list ';'
| T_ECHO echo_expr_list ';'
| T_INLINE_HTML { do_echo(&$1 CLS_CC); }
| expr ';' { do_free(&$1 CLS_CC); }
| T_USE use_filename ';' { zend_error(E_COMPILE_ERROR,"use: Not yet supported. Please use include_once() or require_once()"); zval_dtor(&$2.u.constant); }
| T_UNSET '(' unset_variables ')' ';'
| T_FOREACH '(' w_cvar T_AS { do_foreach_begin(&$1, &$3, &$2, &$4, 1 CLS_CC); } w_cvar foreach_optional_arg ')' { do_foreach_cont(&$6, &$7, &$4 CLS_CC); } foreach_statement { do_foreach_end(&$1, &$2 CLS_CC); }
| T_FOREACH '(' expr_without_variable T_AS { do_foreach_begin(&$1, &$3, &$2, &$4, 0 CLS_CC); } w_cvar foreach_optional_arg ')' { do_foreach_cont(&$6, &$7, &$4 CLS_CC); } foreach_statement { do_foreach_end(&$1, &$2 CLS_CC); }
| T_DECLARE { do_declare_begin(CLS_C); } '(' declare_list ')' declare_statement { do_declare_end(CLS_C); }
| ';' /* empty statement */
;
unset_variables:
unset_variable
| unset_variables ',' unset_variable
;
unset_variable:
cvar { do_end_variable_parse(BP_VAR_UNSET, 0 CLS_CC); do_unset(&$1 CLS_CC); }
;
use_filename:
T_CONSTANT_ENCAPSED_STRING { $$ = $1; }
| '(' T_CONSTANT_ENCAPSED_STRING ')' { $$ = $2; }
;
declaration_statement:
unticked_declaration_statement { do_ticks(CLS_C); }
;
unticked_declaration_statement:
T_FUNCTION { $1.u.opline_num = CG(zend_lineno); } is_reference T_STRING { do_begin_function_declaration(&$1, &$4, 0, $3.op_type CLS_CC); }
'(' parameter_list ')' '{' inner_statement_list '}' { do_end_function_declaration(&$1 CLS_CC); }
| T_OLD_FUNCTION { $1.u.opline_num = CG(zend_lineno); } is_reference T_STRING { do_begin_function_declaration(&$1, &$4, 0, $3.op_type CLS_CC); }
parameter_list '(' inner_statement_list ')' ';' { do_end_function_declaration(&$1 CLS_CC); }
| T_CLASS T_STRING { do_begin_class_declaration(&$2, NULL CLS_CC); } '{' class_statement_list '}' { do_end_class_declaration(CLS_C); }
| T_CLASS T_STRING T_EXTENDS T_STRING { do_begin_class_declaration(&$2, &$4 CLS_CC); } '{' class_statement_list '}' { do_end_class_declaration(CLS_C); }
;
foreach_optional_arg:
/* empty */ { $$.op_type = IS_UNUSED; }
| T_DOUBLE_ARROW w_cvar { $$ = $2; }
;
for_statement:
statement
| ':' inner_statement_list T_ENDFOR ';'
;
foreach_statement:
statement
| ':' inner_statement_list T_ENDFOREACH ';'
;
declare_statement:
statement
| ':' inner_statement_list T_ENDDECLARE ';'
;
declare_list:
T_STRING '=' static_scalar { do_declare_stmt(&$1, &$3 CLS_CC); }
| declare_list ',' T_STRING '=' static_scalar { do_declare_stmt(&$3, &$5 CLS_CC); }
;
switch_case_list:
'{' case_list '}' { $$ = $2; }
| '{' ';' case_list '}' { $$ = $3; }
| ':' case_list T_ENDSWITCH ';' { $$ = $2; }
| ':' ';' case_list T_ENDSWITCH ';' { $$ = $3; }
;
case_list:
/* empty */ { $$.op_type = IS_UNUSED; }
| case_list T_CASE expr case_separator { do_extended_info(CLS_C); do_case_before_statement(&$1, &$2, &$3 CLS_CC); } inner_statement_list { do_case_after_statement(&$$, &$2 CLS_CC); $$.op_type = IS_CONST }
| case_list T_DEFAULT case_separator { do_extended_info(CLS_C); do_default_before_statement(&$1, &$2 CLS_CC); } inner_statement_list { do_case_after_statement(&$$, &$2 CLS_CC); $$.op_type = IS_CONST; }
;
case_separator:
':'
| ';'
;
while_statement:
statement
| ':' inner_statement_list T_ENDWHILE ';'
;
elseif_list:
/* empty */
| elseif_list T_ELSEIF '(' expr ')' { do_if_cond(&$4, &$5 CLS_CC); } statement { do_if_after_statement(&$5, 0 CLS_CC); }
;
new_elseif_list:
/* empty */
| new_elseif_list T_ELSEIF '(' expr ')' ':' { do_if_cond(&$4, &$5 CLS_CC); } inner_statement_list { do_if_after_statement(&$5, 0 CLS_CC); }
;
else_single:
/* empty */
| T_ELSE statement
;
new_else_single:
/* empty */
| T_ELSE ':' inner_statement_list
;
parameter_list:
non_empty_parameter_list
| /* empty */
;
non_empty_parameter_list:
T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$1, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; INIT_PZVAL(&$$.u.constant); do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
| '&' T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$2, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; INIT_PZVAL(&$$.u.constant); do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_FORCE CLS_CC); }
| T_CONST T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$2, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; INIT_PZVAL(&$$.u.constant); do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
| T_VARIABLE '=' static_scalar { znode tmp; fetch_simple_variable(&tmp, &$1, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; INIT_PZVAL(&$$.u.constant); do_receive_arg(ZEND_RECV_INIT, &tmp, &$$, &$3, BYREF_NONE CLS_CC); }
| non_empty_parameter_list ',' T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$3, 0 CLS_CC); $$=$1; $$.u.constant.value.lval++; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
| non_empty_parameter_list ',' '&' T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$4, 0 CLS_CC); $$=$1; $$.u.constant.value.lval++; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_FORCE CLS_CC); }
| non_empty_parameter_list ',' T_CONST T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$4, 0 CLS_CC); $$=$1; $$.u.constant.value.lval++; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
| non_empty_parameter_list ',' T_VARIABLE '=' static_scalar { znode tmp; fetch_simple_variable(&tmp, &$3, 0 CLS_CC); $$=$1; $$.u.constant.value.lval++; do_receive_arg(ZEND_RECV_INIT, &tmp, &$$, &$5, BYREF_NONE CLS_CC); }
;
function_call_parameter_list:
non_empty_function_call_parameter_list { $$ = $1; }
| /* empty */ { $$.u.constant.value.lval = 0; }
;
non_empty_function_call_parameter_list:
expr_without_variable { $$.u.constant.value.lval = 1; do_pass_param(&$1, ZEND_SEND_VAL, $$.u.constant.value.lval CLS_CC); }
| cvar { $$.u.constant.value.lval = 1; do_pass_param(&$1, ZEND_SEND_VAR, $$.u.constant.value.lval CLS_CC); }
| '&' w_cvar { $$.u.constant.value.lval = 1; do_pass_param(&$2, ZEND_SEND_REF, $$.u.constant.value.lval CLS_CC); }
| non_empty_function_call_parameter_list ',' expr_without_variable { $$.u.constant.value.lval=$1.u.constant.value.lval+1; do_pass_param(&$3, ZEND_SEND_VAL, $$.u.constant.value.lval CLS_CC); }
| non_empty_function_call_parameter_list ',' cvar { $$.u.constant.value.lval=$1.u.constant.value.lval+1; do_pass_param(&$3, ZEND_SEND_VAR, $$.u.constant.value.lval CLS_CC); }
| non_empty_function_call_parameter_list ',' '&' w_cvar { $$.u.constant.value.lval=$1.u.constant.value.lval+1; do_pass_param(&$4, ZEND_SEND_REF, $$.u.constant.value.lval CLS_CC); }
;
global_var_list:
global_var_list ',' global_var { do_fetch_global_or_static_variable(&$3, NULL, ZEND_FETCH_GLOBAL CLS_CC); }
| global_var { do_fetch_global_or_static_variable(&$1, NULL, ZEND_FETCH_GLOBAL CLS_CC); }
;
global_var:
T_VARIABLE { $$ = $1; }
| '$' r_cvar { $$ = $2; }
| '$' '{' expr '}' { $$ = $3; }
;
static_var_list:
static_var_list ',' T_VARIABLE { do_fetch_global_or_static_variable(&$3, NULL, ZEND_FETCH_STATIC CLS_CC); }
| static_var_list ',' T_VARIABLE '=' static_scalar { do_fetch_global_or_static_variable(&$3, &$5, ZEND_FETCH_STATIC CLS_CC); }
| T_VARIABLE { do_fetch_global_or_static_variable(&$1, NULL, ZEND_FETCH_STATIC CLS_CC); }
| T_VARIABLE '=' static_scalar { do_fetch_global_or_static_variable(&$1, &$3, ZEND_FETCH_STATIC CLS_CC); }
;
class_statement_list:
class_statement_list class_statement
| /* empty */
;
class_statement:
T_VAR class_variable_decleration ';'
| T_FUNCTION { $1.u.opline_num = CG(zend_lineno); } is_reference T_STRING { do_begin_function_declaration(&$1, &$4, 1, $3.op_type CLS_CC); } '('
parameter_list ')' '{' inner_statement_list '}' { do_end_function_declaration(&$1 CLS_CC); }
| T_OLD_FUNCTION { $1.u.opline_num = CG(zend_lineno); } is_reference T_STRING { do_begin_function_declaration(&$1, &$4, 1, $3.op_type CLS_CC); }
parameter_list '(' inner_statement_list ')' ';' { do_end_function_declaration(&$1 CLS_CC); }
;
is_reference:
/* empty */ { $$.op_type = ZEND_RETURN_VAL; }
| '&' { $$.op_type = ZEND_RETURN_REF; }
class_variable_decleration:
class_variable_decleration ',' T_VARIABLE { do_declare_property(&$3, NULL CLS_CC); }
| class_variable_decleration ',' T_VARIABLE '=' static_scalar { do_declare_property(&$3, &$5 CLS_CC); }
| T_VARIABLE { do_declare_property(&$1, NULL CLS_CC); }
| T_VARIABLE '=' static_scalar { do_declare_property(&$1, &$3 CLS_CC); }
;
echo_expr_list:
| echo_expr_list ',' expr { do_echo(&$3 CLS_CC); }
| expr { do_echo(&$1 CLS_CC); }
;
for_expr:
/* empty */ { $$.op_type = IS_CONST; $$.u.constant.type = IS_BOOL; $$.u.constant.value.lval = 1; }
| non_empty_for_expr { $$ = $1; }
;
non_empty_for_expr:
non_empty_for_expr ',' { do_free(&$1 CLS_CC); } expr { $$ = $4; }
| expr { $$ = $1; }
;
expr_without_variable:
T_LIST '(' { do_list_init(CLS_C); } assignment_list ')' '=' expr { do_list_end(&$$, &$7 CLS_CC); }
| cvar '=' expr { do_end_variable_parse(BP_VAR_W, 0 CLS_CC); do_assign(&$$, &$1, &$3 CLS_CC); }
| cvar '=' '&' w_cvar { do_end_variable_parse(BP_VAR_W, 0 CLS_CC); do_assign_ref(&$$, &$1, &$4 CLS_CC); }
| cvar '=' '&' function_call { do_end_variable_parse(BP_VAR_W, 0 CLS_CC); do_assign_ref(&$$, &$1, &$4 CLS_CC); }
| T_NEW class_name { do_extended_fcall_begin(CLS_C); do_begin_new_object(&$1, &$2 CLS_CC); } ctor_arguments { do_end_new_object(&$$, &$2, &$1, &$4 CLS_CC); do_extended_fcall_end(CLS_C);}
| cvar T_PLUS_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_ADD, &$$, &$1, &$3 CLS_CC); }
| cvar T_MINUS_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_SUB, &$$, &$1, &$3 CLS_CC); }
| cvar T_MUL_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_MUL, &$$, &$1, &$3 CLS_CC); }
| cvar T_DIV_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_DIV, &$$, &$1, &$3 CLS_CC); }
| cvar T_CONCAT_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_CONCAT, &$$, &$1, &$3 CLS_CC); }
| cvar T_MOD_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_MOD, &$$, &$1, &$3 CLS_CC); }
| cvar T_AND_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_BW_AND, &$$, &$1, &$3 CLS_CC); }
| cvar T_OR_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_BW_OR, &$$, &$1, &$3 CLS_CC); }
| cvar T_XOR_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_BW_XOR, &$$, &$1, &$3 CLS_CC); }
| cvar T_SL_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_SL, &$$, &$1, &$3 CLS_CC); }
| cvar T_SR_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_SR, &$$, &$1, &$3 CLS_CC); }
| rw_cvar T_INC { do_post_incdec(&$$, &$1, ZEND_POST_INC CLS_CC); }
| T_INC rw_cvar { do_pre_incdec(&$$, &$2, ZEND_PRE_INC CLS_CC); }
| rw_cvar T_DEC { do_post_incdec(&$$, &$1, ZEND_POST_DEC CLS_CC); }
| T_DEC rw_cvar { do_pre_incdec(&$$, &$2, ZEND_PRE_DEC CLS_CC); }
| expr T_BOOLEAN_OR { do_boolean_or_begin(&$1, &$2 CLS_CC); } expr { do_boolean_or_end(&$$, &$1, &$4, &$2 CLS_CC); }
| expr T_BOOLEAN_AND { do_boolean_and_begin(&$1, &$2 CLS_CC); } expr { do_boolean_and_end(&$$, &$1, &$4, &$2 CLS_CC); }
| expr T_LOGICAL_OR { do_boolean_or_begin(&$1, &$2 CLS_CC); } expr { do_boolean_or_end(&$$, &$1, &$4, &$2 CLS_CC); }
| expr T_LOGICAL_AND { do_boolean_and_begin(&$1, &$2 CLS_CC); } expr { do_boolean_and_end(&$$, &$1, &$4, &$2 CLS_CC); }
| expr T_LOGICAL_XOR expr { do_binary_op(ZEND_BOOL_XOR, &$$, &$1, &$3 CLS_CC); }
| expr '|' expr { do_binary_op(ZEND_BW_OR, &$$, &$1, &$3 CLS_CC); }
| expr '&' expr { do_binary_op(ZEND_BW_AND, &$$, &$1, &$3 CLS_CC); }
| expr '^' expr { do_binary_op(ZEND_BW_XOR, &$$, &$1, &$3 CLS_CC); }
| expr '.' expr { do_binary_op(ZEND_CONCAT,&$$,&$1,&$3 CLS_CC); }
| expr '+' expr { do_binary_op(ZEND_ADD,&$$,&$1,&$3 CLS_CC); }
| expr '-' expr { do_binary_op(ZEND_SUB,&$$,&$1,&$3 CLS_CC); }
| expr '*' expr { do_binary_op(ZEND_MUL,&$$,&$1,&$3 CLS_CC); }
| expr '/' expr { do_binary_op(ZEND_DIV,&$$,&$1,&$3 CLS_CC); }
| expr '%' expr { do_binary_op(ZEND_MOD,&$$,&$1,&$3 CLS_CC); }
| expr T_SL expr { do_binary_op(ZEND_SL, &$$, &$1, &$3 CLS_CC); }
| expr T_SR expr { do_binary_op(ZEND_SR, &$$, &$1, &$3 CLS_CC); }
| '+' expr { $1.u.constant.value.lval=0; $1.u.constant.type=IS_LONG; $1.op_type = IS_CONST; INIT_PZVAL(&$1.u.constant); do_binary_op(ZEND_ADD, &$$, &$1, &$2 CLS_CC); }
| '-' expr { $1.u.constant.value.lval=0; $1.u.constant.type=IS_LONG; $1.op_type = IS_CONST; INIT_PZVAL(&$1.u.constant); do_binary_op(ZEND_SUB, &$$, &$1, &$2 CLS_CC); }
| '!' expr { do_unary_op(ZEND_BOOL_NOT, &$$, &$2 CLS_CC); }
| '~' expr { do_unary_op(ZEND_BW_NOT, &$$, &$2 CLS_CC); }
| expr T_IS_IDENTICAL expr { do_binary_op(ZEND_IS_IDENTICAL, &$$, &$1, &$3 CLS_CC); }
| expr T_IS_NOT_IDENTICAL expr { do_binary_op(ZEND_IS_NOT_IDENTICAL, &$$, &$1, &$3 CLS_CC); }
| expr T_IS_EQUAL expr { do_binary_op(ZEND_IS_EQUAL, &$$, &$1, &$3 CLS_CC); }
| expr T_IS_NOT_EQUAL expr { do_binary_op(ZEND_IS_NOT_EQUAL, &$$, &$1, &$3 CLS_CC); }
| expr '<' expr { do_binary_op(ZEND_IS_SMALLER, &$$, &$1, &$3 CLS_CC); }
| expr T_IS_SMALLER_OR_EQUAL expr { do_binary_op(ZEND_IS_SMALLER_OR_EQUAL, &$$, &$1, &$3 CLS_CC); }
| expr '>' expr { do_binary_op(ZEND_IS_SMALLER, &$$, &$3, &$1 CLS_CC); }
| expr T_IS_GREATER_OR_EQUAL expr { do_binary_op(ZEND_IS_SMALLER_OR_EQUAL, &$$, &$3, &$1 CLS_CC); }
| '(' expr ')' { $$ = $2; }
| expr '?' { do_begin_qm_op(&$1, &$2 CLS_CC); }
expr ':' { do_qm_true(&$4, &$2, &$5 CLS_CC); }
expr { do_qm_false(&$$, &$7, &$2, &$5 CLS_CC); }
| function_call { $$ = $1; }
| internal_functions_in_yacc { $$ = $1; }
| T_INT_CAST expr { do_cast(&$$, &$2, IS_LONG CLS_CC); }
| T_DOUBLE_CAST expr { do_cast(&$$, &$2, IS_DOUBLE CLS_CC); }
| T_STRING_CAST expr { do_cast(&$$, &$2, IS_STRING CLS_CC); }
| T_ARRAY_CAST expr { do_cast(&$$, &$2, IS_ARRAY CLS_CC); }
| T_OBJECT_CAST expr { do_cast(&$$, &$2, IS_OBJECT CLS_CC); }
| T_BOOL_CAST expr { do_cast(&$$, &$2, IS_BOOL CLS_CC); }
| T_UNSET_CAST expr { do_cast(&$$, &$2, IS_NULL CLS_CC); }
| T_EXIT exit_expr { do_exit(&$$, &$2 CLS_CC); }
| '@' { do_begin_silence(&$1 CLS_CC); } expr { do_end_silence(&$1 CLS_CC); $$ = $3; }
| scalar { $$ = $1; }
| T_ARRAY '(' array_pair_list ')' { $$ = $3; }
| '`' encaps_list '`' { do_shell_exec(&$$, &$2 CLS_CC); }
| T_PRINT expr { do_print(&$$, &$2 CLS_CC); }
;
function_call:
T_STRING '(' { $2.u.opline_num = do_begin_function_call(&$1 CLS_CC); }
function_call_parameter_list
')' { do_end_function_call(&$1, &$$, &$4, 0, $2.u.opline_num CLS_CC); do_extended_fcall_end(CLS_C); }
| cvar '(' { do_begin_dynamic_function_call(&$1 CLS_CC); }
function_call_parameter_list
')' { do_end_function_call(&$1, &$$, &$4, 0, 1 CLS_CC); do_extended_fcall_end(CLS_C);}
| T_STRING T_PAAMAYIM_NEKUDOTAYIM T_STRING '(' { do_extended_fcall_begin(CLS_C); do_begin_class_member_function_call(&$1, &$3 CLS_CC); }
function_call_parameter_list
')' { do_end_function_call(&$3, &$$, &$6, 1, 1 CLS_CC); do_extended_fcall_end(CLS_C);}
;
exit_expr:
/* empty */ { memset(&$$, 0, sizeof(znode)); $$.op_type = IS_UNUSED; }
| '(' ')' { memset(&$$, 0, sizeof(znode)); $$.op_type = IS_UNUSED; }
| '(' expr ')' { $$ = $2; }
;
ctor_arguments:
/* empty */ { $$.u.constant.value.lval=0; }
| '(' function_call_parameter_list ')' { $$ = $2; }
;
class_name:
T_STRING { $$ = $1; }
| r_cvar { $$ = $1; }
;
common_scalar:
T_LNUMBER { $$ = $1; }
| T_DNUMBER { $$ = $1; }
| T_CONSTANT_ENCAPSED_STRING { $$ = $1; }
| T_LINE { $$ = $1; }
| T_FILE { $$ = $1; }
;
static_scalar: /* compile-time evaluated scalars */
common_scalar { $$ = $1; }
| T_STRING { do_fetch_constant(&$$, &$1, ZEND_CT CLS_CC); }
| '+' static_scalar { $$ = $1; }
| '-' static_scalar { zval minus_one; minus_one.type = IS_LONG; minus_one.value.lval = -1; mul_function(&$2.u.constant, &$2.u.constant, &minus_one); $$ = $2; }
| T_ARRAY '(' static_array_pair_list ')' { $$ = $3; $$.u.constant.type = IS_CONSTANT_ARRAY; }
;
scalar:
T_STRING { do_fetch_constant(&$$, &$1, ZEND_RT CLS_CC); }
| T_STRING_VARNAME { $$ = $1; }
| common_scalar { $$ = $1; }
| '"' encaps_list '"' { $$ = $2; }
| '\'' encaps_list '\'' { $$ = $2; }
| T_START_HEREDOC encaps_list T_END_HEREDOC { $$ = $2; do_end_heredoc(CLS_C); }
;
static_array_pair_list:
/* empty */ { $$.op_type = IS_CONST; INIT_PZVAL(&$$.u.constant); array_init(&$$.u.constant); }
| non_empty_static_array_pair_list possible_comma { $$ = $1; }
;
possible_comma:
/* empty */
| ','
;
non_empty_static_array_pair_list:
non_empty_static_array_pair_list ',' static_scalar T_DOUBLE_ARROW static_scalar { do_add_static_array_element(&$$, &$3, &$5); }
| non_empty_static_array_pair_list ',' static_scalar { do_add_static_array_element(&$$, NULL, &$3); }
| static_scalar T_DOUBLE_ARROW static_scalar { $$.op_type = IS_CONST; INIT_PZVAL(&$$.u.constant); array_init(&$$.u.constant); do_add_static_array_element(&$$, &$1, &$3); }
| static_scalar { $$.op_type = IS_CONST; INIT_PZVAL(&$$.u.constant); array_init(&$$.u.constant); do_add_static_array_element(&$$, NULL, &$1); }
;
expr:
r_cvar { $$ = $1; }
| expr_without_variable { $$ = $1; }
;
/*
w_expr:
w_cvar { $$ = $1; }
| expr_without_variable { $$ = $1; }
;
*/
r_cvar:
cvar { do_end_variable_parse(BP_VAR_R, 0 CLS_CC); $$ = $1; }
;
w_cvar:
cvar { do_end_variable_parse(BP_VAR_W, 0 CLS_CC); $$ = $1; }
;
rw_cvar:
cvar { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); $$ = $1; }
;
cvar:
cvar_without_objects { $$ = $1; }
| cvar_without_objects T_OBJECT_OPERATOR { do_push_object(&$1 CLS_CC); } ref_list { $$ = $4; }
;
cvar_without_objects:
reference_variable { $$ = $1; }
| simple_indirect_reference reference_variable { do_indirect_references(&$$, &$1, &$2 CLS_CC); }
;
reference_variable:
reference_variable '[' dim_offset ']' { fetch_array_dim(&$$, &$1, &$3 CLS_CC); }
| reference_variable '{' expr '}' { fetch_string_offset(&$$, &$1, &$3 CLS_CC); }
| compound_variable { do_fetch_globals(&$1 CLS_CC); do_begin_variable_parse(CLS_C); fetch_simple_variable(&$$, &$1, 1 CLS_CC); }
;
compound_variable:
T_VARIABLE { $$ = $1; }
| '$' '{' expr '}' { $$ = $3; }
;
dim_offset:
/* empty */ { $$.op_type = IS_UNUSED; }
| expr { $$ = $1; }
;
ref_list:
object_property { $$ = $1; }
| ref_list T_OBJECT_OPERATOR { do_push_object(&$1 CLS_CC); } object_property { $$ = $4; }
;
object_property:
object_dim_list { $$ = $1; }
| cvar_without_objects { do_end_variable_parse(BP_VAR_R, 0 CLS_CC); } { znode tmp_znode; do_pop_object(&tmp_znode CLS_CC); do_fetch_property(&$$, &tmp_znode, &$1 CLS_CC);}
;
object_dim_list:
object_dim_list '[' dim_offset ']' { fetch_array_dim(&$$, &$1, &$3 CLS_CC); }
| object_dim_list '{' expr '}' { fetch_string_offset(&$$, &$1, &$3 CLS_CC); }
| variable_name { znode tmp_znode; do_pop_object(&tmp_znode CLS_CC); do_fetch_property(&$$, &tmp_znode, &$1 CLS_CC);}
;
variable_name:
T_STRING { $$ = $1; }
| '{' expr '}' { $$ = $2; }
;
simple_indirect_reference:
'$' { $$.u.constant.value.lval = 1; }
| simple_indirect_reference '$' { $$.u.constant.value.lval++; }
;
assignment_list:
assignment_list ',' assignment_list_element
| assignment_list_element
;
assignment_list_element:
cvar { do_add_list_element(&$1 CLS_CC); }
| T_LIST '(' { do_new_list_begin(CLS_C); } assignment_list ')' { do_new_list_end(CLS_C); }
| /* empty */ { do_add_list_element(NULL CLS_CC); }
;
array_pair_list:
/* empty */ { do_init_array(&$$, NULL, NULL, 0 CLS_CC); }
| non_empty_array_pair_list possible_comma { $$ = $1; }
;
non_empty_array_pair_list:
non_empty_array_pair_list ',' expr T_DOUBLE_ARROW expr { do_add_array_element(&$$, &$5, &$3, 0 CLS_CC); }
| non_empty_array_pair_list ',' expr { do_add_array_element(&$$, &$3, NULL, 0 CLS_CC); }
| expr T_DOUBLE_ARROW expr { do_init_array(&$$, &$3, &$1, 0 CLS_CC); }
| expr { do_init_array(&$$, &$1, NULL, 0 CLS_CC); }
| non_empty_array_pair_list ',' expr T_DOUBLE_ARROW '&' w_cvar { do_add_array_element(&$$, &$6, &$3, 1 CLS_CC); }
| non_empty_array_pair_list ',' '&' w_cvar { do_add_array_element(&$$, &$4, NULL, 1 CLS_CC); }
| expr T_DOUBLE_ARROW '&' w_cvar { do_init_array(&$$, &$4, &$1, 1 CLS_CC); }
| '&' w_cvar { do_init_array(&$$, &$2, NULL, 1 CLS_CC); }
;
encaps_list:
encaps_list encaps_var { do_end_variable_parse(BP_VAR_R, 0 CLS_CC); do_add_variable(&$$, &$1, &$2 CLS_CC); }
| encaps_list T_STRING { do_add_string(&$$, &$1, &$2 CLS_CC); }
| encaps_list T_NUM_STRING { do_add_string(&$$, &$1, &$2 CLS_CC); }
| encaps_list T_ENCAPSED_AND_WHITESPACE { do_add_string(&$$, &$1, &$2 CLS_CC); }
| encaps_list T_CHARACTER { do_add_char(&$$, &$1, &$2 CLS_CC); }
| encaps_list T_BAD_CHARACTER { do_add_string(&$$, &$1, &$2 CLS_CC); }
| encaps_list '[' { $2.u.constant.value.lval = (long) '['; do_add_char(&$$, &$1, &$2 CLS_CC); }
| encaps_list ']' { $2.u.constant.value.lval = (long) ']'; do_add_char(&$$, &$1, &$2 CLS_CC); }
| encaps_list '{' { $2.u.constant.value.lval = (long) '{'; do_add_char(&$$, &$1, &$2 CLS_CC); }
| encaps_list '}' { $2.u.constant.value.lval = (long) '}'; do_add_char(&$$, &$1, &$2 CLS_CC); }
| encaps_list T_OBJECT_OPERATOR { znode tmp; $2.u.constant.value.lval = (long) '-'; do_add_char(&tmp, &$1, &$2 CLS_CC); $2.u.constant.value.lval = (long) '>'; do_add_char(&$$, &tmp, &$2 CLS_CC); }
| /* empty */ { do_init_string(&$$ CLS_CC); }
;
encaps_var:
T_VARIABLE { do_fetch_globals(&$1 CLS_CC); do_begin_variable_parse(CLS_C); fetch_simple_variable(&$$, &$1, 1 CLS_CC); }
| T_VARIABLE '[' { do_begin_variable_parse(CLS_C); } encaps_var_offset ']' { do_fetch_globals(&$1 CLS_CC); fetch_array_begin(&$$, &$1, &$4 CLS_CC); }
| T_VARIABLE T_OBJECT_OPERATOR T_STRING { do_begin_variable_parse(CLS_C); fetch_simple_variable(&$2, &$1, 1 CLS_CC); do_fetch_property(&$$, &$2, &$3 CLS_CC); }
| T_DOLLAR_OPEN_CURLY_BRACES expr '}' { do_begin_variable_parse(CLS_C); fetch_simple_variable(&$$, &$2, 1 CLS_CC); }
| T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '[' expr ']' '}' { do_begin_variable_parse(CLS_C); fetch_array_begin(&$$, &$2, &$4 CLS_CC); }
| T_CURLY_OPEN cvar '}' { $$ = $2; }
;
encaps_var_offset:
T_STRING { $$ = $1; }
| T_NUM_STRING { $$ = $1; }
| T_VARIABLE { fetch_simple_variable(&$$, &$1, 1 CLS_CC); }
;
internal_functions_in_yacc:
T_ISSET '(' cvar ')' { do_isset_or_isempty(ZEND_ISSET, &$$, &$3 CLS_CC); }
| T_EMPTY '(' cvar ')' { do_isset_or_isempty(ZEND_ISEMPTY, &$$, &$3 CLS_CC); }
| T_INCLUDE expr { do_include_or_eval(ZEND_INCLUDE, &$$, &$2 CLS_CC); }
| T_INCLUDE_ONCE expr { do_include_or_eval(ZEND_INCLUDE_ONCE, &$$, &$2 CLS_CC); }
| T_EVAL '(' expr ')' { do_include_or_eval(ZEND_EVAL, &$$, &$3 CLS_CC); }
| T_REQUIRE expr { do_include_or_eval(ZEND_REQUIRE, &$$, &$2 CLS_CC); }
| T_REQUIRE_ONCE use_filename { do_include_or_eval(ZEND_REQUIRE_ONCE, &$$, &$2 CLS_CC); }
;
%%
-56
View File
@@ -1,56 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_SCANNER_H
#define ZEND_SCANNER_H
#ifdef ZTS
class ZendFlexLexer : public yyFlexLexer
{
public:
virtual ~ZendFlexLexer();
int lex_scan(zval *zendlval CLS_DC);
void BeginState(int state);
};
#endif /* ZTS */
typedef struct _zend_lex_state {
#ifndef ZTS
YY_BUFFER_STATE buffer_state;
int state;
FILE *in;
#else
ZendFlexLexer *ZFL;
istream *input_file;
#endif
uint lineno;
char *filename;
} zend_lex_state;
void zend_fatal_scanner_error(char *);
inline void restore_lexical_state(zend_lex_state * CLS_DC);
BEGIN_EXTERN_C()
int zend_compare_file_handles(zend_file_handle *fh1, zend_file_handle *fh2);
END_EXTERN_C()
#endif
-1557
View File
File diff suppressed because it is too large. Load diff
-727
View File
@@ -1,727 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include "zend.h"
#include "zend_extensions.h"
#include "modules.h"
#include "zend_constants.h"
#include "zend_list.h"
#include "zend_API.h"
#include "zend_builtin_functions.h"
#ifdef ZTS
# define GLOBAL_FUNCTION_TABLE global_function_table
# define GLOBAL_CLASS_TABLE global_class_table
# define GLOBAL_CONSTANTS_TABLE global_constants_table
#else
# define GLOBAL_FUNCTION_TABLE CG(function_table)
# define GLOBAL_CLASS_TABLE CG(class_table)
# define GLOBAL_CONSTANTS_TABLE CG(zend_constants)
#endif
#if defined(ZEND_WIN32) && ZEND_DEBUG
BOOL WINAPI IsDebuggerPresent(VOID);
#endif
/* true multithread-shared globals */
ZEND_API zend_class_entry zend_standard_class_def;
ZEND_API int (*zend_printf)(const char *format, ...);
ZEND_API zend_write_func_t zend_write;
ZEND_API FILE *(*zend_fopen)(const char *filename, char **opened_path);
ZEND_API void (*zend_block_interruptions)(void);
ZEND_API void (*zend_unblock_interruptions)(void);
ZEND_API void (*zend_ticks_function)(int ticks);
ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
static void (*zend_message_dispatcher_p)(long message, void *data);
static int (*zend_get_ini_entry_p)(char *name, uint name_length, zval *contents);
#ifdef ZTS
ZEND_API int compiler_globals_id;
ZEND_API int executor_globals_id;
ZEND_API int alloc_globals_id;
HashTable *global_function_table;
HashTable *global_class_table;
HashTable *global_constants_table;
#endif
zend_utility_values zend_uv;
ZEND_API zval zval_used_for_init; /* True global variable */
/* version information */
static char *zend_version_info;
static uint zend_version_info_length;
#define ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998-2000 Zend Technologies\n"
#define PRINT_ZVAL_INDENT 4
static void print_hash(HashTable *ht, int indent)
{
zval **tmp;
char *string_key;
unsigned long num_key;
int i;
for (i=0; i<indent; i++) {
ZEND_PUTS(" ");
}
ZEND_PUTS("(\n");
indent += PRINT_ZVAL_INDENT;
zend_hash_internal_pointer_reset(ht);
while (zend_hash_get_current_data(ht, (void **) &tmp) == SUCCESS) {
for (i=0; i<indent; i++) {
ZEND_PUTS(" ");
}
ZEND_PUTS("[");
switch (zend_hash_get_current_key(ht, &string_key, &num_key)) {
case HASH_KEY_IS_STRING:
ZEND_PUTS(string_key);
efree(string_key);
break;
case HASH_KEY_IS_LONG:
zend_printf("%ld",num_key);
break;
}
ZEND_PUTS("] => ");
zend_print_zval_r(*tmp, indent+PRINT_ZVAL_INDENT);
ZEND_PUTS("\n");
zend_hash_move_forward(ht);
}
indent -= PRINT_ZVAL_INDENT;
for (i=0; i<indent; i++) {
ZEND_PUTS(" ");
}
ZEND_PUTS(")\n");
}
ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_copy)
{
if (expr->type==IS_STRING) {
*use_copy = 0;
return;
}
switch (expr->type) {
case IS_NULL:
expr_copy->value.str.len = 0;
expr_copy->value.str.val = empty_string;
break;
case IS_BOOL:
if (expr->value.lval) {
expr_copy->value.str.len = 1;
expr_copy->value.str.val = estrndup("1", 1);
} else {
expr_copy->value.str.len = 0;
expr_copy->value.str.val = empty_string;
}
break;
case IS_RESOURCE:
expr_copy->value.str.val = (char *) emalloc(sizeof("Resource id #")-1 + MAX_LENGTH_OF_LONG);
expr_copy->value.str.len = sprintf(expr_copy->value.str.val, "Resource id #%ld", expr->value.lval);
break;
case IS_ARRAY:
expr_copy->value.str.len = sizeof("Array")-1;
expr_copy->value.str.val = estrndup("Array", expr_copy->value.str.len);
break;
case IS_OBJECT: {
zval function_name;
ZVAL_STRING(&function_name,"__string_value",1);
if (call_user_function(NULL, expr, &function_name, expr_copy, 0, NULL)==FAILURE) {
expr_copy->value.str.len = sizeof("Object")-1;
expr_copy->value.str.val = estrndup("Object", expr_copy->value.str.len);
}
efree(function_name.value.str.val);
}
break;
default:
*expr_copy = *expr;
zval_copy_ctor(expr_copy);
convert_to_string(expr_copy);
break;
}
expr_copy->type = IS_STRING;
*use_copy = 1;
}
ZEND_API int zend_print_zval(zval *expr, int indent)
{
return zend_print_zval_ex(zend_write, expr, indent);
}
ZEND_API int zend_print_zval_ex(zend_write_func_t write_func, zval *expr, int indent)
{
zval expr_copy;
int use_copy;
zend_make_printable_zval(expr, &expr_copy, &use_copy);
if (use_copy) {
expr = &expr_copy;
}
if (expr->value.str.len==0) { /* optimize away empty strings */
if (use_copy) {
zval_dtor(expr);
}
return 0;
}
write_func(expr->value.str.val,expr->value.str.len);
if (use_copy) {
zval_dtor(expr);
}
return expr->value.str.len;
}
ZEND_API void zend_print_zval_r(zval *expr, int indent)
{
zend_print_zval_r_ex(zend_write, expr, indent);
}
ZEND_API void zend_print_zval_r_ex(zend_write_func_t write_func, zval *expr, int indent)
{
switch(expr->type) {
case IS_ARRAY:
ZEND_PUTS("Array\n");
print_hash(expr->value.ht,indent);
break;
case IS_OBJECT:
zend_printf("%s Object\n", expr->value.obj.ce->name);
print_hash(expr->value.obj.properties, indent);
break;
default:
zend_print_variable(expr);
break;
}
}
static FILE *zend_fopen_wrapper(const char *filename, char **opened_path)
{
if (opened_path) {
*opened_path = strdup(filename);
}
return fopen(filename, "rb");
}
static void register_standard_class(void)
{
zend_standard_class_def.type = ZEND_INTERNAL_CLASS;
zend_standard_class_def.name_length = sizeof("stdClass") - 1;
zend_standard_class_def.name = zend_strndup("stdClass", zend_standard_class_def.name_length);
zend_standard_class_def.parent = NULL;
zend_hash_init_ex(&zend_standard_class_def.default_properties, 0, NULL, ZVAL_PTR_DTOR, 1, 0);
zend_hash_init_ex(&zend_standard_class_def.function_table, 0, NULL, ZEND_FUNCTION_DTOR, 1, 0);
zend_standard_class_def.handle_function_call = NULL;
zend_standard_class_def.handle_property_get = NULL;
zend_standard_class_def.handle_property_set = NULL;
zend_standard_class_def.refcount = (int *) malloc(sizeof(int));
*zend_standard_class_def.refcount = 1;
zend_hash_add(GLOBAL_CLASS_TABLE, "stdclass", sizeof("stdclass"), &zend_standard_class_def, sizeof(zend_class_entry), NULL);
}
static void zend_set_default_compile_time_values(CLS_D)
{
/* default compile-time values */
CG(asp_tags) = 0;
CG(short_tags) = 1;
CG(allow_call_time_pass_reference) = 1;
CG(extended_info) = 0;
}
#ifdef ZTS
static void compiler_globals_ctor(zend_compiler_globals *compiler_globals)
{
zend_function tmp_func;
zend_class_entry tmp_class;
compiler_globals->compiled_filename = NULL;
compiler_globals->function_table = (HashTable *) malloc(sizeof(HashTable));
zend_hash_init_ex(compiler_globals->function_table, 100, NULL, ZEND_FUNCTION_DTOR, 1, 0);
zend_hash_copy(compiler_globals->function_table, global_function_table, NULL, &tmp_func, sizeof(zend_function));
compiler_globals->class_table = (HashTable *) malloc(sizeof(HashTable));
zend_hash_init_ex(compiler_globals->class_table, 10, NULL, ZEND_CLASS_DTOR, 1, 0);
zend_hash_copy(compiler_globals->class_table, global_class_table, (copy_ctor_func_t) zend_class_add_ref, &tmp_class, sizeof(zend_class_entry));
zend_set_default_compile_time_values(CLS_C);
}
static void compiler_globals_dtor(zend_compiler_globals *compiler_globals)
{
if (compiler_globals->function_table != global_function_table) {
zend_hash_destroy(compiler_globals->function_table);
free(compiler_globals->function_table);
}
if (compiler_globals->class_table != global_class_table) {
zend_hash_destroy(compiler_globals->class_table);
free(compiler_globals->class_table);
}
}
static void executor_globals_ctor(zend_executor_globals *executor_globals)
{
if (global_constants_table) {
zend_startup_constants(ELS_C);
zend_copy_constants(executor_globals->zend_constants, global_constants_table);
}
zend_init_rsrc_plist(ELS_C);
EG(lambda_count)=0;
}
static void executor_globals_dtor(zend_executor_globals *executor_globals)
{
zend_shutdown_constants(ELS_C);
zend_destroy_rsrc_plist(ELS_C);
}
static void alloc_globals_ctor(zend_alloc_globals *alloc_globals)
{
start_memory_manager(ALS_C);
}
#endif
#ifdef __FreeBSD__
/* FreeBSD floating point precision fix */
#include <floatingpoint.h>
#endif
int zend_startup(zend_utility_functions *utility_functions, char **extensions, int start_builtin_functions)
{
#ifdef ZTS
zend_compiler_globals *compiler_globals;
zend_executor_globals *executor_globals;
alloc_globals_id = ts_allocate_id(sizeof(zend_alloc_globals), (ts_allocate_ctor) alloc_globals_ctor, NULL);
#else
start_memory_manager(ALS_C);
#endif
#ifdef __FreeBSD__
{
/* FreeBSD floating point precision fix */
#ifdef HAVE_FP_EXCEPT
fp_except
#else
fp_except_t
#endif
mask;
mask = fpgetmask();
fpsetmask(mask & ~FP_X_IMP);
}
#endif
/* Set up utility functions and values */
zend_error_cb = utility_functions->error_function;
zend_printf = utility_functions->printf_function;
zend_write = (zend_write_func_t) utility_functions->write_function;
zend_fopen = utility_functions->fopen_function;
if (!zend_fopen) {
zend_fopen = zend_fopen_wrapper;
}
zend_message_dispatcher_p = utility_functions->message_handler;
zend_block_interruptions = utility_functions->block_interruptions;
zend_unblock_interruptions = utility_functions->unblock_interruptions;
zend_get_ini_entry_p = utility_functions->get_ini_entry;
zend_ticks_function = utility_functions->ticks_function;
zend_compile_file = compile_file;
zend_execute = execute;
zend_startup_extensions();
/* set up version */
zend_version_info = strdup(ZEND_CORE_VERSION_INFO);
zend_version_info_length = sizeof(ZEND_CORE_VERSION_INFO)-1;
GLOBAL_FUNCTION_TABLE = (HashTable *) malloc(sizeof(HashTable));
GLOBAL_CLASS_TABLE = (HashTable *) malloc(sizeof(HashTable));
zend_hash_init_ex(GLOBAL_FUNCTION_TABLE, 100, NULL, ZEND_FUNCTION_DTOR, 1, 0);
zend_hash_init_ex(GLOBAL_CLASS_TABLE, 10, NULL, ZEND_CLASS_DTOR, 1, 0);
register_standard_class();
zend_hash_init_ex(&module_registry, 50, NULL, ZEND_MODULE_DTOR, 1, 0);
zend_init_rsrc_list_dtors();
/* This zval can be used to initialize allocate zval's to an uninit'ed value */
zval_used_for_init.is_ref = 0;
zval_used_for_init.refcount = 1;
zval_used_for_init.type = IS_NULL;
#ifdef ZTS
global_constants_table = NULL;
compiler_globals_id = ts_allocate_id(sizeof(zend_compiler_globals), (void (*)(void *)) compiler_globals_ctor, (void (*)(void *)) compiler_globals_dtor);
executor_globals_id = ts_allocate_id(sizeof(zend_executor_globals), (void (*)(void *)) executor_globals_ctor, (void (*)(void *)) executor_globals_dtor);
compiler_globals = ts_resource(compiler_globals_id);
executor_globals = ts_resource(executor_globals_id);
compiler_globals_dtor(compiler_globals);
compiler_globals->function_table = GLOBAL_FUNCTION_TABLE;
compiler_globals->class_table = GLOBAL_CLASS_TABLE;
zend_startup_constants(executor_globals);
GLOBAL_CONSTANTS_TABLE = EG(zend_constants);
#else
zend_startup_constants();
zend_set_default_compile_time_values(CLS_C);
#endif
zend_register_standard_constants(ELS_C);
#ifndef ZTS
zend_init_rsrc_plist(ELS_C);
#endif
if (start_builtin_functions) {
zend_startup_builtin_functions();
}
return SUCCESS;
}
void zend_shutdown()
{
#ifdef ZEND_WIN32
zend_shutdown_timeout_thread();
#endif
#ifndef ZTS
zend_destroy_rsrc_plist();
#endif
zend_destroy_rsrc_list_dtors();
zend_hash_destroy(&module_registry);
zend_hash_destroy(GLOBAL_FUNCTION_TABLE);
free(GLOBAL_FUNCTION_TABLE);
zend_hash_destroy(GLOBAL_CLASS_TABLE);
free(GLOBAL_CLASS_TABLE);
zend_shutdown_extensions();
free(zend_version_info);
#ifndef ZTS
zend_shutdown_constants();
#endif
}
void zend_set_utility_values(zend_utility_values *utility_values)
{
zend_uv = *utility_values;
zend_uv.import_use_extension_length = strlen(zend_uv.import_use_extension);
}
/* this should be compatible with the standard zenderror */
void zenderror(char *error)
{
zend_error(E_PARSE, error);
}
BEGIN_EXTERN_C()
ZEND_API void zend_bailout()
{
CLS_FETCH();
ELS_FETCH();
CG(unclean_shutdown) = 1;
longjmp(EG(bailout), FAILURE);
}
END_EXTERN_C()
void zend_append_version_info(zend_extension *extension)
{
char *new_info;
uint new_info_length;
new_info_length = sizeof(" with v, by \n")
+ strlen(extension->name)
+ strlen(extension->version)
+ strlen(extension->copyright)
+ strlen(extension->author);
new_info = (char *) malloc(new_info_length+1);
sprintf(new_info, " with %s v%s, %s, by %s\n", extension->name, extension->version, extension->copyright, extension->author);
zend_version_info = (char *) realloc(zend_version_info, zend_version_info_length+new_info_length+1);
strcat(zend_version_info, new_info);
zend_version_info_length += new_info_length;
free(new_info);
}
ZEND_API char *get_zend_version()
{
return zend_version_info;
}
void zend_activate(CLS_D ELS_DC)
{
init_compiler(CLS_C ELS_CC);
init_executor(CLS_C ELS_CC);
startup_scanner(CLS_C);
}
void zend_activate_modules()
{
zend_hash_apply(&module_registry, (int (*)(void *)) module_registry_request_startup);
}
void zend_deactivate_modules()
{
ELS_FETCH();
EG(opline_ptr) = NULL; /* we're no longer executing anything */
zend_hash_apply(&module_registry, (int (*)(void *)) module_registry_cleanup);
}
void zend_deactivate(CLS_D ELS_DC)
{
/* we're no longer executing anything */
EG(opline_ptr) = NULL;
EG(active_symbol_table) = NULL;
shutdown_scanner(CLS_C);
shutdown_executor(ELS_C);
shutdown_compiler(CLS_C);
}
BEGIN_EXTERN_C()
ZEND_API void zend_message_dispatcher(long message, void *data)
{
if (zend_message_dispatcher_p) {
zend_message_dispatcher_p(message, data);
}
}
END_EXTERN_C()
ZEND_API int zend_get_ini_entry(char *name, uint name_length, zval *contents)
{
if (zend_get_ini_entry_p) {
return zend_get_ini_entry_p(name, name_length, contents);
} else {
return FAILURE;
}
}
#define ZEND_ERROR_BUFFER_SIZE 1024
ZEND_API void zend_error(int type, const char *format, ...)
{
va_list args;
zval ***params;
zval *retval;
zval *z_error_type, *z_error_message, *z_error_filename, *z_error_lineno, *z_context;
char *error_filename;
uint error_lineno;
zval *orig_user_error_handler;
ELS_FETCH();
CLS_FETCH();
/* Obtain relevant filename and lineno */
switch (type) {
case E_CORE_ERROR:
case E_CORE_WARNING:
error_filename = NULL;
error_lineno = 0;
break;
case E_PARSE:
case E_COMPILE_ERROR:
case E_COMPILE_WARNING:
case E_ERROR:
case E_NOTICE:
case E_WARNING:
case E_USER_ERROR:
case E_USER_WARNING:
case E_USER_NOTICE:
if (zend_is_compiling()) {
error_filename = zend_get_compiled_filename(CLS_C);
error_lineno = zend_get_compiled_lineno(CLS_C);
} else if (zend_is_executing()) {
error_filename = zend_get_executed_filename(ELS_C);
error_lineno = zend_get_executed_lineno(ELS_C);
} else {
error_filename = NULL;
error_lineno = 0;
}
break;
default:
error_filename = NULL;
error_lineno = 0;
break;
}
if (!error_filename) {
error_filename = "Unknown";
}
va_start(args, format);
/* if we don't have a user defined error handler */
if (!EG(user_error_handler)) {
zend_error_cb(type, error_filename, error_lineno, format, args);
} else switch (type) {
case E_ERROR:
case E_PARSE:
case E_CORE_ERROR:
case E_CORE_WARNING:
case E_COMPILE_ERROR:
case E_COMPILE_WARNING:
/* The error may not be safe to handle in user-space */
zend_error_cb(type, error_filename, error_lineno, format, args);
break;
default:
/* Handle the error in user space */
ALLOC_INIT_ZVAL(z_error_message);
ALLOC_INIT_ZVAL(z_error_type);
ALLOC_INIT_ZVAL(z_error_filename);
ALLOC_INIT_ZVAL(z_error_lineno);
ALLOC_INIT_ZVAL(z_context);
z_error_message->value.str.val = (char *) emalloc(ZEND_ERROR_BUFFER_SIZE);
#ifdef HAVE_VSNPRINTF
z_error_message->value.str.len = vsnprintf(z_error_message->value.str.val, ZEND_ERROR_BUFFER_SIZE, format, args);
#else
/* This is risky... */
z_error_message->value.str.len = vsprintf(z_error_message->value.str.val, format, args);
#endif
z_error_message->type = IS_STRING;
z_error_type->value.lval = type;
z_error_type->type = IS_LONG;
if (error_filename) {
z_error_filename->value.str.len = strlen(error_filename);
z_error_filename->value.str.val = estrndup(error_filename, z_error_filename->value.str.len);
z_error_filename->type = IS_STRING;
}
z_error_lineno->value.lval = error_lineno;
z_error_lineno->type = IS_LONG;
z_context->value.ht = EG(active_symbol_table);
z_context->type = IS_ARRAY;
ZVAL_ADDREF(z_context); /* we don't want this one to be freed */
params = (zval ***) emalloc(sizeof(zval **)*5);
params[0] = &z_error_type;
params[1] = &z_error_message;
params[2] = &z_error_filename;
params[3] = &z_error_lineno;
params[4] = &z_context;
orig_user_error_handler = EG(user_error_handler);
EG(user_error_handler) = NULL;
if (call_user_function_ex(CG(function_table), NULL, orig_user_error_handler, &retval, 5, params, 1, NULL)==SUCCESS) {
zval_ptr_dtor(&retval);
} else {
/* The user error handler failed, use built-in error handler */
zend_error_cb(type, error_filename, error_lineno, format, args);
}
EG(user_error_handler) = orig_user_error_handler;
efree(params);
zval_ptr_dtor(&z_error_message);
zval_ptr_dtor(&z_error_type);
zval_ptr_dtor(&z_error_filename);
zval_ptr_dtor(&z_error_lineno);
if (ZVAL_REFCOUNT(z_context)==2) {
FREE_ZVAL(z_context);
}
break;
}
va_end(args);
}
ZEND_API void zend_output_debug_string(zend_bool trigger_break, char *format, ...)
{
#if ZEND_DEBUG
va_list args;
va_start(args, format);
# ifdef ZEND_WIN32
{
char output_buf[1024];
vsnprintf(output_buf, 1024, format, args);
OutputDebugString(output_buf);
OutputDebugString("\n");
if (trigger_break && IsDebuggerPresent()) {
DebugBreak();
}
}
# else
vfprintf(stderr, format, args);
fprintf(stderr, "\n");
# endif
va_end(args);
#endif
}
ZEND_API int zend_execute_scripts(int type CLS_DC ELS_DC, int file_count, ...)
{
va_list files;
int i;
zend_file_handle *file_handle;
va_start(files, file_count);
for (i=0; i<file_count; i++) {
file_handle = va_arg(files, zend_file_handle *);
if (!file_handle) {
continue;
}
EG(active_op_array) = zend_compile_file(file_handle, ZEND_INCLUDE CLS_CC);
zend_destroy_file_handle(file_handle CLS_CC);
if (EG(active_op_array)) {
zend_execute(EG(active_op_array) ELS_CC);
zval_ptr_dtor(EG(return_value_ptr_ptr));
EG(return_value_ptr_ptr) = &EG(global_return_value_ptr);
EG(global_return_value_ptr) = NULL;
destroy_op_array(EG(active_op_array));
efree(EG(active_op_array));
} else if (type==ZEND_REQUIRE) {
va_end(files);
return FAILURE;
}
}
va_end(files);
return SUCCESS;
}
-444
View File
@@ -1,444 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_H
#define ZEND_H
#define ZEND_VERSION "1.0.2"
#ifdef __cplusplus
#define BEGIN_EXTERN_C() extern "C" {
#define END_EXTERN_C() }
#else
#define BEGIN_EXTERN_C()
#define END_EXTERN_C()
#endif
#include <stdio.h>
/*
* general definitions
*/
#ifdef ZEND_WIN32
# include "zend_config.w32.h"
#else
# include "zend_config.h"
#endif
/* all HAVE_XXX test have to be after the include of zend_config above */
#ifdef HAVE_UNIX_H
# include <unix.h>
#endif
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#endif
#ifdef HAVE_DLFCN_H
# include <dlfcn.h>
#endif
#if defined(HAVE_LIBDL)
# ifndef RTLD_LAZY
# define RTLD_LAZY 1 /* Solaris 1, FreeBSD's (2.1.7.1 and older) */
# endif
# ifndef RTLD_GLOBAL
# define RTLD_GLOBAL 0
# endif
# define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL)
# define DL_UNLOAD dlclose
# define DL_FETCH_SYMBOL dlsym
# define DL_HANDLE void *
# define ZEND_EXTENSIONS_SUPPORT 1
#elif defined(ZEND_WIN32)
# define DL_LOAD(libname) LoadLibrary(libname)
# define DL_FETCH_SYMBOL GetProcAddress
# define DL_UNLOAD FreeLibrary
# define DL_HANDLE HMODULE
# define ZEND_EXTENSIONS_SUPPORT 1
#else
# define DL_HANDLE void *
# define ZEND_EXTENSIONS_SUPPORT 0
#endif
#if HAVE_ALLOCA_H
# include <alloca.h>
#endif
#if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2)) && !(defined(ZTS) && defined(ZEND_WIN32))
# define do_alloca(p) alloca(p)
# define free_alloca(p)
#else
# define do_alloca(p) emalloc(p)
# define free_alloca(p) efree(p)
#endif
#if ZEND_DEBUG
#define ZEND_FILE_LINE_D char *__zend_filename, uint __zend_lineno
#define ZEND_FILE_LINE_DC , ZEND_FILE_LINE_D
#define ZEND_FILE_LINE_ORIG_D char *__zend_orig_filename, uint __zend_orig_lineno
#define ZEND_FILE_LINE_ORIG_DC , ZEND_FILE_LINE_ORIG_D
#define ZEND_FILE_LINE_RELAY_C __zend_filename, __zend_lineno
#define ZEND_FILE_LINE_RELAY_CC , ZEND_FILE_LINE_RELAY_C
#define ZEND_FILE_LINE_C __FILE__, __LINE__
#define ZEND_FILE_LINE_CC , ZEND_FILE_LINE_C
#define ZEND_FILE_LINE_EMPTY_C NULL, 0
#define ZEND_FILE_LINE_EMPTY_CC , ZEND_FILE_LINE_EMPTY_C
#define ZEND_FILE_LINE_ORIG_RELAY_C __zend_orig_filename, __zend_orig_lineno
#define ZEND_FILE_LINE_ORIG_RELAY_CC , ZEND_FILE_LINE_ORIG_RELAY_C
#else
#define ZEND_FILE_LINE_D
#define ZEND_FILE_LINE_DC
#define ZEND_FILE_LINE_ORIG_D
#define ZEND_FILE_LINE_ORIG_DC
#define ZEND_FILE_LINE_RELAY_C
#define ZEND_FILE_LINE_RELAY_CC
#define ZEND_FILE_LINE_C
#define ZEND_FILE_LINE_CC
#define ZEND_FILE_LINE_EMPTY_C
#define ZEND_FILE_LINE_EMPTY_CC
#define ZEND_FILE_LINE_ORIG_RELAY_C
#define ZEND_FILE_LINE_ORIG_RELAY_CC
#endif /* ZEND_DEBUG */
#ifdef ZTS
#define ZTS_V 1
#else
#define ZTS_V 0
#endif
#include "zend_errors.h"
#include "zend_alloc.h"
typedef unsigned char zend_bool;
typedef unsigned char zend_uchar;
typedef unsigned int zend_uint;
typedef unsigned long zend_ulong;
typedef unsigned short zend_ushort;
#undef SUCCESS
#undef FAILURE
#define SUCCESS 0
#define FAILURE -1 /* this MUST stay a negative number, or it may affect functions! */
#include "zend_hash.h"
#include "zend_llist.h"
#define INTERNAL_FUNCTION_PARAMETERS int ht, zval *return_value, zval *this_ptr, int return_value_used ELS_DC
#define INTERNAL_FUNCTION_PARAM_PASSTHRU ht, return_value, this_ptr, return_value_used ELS_CC
/*
* zval
*/
typedef struct _zval_struct zval;
typedef struct _zend_class_entry zend_class_entry;
typedef union _zvalue_value {
long lval; /* long value */
double dval; /* double value */
struct {
char *val;
int len;
} str;
HashTable *ht; /* hash table value */
struct {
zend_class_entry *ce;
HashTable *properties;
} obj;
} zvalue_value;
struct _zval_struct {
/* Variable information */
zvalue_value value; /* value */
zend_uchar type; /* active type */
zend_uchar is_ref;
zend_ushort refcount;
};
typedef struct _zend_function_entry {
char *fname;
void (*handler)(INTERNAL_FUNCTION_PARAMETERS);
unsigned char *func_arg_types;
} zend_function_entry;
typedef struct _zend_property_reference {
int type; /* read, write or r/w */
zval *object;
zend_llist *elements_list;
} zend_property_reference;
typedef struct _zend_overloaded_element {
int type; /* array offset or object proprety */
zval element;
} zend_overloaded_element;
/* excpt.h on Digital Unix 4.0 defines function_table */
#undef function_table
struct _zend_class_entry {
char type;
char *name;
uint name_length;
struct _zend_class_entry *parent;
int *refcount;
zend_bool constants_updated;
HashTable function_table;
HashTable default_properties;
zend_function_entry *builtin_functions;
/* handlers */
void (*handle_function_call)(INTERNAL_FUNCTION_PARAMETERS, zend_property_reference *property_reference);
zval (*handle_property_get)(zend_property_reference *property_reference);
int (*handle_property_set)(zend_property_reference *property_reference, zval *value);
};
typedef struct _zend_utility_functions {
void (*error_function)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
int (*printf_function)(const char *format, ...);
int (*write_function)(const char *str, uint str_length);
FILE *(*fopen_function)(const char *filename, char **opened_path);
void (*message_handler)(long message, void *data);
void (*block_interruptions)(void);
void (*unblock_interruptions)(void);
int (*get_ini_entry)(char *name, uint name_length, zval *contents);
void (*ticks_function)(int ticks);
} zend_utility_functions;
typedef struct _zend_utility_values {
char *import_use_extension;
uint import_use_extension_length;
} zend_utility_values;
typedef int (*zend_write_func_t)(const char *str, uint str_length);
#undef MIN
#undef MAX
#define MAX(a,b) (((a)>(b))?(a):(b))
#define MIN(a,b) (((a)<(b))?(a):(b))
#define ZEND_STRL(str) (str), (sizeof(str)-1)
#define ZEND_STRS(str) (str), (sizeof(str)
#define ZEND_NORMALIZE_BOOL(n) \
((n) ? (((n)>0) ? 1 : -1) : 0)
/* data types */
#define IS_NULL 0
#define IS_LONG 1
#define IS_DOUBLE 2
#define IS_STRING 3
#define IS_ARRAY 4
#define IS_OBJECT 5
#define IS_BOOL 6
#define IS_RESOURCE 7
#define IS_CONSTANT 8
#define IS_CONSTANT_ARRAY 9
/* Special data type to temporarily mark large numbers */
#define FLAG_IS_BC 10 /* for parser internal use only */
/* overloaded elements data types */
#define OE_IS_ARRAY (1<<0)
#define OE_IS_OBJECT (1<<1)
#define OE_IS_METHOD (1<<2)
/* Argument passing types */
#define BYREF_NONE 0
#define BYREF_FORCE 1
#define BYREF_ALLOW 2
#define BYREF_FORCE_REST 3
int zend_startup(zend_utility_functions *utility_functions, char **extensions, int start_builtin_functions);
void zend_shutdown(void);
void zend_set_utility_values(zend_utility_values *utility_values);
BEGIN_EXTERN_C()
ZEND_API void zend_bailout(void);
END_EXTERN_C()
ZEND_API char *get_zend_version(void);
ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_copy);
ZEND_API int zend_print_zval(zval *expr, int indent);
ZEND_API int zend_print_zval_ex(zend_write_func_t write_func, zval *expr, int indent);
ZEND_API void zend_print_zval_r(zval *expr, int indent);
ZEND_API void zend_print_zval_r_ex(zend_write_func_t write_func, zval *expr, int indent);
ZEND_API void zend_output_debug_string(zend_bool trigger_break, char *format, ...);
#if ZEND_DEBUG
#define Z_DBG(expr) (expr)
#else
#define Z_DBG(expr)
#endif
ZEND_API extern char *empty_string;
#define STR_FREE(ptr) if (ptr && ptr!=empty_string) { efree(ptr); }
#define STR_FREE_REL(ptr) if (ptr && ptr!=empty_string) { efree_rel(ptr); }
#define STR_REALLOC(ptr, size) \
if (ptr!=empty_string) { \
ptr = (char *) erealloc(ptr, size); \
} else { \
ptr = (char *) emalloc(size); \
memset(ptr, 0, size); \
}
/* output support */
#define ZEND_WRITE(str, str_len) zend_write((str), (str_len))
#define ZEND_PUTS(str) zend_write((str), strlen((str)))
#define ZEND_PUTC(c) zend_write(&(c), 1), (c)
BEGIN_EXTERN_C()
extern ZEND_API int (*zend_printf)(const char *format, ...);
extern ZEND_API zend_write_func_t zend_write;
extern ZEND_API FILE *(*zend_fopen)(const char *filename, char **opened_path);
extern ZEND_API void (*zend_block_interruptions)(void);
extern ZEND_API void (*zend_unblock_interruptions)(void);
extern ZEND_API void (*zend_ticks_function)(int ticks);
extern ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
ZEND_API void zend_error(int type, const char *format, ...);
void zenderror(char *error);
extern ZEND_API zend_class_entry zend_standard_class_def;
extern zend_utility_values zend_uv;
extern ZEND_API zval zval_used_for_init;
END_EXTERN_C()
#define ZEND_UV(name) (zend_uv.name)
#define HANDLE_BLOCK_INTERRUPTIONS() if (zend_block_interruptions) { zend_block_interruptions(); }
#define HANDLE_UNBLOCK_INTERRUPTIONS() if (zend_unblock_interruptions) { zend_unblock_interruptions(); }
BEGIN_EXTERN_C()
ZEND_API void zend_message_dispatcher(long message, void *data);
END_EXTERN_C()
ZEND_API int zend_get_ini_entry(char *name, uint name_length, zval *contents);
/* Messages for applications of Zend */
#define ZMSG_FAILED_INCLUDE_FOPEN 1L
#define ZMSG_FAILED_REQUIRE_FOPEN 2L
#define ZMSG_FAILED_HIGHLIGHT_FOPEN 3L
#define ZMSG_MEMORY_LEAK_DETECTED 4L
#define ZMSG_MEMORY_LEAK_REPEATED 5L
#define ZMSG_LOG_SCRIPT_NAME 6L
#define ZVAL_ADDREF(pz) (++(pz)->refcount)
#define ZVAL_DELREF(pz) (--(pz)->refcount)
#define ZVAL_REFCOUNT(pz) ((pz)->refcount)
#define INIT_PZVAL(z) \
(z)->refcount = 1; \
(z)->is_ref = 0;
#define INIT_ZVAL(z) z = zval_used_for_init;
#define ALLOC_INIT_ZVAL(zp) \
ALLOC_ZVAL(zp); \
INIT_ZVAL(*zp);
#define MAKE_STD_ZVAL(zv) \
ALLOC_ZVAL(zv); \
INIT_PZVAL(zv);
#define PZVAL_IS_REF(z) ((z)->is_ref)
#define SEPARATE_ZVAL(ppzv) \
{ \
zval *orig_ptr = *(ppzv); \
\
if (orig_ptr->refcount>1) { \
orig_ptr->refcount--; \
ALLOC_ZVAL(*(ppzv)); \
**(ppzv) = *orig_ptr; \
zval_copy_ctor(*(ppzv)); \
(*(ppzv))->refcount=1; \
(*(ppzv))->is_ref = 0; \
} \
}
#define SEPARATE_ZVAL_IF_NOT_REF(ppzv) \
if (!PZVAL_IS_REF(*ppzv)) { \
SEPARATE_ZVAL(ppzv); \
}
#define SEPARATE_ZVAL_TO_MAKE_IS_REF(ppzv) \
if (!PZVAL_IS_REF(*ppzv)) { \
SEPARATE_ZVAL(ppzv); \
(*(ppzv))->is_ref = 1; \
}
#define COPY_PZVAL_TO_ZVAL(zv, pzv) \
(zv) = *(pzv); \
if ((pzv)->refcount>1) { \
zval_copy_ctor(&(zv)); \
(pzv)->refcount--; \
} else { \
FREE_ZVAL(pzv); \
} \
INIT_PZVAL(&(zv));
#define ZEND_MAX_RESERVED_RESOURCES 2
#ifdef ZEND_WIN32
/* Only use this macro if you know for sure that all of the switches values
are covered by its case statements */
#define EMPTY_SWITCH_DEFAULT_CASE() \
default: \
__assume(0); \
break;
#else
#define EMPTY_SWITCH_DEFAULT_CASE()
#endif
#endif /* ZEND_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

-984
View File
@@ -1,984 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include "zend.h"
#include "zend_execute.h"
#include "zend_API.h"
#include "modules.h"
#include "zend_constants.h"
#ifdef HAVE_STDARG_H
#include <stdarg.h>
#endif
/* these variables are true statics/globals, and have to be mutex'ed on every access */
static int module_count=0;
HashTable module_registry;
/* this function doesn't check for too many parameters */
ZEND_API int zend_get_parameters(int ht, int param_count, ...)
{
void **p;
int arg_count;
va_list ptr;
zval **param, *param_ptr;
ELS_FETCH();
p = EG(argument_stack).top_element-2;
arg_count = (ulong) *p;
if (param_count>arg_count) {
return FAILURE;
}
va_start(ptr, param_count);
while (param_count-->0) {
param = va_arg(ptr, zval **);
param_ptr = *(p-arg_count);
if (!PZVAL_IS_REF(param_ptr) && param_ptr->refcount>1) {
zval *new_tmp;
ALLOC_ZVAL(new_tmp);
*new_tmp = *param_ptr;
zval_copy_ctor(new_tmp);
INIT_PZVAL(new_tmp);
param_ptr = new_tmp;
((zval *) *(p-arg_count))->refcount--;
*(p-arg_count) = param_ptr;
}
*param = param_ptr;
arg_count--;
}
va_end(ptr);
return SUCCESS;
}
ZEND_API int zend_get_parameters_array(int ht, int param_count, zval **argument_array)
{
void **p;
int arg_count;
zval *param_ptr;
ELS_FETCH();
p = EG(argument_stack).top_element-2;
arg_count = (ulong) *p;
if (param_count>arg_count) {
return FAILURE;
}
while (param_count-->0) {
param_ptr = *(p-arg_count);
if (!PZVAL_IS_REF(param_ptr) && param_ptr->refcount>1) {
zval *new_tmp;
ALLOC_ZVAL(new_tmp);
*new_tmp = *param_ptr;
zval_copy_ctor(new_tmp);
INIT_PZVAL(new_tmp);
param_ptr = new_tmp;
((zval *) *(p-arg_count))->refcount--;
*(p-arg_count) = param_ptr;
}
*(argument_array++) = param_ptr;
arg_count--;
}
return SUCCESS;
}
/* Zend-optimized Extended functions */
/* this function doesn't check for too many parameters */
ZEND_API int zend_get_parameters_ex(int param_count, ...)
{
void **p;
int arg_count;
va_list ptr;
zval ***param;
ELS_FETCH();
p = EG(argument_stack).top_element-2;
arg_count = (ulong) *p;
if (param_count>arg_count) {
return FAILURE;
}
va_start(ptr, param_count);
while (param_count-->0) {
param = va_arg(ptr, zval ***);
*param = (zval **) p-(arg_count--);
}
va_end(ptr);
return SUCCESS;
}
ZEND_API int zend_get_parameters_array_ex(int param_count, zval ***argument_array)
{
void **p;
int arg_count;
ELS_FETCH();
p = EG(argument_stack).top_element-2;
arg_count = (ulong) *p;
if (param_count>arg_count) {
return FAILURE;
}
while (param_count-->0) {
*(argument_array++) = (zval **) p-(arg_count--);
}
return SUCCESS;
}
ZEND_API int ParameterPassedByReference(int ht, uint n)
{
void **p;
ulong arg_count;
zval *arg;
ELS_FETCH();
p = EG(argument_stack).elements+EG(argument_stack).top-2;
arg_count = (ulong) *p;
if (n>arg_count) {
return FAILURE;
}
arg = (zval *) *(p-arg_count+n-1);
return PZVAL_IS_REF(arg);
}
ZEND_API void wrong_param_count()
{
zend_error(E_WARNING,"Wrong parameter count for %s()",get_active_function_name());
}
ZEND_API inline int _array_init(zval *arg ZEND_FILE_LINE_DC)
{
ALLOC_HASHTABLE_REL(arg->value.ht);
if (!arg->value.ht || zend_hash_init(arg->value.ht, 0, NULL, ZVAL_PTR_DTOR, 0)) {
zend_error(E_ERROR, "Cannot allocate memory for array");
return FAILURE;
}
arg->type = IS_ARRAY;
return SUCCESS;
}
ZEND_API inline int _object_init_ex(zval *arg, zend_class_entry *class_type ZEND_FILE_LINE_DC)
{
zval *tmp;
if (!class_type->constants_updated) {
zend_hash_apply_with_argument(&class_type->default_properties, (int (*)(void *,void *)) zval_update_constant, (void *) 1);
class_type->constants_updated = 1;
}
ALLOC_HASHTABLE_REL(arg->value.obj.properties);
zend_hash_init(arg->value.obj.properties, 0, NULL, ZVAL_PTR_DTOR, 0);
zend_hash_copy(arg->value.obj.properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
arg->type = IS_OBJECT;
arg->value.obj.ce = class_type;
return SUCCESS;
}
ZEND_API inline int _object_init(zval *arg ZEND_FILE_LINE_DC)
{
return _object_init_ex(arg, &zend_standard_class_def ZEND_FILE_LINE_CC);
}
ZEND_API inline int add_assoc_function(zval *arg, char *key,void (*function_ptr)(INTERNAL_FUNCTION_PARAMETERS))
{
zend_error(E_WARNING, "add_assoc_function() is no longer supported");
return FAILURE;
}
ZEND_API inline int add_assoc_long(zval *arg, char *key, long n)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_LONG;
tmp->value.lval = n;
INIT_PZVAL(tmp);
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_assoc_unset(zval *arg, char *key)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_NULL;
INIT_PZVAL(tmp);
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_assoc_bool(zval *arg, char *key, int b)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_BOOL;
tmp->value.lval = b;
INIT_PZVAL(tmp);
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_assoc_resource(zval *arg, char *key, int r)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_RESOURCE;
tmp->value.lval = r;
INIT_PZVAL(tmp);
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_assoc_double(zval *arg, char *key, double d)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_DOUBLE;
tmp->value.dval = d;
INIT_PZVAL(tmp);
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_assoc_string(zval *arg, char *key, char *str, int duplicate)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_STRING;
tmp->value.str.len = strlen(str);
if (duplicate) {
tmp->value.str.val = estrndup(str,tmp->value.str.len);
} else {
tmp->value.str.val = str;
}
INIT_PZVAL(tmp);
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_assoc_stringl(zval *arg, char *key, char *str, uint length, int duplicate)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_STRING;
tmp->value.str.len = length;
if (duplicate) {
tmp->value.str.val = estrndup(str,tmp->value.str.len);
} else {
tmp->value.str.val = str;
}
INIT_PZVAL(tmp);
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_index_long(zval *arg, uint index, long n)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_LONG;
tmp->value.lval = n;
INIT_PZVAL(tmp);
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),NULL);
}
ZEND_API inline int add_index_unset(zval *arg, uint index)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_NULL;
INIT_PZVAL(tmp);
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_index_bool(zval *arg, uint index, int b)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_BOOL;
tmp->value.lval = b;
INIT_PZVAL(tmp);
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),NULL);
}
ZEND_API inline int add_index_resource(zval *arg, uint index, int r)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_RESOURCE;
tmp->value.lval = r;
INIT_PZVAL(tmp);
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),NULL);
}
ZEND_API inline int add_index_double(zval *arg, uint index, double d)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_DOUBLE;
tmp->value.dval = d;
INIT_PZVAL(tmp);
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),NULL);
}
ZEND_API inline int add_index_string(zval *arg, uint index, char *str, int duplicate)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_STRING;
tmp->value.str.len = strlen(str);
if (duplicate) {
tmp->value.str.val = estrndup(str,tmp->value.str.len);
} else {
tmp->value.str.val = str;
}
INIT_PZVAL(tmp);
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_index_stringl(zval *arg, uint index, char *str, uint length, int duplicate)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_STRING;
tmp->value.str.len = length;
if (duplicate) {
tmp->value.str.val = estrndup(str,tmp->value.str.len);
} else {
tmp->value.str.val = str;
}
INIT_PZVAL(tmp);
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),NULL);
}
ZEND_API inline int add_next_index_long(zval *arg, long n)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_LONG;
tmp->value.lval = n;
INIT_PZVAL(tmp);
return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_next_index_unset(zval *arg)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_NULL;
INIT_PZVAL(tmp);
return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_next_index_bool(zval *arg, int b)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_BOOL;
tmp->value.lval = b;
INIT_PZVAL(tmp);
return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_next_index_resource(zval *arg, int r)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_RESOURCE;
tmp->value.lval = r;
INIT_PZVAL(tmp);
return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_next_index_double(zval *arg, double d)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_DOUBLE;
tmp->value.dval = d;
INIT_PZVAL(tmp);
return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_next_index_string(zval *arg, char *str, int duplicate)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_STRING;
tmp->value.str.len = strlen(str);
if (duplicate) {
tmp->value.str.val = estrndup(str,tmp->value.str.len);
} else {
tmp->value.str.val = str;
}
INIT_PZVAL(tmp);
return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *),NULL);
}
ZEND_API inline int add_next_index_stringl(zval *arg, char *str, uint length, int duplicate)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_STRING;
tmp->value.str.len = length;
if (duplicate) {
tmp->value.str.val = estrndup(str,tmp->value.str.len);
} else {
tmp->value.str.val = str;
}
INIT_PZVAL(tmp);
return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *),NULL);
}
ZEND_API inline int add_get_assoc_string(zval *arg, char *key, char *str, void **dest, int duplicate)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_STRING;
tmp->value.str.len = strlen(str);
if (duplicate) {
tmp->value.str.val = estrndup(str,tmp->value.str.len);
} else {
tmp->value.str.val = str;
}
INIT_PZVAL(tmp);
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), dest);
}
ZEND_API inline int add_get_assoc_stringl(zval *arg, char *key, char *str, uint length, void **dest, int duplicate)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_STRING;
tmp->value.str.len = length;
if (duplicate) {
tmp->value.str.val = estrndup(str,tmp->value.str.len);
} else {
tmp->value.str.val = str;
}
INIT_PZVAL(tmp);
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), dest);
}
ZEND_API inline int add_get_index_long(zval *arg, uint index, long l, void **dest)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_LONG;
tmp->value.lval = l;
INIT_PZVAL(tmp);
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),dest);
}
ZEND_API inline int add_get_index_double(zval *arg, uint index, double d, void **dest)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_DOUBLE;
tmp->value.dval= d;
INIT_PZVAL(tmp);
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),dest);
}
ZEND_API inline int add_get_index_string(zval *arg, uint index, char *str, void **dest, int duplicate)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_STRING;
tmp->value.str.len = strlen(str);
if (duplicate) {
tmp->value.str.val = estrndup(str,tmp->value.str.len);
} else {
tmp->value.str.val = str;
}
INIT_PZVAL(tmp);
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),dest);
}
ZEND_API inline int add_get_index_stringl(zval *arg, uint index, char *str, uint length, void **dest, int duplicate)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_STRING;
tmp->value.str.len = length;
if (duplicate) {
tmp->value.str.val = estrndup(str,tmp->value.str.len);
} else {
tmp->value.str.val = str;
}
INIT_PZVAL(tmp);
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),dest);
}
ZEND_API inline int add_property_long(zval *arg, char *key, long n)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_LONG;
tmp->value.lval = n;
INIT_PZVAL(tmp);
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_property_bool(zval *arg, char *key, int b)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_BOOL;
tmp->value.lval = b;
INIT_PZVAL(tmp);
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_property_unset(zval *arg, char *key)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_NULL;
INIT_PZVAL(tmp);
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_property_resource(zval *arg, char *key, long n)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_RESOURCE;
tmp->value.lval = n;
INIT_PZVAL(tmp);
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_property_double(zval *arg, char *key, double d)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_DOUBLE;
tmp->value.dval = d;
INIT_PZVAL(tmp);
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_property_string(zval *arg, char *key, char *str, int duplicate)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_STRING;
tmp->value.str.len = strlen(str);
if (duplicate) {
tmp->value.str.val = estrndup(str,tmp->value.str.len);
} else {
tmp->value.str.val = str;
}
INIT_PZVAL(tmp);
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_property_stringl(zval *arg, char *key, char *str, uint length, int duplicate)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_STRING;
tmp->value.str.len = length;
if (duplicate) {
tmp->value.str.val = estrndup(str,tmp->value.str.len);
} else {
tmp->value.str.val = str;
}
INIT_PZVAL(tmp);
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API int zend_startup_module(zend_module_entry *module)
{
if (module) {
module->module_number = zend_next_free_module();
if (module->module_startup_func) {
ELS_FETCH();
if (module->module_startup_func(MODULE_PERSISTENT, module->module_number ELS_CC)==FAILURE) {
zend_error(E_CORE_ERROR,"Unable to start %s module",module->name);
return FAILURE;
}
}
module->type = MODULE_PERSISTENT;
zend_register_module(module);
}
return SUCCESS;
}
/* registers all functions in *library_functions in the function hash */
int zend_register_functions(zend_function_entry *functions, HashTable *function_table, int type)
{
zend_function_entry *ptr = functions;
zend_function function;
zend_internal_function *internal_function = (zend_internal_function *)&function;
int count=0,unload=0;
HashTable *target_function_table = function_table;
int error_type;
CLS_FETCH();
if (type==MODULE_PERSISTENT) {
error_type = E_CORE_WARNING;
} else {
error_type = E_WARNING;
}
if (!target_function_table) {
target_function_table = CG(function_table);
}
internal_function->type = ZEND_INTERNAL_FUNCTION;
while (ptr->fname) {
internal_function->handler = ptr->handler;
internal_function->arg_types = ptr->func_arg_types;
internal_function->function_name = ptr->fname;
if (!internal_function->handler) {
zend_error(error_type, "Null function defined as active function");
zend_unregister_functions(functions, count, target_function_table);
return FAILURE;
}
if (zend_hash_add(target_function_table, ptr->fname, strlen(ptr->fname)+1, &function, sizeof(zend_function), NULL) == FAILURE) {
unload=1;
break;
}
ptr++;
count++;
}
if (unload) { /* before unloading, display all remaining bad function in the module */
while (ptr->fname) {
if (zend_hash_exists(target_function_table, ptr->fname, strlen(ptr->fname)+1)) {
zend_error(error_type, "Function registration failed - duplicate name - %s",ptr->fname);
}
ptr++;
}
zend_unregister_functions(functions, count, target_function_table);
return FAILURE;
}
return SUCCESS;
}
/* count=-1 means erase all functions, otherwise,
* erase the first count functions
*/
void zend_unregister_functions(zend_function_entry *functions, int count, HashTable *function_table)
{
zend_function_entry *ptr = functions;
int i=0;
HashTable *target_function_table = function_table;
CLS_FETCH();
if (!target_function_table) {
target_function_table = CG(function_table);
}
while (ptr->fname) {
if (count!=-1 && i>=count) {
break;
}
#if 0
zend_printf("Unregistering %s()\n", ptr->fname);
#endif
zend_hash_del(target_function_table, ptr->fname, strlen(ptr->fname)+1);
ptr++;
i++;
}
}
ZEND_API int zend_register_module(zend_module_entry *module)
{
#if 0
zend_printf("%s: Registering module %d\n",module->name, module->module_number);
#endif
if (module->functions && zend_register_functions(module->functions, NULL, module->type)==FAILURE) {
zend_error(E_CORE_WARNING,"%s: Unable to register functions, unable to load",module->name);
return FAILURE;
}
module->module_started=1;
return zend_hash_add(&module_registry, module->name,strlen(module->name)+1,(void *)module,sizeof(zend_module_entry),NULL);
}
void module_destructor(zend_module_entry *module)
{
if (module->type == MODULE_TEMPORARY) {
zend_clean_module_rsrc_dtors(module->module_number);
clean_module_constants(module->module_number);
if (module->request_shutdown_func)
module->request_shutdown_func(module->type, module->module_number);
}
if (module->module_started && module->module_shutdown_func) {
#if 0
zend_printf("%s: Module shutdown\n",module->name);
#endif
module->module_shutdown_func(module->type, module->module_number);
}
module->module_started=0;
if (module->functions) {
zend_unregister_functions(module->functions, -1, NULL);
}
#if HAVE_LIBDL
if (module->handle) {
dlclose(module->handle);
}
#endif
}
/* call request startup for all modules */
int module_registry_request_startup(zend_module_entry *module)
{
if (module->request_startup_func) {
ELS_FETCH();
#if 0
zend_printf("%s: Request startup\n",module->name);
#endif
if (module->request_startup_func(module->type, module->module_number ELS_CC)==FAILURE) {
zend_error(E_WARNING, "request_startup() for %s module failed", module->name);
exit(1);
}
}
return 0;
}
/* for persistent modules - call request shutdown and flag NOT to erase
* for temporary modules - do nothing, and flag to erase
*/
int module_registry_cleanup(zend_module_entry *module)
{
switch(module->type) {
case MODULE_PERSISTENT:
if (module->request_shutdown_func) {
#if 0
zend_printf("%s: Request shutdown\n",module->name);
#endif
module->request_shutdown_func(module->type, module->module_number);
}
return 0;
break;
case MODULE_TEMPORARY:
return 1;
break;
}
return 0;
}
/* return the next free module number */
int zend_next_free_module(void)
{
return ++module_count;
}
/* If parent_ce is not NULL then it inherits from parent_ce
* If parent_ce is NULL and parent_name isn't then it looks for the parent and inherits from it
* If both parent_ce and parent_name are NULL it does a regular class registration
* If parent_name is specified but not found NULL is returned
*/
ZEND_API zend_class_entry *zend_register_internal_class_ex(zend_class_entry *class_entry, zend_class_entry *parent_ce, char *parent_name)
{
zend_class_entry *register_class;
CLS_FETCH();
if (!parent_ce && parent_name) {
if (zend_hash_find(CG(class_table), parent_name, strlen(parent_name)+1, (void **) &parent_ce)==FAILURE) {
return NULL;
}
}
register_class = zend_register_internal_class(class_entry);
if (parent_ce) {
do_inheritance(register_class, parent_ce);
}
return register_class;
}
ZEND_API zend_class_entry *zend_register_internal_class(zend_class_entry *class_entry)
{
zend_class_entry *register_class;
char *lowercase_name = zend_strndup(class_entry->name, class_entry->name_length);
CLS_FETCH();
zend_str_tolower(lowercase_name, class_entry->name_length);
class_entry->type = ZEND_INTERNAL_CLASS;
class_entry->parent = NULL;
class_entry->refcount = (int *) malloc(sizeof(int));
*class_entry->refcount = 1;
class_entry->constants_updated = 0;
zend_hash_init(&class_entry->default_properties, 0, NULL, ZVAL_PTR_DTOR, 1);
zend_hash_init(&class_entry->function_table, 0, NULL, ZEND_FUNCTION_DTOR, 1);
if (class_entry->builtin_functions) {
zend_register_functions(class_entry->builtin_functions, &class_entry->function_table, MODULE_PERSISTENT);
}
zend_hash_update(CG(class_table), lowercase_name, class_entry->name_length+1, class_entry, sizeof(zend_class_entry), (void **) &register_class);
free(lowercase_name);
return register_class;
}
ZEND_API zend_module_entry *zend_get_module(int module_number)
{
zend_module_entry *module;
if (zend_hash_index_find(&module_registry, module_number, (void **) &module)==SUCCESS) {
return module;
} else {
return NULL;
}
}
ZEND_API int zend_set_hash_symbol(zval *symbol, char *name, int name_length,
int is_ref, int num_symbol_tables, ...)
{
HashTable *symbol_table;
va_list symbol_table_list;
if (num_symbol_tables <= 0) return FAILURE;
symbol->is_ref = is_ref;
va_start(symbol_table_list, num_symbol_tables);
while(num_symbol_tables-- > 0) {
symbol_table = va_arg(symbol_table_list, HashTable *);
zend_hash_update(symbol_table, name, name_length + 1, &symbol, sizeof(zval *), NULL);
zval_add_ref(&symbol);
}
va_end(symbol_table_list);
return SUCCESS;
}
/* Disabled functions support */
static ZEND_FUNCTION(display_disabled_function)
{
zend_error(E_WARNING, "%s() has been disabled for security reasons.", get_active_function_name());
}
static zend_function_entry disabled_function[] = {
ZEND_FE(display_disabled_function, NULL)
{ NULL, NULL, NULL }
};
ZEND_API int zend_disable_function(char *function_name, uint function_name_length)
{
CLS_FETCH();
if (zend_hash_del(CG(function_table), function_name, function_name_length+1)==FAILURE) {
return FAILURE;
}
disabled_function[0].fname = function_name;
return zend_register_functions(disabled_function, CG(function_table), MODULE_PERSISTENT);
}
-426
View File
@@ -1,426 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_API_H
#define ZEND_API_H
#include "modules.h"
#include "zend_list.h"
#include "zend_fast_cache.h"
#include "zend_operators.h"
#include "zend_variables.h"
#include "zend_execute.h"
#define ZEND_FN(name) zend_if_##name
#define ZEND_NAMED_FUNCTION(name) void name(INTERNAL_FUNCTION_PARAMETERS)
#define ZEND_FUNCTION(name) ZEND_NAMED_FUNCTION(ZEND_FN(name))
#define ZEND_NAMED_FE(zend_name, name, arg_types) { #zend_name, name, arg_types },
#define ZEND_FE(name, arg_types) ZEND_NAMED_FE(name, ZEND_FN(name), arg_types)
#define ZEND_FALIAS(name, alias, arg_types) ZEND_NAMED_FE(name, ZEND_FN(alias), arg_types)
#define ZEND_MINIT(module) zend_minit_##module
#define ZEND_MSHUTDOWN(module) zend_mshutdown_##module
#define ZEND_RINIT(module) zend_rinit_##module
#define ZEND_RSHUTDOWN(module) zend_rshutdown_##module
#define ZEND_MINFO(module) zend_info_##module
#define ZEND_GINIT(module) zend_ginit_##module
#define ZEND_GSHUTDOWN(module) zend_gshutdown_##module
#define ZEND_MINIT_FUNCTION(module) int ZEND_MINIT(module)(INIT_FUNC_ARGS)
#define ZEND_MSHUTDOWN_FUNCTION(module) int ZEND_MSHUTDOWN(module)(SHUTDOWN_FUNC_ARGS)
#define ZEND_RINIT_FUNCTION(module) int ZEND_RINIT(module)(INIT_FUNC_ARGS)
#define ZEND_RSHUTDOWN_FUNCTION(module) int ZEND_RSHUTDOWN(module)(SHUTDOWN_FUNC_ARGS)
#define ZEND_MINFO_FUNCTION(module) void ZEND_MINFO(module)(ZEND_MODULE_INFO_FUNC_ARGS)
#define ZEND_GINIT_FUNCTION(module) int ZEND_GINIT(module)(GINIT_FUNC_ARGS)
#define ZEND_GSHUTDOWN_FUNCTION(module) int ZEND_GSHUTDOWN(module)(void)
#define ZEND_GET_MODULE(name) \
ZEND_DLEXPORT zend_module_entry *get_module(void) { return &name##_module_entry; }
#define ZEND_BEGIN_MODULE_GLOBALS(module_name) \
typedef struct _zend_##module_name##_globals {
#define ZEND_END_MODULE_GLOBALS(module_name) \
} zend_##module_name##_globals;
#ifdef ZTS
#define ZEND_DECLARE_MODULE_GLOBALS(module_name) \
static ts_rsrc_id module_name##_globals_id;
#define ZEND_INIT_MODULE_GLOBALS(module_name, globals_ctor, globals_dtor) \
module_name##_globals_id = ts_allocate_id(sizeof(zend_##module_name##_globals), (ts_allocate_ctor) globals_ctor, (ts_allocate_dtor) globals_dtor);
#else
#define ZEND_DECLARE_MODULE_GLOBALS(module_name) \
static zend_##module_name##_globals module_name##_globals;
#define ZEND_INIT_MODULE_GLOBALS(module_name, globals_ctor, globals_dtor) \
globals_ctor(&module_name##_globals);
#endif
#define INIT_CLASS_ENTRY(class_container, class_name, functions) \
{ \
class_container.name = strdup(class_name); \
class_container.name_length = sizeof(class_name)-1; \
class_container.builtin_functions = functions; \
class_container.handle_function_call = NULL; \
class_container.handle_property_get = NULL; \
class_container.handle_property_set = NULL; \
}
#define INIT_OVERLOADED_CLASS_ENTRY(class_container, class_name, functions, handle_fcall, handle_propget, handle_propset) \
{ \
class_container.name = strdup(class_name); \
class_container.name_length = sizeof(class_name)-1; \
class_container.builtin_functions = functions; \
class_container.handle_function_call = handle_fcall; \
class_container.handle_property_get = handle_propget; \
class_container.handle_property_set = handle_propset; \
}
int zend_next_free_module(void);
ZEND_API int zend_get_parameters(int ht, int param_count, ...);
ZEND_API int zend_get_parameters_array(int ht, int param_count, zval **argument_array);
ZEND_API int zend_get_parameters_ex(int param_count, ...);
ZEND_API int zend_get_parameters_array_ex(int param_count, zval ***argument_array);
ZEND_API int ParameterPassedByReference(int ht, uint n);
int zend_register_functions(zend_function_entry *functions, HashTable *function_table, int type);
void zend_unregister_functions(zend_function_entry *functions, int count, HashTable *function_table);
ZEND_API int zend_register_module(zend_module_entry *module_entry);
ZEND_API zend_class_entry *zend_register_internal_class(zend_class_entry *class_entry);
ZEND_API zend_class_entry *zend_register_internal_class_ex(zend_class_entry *class_entry, zend_class_entry *parent_ce, char *parent_name);
ZEND_API zend_module_entry *zend_get_module(int module_number);
ZEND_API int zend_disable_function(char *function_name, uint function_name_length);
ZEND_API void wrong_param_count(void);
#define getThis() (this_ptr)
#define WRONG_PARAM_COUNT ZEND_WRONG_PARAM_COUNT()
#define WRONG_PARAM_COUNT_WITH_RETVAL(ret) ZEND_WRONG_PARAM_COUNT_WITH_RETVAL(ret)
#define ARG_COUNT(dummy) (ht)
#define ZEND_NUM_ARGS() (ht)
#define ZEND_WRONG_PARAM_COUNT() { wrong_param_count(); return; }
#define ZEND_WRONG_PARAM_COUNT_WITH_RETVAL(ret) { wrong_param_count(); return ret; }
#ifndef ZEND_WIN32
#define DLEXPORT
#endif
ZEND_API int zend_startup_module(zend_module_entry *module);
#define array_init(arg) _array_init((arg) ZEND_FILE_LINE_CC)
#define object_init(arg) _object_init((arg) ZEND_FILE_LINE_CC)
#define object_init_ex(arg, ce) _object_init_ex((arg), (ce) ZEND_FILE_LINE_CC)
ZEND_API int _array_init(zval *arg ZEND_FILE_LINE_DC);
ZEND_API int _object_init(zval *arg ZEND_FILE_LINE_DC);
ZEND_API int _object_init_ex(zval *arg, zend_class_entry *ce ZEND_FILE_LINE_DC);
/* no longer supported */
ZEND_API int add_assoc_function(zval *arg, char *key,void (*function_ptr)(INTERNAL_FUNCTION_PARAMETERS));
ZEND_API int add_assoc_long(zval *arg, char *key, long n);
ZEND_API int add_assoc_unset(zval *arg, char *key);
ZEND_API int add_assoc_bool(zval *arg, char *key, int b);
ZEND_API int add_assoc_resource(zval *arg, char *key, int r);
ZEND_API int add_assoc_double(zval *arg, char *key, double d);
ZEND_API int add_assoc_string(zval *arg, char *key, char *str, int duplicate);
ZEND_API int add_assoc_stringl(zval *arg, char *key, char *str, uint length, int duplicate);
ZEND_API int add_index_long(zval *arg, uint idx, long n);
ZEND_API int add_index_unset(zval *arg, uint idx);
ZEND_API int add_index_bool(zval *arg, uint idx, int b);
ZEND_API int add_index_resource(zval *arg, uint idx, int r);
ZEND_API int add_index_double(zval *arg, uint idx, double d);
ZEND_API int add_index_string(zval *arg, uint idx, char *str, int duplicate);
ZEND_API int add_index_stringl(zval *arg, uint idx, char *str, uint length, int duplicate);
ZEND_API int add_next_index_long(zval *arg, long n);
ZEND_API int add_next_index_unset(zval *arg);
ZEND_API int add_next_index_bool(zval *arg, int b);
ZEND_API int add_next_index_resource(zval *arg, int r);
ZEND_API int add_next_index_double(zval *arg, double d);
ZEND_API int add_next_index_string(zval *arg, char *str, int duplicate);
ZEND_API int add_next_index_stringl(zval *arg, char *str, uint length, int duplicate);
ZEND_API int add_get_index_long(zval *arg, uint idx, long l, void **dest);
ZEND_API int add_get_index_double(zval *arg, uint idx, double d, void **dest);
ZEND_API int add_get_assoc_string(zval *arg, char *key, char *str, void **dest, int duplicate);
ZEND_API int add_get_assoc_stringl(zval *arg, char *key, char *str, uint length, void **dest, int duplicate);
ZEND_API int add_get_index_string(zval *arg, uint idx, char *str, void **dest, int duplicate);
ZEND_API int add_get_index_stringl(zval *arg, uint idx, char *str, uint length, void **dest, int duplicate);
ZEND_API int call_user_function(HashTable *function_table, zval *object, zval *function_name, zval *retval_ptr, int param_count, zval *params[]);
ZEND_API int call_user_function_ex(HashTable *function_table, zval *object, zval *function_name, zval **retval_ptr_ptr, int param_count, zval **params[], int no_separation, HashTable *symbol_table);
ZEND_API int add_property_long(zval *arg, char *key, long l);
ZEND_API int add_property_unset(zval *arg, char *key);
ZEND_API int add_property_bool(zval *arg, char *key, int b);
ZEND_API int add_property_resource(zval *arg, char *key, long r);
ZEND_API int add_property_double(zval *arg, char *key, double d);
ZEND_API int add_property_string(zval *arg, char *key, char *str, int duplicate);
ZEND_API int add_property_stringl(zval *arg, char *key, char *str, uint length, int duplicate);
ZEND_API int zend_set_hash_symbol(zval *symbol, char *name, int name_length,
int is_ref, int num_symbol_tables, ...);
#define add_method(arg,key,method) add_assoc_function((arg),(key),(method))
#define ZVAL_RESOURCE(z,l) { \
(z)->type = IS_RESOURCE; \
(z)->value.lval = l; \
}
#define ZVAL_BOOL(z,b) { \
(z)->type = IS_BOOL; \
(z)->value.lval = b; \
}
#define ZVAL_NULL(z) { \
(z)->type = IS_NULL; \
}
#define ZVAL_LONG(z,l) { \
(z)->type = IS_LONG; \
(z)->value.lval = l; \
}
#define ZVAL_DOUBLE(z,d) { \
(z)->type = IS_DOUBLE; \
(z)->value.dval = d; \
}
#define ZVAL_STRING(z,s,duplicate) { \
char *__s=(s); \
(z)->value.str.len = strlen(__s); \
(z)->value.str.val = (duplicate?estrndup(__s,(z)->value.str.len):__s); \
(z)->type = IS_STRING; \
}
#define ZVAL_STRINGL(z,s,l,duplicate) { \
char *__s=(s); int __l=l; \
(z)->value.str.len = __l; \
(z)->value.str.val = (duplicate?estrndup(__s,__l):__s); \
(z)->type = IS_STRING; \
}
#define ZVAL_EMPTY_STRING(z) { \
(z)->value.str.len = 0; \
(z)->value.str.val = empty_string; \
(z)->type = IS_STRING; \
}
#define ZVAL_FALSE { (z)->value.lval = 0; (z)->type = IS_BOOL; }
#define ZVAL_TRUE { (z)->value.lval = 1; (z)->type = IS_BOOL; }
#define RETVAL_RESOURCE(l) { \
return_value->type = IS_RESOURCE;\
return_value->value.lval = l; \
}
#define RETVAL_BOOL(b) { \
return_value->type = IS_BOOL; \
return_value->value.lval = b; \
}
#define RETVAL_NULL() { \
return_value->type = IS_NULL; \
}
#define RETVAL_LONG(l) { \
return_value->type = IS_LONG; \
return_value->value.lval = l; \
}
#define RETVAL_DOUBLE(d) { \
return_value->type = IS_DOUBLE; \
return_value->value.dval = d; \
}
#define RETVAL_STRING(s,duplicate) { \
char *__s=(s); \
return_value->value.str.len = strlen(__s); \
return_value->value.str.val = (duplicate?estrndup(__s,return_value->value.str.len):__s); \
return_value->type = IS_STRING; \
}
#define RETVAL_STRINGL(s,l,duplicate) { \
char *__s=(s); int __l=l; \
return_value->value.str.len = __l; \
return_value->value.str.val = (duplicate?estrndup(__s,__l):__s); \
return_value->type = IS_STRING; \
}
#define RETVAL_EMPTY_STRING() { \
return_value->value.str.len = 0; \
return_value->value.str.val = empty_string; \
return_value->type = IS_STRING; \
}
#define RETVAL_FALSE { return_value->value.lval = 0; return_value->type = IS_BOOL; }
#define RETVAL_TRUE { return_value->value.lval = 1; return_value->type = IS_BOOL; }
#define RETURN_RESOURCE(l) { \
return_value->type = IS_RESOURCE;\
return_value->value.lval = l; \
return; \
}
#define RETURN_BOOL(b) { \
return_value->type = IS_BOOL; \
return_value->value.lval = b; \
return; \
}
#define RETURN_NULL() { \
return_value->type = IS_NULL; \
return; \
}
#define RETURN_LONG(l) { \
return_value->type = IS_LONG; \
return_value->value.lval = l; \
return; \
}
#define RETURN_DOUBLE(d) { \
return_value->type = IS_DOUBLE; \
return_value->value.dval = d; \
return; \
}
#define RETURN_STRING(s,duplicate) { \
char *__s=(s); \
return_value->value.str.len = strlen(__s); \
return_value->value.str.val = (duplicate?estrndup(__s,return_value->value.str.len):__s); \
return_value->type = IS_STRING; \
return; \
}
#define RETURN_STRINGL(s,l,duplicate) { \
char *__s=(s); int __l=l; \
return_value->value.str.len = __l; \
return_value->value.str.val = (duplicate?estrndup(__s,__l):__s); \
return_value->type = IS_STRING; \
return; \
}
#define RETURN_EMPTY_STRING() { \
return_value->value.str.len = 0; \
return_value->value.str.val = empty_string; \
return_value->type = IS_STRING; \
return; \
}
#define RETURN_FALSE { RETVAL_FALSE; return; }
#define RETURN_TRUE { RETVAL_TRUE; return; }
#define SET_VAR_STRING(n,v) { \
{ \
zval *var; \
char *str=(v); /* prevent 'v' from being evaluated more than once */ \
\
ALLOC_ZVAL(var); \
var->value.str.val = (str); \
var->value.str.len = strlen((str)); \
var->type = IS_STRING; \
ZEND_SET_GLOBAL_VAR(n, var); \
} \
}
#define SET_VAR_STRINGL(n,v,l) { \
{ \
zval *var; \
\
ALLOC_ZVAL(var); \
var->value.str.val = (v); \
var->value.str.len = (l); \
var->type = IS_STRING; \
ZEND_SET_GLOBAL_VAR(n, var); \
} \
}
#define SET_VAR_LONG(n,v) { \
{ \
zval *var; \
\
ALLOC_ZVAL(var); \
var->value.lval = (v); \
var->type = IS_LONG; \
ZEND_SET_GLOBAL_VAR(n, var); \
} \
}
#define SET_VAR_DOUBLE(n,v) { \
{ \
zval *var; \
\
ALLOC_ZVAL(var); \
var->value.dval = (v); \
var->type = IS_DOUBLE; \
ZEND_SET_GLOBAL_VAR(n, var); \
} \
}
#define ZEND_SET_SYMBOL(symtable, name, var) \
{ \
char *_name = (name); \
\
ZEND_SET_SYMBOL_WITH_LENGTH(symtable, _name, strlen(_name)+1, var, 1, 0); \
}
#define ZEND_SET_SYMBOL_WITH_LENGTH(symtable, name, name_length, var, _refcount, _is_ref) \
{ \
zval **orig_var; \
\
if (zend_hash_find(symtable, (name), (name_length), (void **) &orig_var)==SUCCESS \
&& PZVAL_IS_REF(*orig_var)) { \
(var)->refcount = (*orig_var)->refcount; \
(var)->is_ref = 1; \
\
if (_refcount) { \
(var)->refcount += _refcount-1; \
} \
zval_dtor(*orig_var); \
**orig_var = *(var); \
FREE_ZVAL(var); \
} else { \
(var)->is_ref = _is_ref; \
if (_refcount) { \
(var)->refcount = _refcount; \
} \
zend_hash_update(symtable, (name), (name_length), &(var), sizeof(zval *), NULL); \
} \
}
#define ZEND_SET_GLOBAL_VAR(name, var) \
ZEND_SET_SYMBOL(&EG(symbol_table), name, var)
#define ZEND_SET_GLOBAL_VAR_WITH_LENGTH(name, name_length, var, _refcount, _is_ref) \
ZEND_SET_SYMBOL_WITH_LENGTH(&EG(symbol_table), name, name_length, var, _refcount, _is_ref)
#define HASH_OF(p) ((p)->type==IS_ARRAY ? (p)->value.ht : (((p)->type==IS_OBJECT ? (p)->value.obj.properties : NULL)))
#define ZVAL_IS_NULL(z) ((z)->type==IS_NULL)
#endif /* ZEND_API_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
-693
View File
@@ -1,693 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include <stdlib.h>
#include "zend.h"
#include "zend_alloc.h"
#include "zend_globals.h"
#include "zend_fast_cache.h"
#ifdef HAVE_SIGNAL_H
# include <signal.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifndef ZTS
ZEND_API zend_alloc_globals alloc_globals;
#endif
#define ZEND_DISABLE_MEMORY_CACHE 0
#if ZEND_DEBUG
# define END_MAGIC_SIZE sizeof(long)
# define END_ALIGNMENT(size) (((size)%PLATFORM_ALIGNMENT)?(PLATFORM_ALIGNMENT-((size)%PLATFORM_ALIGNMENT)):0)
#else
# define END_MAGIC_SIZE 0
# define END_ALIGNMENT(size) 0
#endif
# if MEMORY_LIMIT
# if ZEND_DEBUG
#define CHECK_MEMORY_LIMIT(s, rs) _CHECK_MEMORY_LIMIT(s, rs, __zend_filename, __zend_lineno)
# else
#define CHECK_MEMORY_LIMIT(s, rs) _CHECK_MEMORY_LIMIT(s, rs, NULL,0)
# endif
#define _CHECK_MEMORY_LIMIT(s, rs, file, lineno) { AG(allocated_memory) += rs;\
if (AG(memory_limit)<AG(allocated_memory)) {\
if ((AG(memory_limit)+1048576)<AG(allocated_memory)) { \
/* failed to handle this gracefully, exit() */ \
exit(1); \
} \
if (!AG(memory_exhausted)) { \
if (!file) { \
zend_error(E_ERROR,"Allowed memory size of %d bytes exhausted (tried to allocate %d bytes)", AG(memory_limit),s); \
} else { \
zend_error(E_ERROR,"Allowed memory size of %d bytes exhausted at %s:%d (tried to allocate %d bytes)", AG(memory_limit), file, lineno, s); \
} \
AG(memory_exhausted)=1; \
} \
} \
}
# endif
#ifndef CHECK_MEMORY_LIMIT
#define CHECK_MEMORY_LIMIT(s, rs)
#endif
#define REMOVE_POINTER_FROM_LIST(p) \
if (!p->persistent && p==AG(head)) { \
AG(head) = p->pNext; \
} else if (p->persistent && p==AG(phead)) { \
AG(phead) = p->pNext; \
} else { \
p->pLast->pNext = p->pNext; \
} \
if (p->pNext) { \
p->pNext->pLast = p->pLast; \
}
#define ADD_POINTER_TO_LIST(p) \
if (p->persistent) { \
p->pNext = AG(phead); \
if (AG(phead)) { \
AG(phead)->pLast = p; \
} \
AG(phead) = p; \
} else { \
p->pNext = AG(head); \
if (AG(head)) { \
AG(head)->pLast = p; \
} \
AG(head) = p; \
} \
p->pLast = (zend_mem_header *) NULL;
#define DECLARE_CACHE_VARS \
unsigned int real_size; \
unsigned int cache_index;
#define REAL_SIZE(size) ((size+7) & ~0x7)
#define CALCULATE_REAL_SIZE_AND_CACHE_INDEX(size) \
real_size = REAL_SIZE(size); \
cache_index = real_size >> 3;
#define SIZE real_size
#define CACHE_INDEX cache_index
ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
zend_mem_header *p;
DECLARE_CACHE_VARS
ALS_FETCH();
CALCULATE_REAL_SIZE_AND_CACHE_INDEX(size);
if (!ZEND_DISABLE_MEMORY_CACHE && (CACHE_INDEX < MAX_CACHED_MEMORY) && (AG(cache_count)[CACHE_INDEX] > 0)) {
p = AG(cache)[CACHE_INDEX][--AG(cache_count)[CACHE_INDEX]];
#if ZEND_DEBUG
p->filename = __zend_filename;
p->lineno = __zend_lineno;
p->orig_filename = __zend_orig_filename;
p->orig_lineno = __zend_orig_lineno;
p->magic = MEM_BLOCK_START_MAGIC;
p->reported = 0;
AG(cache_stats)[CACHE_INDEX][1]++;
#endif
p->persistent = 0;
p->cached = 0;
p->size = size;
HANDLE_BLOCK_INTERRUPTIONS();
ADD_POINTER_TO_LIST(p);
HANDLE_UNBLOCK_INTERRUPTIONS();
return (void *)((char *)p + sizeof(zend_mem_header) + PLATFORM_PADDING);
} else {
#if ZEND_DEBUG
if (CACHE_INDEX<MAX_CACHED_MEMORY) {
AG(cache_stats)[CACHE_INDEX][0]++;
}
#endif
p = (zend_mem_header *) malloc(sizeof(zend_mem_header) + SIZE + PLATFORM_PADDING + END_ALIGNMENT(SIZE) + END_MAGIC_SIZE);
}
HANDLE_BLOCK_INTERRUPTIONS();
if (!p) {
fprintf(stderr,"FATAL: emalloc(): Unable to allocate %ld bytes\n", (long) size);
#if ZEND_DEBUG && defined(HAVE_KILL) && defined(HAVE_GETPID)
kill(getpid(), SIGSEGV);
#else
exit(1);
#endif
HANDLE_UNBLOCK_INTERRUPTIONS();
return (void *)p;
}
p->persistent = p->cached = 0;
ADD_POINTER_TO_LIST(p);
p->size = size; /* Save real size for correct cache output */
#if ZEND_DEBUG
p->filename = __zend_filename;
p->lineno = __zend_lineno;
p->orig_filename = __zend_orig_filename;
p->orig_lineno = __zend_orig_lineno;
p->magic = MEM_BLOCK_START_MAGIC;
p->reported = 0;
*((long *)(((char *) p) + sizeof(zend_mem_header)+SIZE+PLATFORM_PADDING+END_ALIGNMENT(SIZE))) = MEM_BLOCK_END_MAGIC;
#endif
#if MEMORY_LIMIT
CHECK_MEMORY_LIMIT(size, SIZE);
#endif
HANDLE_UNBLOCK_INTERRUPTIONS();
return (void *)((char *)p + sizeof(zend_mem_header) + PLATFORM_PADDING);
}
ZEND_API void _efree(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
zend_mem_header *p = (zend_mem_header *) ((char *)ptr - sizeof(zend_mem_header) - PLATFORM_PADDING);
DECLARE_CACHE_VARS
ALS_FETCH();
CALCULATE_REAL_SIZE_AND_CACHE_INDEX(p->size);
#if ZEND_DEBUG
if (!_mem_block_check(ptr, 1 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC)) {
return;
}
memset(ptr, 0x5a, SIZE);
#endif
if (!ZEND_DISABLE_MEMORY_CACHE
&& !p->persistent && (CACHE_INDEX < MAX_CACHED_MEMORY) && (AG(cache_count)[CACHE_INDEX] < MAX_CACHED_ENTRIES)) {
AG(cache)[CACHE_INDEX][AG(cache_count)[CACHE_INDEX]++] = p;
p->cached = 1;
#if ZEND_DEBUG
p->magic = MEM_BLOCK_CACHED_MAGIC;
#endif
HANDLE_BLOCK_INTERRUPTIONS();
REMOVE_POINTER_FROM_LIST(p);
HANDLE_UNBLOCK_INTERRUPTIONS();
return;
}
HANDLE_BLOCK_INTERRUPTIONS();
REMOVE_POINTER_FROM_LIST(p);
#if MEMORY_LIMIT
AG(allocated_memory) -= SIZE;
#endif
free(p);
HANDLE_UNBLOCK_INTERRUPTIONS();
}
ZEND_API void *_ecalloc(size_t nmemb, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
void *p;
int final_size=size*nmemb;
HANDLE_BLOCK_INTERRUPTIONS();
p = _emalloc(final_size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
if (!p) {
HANDLE_UNBLOCK_INTERRUPTIONS();
return (void *) p;
}
memset(p,(int)NULL, final_size);
HANDLE_UNBLOCK_INTERRUPTIONS();
return p;
}
ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
zend_mem_header *p = (zend_mem_header *) ((char *)ptr-sizeof(zend_mem_header)-PLATFORM_PADDING);
zend_mem_header *orig = p;
DECLARE_CACHE_VARS
ALS_FETCH();
if (!ptr) {
return _emalloc(size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
}
CALCULATE_REAL_SIZE_AND_CACHE_INDEX(size);
HANDLE_BLOCK_INTERRUPTIONS();
REMOVE_POINTER_FROM_LIST(p);
p = (zend_mem_header *) realloc(p,sizeof(zend_mem_header)+SIZE+PLATFORM_PADDING+END_ALIGNMENT(SIZE)+END_MAGIC_SIZE);
if (!p) {
if (!allow_failure) {
fprintf(stderr,"FATAL: erealloc(): Unable to allocate %ld bytes\n", (long) size);
#if ZEND_DEBUG && HAVE_KILL && HAVE_GETPID
kill(getpid(), SIGSEGV);
#else
exit(1);
#endif
}
ADD_POINTER_TO_LIST(orig);
HANDLE_UNBLOCK_INTERRUPTIONS();
return (void *)NULL;
}
ADD_POINTER_TO_LIST(p);
#if ZEND_DEBUG
p->filename = __zend_filename;
p->lineno = __zend_lineno;
p->magic = MEM_BLOCK_START_MAGIC;
*((long *)(((char *) p) + sizeof(zend_mem_header)+SIZE+PLATFORM_PADDING+END_ALIGNMENT(SIZE))) = MEM_BLOCK_END_MAGIC;
#endif
#if MEMORY_LIMIT
CHECK_MEMORY_LIMIT(size - p->size, SIZE - REAL_SIZE(p->size));
#endif
p->size = size;
HANDLE_UNBLOCK_INTERRUPTIONS();
return (void *)((char *)p+sizeof(zend_mem_header)+PLATFORM_PADDING);
}
ZEND_API char *_estrdup(const char *s ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
int length;
char *p;
length = strlen(s)+1;
HANDLE_BLOCK_INTERRUPTIONS();
p = (char *) _emalloc(length ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
if (!p) {
HANDLE_UNBLOCK_INTERRUPTIONS();
return (char *)NULL;
}
HANDLE_UNBLOCK_INTERRUPTIONS();
memcpy(p,s,length);
return p;
}
ZEND_API char *_estrndup(const char *s, uint length ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
char *p;
HANDLE_BLOCK_INTERRUPTIONS();
p = (char *) _emalloc(length+1 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
if (!p) {
HANDLE_UNBLOCK_INTERRUPTIONS();
return (char *)NULL;
}
HANDLE_UNBLOCK_INTERRUPTIONS();
memcpy(p,s,length);
p[length]=0;
return p;
}
ZEND_API char *zend_strndup(const char *s, uint length)
{
char *p;
p = (char *) malloc(length+1);
if (!p) {
return (char *)NULL;
}
if (length) {
memcpy(p,s,length);
}
p[length]=0;
return p;
}
ZEND_API int zend_set_memory_limit(unsigned int memory_limit)
{
#if MEMORY_LIMIT
ALS_FETCH();
AG(memory_limit) = memory_limit;
return SUCCESS;
#else
return FAILURE;
#endif
}
ZEND_API void start_memory_manager(ALS_D)
{
#ifndef ZTS
int i, j;
void *cached_entries[MAX_CACHED_MEMORY][MAX_CACHED_ENTRIES];
#endif
AG(phead) = AG(head) = NULL;
#if MEMORY_LIMIT
AG(memory_limit)=1<<30; /* rediculous limit, effectively no limit */
AG(allocated_memory)=0;
AG(memory_exhausted)=0;
#endif
memset(AG(fast_cache_list_head), 0, sizeof(AG(fast_cache_list_head)));
memset(AG(cache_count),0,sizeof(AG(cache_count)));
#ifndef ZTS
/* Initialize cache, to prevent fragmentation */
/* We can't do this in ZTS mode, because calling emalloc() from within start_memory_manager()
* will yield an endless recursion calling to alloc_globals_ctor()
*/
for (i=1; i<MAX_CACHED_MEMORY; i++) {
for (j=0; j<PRE_INIT_CACHE_ENTRIES; j++) {
cached_entries[i][j] = emalloc(8*i);
}
}
for (i=1; i<MAX_CACHED_MEMORY; i++) {
for (j=0; j<PRE_INIT_CACHE_ENTRIES; j++) {
efree(cached_entries[i][j]);
}
}
#endif
#if ZEND_DEBUG
memset(AG(cache_stats), 0, sizeof(AG(cache_stats)));
memset(AG(fast_cache_stats), 0, sizeof(AG(fast_cache_stats)));
#endif
}
ZEND_API void shutdown_memory_manager(int silent, int clean_cache)
{
zend_mem_header *p, *t;
unsigned int fci, i, j;
#if ZEND_DEBUG
int had_leaks=0;
#endif
zend_fast_cache_list_entry *fast_cache_list_entry, *next_fast_cache_list_entry;
ALS_FETCH();
for (fci=0; fci<MAX_FAST_CACHE_TYPES; fci++) {
fast_cache_list_entry = AG(fast_cache_list_head)[fci];
while (fast_cache_list_entry) {
next_fast_cache_list_entry = fast_cache_list_entry->next;
efree(fast_cache_list_entry);
fast_cache_list_entry = next_fast_cache_list_entry;
}
AG(fast_cache_list_head)[fci] = NULL;
}
p=AG(head);
t=AG(head);
while (t) {
if (!t->cached || clean_cache) {
#if ZEND_DEBUG
if (!t->cached && !t->reported) {
zend_mem_header *iterator;
int total_leak=0, total_leak_count=0;
had_leaks=1;
if (!silent) {
zend_message_dispatcher(ZMSG_MEMORY_LEAK_DETECTED, t);
}
t->reported = 1;
for (iterator=t->pNext; iterator; iterator=iterator->pNext) {
if (!iterator->cached
&& iterator->filename==t->filename
&& iterator->lineno==t->lineno) {
total_leak += iterator->size;
total_leak_count++;
iterator->reported = 1;
}
}
if (!silent && total_leak_count>0) {
zend_message_dispatcher(ZMSG_MEMORY_LEAK_REPEATED, (void *) (long) (total_leak_count));
}
}
#endif
#if MEMORY_LIMIT
AG(allocated_memory) -= t->size;
#endif
p = t->pNext;
REMOVE_POINTER_FROM_LIST(t);
free(t);
t = p;
} else {
t = t->pNext;
}
}
if(clean_cache) {
for (i=1; i<MAX_CACHED_MEMORY; i++) {
for (j=0; j<AG(cache_count)[i]; j++) {
free(AG(cache)[i][j]);
}
}
}
#if MEMORY_LIMIT
AG(memory_exhausted)=0;
#endif
#if (ZEND_DEBUG)
do {
zval display_memory_cache_stats;
int i, j;
if (clean_cache) {
/* we're shutting down completely, don't even touch the INI subsystem */
break;
}
if (zend_get_ini_entry("display_memory_cache_stats", sizeof("display_memory_cache_stats"), &display_memory_cache_stats)==FAILURE) {
break;
}
if (!atoi(display_memory_cache_stats.value.str.val)) {
break;
}
fprintf(stderr, "Memory cache statistics\n"
"-----------------------\n\n"
"[zval, %2ld]\t\t%d / %d (%.2f%%)\n"
"[hash, %2ld]\t\t%d / %d (%.2f%%)\n",
(long) sizeof(zval),
AG(fast_cache_stats)[ZVAL_CACHE_LIST][1], AG(fast_cache_stats)[ZVAL_CACHE_LIST][0]+AG(fast_cache_stats)[ZVAL_CACHE_LIST][1],
((double) AG(fast_cache_stats)[ZVAL_CACHE_LIST][1] / (AG(fast_cache_stats)[ZVAL_CACHE_LIST][0]+AG(fast_cache_stats)[ZVAL_CACHE_LIST][1]))*100,
(long) sizeof(HashTable),
AG(fast_cache_stats)[HASHTABLE_CACHE_LIST][1], AG(fast_cache_stats)[HASHTABLE_CACHE_LIST][0]+AG(fast_cache_stats)[HASHTABLE_CACHE_LIST][1],
((double) AG(fast_cache_stats)[HASHTABLE_CACHE_LIST][1] / (AG(fast_cache_stats)[HASHTABLE_CACHE_LIST][0]+AG(fast_cache_stats)[HASHTABLE_CACHE_LIST][1]))*100);
for (i=0; i<MAX_CACHED_MEMORY; i+=2) {
fprintf(stderr, "[%2d, %2d]\t\t", i, i+1);
for (j=0; j<2; j++) {
fprintf(stderr, "%d / %d (%.2f%%)\t\t",
AG(cache_stats)[i+j][1], AG(cache_stats)[i+j][0]+AG(cache_stats)[i+j][1],
((double) AG(cache_stats)[i+j][1] / (AG(cache_stats)[i+j][0]+AG(cache_stats)[i+j][1]))*100);
}
fprintf(stderr, "\n");
}
} while (0);
#endif
}
#if ZEND_DEBUG
void zend_debug_alloc_output(char *format, ...)
{
char output_buf[256];
va_list args;
va_start(args, format);
vsprintf(output_buf, format, args);
va_end(args);
#ifdef ZEND_WIN32
OutputDebugString(output_buf);
#else
fprintf(stderr, output_buf);
#endif
}
ZEND_API int _mem_block_check(void *ptr, int silent ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
zend_mem_header *p = (zend_mem_header *) ((char *)ptr - sizeof(zend_mem_header) - PLATFORM_PADDING);
int no_cache_notice=0;
int valid_beginning=1;
int had_problems=0;
if (silent==2) {
silent=1;
no_cache_notice=1;
}
if (silent==3) {
silent=0;
no_cache_notice=1;
}
if (!silent) {
zend_message_dispatcher(ZMSG_LOG_SCRIPT_NAME, NULL);
zend_debug_alloc_output("---------------------------------------\n");
zend_debug_alloc_output("%s(%d) : Block 0x%0.8lX status:\n" ZEND_FILE_LINE_RELAY_CC, (long) p);
if (__zend_orig_filename) {
zend_debug_alloc_output("%s(%d) : Actual location (location was relayed)\n" ZEND_FILE_LINE_ORIG_RELAY_CC);
}
zend_debug_alloc_output("%10s\t","Beginning: ");
}
switch (p->magic) {
case MEM_BLOCK_START_MAGIC:
if (!silent) {
zend_debug_alloc_output("OK (allocated on %s:%d, %d bytes)\n", p->filename, p->lineno, p->size);
}
break; /* ok */
case MEM_BLOCK_FREED_MAGIC:
if (!silent) {
zend_debug_alloc_output("Freed\n");
had_problems=1;
} else {
return _mem_block_check(ptr, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
}
break;
case MEM_BLOCK_CACHED_MAGIC:
if (!silent) {
if (!no_cache_notice) {
zend_debug_alloc_output("Cached (allocated on %s:%d, %d bytes)\n", p->filename, p->lineno, p->size);
had_problems=1;
}
} else {
if (!no_cache_notice) {
return _mem_block_check(ptr, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
}
}
break;
default:
if (!silent) {
zend_debug_alloc_output("Overrun (magic=0x%0.8lX, expected=0x%0.8lX)\n", p->magic, MEM_BLOCK_START_MAGIC);
} else {
return _mem_block_check(ptr, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
}
had_problems=1;
valid_beginning=0;
break;
}
if (valid_beginning
&& *((long *)(((char *) p)+sizeof(zend_mem_header)+REAL_SIZE(p->size)+PLATFORM_PADDING+END_ALIGNMENT(REAL_SIZE(p->size)))) != MEM_BLOCK_END_MAGIC) {
long magic_num = MEM_BLOCK_END_MAGIC;
char *overflow_ptr, *magic_ptr=(char *) &magic_num;
int overflows=0;
int i;
if (silent) {
return _mem_block_check(ptr, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
}
had_problems=1;
overflow_ptr = ((char *) p)+sizeof(zend_mem_header)+REAL_SIZE(p->size)+PLATFORM_PADDING;
for (i=0; i<sizeof(long); i++) {
if (overflow_ptr[i]!=magic_ptr[i]) {
overflows++;
}
}
zend_debug_alloc_output("%10s\t", "End:");
zend_debug_alloc_output("Overflown (magic=0x%0.8lX instead of 0x%0.8lX)\n",
*((long *)(((char *) p) + sizeof(zend_mem_header)+REAL_SIZE(p->size)+PLATFORM_PADDING+END_ALIGNMENT(REAL_SIZE(p->size)))), MEM_BLOCK_END_MAGIC);
zend_debug_alloc_output("%10s\t","");
if (overflows>=sizeof(long)) {
zend_debug_alloc_output("At least %d bytes overflown\n", sizeof(long));
} else {
zend_debug_alloc_output("%d byte(s) overflown\n", overflows);
}
} else if (!silent) {
zend_debug_alloc_output("%10s\t", "End:");
if (valid_beginning) {
zend_debug_alloc_output("OK\n");
} else {
zend_debug_alloc_output("Unknown\n");
}
}
if (had_problems) {
int foo = 5;
foo+=1;
}
if (!silent) {
zend_debug_alloc_output("---------------------------------------\n");
}
return ((!had_problems) ? 1 : 0);
}
ZEND_API void _full_mem_check(int silent ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
zend_mem_header *p;
int errors=0;
ALS_FETCH();
p = AG(head);
zend_debug_alloc_output("------------------------------------------------\n");
zend_debug_alloc_output("Full Memory Check at %s:%d\n" ZEND_FILE_LINE_RELAY_CC);
while (p) {
if (!_mem_block_check((void *)((char *)p + sizeof(zend_mem_header) + PLATFORM_PADDING), (silent?2:3) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC)) {
errors++;
}
p = p->pNext;
}
zend_debug_alloc_output("End of full memory check %s:%d (%d errors)\n" ZEND_FILE_LINE_RELAY_CC, errors);
zend_debug_alloc_output("------------------------------------------------\n");
}
#endif
ZEND_API int _persist_alloc(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
zend_mem_header *p = (zend_mem_header *) ((char *)ptr-sizeof(zend_mem_header)-PLATFORM_PADDING);
ALS_FETCH();
#if ZEND_DEBUG
_mem_block_check(ptr, 1 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
#endif
HANDLE_BLOCK_INTERRUPTIONS();
/* remove the block from the non persistent list */
REMOVE_POINTER_FROM_LIST(p);
p->persistent = 1;
/* add the block to the persistent list */
ADD_POINTER_TO_LIST(p);
HANDLE_UNBLOCK_INTERRUPTIONS();
return REAL_SIZE(p->size)+sizeof(zend_mem_header)+PLATFORM_PADDING;
}
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
-136
View File
@@ -1,136 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_ALLOC_H
#define ZEND_ALLOC_H
#include <stdio.h>
#include "zend_globals_macros.h"
#define MEM_BLOCK_START_MAGIC 0x7312F8DCL
#define MEM_BLOCK_END_MAGIC 0x2A8FCC84L
#define MEM_BLOCK_FREED_MAGIC 0x99954317L
#define MEM_BLOCK_CACHED_MAGIC 0xFB8277DCL
typedef struct _zend_mem_header {
#if ZEND_DEBUG
long magic;
char *filename;
uint lineno;
int reported;
char *orig_filename;
uint orig_lineno;
#endif
struct _zend_mem_header *pNext;
struct _zend_mem_header *pLast;
unsigned int size:30;
unsigned int persistent:1;
unsigned int cached:1;
} zend_mem_header;
typedef union _align_test {
void *ptr;
double dbl;
long lng;
} align_test;
#define MAX_CACHED_MEMORY 11
#define MAX_CACHED_ENTRIES 256
#define PRE_INIT_CACHE_ENTRIES 32
#if (defined (__GNUC__) && __GNUC__ >= 2)
#define PLATFORM_ALIGNMENT (__alignof__ (align_test))
#else
#define PLATFORM_ALIGNMENT (sizeof(align_test))
#endif
#define PLATFORM_PADDING (((PLATFORM_ALIGNMENT-sizeof(zend_mem_header))%PLATFORM_ALIGNMENT+PLATFORM_ALIGNMENT)%PLATFORM_ALIGNMENT)
ZEND_API char *zend_strndup(const char *s, unsigned int length);
BEGIN_EXTERN_C()
ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
ZEND_API void _efree(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
ZEND_API void *_ecalloc(size_t nmemb, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
ZEND_API char *_estrdup(const char *s ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
ZEND_API char *_estrndup(const char *s, unsigned int length ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
ZEND_API int _persist_alloc(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
/* Standard wrapper macros */
#define emalloc(size) _emalloc((size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
#define efree(ptr) _efree((ptr) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
#define ecalloc(nmemb,size) _ecalloc((nmemb), (size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
#define erealloc(ptr,size) _erealloc((ptr), (size),0 ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
#define erealloc_recoverable(ptr,size) _erealloc((ptr), (size),1 ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
#define estrdup(s) _estrdup((s) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
#define estrndup(s,length) _estrndup((s), (length) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
#define persist_alloc(p) _persist_alloc((p) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
/* Relay wrapper macros */
#define emalloc_rel(size) _emalloc((size) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
#define efree_rel(ptr) _efree((ptr) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
#define ecalloc_rel(nmemb, size) _ecalloc((nmemb), (size) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
#define erealloc_rel(ptr, size) _erealloc((ptr), (size), 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
#define erealloc_recoverable_rel(ptr, size) _erealloc((ptr), (size), 1 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
#define estrdup_rel(s) _estrdup((s) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
#define estrndup_rel(s, length) _estrndup((s), (length) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
#define persist_alloc_rel(p) _persist_alloc((p) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
/* Selective persistent/non persistent allocation macros */
#define pemalloc(size,persistent) ((persistent)?malloc(size):emalloc(size))
#define pefree(ptr,persistent) ((persistent)?free(ptr):efree(ptr))
#define pecalloc(nmemb,size,persistent) ((persistent)?calloc((nmemb),(size)):ecalloc((nmemb),(size)))
#define perealloc(ptr,size,persistent) ((persistent)?realloc((ptr),(size)):erealloc((ptr),(size)))
#define perealloc_recoverable(ptr,size,persistent) ((persistent)?realloc((ptr),(size)):erealloc_recoverable((ptr),(size)))
#define pestrdup(s,persistent) ((persistent)?strdup(s):estrdup(s))
#define safe_estrdup(ptr) ((ptr)?(estrdup(ptr)):(empty_string))
#define safe_estrndup(ptr,len) ((ptr)?(estrndup((ptr),(len))):(empty_string))
ZEND_API int zend_set_memory_limit(unsigned int memory_limit);
ZEND_API void start_memory_manager(ALS_D);
ZEND_API void shutdown_memory_manager(int silent, int clean_cache);
#if ZEND_DEBUG
ZEND_API int _mem_block_check(void *ptr, int silent ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
ZEND_API void _full_mem_check(int silent ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
void zend_debug_alloc_output(char *format, ...);
#define mem_block_check(ptr, silent) _mem_block_check(ptr, silent ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
#define full_mem_check(silent) _full_mem_check(silent ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
#else
#define mem_block_check(type, ptr, silent)
#define full_mem_check(silent)
#endif
END_EXTERN_C()
#endif
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
-930
View File
@@ -1,930 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include "zend.h"
#include "zend_API.h"
#include "zend_builtin_functions.h"
#include "zend_constants.h"
#undef ZEND_TEST_EXCEPTIONS
static ZEND_FUNCTION(zend_version);
static ZEND_FUNCTION(func_num_args);
static ZEND_FUNCTION(func_get_arg);
static ZEND_FUNCTION(func_get_args);
static ZEND_FUNCTION(strlen);
static ZEND_FUNCTION(strcmp);
static ZEND_FUNCTION(strncmp);
static ZEND_FUNCTION(strcasecmp);
static ZEND_FUNCTION(strncasecmp);
static ZEND_FUNCTION(each);
static ZEND_FUNCTION(error_reporting);
static ZEND_FUNCTION(define);
static ZEND_FUNCTION(defined);
static ZEND_FUNCTION(get_class);
static ZEND_FUNCTION(get_parent_class);
static ZEND_FUNCTION(method_exists);
static ZEND_FUNCTION(class_exists);
static ZEND_FUNCTION(function_exists);
static ZEND_FUNCTION(leak);
#ifdef ZEND_TEST_EXCEPTIONS
static ZEND_FUNCTION(crash);
#endif
static ZEND_FUNCTION(get_included_files);
static ZEND_FUNCTION(is_subclass_of);
static ZEND_FUNCTION(get_class_vars);
static ZEND_FUNCTION(get_object_vars);
static ZEND_FUNCTION(get_class_methods);
static ZEND_FUNCTION(trigger_error);
static ZEND_FUNCTION(set_error_handler);
static ZEND_FUNCTION(restore_error_handler);
static ZEND_FUNCTION(get_declared_classes);
static ZEND_FUNCTION(create_function);
static ZEND_FUNCTION(get_resource_type);
#if ZEND_DEBUG
static ZEND_FUNCTION(zend_test_func);
#endif
unsigned char first_arg_force_ref[] = { 1, BYREF_FORCE };
unsigned char first_arg_allow_ref[] = { 1, BYREF_ALLOW };
unsigned char second_arg_force_ref[] = { 2, BYREF_NONE, BYREF_FORCE };
unsigned char second_arg_allow_ref[] = { 2, BYREF_NONE, BYREF_ALLOW };
static zend_function_entry builtin_functions[] = {
ZEND_FE(zend_version, NULL)
ZEND_FE(func_num_args, NULL)
ZEND_FE(func_get_arg, NULL)
ZEND_FE(func_get_args, NULL)
ZEND_FE(strlen, NULL)
ZEND_FE(strcmp, NULL)
ZEND_FE(strncmp, NULL)
ZEND_FE(strcasecmp, NULL)
ZEND_FE(strncasecmp, NULL)
ZEND_FE(each, first_arg_force_ref)
ZEND_FE(error_reporting, NULL)
ZEND_FE(define, NULL)
ZEND_FE(defined, NULL)
ZEND_FE(get_class, NULL)
ZEND_FE(get_parent_class, NULL)
ZEND_FE(method_exists, NULL)
ZEND_FE(class_exists, NULL)
ZEND_FE(function_exists, NULL)
ZEND_FE(leak, NULL)
#ifdef ZEND_TEST_EXCEPTIONS
ZEND_FE(crash, NULL)
#endif
ZEND_FE(get_included_files, NULL)
ZEND_FALIAS(get_required_files, get_included_files, NULL)
ZEND_FE(is_subclass_of, NULL)
ZEND_FE(get_class_vars, NULL)
ZEND_FE(get_object_vars, NULL)
ZEND_FE(get_class_methods, NULL)
ZEND_FE(trigger_error, NULL)
ZEND_FALIAS(user_error, trigger_error, NULL)
ZEND_FE(set_error_handler, NULL)
ZEND_FE(restore_error_handler, NULL)
ZEND_FE(get_declared_classes, NULL)
ZEND_FE(create_function, NULL)
ZEND_FE(get_resource_type, NULL)
#if ZEND_DEBUG
ZEND_FE(zend_test_func, NULL)
#endif
{ NULL, NULL, NULL }
};
int zend_startup_builtin_functions()
{
return zend_register_functions(builtin_functions, NULL, MODULE_PERSISTENT);
}
ZEND_FUNCTION(zend_version)
{
RETURN_STRINGL(ZEND_VERSION, sizeof(ZEND_VERSION)-1, 1);
}
ZEND_FUNCTION(func_num_args)
{
void **p;
int arg_count;
p = EG(argument_stack).top_element-1-1;
arg_count = (ulong) *p; /* this is the amount of arguments passed to func_num_args(); */
p -= 1+arg_count;
if (*p) {
zend_error(E_ERROR, "func_num_args(): Can't be used as a function parameter");
}
--p;
if (p>=EG(argument_stack).elements) {
RETURN_LONG((ulong) *p);
} else {
zend_error(E_WARNING, "func_num_args(): Called from the global scope - no function context");
RETURN_LONG(-1);
}
}
ZEND_FUNCTION(func_get_arg)
{
void **p;
int arg_count;
zval **z_requested_offset;
zval *arg;
long requested_offset;
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &z_requested_offset)==FAILURE) {
RETURN_FALSE;
}
convert_to_long_ex(z_requested_offset);
requested_offset = (*z_requested_offset)->value.lval;
p = EG(argument_stack).top_element-1-1;
arg_count = (ulong) *p; /* this is the amount of arguments passed to func_get_arg(); */
p -= 1+arg_count;
if (*p) {
zend_error(E_ERROR, "func_get_arg(): Can't be used as a function parameter");
}
--p;
if (p<EG(argument_stack).elements) {
zend_error(E_WARNING, "func_get_arg(): Called from the global scope - no function context");
RETURN_FALSE;
}
arg_count = (ulong) *p;
if (requested_offset>=arg_count) {
zend_error(E_WARNING, "func_get_arg(): Argument %d not passed to function", requested_offset);
RETURN_FALSE;
}
arg = *(p-(arg_count-requested_offset));
*return_value = *arg;
zval_copy_ctor(return_value);
}
ZEND_FUNCTION(func_get_args)
{
void **p;
int arg_count;
int i;
p = EG(argument_stack).top_element-1-1;
arg_count = (ulong) *p; /* this is the amount of arguments passed to func_get_args(); */
p -= 1+arg_count;
if (*p) {
zend_error(E_ERROR, "func_get_args(): Can't be used as a function parameter");
}
--p;
if (p<EG(argument_stack).elements) {
zend_error(E_WARNING, "func_get_args(): Called from the global scope - no function context");
RETURN_FALSE;
}
arg_count = (ulong) *p;
array_init(return_value);
for (i=0; i<arg_count; i++) {
zval *element;
ALLOC_ZVAL(element);
*element = **((zval **) (p-(arg_count-i)));
zval_copy_ctor(element);
INIT_PZVAL(element);
zend_hash_next_index_insert(return_value->value.ht, &element, sizeof(zval *), NULL);
}
}
/* {{{ proto int strlen(string str)
Get string length */
ZEND_FUNCTION(strlen)
{
zval **str;
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
convert_to_string_ex(str);
RETVAL_LONG((*str)->value.str.len);
}
/* }}} */
/* {{{ proto int strcmp(string str1, string str2)
Binary safe string comparison */
ZEND_FUNCTION(strcmp)
{
zval **s1, **s2;
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &s1, &s2) == FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
convert_to_string_ex(s1);
convert_to_string_ex(s2);
RETURN_LONG(zend_binary_zval_strcmp(*s1,*s2));
}
/* }}} */
/* {{{ proto int strncmp(string str1, string str2, int len)
Binary safe string comparison */
ZEND_FUNCTION(strncmp)
{
zval **s1, **s2, **s3;
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &s1, &s2, &s3) == FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
convert_to_string_ex(s1);
convert_to_string_ex(s2);
convert_to_long_ex(s3);
RETURN_LONG(zend_binary_zval_strncmp(*s1,*s2,*s3));
}
/* }}} */
/* {{{ proto int strcasecmp(string str1, string str2)
Binary safe case-insensitive string comparison */
ZEND_FUNCTION(strcasecmp)
{
zval **s1, **s2;
if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2, &s1, &s2) == FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
convert_to_string_ex(s1);
convert_to_string_ex(s2);
RETURN_LONG(zend_binary_zval_strcasecmp(*s1, *s2));
}
/* }}} */
/* {{{ proto int strncasecmp(string str1, string str2, int len)
Binary safe string comparison */
ZEND_FUNCTION(strncasecmp)
{
zval **s1, **s2, **s3;
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &s1, &s2, &s3) == FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
convert_to_string_ex(s1);
convert_to_string_ex(s2);
convert_to_long_ex(s3);
RETURN_LONG(zend_binary_zval_strncasecmp(*s1,*s2,*s3));
}
/* }}} */
ZEND_FUNCTION(each)
{
zval **array,*entry,**entry_ptr, *tmp;
char *string_key;
ulong num_key;
zval **inserted_pointer;
HashTable *target_hash;
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &array) == FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
target_hash = HASH_OF(*array);
if (!target_hash) {
zend_error(E_WARNING,"Variable passed to each() is not an array or object");
return;
}
if (zend_hash_get_current_data(target_hash, (void **) &entry_ptr)==FAILURE) {
RETURN_FALSE;
}
array_init(return_value);
entry = *entry_ptr;
/* add value elements */
if (entry->is_ref) {
ALLOC_ZVAL(tmp);
*tmp = *entry;
zval_copy_ctor(tmp);
tmp->is_ref=0;
tmp->refcount=0;
entry=tmp;
}
zend_hash_index_update(return_value->value.ht, 1, &entry, sizeof(zval *), NULL);
entry->refcount++;
zend_hash_update(return_value->value.ht, "value", sizeof("value"), &entry, sizeof(zval *), NULL);
entry->refcount++;
/* add the key elements */
switch (zend_hash_get_current_key(target_hash, &string_key, &num_key)) {
case HASH_KEY_IS_STRING:
add_get_index_string(return_value,0,string_key,(void **) &inserted_pointer,0);
break;
case HASH_KEY_IS_LONG:
add_get_index_long(return_value,0,num_key, (void **) &inserted_pointer);
break;
}
zend_hash_update(return_value->value.ht, "key", sizeof("key"), inserted_pointer, sizeof(zval *), NULL);
(*inserted_pointer)->refcount++;
zend_hash_move_forward(target_hash);
}
ZEND_FUNCTION(error_reporting)
{
zval **arg;
int old_error_reporting;
old_error_reporting = EG(error_reporting);
switch (ZEND_NUM_ARGS()) {
case 0:
break;
case 1:
if (zend_get_parameters_ex(1,&arg) == FAILURE) {
RETURN_FALSE;
}
convert_to_long_ex(arg);
EG(error_reporting)=(*arg)->value.lval;
break;
default:
ZEND_WRONG_PARAM_COUNT();
break;
}
RETVAL_LONG(old_error_reporting);
}
ZEND_FUNCTION(define)
{
zval **var, **val, **non_cs;
int case_sensitive;
zend_constant c;
switch(ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &var, &val)==FAILURE) {
RETURN_FALSE;
}
case_sensitive = CONST_CS;
break;
case 3:
if (zend_get_parameters_ex(3, &var, &val, &non_cs)==FAILURE) {
RETURN_FALSE;
}
convert_to_long_ex(non_cs);
if ((*non_cs)->value.lval) {
case_sensitive = 0;
} else {
case_sensitive = CONST_CS;
}
break;
default:
ZEND_WRONG_PARAM_COUNT();
break;
}
switch((*val)->type) {
case IS_LONG:
case IS_DOUBLE:
case IS_STRING:
case IS_BOOL:
case IS_RESOURCE:
case IS_NULL:
break;
default:
zend_error(E_WARNING,"Constants may only evaluate to scalar values");
RETURN_FALSE;
break;
}
convert_to_string_ex(var);
c.value = **val;
zval_copy_ctor(&c.value);
c.flags = case_sensitive; /* non persistent */
c.name = zend_strndup((*var)->value.str.val, (*var)->value.str.len);
c.name_len = (*var)->value.str.len+1;
if(zend_register_constant(&c ELS_CC) == SUCCESS) {
RETURN_TRUE;
} else {
RETURN_FALSE;
}
}
ZEND_FUNCTION(defined)
{
zval **var;
zval c;
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &var)==FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
convert_to_string_ex(var);
if (zend_get_constant((*var)->value.str.val, (*var)->value.str.len, &c)) {
zval_dtor(&c);
RETURN_LONG(1);
} else {
RETURN_LONG(0);
}
}
/* {{{ proto string get_class(object object)
Retrieves the class name */
ZEND_FUNCTION(get_class)
{
zval **arg;
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &arg)==FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
if ((*arg)->type != IS_OBJECT) {
RETURN_FALSE;
}
RETURN_STRINGL((*arg)->value.obj.ce->name, (*arg)->value.obj.ce->name_length, 1);
}
/* }}} */
/* {{{ proto string get_parent_class(object object)
Retrieves the parent class name */
ZEND_FUNCTION(get_parent_class)
{
zval **arg;
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &arg)==FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
if (((*arg)->type != IS_OBJECT) || !(*arg)->value.obj.ce->parent) {
RETURN_FALSE;
}
RETURN_STRINGL((*arg)->value.obj.ce->parent->name, (*arg)->value.obj.ce->parent->name_length, 1);
}
/* }}} */
/* {{{ proto bool is_subclass_of(object object, string class_name)
Returns true if the object has this class as one of its parents */
ZEND_FUNCTION(is_subclass_of)
{
zval **obj, **class_name;
char *lcname;
zend_class_entry *parent_ce = NULL;
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &obj, &class_name)==FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
if ((*obj)->type != IS_OBJECT) {
RETURN_FALSE;
}
convert_to_string_ex(class_name);
lcname = estrndup((*class_name)->value.str.val, (*class_name)->value.str.len);
zend_str_tolower(lcname, (*class_name)->value.str.len);
for (parent_ce = (*obj)->value.obj.ce->parent; parent_ce != NULL; parent_ce = parent_ce->parent) {
if (!strcmp(parent_ce->name, lcname)) {
efree(lcname);
RETURN_TRUE;
}
}
efree(lcname);
RETURN_FALSE;
}
/* }}} */
/* {{{ proto array get_class_vars(string class_name)
Returns an array of default properties of the class */
ZEND_FUNCTION(get_class_vars)
{
zval **class_name;
char *lcname;
zend_class_entry *ce;
zval *tmp;
CLS_FETCH();
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &class_name)==FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
convert_to_string_ex(class_name);
lcname = estrndup((*class_name)->value.str.val, (*class_name)->value.str.len);
zend_str_tolower(lcname, (*class_name)->value.str.len);
if (zend_hash_find(CG(class_table), lcname, (*class_name)->value.str.len+1, (void **)&ce)==FAILURE) {
efree(lcname);
RETURN_FALSE;
} else {
efree(lcname);
array_init(return_value);
zend_hash_copy(return_value->value.ht, &ce->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
}
}
/* }}} */
/* {{{ proto array get_object_vars(object obj)
Returns an array of object properties */
ZEND_FUNCTION(get_object_vars)
{
zval **obj;
zval *tmp;
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &obj) == FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
if ((*obj)->type != IS_OBJECT) {
RETURN_FALSE;
}
array_init(return_value);
zend_hash_copy(return_value->value.ht, (*obj)->value.obj.properties,
(copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
}
/* }}} */
/* {{{ proto array get_class_methods(string class_name)
Returns an array of class methods' names */
ZEND_FUNCTION(get_class_methods)
{
zval **class_name;
zval *method_name;
char *lcname;
zend_class_entry *ce;
char *string_key;
ulong num_key;
int key_type;
CLS_FETCH();
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &class_name)==FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
convert_to_string_ex(class_name);
lcname = estrndup((*class_name)->value.str.val, (*class_name)->value.str.len);
zend_str_tolower(lcname, (*class_name)->value.str.len);
if (zend_hash_find(CG(class_table), lcname, (*class_name)->value.str.len+1, (void **)&ce)==FAILURE) {
efree(lcname);
RETURN_NULL();
} else {
efree(lcname);
array_init(return_value);
zend_hash_internal_pointer_reset(&ce->function_table);
while ((key_type = zend_hash_get_current_key(&ce->function_table, &string_key, &num_key)) != HASH_KEY_NON_EXISTANT) {
if (key_type == HASH_KEY_IS_STRING) {
MAKE_STD_ZVAL(method_name);
ZVAL_STRING(method_name, string_key, 0);
zend_hash_next_index_insert(return_value->value.ht, &method_name, sizeof(zval *), NULL);
}
zend_hash_move_forward(&ce->function_table);
}
}
}
/* }}} */
/* {{{ proto bool method_exists(object object, string method)
Checks if the class method exists */
ZEND_FUNCTION(method_exists)
{
zval **klass, **method_name;
char *lcname;
if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2, &klass, &method_name)==FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
if ((*klass)->type != IS_OBJECT) {
RETURN_FALSE;
}
convert_to_string_ex(method_name);
lcname = estrndup((*method_name)->value.str.val, (*method_name)->value.str.len);
zend_str_tolower(lcname, (*method_name)->value.str.len);
if(zend_hash_exists(&(*klass)->value.obj.ce->function_table, lcname, (*method_name)->value.str.len+1)) {
efree(lcname);
RETURN_TRUE;
} else {
efree(lcname);
RETURN_FALSE;
}
}
/* }}} */
/* {{{ proto bool class_exists(string classname)
Checks if the class exists */
ZEND_FUNCTION(class_exists)
{
zval **class_name;
char *lcname;
CLS_FETCH();
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &class_name)==FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
convert_to_string_ex(class_name);
lcname = estrndup((*class_name)->value.str.val, (*class_name)->value.str.len);
zend_str_tolower(lcname, (*class_name)->value.str.len);
if (zend_hash_exists(CG(class_table), lcname, (*class_name)->value.str.len+1)) {
efree(lcname);
RETURN_TRUE;
} else {
efree(lcname);
RETURN_FALSE;
}
}
/* }}} */
/* {{{ proto bool function_exists(string function_name)
Checks if the function exists */
ZEND_FUNCTION(function_exists)
{
zval **function_name;
char *lcname;
int retval;
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &function_name)==FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
convert_to_string_ex(function_name);
lcname = estrndup((*function_name)->value.str.val, (*function_name)->value.str.len);
zend_str_tolower(lcname, (*function_name)->value.str.len);
retval = zend_hash_exists(EG(function_table), lcname, (*function_name)->value.str.len+1);
efree(lcname);
RETURN_BOOL(retval);
}
/* }}} */
ZEND_FUNCTION(leak)
{
int leakbytes=3;
zval **leak;
if (ZEND_NUM_ARGS()>=1) {
if (zend_get_parameters_ex(1, &leak)==SUCCESS) {
convert_to_long_ex(leak);
leakbytes = (*leak)->value.lval;
}
}
emalloc(leakbytes);
}
#ifdef ZEND_TEST_EXCEPTIONS
ZEND_FUNCTION(crash)
{
char *nowhere=NULL;
memcpy(nowhere, "something", sizeof("something"));
}
#endif
static int copy_import_use_file(zend_file_handle *fh, zval *array)
{
if (fh->filename) {
char *extension_start;
extension_start = strstr(fh->filename, zend_uv.import_use_extension);
if (extension_start) {
*extension_start = 0;
if (fh->opened_path) {
add_assoc_string(array, fh->filename, fh->opened_path, 1);
} else {
add_assoc_stringl(array, fh->filename, "N/A", sizeof("N/A")-1, 1);
}
*extension_start = zend_uv.import_use_extension[0];
}
}
return 0;
}
/* {{{ proto array get_included_files(void)
Returns an array with the file names that were include_once()'d */
ZEND_FUNCTION(get_included_files)
{
if (ZEND_NUM_ARGS() != 0) {
ZEND_WRONG_PARAM_COUNT();
}
array_init(return_value);
zend_hash_apply_with_argument(&EG(included_files), (apply_func_arg_t) copy_import_use_file, return_value);
}
/* }}} */
/* {{{ proto void trigger_error(string messsage [, int error_type])
Generates a user-level error/warning/notice message */
ZEND_FUNCTION(trigger_error)
{
int error_type = E_USER_NOTICE;
zval **z_error_type, **z_error_message;
switch(ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &z_error_message)==FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
break;
case 2:
if (zend_get_parameters_ex(2, &z_error_message, &z_error_type)==FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
convert_to_long_ex(z_error_type);
error_type = (*z_error_type)->value.lval;
switch (error_type) {
case E_USER_ERROR:
case E_USER_WARNING:
case E_USER_NOTICE:
break;
default:
zend_error(E_WARNING, "Invalid error type specified");
RETURN_FALSE;
break;
}
break;
}
convert_to_string_ex(z_error_message);
zend_error(error_type, (*z_error_message)->value.str.val);
RETURN_TRUE;
}
/* }}} */
/* {{{ proto string set_error_handler(string error_handler)
Sets a user-defined error handler function. Returns the previously defined error handler, or false on error */
ZEND_FUNCTION(set_error_handler)
{
zval **error_handler;
zend_bool had_orig_error_handler=0;
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &error_handler)==FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
convert_to_string_ex(error_handler);
if (EG(user_error_handler)) {
had_orig_error_handler = 1;
*return_value = *EG(user_error_handler);
zval_copy_ctor(return_value);
zend_ptr_stack_push(&EG(user_error_handlers), EG(user_error_handler));
}
ALLOC_ZVAL(EG(user_error_handler));
if (Z_STRLEN_PP(error_handler)==0) { /* unset user-defined handler */
FREE_ZVAL(EG(user_error_handler));
EG(user_error_handler) = NULL;
RETURN_TRUE;
}
*EG(user_error_handler) = **error_handler;
zval_copy_ctor(EG(user_error_handler));
if (!had_orig_error_handler) {
RETURN_NULL();
}
}
/* }}} */
/* {{{ proto void restore_error_handler(void)
Restores the previously defined error handler function */
ZEND_FUNCTION(restore_error_handler)
{
if (EG(user_error_handler)) {
zval_ptr_dtor(&EG(user_error_handler));
}
if (zend_ptr_stack_num_elements(&EG(user_error_handlers))==0) {
EG(user_error_handler) = NULL;
} else {
EG(user_error_handler) = zend_ptr_stack_pop(&EG(user_error_handlers));
}
RETURN_TRUE;
}
static int copy_class_name(zend_class_entry *ce, int num_args, va_list args, zend_hash_key *hash_key)
{
zval *array = va_arg(args, zval *);
if (hash_key->nKeyLength==0 || hash_key->arKey[0]!=0) {
add_next_index_stringl(array, ce->name, ce->name_length, 1);
}
return 0;
}
/* {{{ proto array get_declared_classes(void)
Returns an array of all declared classes. */
ZEND_FUNCTION(get_declared_classes)
{
CLS_FETCH();
if (ZEND_NUM_ARGS() != 0) {
ZEND_WRONG_PARAM_COUNT();
}
array_init(return_value);
zend_hash_apply_with_arguments(CG(class_table), (apply_func_args_t)copy_class_name, 1, return_value);
}
/* }}} */
#define LAMBDA_TEMP_FUNCNAME "__lambda_func"
/* {{{ proto string create_function(string args, string code)
Creates an anonymous function, and returns its name (funny, eh?) */
ZEND_FUNCTION(create_function)
{
char *eval_code, *function_name;
int eval_code_length, function_name_length;
zval **z_function_args, **z_function_code;
int retval;
CLS_FETCH();
if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2, &z_function_args, &z_function_code)==FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
convert_to_string_ex(z_function_args);
convert_to_string_ex(z_function_code);
eval_code_length = sizeof("function " LAMBDA_TEMP_FUNCNAME)
+Z_STRLEN_PP(z_function_args)
+2 /* for the args parentheses */
+2 /* for the curly braces */
+Z_STRLEN_PP(z_function_code);
eval_code = (char *) emalloc(eval_code_length);
sprintf(eval_code, "function " LAMBDA_TEMP_FUNCNAME "(%s){%s}", Z_STRVAL_PP(z_function_args), Z_STRVAL_PP(z_function_code));
retval = zend_eval_string(eval_code, NULL CLS_CC ELS_CC);
efree(eval_code);
if (retval==SUCCESS) {
zend_function *func;
if (zend_hash_find(EG(function_table), LAMBDA_TEMP_FUNCNAME, sizeof(LAMBDA_TEMP_FUNCNAME), (void **) &func)==FAILURE) {
zend_error(E_ERROR, "Unexpected inconsistency in create_function()");
RETURN_FALSE;
}
function_add_ref(func);
function_name = (char *) emalloc(sizeof("0lambda_")+MAX_LENGTH_OF_LONG);
do {
sprintf(function_name, "%clambda_%d", 0, ++EG(lambda_count));
function_name_length = strlen(function_name+1)+1;
} while (zend_hash_add(EG(function_table), function_name, function_name_length+1, func, sizeof(zend_function), NULL)==FAILURE);
zend_hash_del(EG(function_table), LAMBDA_TEMP_FUNCNAME, sizeof(LAMBDA_TEMP_FUNCNAME));
RETURN_STRINGL(function_name, function_name_length, 0);
} else {
RETURN_FALSE;
}
}
/* }}} */
#if ZEND_DEBUG
ZEND_FUNCTION(zend_test_func)
{
zval *arg1, *arg2;
zend_get_parameters(ht, 2, &arg1, &arg2);
}
#endif
ZEND_FUNCTION(get_resource_type)
{
char *resource_type;
zval **z_resource_type;
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &z_resource_type)==FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
if (Z_TYPE_PP(z_resource_type) != IS_RESOURCE) {
zend_error(E_WARNING, "Supplied argument is not a valid resource handle");
RETURN_FALSE;
}
resource_type = zend_rsrc_list_get_rsrc_type(Z_LVAL_PP(z_resource_type));
if (resource_type) {
RETURN_STRING(resource_type, 1);
} else {
RETURN_STRING("Unknown", 1);
}
}
-26
View File
@@ -1,26 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_BUILTIN_FUNCTIONS_H
#define ZEND_BUILTIN_FUNCTIONS_H
int zend_startup_builtin_functions(void);
#endif /* ZEND_BUILTIN_FUNCTIONS_H */
-2344
View File
File diff suppressed because it is too large. Load diff
-628
View File
@@ -1,628 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_COMPILE_H
#define ZEND_COMPILE_H
#include "zend.h"
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#endif
#ifdef __cplusplus
#include <istream.h>
#endif
#include "zend_llist.h"
#define DEBUG_ZEND 0
#ifndef ZTS
# define SUPPORT_INTERACTIVE 1
#else
# define SUPPORT_INTERACTIVE 0
#endif
#define FREE_PNODE(znode) zval_dtor(&znode->u.constant);
#define FREE_OP(op, should_free) if (should_free) zval_dtor(&Ts[(op)->u.var].tmp_var);
#if SUPPORT_INTERACTIVE
#define INC_BPC(op_array) ((op_array)->backpatch_count++)
#define DEC_BPC(op_array) ((op_array)->backpatch_count--)
#define HANDLE_INTERACTIVE() if (EG(interactive)) { execute_new_code(CLS_C); }
#else
#define INC_BPC(op_array)
#define DEC_BPC(op_array)
#define HANDLE_INTERACTIVE()
#endif
typedef struct _zend_op_array zend_op_array;
typedef struct _znode {
int op_type;
union {
zval constant;
zend_uint var;
zend_uint opline_num; /* Needs to be signed */
zend_uint fetch_type;
zend_op_array *op_array;
struct {
zend_uint var; /* dummy */
zend_uint type;
} EA;
} u;
} znode;
typedef struct _zend_op {
zend_uchar opcode;
znode result;
znode op1;
znode op2;
ulong extended_value;
uint lineno;
} zend_op;
typedef struct _zend_brk_cont_element {
int cont;
int brk;
int parent;
} zend_brk_cont_element;
struct _zend_op_array {
zend_uchar type; /* MUST be the first element of this struct! */
zend_uchar *arg_types; /* MUST be the second element of this struct! */
char *function_name; /* MUST be the third element of this struct! */
zend_uint *refcount;
zend_op *opcodes;
zend_uint last, size;
zend_uint T;
zend_brk_cont_element *brk_cont_array;
zend_uint last_brk_cont;
zend_uint current_brk_cont;
zend_bool uses_globals;
/* static variables support */
HashTable *static_variables;
#if SUPPORT_INTERACTIVE
int start_op_number, end_op_number;
int last_executed_op_number;
int backpatch_count;
#endif
zend_bool return_reference;
zend_bool done_pass_two;
char *filename;
void *reserved[ZEND_MAX_RESERVED_RESOURCES];
};
typedef struct _zend_internal_function {
zend_uchar type; /* MUST be the first element of this struct! */
zend_uchar *arg_types; /* MUST be the second element of this struct */
char *function_name; /* MUST be the third element of this struct */
void (*handler)(INTERNAL_FUNCTION_PARAMETERS);
} zend_internal_function;
typedef struct _zend_overloaded_function {
zend_uchar type; /* MUST be the first element of this struct! */
zend_uchar *arg_types; /* MUST be the second element of this struct */
char *function_name; /* MUST be the third element of this struct */
zend_uint var;
} zend_overloaded_function;
typedef union _zend_function {
zend_uchar type; /* MUST be the first element of this struct! */
struct {
zend_uchar type; /* never used */
zend_uchar *arg_types;
char *function_name;
} common;
zend_op_array op_array;
zend_internal_function internal_function;
zend_overloaded_function overloaded_function;
} zend_function;
typedef struct _zend_function_state {
HashTable *function_symbol_table;
zend_function *function;
void *reserved[ZEND_MAX_RESERVED_RESOURCES];
} zend_function_state;
typedef struct _zend_switch_entry {
znode cond;
int default_case;
int control_var;
} zend_switch_entry;
typedef struct _list_llist_element {
znode var;
zend_llist dimensions;
znode value;
} list_llist_element;
typedef struct _zend_file_handle {
zend_uchar type;
char *filename;
char *opened_path;
union {
int fd;
FILE *fp;
#ifdef __cplusplus
istream *is;
#endif
} handle;
zend_bool free_filename;
} zend_file_handle;
#define IS_CONST (1<<0)
#define IS_TMP_VAR (1<<1)
#define IS_VAR (1<<2)
#define IS_UNUSED (1<<3) /* Unused variable */
#define EXT_TYPE_UNUSED (1<<0)
#include "zend_globals.h"
BEGIN_EXTERN_C()
void init_compiler(CLS_D ELS_DC);
void shutdown_compiler(CLS_D);
extern ZEND_API zend_op_array *(*zend_compile_file)(zend_file_handle *file_handle, int type CLS_DC);
void zend_activate(CLS_D ELS_DC);
void zend_deactivate(CLS_D ELS_DC);
void zend_activate_modules(void);
void zend_deactivate_modules(void);
int lex_scan(zval *zendlval CLS_DC);
void startup_scanner(CLS_D);
void shutdown_scanner(CLS_D);
ZEND_API char *zend_set_compiled_filename(char *new_compiled_filename);
ZEND_API void zend_restore_compiled_filename(char *original_compiled_filename);
ZEND_API char *zend_get_compiled_filename(CLS_D);
ZEND_API int zend_get_compiled_lineno(CLS_D);
#ifdef ZTS
const char *zend_get_zendtext(CLS_D);
int zend_get_zendleng(CLS_D);
#endif
/* parser-driven code generators */
void do_binary_op(int op, znode *result, znode *op1, znode *op2 CLS_DC);
void do_unary_op(int op, znode *result, znode *op1 CLS_DC);
void do_binary_assign_op(int op, znode *result, znode *op1, znode *op2 CLS_DC);
void do_assign(znode *result, znode *variable, znode *value CLS_DC);
void do_assign_ref(znode *result, znode *lvar, znode *rvar CLS_DC);
void fetch_simple_variable(znode *result, znode *varname, int bp CLS_DC);
void fetch_simple_variable_ex(znode *result, znode *varname, int bp, int op CLS_DC);
void do_indirect_references(znode *result, znode *num_references, znode *variable CLS_DC);
void do_fetch_global_or_static_variable(znode *varname, znode *static_assignment, int fetch_type CLS_DC);
void do_fetch_globals(znode *varname CLS_DC);
void fetch_array_begin(znode *result, znode *varname, znode *first_dim CLS_DC);
void fetch_array_dim(znode *result, znode *parent, znode *dim CLS_DC);
void fetch_string_offset(znode *result, znode *parent, znode *offset CLS_DC);
void do_print(znode *result, znode *arg CLS_DC);
void do_echo(znode *arg CLS_DC);
typedef int (*unary_op_type)(zval *, zval *);
ZEND_API unary_op_type get_unary_op(int opcode);
ZEND_API void *get_binary_op(int opcode);
void do_while_cond(znode *expr, znode *close_bracket_token CLS_DC);
void do_while_end(znode *while_token, znode *close_bracket_token CLS_DC);
void do_do_while_begin(CLS_D);
void do_do_while_end(znode *do_token, znode *expr_open_bracket, znode *expr CLS_DC);
void do_if_cond(znode *cond, znode *closing_bracket_token CLS_DC);
void do_if_after_statement(znode *closing_bracket_token, unsigned char initialize CLS_DC);
void do_if_end(CLS_D);
void do_for_cond(znode *expr, znode *second_semicolon_token CLS_DC);
void do_for_before_statement(znode *cond_start, znode *second_semicolon_token CLS_DC);
void do_for_end(znode *second_semicolon_token CLS_DC);
void do_pre_incdec(znode *result, znode *op1, int op CLS_DC);
void do_post_incdec(znode *result, znode *op1, int op CLS_DC);
void do_begin_variable_parse(CLS_D);
void do_end_variable_parse(int type, int arg_offset CLS_DC);
void do_free(znode *op1 CLS_DC);
void do_init_string(znode *result CLS_DC);
void do_add_char(znode *result, znode *op1, znode *op2 CLS_DC);
void do_add_string(znode *result, znode *op1, znode *op2 CLS_DC);
void do_add_variable(znode *result, znode *op1, znode *op2 CLS_DC);
void do_begin_function_declaration(znode *function_token, znode *function_name, int is_method, int return_reference CLS_DC);
void do_end_function_declaration(znode *function_token CLS_DC);
void do_receive_arg(int op, znode *var, znode *offset, znode *initialization, unsigned char pass_type CLS_DC);
int do_begin_function_call(znode *function_name CLS_DC);
void do_begin_dynamic_function_call(znode *function_name CLS_DC);
void do_begin_class_member_function_call(znode *class_name, znode *function_name CLS_DC);
void do_end_function_call(znode *function_name, znode *result, znode *argument_list, int is_method, int is_dynamic_fcall CLS_DC);
void do_return(znode *expr, int do_end_vparse CLS_DC);
ZEND_API int do_bind_function_or_class(zend_op *opline, HashTable *function_table, HashTable *class_table, int compile_time);
void do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce);
void do_early_binding(CLS_D);
void do_pass_param(znode *param, int op, int offset CLS_DC);
void do_boolean_or_begin(znode *expr1, znode *op_token CLS_DC);
void do_boolean_or_end(znode *result, znode *expr1, znode *expr2, znode *op_token CLS_DC);
void do_boolean_and_begin(znode *expr1, znode *op_token CLS_DC);
void do_boolean_and_end(znode *result, znode *expr1, znode *expr2, znode *op_token CLS_DC);
void do_brk_cont(int op, znode *expr CLS_DC);
void do_switch_cond(znode *cond CLS_DC);
void do_switch_end(znode *case_list CLS_DC);
void do_case_before_statement(znode *case_list, znode *case_token, znode *case_expr CLS_DC);
void do_case_after_statement(znode *result, znode *case_token CLS_DC);
void do_default_before_statement(znode *case_list, znode *default_token CLS_DC);
void do_begin_class_declaration(znode *class_name, znode *parent_class_name CLS_DC);
void do_end_class_declaration(CLS_D);
void do_declare_property(znode *var_name, znode *value CLS_DC);
void do_fetch_property(znode *result, znode *object, znode *property CLS_DC);
void do_push_object(znode *object CLS_DC);
void do_pop_object(znode *object CLS_DC);
void do_begin_new_object(znode *new_token, znode *class_name CLS_DC);
void do_end_new_object(znode *result, znode *class_name, znode *new_token, znode *argument_list CLS_DC);
void do_fetch_constant(znode *result, znode *constant_name, int mode CLS_DC);
void do_shell_exec(znode *result, znode *cmd CLS_DC);
void do_init_array(znode *result, znode *expr, znode *offset, int is_ref CLS_DC);
void do_add_array_element(znode *result, znode *expr, znode *offset, int is_ref CLS_DC);
void do_add_static_array_element(znode *result, znode *offset, znode *expr);
void do_list_init(CLS_D);
void do_list_end(znode *result, znode *expr CLS_DC);
void do_add_list_element(znode *element CLS_DC);
void do_new_list_begin(CLS_D);
void do_new_list_end(CLS_D);
void do_cast(znode *result, znode *expr, int type CLS_DC);
void do_include_or_eval(int type, znode *result, znode *op1 CLS_DC);
void do_unset(znode *variable CLS_DC);
void do_isset_or_isempty(int type, znode *result, znode *variable CLS_DC);
void do_foreach_begin(znode *foreach_token, znode *array, znode *open_brackets_token, znode *as_token, int variable CLS_DC);
void do_foreach_cont(znode *value, znode *key, znode *as_token CLS_DC);
void do_foreach_end(znode *foreach_token, znode *open_brackets_token CLS_DC);
void do_declare_begin(CLS_D);
void do_declare_stmt(znode *var, znode *val CLS_DC);
void do_declare_end(CLS_D);
void do_end_heredoc(CLS_D);
void do_exit(znode *result, znode *message CLS_DC);
void do_begin_silence(znode *strudel_token CLS_DC);
void do_end_silence(znode *strudel_token CLS_DC);
void do_begin_qm_op(znode *cond, znode *qm_token CLS_DC);
void do_qm_true(znode *true_value, znode *qm_token, znode *colon_token CLS_DC);
void do_qm_false(znode *result, znode *false_value, znode *qm_token, znode *colon_token CLS_DC);
void do_extended_info(CLS_D);
void do_extended_fcall_begin(CLS_D);
void do_extended_fcall_end(CLS_D);
void do_ticks(CLS_D);
ZEND_API void function_add_ref(zend_function *function);
#define INITIAL_OP_ARRAY_SIZE 64
/* helper functions in zend-scanner.l */
ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type CLS_DC);
ZEND_API zend_op_array *compile_string(zval *source_string CLS_DC);
ZEND_API zend_op_array *compile_filename(int type, zval *filename CLS_DC ELS_DC);
ZEND_API int zend_execute_scripts(int type CLS_DC ELS_DC, int file_count, ...);
ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC);
ZEND_API void init_op_array(zend_op_array *op_array, int type, int initial_ops_size CLS_DC);
ZEND_API void destroy_op_array(zend_op_array *op_array);
ZEND_API void zend_destroy_file_handle(zend_file_handle *file_handle CLS_DC);
ZEND_API void zend_file_handle_dtor(zend_file_handle *fh);
ZEND_API void destroy_zend_function(zend_function *function);
ZEND_API void destroy_zend_class(zend_class_entry *ce);
void zend_class_add_ref(zend_class_entry *ce);
#define ZEND_FUNCTION_DTOR (void (*)(void *)) destroy_zend_function
#define ZEND_CLASS_DTOR (void (*)(void *)) destroy_zend_class
zend_op *get_next_op(zend_op_array *op_array CLS_DC);
void init_op(zend_op *op CLS_DC);
int get_next_op_number(zend_op_array *op_array);
int print_class(zend_class_entry *class_entry);
void print_op_array(zend_op_array *op_array, int optimizations);
int pass_two(zend_op_array *op_array);
zend_brk_cont_element *get_next_brk_cont_element(zend_op_array *op_array);
ZEND_API zend_bool zend_is_compiling(void);
int zendlex(znode *zendlval CLS_DC);
#define ZEND_NOP 0
#define ZEND_ADD 1
#define ZEND_SUB 2
#define ZEND_MUL 3
#define ZEND_DIV 4
#define ZEND_MOD 5
#define ZEND_SL 6
#define ZEND_SR 7
#define ZEND_CONCAT 8
#define ZEND_BW_OR 9
#define ZEND_BW_AND 10
#define ZEND_BW_XOR 11
#define ZEND_BW_NOT 12
#define ZEND_BOOL_NOT 13
#define ZEND_BOOL_XOR 14
#define ZEND_IS_IDENTICAL 15
#define ZEND_IS_NOT_IDENTICAL 16
#define ZEND_IS_EQUAL 17
#define ZEND_IS_NOT_EQUAL 18
#define ZEND_IS_SMALLER 19
#define ZEND_IS_SMALLER_OR_EQUAL 20
#define ZEND_CAST 21
#define ZEND_QM_ASSIGN 22
#define ZEND_ASSIGN_ADD 23
#define ZEND_ASSIGN_SUB 24
#define ZEND_ASSIGN_MUL 25
#define ZEND_ASSIGN_DIV 26
#define ZEND_ASSIGN_MOD 27
#define ZEND_ASSIGN_SL 28
#define ZEND_ASSIGN_SR 29
#define ZEND_ASSIGN_CONCAT 30
#define ZEND_ASSIGN_BW_OR 31
#define ZEND_ASSIGN_BW_AND 32
#define ZEND_ASSIGN_BW_XOR 33
#define ZEND_PRE_INC 34
#define ZEND_PRE_DEC 35
#define ZEND_POST_INC 36
#define ZEND_POST_DEC 37
#define ZEND_ASSIGN 38
#define ZEND_ASSIGN_REF 39
#define ZEND_ECHO 40
#define ZEND_PRINT 41
#define ZEND_JMP 42
#define ZEND_JMPZ 43
#define ZEND_JMPNZ 44
#define ZEND_JMPZNZ 45
#define ZEND_JMPZ_EX 46
#define ZEND_JMPNZ_EX 47
#define ZEND_CASE 48
#define ZEND_SWITCH_FREE 49
#define ZEND_BRK 50
#define ZEND_CONT 51
#define ZEND_BOOL 52
#define ZEND_INIT_STRING 53
#define ZEND_ADD_CHAR 54
#define ZEND_ADD_STRING 55
#define ZEND_ADD_VAR 56
#define ZEND_BEGIN_SILENCE 57
#define ZEND_END_SILENCE 58
#define ZEND_INIT_FCALL_BY_NAME 59
#define ZEND_DO_FCALL 60
#define ZEND_DO_FCALL_BY_NAME 61
#define ZEND_RETURN 62
#define ZEND_RECV 63
#define ZEND_RECV_INIT 64
#define ZEND_SEND_VAL 65
#define ZEND_SEND_VAR 66
#define ZEND_SEND_REF 67
#define ZEND_NEW 68
#define ZEND_JMP_NO_CTOR 69
#define ZEND_FREE 70
#define ZEND_INIT_ARRAY 71
#define ZEND_ADD_ARRAY_ELEMENT 72
#define ZEND_INCLUDE_OR_EVAL 73
#define ZEND_UNSET_VAR 74
#define ZEND_UNSET_DIM_OBJ 75
#define ZEND_ISSET_ISEMPTY 76
#define ZEND_FE_RESET 77
#define ZEND_FE_FETCH 78
#define ZEND_EXIT 79
/* the following 18 opcodes are 6 groups of 3 opcodes each, and must
* remain in that order!
*/
#define ZEND_FETCH_R 80
#define ZEND_FETCH_DIM_R 81
#define ZEND_FETCH_OBJ_R 82
#define ZEND_FETCH_W 83
#define ZEND_FETCH_DIM_W 84
#define ZEND_FETCH_OBJ_W 85
#define ZEND_FETCH_RW 86
#define ZEND_FETCH_DIM_RW 87
#define ZEND_FETCH_OBJ_RW 88
#define ZEND_FETCH_IS 89
#define ZEND_FETCH_DIM_IS 90
#define ZEND_FETCH_OBJ_IS 91
#define ZEND_FETCH_FUNC_ARG 92
#define ZEND_FETCH_DIM_FUNC_ARG 93
#define ZEND_FETCH_OBJ_FUNC_ARG 94
#define ZEND_FETCH_UNSET 95
#define ZEND_FETCH_DIM_UNSET 96
#define ZEND_FETCH_OBJ_UNSET 97
#define ZEND_FETCH_DIM_TMP_VAR 98
#define ZEND_FETCH_CONSTANT 99
#define ZEND_DECLARE_FUNCTION_OR_CLASS 100
#define ZEND_EXT_STMT 101
#define ZEND_EXT_FCALL_BEGIN 102
#define ZEND_EXT_FCALL_END 103
#define ZEND_EXT_NOP 104
#define ZEND_TICKS 105
/* end of block */
/* global/local fetches */
#define ZEND_FETCH_GLOBAL 0
#define ZEND_FETCH_LOCAL 1
#define ZEND_FETCH_STATIC 2
/* var status for backpatching */
#define BP_VAR_R 0
#define BP_VAR_W 1
#define BP_VAR_RW 2
#define BP_VAR_IS 3
#define BP_VAR_NA 4 /* if not applicable */
#define BP_VAR_FUNC_ARG 5
#define BP_VAR_UNSET 6
#define ZEND_INTERNAL_FUNCTION 1
#define ZEND_USER_FUNCTION 2
#define ZEND_OVERLOADED_FUNCTION 3
#define ZEND_EVAL_CODE 4
#define ZEND_INTERNAL_CLASS 1
#define ZEND_USER_CLASS 2
#define ZEND_EVAL (1<<0)
#define ZEND_INCLUDE (1<<1)
#define ZEND_INCLUDE_ONCE (1<<2)
#define ZEND_REQUIRE (1<<3)
#define ZEND_REQUIRE_ONCE (1<<4)
#define ZEND_ISSET (1<<0)
#define ZEND_ISEMPTY (1<<1)
#define ZEND_CT (1<<0)
#define ZEND_RT (1<<1)
#define ZEND_HANDLE_FILENAME 0
#define ZEND_HANDLE_FD 1
#define ZEND_HANDLE_FP 2
#define ZEND_HANDLE_STDIOSTREAM 3
#define ZEND_HANDLE_FSTREAM 4
#define ZEND_DECLARE_CLASS 1
#define ZEND_DECLARE_FUNCTION 2
#define ZEND_DECLARE_INHERITED_CLASS 3
#define ZEND_FETCH_STANDARD 0
#define ZEND_FETCH_ADD_LOCK 1
#define ZEND_MEMBER_FUNC_CALL 1<<0
#define ZEND_CTOR_CALL 1<<1
#define AI_USE_PTR(ai) \
if ((ai).ptr_ptr) { \
(ai).ptr = *((ai).ptr_ptr); \
(ai).ptr_ptr = &((ai).ptr); \
} else { \
(ai).ptr = NULL; \
}
/* Lost In Stupid Parentheses */
#define ARG_SHOULD_BE_SENT_BY_REF(offset, conduct_check, arg_types) \
( \
conduct_check \
&& arg_types \
&& \
( \
( \
offset<=arg_types[0] \
&& arg_types[offset]==BYREF_FORCE \
) \
|| ( \
offset>=arg_types[0] \
&& arg_types[arg_types[0]]==BYREF_FORCE_REST \
) \
) \
)
#define ZEND_RETURN_VAL 0
#define ZEND_RETURN_REF 1
END_EXTERN_C()
#endif /* ZEND_COMPILE_H */
-90
View File
@@ -1,90 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Z
eev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_CONFIG_W32_H
#define ZEND_CONFIG_W32_H
#include <string.h>
#include <windows.h>
#include <float.h>
typedef unsigned long ulong;
typedef unsigned int uint;
#define HAVE_ALLOCA 1
#define HAVE_LIMITS_H 1
#include <malloc.h>
#undef HAVE_KILL
#define HAVE_GETPID 1
/* #define HAVE_ALLOCA_H 1 */
#define HAVE_MEMCPY 1
#define HAVE_STRDUP 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_STDIOSTR_H 1
#define HAVE_CLASS_ISTDIOSTREAM
#define istdiostream stdiostream
#define HAVE_STDARG_H 1
#define HAVE_SNPRINTF 1
#define HAVE_VSNPRINTF 1
#define vsnprintf _vsnprintf
#define zend_isinf(a) 0
#ifdef inline
#undef inline
#endif
#define zend_sprintf sprintf
/* This will cause the compilation process to be MUCH longer, but will generate
* a much quicker PHP binary
*/
#ifdef ZEND_WIN32_FORCE_INLINE
# define inline __forceinline
#else
# define inline
#endif
#define zend_finite(A) _finite(A)
#define zend_isnan(A) _isnan(A)
#ifdef LIBZEND_EXPORTS
# define ZEND_API __declspec(dllexport)
#else
# define ZEND_API __declspec(dllimport)
#endif
#define ZEND_DLEXPORT __declspec(dllexport)
/* 0x00200000L is MB_SERVICE_NOTIFICATION, which is only supported under Windows NT
* (and requires _WIN32_WINNT to be defined, which prevents the resulting executable
* from running under Windows 9x
* Windows 9x should silently ignore it, so it's being used here directly
*/
#ifndef MB_SERVICE_NOTIFICATION
#define MB_SERVICE_NOTIFICATION 0x00200000L
#endif
#define ZEND_SERVICE_MB_STYLE (MB_TOPMOST|MB_SERVICE_NOTIFICATION)
#endif /* ZEND_CONFIG_W32_H */
-267
View File
@@ -1,267 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include "zend.h"
#include "zend_constants.h"
#include "zend_variables.h"
#include "zend_operators.h"
#include "zend_globals.h"
void free_zend_constant(zend_constant *c)
{
if (!(c->flags & CONST_PERSISTENT)) {
zval_dtor(&c->value);
}
free(c->name);
}
void copy_zend_constant(zend_constant *c)
{
c->name = zend_strndup(c->name, c->name_len);
if (!(c->flags & CONST_PERSISTENT)) {
zval_copy_ctor(&c->value);
}
}
void zend_copy_constants(HashTable *target, HashTable *source)
{
zend_constant tmp_constant;
zend_hash_copy(target, source, (copy_ctor_func_t) copy_zend_constant, &tmp_constant, sizeof(zend_constant));
}
static int clean_non_persistent_constant(zend_constant *c)
{
if (c->flags & CONST_PERSISTENT) {
return 0;
} else {
return 1;
}
}
static int clean_module_constant(zend_constant *c, int *module_number)
{
if (c->module_number == *module_number) {
return 1;
} else {
return 0;
}
}
void clean_module_constants(int module_number)
{
ELS_FETCH();
zend_hash_apply_with_argument(EG(zend_constants), (int (*)(void *,void *)) clean_module_constant, (void *) &module_number);
}
int zend_startup_constants(ELS_D)
{
#ifdef ZEND_WIN32
DWORD dwBuild=0;
DWORD dwVersion = GetVersion();
DWORD dwWindowsMajorVersion = (DWORD)(LOBYTE(LOWORD(dwVersion)));
DWORD dwWindowsMinorVersion = (DWORD)(HIBYTE(LOWORD(dwVersion)));
#endif
EG(zend_constants) = (HashTable *) malloc(sizeof(HashTable));
if (zend_hash_init(EG(zend_constants), 20, NULL, ZEND_CONSTANT_DTOR, 1)==FAILURE) {
return FAILURE;
}
return SUCCESS;
}
void zend_register_standard_constants(ELS_D)
{
REGISTER_MAIN_LONG_CONSTANT("E_ERROR", E_ERROR, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_WARNING", E_WARNING, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_PARSE", E_PARSE, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_NOTICE", E_NOTICE, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_CORE_ERROR", E_CORE_ERROR, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_CORE_WARNING", E_CORE_WARNING, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_COMPILE_ERROR", E_COMPILE_ERROR, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_COMPILE_WARNING", E_COMPILE_WARNING, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_USER_ERROR", E_USER_ERROR, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_USER_WARNING", E_USER_WARNING, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_USER_NOTICE", E_USER_NOTICE, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_ALL", E_ALL, CONST_PERSISTENT | CONST_CS);
/* true/false constants */
{
zend_constant c;
c.value.type = IS_BOOL;
c.flags = CONST_PERSISTENT;
c.module_number = 0;
c.name = zend_strndup(ZEND_STRL("TRUE"));
c.name_len = sizeof("TRUE");
c.value.value.lval = 1;
c.value.type = IS_BOOL;
zend_register_constant(&c ELS_CC);
c.name = zend_strndup(ZEND_STRL("FALSE"));
c.name_len = sizeof("FALSE");
c.value.value.lval = 0;
c.value.type = IS_BOOL;
zend_register_constant(&c ELS_CC);
c.name = zend_strndup(ZEND_STRL("ZEND_THREAD_SAFE"));
c.name_len = sizeof("ZEND_THREAD_SAFE");
c.value.value.lval = ZTS_V;
c.value.type = IS_BOOL;
zend_register_constant(&c ELS_CC);
c.name = zend_strndup(ZEND_STRL("NULL"));
c.name_len = sizeof("NULL");
c.value.type = IS_NULL;
zend_register_constant(&c ELS_CC);
}
}
int zend_shutdown_constants(ELS_D)
{
zend_hash_destroy(EG(zend_constants));
free(EG(zend_constants));
return SUCCESS;
}
void clean_non_persistent_constants(void)
{
ELS_FETCH();
zend_hash_apply(EG(zend_constants), (int (*)(void *)) clean_non_persistent_constant);
}
ZEND_API void zend_register_long_constant(char *name, uint name_len, long lval, int flags, int module_number ELS_DC)
{
zend_constant c;
c.value.type = IS_LONG;
c.value.value.lval = lval;
c.flags = flags;
c.name = zend_strndup(name,name_len);
c.name_len = name_len;
c.module_number = module_number;
zend_register_constant(&c ELS_CC);
}
ZEND_API void zend_register_double_constant(char *name, uint name_len, double dval, int flags, int module_number ELS_DC)
{
zend_constant c;
c.value.type = IS_DOUBLE;
c.value.value.dval = dval;
c.flags = flags;
c.name = zend_strndup(name,name_len);
c.name_len = name_len;
c.module_number = module_number;
zend_register_constant(&c ELS_CC);
}
ZEND_API void zend_register_stringl_constant(char *name, uint name_len, char *strval, uint strlen, int flags, int module_number ELS_DC)
{
zend_constant c;
c.value.type = IS_STRING;
c.value.value.str.val = strval;
c.value.value.str.len = strlen;
c.flags = flags;
c.name = zend_strndup(name,name_len);
c.name_len = name_len;
c.module_number = module_number;
zend_register_constant(&c ELS_CC);
}
ZEND_API void zend_register_string_constant(char *name, uint name_len, char *strval, int flags, int module_number ELS_DC)
{
zend_register_stringl_constant(name, name_len, strval, strlen(strval), flags, module_number ELS_CC);
}
ZEND_API int zend_get_constant(char *name, uint name_len, zval *result)
{
zend_constant *c;
char *lookup_name = estrndup(name,name_len);
int retval;
ELS_FETCH();
zend_str_tolower(lookup_name, name_len);
if (zend_hash_find(EG(zend_constants), lookup_name, name_len+1, (void **) &c)==SUCCESS) {
if ((c->flags & CONST_CS) && memcmp(c->name, name, name_len)!=0) {
retval=0;
} else {
retval=1;
*result = c->value;
zval_copy_ctor(result);
}
} else {
retval=0;
}
efree(lookup_name);
return retval;
}
ZEND_API int zend_register_constant(zend_constant *c ELS_DC)
{
char *lowercase_name = zend_strndup(c->name, c->name_len);
int ret = SUCCESS;
#if 0
printf("Registering constant for module %d\n",c->module_number);
#endif
zend_str_tolower(lowercase_name, c->name_len);
if (zend_hash_add(EG(zend_constants), lowercase_name, c->name_len, (void *) c, sizeof(zend_constant), NULL)==FAILURE) {
zval_dtor(&c->value);
zend_error(E_NOTICE,"Constant %s already defined",lowercase_name);
ret = FAILURE;
}
free(lowercase_name);
return ret;
}
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
-64
View File
@@ -1,64 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_CONSTANTS_H
#define ZEND_CONSTANTS_H
#include "zend_globals.h"
#define CONST_CS 0x1 /* Case Sensitive */
#define CONST_PERSISTENT 0x2
typedef struct _zend_constant {
zval value;
int flags;
char *name;
uint name_len;
int module_number;
} zend_constant;
#define REGISTER_LONG_CONSTANT(name,lval,flags) zend_register_long_constant((name),sizeof(name),(lval),(flags),module_number ELS_CC)
#define REGISTER_DOUBLE_CONSTANT(name,dval,flags) zend_register_double_constant((name),sizeof(name),(dval),(flags),module_number ELS_CC)
#define REGISTER_STRING_CONSTANT(name,str,flags) zend_register_string_constant((name),sizeof(name),(str),(flags),module_number ELS_CC)
#define REGISTER_STRINGL_CONSTANT(name,str,len,flags) zend_register_stringl_constant((name),sizeof(name),(str),(len),(flags),module_number ELS_CC)
#define REGISTER_MAIN_LONG_CONSTANT(name,lval,flags) zend_register_long_constant((name),sizeof(name),(lval),(flags),0 ELS_CC)
#define REGISTER_MAIN_DOUBLE_CONSTANT(name,dval,flags) zend_register_double_constant((name),sizeof(name),(dval),(flags),0 ELS_CC)
#define REGISTER_MAIN_STRING_CONSTANT(name,str,flags) zend_register_string_constant((name),sizeof(name),(str),(flags),0 ELS_CC)
#define REGISTER_MAIN_STRINGL_CONSTANT(name,str,len,flags) zend_register_stringl_constant((name),sizeof(name),(str),(len),(flags),0 ELS_CC)
void clean_module_constants(int module_number);
void free_zend_constant(zend_constant *c);
int zend_startup_constants(ELS_D);
int zend_shutdown_constants(ELS_D);
void zend_register_standard_constants(ELS_D);
void clean_non_persistent_constants(void);
ZEND_API int zend_get_constant(char *name, uint name_len, zval *result);
ZEND_API void zend_register_long_constant(char *name, uint name_len, long lval, int flags, int module_number ELS_DC);
ZEND_API void zend_register_double_constant(char *name, uint name_len, double dval, int flags, int module_number ELS_DC);
ZEND_API void zend_register_string_constant(char *name, uint name_len, char *strval, int flags, int module_number ELS_DC);
ZEND_API void zend_register_stringl_constant(char *name, uint name_len, char *strval, uint strlen, int flags, int module_number ELS_DC);
ZEND_API int zend_register_constant(zend_constant *c ELS_DC);
void zend_copy_constants(HashTable *target, HashTable *sourc);
void copy_zend_constant(zend_constant *c);
#define ZEND_CONSTANT_DTOR (void (*)(void *)) free_zend_constant
#endif
-62
View File
@@ -1,62 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include "zend.h"
typedef struct _dynamic_array {
char *array;
unsigned int element_size;
unsigned int current;
unsigned int allocated;
} dynamic_array;
ZEND_API int zend_dynamic_array_init(dynamic_array *da, unsigned int element_size, unsigned int size)
{
da->element_size = element_size;
da->allocated = size;
da->current = 0;
da->array = (char *) emalloc(size*element_size);
if (da->array == NULL) {
return 1;
}
return 0;
}
ZEND_API void *zend_dynamic_array_push(dynamic_array *da)
{
if (da->current == da->allocated) {
da->allocated *= 2;
da->array = (char *) erealloc(da->array, da->allocated*da->element_size);
}
return (void *)(da->array+(da->current++)*da->element_size);
}
ZEND_API void *zend_dynamic_array_pop(dynamic_array *da)
{
return (void *)(da->array+(--(da->current))*da->element_size);
}
ZEND_API void *zend_dynamic_array_get_element(dynamic_array *da, unsigned int index)
{
if (index >= da->current) {
return NULL;
}
return (void *)(da->array+index*da->element_size);
}
-38
View File
@@ -1,38 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_DYNAMIC_ARRAY_H
#define ZEND_DYNAMIC_ARRAY_H
typedef struct _dynamic_array {
char *array;
unsigned int element_size;
unsigned int last_used;
unsigned int allocated;
} dynamic_array;
BEGIN_EXTERN_C()
ZEND_API int zend_dynamic_array_init(dynamic_array *da);
ZEND_API void *zend_dynamic_array_push(dynamic_array *da);
ZEND_API void *zend_dynamic_array_pop(dynamic_array *da);
ZEND_API void *zend_dynamic_array_get_element(dynamic_array *da, unsigned int index);
END_EXTERN_C()
#endif /* ZEND_DYNAMIC_ARRAY_H */
-40
View File
@@ -1,40 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_ERRORS_H
#define ZEND_ERRORS_H
#define E_ERROR (1<<0L)
#define E_WARNING (1<<1L)
#define E_PARSE (1<<2L)
#define E_NOTICE (1<<3L)
#define E_CORE_ERROR (1<<4L)
#define E_CORE_WARNING (1<<5L)
#define E_COMPILE_ERROR (1<<6L)
#define E_COMPILE_WARNING (1<<7L)
#define E_USER_ERROR (1<<8L)
#define E_USER_WARNING (1<<9L)
#define E_USER_NOTICE (1<<10L)
#define E_ALL (E_ERROR | E_WARNING | E_PARSE | E_NOTICE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE)
#define E_CORE (E_CORE_ERROR | E_CORE_WARNING)
#endif /* ZEND_ERRORS_H */
-2328
View File
File diff suppressed because it is too large. Load diff
-232
View File
@@ -1,232 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_EXECUTE_H
#define ZEND_EXECUTE_H
#include "zend_compile.h"
#include "zend_hash.h"
#include "zend_variables.h"
#include "zend_execute_locks.h"
typedef union _temp_variable {
zval tmp_var;
struct {
zval **ptr_ptr;
zval *ptr;
} var;
struct {
zval tmp_var; /* a dummy */
union {
struct {
zval *str;
int offset;
} str_offset;
zend_property_reference overloaded_element;
} data;
unsigned char type;
} EA;
} temp_variable;
ZEND_API extern void (*zend_execute)(zend_op_array *op_array ELS_DC);
void init_executor(CLS_D ELS_DC);
void shutdown_executor(ELS_D);
void execute(zend_op_array *op_array ELS_DC);
ZEND_API int zend_is_true(zval *op);
ZEND_API inline void safe_free_zval_ptr(zval *p)
#if defined(C9X_INLINE_SEMANTICS)
{
ELS_FETCH();
if (p!=EG(uninitialized_zval_ptr)) {
FREE_ZVAL(p);
}
}
#else
;
#endif
ZEND_API int zend_eval_string(char *str, zval *retval_ptr CLS_DC ELS_DC);
ZEND_API inline int i_zend_is_true(zval *op)
#if defined(C9X_INLINE_SEMANTICS)
{
int result;
switch (op->type) {
case IS_NULL:
result = 0;
break;
case IS_LONG:
case IS_BOOL:
case IS_RESOURCE:
result = (op->value.lval?1:0);
break;
case IS_DOUBLE:
result = (op->value.dval ? 1 : 0);
break;
case IS_STRING:
if (op->value.str.len == 0
|| (op->value.str.len==1 && op->value.str.val[0]=='0')) {
result = 0;
} else {
result = 1;
}
break;
case IS_ARRAY:
result = (zend_hash_num_elements(op->value.ht)?1:0);
break;
case IS_OBJECT:
result = (zend_hash_num_elements(op->value.obj.properties)?1:0);
break;
default:
result = 0;
break;
}
return result;
}
#else
;
#endif
ZEND_API int zval_update_constant(zval **pp, void *arg);
/* dedicated Zend executor functions - do not use! */
ZEND_API inline void zend_ptr_stack_clear_multiple(ELS_D)
#if defined(C9X_INLINE_SEMANTICS)
{
void **p = EG(argument_stack).top_element-2;
int delete_count = (ulong) *p;
EG(argument_stack).top -= (delete_count+2);
while (--delete_count>=0) {
zval_ptr_dtor((zval **) --p);
}
EG(argument_stack).top_element = p;
}
#else
;
#endif
ZEND_API inline int zend_ptr_stack_get_arg(int requested_arg, void **data ELS_DC)
#if defined(C9X_INLINE_SEMANTICS)
{
void **p = EG(argument_stack).top_element-2;
int arg_count = (ulong) *p;
if (requested_arg>arg_count) {
return FAILURE;
}
*data = (p-arg_count+requested_arg-1);
return SUCCESS;
}
#else
;
#endif
#if SUPPORT_INTERACTIVE
void execute_new_code(CLS_D);
#endif
/* services */
ZEND_API char *get_active_function_name(void);
ZEND_API char *zend_get_executed_filename(ELS_D);
ZEND_API uint zend_get_executed_lineno(ELS_D);
ZEND_API zend_bool zend_is_executing(void);
void zend_set_timeout(long seconds);
void zend_unset_timeout(void);
ZEND_API void zend_timeout(int dummy);
#ifdef ZEND_WIN32
void zend_init_timeout_thread();
void zend_shutdown_timeout_thread();
#define WM_REGISTER_ZEND_TIMEOUT (WM_USER+1)
#define WM_UNREGISTER_ZEND_TIMEOUT (WM_USER+2)
#endif
#define zendi_zval_copy_ctor(p) zval_copy_ctor(&(p))
#define zendi_zval_dtor(p) zval_dtor(&(p))
#define active_opline (*EG(opline_ptr))
ZEND_API inline void zend_assign_to_variable_reference(znode *result, zval **variable_ptr_ptr, zval **value_ptr_ptr, temp_variable *Ts ELS_DC)
#if defined(C9X_INLINE_SEMANTICS)
{
zval *variable_ptr = *variable_ptr_ptr;
zval *value_ptr;
if (!value_ptr_ptr) {
zend_error(E_ERROR, "Cannot create references to string offsets nor overloaded objects");
return;
}
value_ptr = *value_ptr_ptr;
if (variable_ptr == EG(error_zval_ptr) || value_ptr==EG(error_zval_ptr)) {
variable_ptr_ptr = &EG(uninitialized_zval_ptr);
/* } else if (variable_ptr==&EG(uninitialized_zval) || variable_ptr!=value_ptr) { */
} else if (variable_ptr_ptr != value_ptr_ptr) {
variable_ptr->refcount--;
if (variable_ptr->refcount==0) {
zendi_zval_dtor(*variable_ptr);
FREE_ZVAL(variable_ptr);
}
if (!PZVAL_IS_REF(value_ptr)) {
/* break it away */
value_ptr->refcount--;
if (value_ptr->refcount>0) {
ALLOC_ZVAL(*value_ptr_ptr);
**value_ptr_ptr = *value_ptr;
value_ptr = *value_ptr_ptr;
zendi_zval_copy_ctor(*value_ptr);
}
value_ptr->refcount = 1;
value_ptr->is_ref = 1;
}
*variable_ptr_ptr = value_ptr;
value_ptr->refcount++;
} else {
if (variable_ptr->refcount>1) { /* we need to break away */
SEPARATE_ZVAL(variable_ptr_ptr);
}
(*variable_ptr_ptr)->is_ref = 1;
}
if (result && !(result->u.EA.type & EXT_TYPE_UNUSED)) {
Ts[result->u.var].var.ptr_ptr = variable_ptr_ptr;
SELECTIVE_PZVAL_LOCK(*variable_ptr_ptr, result);
AI_USE_PTR(Ts[result->u.var].var);
}
}
#else
;
#endif
#define IS_OVERLOADED_OBJECT 1
#define IS_STRING_OFFSET 2
#endif /* ZEND_EXECUTE_H */
-707
View File
@@ -1,707 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include <stdio.h>
#include <signal.h>
#include "zend.h"
#include "zend_compile.h"
#include "zend_execute.h"
#include "zend_API.h"
#include "zend_ptr_stack.h"
#include "zend_constants.h"
#include "zend_extensions.h"
#include "zend_execute_locks.h"
#if HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
ZEND_API void (*zend_execute)(zend_op_array *op_array ELS_DC);
#ifdef ZEND_WIN32
#include <process.h>
/* true global */
static WNDCLASS wc;
static HWND timeout_window;
static HANDLE timeout_thread_event;
static DWORD timeout_thread_id;
static int timeout_thread_initialized=0;
#endif
#if ZEND_DEBUG
static void (*original_sigsegv_handler)(int);
static void zend_handle_sigsegv(int dummy)
{
fflush(stdout);
fflush(stderr);
if (original_sigsegv_handler==zend_handle_sigsegv) {
signal(SIGSEGV, original_sigsegv_handler);
} else {
signal(SIGSEGV, SIG_DFL);
}
{
ELS_FETCH();
fprintf(stderr, "SIGSEGV caught on opcode %d on opline %d of %s() at %s:%d\n\n",
active_opline->opcode,
active_opline-EG(active_op_array)->opcodes,
get_active_function_name(),
zend_get_executed_filename(ELS_C),
zend_get_executed_lineno(ELS_C));
}
if (original_sigsegv_handler!=zend_handle_sigsegv) {
original_sigsegv_handler(dummy);
}
}
#endif
static void zend_extension_activator(zend_extension *extension)
{
if (extension->activate) {
extension->activate();
}
}
static void zend_extension_deactivator(zend_extension *extension)
{
if (extension->deactivate) {
extension->deactivate();
}
}
static int is_not_internal_function(zend_function *function)
{
return(function->type != ZEND_INTERNAL_FUNCTION);
}
static int is_not_internal_class(zend_class_entry *ce)
{
return(ce->type != ZEND_INTERNAL_CLASS);
}
void init_executor(CLS_D ELS_DC)
{
INIT_ZVAL(EG(uninitialized_zval));
INIT_ZVAL(EG(error_zval));
EG(uninitialized_zval_ptr)=&EG(uninitialized_zval);
EG(error_zval_ptr)=&EG(error_zval);
zend_ptr_stack_init(&EG(arg_types_stack));
/* destroys stack frame, therefore makes core dumps worthless */
#if 0&&ZEND_DEBUG
original_sigsegv_handler = signal(SIGSEGV, zend_handle_sigsegv);
#endif
EG(return_value_ptr_ptr) = &EG(global_return_value_ptr);
EG(global_return_value_ptr) = NULL;
EG(symtable_cache_ptr) = EG(symtable_cache)-1;
EG(symtable_cache_limit)=EG(symtable_cache)+SYMTABLE_CACHE_SIZE-1;
EG(no_extensions)=0;
EG(function_table) = CG(function_table);
EG(class_table) = CG(class_table);
EG(in_execution) = 0;
zend_ptr_stack_init(&EG(argument_stack));
zend_hash_init(&EG(symbol_table), 50, NULL, ZVAL_PTR_DTOR, 0);
EG(active_symbol_table) = &EG(symbol_table);
zend_llist_apply(&zend_extensions, (void (*)(void *)) zend_extension_activator);
EG(opline_ptr) = NULL;
EG(garbage_ptr) = 0;
zend_hash_init(&EG(included_files), 5, NULL, NULL, 0);
EG(ticks_count) = 0;
EG(user_error_handler) = NULL;
zend_ptr_stack_init(&EG(user_error_handlers));
EG(orig_error_reporting) = EG(error_reporting);
#ifdef ZEND_WIN32
EG(timed_out) = 0;
#endif
}
void shutdown_executor(ELS_D)
{
zend_ptr_stack_destroy(&EG(arg_types_stack));
while (EG(symtable_cache_ptr)>=EG(symtable_cache)) {
zend_hash_destroy(*EG(symtable_cache_ptr));
efree(*EG(symtable_cache_ptr));
EG(symtable_cache_ptr)--;
}
zend_llist_apply(&zend_extensions, (void (*)(void *)) zend_extension_deactivator);
zend_hash_destroy(&EG(symbol_table));
while (EG(garbage_ptr)--) {
if (EG(garbage)[EG(garbage_ptr)]->refcount==1) {
zval_ptr_dtor(&EG(garbage)[EG(garbage_ptr)]);
}
}
zend_ptr_stack_destroy(&EG(argument_stack));
/* Destroy all op arrays */
zend_hash_apply(EG(function_table), (int (*)(void *)) is_not_internal_function);
zend_hash_apply(EG(class_table), (int (*)(void *)) is_not_internal_class);
zend_destroy_rsrc_list(ELS_C); /* must be destroyed after the main symbol table and
* op arrays are destroyed.
*/
clean_non_persistent_constants();
#if ZEND_DEBUG
signal(SIGSEGV, original_sigsegv_handler);
#endif
zend_hash_destroy(&EG(included_files));
if (EG(user_error_handler)) {
zval_dtor(EG(user_error_handler));
FREE_ZVAL(EG(user_error_handler));
}
zend_ptr_stack_clean(&EG(user_error_handlers), ZVAL_DESTRUCTOR, 1);
zend_ptr_stack_destroy(&EG(user_error_handlers));
EG(error_reporting) = EG(orig_error_reporting);
}
ZEND_API char *get_active_function_name()
{
ELS_FETCH();
switch(EG(function_state_ptr)->function->type) {
case ZEND_USER_FUNCTION: {
char *function_name = ((zend_op_array *) EG(function_state_ptr)->function)->function_name;
if (function_name) {
return function_name;
} else {
return "main";
}
}
break;
case ZEND_INTERNAL_FUNCTION:
return ((zend_internal_function *) EG(function_state_ptr)->function)->function_name;
break;
default:
return NULL;
}
}
ZEND_API char *zend_get_executed_filename(ELS_D)
{
if (EG(active_op_array)) {
return EG(active_op_array)->filename;
} else {
return "[no active file]";
}
}
ZEND_API uint zend_get_executed_lineno(ELS_D)
{
if (EG(opline_ptr)) {
return active_opline->lineno;
} else {
return 0;
}
}
ZEND_API zend_bool zend_is_executing()
{
ELS_FETCH();
return EG(in_execution);
}
ZEND_API void _zval_ptr_dtor(zval **zval_ptr ZEND_FILE_LINE_DC)
{
#if DEBUG_ZEND>=2
printf("Reducing refcount for %x (%x): %d->%d\n", *zval_ptr, zval_ptr, (*zval_ptr)->refcount, (*zval_ptr)->refcount-1);
#endif
(*zval_ptr)->refcount--;
if ((*zval_ptr)->refcount==0) {
zval_dtor(*zval_ptr);
safe_free_zval_ptr(*zval_ptr);
} else if (((*zval_ptr)->refcount == 1) && ((*zval_ptr)->type != IS_OBJECT)) {
(*zval_ptr)->is_ref = 0;
}
}
ZEND_API int zend_is_true(zval *op)
{
return i_zend_is_true(op);
}
ZEND_API int zval_update_constant(zval **pp, void *arg)
{
zval *p = *pp;
zend_bool inline_change = (zend_bool) (unsigned long) arg;
if (p->type == IS_CONSTANT) {
zval c;
int refcount;
SEPARATE_ZVAL(pp);
p = *pp;
refcount = p->refcount;
if (!zend_get_constant(p->value.str.val, p->value.str.len, &c)) {
zend_error(E_NOTICE, "Use of undefined constant %s - assumed '%s'",
p->value.str.val,
p->value.str.val);
p->type = IS_STRING;
if (!inline_change) {
zval_copy_ctor(p);
}
} else {
if (inline_change) {
STR_FREE(p->value.str.val);
}
*p = c;
}
INIT_PZVAL(p);
p->refcount = refcount;
} else if (p->type == IS_CONSTANT_ARRAY) {
SEPARATE_ZVAL(pp);
p = *pp;
p->type = IS_ARRAY;
zend_hash_apply_with_argument(p->value.ht, (int (*)(void *,void *)) zval_update_constant, (void *) 1);
}
return 0;
}
int call_user_function(HashTable *function_table, zval *object, zval *function_name, zval *retval_ptr, int param_count, zval *params[])
{
zval ***params_array = (zval ***) emalloc(sizeof(zval **)*param_count);
int i;
int ex_retval;
zval *local_retval_ptr;
for (i=0; i<param_count; i++) {
params_array[i] = &params[i];
}
ex_retval = call_user_function_ex(function_table, object, function_name, &local_retval_ptr, param_count, params_array, 1, NULL);
if (local_retval_ptr) {
COPY_PZVAL_TO_ZVAL(*retval_ptr, local_retval_ptr);
} else {
INIT_ZVAL(*retval_ptr);
}
efree(params_array);
return ex_retval;
}
int call_user_function_ex(HashTable *function_table, zval *object, zval *function_name, zval **retval_ptr_ptr, int param_count, zval **params[], int no_separation, HashTable *symbol_table)
{
int i;
zval **original_return_value;
HashTable *calling_symbol_table;
zend_function_state function_state;
zend_function_state *original_function_state_ptr;
zend_op_array *original_op_array;
zend_op **original_opline_ptr;
ELS_FETCH();
*retval_ptr_ptr = NULL;
if (function_name->type==IS_ARRAY) { /* assume array($obj, $name) couple */
zval **tmp_object_ptr, **tmp_real_function_name;
if (zend_hash_index_find(function_name->value.ht, 0, (void **) &tmp_object_ptr)==FAILURE) {
return FAILURE;
}
if (zend_hash_index_find(function_name->value.ht, 1, (void **) &tmp_real_function_name)==FAILURE) {
return FAILURE;
}
function_name = *tmp_real_function_name;
SEPARATE_ZVAL_IF_NOT_REF(tmp_object_ptr);
object = *tmp_object_ptr;
object->is_ref = 1;
}
if (object) {
if (object->type != IS_OBJECT) {
return FAILURE;
}
function_table = &object->value.obj.ce->function_table;
}
if (function_name->type!=IS_STRING) {
return FAILURE;
}
original_function_state_ptr = EG(function_state_ptr);
zend_str_tolower(function_name->value.str.val, function_name->value.str.len);
if (zend_hash_find(function_table, function_name->value.str.val, function_name->value.str.len+1, (void **) &function_state.function)==FAILURE) {
return FAILURE;
}
for (i=0; i<param_count; i++) {
zval *param;
if (function_state.function->common.arg_types
&& i<function_state.function->common.arg_types[0]
&& function_state.function->common.arg_types[i+1]==BYREF_FORCE
&& !PZVAL_IS_REF(*params[i])) {
if ((*params[i])->refcount>1) {
zval *new_zval;
if (no_separation) {
return FAILURE;
}
ALLOC_ZVAL(new_zval);
*new_zval = **params[i];
zval_copy_ctor(new_zval);
new_zval->refcount = 1;
(*params[i])->refcount--;
*params[i] = new_zval;
}
(*params[i])->refcount++;
(*params[i])->is_ref = 1;
param = *params[i];
} else if (*params[i] != &EG(uninitialized_zval)) {
(*params[i])->refcount++;
param = *params[i];
} else {
ALLOC_ZVAL(param);
*param = **(params[i]);
INIT_PZVAL(param);
}
zend_ptr_stack_push(&EG(argument_stack), param);
}
zend_ptr_stack_n_push(&EG(argument_stack), 2, (void *) (long) param_count, NULL);
if (function_state.function->type == ZEND_USER_FUNCTION) {
calling_symbol_table = EG(active_symbol_table);
if (symbol_table) {
EG(active_symbol_table) = symbol_table;
} else {
ALLOC_HASHTABLE(EG(active_symbol_table));
zend_hash_init(EG(active_symbol_table), 0, NULL, ZVAL_PTR_DTOR, 0);
}
if (object) {
zval *dummy, **this_ptr;
ALLOC_ZVAL(dummy);
INIT_ZVAL(*dummy);
zend_hash_update(EG(active_symbol_table), "this", sizeof("this"), &dummy, sizeof(zval *), (void **) &this_ptr);
zend_assign_to_variable_reference(NULL, this_ptr, &object, NULL ELS_CC);
}
original_return_value = EG(return_value_ptr_ptr);
original_op_array = EG(active_op_array);
EG(return_value_ptr_ptr) = retval_ptr_ptr;
EG(active_op_array) = (zend_op_array *) function_state.function;
original_opline_ptr = EG(opline_ptr);
zend_execute(EG(active_op_array) ELS_CC);
if (!symbol_table) {
zend_hash_destroy(EG(active_symbol_table));
FREE_HASHTABLE(EG(active_symbol_table));
}
EG(active_symbol_table) = calling_symbol_table;
EG(active_op_array) = original_op_array;
EG(return_value_ptr_ptr)=original_return_value;
EG(opline_ptr) = original_opline_ptr;
} else {
ALLOC_INIT_ZVAL(*retval_ptr_ptr);
((zend_internal_function *) function_state.function)->handler(param_count, *retval_ptr_ptr, object, 1 ELS_CC);
INIT_PZVAL(*retval_ptr_ptr);
}
zend_ptr_stack_clear_multiple(ELS_C);
EG(function_state_ptr) = original_function_state_ptr;
return SUCCESS;
}
ZEND_API int zend_eval_string(char *str, zval *retval_ptr CLS_DC ELS_DC)
{
zval pv;
zend_op_array *new_op_array;
zend_op_array *original_active_op_array = EG(active_op_array);
zend_function_state *original_function_state_ptr = EG(function_state_ptr);
int original_handle_op_arrays;
int retval;
if (retval_ptr) {
pv.value.str.len = strlen(str)+sizeof("return ;")-1;
pv.value.str.val = emalloc(pv.value.str.len+1);
strcpy(pv.value.str.val, "return ");
strcat(pv.value.str.val, str);
strcat(pv.value.str.val, " ;");
} else {
pv.value.str.len = strlen(str);
pv.value.str.val = estrndup(str, pv.value.str.len);
}
pv.type = IS_STRING;
/*printf("Evaluating '%s'\n", pv.value.str.val);*/
original_handle_op_arrays = CG(handle_op_arrays);
CG(handle_op_arrays) = 0;
new_op_array = compile_string(&pv CLS_CC);
CG(handle_op_arrays) = original_handle_op_arrays;
if (new_op_array) {
zval *local_retval_ptr=NULL;
zval **original_return_value_ptr_ptr = EG(return_value_ptr_ptr);
zend_op **original_opline_ptr = EG(opline_ptr);
EG(return_value_ptr_ptr) = &local_retval_ptr;
EG(active_op_array) = new_op_array;
EG(no_extensions)=1;
zend_execute(new_op_array ELS_CC);
if (local_retval_ptr) {
if (retval_ptr) {
COPY_PZVAL_TO_ZVAL(*retval_ptr, local_retval_ptr);
} else {
zval_ptr_dtor(&local_retval_ptr);
}
} else {
if (retval_ptr) {
INIT_ZVAL(*retval_ptr);
}
}
EG(no_extensions)=0;
EG(opline_ptr) = original_opline_ptr;
EG(active_op_array) = original_active_op_array;
EG(function_state_ptr) = original_function_state_ptr;
destroy_op_array(new_op_array);
efree(new_op_array);
EG(return_value_ptr_ptr) = original_return_value_ptr_ptr;
retval = SUCCESS;
} else {
retval = FAILURE;
}
zval_dtor(&pv);
return retval;
}
#if SUPPORT_INTERACTIVE
void execute_new_code(CLS_D)
{
ELS_FETCH();
if (!EG(interactive)
|| CG(active_op_array)->backpatch_count>0
|| CG(active_op_array)->function_name
|| CG(active_op_array)->type!=ZEND_USER_FUNCTION) {
return;
}
CG(active_op_array)->start_op_number = CG(active_op_array)->last_executed_op_number;
CG(active_op_array)->end_op_number = CG(active_op_array)->last;
EG(active_op_array) = CG(active_op_array);
zend_execute(CG(active_op_array) ELS_CC);
CG(active_op_array)->start_op_number = CG(active_op_array)->last_executed_op_number;
}
#endif
ZEND_API void zend_timeout(int dummy)
{
ELS_FETCH();
/* is there any point in this? we're terminating the request anyway...
PLS_FETCH();
PG(connection_status) |= PHP_CONNECTION_TIMEOUT;
*/
zend_error(E_ERROR, "Maximum execution time of %d second%s exceeded",
EG(timeout_seconds), EG(timeout_seconds) == 1 ? "" : "s");
}
#ifdef ZEND_WIN32
static LRESULT CALLBACK zend_timeout_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message) {
case WM_DESTROY:
PostQuitMessage(0);
break;
case WM_REGISTER_ZEND_TIMEOUT:
/* wParam is the thread id pointer, lParam is the timeout amount in seconds */
if (lParam==0) {
KillTimer(timeout_window, wParam);
} else {
SetTimer(timeout_window, wParam, lParam*1000, NULL);
}
break;
case WM_UNREGISTER_ZEND_TIMEOUT:
/* wParam is the thread id pointer */
KillTimer(timeout_window, wParam);
break;
case WM_TIMER: {
#ifdef ZTS
zend_executor_globals *executor_globals;
executor_globals = ts_resource_ex(executor_globals_id, &wParam);
if (!executor_globals) {
/* Thread died before receiving its timeout? */
break;
}
#endif
KillTimer(timeout_window, wParam);
EG(timed_out) = 1;
}
break;
default:
return DefWindowProc(hWnd,message,wParam,lParam);
}
return 0;
}
static unsigned __stdcall timeout_thread_proc(void *pArgs)
{
MSG message;
wc.style=0;
wc.lpfnWndProc = zend_timeout_WndProc;
wc.cbClsExtra=0;
wc.cbWndExtra=0;
wc.hInstance=NULL;
wc.hIcon=NULL;
wc.hCursor=NULL;
wc.hbrBackground=(HBRUSH)(COLOR_BACKGROUND + 5);
wc.lpszMenuName=NULL;
wc.lpszClassName = "Zend Timeout Window";
if(!RegisterClass(&wc)) {
return -1;
}
timeout_window = CreateWindow(wc.lpszClassName, wc.lpszClassName, 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, NULL, NULL);
SetEvent(timeout_thread_event);
while (GetMessage(&message, NULL, 0, 0)) {
SendMessage(timeout_window, message.message, message.wParam, message.lParam);
if (message.message == WM_QUIT) {
break;
}
}
DestroyWindow(timeout_window);
UnregisterClass(wc.lpszClassName, NULL);
return 0;
}
void zend_init_timeout_thread()
{
timeout_thread_event = CreateEvent(NULL, FALSE, FALSE, NULL);
_beginthreadex(NULL, 0, timeout_thread_proc, NULL, 0, &timeout_thread_id);
WaitForSingleObject(timeout_thread_event, INFINITE);
}
void zend_shutdown_timeout_thread()
{
if (!timeout_thread_initialized) {
return;
}
PostThreadMessage(timeout_thread_id, WM_QUIT, 0, 0);
}
#endif
/* This one doesn't exists on QNX */
#ifndef SIGPROF
#define SIGPROF 27
#endif
void zend_set_timeout(long seconds)
{
ELS_FETCH();
EG(timeout_seconds) = seconds;
#ifdef ZEND_WIN32
if (timeout_thread_initialized==0 && InterlockedIncrement(&timeout_thread_initialized)==1) {
/* We start up this process-wide thread here and not in zend_startup(), because if Zend
* is initialized inside a DllMain(), you're not supposed to start threads from it.
*/
zend_init_timeout_thread();
}
PostThreadMessage(timeout_thread_id, WM_REGISTER_ZEND_TIMEOUT, (WPARAM) GetCurrentThreadId(), (LPARAM) seconds);
#else
# ifdef HAVE_SETITIMER
{
struct itimerval t_r; /* timeout requested */
sigset_t sigset;
t_r.it_value.tv_sec = seconds;
t_r.it_value.tv_usec = t_r.it_interval.tv_sec = t_r.it_interval.tv_usec = 0;
setitimer(ITIMER_PROF, &t_r, NULL);
signal(SIGPROF, zend_timeout);
sigemptyset(&sigset);
sigaddset(&sigset, SIGPROF);
sigprocmask(SIG_UNBLOCK,&sigset,NULL);
}
# endif
#endif
}
void zend_unset_timeout(void)
{
ELS_FETCH();
#ifdef ZEND_WIN32
PostThreadMessage(timeout_thread_id, WM_UNREGISTER_ZEND_TIMEOUT, (WPARAM) GetCurrentThreadId(), (LPARAM) 0);
#else
# ifdef HAVE_SETITIMER
{
struct itimerval no_timeout;
no_timeout.it_value.tv_sec = no_timeout.it_value.tv_usec = no_timeout.it_interval.tv_sec = no_timeout.it_interval.tv_usec = 0;
setitimer(ITIMER_PROF, &no_timeout, NULL);
}
# endif
#endif
}
-22
View File
@@ -1,22 +0,0 @@
#ifndef ZEND_EXECUTE_LOCKS_H
#define ZEND_EXECUTE_LOCKS_H
#define PZVAL_LOCK(z) ((z)->refcount++)
#define PZVAL_UNLOCK(z) { ((z)->refcount--); \
if (!(z)->refcount) { \
(z)->refcount = 1; \
(z)->is_ref = 0; \
EG(garbage)[EG(garbage_ptr)++] = (z); \
if (EG(garbage_ptr) == 4) { \
zval_ptr_dtor(&EG(garbage)[0]); \
zval_ptr_dtor(&EG(garbage)[1]); \
EG(garbage)[0] = EG(garbage)[2]; \
EG(garbage)[1] = EG(garbage)[3]; \
EG(garbage_ptr) -= 2; \
} \
} \
}
#define SELECTIVE_PZVAL_LOCK(pzv, pzn) if (!((pzn)->u.EA.type & EXT_TYPE_UNUSED)) { PZVAL_LOCK(pzv); }
#endif /* ZEND_EXECUTE_LOCKS_H */
-202
View File
@@ -1,202 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include "zend_extensions.h"
ZEND_API zend_llist zend_extensions;
static int last_resource_number;
int zend_load_extensions(char **extension_paths)
{
char **p = extension_paths;
if (!p) {
return SUCCESS;
}
while (*p) {
if (zend_load_extension(*p)==FAILURE) {
return FAILURE;
}
p++;
}
return SUCCESS;
}
int zend_load_extension(char *path)
{
#if ZEND_EXTENSIONS_SUPPORT
DL_HANDLE handle;
zend_extension *new_extension;
zend_extension_version_info *extension_version_info;
handle = DL_LOAD(path);
if (!handle) {
#ifndef ZEND_WIN32
fprintf(stderr, "Failed loading %s: %s\n", path, dlerror());
#else
fprintf(stderr, "Failed loading %s\n", path);
#endif
return FAILURE;
}
extension_version_info = (zend_extension_version_info *) DL_FETCH_SYMBOL(handle, "extension_version_info");
new_extension = (zend_extension *) DL_FETCH_SYMBOL(handle, "zend_extension_entry");
if (!extension_version_info || !new_extension) {
fprintf(stderr, "%s doesn't appear to be a valid Zend extension\n", path);
return FAILURE;
}
if (extension_version_info->zend_extension_api_no > ZEND_EXTENSION_API_NO) {
fprintf(stderr, "%s requires Zend Engine API version %d\n"
"The installed Zend Engine API version is %d\n\n",
new_extension->name,
extension_version_info->zend_extension_api_no,
ZEND_EXTENSION_API_NO);
DL_UNLOAD(handle);
return FAILURE;
} else if (extension_version_info->zend_extension_api_no < ZEND_EXTENSION_API_NO) {
/* we may be able to allow for downwards compatability in some harmless cases. */
fprintf(stderr, "%s designed to be used with the Zend Engine API %d is outdated\n"
"It requires a more recent version of the Zend Engine\n"
"The installed Zend Engine API version is %d\n"
"Contact %s at %s for a later version of this module.\n\n",
new_extension->name,
extension_version_info->zend_extension_api_no,
ZEND_EXTENSION_API_NO,
new_extension->author,
new_extension->URL);
DL_UNLOAD(handle);
return FAILURE;
} else if (ZTS_V!=extension_version_info->thread_safe) {
fprintf(stderr, "Cannot load %s - it %s thread safe, whereas Zend %s\n",
new_extension->name,
(extension_version_info->thread_safe?"is":"isn't"),
(ZTS_V?"is":"isn't"));
DL_UNLOAD(handle);
return FAILURE;
} else if (ZEND_DEBUG!=extension_version_info->debug) {
fprintf(stderr, "Cannot load %s - it %s debug information, whereas Zend %s\n",
new_extension->name,
(extension_version_info->debug?"contains":"does not contain"),
(ZEND_DEBUG?"does":"does not"));
DL_UNLOAD(handle);
return FAILURE;
}
return zend_register_extension(new_extension, handle);
#else
fprintf(stderr, "Extensions are not supported on this platform.\n");
return FAILURE;
#endif
}
int zend_register_extension(zend_extension *new_extension, DL_HANDLE handle)
{
#if ZEND_EXTENSIONS_SUPPORT
zend_extension extension;
if (new_extension->startup) {
if (new_extension->startup(new_extension)!=SUCCESS) {
DL_UNLOAD(handle);
return FAILURE;
}
}
extension = *new_extension;
extension.handle = handle;
zend_extension_dispatch_message(ZEND_EXTMSG_NEW_EXTENSION, &extension);
zend_llist_add_element(&zend_extensions, &extension);
zend_append_version_info(&extension);
/*fprintf(stderr, "Loaded %s, version %s\n", extension.name, extension.version);*/
#endif
return SUCCESS;
}
static void zend_extension_shutdown(zend_extension *extension)
{
#if ZEND_EXTENSIONS_SUPPORT
if (extension->shutdown) {
extension->shutdown(extension);
}
#endif
}
int zend_startup_extensions()
{
zend_llist_init(&zend_extensions, sizeof(zend_extension), (void (*)(void *)) zend_extension_dtor, 1);
last_resource_number = 0;
return SUCCESS;
}
void zend_shutdown_extensions()
{
zend_llist_apply(&zend_extensions, (void (*)(void *)) zend_extension_shutdown);
zend_llist_destroy(&zend_extensions);
}
void zend_extension_dtor(zend_extension *extension)
{
#if ZEND_EXTENSIONS_SUPPORT
if (extension->handle) {
DL_UNLOAD(extension->handle);
}
#endif
}
static void zend_extension_message_dispatcher(zend_extension *extension, int num_args, va_list args)
{
int message;
void *arg;
if (!extension->message_handler || num_args!=2) {
return;
}
message = va_arg(args, int);
arg = va_arg(args, void *);
extension->message_handler(message, arg);
}
ZEND_API void zend_extension_dispatch_message(int message, void *arg)
{
zend_llist_apply_with_arguments(&zend_extensions, (llist_apply_with_args_func_t) zend_extension_message_dispatcher, 2, message, arg);
}
ZEND_API int zend_get_resource_handle(zend_extension *extension)
{
if (last_resource_number<ZEND_MAX_RESERVED_RESOURCES) {
extension->resource_number = last_resource_number;
return last_resource_number++;
} else {
return -1;
}
}
-97
View File
@@ -1,97 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_EXTENSIONS_H
#define ZEND_EXTENSIONS_H
#include "zend_compile.h"
#define ZEND_EXTENSION_API_NO 20000815
typedef struct _zend_extension_version_info {
int zend_extension_api_no;
char *required_zend_version;
unsigned char thread_safe;
unsigned char debug;
} zend_extension_version_info;
typedef struct _zend_extension zend_extension;
struct _zend_extension {
char *name;
char *version;
char *author;
char *URL;
char *copyright;
int (*startup)(zend_extension *extension);
void (*shutdown)(zend_extension *extension);
void (*activate)();
void (*deactivate)();
void (*message_handler)(int message, void *arg);
void (*op_array_handler)(zend_op_array *op_array);
void (*statement_handler)(zend_op_array *op_array);
void (*fcall_begin_handler)(zend_op_array *op_array);
void (*fcall_end_handler)(zend_op_array *op_array);
void (*op_array_ctor)(zend_op_array *op_array);
void (*op_array_dtor)(zend_op_array *op_array);
void *reserved1;
void *reserved2;
void *reserved3;
void *reserved4;
void *reserved5;
void *reserved6;
void *reserved7;
void *reserved8;
DL_HANDLE handle;
int resource_number;
};
ZEND_API int zend_get_resource_handle(zend_extension *extension);
ZEND_API void zend_extension_dispatch_message(int message, void *arg);
#define ZEND_EXTMSG_NEW_EXTENSION 1
#define ZEND_EXTENSION() \
ZEND_EXT_API zend_extension_version_info extension_version_info = { ZEND_EXTENSION_API_NO, ZEND_VERSION, ZTS_V, ZEND_DEBUG }
#define STANDARD_ZEND_EXTENSION_PROPERTIES NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, -1
ZEND_API extern zend_llist zend_extensions;
void zend_extension_dtor(zend_extension *extension);
ZEND_API int zend_load_extension(char *path);
ZEND_API int zend_load_extensions(char **extension_paths);
ZEND_API int zend_register_extension(zend_extension *new_extension, DL_HANDLE handle);
void zend_append_version_info(zend_extension *extension);
int zend_startup_extensions(void);
void zend_shutdown_extensions(void);
#endif /* ZEND_EXTENSIONS_H */
-140
View File
@@ -1,140 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_FAST_CACHE_H
#define ZEND_FAST_CACHE_H
#ifndef ZEND_ENABLE_FAST_CACHE
# if ZEND_DEBUG
# define ZEND_ENABLE_FAST_CACHE 0
# else
# define ZEND_ENABLE_FAST_CACHE 1
# endif
#endif
typedef struct _zend_fast_cache_list_entry {
struct _zend_fast_cache_list_entry *next;
} zend_fast_cache_list_entry;
#define MAX_FAST_CACHE_TYPES 4
#define ZVAL_CACHE_LIST 0
#define HASHTABLE_CACHE_LIST 1
#if ZEND_ENABLE_FAST_CACHE
#include "zend_globals.h"
#include "zend_globals_macros.h"
#include "zend_alloc.h"
#if ZEND_DEBUG
# define RECORD_ZVAL_CACHE_HIT(fc_type) AG(fast_cache_stats)[fc_type][1]++;
# define RECORD_ZVAL_CACHE_MISS(fc_type) AG(fast_cache_stats)[fc_type][0]++;
#else
# define RECORD_ZVAL_CACHE_HIT(fc_type)
# define RECORD_ZVAL_CACHE_MISS(fc_type)
#endif
#define ZEND_FAST_ALLOC(p, type, fc_type) \
{ \
ALS_FETCH(); \
\
if (((p) = (type *) AG(fast_cache_list_head)[fc_type])) { \
AG(fast_cache_list_head)[fc_type] = ((zend_fast_cache_list_entry *) AG(fast_cache_list_head)[fc_type])->next; \
RECORD_ZVAL_CACHE_HIT(fc_type); \
} else { \
(p) = (type *) emalloc(sizeof(type)); \
RECORD_ZVAL_CACHE_MISS(fc_type); \
} \
}
#define ZEND_FAST_FREE(p, fc_type) \
{ \
ALS_FETCH(); \
\
((zend_fast_cache_list_entry *) (p))->next = AG(fast_cache_list_head)[fc_type]; \
AG(fast_cache_list_head)[fc_type] = (zend_fast_cache_list_entry *) (p); \
}
#define ZEND_FAST_ALLOC_REL(p, type, fc_type) \
ZEND_FAST_ALLOC(p, type, fc_type)
#define ZEND_FAST_FREE_REL(p, fc_type) \
ZEND_FAST_FREE(p, fc_type)
#else /* !ZEND_ENABLE_FAST_CACHE */
#define ZEND_FAST_ALLOC(p, type, fc_type) \
(p) = (type *) emalloc(sizeof(type))
#define ZEND_FAST_FREE(p, fc_type) \
efree(p)
#define ZEND_FAST_ALLOC_REL(p, type, fc_type) \
(p) = (type *) emalloc_rel(sizeof(type))
#define ZEND_FAST_FREE_REL(p, fc_type) \
efree_rel(p)
#endif /* ZEND_ENABLE_FAST_CACHE */
/* fast cache for zval's */
#define ALLOC_ZVAL(z) \
ZEND_FAST_ALLOC(z, zval, ZVAL_CACHE_LIST)
#define FREE_ZVAL(z) \
ZEND_FAST_FREE(z, ZVAL_CACHE_LIST)
#define ALLOC_ZVAL_REL(z) \
ZEND_FAST_ALLOC_REL(z, zval, ZVAL_CACHE_LIST)
#define FREE_ZVAL_REL(z) \
ZEND_FAST_FREE_REL(z, ZVAL_CACHE_LIST)
/* fast cache for HashTables */
#define ALLOC_HASHTABLE(ht) \
ZEND_FAST_ALLOC(ht, HashTable, HASHTABLE_CACHE_LIST)
#define FREE_HASHTABLE(ht) \
ZEND_FAST_FREE(ht, HASHTABLE_CACHE_LIST)
#define ALLOC_HASHTABLE_REL(ht) \
ZEND_FAST_ALLOC_REL(ht, HashTable, HASHTABLE_CACHE_LIST)
#define FREE_HASHTABLE_REL(ht) \
ZEND_FAST_FREE_REL(ht, HASHTABLE_CACHE_LIST)
#endif /* ZEND_FAST_CACHE_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
-17
View File
@@ -1,17 +0,0 @@
/*
* If C9X_INLINE_SEMANTICS is already defined here,
* we assume the user does not want GCC inline semantics,
* but compiles this file always.
*/
#ifndef C9X_INLINE_SEMANTICS
#define C9X_INLINE_SEMANTICS
#include "zend.h"
#include "zend_execute.h"
#include "zend_operators.h"
#endif
-216
View File
@@ -1,216 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_GLOBALS_H
#define ZEND_GLOBALS_H
#include <setjmp.h>
#include "zend_globals_macros.h"
#include "zend_stack.h"
#include "zend_ptr_stack.h"
#include "zend_hash.h"
#include "zend_llist.h"
#include "zend_fast_cache.h"
/* Define ZTS if you want a thread-safe Zend */
/*#undef ZTS*/
#ifdef ZTS
#include "../TSRM/TSRM.h"
#ifdef __cplusplus
class ZendFlexLexer;
#endif
BEGIN_EXTERN_C()
ZEND_API extern int compiler_globals_id;
ZEND_API extern int executor_globals_id;
ZEND_API extern int alloc_globals_id;
END_EXTERN_C()
#endif
#define SYMTABLE_CACHE_SIZE 32
#include "zend_compile.h"
/* excpt.h on Digital Unix 4.0 defines function_table */
#undef function_table
typedef struct _zend_declarables {
zval ticks;
} zend_declarables;
struct _zend_compiler_globals {
zend_stack bp_stack;
zend_stack switch_cond_stack;
zend_stack foreach_copy_stack;
zend_stack object_stack;
zend_stack declare_stack;
zend_class_entry class_entry, *active_class_entry;
/* variables for list() compilation */
zend_llist list_llist;
zend_llist dimension_llist;
zend_stack function_call_stack;
char *compiled_filename;
int zend_lineno;
int comment_start_line;
char *heredoc;
int heredoc_len;
zend_op_array *active_op_array;
HashTable *function_table; /* function symbol table */
HashTable *class_table; /* class table */
HashTable filenames_table;
zend_bool in_compilation;
zend_bool short_tags;
zend_bool asp_tags;
zend_bool allow_call_time_pass_reference;
zend_declarables declarables;
/* For extensions support */
zend_bool extended_info; /* generate extension information for debugger/profiler */
zend_bool handle_op_arrays; /* run op_arrays through op_array handlers */
zend_bool unclean_shutdown;
zend_llist open_files;
#ifdef ZTS
#ifdef __cplusplus
ZendFlexLexer *ZFL;
#else
void *ZFL;
#endif
#endif
};
struct _zend_executor_globals {
zval **return_value_ptr_ptr;
zval uninitialized_zval;
zval *uninitialized_zval_ptr;
zval error_zval;
zval *error_zval_ptr;
zend_function_state *function_state_ptr;
zend_ptr_stack arg_types_stack;
/* for global return() support */
zval *global_return_value_ptr;
/* symbol table cache */
HashTable *symtable_cache[SYMTABLE_CACHE_SIZE];
HashTable **symtable_cache_limit;
HashTable **symtable_cache_ptr;
zend_op **opline_ptr;
HashTable *active_symbol_table;
HashTable symbol_table; /* main symbol table */
HashTable included_files; /* files already included */
jmp_buf bailout;
int error_reporting;
int orig_error_reporting;
zend_op_array *active_op_array;
HashTable *function_table; /* function symbol table */
HashTable *class_table; /* class table */
HashTable *zend_constants; /* constants table */
long precision;
int ticks_count;
zend_bool in_execution;
/* for extended information support */
zend_bool no_extensions;
#ifdef ZEND_WIN32
zend_bool timed_out;
#endif
HashTable regular_list;
HashTable persistent_list;
zend_ptr_stack argument_stack;
int free_op1, free_op2;
int (*unary_op)(zval *result, zval *op1);
int (*binary_op)(zval *result, zval *op1, zval *op2);
zval *garbage[4];
int garbage_ptr;
zval *user_error_handler;
zend_ptr_stack user_error_handlers;
/* timeout support */
int timeout_seconds;
int lambda_count;
void *reserved[ZEND_MAX_RESERVED_RESOURCES];
#if SUPPORT_INTERACTIVE
int interactive;
#endif
};
struct _zend_alloc_globals {
zend_mem_header *head; /* standard list */
zend_mem_header *phead; /* persistent list */
void *cache[MAX_CACHED_MEMORY][MAX_CACHED_ENTRIES];
unsigned int cache_count[MAX_CACHED_MEMORY];
void *fast_cache_list_head[MAX_FAST_CACHE_TYPES];
#if ZEND_DEBUG
/* for performance tuning */
int cache_stats[MAX_CACHED_MEMORY][2];
int fast_cache_stats[MAX_FAST_CACHE_TYPES][2];
#endif
#if MEMORY_LIMIT
unsigned int memory_limit;
unsigned int allocated_memory;
unsigned char memory_exhausted;
#endif
};
#endif /* ZEND_GLOBALS_H */
-89
View File
@@ -1,89 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_GLOBALS_MACROS_H
#define ZEND_GLOBALS_MACROS_H
typedef struct _zend_compiler_globals zend_compiler_globals;
typedef struct _zend_executor_globals zend_executor_globals;
typedef struct _zend_alloc_globals zend_alloc_globals;
/* Compiler */
#ifdef ZTS
# define CLS_D zend_compiler_globals *compiler_globals
# define CLS_DC , CLS_D
# define CLS_C compiler_globals
# define CLS_CC , CLS_C
# define CG(v) (((zend_compiler_globals *) compiler_globals)->v)
# define CLS_FETCH() zend_compiler_globals *compiler_globals = (zend_compiler_globals *) ts_resource(compiler_globals_id)
BEGIN_EXTERN_C()
int zendparse(void *compiler_globals);
END_EXTERN_C()
#else
# define CLS_D void
# define CLS_DC
# define CLS_C
# define CLS_CC
# define CG(v) (compiler_globals.v)
# define CLS_FETCH()
extern ZEND_API struct _zend_compiler_globals compiler_globals;
int zendparse(void);
#endif
/* Executor */
#ifdef ZTS
# define ELS_D zend_executor_globals *executor_globals
# define ELS_DC , ELS_D
# define ELS_C executor_globals
# define ELS_CC , ELS_C
# define EG(v) (executor_globals->v)
# define ELS_FETCH() zend_executor_globals *executor_globals = (zend_executor_globals *) ts_resource(executor_globals_id)
#else
# define ELS_D void
# define ELS_DC
# define ELS_C
# define ELS_CC
# define EG(v) (executor_globals.v)
# define ELS_FETCH()
extern ZEND_API zend_executor_globals executor_globals;
#endif
/* Memory Manager */
#ifdef ZTS
# define ALS_D zend_alloc_globals *alloc_globals
# define ALS_DC , ALS_D
# define ALS_C alloc_globals
# define ALS_CC , ALS_C
# define AG(v) (((zend_alloc_globals *) alloc_globals)->v)
# define ALS_FETCH() zend_alloc_globals *alloc_globals = (zend_alloc_globals *) ts_resource(alloc_globals_id)
#else
# define ALS_D void
# define ALS_DC
# define ALS_C
# define ALS_CC
# define AG(v) (alloc_globals.v)
# define ALS_FETCH()
extern ZEND_API zend_alloc_globals alloc_globals;
#endif
#endif /* ZEND_GLOBALS_MACROS_H */
-1247
View File
File diff suppressed because it is too large. Load diff
-198
View File
@@ -1,198 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_HASH_H
#define ZEND_HASH_H
#include <sys/types.h>
#define HASH_KEY_IS_STRING 1
#define HASH_KEY_IS_LONG 2
#define HASH_KEY_NON_EXISTANT 3
#define HASH_UPDATE (1<<0)
#define HASH_ADD (1<<1)
#define HASH_NEXT_INSERT (1<<2)
#define HASH_DEL_KEY 0
#define HASH_DEL_INDEX 1
typedef int (*compare_func_t)(const void *, const void *);
typedef void (*sort_func_t)(void *, size_t, register size_t, compare_func_t);
typedef void (*dtor_func_t)(void *pDest);
typedef int (*apply_func_t)(void *pDest);
typedef int (*apply_func_arg_t)(void *pDest, void *argument);
typedef ulong (*hash_func_t)(char *arKey, uint nKeyLength);
typedef void (*copy_ctor_func_t)(void *pElement);
struct _hashtable;
typedef struct bucket {
ulong h; /* Used for numeric indexing */
uint nKeyLength;
void *pData;
void *pDataPtr;
struct bucket *pListNext;
struct bucket *pListLast;
struct bucket *pNext;
struct bucket *pLast;
char arKey[1]; /* Must be last element */
} Bucket;
typedef struct _hashtable {
uint nTableSize;
uint nHashSizeIndex;
uint nNumOfElements;
ulong nNextFreeElement;
hash_func_t pHashFunction;
Bucket *pInternalPointer; /* Used for element traversal */
Bucket *pListHead;
Bucket *pListTail;
Bucket **arBuckets;
dtor_func_t pDestructor;
zend_bool persistent;
unsigned char nApplyCount;
zend_bool bApplyProtection;
#if ZEND_DEBUG
int inconsistent;
#endif
} HashTable;
typedef Bucket* HashPosition;
BEGIN_EXTERN_C()
/* startup/shutdown */
ZEND_API int zend_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, int persistent);
ZEND_API int zend_hash_init_ex(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, int persistent, zend_bool bApplyProtection);
ZEND_API void zend_hash_destroy(HashTable *ht);
ZEND_API void zend_hash_clean(HashTable *ht);
/* additions/updates/changes */
ZEND_API int zend_hash_add_or_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest,int flag);
#define zend_hash_update(ht,arKey,nKeyLength,pData,nDataSize,pDest) \
zend_hash_add_or_update(ht,arKey,nKeyLength,pData,nDataSize,pDest,HASH_UPDATE)
#define zend_hash_add(ht,arKey,nKeyLength,pData,nDataSize,pDest) \
zend_hash_add_or_update(ht,arKey,nKeyLength,pData,nDataSize,pDest,HASH_ADD)
ZEND_API int zend_hash_quick_add_or_update(HashTable *ht, char *arKey, uint nKeyLength, ulong h, void *pData, uint nDataSize, void **pDest,int flag);
#define zend_hash_quick_update(ht,arKey,nKeyLength,h,pData,nDataSize,pDest) \
zend_hash_quick_add_or_update(ht,arKey,nKeyLength,h,pData,nDataSize,pDest,HASH_UPDATE)
#define zend_hash_quick_add(ht,arKey,nKeyLength,h,pData,nDataSize,pDest) \
zend_hash_quick_add_or_update(ht,arKey,nKeyLength,h,pData,nDataSize,pDest,HASH_ADD)
ZEND_API int zend_hash_index_update_or_next_insert(HashTable *ht, ulong h, void *pData, uint nDataSize, void **pDest, int flag);
#define zend_hash_index_update(ht,h,pData,nDataSize,pDest) \
zend_hash_index_update_or_next_insert(ht,h,pData,nDataSize,pDest,HASH_UPDATE)
#define zend_hash_next_index_insert(ht,pData,nDataSize,pDest) \
zend_hash_index_update_or_next_insert(ht,0,pData,nDataSize,pDest,HASH_NEXT_INSERT)
typedef struct _zend_hash_key {
char *arKey;
uint nKeyLength;
ulong h;
} zend_hash_key;
typedef int (*apply_func_args_t)(void *pDest, int num_args, va_list args, zend_hash_key *hash_key);
#define ZEND_STD_HASH_APPLIER \
int (*)(void *element, int num_args, va_list args, zend_hash_key *hash_key)
ZEND_API void zend_hash_graceful_destroy(HashTable *ht);
ZEND_API void zend_hash_apply(HashTable *ht, apply_func_t apply_func);
ZEND_API void zend_hash_apply_with_argument(HashTable *ht, apply_func_arg_t apply_func, void *);
ZEND_API void zend_hash_apply_with_arguments(HashTable *ht, ZEND_STD_HASH_APPLIER, int, ...);
/* Deletes */
ZEND_API int zend_hash_del_key_or_index(HashTable *ht, char *arKey, uint nKeyLength, ulong h, int flag);
#define zend_hash_del(ht,arKey,nKeyLength) \
zend_hash_del_key_or_index(ht,arKey,nKeyLength,0,HASH_DEL_KEY)
#define zend_hash_index_del(ht,h) \
zend_hash_del_key_or_index(ht,NULL,0,h,HASH_DEL_INDEX)
ZEND_API ulong zend_get_hash_value(HashTable *ht, char *arKey, uint nKeyLength);
/* Data retreival */
ZEND_API int zend_hash_find(HashTable *ht, char *arKey, uint nKeyLength, void **pData);
ZEND_API int zend_hash_quick_find(HashTable *ht, char *arKey, uint nKeyLength, ulong h, void **pData);
ZEND_API int zend_hash_index_find(HashTable *ht, ulong h, void **pData);
/* Misc */
ZEND_API int zend_hash_exists(HashTable *ht, char *arKey, uint nKeyLength);
ZEND_API int zend_hash_index_exists(HashTable *ht, ulong h);
ZEND_API ulong zend_hash_next_free_element(HashTable *ht);
/* traversing */
ZEND_API int zend_hash_move_forward_ex(HashTable *ht, HashPosition *pos);
ZEND_API int zend_hash_move_backwards_ex(HashTable *ht, HashPosition *pos);
ZEND_API int zend_hash_get_current_key_ex(HashTable *ht, char **str_index, ulong *str_length, ulong *num_index, HashPosition *pos);
ZEND_API int zend_hash_get_current_key_type_ex(HashTable *ht, HashPosition *pos);
ZEND_API int zend_hash_get_current_data_ex(HashTable *ht, void **pData, HashPosition *pos);
ZEND_API void zend_hash_internal_pointer_reset_ex(HashTable *ht, HashPosition *pos);
ZEND_API void zend_hash_internal_pointer_end_ex(HashTable *ht, HashPosition *pos);
#define zend_hash_move_forward(ht) \
zend_hash_move_forward_ex(ht, NULL)
#define zend_hash_move_backwards(ht) \
zend_hash_move_backwards_ex(ht, NULL)
#define zend_hash_get_current_key(ht, str_index, num_index) \
zend_hash_get_current_key_ex(ht, str_index, NULL, num_index, NULL)
#define zend_hash_get_current_key_type(ht) \
zend_hash_get_current_key_type_ex(ht, NULL)
#define zend_hash_get_current_data(ht, pData) \
zend_hash_get_current_data_ex(ht, pData, NULL)
#define zend_hash_internal_pointer_reset(ht) \
zend_hash_internal_pointer_reset_ex(ht, NULL)
#define zend_hash_internal_pointer_end(ht) \
zend_hash_internal_pointer_end_ex(ht, NULL)
/* Copying, merging and sorting */
ZEND_API void zend_hash_copy(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size);
ZEND_API void zend_hash_merge(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size, int overwrite);
ZEND_API int zend_hash_sort(HashTable *ht, sort_func_t sort_func, compare_func_t compare_func, int renumber);
ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t compar, zend_bool ordered);
ZEND_API int zend_hash_minmax(HashTable *ht, int (*compar)(const void *, const void *), int flag, void **pData);
ZEND_API int zend_hash_num_elements(HashTable *ht);
ZEND_API int zend_hash_rehash(HashTable *ht);
ZEND_API ulong hashpjw(char *arKey, uint nKeyLength);
#if ZEND_DEBUG
/* debug */
void zend_hash_display_pListTail(HashTable *ht);
void zend_hash_display(HashTable *ht);
#endif
END_EXTERN_C()
#define ZEND_INIT_SYMTABLE(ht) \
ZEND_INIT_SYMTABLE_EX(ht, 2, 0)
#define ZEND_INIT_SYMTABLE_EX(ht, n, persistent) \
zend_hash_init(ht, n, NULL, ZVAL_PTR_DTOR, persistent)
#endif /* ZEND_HASH_H */
-180
View File
@@ -1,180 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include "zend.h"
#include "zend-parser.h"
#include "zend_compile.h"
#include "zend_highlight.h"
#include "zend_ptr_stack.h"
#include "zend_globals.h"
#ifndef ZTS
extern char *zendtext;
extern int zendleng;
#else
#define zendtext ((char *) zend_get_zendtext(CLS_C))
#define zendleng zend_get_zendleng(CLS_C)
#endif
ZEND_API void zend_html_putc(char c)
{
switch (c) {
case '\n':
ZEND_PUTS("<br>");
break;
case '<':
ZEND_PUTS("&lt;");
break;
case '>':
ZEND_PUTS("&gt;");
break;
case '&':
ZEND_PUTS("&amp;");
break;
case ' ':
ZEND_PUTS("&nbsp;");
break;
case '\t':
ZEND_PUTS("&nbsp;&nbsp;&nbsp;&nbsp;");
break;
default:
ZEND_PUTC(c);
break;
}
}
ZEND_API void zend_html_puts(char *s, uint len)
{
register char *ptr=s, *end=s+len;
while (ptr<end) {
zend_html_putc(*ptr++);
}
}
ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini)
{
zval token;
int token_type;
char *last_color = syntax_highlighter_ini->highlight_html;
char *next_color;
int in_string=0;
CLS_FETCH();
zend_printf("<code>");
zend_printf("<font color=\"%s\">\n", last_color);
/* highlight stuff coming back from zendlex() */
token.type = 0;
while ((token_type=lex_scan(&token CLS_CC))) {
switch (token_type) {
case T_INLINE_HTML:
next_color = syntax_highlighter_ini->highlight_html;
break;
case T_COMMENT:
next_color = syntax_highlighter_ini->highlight_comment;
break;
case T_OPEN_TAG:
case T_OPEN_TAG_WITH_ECHO:
next_color = syntax_highlighter_ini->highlight_default;
break;
case T_CLOSE_TAG:
next_color = syntax_highlighter_ini->highlight_default;
break;
case T_CONSTANT_ENCAPSED_STRING:
next_color = syntax_highlighter_ini->highlight_string;
break;
case '"':
next_color = syntax_highlighter_ini->highlight_string;
in_string = !in_string;
break;
case T_WHITESPACE:
zend_html_puts(zendtext, zendleng); /* no color needed */
token.type = 0;
continue;
break;
default:
if (token.type==0) {
next_color = syntax_highlighter_ini->highlight_keyword;
} else {
if (in_string) {
next_color = syntax_highlighter_ini->highlight_string;
} else {
next_color = syntax_highlighter_ini->highlight_default;
}
}
break;
}
if (last_color != next_color) {
if (last_color != syntax_highlighter_ini->highlight_html) {
zend_printf("</font>");
}
last_color = next_color;
if (last_color != syntax_highlighter_ini->highlight_html) {
zend_printf("<font color=\"%s\">", last_color);
}
}
switch (token_type) {
case T_END_HEREDOC:
zend_html_puts(token.value.str.val, token.value.str.len);
break;
default:
zend_html_puts(zendtext, zendleng);
break;
}
if (token.type == IS_STRING) {
switch (token_type) {
case T_OPEN_TAG:
case T_OPEN_TAG_WITH_ECHO:
case T_CLOSE_TAG:
case T_WHITESPACE:
break;
default:
efree(token.value.str.val);
break;
}
} else if (token_type == T_END_HEREDOC) {
zend_bool has_semicolon=(strchr(token.value.str.val, ';')?1:0);
efree(token.value.str.val);
if (has_semicolon) {
/* the following semicolon was unput(), ignore it */
lex_scan(&token CLS_CC);
}
}
token.type = 0;
}
if (last_color != syntax_highlighter_ini->highlight_html) {
zend_printf("</font>\n");
}
zend_printf("</font>\n");
zend_printf("</code>");
}
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
-51
View File
@@ -1,51 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_HIGHLIGHT_H
#define ZEND_HIGHLIGHT_H
#define HL_COMMENT_COLOR "#FF8000" /* orange */
#define HL_DEFAULT_COLOR "#0000BB" /* blue */
#define HL_HTML_COLOR "#000000" /* black */
#define HL_STRING_COLOR "#DD0000" /* red */
#define HL_BG_COLOR "#FFFFFF" /* white */
#define HL_KEYWORD_COLOR "#007700" /* green */
typedef struct _zend_syntax_highlighter_ini {
char *highlight_html;
char *highlight_comment;
char *highlight_default;
char *highlight_string;
char *highlight_keyword;
} zend_syntax_highlighter_ini;
BEGIN_EXTERN_C()
ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini);
int highlight_file(char *filename, zend_syntax_highlighter_ini *syntax_highlighter_ini);
int highlight_string(zval *str, zend_syntax_highlighter_ini *syntax_highlighter_ini);
ZEND_API void zend_html_putc(char c);
ZEND_API void zend_html_puts(char *s, uint len);
END_EXTERN_C()
extern zend_syntax_highlighter_ini syntax_highlighter_ini;
#endif
-152
View File
@@ -1,152 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
/* This indenter doesn't really work, it's here for no particular reason. */
#include "zend.h"
#include "zend-parser.h"
#include "zend_compile.h"
#include "zend_indent.h"
#ifndef ZTS
extern char *zendtext;
extern int zendleng;
#else
#define zendtext ((char *) zend_get_zendtext(CLS_C))
#define zendleng zend_get_zendleng(CLS_C)
#endif
static void handle_whitespace(int *emit_whitespace)
{
unsigned char c;
int i;
for (c=0; c<128; c++) {
if (emit_whitespace[c]>0) {
for (i=0; i<emit_whitespace[c]; i++) {
zend_write((char *) &c, 1);
}
}
}
memset(emit_whitespace, 0, sizeof(int)*256);
}
ZEND_API void zend_indent()
{
zval token;
int token_type;
int in_string=0;
int nest_level=0;
int emit_whitespace[256];
int i;
CLS_FETCH();
memset(emit_whitespace, 0, sizeof(int)*256);
/* highlight stuff coming back from zendlex() */
token.type = 0;
while ((token_type=lex_scan(&token CLS_CC))) {
switch (token_type) {
case T_INLINE_HTML:
zend_write(zendtext, zendleng);
break;
case T_WHITESPACE: {
token.type = 0;
/* eat whitespace, emit newlines */
for (i=0; i<zendleng; i++) {
emit_whitespace[(unsigned char) zendtext[i]]++;
}
continue;
}
break;
case '"':
in_string = !in_string;
/* break missing intentionally */
default:
if (token.type==0) {
/* keyword */
switch(token_type) {
case ',':
ZEND_PUTS(", ");
goto dflt_printout;
break;
case '{':
nest_level++;
if (emit_whitespace['\n']>0) {
ZEND_PUTS(" {\n");
memset(emit_whitespace, 0, sizeof(int)*256);
} else {
ZEND_PUTS("{");
}
break;
case '}':
nest_level--;
if (emit_whitespace['\n']==0) {
ZEND_PUTS("\n");
}
for (i=0; i<nest_level; i++) {
ZEND_PUTS(" ");
}
goto dflt_printout;
break;
dflt_printout:
default:
if (emit_whitespace['\n']>0) {
for (i=0; i<emit_whitespace['\n']; i++) {
ZEND_PUTS("\n");
}
memset(emit_whitespace, 0, sizeof(int)*256);
for (i=0; i<nest_level; i++) {
ZEND_PUTS(" ");
}
} else {
handle_whitespace(emit_whitespace);
}
zend_write(zendtext, zendleng);
break;
}
} else {
handle_whitespace(emit_whitespace);
if (in_string) {
zend_write(zendtext, zendleng);
/* a part of a string */
} else {
zend_write(zendtext, zendleng);
}
}
break;
}
if (token.type == IS_STRING) {
switch (token_type) {
case T_OPEN_TAG:
case T_CLOSE_TAG:
case T_WHITESPACE:
break;
default:
efree(token.value.str.val);
break;
}
}
token.type = 0;
}
}
-414
View File
@@ -1,414 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
/* resource lists */
#include "zend.h"
#include "zend_list.h"
#include "zend_API.h"
#include "zend_globals.h"
ZEND_API int le_index_ptr;
/* true global */
static HashTable list_destructors;
static inline int zend_list_do_insert(HashTable *list, void *ptr, int type, zend_bool valid)
{
int index;
zend_rsrc_list_entry le;
index = zend_hash_next_free_element(list);
if (index==0) index++;
le.ptr=ptr;
le.type=type;
le.refcount=1;
le.valid = valid;
zend_hash_index_update(list, index, (void *) &le, sizeof(zend_rsrc_list_entry), NULL);
return index;
}
static inline int zend_list_do_delete(HashTable *list,int id)
{
zend_rsrc_list_entry *le;
ELS_FETCH();
if (zend_hash_index_find(&EG(regular_list), id, (void **) &le)==SUCCESS) {
/* printf("del(%d): %d->%d\n", id, le->refcount, le->refcount-1); */
if (--le->refcount<=0) {
return zend_hash_index_del(&EG(regular_list), id);
} else {
return SUCCESS;
}
} else {
return FAILURE;
}
}
static inline void *zend_list_do_find(HashTable *list,int id, int *type)
{
zend_rsrc_list_entry *le;
if (zend_hash_index_find(list, id, (void **) &le)==SUCCESS) {
*type = le->type;
return le->ptr;
} else {
*type = -1;
return NULL;
}
}
ZEND_API int zend_list_insert(void *ptr, int type)
{
ELS_FETCH();
return zend_list_do_insert(&EG(regular_list), ptr, type, 1);
}
ZEND_API int zend_plist_insert(void *ptr, int type)
{
ELS_FETCH();
return zend_list_do_insert(&EG(persistent_list), ptr, type, 1);
}
ZEND_API int zend_list_addref(int id)
{
zend_rsrc_list_entry *le;
ELS_FETCH();
if (zend_hash_index_find(&EG(regular_list), id, (void **) &le)==SUCCESS) {
/* printf("add(%d): %d->%d\n", id, le->refcount, le->refcount+1); */
le->refcount++;
return SUCCESS;
} else {
return FAILURE;
}
}
ZEND_API int zend_list_delete(int id)
{
ELS_FETCH();
return zend_list_do_delete(&EG(regular_list), id);
}
ZEND_API int zend_plist_delete(int id)
{
ELS_FETCH();
return zend_list_do_delete(&EG(persistent_list), id);
}
ZEND_API int zend_list_convert_to_number(int id)
{
zend_rsrc_list_entry *le;
ELS_FETCH();
if (zend_hash_index_find(&EG(regular_list), id, (void **) &le)==SUCCESS
&& le->valid) {
return id;
}
return 0;
}
ZEND_API void *zend_list_find(int id, int *type)
{
ELS_FETCH();
return zend_list_do_find(&EG(regular_list), id, type);
}
ZEND_API void *zend_plist_find(int id, int *type)
{
ELS_FETCH();
return zend_list_do_find(&EG(persistent_list), id, type);
}
ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type)
{
int rsrc_id;
rsrc_id = zend_list_insert(rsrc_pointer, rsrc_type);
if (rsrc_result) {
rsrc_result->value.lval = rsrc_id;
rsrc_result->type = IS_RESOURCE;
}
return rsrc_id;
}
ZEND_API int zend_register_false_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type)
{
int rsrc_id;
ELS_FETCH();
rsrc_id = zend_list_do_insert(&EG(regular_list), rsrc_pointer, rsrc_type, 0);
if (rsrc_result) {
rsrc_result->value.lval = rsrc_id;
rsrc_result->type = IS_RESOURCE;
}
return rsrc_id;
}
ZEND_API void *zend_fetch_resource(zval **passed_id, int default_id, char *resource_type_name, int *found_resource_type, int num_resource_types, ...)
{
int id;
int actual_resource_type;
void *resource;
va_list resource_types;
int i;
if (default_id==-1) { /* use id */
if (!passed_id) {
if (resource_type_name) {
zend_error(E_WARNING, "No %s resource supplied", resource_type_name);
}
return NULL;
} else if ((*passed_id)->type != IS_RESOURCE) {
if (resource_type_name) {
zend_error(E_WARNING, "Supplied argument is not a valid %s resource", resource_type_name);
}
return NULL;
}
id = (*passed_id)->value.lval;
} else {
id = default_id;
}
resource = zend_list_find(id, &actual_resource_type);
if (!resource) {
if (resource_type_name) {
zend_error(E_WARNING, "%d is not a valid %s resource", id, resource_type_name);
}
return NULL;
}
va_start(resource_types, num_resource_types);
for (i=0; i<num_resource_types; i++) {
if (actual_resource_type == va_arg(resource_types, int)) {
va_end(resource_types);
if (found_resource_type) {
*found_resource_type = actual_resource_type;
}
return resource;
}
}
va_end(resource_types);
if (resource_type_name) {
zend_error(E_WARNING, "Supplied resource is not a valid %s resource", resource_type_name);
}
return NULL;
}
void list_entry_destructor(void *ptr)
{
zend_rsrc_list_entry *le = (zend_rsrc_list_entry *) ptr;
zend_rsrc_list_dtors_entry *ld;
if (zend_hash_index_find(&list_destructors, le->type,(void **) &ld)==SUCCESS) {
switch (ld->type) {
case ZEND_RESOURCE_LIST_TYPE_STD:
if (ld->list_dtor) {
(ld->list_dtor)(le->ptr);
}
break;
case ZEND_RESOURCE_LIST_TYPE_EX:
if (ld->list_dtor_ex) {
ld->list_dtor_ex(le);
}
break;
EMPTY_SWITCH_DEFAULT_CASE()
}
} else {
zend_error(E_WARNING,"Unknown list entry type in request shutdown (%d)",le->type);
}
}
void plist_entry_destructor(void *ptr)
{
zend_rsrc_list_entry *le = (zend_rsrc_list_entry *) ptr;
zend_rsrc_list_dtors_entry *ld;
if (zend_hash_index_find(&list_destructors, le->type,(void **) &ld)==SUCCESS) {
if (ld->plist_dtor) {
(ld->plist_dtor)(le->ptr);
}
} else {
zend_error(E_WARNING,"Unknown persistent list entry type in module shutdown (%d)",le->type);
}
}
int zend_init_rsrc_list(ELS_D)
{
return zend_hash_init(&EG(regular_list), 0, NULL, list_entry_destructor, 0);
}
int zend_init_rsrc_plist(ELS_D)
{
return zend_hash_init_ex(&EG(persistent_list), 0, NULL, plist_entry_destructor, 1, 0);
}
void zend_destroy_rsrc_list(ELS_D)
{
zend_hash_graceful_destroy(&EG(regular_list));
}
void zend_destroy_rsrc_plist(ELS_D)
{
zend_hash_graceful_destroy(&EG(persistent_list));
}
static int clean_module_resource(zend_rsrc_list_entry *le, int *resource_id)
{
if (le->type == *resource_id) {
return 1;
} else {
return 0;
}
}
static int zend_clean_module_rsrc_dtors_cb(zend_rsrc_list_dtors_entry *ld, int *module_number)
{
if (ld->module_number == *module_number) {
ELS_FETCH();
zend_hash_apply_with_argument(&EG(regular_list), (int (*)(void *,void *)) clean_module_resource, (void *) &(ld->resource_id));
zend_hash_apply_with_argument(&EG(persistent_list), (int (*)(void *,void *)) clean_module_resource, (void *) &(ld->resource_id));
return 1;
} else {
return 0;
}
}
void zend_clean_module_rsrc_dtors(int module_number)
{
zend_hash_apply_with_argument(&list_destructors, (int (*)(void *,void *)) zend_clean_module_rsrc_dtors_cb, (void *) &module_number);
}
ZEND_API int zend_register_list_destructors(void (*ld)(void *), void (*pld)(void *), int module_number)
{
zend_rsrc_list_dtors_entry lde;
#if 0
printf("Registering destructors %d for module %d\n", list_destructors.nNextFreeElement, module_number);
#endif
lde.list_dtor=(void (*)(void *)) ld;
lde.plist_dtor=(void (*)(void *)) pld;
lde.list_dtor_ex = lde.plist_dtor_ex = NULL;
lde.module_number = module_number;
lde.resource_id = list_destructors.nNextFreeElement;
lde.type = ZEND_RESOURCE_LIST_TYPE_STD;
lde.type_name = NULL;
if (zend_hash_next_index_insert(&list_destructors, (void *) &lde, sizeof(zend_rsrc_list_dtors_entry), NULL)==FAILURE) {
return FAILURE;
}
return list_destructors.nNextFreeElement-1;
}
ZEND_API int zend_register_list_destructors_ex(rsrc_dtor_func_t ld, rsrc_dtor_func_t pld, char *type_name, int module_number)
{
zend_rsrc_list_dtors_entry lde;
#if 0
printf("Registering destructors %d for module %d\n", list_destructors.nNextFreeElement, module_number);
#endif
lde.list_dtor = NULL;
lde.plist_dtor = NULL;
lde.list_dtor_ex = ld;
lde.plist_dtor_ex = pld;
lde.module_number = module_number;
lde.resource_id = list_destructors.nNextFreeElement;
lde.type = ZEND_RESOURCE_LIST_TYPE_EX;
lde.type_name = type_name;
if (zend_hash_next_index_insert(&list_destructors,(void *) &lde, sizeof(zend_rsrc_list_dtors_entry),NULL)==FAILURE) {
return FAILURE;
}
return list_destructors.nNextFreeElement-1;
}
int zend_init_rsrc_list_dtors()
{
return zend_hash_init(&list_destructors, 50, NULL, NULL, 1);
}
void zend_destroy_rsrc_list_dtors()
{
zend_hash_destroy(&list_destructors);
}
char *zend_rsrc_list_get_rsrc_type(int resource)
{
zend_rsrc_list_dtors_entry *lde;
if (zend_hash_index_find(&list_destructors, resource, (void **) &lde)==SUCCESS) {
return lde->type_name;
} else {
return NULL;
}
}
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
-109
View File
@@ -1,109 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_LIST_H
#define ZEND_LIST_H
#include "zend_hash.h"
#include "zend_globals.h"
#define ZEND_RESOURCE_LIST_TYPE_STD 1
#define ZEND_RESOURCE_LIST_TYPE_EX 2
typedef struct _zend_rsrc_list_entry {
void *ptr;
int type;
int refcount;
zend_bool valid;
} zend_rsrc_list_entry;
typedef void (*rsrc_dtor_func_t)(zend_rsrc_list_entry *rsrc);
#define ZEND_RSRC_DTOR_FUNC(name) void name(zend_rsrc_list_entry *rsrc)
typedef struct _zend_rsrc_list_dtors_entry {
/* old style destructors */
void (*list_dtor)(void *);
void (*plist_dtor)(void *);
/* new style destructors */
rsrc_dtor_func_t list_dtor_ex;
rsrc_dtor_func_t plist_dtor_ex;
char *type_name;
int module_number;
int resource_id;
unsigned char type;
} zend_rsrc_list_dtors_entry;
#define register_list_destructors(ld, pld) zend_register_list_destructors((void (*)(void *))ld, (void (*)(void *))pld, module_number);
ZEND_API int zend_register_list_destructors(void (*ld)(void *), void (*pld)(void *), int module_number);
ZEND_API int zend_register_list_destructors_ex(rsrc_dtor_func_t ld, rsrc_dtor_func_t pld, char *type_name, int module_number);
enum list_entry_type {
LE_DB=1000
};
void list_entry_destructor(void *ptr);
void plist_entry_destructor(void *ptr);
void zend_clean_module_rsrc_dtors(int module_number);
int zend_init_rsrc_list(ELS_D);
int zend_init_rsrc_plist(ELS_D);
void zend_destroy_rsrc_list(ELS_D);
void zend_destroy_rsrc_plist(ELS_D);
int zend_init_rsrc_list_dtors();
void zend_destroy_rsrc_list_dtors();
ZEND_API int zend_list_insert(void *ptr, int type);
ZEND_API int zend_plist_insert(void *ptr, int type);
ZEND_API int zend_list_addref(int id);
ZEND_API int zend_list_delete(int id);
ZEND_API int zend_plist_delete(int id);
ZEND_API int zend_list_convert_to_number(int id);
ZEND_API void *zend_list_find(int id, int *type);
ZEND_API void *zend_plist_find(int id, int *type);
ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type);
ZEND_API void *zend_fetch_resource(zval **passed_id, int default_id, char *resource_type_name, int *found_resource_type, int num_resource_types, ...);
ZEND_API char *zend_rsrc_list_get_rsrc_type(int resource);
extern ZEND_API int le_index_ptr; /* list entry type for index pointers */
#define ZEND_VERIFY_RESOURCE(rsrc) \
if (!rsrc) { \
RETURN_NULL(); \
}
#define ZEND_FETCH_RESOURCE(rsrc, rsrc_type, passed_id, default_id, resource_type_name, resource_type) \
rsrc = (rsrc_type) zend_fetch_resource(passed_id, default_id, resource_type_name, NULL, 1, resource_type); \
ZEND_VERIFY_RESOURCE(rsrc);
#define ZEND_FETCH_RESOURCE2(rsrc, rsrc_type, passed_id, default_id, resource_type_name, resource_type1,resource_type2) \
rsrc = (rsrc_type) zend_fetch_resource(passed_id, default_id, resource_type_name, NULL, 2, resource_type1, resource_type2); \
ZEND_VERIFY_RESOURCE(rsrc);
#define ZEND_REGISTER_RESOURCE(rsrc_result, rsrc_pointer, rsrc_type) \
zend_register_resource(rsrc_result, rsrc_pointer, rsrc_type);
#endif
-275
View File
@@ -1,275 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include "zend.h"
#include "zend_llist.h"
ZEND_API void zend_llist_init(zend_llist *l, size_t size, void (*dtor)(void *data), unsigned char persistent)
{
l->head = NULL;
l->tail = NULL;
l->size = size;
l->dtor = dtor;
l->persistent = persistent;
}
ZEND_API void zend_llist_add_element(zend_llist *l, void *element)
{
zend_llist_element *tmp = pemalloc(sizeof(zend_llist_element)+l->size-1, l->persistent);
tmp->prev = l->tail;
tmp->next = NULL;
if (l->tail) {
l->tail->next = tmp;
} else {
l->head = tmp;
}
l->tail = tmp;
memcpy(tmp->data, element, l->size);
}
ZEND_API void zend_llist_prepend_element(zend_llist *l, void *element)
{
zend_llist_element *tmp = pemalloc(sizeof(zend_llist_element)+l->size-1, l->persistent);
tmp->next = l->head;
tmp->prev = NULL;
if (l->head) {
l->head->prev = tmp;
} else {
l->tail = tmp;
}
l->head = tmp;
memcpy(tmp->data, element, l->size);
}
ZEND_API void zend_llist_del_element(zend_llist *l, void *element, int (*compare)(void *element1, void *element2))
{
zend_llist_element *current=l->head;
while (current) {
if (compare(current->data, element)) {
if (current->prev) {
current->prev->next = current->next;
} else {
l->head = current->next;
}
if (current->next) {
current->next->prev = current->prev;
} else {
l->tail = current->prev;
}
if (l->dtor) {
l->dtor(current->data);
pefree(current, l->persistent);
}
break;
}
current = current->next;
}
}
ZEND_API void zend_llist_destroy(zend_llist *l)
{
zend_llist_element *current=l->head, *next;
while (current) {
next = current->next;
if (l->dtor) {
l->dtor(current->data);
}
pefree(current, l->persistent);
current = next;
}
}
ZEND_API void zend_llist_clean(zend_llist *l)
{
zend_llist_destroy(l);
l->head = l->tail = NULL;
}
ZEND_API void zend_llist_remove_tail(zend_llist *l)
{
zend_llist_element *old_tail;
if ((old_tail = l->tail)) {
if (l->tail->prev) {
l->tail->prev->next = NULL;
}
l->tail = l->tail->prev;
pefree(old_tail, l->persistent);
}
}
ZEND_API void zend_llist_copy(zend_llist *dst, zend_llist *src)
{
zend_llist_element *ptr;
zend_llist_init(dst, src->size, src->dtor, src->persistent);
ptr = src->head;
while (ptr) {
zend_llist_add_element(dst, ptr->data);
ptr = ptr->next;
}
}
ZEND_API void zend_llist_apply(zend_llist *l, void (*func)(void *data))
{
zend_llist_element *element;
for (element=l->head; element; element=element->next) {
func(element->data);
}
}
ZEND_API void zend_llist_sort(zend_llist *l, llist_compare_func_t comp_func)
{
int list_size=0, i;
zend_llist_element **elements;
zend_llist_element *element, **ptr;
for (element=l->head; element; element=element->next) {
list_size++;
}
if (list_size == 0) {
return;
}
elements = (zend_llist_element **) emalloc(list_size*sizeof(zend_llist_element *));
ptr = &elements[0];
for (element=l->head; element; element=element->next) {
*ptr++ = element;
}
qsort(elements, list_size, sizeof(zend_llist_element *), (int (*)(const void *, const void *)) comp_func);
l->head = elements[0];
elements[0]->prev = NULL;
for (i=1; i<list_size; i++) {
elements[i]->prev = elements[i-1];
elements[i-1]->next = elements[i];
}
elements[i-1]->next = NULL;
l->tail = elements[i-1];
efree(elements);
}
ZEND_API void zend_llist_apply_with_argument(zend_llist *l, void (*func)(void *data, void *arg), void *arg)
{
zend_llist_element *element;
for (element=l->head; element; element=element->next) {
func(element->data, arg);
}
}
ZEND_API void zend_llist_apply_with_arguments(zend_llist *l, llist_apply_with_args_func_t func, int num_args, ...)
{
zend_llist_element *element;
va_list args;
va_start(args, num_args);
for (element=l->head; element; element=element->next) {
func(element->data, num_args, args);
}
va_end(args);
}
ZEND_API int zend_llist_count(zend_llist *l)
{
zend_llist_element *element;
int element_count=0;
for (element=l->head; element; element=element->next) {
element_count++;
}
return element_count;
}
ZEND_API void *zend_llist_get_first_ex(zend_llist *l, zend_llist_position *pos)
{
zend_llist_position *current = pos ? pos : &l->traverse_ptr;
*current = l->head;
if (*current) {
return (*current)->data;
} else {
return NULL;
}
}
ZEND_API void *zend_llist_get_last_ex(zend_llist *l, zend_llist_position *pos)
{
zend_llist_position *current = pos ? pos : &l->traverse_ptr;
*current = l->tail;
if (*current) {
return (*current)->data;
} else {
return NULL;
}
}
ZEND_API void *zend_llist_get_next_ex(zend_llist *l, zend_llist_position *pos)
{
zend_llist_position *current = pos ? pos : &l->traverse_ptr;
if (*current) {
*current = (*current)->next;
if (*current) {
return (*current)->data;
}
}
return NULL;
}
ZEND_API void *zend_llist_get_prev_ex(zend_llist *l, zend_llist_position *pos)
{
zend_llist_position *current = pos ? pos : &l->traverse_ptr;
if (*current) {
*current = (*current)->prev;
if (*current) {
return (*current)->data;
}
}
return NULL;
}
-76
View File
@@ -1,76 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_LLIST_H
#define ZEND_LLIST_H
#include <stdlib.h>
typedef struct _zend_llist_element {
struct _zend_llist_element *next;
struct _zend_llist_element *prev;
char data[1]; /* Needs to always be last in the struct */
} zend_llist_element;
typedef struct _zend_llist {
zend_llist_element *head;
zend_llist_element *tail;
size_t size;
void (*dtor)(void *data);
unsigned char persistent;
zend_llist_element *traverse_ptr;
} zend_llist;
typedef int (*llist_compare_func_t)(const zend_llist_element *, const zend_llist_element *);
typedef void(*llist_apply_with_arg_func_t)(void *data, void *arg);
typedef void(*llist_apply_with_args_func_t)(void *data, int num_args, va_list args);
typedef void (*llist_apply_func_t)(void *);
typedef zend_llist_element* zend_llist_position;
BEGIN_EXTERN_C()
ZEND_API void zend_llist_init(zend_llist *l, size_t size, void (*dtor)(void *data), unsigned char persistent);
ZEND_API void zend_llist_add_element(zend_llist *l, void *element);
ZEND_API void zend_llist_prepend_element(zend_llist *l, void *element);
ZEND_API void zend_llist_del_element(zend_llist *l, void *element, int (*compare)(void *element1, void *element2));
ZEND_API void zend_llist_destroy(zend_llist *l);
ZEND_API void zend_llist_clean(zend_llist *l);
ZEND_API void zend_llist_remove_tail(zend_llist *l);
ZEND_API void zend_llist_copy(zend_llist *dst, zend_llist *src);
ZEND_API void zend_llist_apply(zend_llist *l, llist_apply_func_t);
ZEND_API void zend_llist_apply_with_argument(zend_llist *l, llist_apply_with_arg_func_t, void *arg);
ZEND_API void zend_llist_apply_with_arguments(zend_llist *l, llist_apply_with_args_func_t func, int num_args, ...);
ZEND_API int zend_llist_count(zend_llist *l);
ZEND_API void zend_llist_sort(zend_llist *l, llist_compare_func_t comp_func);
/* traversal */
ZEND_API void *zend_llist_get_first_ex(zend_llist *l, zend_llist_position *pos);
ZEND_API void *zend_llist_get_last_ex(zend_llist *l, zend_llist_position *pos);
ZEND_API void *zend_llist_get_next_ex(zend_llist *l, zend_llist_position *pos);
ZEND_API void *zend_llist_get_prev_ex(zend_llist *l, zend_llist_position *pos);
#define zend_llist_get_first(l) zend_llist_get_first_ex(l, NULL)
#define zend_llist_get_last(l) zend_llist_get_last_ex(l, NULL)
#define zend_llist_get_next(l) zend_llist_get_next_ex(l, NULL)
#define zend_llist_get_prev(l) zend_llist_get_prev_ex(l, NULL)
END_EXTERN_C()
#endif /* ZEND_LLIST_H */
-85
View File
@@ -1,85 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef MODULES_H
#define MODULES_H
#define INIT_FUNC_ARGS int type, int module_number ELS_DC
#define INIT_FUNC_ARGS_PASSTHRU type, module_number ELS_CC
#define SHUTDOWN_FUNC_ARGS int type, int module_number
#define SHUTDOWN_FUNC_ARGS_PASSTHRU type, module_number
#define ZEND_MODULE_INFO_FUNC_ARGS zend_module_entry *zend_module
#define ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU zend_module
#define GINIT_FUNC_ARGS void
#define GINIT_FUNC_ARGS_PASSTHRU
extern unsigned char first_arg_force_ref[];
extern unsigned char first_arg_allow_ref[];
extern unsigned char second_arg_force_ref[];
extern unsigned char second_arg_allow_ref[];
#include "zend.h"
#define ZEND_MODULE_API_NO 20000809
#ifdef ZTS
#define USING_ZTS 1
#else
#define USING_ZTS 0
#endif
#define STANDARD_MODULE_PROPERTIES_EX 0, 0, 0, NULL, 0, ZEND_DEBUG, USING_ZTS, ZEND_MODULE_API_NO
#define STANDARD_MODULE_PROPERTIES \
NULL, NULL, STANDARD_MODULE_PROPERTIES_EX
#define MODULE_PERSISTENT 1
#define MODULE_TEMPORARY 2
typedef struct _zend_module_entry zend_module_entry;
struct _zend_module_entry {
char *name;
zend_function_entry *functions;
int (*module_startup_func)(INIT_FUNC_ARGS);
int (*module_shutdown_func)(SHUTDOWN_FUNC_ARGS);
int (*request_startup_func)(INIT_FUNC_ARGS);
int (*request_shutdown_func)(SHUTDOWN_FUNC_ARGS);
void (*info_func)(ZEND_MODULE_INFO_FUNC_ARGS);
int (*global_startup_func)(void);
int (*global_shutdown_func)(void);
int globals_id;
int module_started;
unsigned char type;
void *handle;
int module_number;
unsigned char zend_debug;
unsigned char zts;
unsigned int zend_api;
};
extern HashTable module_registry;
void module_destructor(zend_module_entry *module);
int module_registry_cleanup(zend_module_entry *module);
int module_registry_request_startup(zend_module_entry *module);
#define ZEND_MODULE_DTOR (void (*)(void *)) module_destructor
#endif
-403
View File
@@ -1,403 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include <stdio.h>
#include "zend.h"
#include "zend_alloc.h"
#include "zend_compile.h"
#include "zend_extensions.h"
#include "zend_API.h"
static void zend_extension_op_array_ctor_handler(zend_extension *extension, zend_op_array *op_array)
{
if (extension->op_array_ctor) {
extension->op_array_ctor(op_array);
}
}
static void zend_extension_op_array_dtor_handler(zend_extension *extension, zend_op_array *op_array)
{
if (extension->op_array_dtor) {
extension->op_array_dtor(op_array);
}
}
static void op_array_alloc_ops(zend_op_array *op_array)
{
op_array->opcodes = erealloc(op_array->opcodes, (op_array->size)*sizeof(zend_op));
}
void init_op_array(zend_op_array *op_array, int type, int initial_ops_size CLS_DC)
{
op_array->type = type;
#if SUPPORT_INTERACTIVE
{
ELS_FETCH();
op_array->start_op_number = op_array->end_op_number = op_array->last_executed_op_number = 0;
op_array->backpatch_count = 0;
if (EG(interactive)) {
/* We must avoid a realloc() on the op_array in interactive mode, since pointers to constants
* will become invalid
*/
initial_ops_size = 8192;
}
}
#endif
op_array->refcount = (zend_uint *) emalloc(sizeof(zend_uint));
*op_array->refcount = 1;
op_array->size = initial_ops_size;
op_array->last = 0;
op_array->opcodes = NULL;
op_array_alloc_ops(op_array);
op_array->T = 0;
op_array->function_name = NULL;
op_array->filename = zend_get_compiled_filename(CLS_C);
op_array->arg_types = NULL;
op_array->brk_cont_array = NULL;
op_array->last_brk_cont = 0;
op_array->current_brk_cont = -1;
op_array->static_variables = NULL;
op_array->uses_globals = 0;
op_array->return_reference = 0;
op_array->done_pass_two = 0;
zend_llist_apply_with_argument(&zend_extensions, (void (*)(void *, void *)) zend_extension_op_array_ctor_handler, op_array);
}
ZEND_API void destroy_zend_function(zend_function *function)
{
switch (function->type) {
case ZEND_USER_FUNCTION:
destroy_op_array((zend_op_array *) function);
break;
case ZEND_INTERNAL_FUNCTION:
/* do nothing */
break;
}
}
ZEND_API void destroy_zend_class(zend_class_entry *ce)
{
if (--(*ce->refcount)>0) {
return;
}
switch (ce->type) {
case ZEND_USER_CLASS:
efree(ce->name);
efree(ce->refcount);
zend_hash_destroy(&ce->function_table);
zend_hash_destroy(&ce->default_properties);
break;
case ZEND_INTERNAL_CLASS:
free(ce->name);
free(ce->refcount);
zend_hash_destroy(&ce->function_table);
zend_hash_destroy(&ce->default_properties);
break;
}
}
void zend_class_add_ref(zend_class_entry *ce)
{
(*ce->refcount)++;
}
ZEND_API void destroy_op_array(zend_op_array *op_array)
{
zend_op *opline = op_array->opcodes;
zend_op *end = op_array->opcodes+op_array->last;
if (op_array->static_variables) {
zend_hash_destroy(op_array->static_variables);
FREE_HASHTABLE(op_array->static_variables);
}
if (--(*op_array->refcount)>0) {
return;
}
efree(op_array->refcount);
while (opline<end) {
if (opline->op1.op_type==IS_CONST) {
#if DEBUG_ZEND>2
printf("Reducing refcount for %x 1=>0 (destroying)\n", &opline->op1.u.constant);
#endif
zval_dtor(&opline->op1.u.constant);
}
if (opline->op2.op_type==IS_CONST) {
#if DEBUG_ZEND>2
printf("Reducing refcount for %x 1=>0 (destroying)\n", &opline->op2.u.constant);
#endif
zval_dtor(&opline->op2.u.constant);
}
opline++;
}
efree(op_array->opcodes);
if (op_array->function_name) {
efree(op_array->function_name);
}
if (op_array->arg_types) {
efree(op_array->arg_types);
}
if (op_array->brk_cont_array) {
efree(op_array->brk_cont_array);
}
if (op_array->done_pass_two) {
zend_llist_apply_with_argument(&zend_extensions, (void (*)(void *, void *)) zend_extension_op_array_dtor_handler, op_array);
}
}
void init_op(zend_op *op CLS_DC)
{
memset(&op->result, 0, sizeof(znode));
op->lineno = CG(zend_lineno);
op->result.op_type = IS_UNUSED;
op->extended_value = 0;
memset(&op->op1, 0, sizeof(znode));
memset(&op->op2, 0, sizeof(znode));
}
zend_op *get_next_op(zend_op_array *op_array CLS_DC)
{
zend_uint next_op_num = op_array->last++;
zend_op *next_op;
if (next_op_num >= op_array->size) {
#if SUPPORT_INTERACTIVE
ELS_FETCH();
if (EG(interactive)) {
/* we messed up */
zend_printf("Ran out of opcode space!\n"
"You should probably consider writing this huge script into a file!\n");
zend_bailout();
}
#endif
op_array->size *= 2;
op_array_alloc_ops(op_array);
}
next_op = &(op_array->opcodes[next_op_num]);
init_op(next_op CLS_CC);
return next_op;
}
int get_next_op_number(zend_op_array *op_array)
{
return op_array->last;
}
zend_brk_cont_element *get_next_brk_cont_element(zend_op_array *op_array)
{
op_array->last_brk_cont++;
op_array->brk_cont_array = erealloc(op_array->brk_cont_array, sizeof(zend_brk_cont_element)*op_array->last_brk_cont);
return &op_array->brk_cont_array[op_array->last_brk_cont-1];
}
static void zend_update_extended_info(zend_op_array *op_array CLS_DC)
{
zend_op *opline = op_array->opcodes, *end=opline+op_array->last;
while (opline<end) {
if (opline->opcode == ZEND_EXT_STMT) {
if (opline+1<end) {
if ((opline+1)->opcode == ZEND_EXT_STMT) {
opline->opcode = ZEND_NOP;
opline++;
continue;
}
opline->lineno = (opline+1)->lineno;
} else {
opline->opcode = ZEND_NOP;
}
}
opline++;
}
opline = get_next_op(op_array CLS_CC);
opline->opcode = ZEND_EXT_STMT;
opline->op1.op_type = IS_UNUSED;
opline->op2.op_type = IS_UNUSED;
if (op_array->last>0) {
opline->lineno= op_array->opcodes[op_array->last-2].lineno;
}
}
static void zend_extension_op_array_handler(zend_extension *extension, zend_op_array *op_array)
{
if (extension->op_array_handler) {
extension->op_array_handler(op_array);
}
}
int pass_two(zend_op_array *op_array)
{
zend_op *opline=op_array->opcodes, *end=opline+op_array->last;
CLS_FETCH();
if (op_array->type!=ZEND_USER_FUNCTION && op_array->type!=ZEND_EVAL_CODE) {
return 0;
}
if (CG(extended_info)) {
zend_update_extended_info(op_array CLS_CC);
}
if (CG(handle_op_arrays)) {
zend_llist_apply_with_argument(&zend_extensions, (void (*)(void *, void *)) zend_extension_op_array_handler, op_array);
}
while (opline<end) {
if (opline->op1.op_type==IS_CONST) {
opline->op1.u.constant.is_ref = 1;
opline->op1.u.constant.refcount = 2; /* Make sure is_ref won't be reset */
}
if (opline->op2.op_type==IS_CONST) {
opline->op2.u.constant.is_ref = 1;
opline->op2.u.constant.refcount = 2;
}
opline++;
}
op_array->done_pass_two = 1;
return 0;
}
int print_class(zend_class_entry *class_entry)
{
printf("Class %s:\n", class_entry->name);
zend_hash_apply(&class_entry->function_table, (int (*)(void *)) pass_two);
printf("End of class %s.\n\n", class_entry->name);
return 0;
}
ZEND_API unary_op_type get_unary_op(int opcode)
{
switch(opcode) {
case ZEND_BW_NOT:
return (unary_op_type) bitwise_not_function;
break;
case ZEND_BOOL_NOT:
return (unary_op_type) boolean_not_function;
break;
default:
return (unary_op_type) NULL;
break;
}
}
ZEND_API void *get_binary_op(int opcode)
{
switch (opcode) {
case ZEND_ADD:
case ZEND_ASSIGN_ADD:
return (void *) add_function;
break;
case ZEND_SUB:
case ZEND_ASSIGN_SUB:
return (void *) sub_function;
break;
case ZEND_MUL:
case ZEND_ASSIGN_MUL:
return (void *) mul_function;
break;
case ZEND_DIV:
case ZEND_ASSIGN_DIV:
return (void *) div_function;
break;
case ZEND_MOD:
case ZEND_ASSIGN_MOD:
return (void *) mod_function;
break;
case ZEND_SL:
case ZEND_ASSIGN_SL:
return (void *) shift_left_function;
break;
case ZEND_SR:
case ZEND_ASSIGN_SR:
return (void *) shift_right_function;
break;
case ZEND_CONCAT:
case ZEND_ASSIGN_CONCAT:
return (void *) concat_function;
break;
case ZEND_IS_IDENTICAL:
return (void *) is_identical_function;
break;
case ZEND_IS_NOT_IDENTICAL:
return (void *) is_not_identical_function;
break;
case ZEND_IS_EQUAL:
return (void *) is_equal_function;
break;
case ZEND_IS_NOT_EQUAL:
return (void *) is_not_equal_function;
break;
case ZEND_IS_SMALLER:
return (void *) is_smaller_function;
break;
case ZEND_IS_SMALLER_OR_EQUAL:
return (void *) is_smaller_or_equal_function;
break;
case ZEND_BW_OR:
case ZEND_ASSIGN_BW_OR:
return (void *) bitwise_or_function;
break;
case ZEND_BW_AND:
case ZEND_ASSIGN_BW_AND:
return (void *) bitwise_and_function;
break;
case ZEND_BW_XOR:
case ZEND_ASSIGN_BW_XOR:
return (void *) bitwise_xor_function;
break;
default:
return (void *) NULL;
break;
}
}
File diff suppressed because it is too large. Load diff
-227
View File
@@ -1,227 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_OPERATORS_H
#define ZEND_OPERATORS_H
#include <errno.h>
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
#if WITH_BCMATH
#include "ext/bcmath/number.h"
#endif
#define MAX_LENGTH_OF_LONG 18
#define MAX_LENGTH_OF_DOUBLE 32
ZEND_API int add_function(zval *result, zval *op1, zval *op2);
ZEND_API int sub_function(zval *result, zval *op1, zval *op2);
ZEND_API int mul_function(zval *result, zval *op1, zval *op2);
ZEND_API int div_function(zval *result, zval *op1, zval *op2);
ZEND_API int mod_function(zval *result, zval *op1, zval *op2);
ZEND_API int boolean_or_function(zval *result, zval *op1, zval *op2);
ZEND_API int boolean_xor_function(zval *result, zval *op1, zval *op2);
ZEND_API int boolean_and_function(zval *result, zval *op1, zval *op2);
ZEND_API int boolean_not_function(zval *result, zval *op1);
ZEND_API int bitwise_not_function(zval *result, zval *op1);
ZEND_API int bitwise_or_function(zval *result, zval *op1, zval *op2);
ZEND_API int bitwise_and_function(zval *result, zval *op1, zval *op2);
ZEND_API int bitwise_xor_function(zval *result, zval *op1, zval *op2);
ZEND_API int shift_left_function(zval *result, zval *op1, zval *op2);
ZEND_API int shift_right_function(zval *result, zval *op1, zval *op2);
ZEND_API int concat_function(zval *result, zval *op1, zval *op2);
ZEND_API int is_equal_function(zval *result, zval *op1, zval *op2);
ZEND_API int is_identical_function(zval *result, zval *op1, zval *op2);
ZEND_API int is_not_identical_function(zval *result, zval *op1, zval *op2);
ZEND_API int is_not_equal_function(zval *result, zval *op1, zval *op2);
ZEND_API int is_smaller_function(zval *result, zval *op1, zval *op2);
ZEND_API int is_smaller_or_equal_function(zval *result, zval *op1, zval *op2);
ZEND_API inline int is_numeric_string(char *str, int length, long *lval, double *dval)
#if defined(C9X_INLINE_SEMANTICS)
{
long local_lval;
double local_dval;
char *end_ptr;
if (!length) {
return 0;
}
errno=0;
local_lval = strtol(str, &end_ptr, 10);
if (errno!=ERANGE && end_ptr == str+length) { /* integer string */
if (lval) {
*lval = local_lval;
}
return IS_LONG;
}
errno=0;
local_dval = strtod(str, &end_ptr);
if (errno!=ERANGE && end_ptr == str+length) { /* floating point string */
if (! zend_finite(local_dval)) {
/* "inf","nan" and maybe other weird ones */
return 0;
}
if (dval) {
*dval = local_dval;
}
#if WITH_BCMATH
if (length>16) {
register char *ptr=str, *end=str+length;
while(ptr<end) {
switch(*ptr++) {
case 'e':
case 'E':
/* scientific notation, not handled by the BC library */
return IS_DOUBLE;
break;
default:
break;
}
}
return FLAG_IS_BC;
} else {
return IS_DOUBLE;
}
#else
return IS_DOUBLE;
#endif
}
return 0;
}
#else
;
#endif
ZEND_API int increment_function(zval *op1);
ZEND_API int decrement_function(zval *op2);
BEGIN_EXTERN_C()
ZEND_API void convert_scalar_to_number(zval *op);
ZEND_API void _convert_to_string(zval *op ZEND_FILE_LINE_DC);
ZEND_API void convert_to_long(zval *op);
ZEND_API void convert_to_double(zval *op);
ZEND_API void convert_to_long_base(zval *op, int base);
ZEND_API void convert_to_null(zval *op);
ZEND_API void convert_to_boolean(zval *op);
ZEND_API void convert_to_array(zval *op);
ZEND_API void convert_to_object(zval *op);
ZEND_API int add_char_to_string(zval *result, zval *op1, zval *op2);
ZEND_API int add_string_to_string(zval *result, zval *op1, zval *op2);
#define convert_to_string(op) _convert_to_string((op) ZEND_FILE_LINE_CC)
ZEND_API double zend_string_to_double(const char *number, zend_uint length);
END_EXTERN_C()
ZEND_API int zval_is_true(zval *op);
ZEND_API int compare_function(zval *result, zval *op1, zval *op2);
ZEND_API int numeric_compare_function(zval *result, zval *op1, zval *op2);
ZEND_API int string_compare_function(zval *result, zval *op1, zval *op2);
ZEND_API void zend_str_tolower(char *str, unsigned int length);
ZEND_API int zend_binary_zval_strcmp(zval *s1, zval *s2);
ZEND_API int zend_binary_zval_strncmp(zval *s1, zval *s2, zval *s3);
ZEND_API int zend_binary_zval_strcasecmp(zval *s1, zval *s2);
ZEND_API int zend_binary_zval_strncasecmp(zval *s1, zval *s2, zval *s3);
ZEND_API int zend_binary_strcmp(char *s1, uint len1, char *s2, uint len2);
ZEND_API int zend_binary_strncmp(char *s1, uint len1, char *s2, uint len2, uint length);
ZEND_API int zend_binary_strcasecmp(char *s1, uint len1, char *s2, uint len2);
ZEND_API int zend_binary_strncasecmp(char *s1, uint len1, char *s2, uint len2, uint length);
ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2);
ZEND_API void zend_compare_symbol_tables(zval *result, HashTable *ht1, HashTable *ht2);
ZEND_API void zend_compare_arrays(zval *result, zval *a1, zval *a2);
ZEND_API void zend_compare_objects(zval *result, zval *o1, zval *o2);
#define convert_to_ex_master(ppzv, lower_type, upper_type) \
if ((*ppzv)->type!=IS_##upper_type) { \
if (!(*ppzv)->is_ref) { \
SEPARATE_ZVAL(ppzv); \
} \
convert_to_##lower_type(*ppzv); \
}
#define convert_to_writable_ex_master(ppzv, lower_type, upper_type) \
if ((*ppzv)->type!=IS_##upper_type) { \
SEPARATE_ZVAL(ppzv); \
convert_to_##lower_type(*ppzv); \
}
#define convert_to_boolean_ex(ppzv) convert_to_ex_master(ppzv, boolean, BOOL)
#define convert_to_long_ex(ppzv) convert_to_ex_master(ppzv, long, LONG)
#define convert_to_double_ex(ppzv) convert_to_ex_master(ppzv, double, DOUBLE)
#define convert_to_string_ex(ppzv) convert_to_ex_master(ppzv, string, STRING)
#define convert_to_array_ex(ppzv) convert_to_ex_master(ppzv, array, ARRAY)
#define convert_to_object_ex(ppzv) convert_to_ex_master(ppzv, object, OBJECT)
#define convert_to_null_ex(ppzv) convert_to_ex_master(ppzv, null, NULL)
#define convert_to_writable_boolean_ex(ppzv) convert_to_writable_ex_master(ppzv, boolean, BOOL)
#define convert_to_writable_long_ex(ppzv) convert_to_writable_ex_master(ppzv, long, LONG)
#define convert_to_writable_double_ex(ppzv) convert_to_writable_ex_master(ppzv, double, DOUBLE)
#define convert_to_writable_string_ex(ppzv) convert_to_writable_ex_master(ppzv, string, STRING)
#define convert_to_writable_array_ex(ppzv) convert_to_writable_ex_master(ppzv, array, ARRAY)
#define convert_to_writable_object_ex(ppzv) convert_to_writable_ex_master(ppzv, object, OBJECT)
#define convert_to_writable_null_ex(ppzv) convert_to_writable_ex_master(ppzv, null, NULL)
#define convert_scalar_to_number_ex(ppzv) \
if ((*ppzv)->type!=IS_LONG && (*ppzv)->type!=IS_DOUBLE) { \
if (!(*ppzv)->is_ref) { \
SEPARATE_ZVAL(ppzv); \
} \
convert_scalar_to_number(*ppzv); \
}
#define Z_LVAL(zval) (zval).value.lval
#define Z_DVAL(zval) (zval).value.dval
#define Z_STRVAL(zval) (zval).value.str.val
#define Z_STRLEN(zval) (zval).value.str.len
#define Z_ARRVAL(zval) (zval).value.ht
#define Z_LVAL_P(zval_p) Z_LVAL(*zval_p)
#define Z_DVAL_P(zval_p) Z_DVAL(*zval_p)
#define Z_STRVAL_P(zval_p) Z_STRVAL(*zval_p)
#define Z_STRLEN_P(zval_p) Z_STRLEN(*zval_p)
#define Z_ARRVAL_P(zval_p) Z_ARRVAL(*zval_p)
#define Z_LVAL_PP(zval_pp) Z_LVAL(**zval_pp)
#define Z_DVAL_PP(zval_pp) Z_DVAL(**zval_pp)
#define Z_STRVAL_PP(zval_pp) Z_STRVAL(**zval_pp)
#define Z_STRLEN_PP(zval_pp) Z_STRLEN(**zval_pp)
#define Z_ARRVAL_PP(zval_pp) Z_ARRVAL(**zval_pp)
#define Z_TYPE(zval) (zval).type
#define Z_TYPE_P(zval_p) Z_TYPE(*zval_p)
#define Z_TYPE_PP(zval_pp) Z_TYPE(**zval_pp)
#endif
-125
View File
@@ -1,125 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include "zend.h"
#include "zend_ptr_stack.h"
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#endif
ZEND_API void zend_ptr_stack_init(zend_ptr_stack *stack)
{
stack->top_element = stack->elements = (void **) emalloc(sizeof(void *)*PTR_STACK_BLOCK_SIZE);
stack->max = PTR_STACK_BLOCK_SIZE;
stack->top = 0;
}
ZEND_API inline void zend_ptr_stack_push(zend_ptr_stack *stack, void *ptr)
{
if (stack->top >= stack->max) { /* we need to allocate more memory */
stack->elements = (void **) erealloc(stack->elements, (sizeof(void *) * (stack->max *= 2 )));
stack->top_element = stack->elements+stack->top;
}
stack->top++;
*(stack->top_element++) = ptr;
}
ZEND_API void zend_ptr_stack_n_push(zend_ptr_stack *stack, int count, ...)
{
va_list ptr;
void *elem;
if (stack->top+count > stack->max) { /* we need to allocate more memory */
stack->max *= 2;
stack->max += count;
stack->elements = (void **) erealloc(stack->elements, (sizeof(void *) * (stack->max)));
stack->top_element = stack->elements+stack->top;
}
va_start(ptr, count);
while (count>0) {
elem = va_arg(ptr, void *);
stack->top++;
*(stack->top_element++) = elem;
count--;
}
va_end(ptr);
}
ZEND_API void zend_ptr_stack_n_pop(zend_ptr_stack *stack, int count, ...)
{
va_list ptr;
void **elem;
va_start(ptr, count);
while (count>0) {
elem = va_arg(ptr, void **);
*elem = *(--stack->top_element);
stack->top--;
count--;
}
va_end(ptr);
}
ZEND_API inline void *zend_ptr_stack_pop(zend_ptr_stack *stack)
{
stack->top--;
return *(--stack->top_element);
}
ZEND_API void zend_ptr_stack_destroy(zend_ptr_stack *stack)
{
if (stack->elements) {
efree(stack->elements);
}
}
ZEND_API void zend_ptr_stack_apply(zend_ptr_stack *stack, void (*func)(void *))
{
int i = stack->top;
while (--i >= 0) {
func(stack->elements[i]);
}
}
ZEND_API void zend_ptr_stack_clean(zend_ptr_stack *stack, void (*func)(void *), zend_bool free_elements)
{
zend_ptr_stack_apply(stack, func);
if (free_elements) {
int i = stack->top;
while (--i >= 0) {
efree(stack->elements[i]);
}
}
stack->top = 0;
stack->top_element = stack->elements;
}
ZEND_API int zend_ptr_stack_num_elements(zend_ptr_stack *stack)
{
return stack->top;
}
-43
View File
@@ -1,43 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_PTR_STACK_H
#define ZEND_PTR_STACK_H
typedef struct _zend_ptr_stack {
int top, max;
void **elements;
void **top_element;
} zend_ptr_stack;
#define PTR_STACK_BLOCK_SIZE 64
ZEND_API void zend_ptr_stack_init(zend_ptr_stack *stack);
ZEND_API void zend_ptr_stack_push(zend_ptr_stack *stack, void *ptr);
ZEND_API void zend_ptr_stack_n_push(zend_ptr_stack *stack, int count, ...);
ZEND_API void *zend_ptr_stack_pop(zend_ptr_stack *stack);
ZEND_API void zend_ptr_stack_n_pop(zend_ptr_stack *stack, int count, ...);
ZEND_API void zend_ptr_stack_destroy(zend_ptr_stack *stack);
ZEND_API void zend_ptr_stack_apply(zend_ptr_stack *stack, void (*func)(void *));
ZEND_API void zend_ptr_stack_clean(zend_ptr_stack *stack, void (*func)(void *), zend_bool free_elements);
ZEND_API int zend_ptr_stack_num_elements(zend_ptr_stack *stack);
#endif /* ZEND_PTR_STACK_H */
-40
View File
@@ -1,40 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include <stdio.h>
#include "zend.h"
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#endif
#if ZEND_BROKEN_SPRINTF
int zend_sprintf(char *buffer, const char *format, ...)
{
va_list args;
va_start(args, format);
vsprintf(buffer, format, args);
va_end(args);
return strlen(buffer);
}
#endif
-164
View File
@@ -1,164 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include "zend.h"
#include "zend_stack.h"
ZEND_API int zend_stack_init(zend_stack *stack)
{
stack->top = 0;
stack->elements = (void **) emalloc(sizeof(void **) * STACK_BLOCK_SIZE);
if (!stack->elements) {
return FAILURE;
} else {
stack->max = STACK_BLOCK_SIZE;
return SUCCESS;
}
}
ZEND_API int zend_stack_push(zend_stack *stack, void *element, int size)
{
if (stack->top >= stack->max) { /* we need to allocate more memory */
stack->elements = (void **) erealloc(stack->elements,
(sizeof(void **) * (stack->max += STACK_BLOCK_SIZE)));
if (!stack->elements) {
return FAILURE;
}
}
stack->elements[stack->top] = (void *) emalloc(size);
memcpy(stack->elements[stack->top], element, size);
return stack->top++;
}
ZEND_API int zend_stack_top(zend_stack *stack, void **element)
{
if (stack->top > 0) {
*element = stack->elements[stack->top - 1];
return SUCCESS;
} else {
*element = NULL;
return FAILURE;
}
}
ZEND_API int zend_stack_del_top(zend_stack *stack)
{
if (stack->top > 0) {
efree(stack->elements[--stack->top]);
}
return SUCCESS;
}
ZEND_API int zend_stack_int_top(zend_stack *stack)
{
int *e;
if (zend_stack_top(stack, (void **) &e) == FAILURE) {
return FAILURE; /* this must be a negative number, since negative numbers can't be address numbers */
} else {
return *e;
}
}
ZEND_API int zend_stack_is_empty(zend_stack *stack)
{
if (stack->top == 0) {
return 1;
} else {
return 0;
}
}
ZEND_API int zend_stack_destroy(zend_stack *stack)
{
register int i;
for (i = 0; i < stack->top; i++) {
efree(stack->elements[i]);
}
if (stack->elements) {
efree(stack->elements);
}
return SUCCESS;
}
ZEND_API void **zend_stack_base(zend_stack *stack)
{
return stack->elements;
}
ZEND_API int zend_stack_count(zend_stack *stack)
{
return stack->top;
}
ZEND_API void zend_stack_apply(zend_stack *stack, int type, int (*apply_function)(void *element))
{
int i;
switch (type) {
case ZEND_STACK_APPLY_TOPDOWN:
for (i=stack->top-1; i>=0; i--) {
if (apply_function(stack->elements[i])) {
break;
}
}
break;
case ZEND_STACK_APPLY_BOTTOMUP:
for (i=0; i<stack->top; i++) {
if (apply_function(stack->elements[i])) {
break;
}
}
break;
}
}
ZEND_API void zend_stack_apply_with_argument(zend_stack *stack, int type, int (*apply_function)(void *element, void *arg), void *arg)
{
int i;
switch (type) {
case ZEND_STACK_APPLY_TOPDOWN:
for (i=stack->top-1; i>=0; i--) {
if (apply_function(stack->elements[i], arg)) {
break;
}
}
break;
case ZEND_STACK_APPLY_BOTTOMUP:
for (i=0; i<stack->top; i++) {
if (apply_function(stack->elements[i], arg)) {
break;
}
}
break;
}
}
-47
View File
@@ -1,47 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_STACK_H
#define ZEND_STACK_H
typedef struct _zend_stack {
int top, max;
void **elements;
} zend_stack;
#define STACK_BLOCK_SIZE 64
ZEND_API int zend_stack_init(zend_stack *stack);
ZEND_API int zend_stack_push(zend_stack *stack, void *element, int size);
ZEND_API int zend_stack_top(zend_stack *stack, void **element);
ZEND_API int zend_stack_del_top(zend_stack *stack);
ZEND_API int zend_stack_int_top(zend_stack *stack);
ZEND_API int zend_stack_is_empty(zend_stack *stack);
ZEND_API int zend_stack_destroy(zend_stack *stack);
ZEND_API void **zend_stack_base(zend_stack *stack);
ZEND_API int zend_stack_count(zend_stack *stack);
ZEND_API void zend_stack_apply(zend_stack *stack, int type, int (*apply_function)(void *element));
ZEND_API void zend_stack_apply_with_argument(zend_stack *stack, int type, int (*apply_function)(void *element, void *arg), void *arg);
#define ZEND_STACK_APPLY_TOPDOWN 1
#define ZEND_STACK_APPLY_BOTTOMUP 2
#endif /* ZEND_STACK_H */
-76
View File
@@ -1,76 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
+----------------------------------------------------------------------+
*/
#include <stdlib.h>
#include "zend_static_allocator.h"
/* Not checking emalloc() and erealloc() return values as they are supposed to bailout */
inline static void block_init(Block *block, zend_uint block_size)
{
block->pos = block->bp = (char *) emalloc(block_size);
block->end = block->bp + block_size;
}
inline static char *block_allocate(Block *block, zend_uint size)
{
char *retval = block->pos;
if ((block->pos += size) >= block->end) {
return (char *)NULL;
}
return retval;
}
inline static void block_destroy(Block *block)
{
efree(block->bp);
}
void static_allocator_init(StaticAllocator *sa)
{
sa->Blocks = (Block *) emalloc(sizeof(Block));
block_init(sa->Blocks, ALLOCATOR_BLOCK_SIZE);
sa->num_blocks = 1;
sa->current_block = 0;
}
char *static_allocator_allocate(StaticAllocator *sa, zend_uint size)
{
char *retval;
retval = block_allocate(&sa->Blocks[sa->current_block], size);
if (retval) {
return retval;
}
sa->Blocks = (Block *) erealloc(sa->Blocks, ++sa->num_blocks);
sa->current_block++;
block_init(&sa->Blocks[sa->current_block], (size > ALLOCATOR_BLOCK_SIZE) ? size : ALLOCATOR_BLOCK_SIZE);
retval = block_allocate(&sa->Blocks[sa->current_block], size);
return retval;
}
void static_allocator_destroy(StaticAllocator *sa)
{
zend_uint i;
for (i=0; i<sa->num_blocks; i++) {
block_free(&sa->Blocks[i]);
}
efree(sa->Blocks);
}
-45
View File
@@ -1,45 +0,0 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_STATIC_ALLOCATOR_H
#define ZEND_STATIC_ALLOCATOR_H
#define ALLOCATOR_BLOCK_SIZE 400000
/* Temporary */
typedef unsigned int zend_uint;
#define emalloc(s) malloc(s)
#define efree(p) free(p)
typedef struct _Block {
char *bp;
char *pos;
char *end;
} Block;
typedef struct _StaticAllocator {
Block *Blocks;
zend_uint num_blocks;
zend_uint current_block;
} StaticAllocator;
void static_allocator_init(StaticAllocator *sa);
char *static_allocator_allocate(StaticAllocator *sa, zend_uint size);
void static_allocator_destroy(StaticAllocator *sa);
#endif /* ZEND_STATIC_ALLOCATOR_H */
Loaded 100 of 1463 files, more files were not shown because too many files have changed in this diff. Show more