Compare commits

..
Author SHA1 Message Date
SVN Migration a2c60b0e32 This commit was manufactured by cvs2svn to create tag 'php_4_0_5RC3'. 2001-03-28 13:36:53 +00:00
Zeev Suraski 0613e48b8e RC3 2001-03-28 13:36:52 +00:00
Romolo Manfredini 8522d30081 Safe mode check on target introduced in function move_uploaded_file. 2001-03-28 09:05:50 +00:00
Romolo Manfredini 2b82b1c47a Safe mode check for target introduced in function copy. Pls insert in 4_0_5 2001-03-28 09:01:27 +00:00
Derick Rethans daf68d8d91 - MFH (Fix for bug 10002) 2001-03-27 17:24:01 +00:00
Ben Mansell 8f710d827e Changed header handling; before, we were somehow losing
Content-Type: text/html
2001-03-27 16:29:45 +00:00
Thies C. Arntzen 74ffa31da1 MFH 2001-03-27 15:04:26 +00:00
foobar d4b7d08019 MFH 2001-03-27 14:03:03 +00:00
Romolo Manfredini e7875fc20d pg_close was closing connection twice, pls insert in 4_0_5 2001-03-27 10:22:32 +00:00
foobar f446cc2e3f MFH 2001-03-22 13:20:35 +00:00
André Langhorst 715b32f618 synchronizing with CVS 2001-03-21 15:35:07 +00:00
André Langhorst 5fb6dda2fc 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:17:13 +00:00
SVN Migration f00c18ad23 This commit was manufactured by cvs2svn to create branch 'PHP_4_0_5'. 2001-03-20 22:35:31 +00:00
Zeev Suraski ad8426b7d3 4.0.5RC2 2001-03-20 21:59:49 +00:00
Andi Gutmans eb2afa6cfb - MFH 2001-03-20 18:15:10 +00:00
foobar d16d5eb9f6 MFH 2001-03-20 01:49:56 +00:00
foobar 3b6a30dd6b MFH 2001-03-20 01:42:40 +00:00
foobar 36393c74f5 MFH 2001-03-20 01:32:28 +00:00
SVN Migration 4a58dd0b64 This commit was manufactured by cvs2svn to create branch 'PHP_4_0_5'. 2001-03-19 11:03:30 +00:00
Fredrik Öhrn 3ab749ce27 Solved compile failure due to clash between IMAP and ClibPDF headers. 2001-03-18 18:45:21 +00:00
Zeev Suraski 5fe65aa136 MFH 2001-03-18 02:36:27 +00:00
Zeev Suraski 5ce1dc591b MFH 2001-03-18 00:11:15 +00:00
Derick Rethans fb5d197a99 - MFH (memleak fix) 2001-03-17 14:55:24 +00:00
Anil Madhavapeddy ab5900f9bb Update libtool to support OpenBSD 2.8+ wrt shared libraries and
library dependencies.  Tested on i386/sparc.
2001-03-17 13:13:55 +00:00
James Moore 45c5791d5e MFH for website team credits. 2001-03-17 12:21:22 +00:00
Zeev Suraski 1ab8f39f47 MFH 2001-03-17 03:05:07 +00:00
Dan Kalowsky 6a6318d4be This is to correct bug #9762, patch submitted by Bug reporter. 2001-03-16 13:24:06 +00:00
Sascha Schumann de3c9594e4 Don't do anything, if the user wants no PDF. 2001-03-16 12:25:34 +00:00
Zeev Suraski 8bb1eb9d01 Update NEWS for the branch... 2001-03-13 16:27:40 +00:00
Zeev Suraski f48c985537 Rebranch 2001-03-13 16:23:53 +00:00
SVN Migration 57293eea0b This commit was manufactured by cvs2svn to create branch 'PHP_4_0_5'. 2001-03-13 11:09:38 +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
Andi Gutmans 56498d48b4 - To configure with ingres should be --with-ingres and not --with-ii
- Changing it for 4.0.2 so that we don't have backwards compatibility
- problems later on
2000-08-29 18:21:07 +00:00
Andi Gutmans a15887434d - Close NEWS file for release. 2000-08-29 15:49:47 +00:00
Zeev Suraski 3a10285392 Go 4.0.2 2000-08-29 15:49:44 +00:00
Andi Gutmans e7f10a41f2 - Update Zend version. 2000-08-29 15:48:55 +00:00
Sascha Schumann e97c8ff013 Set SG(request_info).path_translated to the path of the main script. 2000-08-29 15:09:44 +00:00
Thies C. Arntzen b1d4fcb33c fix var_dump()s "}"-indention 2000-08-29 11:09:20 +00:00
Stig Bakken 1b4d8c0fb6 @Added PHP API for Zend's ticks
Added PHP API for registering tick functions.  Ticks is a per-instruction
callback in Zend that allows us to implement cooperative multitasking
within PHP.  Example:

In extension code:

php_add_tick_function(my_tick_func);

void my_tick_func(int count) {
    php_printf("[tick %d]", count);
}

In PHP code:
<?php

declare(ticks = 1) {
    print "there should be two ticks here.\n";
}

?>
2000-08-29 09:18:48 +00:00
Stig Bakken fad9bab629 * Added "test" make target so you can do "make test" in any directory.
* Added copyright header to run-test.php
2000-08-29 09:12:44 +00:00
Stig Bakken 83ba61245c All (three) current DB tests pass. 2000-08-29 09:10:44 +00:00
Sam Ruby 4a915571f5 Add reflect.java to the list of java classes to be compiled 2000-08-29 01:42:58 +00:00
9aabb6c08d ChangeLog update 2000-08-29 01:09:05 +00:00
Stig Bakken 54e911aa4f * renamed toString method to __string_value 2000-08-28 23:09:36 +00:00
Andi Gutmans 69e2d48738 - Change spaces to tab 2000-08-28 19:31:56 +00:00
Uwe Steinmann ed50eba46d - updated on new zend_api 2000-08-28 15:19:23 +00:00
Uwe Steinmann 32f6eeb3bd - fixed prototyp 2000-08-28 13:04:40 +00:00
Rasmus Lerdorf 8a36eb220e Missed a couple of center attributes 2000-08-28 09:01:54 +00:00
Stig Bakken 5b2719d9b3 I said I had not _tested_ this on windows, didn't I? :-) 2000-08-28 07:03:51 +00:00
4c06a45dc5 ChangeLog update 2000-08-28 01:09:08 +00:00
b75610a9f3 NEWS update 2000-08-28 01:09:05 +00:00
Sterling Hughes 6e10dc5456 Fix up the implementation.
# it was getting hacky already.
2000-08-27 22:53:33 +00:00
Rasmus Lerdorf fc3acfc4d5 Some minor cleanup to make W3C's tidy validator happy 2000-08-27 22:46:40 +00:00
Sascha Schumann 0b719aa462 Compute absolute path to script 2000-08-27 20:53:10 +00:00
Sascha Schumann e783d75ed3 sizeof(old_cwd) evaluated to sizeof(char *) after last commit, so old_cwd
was not set correctly.
2000-08-27 20:51:30 +00:00
Andi Gutmans ecbc0255d9 - Use do_alloca()/free_alloca() for old_cwd. This will ensure speed in
- non-ISAPI environments but in ISAPI will use emalloc()/efree() to save
- stack space. MS only gives us 10KB those bastards.
2000-08-27 19:56:22 +00:00
Andi Gutmans 827672cd78 - Reverting Sascha's patch although I don't like doing these kind of things
- but as it is Sascha who has reverted a zillion patches I don't feel that
- bad about it :)
- The patch is morally incorrect and it actually also has a crash bug which
- I won't point out because it shouldn't be there.
- SG(path_translated) should be set by the SAPI module correctly and if it
- isn't the SAPI module should be fixed and not add code to PHP. There is
- enough special case code in PHP and I would like to clean it up and not
- add more.
- Last but not least, old_cwd takes 4KB of stack space. We should probably
- malloc() it because in ISAPI we only have 10KB of stack space.
2000-08-27 19:51:50 +00:00
Stig Bakken 490de54fb5 undid the undoing of Sascha's last commit 2000-08-27 19:49:15 +00:00
Stig Bakken 315f4f5658 @PHP 3 regression testing framework re-born (Stig)
Took the old PHP 3 regression testing framework and rewrote it in PHP.
Should work on both Windows and UNIX, however I have not tested it on
Windows.  See tests/README for how to write tests.  Added the PHP 3
tests and converted most of them.
2000-08-27 19:46:06 +00:00
Stig Bakken 7eeda99a05 @Added php_uname() function (Stig)
Added php_uname() function.
2000-08-27 19:42:45 +00:00
Sascha Schumann 390d1cd1b7 Initializing new_path once is enough 2000-08-27 19:40:21 +00:00
Sascha Schumann 3f969d0b84 If a SAPI module does not pass an absolute path as primary_file to
php_execute_script(), we will now change the filename to point to
the absolute path.
2000-08-27 19:38:18 +00:00
Sascha Schumann 626fc9a773 Export IS_ABSOLUTE_PATH to the outside world. 2000-08-27 19:36:35 +00:00
Sascha Schumann ab458219ec Real fix for this rule. 2000-08-27 19:32:28 +00:00
Andi Gutmans eea3a56973 - This should be more efficient.
- Post 4.0.2 it's time to move the whole opened_path and virtual stuff
- to emalloc() and friends including some alloca() improvements where
- possible but I don't want to break anything before
2000-08-27 19:20:53 +00:00
Sascha Schumann 58abfc5426 Fix internal_functions.c rule. This should also work better with BSD make's
VPATH support.
2000-08-27 18:54:28 +00:00
Andi Gutmans 0b8ca80e57 - Remove some unused stuff. 2000-08-27 18:27:37 +00:00
Andi Gutmans 989203cf9c - Test commit msg. This is Andi and it seems to come from Zeev. 2000-08-27 18:18:34 +00:00
Zeev Suraski 1f7b735290 - Forgot to fix non-ZTS CHDIR_FILE macro 2000-08-27 18:06:12 +00:00
Andi Gutmans 39770d99ea - Try and fix problem with opening wrong file. 2000-08-27 18:01:17 +00:00
Chuck Hagenbuch 66dfb8aac1 Taking responsibility for the IMAP and MCAL extensions, so there's at least
a point of contact.
2000-08-27 17:08:06 +00:00
Chuck Hagenbuch 40404d7337 fixing the license header and updating some prototypes/variable names in the
mcal extension.
2000-08-27 17:05:53 +00:00
Sascha Schumann bf94671c3c Fix install-local-data target in VPATH mode. PEAR.php is generated and
stored in builddir.
2000-08-27 11:10:38 +00:00
Sascha Schumann c66bc46bb1 Remove obsolete note about Makefile.am 2000-08-27 10:05:23 +00:00
Sascha Schumann 35a9a1878e Fix strlcpy use at this place. 2000-08-27 09:48:03 +00:00
Sascha Schumann 2eb8688f29 Refine PHP_STRLCPY comment 2000-08-27 09:38:33 +00:00
Sascha Schumann b2cecd9d8b newtype has a length of newlen+1, 'len' refers to the length of *mimetype
here.
2000-08-27 09:32:23 +00:00
Sascha Schumann 365edaddd4 Add PHP_STRLCPY macro. This macro should be used in new code instead of
strlcpy/strlcat which are intended for fixing broken code.
2000-08-27 09:30:15 +00:00
Andi Gutmans b79db079a6 - Fix possible overflow in fsockopen(). 2000-08-27 04:14:47 +00:00
9d39ada3d0 ChangeLog update 2000-08-27 01:09:07 +00:00
Daniel Beulshausen f872296aaf updated with cybercash and dotnet 2000-08-26 20:40:11 +00:00
Daniel Beulshausen 280a79a319 added sam's readme and played with the directory's 2000-08-26 20:27:06 +00:00
Daniel Beulshausen 70ef0577a3 dsp for cybercash 2000-08-26 20:11:31 +00:00
Stig Venaas d584491ddf News about ldap.c change to allow building with OpenLDAP 2.0 2000-08-26 17:02:24 +00:00
Stig Venaas 0435c2e306 Makes it work with OpenLDAP 2.0 and reduces number of ifdefs 2000-08-26 16:20:37 +00:00
Andi Gutmans 1192fe545f - Don't define this function in non-debug mode 2000-08-26 14:45:29 +00:00
Zeev Suraski 6a8440fb70 Advise people to use error logging instead of error displaying on production web sites 2000-08-26 14:25:47 +00:00
Andi Gutmans 82d7c4294c - Also change constants. Note: PHP tries to make names intuitive.
- PHP extensions don't necessarily need to use the exact C counter part, it
- should be easy to read and not be short names such as II_*
2000-08-26 14:24:33 +00:00
Andi Gutmans 0e6db7dc82 - Asked the author a long time already to change the function names to
- something which won't take up all of the ii_* names (not verbose enough).
- I'm doing it myself now so it really has to be checked as I can't compile.
- Changed both the function names and INI parameter names.
2000-08-26 14:21:26 +00:00
Sascha Schumann 483c99ad73 mkdep.perl was replaced by mkdep.awk 2000-08-26 14:08:03 +00:00
Sam Ruby a0b745a053 Add ***EXPERIMENTAL*** Zend OO Extension support for Microsoft.Net 2000-08-26 12:53:14 +00:00
64b8ea5963 ChangeLog update 2000-08-26 01:09:10 +00:00
4f343428d1 NEWS update 2000-08-26 01:09:07 +00:00
Daniel Beulshausen 9893e9316e added the ifx (informix) extension 2000-08-25 21:46:01 +00:00
Daniel Beulshausen c9b4568f3e updated dsp to build with custom build step 2000-08-25 21:43:01 +00:00
Daniel Beulshausen 4a474b8120 lets keep it in one dsp 2000-08-25 21:42:15 +00:00
Hénot David 83d4cbf15e Copyright modification. 2000-08-25 15:56:41 +00:00
Andrei Zmievski 4df36948c8 @- Fixed a bug in preg_replace() that would truncate subject string if the
@  first argument was en empty array. (Andrei)
This fixes bug #6346, that would truncate subject string if the
first argument was en empty array.
2000-08-25 13:51:07 +00:00
Sascha Schumann c6cd319cd4 Use request_uri as PHP_SELF. decodedurl also includes the query string. 2000-08-25 10:00:48 +00:00
Sascha Schumann 5905971122 Use SAPI' register_server_variables hook.
Defines PHP_SELF now.
2000-08-25 09:59:38 +00:00
Sascha Schumann ad04898e05 php_register_variables(.. ELS_CC ..) 2000-08-25 09:15:00 +00:00
Sascha Schumann c1894bbf96 Add dummy depend: target 2000-08-25 09:04:51 +00:00
Sascha Schumann 8a1db559b6 Make proper use of SAPI's register_environment functionality. 2000-08-25 08:46:32 +00:00
c708eefcd4 ChangeLog update 2000-08-25 08:15:41 +00:00
Sascha Schumann e0818297f1 Add autoconf check for awk and use proper macro $(AWK) 2000-08-25 08:15:10 +00:00
f6e38a2e95 NEWS update 2000-08-25 08:15:05 +00:00
Sascha Schumann f1ec9035fc Add new depend rule to rules_pear.mk and install mkdep.awk. 2000-08-25 07:22:05 +00:00
Sascha Schumann 681f50bf4e Remove old .cvsignore file 2000-08-25 07:21:44 +00:00
Stig Bakken 03471b21ee @Added ob_get_length function (Stig)
Added ob_get_length() function (returns size of buffer)
2000-08-25 03:10:42 +00:00
Stig Bakken 6cbdaf985f compile fix (RedHat 6.2) 2000-08-25 03:08:37 +00:00
Dan Kalowsky b853731aaf prefer -gt to -lt, and dropped the version number to 2 instead of 3 2000-08-24 19:27:21 +00:00
Sascha Schumann b224dd96bd Don't distribute buildmk.stamp to the end user. Otherwise, buildcheck.sh
won't be run on the user's system, when they try to use buildconf.
2000-08-24 19:23:11 +00:00
Andi Gutmans fbbc249f2b - Revert patch from 9/7/2000 which seems to have broken unset().
- I hope what made me do this patch doesn't appear again.
2000-08-24 19:03:35 +00:00
Zeev Suraski 51856230d3 Update .dsp 2000-08-24 18:58:50 +00:00
Zeev Suraski c542f9a3f4 - Fix IMAP build problem
- Allow external DLLs to use warn_not_available
2000-08-24 18:49:49 +00:00
Sterling Hughes 3f97600862 Remove bogus commit that made DB::DB() an alias for DB::connect() 2000-08-24 18:18:49 +00:00
Daniel Beulshausen b2c2220971 updated dsw with fdf and gd 2000-08-24 18:18:05 +00:00
Daniel Beulshausen 04855ca11c added the gd extension - see the comment!
# configuring the gd extesion is currently a mess.
# currently its configured with jpg, wbmp, png and ttf
# maybe we should think about moving that stuff to the
# config.w32.h or to a seperate gdwin32 header
2000-08-24 18:14:42 +00:00
Daniel Beulshausen f08b599821 dsp for the win32 fdf extension 2000-08-24 17:56:38 +00:00
Daniel Beulshausen b6f0d041f9 deleted a few unnecceasary defines and added the Release_TS_Inline path to the libpath 2000-08-24 17:48:30 +00:00
Andrei Zmievski 681f6d53bb Andi's suggestion. 2000-08-24 17:09:26 +00:00
Thies C. Arntzen d33f42d53f beautify 2000-08-24 15:29:50 +00:00
Stanislav Malyshev 7248d68d49 Fix segfault on readline without parameters 2000-08-24 14:41:12 +00:00
Sascha Schumann c9dfdd38a7 More complete set of (C) notes 2000-08-24 14:29:29 +00:00
Sascha Schumann d4dd261436 Script for replacing the copyright messages 2000-08-24 14:18:36 +00:00
Sascha Schumann 9c86c11abf These scripts are not in use anymore. RIP. 2000-08-24 13:26:58 +00:00
Andrei Zmievski d7c43de3ce @- Fixed a bug that did not respect limit parameter in preg_replace() when
@  using /e modifier. (Andrei)
2000-08-24 13:23:13 +00:00
Sascha Schumann 876bac4823 builddir is used by the Unix build framework.
Rename builddir to phpbuilddir
2000-08-24 12:02:05 +00:00
Sascha Schumann 693180c1a2 Small speedup 2000-08-24 11:56:54 +00:00
Sascha Schumann a8be2cf641 Speed it up by moving the two sub's into the main loop.
Also print out dependencies immediately instead of buffering them.
2000-08-24 11:28:41 +00:00
Sascha Schumann ba4ddf32b4 Create dependencies using an awk script. Works much nicer in vpath
environments.
2000-08-24 11:02:03 +00:00
Sascha Schumann 7ca4354c22 Typo 2000-08-24 09:02:56 +00:00
Sascha Schumann 0181cae318 Some crappy makes don't handle the .PHONY target correctly.
So we force a rebuild of generated_lists
2000-08-24 05:55:19 +00:00
Sterling Hughes 4850e34bf3 -Add getCode() method to PEAR_Error
-Correct license versions + My Address for DB/* mods
-Correct ibase module
-Javadocize File_Find
-Add a optional constructor to DB that passes it on to DB::connect()
2000-08-24 01:34:16 +00:00
5875af9372 ChangeLog update 2000-08-24 01:09:16 +00:00
Andrei Zmievski 39671d8915 ext/icap is obsolete. 2000-08-23 18:31:01 +00:00
Daniel Beulshausen 9d4081896c added curl, dbase and gettext to the project 2000-08-23 16:21:58 +00:00
Daniel Beulshausen 2ec7ccdf4c win32 projectfile for the curl extension 2000-08-23 16:18:28 +00:00
Sascha Schumann 4694c419cf Add note about --with-kerberos 2000-08-23 16:15:08 +00:00
Daniel Beulshausen d076f5f2d9 win32 projectfile for the dbase extension 2000-08-23 16:11:44 +00:00
Daniel Beulshausen 8a5ceac253 win32 projectfile fot the gettext extension 2000-08-23 16:00:38 +00:00
Daniel Beulshausen c8eb56cc59 changed the output directorys from the windowsbuilds 2000-08-23 15:43:36 +00:00
Daniel Beulshausen a4cf34619d changed the intermediate output dir, to make it a bit cleaner 2000-08-23 15:32:09 +00:00
Sascha Schumann 4e7ab5ec7b phpextdist is located in $(srcdir), so don't try to install it from
$(builddir).
2000-08-23 14:07:24 +00:00
Egon Schmid 0508a61421 Changed long to int. 2000-08-23 13:47:00 +00:00
Andrei Zmievski 25b9ee5a74 formatting. 2000-08-23 13:07:51 +00:00
Sascha Schumann 96b221755a -lt is preferred over \> 2000-08-23 12:59:50 +00:00
Sascha Schumann 3cb026db73 Fix library order for -lpng -lz.
PR: #3978
2000-08-23 12:28:48 +00:00
Stanislav Malyshev b28f6eba38 Make parsedate build again
# I do not really know what's the problem with const, but I do know
# it doesn't compile when declaration and definition don't match
2000-08-23 10:54:13 +00:00
Sterling Hughes 2604cb987a A little condensing,
Add an additional check to make sure port is specified with
  AF_INET in connect().
2000-08-23 08:29:16 +00:00
Chris Vandomelen 91944be3f7 Corrected bugs in php_if_connect() to make it work properly -- needed to
run htons() on the port number provided, and needed to perform DNS lookups
properly and store the results as expected.
2000-08-23 06:41:51 +00:00
636c4e81e2 ChangeLog update 2000-08-23 01:09:19 +00:00
4ee0040869 NEWS update 2000-08-23 01:09:16 +00:00
Dan Kalowsky bee5b60a22 cleaned up the PHP/SOLID integration code, and corrected some minor assumptions on my part for the 3.5 EE systems. also removed a series of warnings on builds within the ODBC functions, and corrected header order. include of the SS_LINUX and SS_FBX defines, needed to make solid headers completely happy with the wchar.h situation.
THIS DOES NOT FIX BUG ID #4615
2000-08-22 21:27:49 +00:00
Zeev Suraski ae49ebf198 'const' is problematic in code in the final section of a Bison file (Bison defines
it away)
2000-08-22 20:59:26 +00:00
Frank M. Kromann adfbf4a92f Adding ..\..\..\bindlib_w32 to include path 2000-08-22 20:46:01 +00:00
Andrei Zmievski 1955412c3d @- Added ability for each xml_set_*_handler() function to take the
@  array($obj, 'method') syntax for the handler argument as well
@  as the normal function name. (Andrei)
2000-08-22 19:32:07 +00:00
Andrei Zmievski d89c5b231c @- Updated array_walk() to be able to accept array($obj, 'method')
@  syntax for the walk function. (Andrei)
2000-08-22 18:39:29 +00:00
Andi Gutmans 207814916d - Fix bug report by Andrei when using a method as a sort user function
- parameter in usort() like functions
2000-08-22 18:35:42 +00:00
Daniel Beulshausen 5d09d7d811 some fixes 2000-08-22 18:13:53 +00:00
Daniel Beulshausen 69b914e2dd added cpdf and domxml 2000-08-22 18:04:31 +00:00
Daniel Beulshausen 3af4ba7e01 projectfile for the domxml extension 2000-08-22 18:01:50 +00:00
Andi Gutmans 8ba5d5ef9c - Remove new libmysql files 2000-08-22 18:01:28 +00:00
Andi Gutmans 0222b7ab41 - Try and revert libmysql for 4.0.2 2000-08-22 17:59:35 +00:00
Daniel Beulshausen 60676f19a5 projectfile for the clibpdf extension 2000-08-22 17:55:17 +00:00
Daniel Beulshausen d5e9318210 added interbase, pdf and sybase_ct 2000-08-22 15:22:59 +00:00
Daniel Beulshausen 381d04e197 minor fixes 2000-08-22 15:21:01 +00:00
Frank M. Kromann 3c2ec3e5f3 Removing php_realpath.c from win32 project 2000-08-22 15:18:26 +00:00
Daniel Beulshausen b422c552d7 projectfile to build the sybase_ct extension 2000-08-22 15:15:10 +00:00
Daniel Beulshausen d22ebb3cb6 projectfile to build the pdf extension 2000-08-22 15:06:55 +00:00
Daniel Beulshausen 000773e7b9 little fixes 2000-08-22 15:03:38 +00:00
MySQL Team 3c049ddcdd Interface for 'raid' files (ont in use by PHP) 2000-08-22 12:10:53 +00:00
MySQL Team 4b1380e31c New files for MySQL 3.23.23 client library. New files are for qouting
using different character sets.
2000-08-22 09:02:46 +00:00
Sascha Schumann bac08af4cb Disable php_value and add note about reliability 2000-08-22 07:33:27 +00:00
Sascha Schumann 03049aa8ac Add note about need to fix INI system 2000-08-22 07:23:24 +00:00
Sascha Schumann 2011db174b AOLserver CVS uses PREFIX. 2000-08-22 06:11:01 +00:00
Sascha Schumann 479a96ed89 Set file_handle.opened_path to NULL 2000-08-22 05:43:31 +00:00
Sascha Schumann 732f891f3c Add note about installing PHP on web servers other than Apache. 2000-08-22 05:34:22 +00:00
Andi Gutmans d0e48e92b6 - Cleanup imagetransparent in the GD library 2000-08-22 04:11:57 +00:00
Chuck Hagenbuch 3a1b4fda7e Fix a crash in imap_fetchheader(). FT_PREFETCHTEXT isn't the only flag that
you can pass to mail_fetchheader_full().
2000-08-22 02:35:30 +00:00
10247c67fa ChangeLog update 2000-08-22 01:09:15 +00:00
Rasmus Lerdorf cb3ffd56eb Slight Darwin tweak from Fred 2000-08-22 00:27:17 +00:00
Daniel Beulshausen 7632bca956 updated project to work with readdir.h rev.1.5 from apache cvs 2000-08-21 21:21:18 +00:00
Daniel Beulshausen 542d2d623c updated the projectfile to build the aolserver and nsapi modules 2000-08-21 21:01:57 +00:00
Daniel Beulshausen 0b686eaa2a added the vs6 projectfile for the aolserver 2000-08-21 20:55:10 +00:00
Sascha Schumann e4b2f8351e thttpd/PHP verified to run IMP 2.2.0 without any hitches. 2000-08-21 20:23:02 +00:00
Torben Wilson c8443dc1b9 NEWS update for file-function segfault fix. 2000-08-21 19:45:26 +00:00
1175 changed files with 114544 additions and 20033 deletions

No files matched your search

+89 -19
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,7 +164,8 @@ 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)
{
...
}
/* }}} */
@@ -143,7 +185,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
+12990
View File
File diff suppressed because it is too large. Load diff
+99 -19
View File
@@ -65,8 +65,9 @@ MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: servlet
MAINTENANCE: Unknown
STATUS: Unknown
PRIMARY MAINTAINER: Sam Ruby <rubys@us.ibm.com>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: thttpd
MAINTENANCE: Unknown
@@ -108,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
-------------------------------------------------------------------------------
@@ -127,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
-------------------------------------------------------------------------------
@@ -140,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
-------------------------------------------------------------------------------
@@ -151,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.
@@ -170,6 +171,12 @@ EXTENSION: bcmath
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: bz2
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
SINCE: 4.0.3
-------------------------------------------------------------------------------
EXTENSION: calendar
MAINTENANCE: Unknown
STATUS: Unknown
@@ -183,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
@@ -199,6 +211,11 @@ PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: dotnet
PRIMARY MAINTAINER: Sam Ruby <rubys@us.ibm.com>
MAINTENANCE: Maintained
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: exif
MAINTENANCE: Unknown
STATUS: Unknown
@@ -222,18 +239,24 @@ EXTENSION: gettext
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: icap
EXTENSION: gmp
MAINTENANCE: Unknown
STATUS: Unknown
SINCE: 4.0.4
-------------------------------------------------------------------------------
EXTENSION: icap
MAINTENANCE: Unknown
STATUS: Obsolete
-------------------------------------------------------------------------------
EXTENSION: imap
MAINTENANCE: Unknown
PRIMARY MAINTAINER: Chuck Hagenbuch <chuck@horde.org>
MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: java
PRIMARY MAINTAINER: Sam Ruby <rubys@us.ibm.com>
MAINTENANCE: Maintained
STATUS: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: ldap
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
@@ -241,20 +264,33 @@ MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: mcal
MAINTENANCE: Unknown
PRIMARY MAINTAINER: Chuck Hagenbuch <chuck@horde.org>
MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: mcrypt
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
MAINTENANCE: Maintained
STATUS: Working
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: Stig Venaas <venaas@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
SINCE: 4.0.4
-------------------------------------------------------------------------------
EXTENSION: pcre
PRIMARY MAINTAINER: Andrei Zmievski <andrei@ispi.net>
MAINTENANCE: Maintained
@@ -276,12 +312,23 @@ PRIMARY MAINTAINER: Kristian K
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: printer
MAINTENANCE: Unknown
STATUS: Experimental
SINCE: 4.0.4
COMMENT: Only for Win32
-------------------------------------------------------------------------------
EXTENSION: pspell
PRIMARY MAINTAINER: Vlad Krupin <phpdevel@echospace.com>
MAINTENANCE: Unknown
STATUS: Unknown
SINCE: 4.0.2
-------------------------------------------------------------------------------
EXTENSION: qtdom
MAINTENANCE: Unknown
STATUS: Experimental
SINCE: 4.0.4
-------------------------------------------------------------------------------
EXTENSION: readline
MAINTENANCE: Unknown
STATUS: Unknown
@@ -291,11 +338,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
@@ -303,14 +368,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: Unknown
COMMENT: Only for Unix (won't change)
-------------------------------------------------------------------------------
EXTENSION: sysvsem
MAINTENANCE: Unknown
@@ -320,15 +386,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>
@@ -336,10 +407,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?
+12 -1
View File
@@ -5,6 +5,15 @@ For the impatient here is a quick set of steps that will build PHP as
first a dynamic Apache module (DSO) for Apache 1.3.x with MySQL support
and then a static module. A more verbose explanation follows.
For installing PHP on other web servers, refer to one of the following
files:
sapi/aolserver/README
sapi/pi3web/README
sapi/servlet/README
sapi/thttpd/README
README.Zeus
Note! Only install either the static module or the dynamic one. Do not
install both.
@@ -85,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.
@@ -379,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
+1 -1
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)
+382 -3
View File
@@ -1,8 +1,385 @@
PHP 4.0 NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2000, Version 4.0.2
- Fix by-reference parameters passing for xml_ functions and for scanf functions (Stas)
?? ??? 200?, Version 4.0.5
- IMPORTANT: removed /F modifier handling from preg_replace(). Instead
one should use new preg_replace_callback() function. (Andrei)
- 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)
- 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)
- Support Zeus 3.3.8
- Added odbc_error() and odbc_errormsg() functions (Stig)
- vpopmail extension updated to working alfa. give it a try but keep in
mind that it is not ready for production environments (Boian Bonev)
- New extension for vpopmail - http://www.inter7.com/vpopmail (David Croft)
- 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)
- Fixed a bug in preg_replace() that would truncate subject string if the
first argument was en empty array. (Andrei)
- Added ob_get_length function (Stig)
- Fixed a bug that did not respect limit parameter in preg_replace() when
using /e modifier. (Andrei)
- Added ability for each xml_set_*_handler() function to take the
array($obj, 'method') syntax for the handler argument as well
as the normal function name. (Andrei)
- Updated array_walk() to be able to accept array($obj, 'method')
syntax for the walk function. (Andrei)
- Fixed segfault with fgets(), fgetcsv(), fgetss(), and fread() when
called with negative length argument. (Torben)
- 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
@@ -32,6 +409,8 @@ PHP 4.0 NEWS
- Added 4th optional parameter to sybase_[p]connect to specify the charset
for the connection (alf@alpha.ulatina.ac.cr)
- Fixed support for current thttpd releases. (Sascha)
- Added support for kerberized IMAP library using --with-kerberos
(Rasmus, Sascha)
- Virtualize realpath, chmod, chown and utime (Stas)
- Support content-encoding headers in file upload MIME parts
(Ragnar Kjørstad)
@@ -292,7 +671,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
+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
+5 -1
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.
+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
+49 -26
View File
@@ -5,16 +5,29 @@ Zend
----
* allow foreach ($array as $k => &$val) syntax. right now we cannot
traverse an array without copying each element.
* allow foreach ($array as $k => list($a, $b)) syntax for multi
dimensional arrays.
* look at replacing c-lib call tolower().
* make hash API functions work with HASH_OF() to save time.
* native large number support (probably with GNU GMP)
* Const'ify APIs. Right now, many functions leave parameters untouched,
but don't declare those as const. This makes interaction with other
interfaces difficult which pass const parameters to us.
* add try..catch/throw exception handling
* make UNC filenames work with V_CD layer
global
------
* when used in standalone (skell-script like) mode don't urldecode
arguments passed to php. right now it's not possible to say
/usr/local/bin/php somescript.php dog+cat.txt
as "dog+cat.txt" will arrive in php as "dog cat.txt".
* make everything on the language-level independent of your locale setings.
* always build the standalone executable as well as the chosen SAPI
target.
* make sure all source files have the "right" copyright.
* the following modules still use PHP3_TLS_*() macros (and thereby don't
work in ZTS mode): ext/dav/dav.c, ext/db/db.c, ext/gd/gd.c, ext/ldap/ldap.c
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
@@ -22,7 +35,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.
@@ -43,58 +56,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()
@@ -102,6 +119,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
--------
+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
+3 -1
View File
@@ -1,4 +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
+150 -58
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>
@@ -38,13 +38,16 @@ typedef struct {
} tsrm_resource_type;
#define TSRM_SHUFFLE_RSRC_ID(rsrc_id) ((rsrc_id)+1)
#define TSRM_UNSHUFFLE_RSRC_ID(rsrc_id) ((rsrc_id)-1)
/* The memory manager table */
static tsrm_tls_entry **tsrm_tls_table;
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;
@@ -55,20 +58,42 @@ static void (*tsrm_new_thread_begin_handler)();
static void (*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 */
void *ts_resource_read( tsrm_tls_entry *thread_resources, ts_rsrc_id id );
static int tsrm_error_level;
static FILE *tsrm_error_file;
#if TSRM_DEBUG
#define TSRM_ERROR tsrm_error
#define TSRM_SAFE_ARRAY_OFFSET(array, offset, range) (((offset)>=0 && (offset)<(range)) ? array[offset] : NULL)
#else
#define TSRM_ERROR
#define TSRM_SAFE_ARRAY_OFFSET(array, offset, range) array[offset]
#endif
#if defined(PTHREADS)
/* Thread local storage */
static pthread_key_t tls_key;
#endif
/* Startup TSRM (call once for the entire process) */
TSRM_API int tsrm_startup(int expected_threads, int expected_resources, int debug_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 );
#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 +101,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 +111,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,14 +138,22 @@ 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 );
#endif
}
@@ -131,19 +164,21 @@ TSRM_API ts_rsrc_id ts_allocate_id(size_t size, ts_allocate_ctor ctor, ts_alloca
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);
TSRM_ERROR(TSRM_ERROR_LEVEL_CORE, "Obtained resource id %d", TSRM_SHUFFLE_RSRC_ID(new_id));
/* store the new resource type in the resource sizes table */
if (resource_types_table_size < id_count) {
resource_types_table = (tsrm_resource_type *) realloc(resource_types_table, sizeof(tsrm_resource_type)*id_count);
if (!resource_types_table) {
return -1;
tsrm_mutex_unlock(tsmm_mutex);
TSRM_ERROR(TSRM_ERROR_LEVEL_ERROR, "Unable to allocate storage for resource");
return 0;
}
resource_types_table_size = id_count;
}
@@ -173,8 +208,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", TSRM_SHUFFLE_RSRC_ID(new_id));
return TSRM_SHUFFLE_RSRC_ID(new_id);
}
@@ -182,13 +217,17 @@ 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 );
#endif
if (tsrm_new_thread_begin_handler) {
tsrm_new_thread_begin_handler(thread_id);
@@ -199,6 +238,9 @@ static void allocate_new_resource(tsrm_tls_entry **thread_resources_ptr, THREAD_
resource_types_table[i].ctor((*thread_resources_ptr)->storage[i]);
}
}
tsrm_mutex_unlock(tsmm_mutex);
if (tsrm_new_thread_end_handler) {
tsrm_new_thread_end_handler(thread_id);
}
@@ -211,14 +253,26 @@ 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 );
if( thread_resources ) {
TSRM_ERROR(TSRM_ERROR_LEVEL_INFO, "Fetching resource id %d for current thread %d", id, (long) thread_resources->thread_id );
return ts_resource_read( thread_resources, id );
}
#endif
thread_id = tsrm_thread_id();
}
tsrm_debug("Fetching resource id %d for thread %ld\n", id, (long) thread_id);
} else {
thread_id = *th_id;
}
TSRM_ERROR(TSRM_ERROR_LEVEL_INFO, "Fetching resource id %d for thread %ld", id, (long) thread_id);
tsrm_mutex_lock(tsmm_mutex);
hash_value = THREAD_HASH_OF(thread_id, tsrm_tls_table_size);
@@ -226,8 +280,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 +290,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,12 +298,26 @@ 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);
return ts_resource_read( thread_resources, id );
}
tsrm_debug("Successfully fetched resource id %d for thread id %ld - %x\n", id, (long) thread_id, (long) 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.
*/
void *ts_resource_read( tsrm_tls_entry *thread_resources, ts_rsrc_id id )
{
void *resource;
resource = TSRM_SAFE_ARRAY_OFFSET(thread_resources->storage, TSRM_UNSHUFFLE_RSRC_ID(id), thread_resources->count);
if (resource) {
TSRM_ERROR(TSRM_ERROR_LEVEL_INFO, "Successfully fetched resource id %d for thread id %ld - %x", id, (long) thread_resources->thread_id, (long) resource);
} else {
TSRM_ERROR(TSRM_ERROR_LEVEL_ERROR, "Resource id %d is out of range (%d..%d)", id, TSRM_SHUFFLE_RSRC_ID(0), TSRM_SHUFFLE_RSRC_ID(thread_resources->count-1));
abort();
}
return resource;
}
@@ -258,9 +325,10 @@ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
/* 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 +337,26 @@ void ts_free_thread(void)
while (thread_resources) {
if (thread_resources->thread_id == thread_id) {
int i;
tsrm_mutex_unlock(tsmm_mutex);
for (i=0; i<thread_resources->count; i++) {
if (resource_types_table[i].dtor) {
resource_types_table[i].dtor(thread_resources->storage[i]);
}
}
}
for (i=0; i<thread_resources->count; i++) {
free(thread_resources->storage[i]);
}
tsrm_mutex_lock(tsmm_mutex);
free(thread_resources->storage);
if (last) {
last->next = thread_resources->next;
} else {
tsrm_tls_table[hash_value]=NULL;
}
#if defined(PTHREADS)
pthread_setspecific( tls_key, 0 );
#endif
free(thread_resources);
break;
}
@@ -310,7 +384,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();
@@ -325,11 +399,11 @@ TSRM_API THREAD_T tsrm_thread_id(void)
/* 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)
@@ -351,10 +425,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);
@@ -374,12 +448,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)
@@ -395,12 +467,10 @@ TSRM_API int tsrm_mutex_lock( MUTEX_T mutexp )
/* 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)
@@ -438,23 +508,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 */
+52 -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,6 +137,14 @@ 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
# End Group
# Begin Group "Header Files"
@@ -120,6 +153,22 @@ SOURCE=.\TSRM.c
SOURCE=.\TSRM.h
# End Source File
# Begin Source File
SOURCE=.\tsrm_config.w32.h
# End Source File
# Begin Source File
SOURCE=.\tsrm_config_common.h
# End Source File
# Begin Source File
SOURCE=.\tsrm_strtok_r.h
# End Source File
# Begin Source File
SOURCE=.\tsrm_virtual_cwd.h
# End Source File
# End Group
# End Target
# End Project
+22 -17
View File
@@ -2,30 +2,29 @@
+----------------------------------------------------------------------+
| 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
/* Only compile multi-threading functions if we're in ZTS mode */
#ifdef ZTS
#ifdef WIN32
# define TSRM_WIN32
#endif
#ifdef TSRM_WIN32
# include <windows.h>
#elif defined(GNUPTH)
# include <pth.h>
@@ -35,7 +34,7 @@
typedef int ts_rsrc_id;
#if WIN32||WINNT
#ifdef TSRM_WIN32
# ifdef TSRM_EXPORTS
# define TSRM_API __declspec(dllexport)
# else
@@ -47,7 +46,7 @@ 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)
@@ -74,7 +73,7 @@ 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 */
@@ -92,7 +91,11 @@ 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
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);
@@ -108,4 +111,6 @@ TSRM_API void *tsrm_set_new_thread_end_handler(void (*new_thread_end_handler)(TH
}
#endif
#endif /* ZTS */
#endif /* TSRM_H */
+14 -2
View File
@@ -4,18 +4,30 @@ 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_DEFINE(ZTS,1,[ ])
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 */
+1 -1
View File
@@ -68,7 +68,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
+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
+103 -118
View File
@@ -26,15 +26,14 @@
#include <limits.h>
#include <errno.h>
#include <stdlib.h>
#include <ctype.h>
#include <fcntl.h>
#ifdef ZEND_WIN32
#include "win95nt.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>
#endif
#define VIRTUAL_CWD_DEBUG 0
@@ -43,15 +42,19 @@
#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,16 +68,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 IS_SLASH(c) ((c) == '/' || (c) == '\\')
#define DEFAULT_SLASH '\\'
#ifdef TSRM_WIN32
#define tsrm_strtok_r(a,b,c) strtok((a),(b))
#define TOKENIZER_STRING "/\\"
#define IS_ABSOLUTE_PATH(path, len) \
(len >= 2 && isalpha(path[0]) && path[1] == ':')
#define COPY_WHEN_ABSOLUTE 2
static int php_check_dots(const char *element, int n)
{
@@ -91,19 +87,12 @@ static int php_check_dots(const char *element, int n)
#else
#define IS_SLASH(c) ((c) == '/')
#define DEFAULT_SLASH '/'
#define TOKENIZER_STRING "/"
#endif
/* default macros */
#ifndef IS_ABSOLUTE_PATH
#define IS_ABSOLUTE_PATH(path, len) \
(IS_SLASH(path[0]))
#endif
#ifndef IS_DIRECTORY_UP
#define IS_DIRECTORY_UP(element, len) \
(len == 2 && memcmp(element, "..", 2) == 0)
@@ -114,10 +103,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)
@@ -154,16 +139,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)
{
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)
{
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];
@@ -176,8 +176,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
cwd_globals_id = ts_allocate_id(sizeof(virtual_cwd_globals), (ts_allocate_ctor) cwd_globals_ctor, (ts_allocate_dtor) cwd_globals_dtor);
#else
cwd_globals_ctor(&cwd_globals);
#endif
#if defined(TSRM_WIN32) && defined(ZTS)
cwd_mutex = tsrm_mutex_alloc();
#endif
}
@@ -187,14 +192,14 @@ CWD_API void virtual_cwd_shutdown(void)
#ifndef ZTS
cwd_globals_dtor(&cwd_globals);
#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)
{
cwd_state *state;
CWDLS_FETCH();
@@ -211,7 +216,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;
@@ -262,15 +267,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;
@@ -297,7 +302,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);
@@ -307,7 +312,7 @@ 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
#ifdef TSRM_WIN32
} else if(IS_SLASH(path_copy[0])) {
copy_amount = 2;
#endif
@@ -328,7 +333,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);
@@ -359,7 +364,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
memcpy(&state->cwd[state->cwd_length+1], ptr, ptr_length+1);
state->cwd_length += (ptr_length+1);
}
ptr = php_strtok_r(NULL, TOKENIZER_STRING, &tok);
ptr = tsrm_strtok_r(NULL, TOKENIZER_STRING, &tok);
}
if (state->cwd_length == COPY_WHEN_ABSOLUTE) {
@@ -382,7 +387,7 @@ 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
@@ -396,7 +401,7 @@ CWD_API int virtual_chdir(const char *path)
return virtual_file_ex(&CWDG(cwd), path, php_is_dir_ok)?-1:0;
}
CWD_API int virtual_chdir_file(const char *path)
CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path))
{
int length = strlen(path);
char *temp;
@@ -409,20 +414,22 @@ CWD_API int virtual_chdir_file(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 *) malloc(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 = virtual_chdir(temp);
free(temp);
retval = p_chdir(temp);
tsrm_free_alloca(temp);
return retval;
}
@@ -435,7 +442,7 @@ CWD_API char *virtual_realpath(const char *path, char *real_path)
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';
@@ -445,18 +452,24 @@ 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)
{
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 int virtual_filepath(const char *path, char **filepath)
{
return virtual_filepath_ex(path, filepath, php_is_file_ok);
}
CWD_API FILE *virtual_fopen(const char *path, const char *mode)
@@ -510,7 +523,7 @@ CWD_API int virtual_chmod(const char *filename, mode_t mode)
return ret;
}
#ifndef PHP_WIN32
#ifndef TSRM_WIN32
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group)
{
cwd_state new_state;
@@ -567,6 +580,28 @@ CWD_API int virtual_creat(const char *path, mode_t mode)
return f;
}
CWD_API int virtual_rename(char *oldname, char *newname)
{
cwd_state old_state;
cwd_state new_state;
int retval;
CWDLS_FETCH();
CWD_STATE_COPY(&old_state, &CWDG(cwd));
virtual_file_ex(&old_state, oldname, NULL);
oldname = old_state.cwd;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, newname, NULL);
newname = new_state.cwd;
retval = rename(oldname, newname);
CWD_STATE_FREE(&old_state);
CWD_STATE_FREE(&new_state);
return retval;
}
CWD_API int virtual_stat(const char *path, struct stat *buf)
{
@@ -583,7 +618,7 @@ 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)
{
@@ -626,8 +661,11 @@ CWD_API int virtual_mkdir(const char *pathname, mode_t mode)
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;
}
@@ -647,6 +685,10 @@ CWD_API int virtual_rmdir(const char *pathname)
return retval;
}
#ifdef TSRM_WIN32
DIR *opendir(const char *name);
#endif
CWD_API DIR *virtual_opendir(const char *pathname)
{
cwd_state new_state;
@@ -662,7 +704,7 @@ 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)
{
@@ -693,7 +735,11 @@ CWD_API FILE *virtual_popen(const char *command, const char *type)
*ptr++ = ' ';
memcpy(ptr, command, command_length+1);
#ifdef TSRM_WIN32
retval = _popen(command_line, type);
#else
retval = popen(command_line, type);
#endif
free(command_line);
return retval;
}
@@ -720,7 +766,7 @@ CWD_API FILE *virtual_popen(const char *command, const char *type)
#endif
chdir(CWDG(cwd).cwd);
retval = popen(command, type);
retval = _popen(command, type);
chdir(prev_cwd);
#ifdef ZTS
@@ -732,67 +778,6 @@ CWD_API FILE *virtual_popen(const char *command, const char *type)
#endif
/* 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. */
}
#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:
+212
View File
@@ -0,0 +1,212 @@
/*
+----------------------------------------------------------------------+
| PHP version 4.0 |
+----------------------------------------------------------------------+
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Sascha Schumann <sascha@schumann.cx> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
#ifndef VIRTUAL_CWD_H
#define VIRTUAL_CWD_H
#include "tsrm_config_common.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <ctype.h>
#ifdef HAVE_UTIME_H
#include <utime.h>
#endif
#ifdef HAVE_STDARG_H
#include <stdarg.h>
#endif
#ifndef TSRM_WIN32
#include <unistd.h>
#endif
#ifdef TSRM_WIN32
#include "readdir.h"
#include <sys/utime.h>
/* mode_t isn't defined on Windows */
typedef unsigned short mode_t;
#define DEFAULT_SLASH '\\'
#define IS_SLASH(c) ((c) == '/' || (c) == '\\')
#define COPY_WHEN_ABSOLUTE 2
#define IS_ABSOLUTE_PATH(path, len) \
(len >= 2 && isalpha(path[0]) && path[1] == ':')
#else
#ifdef HAVE_DIRENT_H
#include <dirent.h>
#endif
#define DEFAULT_SLASH '/'
#define IS_SLASH(c) ((c) == '/')
#endif
#ifndef COPY_WHEN_ABSOLUTE
#define COPY_WHEN_ABSOLUTE 0
#endif
#ifndef IS_ABSOLUTE_PATH
#define IS_ABSOLUTE_PATH(path, len) \
(IS_SLASH(path[0]))
#endif
#ifdef TSRM_EXPORTS
#define CWD_EXPORTS
#endif
#ifdef TSRM_WIN32
# ifdef CWD_EXPORTS
# define CWD_API __declspec(dllexport)
# else
# define CWD_API __declspec(dllimport)
# endif
#else
#define CWD_API
#endif
typedef struct _cwd_state {
char *cwd;
int cwd_length;
} cwd_state;
typedef int (*verify_path_func)(const cwd_state *);
CWD_API void virtual_cwd_startup(void);
CWD_API void virtual_cwd_shutdown(void);
CWD_API char *virtual_getcwd_ex(size_t *length);
CWD_API char *virtual_getcwd(char *buf, size_t size);
CWD_API int virtual_chdir(const char *path);
CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path));
CWD_API int virtual_filepath(const char *path, char **filepath);
CWD_API int virtual_filepath_ex(const char *path, char **filepath, verify_path_func verify_path);
CWD_API char *virtual_realpath(const char *path, char *real_path);
CWD_API FILE *virtual_fopen(const char *path, const char *mode);
CWD_API int virtual_open(const char *path, int flags, ...);
CWD_API int virtual_creat(const char *path, mode_t mode);
CWD_API int virtual_rename(char *oldname, char *newname);
CWD_API int virtual_stat(const char *path, struct stat *buf);
#ifndef TSRM_WIN32
CWD_API int virtual_lstat(const char *path, struct stat *buf);
#endif
CWD_API int virtual_unlink(const char *path);
CWD_API int virtual_mkdir(const char *pathname, mode_t mode);
CWD_API int virtual_rmdir(const char *pathname);
CWD_API DIR *virtual_opendir(const char *pathname);
CWD_API FILE *virtual_popen(const char *command, const char *type);
#if HAVE_UTIME
CWD_API int virtual_utime(const char *filename, struct utimbuf *buf);
#endif
CWD_API int virtual_chmod(const char *filename, mode_t mode);
#ifndef TSRM_WIN32
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group);
#endif
CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func verify_path);
typedef struct _virtual_cwd_globals {
cwd_state cwd;
} virtual_cwd_globals;
#ifdef ZTS
# define CWDLS_D virtual_cwd_globals *cwd_globals
# define CWDLS_DC , CWDLS_D
# define CWDLS_C cwd_globals
# define CWDLS_CC , CWDLS_C
# define CWDG(v) (cwd_globals->v)
# define CWDLS_FETCH() virtual_cwd_globals *cwd_globals = ts_resource(cwd_globals_id)
#else
# define CWDLS_D void
# define CWDLS_DC
# define CWDLS_C
# define CWDLS_CC
# define CWDG(v) (cwd_globals.v)
# define CWDLS_FETCH()
#endif
/* The actual macros to be used in programs using TSRM
* If the program defines VIRTUAL_DIR it will use the
* virtual_* functions
*/
#ifdef VIRTUAL_DIR
#define V_GETCWD(buff, size) virtual_getcwd(buff,size)
#define V_FOPEN(path, mode) virtual_fopen(path, mode)
/* The V_OPEN macro will need to be used as V_OPEN((path, flags, ...)) */
#define V_OPEN(open_args) virtual_open open_args
#define V_CREAT(path, mode) virtual_creat(path, mode)
#define V_CHDIR(path) virtual_chdir(path)
#define V_CHDIR_FILE(path) virtual_chdir_file(path, virtual_chdir)
#define V_GETWD(buf)
#define V_REALPATH(path,real_path) virtual_realpath(path,real_path)
#define V_RENAME(oldname,newname) virtual_rename(oldname,newname)
#define V_STAT(path, buff) virtual_stat(path, buff)
#ifdef TSRM_WIN32
#define V_LSTAT(path, buff) virtual_stat(path, buff)
#else
#define V_LSTAT(path, buff) virtual_lstat(path, buff)
#endif
#define V_UNLINK(path) virtual_unlink(path)
#define V_MKDIR(pathname, mode) virtual_mkdir(pathname, mode)
#define V_RMDIR(pathname) virtual_rmdir(pathname)
#define V_OPENDIR(pathname) virtual_opendir(pathname)
#define V_POPEN(command, type) virtual_popen(command, type)
#if HAVE_UTIME
#define V_UTIME(path,time) virtual_utime(path,time)
#endif
#define V_CHMOD(path,mode) virtual_chmod(path,mode)
#ifndef TSRM_WIN32
#define V_CHOWN(path,owner,group) virtual_chown(path,owner,group)
#endif
#else
#define V_GETCWD(buff, size) getcwd(buff,size)
#define V_FOPEN(path, mode) fopen(path, mode)
#define V_OPEN(open_args) open open_args
#define V_CREAT(path, mode) creat(path, mode)
#define V_RENAME(oldname,newname) rename(oldname,newname)
#define V_CHDIR(path) chdir(path)
#define V_CHDIR_FILE(path) virtual_chdir_file(path, chdir)
#define V_GETWD(buf) getwd(buf)
#define V_STAT(path, buff) stat(path, buff)
#define V_LSTAT(path, buff) lstat(path, buff)
#define V_UNLINK(path) unlink(path)
#define V_MKDIR(pathname, mode) mkdir(pathname, mode)
#define V_RMDIR(pathname) rmdir(pathname)
#define V_OPENDIR(pathname) opendir(pathname)
#define V_POPEN(command, type) popen(command, type)
#define V_REALPATH(path,real_path) realpath(path,real_path)
#if HAVE_UTIME
#define V_UTIME(path,time) utime(path,time)
#endif
#define V_CHMOD(path,mode) chmod(path,mode)
#ifndef TSRM_WIN32
#define V_CHOWN(path,owner,group) chown(path,owner,group)
#endif
#endif
#endif /* VIRTUAL_CWD_H */
+1 -1
View File
@@ -1,6 +1,6 @@
---------------------------------------------------------------------------
The Zend License, version 0.92
Copyright (C) 1999-2000 Zend Technologies Ltd.
Copyright (C) 1999-2001 Zend Technologies Ltd.
---------------------------------------------------------------------------
The Zend scripting engine library is a product of Zend Technologies Ltd.
+37 -20
View File
@@ -1,43 +1,60 @@
## Process this file with automake to produce Makefile.in -*- makefile -*-
#CLEANFILES = zend-parser.c zend-parser.h zend-scanner.c zend-parser.output
#CLEANFILES = zend_language_parser.c zend_language_parser.h zend_language_scanner.c zend_language_parser.output zend_ini_parser.c zend_ini_parser.h zend_ini_scanner.c zend_ini_parser.output
AUTOMAKE_OPTIONS=foreign
EXTRA_LTLIBRARIES=libZend_cc.la libZend_c.la libZend_gcc.la
noinst_LTLIBRARIES=$(ZEND_SCANNER) $(ZEND_GCC) libZend.la
EXTRA_LTLIBRARIES=libZend_cc.la libZend_c.la
noinst_LTLIBRARIES=$(ZEND_SCANNER) 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_cc_la_SOURCES=zend_language_scanner_cc.cc zend_ini_scanner_cc.cc
libZend_c_la_SOURCES=zend_language_scanner.c zend_ini_scanner.c
libZend_la_SOURCES=\
zend-parser.y \
zend_language_parser.y \
zend_ini_parser.y \
zend_alloc.c zend_compile.c zend_constants.c zend_dynamic_array.c \
zend_execute.c zend_execute_API.c zend_highlight.c zend_llist.c \
zend_opcode.c zend_operators.c zend_ptr_stack.c zend_stack.c \
zend_variables.c zend.c zend_API.c zend_extensions.c zend_hash.c \
zend_list.c zend_indent.c zend_builtin_functions.c zend_sprintf.c
zend_list.c zend_indent.c zend_builtin_functions.c zend_sprintf.c \
zend_ini.c
libZend_la_LIBADD = $(ZEND_SCANNER) $(ZEND_GCC)
libZend_la_LIBADD = $(ZEND_SCANNER)
libZend_la_LDFLAGS = @EXTRA_LIBS@
libZend_la_DEPENDENCIES = $(ZEND_SCANNER)
# automake isn't too clever about "non-standard" use of lex and yacc
$(libZend_la_OBJECTS) zend-scanner.lo zend-scanner-cc.lo: zend-parser.h
$(libZend_la_OBJECTS) zend_language_scanner.lo zend_language_scanner_cc.lo: zend_language_parser.h
zend-scanner.c: $(srcdir)/zend-scanner.l
$(LEX) -Pzend -o$@ -i $(srcdir)/zend-scanner.l
zend_ini_scanner.lo zend_ini_scanner_cc.lo: zend_ini_parser.h
zend-scanner-cc.cc: $(srcdir)/zend-scanner.l
$(LEX) -+ -B -i -S$(srcdir)/flex.skl -Pzend -o$@ $(srcdir)/zend-scanner.l
# Language parser/scanner rules
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
zend_language_scanner.c: $(srcdir)/zend_language_scanner.l
$(LEX) -Pzend -o$@ -i $(srcdir)/zend_language_scanner.l
zend_language_scanner_cc.cc: $(srcdir)/zend_language_scanner.l
$(LEX) -+ -B -i -S$(srcdir)/flex.skl -Pzend -o$@ $(srcdir)/zend_language_scanner.l
zend_language_parser.h: zend_language_parser.c
zend_language_parser.c: $(srcdir)/zend_language_parser.y
$(YACC) -p zend -v -d $(srcdir)/zend_language_parser.y -o zend_language_parser.c
# INI parser/scanner rules
zend_ini_parser.c: $(srcdir)/zend_ini_parser.y
$(YACC) -p ini_ -v -d $(srcdir)/zend_ini_parser.y -o zend_ini_parser.c
zend_ini_scanner.c: $(srcdir)/zend_ini_scanner.l
$(LEX) -Pini_ -o$@ -i $(srcdir)/zend_ini_scanner.l
zend_ini_scanner_cc.cc: $(srcdir)/zend_ini_scanner.l
$(LEX) -+ -B -i -S$(srcdir)/flex.skl -Pini_ -o$@ $(srcdir)/zend_ini_scanner.l
zend_ini_parser.h: zend_ini_parser.c
depend:
zend_execute.lo: $(srcdir)/zend_execute.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(INLINE_CFLAGS) -c $(srcdir)/zend_execute.c
+1
View File
@@ -109,3 +109,4 @@ shamelessly lying about it. Here's why:
This incompatability is due to the full variable reference
within quoted strings feature added in Zend.
+105 -47
View File
@@ -107,14 +107,6 @@ LIB32=link.exe -lib
# 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
@@ -151,10 +143,6 @@ 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
@@ -167,6 +155,26 @@ SOURCE=.\zend_indent.c
# End Source File
# Begin Source File
SOURCE=.\zend_ini.c
# End Source File
# Begin Source File
SOURCE=.\zend_ini_parser.c
# End Source File
# Begin Source File
SOURCE=.\zend_ini_scanner.c
# End Source File
# Begin Source File
SOURCE=".\zend_language_parser.c"
# End Source File
# Begin Source File
SOURCE=".\zend_language_scanner.c"
# End Source File
# Begin Source File
SOURCE=.\zend_list.c
# End Source File
# Begin Source File
@@ -207,15 +215,7 @@ 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"
SOURCE=.\zend_modules.h
# End Source File
# Begin Source File
@@ -279,6 +279,18 @@ SOURCE=.\zend_indent.h
# End Source File
# Begin Source File
SOURCE=.\zend_ini.h
# End Source File
# Begin Source File
SOURCE=".\zend_language_parser.h"
# End Source File
# Begin Source File
SOURCE=".\zend_language_scanner.h"
# End Source File
# Begin Source File
SOURCE=.\zend_list.h
# End Source File
# Begin Source File
@@ -307,23 +319,50 @@ SOURCE=.\zend_variables.h
# PROP Default_Filter "y"
# Begin Source File
SOURCE=".\zend-parser.y"
SOURCE=.\zend_ini_parser.y
!IF "$(CFG)" == "Zend - Win32 Release"
!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
# Begin Custom Build
InputDir=.
InputPath=.\zend_ini_parser.y
BuildCmds= \
bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y \
"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend_ini_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
!ENDIF
# End Source File
# Begin Source File
SOURCE=".\zend_language_parser.y"
!IF "$(CFG)" == "Zend - Win32 Release"
# Begin Custom Build
InputDir=.
InputPath=".\zend-parser.y"
InputPath=".\zend_language_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 \
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y \
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
@@ -331,17 +370,16 @@ BuildCmds= \
# Begin Custom Build
InputDir=.
InputPath=".\zend-parser.y"
InputPath=".\zend_language_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 \
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y \
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
@@ -349,17 +387,16 @@ BuildCmds= \
# Begin Custom Build
InputDir=.
InputPath=".\zend-parser.y"
InputPath=".\zend_language_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 \
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y \
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
@@ -372,35 +409,56 @@ BuildCmds= \
# PROP Default_Filter "l"
# Begin Source File
SOURCE=".\zend-scanner.l"
SOURCE=.\zend_ini_scanner.l
!IF "$(CFG)" == "Zend - Win32 Release"
!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
# Begin Custom Build
InputPath=.\zend_ini_scanner.l
"zend_ini_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.c zend_ini_scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
!ENDIF
# End Source File
# Begin Source File
SOURCE=".\zend_language_scanner.l"
!IF "$(CFG)" == "Zend - Win32 Release"
# Begin Custom Build
InputPath=".\zend-scanner.l"
InputPath=".\zend_language_scanner.l"
"zend-scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -i -Pzend -ozend-scanner.c zend-scanner.l
"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -i -Pzend -ozend_language_scanner.c zend_language_scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
# Begin Custom Build
InputPath=".\zend-scanner.l"
InputPath=".\zend_language_scanner.l"
"zend-scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -i -Pzend -ozend-scanner.c zend-scanner.l
"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -i -Pzend -ozend_language_scanner.c zend_language_scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
# Begin Custom Build
InputPath=".\zend-scanner.l"
InputPath=".\zend_language_scanner.l"
"zend-scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -i -Pzend -ozend-scanner.c zend-scanner.l
"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -i -Pzend -ozend_language_scanner.c zend_language_scanner.l
# End Custom Build
+8 -22
View File
@@ -6,8 +6,8 @@ if test "$YACC" != "bison -y"; then
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}).)
if test "${1}" = "1" -a "${2}" -lt "28"; then
AC_MSG_WARN(You will need bison 1.28 if you want to regenerate the Zend parser (found ${1}.${2}).)
fi
AC_MSG_RESULT(${1}.${2} (ok))
fi
@@ -19,7 +19,7 @@ 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_PROG_LEX])
AC_REQUIRE([AC_HEADER_STDC])
LIBZEND_BISON_CHECK
@@ -62,7 +62,7 @@ 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_CHECK_FUNCS(memcpy strdup getpid kill strtod strtol finite fpclass)
AC_ZEND_BROKEN_SPRINTF
AC_CHECK_FUNCS(finite isfinite isinf isnan)
@@ -101,13 +101,6 @@ AC_ARG_ENABLE(debug,
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
@@ -130,9 +123,6 @@ AC_ARG_ENABLE(memory-limit,
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)
@@ -148,6 +138,9 @@ AC_MSG_RESULT($ZEND_DEBUG)
if test "$ZEND_DEBUG" = "yes"; then
AC_DEFINE(ZEND_DEBUG,1,[ ])
echo " $CFLAGS" | grep ' -g' >/dev/null || DEBUG_CFLAGS="-g"
if test "$CFLAGS" = "-g -O2"; then
CFLAGS=-g
fi
test -n "$GCC" && DEBUG_CFLAGS="$DEBUG_CFLAGS -Wall"
test -n "$GCC" && test "$USE_MAINTAINER_MODE" = "yes" && \
DEBUG_CFLAGS="$DEBUG_CFLAGS -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations"
@@ -166,13 +159,6 @@ 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
@@ -183,7 +169,7 @@ 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]*//`
INLINE_CFLAGS=`echo $ac_n "$CFLAGS $ac_c" | sed s/-O[0-9s]*//`
else
INLINE_CFLAGS="$CFLAGS"
fi
+6 -6
View File
@@ -30,7 +30,7 @@
".\zend_config.w32.h"\
".\zend_execute.h"\
".\zend_llist.h"\
".\modules.h"\
".\zend_modules.h"\
".\zend_operators.h"\
".\zend_ptr_stack.h"\
".\zend_stack.h"\
@@ -63,7 +63,7 @@
".\zend_constants.h"\
".\zend_execute.h"\
".\zend_llist.h"\
".\modules.h"\
".\zend_modules.h"\
".\zend_operators.h"\
".\zend_ptr_stack.h"\
".\zend_stack.h"\
@@ -86,7 +86,7 @@
".\zend_llist.h"\
".\zend_ptr_stack.h"\
".\zend_stack.h"\
".\zend-parser.tab.h"\
".\zend_language_parser.tab.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_globals.h"\
@@ -110,7 +110,7 @@
".\zend_config.w32.h"\
".\zend_execute.h"\
".\zend_llist.h"\
".\modules.h"\
".\zend_modules.h"\
".\zend_operators.h"\
".\zend_ptr_stack.h"\
".\zend_stack.h"\
@@ -168,7 +168,7 @@
".\zend_constants.h"\
".\zend_execute.h"\
".\zend_llist.h"\
".\modules.h"\
".\zend_modules.h"\
".\zend_ptr_stack.h"\
".\zend_stack.h"\
".\zend_variables.h"\
@@ -200,7 +200,7 @@
".\zend_constants.h"\
".\zend_execute.h"\
".\zend_llist.h"\
".\modules.h"\
".\zend_modules.h"\
".\zend_operators.h"\
".\zend_ptr_stack.h"\
".\zend_stack.h"\
+245 -52
View File
@@ -4,7 +4,7 @@
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=ZendTS - Win32 Release_TS_inline
CFG=ZendTS - Win32 Release_TSDbg
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
@@ -13,13 +13,14 @@ CFG=ZendTS - Win32 Release_TS_inline
!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 NMAKE /f "ZendTS.mak" CFG="ZendTS - Win32 Release_TSDbg"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "ZendTS - Win32 Release_TS" (based on "Win32 (x86) Static Library")
!MESSAGE "ZendTS - Win32 Debug_TS" (based on "Win32 (x86) Static Library")
!MESSAGE "ZendTS - Win32 Release_TS_inline" (based on "Win32 (x86) Static Library")
!MESSAGE "ZendTS - Win32 Release_TSDbg" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
@@ -40,7 +41,7 @@ RSC=rc.exe
# 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
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x40d /d "NDebug_TS"
# ADD RSC /l 0x40d /d "NDebug_TS"
@@ -62,7 +63,7 @@ LIB32=link.exe -lib
# 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 CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_Debug_TS" /D ZEND_DEBUG=1 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c
# ADD BASE RSC /l 0x40d /d "_Debug_TS"
# ADD RSC /l 0x40d /d "_Debug_TS"
BSC32=bscmake.exe
@@ -84,7 +85,30 @@ LIB32=link.exe -lib
# 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
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D "ZEND_WIN32_FORCE_INLINE" /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x40d /d "NDebug_TS"
# ADD RSC /l 0x40d /d "NDebug_TS"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
# PROP BASE Use_MFC 0
# PROP BASE Output_Dir "ZendTS___Win32_Release_TSDbg"
# PROP BASE Intermediate_Dir "ZendTS___Win32_Release_TSDbg"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Output_Dir "Release_TSDbg"
# PROP Intermediate_Dir "Release_TSDbg"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
# SUBTRACT BASE CPP /YX
# ADD CPP /nologo /MD /W3 /GX /Zi /Od /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x40d /d "NDebug_TS"
# ADD RSC /l 0x40d /d "NDebug_TS"
@@ -102,19 +126,12 @@ LIB32=link.exe -lib
# Name "ZendTS - Win32 Release_TS"
# Name "ZendTS - Win32 Debug_TS"
# Name "ZendTS - Win32 Release_TS_inline"
# Name "ZendTS - Win32 Release_TSDbg"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=".\zend-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
@@ -155,10 +172,6 @@ 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
@@ -171,6 +184,26 @@ SOURCE=.\zend_indent.c
# End Source File
# Begin Source File
SOURCE=.\zend_ini.c
# End Source File
# Begin Source File
SOURCE=.\zend_ini_parser.c
# End Source File
# Begin Source File
SOURCE=.\zend_ini_scanner.cpp
# End Source File
# Begin Source File
SOURCE=".\zend_language_parser.c"
# End Source File
# Begin Source File
SOURCE=".\zend_language_scanner.cpp"
# End Source File
# Begin Source File
SOURCE=.\zend_list.c
# End Source File
# Begin Source File
@@ -211,15 +244,7 @@ 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"
SOURCE=.\zend_modules.h
# End Source File
# Begin Source File
@@ -295,6 +320,30 @@ SOURCE=.\zend_indent.h
# End Source File
# Begin Source File
SOURCE=.\zend_ini.h
# End Source File
# Begin Source File
SOURCE=.\zend_ini_parser.h
# End Source File
# Begin Source File
SOURCE=.\zend_ini_scanner.h
# End Source File
# Begin Source File
SOURCE=.\zend_istdiostream.h
# End Source File
# Begin Source File
SOURCE=".\zend_language_parser.h"
# End Source File
# Begin Source File
SOURCE=".\zend_language_scanner.h"
# End Source File
# Begin Source File
SOURCE=.\zend_list.h
# End Source File
# Begin Source File
@@ -323,23 +372,22 @@ SOURCE=.\zend_variables.h
# PROP Default_Filter "y"
# Begin Source File
SOURCE=".\zend-parser.y"
SOURCE=.\zend_ini_parser.y
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
# Begin Custom Build
InputDir=.
InputPath=".\zend-parser.y"
InputPath=.\zend_ini_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 \
bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y \
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
"$(InputDir)\zend_ini_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
@@ -347,17 +395,16 @@ BuildCmds= \
# Begin Custom Build
InputDir=.
InputPath=".\zend-parser.y"
InputPath=.\zend_ini_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 \
bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y \
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
"$(InputDir)\zend_ini_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
@@ -365,17 +412,106 @@ BuildCmds= \
# Begin Custom Build
InputDir=.
InputPath=".\zend-parser.y"
InputPath=.\zend_ini_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 \
bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y \
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
"$(InputDir)\zend_ini_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
# Begin Custom Build
InputDir=.
InputPath=.\zend_ini_parser.y
BuildCmds= \
bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y
"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend_ini_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ENDIF
# End Source File
# Begin Source File
SOURCE=".\zend_language_parser.y"
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
# Begin Custom Build
InputDir=.
InputPath=".\zend_language_parser.y"
BuildCmds= \
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y \
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
# Begin Custom Build
InputDir=.
InputPath=".\zend_language_parser.y"
BuildCmds= \
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y \
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TS_inline"
# Begin Custom Build
InputDir=.
InputPath=".\zend_language_parser.y"
BuildCmds= \
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y \
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
# Begin Custom Build
InputDir=.
InputPath=".\zend_language_parser.y"
BuildCmds= \
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
@@ -388,35 +524,92 @@ BuildCmds= \
# PROP Default_Filter "l"
# Begin Source File
SOURCE=".\zend-scanner.l"
SOURCE=.\zend_ini_scanner.l
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
# Begin Custom Build
InputPath=".\zend-scanner.l"
InputPath=.\zend_ini_scanner.l
"zend-scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -+ -i -Sflex.skl -Pzend -ozend-scanner.cpp zend-scanner.l
"zend_ini_scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -+ -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.cpp zend_ini_scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
# Begin Custom Build
InputPath=".\zend-scanner.l"
InputPath=.\zend_ini_scanner.l
"zend-scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -+ -B -i -Sflex.skl -Pzend -ozend-scanner.cpp zend-scanner.l
"zend_ini_scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -+ -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.cpp zend_ini_scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TS_inline"
# Begin Custom Build
InputPath=".\zend-scanner.l"
InputPath=.\zend_ini_scanner.l
"zend-scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -+ -i -Sflex.skl -Pzend -ozend-scanner.cpp zend-scanner.l
"zend_ini_scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -+ -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.cpp zend_ini_scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
# Begin Custom Build
InputPath=.\zend_ini_scanner.l
"zend_ini_scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -+ -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.cpp zend_ini_scanner.l
# End Custom Build
!ENDIF
# End Source File
# Begin Source File
SOURCE=".\zend_language_scanner.l"
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
# Begin Custom Build
InputPath=".\zend_language_scanner.l"
"zend_language_scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -+ -B -i -Sflex.skl -Pzend -ozend_language_scanner.cpp zend_language_scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
# Begin Custom Build
InputPath=".\zend_language_scanner.l"
"zend_language_scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -+ -B -i -Sflex.skl -Pzend -ozend_language_scanner.cpp zend_language_scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TS_inline"
# Begin Custom Build
InputPath=".\zend_language_scanner.l"
"zend_language_scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -+ -B -i -Sflex.skl -Pzend -ozend_language_scanner.cpp zend_language_scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
# Begin Custom Build
InputPath=".\zend_language_scanner.l"
"zend_language_scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -+ -B -i -Sflex.skl -Pzend -ozend_language_scanner.cpp zend_language_scanner.l
# End Custom Build
+8 -4
View File
@@ -3,10 +3,6 @@
@TOP@
/* these are defined by automake */
#undef PACKAGE
#undef VERSION
#undef uint
#undef ulong
@@ -23,6 +19,10 @@
# include <sys/types.h>
#endif
#ifdef HAVE_IEEEFP_H
# include <ieeefp.h>
#endif
#ifdef HAVE_STRING_H
# include <string.h>
#else
@@ -41,6 +41,8 @@ int zend_sprintf(char *buffer, const char *format, ...);
#define zend_isnan(a) isnan(a)
#elif defined(NAN)
#define zend_isnan(a) (((a)==NAN)?1:0)
#elif defined(HAVE_FPCLASS)
#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
#else
#define zend_isnan(a) 0
#endif
@@ -50,6 +52,8 @@ int zend_sprintf(char *buffer, const char *format, ...);
#elif defined(INFINITY)
/* Might not work, but is required by ISO C99 */
#define zend_isinf(a) (((a)==INFINITY)?1:0)
#elif defined(HAVE_FPCLASS)
#define zend_isinf(a) ((fpclass(a) == FP_PINF) || (fpclass(a) == FP_NINF))
#else
#define zend_isinf(a) 0
#endif
+1 -1
View File
@@ -2,7 +2,7 @@ dnl $Id$
dnl Process this file with autoconf to produce a configure script.
AC_INIT(zend.c)
AM_INIT_AUTOMAKE(zend, 0.80A)
AM_INIT_AUTOMAKE(zend, 0.80A, nodefine)
AM_CONFIG_HEADER(zend_config.h)
AM_SANITY_CHECK
AM_MAINTAINER_MODE
+1 -1
View File
@@ -1,4 +1,4 @@
/* A lexical scanner generated by flex */
/* A Lexical scanner generated by flex */
/* Scanner skeleton version:
* $Header$
-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); }
;
%%
+106 -44
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -20,11 +20,12 @@
#include "zend.h"
#include "zend_extensions.h"
#include "modules.h"
#include "zend_modules.h"
#include "zend_constants.h"
#include "zend_list.h"
#include "zend_API.h"
#include "zend_builtin_functions.h"
#include "zend_ini.h"
#ifdef ZTS
# define GLOBAL_FUNCTION_TABLE global_function_table
@@ -51,7 +52,7 @@ 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);
static int (*zend_get_configuration_directive_p)(char *name, uint name_length, zval *contents);
#ifdef ZTS
@@ -70,7 +71,7 @@ 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 ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998-2001 Zend Technologies\n"
#define PRINT_ZVAL_INDENT 4
@@ -79,7 +80,8 @@ static void print_hash(HashTable *ht, int indent)
{
zval **tmp;
char *string_key;
unsigned long num_key;
HashPosition iterator;
unsigned long num_key, str_len;
int i;
for (i=0; i<indent; i++) {
@@ -87,16 +89,15 @@ static void print_hash(HashTable *ht, int indent)
}
ZEND_PUTS("(\n");
indent += PRINT_ZVAL_INDENT;
zend_hash_internal_pointer_reset(ht);
while (zend_hash_get_current_data(ht, (void **) &tmp) == SUCCESS) {
zend_hash_internal_pointer_reset_ex(ht, &iterator);
while (zend_hash_get_current_data_ex(ht, (void **) &tmp, &iterator) == SUCCESS) {
for (i=0; i<indent; i++) {
ZEND_PUTS(" ");
}
ZEND_PUTS("[");
switch (zend_hash_get_current_key(ht, &string_key, &num_key)) {
switch (zend_hash_get_current_key_ex(ht, &string_key, &str_len, &num_key, 0, &iterator)) {
case HASH_KEY_IS_STRING:
ZEND_PUTS(string_key);
efree(string_key);
break;
case HASH_KEY_IS_LONG:
zend_printf("%ld",num_key);
@@ -105,7 +106,7 @@ static void print_hash(HashTable *ht, int indent)
ZEND_PUTS("] => ");
zend_print_zval_r(*tmp, indent+PRINT_ZVAL_INDENT);
ZEND_PUTS("\n");
zend_hash_move_forward(ht);
zend_hash_move_forward_ex(ht, &iterator);
}
indent -= PRINT_ZVAL_INDENT;
for (i=0; i<indent; i++) {
@@ -143,16 +144,9 @@ ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_cop
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);
}
case IS_OBJECT:
expr_copy->value.str.len = sizeof("Object")-1;
expr_copy->value.str.val = estrndup("Object", expr_copy->value.str.len);
break;
default:
*expr_copy = *expr;
@@ -205,11 +199,23 @@ ZEND_API void zend_print_zval_r_ex(zend_write_func_t write_func, zval *expr, int
switch(expr->type) {
case IS_ARRAY:
ZEND_PUTS("Array\n");
if (++expr->value.ht->nApplyCount>1) {
ZEND_PUTS(" *RECURSION*");
expr->value.ht->nApplyCount=0;
return;
}
print_hash(expr->value.ht,indent);
expr->value.ht->nApplyCount--;
break;
case IS_OBJECT:
if (++expr->value.obj.properties->nApplyCount>1) {
ZEND_PUTS(" *RECURSION*");
expr->value.obj.properties->nApplyCount=0;
return;
}
zend_printf("%s Object\n", expr->value.obj.ce->name);
print_hash(expr->value.obj.properties, indent);
expr->value.obj.properties->nApplyCount--;
break;
default:
zend_print_variable(expr);
@@ -221,7 +227,7 @@ ZEND_API void zend_print_zval_r_ex(zend_write_func_t write_func, zval *expr, int
static FILE *zend_fopen_wrapper(const char *filename, char **opened_path)
{
if (opened_path) {
*opened_path = strdup(filename);
*opened_path = estrdup(filename);
}
return fopen(filename, "rb");
}
@@ -295,6 +301,7 @@ static void executor_globals_ctor(zend_executor_globals *executor_globals)
}
zend_init_rsrc_plist(ELS_C);
EG(lambda_count)=0;
EG(user_error_handler) = NULL;
}
@@ -302,6 +309,7 @@ static void executor_globals_dtor(zend_executor_globals *executor_globals)
{
zend_shutdown_constants(ELS_C);
zend_destroy_rsrc_plist(ELS_C);
zend_ini_shutdown(ELS_C);
}
@@ -317,6 +325,17 @@ static void alloc_globals_ctor(zend_alloc_globals *alloc_globals)
#include <floatingpoint.h>
#endif
#ifdef ZTS
static void zend_new_thread_end_handler(THREAD_T thread_id)
{
ELS_FETCH();
zend_copy_ini_directives(ELS_C);
zend_ini_refresh_caches(ZEND_INI_STAGE_STARTUP ELS_CC);
}
#endif
int zend_startup(zend_utility_functions *utility_functions, char **extensions, int start_builtin_functions)
{
#ifdef ZTS
@@ -329,20 +348,12 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions, i
#endif
#ifdef __FreeBSD__
{
/* FreeBSD floating point precision fix */
#ifdef HAVE_FP_EXCEPT
fp_except
#else
fp_except_t
/* FreeBSD floating point precision fix */
fpsetmask(0);
#endif
mask;
mask = fpgetmask();
fpsetmask(mask & ~FP_X_IMP);
}
#endif
zend_startup_extensions_mechanism();
/* Set up utility functions and values */
zend_error_cb = utility_functions->error_function;
zend_printf = utility_functions->printf_function;
@@ -354,14 +365,12 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions, i
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_get_configuration_directive_p = utility_functions->get_configuration_directive;
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;
@@ -393,6 +402,7 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions, i
#else
zend_startup_constants();
zend_set_default_compile_time_values(CLS_C);
EG(user_error_handler) = NULL;
#endif
zend_register_standard_constants(ELS_C);
@@ -404,6 +414,12 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions, i
zend_startup_builtin_functions();
}
zend_ini_startup(ELS_C);
#ifdef ZTS
tsrm_set_new_thread_end_handler(zend_new_thread_end_handler);
#endif
return SUCCESS;
}
@@ -502,7 +518,9 @@ 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);
if (setjmp(EG(bailout))==0) {
zend_hash_apply(&module_registry, (int (*)(void *)) module_registry_cleanup);
}
}
void zend_deactivate(CLS_D ELS_DC)
@@ -511,9 +529,18 @@ void zend_deactivate(CLS_D ELS_DC)
EG(opline_ptr) = NULL;
EG(active_symbol_table) = NULL;
shutdown_scanner(CLS_C);
shutdown_executor(ELS_C);
shutdown_compiler(CLS_C);
if (setjmp(EG(bailout))==0) {
shutdown_scanner(CLS_C);
}
if (setjmp(EG(bailout))==0) {
shutdown_executor(ELS_C);
}
if (setjmp(EG(bailout))==0) {
shutdown_compiler(CLS_C);
}
if (setjmp(EG(bailout))==0) {
zend_ini_deactivate(ELS_C);
}
}
@@ -527,10 +554,10 @@ 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)
ZEND_API int zend_get_configuration_directive(char *name, uint name_length, zval *contents)
{
if (zend_get_ini_entry_p) {
return zend_get_ini_entry_p(name, name_length, contents);
if (zend_get_configuration_directive_p) {
return zend_get_configuration_directive_p(name, name_length, contents);
} else {
return FAILURE;
}
@@ -614,9 +641,13 @@ ZEND_API void zend_error(int type, const char *format, ...)
#ifdef HAVE_VSNPRINTF
z_error_message->value.str.len = vsnprintf(z_error_message->value.str.val, ZEND_ERROR_BUFFER_SIZE, format, args);
if (z_error_message->value.str.len > ZEND_ERROR_BUFFER_SIZE-1) {
z_error_message->value.str.len = ZEND_ERROR_BUFFER_SIZE-1;
}
#else
strncpy(z_error_message->value.str.val, format, ZEND_ERROR_BUFFER_SIZE);
/* This is risky... */
z_error_message->value.str.len = vsprintf(z_error_message->value.str.val, format, args);
/* z_error_message->value.str.len = vsprintf(z_error_message->value.str.val, format, args); */
#endif
z_error_message->type = IS_STRING;
@@ -725,3 +756,34 @@ ZEND_API int zend_execute_scripts(int type CLS_DC ELS_DC, int file_count, ...)
return SUCCESS;
}
#define COMPILED_STRING_DESCRIPTION_FORMAT "%s(%d) : %s"
ZEND_API char *zend_make_compiled_string_description(char *name)
{
char *cur_filename;
int cur_lineno;
char *compiled_string_description;
CLS_FETCH();
ELS_FETCH();
if (zend_is_compiling()) {
cur_filename = zend_get_compiled_filename(CLS_C);
cur_lineno = zend_get_compiled_lineno(CLS_C);
} else if (zend_is_executing()) {
cur_filename = zend_get_executed_filename(ELS_C);
cur_lineno = zend_get_executed_lineno(ELS_C);
} else {
cur_filename = "Unknown";
cur_lineno = 0;
}
compiled_string_description = emalloc(sizeof(COMPILED_STRING_DESCRIPTION_FORMAT)+strlen(name)+strlen(cur_filename)+MAX_LENGTH_OF_LONG);
sprintf(compiled_string_description, COMPILED_STRING_DESCRIPTION_FORMAT, cur_filename, cur_lineno, name);
return compiled_string_description;
}
void free_estring(char **str_p)
{
efree(*str_p);
}
+24 -5
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -21,7 +21,7 @@
#ifndef ZEND_H
#define ZEND_H
#define ZEND_VERSION "1.0.1"
#define ZEND_VERSION "1.0.5"
#ifdef __cplusplus
#define BEGIN_EXTERN_C() extern "C" {
@@ -39,8 +39,10 @@
#ifdef ZEND_WIN32
# include "zend_config.w32.h"
# define ZEND_PATHS_SEPARATOR ';'
#else
# include "zend_config.h"
# define ZEND_PATHS_SEPARATOR ':'
#endif
/* all HAVE_XXX test have to be after the include of zend_config above */
@@ -232,7 +234,7 @@ typedef struct _zend_utility_functions {
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);
int (*get_configuration_directive)(char *name, uint name_length, zval *contents);
void (*ticks_function)(int ticks);
} zend_utility_functions;
@@ -307,6 +309,8 @@ ZEND_API void zend_output_debug_string(zend_bool trigger_break, char *format, ..
ZEND_API extern char *empty_string;
ZEND_API void free_estring(char **str_p);
#define STR_FREE(ptr) if (ptr && ptr!=empty_string) { efree(ptr); }
#define STR_FREE_REL(ptr) if (ptr && ptr!=empty_string) { efree_rel(ptr); }
@@ -354,7 +358,7 @@ 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);
ZEND_API int zend_get_configuration_directive(char *name, uint name_length, zval *contents);
/* Messages for applications of Zend */
@@ -421,7 +425,22 @@ ZEND_API int zend_get_ini_entry(char *name, uint name_length, zval *contents);
} \
INIT_PZVAL(&(zv));
#define ZEND_MAX_RESERVED_RESOURCES 2
#define REPLACE_ZVAL_VALUE(ppzv_dest,pzv_src,copy) { \
int is_ref,refcount; \
\
SEPARATE_ZVAL_IF_NOT_REF(ppzv_dest); \
is_ref = (*ppzv_dest)->is_ref; \
refcount = (*ppzv_dest)->refcount; \
zval_dtor(*ppzv_dest); \
**ppzv_dest = *pzv_src; \
if(copy) { \
zval_copy_ctor(*ppzv_dest); \
} \
(*ppzv_dest)->is_ref = is_ref; \
(*ppzv_dest)->refcount = refcount; \
}
#define ZEND_MAX_RESERVED_RESOURCES 4
#ifdef ZEND_WIN32
/* Only use this macro if you know for sure that all of the switches values
+315 -293
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -21,7 +21,7 @@
#include "zend.h"
#include "zend_execute.h"
#include "zend_API.h"
#include "modules.h"
#include "zend_modules.h"
#include "zend_constants.h"
#ifdef HAVE_STDARG_H
@@ -30,7 +30,7 @@
/* these variables are true statics/globals, and have to be mutex'ed on every access */
static int module_count=0;
HashTable module_registry;
ZEND_API HashTable module_registry;
/* this function doesn't check for too many parameters */
ZEND_API int zend_get_parameters(int ht, int param_count, ...)
@@ -227,95 +227,82 @@ ZEND_API inline int add_assoc_function(zval *arg, char *key,void (*function_ptr)
}
ZEND_API inline int add_assoc_long(zval *arg, char *key, long n)
ZEND_API inline int add_assoc_long_ex(zval *arg, char *key, uint key_len, 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);
MAKE_STD_ZVAL(tmp);
ZVAL_LONG(tmp, n);
return zend_hash_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_assoc_null_ex(zval *arg, char *key, uint key_len)
{
zval *tmp;
MAKE_STD_ZVAL(tmp);
ZVAL_NULL(tmp);
return zend_hash_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_assoc_bool_ex(zval *arg, char *key, uint key_len, int b)
{
zval *tmp;
MAKE_STD_ZVAL(tmp);
ZVAL_BOOL(tmp, b);
return zend_hash_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_assoc_resource_ex(zval *arg, char *key, uint key_len, int r)
{
zval *tmp;
MAKE_STD_ZVAL(tmp);
ZVAL_RESOURCE(tmp, r);
return zend_hash_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_assoc_unset(zval *arg, char *key)
ZEND_API inline int add_assoc_double_ex(zval *arg, char *key, uint key_len, double d)
{
zval *tmp;
MAKE_STD_ZVAL(tmp);
ZVAL_DOUBLE(tmp, d);
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);
return zend_hash_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_assoc_resource(zval *arg, char *key, int r)
ZEND_API inline int add_assoc_string_ex(zval *arg, char *key, uint key_len, char *str, int duplicate)
{
zval *tmp;
MAKE_STD_ZVAL(tmp);
ZVAL_STRING(tmp, str, duplicate);
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);
return zend_hash_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_assoc_double(zval *arg, char *key, double d)
ZEND_API inline int add_assoc_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, int duplicate)
{
zval *tmp;
MAKE_STD_ZVAL(tmp);
ZVAL_STRINGL(tmp, str, length, duplicate);
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);
return zend_hash_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_assoc_string(zval *arg, char *key, char *str, int duplicate)
ZEND_API inline int add_assoc_zval_ex(zval *arg, char *key, uint key_len, zval *value)
{
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);
return zend_hash_update(Z_ARRVAL_P(arg), key, key_len, (void *) &value, sizeof(zval *), NULL);
}
@@ -323,151 +310,136 @@ 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);
MAKE_STD_ZVAL(tmp);
ZVAL_LONG(tmp, n);
return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *),NULL);
}
ZEND_API inline int add_index_unset(zval *arg, uint index)
ZEND_API inline int add_index_null(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);
}
MAKE_STD_ZVAL(tmp);
ZVAL_NULL(tmp);
return zend_hash_index_update(Z_ARRVAL_P(arg), 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);
MAKE_STD_ZVAL(tmp);
ZVAL_BOOL(tmp, b);
return zend_hash_index_update(Z_ARRVAL_P(arg), 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);
MAKE_STD_ZVAL(tmp);
ZVAL_RESOURCE(tmp, r);
return zend_hash_index_update(Z_ARRVAL_P(arg), 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);
MAKE_STD_ZVAL(tmp);
ZVAL_DOUBLE(tmp, d);
return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *),NULL);
}
ZEND_API inline int add_index_string(zval *arg, uint index, char *str, int duplicate)
{
zval *tmp;
MAKE_STD_ZVAL(tmp);
ZVAL_STRING(tmp, str, duplicate);
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);
return zend_hash_index_update(Z_ARRVAL_P(arg), 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;
MAKE_STD_ZVAL(tmp);
ZVAL_STRINGL(tmp, str, length, duplicate);
return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL);
}
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_index_zval(zval *arg, uint index, zval *value)
{
return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &value, 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);
MAKE_STD_ZVAL(tmp);
ZVAL_LONG(tmp, n);
return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_next_index_unset(zval *arg)
ZEND_API inline int add_next_index_null(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);
MAKE_STD_ZVAL(tmp);
ZVAL_NULL(tmp);
return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &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);
MAKE_STD_ZVAL(tmp);
ZVAL_BOOL(tmp, b);
return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &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);
MAKE_STD_ZVAL(tmp);
ZVAL_RESOURCE(tmp, r);
return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &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);
MAKE_STD_ZVAL(tmp);
ZVAL_DOUBLE(tmp, d);
return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL);
}
@@ -475,16 +447,10 @@ 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);
MAKE_STD_ZVAL(tmp);
ZVAL_STRING(tmp, str, duplicate);
return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *),NULL);
}
@@ -492,201 +458,162 @@ ZEND_API inline int add_next_index_stringl(zval *arg, char *str, uint length, in
{
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);
MAKE_STD_ZVAL(tmp);
ZVAL_STRINGL(tmp, str, length, duplicate);
return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *),NULL);
}
ZEND_API inline int add_get_assoc_string(zval *arg, char *key, char *str, void **dest, int duplicate)
ZEND_API inline int add_next_index_zval(zval *arg, zval *value)
{
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);
return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &value, sizeof(zval *), NULL);
}
ZEND_API inline int add_get_assoc_stringl(zval *arg, char *key, char *str, uint length, void **dest, int duplicate)
ZEND_API inline int add_get_assoc_string_ex(zval *arg, char *key, uint key_len, char *str, void **dest, int duplicate)
{
zval *tmp;
MAKE_STD_ZVAL(tmp);
ZVAL_STRING(tmp, str, duplicate);
return zend_hash_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), dest);
}
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_assoc_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, void **dest, int duplicate)
{
zval *tmp;
MAKE_STD_ZVAL(tmp);
ZVAL_STRINGL(tmp, str, length, duplicate);
return zend_hash_update(Z_ARRVAL_P(arg), key, key_len, (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);
MAKE_STD_ZVAL(tmp);
ZVAL_LONG(tmp, l);
return zend_hash_index_update(Z_ARRVAL_P(arg), 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);
MAKE_STD_ZVAL(tmp);
ZVAL_DOUBLE(tmp, d);
return zend_hash_index_update(Z_ARRVAL_P(arg), 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);
MAKE_STD_ZVAL(tmp);
ZVAL_STRING(tmp, str, duplicate);
return zend_hash_index_update(Z_ARRVAL_P(arg), 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);
MAKE_STD_ZVAL(tmp);
ZVAL_STRINGL(tmp, str, length, duplicate);
return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), dest);
}
ZEND_API inline int add_property_long(zval *arg, char *key, long n)
ZEND_API inline int add_property_long_ex(zval *arg, char *key, uint key_len, 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);
MAKE_STD_ZVAL(tmp);
ZVAL_LONG(tmp, n);
return zend_hash_update(Z_OBJPROP_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_property_bool(zval *arg, char *key, int b)
ZEND_API inline int add_property_bool_ex(zval *arg, char *key, uint key_len, 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);
MAKE_STD_ZVAL(tmp);
ZVAL_BOOL(tmp, b);
return zend_hash_update(Z_OBJPROP_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_property_unset(zval *arg, char *key)
ZEND_API inline int add_property_null_ex(zval *arg, char *key, uint key_len)
{
zval *tmp;
MAKE_STD_ZVAL(tmp);
ZVAL_NULL(tmp);
return zend_hash_update(Z_OBJPROP_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_property_resource_ex(zval *arg, char *key, uint key_len, long n)
{
zval *tmp;
MAKE_STD_ZVAL(tmp);
ZVAL_RESOURCE(tmp, n);
return zend_hash_update(Z_OBJPROP_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_property_double_ex(zval *arg, char *key, uint key_len, double d)
{
zval *tmp;
MAKE_STD_ZVAL(tmp);
ZVAL_DOUBLE(tmp, d);
return zend_hash_update(Z_OBJPROP_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_property_string_ex(zval *arg, char *key, uint key_len, char *str, int duplicate)
{
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);
MAKE_STD_ZVAL(tmp);
ZVAL_STRING(tmp, str, duplicate);
return zend_hash_update(Z_OBJPROP_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_property_resource(zval *arg, char *key, long n)
ZEND_API inline int add_property_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, int duplicate)
{
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);
MAKE_STD_ZVAL(tmp);
ZVAL_STRINGL(tmp, str, length, duplicate);
return zend_hash_update(Z_OBJPROP_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_property_double(zval *arg, char *key, double d)
ZEND_API inline int add_property_zval_ex(zval *arg, char *key, uint key_len, zval *value)
{
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);
return zend_hash_update(Z_OBJPROP_P(arg), key, key_len, (void *) &value, 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) {
@@ -892,7 +819,7 @@ ZEND_API zend_class_entry *zend_register_internal_class_ex(zend_class_entry *cla
register_class = zend_register_internal_class(class_entry);
if (parent_ce) {
do_inheritance(register_class, parent_ce);
zend_do_inheritance(register_class, parent_ce);
}
return register_class;
}
@@ -982,3 +909,98 @@ ZEND_API int zend_disable_function(char *function_name, uint function_name_lengt
disabled_function[0].fname = function_name;
return zend_register_functions(disabled_function, CG(function_table), MODULE_PERSISTENT);
}
zend_bool zend_is_callable(zval *callable, zend_bool syntax_only, char **callable_name)
{
char *lcname;
int retval = 0;
ELS_FETCH();
switch (Z_TYPE_P(callable)) {
case IS_STRING:
if (syntax_only)
return 1;
lcname = estrndup(Z_STRVAL_P(callable), Z_STRLEN_P(callable));
zend_str_tolower(lcname, Z_STRLEN_P(callable));
if (zend_hash_exists(EG(function_table), lcname, Z_STRLEN_P(callable)+1))
retval = 1;
efree(lcname);
if (!retval && callable_name)
*callable_name = estrndup(Z_STRVAL_P(callable), Z_STRLEN_P(callable));
break;
case IS_ARRAY:
{
zval **method;
zval **obj;
zend_class_entry *ce;
char callable_name_len;
if (zend_hash_index_find(Z_ARRVAL_P(callable), 0, (void **) &obj) == SUCCESS &&
zend_hash_index_find(Z_ARRVAL_P(callable), 1, (void **) &method) == SUCCESS &&
(Z_TYPE_PP(obj) == IS_OBJECT || Z_TYPE_PP(obj) == IS_STRING) &&
Z_TYPE_PP(method) == IS_STRING) {
if (syntax_only)
return 1;
if (Z_TYPE_PP(obj) == IS_STRING) {
int found;
lcname = estrndup(Z_STRVAL_PP(obj), Z_STRLEN_PP(obj));
zend_str_tolower(lcname, Z_STRLEN_PP(obj));
found = zend_hash_find(EG(class_table), lcname, Z_STRLEN_PP(obj) + 1, (void**)&ce);
efree(lcname);
if (found == FAILURE) {
if (callable_name) {
char *ptr;
callable_name_len = Z_STRLEN_PP(obj) + Z_STRLEN_PP(method) + sizeof("::");
ptr = *callable_name = emalloc(callable_name_len);
memcpy(ptr, Z_STRVAL_PP(obj), Z_STRLEN_PP(obj));
ptr += Z_STRLEN_PP(obj);
memcpy(ptr, "::", sizeof("::") - 1);
ptr += sizeof("::") - 1;
memcpy(ptr, Z_STRVAL_PP(method), Z_STRLEN_PP(method) + 1);
}
break;
}
} else {
ce = Z_OBJCE_PP(obj);
}
lcname = estrndup(Z_STRVAL_PP(method), Z_STRLEN_PP(method));
zend_str_tolower(lcname, Z_STRLEN_PP(method));
if (zend_hash_exists(&ce->function_table, lcname, Z_STRLEN_PP(method)+1))
retval = 1;
if (!retval && callable_name) {
char *ptr;
callable_name_len = ce->name_length + Z_STRLEN_PP(method) + sizeof("::");
ptr = *callable_name = emalloc(callable_name_len);
memcpy(ptr, ce->name, ce->name_length);
ptr += ce->name_length;
memcpy(ptr, "::", sizeof("::") - 1);
ptr += sizeof("::") - 1;
memcpy(ptr, Z_STRVAL_PP(method), Z_STRLEN_PP(method) + 1);
}
efree(lcname);
} else if (callable_name)
*callable_name = estrndup("Array", sizeof("Array")-1);
}
break;
default:
if (callable_name) {
zval expr_copy;
int use_copy;
zend_make_printable_zval(callable, &expr_copy, &use_copy);
*callable_name = estrndup(Z_STRVAL(expr_copy), Z_STRLEN(expr_copy));
zval_dtor(&expr_copy);
}
break;
}
return retval;
}
+55 -22
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -21,7 +21,7 @@
#ifndef ZEND_API_H
#define ZEND_API_H
#include "modules.h"
#include "zend_modules.h"
#include "zend_list.h"
#include "zend_fast_cache.h"
#include "zend_operators.h"
@@ -120,6 +120,7 @@ ZEND_API zend_module_entry *zend_get_module(int module_number);
ZEND_API int zend_disable_function(char *function_name, uint function_name_length);
ZEND_API void wrong_param_count(void);
ZEND_API zend_bool zend_is_callable(zval *callable, zend_bool syntax_only, char **callable_name);
#define getThis() (this_ptr)
@@ -146,47 +147,79 @@ 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_assoc_long_ex(zval *arg, char *key, uint key_len, long n);
ZEND_API int add_assoc_null_ex(zval *arg, char *key, uint key_len);
ZEND_API int add_assoc_bool_ex(zval *arg, char *key, uint key_len, int b);
ZEND_API int add_assoc_resource_ex(zval *arg, char *key, uint key_len, int r);
ZEND_API int add_assoc_double_ex(zval *arg, char *key, uint key_len, double d);
ZEND_API int add_assoc_string_ex(zval *arg, char *key, uint key_len, char *str, int duplicate);
ZEND_API int add_assoc_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, int duplicate);
ZEND_API int add_assoc_zval_ex(zval *arg, char *key, uint key_len, zval *value);
#define add_assoc_long(__arg, __key, __n) add_assoc_long_ex(__arg, __key, strlen(__key)+1, __n)
#define add_assoc_null(__arg, __key) add_assoc_null_ex(__arg, __key, strlen(__key) + 1)
#define add_assoc_bool(__arg, __key, __b) add_assoc_bool_ex(__arg, __key, strlen(__key)+1, __b)
#define add_assoc_resource(__arg, __key, __r) add_assoc_resource_ex(__arg, __key, strlen(__key)+1, __r)
#define add_assoc_double(__arg, __key, __d) add_assoc_double_ex(__arg, __key, strlen(__key)+1, __d)
#define add_assoc_string(__arg, __key, __str, __duplicate) add_assoc_string_ex(__arg, __key, strlen(__key)+1, __str, __duplicate)
#define add_assoc_stringl(__arg, __key, __str, __length, __duplicate) add_assoc_stringl_ex(__arg, __key, strlen(__key)+1, __str, __length, __duplicate)
#define add_assoc_zval(__arg, __key, __value) add_assoc_zval_ex(__arg, __key, strlen(__key)+1, __value)
/* unset() functions are only suported for legacy modules and null() functions should be used */
#define add_assoc_unset(__arg, __key) add_assoc_null_ex(__arg, __key, strlen(__key) + 1)
#define add_index_unset(__arg, __key) add_index_null(__arg, __key)
#define add_next_index_unset(__arg) add_next_index_null(__arg)
#define add_property_unset(__arg, __key) add_property_null(__arg, __key)
ZEND_API int add_index_long(zval *arg, uint idx, long n);
ZEND_API int add_index_unset(zval *arg, uint idx);
ZEND_API int add_index_null(zval *arg, uint idx);
ZEND_API int add_index_bool(zval *arg, uint idx, int b);
ZEND_API int add_index_resource(zval *arg, uint idx, int r);
ZEND_API int add_index_double(zval *arg, uint idx, double d);
ZEND_API int add_index_string(zval *arg, uint idx, char *str, int duplicate);
ZEND_API int add_index_stringl(zval *arg, uint idx, char *str, uint length, int duplicate);
ZEND_API int add_index_zval(zval *arg, uint index, zval *value);
ZEND_API int add_next_index_long(zval *arg, long n);
ZEND_API int add_next_index_unset(zval *arg);
ZEND_API int add_next_index_null(zval *arg);
ZEND_API int add_next_index_bool(zval *arg, int b);
ZEND_API int add_next_index_resource(zval *arg, int r);
ZEND_API int add_next_index_double(zval *arg, double d);
ZEND_API int add_next_index_string(zval *arg, char *str, int duplicate);
ZEND_API int add_next_index_stringl(zval *arg, char *str, uint length, int duplicate);
ZEND_API int add_next_index_zval(zval *arg, zval *value);
ZEND_API int add_get_assoc_string_ex(zval *arg, char *key, uint key_len, char *str, void **dest, int duplicate);
ZEND_API int add_get_assoc_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, void **dest, int duplicate);
#define add_get_assoc_string(__arg, __key, __str, __dest, __duplicate) add_get_assoc_string_ex(__arg, __key, strlen(__key)+1, __str, __dest, __duplicate)
#define add_get_assoc_stringl(__arg, __key, __str, __length, __dest, __duplicate) add_get_assoc_stringl_ex(__arg, __key, strlen(__key)+1, __str, __length, __dest, __duplicate)
ZEND_API int add_get_index_long(zval *arg, uint idx, long l, void **dest);
ZEND_API int add_get_index_double(zval *arg, uint idx, double d, void **dest);
ZEND_API int add_get_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_ex(zval *arg, char *key, uint key_len, long l);
ZEND_API int add_property_null_ex(zval *arg, char *key, uint key_len);
ZEND_API int add_property_bool_ex(zval *arg, char *key, uint key_len, int b);
ZEND_API int add_property_resource_ex(zval *arg, char *key, uint key_len, long r);
ZEND_API int add_property_double_ex(zval *arg, char *key, uint key_len, double d);
ZEND_API int add_property_string_ex(zval *arg, char *key, uint key_len, char *str, int duplicate);
ZEND_API int add_property_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, int duplicate);
ZEND_API int add_property_zval_ex(zval *arg, char *key, uint key_len, zval *value);
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);
#define add_property_long(__arg, __key, __n) add_property_long_ex(__arg, __key, strlen(__key)+1, __n)
#define add_property_null(__arg, __key) add_property_null_ex(__arg, __key, strlen(__key) + 1)
#define add_property_bool(__arg, __key, __b) add_property_bool_ex(__arg, __key, strlen(__key)+1, __b)
#define add_property_resource(__arg, __key, __r) add_property_resource_ex(__arg, __key, strlen(__key)+1, __r)
#define add_property_double(__arg, __key, __d) add_property_double_ex(__arg, __key, strlen(__key)+1, __d)
#define add_property_string(__arg, __key, __str, __duplicate) add_property_string_ex(__arg, __key, strlen(__key)+1, __str, __duplicate)
#define add_property_stringl(__arg, __key, __str, __length, __duplicate) add_property_stringl_ex(__arg, __key, strlen(__key)+1, __str, __length, __duplicate)
#define add_property_zval(__arg, __key, __value) add_property_zval_ex(__arg, __key, strlen(__key)+1, __value)
ZEND_API int call_user_function(HashTable *function_table, zval **object_pp, zval *function_name, zval *retval_ptr, int param_count, zval *params[]);
ZEND_API int call_user_function_ex(HashTable *function_table, zval **object_pp, zval *function_name, zval **retval_ptr_ptr, int param_count, zval **params[], int no_separation, HashTable *symbol_table);
ZEND_API int zend_set_hash_symbol(zval *symbol, char *name, int name_length,
int is_ref, int num_symbol_tables, ...);
+31 -3
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -137,6 +137,9 @@ ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
p->orig_lineno = __zend_orig_lineno;
p->magic = MEM_BLOCK_START_MAGIC;
p->reported = 0;
/* Setting the thread id should not be necessary, because we fetched this block
* from this thread's cache
*/
AG(cache_stats)[CACHE_INDEX][1]++;
#endif
p->persistent = 0;
@@ -177,6 +180,9 @@ ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
p->orig_lineno = __zend_orig_lineno;
p->magic = MEM_BLOCK_START_MAGIC;
p->reported = 0;
# ifdef ZTS
p->thread_id = tsrm_thread_id();
# endif
*((long *)(((char *) p) + sizeof(zend_mem_header)+SIZE+PLATFORM_PADDING+END_ALIGNMENT(SIZE))) = MEM_BLOCK_END_MAGIC;
#endif
#if MEMORY_LIMIT
@@ -193,6 +199,15 @@ ZEND_API void _efree(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
DECLARE_CACHE_VARS
ALS_FETCH();
#if defined(ZTS) && ZEND_DEBUG
if (p->thread_id != tsrm_thread_id()) {
tsrm_error(TSRM_ERROR_LEVEL_ERROR, "Memory block allocated at %s:(%d) on thread %x freed at %s:(%d) on thread %x, ignoring",
p->filename, p->lineno, p->thread_id,
__zend_filename, __zend_lineno, tsrm_thread_id());
return;
}
#endif
CALCULATE_REAL_SIZE_AND_CACHE_INDEX(p->size);
#if ZEND_DEBUG
if (!_mem_block_check(ptr, 1 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC)) {
@@ -253,6 +268,19 @@ ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure ZEND_FILE_LIN
return _emalloc(size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
}
#if defined(ZTS) && ZEND_DEBUG
if (p->thread_id != tsrm_thread_id()) {
void *new_p;
tsrm_error(TSRM_ERROR_LEVEL_ERROR, "Memory block allocated at %s:(%d) on thread %x reallocated at %s:(%d) on thread %x, duplicating",
p->filename, p->lineno, p->thread_id,
__zend_filename, __zend_lineno, tsrm_thread_id());
new_p = _emalloc(size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
memcpy(new_p, ptr, p->size);
return new_p;
}
#endif
CALCULATE_REAL_SIZE_AND_CACHE_INDEX(size);
HANDLE_BLOCK_INTERRUPTIONS();
@@ -474,7 +502,7 @@ ZEND_API void shutdown_memory_manager(int silent, int 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) {
if (zend_get_configuration_directive("display_memory_cache_stats", sizeof("display_memory_cache_stats"), &display_memory_cache_stats)==FAILURE) {
break;
}
if (!atoi(display_memory_cache_stats.value.str.val)) {
@@ -520,7 +548,7 @@ void zend_debug_alloc_output(char *format, ...)
#ifdef ZEND_WIN32
OutputDebugString(output_buf);
#else
fprintf(stderr, output_buf);
fprintf(stderr, "%s", output_buf);
#endif
}
+10 -2
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -23,6 +23,10 @@
#include <stdio.h>
#ifdef ZTS
#include "../TSRM/TSRM.h"
#endif
#include "zend_globals_macros.h"
#define MEM_BLOCK_START_MAGIC 0x7312F8DCL
@@ -38,6 +42,9 @@ typedef struct _zend_mem_header {
int reported;
char *orig_filename;
uint orig_lineno;
# ifdef ZTS
THREAD_T thread_id;
# endif
#endif
struct _zend_mem_header *pNext;
struct _zend_mem_header *pLast;
@@ -64,10 +71,11 @@ typedef union _align_test {
#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 char *zend_strndup(const char *s, unsigned int length);
ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
ZEND_API void _efree(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
ZEND_API void *_ecalloc(size_t nmemb, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
+98 -14
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -29,7 +29,7 @@ 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_NAMED_FUNCTION(zend_if_strlen);
static ZEND_FUNCTION(strcmp);
static ZEND_FUNCTION(strncmp);
static ZEND_FUNCTION(strcasecmp);
@@ -56,23 +56,25 @@ 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(get_defined_functions);
static ZEND_FUNCTION(get_defined_vars);
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 };
ZEND_API unsigned char first_arg_force_ref[] = { 1, BYREF_FORCE };
ZEND_API unsigned char first_arg_allow_ref[] = { 1, BYREF_ALLOW };
ZEND_API unsigned char second_arg_force_ref[] = { 2, BYREF_NONE, BYREF_FORCE };
ZEND_API 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)
{ "strlen", zend_if_strlen, NULL },
ZEND_FE(strcmp, NULL)
ZEND_FE(strncmp, NULL)
ZEND_FE(strcasecmp, NULL)
@@ -101,6 +103,8 @@ static zend_function_entry builtin_functions[] = {
ZEND_FE(set_error_handler, NULL)
ZEND_FE(restore_error_handler, NULL)
ZEND_FE(get_declared_classes, NULL)
ZEND_FE(get_defined_functions, NULL)
ZEND_FE(get_defined_vars, NULL)
ZEND_FE(create_function, NULL)
ZEND_FE(get_resource_type, NULL)
#if ZEND_DEBUG
@@ -217,7 +221,7 @@ ZEND_FUNCTION(func_get_args)
/* {{{ proto int strlen(string str)
Get string length */
ZEND_FUNCTION(strlen)
ZEND_NAMED_FUNCTION(zend_if_strlen)
{
zval **str;
@@ -328,7 +332,7 @@ ZEND_FUNCTION(each)
entry->refcount++;
/* add the key elements */
switch (zend_hash_get_current_key(target_hash, &string_key, &num_key)) {
switch (zend_hash_get_current_key(target_hash, &string_key, &num_key, 1)) {
case HASH_KEY_IS_STRING:
add_get_index_string(return_value,0,string_key,(void **) &inserted_pointer,0);
break;
@@ -527,6 +531,10 @@ ZEND_FUNCTION(get_class_vars)
} else {
efree(lcname);
array_init(return_value);
if (!ce->constants_updated) {
zend_hash_apply_with_argument(&ce->default_properties, (int (*)(void *,void *)) zval_update_constant, (void *) 1);
ce->constants_updated = 1;
}
zend_hash_copy(return_value->value.ht, &ce->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
}
}
@@ -581,7 +589,7 @@ ZEND_FUNCTION(get_class_methods)
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) {
while ((key_type = zend_hash_get_current_key(&ce->function_table, &string_key, &num_key, 1)) != HASH_KEY_NON_EXISTANT) {
if (key_type == HASH_KEY_IS_STRING) {
MAKE_STD_ZVAL(method_name);
ZVAL_STRING(method_name, string_key, 0);
@@ -716,12 +724,19 @@ static int copy_import_use_file(zend_file_handle *fh, zval *array)
Returns an array with the file names that were include_once()'d */
ZEND_FUNCTION(get_included_files)
{
char *entry;
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);
zend_hash_internal_pointer_reset(&EG(included_files));
while(zend_hash_get_current_key(&EG(included_files), &entry, NULL, 1) == HASH_KEY_IS_STRING) {
add_next_index_string(return_value,entry,0);
zend_hash_move_forward(&EG(included_files));
}
/* zend_hash_apply_with_argument(&EG(included_files), (apply_func_arg_t) copy_import_use_file, return_value); */
}
/* }}} */
@@ -756,9 +771,11 @@ ZEND_FUNCTION(trigger_error)
break;
}
break;
default:
ZEND_WRONG_PARAM_COUNT();
}
convert_to_string_ex(z_error_message);
zend_error(error_type, (*z_error_message)->value.str.val);
zend_error(error_type, "%s", (*z_error_message)->value.str.val);
RETURN_TRUE;
}
/* }}} */
@@ -842,6 +859,68 @@ ZEND_FUNCTION(get_declared_classes)
}
/* }}} */
static int copy_function_name(zend_function *func, int num_args, va_list args, zend_hash_key *hash_key)
{
zval *internal_ar = va_arg(args, zval *),
*user_ar = va_arg(args, zval *);
if (hash_key->nKeyLength == 0 || hash_key->arKey[0] == 0) {
return 0;
}
if (func->type == ZEND_INTERNAL_FUNCTION) {
add_next_index_stringl(internal_ar, hash_key->arKey, hash_key->nKeyLength, 1);
} else if (func->type == ZEND_USER_FUNCTION) {
add_next_index_stringl(user_ar, hash_key->arKey, hash_key->nKeyLength, 1);
}
return 0;
}
/* {{{ proto array get_defined_functions(void)
Returns an array of all defined functions */
ZEND_FUNCTION(get_defined_functions)
{
zval *internal;
zval *user;
if (ZEND_NUM_ARGS() != 0) {
ZEND_WRONG_PARAM_COUNT();
}
MAKE_STD_ZVAL(internal);
MAKE_STD_ZVAL(user);
array_init(internal);
array_init(user);
array_init(return_value);
zend_hash_apply_with_arguments(EG(function_table), (apply_func_args_t)copy_function_name, 2, internal, user);
if (zend_hash_add(return_value->value.ht, "internal", sizeof("internal"), (void **)&internal, sizeof(zval *), NULL) == FAILURE) {
zend_error(E_WARNING, "Cannot add internal functions to return value from get_defined_functions()");
RETURN_FALSE;
}
if (zend_hash_add(return_value->value.ht, "user", sizeof("user"), (void **)&user, sizeof(zval *), NULL) == FAILURE) {
zend_error(E_WARNING, "Cannot add user functions to return value from get_defined_functions()");
RETURN_FALSE;
}
}
/* }}} */
/* {{{ proto array get_defined_vars(void)
Returns an associative array of names and values of all currently defined variable names (variables in the current scope) */
ZEND_FUNCTION(get_defined_vars)
{
zval *tmp;
array_init(return_value);
zend_hash_copy(return_value->value.ht, EG(active_symbol_table),
(copy_ctor_func_t)zval_add_ref, &tmp, sizeof(zval *));
}
/* }}} */
#define LAMBDA_TEMP_FUNCNAME "__lambda_func"
@@ -853,6 +932,7 @@ ZEND_FUNCTION(create_function)
int eval_code_length, function_name_length;
zval **z_function_args, **z_function_code;
int retval;
char *eval_name;
CLS_FETCH();
if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2, &z_function_args, &z_function_code)==FAILURE) {
@@ -871,8 +951,11 @@ ZEND_FUNCTION(create_function)
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);
eval_name = zend_make_compiled_string_description("runtime-created function");
retval = zend_eval_string(eval_code, NULL, eval_name CLS_CC ELS_CC);
efree(eval_code);
efree(eval_name);
if (retval==SUCCESS) {
zend_function *func;
@@ -897,13 +980,14 @@ ZEND_FUNCTION(create_function)
/* }}} */
#if ZEND_DEBUG
ZEND_FUNCTION(zend_test_func)
{
zval *arg1, *arg2;
zend_get_parameters(ht, 2, &arg1, &arg2);
}
#endif
ZEND_FUNCTION(get_resource_type)
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
+171 -161
View File
File diff suppressed because it is too large. Load diff
+99 -93
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -28,7 +28,7 @@
#endif
#ifdef __cplusplus
#include <istream.h>
#include <iostream.h>
#endif
#include "zend_llist.h"
@@ -44,6 +44,7 @@
#define FREE_PNODE(znode) zval_dtor(&znode->u.constant);
#define FREE_OP(op, should_free) if (should_free) zval_dtor(&Ts[(op)->u.var].tmp_var);
#define SET_UNUSED(op) (op).op_type = IS_UNUSED
#if SUPPORT_INTERACTIVE
#define INC_BPC(op_array) ((op_array)->backpatch_count++)
@@ -236,147 +237,147 @@ int zend_get_zendleng(CLS_D);
/* 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 zend_do_binary_op(int op, znode *result, znode *op1, znode *op2 CLS_DC);
void zend_do_unary_op(int op, znode *result, znode *op1 CLS_DC);
void zend_do_binary_assign_op(int op, znode *result, znode *op1, znode *op2 CLS_DC);
void zend_do_assign(znode *result, znode *variable, znode *value CLS_DC);
void zend_do_assign_ref(znode *result, znode *lvar, znode *rvar CLS_DC);
void fetch_simple_variable(znode *result, znode *varname, int bp CLS_DC);
void fetch_simple_variable_ex(znode *result, znode *varname, int bp, int op CLS_DC);
void 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 zend_do_indirect_references(znode *result, znode *num_references, znode *variable CLS_DC);
void zend_do_fetch_global_or_static_variable(znode *varname, znode *static_assignment, int fetch_type CLS_DC);
void zend_do_fetch_globals(znode *varname CLS_DC);
void fetch_array_begin(znode *result, znode *varname, znode *first_dim CLS_DC);
void fetch_array_dim(znode *result, znode *parent, znode *dim CLS_DC);
void fetch_string_offset(znode *result, znode *parent, znode *offset CLS_DC);
void do_print(znode *result, znode *arg CLS_DC);
void do_echo(znode *arg CLS_DC);
void zend_do_print(znode *result, znode *arg CLS_DC);
void zend_do_echo(znode *arg CLS_DC);
typedef int (*unary_op_type)(zval *, zval *);
ZEND_API unary_op_type get_unary_op(int opcode);
ZEND_API void *get_binary_op(int opcode);
void 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 zend_do_while_cond(znode *expr, znode *close_bracket_token CLS_DC);
void zend_do_while_end(znode *while_token, znode *close_bracket_token CLS_DC);
void zend_do_do_while_begin(CLS_D);
void zend_do_do_while_end(znode *do_token, znode *expr_open_bracket, znode *expr CLS_DC);
void 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 zend_do_if_cond(znode *cond, znode *closing_bracket_token CLS_DC);
void zend_do_if_after_statement(znode *closing_bracket_token, unsigned char initialize CLS_DC);
void zend_do_if_end(CLS_D);
void 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 zend_do_for_cond(znode *expr, znode *second_semicolon_token CLS_DC);
void zend_do_for_before_statement(znode *cond_start, znode *second_semicolon_token CLS_DC);
void zend_do_for_end(znode *second_semicolon_token CLS_DC);
void do_pre_incdec(znode *result, znode *op1, int op CLS_DC);
void do_post_incdec(znode *result, znode *op1, int op CLS_DC);
void zend_do_pre_incdec(znode *result, znode *op1, int op CLS_DC);
void zend_do_post_incdec(znode *result, znode *op1, int op CLS_DC);
void do_begin_variable_parse(CLS_D);
void do_end_variable_parse(int type, int arg_offset CLS_DC);
void zend_do_begin_variable_parse(CLS_D);
void zend_do_end_variable_parse(int type, int arg_offset CLS_DC);
void do_free(znode *op1 CLS_DC);
void zend_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 zend_do_init_string(znode *result CLS_DC);
void zend_do_add_char(znode *result, znode *op1, znode *op2 CLS_DC);
void zend_do_add_string(znode *result, znode *op1, znode *op2 CLS_DC);
void zend_do_add_variable(znode *result, znode *op1, znode *op2 CLS_DC);
void 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);
void zend_do_begin_function_declaration(znode *function_token, znode *function_name, int is_method, int return_reference CLS_DC);
void zend_do_end_function_declaration(znode *function_token CLS_DC);
void zend_do_receive_arg(int op, znode *var, znode *offset, znode *initialization, unsigned char pass_type CLS_DC);
int zend_do_begin_function_call(znode *function_name CLS_DC);
void zend_do_begin_dynamic_function_call(znode *function_name CLS_DC);
void zend_do_begin_class_member_function_call(znode *class_name, znode *function_name CLS_DC);
void zend_do_end_function_call(znode *function_name, znode *result, znode *argument_list, int is_method, int is_dynamic_fcall CLS_DC);
void zend_do_return(znode *expr, int do_end_vparse CLS_DC);
ZEND_API int do_bind_function_or_class(zend_op *opline, HashTable *function_table, HashTable *class_table, int compile_time);
void do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce);
void do_early_binding(CLS_D);
void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce);
void zend_do_early_binding(CLS_D);
void do_pass_param(znode *param, int op, int offset CLS_DC);
void zend_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 zend_do_boolean_or_begin(znode *expr1, znode *op_token CLS_DC);
void zend_do_boolean_or_end(znode *result, znode *expr1, znode *expr2, znode *op_token CLS_DC);
void zend_do_boolean_and_begin(znode *expr1, znode *op_token CLS_DC);
void zend_do_boolean_and_end(znode *result, znode *expr1, znode *expr2, znode *op_token CLS_DC);
void do_brk_cont(int op, znode *expr CLS_DC);
void zend_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 zend_do_switch_cond(znode *cond CLS_DC);
void zend_do_switch_end(znode *case_list CLS_DC);
void zend_do_case_before_statement(znode *case_list, znode *case_token, znode *case_expr CLS_DC);
void zend_do_case_after_statement(znode *result, znode *case_token CLS_DC);
void zend_do_default_before_statement(znode *case_list, znode *default_token CLS_DC);
void 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 zend_do_begin_class_declaration(znode *class_name, znode *parent_class_name CLS_DC);
void zend_do_end_class_declaration(CLS_D);
void zend_do_declare_property(znode *var_name, znode *value CLS_DC);
void do_fetch_property(znode *result, znode *object, znode *property CLS_DC);
void zend_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 zend_do_push_object(znode *object CLS_DC);
void zend_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 zend_do_begin_new_object(znode *new_token, znode *class_name CLS_DC);
void zend_do_end_new_object(znode *result, znode *class_name, znode *new_token, znode *argument_list CLS_DC);
void do_fetch_constant(znode *result, znode *constant_name, int mode CLS_DC);
void zend_do_fetch_constant(znode *result, znode *constant_name, int mode CLS_DC);
void do_shell_exec(znode *result, znode *cmd CLS_DC);
void zend_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 zend_do_init_array(znode *result, znode *expr, znode *offset, int is_ref CLS_DC);
void zend_do_add_array_element(znode *result, znode *expr, znode *offset, int is_ref CLS_DC);
void zend_do_add_static_array_element(znode *result, znode *offset, znode *expr);
void zend_do_list_init(CLS_D);
void zend_do_list_end(znode *result, znode *expr CLS_DC);
void zend_do_add_list_element(znode *element CLS_DC);
void zend_do_new_list_begin(CLS_D);
void zend_do_new_list_end(CLS_D);
void do_cast(znode *result, znode *expr, int type CLS_DC);
void do_include_or_eval(int type, znode *result, znode *op1 CLS_DC);
void zend_do_cast(znode *result, znode *expr, int type CLS_DC);
void zend_do_include_or_eval(int type, znode *result, znode *op1 CLS_DC);
void do_unset(znode *variable CLS_DC);
void do_isset_or_isempty(int type, znode *result, znode *variable CLS_DC);
void zend_do_unset(znode *variable CLS_DC);
void zend_do_isset_or_isempty(int type, znode *result, znode *variable CLS_DC);
void 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 zend_do_foreach_begin(znode *foreach_token, znode *array, znode *open_brackets_token, znode *as_token, int variable CLS_DC);
void zend_do_foreach_cont(znode *value, znode *key, znode *as_token CLS_DC);
void zend_do_foreach_end(znode *foreach_token, znode *open_brackets_token CLS_DC);
void do_declare_begin(CLS_D);
void do_declare_stmt(znode *var, znode *val CLS_DC);
void do_declare_end(CLS_D);
void zend_do_declare_begin(CLS_D);
void zend_do_declare_stmt(znode *var, znode *val CLS_DC);
void zend_do_declare_end(CLS_D);
void do_end_heredoc(CLS_D);
void zend_do_end_heredoc(CLS_D);
void do_exit(znode *result, znode *message CLS_DC);
void zend_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 zend_do_begin_silence(znode *strudel_token CLS_DC);
void zend_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 zend_do_begin_qm_op(znode *cond, znode *qm_token CLS_DC);
void zend_do_qm_true(znode *true_value, znode *qm_token, znode *colon_token CLS_DC);
void zend_do_qm_false(znode *result, znode *false_value, znode *qm_token, znode *colon_token CLS_DC);
void do_extended_info(CLS_D);
void do_extended_fcall_begin(CLS_D);
void do_extended_fcall_end(CLS_D);
void zend_do_extended_info(CLS_D);
void zend_do_extended_fcall_begin(CLS_D);
void zend_do_extended_fcall_end(CLS_D);
void do_ticks(CLS_D);
void zend_do_ticks(CLS_D);
ZEND_API void function_add_ref(zend_function *function);
#define INITIAL_OP_ARRAY_SIZE 64
/* helper functions in zend-scanner.l */
/* helper functions in zend_language_scanner.l */
ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type CLS_DC);
ZEND_API zend_op_array *compile_string(zval *source_string CLS_DC);
ZEND_API zend_op_array *compile_string(zval *source_string, char *filename CLS_DC);
ZEND_API zend_op_array *compile_filename(int type, zval *filename CLS_DC ELS_DC);
ZEND_API int zend_execute_scripts(int type CLS_DC ELS_DC, int file_count, ...);
ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC);
@@ -400,6 +401,7 @@ void print_op_array(zend_op_array *op_array, int optimizations);
int pass_two(zend_op_array *op_array);
zend_brk_cont_element *get_next_brk_cont_element(zend_op_array *op_array);
ZEND_API zend_bool zend_is_compiling(void);
ZEND_API char *zend_make_compiled_string_description(char *name);
int zendlex(znode *zendlval CLS_DC);
@@ -536,6 +538,8 @@ int zendlex(znode *zendlval CLS_DC);
#define ZEND_TICKS 105
#define ZEND_SEND_VAR_NO_REF 106
/* end of block */
@@ -593,6 +597,8 @@ int zendlex(znode *zendlval CLS_DC);
#define ZEND_MEMBER_FUNC_CALL 1<<0
#define ZEND_CTOR_CALL 1<<1
#define ZEND_ARG_SEND_BY_REF (1<<0)
#define ZEND_ARG_COMPILE_TIME_BOUND (1<<1)
#define AI_USE_PTR(ai) \
if ((ai).ptr_ptr) { \
+3 -7
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -13,8 +13,7 @@
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Z
eev Suraski <zeev@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
@@ -50,15 +49,12 @@ typedef unsigned int uint;
#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
*/
#undef inline
#ifdef ZEND_WIN32_FORCE_INLINE
# define inline __forceinline
#else
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
+146 -130
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -98,6 +98,7 @@ static inline zval *_get_zval_ptr(znode *node, temp_variable *Ts, int *should_fr
zval *str = T->EA.data.str_offset.str;
if (T->EA.data.str_offset.str->type != IS_STRING
|| (T->EA.data.str_offset.offset<0)
|| (T->EA.data.str_offset.str->value.str.len <= T->EA.data.str_offset.offset)) {
T->tmp_var.value.str.val = empty_string;
T->tmp_var.value.str.len = 0;
@@ -173,8 +174,7 @@ static inline zval **_get_zval_ptr_ptr(znode *node, temp_variable *Ts ELS_DC)
static inline zval **zend_fetch_property_address_inner(HashTable *ht, znode *op2, temp_variable *Ts, int type ELS_DC)
{
int free_op2;
zval *prop_ptr = get_zval_ptr(op2, Ts, &free_op2, BP_VAR_R);
zval *prop_ptr = get_zval_ptr(op2, Ts, &EG(free_op2), BP_VAR_R);
zval **retval;
zval tmp;
@@ -219,7 +219,7 @@ static inline zval **zend_fetch_property_address_inner(HashTable *ht, znode *op2
if (prop_ptr == &tmp) {
zval_dtor(prop_ptr);
}
FREE_OP(op2, free_op2);
FREE_OP(op2, EG(free_op2));
return retval;
}
@@ -264,6 +264,7 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2
temp_variable *T = &Ts[op1->u.var];
if (T->EA.data.str_offset.str->type == IS_STRING
&& (T->EA.data.str_offset.offset >= 0)
&& (T->EA.data.str_offset.offset < T->EA.data.str_offset.str->value.str.len)) {
zval tmp;
zval *final_value = value;
@@ -345,7 +346,7 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2
if (variable_ptr==value) {
variable_ptr->refcount++;
} else if (PZVAL_IS_REF(value)) {
zval tmp = *value;
zval tmp;
tmp = *value;
zval_copy_ctor(&tmp);
@@ -502,8 +503,7 @@ static void zend_fetch_var_address(znode *result, znode *op1, znode *op2, temp_v
static inline zval **zend_fetch_dimension_address_inner(HashTable *ht, znode *op2, temp_variable *Ts, int type ELS_DC)
{
int free_op2;
zval *dim = get_zval_ptr(op2, Ts, &free_op2, BP_VAR_R);
zval *dim = get_zval_ptr(op2, Ts, &EG(free_op2), BP_VAR_R);
zval **retval;
char *offset_key;
int offset_key_length;
@@ -581,52 +581,58 @@ fetch_string_dim:
}
break;
}
FREE_OP(op2, free_op2);
FREE_OP(op2, EG(free_op2));
return retval;
}
static void fetch_overloaded_element(znode *result, znode *op1, znode *op2, temp_variable *Ts, int type, zval ***retval, int overloaded_element_type ELS_DC)
{
zend_overloaded_element overloaded_element;
if (Ts[op1->u.var].EA.type == IS_STRING_OFFSET) {
zval_ptr_dtor(&Ts[op1->u.var].EA.data.str_offset.str);
switch (type) {
case BP_VAR_R:
case BP_VAR_IS:
*retval = &EG(uninitialized_zval_ptr);
break;
case BP_VAR_W:
case BP_VAR_RW:
*retval = &EG(error_zval_ptr);
break;
EMPTY_SWITCH_DEFAULT_CASE()
}
SELECTIVE_PZVAL_LOCK(**retval, result);
return;
}
overloaded_element.element = *get_zval_ptr(op2, Ts, &EG(free_op2), type);
overloaded_element.type = overloaded_element_type;
if (!EG(free_op2)) {
zval_copy_ctor(&overloaded_element.element);
}
Ts[result->u.var].EA = Ts[op1->u.var].EA;
zend_llist_add_element(Ts[result->u.var].EA.data.overloaded_element.elements_list, &overloaded_element);
Ts[result->u.var].EA.type = IS_OVERLOADED_OBJECT;
*retval = NULL;
return;
}
static void zend_fetch_dimension_address(znode *result, znode *op1, znode *op2, temp_variable *Ts, int type ELS_DC)
{
int free_op2;
zval **container_ptr = get_zval_ptr_ptr(op1, Ts, type);
zval *container;
zval ***retval = &Ts[result->u.var].var.ptr_ptr;
if (container_ptr == NULL) {
zend_overloaded_element overloaded_element;
if (Ts[op1->u.var].EA.type == IS_STRING_OFFSET) {
switch (type) {
case BP_VAR_R:
case BP_VAR_IS:
*retval = &EG(uninitialized_zval_ptr);
break;
case BP_VAR_W:
case BP_VAR_RW:
*retval = &EG(error_zval_ptr);
break;
EMPTY_SWITCH_DEFAULT_CASE()
}
SELECTIVE_PZVAL_LOCK(**retval, result);
return;
}
/* prepare the new element */
overloaded_element.element = *get_zval_ptr(op2, Ts, &free_op2, type);
overloaded_element.type = OE_IS_ARRAY;
if (!free_op2) {
zval_copy_ctor(&overloaded_element.element);
}
Ts[result->u.var].EA = Ts[op1->u.var].EA;
zend_llist_add_element(Ts[result->u.var].EA.data.overloaded_element.elements_list, &overloaded_element);
Ts[result->u.var].EA.type = IS_OVERLOADED_OBJECT;
*retval = NULL;
fetch_overloaded_element(result, op1, op2, Ts, type, retval, OE_IS_ARRAY ELS_CC);
return;
}
container = *container_ptr;
if (container == EG(error_zval_ptr)) {
@@ -668,10 +674,10 @@ static void zend_fetch_dimension_address(znode *result, znode *op1, znode *op2,
break;
case IS_NULL:
/* for read-mode only */
get_zval_ptr(op2, Ts, &free_op2, BP_VAR_R);
get_zval_ptr(op2, Ts, &EG(free_op2), BP_VAR_R);
*retval = &EG(uninitialized_zval_ptr);
SELECTIVE_PZVAL_LOCK(**retval, result);
FREE_OP(op2, free_op2);
FREE_OP(op2, EG(free_op2));
if (type==BP_VAR_W || type==BP_VAR_RW) {
zend_error(E_WARNING, "Cannot use a NULL value as an array");
}
@@ -684,7 +690,7 @@ static void zend_fetch_dimension_address(znode *result, znode *op1, znode *op2,
zend_error(E_ERROR, "[] operator not supported for strings");
}
offset = get_zval_ptr(op2, Ts, &free_op2, BP_VAR_R);
offset = get_zval_ptr(op2, Ts, &EG(free_op2), BP_VAR_R);
if (offset->type != IS_LONG) {
tmp = *offset;
@@ -700,7 +706,7 @@ static void zend_fetch_dimension_address(znode *result, znode *op1, znode *op2,
PZVAL_LOCK(container);
Ts[result->u.var].EA.data.str_offset.offset = offset->value.lval;
Ts[result->u.var].EA.type = IS_STRING_OFFSET;
FREE_OP(op2, free_op2);
FREE_OP(op2, EG(free_op2));
*retval = NULL;
return;
}
@@ -708,13 +714,13 @@ static void zend_fetch_dimension_address(znode *result, znode *op1, znode *op2,
default: {
zval *offset;
offset = get_zval_ptr(op2, Ts, &free_op2, BP_VAR_R);
offset = get_zval_ptr(op2, Ts, &EG(free_op2), BP_VAR_R);
if (type==BP_VAR_R || type==BP_VAR_IS) {
*retval = &EG(uninitialized_zval_ptr);
} else {
*retval = &EG(error_zval_ptr);
}
FREE_OP(op2, free_op2);
FREE_OP(op2, EG(free_op2));
SELECTIVE_PZVAL_LOCK(**retval, result);
if (type==BP_VAR_W || type==BP_VAR_RW) {
zend_error(E_WARNING, "Cannot use a scalar value as an array");
@@ -743,43 +749,13 @@ static void zend_fetch_dimension_address_from_tmp_var(znode *result, znode *op1,
static void zend_fetch_property_address(znode *result, znode *op1, znode *op2, temp_variable *Ts, int type ELS_DC)
{
int free_op2;
zval **container_ptr = get_zval_ptr_ptr(op1, Ts, type);
zval *container;
zval ***retval = &Ts[result->u.var].var.ptr_ptr;
if (container_ptr == NULL) {
zend_overloaded_element overloaded_element;
if (Ts[op1->u.var].EA.type == IS_STRING_OFFSET) {
zval_ptr_dtor(&Ts[op1->u.var].EA.data.str_offset.str);
switch (type) {
case BP_VAR_R:
case BP_VAR_IS:
*retval = &EG(uninitialized_zval_ptr);
break;
case BP_VAR_W:
case BP_VAR_RW:
*retval = &EG(error_zval_ptr);
break;
EMPTY_SWITCH_DEFAULT_CASE()
}
SELECTIVE_PZVAL_LOCK(**retval, result);
return;
}
overloaded_element.element = *get_zval_ptr(op2, Ts, &free_op2, type);
overloaded_element.type = OE_IS_OBJECT;
if (!free_op2) {
zval_copy_ctor(&overloaded_element.element);
}
Ts[result->u.var].EA = Ts[op1->u.var].EA;
zend_llist_add_element(Ts[result->u.var].EA.data.overloaded_element.elements_list, &overloaded_element);
Ts[result->u.var].EA.type = IS_OVERLOADED_OBJECT;
*retval = NULL;
fetch_overloaded_element(result, op1, op2, Ts, type, retval, OE_IS_OBJECT ELS_CC);
return;
}
@@ -798,9 +774,9 @@ static void zend_fetch_property_address(znode *result, znode *op1, znode *op2, t
Ts[result->u.var].EA.data.overloaded_element.type = type;
Ts[result->u.var].EA.data.overloaded_element.elements_list = (zend_llist *) emalloc(sizeof(zend_llist));
zend_llist_init(Ts[result->u.var].EA.data.overloaded_element.elements_list, sizeof(zend_overloaded_element), NULL, 0);
overloaded_element.element = *get_zval_ptr(op2, Ts, &free_op2, type);
overloaded_element.element = *get_zval_ptr(op2, Ts, &EG(free_op2), type);
overloaded_element.type = OE_IS_OBJECT;
if (!free_op2) {
if (!EG(free_op2)) {
zval_copy_ctor(&overloaded_element.element);
}
zend_llist_add_element(Ts[result->u.var].EA.data.overloaded_element.elements_list, &overloaded_element);
@@ -828,8 +804,8 @@ static void zend_fetch_property_address(znode *result, znode *op1, znode *op2, t
if (container->type != IS_OBJECT) {
zval *offset;
offset = get_zval_ptr(op2, Ts, &free_op2, BP_VAR_R);
FREE_OP(op2, free_op2);
offset = get_zval_ptr(op2, Ts, &EG(free_op2), BP_VAR_R);
FREE_OP(op2, EG(free_op2));
if (type==BP_VAR_R || type==BP_VAR_IS) {
*retval = &EG(uninitialized_zval_ptr);
} else {
@@ -1322,38 +1298,32 @@ binary_assign_op_addr: {
zend_op *original_opline = opline;
int retval = zend_is_true(get_zval_ptr(&original_opline->op1, Ts, &EG(free_op1), BP_VAR_R));
FREE_OP(&original_opline->op1, EG(free_op1));
Ts[original_opline->result.u.var].tmp_var.value.lval = retval;
Ts[original_opline->result.u.var].tmp_var.type = IS_LONG;
if (!retval) {
#if DEBUG_ZEND>=2
printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
#endif
opline = &op_array->opcodes[opline->op2.u.opline_num];
FREE_OP(&original_opline->op1, EG(free_op1));
Ts[original_opline->result.u.var].tmp_var.value.lval = retval;
Ts[original_opline->result.u.var].tmp_var.type = IS_LONG;
continue;
}
FREE_OP(&original_opline->op1, EG(free_op1));
Ts[original_opline->result.u.var].tmp_var.value.lval = retval;
Ts[original_opline->result.u.var].tmp_var.type = IS_LONG;
}
NEXT_OPCODE();
case ZEND_JMPNZ_EX: {
zend_op *original_opline = opline;
int retval = zend_is_true(get_zval_ptr(&original_opline->op1, Ts, &EG(free_op1), BP_VAR_R));
FREE_OP(&original_opline->op1, EG(free_op1));
Ts[original_opline->result.u.var].tmp_var.value.lval = retval;
Ts[original_opline->result.u.var].tmp_var.type = IS_LONG;
if (retval) {
#if DEBUG_ZEND>=2
printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
#endif
opline = &op_array->opcodes[opline->op2.u.opline_num];
FREE_OP(&original_opline->op1, EG(free_op1));
Ts[original_opline->result.u.var].tmp_var.value.lval = retval;
Ts[original_opline->result.u.var].tmp_var.type = IS_LONG;
continue;
}
FREE_OP(&original_opline->op1, EG(free_op1));
Ts[original_opline->result.u.var].tmp_var.value.lval = retval;
Ts[original_opline->result.u.var].tmp_var.type = IS_LONG;
}
NEXT_OPCODE();
case ZEND_FREE:
@@ -1414,7 +1384,7 @@ binary_assign_op_addr: {
if (opline->op1.op_type == IS_VAR) {
SELECTIVE_PZVAL_LOCK(*Ts[opline->op1.u.var].var.ptr_ptr, &opline->op1);
}
if (opline->op2.op_type==IS_VAR) {
if (opline->op2.op_type == IS_VAR) {
PZVAL_LOCK(*Ts[opline->op2.u.var].var.ptr_ptr);
}
}
@@ -1431,10 +1401,6 @@ binary_assign_op_addr: {
zend_class_entry *ce;
zval **object_ptr_ptr;
if (zend_hash_find(EG(class_table), opline->op1.u.constant.value.str.val, opline->op1.u.constant.value.str.len+1, (void **) &ce)==FAILURE) {
zend_error(E_ERROR, "Undefined class name '%s'", opline->op1.u.constant.value.str.val);
}
active_function_table = &ce->function_table;
if (zend_hash_find(EG(active_symbol_table), "this", sizeof("this"), (void **) &object_ptr_ptr)==FAILURE) {
object.ptr=NULL;
} else {
@@ -1443,6 +1409,15 @@ binary_assign_op_addr: {
object.ptr = *object_ptr_ptr;
object.ptr->refcount++; /* For this pointer */
}
if (zend_hash_find(EG(class_table), opline->op1.u.constant.value.str.val, opline->op1.u.constant.value.str.len+1, (void **) &ce)==FAILURE) { /* class doesn't exist */
/* test for parent:: special case - if it doesn't exist - error out */
if (opline->op1.u.constant.value.str.len!=(sizeof("parent")-1)
|| memcmp(opline->op1.u.constant.value.str.val, "parent", sizeof("parent")-1)!=0
|| !(ce = object.ptr->value.obj.ce->parent)) {
zend_error(E_ERROR, "Undefined class name '%s'", opline->op1.u.constant.value.str.val);
}
}
active_function_table = &ce->function_table;
} else { /* used for member function calls */
object.ptr = _get_object_zval_ptr(&opline->op1, Ts, &EG(free_op1) ELS_CC);
@@ -1584,9 +1559,10 @@ do_fcall_common:
zval_ptr_dtor(&Ts[opline->result.u.var].var.ptr);
}
}
object.ptr = zend_ptr_stack_pop(&EG(arg_types_stack));
if (opline->opcode == ZEND_DO_FCALL_BY_NAME) {
fbc = zend_ptr_stack_pop(&EG(arg_types_stack));
zend_ptr_stack_n_pop(&EG(arg_types_stack), 2, &object.ptr, &fbc);
} else {
object.ptr = zend_ptr_stack_pop(&EG(arg_types_stack));
}
function_state.function = (zend_function *) op_array;
EG(function_state_ptr) = &function_state;
@@ -1643,40 +1619,68 @@ do_fcall_common:
}
{
zval *valptr;
zval *value;
value = get_zval_ptr(&opline->op1, Ts, &EG(free_op1), BP_VAR_R);
ALLOC_ZVAL(valptr);
*valptr = Ts[opline->op1.u.var].tmp_var;
*valptr = *value;
if (!EG(free_op1)) {
zval_copy_ctor(valptr);
}
INIT_PZVAL(valptr);
zend_ptr_stack_push(&EG(argument_stack), valptr);
}
NEXT_OPCODE();
case ZEND_SEND_VAR:
if (opline->extended_value==ZEND_DO_FCALL_BY_NAME
&& ARG_SHOULD_BE_SENT_BY_REF(opline->op2.u.opline_num, fbc, fbc->common.arg_types)) {
goto send_by_ref;
case ZEND_SEND_VAR_NO_REF:
if (opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND) { /* Had function_ptr at compile_time */
if (!(opline->extended_value & ZEND_ARG_SEND_BY_REF)) {
goto send_by_var;
}
} else if (!ARG_SHOULD_BE_SENT_BY_REF(opline->op2.u.opline_num, fbc, fbc->common.arg_types)) {
goto send_by_var;
}
{
zval *varptr;
varptr = get_zval_ptr(&opline->op1, Ts, &EG(free_op1), BP_VAR_R);
if (varptr == &EG(uninitialized_zval)) {
ALLOC_ZVAL(varptr);
INIT_ZVAL(*varptr);
varptr->refcount = 0;
} else if (PZVAL_IS_REF(varptr)) {
zval *original_var = varptr;
ALLOC_ZVAL(varptr);
*varptr = *original_var;
varptr->is_ref = 0;
varptr->refcount = 0;
zval_copy_ctor(varptr);
if (varptr != &EG(uninitialized_zval) && (PZVAL_IS_REF(varptr) || varptr->refcount == 1)) {
varptr->is_ref = 1;
varptr->refcount++;
zend_ptr_stack_push(&EG(argument_stack), varptr);
NEXT_OPCODE();
}
varptr->refcount++;
zend_ptr_stack_push(&EG(argument_stack), varptr);
FREE_OP(&opline->op1, EG(free_op1)); /* for string offsets */
zend_error(E_ERROR, "Only variables can be passed by reference");
}
NEXT_OPCODE();
case ZEND_SEND_VAR:
if ((opline->extended_value == ZEND_DO_FCALL_BY_NAME)
&& ARG_SHOULD_BE_SENT_BY_REF(opline->op2.u.opline_num, fbc, fbc->common.arg_types)) {
goto send_by_ref;
}
send_by_var:
{
zval *varptr;
varptr = get_zval_ptr(&opline->op1, Ts, &EG(free_op1), BP_VAR_R);
if (varptr == &EG(uninitialized_zval)) {
ALLOC_ZVAL(varptr);
INIT_ZVAL(*varptr);
varptr->refcount = 0;
} else if (PZVAL_IS_REF(varptr)) {
zval *original_var = varptr;
ALLOC_ZVAL(varptr);
*varptr = *original_var;
varptr->is_ref = 0;
varptr->refcount = 0;
zval_copy_ctor(varptr);
}
varptr->refcount++;
zend_ptr_stack_push(&EG(argument_stack), varptr);
FREE_OP(&opline->op1, EG(free_op1)); /* for string offsets */
}
NEXT_OPCODE();
send_by_ref:
case ZEND_SEND_REF: {
zval **varptr_ptr;
@@ -1792,7 +1796,7 @@ send_by_ref:
FREE_OP(&opline->op2, EG(free_op2));
continue;
}
NEXT_OPCODE();
/* Never reaches this point */
case ZEND_CASE: {
int switch_expr_is_overloaded=0;
@@ -1911,7 +1915,11 @@ send_by_ref:
case IS_STRING:
zend_hash_update(array_ptr->value.ht, offset->value.str.val, offset->value.str.len+1, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_NULL:
zend_hash_update(array_ptr->value.ht, "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
break;
default:
zval_ptr_dtor(&expr_ptr);
/* do nothing */
break;
}
@@ -1974,7 +1982,7 @@ send_by_ref:
switch (opline->op2.u.constant.value.lval) {
case ZEND_INCLUDE_ONCE:
case ZEND_REQUIRE_ONCE: {
char *opened_path;
char *opened_path=NULL;
int dummy = 1;
zend_file_handle file_handle;
@@ -2000,19 +2008,21 @@ send_by_ref:
}
}
if (opened_path) {
free(opened_path);
efree(opened_path);
}
break;
}
break;
case ZEND_INCLUDE:
case ZEND_REQUIRE:
{
new_op_array = compile_filename(opline->op2.u.constant.value.lval, inc_filename CLS_CC ELS_CC);
break;
}
case ZEND_EVAL:
new_op_array = compile_string(inc_filename CLS_CC);
case ZEND_EVAL: {
char *eval_desc = zend_make_compiled_string_description("eval()'d code");
new_op_array = compile_string(inc_filename, eval_desc CLS_CC);
efree(eval_desc);
}
break;
EMPTY_SWITCH_DEFAULT_CASE()
}
@@ -2080,8 +2090,6 @@ send_by_ref:
if (container) {
HashTable *ht;
SEPARATE_ZVAL_IF_NOT_REF(container);
switch ((*container)->type) {
case IS_ARRAY:
ht = (*container)->value.ht;
@@ -2189,7 +2197,7 @@ send_by_ref:
ALLOC_ZVAL(key);
INIT_PZVAL(key);
switch (zend_hash_get_current_key(fe_ht, &str_key, &int_key)) {
switch (zend_hash_get_current_key(fe_ht, &str_key, &int_key, 1)) {
case HASH_KEY_IS_STRING:
key->value.str.val = str_key;
key->value.str.len = strlen(str_key);
@@ -2266,7 +2274,13 @@ send_by_ref:
NEXT_OPCODE();
case ZEND_EXIT:
if (opline->op1.op_type != IS_UNUSED) {
zend_print_variable(get_zval_ptr(&opline->op1, Ts, &EG(free_op1), BP_VAR_R));
zval *ptr;
ptr = get_zval_ptr(&opline->op1, Ts, &EG(free_op1), BP_VAR_R);
if (Z_TYPE_P(ptr) == IS_LONG) {
EG(exit_status) = Z_LVAL_P(ptr);
}
zend_print_variable(ptr);
FREE_OP(&opline->op1, EG(free_op1));
}
zend_bailout();
@@ -2322,7 +2336,9 @@ send_by_ref:
}
}
#if SUPPORT_INTERACTIVE
ALLOC_INIT_ZVAL(*(EG(return_value_ptr_ptr)));
op_array->last_executed_op_number = opline-op_array->opcodes;
EG(in_execution) = original_in_execution;
free_alloca(Ts);
#else
zend_error(E_ERROR,"Arrived at end of main loop which shouldn't happen");
+14 -33
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -54,8 +54,7 @@ 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)
static inline void safe_free_zval_ptr(zval *p)
{
ELS_FETCH();
@@ -63,13 +62,9 @@ ZEND_API inline void safe_free_zval_ptr(zval *p)
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)
ZEND_API int zend_eval_string(char *str, zval *retval_ptr, char *string_name CLS_DC ELS_DC);
static inline int i_zend_is_true(zval *op)
{
int result;
@@ -105,15 +100,11 @@ ZEND_API inline int i_zend_is_true(zval *op)
}
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)
static inline void zend_ptr_stack_clear_multiple(ELS_D)
{
void **p = EG(argument_stack).top_element-2;
int delete_count = (ulong) *p;
@@ -124,12 +115,8 @@ ZEND_API inline void zend_ptr_stack_clear_multiple(ELS_D)
}
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)
static inline int zend_ptr_stack_get_arg(int requested_arg, void **data ELS_DC)
{
void **p = EG(argument_stack).top_element-2;
int arg_count = (ulong) *p;
@@ -140,9 +127,6 @@ ZEND_API inline int zend_ptr_stack_get_arg(int requested_arg, void **data ELS_DC
*data = (p-arg_count+requested_arg-1);
return SUCCESS;
}
#else
;
#endif
#if SUPPORT_INTERACTIVE
void execute_new_code(CLS_D);
@@ -155,8 +139,8 @@ 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_set_timeout(long seconds);
ZEND_API void zend_unset_timeout(void);
ZEND_API void zend_timeout(int dummy);
#ifdef ZEND_WIN32
@@ -171,19 +155,19 @@ void zend_shutdown_timeout_thread();
#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)
static inline void zend_assign_to_variable_reference(znode *result, zval **variable_ptr_ptr, zval **value_ptr_ptr, temp_variable *Ts ELS_DC)
{
zval *variable_ptr = *variable_ptr_ptr;
zval *variable_ptr;
zval *value_ptr;
if (!value_ptr_ptr) {
zend_error(E_ERROR, "Cannot create references to string offsets nor overloaded objects");
if (!value_ptr_ptr || !variable_ptr_ptr) {
zend_error(E_ERROR, "Cannot create references to/from string offsets nor overloaded objects");
return;
}
variable_ptr = *variable_ptr_ptr;
value_ptr = *value_ptr_ptr;
if (variable_ptr == EG(error_zval_ptr) || value_ptr==EG(error_zval_ptr)) {
variable_ptr_ptr = &EG(uninitialized_zval_ptr);
/* } else if (variable_ptr==&EG(uninitialized_zval) || variable_ptr!=value_ptr) { */
@@ -222,9 +206,6 @@ ZEND_API inline void zend_assign_to_variable_reference(znode *result, zval **var
AI_USE_PTR(Ts[result->u.var].var);
}
}
#else
;
#endif
#define IS_OVERLOADED_OBJECT 1
#define IS_STRING_OFFSET 2
+49 -17
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -312,7 +312,7 @@ ZEND_API int zval_update_constant(zval **pp, void *arg)
}
int call_user_function(HashTable *function_table, zval *object, zval *function_name, zval *retval_ptr, int param_count, zval *params[])
int call_user_function(HashTable *function_table, zval **object_pp, zval *function_name, zval *retval_ptr, int param_count, zval *params[])
{
zval ***params_array = (zval ***) emalloc(sizeof(zval **)*param_count);
int i;
@@ -322,7 +322,7 @@ int call_user_function(HashTable *function_table, zval *object, zval *function_n
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);
ex_retval = call_user_function_ex(function_table, object_pp, function_name, &local_retval_ptr, param_count, params_array, 1, NULL);
if (local_retval_ptr) {
COPY_PZVAL_TO_ZVAL(*retval_ptr, local_retval_ptr);
} else {
@@ -333,7 +333,7 @@ int call_user_function(HashTable *function_table, zval *object, zval *function_n
}
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 call_user_function_ex(HashTable *function_table, zval **object_pp, zval *function_name, zval **retval_ptr_ptr, int param_count, zval **params[], int no_separation, HashTable *symbol_table)
{
int i;
zval **original_return_value;
@@ -342,6 +342,9 @@ int call_user_function_ex(HashTable *function_table, zval *object, zval *functio
zend_function_state *original_function_state_ptr;
zend_op_array *original_op_array;
zend_op **original_opline_ptr;
int orig_free_op1, orig_free_op2;
int (*orig_unary_op)(zval *result, zval *op1);
int (*orig_binary_op)(zval *result, zval *op1, zval *op2);
ELS_FETCH();
*retval_ptr_ptr = NULL;
@@ -356,14 +359,33 @@ int call_user_function_ex(HashTable *function_table, zval *object, zval *functio
return FAILURE;
}
function_name = *tmp_real_function_name;
object = *tmp_object_ptr;
SEPARATE_ZVAL_IF_NOT_REF(tmp_object_ptr);
object_pp = tmp_object_ptr;
(*object_pp)->is_ref = 1;
}
if (object) {
if (object->type != IS_OBJECT) {
if (object_pp && !*object_pp) {
object_pp = NULL;
}
if (object_pp) {
if (Z_TYPE_PP(object_pp) == IS_OBJECT) {
function_table = &(*object_pp)->value.obj.ce->function_table;
} else if (Z_TYPE_PP(object_pp) == IS_STRING) {
zend_class_entry *ce;
char *lc_class;
int found;
lc_class = estrndup(Z_STRVAL_PP(object_pp), Z_STRLEN_PP(object_pp));
zend_str_tolower(lc_class, Z_STRLEN_PP(object_pp));
found = zend_hash_find(EG(class_table), lc_class, Z_STRLEN_PP(object_pp) + 1, (void **) &ce);
efree(lc_class);
if (found == FAILURE)
return FAILURE;
function_table = &ce->function_table;
object_pp = NULL;
} else
return FAILURE;
}
function_table = &object->value.obj.ce->function_table;
}
if (function_name->type!=IS_STRING) {
@@ -412,6 +434,8 @@ int call_user_function_ex(HashTable *function_table, zval *object, zval *functio
zend_ptr_stack_n_push(&EG(argument_stack), 2, (void *) (long) param_count, NULL);
EG(function_state_ptr) = &function_state;
if (function_state.function->type == ZEND_USER_FUNCTION) {
calling_symbol_table = EG(active_symbol_table);
if (symbol_table) {
@@ -420,20 +444,23 @@ int call_user_function_ex(HashTable *function_table, zval *object, zval *functio
ALLOC_HASHTABLE(EG(active_symbol_table));
zend_hash_init(EG(active_symbol_table), 0, NULL, ZVAL_PTR_DTOR, 0);
}
if (object) {
if (object_pp) {
zval *dummy, **this_ptr;
ALLOC_ZVAL(dummy);
INIT_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);
zend_assign_to_variable_reference(NULL, this_ptr, object_pp, NULL ELS_CC);
}
original_return_value = EG(return_value_ptr_ptr);
original_op_array = EG(active_op_array);
EG(return_value_ptr_ptr) = retval_ptr_ptr;
EG(active_op_array) = (zend_op_array *) function_state.function;
original_opline_ptr = EG(opline_ptr);
orig_free_op1 = EG(free_op1);
orig_free_op2 = EG(free_op2);
orig_unary_op = EG(unary_op);
orig_binary_op = EG(binary_op);
zend_execute(EG(active_op_array) ELS_CC);
if (!symbol_table) {
zend_hash_destroy(EG(active_symbol_table));
@@ -443,9 +470,13 @@ int call_user_function_ex(HashTable *function_table, zval *object, zval *functio
EG(active_op_array) = original_op_array;
EG(return_value_ptr_ptr)=original_return_value;
EG(opline_ptr) = original_opline_ptr;
EG(free_op1) = orig_free_op1;
EG(free_op2) = orig_free_op2;
EG(unary_op) = orig_unary_op;
EG(binary_op) = orig_binary_op;
} else {
ALLOC_INIT_ZVAL(*retval_ptr_ptr);
((zend_internal_function *) function_state.function)->handler(param_count, *retval_ptr_ptr, object, 1 ELS_CC);
((zend_internal_function *) function_state.function)->handler(param_count, *retval_ptr_ptr, (object_pp?*object_pp:NULL), 1 ELS_CC);
INIT_PZVAL(*retval_ptr_ptr);
}
zend_ptr_stack_clear_multiple(ELS_C);
@@ -455,7 +486,7 @@ int call_user_function_ex(HashTable *function_table, zval *object, zval *functio
}
ZEND_API int zend_eval_string(char *str, zval *retval_ptr CLS_DC ELS_DC)
ZEND_API int zend_eval_string(char *str, zval *retval_ptr, char *string_name CLS_DC ELS_DC)
{
zval pv;
zend_op_array *new_op_array;
@@ -480,7 +511,7 @@ ZEND_API int zend_eval_string(char *str, zval *retval_ptr CLS_DC ELS_DC)
original_handle_op_arrays = CG(handle_op_arrays);
CG(handle_op_arrays) = 0;
new_op_array = compile_string(&pv CLS_CC);
new_op_array = compile_string(&pv, string_name CLS_CC);
CG(handle_op_arrays) = original_handle_op_arrays;
if (new_op_array) {
@@ -538,6 +569,7 @@ void execute_new_code(CLS_D)
CG(active_op_array)->end_op_number = CG(active_op_array)->last;
EG(active_op_array) = CG(active_op_array);
zend_execute(CG(active_op_array) ELS_CC);
zval_ptr_dtor(EG(return_value_ptr_ptr));
CG(active_op_array)->start_op_number = CG(active_op_array)->last_executed_op_number;
}
#endif
+1 -1
View File
@@ -6,7 +6,6 @@
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]); \
@@ -14,6 +13,7 @@
EG(garbage)[1] = EG(garbage)[3]; \
EG(garbage_ptr) -= 2; \
} \
EG(garbage)[EG(garbage_ptr)++] = (z); \
} \
}
+52 -38
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -23,23 +23,6 @@
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
@@ -64,17 +47,19 @@ int zend_load_extension(char *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"
/* allow extension to proclaim compatibility with any Zend version */
if(extension_version_info->zend_extension_api_no != ZEND_EXTENSION_API_NO &&(!new_extension->api_no_check || new_extension->api_no_check(ZEND_EXTENSION_API_NO) != SUCCESS)) {
if (extension_version_info->zend_extension_api_no > ZEND_EXTENSION_API_NO) {
fprintf(stderr, "%s requires Zend Engine API version %d\n"
"The installed Zend Engine API version is %d\n\n",
new_extension->name,
extension_version_info->zend_extension_api_no,
ZEND_EXTENSION_API_NO);
DL_UNLOAD(handle);
return FAILURE;
} else if (extension_version_info->zend_extension_api_no < ZEND_EXTENSION_API_NO) {
/* 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"
DL_UNLOAD(handle);
return FAILURE;
} else if (extension_version_info->zend_extension_api_no < ZEND_EXTENSION_API_NO) {
fprintf(stderr, "%s designed to be used with the Zend Engine API %d is outdated\n"
"It requires a more recent version of the Zend Engine\n"
"The installed Zend Engine API version is %d\n"
"Contact %s at %s for a later version of this module.\n\n",
@@ -83,8 +68,9 @@ int zend_load_extension(char *path)
ZEND_EXTENSION_API_NO,
new_extension->author,
new_extension->URL);
DL_UNLOAD(handle);
return FAILURE;
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,
@@ -114,13 +100,6 @@ 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;
@@ -128,7 +107,6 @@ int zend_register_extension(zend_extension *new_extension, DL_HANDLE handle)
zend_llist_add_element(&zend_extensions, &extension);
zend_append_version_info(&extension);
/*fprintf(stderr, "Loaded %s, version %s\n", extension.name, extension.version);*/
#endif
@@ -145,11 +123,32 @@ static void zend_extension_shutdown(zend_extension *extension)
#endif
}
static int zend_extension_startup(zend_extension *extension)
{
#if ZEND_EXTENSIONS_SUPPORT
if (extension->startup) {
if (extension->startup(extension)!=SUCCESS) {
return 1;
}
zend_append_version_info(extension);
}
#endif
return 0;
}
int zend_startup_extensions_mechanism()
{
/* Startup extensions mechanism */
zend_llist_init(&zend_extensions, sizeof(zend_extension), (void (*)(void *)) zend_extension_dtor, 1);
last_resource_number = 0;
return SUCCESS;
}
int zend_startup_extensions()
{
zend_llist_init(&zend_extensions, sizeof(zend_extension), (void (*)(void *)) zend_extension_dtor, 1);
last_resource_number = 0;
zend_llist_apply_with_del(&zend_extensions, (int (*)(void *)) zend_extension_startup);
return SUCCESS;
}
@@ -163,7 +162,7 @@ void zend_shutdown_extensions()
void zend_extension_dtor(zend_extension *extension)
{
#if ZEND_EXTENSIONS_SUPPORT
#if ZEND_EXTENSIONS_SUPPORT && !ZEND_DEBUG
if (extension->handle) {
DL_UNLOAD(extension->handle);
}
@@ -200,3 +199,18 @@ ZEND_API int zend_get_resource_handle(zend_extension *extension)
return -1;
}
}
ZEND_API zend_extension *zend_get_extension(char *extension_name)
{
zend_llist_element *element;
for (element = zend_extensions.head; element; element = element->next) {
zend_extension *extension = (zend_extension *) element->data;
if (!strcmp(extension->name, extension_name)) {
return extension;
}
}
return NULL;
}
+35 -16
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -23,7 +23,7 @@
#include "zend_compile.h"
#define ZEND_EXTENSION_API_NO 20000815
#define ZEND_EXTENSION_API_NO 20001224
typedef struct _zend_extension_version_info {
int zend_extension_api_no;
@@ -35,6 +35,23 @@ typedef struct _zend_extension_version_info {
typedef struct _zend_extension zend_extension;
/* Typedef's for zend_extension function pointers */
typedef int (*startup_func_t)(zend_extension *extension);
typedef void (*shutdown_func_t)(zend_extension *extension);
typedef void (*activate_func_t)(void);
typedef void (*deactivate_func_t)(void);
typedef void (*message_handler_func_t)(int message, void *arg);
typedef void (*op_array_handler_func_t)(zend_op_array *op_array);
typedef void (*statement_handler_func_t)(zend_op_array *op_array);
typedef void (*fcall_begin_handler_func_t)(zend_op_array *op_array);
typedef void (*fcall_end_handler_func_t)(zend_op_array *op_array);
typedef void (*op_array_ctor_func_t)(zend_op_array *op_array);
typedef void (*op_array_dtor_func_t)(zend_op_array *op_array);
struct _zend_extension {
char *name;
char *version;
@@ -42,23 +59,23 @@ struct _zend_extension {
char *URL;
char *copyright;
int (*startup)(zend_extension *extension);
void (*shutdown)(zend_extension *extension);
void (*activate)();
void (*deactivate)();
startup_func_t startup;
shutdown_func_t shutdown;
activate_func_t activate;
deactivate_func_t deactivate;
void (*message_handler)(int message, void *arg);
message_handler_func_t message_handler;
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);
op_array_handler_func_t op_array_handler;
void (*op_array_ctor)(zend_op_array *op_array);
void (*op_array_dtor)(zend_op_array *op_array);
statement_handler_func_t statement_handler;
fcall_begin_handler_func_t fcall_begin_handler;
fcall_end_handler_func_t fcall_end_handler;
void *reserved1;
op_array_ctor_func_t op_array_ctor;
op_array_dtor_func_t op_array_dtor;
int (*api_no_check)(int api_no);
void *reserved2;
void *reserved3;
void *reserved4;
@@ -82,16 +99,18 @@ ZEND_API void zend_extension_dispatch_message(int message, void *arg);
ZEND_EXT_API zend_extension_version_info extension_version_info = { ZEND_EXTENSION_API_NO, ZEND_VERSION, ZTS_V, ZEND_DEBUG }
#define STANDARD_ZEND_EXTENSION_PROPERTIES NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, -1
#define COMPAT_ZEND_EXTENSION_PROPERTIES NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, -1
ZEND_API extern zend_llist zend_extensions;
void zend_extension_dtor(zend_extension *extension);
ZEND_API int zend_load_extension(char *path);
ZEND_API int zend_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_mechanism(void);
int zend_startup_extensions(void);
void zend_shutdown_extensions(void);
ZEND_API zend_extension *zend_get_extension(char *extension_name);
#endif /* ZEND_EXTENSIONS_H */
+2 -2
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -74,7 +74,7 @@ typedef struct _zend_fast_cache_list_entry {
{ \
ALS_FETCH(); \
\
((zend_fast_cache_list_entry *) (p))->next = AG(fast_cache_list_head)[fc_type]; \
((zend_fast_cache_list_entry *) (p))->next = (zend_fast_cache_list_entry *) AG(fast_cache_list_head)[fc_type]; \
AG(fast_cache_list_head)[fc_type] = (zend_fast_cache_list_entry *) (p); \
}
-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
+10 -4
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -40,6 +40,7 @@
#ifdef __cplusplus
class ZendFlexLexer;
class ZendIniFlexLexer;
#endif
BEGIN_EXTERN_C()
@@ -106,13 +107,15 @@ struct _zend_compiler_globals {
zend_bool unclean_shutdown;
zend_bool ini_parser_unbuffered_errors;
zend_llist open_files;
#ifdef ZTS
#ifdef __cplusplus
#if defined(ZTS) && defined(__cplusplus)
ZendFlexLexer *ZFL;
ZendIniFlexLexer *ini_scanner;
#else
void *ZFL;
#endif
void *ini_parser;
#endif
};
@@ -148,6 +151,7 @@ struct _zend_executor_globals {
int error_reporting;
int orig_error_reporting;
int exit_status;
zend_op_array *active_op_array;
@@ -187,6 +191,8 @@ struct _zend_executor_globals {
int lambda_count;
HashTable ini_directives;
void *reserved[ZEND_MAX_RESERVED_RESOURCES];
#if SUPPORT_INTERACTIVE
int interactive;
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
+49 -15
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -155,7 +155,7 @@ ZEND_API ulong hashpjw(char *arKey, uint nKeyLength)
if (!(p)->pDataPtr) { \
pefree((p)->pData, (ht)->persistent); \
} \
(p)->pDataPtr = *(void **)pData; \
memcpy(&(p)->pDataPtr, pData, sizeof(void *)); \
(p)->pData = &(p)->pDataPtr; \
} else { \
if ((p)->pDataPtr) { \
@@ -167,7 +167,7 @@ ZEND_API ulong hashpjw(char *arKey, uint nKeyLength)
#define INIT_DATA(ht, p, pData, nDataSize); \
if (nDataSize == sizeof(void*)) { \
(p)->pDataPtr = *(void **)pData; \
memcpy(&(p)->pDataPtr, pData, sizeof(void *)); \
(p)->pData = &(p)->pDataPtr; \
} else { \
(p)->pData = (void *) pemalloc(nDataSize, (ht)->persistent); \
@@ -750,21 +750,21 @@ ZEND_API void zend_hash_apply_with_arguments(HashTable *ht, int (*destruct)(void
ZEND_API void zend_hash_copy(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size)
{
Bucket *p;
void *new_entry;
IS_CONSISTENT(source);
IS_CONSISTENT(target);
p = source->pListHead;
while (p) {
memcpy(tmp, p->pData, size);
if (pCopyConstructor) {
pCopyConstructor(tmp);
}
if (p->nKeyLength) {
zend_hash_update(target, p->arKey, p->nKeyLength, tmp, size, NULL);
zend_hash_update(target, p->arKey, p->nKeyLength, p->pData, size, &new_entry);
} else {
zend_hash_index_update(target, p->h, tmp, size, NULL);
zend_hash_index_update(target, p->h, p->pData, size, &new_entry);
}
if (pCopyConstructor) {
pCopyConstructor(new_entry);
}
p = p->pListNext;
}
target->pInternalPointer = target->pListHead;
@@ -782,13 +782,12 @@ ZEND_API void zend_hash_merge(HashTable *target, HashTable *source, copy_ctor_fu
p = source->pListHead;
while (p) {
memcpy(tmp, p->pData, size);
if (p->nKeyLength>0) {
if (zend_hash_add_or_update(target, p->arKey, p->nKeyLength, tmp, size, &t, mode)==SUCCESS && pCopyConstructor) {
if (zend_hash_add_or_update(target, p->arKey, p->nKeyLength, p->pData, size, &t, mode)==SUCCESS && pCopyConstructor) {
pCopyConstructor(t);
}
} else {
if ((mode==HASH_UPDATE || !zend_hash_index_exists(target, p->h)) && zend_hash_index_update(target, p->h, tmp, size, &t)==SUCCESS && pCopyConstructor) {
if ((mode==HASH_UPDATE || !zend_hash_index_exists(target, p->h)) && zend_hash_index_update(target, p->h, p->pData, size, &t)==SUCCESS && pCopyConstructor) {
pCopyConstructor(t);
}
}
@@ -798,6 +797,38 @@ ZEND_API void zend_hash_merge(HashTable *target, HashTable *source, copy_ctor_fu
}
ZEND_API void zend_hash_merge_ex(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, uint size, zend_bool (*pReplaceOrig)(void *orig, void *p_new))
{
Bucket *p;
void *t;
void *pOrig;
IS_CONSISTENT(source);
IS_CONSISTENT(target);
p = source->pListHead;
while (p) {
if (p->nKeyLength>0) {
if (zend_hash_find(target, p->arKey, p->nKeyLength, &pOrig)==FAILURE
|| pReplaceOrig(pOrig, p->pData)) {
if (zend_hash_update(target, p->arKey, p->nKeyLength, p->pData, size, &t)==SUCCESS && pCopyConstructor) {
pCopyConstructor(t);
}
}
} else {
if (zend_hash_index_find(target, p->h, &pOrig)==FAILURE
|| pReplaceOrig(pOrig, p->pData)) {
if (zend_hash_index_update(target, p->h, p->pData, size, &t)==SUCCESS && pCopyConstructor) {
pCopyConstructor(t);
}
}
}
p = p->pListNext;
}
target->pInternalPointer = target->pListHead;
}
ZEND_API ulong zend_get_hash_value(HashTable *ht, char *arKey, uint nKeyLength)
{
IS_CONSISTENT(ht);
@@ -988,7 +1019,7 @@ ZEND_API int zend_hash_move_backwards_ex(HashTable *ht, HashPosition *pos)
/* This function should be made binary safe */
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_ex(HashTable *ht, char **str_index, ulong *str_length, ulong *num_index, zend_bool duplicate, HashPosition *pos)
{
Bucket *p;
@@ -998,8 +1029,11 @@ ZEND_API int zend_hash_get_current_key_ex(HashTable *ht, char **str_index, ulong
if (p) {
if (p->nKeyLength) {
*str_index = (char *) pemalloc(p->nKeyLength, ht->persistent);
memcpy(*str_index, p->arKey, p->nKeyLength);
if (duplicate) {
*str_index = estrndup(p->arKey, p->nKeyLength);
} else {
*str_index = p->arKey;
}
if (str_length) {
*str_length = p->nKeyLength;
}
+5 -4
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -146,7 +146,7 @@ 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_ex(HashTable *ht, char **str_index, ulong *str_length, ulong *num_index, zend_bool duplicate, HashPosition *pos);
ZEND_API int zend_hash_get_current_key_type_ex(HashTable *ht, HashPosition *pos);
ZEND_API int zend_hash_get_current_data_ex(HashTable *ht, void **pData, HashPosition *pos);
ZEND_API void zend_hash_internal_pointer_reset_ex(HashTable *ht, HashPosition *pos);
@@ -156,8 +156,8 @@ ZEND_API void zend_hash_internal_pointer_end_ex(HashTable *ht, HashPosition *pos
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(ht, str_index, num_index, duplicate) \
zend_hash_get_current_key_ex(ht, str_index, NULL, num_index, duplicate, NULL)
#define zend_hash_get_current_key_type(ht) \
zend_hash_get_current_key_type_ex(ht, NULL)
#define zend_hash_get_current_data(ht, pData) \
@@ -170,6 +170,7 @@ ZEND_API void zend_hash_internal_pointer_end_ex(HashTable *ht, HashPosition *pos
/* Copying, merging and sorting */
ZEND_API void zend_hash_copy(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size);
ZEND_API void zend_hash_merge(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size, int overwrite);
ZEND_API void zend_hash_merge_ex(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, uint size, zend_bool (*pReplaceOrig)(void *orig, void *p_new));
ZEND_API int zend_hash_sort(HashTable *ht, sort_func_t sort_func, compare_func_t compare_func, int renumber);
ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t compar, zend_bool ordered);
ZEND_API int zend_hash_minmax(HashTable *ht, int (*compar)(const void *, const void *), int flag, void **pData);
+3 -2
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -19,7 +19,7 @@
#include "zend.h"
#include "zend-parser.h"
#include "zend_language_parser.h"
#include "zend_compile.h"
#include "zend_highlight.h"
#include "zend_ptr_stack.h"
@@ -149,6 +149,7 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
case T_OPEN_TAG_WITH_ECHO:
case T_CLOSE_TAG:
case T_WHITESPACE:
case T_COMMENT:
break;
default:
efree(token.value.str.val);
+3 -3
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -40,8 +40,8 @@ typedef struct _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 int highlight_file(char *filename, zend_syntax_highlighter_ini *syntax_highlighter_ini);
ZEND_API int highlight_string(zval *str, zend_syntax_highlighter_ini *syntax_highlighter_ini, char *str_name);
ZEND_API void zend_html_putc(char c);
ZEND_API void zend_html_puts(char *s, uint len);
END_EXTERN_C()
+2 -2
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -22,7 +22,7 @@
#include "zend.h"
#include "zend-parser.h"
#include "zend_language_parser.h"
#include "zend_compile.h"
#include "zend_indent.h"
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
+499
View File
@@ -0,0 +1,499 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include <stdlib.h>
#include "zend.h"
#include "zend_API.h"
#include "zend_ini.h"
#include "zend_alloc.h"
#include "zend_operators.h"
static HashTable *registered_zend_ini_directives;
/*
* hash_apply functions
*/
static int zend_remove_ini_entries(zend_ini_entry *ini_entry, int *module_number)
{
if (ini_entry->module_number == *module_number) {
return 1;
} else {
return 0;
}
}
static int zend_restore_ini_entry_cb(zend_ini_entry *ini_entry, int stage)
{
if (ini_entry->modified) {
if (ini_entry->on_modify) {
ini_entry->on_modify(ini_entry, ini_entry->orig_value, ini_entry->orig_value_length, ini_entry->mh_arg1, ini_entry->mh_arg2, ini_entry->mh_arg3, stage);
}
efree(ini_entry->value);
ini_entry->value = ini_entry->orig_value;
ini_entry->value_length = ini_entry->orig_value_length;
ini_entry->modified = 0;
ini_entry->orig_value = NULL;
ini_entry->orig_value_length = 0;
}
return 0;
}
/*
* Startup / shutdown
*/
ZEND_API int zend_ini_startup(ELS_D)
{
registered_zend_ini_directives = &EG(ini_directives);
if (zend_hash_init_ex(registered_zend_ini_directives, 100, NULL, NULL, 1, 0)==FAILURE) {
return FAILURE;
}
return SUCCESS;
}
ZEND_API int zend_ini_shutdown(ELS_D)
{
zend_hash_destroy(&EG(ini_directives));
return SUCCESS;
}
ZEND_API int zend_ini_deactivate(ELS_D)
{
zend_hash_apply_with_argument(&EG(ini_directives), (int (*)(void *, void *)) zend_restore_ini_entry_cb, (void *) ZEND_INI_STAGE_DEACTIVATE);
return SUCCESS;
}
ZEND_API int zend_copy_ini_directives(ELS_D)
{
zend_ini_entry ini_entry;
if (zend_hash_init_ex(&EG(ini_directives), registered_zend_ini_directives->nNumOfElements, NULL, NULL, 1, 0)==FAILURE) {
return FAILURE;
}
zend_hash_copy(&EG(ini_directives), registered_zend_ini_directives, NULL, &ini_entry, sizeof(zend_ini_entry));
zend_ini_refresh_caches(ZEND_INI_STAGE_STARTUP ELS_CC);
return SUCCESS;
}
static int ini_key_compare(const void *a, const void *b)
{
Bucket *f;
Bucket *s;
f = *((Bucket **) a);
s = *((Bucket **) b);
if (f->nKeyLength==0 && s->nKeyLength==0) { /* both numeric */
return ZEND_NORMALIZE_BOOL(f->nKeyLength - s->nKeyLength);
} else if (f->nKeyLength==0) { /* f is numeric, s is not */
return -1;
} else if (s->nKeyLength==0) { /* s is numeric, f is not */
return 1;
} else { /* both strings */
return zend_binary_strcasecmp(f->arKey, f->nKeyLength, s->arKey, s->nKeyLength);
}
}
ZEND_API void zend_ini_sort_entries(ELS_D)
{
zend_hash_sort(&EG(ini_directives), qsort, ini_key_compare, 0);
}
/*
* Registration / unregistration
*/
ZEND_API int zend_register_ini_entries(zend_ini_entry *ini_entry, int module_number)
{
zend_ini_entry *p = ini_entry;
zend_ini_entry *hashed_ini_entry;
zval default_value;
while (p->name) {
p->module_number = module_number;
if (zend_hash_add(registered_zend_ini_directives, p->name, p->name_length, p, sizeof(zend_ini_entry), (void **) &hashed_ini_entry)==FAILURE) {
zend_unregister_ini_entries(module_number);
return FAILURE;
}
if ((zend_get_configuration_directive(p->name, p->name_length, &default_value))==SUCCESS) {
if (!hashed_ini_entry->on_modify
|| hashed_ini_entry->on_modify(hashed_ini_entry, default_value.value.str.val, default_value.value.str.len, hashed_ini_entry->mh_arg1, hashed_ini_entry->mh_arg2, hashed_ini_entry->mh_arg3, ZEND_INI_STAGE_STARTUP)==SUCCESS) {
hashed_ini_entry->value = default_value.value.str.val;
hashed_ini_entry->value_length = default_value.value.str.len;
}
} else {
if (hashed_ini_entry->on_modify) {
hashed_ini_entry->on_modify(hashed_ini_entry, hashed_ini_entry->value, hashed_ini_entry->value_length, hashed_ini_entry->mh_arg1, hashed_ini_entry->mh_arg2, hashed_ini_entry->mh_arg3, ZEND_INI_STAGE_STARTUP);
}
}
p++;
}
return SUCCESS;
}
ZEND_API void zend_unregister_ini_entries(int module_number)
{
zend_hash_apply_with_argument(registered_zend_ini_directives, (int (*)(void *, void *)) zend_remove_ini_entries, (void *) &module_number);
}
static int zend_ini_refresh_cache(zend_ini_entry *p, int stage)
{
if (p->on_modify) {
p->on_modify(p, p->value, p->value_length, p->mh_arg1, p->mh_arg2, p->mh_arg3, stage);
}
return 0;
}
ZEND_API void zend_ini_refresh_caches(int stage ELS_DC)
{
zend_hash_apply_with_argument(&EG(ini_directives), (int (*)(void *, void *)) zend_ini_refresh_cache, (void *)(long) stage);
}
ZEND_API int zend_alter_ini_entry(char *name, uint name_length, char *new_value, uint new_value_length, int modify_type, int stage)
{
zend_ini_entry *ini_entry;
char *duplicate;
ELS_FETCH();
if (zend_hash_find(&EG(ini_directives), name, name_length, (void **) &ini_entry)==FAILURE) {
return FAILURE;
}
if (!(ini_entry->modifyable & modify_type)) {
return FAILURE;
}
duplicate = estrndup(new_value, new_value_length);
if (!ini_entry->on_modify
|| ini_entry->on_modify(ini_entry, duplicate, new_value_length, ini_entry->mh_arg1, ini_entry->mh_arg2, ini_entry->mh_arg3, stage)==SUCCESS) {
if (!ini_entry->modified) {
ini_entry->orig_value = ini_entry->value;
ini_entry->orig_value_length = ini_entry->value_length;
} else { /* we already changed the value, free the changed value */
efree(ini_entry->value);
}
ini_entry->value = duplicate;
ini_entry->value_length = new_value_length;
ini_entry->modified = 1;
} else {
efree(duplicate);
}
return SUCCESS;
}
ZEND_API int zend_restore_ini_entry(char *name, uint name_length, int stage)
{
zend_ini_entry *ini_entry;
ELS_FETCH();
if (zend_hash_find(&EG(ini_directives), name, name_length, (void **) &ini_entry)==FAILURE) {
return FAILURE;
}
zend_restore_ini_entry_cb(ini_entry, stage);
return SUCCESS;
}
ZEND_API int zend_ini_register_displayer(char *name, uint name_length, void (*displayer)(zend_ini_entry *ini_entry, int type))
{
zend_ini_entry *ini_entry;
if (zend_hash_find(registered_zend_ini_directives, name, name_length, (void **) &ini_entry)==FAILURE) {
return FAILURE;
}
ini_entry->displayer = displayer;
return SUCCESS;
}
/*
* Data retrieval
*/
ZEND_API long zend_ini_long(char *name, uint name_length, int orig)
{
zend_ini_entry *ini_entry;
ELS_FETCH();
if (zend_hash_find(&EG(ini_directives), name, name_length, (void **) &ini_entry)==SUCCESS) {
if (orig && ini_entry->modified) {
return (ini_entry->orig_value ? strtol(ini_entry->orig_value, NULL, 0) : 0);
} else if (ini_entry->value) {
return strtol(ini_entry->value, NULL, 0);
}
}
return 0;
}
ZEND_API double zend_ini_double(char *name, uint name_length, int orig)
{
zend_ini_entry *ini_entry;
ELS_FETCH();
if (zend_hash_find(&EG(ini_directives), name, name_length, (void **) &ini_entry)==SUCCESS) {
if (orig && ini_entry->modified) {
return (double) (ini_entry->orig_value ? strtod(ini_entry->orig_value, NULL) : 0.0);
} else if (ini_entry->value) {
return (double) strtod(ini_entry->value, NULL);
}
}
return 0.0;
}
ZEND_API char *zend_ini_string(char *name, uint name_length, int orig)
{
zend_ini_entry *ini_entry;
ELS_FETCH();
if (zend_hash_find(&EG(ini_directives), name, name_length, (void **) &ini_entry)==SUCCESS) {
if (orig && ini_entry->modified) {
return ini_entry->orig_value;
} else {
return ini_entry->value;
}
}
return "";
}
zend_ini_entry *get_ini_entry(char *name, uint name_length)
{
zend_ini_entry *ini_entry;
ELS_FETCH();
if (zend_hash_find(&EG(ini_directives), name, name_length, (void **) &ini_entry)==SUCCESS) {
return ini_entry;
} else {
return NULL;
}
}
static void zend_ini_displayer_cb(zend_ini_entry *ini_entry, int type)
{
if (ini_entry->displayer) {
ini_entry->displayer(ini_entry, type);
} else {
char *display_string;
uint display_string_length;
if (type==ZEND_INI_DISPLAY_ORIG && ini_entry->modified) {
if (ini_entry->orig_value) {
display_string = ini_entry->orig_value;
display_string_length = ini_entry->orig_value_length;
} else {
display_string = "<i>no value</i>";
display_string_length = sizeof("<i>no value</i>")-1;
}
} else if (ini_entry->value && ini_entry->value[0]) {
display_string = ini_entry->value;
display_string_length = ini_entry->value_length;
} else {
display_string = "<i>no value</i>";
display_string_length = sizeof("<i>no value</i>")-1;
}
ZEND_WRITE(display_string, display_string_length);
}
}
ZEND_INI_DISP(zend_ini_boolean_displayer_cb)
{
int value;
if (type==ZEND_INI_DISPLAY_ORIG && ini_entry->modified) {
value = (ini_entry->orig_value ? atoi(ini_entry->orig_value) : 0);
} else if (ini_entry->value) {
value = atoi(ini_entry->value);
} else {
value = 0;
}
if (value) {
ZEND_PUTS("On");
} else {
ZEND_PUTS("Off");
}
}
ZEND_INI_DISP(zend_ini_color_displayer_cb)
{
char *value;
if (type==ZEND_INI_DISPLAY_ORIG && ini_entry->modified) {
value = ini_entry->orig_value;
} else if (ini_entry->value) {
value = ini_entry->value;
} else {
value = NULL;
}
if (value) {
zend_printf("<font color=\"%s\">%s</font>", value, value);
} else {
ZEND_PUTS("<i>no value</i>;");
}
}
ZEND_INI_DISP(display_link_numbers)
{
char *value;
if (type==ZEND_INI_DISPLAY_ORIG && ini_entry->modified) {
value = ini_entry->orig_value;
} else if (ini_entry->value) {
value = ini_entry->value;
} else {
value = NULL;
}
if (value) {
if (atoi(value)==-1) {
ZEND_PUTS("Unlimited");
} else {
zend_printf("%s", value);
}
}
}
/* Standard message handlers */
ZEND_API ZEND_INI_MH(OnUpdateBool)
{
zend_bool *p;
#ifndef ZTS
char *base = (char *) mh_arg2;
#else
char *base;
base = (char *) ts_resource(*((int *) mh_arg2));
#endif
p = (zend_bool *) (base+(size_t) mh_arg1);
*p = (zend_bool) atoi(new_value);
return SUCCESS;
}
ZEND_API ZEND_INI_MH(OnUpdateInt)
{
long *p;
#ifndef ZTS
char *base = (char *) mh_arg2;
#else
char *base;
base = (char *) ts_resource(*((int *) mh_arg2));
#endif
p = (long *) (base+(size_t) mh_arg1);
*p = zend_atoi(new_value, new_value_length);
return SUCCESS;
}
ZEND_API ZEND_INI_MH(OnUpdateReal)
{
double *p;
#ifndef ZTS
char *base = (char *) mh_arg2;
#else
char *base;
base = (char *) ts_resource(*((int *) mh_arg2));
#endif
p = (double *) (base+(size_t) mh_arg1);
*p = strtod(new_value, NULL);
return SUCCESS;
}
ZEND_API ZEND_INI_MH(OnUpdateString)
{
char **p;
#ifndef ZTS
char *base = (char *) mh_arg2;
#else
char *base;
base = (char *) ts_resource(*((int *) mh_arg2));
#endif
p = (char **) (base+(size_t) mh_arg1);
*p = new_value;
return SUCCESS;
}
ZEND_API ZEND_INI_MH(OnUpdateStringUnempty)
{
char **p;
#ifndef ZTS
char *base = (char *) mh_arg2;
#else
char *base;
base = (char *) ts_resource(*((int *) mh_arg2));
#endif
if (new_value && !new_value[0]) {
return FAILURE;
}
p = (char **) (base+(size_t) mh_arg1);
*p = new_value;
return SUCCESS;
}
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
+195
View File
@@ -0,0 +1,195 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_INI_H
#define ZEND_INI_H
#define ZEND_INI_USER (1<<0)
#define ZEND_INI_PERDIR (1<<1)
#define ZEND_INI_SYSTEM (1<<2)
#define ZEND_INI_ALL (ZEND_INI_USER|ZEND_INI_PERDIR|ZEND_INI_SYSTEM)
#ifndef XtOffsetOf
# if defined(CRAY) || (defined(__arm) && !defined(LINUX))
# ifdef __STDC__
# define XtOffset(p_type,field) _Offsetof(p_type,field)
# else
# ifdef CRAY2
# define XtOffset(p_type,field) \
(sizeof(int)*((unsigned int)&(((p_type)NULL)->field)))
# else /* !CRAY2 */
# define XtOffset(p_type,field) ((unsigned int)&(((p_type)NULL)->field))
# endif /* !CRAY2 */
# endif /* __STDC__ */
# else /* ! (CRAY || __arm) */
# define XtOffset(p_type,field) \
((long) (((char *) (&(((p_type)NULL)->field))) - ((char *) NULL)))
# endif /* !CRAY */
# ifdef offsetof
# define XtOffsetOf(s_type,field) offsetof(s_type,field)
# else
# define XtOffsetOf(s_type,field) XtOffset(s_type*,field)
# endif
#endif
typedef struct _zend_ini_entry zend_ini_entry;
#define ZEND_INI_MH(name) int name(zend_ini_entry *entry, char *new_value, uint new_value_length, void *mh_arg1, void *mh_arg2, void *mh_arg3, int stage)
#define ZEND_INI_DISP(name) void name(zend_ini_entry *ini_entry, int type)
struct _zend_ini_entry {
int module_number;
int modifyable;
char *name;
uint name_length;
ZEND_INI_MH((*on_modify));
void *mh_arg1;
void *mh_arg2;
void *mh_arg3;
char *value;
uint value_length;
char *orig_value;
uint orig_value_length;
int modified;
void (*displayer)(zend_ini_entry *ini_entry, int type);
};
ZEND_API int zend_ini_startup(ELS_D);
ZEND_API int zend_ini_shutdown(ELS_D);
ZEND_API int zend_ini_deactivate(ELS_D);
ZEND_API int zend_copy_ini_directives(ELS_D);
ZEND_API void zend_ini_sort_entries(ELS_D);
ZEND_API int zend_register_ini_entries(zend_ini_entry *ini_entry, int module_number);
ZEND_API void zend_unregister_ini_entries(int module_number);
ZEND_API void zend_ini_refresh_caches(int stage ELS_DC);
ZEND_API int zend_alter_ini_entry(char *name, uint name_length, char *new_value, uint new_value_length, int modify_type, int stage);
ZEND_API int zend_restore_ini_entry(char *name, uint name_length, int stage);
ZEND_API void display_ini_entries(zend_module_entry *module);
ZEND_API long zend_ini_long(char *name, uint name_length, int orig);
ZEND_API double zend_ini_double(char *name, uint name_length, int orig);
ZEND_API char *zend_ini_string(char *name, uint name_length, int orig);
zend_ini_entry *get_ini_entry(char *name, uint name_length);
ZEND_API int zend_ini_register_displayer(char *name, uint name_length, void (*displayer)(zend_ini_entry *ini_entry, int type));
ZEND_API ZEND_INI_DISP(zend_ini_boolean_displayer_cb);
ZEND_API ZEND_INI_DISP(zend_ini_color_displayer_cb);
ZEND_API ZEND_INI_DISP(display_link_numbers);
#define ZEND_INI_BEGIN() static zend_ini_entry ini_entries[] = {
#define ZEND_INI_END() { 0, 0, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, 0, 0, NULL } };
#define ZEND_INI_ENTRY3_EX(name, default_value, modifyable, on_modify, arg1, arg2, arg3, displayer) \
{ 0, modifyable, name, sizeof(name), on_modify, arg1, arg2, arg3, default_value, sizeof(default_value)-1, NULL, 0, 0, displayer },
#define ZEND_INI_ENTRY3(name, default_value, modifyable, on_modify, arg1, arg2, arg3) \
ZEND_INI_ENTRY3_EX(name, default_value, modifyable, on_modify, arg1, arg2, arg3, NULL)
#define ZEND_INI_ENTRY2_EX(name, default_value, modifyable, on_modify, arg1, arg2, displayer) \
ZEND_INI_ENTRY3_EX(name, default_value, modifyable, on_modify, arg1, arg2, NULL, displayer)
#define ZEND_INI_ENTRY2(name, default_value, modifyable, on_modify, arg1, arg2) \
ZEND_INI_ENTRY2_EX(name, default_value, modifyable, on_modify, arg1, arg2, NULL)
#define ZEND_INI_ENTRY1_EX(name, default_value, modifyable, on_modify, arg1, displayer) \
ZEND_INI_ENTRY3_EX(name, default_value, modifyable, on_modify, arg1, NULL, NULL, displayer)
#define ZEND_INI_ENTRY1(name, default_value, modifyable, on_modify, arg1) \
ZEND_INI_ENTRY1_EX(name, default_value, modifyable, on_modify, arg1, NULL)
#define ZEND_INI_ENTRY_EX(name, default_value, modifyable, on_modify, displayer) \
ZEND_INI_ENTRY3_EX(name, default_value, modifyable, on_modify, NULL, NULL, NULL, displayer)
#define ZEND_INI_ENTRY(name, default_value, modifyable, on_modify) \
ZEND_INI_ENTRY_EX(name, default_value, modifyable, on_modify, NULL)
#ifdef ZTS
#define STD_ZEND_INI_ENTRY(name, default_value, modifyable, on_modify, property_name, struct_type, struct_ptr) \
ZEND_INI_ENTRY2(name, default_value, modifyable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr##_id)
#define STD_ZEND_INI_ENTRY_EX(name, default_value, modifyable, on_modify, property_name, struct_type, struct_ptr, displayer) \
ZEND_INI_ENTRY2_EX(name, default_value, modifyable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr##_id, displayer)
#define STD_ZEND_INI_BOOLEAN(name, default_value, modifyable, on_modify, property_name, struct_type, struct_ptr) \
ZEND_INI_ENTRY3_EX(name, default_value, modifyable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr##_id, NULL, zend_ini_boolean_displayer_cb)
#else
#define STD_ZEND_INI_ENTRY(name, default_value, modifyable, on_modify, property_name, struct_type, struct_ptr) \
ZEND_INI_ENTRY2(name, default_value, modifyable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr)
#define STD_ZEND_INI_ENTRY_EX(name, default_value, modifyable, on_modify, property_name, struct_type, struct_ptr, displayer) \
ZEND_INI_ENTRY2_EX(name, default_value, modifyable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr, displayer)
#define STD_ZEND_INI_BOOLEAN(name, default_value, modifyable, on_modify, property_name, struct_type, struct_ptr) \
ZEND_INI_ENTRY3_EX(name, default_value, modifyable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr, NULL, zend_ini_boolean_displayer_cb)
#endif
#define INI_INT(name) zend_ini_long((name), sizeof(name), 0)
#define INI_FLT(name) zend_ini_double((name), sizeof(name), 0)
#define INI_STR(name) zend_ini_string((name), sizeof(name), 0)
#define INI_BOOL(name) ((zend_bool) INI_INT(name))
#define INI_ORIG_INT(name) zend_ini_long((name), sizeof(name), 1)
#define INI_ORIG_FLT(name) zend_ini_double((name), sizeof(name), 1)
#define INI_ORIG_STR(name) zend_ini_string((name), sizeof(name), 1)
#define INI_ORIG_BOOL(name) ((zend_bool) INI_ORIG_INT(name))
#define REGISTER_INI_ENTRIES() zend_register_ini_entries(ini_entries, module_number)
#define UNREGISTER_INI_ENTRIES() zend_unregister_ini_entries(module_number)
#define DISPLAY_INI_ENTRIES() display_ini_entries(zend_module)
#define REGISTER_INI_DISPLAYER(name, displayer) zend_ini_register_displayer((name), sizeof(name), displayer)
#define REGISTER_INI_BOOLEAN(name) REGISTER_INI_DISPLAYER(name, zend_ini_boolean_displayer_cb)
/* Standard message handlers */
ZEND_API ZEND_INI_MH(OnUpdateBool);
ZEND_API ZEND_INI_MH(OnUpdateInt);
ZEND_API ZEND_INI_MH(OnUpdateReal);
ZEND_API ZEND_INI_MH(OnUpdateString);
ZEND_API ZEND_INI_MH(OnUpdateStringUnempty);
#define ZEND_INI_DISPLAY_ORIG 1
#define ZEND_INI_DISPLAY_ACTIVE 2
#define ZEND_INI_STAGE_STARTUP (1<<0)
#define ZEND_INI_STAGE_SHUTDOWN (1<<1)
#define ZEND_INI_STAGE_ACTIVATE (1<<2)
#define ZEND_INI_STAGE_DEACTIVATE (1<<3)
#define ZEND_INI_STAGE_RUNTIME (1<<4)
/* INI parsing engine */
typedef void (*zend_ini_parser_cb_t)(zval *arg1, zval *arg2, int callback_type, void *arg);
int zend_parse_ini_file(zend_file_handle *fh, zend_bool unbuffered_errors, zend_ini_parser_cb_t ini_parser_cb, void *arg);
#define ZEND_INI_PARSER_ENTRY 1
#define ZEND_INI_PARSER_SECTION 2
#endif /* ZEND_INI_H */
+231
View File
@@ -0,0 +1,231 @@
%{
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
#define DEBUG_CFG_PARSER 0
#include "zend.h"
#include "zend_API.h"
#include "zend_ini.h"
#include "zend_constants.h"
#include "zend_ini_scanner.h"
#include "zend_extensions.h"
#if WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <winbase.h>
#endif
typedef struct _zend_ini_parser_param {
zend_ini_parser_cb_t ini_parser_cb;
void *arg;
} zend_ini_parser_param;
#define YYSTYPE zval
#define YYPARSE_PARAM ini_parser_param
#define ZEND_INI_PARSER_CB ((zend_ini_parser_param *) ini_parser_param)->ini_parser_cb
#define ZEND_INI_PARSER_ARG ((zend_ini_parser_param *) ini_parser_param)->arg
int ini_lex(zval *ini_lval);
int ini_parse(void *ini_parser_param);
zval yylval;
#ifndef ZTS
extern int ini_lex(zval *ini_lval);
extern FILE *ini_in;
extern int ini_lineno;
extern void init_cfg_scanner(void);
#endif
void zend_ini_do_op(char type, zval *result, zval *op1, zval *op2)
{
int i_result;
int i_op1, i_op2;
char str_result[MAX_LENGTH_OF_LONG];
i_op1 = atoi(op1->value.str.val);
free(op1->value.str.val);
if (op2) {
i_op2 = atoi(op2->value.str.val);
free(op2->value.str.val);
} else {
i_op2 = 0;
}
switch (type) {
case '|':
i_result = i_op1 | i_op2;
break;
case '&':
i_result = i_op1 & i_op2;
break;
case '~':
i_result = ~i_op1;
break;
case '!':
i_result = !i_op1;
break;
default:
i_result = 0;
break;
}
result->value.str.len = zend_sprintf(str_result, "%d", i_result);
result->value.str.val = (char *) malloc(result->value.str.len+1);
memcpy(result->value.str.val, str_result, result->value.str.len);
result->value.str.val[result->value.str.len] = 0;
result->type = IS_STRING;
}
void zend_ini_get_constant(zval *result, zval *name)
{
zval z_constant;
if (zend_get_constant(name->value.str.val, name->value.str.len, &z_constant)) {
/* z_constant is emalloc()'d */
convert_to_string(&z_constant);
result->value.str.val = zend_strndup(z_constant.value.str.val, z_constant.value.str.len);
result->value.str.len = z_constant.value.str.len;
result->type = z_constant.type;
zval_dtor(&z_constant);
free(name->value.str.val);
} else {
*result = *name;
}
}
static void ini_error(char *str)
{
char *error_buf;
int error_buf_len;
char *currently_parsed_filename = zend_ini_scanner_get_filename();
CLS_FETCH();
error_buf_len = 128+strlen(currently_parsed_filename); /* should be more than enough */
error_buf = (char *) emalloc(error_buf_len);
sprintf(error_buf, "Error parsing %s on line %d\n", currently_parsed_filename, zend_ini_scanner_get_lineno());
if (CG(ini_parser_unbuffered_errors)) {
#ifdef PHP_WIN32
MessageBox(NULL, error_buf, "PHP Error", MB_OK|MB_TOPMOST|0x00200000L);
#else
fprintf(stderr, "PHP: %s", error_buf);
#endif
} else {
zend_error(E_CORE_WARNING, error_buf);
}
efree(error_buf);
}
int zend_parse_ini_file(zend_file_handle *fh, zend_bool unbuffered_errors, zend_ini_parser_cb_t ini_parser_cb, void *arg)
{
zend_ini_parser_param ini_parser_param;
int retval;
CLS_FETCH();
ini_parser_param.ini_parser_cb = ini_parser_cb;
ini_parser_param.arg = arg;
if (zend_ini_open_file_for_scanning(fh)==FAILURE) {
return FAILURE;
}
CG(ini_parser_unbuffered_errors) = unbuffered_errors;
retval = ini_parse(&ini_parser_param);
zend_ini_close_file(fh);
if (retval==0) {
return SUCCESS;
} else {
return FAILURE;
}
}
%}
%pure_parser
%token TC_STRING
%token TC_ENCAPSULATED_STRING
%token SECTION
%token CFG_TRUE
%token CFG_FALSE
%left '|' '&'
%right '~' '!'
%%
statement_list:
statement_list statement
| /* empty */
;
statement:
TC_STRING '=' string_or_value {
#if DEBUG_CFG_PARSER
printf("'%s' = '%s'\n", $1.value.str.val, $3.value.str.val);
#endif
ZEND_INI_PARSER_CB(&$1, &$3, ZEND_INI_PARSER_ENTRY, ZEND_INI_PARSER_ARG);
free($1.value.str.val);
free($3.value.str.val);
}
| TC_STRING { ZEND_INI_PARSER_CB(&$1, NULL, ZEND_INI_PARSER_ENTRY, ZEND_INI_PARSER_ARG); free($1.value.str.val); }
| SECTION { ZEND_INI_PARSER_CB(&$1, NULL, ZEND_INI_PARSER_SECTION, ZEND_INI_PARSER_ARG); free($1.value.str.val); }
| '\n'
;
string_or_value:
expr { $$ = $1; }
| TC_ENCAPSULATED_STRING { $$ = $1; }
| CFG_TRUE { $$ = $1; }
| CFG_FALSE { $$ = $1; }
| '\n' { $$.value.str.val = strdup(""); $$.value.str.len=0; $$.type = IS_STRING; }
| '\0' { $$.value.str.val = strdup(""); $$.value.str.len=0; $$.type = IS_STRING; }
;
expr:
constant_string { $$ = $1; }
| expr '|' expr { zend_ini_do_op('|', &$$, &$1, &$3); }
| expr '&' expr { zend_ini_do_op('&', &$$, &$1, &$3); }
| '~' expr { zend_ini_do_op('~', &$$, &$2, NULL); }
| '!' expr { zend_ini_do_op('!', &$$, &$2, NULL); }
| '(' expr ')' { $$ = $2; }
;
constant_string:
TC_STRING { zend_ini_get_constant(&$$, &$1); }
;
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
+24
View File
@@ -0,0 +1,24 @@
#ifndef _ZEND_INI_SCANNER_H
#define _ZEND_INI_SCANNER_H
#if defined(ZTS) && defined(__cplusplus)
class ZendIniFlexLexer : public yyFlexLexer
{
public:
virtual ~ZendIniFlexLexer();
int lex_scan(zval *zendlval);
void BeginState(int state);
char *filename;
};
#endif /* ZTS && __cplusplus */
BEGIN_EXTERN_C()
int zend_ini_scanner_get_lineno(void);
char *zend_ini_scanner_get_filename(void);
int zend_ini_open_file_for_scanning(zend_file_handle *fh);
void zend_ini_close_file(zend_file_handle *fh);
int ini_lex(zval *ini_lval);
END_EXTERN_C()
#endif /* _ZEND_INI_SCANNER_H */
+286
View File
@@ -0,0 +1,286 @@
%{
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include "zend.h"
#include "zend_globals.h"
#include "zend_ini_parser.h"
#include "zend_ini_scanner.h"
#ifdef ZTS
# ifdef HAVE_STDIOSTR_H
# include <stdiostr.h>
# endif
# ifdef HAVE_STDIOSTREAM_H
# include <stdiostream.h>
# endif
# ifdef ZEND_WIN32
# include <strstrea.h>
# else
# include <strstream.h>
# endif
#endif
#undef YYSTYPE
#define YYSTYPE zval
#ifdef ZTS
#define YY_DECL int ZendIniFlexLexer::lex_scan(zval *ini_lval)
#else
#define YY_DECL int ini_lex(zval *ini_lval)
#endif
#include "zend_istdiostream.h"
#ifndef ZTS
static char *ini_filename;
void init_ini_scanner()
{
ini_lineno=1;
}
int zend_ini_scanner_get_lineno()
{
return ini_lineno;
}
char *zend_ini_scanner_get_filename()
{
return ini_filename;
}
#else /* ZTS */
int zend_ini_scanner_get_lineno()
{
CLS_FETCH();
return CG(ini_scanner)->lineno();
}
char *zend_ini_scanner_get_filename()
{
CLS_FETCH();
return CG(ini_scanner)->filename;
}
int ini_lex(zval *ini_lval)
{
CLS_FETCH();
return CG(ini_scanner)->lex_scan(ini_lval);
}
ZendIniFlexLexer::~ZendIniFlexLexer()
{
if (yy_start_stack) {
yy_flex_free(yy_start_stack);
}
}
int yyFlexLexer::yylex()
{
fprintf(stderr, "Error: yyFlexLexer::yylex() called\n");
return -1;
}
#endif
int zend_ini_open_file_for_scanning(zend_file_handle *fh)
{
FILE *fp;
CLS_FETCH();
switch (fh->type) {
case ZEND_HANDLE_FP:
fp = fh->handle.fp;
break;
case ZEND_HANDLE_FILENAME:
fp = zend_fopen(fh->filename, NULL);
fh->type = ZEND_HANDLE_FP;
break;
default:
return FAILURE;
}
#ifdef ZTS
if (!fp) {
return FAILURE;
}
fh->handle.is = new istdiostream(fp);
fh->type = ZEND_HANDLE_STDIOSTREAM;
CG(ini_scanner) = new ZendIniFlexLexer;
CG(ini_scanner)->switch_streams(fh->handle.is, &cout);
CG(ini_scanner)->filename = fh->filename;
#else
init_ini_scanner();
yyin = fp;
yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE));
ini_filename = fh->filename;
#endif
return SUCCESS;
}
void zend_ini_close_file(zend_file_handle *fh)
{
switch (fh->type) {
case ZEND_HANDLE_FP:
fclose(fh->handle.fp);
break;
#ifdef ZTS
case ZEND_HANDLE_STDIOSTREAM: {
CLS_FETCH();
delete CG(ini_scanner);
}
break;
#endif
}
}
%}
%option noyywrap
%option yylineno
%%
<INITIAL>[ ]*("true"|"on"|"yes")[ ]* {
ini_lval->value.str.val = zend_strndup("1",1);
ini_lval->value.str.len = 1;
ini_lval->type = IS_STRING;
return CFG_TRUE;
}
<INITIAL>[ ]*("false"|"off"|"no"|"none")[ ]* {
ini_lval->value.str.val = zend_strndup("",0);
ini_lval->value.str.len = 0;
ini_lval->type = IS_STRING;
return CFG_FALSE;
}
<INITIAL>[[][^[]+[\]]([\n]?|"\r\n"?) {
/* SECTION */
/* eat trailng ] */
while (yyleng>0 && (yytext[yyleng-1]=='\n' || yytext[yyleng-1]=='\r' || yytext[yyleng-1]==']')) {
yyleng--;
yytext[yyleng]=0;
}
/* eat leading [ */
yytext++;
yyleng--;
ini_lval->value.str.val = zend_strndup(yytext,yyleng);
ini_lval->value.str.len = yyleng;
ini_lval->type = IS_STRING;
return SECTION;
}
<INITIAL>["][^\n\r"]*["] {
/* ENCAPSULATED TC_STRING */
/* eat trailing " */
yytext[yyleng-1]=0;
/* eat leading " */
yytext++;
ini_lval->value.str.val = zend_strndup(yytext, yyleng - 2);
ini_lval->value.str.len = yyleng - 2;
ini_lval->type = IS_STRING;
return TC_ENCAPSULATED_STRING;
}
<INITIAL>[&|~()!] {
return yytext[0];
}
<INITIAL>[^=\n\r\t;|&~()!"]+ {
/* STRING */
register int i;
/* eat trailing whitespace */
for (i=yyleng-1; i>=0; i--) {
if (yytext[i]==' ' || yytext[i]=='\t') {
yytext[i]=0;
yyleng--;
} else {
break;
}
}
/* eat leading whitespace */
while (yytext[0]) {
if (yytext[0]==' ' || yytext[0]=='\t') {
yytext++;
yyleng--;
} else {
break;
}
}
if (yyleng!=0) {
ini_lval->value.str.val = zend_strndup(yytext,yyleng);
ini_lval->value.str.len = yyleng;
ini_lval->type = IS_STRING;
return TC_STRING;
} else {
/* whitespace */
}
}
<INITIAL>[=\n] {
return yytext[0];
}
<INITIAL>"\r\n" {
return '\n';
}
<INITIAL>[;][^\r\n]*[\r\n]? {
/* comment */
return '\n';
}
<INITIAL>[ \t] {
/* eat whitespace */
}
<INITIAL>. {
#if DEBUG
php_error(E_NOTICE,"Unexpected character on line %d: '%s' (ASCII %d)\n",yylineno,yytext,yytext[0]);
#endif
}
<<EOF>> {
yy_delete_buffer(YY_CURRENT_BUFFER);
yyterminate();
}
+15
View File
@@ -0,0 +1,15 @@
#ifndef _ZEND_STDIOSTREAM
#define _ZEND_STDIOSTREAM
#if defined(ZTS) && !defined(HAVE_CLASS_ISTDIOSTREAM)
class istdiostream : public istream
{
private:
stdiobuf _file;
public:
istdiostream (FILE* __f) : istream(), _file(__f) { init(&_file); }
stdiobuf* rdbuf()/* const */ { return &_file; }
};
#endif
#endif
+726
View File
@@ -0,0 +1,726 @@
%{
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
/*
* LALR shift/reduce conflicts and how they are resolved:
*
* - 2 shift/reduce conflicts due to the dangeling elseif/else ambiguity. Solved by shift.
* - 1 shift/reduce conflict due to arrays within encapsulated strings. Solved by shift.
* - 1 shift/reduce conflict due to objects within encapsulated strings. Solved by shift.
*
*/
#include "zend_compile.h"
#include "zend.h"
#include "zend_list.h"
#include "zend_globals.h"
#include "zend_API.h"
#define YYERROR_VERBOSE
#define YYSTYPE znode
#ifdef ZTS
# define YYPARSE_PARAM compiler_globals
# define YYLEX_PARAM compiler_globals
#endif
%}
%pure_parser
%expect 4
%left T_INCLUDE T_INCLUDE_ONCE T_EVAL T_REQUIRE T_REQUIRE_ONCE
%left ','
%left T_LOGICAL_OR
%left T_LOGICAL_XOR
%left T_LOGICAL_AND
%right T_PRINT
%left '=' T_PLUS_EQUAL T_MINUS_EQUAL T_MUL_EQUAL T_DIV_EQUAL T_CONCAT_EQUAL T_MOD_EQUAL T_AND_EQUAL T_OR_EQUAL T_XOR_EQUAL T_SL_EQUAL T_SR_EQUAL
%left '?' ':'
%left T_BOOLEAN_OR
%left T_BOOLEAN_AND
%left '|'
%left '^'
%left '&'
%nonassoc T_IS_EQUAL T_IS_NOT_EQUAL T_IS_IDENTICAL T_IS_NOT_IDENTICAL
%nonassoc '<' T_IS_SMALLER_OR_EQUAL '>' T_IS_GREATER_OR_EQUAL
%left T_SL T_SR
%left '+' '-' '.'
%left '*' '/' '%'
%right '!' '~' T_INC T_DEC T_INT_CAST T_DOUBLE_CAST T_STRING_CAST T_ARRAY_CAST T_OBJECT_CAST T_BOOL_CAST T_UNSET_CAST '@'
%right '['
%nonassoc T_NEW
%token T_EXIT
%token T_IF
%left T_ELSEIF
%left T_ELSE
%left T_ENDIF
%token T_LNUMBER
%token T_DNUMBER
%token T_STRING
%token T_STRING_VARNAME
%token T_VARIABLE
%token T_NUM_STRING
%token T_INLINE_HTML
%token T_CHARACTER
%token T_BAD_CHARACTER
%token T_ENCAPSED_AND_WHITESPACE
%token T_CONSTANT_ENCAPSED_STRING
%token T_ECHO
%token T_DO
%token T_WHILE
%token T_ENDWHILE
%token T_FOR
%token T_ENDFOR
%token T_FOREACH
%token T_ENDFOREACH
%token T_DECLARE
%token T_ENDDECLARE
%token T_AS
%token T_SWITCH
%token T_ENDSWITCH
%token T_CASE
%token T_DEFAULT
%token T_BREAK
%token T_CONTINUE
%token T_OLD_FUNCTION
%token T_FUNCTION
%token T_CONST
%token T_RETURN
%token T_USE
%token T_GLOBAL
%token T_STATIC
%token T_VAR
%token T_UNSET
%token T_ISSET
%token T_EMPTY
%token T_CLASS
%token T_EXTENDS
%token T_OBJECT_OPERATOR
%token T_DOUBLE_ARROW
%token T_LIST
%token T_ARRAY
%token T_LINE
%token T_FILE
%token T_COMMENT
%token T_ML_COMMENT
%token T_OPEN_TAG
%token T_OPEN_TAG_WITH_ECHO
%token T_CLOSE_TAG
%token T_WHITESPACE
%token T_START_HEREDOC
%token T_END_HEREDOC
%token T_DOLLAR_OPEN_CURLY_BRACES
%token T_CURLY_OPEN
%token T_PAAMAYIM_NEKUDOTAYIM
%% /* Rules */
start:
top_statement_list
;
top_statement_list:
top_statement_list { zend_do_extended_info(CLS_C); } top_statement { HANDLE_INTERACTIVE(); }
| /* empty */
;
top_statement:
statement
| declaration_statement { zend_do_early_binding(CLS_C); }
;
inner_statement_list:
inner_statement_list { zend_do_extended_info(CLS_C); } inner_statement { HANDLE_INTERACTIVE(); }
| /* empty */
;
inner_statement:
statement
| declaration_statement
;
statement:
unticked_statement { zend_do_ticks(CLS_C); }
;
unticked_statement:
'{' inner_statement_list '}'
| T_IF '(' expr ')' { zend_do_if_cond(&$3, &$4 CLS_CC); } statement { zend_do_if_after_statement(&$4, 1 CLS_CC); } elseif_list else_single { zend_do_if_end(CLS_C); }
| T_IF '(' expr ')' ':' { zend_do_if_cond(&$3, &$4 CLS_CC); } inner_statement_list { zend_do_if_after_statement(&$4, 1 CLS_CC); } new_elseif_list new_else_single T_ENDIF ';' { zend_do_if_end(CLS_C); }
| T_WHILE '(' { $1.u.opline_num = get_next_op_number(CG(active_op_array)); } expr ')' { zend_do_while_cond(&$4, &$5 CLS_CC); } while_statement { zend_do_while_end(&$1, &$5 CLS_CC); }
| T_DO { $1.u.opline_num = get_next_op_number(CG(active_op_array)); zend_do_do_while_begin(CLS_C); } statement T_WHILE '(' { $5.u.opline_num = get_next_op_number(CG(active_op_array)); } expr ')' ';' { zend_do_do_while_end(&$1, &$5, &$7 CLS_CC); }
| T_FOR
'('
for_expr
';' { zend_do_free(&$3 CLS_CC); $4.u.opline_num = get_next_op_number(CG(active_op_array)); }
for_expr
';' { zend_do_extended_info(CLS_C); zend_do_for_cond(&$6, &$7 CLS_CC); }
for_expr
')' { zend_do_free(&$9 CLS_CC); zend_do_for_before_statement(&$4, &$7 CLS_CC); }
for_statement { zend_do_for_end(&$7 CLS_CC); }
| T_SWITCH '(' expr ')' { zend_do_switch_cond(&$3 CLS_CC); } switch_case_list { zend_do_switch_end(&$6 CLS_CC); }
| T_BREAK ';' { zend_do_brk_cont(ZEND_BRK, NULL CLS_CC); }
| T_BREAK expr ';' { zend_do_brk_cont(ZEND_BRK, &$2 CLS_CC); }
| T_CONTINUE ';' { zend_do_brk_cont(ZEND_CONT, NULL CLS_CC); }
| T_CONTINUE expr ';' { zend_do_brk_cont(ZEND_CONT, &$2 CLS_CC); }
| T_RETURN ';' { zend_do_return(NULL, 0 CLS_CC); }
| T_RETURN expr_without_variable ';' { zend_do_return(&$2, 0 CLS_CC); }
| T_RETURN cvar ';' { zend_do_return(&$2, 1 CLS_CC); }
| T_GLOBAL global_var_list ';'
| T_STATIC static_var_list ';'
| T_ECHO echo_expr_list ';'
| T_INLINE_HTML { zend_do_echo(&$1 CLS_CC); }
| expr ';' { zend_do_free(&$1 CLS_CC); }
| T_USE use_filename ';' { zend_error(E_COMPILE_ERROR,"use: Not yet supported. Please use include_once() or require_once()"); zval_dtor(&$2.u.constant); }
| T_UNSET '(' unset_variables ')' ';'
| T_FOREACH '(' w_cvar T_AS { zend_do_foreach_begin(&$1, &$3, &$2, &$4, 1 CLS_CC); } w_cvar foreach_optional_arg ')' { zend_do_foreach_cont(&$6, &$7, &$4 CLS_CC); } foreach_statement { zend_do_foreach_end(&$1, &$2 CLS_CC); }
| T_FOREACH '(' expr_without_variable T_AS { zend_do_foreach_begin(&$1, &$3, &$2, &$4, 0 CLS_CC); } w_cvar foreach_optional_arg ')' { zend_do_foreach_cont(&$6, &$7, &$4 CLS_CC); } foreach_statement { zend_do_foreach_end(&$1, &$2 CLS_CC); }
| T_DECLARE { zend_do_declare_begin(CLS_C); } '(' declare_list ')' declare_statement { zend_do_declare_end(CLS_C); }
| ';' /* empty statement */
;
unset_variables:
unset_variable
| unset_variables ',' unset_variable
;
unset_variable:
cvar { zend_do_end_variable_parse(BP_VAR_UNSET, 0 CLS_CC); zend_do_unset(&$1 CLS_CC); }
;
use_filename:
T_CONSTANT_ENCAPSED_STRING { $$ = $1; }
| '(' T_CONSTANT_ENCAPSED_STRING ')' { $$ = $2; }
;
declaration_statement:
unticked_declaration_statement { zend_do_ticks(CLS_C); }
;
unticked_declaration_statement:
T_FUNCTION { $1.u.opline_num = CG(zend_lineno); } is_reference T_STRING { zend_do_begin_function_declaration(&$1, &$4, 0, $3.op_type CLS_CC); }
'(' parameter_list ')' '{' inner_statement_list '}' { zend_do_end_function_declaration(&$1 CLS_CC); }
| T_OLD_FUNCTION { $1.u.opline_num = CG(zend_lineno); } is_reference T_STRING { zend_do_begin_function_declaration(&$1, &$4, 0, $3.op_type CLS_CC); }
parameter_list '(' inner_statement_list ')' ';' { zend_do_end_function_declaration(&$1 CLS_CC); }
| T_CLASS T_STRING { zend_do_begin_class_declaration(&$2, NULL CLS_CC); } '{' class_statement_list '}' { zend_do_end_class_declaration(CLS_C); }
| T_CLASS T_STRING T_EXTENDS T_STRING { zend_do_begin_class_declaration(&$2, &$4 CLS_CC); } '{' class_statement_list '}' { zend_do_end_class_declaration(CLS_C); }
;
foreach_optional_arg:
/* empty */ { $$.op_type = IS_UNUSED; }
| T_DOUBLE_ARROW w_cvar { $$ = $2; }
;
for_statement:
statement
| ':' inner_statement_list T_ENDFOR ';'
;
foreach_statement:
statement
| ':' inner_statement_list T_ENDFOREACH ';'
;
declare_statement:
statement
| ':' inner_statement_list T_ENDDECLARE ';'
;
declare_list:
T_STRING '=' static_scalar { zend_do_declare_stmt(&$1, &$3 CLS_CC); }
| declare_list ',' T_STRING '=' static_scalar { zend_do_declare_stmt(&$3, &$5 CLS_CC); }
;
switch_case_list:
'{' case_list '}' { $$ = $2; }
| '{' ';' case_list '}' { $$ = $3; }
| ':' case_list T_ENDSWITCH ';' { $$ = $2; }
| ':' ';' case_list T_ENDSWITCH ';' { $$ = $3; }
;
case_list:
/* empty */ { $$.op_type = IS_UNUSED; }
| case_list T_CASE expr case_separator { zend_do_extended_info(CLS_C); zend_do_case_before_statement(&$1, &$2, &$3 CLS_CC); } inner_statement_list { zend_do_case_after_statement(&$$, &$2 CLS_CC); $$.op_type = IS_CONST }
| case_list T_DEFAULT case_separator { zend_do_extended_info(CLS_C); zend_do_default_before_statement(&$1, &$2 CLS_CC); } inner_statement_list { zend_do_case_after_statement(&$$, &$2 CLS_CC); $$.op_type = IS_CONST; }
;
case_separator:
':'
| ';'
;
while_statement:
statement
| ':' inner_statement_list T_ENDWHILE ';'
;
elseif_list:
/* empty */
| elseif_list T_ELSEIF '(' expr ')' { zend_do_if_cond(&$4, &$5 CLS_CC); } statement { zend_do_if_after_statement(&$5, 0 CLS_CC); }
;
new_elseif_list:
/* empty */
| new_elseif_list T_ELSEIF '(' expr ')' ':' { zend_do_if_cond(&$4, &$5 CLS_CC); } inner_statement_list { zend_do_if_after_statement(&$5, 0 CLS_CC); }
;
else_single:
/* empty */
| T_ELSE statement
;
new_else_single:
/* empty */
| T_ELSE ':' inner_statement_list
;
parameter_list:
non_empty_parameter_list
| /* empty */
;
non_empty_parameter_list:
T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$1, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; INIT_PZVAL(&$$.u.constant); zend_do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
| '&' T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$2, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; INIT_PZVAL(&$$.u.constant); zend_do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_FORCE CLS_CC); }
| T_CONST T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$2, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; INIT_PZVAL(&$$.u.constant); zend_do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
| T_VARIABLE '=' static_scalar { znode tmp; fetch_simple_variable(&tmp, &$1, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; INIT_PZVAL(&$$.u.constant); zend_do_receive_arg(ZEND_RECV_INIT, &tmp, &$$, &$3, BYREF_NONE CLS_CC); }
| non_empty_parameter_list ',' T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$3, 0 CLS_CC); $$=$1; $$.u.constant.value.lval++; zend_do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
| non_empty_parameter_list ',' '&' T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$4, 0 CLS_CC); $$=$1; $$.u.constant.value.lval++; zend_do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_FORCE CLS_CC); }
| non_empty_parameter_list ',' T_CONST T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$4, 0 CLS_CC); $$=$1; $$.u.constant.value.lval++; zend_do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
| non_empty_parameter_list ',' T_VARIABLE '=' static_scalar { znode tmp; fetch_simple_variable(&tmp, &$3, 0 CLS_CC); $$=$1; $$.u.constant.value.lval++; zend_do_receive_arg(ZEND_RECV_INIT, &tmp, &$$, &$5, BYREF_NONE CLS_CC); }
;
function_call_parameter_list:
non_empty_function_call_parameter_list { $$ = $1; }
| /* empty */ { $$.u.constant.value.lval = 0; }
;
non_empty_function_call_parameter_list:
expr_without_variable { $$.u.constant.value.lval = 1; zend_do_pass_param(&$1, ZEND_SEND_VAL, $$.u.constant.value.lval CLS_CC); }
| cvar { $$.u.constant.value.lval = 1; zend_do_pass_param(&$1, ZEND_SEND_VAR, $$.u.constant.value.lval CLS_CC); }
| '&' w_cvar { $$.u.constant.value.lval = 1; zend_do_pass_param(&$2, ZEND_SEND_REF, $$.u.constant.value.lval CLS_CC); }
| non_empty_function_call_parameter_list ',' expr_without_variable { $$.u.constant.value.lval=$1.u.constant.value.lval+1; zend_do_pass_param(&$3, ZEND_SEND_VAL, $$.u.constant.value.lval CLS_CC); }
| non_empty_function_call_parameter_list ',' cvar { $$.u.constant.value.lval=$1.u.constant.value.lval+1; zend_do_pass_param(&$3, ZEND_SEND_VAR, $$.u.constant.value.lval CLS_CC); }
| non_empty_function_call_parameter_list ',' '&' w_cvar { $$.u.constant.value.lval=$1.u.constant.value.lval+1; zend_do_pass_param(&$4, ZEND_SEND_REF, $$.u.constant.value.lval CLS_CC); }
;
global_var_list:
global_var_list ',' global_var { zend_do_fetch_global_or_static_variable(&$3, NULL, ZEND_FETCH_GLOBAL CLS_CC); }
| global_var { zend_do_fetch_global_or_static_variable(&$1, NULL, ZEND_FETCH_GLOBAL CLS_CC); }
;
global_var:
T_VARIABLE { $$ = $1; }
| '$' r_cvar { $$ = $2; }
| '$' '{' expr '}' { $$ = $3; }
;
static_var_list:
static_var_list ',' T_VARIABLE { zend_do_fetch_global_or_static_variable(&$3, NULL, ZEND_FETCH_STATIC CLS_CC); }
| static_var_list ',' T_VARIABLE '=' static_scalar { zend_do_fetch_global_or_static_variable(&$3, &$5, ZEND_FETCH_STATIC CLS_CC); }
| T_VARIABLE { zend_do_fetch_global_or_static_variable(&$1, NULL, ZEND_FETCH_STATIC CLS_CC); }
| T_VARIABLE '=' static_scalar { zend_do_fetch_global_or_static_variable(&$1, &$3, ZEND_FETCH_STATIC CLS_CC); }
;
class_statement_list:
class_statement_list class_statement
| /* empty */
;
class_statement:
T_VAR class_variable_decleration ';'
| T_FUNCTION { $1.u.opline_num = CG(zend_lineno); } is_reference T_STRING { zend_do_begin_function_declaration(&$1, &$4, 1, $3.op_type CLS_CC); } '('
parameter_list ')' '{' inner_statement_list '}' { zend_do_end_function_declaration(&$1 CLS_CC); }
| T_OLD_FUNCTION { $1.u.opline_num = CG(zend_lineno); } is_reference T_STRING { zend_do_begin_function_declaration(&$1, &$4, 1, $3.op_type CLS_CC); }
parameter_list '(' inner_statement_list ')' ';' { zend_do_end_function_declaration(&$1 CLS_CC); }
;
is_reference:
/* empty */ { $$.op_type = ZEND_RETURN_VAL; }
| '&' { $$.op_type = ZEND_RETURN_REF; }
class_variable_decleration:
class_variable_decleration ',' T_VARIABLE { zend_do_declare_property(&$3, NULL CLS_CC); }
| class_variable_decleration ',' T_VARIABLE '=' static_scalar { zend_do_declare_property(&$3, &$5 CLS_CC); }
| T_VARIABLE { zend_do_declare_property(&$1, NULL CLS_CC); }
| T_VARIABLE '=' static_scalar { zend_do_declare_property(&$1, &$3 CLS_CC); }
;
echo_expr_list:
| echo_expr_list ',' expr { zend_do_echo(&$3 CLS_CC); }
| expr { zend_do_echo(&$1 CLS_CC); }
;
for_expr:
/* empty */ { $$.op_type = IS_CONST; $$.u.constant.type = IS_BOOL; $$.u.constant.value.lval = 1; }
| non_empty_for_expr { $$ = $1; }
;
non_empty_for_expr:
non_empty_for_expr ',' { zend_do_free(&$1 CLS_CC); } expr { $$ = $4; }
| expr { $$ = $1; }
;
expr_without_variable:
T_LIST '(' { zend_do_list_init(CLS_C); } assignment_list ')' '=' expr { zend_do_list_end(&$$, &$7 CLS_CC); }
| cvar '=' expr { zend_do_end_variable_parse(BP_VAR_W, 0 CLS_CC); zend_do_assign(&$$, &$1, &$3 CLS_CC); }
| cvar '=' '&' w_cvar { zend_do_end_variable_parse(BP_VAR_W, 0 CLS_CC); zend_do_assign_ref(&$$, &$1, &$4 CLS_CC); }
| cvar '=' '&' function_call { zend_do_end_variable_parse(BP_VAR_W, 0 CLS_CC); zend_do_assign_ref(&$$, &$1, &$4 CLS_CC); }
| cvar '=' '&' T_NEW class_name { zend_do_extended_fcall_begin(CLS_C); zend_do_begin_new_object(&$4, &$5 CLS_CC); } ctor_arguments { zend_do_end_new_object(&$3, &$5, &$4, &$7 CLS_CC); zend_do_extended_fcall_end(CLS_C); zend_do_end_variable_parse(BP_VAR_W, 0 CLS_CC); zend_do_assign_ref(&$$, &$1, &$3 CLS_CC); }
| T_NEW class_name { zend_do_extended_fcall_begin(CLS_C); zend_do_begin_new_object(&$1, &$2 CLS_CC); } ctor_arguments { zend_do_end_new_object(&$$, &$2, &$1, &$4 CLS_CC); zend_do_extended_fcall_end(CLS_C);}
| cvar T_PLUS_EQUAL expr { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_ADD, &$$, &$1, &$3 CLS_CC); }
| cvar T_MINUS_EQUAL expr { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_SUB, &$$, &$1, &$3 CLS_CC); }
| cvar T_MUL_EQUAL expr { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_MUL, &$$, &$1, &$3 CLS_CC); }
| cvar T_DIV_EQUAL expr { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_DIV, &$$, &$1, &$3 CLS_CC); }
| cvar T_CONCAT_EQUAL expr { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_CONCAT, &$$, &$1, &$3 CLS_CC); }
| cvar T_MOD_EQUAL expr { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_MOD, &$$, &$1, &$3 CLS_CC); }
| cvar T_AND_EQUAL expr { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_BW_AND, &$$, &$1, &$3 CLS_CC); }
| cvar T_OR_EQUAL expr { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_BW_OR, &$$, &$1, &$3 CLS_CC); }
| cvar T_XOR_EQUAL expr { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_BW_XOR, &$$, &$1, &$3 CLS_CC); }
| cvar T_SL_EQUAL expr { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_SL, &$$, &$1, &$3 CLS_CC); }
| cvar T_SR_EQUAL expr { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_SR, &$$, &$1, &$3 CLS_CC); }
| rw_cvar T_INC { zend_do_post_incdec(&$$, &$1, ZEND_POST_INC CLS_CC); }
| T_INC rw_cvar { zend_do_pre_incdec(&$$, &$2, ZEND_PRE_INC CLS_CC); }
| rw_cvar T_DEC { zend_do_post_incdec(&$$, &$1, ZEND_POST_DEC CLS_CC); }
| T_DEC rw_cvar { zend_do_pre_incdec(&$$, &$2, ZEND_PRE_DEC CLS_CC); }
| expr T_BOOLEAN_OR { zend_do_boolean_or_begin(&$1, &$2 CLS_CC); } expr { zend_do_boolean_or_end(&$$, &$1, &$4, &$2 CLS_CC); }
| expr T_BOOLEAN_AND { zend_do_boolean_and_begin(&$1, &$2 CLS_CC); } expr { zend_do_boolean_and_end(&$$, &$1, &$4, &$2 CLS_CC); }
| expr T_LOGICAL_OR { zend_do_boolean_or_begin(&$1, &$2 CLS_CC); } expr { zend_do_boolean_or_end(&$$, &$1, &$4, &$2 CLS_CC); }
| expr T_LOGICAL_AND { zend_do_boolean_and_begin(&$1, &$2 CLS_CC); } expr { zend_do_boolean_and_end(&$$, &$1, &$4, &$2 CLS_CC); }
| expr T_LOGICAL_XOR expr { zend_do_binary_op(ZEND_BOOL_XOR, &$$, &$1, &$3 CLS_CC); }
| expr '|' expr { zend_do_binary_op(ZEND_BW_OR, &$$, &$1, &$3 CLS_CC); }
| expr '&' expr { zend_do_binary_op(ZEND_BW_AND, &$$, &$1, &$3 CLS_CC); }
| expr '^' expr { zend_do_binary_op(ZEND_BW_XOR, &$$, &$1, &$3 CLS_CC); }
| expr '.' expr { zend_do_binary_op(ZEND_CONCAT,&$$,&$1,&$3 CLS_CC); }
| expr '+' expr { zend_do_binary_op(ZEND_ADD,&$$,&$1,&$3 CLS_CC); }
| expr '-' expr { zend_do_binary_op(ZEND_SUB,&$$,&$1,&$3 CLS_CC); }
| expr '*' expr { zend_do_binary_op(ZEND_MUL,&$$,&$1,&$3 CLS_CC); }
| expr '/' expr { zend_do_binary_op(ZEND_DIV,&$$,&$1,&$3 CLS_CC); }
| expr '%' expr { zend_do_binary_op(ZEND_MOD,&$$,&$1,&$3 CLS_CC); }
| expr T_SL expr { zend_do_binary_op(ZEND_SL, &$$, &$1, &$3 CLS_CC); }
| expr T_SR expr { zend_do_binary_op(ZEND_SR, &$$, &$1, &$3 CLS_CC); }
| '+' expr { $1.u.constant.value.lval=0; $1.u.constant.type=IS_LONG; $1.op_type = IS_CONST; INIT_PZVAL(&$1.u.constant); zend_do_binary_op(ZEND_ADD, &$$, &$1, &$2 CLS_CC); }
| '-' expr { $1.u.constant.value.lval=0; $1.u.constant.type=IS_LONG; $1.op_type = IS_CONST; INIT_PZVAL(&$1.u.constant); zend_do_binary_op(ZEND_SUB, &$$, &$1, &$2 CLS_CC); }
| '!' expr { zend_do_unary_op(ZEND_BOOL_NOT, &$$, &$2 CLS_CC); }
| '~' expr { zend_do_unary_op(ZEND_BW_NOT, &$$, &$2 CLS_CC); }
| expr T_IS_IDENTICAL expr { zend_do_binary_op(ZEND_IS_IDENTICAL, &$$, &$1, &$3 CLS_CC); }
| expr T_IS_NOT_IDENTICAL expr { zend_do_binary_op(ZEND_IS_NOT_IDENTICAL, &$$, &$1, &$3 CLS_CC); }
| expr T_IS_EQUAL expr { zend_do_binary_op(ZEND_IS_EQUAL, &$$, &$1, &$3 CLS_CC); }
| expr T_IS_NOT_EQUAL expr { zend_do_binary_op(ZEND_IS_NOT_EQUAL, &$$, &$1, &$3 CLS_CC); }
| expr '<' expr { zend_do_binary_op(ZEND_IS_SMALLER, &$$, &$1, &$3 CLS_CC); }
| expr T_IS_SMALLER_OR_EQUAL expr { zend_do_binary_op(ZEND_IS_SMALLER_OR_EQUAL, &$$, &$1, &$3 CLS_CC); }
| expr '>' expr { zend_do_binary_op(ZEND_IS_SMALLER, &$$, &$3, &$1 CLS_CC); }
| expr T_IS_GREATER_OR_EQUAL expr { zend_do_binary_op(ZEND_IS_SMALLER_OR_EQUAL, &$$, &$3, &$1 CLS_CC); }
| '(' expr ')' { $$ = $2; }
| expr '?' { zend_do_begin_qm_op(&$1, &$2 CLS_CC); }
expr ':' { zend_do_qm_true(&$4, &$2, &$5 CLS_CC); }
expr { zend_do_qm_false(&$$, &$7, &$2, &$5 CLS_CC); }
| function_call { $$ = $1; }
| internal_functions_in_yacc { $$ = $1; }
| T_INT_CAST expr { zend_do_cast(&$$, &$2, IS_LONG CLS_CC); }
| T_DOUBLE_CAST expr { zend_do_cast(&$$, &$2, IS_DOUBLE CLS_CC); }
| T_STRING_CAST expr { zend_do_cast(&$$, &$2, IS_STRING CLS_CC); }
| T_ARRAY_CAST expr { zend_do_cast(&$$, &$2, IS_ARRAY CLS_CC); }
| T_OBJECT_CAST expr { zend_do_cast(&$$, &$2, IS_OBJECT CLS_CC); }
| T_BOOL_CAST expr { zend_do_cast(&$$, &$2, IS_BOOL CLS_CC); }
| T_UNSET_CAST expr { zend_do_cast(&$$, &$2, IS_NULL CLS_CC); }
| T_EXIT exit_expr { zend_do_exit(&$$, &$2 CLS_CC); }
| '@' { zend_do_begin_silence(&$1 CLS_CC); } expr { zend_do_end_silence(&$1 CLS_CC); $$ = $3; }
| scalar { $$ = $1; }
| T_ARRAY '(' array_pair_list ')' { $$ = $3; }
| '`' encaps_list '`' { zend_do_shell_exec(&$$, &$2 CLS_CC); }
| T_PRINT expr { zend_do_print(&$$, &$2 CLS_CC); }
;
function_call:
T_STRING '(' { $2.u.opline_num = zend_do_begin_function_call(&$1 CLS_CC); }
function_call_parameter_list
')' { zend_do_end_function_call(&$1, &$$, &$4, 0, $2.u.opline_num CLS_CC); zend_do_extended_fcall_end(CLS_C); }
| cvar '(' { zend_do_begin_dynamic_function_call(&$1 CLS_CC); }
function_call_parameter_list
')' { zend_do_end_function_call(&$1, &$$, &$4, 0, 1 CLS_CC); zend_do_extended_fcall_end(CLS_C);}
| T_STRING T_PAAMAYIM_NEKUDOTAYIM T_STRING '(' { zend_do_extended_fcall_begin(CLS_C); zend_do_begin_class_member_function_call(&$1, &$3 CLS_CC); }
function_call_parameter_list
')' { zend_do_end_function_call(&$3, &$$, &$6, 1, 1 CLS_CC); zend_do_extended_fcall_end(CLS_C);}
;
exit_expr:
/* empty */ { memset(&$$, 0, sizeof(znode)); $$.op_type = IS_UNUSED; }
| '(' ')' { memset(&$$, 0, sizeof(znode)); $$.op_type = IS_UNUSED; }
| '(' expr ')' { $$ = $2; }
;
ctor_arguments:
/* empty */ { $$.u.constant.value.lval=0; }
| '(' function_call_parameter_list ')' { $$ = $2; }
;
class_name:
T_STRING { $$ = $1; }
| r_cvar { $$ = $1; }
;
common_scalar:
T_LNUMBER { $$ = $1; }
| T_DNUMBER { $$ = $1; }
| T_CONSTANT_ENCAPSED_STRING { $$ = $1; }
| T_LINE { $$ = $1; }
| T_FILE { $$ = $1; }
;
static_scalar: /* compile-time evaluated scalars */
common_scalar { $$ = $1; }
| T_STRING { zend_do_fetch_constant(&$$, &$1, ZEND_CT CLS_CC); }
| '+' static_scalar { $$ = $1; }
| '-' static_scalar { zval minus_one; minus_one.type = IS_LONG; minus_one.value.lval = -1; mul_function(&$2.u.constant, &$2.u.constant, &minus_one); $$ = $2; }
| T_ARRAY '(' static_array_pair_list ')' { $$ = $3; $$.u.constant.type = IS_CONSTANT_ARRAY; }
;
scalar:
T_STRING { zend_do_fetch_constant(&$$, &$1, ZEND_RT CLS_CC); }
| T_STRING_VARNAME { $$ = $1; }
| common_scalar { $$ = $1; }
| '"' encaps_list '"' { $$ = $2; }
| '\'' encaps_list '\'' { $$ = $2; }
| T_START_HEREDOC encaps_list T_END_HEREDOC { $$ = $2; zend_do_end_heredoc(CLS_C); }
;
static_array_pair_list:
/* empty */ { $$.op_type = IS_CONST; INIT_PZVAL(&$$.u.constant); array_init(&$$.u.constant); }
| non_empty_static_array_pair_list possible_comma { $$ = $1; }
;
possible_comma:
/* empty */
| ','
;
non_empty_static_array_pair_list:
non_empty_static_array_pair_list ',' static_scalar T_DOUBLE_ARROW static_scalar { zend_do_add_static_array_element(&$$, &$3, &$5); }
| non_empty_static_array_pair_list ',' static_scalar { zend_do_add_static_array_element(&$$, NULL, &$3); }
| static_scalar T_DOUBLE_ARROW static_scalar { $$.op_type = IS_CONST; INIT_PZVAL(&$$.u.constant); array_init(&$$.u.constant); zend_do_add_static_array_element(&$$, &$1, &$3); }
| static_scalar { $$.op_type = IS_CONST; INIT_PZVAL(&$$.u.constant); array_init(&$$.u.constant); zend_do_add_static_array_element(&$$, NULL, &$1); }
;
expr:
r_cvar { $$ = $1; }
| expr_without_variable { $$ = $1; }
;
/*
w_expr:
w_cvar { $$ = $1; }
| expr_without_variable { $$ = $1; }
;
*/
r_cvar:
cvar { zend_do_end_variable_parse(BP_VAR_R, 0 CLS_CC); $$ = $1; }
;
w_cvar:
cvar { zend_do_end_variable_parse(BP_VAR_W, 0 CLS_CC); $$ = $1; }
;
rw_cvar:
cvar { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); $$ = $1; }
;
cvar:
cvar_without_objects { $$ = $1; }
| cvar_without_objects T_OBJECT_OPERATOR { zend_do_push_object(&$1 CLS_CC); } ref_list { $$ = $4; }
;
cvar_without_objects:
reference_variable { $$ = $1; }
| simple_indirect_reference reference_variable { zend_do_indirect_references(&$$, &$1, &$2 CLS_CC); }
;
reference_variable:
reference_variable '[' dim_offset ']' { fetch_array_dim(&$$, &$1, &$3 CLS_CC); }
| reference_variable '{' expr '}' { fetch_string_offset(&$$, &$1, &$3 CLS_CC); }
| compound_variable { zend_do_fetch_globals(&$1 CLS_CC); zend_do_begin_variable_parse(CLS_C); fetch_simple_variable(&$$, &$1, 1 CLS_CC); }
;
compound_variable:
T_VARIABLE { $$ = $1; }
| '$' '{' expr '}' { $$ = $3; }
;
dim_offset:
/* empty */ { $$.op_type = IS_UNUSED; }
| expr { $$ = $1; }
;
ref_list:
object_property { $$ = $1; }
| ref_list T_OBJECT_OPERATOR { zend_do_push_object(&$1 CLS_CC); } object_property { $$ = $4; }
;
object_property:
object_dim_list { $$ = $1; }
| cvar_without_objects { zend_do_end_variable_parse(BP_VAR_R, 0 CLS_CC); } { znode tmp_znode; zend_do_pop_object(&tmp_znode CLS_CC); zend_do_fetch_property(&$$, &tmp_znode, &$1 CLS_CC);}
;
object_dim_list:
object_dim_list '[' dim_offset ']' { fetch_array_dim(&$$, &$1, &$3 CLS_CC); }
| object_dim_list '{' expr '}' { fetch_string_offset(&$$, &$1, &$3 CLS_CC); }
| variable_name { znode tmp_znode; zend_do_pop_object(&tmp_znode CLS_CC); zend_do_fetch_property(&$$, &tmp_znode, &$1 CLS_CC);}
;
variable_name:
T_STRING { $$ = $1; }
| '{' expr '}' { $$ = $2; }
;
simple_indirect_reference:
'$' { $$.u.constant.value.lval = 1; }
| simple_indirect_reference '$' { $$.u.constant.value.lval++; }
;
assignment_list:
assignment_list ',' assignment_list_element
| assignment_list_element
;
assignment_list_element:
cvar { zend_do_add_list_element(&$1 CLS_CC); }
| T_LIST '(' { zend_do_new_list_begin(CLS_C); } assignment_list ')' { zend_do_new_list_end(CLS_C); }
| /* empty */ { zend_do_add_list_element(NULL CLS_CC); }
;
array_pair_list:
/* empty */ { zend_do_init_array(&$$, NULL, NULL, 0 CLS_CC); }
| non_empty_array_pair_list possible_comma { $$ = $1; }
;
non_empty_array_pair_list:
non_empty_array_pair_list ',' expr T_DOUBLE_ARROW expr { zend_do_add_array_element(&$$, &$5, &$3, 0 CLS_CC); }
| non_empty_array_pair_list ',' expr { zend_do_add_array_element(&$$, &$3, NULL, 0 CLS_CC); }
| expr T_DOUBLE_ARROW expr { zend_do_init_array(&$$, &$3, &$1, 0 CLS_CC); }
| expr { zend_do_init_array(&$$, &$1, NULL, 0 CLS_CC); }
| non_empty_array_pair_list ',' expr T_DOUBLE_ARROW '&' w_cvar { zend_do_add_array_element(&$$, &$6, &$3, 1 CLS_CC); }
| non_empty_array_pair_list ',' '&' w_cvar { zend_do_add_array_element(&$$, &$4, NULL, 1 CLS_CC); }
| expr T_DOUBLE_ARROW '&' w_cvar { zend_do_init_array(&$$, &$4, &$1, 1 CLS_CC); }
| '&' w_cvar { zend_do_init_array(&$$, &$2, NULL, 1 CLS_CC); }
;
encaps_list:
encaps_list encaps_var { zend_do_end_variable_parse(BP_VAR_R, 0 CLS_CC); zend_do_add_variable(&$$, &$1, &$2 CLS_CC); }
| encaps_list T_STRING { zend_do_add_string(&$$, &$1, &$2 CLS_CC); }
| encaps_list T_NUM_STRING { zend_do_add_string(&$$, &$1, &$2 CLS_CC); }
| encaps_list T_ENCAPSED_AND_WHITESPACE { zend_do_add_string(&$$, &$1, &$2 CLS_CC); }
| encaps_list T_CHARACTER { zend_do_add_char(&$$, &$1, &$2 CLS_CC); }
| encaps_list T_BAD_CHARACTER { zend_do_add_string(&$$, &$1, &$2 CLS_CC); }
| encaps_list '[' { $2.u.constant.value.lval = (long) '['; zend_do_add_char(&$$, &$1, &$2 CLS_CC); }
| encaps_list ']' { $2.u.constant.value.lval = (long) ']'; zend_do_add_char(&$$, &$1, &$2 CLS_CC); }
| encaps_list '{' { $2.u.constant.value.lval = (long) '{'; zend_do_add_char(&$$, &$1, &$2 CLS_CC); }
| encaps_list '}' { $2.u.constant.value.lval = (long) '}'; zend_do_add_char(&$$, &$1, &$2 CLS_CC); }
| encaps_list T_OBJECT_OPERATOR { znode tmp; $2.u.constant.value.lval = (long) '-'; zend_do_add_char(&tmp, &$1, &$2 CLS_CC); $2.u.constant.value.lval = (long) '>'; zend_do_add_char(&$$, &tmp, &$2 CLS_CC); }
| /* empty */ { zend_do_init_string(&$$ CLS_CC); }
;
encaps_var:
T_VARIABLE { zend_do_fetch_globals(&$1 CLS_CC); zend_do_begin_variable_parse(CLS_C); fetch_simple_variable(&$$, &$1, 1 CLS_CC); }
| T_VARIABLE '[' { zend_do_begin_variable_parse(CLS_C); } encaps_var_offset ']' { zend_do_fetch_globals(&$1 CLS_CC); fetch_array_begin(&$$, &$1, &$4 CLS_CC); }
| T_VARIABLE T_OBJECT_OPERATOR T_STRING { zend_do_begin_variable_parse(CLS_C); fetch_simple_variable(&$2, &$1, 1 CLS_CC); zend_do_fetch_property(&$$, &$2, &$3 CLS_CC); }
| T_DOLLAR_OPEN_CURLY_BRACES expr '}' { zend_do_begin_variable_parse(CLS_C); fetch_simple_variable(&$$, &$2, 1 CLS_CC); }
| T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '[' expr ']' '}' { zend_do_begin_variable_parse(CLS_C); fetch_array_begin(&$$, &$2, &$4 CLS_CC); }
| T_CURLY_OPEN cvar '}' { $$ = $2; }
;
encaps_var_offset:
T_STRING { $$ = $1; }
| T_NUM_STRING { $$ = $1; }
| T_VARIABLE { fetch_simple_variable(&$$, &$1, 1 CLS_CC); }
;
internal_functions_in_yacc:
T_ISSET '(' cvar ')' { zend_do_isset_or_isempty(ZEND_ISSET, &$$, &$3 CLS_CC); }
| T_EMPTY '(' cvar ')' { zend_do_isset_or_isempty(ZEND_ISEMPTY, &$$, &$3 CLS_CC); }
| T_INCLUDE expr { zend_do_include_or_eval(ZEND_INCLUDE, &$$, &$2 CLS_CC); }
| T_INCLUDE_ONCE expr { zend_do_include_or_eval(ZEND_INCLUDE_ONCE, &$$, &$2 CLS_CC); }
| T_EVAL '(' expr ')' { zend_do_include_or_eval(ZEND_EVAL, &$$, &$3 CLS_CC); }
| T_REQUIRE expr { zend_do_include_or_eval(ZEND_REQUIRE, &$$, &$2 CLS_CC); }
| T_REQUIRE_ONCE expr { zend_do_include_or_eval(ZEND_REQUIRE_ONCE, &$$, &$2 CLS_CC); }
;
%%
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -4,7 +4,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -29,6 +29,7 @@
%x ST_LOOKING_FOR_PROPERTY
%x ST_LOOKING_FOR_VARNAME
%x ST_COMMENT
%x ST_ONE_LINE_COMMENT
%option stack
%{
@@ -38,11 +39,12 @@
#endif
#include <errno.h>
#include <limits.h>
#include "zend.h"
#include "zend_alloc.h"
#include "zend-parser.h"
#include "zend_language_parser.h"
#include "zend_compile.h"
#include "zend-scanner.h"
#include "zend_language_scanner.h"
#include "zend_highlight.h"
#include "zend_constants.h"
#include "zend_variables.h"
@@ -76,6 +78,7 @@
#else
#define YY_DECL int lex_scan(zval *zendlval CLS_DC)
#endif
#define ECHO { ZEND_WRITE( yytext, yyleng ); }
#ifdef ZTS
@@ -84,16 +87,7 @@
# define MY_INPUT input
#endif
#if defined(ZTS) && !defined(HAVE_CLASS_ISTDIOSTREAM)
class istdiostream : public istream
{
private:
stdiobuf _file;
public:
istdiostream (FILE* __f) : istream(), _file(__f) { init(&_file); }
stdiobuf* rdbuf()/* const */ { return &_file; }
};
#endif
#include "zend_istdiostream.h"
#define YY_FATAL_ERROR zend_fatal_scanner_error
@@ -116,7 +110,7 @@ do { \
}
#define ZEND_IS_OCT(c) ((c)>='0' && (c)<'8')
#define ZEND_IS_OCT(c) ((c)>='0' && (c)<='7')
#define ZEND_IS_HEX(c) (((c)>='0' && (c)<='9') || ((c)>='a' && (c)<='f') || ((c)>='A' && (c)<='F'))
@@ -207,7 +201,7 @@ ZEND_API void zend_file_handle_dtor(zend_file_handle *fh)
#endif
}
if (fh->opened_path) {
free(fh->opened_path);
efree(fh->opened_path);
}
if (fh->free_filename && fh->filename) {
efree(fh->filename);
@@ -249,23 +243,18 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC)
switch (file_handle->type) {
case ZEND_HANDLE_FILENAME:
file_handle->handle.fp = zend_fopen(file_handle->filename, &file_handle->opened_path);
file_path = file_handle->opened_path;
break;
case ZEND_HANDLE_FD:
/* file_handle->opened_path = NULL; */
file_handle->handle.fp = fdopen(file_handle->handle.fd, "r");
break;
case ZEND_HANDLE_FP:
/* file_handle->opened_path = NULL; */
file_handle->handle.fp = file_handle->handle.fp;
break;
}
if (!file_handle->handle.fp) {
return FAILURE;
}
if (!file_path) {
file_path = file_handle->filename;
}
file_handle->type = ZEND_HANDLE_FP;
if (file_handle->handle.fp != stdin) {
zend_llist_add_element(&CG(open_files), file_handle);
@@ -277,7 +266,6 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC)
#else
switch (file_handle->type) {
case ZEND_HANDLE_FD:
/* file_handle->opened_path = NULL; */
file_handle->handle.is = new ifstream(file_handle->handle.fd);
file_handle->type = ZEND_HANDLE_FSTREAM;
break;
@@ -292,7 +280,6 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC)
break;
}
case ZEND_HANDLE_FP:
/* file_handle->opened_path = NULL; */
if (file_handle->handle.fp==stdin) {
file_handle->handle.is = &cin;
} else {
@@ -305,8 +292,6 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC)
break;
}
file_path = file_handle->filename;
if (file_handle->handle.is->fail()) {
delete file_handle->handle.is;
return FAILURE;
@@ -318,6 +303,13 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC)
CG(ZFL) = new ZendFlexLexer;
CG(ZFL)->switch_streams(file_handle->handle.is, &cout);
#endif
if(file_handle->opened_path) {
file_path = file_handle->opened_path;
} else {
file_path = file_handle->filename;
}
zend_set_compiled_filename(file_path);
CG(zend_lineno) = 1;
return SUCCESS;
@@ -359,8 +351,7 @@ ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type CLS
CG(in_compilation) = 1;
CG(active_op_array) = op_array;
compiler_result = zendparse(CLS_C);
do_return(&retval_znode, 0 CLS_CC);
restore_lexical_state(&original_lex_state CLS_CC);
zend_do_return(&retval_znode, 0 CLS_CC);
CG(in_compilation) = original_in_compilation;
if (compiler_result==1) { /* parser error */
CG(unclean_shutdown) = 1;
@@ -378,6 +369,9 @@ ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type CLS
retval = NULL;
}
}
if (compilation_successful) {
restore_lexical_state(&original_lex_state CLS_CC);
}
return retval;
}
@@ -401,6 +395,10 @@ zend_op_array *compile_filename(int type, zval *filename CLS_DC ELS_DC)
retval = zend_compile_file(&file_handle, type CLS_CC);
if (retval && file_handle.opened_path) {
int dummy = 1;
zend_hash_add(&EG(included_files), file_handle.opened_path, strlen(file_handle.opened_path)+1, (void *)&dummy, sizeof(int), NULL);
}
zend_destroy_file_handle(&file_handle CLS_CC);
if (filename==&tmp) {
@@ -410,9 +408,9 @@ zend_op_array *compile_filename(int type, zval *filename CLS_DC ELS_DC)
}
#ifndef ZTS
static inline int prepare_string_for_scanning(zval *str)
static inline int prepare_string_for_scanning(zval *str, char *filename)
#else
static inline int prepare_string_for_scanning(zval *str, istrstream **input_stream CLS_DC)
static inline int prepare_string_for_scanning(zval *str, istrstream **input_stream, char *filename CLS_DC)
#endif
{
#ifndef ZTS
@@ -429,13 +427,13 @@ static inline int prepare_string_for_scanning(zval *str, istrstream **input_stre
CG(ZFL)->switch_streams(*input_stream, &cout);
#endif
zend_set_compiled_filename("Eval code");
zend_set_compiled_filename(filename);
CG(zend_lineno) = 1;
return SUCCESS;
}
zend_op_array *compile_string(zval *source_string CLS_DC)
zend_op_array *compile_string(zval *source_string, char *filename CLS_DC)
{
zend_lex_state original_lex_state;
zend_op_array *op_array = (zend_op_array *) emalloc(sizeof(zend_op_array));
@@ -462,9 +460,9 @@ zend_op_array *compile_string(zval *source_string CLS_DC)
save_lexical_state(&original_lex_state CLS_CC);
#ifndef ZTS
if (prepare_string_for_scanning(source_string)==FAILURE) {
if (prepare_string_for_scanning(source_string, filename)==FAILURE) {
#else
if (prepare_string_for_scanning(source_string, &input_stream CLS_CC)==FAILURE) {
if (prepare_string_for_scanning(source_string, &input_stream, filename CLS_CC)==FAILURE) {
#endif
efree(op_array);
retval = NULL;
@@ -477,18 +475,18 @@ zend_op_array *compile_string(zval *source_string CLS_DC)
CG(ZFL)->BeginState(ST_IN_SCRIPTING);
#endif
compiler_result = zendparse(CLS_C);
restore_lexical_state(&original_lex_state CLS_CC);
if (compiler_result==1) {
CG(active_op_array) = original_active_op_array;
CG(unclean_shutdown)=1;
retval = NULL;
} else {
do_return(NULL, 0 CLS_CC);
zend_do_return(NULL, 0 CLS_CC);
CG(active_op_array) = original_active_op_array;
pass_two(op_array);
retval = op_array;
}
restore_lexical_state(&original_lex_state CLS_CC);
}
#ifdef ZTS
delete input_stream;
@@ -521,8 +519,7 @@ int highlight_file(char *filename, zend_syntax_highlighter_ini *syntax_highlight
return SUCCESS;
}
int highlight_string(zval *str, zend_syntax_highlighter_ini *syntax_highlighter_ini)
int highlight_string(zval *str, zend_syntax_highlighter_ini *syntax_highlighter_ini, char *str_name)
{
zend_lex_state original_lex_state;
zval tmp = *str;
@@ -535,9 +532,9 @@ int highlight_string(zval *str, zend_syntax_highlighter_ini *syntax_highlighter_
zval_copy_ctor(str);
save_lexical_state(&original_lex_state CLS_CC);
#ifndef ZTS
if (prepare_string_for_scanning(str)==FAILURE) {
if (prepare_string_for_scanning(str, str_name)==FAILURE) {
#else
if (prepare_string_for_scanning(str, &input_stream CLS_CC)==FAILURE) {
if (prepare_string_for_scanning(str, &input_stream, str_name CLS_CC)==FAILURE) {
#endif
return FAILURE;
}
@@ -746,7 +743,6 @@ ANY_CHAR (.|[\n])
}
<ST_LOOKING_FOR_PROPERTY>{ANY_CHAR} {
/*unput(yytext[0]);*/
yyless(0);
yy_pop_state();
}
@@ -899,7 +895,6 @@ ANY_CHAR (.|[\n])
return T_CONCAT_EQUAL;
}
<ST_IN_SCRIPTING>"%=" {
return T_MOD_EQUAL;
}
@@ -989,14 +984,13 @@ ANY_CHAR (.|[\n])
<ST_LOOKING_FOR_VARNAME>{ANY_CHAR} {
/*unput(yytext[0]);*/
yyless(0);
yy_pop_state();
yy_push_state(ST_IN_SCRIPTING);
}
<ST_IN_SCRIPTING>{LNUM}|{HNUM} {
<ST_IN_SCRIPTING>{LNUM} {
errno = 0;
zendlval->value.lval = strtol(yytext, NULL, 0);
if (errno == ERANGE) { /* overflow */
@@ -1009,6 +1003,26 @@ ANY_CHAR (.|[\n])
}
}
<ST_IN_SCRIPTING>{HNUM} {
errno = 0;
zendlval->value.lval = strtoul(yytext, NULL, 16);
if (errno == ERANGE) { /* overflow */
/* not trying strtod - it returns trash on 0x-es */
zendlval->value.lval = LONG_MAX; /* maximal long */
zend_error(E_NOTICE,"Hex number is too big: %s",yytext);
} else {
if(zendlval->value.lval < 0) {
/* maintain consistency with the old way */
zendlval->value.dval = (unsigned long) zendlval->value.lval;
zendlval->type = IS_DOUBLE;
return T_DNUMBER;
}
zendlval->type = IS_LONG;
}
zendlval->type = IS_LONG;
return T_LNUMBER;
}
<ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC>{LNUM}|{HNUM} { /* treat numbers (almost) as strings inside encapsulated strings */
zendlval->value.str.val = (char *)estrndup(yytext, yyleng);
zendlval->value.str.len = yyleng;
@@ -1035,7 +1049,7 @@ ANY_CHAR (.|[\n])
filename = "";
}
zendlval->value.str.len = strlen(filename);
zendlval->value.str.val = estrndup(filename,zendlval->value.str.len);
zendlval->value.str.val = estrndup(filename, zendlval->value.str.len);
zendlval->type = IS_STRING;
return T_FILE;
}
@@ -1045,7 +1059,7 @@ ANY_CHAR (.|[\n])
zendlval->value.str.val = (char *) estrndup(yytext, yyleng);
zendlval->value.str.len = yyleng;
zendlval->type = IS_STRING;
HANDLE_NEWLINES(yytext,yyleng);
HANDLE_NEWLINES(yytext, yyleng);
return T_INLINE_HTML;
}
@@ -1109,7 +1123,7 @@ ANY_CHAR (.|[\n])
}
<INITIAL>"<?php_track_vars?>"([\n]|"\r\n")? {
<INITIAL>"<?php_track_vars?>"("\n"|"\r\n")? {
zend_error(E_WARNING, "&lt;?php_track_vars?&gt; is no longer supported - please use the track_vars INI directive instead");
HANDLE_NEWLINE(yytext[yyleng-1]);
zendlval->value.str.val = (char *) estrndup(yytext, yyleng);
@@ -1151,11 +1165,41 @@ ANY_CHAR (.|[\n])
}
<ST_IN_SCRIPTING>([#]|"//")([^\n\r?]|"?"[^>\n\r])*("?\n"|"?\r\n")? { /* eat one line comments */
HANDLE_NEWLINE(yytext[yyleng-1]);
<ST_IN_SCRIPTING>"#"|"//" {
BEGIN(ST_ONE_LINE_COMMENT);
yymore();
}
<ST_ONE_LINE_COMMENT>"?"|"%"|">" {
yymore();
}
<ST_ONE_LINE_COMMENT>[^\n\r?%>]+ {
yymore();
}
<ST_ONE_LINE_COMMENT>"\n"|"\r\n" {
zendlval->value.str.val = yytext; /* no copying - intentional */
zendlval->value.str.len = yyleng;
zendlval->type = IS_STRING;
BEGIN(ST_IN_SCRIPTING);
CG(zend_lineno)++;
return T_COMMENT;
}
<ST_ONE_LINE_COMMENT>"?>"|"%>" {
if(CG(asp_tags) || yytext[yyleng-2] != '%') { /* asp comment? */
zendlval->value.str.val = yytext; /* no copying - intentional */
zendlval->value.str.len = yyleng;
zendlval->type = IS_STRING;
yyless(yyleng-2);
BEGIN(ST_IN_SCRIPTING);
return T_COMMENT;
} else {
yymore();
}
}
<ST_IN_SCRIPTING>"/*" {
CG(comment_start_line) = CG(zend_lineno);
BEGIN(ST_COMMENT);
@@ -1177,7 +1221,7 @@ ANY_CHAR (.|[\n])
yymore();
}
<ST_IN_SCRIPTING>("?>"|"</script"{WHITESPACE}*">")([\n]|"\r\n")? {
<ST_IN_SCRIPTING>("?>"|"</script"{WHITESPACE}*">")("\n"|"\r\n")? {
zendlval->value.str.val = yytext; /* no copying - intentional */
zendlval->value.str.len = yyleng;
zendlval->type = IS_STRING;
@@ -1187,17 +1231,17 @@ ANY_CHAR (.|[\n])
}
<ST_IN_SCRIPTING>"%>"([\n]|"\r\n")? {
zendlval->value.str.len = yyleng;
zendlval->type = IS_STRING;
HANDLE_NEWLINES(yytext,yyleng);
<ST_IN_SCRIPTING>"%>"("\n"|"\r\n")? {
if (CG(asp_tags)) {
BEGIN(INITIAL);
zendlval->value.str.len = yyleng;
zendlval->type = IS_STRING;
zendlval->value.str.val = yytext; /* no copying - intentional */
HANDLE_NEWLINES(yytext,yyleng);
return T_CLOSE_TAG; /* implicit ';' at php-end tag */
} else {
zendlval->value.str.val = (char *) estrndup(yytext, yyleng);
return T_INLINE_HTML;
yyless(1);
return yytext[0];
}
}
@@ -1432,9 +1476,6 @@ ANY_CHAR (.|[\n])
zendlval->value.lval = (long) yytext[0];
if (yyleng == 2) {
yyless(1);
/*unput(yytext[1]);
yytext[1] = 0;
yyleng--;*/
}
return T_CHARACTER;
}
@@ -1448,7 +1489,6 @@ ANY_CHAR (.|[\n])
<ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC>"{$" {
zendlval->value.lval = (long) yytext[0];
yy_push_state(ST_IN_SCRIPTING);
/*unput('$');*/
yyless(1);
return T_CURLY_OPEN;
}
+20 -6
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -272,8 +272,18 @@ void plist_entry_destructor(void *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);
switch (ld->type) {
case ZEND_RESOURCE_LIST_TYPE_STD:
if (ld->plist_dtor) {
(ld->plist_dtor)(le->ptr);
}
break;
case ZEND_RESOURCE_LIST_TYPE_EX:
if (ld->plist_dtor_ex) {
ld->plist_dtor_ex(le);
}
break;
EMPTY_SWITCH_DEFAULT_CASE()
}
} else {
zend_error(E_WARNING,"Unknown persistent list entry type in module shutdown (%d)",le->type);
@@ -382,13 +392,13 @@ ZEND_API int zend_register_list_destructors_ex(rsrc_dtor_func_t ld, rsrc_dtor_fu
}
int zend_init_rsrc_list_dtors()
int zend_init_rsrc_list_dtors(void)
{
return zend_hash_init(&list_destructors, 50, NULL, NULL, 1);
}
void zend_destroy_rsrc_list_dtors()
void zend_destroy_rsrc_list_dtors(void)
{
zend_hash_destroy(&list_destructors);
}
@@ -397,8 +407,12 @@ void zend_destroy_rsrc_list_dtors()
char *zend_rsrc_list_get_rsrc_type(int resource)
{
zend_rsrc_list_dtors_entry *lde;
int rsrc_type;
if (zend_hash_index_find(&list_destructors, resource, (void **) &lde)==SUCCESS) {
if (!zend_list_find(resource, &rsrc_type))
return NULL;
if (zend_hash_index_find(&list_destructors, rsrc_type, (void **) &lde)==SUCCESS) {
return lde->type_name;
} else {
return NULL;
+4 -3
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -71,8 +71,8 @@ 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();
int zend_init_rsrc_list_dtors(void);
void zend_destroy_rsrc_list_dtors(void);
ZEND_API int zend_list_insert(void *ptr, int type);
ZEND_API int zend_plist_insert(void *ptr, int type);
@@ -84,6 +84,7 @@ ZEND_API void *zend_list_find(int id, int *type);
ZEND_API void *zend_plist_find(int id, int *type);
ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type);
ZEND_API int zend_register_false_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type);
ZEND_API void *zend_fetch_resource(zval **passed_id, int default_id, char *resource_type_name, int *found_resource_type, int num_resource_types, ...);
ZEND_API char *zend_rsrc_list_get_rsrc_type(int resource);
+34 -15
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -63,26 +63,30 @@ ZEND_API void zend_llist_prepend_element(zend_llist *l, void *element)
}
#define DEL_LLIST_ELEMENT(current,l) \
if (current->prev) {\
current->prev->next = current->next;\
} else {\
l->head = current->next;\
}\
if (current->next) {\
current->next->prev = current->prev;\
} else {\
l->tail = current->prev;\
}\
if (l->dtor) {\
l->dtor(current->data);\
pefree(current, l->persistent);\
}
ZEND_API void zend_llist_del_element(zend_llist *l, void *element, int (*compare)(void *element1, void *element2))
{
zend_llist_element *current=l->head;
while (current) {
if (compare(current->data, element)) {
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);
}
DEL_LLIST_ELEMENT(current,l);
break;
}
current = current->next;
@@ -139,6 +143,21 @@ ZEND_API void zend_llist_copy(zend_llist *dst, zend_llist *src)
}
ZEND_API void zend_llist_apply_with_del(zend_llist *l, int (*func)(void *data))
{
zend_llist_element *element, *next;
element=l->head;
while (element) {
next = element->next;
if (func(element->data)) {
DEL_LLIST_ELEMENT(element,l);
}
element = next;
}
}
ZEND_API void zend_llist_apply(zend_llist *l, void (*func)(void *data))
{
zend_llist_element *element;
+2 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -55,6 +55,7 @@ ZEND_API void zend_llist_clean(zend_llist *l);
ZEND_API void zend_llist_remove_tail(zend_llist *l);
ZEND_API void zend_llist_copy(zend_llist *dst, zend_llist *src);
ZEND_API void zend_llist_apply(zend_llist *l, llist_apply_func_t);
ZEND_API void zend_llist_apply_with_del(zend_llist *l, int (*func)(void *data));
ZEND_API void zend_llist_apply_with_argument(zend_llist *l, llist_apply_with_arg_func_t, void *arg);
ZEND_API void zend_llist_apply_with_arguments(zend_llist *l, llist_apply_with_args_func_t func, int num_args, ...);
ZEND_API int zend_llist_count(zend_llist *l);
+9 -9
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -21,6 +21,8 @@
#ifndef MODULES_H
#define MODULES_H
#include "zend.h"
#define INIT_FUNC_ARGS int type, int module_number ELS_DC
#define INIT_FUNC_ARGS_PASSTHRU type, module_number ELS_CC
#define SHUTDOWN_FUNC_ARGS int type, int module_number
@@ -30,14 +32,12 @@
#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[];
ZEND_API extern unsigned char first_arg_force_ref[];
ZEND_API extern unsigned char first_arg_allow_ref[];
ZEND_API extern unsigned char second_arg_force_ref[];
ZEND_API extern unsigned char second_arg_allow_ref[];
#include "zend.h"
#define ZEND_MODULE_API_NO 20000809
#define ZEND_MODULE_API_NO 20001222
#ifdef ZTS
#define USING_ZTS 1
#else
@@ -75,7 +75,7 @@ struct _zend_module_entry {
};
extern HashTable module_registry;
extern ZEND_API HashTable module_registry;
void module_destructor(zend_module_entry *module);
int module_registry_cleanup(zend_module_entry *module);
+10 -9
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -189,7 +189,7 @@ 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;
SET_UNUSED(op->result);
op->extended_value = 0;
memset(&op->op1, 0, sizeof(znode));
memset(&op->op2, 0, sizeof(znode));
@@ -211,7 +211,7 @@ zend_op *get_next_op(zend_op_array *op_array CLS_DC)
zend_bailout();
}
#endif
op_array->size *= 2;
op_array->size *= 4;
op_array_alloc_ops(op_array);
}
@@ -251,7 +251,9 @@ static void zend_update_extended_info(zend_op_array *op_array CLS_DC)
opline++;
continue;
}
opline->lineno = (opline+1)->lineno;
if (opline+1<end) {
opline->lineno = (opline+1)->lineno;
}
} else {
opline->opcode = ZEND_NOP;
}
@@ -260,11 +262,8 @@ static void zend_update_extended_info(zend_op_array *op_array CLS_DC)
}
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;
}
SET_UNUSED(opline->op1);
SET_UNUSED(opline->op2);
}
@@ -302,6 +301,8 @@ int pass_two(zend_op_array *op_array)
}
opline++;
}
op_array->opcodes = (zend_op *) erealloc(op_array->opcodes, sizeof(zend_op)*op_array->last);
op_array->size = op_array->last;
op_array->done_pass_two = 1;
return 0;
}
+86 -48
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -32,10 +32,34 @@
#include "zend_list.h"
#include "zend_fast_cache.h"
#if WITH_BCMATH
#if 0&&WITH_BCMATH
#include "ext/bcmath/number.h"
#endif
ZEND_API int zend_atoi(const char *str, int str_len)
{
int retval;
if (!str_len) {
str_len = strlen(str);
}
retval = atoi(str);
if (str_len>0) {
switch (str[str_len-1]) {
case 'k':
case 'K':
retval *= 1024;
break;
case 'm':
case 'M':
retval *= 1048576;
break;
}
}
return retval;
}
ZEND_API double zend_string_to_double(const char *number, zend_uint length)
{
double divisor = 10.0;
@@ -92,7 +116,7 @@ ZEND_API void convert_scalar_to_number(zval *op)
case IS_DOUBLE:
case IS_LONG:
break;
#if WITH_BCMATH
#if 0&&WITH_BCMATH
case FLAG_IS_BC:
op->type = IS_DOUBLE; /* may have lost significant digits */
break;
@@ -402,11 +426,13 @@ ZEND_API void _convert_to_string(zval *op ZEND_FILE_LINE_DC)
zval_dtor(op);
op->value.str.val = estrndup_rel("Array",sizeof("Array")-1);
op->value.str.len = sizeof("Array")-1;
zend_error(E_NOTICE, "Array to string conversion");
break;
case IS_OBJECT:
zval_dtor(op);
op->value.str.val = estrndup_rel("Object",sizeof("Object")-1);
op->value.str.len = sizeof("Object")-1;
zend_error(E_NOTICE, "Object to string conversion");
break;
default:
zval_dtor(op);
@@ -488,7 +514,51 @@ ZEND_API void convert_to_object(zval *op)
}
}
ZEND_API void multi_convert_to_long_ex(int argc, ...)
{
zval **arg;
va_list ap;
va_start(ap, argc);
while (argc--) {
arg = va_arg(ap, zval **);
convert_to_long_ex(arg);
}
va_end(ap);
}
ZEND_API void multi_convert_to_double_ex(int argc, ...)
{
zval **arg;
va_list ap;
va_start(ap, argc);
while (argc--) {
arg = va_arg(ap, zval **);
convert_to_double_ex(arg);
}
va_end(ap);
}
ZEND_API void multi_convert_to_string_ex(int argc, ...)
{
zval **arg;
va_list ap;
va_start(ap, argc);
while (argc--) {
arg = va_arg(ap, zval **);
convert_to_string_ex(arg);
}
va_end(ap);
}
ZEND_API int add_function(zval *result, zval *op1, zval *op2)
{
zval op1_copy, op2_copy;
@@ -673,47 +743,6 @@ ZEND_API int mod_function(zval *result, zval *op1, zval *op2)
}
ZEND_API int boolean_or_function(zval *result, zval *op1, zval *op2)
{
zval op1_copy, op2_copy;
result->type = IS_BOOL;
zendi_convert_to_boolean(op1, op1_copy, result);
if (op1->value.lval) {
result->value.lval = 1;
return SUCCESS;
}
zendi_convert_to_boolean(op2, op2_copy, result);
if (op2->value.lval) {
result->value.lval = 1;
return SUCCESS;
}
result->value.lval = 0;
return SUCCESS;
}
ZEND_API int boolean_and_function(zval *result, zval *op1, zval *op2)
{
zval op1_copy, op2_copy;
result->type = IS_BOOL;
zendi_convert_to_boolean(op1, op1_copy, result);
if (!op1->value.lval) {
result->value.lval = 0;
return SUCCESS;
}
zendi_convert_to_boolean(op2, op2_copy, result);
if (!op2->value.lval) {
result->value.lval = 0;
return SUCCESS;
}
result->value.lval = 1;
return SUCCESS;
}
ZEND_API int boolean_xor_function(zval *result, zval *op1, zval *op2)
{
@@ -1069,7 +1098,7 @@ ZEND_API int compare_function(zval *result, zval *op1, zval *op2)
if (op1->type == IS_LONG && op2->type == IS_LONG) {
result->type = IS_LONG;
result->value.lval = ZEND_NORMALIZE_BOOL(op1->value.lval-op2->value.lval);
result->value.lval = op1->value.lval>op2->value.lval?1:(op1->value.lval<op2->value.lval?-1:0);
return SUCCESS;
}
if ((op1->type == IS_DOUBLE || op1->type == IS_LONG)
@@ -1295,6 +1324,13 @@ static void increment_string(zval *str)
int last=0; /* Shut up the compiler warning */
int ch;
if (str->value.str.len == 0) {
STR_FREE(str->value.str.val);
str->value.str.val = estrndup("1", sizeof("1")-1);
str->value.str.len = 1;
return;
}
while(pos >= 0) {
ch = s[pos];
if (ch >= 'a' && ch <= 'z') {
@@ -1488,7 +1524,7 @@ ZEND_API int zend_binary_strncasecmp(char *s1, uint len1, char *s2, uint len2, u
}
}
return len1 - len2;
return MIN(length, len1) - MIN(length, len2);
}
@@ -1523,7 +1559,7 @@ ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2)
if ((ret1=is_numeric_string(s1->value.str.val, s1->value.str.len, &lval1, &dval1)) &&
(ret2=is_numeric_string(s2->value.str.val, s2->value.str.len, &lval2, &dval2))) {
#if WITH_BCMATH
#if 0&&WITH_BCMATH
if ((ret1==FLAG_IS_BC) || (ret2==FLAG_IS_BC)) {
bc_num first, second;
@@ -1673,4 +1709,6 @@ static inline int is_numeric_string(char *str, int length, long *lval, double *d
}
}
#endif
+22 -11
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -28,8 +28,9 @@
#include <ieeefp.h>
#endif
#if WITH_BCMATH
#include "ext/bcmath/number.h"
#if 0&&WITH_BCMATH
#include "ext/bcmath/libbcmath/src/bcmath.h"
#endif
#define MAX_LENGTH_OF_LONG 18
@@ -40,9 +41,7 @@ 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);
@@ -58,8 +57,7 @@ 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)
static inline int is_numeric_string(char *str, int length, long *lval, double *dval)
{
long local_lval;
double local_dval;
@@ -89,7 +87,7 @@ ZEND_API inline int is_numeric_string(char *str, int length, long *lval, double
if (dval) {
*dval = local_dval;
}
#if WITH_BCMATH
#if 0&&WITH_BCMATH
if (length>16) {
register char *ptr=str, *end=str+length;
@@ -115,9 +113,6 @@ ZEND_API inline int is_numeric_string(char *str, int length, long *lval, double
return 0;
}
#else
;
#endif
ZEND_API int increment_function(zval *op1);
ZEND_API int decrement_function(zval *op2);
@@ -132,6 +127,9 @@ ZEND_API void convert_to_null(zval *op);
ZEND_API void convert_to_boolean(zval *op);
ZEND_API void convert_to_array(zval *op);
ZEND_API void convert_to_object(zval *op);
ZEND_API void multi_convert_to_long_ex(int argc, ...);
ZEND_API void multi_convert_to_double_ex(int argc, ...);
ZEND_API void multi_convert_to_string_ex(int argc, ...);
ZEND_API int add_char_to_string(zval *result, zval *op1, zval *op2);
ZEND_API int add_string_to_string(zval *result, zval *op1, zval *op2);
#define convert_to_string(op) _convert_to_string((op) ZEND_FILE_LINE_CC)
@@ -159,6 +157,7 @@ ZEND_API void zend_compare_symbol_tables(zval *result, HashTable *ht1, HashTable
ZEND_API void zend_compare_arrays(zval *result, zval *a1, zval *a2);
ZEND_API void zend_compare_objects(zval *result, zval *o1, zval *o2);
ZEND_API int zend_atoi(const char *str, int str_len);
#define convert_to_ex_master(ppzv, lower_type, upper_type) \
if ((*ppzv)->type!=IS_##upper_type) { \
@@ -203,22 +202,34 @@ ZEND_API void zend_compare_objects(zval *result, zval *o1, zval *o2);
#define Z_LVAL(zval) (zval).value.lval
#define Z_BVAL(zval) ((zend_bool)(zval).value.lval)
#define Z_DVAL(zval) (zval).value.dval
#define Z_STRVAL(zval) (zval).value.str.val
#define Z_STRLEN(zval) (zval).value.str.len
#define Z_ARRVAL(zval) (zval).value.ht
#define Z_OBJPROP(zval) (zval).value.obj.properties
#define Z_OBJCE(zval) (zval).value.obj.ce
#define Z_RESVAL(zval) (zval).value.lval
#define Z_LVAL_P(zval_p) Z_LVAL(*zval_p)
#define Z_BVAL_P(zval_p) Z_BVAL(*zval_p)
#define Z_DVAL_P(zval_p) Z_DVAL(*zval_p)
#define Z_STRVAL_P(zval_p) Z_STRVAL(*zval_p)
#define Z_STRLEN_P(zval_p) Z_STRLEN(*zval_p)
#define Z_ARRVAL_P(zval_p) Z_ARRVAL(*zval_p)
#define Z_OBJPROP_P(zval_p) Z_OBJPROP(*zval_p)
#define Z_OBJCE_P(zval_p) Z_OBJCE(*zval_p)
#define Z_RESVAL_P(zval_p) Z_RESVAL(*zval_p)
#define Z_LVAL_PP(zval_pp) Z_LVAL(**zval_pp)
#define Z_BVAL_PP(zval_pp) Z_BVAL(**zval_pp)
#define Z_DVAL_PP(zval_pp) Z_DVAL(**zval_pp)
#define Z_STRVAL_PP(zval_pp) Z_STRVAL(**zval_pp)
#define Z_STRLEN_PP(zval_pp) Z_STRLEN(**zval_pp)
#define Z_ARRVAL_PP(zval_pp) Z_ARRVAL(**zval_pp)
#define Z_OBJPROP_PP(zval_pp) Z_OBJPROP(**zval_pp)
#define Z_OBJCE_PP(zval_pp) Z_OBJCE(**zval_pp)
#define Z_RESVAL_PP(zval_pp) Z_RESVAL(**zval_pp)
#define Z_TYPE(zval) (zval).type
#define Z_TYPE_P(zval_p) Z_TYPE(*zval_p)
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
+1 -11
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -90,16 +90,6 @@ ZEND_API void _zval_dtor(zval *zvalue ZEND_FILE_LINE_DC)
}
ZEND_API void zval_del_ref(zval **p)
{
(*p)->refcount--;
if ((*p)->refcount==0) {
zval_dtor(*p);
FREE_ZVAL(*p);
}
}
ZEND_API void zval_add_ref(zval **p)
{
(*p)->refcount++;
+1 -2
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -49,7 +49,6 @@ END_EXTERN_C()
ZEND_API void zval_add_ref(zval **p);
ZEND_API void zval_del_ref(zval **p);
#define ZVAL_DESTRUCTOR (void (*)(void *)) zval_dtor_wrapper
#define ZVAL_PTR_DTOR (void (*)(void *)) zval_ptr_dtor_wrapper
+103 -8
View File
@@ -4,6 +4,53 @@ dnl This file contains local autoconf functions.
sinclude(dynlib.m4)
AC_DEFUN(PHP_SETUP_OPENSSL,[
if test "$PHP_OPENSSL" = "no"; then
PHP_OPENSSL="/usr/local/ssl /usr/local /usr /usr/local/openssl"
fi
for i in $PHP_OPENSSL; do
if test -r $i/include/openssl/evp.h; then
OPENSSL_DIR=$i
OPENSSL_INC=$i/include
fi
done
if test -z "$OPENSSL_DIR"; then
AC_MSG_ERROR(Cannot find OpenSSL's <evp.h>)
fi
old_CPPFLAGS=$CPPFLAGS
CPPFLAGS="-I$OPENSSL_INC"
AC_MSG_CHECKING(for OpenSSL version)
AC_EGREP_CPP(yes,[
#include <openssl/opensslv.h>
#if OPENSSL_VERSION_NUMBER >= 0x0090500fL
yes
#endif
],[
AC_MSG_RESULT(>= 0.9.5)
],[
AC_MSG_ERROR(OpenSSL version 0.9.5 or greater required.)
])
CPPFLAGS=$old_CPPFLAGS
AC_ADD_LIBPATH($OPENSSL_DIR/lib)
AC_CHECK_LIB(crypto, CRYPTO_free, [
AC_ADD_LIBRARY(crypto)
],[
AC_MSG_ERROR(libcrypto not found!)
])
AC_CHECK_LIB(ssl, SSL_CTX_set_ssl_version, [
AC_ADD_LIBRARY(ssl)
],[
AC_MSG_ERROR(libssl not found!)
])
AC_ADD_INCLUDE($OPENSSL_INC)
])
dnl PHP_EVAL_LIBLINE(LINE, SHARED-LIBADD)
dnl
dnl Use this macro, if you need to add libraries and or library search
@@ -51,14 +98,19 @@ AC_DEFUN(PHP_READDIR_R_TYPE,[
#include <sys/types.h>
#include <dirent.h>
#ifndef PATH_MAX
#define PATH_MAX 1024
#endif
main() {
DIR *dir;
struct dirent entry, *pentry;
char entry[sizeof(struct dirent)+PATH_MAX];
struct dirent *pentry = (struct dirent *) &entry;
dir = opendir("/");
if (!dir)
exit(1);
if (readdir_r(dir, &entry, &pentry) == 0)
if (readdir_r(dir, (struct dirent *) entry, &pentry) == 0)
exit(0);
exit(1);
}
@@ -171,7 +223,7 @@ case "[$]$1" in
shared,*)
ext_output="yes, shared"
ext_shared=yes
$1=`echo $ac_n "[$]$1$ac_c"|sed s/^shared,//`
$1=`echo "[$]$1"|sed 's/^shared,//'`
;;
shared)
ext_output="yes, shared"
@@ -203,7 +255,7 @@ dnl Sets PHP_ARG_NAME either to the user value or to the default value.
dnl default-val defaults to no.
dnl
AC_DEFUN(PHP_ARG_WITH,[
PHP_REAL_ARG_WITH([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z-,A-Z_))
PHP_REAL_ARG_WITH([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z0-9-,A-Z0-9_))
])
AC_DEFUN(PHP_REAL_ARG_WITH,[
@@ -279,6 +331,10 @@ fi
AC_DEFUN(PHP_SUBST,[
PHP_VAR_SUBST="$PHP_VAR_SUBST $1"
])
AC_DEFUN(PHP_SUBST_OLD,[
PHP_SUBST($1)
AC_SUBST($1)
])
@@ -309,7 +365,7 @@ AC_DEFUN(PHP_GEN_CONFIG_VARS,[
])
AC_DEFUN(PHP_GEN_MAKEFILES,[
$SHELL $srcdir/build/fastgen.sh $srcdir $ac_cv_mkdir_p $1
$SHELL $srcdir/build/fastgen.sh $srcdir $ac_cv_mkdir_p $BSD_MAKEFILE $1
])
AC_DEFUN(PHP_TM_GMTOFF,[
@@ -331,7 +387,7 @@ AC_DEFUN(PHP_CONFIGURE_PART,[
])
AC_DEFUN(PHP_PROG_SENDMAIL,[
AC_PATH_PROG(PROG_SENDMAIL, sendmail, /usr/lib/sendmail, $PATH:/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib)
AC_PATH_PROG(PROG_SENDMAIL, sendmail,[], $PATH:/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib)
if test -n "$PROG_SENDMAIL"; then
AC_DEFINE(HAVE_SENDMAIL,1,[whether you have sendmail])
fi
@@ -416,7 +472,7 @@ dnl
AC_DEFUN(PHP_BUILD_THREAD_SAFE,[
enable_experimental_zts=yes
if test "$pthreads_working" != "yes"; then
AC_MSG_ERROR(ZTS currently requires working POSIX threads. Your system does not support this.)
AC_MSG_ERROR(ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads.)
fi
])
@@ -475,7 +531,7 @@ AC_DEFUN(AC_EXPAND_PATH,[
$2="$1"
else
changequote({,})
ep_dir="`echo $1|sed 's%/*[^/][^/]*$%%'`"
ep_dir="`echo $1|sed 's%/*[^/][^/]*/*$%%'`"
changequote([,])
ep_realdir="`(cd \"$ep_dir\" && pwd)`"
$2="$ep_realdir/`basename \"$1\"`"
@@ -878,3 +934,42 @@ int main(void) {
fi
])
AC_DEFUN(PHP_FOPENCOOKIE,[
AC_CHECK_FUNC(fopencookie, [ have_glibc_fopencookie=yes ])
if test "$have_glibc_fopencookie" = "yes" ; then
dnl this comes in two flavors:
dnl newer glibcs (since 2.1.2 ? )
dnl have a type called cookie_io_functions_t
AC_TRY_COMPILE([ #define _GNU_SOURCE
#include <stdio.h>
],
[ cookie_io_functions_t cookie; ],
[ have_cookie_io_functions_t=yes ],
[ ] )
if test "$have_cookie_io_functions_t" = "yes" ; then
cookie_io_functions_t=cookie_io_functions_t
have_fopen_cookie=yes
else
dnl older glibc versions (up to 2.1.2 ?)
dnl call it _IO_cookie_io_functions_t
AC_TRY_COMPILE([ #define _GNU_SOURCE
#include <stdio.h>
],
[ _IO_cookie_io_functions_t cookie; ],
[ have_IO_cookie_io_functions_t=yes ],
[] )
if test "$have_cookie_io_functions_t" = "yes" ; then
cookie_io_functions_t=_IO_cookie_io_functions_t
have_fopen_cookie=yes
fi
fi
if test "$have_fopen_cookie" = "yes" ; then
AC_DEFINE(HAVE_FOPENCOOKIE, 1, [ ])
AC_DEFINE_UNQUOTED(COOKIE_IO_FUNCTIONS_T, $cookie_io_functions_t, [ ])
fi
fi
])
+1 -1
View File
@@ -238,7 +238,7 @@ registers two INI entries - "foo" and "bar". They're given defaults "1"
and "bah" respectively - note that all defaults are always given as
strings. That doesn't reduce your ability to use integer values, simply
specify them as strings. "foo" is marked so that it can be changed by
anyone at any time (PHP_INI_ALL), whereas "foo" is marked so it can be
anyone at any time (PHP_INI_ALL), whereas "bar" is marked so it can be
changed only at startup in the php3.ini only, presumably, by the system
administrator (PHP_INI_SYSTEM).
When "foo" changes, no function is called. Access to it is done using the
+34
View File
@@ -0,0 +1,34 @@
#! /bin/sh
# +----------------------------------------------------------------------+
# | 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: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id$
#
# cwd must be top_srcdir
test -f build/bsd_makefile || exit 2
test -f bsd_converted && exit 0
tmpfile=`mktemp /tmp/bsd_makefile.XXXXXX 2>/dev/null` || tmpfile="tmp.$$"
for i in build/*.mk; do
sed 's/^include \(.*\)/.include "\1"/' $i >$tmpfile \
&& cp $tmpfile $i
done
rm -f $tmpfile
touch bsd_converted
exit 0
+6 -5
View File
@@ -26,7 +26,7 @@ LT_TARGETS = ltconfig ltmain.sh config.guess config.sub
makefile_in_files = $(makefile_am_files:.am=.in)
makefile_files = $(makefile_am_files:e.am=e)
config_h_in = php_config.h.in
config_h_in = main/php_config.h.in
acconfig_h_SOURCES = acconfig.h.in $(config_h_files)
@@ -54,23 +54,24 @@ $(makefile_in_files): $(makefile_am_files) aclocal.m4 configure.in $(config_m4_f
fi; \
done
@test -f want_dependencies || flag=-i; \
automake -a $$flag $(AMFLAGS) $(makefile_files) \
|| true >&2
automake -a $$flag $(AMFLAGS) $(makefile_files) 2>&1 | $(SUPPRESS_WARNINGS)
@for i in $(LT_TARGETS); do mv $$i.bak $$i; done
aclocal.m4: configure.in acinclude.m4 dynlib.m4
aclocal
SUPPRESS_WARNINGS = (egrep -v '(warning: AC_TRY_RUN called without default to allow cross compiling|AC_PROG_CXXCPP was called before AC_PROG_CXX|.*AM_PROG_LEX.*)'||true)
$(config_h_in): configure acconfig.h
# explicitly remove target since autoheader does not seem to work
# correctly otherwise (timestamps are not updated)
@echo rebuilding $@
@rm -f $@
@autoheader 2>&1 | (grep -v 'warning: AC_TRY_RUN called without default to allow cross compiling'||true)
@autoheader 2>&1 | $(SUPPRESS_WARNINGS)
$(TOUCH_FILES):
touch $(TOUCH_FILES)
configure: aclocal.m4 configure.in $(config_m4_files)
@echo rebuilding $@
@autoconf 2>&1 | (grep -v 'warning: AC_TRY_RUN called without default to allow cross compiling'||true)
@autoconf 2>&1 | $(SUPPRESS_WARNINGS)
Loaded 100 of 1175 files, more files were not shown because too many files have changed in this diff. Show more