Commit Graph

346 Commits

Author SHA1 Message Date
Zeev Suraski
80bdd19e03 Fine tune Andi's patch 2000-02-11 15:59:30 +00:00
Andi Gutmans
29280bb9ec - Get rid of some more evil MSVC5's and switch standard/ to use PHP_WIN32 2000-02-10 21:53:56 +00:00
Zeev Suraski
6d0ab6166c SAPIfication, Episode VI: Return of the SAPI
Remove mostly all references to APACHE and CGI_BINARY from the code.

- Apache include files are no longer included by any PHP code, except for the Apache SAPI module.
- No server specific code is in any of the base PHP code.

Still left to be done:
- Eliminate any references to APACHE from the few remaining modules.
- Move request_info.c's logic to SAPI
- Modify the regex function names, and globals, so that we can always
  include them, without having to fear any interference with Apache;
  Always use the bundled regex library
2000-02-10 19:41:21 +00:00
Zeev Suraski
2460569ccb Change string->str where possible; string is basic a C++ class, so gdb can't look
inside variables named 'string'.
2000-02-08 22:21:43 +00:00
Zeev Suraski
489b705d4b @- Fixed memory corruption in fgetss(), strip_tags() and gzgetss() (Zeev) 2000-02-08 21:29:18 +00:00
Zeev Suraski
c12aa454ff Compile fixes 2000-02-05 15:44:20 +00:00
Andrei Zmievski
1a4e39838f (PHP wddx_deserialize) Fixed a problem with deserializing empty values.
(php_addslashes) Guard against NULL data.
2000-02-02 21:53:27 +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
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
Thies C. Arntzen
402a9db2fe @- str_repeat() now returns correct length. (Thies) 2000-01-04 09:45:28 +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
Sascha Schumann
09d2e3d159 Move include into source file 1999-12-28 18:47:59 +00:00
Andi Gutmans
d6f788f56a - Get rid of two warnings 1999-12-25 09:06:55 +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
Andrei Zmievski
6e1dbe497c Made quotemeta() binary-safe.
@ Made quotemeta() binary-safe. (Andrei)
1999-12-20 20:43:47 +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
Thies C. Arntzen
6553540153 @- implemented count_chars(). (Thies) 1999-12-14 03:52:12 +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
0c779c51c9 (PHP php_implode) Made binary-safe.
@ Made implode() binary-safe (Andrei)
1999-12-11 20:00:40 +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
5cdb16ad09 (explode) fixed newly introduced bug (them shall check twice *before* committing!) 1999-12-07 08:14:00 +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
Rasmus Lerdorf
dfd0f8824c More maintainer-mode cleanups 1999-12-05 14:16:37 +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
3b515617a4 Make array.c thread-safe 1999-12-01 17:21:52 +00:00
Sascha Schumann
6216edda44 Make basic/string functions thread-safe 1999-11-28 00:31:02 +00:00
Thies C. Arntzen
9788129e0e (PHP strtr) little smarter 1999-11-21 12:05:39 +00:00
Andrei Zmievski
90ecf41b19 (PHP substr_replace) Changed the order of the arguments. 1999-11-20 22:09:27 +00:00
Thies C. Arntzen
2013026c14 @- Implemented 2-Arg version of strtr($str,$translation_array). This can be used
@  to revert what htmlspecialchars() did. (Thies)
(PHP strtr) new 2-Arg version.
1999-11-20 15:53:18 +00:00
Andrei Zmievski
e46198bf7b (PHP substr_replace) New function.
@- Added substr_replace() function. (Andrei)
1999-11-16 22:44:13 +00:00
Thies C. Arntzen
4127b34a0a @- ucfirst()/ucwords() no longer modify arg1. (Thies)
(PHP ucfirst,ucwords) no longer modify arg1
1999-11-14 17:20:56 +00:00
Thies C. Arntzen
f2b0c70512 @- Fixed strtr() not to modify arg1. (Thies)
(PHP strtr) no longer modifies arg1.
1999-11-14 15:34:50 +00:00
Andrei Zmievski
b8ecfa18c1 (PHP str_repeat) New function. 1999-10-27 22:06:05 +00:00
Andrei Zmievski
9e0017536d _php3/_php3i -> php rename 1999-10-16 16:35:20 +00:00
Andrei Zmievski
22fb5f281a Renamed a couple of functions to have proper php_ prefix. 1999-10-15 20:04:31 +00:00
Andrei Zmievski
d69d118cbd (PHP implode): Properly separate zval for another case. 1999-10-15 14:53:56 +00:00
Zeev Suraski
231fe2e1aa That should do the trick - fix implode() not to modify its arguments 1999-10-15 14:45:54 +00:00
Jouni Ahto
9109d8dcdd (PHP setlocale) Locale settings are now correctly restored to the values
set in environment at request shutdown.
@- setlocale doesn't anymore screw up things if you forgot to change it back
   to the original settings. (Jouni)
# Trying to conform to the rules set up by Andrei. Let's hope this works.
1999-10-08 02:10:57 +00:00
Andrei Zmievski
97f105e450 Fix nl2br crash. 1999-09-30 20:03:32 +00:00
Andi Gutmans
cf6c92949c - Get rid of warning 1999-09-28 17:37:06 +00:00
Sascha Schumann
9442b13939 Make an extra copy of input parameter. 1999-09-27 18:00:30 +00:00
Sascha Schumann
9d1c26481a Use new Zend API 1999-09-25 11:55:42 +00:00
Stig Bakken
a4bc9478f8 kill another warning 1999-09-24 15:34:54 +00:00
Rasmus Lerdorf
cd0957112b fgetss/gzgetss fixes 1999-09-21 17:50:51 +00:00
Andrey Hristov
53fb0ea075 A couple of fixes. 1999-09-21 17:06:30 +00:00
Egon Schmid
565c322797 Here was also something missing. 1999-09-20 20:05:26 +00:00
Andi Gutmans
96a19593b2 - Internal functions which are basic language functions should be in Zend
and not in PHP. I.e. strlen(), each(), error_reporting(), count(),
  get_class_name().
1999-09-20 16:56:02 +00:00
Rasmus Lerdorf
c0dcedcafc Added optional allowable_tags arguments to strip_tags() and fgetss() to
allow you to specify a string of tags that are not to be stripped

Could have used flex for this, and Andrew sent me a flex file to do this,
but I could do the same thing with only minor additions to the existing
state machine and the resulting code is much smaller and tighter.
1999-09-20 15:50:56 +00:00
Zeev Suraski
98d95dd88e - Added support for unknown POST content types (Zeev)
- Introduce the convert_to_*_ex() API in strlen()
1999-09-16 23:18:15 +00:00
Zeev Suraski
1b6ccfe86c Cleanups & optimizations 1999-09-11 14:09:29 +00:00
Andi Gutmans
48ab0fb57d - Fix warnings and win32 compile 1999-09-07 20:29:31 +00:00
Andrey Hristov
209fe717b1 Kill warnings. 1999-09-07 16:09:18 +00:00
Jakub Skopal
5cc16d86b0 Added addcslashes(), stripcslashes().
Reverted addslashes() to the very original behaviour.
1999-09-05 20:55:13 +00:00
Jakub Skopal
8c2f752c3d C++ comment fix... sorry. 1999-09-05 00:58:59 +00:00
Jakub Skopal
06545c3364 Appended second argument of addslashes(),
Changed php_addslashes() to add \000 instead of just \0
1999-09-05 00:55:48 +00:00
Zeev Suraski
c12d4bc7d4 *** empty log message *** 1999-09-04 13:18:59 +00:00
Philippe Verdy
646db4f072 signed/unsigned warning removed 1999-08-12 10:53:29 +00:00
Egon Schmid
8588b58a5e More typos. 1999-08-09 20:52:58 +00:00
Zeev Suraski
3cb1eb0471 Removed '3' from key functions in PHP (maintained compatibility through
php3_compat.h)
1999-08-02 19:17:14 +00:00
Zeev Suraski
3ee8c8f0da This should fix the implode() problem 1999-07-30 22:17:51 +00:00
Andrey Hristov
736f4831a5 A bunch of grunt work updating function entries and declarations. 1999-07-24 22:16:54 +00:00
Sascha Schumann
58bb4adae1 use the same version as in php3 1999-07-21 09:31:48 +00:00
Zeev Suraski
4e6c2b468c * Get the mSQL module up to date 1999-07-16 17:06:48 +00:00
Zeev Suraski
c5724cbd14 License update 1999-07-16 13:13:16 +00:00
Andrey Hristov
226f75e0f3 Making the function accessible. 1999-06-22 19:36:52 +00:00
Thies C. Arntzen
8052667684 fixed implode "again" - 1999-06-21 15:57:20 +00:00
Stig Bakken
117a2fba07 * fixed some #if/#ifdef issues
* hand-patched in php3 changes from 3.0.6 to HEAD in these files:
   fopen-wrappers.[ch] ext/standard/file.[ch] ext/standard/fsock.[ch]
   ext/standard/php3_string.h ext/standard/string.c
* added some new file/socket macros for more readable code:
   FP_FGETS(buf,len,sock,fp,issock)
   FP_FREAD(buf,len,sock,fp,issock)
   FP_FEOF(sock,fp,issock)
   FP_FGETC(sock,fp,issock)
1999-06-16 17:06:53 +00:00
Stig Bakken
8c4411b5da * reverse fsock/string import patches 1999-06-15 21:51:00 +00:00
Stig Bakken
336392ea6c * now using php4.ini instead of php3.ini
* re-imported fopen-wrappers, fsock and string code from php3
  NB!  I have not tested all of the imported functions yet.
1999-06-15 17:06:22 +00:00
Thies C. Arntzen
a3464b7c11 oci8 to 3.0.9
implode works!
1999-06-09 19:47:06 +00:00
Sascha Schumann
a37a5e5c4a char * => unsigned char * 1999-05-16 11:32:51 +00:00
Sascha Schumann
39691bed9e conv_proto *.[ch] 1999-05-16 11:19:26 +00:00
Sascha Schumann
ed8a7dff62 add fast bin2hex string function 1999-05-16 11:12:23 +00:00
Sascha Schumann
a4d20864a6 - regex cache (needs some work)
- str_replace changes from php3
1999-05-12 15:40:15 +00:00
Rasmus Lerdorf
fbeeb8f29c substr() fix 1999-05-12 12:53:45 +00:00
Rasmus Lerdorf
43d93b6533 substr() fix for PHP4 as well 1999-05-12 12:43:03 +00:00
Zeev Suraski
ba88c0c47c * Move unclean_shutdown from PHP to Zend.
* The Master/Local headers in the phpinfo() table were reversed.
* Fix a gpc bug
1999-05-11 16:52:58 +00:00
Zeev Suraski
0818d96c97 A lot of cleanups... Removed old thread-safe code and other redundant code and files 1999-04-24 00:12:00 +00:00
Zeev Suraski
6f7c0edee3 Remove tls.[ch] 1999-04-23 20:06:01 +00:00
Stig Bakken
2c0ad3ee25 last bunch of extensions moving to ext/
fhttpd module taken out of functions, functions is ready to go.
The only extensions I have tested are gd+freetype and odbc(solid).
Please try compiling in your favourite extensions and let me know how it
works.
1999-04-22 02:48:28 +00:00
Zeev Suraski
751709a469 * Rename php_compat.[ch] to flock_compat.[ch] and move it to ext/standard
* Fix Win32 compilation
1999-04-21 19:01:38 +00:00
Sascha Schumann
dcc16af80c port some fixes, add compat routines 1999-04-21 17:11:01 +00:00
Sascha Schumann
a6e4ef3e31 str_replace fix 1999-04-21 16:31:27 +00:00
Zeev Suraski
5e8c322859 Make Win32 happy with the recent changes. 1999-04-18 15:58:27 +00:00
Stig Bakken
257de2bade First commit of re-structuring phase one. We have started using automake in
sub-directories and started to move extension code into ext/<name>.  For now,
I have moved the "standard" extension (which is quite a mix of everything
right now) and the GD extension into their own subdirs in ext/.
The configure script now also runs configure in the libzend directory
automatically and makes sure php4 and libzend use the same config.cache file.
To avoid running configure in libzend, use the --no-recursion option.
"make" in php4 also builds libzend now.
The Apache module doesn't compile right now, but a fix for that is
coming up.
1999-04-17 00:37:12 +00:00