Commit Graph

765 Commits

Author SHA1 Message Date
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
Sascha Schumann
e5cfc70f7d add session config to php.ini and adapt the naming scheme for it 1999-07-18 01:00:42 +00:00
Zeev Suraski
e7e2af5d78 Fix TS version 1999-07-16 16:09:01 +00:00
Zeev Suraski
c5724cbd14 License update 1999-07-16 13:13:16 +00:00
Sascha Schumann
42736999bc define sid to "", if we are in cookie mode 1999-07-15 21:14:46 +00:00
Sascha Schumann
2a39219142 we don't need php_sid 1999-07-15 19:51:13 +00:00
Sascha Schumann
30c131c8ae that should be included 1st 1999-07-15 19:43:26 +00:00
Sascha Schumann
4ea29a808d define SID appropiately 1999-07-15 19:37:35 +00:00
Sascha Schumann
68de8a2842 that should be included 1st 1999-07-15 19:31:39 +00:00
Andrey Hristov
e88d121be1 Fix a memory leak by not allowing session_start() to be called more than once. 1999-07-07 21:50:33 +00:00
Zeev Suraski
dbb24c2e0e *** empty log message *** 1999-07-03 23:43:02 +00:00
Sascha Schumann
c56116029d add missing include 1999-07-03 19:08:03 +00:00
Sascha Schumann
1f02914005 implement a simple API in the case someone wants to define his/her own serialization stuff 1999-07-01 05:45:48 +00:00
Zeev Suraski
258d427647 No need for a PSLS_FETCH() if PSLS_D/PSLS_DC are supplied as function arguments 1999-06-29 22:08:07 +00:00
Andrey Hristov
3e5f7a806f *** empty log message *** 1999-06-29 15:40:11 +00:00
Andrey Hristov
88ed2002da Added session expiration. 1999-06-29 15:39:59 +00:00
Andrey Hristov
a6aacfd2b6 Added session_is_registered(varname) function. 1999-06-28 15:46:56 +00:00
Zeev Suraski
1798a0183a * Fix a buglet in the session module
* Make some renames in the session module - avoid having a function called 'delete'
  so that we don't piss any C++ compilers.  Also rename the {startup,shutdown}_globals
  to {startup,shutdown}_session_globals, so that they're a bit less general names,
  and made them static.
* Remove uselss variables
1999-06-11 09:23:00 +00:00
Sascha Schumann
4b023c157a better scaling for large servers using many session ids 1999-06-07 19:51:54 +00:00
Sascha Schumann
d8a9548cb2 - some cleanups
- add gc logic
- add session_destroy()
1999-06-07 16:43:24 +00:00
Zeev Suraski
34b3dc9b47 - Fix PSLS issues
- Add a standard info function for the session module (use them!)
- Replace PATH_MAX with MAXPATHLEN (that's our platform indepedent constant)
1999-06-06 19:53:59 +00:00
Sascha Schumann
82806ea254 one C too much 1999-06-06 19:26:31 +00:00
Sascha Schumann
e9b28fe29c avoid unnecessary PSLS_FETCH() in internal functions 1999-06-06 19:25:39 +00:00
Andi Gutmans
f5dbfbae84 -Init tsrm on minit 1999-06-06 18:56:11 +00:00
Andi Gutmans
ed97964fbe - Use PS() everywhere. 1999-06-06 18:39:48 +00:00
Andi Gutmans
c329da5d25 - Make sessions compile on win32 but it still doesn't link. 1999-06-06 18:36:42 +00:00
Andi Gutmans
c5fd7244dd - Add some *_FETCH()'s. Still some work to be done so that it'll compile on win32. 1999-06-06 18:22:17 +00:00
Sascha Schumann
605756de7f - s/encoded/encode/
- new TODO entry
1999-06-06 15:18:51 +00:00
Sascha Schumann
a821a185e4 add some protos 1999-06-06 14:19:55 +00:00
Sascha Schumann
2f79ba1abf add some thoughts 1999-06-06 14:02:13 +00:00
Sascha Schumann
19a2a02f8e - auto startup when calling register
- auto startup using a configuration option
1999-06-05 22:24:59 +00:00
Sascha Schumann
f830cf7d15 moving start code into its own function 1999-06-05 22:15:49 +00:00
Sascha Schumann
2db1d61718 SAPI does not want line endings 1999-06-05 20:51:29 +00:00
Sascha Schumann
a1b42e3f5e first import of session module 1999-06-05 19:52:58 +00:00