Commit Graph

638 Commits

Author SHA1 Message Date
Zeev Suraski
430571d62c Initial work on the protected env vars stuff 2000-01-30 20:31:41 +00:00
Zeev Suraski
8a2f6c5e60 @- Fixed a crash bug in strtr() working on large input strings (Zeev) 2000-01-29 17:54:30 +00:00
Zeev Suraski
9ab35ae393 Tried to centralize global variable registration as much as possible:
- Added $HTTP_ENV_VARS[] and $HTTP_SERVER_VARS[] support, which similarly
  to $HTTP_GET_VARS[], contain environment and server variables.  Setting
  register_globals to Off will now also prevent registration of the
  environment and server variables into the global scope (Zeev)
- Renamed gpc_globals to register_globals (Zeev)
- Introduced variables_order that deprecates gpc_order, and allows control
  over the server and environment variables, in addition to GET/POST/Cookies
  (Zeev)
2000-01-28 17:24:53 +00:00
Zeev Suraski
fc678100cd post.c really had nothing to do with POST anymore, and it belongs to the top level directory 2000-01-28 13:31:12 +00:00
Zeev Suraski
3a35a6955d Get rid of the old implementation 2000-01-28 12:53:05 +00:00
Zeev Suraski
4b006cb8b0 This doesn't seem to be necessary, and causes a leak in case of output_buffering=on 2000-01-18 22:25:48 +00:00
Zeev Suraski
62114c1806 Destructors no longer return ints, the low level problem it was intended to solve is long gone now... 2000-01-17 17:33:37 +00:00
Andrei Zmievski
2fc0dac01e (php_sockwait_for_data) timeout is not assigned yet, so check the right one. 2000-01-15 20:39:06 +00:00
Sascha Schumann
44a712d810 (php_sockwait_for_data) clean up 2000-01-15 19:51:44 +00:00
Andrei Zmievski
bfc85c288a Fix prototype. 2000-01-15 19:42:40 +00:00
Andrei Zmievski
4423bf9d10 Added ability to set timeout on socket read operations. New function
set_socket_timeout(socket, seconds, microseconds) sets the timeout.
@- Added ability to set timeout on socket read operations through
@ set_socket_timeout() function. (Andrei)
2000-01-15 19:41:17 +00:00
Zeev Suraski
a0591b32c7 Fix logic 2000-01-15 17:23:18 +00:00
Sascha Schumann
b83739945e Initialize flag correctly 2000-01-15 17:16:21 +00:00
Zeev Suraski
3f74baed02 Woops, forgot to commit the right version of the file... 2000-01-13 17:54:51 +00:00
Zeev Suraski
972631be71 - Added flush() support to SAPI
- Got rid of the old flush() implemenetation in favour of the new one
- Added implicit_flush() support to the output buffering layer.
@- Added implicit_flush() to control whether flush() should be called
@  implicitly after any output (Zeev)
2000-01-13 17:37:25 +00:00
Zeev Suraski
736570923d @- Fixed a crash in pfsockopen() (Zeev) 2000-01-10 19:56:23 +00:00
Zeev Suraski
8acd3e3818 @- Fixed a possible crash in phpinfo() (Zeev)
phpinfo() now ensures that HTTP_*_VARS[] are actually arrays before it tries
to access them...
2000-01-09 18:32:13 +00:00
Thies C. Arntzen
48e10ec9c4 @- Applied safe-mode patch to popen(). (Patch by Kristian Köhntopp) 2000-01-06 15:27:03 +00:00
Jouni Ahto
9a07df6c4a (php_setlocale) Fixed memory leak (bug #3105).
# Must have been thinking something else when originally wrote this.
2000-01-05 12:26:41 +00:00
Andi Gutmans
60841f1231 - Separate the overloaded objects' types from Zend's data types.
There is no reason for them to be the same, and IS_METHOD just cluttered
  the data types.
- Overloaded elements should now use OE_IS_OBJECT, OE_IS_ARRAY, and
  OE_IS_METHOD
2000-01-04 13:56:13 +00:00
Andi Gutmans
bdefd5da15 - Change IS_UNSET -> IS_NULL 2000-01-04 13:22:58 +00:00
Thies C. Arntzen
402a9db2fe @- str_repeat() now returns correct length. (Thies) 2000-01-04 09:45:28 +00:00
Thies C. Arntzen
953bf8bbf6 (var_dump, serialize, unserialize) support NULL
@- Added new NULL constant (Zeev, Zend library)
2000-01-02 11:49:27 +00:00
Sascha Schumann
890c1de998 Remove second (equal) definition of isleap() 2000-01-01 20:50:37 +00:00
Sascha Schumann
2fd8cbff2a Declare timezone only, if the system fails to do so. 2000-01-01 02:22:01 +00:00
Sascha Schumann
43ae2bffbb Happy Y2K patch! Happy new year (or the new millennium, depending on whether
you start counting at 0 or 1).
2000-01-01 01:32:05 +00:00
Zeev Suraski
ccb4b18348 Happy new year (especially to Thies :)
- Zend branch patches merged in - get the PHP tree uptodate
- Clean
1999-12-31 14:06:31 +00:00
Sascha Schumann
cf5a5fb1dd Whoops, defining them to empty values generates many parse errors.
Defaulting to 1.
1999-12-30 04:52:19 +00:00
Sascha Schumann
2c99bef442 Get rid of config.h.stub. Note that you should embed a comment about
what the respective define does into the AC_DEFINE macro. I.e.

AC_DEFINE(HAVE_FOO, 1, [Whether you have FOO])
1999-12-30 04:07:46 +00:00
Sascha Schumann
f2f8d38efa Integration of -ng changes. Changes:
- added support for externally built modules,
- improved support for in-tree shared modules,
- fixed diversion bugs,
- configure displays some informative messages,
- faster static build
  (libtool isn't used anymore for compiling non-PIC objects),
- dependencies comparable to automake's without requiring GNU make or GCC,
- working make clean for non-GNU makes.
1999-12-30 02:59:53 +00:00
Sascha Schumann
09d2e3d159 Move include into source file 1999-12-28 18:47:59 +00:00
Sascha Schumann
068596552d Cache results of crypt capability checks 1999-12-26 22:35:55 +00:00
Zeev Suraski
235386b245 Change ALLOC_ZVAL() semantics 1999-12-26 21:21:33 +00:00
Zeev Suraski
90f1218fbb - Change uint32 to php_uint32 (PostgreSQL defines uint32, and perhaps other packages too)
- PostgreSQL finally compiles&links
1999-12-26 00:18:44 +00:00
Andi Gutmans
d6f788f56a - Get rid of two warnings 1999-12-25 09:06:55 +00:00
Andi Gutmans
3bf1b04cb4 - Move more stuff to ALLOC_ZVAL(). We need to add those FREE_ZVAL()'s now. 1999-12-24 17:39:27 +00:00
Andi Gutmans
3f6e00e48d - Use ALLOC_ZVAL() in PHP. Finding the places to put FREE_ZVAL(z) is much
more tricky and I'm not sure how many places this is. zval allocations
  were only made directly in 11 places.
1999-12-24 15:43:39 +00:00
Thies C. Arntzen
63d0849403 pval->zval 1999-12-23 14:59:01 +00:00
Thies C. Arntzen
a94721fc4c @- strrev() no longer modifies arg1. (Thies) 1999-12-23 14:55:50 +00:00
Thies C. Arntzen
ec33704c39 @- Fixed buffer overruns in iptcembed(). (Thies) 1999-12-22 14:46:31 +00:00
Sascha Schumann
a2276107ab Some cleanup 1999-12-21 22:58:04 +00:00
Zeev Suraski
e538fcbf10 @- Fixed a bug in ODBC error reporting (Zeev)
@- Added PHP_Logo_GUID() and Zend_Logo_GUID() functions, that return the GUIDs
@  of the PHP and Zend logos used in phpinfo() (Zeev)
1999-12-21 20:35:43 +00:00
Andrei Zmievski
80bab9d939 We're using ZVAL's now. 1999-12-21 17:14:31 +00:00
Thies C. Arntzen
e96c5401f1 commented out select() & friends for now - we need to come up with a good API for those! 1999-12-21 16:51:27 +00:00
Sam Ruby
8a34d1a7e0 Further cleanup as including php.h is no longer harmful
- thanks to Sascha for noticing it.
Tested on Linux and WinNT, should work everywhere.
1999-12-21 02:34:20 +00:00
Sascha Schumann
ed0a307ccd Use sapi_module_struct to contain SAPI module name 1999-12-20 23:09:54 +00:00
Andrei Zmievski
6e1dbe497c Made quotemeta() binary-safe.
@ Made quotemeta() binary-safe. (Andrei)
1999-12-20 20:43:47 +00:00
Andrei Zmievski
1ad5180f28 getParameters -> zend_get_parameters 1999-12-20 17:34:55 +00:00
Zeev Suraski
f455a484bd Make the Win32 tree compile again 1999-12-20 15:38:44 +00:00
Sascha Schumann
0d70a91b6d Add information about chosen SAPI module to phpinfo() 1999-12-20 07:12:27 +00:00
Evan Klinger
f5d5637f72 Ex API 1999-12-20 02:09:58 +00:00
Evan Klinger
eb54c032c8 Ex API 1999-12-20 01:23:15 +00:00
Evan Klinger
9ea9ca32ba Ex API and UDP support.
@- Added UDP support in fsockopen() (Evan).
# UDP activated with "udp://hostname"
1999-12-20 00:55:58 +00:00
Zeev Suraski
489de5dce2 Support the latest update to call_user_function_ex() 1999-12-19 18:58:27 +00:00
Sascha Schumann
cb45c2ea55 Use zend_sprintf by default (which is defined to sprintf, if the system's
sprintf is useable).
1999-12-19 14:39:41 +00:00
Sascha Schumann
63d4411560 Use workaround function for sprintf, if the return value of sprintf is needed 1999-12-19 02:12:31 +00:00
Zeev Suraski
a1ad2872ee - The tree compiles again 1999-12-18 22:40:35 +00:00
Zeev Suraski
3ee4e65c95 More php3_ annihilation 1999-12-18 04:01:20 +00:00
Zeev Suraski
396bccfb1d More php3_ cleanup 1999-12-17 22:34:04 +00:00
Zeev Suraski
2d0b84ee30 More work on php3_ annihilation... 1999-12-17 20:55:32 +00:00
Zeev Suraski
fb1c77bd4f - Made PHP_VERSION and PHP_OS work again
- More php3_ cleanup
@- Restored the PHP_VERSION and PHP_OS constants (Zeev)
1999-12-17 20:55:31 +00:00
Zeev Suraski
a3c6514332 More php3_ annihilation 1999-12-17 19:51:39 +00:00
Zeev Suraski
02d3b39420 More php3_ annihilation 1999-12-17 19:16:50 +00:00
Andrei Zmievski
8f17fbb900 Added get_loaded_extensions(), extension_loaded(), and
get_extension_funcs() functions.
@ Added get_loaded_extensions(), extension_loaded(), and
get_extension_funcs() functions. (Andrei)
1999-12-16 23:47:10 +00:00
Andrei Zmievski
1be7a8d461 Moved function_exists() to Zend library. 1999-12-14 22:15:55 +00:00
Thies C. Arntzen
1cad06afda (getimagesize) grrr, fixed newly (30 min ago) introduced NPR 1999-12-14 04:32:54 +00:00
Thies C. Arntzen
ad764253ca use ex-API 1999-12-14 04:10:01 +00:00
Thies C. Arntzen
6553540153 @- implemented count_chars(). (Thies) 1999-12-14 03:52:12 +00:00
Thies C. Arntzen
8267934235 use ex-API 1999-12-14 03:49:42 +00:00
Thies C. Arntzen
d90daba134 use _ex-API 1999-12-14 03:48:46 +00:00
Andrei Zmievski
8ebba516a3 Boo. 1999-12-14 03:25:04 +00:00
Andrei Zmievski
a15916a47a Made strspn() and strcspn() binary-safe.
# Please test if you can, especially cases with embedded chr(0).

@ Made strspn() and strcspn() binary-safe.
1999-12-13 23:40:36 +00:00
Andrei Zmievski
457a13dac5 Finished array_multisort() function. Basically it sorts multiple arrays
similar to ORDER BY SQL clause.
@ Added array_multisort() function. (Andrei)
# Docs are coming soon
1999-12-13 19:42:26 +00:00
Sascha Schumann
e911ee38bd Make rand.c thread-safe. 1999-12-13 18:31:29 +00:00
Sascha Schumann
61a6a92618 Make filestat.c thread-safe 1999-12-12 16:48:54 +00:00
Sascha Schumann
d9258da42e @- Made pageinfo.c thread-safe (Sascha) 1999-12-12 16:14:40 +00:00
Sascha Schumann
9278d9d911 Remove unnecessary ARRAYLS_FETCH() calls 1999-12-12 10:50:30 +00:00
Andrei Zmievski
dbaf6c5c65 Added array globals in preparation for multisort() changes. 1999-12-11 22:42:01 +00:00
Andrei Zmievski
0c779c51c9 (PHP php_implode) Made binary-safe.
@ Made implode() binary-safe (Andrei)
1999-12-11 20:00:40 +00:00
Andrei Zmievski
33d82cb6d1 get_meta_tags() was using php_stristr() so it needed to be changed.
Optimized it to use php_memnstr() directly.
1999-12-11 19:51:04 +00:00
Andrei Zmievski
17ff0f3af3 Made strstr(), stristr(), and ucwords() binary-safe(). Also corrected
stristr() behavior to match that of strstr() if needle is not a string.
@ Made strstr(), stristr(), and ucwords() binary-safe() (Andrei)
1999-12-11 19:50:01 +00:00
Andrei Zmievski
d18ff45c4c A few more fixes for php_strtolower(). 1999-12-10 04:44:32 +00:00
Andrei Zmievski
7e4bd9fb60 (PHP strtoupper, strtolower, substr_replace) Made binary-safe.
@Made strtoupper(), strtolower(), substr_replace() binary-safe. (Andrei)
1999-12-09 23:45:30 +00:00
Thies C. Arntzen
0489895d0b (unserialize) closed mem-leak 1999-12-09 11:24:51 +00:00
Sascha Schumann
01c7fc6c8f Use global ctor in non-ZTS mode as well 1999-12-08 19:07:58 +00:00
Thies C. Arntzen
276c0a378d (unserialize) now cleans up better on failure! 1999-12-08 14:40:46 +00:00
Thies C. Arntzen
f7089e600f make non-ZTS happy again 1999-12-08 14:18:28 +00:00
Thies C. Arntzen
5fad6deb65 this is the "right" ZTS-fix 1999-12-08 11:47:50 +00:00
Sam Ruby
b9f27a4743 Fill in empty constructor in order to appease Sascha ;-)
More seriously, uninitialized values cause MSHUTDOWN to trap.
Only an issue because assert was added to internal_functions.
1999-12-07 21:07:42 +00:00
Thies C. Arntzen
7b7192dda3 added assert.quiet_eval plus a bit of cleaning (docs to follow!) 1999-12-07 16:45:46 +00:00
Sam Ruby
8fdd352404 fixed just enough to enable assert to build on win32 and Linux/ZTS 1999-12-07 16:28:27 +00:00
Thies C. Arntzen
f02f67e83c fixed NPR 1999-12-07 13:33:37 +00:00
Thies C. Arntzen
2f7693963d @- Added support for a C-like assert() function. (Thies) 1999-12-07 13:08:17 +00:00
Thies C. Arntzen
19ce7e05db getting there 1999-12-07 12:33:36 +00:00
Thies C. Arntzen
a807dd31e9 new assert() module. (Not yet finished!) 1999-12-07 11:37:30 +00:00
Thies C. Arntzen
5cdb16ad09 (explode) fixed newly introduced bug (them shall check twice *before* committing!) 1999-12-07 08:14:00 +00:00
Evan Klinger
1fe899d8cd Mention CyberCash. 1999-12-07 02:49:03 +00:00
Sam Ruby
e3cbafdda6 -kludges -warning +reentrancy(more) +compiles(Unix) 1999-12-07 02:47:35 +00:00
Zeev Suraski
40eb2bb5b0 First step in making parsedate.y thread safe - use a pure parser 1999-12-06 19:04:01 +00:00
Thies C. Arntzen
beb9723617 fixed warning 1999-12-06 19:01:21 +00:00
Thies C. Arntzen
1095f8a502 @- explode() is now binary-safe. (Thies)
we save one buffer-copy as well (hehe)
1999-12-06 18:29:22 +00:00
Thies C. Arntzen
db3cf21e55 @- strpos() is now binary-safe. (Thies) 1999-12-06 17:37:59 +00:00
Zeev Suraski
02d76f8b86 This is no longer needed. Note that we'll always need to undefine YYSTYPE, since
the template bison generated .h file defines it if it's not already defined.
1999-12-06 15:34:05 +00:00
Thies C. Arntzen
5201f90588 removed unneded CLS_FETCH() 1999-12-06 13:08:16 +00:00
Sam Ruby
7ae5d271b6 build error: wrong num parms to date_parse 1999-12-06 05:28:26 +00:00
Sascha Schumann
4a60eed469 Fix some warnings 1999-12-05 16:25:32 +00:00
Rasmus Lerdorf
dfd0f8824c More maintainer-mode cleanups 1999-12-05 14:16:37 +00:00
Rasmus Lerdorf
ca362445c4 Fix a maintainer-mode warning 1999-12-05 13:41:42 +00:00
Stig Bakken
ae1b7bf4b8 @Fix warnings compiling in maintainer mode. (Stig)
Fix warnings compiling in maintainer mode.
Install DB/common.php and DB/mysql.php on "make install".
# We still have a warning from http_config.h:97.  Rasmus? :-)
1999-12-05 10:29:06 +00:00
Stig Bakken
0dd9658485 #if -> #ifdef change for HAVE_LIBDL (to be consistent with the same symbol
in libzend).
1999-12-04 20:55:33 +00:00
Sascha Schumann
5b983c944f Clean up php3.*\.h files. The files itself are renamed, and references in all
.*\.[ch] files were changed. There is a slight chance that my script missed
a few changes, please correct them manually.
1999-12-04 19:19:57 +00:00
Sascha Schumann
b978a64ebb Check for htonl in libsocket (sol251), and move inet_aton check in libbind to configure.in, so that our later AC_CHECK_FUNCS(inet_aton) will find inet_aton in libbind (if it is there). 1999-12-04 13:16:04 +00:00
Sam Ruby
70b97864f8 windows build errors 1999-12-03 20:08:24 +00:00
David Hedbor
b40afedd7e Added credit notes for Roxen SAPI module 1999-12-03 17:10:18 +00:00
Sascha Schumann
7c209d774c Use socklen_t where appropiate 1999-12-03 14:57:29 +00:00
Stig Bakken
a8f71d621f Add configure command to phpinfo() output (Stig) 1999-12-03 13:31:41 +00:00
Stig Bakken
2467dd6d05 @Fix some warnings when compiling in maintainer-mode (Stig)
@Made mysql and gd work as shared extensions again (Stig)
- Fixed some warnings in maintainer-mode.
- Made mysql and gd work as shared extensions again by defining
  COMPILE_DL if PIC is defined.
# We need a better solution for building .so extensions than this
# PIC/COMPILE_DL hack!
1999-12-01 22:59:45 +00:00
Zeev Suraski
15d47e551a Test commit, ignore 1999-12-01 21:30:45 +00:00
Zeev Suraski
3467337217 @- Made the GET/POST/Cookie and their HTTP_*_VARS[] counterparts be references
@  to each other (Zeev)
1999-12-01 21:29:09 +00:00
Zeev Suraski
d6fd485692 @- Make the global GET/POST/Cookie variables and their $HTTP_*_VARS[] counterparts
@  be references to each other (Zeev)
1999-12-01 20:42:56 +00:00
Sascha Schumann
3b515617a4 Make array.c thread-safe 1999-12-01 17:21:52 +00:00
Sascha Schumann
94c36e8846 Make fsock module thread-safe 1999-12-01 17:07:25 +00:00
Sam Ruby
933c3121c5 libzend/zend_compile.h's #define YYSTYPE causes parsedate to barf on Windows 1999-12-01 14:24:45 +00:00
Andi Gutmans
2337d110f9 - Added opened_path to php_fopen_wrapper() and the URL fopen wrapper (it's not
always properly set, it's a TODO for all of us).  This enables us to implement
  true 'use' support.
@- Added support for the 'use' keyword - behaves like 'require', but will not
@  use the same file more than once (Andi & Zeev, Zend library)
1999-11-30 20:18:11 +00:00
Sam Ruby
fd9265362c Initial alpha-level of sapi/servlet. See README for details. 1999-11-29 15:36:25 +00:00
Sam Ruby
0383909477 Use thread-safe versions of localtime and gmtime on Win32 too 1999-11-29 14:04:16 +00:00
Andi Gutmans
0ab2c37540 - Add OLS_C so that we can call php_output_init_globals() with it. 1999-11-28 20:38:44 +00:00
Rasmus Lerdorf
7cefad61ed # check link() as well 1999-11-28 16:35:26 +00:00
Rasmus Lerdorf
6132f85c8d (symlink) Disable symlinks to urls
@- Disable symlinks to urls
1999-11-28 16:23:30 +00:00
Sascha Schumann
6216edda44 Make basic/string functions thread-safe 1999-11-28 00:31:02 +00:00
Sascha Schumann
8573448db2 one tmbuf is enough 1999-11-27 21:18:01 +00:00
Jouni Ahto
3e8303abf0 Use thread-safe versions of localtime and gmtime 1999-11-27 20:51:17 +00:00
Sascha Schumann
b6e6dddc30 Only compile the scanner, if trans_sid is enabled 1999-11-27 16:15:35 +00:00
Sascha Schumann
1a851b5d03 Kill undefined reference 1999-11-26 22:37:45 +00:00
Sascha Schumann
9f386181f5 Undefine HAVE_PUTENV, if ZTS is used 1999-11-26 21:20:40 +00:00
Sascha Schumann
2ec047e1ec Kill one race. 1999-11-26 21:04:40 +00:00
Sascha Schumann
f0187ef3c9 Use php_init_output_globals() also in non-ZTS mode 1999-11-26 18:34:27 +00:00
Sascha Schumann
1c6173619e Use thread-safe versions of localtime and gmtime 1999-11-26 16:29:00 +00:00
Zeev Suraski
061cfea2ac *** empty log message *** 1999-11-26 13:56:33 +00:00
Sascha Schumann
38819040b6 Replace strtok with strtok_r 1999-11-26 13:34:31 +00:00
Sascha Schumann
d462115341 Killing some unused variable warnings 1999-11-24 17:56:31 +00:00
Evan Klinger
18fb96efb4 Freeing the memory would be a good idea... 1999-11-24 06:16:37 +00:00
Evan Klinger
633d18de0f Can't forget fd_isset() 1999-11-24 03:47:58 +00:00
Evan Klinger
769e25e168 First attempt at fd_set() and select()
# Please test thoroughly
1999-11-24 03:05:10 +00:00
Zeev Suraski
db0fcc6d11 Use the unified notation... 1999-11-23 22:10:44 +00:00
Zeev Suraski
e9742f5458 Cosmetic changes 1999-11-23 21:08:51 +00:00
Evan Klinger
42f8f2516d Convert to Ex API
# If someone could please check these I'd appreciate it
1999-11-23 06:46:40 +00:00
Sam Ruby
5385610450 errors during startup trap server 1999-11-23 03:10:46 +00:00
Zeev Suraski
9820dd0927 Fixed a leak when using automatic output buffering
@ Fixed a leak when using automatic output buffering (Zeev)
1999-11-22 20:58:56 +00:00
Frank M. Kromann
8aed1627c0 add MS SQL module to credit info 1999-11-22 19:10:14 +00:00