Commit Graph

483 Commits

Author SHA1 Message Date
Sebastian Bergmann
3f4a4a3643 Change copyright note. 2001-06-19 21:14:39 +00:00
Harald Radi
22790c9602 removed warnings 2001-06-10 23:26:35 +00:00
Sascha Schumann
5ebe991cfe Signal that no entry was found 2001-06-10 14:12:28 +00:00
Sascha Schumann
b31801b249 Check for http_session_vars != NULL. 2001-06-08 11:45:53 +00:00
Rasmus Lerdorf
9c55882133 Fold a bit more code 2001-06-06 14:32:27 +00:00
Sterling Hughes
db305fc6f7 small ws fix. 2001-05-30 20:16:23 +00:00
Sterling Hughes
28160f73d0 Revert as per Herr Schumann's request. 2001-05-30 19:56:11 +00:00
Sterling Hughes
506ceb28fc Try #2
# aka, flying blind in a shitstorm, but it shouldn't hurt anything
2001-05-30 19:43:27 +00:00
Sterling Hughes
948edd322b should fix warnings under winblows. 2001-05-30 18:33:46 +00:00
Stig Bakken
1beda9ee1e * include "config.h" if HAVE_CONFIG_H is defined (for standalone dso build) 2001-05-24 10:07:29 +00:00
Sascha Schumann
3ffaa634a2 fix buggy debug statements 2001-05-24 01:12:11 +00:00
Sascha Schumann
5e112d4384 Due to dynamic registration of storage handlers, OnUpdateSaveHandler
might be called before that registration takes place and hence the
INI update is dismissed.  In that case, we defer the lookup to the
first request init.
2001-05-23 23:18:51 +00:00
Andi Gutmans
14ac3d74b9 - Nuke GINIT 2001-05-23 17:10:40 +00:00
Andrei Zmievski
699489d456 @- Made $HTTP_SESSION_VARS['foo'] and $foo be references to the same value
@  when register_globals is on. (Andrei)
2001-05-22 17:55:07 +00:00
Sascha Schumann
e2eaf6342e Add support for systems where p{read|write} take a off64_t without
being properly prototyped.
2001-05-20 23:39:09 +00:00
Sascha Schumann
060983b184 Use zend_hash_add_empty_element 2001-05-19 14:51:39 +00:00
Sascha Schumann
6c3b8d5619 Improve reading from external data source for session id creation.
Improve generating the string representation of the md5 session id.
2001-05-19 09:58:31 +00:00
Sascha Schumann
90c2979144 Nuke some warnings. 2001-05-13 07:37:28 +00:00
Sascha Schumann
afdaee9e47 Nuke more quotes 2001-05-12 11:09:05 +00:00
Sascha Schumann
8a3eb51a26 Replace ssize_t with long, as Win32 lacks proper support for that type. 2001-05-12 08:39:33 +00:00
Sascha Schumann
814fa2c71c Save a couple of syscalls per session
Fix apparent new-session-files-were-not-locked bug

Replace %m with portable "%s", strerror(errno)
2001-05-11 17:43:40 +00:00
Sascha Schumann
9de9b7c1e9 add an interface for registering storage modules at run-time. 2001-05-03 15:48:49 +00:00
Andrei Zmievski
ea56318495 Patch from Sascha that abstracts session serializers. WDDX extension
now implements the encode/decode functions and registers them with
the session module.
2001-05-01 17:01:51 +00:00
Andi Gutmans
4c823e8a89 - Change macros from V_ to VCWD_ because of AIX name clash 2001-04-30 12:45:02 +00:00
Andi Gutmans
6e8f7a06f6 - use get_current_key_ex() in order to receive key length and not having
- to use strlen() everywhere.
2001-04-26 02:54:27 +00:00
Shane Caraveo
a7f48e470f compile was broken, new argument? 2001-04-26 01:46:18 +00:00
foobar
8a26918ed1 Renamed the AC_ prefixed macros defined in acinclude.m4 to PHP_* prefixes.
# Heads up people! I tested this before committing but you never know..
2001-03-27 20:35:04 +00:00
Sascha Schumann
667a1f1fdb buf is gone. Don't reference it. 2001-03-13 17:11:43 +00:00
Sascha Schumann
2b6698aaa9 Replace another sprintf 2001-03-13 16:58:36 +00:00
Sascha Schumann
86cf74a169 Nuke calls to sprintf, snprintf, strcat, strcpy and rely on
memcpy and smart_strs.
2001-03-13 16:53:34 +00:00
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
Andi Gutmans
eb6ba01d1c - Fix copyright notices with 2001 2001-02-26 06:11:02 +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
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
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
92f61634eb (PHP session_unset) Return early, if no session was started.
PR: #8354
2000-12-22 22:53:14 +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
Sascha Schumann
225a08e8dd No need for GCC extensions in non-debugging mode.
PR: #8345
2000-12-21 05:31:18 +00:00
Sascha Schumann
5347ef1728 Whitespace fix and initialize ret properly 2000-11-22 04:10:04 +00:00
Stanislav Malyshev
119ee485c6 Move "replace value" logic to Zend 2000-11-20 12:39:14 +00:00
Hartmut Holzgraefe
1f6878e912 2nd step towards auto-credits 2000-11-20 10:33:33 +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
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
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
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
Zeev Suraski
1fd09132c2 Initial steps to move the INI mechanism to the Zend engine 2000-10-29 11:38:26 +00:00
Stanislav Malyshev
06de8e78cf Allow to send secure cookies 2000-10-28 17:13:28 +00:00
Sascha Schumann
4f757a3af0 Add session_adapt_url(). 2000-10-26 18:10:43 +00:00
Andrei Zmievski
27a1c12ad8 session_unset() now cleans up $HTTP_SESSION_VARS as well. 2000-10-26 17:37:47 +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
foobar
7a54e0b10c Fixed crash (bus error) in readdir() and session cleanup when compiled
with Sun CC.
2000-10-18 14:14:14 +00:00
Sascha Schumann
7c0ba95806 fix indentation 2000-10-17 02:50:15 +00:00
Daniel Beulshausen
4086197d95 fixes bug 7055 & 7235 2000-10-16 10:35:43 +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
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
5bf4e7857d Clean up STR_CAT macro (it is still ugly) 2000-09-27 15:24:09 +00:00
Sascha Schumann
d959c647e2 Remove superflucious variable 2000-09-26 11:00:02 +00:00
Sascha Schumann
9c6414d6fa Deactivate E_NOTICE message on gc 2000-09-20 01:38:39 +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
51498e1d3f Kill warning 2000-09-19 17:46:23 +00:00
Sascha Schumann
2ec043606b *** empty log message *** 2000-09-19 17:22:37 +00:00
Sascha Schumann
bd616da7ca Libc5-readdir_r workaround 2000-09-11 15:24:28 +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
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
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
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
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
Zeev Suraski
30ccec36b9 Fix build 2000-08-20 22:18:19 +00:00
Sascha Schumann
c8b8a908ca Provide PHP_SEPARATOR which expands to the default directory separator
on the target platform.
2000-08-20 14:02:57 +00:00
Sascha Schumann
34bee836b1 Remove bogus "by" 2000-08-10 19:27:30 +00:00
Stanislav Malyshev
682c58c26f Open session files in binary mode (fix #5953)
@- Fixed \n in session variables bug on Win32 (Stas)
2000-08-05 10:25:00 +00:00
Jon Parise
021ad113ef Reworded some of the php_error messages for grammar and clarity.
(For example, settled on "cannot" instead of "can't" in all case)
2000-07-27 16:43:38 +00:00
Sascha Schumann
c917e170f6 Always use the current DIR_DELIMITER to create the session file path 2000-07-11 12:29:19 +00:00
Sascha Schumann
e8101d4f7b Unify use of my email address 2000-07-10 10:09:15 +00:00
Sascha Schumann
eb0cbbd2d9 Also output the name of the save_handler when reporting a failed write
attempt.
2000-07-10 08:35:03 +00:00
Stanislav Malyshev
ad271a2b33 Fix stupid bug. 2000-07-09 10:31:47 +00:00
Sascha Schumann
277b0e15b8 (PHP session_destroy) return the error condition from storage handler's
session_destroy method.

Submitted by: juhl@eisenstein.dk
2000-07-05 01:26:22 +00:00
Stanislav Malyshev
4d1f03839c Fix couple of crashes on error conditions
Make session_module_name really work
2000-07-02 16:27:39 +00:00
Stanislav Malyshev
1d46433bfa Try to fix #5271 - crash when $HTTP_SESSION_VARS is already defined
via "global"
# I'm not sure it's fastest fix possible, but at least it should remove the
# crash
2000-06-29 13:09:27 +00:00
Sascha Schumann
50595370e0 Cosmetic name change 2000-06-27 23:09:49 +00:00
Egon Schmid
d049d4a6bd Fixed protos. 2000-06-23 17:37:49 +00:00
Andrei Zmievski
1868bfdcdf (php_wddx_deserialize_ex) return SUCCESS/FAILURE
Use that return value in WDDX session deserializer.
2000-06-09 03:00:02 +00:00
Sascha Schumann
764747ec7f The default serializer is still php. 2000-06-09 00:26:56 +00:00
Sascha Schumann
0f06ad29a6 Automatically recover from a failed attempt to decode a session object.
PR: #4886
2000-06-09 00:23:20 +00:00
Sascha Schumann
1326e17536 Fix format strings. cache_expire's type was changed to long. 2000-06-08 23:42:04 +00:00
Andi Gutmans
3701bc4207 - ARG_COUNT(ht) -> ZEND_NUM_ARGS() mega patch 2000-06-05 19:47:54 +00:00
Zeev Suraski
4a1da8b6f9 Fix Win32 build 2000-06-04 22:00:17 +00:00
Sascha Schumann
a982eb2267 `len' is not the actual length of the string, but the possible maximum
length. This fixes a couple of problems, like not setting the cookie path
correctly.
2000-05-29 15:07:19 +00:00
Andi Gutmans
8c82566b48 - Fix problem in sessions module under Win32. Need to use ; as an options
- delimiter in save_path instead of :.
2000-05-27 16:38:49 +00:00
Zeev Suraski
9bfd5e5e55 Save more overhead. Look for the serializer/save_handler only when they're actually modified. 2000-05-26 13:02:11 +00:00
Zeev Suraski
fb69f854af Use the INI framework in the session module 2000-05-26 11:12:49 +00:00
Hartmut Holzgraefe
df4547a3df another bunch of proto fixes 2000-05-23 23:13:02 +00:00
Sascha Schumann
2aaa538aef Use reentrant version of readdir. If the target platform does not support
the POSIX-like readdir_r, we fall back to readdir. In ZTS mode, this will
cause php_readdir_r calls to be serialized.
2000-05-23 15:13:16 +00:00
Andi Gutmans
521f03c184 - Support virtual unlink() 2000-05-23 14:36:27 +00:00
Sascha Schumann
4686a3b50e Use #ifdef COMPILE_DL_EXTNAME solely. 2000-05-23 09:33:51 +00:00
Zeev Suraski
e043439ff6 Update the license with the new clause 6 2000-05-18 15:34:45 +00:00
Sascha Schumann
6baa5bc2dc Complain, if write(2) failed. 2000-05-15 13:50:39 +00:00
Sascha Schumann
4a658e8b51 Drop slower strchr in favor of memchr. 2000-05-15 09:55:03 +00:00
Andrei Zmievski
d8f2900589 Updates for changed WDDX API. 2000-05-04 20:29:36 +00:00
Sascha Schumann
d0f3764ee2 Change reentrancy API to always use the php prefix.
Check for the declaration of reentrant functions, so that we can use
them in non-ZTS mode on all platforms.
2000-05-04 10:38:17 +00:00
Sascha Schumann
82c5c690c9 Use the new AC_ADD_LIBRARY_WITH_PATH option shared-libadd 2000-05-02 04:01:15 +00:00
Sascha Schumann
fe50664d4d #if COMPILE_DL
becomes

    #if defined(COMPILE_DL) || defined(COMPILE_DL_EXTENSION_NAME)
2000-05-02 00:44:35 +00:00
Sascha Schumann
0d383d9373 Replace the various get_module() functions with a uniform
ZEND_GET_MODULE(name) macro.
2000-05-02 00:30:36 +00:00
Sascha Schumann
7613e064f8 Remove trailing empty lines 2000-05-01 22:38:42 +00:00
Sascha Schumann
0d36199cf9 Large test commit IV 2000-05-01 22:04:52 +00:00
Sascha Schumann
de2cea47c0 Large commit test III 2000-05-01 22:00:09 +00:00
Sascha Schumann
a481fddfb3 Improved in-tree shared libraries build system
The following new/revived shared modules are available now:

  ... MySQL (*)
  ... PCRE (*)
  ... Session
  ... SWF

  (*) capable of using bundled library or external library

All changes:

  The m4 macro PHP_EXTENSION was revamped. Uses LIB_BUILD now.
  This effectively means that all extensions have to use dynlib.

  ext/mysql/config.m4 was revamped.
  Uses LIB_BUILD for building bundled library.

  ext/pcre/config.m4 was revamped.
  Uses LIB_BUILD for building bundled library.

  ext/ext_skel was changed to reflect that more modules should be
  compileable as shared module.

  ext/Makefile.in has been simplified enormously.

  Dependencies are now stored in the build tree.

  Empty dependencies are not generated by buildconf anymore. They
  are now dynamically created during the build process.

  Implicit rules for .S were removed.

  The NO_RECURSION feature was removed.

  "libs.mk" has been added to all cvsignore files in ext.
2000-05-01 02:42:55 +00:00
Andi Gutmans
5d5b09e1a7 - Change some open's to V_OPEN()'s 2000-04-30 19:01:17 +00:00
Sascha Schumann
953fe189da Overall UNIX build system improvements:
* Makefile header is now completely dynamic
* Absolute paths in (top_)?(src|build)dir and VPATH
  (fixes Tru64 support)
* VPATH does not contain variables anymore
  (fixes UnixWare support)
2000-04-30 03:20:09 +00:00
Zeev Suraski
3220bb570e - Fix an invalid trick (it was valid when header() was using
zend_get_parameters(), but it became invalid when someone switched it
  to zend_get_parameters_ex(), and I decided to remove it anyway).
- Remove a redundant function call
2000-04-28 13:03:13 +00:00
Zeev Suraski
883bd2b1de - Fix virtual cwd bug
- Add more V_STAT() V_LSTAT() changes
2000-04-20 17:24:01 +00:00
Colin Viebrock
a7c8bfb9fb phpinfo() prettying 2000-04-06 21:07:44 +00:00
Andi Gutmans
f9547241d5 - Fix another bug in session.c
- Start using the new PHP_GETCWD() and co. macros
2000-03-30 22:38:50 +00:00
Andi Gutmans
69a16e9693 - Fix compile bug in session_get_cookie_params() 2000-03-30 22:21:23 +00:00
Sterling Hughes
ec9aae474a #Stylistic changes. 2000-03-30 20:02:21 +00:00
Sterling Hughes
149e6181e5 @-added session_get_cookie_params (sterling) 2000-03-30 18:50:09 +00:00
Sascha Schumann
f50de70308 GC now prints out how many session objects were removed 2000-03-29 20:37:29 +00:00
Sascha Schumann
af9a852bf1 Improved error messages 2000-03-29 20:37:12 +00:00
Thies C. Arntzen
a692f15568 @- session_start() is now more verbose if headers cannot be send. (Thies) 2000-03-29 09:36:27 +00:00
Sascha Schumann
1f822b98ce Welcome PHP_ARG_ENABLE and PHP_ARG_WITH. They are there to replace the common
AC_MSG_CHECKING, AC_ARG_[ENABLE,WITH], AC_MSG_RESULT trio.
2000-03-27 23:33:38 +00:00
Sascha Schumann
31803785fd These should not be exported 2000-03-27 22:40:49 +00:00
Sascha Schumann
a2d42419a5 Revamp session's config.m4 and reenable support for mm. The shared memory
module works now successfully again under Apache and other web servers.
2000-03-26 02:47:00 +00:00
Sascha Schumann
04daa555aa Add MSIE 5-specific Cache-Control fields 2000-03-26 00:43:56 +00:00
Andrei Zmievski
ac7d60ecec Changed HTTP_STATE_VARS to HTTP_SESSION_VARS.
@ Changed $HTTP_STATE_VARS to $HTTP_SESSION_VARS. Use only the latter
@ version now! (Andrei)
2000-03-13 15:49:13 +00:00
Andi Gutmans
909f3af8dc - Weird that this wasn't caught earlier 2000-03-10 08:34:13 +00:00
Andrei Zmievski
5f883e802a Anything in $HTTP_SESSION_VARS[] is auto-registered, if register_globals
is turned off.
2000-03-08 14:57:26 +00:00
Stig Bakken
d02fe90b00 Change extension names in all extensions' zend_module_entry to their
directory name.
2000-03-06 18:44:01 +00:00
Andrei Zmievski
898ff287f2 Need to pass PLS_DC. 2000-03-06 14:37:48 +00:00
Andrei Zmievski
29c133f11d (php_get_session_var)
The variables are now serialized either from globals or from
$HTTP_STATE_VARS[] array, depending on register_globals and track_vars
settings.
2000-03-06 14:36:11 +00:00
Andrei Zmievski
fd629e6ee0 (php_set_session_var)
$foo and $HTTP_SESSION_VARS["foo"] are no longer references to the same
value.
2000-02-28 16:00:46 +00:00
Zeev Suraski
bf5cb890b0 - Convert 'PHP3' to 'PHP'
- Avoid declaring crypt() related salt types twice
2000-02-26 03:20:55 +00:00
Egon Schmid
971a6f1702 More protos. 2000-02-24 15:11:09 +00:00
Sascha Schumann
67f6945e8a Revert part of the last commit 2000-02-22 22:52:14 +00:00
Sascha Schumann
3b74bbe999 Print out a warning, if writing the session data failed. This might
happen in a request shutdown handler; php_error() worked for me in the
CGI version.
2000-02-22 14:44:29 +00:00
Andrei Zmievski
e9abf023b4 Typo. 2000-02-22 14:23:09 +00:00
Zeev Suraski
86fa2aade2 the pipe is breaking all the time 2000-02-19 23:41:32 +00:00
Zeev Suraski
80bdd19e03 Fine tune Andi's patch 2000-02-11 15:59:30 +00:00
Sascha Schumann
12d3e3d775 More cosmetic things 2000-02-11 13:41:30 +00:00
Sascha Schumann
89553f5df6 Some style(9) cosmetics 2000-02-11 12:59:08 +00:00
Zeev Suraski
c12aa454ff Compile fixes 2000-02-05 15:44:20 +00:00
Andrei Zmievski
c77aa759ea Implemented setting of session cookie parameters.
@ Added session_set_cookie_params() function. (Andrei)
2000-02-04 23:34:24 +00:00
Zeev Suraski
99f079a349 - A few fixes
- Added register_argv_argc directive to allow disabling of argv/argc
2000-01-28 18:29:37 +00:00
Zeev Suraski
df138c2e2f - MS-SQL fix
- Fix a crash bug in session_register()
2000-01-17 22:41:59 +00:00
Zeev Suraski
ec386cc9fd - Remove the pre-request-shutdown hooks, they should no longer be necessary.
The session module may not work due to an unknown (and until now, IMO, misdiagnosed) problem,
if it does, please report it!
2000-01-16 21:03:49 +00:00
Zeev Suraski
97e1ad136a Fix 2000-01-16 20:37:09 +00:00
Zeev Suraski
2dea694ab4 Remove the post-startup callback support. Modules are now started only after
the entire engine is started.  People - please make sure that the session module
works properly for you.
2000-01-16 19:43:34 +00:00
Zeev Suraski
259c05829b Compile fixes for ZTS 2000-01-15 16:56:30 +00:00
Sascha Schumann
a0b08b5e0b Be more verbose, if headers were already sent and remove RSHUTDOWN handler 2000-01-15 13:20:39 +00:00
Thies C. Arntzen
64c6e1e90e sessions are now written via a _php_session_shutdown which is registered
via php_register_pre_request_shutdown().
2000-01-15 13:09:32 +00:00
Sascha Schumann
e078a04fd0 Complain verbosely, if a destroy failed 2000-01-15 12:17:18 +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
Sascha Schumann
4bd0b72b98 Fix namespace pollution 2000-01-05 19:37:13 +00:00
Andrei Zmievski
4595bf1e20 * Implemented <boolean> and <null> types. We now support WDDX version 1.0
as best as we can.
* Cleaned up the API function names, _ was really not needed.
* Cleaned up the repetitive stack var name stuff with a macro.
* WDDX now no longer converts numbers to strings in arrays when during
  serialization.
@Implemented support for <boolean> and <null> types according
@to WDDX version 1.0 (Andrei)
2000-01-03 18:10:27 +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
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
Zeev Suraski
235386b245 Change ALLOC_ZVAL() semantics 1999-12-26 21:21:33 +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
Sascha Schumann
095909be79 Logic fix, improved comments, better SID checking 1999-12-22 00:38:04 +00:00
Sascha Schumann
f889148335 Warn users, if they have disabled gpc_globals and track_vars. Also work
correctly, if users have enabled track_vars/disabled gpc_globals.
1999-12-22 00:11:04 +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
Sascha Schumann
d15e7a5ec2 Fix for missing RAND_MAX on SunOS 4.1
Reported by: Brian Lalor <blalor@netDrives.com>
1999-12-18 23:28:43 +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
Sascha Schumann
75db7e91c6 (_ps_files_path_create) terminate string correctly and append the whole key instead of the rest key 1999-12-13 15:55:49 +00:00
Sascha Schumann
1627a57d96 Remove trailing white-spaces 1999-12-12 14:22:55 +00:00
Sascha Schumann
996216b499 Add cache_limiter and cache_expire options. Rename extern_referer_check
to referer_check.
1999-12-12 14:16:55 +00:00
Sascha Schumann
2a794e8205 (php_set_session_var): logic fix:
gpc_globals set? Add it to the global symbol table
track_vars set? Add it to the HTTP_STATE_VARS array
1999-12-09 18:57:57 +00:00
Zeev Suraski
e19e57d2f7 - Use Set-Cookie for consistency with SetCookie() (and possibly for adherence with
with some clients?)
- Remove unnecessary directive from configuration-parser.y
1999-12-08 22:22:20 +00:00
Sascha Schumann
e793b11363 Give it a nicer looking module name 1999-12-05 23:38:25 +00:00
Sascha Schumann
4a60eed469 Fix some warnings 1999-12-05 16:25:32 +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
Andrei Zmievski
0d885602f4 Cast val to (char *) to avoid compile warning.
Forgot ; at the end and need to derefence the ent pointer.
1999-12-04 19:46:12 +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
Andrei Zmievski
43047fdca6 (php_set_session_var) Initialize the refcount here. 1999-12-04 18:56:17 +00:00
Sascha Schumann
7532393c1a ZTS fixes 1999-12-04 18:40:06 +00:00
Andrei Zmievski
7347ca9a08 (PHP session_register) Correct calling convention. 1999-12-04 17:05:45 +00:00
Andrei Zmievski
20190c966d Session variables now obey track_vars and gpc_globals settings.
If track_vars is on then decoded variables appear in $HTTP_STATE_VARS
array. If gpc_globals is on, then session vars are decoded into global
variables. If both are on, then globals and $HTTP_STATE_VARS contents
are references to each other.

The /decoder functions now just need to call php_set_session_var()
this behavior.

@ -Session vars are now decoded into $HTTP_STATE_VARS[] array and the
@ globals, depending on track_vars and gpc_globals settings (Andrei)

# Encoding source is currently only globals. We may want to change this
# in the future.
1999-12-04 17:02:04 +00:00
Andrei Zmievski
99df46fa62 Include errno.h.
# Please try compiling before committing
1999-12-03 17:05:23 +00:00
Sascha Schumann
2e024a0005 Improve locking when O_EXCL is available 1999-12-03 16:19:38 +00:00
Sascha Schumann
5c0f205383 Clean up code 1999-11-29 23:07:20 +00:00
Sascha Schumann
883e219bef ZTS fix 1999-11-28 00:13:46 +00:00
Andrei Zmievski
10be07ab19 (PHP session_register) Modified to accept variable number of arguments,
any of which can be either string holding the variable name or an array
consisting of such variable names or other arrays.
1999-11-27 21:18:41 +00:00
Sascha Schumann
8696442671 (PHP_RINIT(session)) Never return FAILURE on trivial issues from a request
startup handler
1999-11-26 13:43:55 +00:00
Sascha Schumann
abe0176840 (php_rinit_session): use post request startups to reenable session.auto_start 1999-11-17 22:59:27 +00:00
Sascha Schumann
3dc7757a99 Remove the extra INCLUDES line from most automake Mafiles. This is not
necessary, because we can change the value of INCLUDES globally in one
place (configure.in).

Also add two defines in thread-safe mode
(_REENTRANT and POSIX_PTHREAD_SEMANTICS)
1999-11-13 12:41:09 +00:00
Sascha Schumann
a4ff16dd68 - set default path for cookie to the root directory ("/")
- complete session documentation in php.ini-dist
1999-11-09 14:27:56 +00:00
Sascha Schumann
9738fdff44 Disable auto_start until we find a way to access the necessary data fields. 1999-11-06 10:14:36 +00:00
Zeev Suraski
0700ad3417 - Win32 fixes
- COM module improvements from Boris Wedl
1999-11-06 10:01:55 +00:00
Sascha Schumann
093aaaa23e Add missing initialization entry 1999-10-31 13:29:00 +00:00
Sascha Schumann
6a30ec5343 Change session.lifetime to session.cookie_lifetime. And:
@ - Added session.cookie_path and session.cookie_domain (Sascha)
1999-10-31 13:26:40 +00:00
Sascha Schumann
51ea5cc70a (PHP session_register, session_unregister) always return true 1999-10-24 16:17:45 +00:00
Sascha Schumann
23882d31c4 Add session.use_cookies option 1999-10-22 08:10:08 +00:00
Sascha Schumann
31f38edf35 (_ps_files_valid_key): small logic fix 1999-10-21 18:51:57 +00:00
Sascha Schumann
4703eb404d (_ps_files_open): evaluate key (session id) before path creation 1999-10-21 12:28:36 +00:00
Sascha Schumann
232afa4816 * archive-based convenience libraries completely replaced
with libtool components

        * SAPI targets can enable thread-safe mode and define
          shared/static/program build target

        * all configure scripts use the same config.cache

        * phplibdir is $(top_builddir)/modules to avoid
          permission problems

        * sapi/*/Makefile.inc are gone

        * runpath handling cleaned up

        * top-level Makefile.in obsoleted through Makefile.am

        * --enable-versioning uses libtool's cleaner and more
          portable -export-symbols feature
1999-10-04 15:18:26 +00:00
Andrei Zmievski
a92fb5fe3d rename. 1999-10-01 14:54:55 +00:00
Sascha Schumann
7922481919 Do not try to free NULLs. 1999-09-25 21:06:11 +00:00
Andrey Hristov
f84ba1b039 - Upgraded var_dump() to take multiple arguments
- php3api_ is changed to php_
1999-09-20 14:14:26 +00:00
Sascha Schumann
c051b3868b Convert module to use Ex API. 1999-09-17 09:26:03 +00:00
Sascha Schumann
5a5646dce1 don't call empty function names 1999-09-17 05:45:52 +00:00
Sascha Schumann
55272d3df8 add user-level callbacks 1999-09-17 05:40:59 +00:00
Andrey Hristov
f52ffb8943 Fixed memory leak. 1999-09-16 20:59:44 +00:00
Sascha Schumann
e20af627c2 improve short help messages 1999-09-16 15:35:49 +00:00
Sascha Schumann
fa0f9ed367 wddx decode works as well 1999-09-16 12:55:31 +00:00
Sascha Schumann
a597f24b5e wddx serialization works now 1999-09-16 12:00:58 +00:00
Sascha Schumann
92896a9945 Since Thies fixed var.c, objects work now, too. 1999-09-16 09:14:06 +00:00
Sascha Schumann
ac524d4b94 calculate length of cookie string correctly 1999-09-12 12:27:11 +00:00
Andi Gutmans
d5968b8f21 - Oops 1999-09-12 09:57:51 +00:00
Andi Gutmans
da973fe6bf - Make it compile on Win32 1999-09-12 09:55:53 +00:00
Sascha Schumann
276c815f04 update macro 1999-09-12 00:31:23 +00:00
Andrey Hristov
0ac98aa95a Use global symbol table instead.. 1999-09-12 00:07:10 +00:00
Sascha Schumann
f040ce584d add transparent session id propagation
this uses a custom scanner which detects relative URIs and changes
  them appropiately.
  must be explicitly enabled with --enable-trans-sid
  (normal case is not affected, since session_adapt_uris defaults to
   void statement. Compiler should eliminate dead code in output.c then.)
1999-09-11 23:47:16 +00:00
Andrey Hristov
9706aa1daa - Added session_unset() function
- Fixed double session globals shutdown crash
- Added warning when session_destroy() is called without session_start()
1999-09-11 22:31:04 +00:00
Sascha Schumann
533ef3988b - support for external entropy sources
- extern_referer_chk => extern_referer_check
- kill a warning in mod_files.c
1999-09-11 17:20:31 +00:00
Andi Gutmans
14d9a59f1c - Make dir functions compile in Win32
- Fix too early memory manager initialization (For you Thies)
1999-09-05 19:04:40 +00:00
Sascha Schumann
62fc17983a First try at WDDX serializer
(not active currently)
1999-09-04 11:25:43 +00:00
Sascha Schumann
7e70c1ad91 cleanup 1999-09-04 08:33:31 +00:00
Sascha Schumann
c49cdc9a64 remove superflicious enumaration 1999-09-04 08:21:36 +00:00
Sascha Schumann
7796f4d995 bail out, if ps_mm_instance wasn't initialized correctly
(should take place in global startup)
1999-09-04 08:21:09 +00:00
Sascha Schumann
7e50dda96b implement single directory garbage collector 1999-09-04 08:20:43 +00:00
Sascha Schumann
5b293ecd4d - add global startup/shutdown handlers
- improve genif.sh to also consider all header files for inclusion
  (checks for phpext_)
- use vsnprintf in main.c to avoid buffer overflows
- improve sessions's mm module to cope better with OOM situations
  within the shared memory segment
- fix typo wrt session.auto_start
1999-09-03 17:46:39 +00:00
Andrey Hristov
7894c0cc1a Fix lcg.h location. 1999-09-01 14:20:15 +00:00
Stig Bakken
4092f4b8c0 ext/lcg -> ext/standard in various places 1999-08-31 18:05:22 +00:00
Sascha Schumann
49824ee8cb - fix potential buffer problem in send_cookie
- fix gc probability algorithm
- don't access mod_data directly
- initial version of mm support for session data storage

  This works pretty good, but we need to create the initial mm pool
  from the parent process/thread. Still looking for a clean way to do that.
1999-08-27 21:03:22 +00:00
Sascha Schumann
0e43d751ea return true to match documentation 1999-08-23 15:37:11 +00:00
Sascha Schumann
1dd31c38a6 - cleanup code
- add script which creates the directory tree for better scaling
  of mod_files

I have to decide yet whether we implement the garbage collection in the
module or if we simply let the user do

find path -ctime +1 | xargs rm
1999-08-22 14:14:46 +00:00
Sascha Schumann
02d6ec2a6b Use O_EXCL where possible. 1999-08-22 13:43:23 +00:00
Sascha Schumann
070dfe0833 - add session.extern_referer_chk
- use combined lcg in session id creation
1999-08-21 20:48:40 +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
Sascha Schumann
c640f3d8c8 Implement additional heuristic for session id search. Now looks into
REQUEST_URI as well.
1999-07-22 17:55:13 +00:00
Andrey Hristov
56402ec375 *** empty log message *** 1999-07-21 19:47:40 +00:00
Sascha Schumann
3b7d588f40 more to do 1999-07-18 01:20:38 +00:00