2006-06-17  Jost Boekemeier  <jostb@intern>

	* server/php/java/servlet/FastCGIServlet.java
	(parseBody): Destroy the physical connection, if an exception
	occured, the FCGI ABORT command doesn't seem to work. For example
	on FC5 the tomcat implementation is based on GNU "Java". GCC
	version 4 uses a "JIT" compiler which seems to compile the entire
	JavaBridge.war archive to native code while the request is
	running. This takes several seconds and causes the Firefox browser
	to time out after 15 seconds. After "JIT" compilation the servlet
	engine detects that the browser is gone and throws a
	ConnectionAbort Exception. This clears the Java side of the FCGI
	pool, but not the associated PHP FastCGI instance; PHP keeps the
	generated data. When the next request reaches this instance, PHP
	would deliver this data.
	
	* server/php/java/servlet/CGIServlet.java
	(getLocalName): Obsolete

	* server/php/java/servlet/PhpCGIServlet.java
	(setCGIEnvironment): Use getServerName instead of getLocalName, we
	need the official server name, on FC5 tomcat returns 127.0.0.1 for
	the local name.
	
	* php_java_snprintf.h: We must destroy the snprintf definition
	from PHP so that we can use php_ap_snprintf, if available.

	* java.c
	(return_msc_structure): New function.
	(MINIT): Use return_msc_structure for compatibility with MSVC
	compiled PHP binaries.
	
	* java.c (java_call_user_function_ex): New function, needed for
	MSVC compiled binaries.

	* server/php/java/servlet/ConnectionPool.java (connect): New from
	bind, correct name.
	(bind): Removed

	* VERSION, php-java-bridge.spec: Version 3.1.0 released

2006-06-16  Jost Boekemeier  <jostb@intern>
	
	* README, NEWS, server/php/java/bridge/Util.java 
	(DEFAULT_CGI_LOCATIONS): Changed c:/php5 to c:/php.
	
	* api.c
	(values): Fixed a bug that caused a conversion from array to
	object: In PHP 4 java_values(array()) returned an object instead
	of the passed array.
	
	* java.c 
	(can_reconnect): New function.
	(API_CALL): Only reconnect when the first statement failed.
	
	* server/php/java/bridge/FastCgiServlet.java
	(getError): New procedure.
	(doRead): Save error so that the communication completes. Avoids a
	problem that caused the abortion of the FastCGI channel because
	bytes from the previous communication were left in the buffer.
	(parseBody): throw saved error.

	* server/php/java/servlet/PhpCGIServlet.java
	(setCGIEnvironment): Not all ServletEngines support
	getRemotePort().

	* server/php/java/servlet/ServletContextFactory.java
	(ServletContextFactory): Store the request.

	* tests.php5/is_null.php: Do not test features that are not
	available.

	* server/configure.in, config.m4: Check for "ar" before invoking
	"check_jni"

	* Makefile.frag, server/Makefile.am: Create stamp, needed for check_ar
	
	* tests.m4/java_check_jni.m4: Don't test jni, if we know that "ar"
	is not available.

	* examples/php+jsp/documentClient.php: Check result.

	
2006-06-14  Jost Boekemeier  <jostb@intern>

	* install.sh: Removed

	* install.sh.in: New file from install.sh
	
	* server/php/java/bridge/SimpleJavaBridgeClassLoader.java
	(buildUrlArray): The loader fix for mono broke the fix for
	PR1502480.

	* server/php/java/bridge/SessionTimer.java (SessionTimer): Do not
	block the termination thread.
	
	* VERSION, php-java-bridge.spec: Version 3.1.0rc8 released
	
2006-06-12  Jost Boekemeier  <jostb@intern>

	* server/configure.in: Switch off unix domain sockets, if ar is
	not available.

	* examples/php+jsp/documentClient.php: Catch
	SessionBeanTimeoutException and display an error.

	* NEWS, README, INSTALL.LINUX, INSTALL.WINDOWS, install.sh,
	server/php/java/bridge/JavaBridge.java (checkOption): Renamed --snarf
	to --convert.

	* server/php/java/bridge/Snarf.java (getFile): Use base, if it
	exists. The previous code created the PHP classes in the current
	directory, if "java -jar JavaBridge --convert /usr/share/pear" was
	called without additional jar files

	* client.c (begin_header): Use strcasecmp instead of strcmp, some
	application servers change the keys we send.
	
	* VERSION, php-java-bridge.spec: Version 3.1.0rc7 released
	
2006-06-11  Jost Boekemeier  <jostb@intern>

	* server/configure.in, server/Makefile.am, config.m4: --with-mono
	has been changed to require a directory which contains ikvmc.exe
	and support dlls. The ikvmc.exe and ICSharpCode.SharpZipLib.dll
	IKVM.AWT.WinForms.dll IKVM.GNU.Classpath.dll IKVM.Runtime.dll are
	now included.
	
2006-06-10  Jost Boekemeier  <jostb@intern>

	* server/php/java/bridge/Snarf.java
	(writeHeader, writePhpJava): prefix all magic functions with
	__java.
	
	* tests.php4/servlet_connection_re-open.php: Removed, servlet can
	be tested with php5 as well.
	
	* php_java.h: Must disable sending hex numbers in PHP4, because
	PROTOCOL.TXT doesn't have a way to send hex numbers, if backward
	compatibility is enabled.
	
	* INSTALL.MONO+NET: Removed, users must compile the Mono/.NET
	back-end, see README.MONO+NET.
	
	* test.php4: Removed.

	* test.php: Rewritten to work with php4

	* server/php/java/bridge/DynamicJavaBridgeClassLoader.java
	(hashCode, equals, toString): New methods.
	(loadClass): Display the current java_require() path
	
	* server/php/java/bridge/SimpleJavaBridgeClassLoader.java 
	(buildUrlArray): PR1502480
	
	* server/php/java/bridge/JavaBridge.java 
	(init): PR1502480
	(setJarLibraryPath): convert extensionDir into atom.
	
	* VERSION, php-java-bridge.spec: Version 3.1.0rc6 released

2006-06-08  Jost Boekemeier  <jostb@intern>

	* api.c (serialize, deserialize): Fixed typo.

	* init_cfg.c.in (init_socket): Avoid warning.

	* install.sh: rewritten.

	* java_bridge.c
	(protocol_error): removed, this message was misleading.
	(call_function_handler): When the server thread throws an
	exception outside of Invoke, GetSetProp and CreateInstance, this
	means that the back-end has a bug. If this happens, PHP receives
	an empty response from the server: Terminate the script
	immediately and display error code 98.

	* server/php/java/bridge/DynamicJavaBridgeClassLoader.java
	(EMPTY_PATH, JarLibraryPath): New const/class.
	(checkJarLibraryPath): New procedure.
	(updateJarLibraryPath): Split into checkJarLibraryPath and
	updateJarLibraryPath. In previous versions the library path was
	checked outside of one of the Invoke, GetSetProp, CreateInstance
	methods, so that the exception could not be reported to the client,
	see error code 98 above.

	* server/php/java/bridge/SimpleJavaBridgeClassLoader.java: New
	class from JavaBridgeClassLoader.
	(updateJarLibraryPath): check the library path immediately,
	otherwise we don't have a chance to report the failure to the
	client.
	
	* server/php/java/bridge/JavaBridgeClassLoader.java: Refactored to
	use SimpleJavaBridgeClassLoader.
	(checkCl): Throw an illegal state exception, if java_require() is
	used while using the HTTP tunnel.

	* server/php/java/bridge/Log4jLogger (Log4jLogger): Use
	SimpleJavaBridgeClassLoader; the logger doesn't care about the
	HTTP tunnel.

	* server/php/java/bridge/Snarf.java (run): Create php_Java.php in
	/usr/share/pear, not in the current working directory.
	(copyFile): Do not create corrupt jar files.

	* java.c (ini_override): New global
	(OnIniHosts, OnIniServlet, OnIniSockname): Do not update, if the
	CGI binary has received X_JAVABRIDGE_OVERRIDE_HOSTS. The previous
	fix for HTTPS support broke the windows version. On windows PHP
	calls the OnIni callbacks three times; in register_ini_entries,
	which is correct, and two times after minit, which is at least
	inefficient and obsolete, -- effectively reverting our changes.
	
	* VERSION, php-java-bridge.spec: Version 3.1.0rc5 released

2006-06-07  Jost Boekemeier  <jostb@intern>

	* client.c (override_ini_for_redirect): Fixed memory corruption.
	
	* binc.c (check_policy, get_server_args): Correct the path
	"ext\dir\/JavaBridge.jar" problem on windows.
	
	* ini_cfg.c.in (update_hosts, update_servlet, update_socketname,
	update_compatibility, update_persistent_connections): New from
	java.c
	
	* java.c (OnIniPersistentConnections, OnIniServlet, OnIniSockname,
	OnIniExtJavaCompatibility): Use new procedures. 

	* ini_cfg.c.in (override_ini_from_cgi): Use update_* directly
	instead of zend_alter_ini_entry to make the changes permanent. --
	The zend_alter_ini_entry procedure saves the old value and
	restores it after request shutdown, this makes it impossible to
	keep the changes for all further requests. Corrects the incorrect
	status report, "not running".

	* VERSION, php-java-bridge.spec: Version 3.1.0rc4 released
	
2006-06-06  Jost Boekemeier  <jostb@intern>
	
	* server/php/java/servlet/FastCGIServlet.java (checkCgiBinary,
	findCGI), server/php/java/servlet/FastCGIServlet.java (findCGI):
	Set correct sCGIFullPath, otherwise getWorkingDirectory() will
	fail and the php-cgi wrapper will return a blank page because it
   	cannot not find the cgi executable in its working directory.
	(getCommand, init): Removed
	(fcgiIsConfigured): New variable
	(findCGI): Switch off the FCGI servlet, if we receive a
	ConnectionException from the FCGI server pool.

	* server/php/java/servlet/ConnectionPool.java
	(bind, getInputStream, getOutputStream, setConnection, read,
	close, write, flush, init, Connection, ConnectionPool,
	createNewConnection, openConnection): Throw a ConnectionException
	instead of an IOException: A ConnectionException should be fatal,
	but an IOException is harmless, it may appear when the client (the
	internet browser) closes the connection.
	
	* server/php/java/servlet/PhpCGIServlet.java (setCGIEnvironment):
	Do not set X_JAVABRIDGE_OVERRIDE_HOSTS, if this is a HTTPS
	request.

	* server/WEB-INF/cgi/php-cgi-i386-linux.ini: Added java.servlet
	and java.hosts, for HTTPS requests.
	
2006-06-05  Jost Boekemeier  <jostb@intern>

	* server/php/java/bridge/BaseThreadPool.java (init): Fixed typo.
	
	* examples/search/lucene_search.php, examples/search/README: New
	files
	
	* api.c
	(construct_class, call, set, offsetExists, offsetGet, offsetSet):
	Avoid memory leak.
	(construct_no_arg, construct_array, construct): refactored from
	construct.

	* install.sh: Install PHP classes.

	* php_java_lib/JPersistence.php, php_java_lib/JSession.php: use
	is_null() to test if the value is null.

	* server/php/java/bridge/Snarf.java: New class

	* server/php/java/bridge/JavaBridge.java (checkOption, init, usage):
	call Snarf, if called with java -jar JavaBridge.jar
	--convert.

	* unsupported/lucene.jar: New file.

	* VERSION, php-java-bridge.spec: Version 3.1.0rc3 released
	
	
2006-06-03  Jost Boekemeier  <jostb@intern>
	
	* PROTOCOL.TXT
	All unsigned long values (e.g. object handles) are now
	transferred in hex: <L v="hexVal" p=O i="hexVal"/>
	(Finish): New protocol request for persistent connections.
	(Long): Added predicate for signum
	(Options): Header 01 means: encode unsigned values in hex
	
	* api.c, api.h: New files.

	* bind.c (check_policy): New procedure
	(get_server_args): Use -Dphp.java.bridge.base and
	-Djava.security.policy instead of -Djava.awt.headless, if
	java.security_policy is set in the php.ini file.
	(CFG_JAVA_INPROCESS): Removed, configure doesn't use it anymore.

	* client.c (setResultFromLong): Pass signum, according to protocol.
	(GET_LONG): use strtoul or strtol accordingly
	(GET_RESULT): use strtoul
	(get_mode): Send header 01, if php version => 5.
	(try_connect_to_server): Rewritten
	(clone_cfg, destroy_cloned_cfg): Rewritten
	(passivate_connection, activate_connection): New procedures

	* config.m4: Added test for fast tcp sockets, added api.c.

	* init_cfg.c.in: Initialize persistent connections and policy.

	* install.sh: Rewritten

	* java.c: Refactored, moved API to api.c

	* java_bridge.c (invoke, call_function_hander,
	get_property_handler, set_property_handler): Return protocol
	status.

	* protocol.c: Rewritten.

	* server/natcJavaBridge.c: Accept -Dphp.java.bridge.base= option.

	* server/javax/script/http/HttpScriptRequest.java,
	server/javax/script/http/HttpScriptResponse.java,
	server/javax/script/http/HttpScriptServlet.java,
	server/javax/script/http/SimpleHttpScriptContext.java: Removed,
	not in spec.

	* server/php/java/bridge/BaseThreadPool.java: New file
	
	* server/php/java/bridge/ThreadPool.java: Rewritten

	* server/php/java/bridge/ILogger.java,
	server/php/java/bridge/ChainsawLogger.java,
	server/php/java/bridge/FileLogger.java,
	server/php/java/bridge/Log4jLogger.java: New files
	
	* server/php/java/bridge/ClassicParserString.java: New file

	* server/php/java/bridge/ConstructorCache.java
	(Entry), server/php/java/bridge/MethodCache.java
	(Entry): Do not use intern, that's far more expensive than lazy
	String.equals.

	* server/php/java/bridge/ConstructorCache.java
	(getParameterTypes), server/php/java/bridge/MethodCache.java
	(getParameterTypes): Cache type information.

	* server/php/java/bridge/DynamicJavaBridgeClassLoader.java
	(updateJarLibraryPath): make it fail fast, if the jar file is not
	accessible.
	(checkJarFile): New procedure.

	* server/php/java/bridge/GlobalRef.java: Rewritten to use an
	integer hash.

	* server/php/java/bridge/IDocHandler.java (createParserString): Create
	a cached string, if possible.

	* server/php/java/bridge/JavaBridge.java
	(stringCache): New cache.
	(run): Do not call expire from the request handling thread, use
	SessionFactory's SessionTimer instead.
	(init): Display default java.ext.dirs, pool size and security
	policy.
	(getContext): Call recycleContext, new for persistent connections.
	(getSession): Call recycleContext, new for persistent connections.
	(INTERNAL_PHPSESSION): Use a separate store for __sleep and
	__wakeup
	(recycle): New procedure.
	(recycleContext): New procedure
	(getString): New function
	(getCachedString): New function

	* server/php/java/bridge/JavaBridgeClassLoader.java: Rewritten.

	* server/php/java/bridge/JavaBridgeSecurityManager.java: New file

	* server/php/java/bridge/Options.java (newString): Moved to
	JavaBridge,see getString and getCachedString.
	(createExact): Moved to Request.java
	(hexNumbers): New function
	(recycle): New procedure

	* server/php/java/bridge/Parser.java (PUSH): Use factory.
	
	* server/php/java/bridge/ParserString,
	server/php/java/bridge/Request.java,
	server/php/java/bridge/Response.java: Use hex encoding.

	* server/php/java/bridge/Session.java (expire): Removed obsolete bridge
	parameter.

	* server/php/java/bridge/SessionFactory.java (TIMER_FREQ, timer,
	SessionTimer): New constants/class.

	* server/php/java/bridge/StringCache.java: New class.

	* server/php/java/bridge/Util.java: Marked as final, disabled
	default constructor.
	(Logger): Rewritten to use ILogger
	(BUF_SIZE): Corrected typo.
	(DEFAULT_EXT_DIRS): New constant
	(setLogger): Rewritten
	(setDefaultFileLogger): New procedure

	* server/php/java/bridge/ContextFactory.java 
	(moveContext): New procedure
	(getNext): Rewritten
	(get): Rewritten
	(recycle): New procedure
	(destroy): New procedure
	(isInitialized): New function
	(destroyOrphaned): New procedure

	* server/php/java/bridge/http/IcontextFactory.java,
	server/php/java/bridge/http/IcontextFactoryVisitor.java,
	server/php/java/bridge/http/SimpleContextFactory.java: New classes

	* server/php/java/servlet/CGIServlet.java (setPathInfo): New
	procedure

	* server/php/java/servlet/ConnextionPool.java: New class

	* server/php/java/servlet/FastCGIServlet.java (findCGI): Rewritten
	(FastCGIOuputStream, FastCGIInputStream): Use connection pool.
	(writeBegin, run): Use connection pool

	* server/php/java/servlet/PhpCGIServlet.java (findCGI): Rewritten
	(setPathInfo): New method
	(waitForDaemon): New procedure
	(startFCGI, canStartFCGI): Rewritten
	(delegateOrStartFCGI, isJavaBridgeWc, delegateFCGI): New
	procedures

	* server/php/java/servlet/ContextFactory.java: Renamed to
	ServletContextFactory.
	
	* server/php/java/servlet/ServletContextFactory.java: New from
	ContextFactory
	
	* VERSION, php-java-bridge.spec: Version 3.1.0rc2 released
	
2006-06-03  Jost Boekemeier  <jostb@intern>
	
	* Merged from 3.0.8 branch:
	
        2006-06-03  Jost Boekemeier  <jostb@intern>
	
	* bind.c (test_local_server), tests.m4/java_check_struct_ucred.m4,
	protocol.c (check_session): changed true to is_true for PR1499203.

	* php/java/bridge/Util.java (COMMON_ENVIRONMENT, entries,
	getCommonEnvironment), php/java/servlet/CGIServlet.java
	(getProcessEnvironment), php/java/script/PhpScriptEngine.java
	(getProcessEnvironment): Use COMMON_ENVIRONMENT for JDK<=1.4, for
	PRPR1499378.

	* VERSION, php-java-bridge.spec: Version 3.0.8.4 released
	
	
2006-05-14  Jost Boekemeier  <jostb@intern>

	* Merged from 3.0.8 branch:

	2006-05-13  Jost Boekemeier  <jostb@intern>

	* client.c (try_connect_to_server), protocol.c (check_session),
	server/php/java/bridgeTCPServerSocket.java (accept),
	server/php/java/servlet/FastCGIServlet.java (findCGI): : Switched
	off the Nagle algorithm for operating systems with an insane
	implementation: On FreeBSD and Mac OSX the bridge is now 300 times (!)
	faster than before and runs nearly as fast as on Linux, Windows,
	Solaris...
	
	* client.c (create_pipes): Added missing return statement.
	
	* install.sh: Added test if selinux is really available. Otherwise
	BSD will complain about missing Security Enhanced Linux.

	* java_bridge.c (call_function_handler): Dump the error message
	from the servlet back-end to the console before aborting.
	(procotol_error): New procedure.
	(destroy_object): Avoid warning.

	* protocol.c (end,end_session): changed incorrect assert.

	* server/php/java/bridge/JavaBridgeClassLoader (clear): Fixed typo.
	
	* server/php/java/bridge/Response.java (setResult): Corrected boolean cast.

	* tests.php5/is_null.php: Test for the above fix.

	* server/php/java/bridge/ThreadPool.java: Start a new thread
	immediately. If more than 19 clients crash at the same time, it
	could be that the pool cannot start a new thread later on.

	* server/php/java/faces/PhpFacesScriptEngine.java
	(setNewContextFactory),
	server/php/java/script/PhpScriptEngine.java
	(getProcessEnvironment, setNewContextFactory),
	server/php/java/servlet/CGIServlet.java
	(getProcessEnvironment): Pass current process environment. Needed
	for some PECL modules.

	* server/php/java/script/PhpScriptEngine.java (setName): Display
	the beginning, not the end of the script.

	* server/php/java/script/URLReader.java (read): Use a buffered
	stream.

	* server/php/java/servlet/CGIServlet.java (getLocalPort,
	getLocalName): Use the computed value.
	
	* server/php/java/servlet/FastCGIServlet.java (run): Use a
	buffered output stream.
	
	* VERSION, php-java-bridge.spec: Version 3.0.8.1 released

        2006-04-23  Jost Boekemeier  <jostb@intern>

	* bind.c (wait_server): Timeout raised to 30 seconds.

	* RunJavaBridge.c.in, RunMonoBridge.c.in: Transit only when
	invoked with root privileges.

	* server/php/java/bridge/Util.java (DEFAULT_CGI_LOCATIONS):
	Removed /usr/bin/php, which is not a CGI binary.

	* server/php/java/bridge/http/ContextServer.java (Check for the
	fall-back channel on Windows).


2006-04-30  Jost Boekemeier  <jostb@intern>

	* PROTOCOL.TXT: Keep-alive added.

	* client.c (handle_request, try_connect_to_server): Persistent
	connections.
	(clone_cfg, destroy_cloned_cfg): New from java.c

	* java.c (clone_cfg, destroy_cloned_cfg): Moved to client.c
	(OnIniPersistentConnections): New procedure
	(RSHUTDOWN_FUNCTION): moved connection handling to client/protocol.
	(MINFO): Display java.persistent_connections option.
	(MSHUTDOWN_FUNCTION): close persistent, if necessary
	
	* init_cfg.c.in (option_set_by_user, init_cfg): Persistent connections.

	* protocol.c (end): Changed incorrect assert()
	(end_session): Removed incorrect assert.
	(protocol_end): reset state for close persistent
	(EndConnection): New method
	(close_connection, recycle_connection): New procedures

	* java.c (PHP_INI_BEGIN): java.log_level changed to PHP_INI_SYSTEM

	* server/php/java/bridge/JavaBridge.java (recycle): New method.

	* server/php/java/bridge/JavaBridgeClassLoader.java (recycle): New method.
	* server/php/java/bridge/Options.java (recycle): New method.

	* server/php/java/bridge/Request.java (begin, handleRequest):
	Handle keep-alive.
	(recycle): New method.

	* server/php/java/bridge/Response.java (recycle): New method.

	* server/php/java/bridge/SessionFactory.java (session): New from
	getSession.
	(getSession, getSessionInternal): Keep user sessions and internal
	sessions for the serialize/desiralize implementation separate.

	* server/php/java/bridge/ThreadPool.java (setIsDaemon,
	getIsDaemon, terminateDaemon): Daemon are managed by the pool
	but are not visible in any way. They are terminated when the
	associated keep-alive client terminates.

	* server/php/java/servlet/FastCGIServlet.java (override_hosts,
	init): Use the override_hosts for the FastCGIServlet, too.

	* server/test/HelloWorld.java: Removed ini_set("java.log_level",
	...), the log_level setting is INI_SYSTEM now. -- None of the
	examples and none of the documentation mentioned that feature, so
	we can silently drop it.

2006-04-23  Jost Boekemeier  <jostb@intern>

	* bind.c (wait_server): Timeout raised to 30 seconds.

	* RunJavaBridge.c.in, RunMonoBridge.c.in: Transit only when
	invoked with root privileges.

	* server/php/java/bridge/Util.java (DEFAULT_CGI_LOCATIONS):
	Removed /usr/bin/php, which is not a CGI binary.

	* server/php/java/bridge/http/ContextServer.java (Check for the
	fall-back channel on Windows).

2006-04-09  Jost Boekemeier  <jostb@intern>

	* VERSION, php-java-bridge.spec: Version 3.0.8 released

	
2006-03-21  Jost Boekemeier  <jostb@intern>

	* java.c (values): java_values works with php4, too.

	* server/php/java/bridge/JavaBridge.java (getId): Display thread id.

	* server/php/java/bridge/JavaBridgeRunner.java: The test runner can now
	handle override redirect. Without it most of the servlet tests
	failed.

	* server/php/java/bridge/PhpProcedure.java (createProxy): Create
	proxies with the classloader of the interfaces, as before. If we
	create the proxies using our dynamic loader, the loader tests fail
	because the proxies cannot be accessed after java_reset()

	* server/php/java/bridge/http/ContextServer.java (isAvailable):
	pass the channel name. Without it channel negotiation fails if the
	client disagrees with the server's choice.

	* server/php/java/servlet/PhpCGIServlet.java: New file, refactored
	from PhpJavaServlet. Necessary for jetty.

	* server/php/java/faces/FacesServlet.java: New file to workaround
	a bug in jetty's classloader.

	* server/WEB-INF/web.xml: Use our FacesServlet instead of the
	default FacesServlet so that bugs in the Faces implementation do
	not prevent the bridge from starting.
	
2006-03-19  Jost Boekemeier  <jostb@intern>
	
	* server/php/java/bridge/Request.java (IntegerComparator,
	PHP_ARRAY_KEY_COMPARATOR, PhpArrayKey): New classes.
	
	* server/php/java/bridge/JavaBridge.java (coerce),
	server/php/java/bridge/Request.java (PhpArray): Rewritten. The
	earlier version did not handle new java("java.util.Vector",
	array(1,2,3)) correctly.

	* bind.c (get_server_args): Reverted last change. Cannot use
	LD_LIBRARY_PATH instead of -Djava.library.path= because GNU java
	on FC4 ignores the LD_LIBRARY_PATH setting.

	* VERSION, php-java-bridge.spec: Version 3.0.8rc released

2006-03-16  Jost Boekemeier  <jostb@intern>

	* bind.c (get_server_args): Use LD_LIBRARY_PATH instead of
	-Djava.library.path=. All modern VMs set java.library.path to a
	resonable value.
	
	* java.c (call_with_params, call_with_handler): throw an exception instead of
	terminating the php binary with a FATAL error. Needed for
	php-interactive mode.

	* java_bridge.c (get_jobject_from_object, is_type): Reject non-java or non-JavaException objects.

	* protocol.c (end, end_session, flush): Removed test code.

	* server/php/java/bridge/DynamicJavaBridgeClassLoader.java: Removed
	obsolete code, check /usr/share/java/ext/, used by GNU java (gcj).
	Reject attempts to load native libraries via our dynamic loader
	(see PR1447360).

	* server/php/java/bridge/JavaBridge.java (init): Add
	/usr/share/java/ext and /usr/java/packages/lib/ext for GNU java,
	SUN jdk1.6.

	* server/php/java/bridge/JavaBridge.java (ObjectToString): handle
	echo (string)java_closure(null, "doesNotExist") gracefully.

	* server/php/java/bridge/PhpProcedure.java (invoke): Set the
	context class loader.

	* server/php/java/bridge/Response.java (setResultProcedure,
	setResultException, setResultObject, setResultClass): New methods
	needed for the async mode.

	* server/php/java/bridge/http/ContextServer.java,
	server/php/java/bridge/http/PipeContextServer.java,
	server/php/java/bridge/http/SocketContextServer.java: It is now
	possible to switch the Socket- and PipeContextServer on and
	off. For testing only.
	(checkTestTunnel): New procedure.

	* ABOUT.HTM: Updated benchmark results.
	
2006-03-10  Jost Boekemeier  <jostb@intern>

	* install.sh: New file.

	* client.c (begin): Store async_ctx for stream mode
	(handle_cached): New procedure for stream mode

	* java.c (java_begin_document, java_end_document): New public API
	for XML stream mode.

	* protocol.c (flush, protocol_end, CreateObjectEnd, ResultBegin,
	createSecureEnvironment): XML stream mode.

	* examples/bench/excel_antitest2.php: New file

	* examples/bench/bench.php: Test XML stream mode.

	* server/php/java/bridge/JavaBridge.java(beginDocument,
	endDocument): New method for XML stream mode.

	* server/php/java/bridge/Parser.java (reset): New procedure

	* server/php/java/bridge/Request.java (PHPNULL, PhpNull,
	getGlobalRef): In XML stream mode the server must always return
	object references, even for null values.

	* server/php/java/bridge/Request.java (reset): New procedure

	* server/php/java/bridge/Response.java (AsyncWriter): New writer
	for XML stream mode.

	* server/php/java/bridge/Util.java (EXTENSION_DIR): Obsolete, it
	is now passed by the client.

	* server/php/java/bridge/global.properties.in (EXTENSION_DIR): Obsolete.

	* server/php/java/bridge/http/ContextRunner.java (init): Use
	recycle the existing response object.

2006-03-07  Jost Boekemeier  <jostb@intern>
	
	* bind.c (KillProcess, KillProcessTreeNtHelper,
	KillProcessTreeWinHelper, KillProcessEx): Emulate Unix kill
	behaviour for windows. New procedures for PR1431314.

	* java.c (__errno): Avoid warning.

	* php-java-bridge: Make the standalone script more user-friendly.

	* php-java-bridge.spec: Symlink JavaBridge.jar and php-script.jar
	to /usr/java/packages/lib/ext/ so that JDK1.6 can find them.

	* server/configure.gnu.in: Check if backend configuration failed and suggest --disable-backend.

	* server/META-INF/services/javax.script.ScriptEngineFactory: Added
	php-interactive so that /opt/jdk1.6/jrunscript -l php-interactive
	works.

	* server/php/java/bridge/JavaBridgeRunner.java (JavaBridgeRunner): Use thread pool.

	* server/php/java/bridge/Util.java (Process): Do not cd to the
	user home directory, use the current dir instead.

	* server/php/java/script/PhpScriptEngine.java (eval): Rewritten: Do not keep the local reader open.

	* server/php/java/script/InteractivePhpScriptEngine.java,
	server/php/java/script/InteractivePhpScriptEngineFactory.java: New
	files.

	* server/test/cli.java: Test for php-interactive.
	
2006-02-26  Jost Boekemeier  <jostb@intern>
	
	* bind.c (sleep_ms): New procedure
	(wait_server, wait_for_daemon): Use select() instead of busy wait,
	if possible.

	* server/php/java/bridge/DynamicJavaBridgeClassLoader: Report
	"trying to load..." as debug, not as log message.

	* server/php/java/bridge/JavaBridge.java (isVisible): New method.
	(Invoke, GetSetProp): Check if a static field/procedure shadows a
	field/procedure from the class class. Invoke the method or
	procedure or field from the class class, if not.

	* tests.php5/getName.php: New test.
	
2006-02-19  Jost Boekemeier  <jostb@intern>
	
	* VERSION, php-java-bridge.spec: Version 3.0.7a released
	
2006-02-18  Jost Boekemeier  <jostb@intern>

	* config.m4: check jni in the gcj path, too.

	* examples/j2ee/globals.php: obsolete
	
	* examples/j2ee/documentClient.php: rewritten

	* server/configure.in (PHP_JRE): calculate the correct jre

	* server/WEB-INF/web.xml (load-on-startup): Must be placed after the param-value.

	* server/php/java/bridge/PhpProcedure.java (createProxy): corrected typo.
	
	* server/php/java/bridge/DynamicJavaBridgeClassLoader.java:
	Rewritten so that the dynamic classloader can be used in the
	servlet, j2ee environment: It is switched off for all statements
	executed by the http tunnel. All following redirected requests are
	handled by our thread pool which now carries a dynamic loader with
	the previous context classloader as the parent. Fixes PR1432361.

	* server/php/java/bridge/ThreadPool.java (ThreadPool): Use the
	context loader or the supplied loader, otherwise classes from the
	parent container can not be found.

	* server/php/java/bridge/Util.java (getContextClassLoader): Use
	the current loader if the context loader isn't set.

	* server/php/java/bridge/http/ContextFactory.java
	(ContextFactory): Switch off the dynamic loader when the backend
	is running in a servlet engine or j2ee application server. These
	environments have their own class loading mechanism.

	* server/php/java/bridge/http/ContextRunner.java (ContextRunner,
	init), server/php/java/bridge/servlet/PhpJavaServlet.java
	(handleSocketConnection): Avoid deadlock when running in j2ee
	servers with a broken response.flush implementation. Fixes
	PR1431359.

	* examples/documentClient.php: New file, tests PR1432361.
	
2006-02-12  Jost Boekemeier  <jostb@intern>

	* bind.c (get_server_args): Use path_separator, ":", not separator "/" to separate path entries.
	(exec_vm): Display a php warning if we could not execute the backend.

	* server/php/java/bridge/DynamicJavaBridgeClassLoader.java: Do not
	abort the cp search if we get an exception while resolving one entry.

	* server/php/java/servlet/PhpJavaServlet.java (getLocalName): Wrap
	req.getLocalName, which may not be available in all serlet
	engines.

	* VERSION, php-java-bridge.spec: Version 3.0.7 released

2006-02-08  Jost Boekemeier  <jostb@intern>

	* bind.c (get_server_args, exec_vm), config.m4,
	server/configure.in: Do not hardcode the JDK runtime path into
	the binary, if no JRE runtime path was given. This fixes a problem
	in the FC4 and RHEL RPM, they were built with the jdk path but
	require a jre.

	* php-java-bridge.spec: Do not install the RunJavaBridge from the
	core RPM.

	* config.m4, server/configure.in: Check for GNU libtool. Needed
	for Macintosh.

2006-02-05  Jost Boekemeier  <jostb@intern>
	
	* VERSION, php-java-bridge.spec: Version 3.0.7rc released
	
2006-02-04  Jost Boekemeier  <jostb@intern>

	* server/php/java/bridge/DynamicJavaBridgeClassLoader.java
	(phpLibDir): Removed, not used.
	(contextDir, getContextDir): Removed insane implementation, this
	cannot be used because instances of this class are shared.
	(updateJarLibraryPath): Check for rawContextDir/lib/file.jar
	rewritten. The previous implementation did work with a static
	context dir. But since 2.0.7 users can pass their own contextDir
	to updateJarLibraryPath.
	(initClassLoader): New procedure
	(initClassLoader): Deprecated, users can set extension_dir and the
	bridge will use that. It doesn't make sense to keep the old static
	implementation.
	(clear): contextDir variable doesn't exist anymore.
	(reset): use new initClassLoader.

	* server/php/java/bridge/JavaBridge.java (init),
	server/php/java/bridge/JavaBridgeRunner.java (JavaBridgeRunner),
	server/php/java/faces/PhpFacesScriptContext.java,
	server/php/java/servet/PhpJavaServlet.java (init): use new
	initClassLoader instead of the deprecated one.

	* server/php/java/faces/Script.java (call): Display a message if
	we could not connect to the specified (apache-, iis-) port. Try
	again with the local (cgi-) port.
	
	* php-java-bridge.spec, php-java-bridge, php-java-bridge.service:
	Start as user tomcat.

	* server/natcJavaBridge.c
	(Java_php_java_bridge_JavaBridge_openLog): Redirect to stderr (default).

	* server/php/java/bridge/JavaBridge.java 
	(init): Redirect to stderr (default).
	
	
2006-02-02  Jost Boekemeier  <jostb@intern>

	* examples/php+jsp/source.php, examples/php+jsp/index.php: New
	files.

	
2006-02-01  Jost Boekemeier  <jostb@intern>
	
	* examples/bench/bench.php: load a local poi.jar first.

	* examples/languages/scheme-demo.php: load a local kawa.jar first.

	* server/configure.in: Check for jni in the gcj path, too.
	
	* php/java/servlet/CGIServlet.java (setCGIEnvironment),
	php/java/faces/PhpFacesContext.java (getBaseURL),
	php/java/faces/PhpFacesScriptContext.java (initialize): Do not
	rely on the values that some clients send. Use the real server
	name and the real server port, not the header values from the
	request. IE for example sends wrong values when the request was
	redirected. Example: request for
	http://localhost:80/java-server-faces/index.php => backend
	receives redirected request on 8080 but with server port set to
	80!).

	* php_java.h: servlet_is_default: New variable set to 1 if
	java.servlet was set to "On".

	* protocol.c (setResultWith_context): Do not set the cookie path
	if java.servlet was set to "On".

	* VERSION, php-java-bridge.spec: Version 3.0.7pre1 released

2006-01-30  Jost Boekemeier  <jostb@intern>

	* INSTALL.SERVLET: Removed

	* INSTALL.J2EE: New from INSTALL.SERVLET

	* INSTALL: Removed Linux section
	
	* INSTALL.LINUX: New from INSTALL
	
	
2006-01-30  Jost Boekemeier  <jostb@intern>

	* test.php, test.php4: Suppress errors from dl(), use new
	JavaClass to avoid "no constructor" warning.

	* VERSION, php-java-bridge.spec: Version 3.0.7pre released

2006-01-29  Jost Boekemeier  <jostb@intern>

	* PROTOCOL.TXT: Moved async protocol implementation to Version-3-1
	branch. The 3.0.8 version must be compatible with 2.0.8.

	* README, INSTALL.SERVLET, INSTALL.WINDOWS: Rewritten

	* java.ini.windows: Removed

	* java-servlet.ini, java-standalone.ini: New files

	* php-java-bridge.spec: Create php-java-bridge,
	php-java-bridge-servlet, php-java-bridge-standalone and
	php-java-bridge-devel RPM files.

	* bind.c: Do not depend on ext/session.

	* bind.c (quote): Obsolete: java -jar JavaBridge.jar INET:0 4 now
	behaves as java -jar JavaBridge.jar INET:0 4 ""

	* client.c (setResultFromObject, begin): Backward compatibility
	with 2.0.8

	* tests.m4/java_check_jni.m4: New test for Mac and BSD

	* config.m4: Check if JNI is available and suppress
	natcJavaBridge.so if not.

	* init_cfg.c.in (is_fcgi_servlet): New global.

	* java.ini: Rewritten

	* php-java-bridge: There can only be one pid.

	* protocol.c (redirect): Check result from open().

	* server/php/java/bridge/JavaBridge.java (init): usage() if
	socketname is --help.
	
	* server/php/java/bridge/JavaBridge.java (osName, osArch): The
	os.name and os.arch up to the first non alnum char -- "windows"
	instead of "windows 2000" or "windows xp".
	
	* server/php/java/bridge/http/ContextServer.java (ContextServer):
	Allocate a SocketContextServer only when the client was not able to
	create a pair of named pipes.
	
	* server/php/java/servlet/PhpJavaServlet.java (contextServer):
	Initialize when servlet context starts, destroy when servlet
	context terminates. Otherwise the JavaBridgeContextRunner keeps
	running until the VM terminates.

	* server/test/Discovery.java: Rewritten
	
2006-01-15  Jost Boekemeier  <jostb@intern>

	* server/javax/script/ScriptEngineManager.java 
	(getServiceProviders): avoid warning.

	* server/php/java/script/PhpScriptContext.java
	(call): removed obsolete cast.

	* server/php/java/script/PhpScriptEngine.java
	(PhpScriptEngine): Set our context instead of overriding every public function.
	(eval): Obsolete.

	* server/test/Discovery.java: Test the above change.
	
2006-01-15  Jost Boekemeier  <jostb@intern>

	* php.ini, php.ini.windows: Revert last change: on some operating
	systems (Windows) "connect" does not fail immediately when the
	backend is not listening on the given port.

	* client.c (destroy_channel): Close the lockfile before removing
	it. This fixes a serious resource leak when the backend is a J2EE
	server and the frontend is Apache (Unix).

	* php_java.h (lockfile): New global.

	* protocol.h (backend_has_session_proxy): New flag which indicates
	that the backend has aquired a session proxy.

	* java.c (session): Backward compatibility with 2.0.8:
	java_session() can be called even if the backend's headers were
	aleady sent.

	* server/php/java/servlet/PhpJavaServlet.java
	(handleRedirectConnection): Write a "headers already sent" message
	if java_session() is not the first java statement in a php script.
	
	* tests.php5/override_redirect.php: New test for the above code.

	* server/javax/script/ScriptEngineManager.java
	(getServiceProviders): New procedure.
	(ScriptEngineManager): Code works with GNU java and Sun java.
	
	* server/javax/script/ScriptEngineFactory.java: Compatibility with
	JDK1.6

	* server/php/java/bridge/PhpScriptEngineFactory.java: New class.

	* server/php/java/bridge/PhpScriptEngine.java (getFactory): Return
	the factory.
	(eval): Use a StringReader, not a FileReader
	(eval): Release the previous continuation if it exists
	(eval): engine.eval((Reader)null) can be used to release the last
	continuation
	
	* server/META-INF/services/javax.script.ScriptEngineFactory: New
	file

	* server/test/Discovery.java: New test for the above code.

	* VERSION, php-java-bridge.spec: Version 3.0.6 released
	
	
2006-01-08  Jost Boekemeier  <jostb@intern>

	* php-java-bridge: Start the local backend even if a non-local
	backend is already running.

	* java.c (MINFO): Always display the start command, even if a
	backend is already running.
	
	* bind.c (test_server): Use the local backend as a fallback when
	the servlet backend is not available and vice versa.

	* bind.c (test_server): Search for the wrapper in ext_dir (used
	when installing the RPM on debian).

	* php.ini, php.ini.windows: Enable both, the hosts and the local
	backend. If java.servlet is set, the bridge will use a HTTP tunnel
	from the hosts list. If that fails, it will use the local
	backend. If java.servlet is not set, the bridge will use the local
	backend first, then a backend from the hosts list.

	* java.c: Preliminary IDE support. The bridge should work with
	PHP4 again.
	
	* server/php/java/bridge/JavaBridgeRunner.java (main): New
	procedure to start a simple HTTP server.

	* server/php/java/bridge/ISession.java (getLastAccessedTime,
	getCreationTime): New methods.

	* server/php/java/bridge/Session.java (get, put, remove,
	setTimeout, putAll, getAll): Update et the lastAccessedTime so
	that expire works correctly.
	
	* VERSION, php-java-bridge.spec: Version 3.0.5 released

	
2006-01-04  Jost Boekemeier  <jostb@intern>

	* CREDITS: correct spelling

	* INSTALL: Require j2re on RHEL3, jre on others

	* PROTOCOL.TXT: Version 2.0 supports asynchronuous replies.

	* client.c (setResultFromObject): pass type information used for
	the async. protocol cache.

	* java.c (session_get_default_lifetime): New procedure
	(warn_session): Warn if a bug in a php5.1.1 session module detected
	(session, serialize, deserialize): Use session_get_default_lifetime.

	* server/php/java/bridge/ISession.java (getLastAccessedTime, getCreationTime): New functions.

	* server/php/java/bridge/Session.java (get, put, getAll, putAll,
	remove, setTimeout): update lastAccessedTime.

	* server/php/java/bridge/JavaBridge (init): Create JavaBridge.log
	if called with zero arguments (used on windows)
	(reset): Do not reset the session. The session can be reset by
	using the static method Session.reset(): (new JavaClass("php.java.bridge.Session"))->reset();

	* tests.php5/session_write_close_bug.php: Test for php5.1.1 write_close bug.
	
2005-12-28  Jost Boekemeier  <jostb@intern>

	* server/php/java/bridge/PhpProcedureProxy.java 
	(getNewFromInterface): Allow null interface.

	* server/php/java/bridge/ParserString.java
	(getStringValue): Encode string according to options.
	(getASCIIStringValue): New procedure.

	* server/test/Utf8.java: New test

	* server/php/java/bridge/http/SocketContextServer.java
	(SocketContextServer): Throw an exception if we don't have socket
	permissions and a named pipe channel is not available. For the SUN
	j2ee sample server this now means that Windows users must add:
	grant {permission java.net.SocketPermission "*", "accept,resolve";}; 
	or they must run their AS on unix.

	* server/php/java/script/PhpScriptEngine.java
	(eval, invoke): Throw a "not invocable" exception from invoke
	only.
	
	* VERSION, php-java-bridge.spec: Version 3.0.4 released
	
2005-12-22  Jost Boekemeier  <jostb@intern>

	* client.c (init_channel): Initialize channel.
	
	* server/php/java/bridge/JavaBridge.java
	(weight): New procedure.
	(select): Rewritten to use weight.
	(offsetExists, offsetGet, offsetSet, offsetUnset): Accept arrays
	of primitive type and List.

	* server/php/java/bridge/PhpMap.java
	(getPhpMap): Check if the element is valid.
	
	* tests.php5/vector.php, tests.php5/map.php,
	tests.php5/byteArray.php, tests.phpt/charArray.php: New tests.
	
2005-12-21  Jost Boekemeier  <jostb@intern>

	* server/php/java/bridge/http/IContextServer.java
	(setChannelName, getChannelName): removed. The context server is
	shared and therefore stateless.
	(start): Pass the channel name
	
	* server/php/java/bridge/http/ContextServer.java
	(getFallbackChannelName): New method.
	(start): Pass the channel name.

	* server/php/java/bridge/http/PipeContextServer.java
	(start): Pass the channel name.

	* server/php/java/bridge/http/SocketContextServer.java
	(start): Pass the channel name.

	* server/php/java/bridge/http/JavaBridgeRunner.java
	(parseBody): Do not store anything into the context server, it is
	shared.

	* server/php/java/servlet/PhpJavaServlet.java
	(handleSocketConnection): Do not store anything into the context
	server, it is shared.
		
2005-12-20  Jost Boekemeier  <jostb@intern>

	* init_cfg.c.in (override_ini_from_cgi, create_pipe, create_pipes,
	init_channel, destroy_channel, destroy_sockname): Moved to client.c

	* java.c (rinit, rshutdown): initialize/shut down the pipes here,
	not in minit/mshutdown.

	* client.c (create_pipe): chmod to 666 so that the pipe can be
	accessed. Otherwise the pipe communication may fail, depending on
	the process umask.

	* php-java-bridge.spec: Rewritten so that it is possible to create
	RHEL3 binaries from the source RPM.
	
	* VERSION, php-java-bridge.spec: Version 3.0.3a replaces
	3.0.3. This version is for Unix/Linux only, necessary because of
	the Unix specific umask problem.

	
2005-12-18  Jost Boekemeier  <jostb@intern>

	* client.c (begin_header): store redirect_port and redirect to named
	pipe if necessary.
	
	* init_cfg.c.in (override_ini_from_cgi, create_pipe, create_pipes,
	init_channel, destroy_channel, destroy_sockname): New functions.

	* protocol.h (SOCKNAME_SHM): Default location of the named pipe.
	(peerr, f_recv, f_recv0, f_send, f_send0): New protocol variables
	for named pipes.

	* test.php: Correct output.

	* server/configure.in: Use RI instead of myfaces.

	* unsupported/commons-el.jar, unsupported/myfaces-api.jar,
	unsupported/myfaces-impl.jar, unsupported/tomahawk.jar: Removed
	apache myfaces

	* unsupported/jsf-api.jar, unsupported/jsf-impl.jar,
	unsupported/jstl.jar/unsupported/standard.jar: Added jsf RI

	* server/php/java/bridge/http/IContextServer.java,
	server/php/java/bridge/http/PipeContextServer.java,
	server/php/java/bridge/http/SocketContextServer.java: New files.

	* server/php/java/bridge/http/ContextServer.java: Rewritten to use
	pipes or sockets.

	* examples/java-server-faces/index.php: Use to the server
	name w/o port.
	
	* VERSION, php-java-bridge.spec: Version 3.0.3 released
	
2005-12-11  Jost Boekemeier  <jostb@intern>

	* client.c (override_ini_for_redirect): The previous change was
	incompatible to the 2.0.8 behaviour. The new behaviour can now be
	selected using: java.servlet=User or java.servlet=MultiUser.

	* VERSION, php-java-bridge.spec: Version 3.0.2 released
	
2005-12-08  Jost Boekemeier  <jostb@intern>

	* bind.c (start_server): Detach the guard from the apache process
	group, otherwise it may get killed (one had to kill the java
	child).

	* java.c (offsetExists, offsetGet, offsetSet, offsetUnset):
	Rewritten to use the new interface (the old implementation was
	horribly inefficient).
	
	* java.c (MINIT): Use the global create_object,
	create_exception_object.

	* java_bridge.c (create_object, create_exception_object): New
	functions to prevent memory leaks, works around a bug in php 5.1.1
	(signature changed from 5.1.0 to 5.1.1).
	
2005-11-27  Jost Boekemeier  <jostb@intern>

	FIXME Entries since 2005-09-19 missing, regenerate them

2005-09-19  Jost Boekemeier  <jostb@intern>

	* server/php/java/servlet/CGIServlet.java (run): Close the post
	input stream, otherwise the CGIServlet hangs.

	* VERSION, php-java-bridge.spec: Version 2.0.8 released.
	
2005-09-17  Jost Boekemeier  <jostb@intern>

	* server/php/java/servlet/ContextRunner.java (init): Wait for the
	reply in a new thread.

	* server/php/java/servlet/SocketRunner.java (accept, getNext):
	Wait for the reply in a new thread.

	* server/doc: Documentation added.
	
2005-09-16  Jost Boekemeier  <jostb@intern>

	* java_bridge.c (checkError): Do not longjmp, this may confuse
	other modules.

	* java.c (allocate_php4_exception): Do not use longjmp.

	* examples/bench/callback3.php: correct path.

	* server/php/java/servlet/CGIServlet.java (run): Dispose the
	executable, for PR1291175.

	* tests.php5/instanceof.php: Rewritten, for PR1286136.

	* VERSION, php-java-bridge.spec: Version 2.0.8RC5 fixes PR1286136 and 1291175.
	
2005-09-15  Jost Boekemeier  <jostb@intern>

	* client.c (begin): Display protocol error if we receive HTML

	* java.c (session): Accept 0 parameters

	* parser.c (parse): push when we receive a begin
	(e.g. <html></html>) This fixes a crash when parsing HTML error
	pages.

	* php/java/bridge/DynamicJavaBridgeClassLoader.java
	(resolveLibraryName): pass an absolute path even if extension_dir
	is set to "." (PR1286643)

	* php/java/servlet/CGIServlet.java: Rewritten to allow POST
	data. The problem with the old solution was that the parameters
	were extracted before opening the InputStream. Since the getter
	operates on both, the URL parameters and the InputStream, the post
	parameters were gone after that. (PR1291191)

	* php/java/servlet/ContextRunner.java (init): Throw a NP with a
	description if we receive an invalid context.
	(PR 1291175)

	* VERSION, php-java-bridge.spec: Version 2.0.8RC4 fixes PR1291191, PR 1291175 and PR1286643.
	
	
2005-09-12  Jost Boekemeier  <jostb@intern>

	* php_java_snprintf.h: Added missing header.

	* config.m4: Clarify warning message.

	* java.c (session) accept 0..2 parameters.

	* php-java-bridge.te: Added missing right to create /var/log/php-java-bridge.log

	* protocol.c (setResultWith_context): Do not change the path, otherwise we end up with
	cookies which have different paths.

	* php/java/bridge/DynamicJavaBridgeClassLoader.java (updateJarLibraryPath): GNU java throws null pointer exception when it cannot connect to a remote URL.

	* php/java/bridge/ISession.java: Added javadoc

	* php/java/bridge/Request.java (handleOneRequest): New method used
	so that one cannot fake client requests; only one statement is
	executed via the HTTP tunnel, everything else goes through the
	local channel.

	* php/java/servlet/CGIServlet.java (encode): New function which
	uses UTF8 encoding.
	(unixLocation2): New global which points to php-cgi, used since
	FC4.

	* php/java/servlet/SocketRunner.java (accept): Do not shut down
	the local channel if attacked.

2005-09-07  Jost Boekemeier  <jostb@intern>

	* server/RunJavaBridge.c.in, server/RunMonoBridge.c.in: Execute
	with path.

	* server/php/java/bridge/JavaBridge.java (deserialize, serialize): Updated documentation.

	* server/php/java/bridge/Session.java (Session, expire, getAll): A Hashtable cannot
	store null values, use Collections.synchronizedMap
	instead; for PR1283148.

	* server/php/java/bridge/CGIServlet.java (setDefaultEnv):
	rewritten, see PR1281189.

	* tests.php4/session.php: test null values in session, for
	PR1283148.

	* VERSION, php-java-bridge.spec: Version 2.0.8RC2 fixes PR1283148
	and 1281189.


2005-09-04  Jost Boekemeier  <jostb@intern>

	* bind.c (sys_error): New procedure.

	* java.c (__errno): do not modify __errno on windows. Use
	GetLastError in sys_error instead.
	
	* server/php/java/bridge/JavaBridge.java (getSerialID): synchronize

	* server/php/java/bridge/Util.java (appendObject): display null
	
	* server/php/java/servlet/CGIServlet.java (setDefaultEnv): New
	function to work around a bug in WIN XP which requires the
	environment variable "SystemRoot". If this variable is missing, XP
	cannot find winsock.dll anymore...
	(printServletEnvironment, doGet, toString): Removed dead code.
	(setCGIEnvironment): Use getDefaultEnv.
	
	* server/php/java/servlet/CGIServlet.java
	(getSession): Added required parameter. Otherwise our method will
	not be called.

	
2005-09-01  Jost Boekemeier  <jostb@intern>

	* client.c (begin): Use java_strtod instead of
	zend_string_to_double which cannot convert negative values. (PR1275899)
	(try_connect_to_server): Correct error message.

	* java.c (serialize, deserialize): New functions (PR1202896 and 1274526)
	(closure): Added missing branch for null map (PR1276889)
	(MINIT): __sleep and __wakeup for php4 (PR1202896 and 1274526)

	* protocol.c (PRECISION): Send not more than 17 significant digits.

	* examples/XML/html_to_text.php: Corrected example, PR1276889 

	* server/php/java/bridge/JavaBridge.java (getSession): Prepend "@"
	in order to distinguish internal from public session names
	(getId): New function
	(warn, logMessage, logError, logDebug): Use getId() instead of this.
	(Create): log constructor call
	(deserialize, getSerialID, serialize): New methods for PR1202896 and 1274526.

	* server/php/java/bridge/Util.java (initGlobals): Replaces static block which did not work correctly
	(getShortClassName): New function
	(appendObject): prepend the short class name to the object description.

	* tests.php4/session_vars.php, tests.php4/numberTest.php, tests.php4/numberTest.jar, tests.php4/NumberTest.java: New tests
	* php_java_strtod.c, php_java_strtod.h: New files for PR1275899 
	
	* config.m4: php_java_strtod.c added
	
	* php-java-bridge.spec, VERSION: 2.0.8RC1 fixes PR1276889, 1275899, 1274526, 1202896.

2005-08-27  Jost Boekemeier  <jostb@intern>

	* INSTALL: Rewritten

	* VERSION, php-java-bridge.spec: Version 2.0.8RC
	
	* java.c (__sleep, __wakeup): New functions to avoid problems
	described in PR1274526 and PR1202896. In a future version we might
	make java values serializable. Until then please use the JSession
	adapter (located in php_java_lib) if you want to store java values
	into the session variable.

	* server/Makefile.am: Added missing ConstructorCache.
	
	
2005-08-27  Jost Boekemeier  <jostb@intern>

	* README: Removed Sun j2ee sample server, added Oracle 10g AS and
	WebSphere 6 AS.

	* server/WEB-INF/web.xml: Use UTF encoding for WebSphere.

	* server/php/java/servlet/PhpJavaServlet.java (findCGI): Add
	separator (for WebSphere).

	
2005-08-26  Jost Boekemeier  <jostb@intern>

	* server/php/java/servlet/HttpSessionFacade.java (isNew): Use
	local variable (needed for servlet engines which check the thread context).

	* server/php/java/servlet/PhpJavaServlet.java
	(handleSocketConnection): some servlet engines override
	close. Flush the output instead.

	* unsupported/gcc3.4-broken-jni-method-lookup.patch: Obsolete, we
	don't use JNI anymore.
	
2005-08-25  Jost Boekemeier  <jostb@intern>

	* server/php/java/servlet/Context.java (removeAll): rewritten

	* server/php/java/servlet/SocketRunner.java (accept): Shutdown when an exception (e.g. security exception) occurs.

	* server/php/java/bridge/JavaBridge.java (makeClosure): Added missing method.

	* examples/gui/README: New file

	* README.MONO+NET: Corrected documentation.

	* README: Updated documentation
	
2005-08-24  Jost Boekemeier  <jostb@intern>

	* client.c (adjust_environment): Removed obsolete code.

	* java.c (clone_cfg): Check if already initialized.
	(destroy_cloned_cfg): initialize.
	(closure): correctly send map
	(call_with_exception_handler): display name is now call_global_func_with_exception_handler.

	* protocol.c (protocol_end): send context on shutdown in order to terminate redirected request.

	* server/php/java/bridge/JavaBridge.java (objectDebugDescription): Check null values.
	(makeClosure): accept name, useful if there is only one callback, e.g. closure($this, "onClose");

	* server/php/java/bridge/PhpProcedure.java (PhpProcedure): accept name.
	(createProxy): accept name.
	(setResultFromProcedure): accept name.

	* server/php/java/bridge/PhpProcedureProxy.java (PhpProcedureProxy): accept name.

	* tests.php4/callback_map.php, tests.php4/callback_name.php: New tests.
	
	* server/php/java/servlet/Context.java (removeAll): New procedure

	* server/php/java/servlet/PhpJavaServlet.java
	(handleSocketConnection): wait for ctx otherwise tomcat5 would modify
	the aquired session handle.

	* server/php/java/servlet/SocketRunner.java
	(accept): remove all contexts when we destroy the socketrunner

	* tests.php4/re-direct.php: new test which checks if the context will be destroyed correctly.

	* tests.php5/Callback.java: added missing test class.
	
	* tests.php4/reset.php: rewritten
	
2005-08-23  Jost Boekemeier  <jostb@intern>

	* bind.c (get_server_args, use_wrapper, get_server_string, test_local_server, can_fork, wait_server, start_server, exec_vm, wait_for_daemon): Pass TSRMLS for windows thread safety.

	* client.c (begin_header, handle_request, adjust_environment, try_connect_to_server): Pass TSRMLS for windows thread safety.

	* init_cfg.c.in (init_socket, init_cfg, destroy_cfg, option_set_by_user, get_servlet_context, get_sockname): Pass TSRMLS for windows thread safety.
	(get_sockname): bugfix: check the socketname, not the servlet name.
	
	* java.c (__errno): Set to 0 on windows and do not change the
	variable as it is shared.
	(clone_cfg, destroy_cloned_cfg): New procedures used to unshare
	the variables we override during channel re-direct.
	(OnIniServlet): Store the servlet context, not "On".
	(alloc_globals_ctor): initialize the re-direct vars.
	(make_local_socket_info, minit, minfo, mshutdown, rshutdown, rinit):  Pass TSRMLS for windows thread safety.
	
	* protocol.c (end, protocol_end, send_context, IS_SERVLET_BACKEND, IS_OVERRIDE_REDIRECT): Pass TSRMLS for windows thread safety.

	* server/php/java/bridge/ThreadPool.java
	(getNextRunnable): Discard failed notify. Even though we do not
	send a notifyAll, it may happen that we notify a waiting thread
	even though another thread has entered the critical section
	and has just taken over the runnable without consuming the notify.
	Consider that t1 is in wait(), t2 is running and start(r) is
	called:
	
	- t2 stands before the critical section
	- start sends notify (to t1), leaves critical section
	- t2 enters critical section, pulls runnable from the list
	- t2 leaves critical section
	- t1 leaves wait and throws an exception because runnables is empty

	If this happens, the thread count is reduced without adjusting the
	threads variable. If it happens more than THREAD_POOL_MAX_SIZE
	times, the pool stops working.
	
	(run): Adjust the threads variable if a throwable occurs. Even
	though we catch everything on a level below, problems in the pool,
	out of memory error for example or the problem in getNextRunnable
	above, may still terminate the thread.
	
	* php-java-bridge.spec, VERSION: Version 2.0.8 pre4
	
2005-08-21  Jost Boekemeier  <jostb@intern>

	* bind.c
	(get_server_args): Only append a separator if the path doesn't end
	with one.

	* client.c 
	(begin_header): Do not overwrite re-direct with re-open.
	(adjust_environment): Avoid php warnings

	* init_cfg.c.in (init_socket, init_cfg): keep the default
	socketname.
	(get_sockname): New function
	
	* java.c (OnIniSockname): The last fix broke the servlet re-direct
	which needs to switch off the local socket. We now store the
	default socketname in a separate variable and use get_sockname()
	to retrieve the value.
	(make_local_socket_info): New procedure.
	
	* php_java.h (is_cgi_servlet): New global.

	* protocol.c (end): Send the context only if there are
	statements following the re-direct.
	(setResultWith_context): New function

	* server/web.xml: Is now valid XML.

	* server/php/java/bridge/JavaBridge.java (getSession): Print a
	stacktrace if session is null.

	
	
2005-08-18  Jost Boekemeier  <jostb@intern>

	Merged from Version-2-0-7 trunc:
	
	* server/php/java/bridge/JavaBridge (ObjectToString): Use
	Util.getClass instead of ob.getClass() to avoid surprises when ob
	is null or a class.
	
	* server/php/java/bridge/Request.java (add): Index must be long,
	otherwise we get a class cast exception in coerce.  Fix copied
	from 2.0.8pre.

	* server/php/java/bridge/Response.java
	(append_for_OutBuf_getFirstBytes): Must be accessible from the
	inner class on Mono.
	(append_none_for_OutBuf_getFirstBytes): likewise.
	
2005-08-18  Jost Boekemeier  <jostb@intern>

	* bind.c (test_server): Pass sockaddr in order to implement
	override redirect.

	* client.c (set_cookie): New procedure.
	(begin_header): set the cookie from the backend, re-direct to the
	correct backend, not to 127.0.0.1.
	(handle_request): check for override redirect, for re-directs: do
	not re-open before the correct port is set.
	(adjust_environment): php 5.3 changes the header field from
	X_JAVA_BRIDGE_... to HTTP_X_JAVA_BRIDGE!?!
	(createSecureEnvironment): Store the original socket addr for
	override redirect.

	* java.c (RSHUTDOWN): free the override redirect vars.
	(session): obtain a session from the backend

	* protocol.c (get_cookies, end_session, check_context): New
	functions

	* protocol.h (IS_SERVLET_BACKEND, IS_OVERRIDE_REDIRECT): New macros
	(peer0, peer_redirected, orig_peer_saddr): New session vars for override redirect.

	* server/php/java/servlet/CGIServlet.java (run): rewritten.
	
	* server/php/java/servlet/Context.java (setSession): New method.
	
	* server/php/java/servlet/PhpJavaServlet.java (setSession): New
	method.
	(handleRedirectConnection): New method for redirect and override
	redirect.
	(handleHttpConnection): Close the io streams.
	(handleSocketConnection): Check if the client needs a session
	handle. If so, include the client and provide the requested
	information for it. -- We use a short path here: instead of
	connecting back to php, we only provide the session handle which
	the client must send back to the browser. In case we were
	re-directed to a local channel, temporarily revert the
	re-direction and execute this statement (the getSession()) via the
	HTTP tunnel.

	* server/php/java/servlet/SocketRunner.java (SocketRunner): The
	local channel socket may bind to all ports. When using
	apache/mod_jk, clients cannot directly access the tomcat server
	anyway.

	* examples/php+jsp/sessionSharing.php: Create the session before
	generating output.
	
2005-08-09  Jost Boekemeier  <jostb@intern>

	* bind.c (get_server_args): extension_dir may be configured
	dynamically, look into extension_dir/lib to load libraries and
	shared libraries (.dll's).
	(wait_server, start_server, wait_for_daemon): Start java
	automatically on win32.

	* init_cfg.h.in (CFG_LD_LIBRARY_PATH, CFG_CLASSPATH): Do not
	hardcode these values, use extension_dir/lib instead.
	
	* client.c (call_user_cb, handle_exception): pass exceptions back
	to the server.
	(setResultFromApply): rewritten

	* java.c (last_exception_get, last_exception_clear): New local
	procedures in order to emulate try/catch on php4.
	(closure): rewritten
	(check_php4_exception, call_with_handler, call_with_params,
	call_with_exception_handler, exception_handler): New procedures to
	handle exceptions in callbacks.

	* java_bridge.c (checkError): if called from java, jump right back
	to the procedure from which we were called.  This can be used to
	emulate try/catch in php4.
	(is_type): It is now possible to extend from the Java proxy and to
	override its methods.

	* php_java.h: Removed declspec(dllexport), which never really
	worked. Use gcc's autoimport, which also works with our cross
	compiler.
	(exception, php4_throw_buf, object, func, retval_ptr,
	func_params): New variables used for exception handling during apply.

	* protocol.c (Exception): Send exception to the server.
	
	* client.c (end): setCookie obsolete, we now use the context.
	(adjust_environment): rewritten.
	
	* PROTOCOL.TXT: Send exceptions to the server.

	* java.c (reset): Display a warning if reset() is called.	

	* java.c (call_function_handler4): It is now possible to extend
	from the java proxy and to override its methods.

	* examples/XML/html->text.php: New example.
	(examples/XML/DTD/xhtml-lat1.ent,
	examples/XML/DTD/xhtml-special.ent,
	examples/XML/DTD/xhtml-symbol.ent,
	examples/XML/DTD/xhtml1-strict.dtd,
	examples/XML/DTD/xhtml1-transitional.dtd): New files.

	* server/php/java/bridge/DynamicClassLoader.java
	(URLClassLoaderFactory): New internal class.
	(setUrlClassLoaderFactory): New method.
	(createURLClassLoader): create via URLClassLoaderFactory.

	* server/php/java/bridge/DynamicJavaBridgeClassLoader.java
	(updateJarLibraryPath): rewritten
	(resolveLibraryName): New method which searches for native libraries.
	(getUrlClassLoaderFactory): New method
	(loadClass): New method
	(newInstance): Use our factory in order to search for native libraries.

	* server/php/java/bridge/JavaBridge.java
	(setException): rewritten
	(CreateObject): display a proper error message when a
	NoClassDefFoundError occured instead of returning the class to the
	client.
	(setLibraryPath): Pass the contextDir (the dynamic extension_dir) to the loader.
	(warn): New procedure.

	* server/php/java/bridge/Request (Args): accept the exception
	object from the client and re-throw in order to abort this frame.
	(begin): handle Exeption.

	* server/php/java/bridge/Util (warn, appendObject, appendArgs):
	New procedures.

	* server/php/java/servlet/PhpJavaServlet (handleSocketConnection): 
	wait for the contextRunner.
	(handleHttpConnection): rewritten
	(getContext): new procedure.
	(updateBridgeContext): replaced by getContext

	* tests.php5/Callback.java, tests.php4/callback.php,
	tests.php4/callback1.php, tests.php5/callback1.php,
	tests.php5/callback.php, tests.php5/callback.jar: New tests.

	* tests.php5/NoClassDefFound.java: added call test.
	
	* tests.php4/doesNotExist.jar, tests.php4/noClassDefFound.jar,
	tests.php4/noClassDefFound1.php, tests.php4/noClassDefFound2.php:
	New tests.

	* php_java_lib/JSession.php: Allows one to store java values into
	the $_SESSION var.

	* tests.php5/session_vars.php: Test for JSession.php.

	
2005-08-02  Jost Boekemeier  <jostb@intern>

	* client.c (adjust_environment): rewritten.

	* server/php/java/servlet/CGIServlet.java (run): Removed obsolete
	500ms delay.
	
2005-07-31  Jost Boekemeier  <jostb@intern>

	* bind.c (test_server): Close the socket if nobody is
	interested. This fixes a leak which appeared when running
	phpinfo().

	* client.c (adjust_environment): New function.
	(try_connect_to_server): Adjust environment in order to re-direct
	to a local channel.

	* protocol.c (getSessionFactory): New function.
	(send_context): New function.
	(end): Send the context.
	
	* java.c (RSHUTDOWN): free servlet_redirect.
	
	* examples/php+jsp/sessionSharing.php,
	examples/php+jsp/sessionSharing.jsp: New files.

	* server/php/java/bridge/ISession.java: New interface.

	* server/php/java/bridge/JavaBridge.java (SessionFactory): New
	class.
	(getSession): rewritten.
	(setSessionFactory): New procedure.

	* server/php/java/servlet/Context.java,
	server/php/java/servlet/ContextRunner.java,
	server/php/java/servlet/SocketRunner.java,
	server/php/java/servlet/HttpSessionFacade.java: New classes which
	implements session sharing and local channel re-directs.

	* server/php/java/servlet/PhpJavaServlet.java
	(updateBridgeContext): New procedure which sets the
	channel/session context.
	
	
2005-07-28  Jost Boekemeier  <jostb@intern>

	* README: Added note about JSP and session sharing between PHP and
	JSP.

	* client.c
	(begin_header): Added re-direct to a local channel in order to
	speed up the servlet implementation.
	(handle_request): if re-directed, temporarily change the
	java.socketname, java.hosts and java.servlet.
	
	* java.c
	(PHP_INI_BEGIN): java.log_level, java.log_file, java.java and
	java.java_home are user settings.
	(OnIniServlet, OnIniSockname, OnIniHosts, OnIniClassPath,
	OnIniLibPath): These cannot be set by the user.
	(MINFO): Display entries only if they make sense.
	
	* client.c
	(handle_request): free the m and p arguments.
	
	* examples/php+jsp/excel.php, examples/php+jsp/numberguess.jar,
	examples/php+jsp/numberguess.php,
	examples/php+jsp/numberguess.jsp, examples/php+jsp/oops.jsp,
	examples/php+jsp/oops.php: New examples.

	* server/Makefile.am: include the new examples.

	* server/php/java/bridge/JavaBridge.java
	(requestOptions): Share the options for all request instances,
	needed for re-direct.
	(bind): New from init.
		
	* server/php/java/servlet/CGIServlet.java
	(run): rewritten.
	
	* server/php/java/servlet/PhpJavaServlet.java
	(init): open a server socket for re-direct.
	(destroy): close socket
	(doGet): catch IOException, display descriptive message and throw
	servlet exception.
	
2005-07-24  Jost Boekemeier  <jostb@intern>

	* PROTOCOL.TXT: updated documentation.

	* init_cfg.c.in (option_set_by_user): new function
	(is_servlet): obsolete
	
	* java.c (get_values): check for php4, if so, return the argument
	without creating memory leaks.
	(OnIniServlet, OnIniSockname, OnIniHosts, OnIniClassPath,
	OnIniLibPath, OnIniJava, OnIniJavaHome, OnIniLogLevel,
	OnIniLogFile): It is now possible to use these in php scripts,
	e.g. ini_set("java.log_level", 4);
	
	* bind.c (test_server): java.servlet forces java.socketname to
	off.

	* java.c (inspect): new function

	* server/php/java/bridge/JavaBridge.java (inspect): new function.

	* server/web.xml: added config options.

	* server/php/java/bridge/DynamicClassLoader (newInstance): create
	a dynamic classloader with the servlet classloader as parent.

	* server/php/java/servlet/CGIServlet.java: New file.

	* server/php/java/servlet/PhpJavaServlet.java: extend fromm
	CGIServlet.
		
2005-07-17  Jost Boekemeier  <jostb@intern>

	* bind.c (get_server_args): New mono release fixes a bug, so we
	can now send the socket# to the backend.

	* client.c (setResultFromApply, begin, end): pass the cname
        (handle_request): tail call from the setResultFromProcedure into
	the handle_request loop.
	
	* PROTOCOL.TXT: pass the cname (the "php" name of the function),
	not the index#
	
	* java.c (require): call mono setLibraryPath in order to load
	CLR dll's.
	(closure): rewritten

	* java_bridge.c (result): allow passing null args.

	* protocol.c (end): new procedure
	(flush): call end.
	(ResultEnd): do not auto-flush, we jump right back into the
	handle_request and then do a tail-call to return from the
	sub-request.

	* server/RunMonoBridge.c.in: code enabled for latest mono version.

	* server/php/java/bridge/JavaBridge.java (loadMethod, CLRAssembly): new
	globals.
        (init): initialize globals
	(coerce): check for CLR
	(setLibraryPath): new procedure
	
	* server/php/java/bridge/PhpProcedure.java
	(setResultFromProcedure): pass cname

	* server/php/java/bridge/Response.java (writeApplyBegin): pass
	cname instead of pos.
	
        * examples/gui/swing-button, examples/gui/swt-button,
	examples/gui/gtk-fileselector.php, examples/gui/gtk-button.php:
	New examples.
	
2005-07-14  Jost Boekemeier  <jostb@intern>

	* server/php/java/bridge/Response.java
	(append_for_OutBuf_getFirstBytes,
	append_none_for_OutBuf_getFirstBytes): must not be private because
	methods within OutBuf reference them (needed for MONO).
	
2005-07-13  Jost Boekemeier  <jostb@intern>

	* server/php/java/bridge/JavaBridge.java (coerce): Check for PhpProcedureProxy

	* server/php/java/bridge/PhpProcedure.java: new file

	* server/php/java/bridge/PhpProcedureProxy.java: new file

	* server/php/java/bridge/Response.java (defaultValuesHook): new global
	(Response): Initialize defaultValuesHook and hook
	(reset): new method
	(flush): call reset in order to clear the response buffer ant to restore the hook.

	* tests.mono+net/gtk.php: New test

	* tests.php4/swt.php: New test
	
2005-07-12  Jost Boekemeier  <jostb@intern>

	* java.c (get_values): correctly assign variable for PHP4.
	
	* PROTOCOL.TXT: Removed optional M/F requests, added A(pply) and
	R(esult) requests. Protocol version 1.1.

	* client.c 
	(setResultFromApply): New procedure.
	(stack_elem): added variables for apply
	(begin): parse apply
	(end): parse apply

	* java.c (closure): New user function

	* java_bridge.c (result): new procedure

	* protocol.c (ResultBegin, ResultEnd): New in 1.1.

	* protocol.h (writeResultBegin, writeResultEnd): New protocol requests.

	* server/php/java/bridge/JavaBridge.java (coerce): Must be called from PhpProcedure.
	(makeClosure): New methods.

	* server/php/java/bridge/JavaBridgeClassLoader.java (getClassLoader): enabled.

	* server/php/java/bridge/Parser.java (tag, len, s, ch, mask, level,
	type, eor, blen, in_dquote, eot): Changed to private.
	(parse): check for EOF.

	* server/php/java/bridge/Request.java (add): Key must be a Long,
	otherwise we get class cast exceptions in coerce.  This bug was
	not detected until now because PHP usually generates the keys for
	us.
	(begin): Parse 'R' request, removed M/F requests.
	(handleSubRequests): New method.

	* server/php/java/bridge/Response.java (p, n, A, Ae): New strings.
	(writeApplyBegin): New procedure.
	(writeApplyEnd): New procedure.

	* server/php/java/servlet/PhpJavaServlet.java (doPut): Access load
	in a static way.
		
	
2005-07-08  Jost Boekemeier  <jostb@intern>

	* php-java-bridge.spec: Version 2.0.7pre3
	
	* VERSION: Version 2.0.7pre3
	
	* README: added note about CFG_JAVA_SOCKET_INET

	* bind.c (ineet_socket_prefix): changed to INET_LOCAL in order to
	create a local TCP socket.

	* server/php/java/bridge/LocalServerSocket (create): check for
	INET_LOCAL:

	* server/php/java/bridge/TCPServerSocket
	(create): check for INET_LOCAL:, store local flag.
	(newServerSocket): new method.
	(toString): display INET_LOCAL if necessary.

	* server/php/java/servlet/PhpJavaServlet.java 
	(init): init dynamic class loader
	(doPut): expire only at the end of the session, update load.
	
	* java.c (MINFO): display servlet status
	
	* init_cfg.c.in (get_servlet_context): Check for boolean On.

	* README: java.servlet <On|Off> is a boolean, not a string.
	
	
2005-07-05  Jost Boekemeier  <jostb@intern>

	* php-java-bridge.spec: Version 2.0.7pre2
	
	* VERSION: Version 2.0.7pre2
	
	* DynamicClassLoader.c (findResource): Fixed NP.
	
	* bind.c (get_server_args): Use extension_dir as default for
	mono.mono_home.

	* config.m4: Use withval, not enableval for --with-mono.
	Use full path for mono executable.
	
	* init_cfg.c.in: Added php wrapper.

	* java.c (MINIT): log_level, log_file, java_home and java_java
	(mono_home and mono_mono) can be set by the user (INI_ALL).
	(MINIT): set ini_last_updated early.
	(MINFO): display mono.mono and mono.mono_home entries.

	* php-java-bridge.spec: Require PHP4 for the RHEL and PHP5 for the
	FC4 RPM.

	* server/MonoBridge.c.in (usage): Correct display info.
	(main): Use full path to execute mono.

	* server/php/java/bridge/Session.java (reset): Avoid concurrent
	modification.
	
	* server/php/java/bridge/DynamicClassLoader
	(classLoaderCache): Changed type from HashMap to Hashtable in
	order to avoid synchronization problems.
	(clearCaches): New method.

	* server/php/java/bridge/JavaBridge.java
	(CreateObject): Correctly handle NoClassDefFoundError.

	* server/php/java/bridge/JavaBrideClassLoader
	(clearCaches): New method

	* tests.php4/NoClassDefFount.java: New file

	* tests.php4/noClassDefFound.php: New test.

	* tests.php4/noClassDefFound.jar: New file.
	
	
2005-07-03  Jost Boekemeier  <jostb@intern>

	* java.c (PHP_MSHUTDOWN_FUNCTION): Use EXT_GLOBAL to access cfg.
	Otherwise --enable-debug will fail.
	
	
2005-07-02  Jost Boekemeier  <jostb@intern>

	* php-java-bridge.spec: quiet ed.

	* php-java-bridge.te: Don't use base_file_read_access, which is
	broken on FC3.  Added sun java 1.5 settings.

	* server/php/java/bridge/Response.java (OutBuf): Compile with mono
	which cannot access private variables from inner classes.

2005-07-01  Jost Boekemeier  <jostb@intern>

	* bind.c (get_server_args): for_display added.

	* client.c (get_mode): pass loglevels > 4

	* java.c (get_values): php4 doesn't have RETURN_ZVAL.

	* java.ini: default log level is 2, not 3.

	* php-java-bridge: removed is_multicast, discard output of daemon
	(for FC 4).

	* php-java-bridge.spec: rewritten for FC 4.

	* php-java-bridge.te: rewritten for FC 4.

	* update_policy.sh: install the policy *before* reloading it.
	Until now one had to run the script twice!?!
	
	* server/Makefile.am: try fastjar, then jar.

	* server/php/java/bridge/DynamicClassLoader.java: removed
	reference to java.util.jar.* to avoid warnings from ecj.

	* server/php/java/bridge/DynamicJavaBridgeClassLoader.java (DynamicJavaBridgeClassLoader): 
	don't bother adding sys urls, we'll do this in clear() anyway.
	(initClassLoader): /usr/share/java/ext added (new in FC4).
	(addSysUrls): added synchronization.
	(clear): new procedure.
	(reset): reset the state, including the cache.
	(newInstance): added synchronization.

	* server/php/java/bridge/GlobalRef.java (GlobalRef): Documentation
	added
	(clear): removed. It is not possible to recycle a global ref (its
	underlying data structure would grow without bounds).

	* server/php/java/bridge/JavaBridge.java (CreateObject): use
	cl.forName().
	(select): check for null value.
	(coerce): check for null value. If we cannot create a instance
	from the template, we have received an interface. Create a
	matching type instead.
	(Invoke): Use Util.getClass() instead of v.getClass() to avoid NP
	exceptions and surprises when object is already a class.
	(getSession): added documentation
	(reset): added documentation

	* server/php/java/bridge/JavaBridgeClassLoader.java
	(JavaBridgeClassLoader): call clear() when we recycle a loader,
	not reset. reset() is used by the API java_reset().
	(getClassLoader): obsolete
	(forName): either use Class.forName() or call loadClass directly
	when the DynamicClassLoader is used.

	* server/php/java/bridge/MethodCache.java
	(Entry): Compare symbols instead of strings.
	(hasResult): new variable
	(hashCode): cache result.
	(noCache): new token
	(get): check for noCache.
	(put): check for noCache.
	(getEntry): check for null values, return noCache if one of the
	parameters is a collection or array.
	(MethodCache): initialize noCache.

	* server/php/java/bridge/Request.java
	(PhpArray): new class

	* server/php/java/bridge/Request.java
	(GetClass): renamed to getClass.

	* tests.php4/servlet_connection_re-open.php: re-written to work
	with php4 and php5.
	
	
2005-06-28  Jost Boekemeier  <jostb@intern>

	* server/php/java/bridge/MethodCache.java: New file.

	* server/php/java/bridge/JavaBridge.java (methodCache): New global.
	(init): Use EXTENSION_DIR.
	(Invoke): Use methodCache.

	* server/php/java/bridge/DynamicJavaBridgeClassLoader.java
	(initClassLoader): synchronized

	* server/Makefile.am (java_SOURCES):
	php/java/bridge/MethodCache.java added.
	

2005-06-27  Jost Boekemeier  <jostb@intern>

	* bind.c (test_server): set "called_from_init" only if called from
	init, corrects a bug when displaying the java status (running/not
	running).

	* java.c (PHP_MINFO_FUNCTION): pass is_local.

	* server/Makefile.am: New file from Makefile_unix.am

	* server/Makefile.in: Removed

	* server/Makefile_unix.am: Removed.

	* server/Makefile_windows.am: Removed.

	* server/configure.in (MONO_BRIDGE_EXE): New global.

	* server/php/java/bridge/DynamicClassLoader (findResources):
	renamed enum to enumeration because "enum" is a java 1.5 keyword.

	* server/php/java/bridge/DynamicJavaBridgeClassLoader.java
	(initClassLoader): Do nothing if initialized.

	* server/php/java/bridge/ThreadPool (Delegate): Compiles with GNU
	Java.

	* tests.php4/sendProperties.php: New test.
	

2005-06-26  Jost Boekemeier  <jostb@intern>

	* server/php/java/bridge/DynamicJavaBridgeClassLoader.java: 
	(updateJarLibraryPath): add urls before sysUrls.
	(addSysUrls): append at the end of the list.
	(newInstance): rewritten

	* server/php/java/bridge/DynamicJavaBridgeClassLoader.java:
	(run): add cast to DynamicJavaBridgeClassLoader. This is safe
	because run is only called from the standalone container, not from
	the servlet.
	(init): correctly initialize ThreadPool.
	(coerce): create the correct target type. Otherwise we would
	create and pass e.g. a Hashtable when a Properties object is
	required.
	
	* server/php/java/servlet/PhpJavaServlet.java:
	(doPut): update the in and out from the servlet context. Catch all
	throwables and shut down the connection.
	
2005-06-25  Jost Boekemeier  <jostb@intern>

	* java.c (PHP_RSHUTDOWN_FUNCTION): shutdown servlet connection.
	
	* protocol.c (protocol_end): shutdown servlet connection.

	* server/natcJavaBridge.c (initGlobals): disabled for 2.0.7
	
	* server/php/java/bridge/JavaBridge.java:
	(run): Create a JavaBridgeClassLoader from the context.
	(initGlobals): disabled for 2.0.7.  This method was used by the
	native code in order to set the UID and GID and the
	phpConfigDir. Since we now support servlet engines and application
	servers, we want something more general for the next version.
	(init): Temporarily added reference to ThreadPool until
	BridgeThread is checked in.
	(JavaBridge): Don't use ClassLoader, which isn't known.
	
	* server/php/java/bridge/JavaBridgeClassLoader: rewritten.  This
	class is a bridge now.

	* php-java-bridge/server/php/java/bridge/TCPServerSocket.java
	(TCPServerSocket): do not call initGlobals anymore.
	
	* server/php/java/bridge/DynamicJavaBridgeClassLoader.java: 
	(newInstance): new procedure.

	* server/php/java/bridge/ThreadPool.java: New file.
	
	* server/php/java/bridge/Util.java
	(EXTENSION_NAME): must be accessible from the servlet.
	(doPut): properly shut down the connection.
	

2005-06-23  Jost Boekemeier  <jostb@intern>

	* server/php/java/bridge/JavaBridge.java:
	(JavaBridge): name thread "JavaBridge"
	(classic_classloader): obsolete
	(createJavaBridgeClassLoader): obsolete
	(initGlobals): initialize poolSize from servlet or from
	System.properties if not already initialized

	* server/php/java/bridge/ClassicJavaBridgeClassLoader.java: obsolete
	
	* server/php/java/bridge/JavaBridgeClassLoader.java:
	(Bridge): added documentation, create a DynamicJavaBridgeClassLoader.

	* server/php/java/bridge/Util.java:
	(THREAD_POOL_MAX_SIZE): New global, initialized from system
	property "php.java.bridge.threads".

	* server/php/java/servlet/PhpJavaServlet.java
	(init): Init Util.THREAD_POOL_MAX_SIZE from the servlet context.
	
	* server/php/java/bridge/GlobalRef.java
	(clear): disabled 

	
2005-05-22  Boekemeier <jostb@intern>

	* tests.php4/xmlTransform.php: Test rewritten

	* java.c (iterator_dtor): The dtor may be called after rshutdown:
	check if jenv is still there. This bug appears on windows only.

	* tests.mono+net/sample_lib.cs: Test rewritten.

	* tests.mono+net/sample_lib.dll: re-generated

	* tests.mono+net/load_assembly.php: Test rewritten
	
2005-05-21  Boekemeier <jostb@intern>

	* server/php/java/bridge/JavaBridge.java (getSession): Timeout in
	s.

	* ABOUT.HTM: updated from index.html

	* java_bridge.c (php_java_call_function_handler): mono string must
	be zero terminated.
	
2005-05-16  Boekemeier  <jostb@intern>

	* multicast.c (init): return error code if semaphores are not
	available.
	(php_java_multicast_backends_available): check error code.
	
	* php-java-bridge.te: Temporarily allow semaphores, until the new
	load balancer code is in place.
	
	* VERSION, php-java-bridge.spec: updated version to 2.0.6
	
	* README: dl() works again since 5.0.4.
	
	* test.php: dito

	* tests.php4/cache.php, tests.php4/utf8-2.php: added dl().

	* php-java-bridge 2.0.6 released
	
	
2005-05-15  Boekemeier  <jostb@intern>

	* INSTALL.WINDOWS: updated.

	* README: updated.

	* bind.c (test_server): zero out saddr (for old bsd).
	(java_test_server): likewise
	(java_test_server_no_multicast): likewise

	* java.c (PHP_MINIT_FUNCTION): likewise

	* multicast.c (php_java_init_multicast): likewise
	(php_java_multicast_backends_available): likewise
	(php_java_send_multicast): likewise

	* protocol.c: likewise

	* java.c (PHP_MINFO_FUNCTION): suppress obsolete entries on windows

	* multicast.c (php_java_semun): replaces union semun which is
	pre-defined on BSD
        (php_java_multicast_backends_available): rewritten for BSD.
	(php_java_sleep_ms): not used on windows, which doesn't have
	timeval.

	* php-java-bridge: start only two backends
	
	* client.c (setResultFromString): Avoid signedness warning
	(setException): likewise
	(GET_RESULT): likewise
	(begin): likewise

	* server/php/java/bridge/JavaBridgeClassLoader.java (findClass):
	verbose error message

	* php-java-bridge 2.0.6 released (windows version only)
	
2005-05-14  Boekemeier  <jostb@intern>

	* README: updated.

	* server/php/java/bridge/JavaBridge.java
	(next): Fixed typo.
	(ObjectToString): Use "[" instead of "<".  When displaying
	unencoded error strings a browser might confuse the "<" with a tag
	start.
	(getSession): Timeout was meant as seconds, not ms. The previous
	code destroyed the session 1440ms after creation.
	
	* server/php/java/bridge/JavaBridgeClassLoader.java
	(findClass): Verbose error message.

	* bind.c (java_test_server_no_multicast): Add a warning if session
	is lost. In any case, try to create a session on a local server
	first, then try multicast backends.
	
2005-05-13  Boekemeier  <jostb@intern>

	* multicast.c (enter, leave, init): New functions.
	(php_java_multicast_backends_available): Protect critical section.
	
2005-05-12  Boekemeier  <jostb@intern>

	* server/php/java/bridge/JavaBridge.java (next): prevent loop;
	object.getClass() returns the same object if object is
	java.lang.Class.

	* tests.php4/testClass.php: new Test for above fix.
	
	* server/php/java/bridge/TCPServerSocket.java (create):
	moved error handling to Listener.java
	
	* server/php/java/bridge/Listener.java (run): rewritten.
	(listen): Error handling from TCPServerSocket.java and close the
	multicast socket after an error so that the clients don't detect
	an open socket and interpret it as if multicast backends are
	available.

	* multicast.h (MAX_TRIES): Now 12 (from 120).

	* multicast.c (php_java_recv_multicast): Assume 30ms for a round-trip (from 1ms).
	(php_java_multicast_backends_available): Do not rely on socket defaults.
	(php_java_init_multicast): Switch off MC_LOOP, which is not necessary.

	* bind.c (java_test_server_no_multicast, java_test_server):
	rewritten; issue a warning after we could not connect to a backend
	after MAX_TRIES and continue.
	
	
2005-05-11  Boekemeier  <jostb@intern>
	
	* multicast.c
	(php_java_sleep_ms): New function.
	(php_java_multicast_backends_available): New function
	
	* multicast.h (MAX_TRIES, MAX_PENALTY, LOAD_PENALTY, MAX_LOAD):
	New consts

	* multicast.h (GROUP_PORT): Changed to 9168.

	* server/php/java/bridge/Listener (GROUP_PORT): Changed to 9168.
	
	* bind.c (java_test_server): Do not share a single mc socket among
	all instances.
	
	* init_cfg.c.in (java_init_cfg, java_destroy_cfg): Do not share a
	single mc socket among all instances.

	* init_cfg.c.in (java_init_cfg): Check if multicast backends are
	available.
	
	* bind.c (java_test_server, java_test_setver_no_multicast): In the
	worst case all backends are busy and wait up to MAX_PENALTY. Code
	rewritten.

	* multicast.c (php_java_recv_multicast): Use 1ms response timeout.
	
	* php_java.h (mc_socket): Renamed to have_mc_backends.

	* server/php/java/bridge/JavaBridge.java (run): Notify Listener.
	
	* server/php/java/bridge/Listener.java (LOAD_PENALTY, MAX_LOAD):
	New consts
	(run): Do not respond if load gets too high.

	* tests.php4/multicast.php: New test.
	

2005-05-09  Boekemeier  <jostb@intern>
         
	* server/php/java/bridge/JavaBridge.java
	(load, getLoad): changed to short
	(loadLock): Obsolete
	(run): Removed obsolete synchronized.

	* server/php/java/bridge/Listener.java
	(createResponse): load changed to short

	* server/php/java/bridge/JavaBridge.java
	(checkAccessible): New method
	(Invoke, GetSetProp): Use checkAccessible instead of doing
	everything on top-level.

	(getSession): set timeout.

	* server/php/java/bridge/Session.java
	(Session): Use Hashtable instead of Hashmap to synchronize the
	put/get/remove against each other.
	
2005-05-09  Boekemeier  <jostb@intern>

	* server/php/java/bridge/TCPServerSocket.java
	(create): Make IOExceptions in the multicast listener non-fatal.
	See PR1198286.

2005-05-07  Jost Boekemeier <jostb@intern>

	* ABOUT.HTM: Updated from index.html

	* README: Updated.

	* java.c (require): New function.
	(java_require): Alias for "java_set_library_path"
	(java_set_library_path): Use require.
	(java__destruct): Removed debug code.

	* update-about.sh: New file

	* server/php/java/bridge/JavaBridge.java
	(canModifySecurityPermission): New global.
	(MATCH_VOID_ICASE, MATCH_VOID_CASE): New symbols.
	(FindMatchingInterface, FindMatchingInterfaceVoid,
	FindMatchingInterfaceForInvoke,
	FindMatchingInterfaceForGetSetProp): New classes.
	(ClassIterator): rewritten to use FindMatchingInterface.
	(GetSetProp, Invoke): rewritten to use setAccessible(true). If
	that fails, because of security restrictions, re-start with the
	appropriate FindMatchingInterface thunk.  But in the usual case
	the performance should be much better.
	(run): Log connection close.
	
	* server/php/java/bridge/JavaBridgeClassLoader.java
	(updateJarLibraryPath): Renamed from setJarLibraryPath.
	(findClass, findResource): Re-added log messages.
	(findClass): add to the classes hash in the correct path.

	* server/php/java/bridge/LocalServerSocket.java (accept): Display bridge instance.
	
	* server/php/java/bridge/TCPServerSocket (accept): Display bridge instance.

	* server/php/java/bridge/Response.java (getFirstBytes): New method.
	(flush): Show only first bytes in debug output.

	* php-java-bridge/tests.php5/loadLib.php: Display test result.
	
	
	
	
2005-05-01  Jost Boekemeier <jostb@intern>

	* server/php/java/bridge/JavaBridgeClassLoader.java 
	(classesBlackList): New global.
	(resourcesBlackList): New global
	(findClass): Do not search sysurls if blacklisted.
	(findResources): Do not search sysurls if blacklisted.
	
	* server/php/java/bridge/JavaBridge.java (getInstance): Store
	args.

	* server/php/java/bridge/JavaBridge.java (findMatchingInterface):
	Search superclasses.
	
	* bind.c (java_get_server_args): Fixed typo, the displayed info
	was incorrect.
	
2005-04-30  Jost Boekemeier <jostb@intern>
	
	* ABOUT.HTM: New file.

	* multicast.c (php_java_recv_multicast): Use 1s timeout. Solaris9
	on X86 doesn't seem to support ms timeout!?
	
	* java.c (java_get_session): Allow external sessions.

	* multicast.c (java_test_server_no_multicast): Always use the
	backend stored in the session.

	* java.c (java_get_session): Pass gc_maxlifetime as default
	timeout to the session.

	* php-java-bridge: Start only 4 backends.  Users can add
	additional backends if they want.

	* php-java-bridge.spec: Updated comment.

	* server/php/java/bridge/JavaBridge.java (run): expire session.

	* server/php/java/bridge/Session.java (getSession): Added timeout.
	(expire): New procedure.

	* server/php/java/bridge/Listener.java (createResponse): Give idle
	backends a chance.
	
	
2005-04-29  Jost Boekemeier <jostb@intern>

	* VERSION, php-java-bridge.spec: New version

	* INSTALL.WINDOWS, INSTALL, README: update version

	* PROTOCOL.TXT: Bit 0 is now reserved.

	* README: Updated from index.html

	* bind.c (java_get_server_args): If backend pool (socketname is
	off), show the command to add another backend to the pool.
	(java_test_server): Check local server first, special init
	handling for local server autostart.
	(java_test_server_no_multicast): New function used for
	java_get_session().

	* client.c (stack_elem): New struct.
	(parse_ctx) maintain a container stack.
	(begin): Use a real stack for multi-dimensional arrays.
	(end): pop
	(handle_request): init stack

	* client.c (try_connect_to_server): Do not open a connection from
	the garbage collector callback.
	(java_connect_to_server_no_multicast): New function for
	java_get_session().
	(java_connect_to_mono_no_multicast): New function for
	mono_get_session():

	* java.c (PHP_RINIT_FUNCTION): Throw error if connection open.
	(PHP_RSHUDOWN_FUNCTION): Set is_closed flag.
	(java_set_file_encoding): New public function.
	(java_get_session): Rewritten.
	(php_java_alloc_globals_ctor): init is_closed flag.

	* multicast.c (readInt): New function.
	(writeInt): New function.
	(php_java_init_multicast): Fixes for Solaris and MAC OSX
	(php_java_send_multicast): Send current time.
	(php_java_recv_multicast): No-response timeout to 90ms; gives the
	garbage collector a chance. Discard broken or timed out packets.

	* multicast.h (MAX_LOAD): Changed to 12 (from 20)

	* php-java-bridge (inst): service status command works again.
	(is_multicast): start 5 backends if socketname is switched off.

	* php_java.h (is_closed): New global
	(session_is_new): New global

	* update_policy.sh.in (setfiles): tag java.libdir/lib

	* server/MNakefile_unix.am: Added php/java/bridge/Listener.java

	* RunJavaBridge.c.in: Updated to support multicasts.

	* server/php/java/bridge/JavaBridge.java (fileEncoding): New global.
	(setResult): Use fileEncoding.
	(setFileEncoding): New function.
	(select): Use fileEncoding
	(coerce): Use fileEncoding.
	
	* server/php/java/bridge/JavaBridge.java
	(coerce): coerce collection to map.
	(ClassIterator): New Class.
	(ObjectClassIterator): New Class
	(ClassClassIterator): New Class
	(Invoke): Rewritten to use iterator
	(GetSetProp): Rewritten to use iterator

	* server/php/java/bridge/JavaBridge.java
	(getSession): Rewritten

	* server/php/java/bridge/JavaBridgeClassLoader.java
	(JavaBridgeClassLoader): Must start with an empty list for
	jpackage compatibility. User is required to name the .jar files
	explicitly (via java_set_library_path).
	(findClas): New method for backwards compatibility.
	(findResource): New method for backwards compatibility.
	(setJarLibraryPath): If .jar file is not absolut, search sys
	directories (/usr/share/java and php-config-dir/lib/)
	(initClassLoader): Do not add .jars anymore.
	(addSysUrls): New function.
	(classes): Hash re-added.  It was thrown out in 2.0.5 when we
	extended from URLClassLoader.

	* server/php/java/bridge/Listener.java (feature): New global autoconf var.
	(createResponse): Send back timestamp.
	(run): timestamp

	* server/php/java/bridge/Parser.java (bridge): New global.
	(CALL_BEGIN): Display debug as UTF8 data
	(CALL_END): Display debug as UTF8 data

	* server/php/java/bridge/ParserString.java (getUTF8StringValue): New function.
	(toString): Use UTF8 encoding

	* server/php/java/bridge/Request.java (push): Do not threat
	non-composite arguments that follow a composite as composites.

	* server/php/java/bridge/Response.java (Response): Use our fileEncoding.
	(setResult): pass fileEncoding
	(getEncoding): new function.
	(getBytes): new function.
	(writeString): new function.
	(flush): Display output in UTF8
	
	* server/php/java/bridge/TCPServerSocket.java 
	(findFreePort): New function
	(TCPServerSocket): If port==0, use findFreePort

	* server/php/java/bridge/Util.java
	(UTF8): New const
	(println): Display output in UTF8
	
	
2005-03-27  Jost Boekemeier <jostb@intern>

	* VERSION, php-java-bridge.spec: New version
	
	* multicast.c: Added windows ifdefs 

	* php-java-bridge 2.0.5 released.

2005-03-27  Jost Boekemeier <jostb@intern>

	* multicast.c, multicast.h: New files

	* bind.c (test_server): New function.

	* client.c (begin): Removed obsolete GET_RESULT.
	(try_connect_to_server): pass down spec (M for Mono)
	(java_connect_to_mono): New function

	* config.m4: multicast.c added.

	* init_cfg.c.in: Init multicast socket.

	* server/php/java/bridge/JavaBridge.java (ObjectToString): New function.

	* java.c (java_monoclass): Removed dup.
	(__tostring): The automatic type conversions now use
	ObjectToString. -- We want to avoid support calls when someone
	attempts to "format" binary data e.g.: echo $byteArrayOutputStream + " ".
	(cast): dito.

	* java_bridge.c (php_java_call_function_handler): Check for mono
	object, send out a multicast to find an Mono or NET VM. 
	
	* parser.c (parse): <P> must call BEGN, not END. This fixes a bug
	in the 2.0 protocol which was not able to parse arrays into PHP 4.

	* server/php/java/bridge/Parser.java (parse): dito.

	* server/php/java/bridge/JavaBridgeClassLoader.java: Inherit from
	URLClassLoader.

	* server/php/java/bridge/Request.java (push): Array: An empty array is
	not a null argument.

	* tests.mono+net/load_assembly.php: Fixed typo.

	* tests.mono+net/params.php: Copied from parms.php
	
	* tests.mono+net/parms.php: Removed.

	* tests.php5/ShowResourses.java, tests.php5/showResources.jar,
	tests.php5/showResources.php: New tests.

	* tests.php5/arrayArray.php4: New PHP4 array test.

	* tests.php5/printToOutputStream.php: New test

	* server/php/java/bridge/TCPServerSocket.java (create): Start listener.

	* server/php/java/bridge/Listener.java: New file.

	* server/php/java/bridge/JavaBridge.java (getLoad): New function.
	(run): Calculate load.
	(loadLock): Lock object

	* php-java-bridge.multicasts.te: New file

	* tests.php4/cache.php, tests.php4/utf8.php,
	tests.php4/utf8-2.php, tests.php4/utf8-3.php,
	tests.php4/xmlTransform.php, tests.php4/sendArray.php,
	tests.php4/sendHash.php: New files

	* tests.php5/loadLib.php, tests.php5/utf8.php: New tests.
	
2005-03-15  Jost Boekemeier <jostb@intern>

	* java.c (php_java_jsr_class_class_entry): Obsolete.
	(mono, mono_class, monoclass): New methods.
	(php_java_call_function_handler4): Mono support added.
	(PHP_MINIT_FUNCTION): Mono support added.

	* server/php/java/bridge/JavaBridge.java (select): Prefer more
	specific args.

	* tests.mono+net/bench.php, tests.mono+net/excel_antitest.php,
	tests.mono+net/helloworld.php, tests.mono+net/load_assembly.php,
	tests.mono+net/params.php, tests.mono+net/parms.php,
	tests.mono+net/sample_lib.cs, tests.mono+net/sample_lib.dll,
	tests.mono+net/stack.php: New tests.
	
2005-03-13  Jost Boekemeier <jostb@intern>

	* php_java_snprintf.c: New file

	* protocol.c: Use php_java_snprintf() in order to avoid surprises
	with certain locales (DK locale formats 1234.00 as 1.234,00).

	* protocol.c (PRECISION): New const.
	(Double): Use precision.

	* config.m4: Add php_java_snprintf.c

	* client.c (begin): Use send_string_to_double in order to avoid
	surprises with certain locales.

	* php-java-bridge 2.0.4 released.
	
2005-03-11  Jost Boekemeier <jostb@intern>

	* INSTALL.WINDOWS: java.hosts and module version supported. CGI
	version still recommended.

	* bind.c (java_test_server): java.hosts for windows.

	* client.c (try_connect_to_server): new function.
	(java_connect_to_server, java_try_connect_to_server): Use it.

	* protocol.c (GROW_QUOTE): Didn't work if len < 10.
	(replaceQuote): Spell "&quote;" as "&quot;"
	(java_createSecureEnvironment): Store server_name.
	
	* java.c (PHP_RSHUTDOWN_FUNCTION): Free server_name.
	(java_get_server_name): Use java_try_connect_to_server.
	
	* php_java.h (closesocket): Alias for close on windows in order to
	shut down the windows socket.

	* php-java-bridge.spec, VERSION: New version
		
	* php-java-bridge 2.0.3 released
	
	
2005-03-09  Jost Boekemeier <jostb@intern>

	* PROTOCOL.TXT: Document Bit 0 as reserved.

	* parser.c (parse): Removed blob.

	* protocol.c (GROW): Grow by no less than required size.
	(replaceQuote): &amp must be quoted, too.
	(String): Require _len.
	(String): Do not use sprintf to print the string, it may binary
	data.

	* server/php/java/bridge/JavaBridge.java (setResult): Do not
	convert binary data into a string.
	
	* server/php/java/bridge/Parser.java (parse): Removed blob.

	* server/php/java/bridge/Request.java (begin): Do not convert
	binary data into a string.

	* server/php/java/bridge/Response.java (OutBuf): New inner class
	replaces StringBuffer in order to deal with binary data.

	* tests.php5/binaryData.php, tests.php5/BinaryData.java,
	tests.php5/binaryData.jar: New tests.

	* tests.php5/session.php: Added dl().
	
	* java.c (java_get_server_name): New user function.

	* README: Document java_get_server_name.

	* php-java-bridgge.spec, VERSION: New version
	
	* php-java-bridge 2.0.2 released. It replaces 2.0.1 which was not
	able to deal with binary data.
	
	
2005-03-06  Jost Boekemeier <jostb@intern>

	* server/Makefile_unix.am: Updated sources list.
	
	* php-java-bridge 2.0.1 released
	
	
2005-03-06  Jost Boekemeier <jostb@intern>

	* java.c (java_session_get): Renamed to java_get_session.
	(java_class_functions): Renamed to php_java_class functions in
	order to check for java objects.
	(call_function_handler): Renamed to
	php_java_call_function_handler4.
	
	* tests.php5/session.php: Renamed java_session_get to
	java_get_session.
	
	* java_bridge.c (is_type): Use php_java_class_functions and
	php_java_call_function_handler4 (for php4) to determine if object
	is a java object.
	(is_java_type): Obsolete.
	(writeArguments, writeArgument, php_java_invoke): Pass additional
	boolean to ignore non-java objects.

	* java.c (java_get_session): Accept $_SESSION variable and ignore
	all non-java objects.

	* INSTALL.WINDOWS: New file.

	* php-java-bridge.spec, VERSION: Updated version.

	* java.c (java_last_exception_get, java_last_exception_clear, java_set_library_path, java_instanceof): Re-enabled.
	
	
2005-03-05  Jost Boekemeier <jostb@intern>

	* server/php/java/bridge/Session.java: New file.
	
	* tests.php5/session.php: New test.

	* PROTOCOL.TXT: Renamed Unref to Destroy.

	* client.c (setResultFromException, setResultFromObject): Do not
	store head of resource list but the object handle so that we can
	store java values in the $_SESSION var. Remove obsolete resoure
	list.
	
	* java_bridge.c (php_java_destructor): No longer necessary.
	
	* java.c (le_jobject): No longer necessary.

	* client.c (is_java_type, is_type): New functions.
	(java_get_jobject_from_object): Use is_type, return 0 if object is not a java object.
	(php_java_invoke): Issue a warning if received a non-java object.
	
	* java.c (check_type): Renamed to is_type and moved to client.c
	(java_session_get): New function.
	(MINIT): register_list_destructors no longer necessary.
	
	* parser.c (parse): Renamed VOID to VOJD. Reason: winsock2.h
	exports a VOID type... oh billy boy...
	(parse): Use ssize_t for socket operations.
	(parse): Use recv instead of read (for winsock2).
	(parse): Add Solaris' errno=EINTR nonsense.
	(parse): Correct typo in blob handling.

	* server/php/java/bidge/Parser.java (parse): Updated with code from parser.c.
	
	* server/php/java/bridge/*.java: Replaced all Hashtables by HashMap in order
	to store null values.

	* server/php/java/bridge/JavaBridge.java (getSession): New method

	* server/php/java/bridge/JavaBridge.java
	(Invoke, GetSetProp, CreateObject): Removed obsolete "connection
	abort" handler. Store candidates instead of matches for error
	reporting.

	* server/php/java/bridge/GlobalRef.java (get): Throw NullPointer
	if value is null (we do not store null values in the global ref, a
	null is represented as id="0" or id="").

	* server/natcJavaBridge.c (send, recv): Add solaris' EINTR handling.

	* protocol.c (flush): Use send instead of write (for winsock2).
	(flush): Add slowlaris EINTR handling
	
	* bind.c, client.c, java_bridge.c: Add MINGW32 #ifdefs.

	* protocol.h: Default level is now 2 (on unix).

	* protocol.c (replaceQuote): Fixed typo; store correct len and terminate with 0.

	* update_policy.sh.in (EXTENSION_DIR): Replace all values in a line.

	* examples/clients/README, examples/clients/getProperties.py,
	examples/clients/getProperties.scm,
	examples/clients/listToArray.scm,
	examples/clients/formatArray.xsl: New client examples written in
	Scheme and Python.

	* server/RunJavaBridge.c.in (usage, main): Updated for 2.0.0
	
	
2005-02-13  Jost Boekemeier  <jostb@intern>

	* PROTOCOL.TXT: New file

	* bind.c (java_test_server): Removed reference to jni

	* java.c (PHP_RSHUTDOWN_FUNCTION): Removed jni.
	(java_last_exception_get): disabled
	(java_last_exception_clear): disabled
	(java_set_library_path): disabled
	(java_instanceof): disabled 
	(php_java_alloc_globals_ctor): Removed jni

	* java_bridge.h, php_java.h: Removed jni

	* java_bridge.c, client.c: Removed jni, new protocol added

	* protocol.c, parser.c, parser.h: New files.

	* protocol.h: Removed JNI protocol, added new XML protocol.

	* proxyenv.c: Removed

	* config.m4: Added protocol.c, parser.c
	
	* server/JavaBridge: Removed

	* server/natcJavaBridge.c: Removed JNI protocol.
	
	* server/php/java/bridge/GlobalRef.java,
	server/php/java/bridge/IDocHandler.java,
	server/php/java/bridge/JavaBridge.java,
	server/php/java/bridge/JavaBridgeClassLoader.java,
	server/php/java/bridge/Parser.java,
	server/php/java/bridge/ParserString.java,
	server/php/java/bridge/ParserTag.java,
	server/php/java/bridge/PhpMap.java,
	server/php/java/bridge/Request.java,
	server/php/java/bridge/Response.java,
	server/php/java/bridge/Util.java: New files

	* server/Makefile_unix.am: Compile new bridge classes.

2005-02-05  Jost Boekemeier  <jostb@intern>
	
        * php-java-bridge 1.0.8 released
	
2005-02-04  Jost Boekemeier  <jostb@intern>

	* INSTALL: document worker MPM

	* client.c, java.c: ZTS

2005-02-03  Jost Boekemeier  <jostb@intern>

	* server/JavaBridge.java (load, findClass): Store reason for
	failure.
	
	* tests.php5/ArrayArray.java, tests.php5/arrayArray.jar,
	arrayArray.php: New tests.

	* php-java-bridge.fc: Removed

	* php-java-bridge.fc.in: New from php-java-bridge.fc

	* Makefile.frag (install_policy): Removed

	* update_policy.sh.in: New from Makefile.frag

	* INSTALL, README: Section about SELinux updated.

	* config.m4: Create php-java-bridge.fc and update_policy.sh.

	* php-java-bridge.te: Updated.

	* php-java-bridge.spec: Updated SELinux section.

	* examples/j2ee/globals.php, examples/j2ee/README: Cleaned up.
	
	* tests.m4/function_checks.m4 (sem_init): Add real-time lib if
	necessary (solaris x86).
	
2005-02-01  Jost Boekemeier  <jostb@intern>

	* server/JavaBridge.java (findResources): New method.
	
	* java.c (iterator_current_key, init_current_data): PHP does not
	necessarily return "clean" zvals. Zero out the allocated zval so
	that setResultFromObject can initialize it properly.  This fixes a
	bug in the iterator interface which was not able to iterate over
	arrays of non-primitive types.

	* java.c (javaclass): New method for jsr223 compatibility.
	(java_class_functions): Terminate array with a NULL entry.
	(create_exception_object): New from parent in order to implement
	object casting.
	(PHP_MINIT_FUNCTION): Use create_exception_object.
	
	
2005-01-28  Jost Boekemeier  <jostb@intern>
	
	* java.c (PHP_MINIT_FUNCTION): For java_class, javaclass and
	javaexception: Do not override parent methods with themselfs. PHP
	5.0.3 doesn't like that...
	
	* README: Updated windows install description.
	
	* config.m4: Embedding into PHP works again.  Use m4_include so
	that autoheader scans the included files.
	
	
2005-01-27  Jost Boekemeier  <jostb@intern>
	
	* tests.php5/exception.php: Extract cause.
	
	* README: Note about 5.0.3 dl() issue added.

	* test.php: Output phpinfo().

	* bind.c (use_wrapper): New function; we must call the SELinux
	wrapper if it exists.
	(java_get_server_string): New function.

	* java.c (get_server_args): Removed.
	(PHP_MINFO_FUNCTION): Use java_get_server_string instead of
	get_server_args.

	* php_java.h (java_get_server_args): Replaced by
	java_get_server_string.
	
	
2005-01-26  Jost Boekemeier  <jostb@intern>

	* INSTALL, README: Security Enhanced Linux (SEL) supported.

	* README: Removed support for Mac OSX. Recommend RHEL/IBM JDK1.4.1
	on Mac/PPC instead.
	
	* unsupported/gcc3.4-broken-jni-method-lookup.patch: New file.
	
	* unsupported/php5-crash-in-evaluator-shutdown_workaround.patch:
	Moved here.
	
	* examples/bench/bench.php, examples/bench/excel_antitest.php,
	examples/bench/exceltest.jar, examples/bench/ExcelTest.java,
	examples/bench/README: New files

	* examples/j2ee/documentBean.jar,
	examples/j2ee/documentClient.php, examples/j2ee/globals.php,
	examples/j2ee/README, examples/j2ee/src/DocumentBean.java,
	examples/j2ee/src/DocumentHome.java,
	examples/j2ee/src/DocumentRemote.java,
	examples/j2ee/src/Page.java, examples/j2ee/src/README,
	examples/j2ee/src/META-INF/ejb-jar.xml,
	examples/j2ee/src/META-INF/sun-ejb-jar.xml: New files.
	
	* examples/languages/scheme-demo.php, examples/languages/README: New
	files.

	* scheme-demo.php: Removed, now in examples.

	* tests.php5/bench.php, tests.php5/excel_antitest.php,
	tests.php5/ExcelTest.java, tests.php5/exceltest.jar: Removed, now
	in examples.
	
2005-01-25  Jost Boekemeier  <jostb@intern>

	* bind.c (java_get_server_args): Append library path.
	
	* client.c, java_bridge.c (ZEND_DECLARE_MODULE_GLOBALS): Removed.
	(ZEND_EXTERN_MODULE_GLOBALS): Added.

	* client.c (check_error): Removed.
	(java_connect_to_server): Do not call check_error, assume out of
	memory when the server cannot return global refs.
	
	* config.m4: Removed obsolete checks.

	* server/autogen.sh: Removed.
	
	* server/configure.gnu.in: New file, from autogen.sh.
	
	* config.m4: Create server/configure.gnu from configure.gnu.in

	* php-java-bridge: Only change LD_LIBRARY_PATH and PATH if the
	script is installed in one of the standard directories.  Invoke
	RunJavaBridge which is tagged with the SEL security context.

2005-01-24  Jost Boekemeier  <jostb@intern>

	* php-java-bridge.te, php-java-bridge.fc, RunJavaBridge.c.in: New
	files for Security Enhanced Linux.

	* server/Makefile_unix.am: Create RunJavaBridge.
	
	* Makefile.frag (install_policy): New target to install the
	SELinux policy files.

	* php-java-bridge.spec: Install SELinux policy files.

	* README: Update from index.html

	* README.GNU_JAVA: New file.

	* README: Note about UTF-8 added.

	* server/acinclude.m4: No longer include tests from PHP

	* server/JavaBridge.java (run, handleRequests): Pass down Hash.
	server/natcJavaBridge.c
	(connection_startup): Obsolete.

	* server/natcJavaBridge.c: Avoid calling JNI when logLevel is too
	low.
	(getObjectHash): New function.
	(handleRequest): Use getObjectHash() in order to avoid allocating
	a hash too often.

2005-01-07  Jost Boekemeier  <jostb@intern>

	* server/JavaBridge.java
	(CreateObject, Invoke, GetSetProp): The server must survive a out
	of memory conditions. Check for OutOfMemoryError and abort the
	client-connection immediately, release all memory the client has
	allocated without client-notification.

	* server/natcJavaBridge.c
	(Java_JavaBridge_handleRequest): Release object hash after
	OutOfMemoryError.
	
2005-01-05  Jost Boekemeier  <jostb@intern>

	* server/JavaBridge.java
	(setException): Store method name, object, and arguments, print
	original cause.
	(Invoke, GetSetProp, CreateObject): Pass name, object and
	arguments.

	* server/JavaBridge.java (argsToString): Check if args is null.

	* server/JavaBridge.java (GetSetProp): Invocation or field access
	may fail if object is class and getter/setter/field is not static.
	Throw a NoSuchFieldException if no getter/setter or field was
	found.

	* php-java-bridge: Do not destroy LANG, which is needed by the VM
	to select the default file.encoding (usually UTF-8).  If LANG is
	not set, use en_US.UTF-8 as default.
	
2005-01-04  Jost Boekemeier  <jostb@intern>

	* server/JavaBridge.java: Changed indent.
	
	* server/JavaBridge.java (getResource, findResource): New methods
	needed to load resources from the private classloader.
	
2005-01-02  Jost Boekemeier  <jostb@intern>

	* server/configure.in, config.m4: follow symlinks to find the
	include directories.
	
	* README: Updated documentation from index.html
	
	* php_java.h: Use php_config.h.

	* tests.m4/function_checks.m4: Removed checks already provided by
	php/php_config.h
	
	* init_cfg.c.in, bind.c, client.c, java.c, java_bridge.c,
	php_java.h: cfg is now a true global.
	
	* bind.c (java_start_server): Check server, start, wait.
	(java_wait_server): New function
	(java_test_server): New function
	
	* php_java.h (java_start_server, java_test_server): New functions.

	* client.c (java_do_test_server, java_test_server): Removed.

	* java.c (init_server): Removed.
	(PHP_MINIT_FUNCTION): Call java_start_server instead of
	init_server.

	* init_cfg.c.in (init_socket): Generate a unique socketname in the
	Linux abstract namespace.
	
	* server/configure.in: AC_CONFIG_AUX_DIR before AM_INIT_AUTOMAKE,
	required by automake 1.8

	* tests.m4/threads.m4, tests.m4/function_checks.m4: Avoid
	"underquoted" warnings.
	
2004-12-19  Jost Boekemeier  <jostb@intern>

	* client.c, bind.c, server/natcJavaBridge.c, server/JavaBridge.java, server/acinclude.m4, server/configure.in, config.m4, java.c: 
	Support credentials on Linux, only.

	* client.c (java_connect_to_server): Connect if not already
	connected. Replaces all old init checks.
	
	* java.c (PHP_RINIT_FUNCTION): Don't connect until a java method
	is called.
	
	* client.c, bind.c, java.c: Use java_connect_to_server.

	* init_cfg.c.in (init_socket): Fixed typo.

	* php-java-bridge: Require sh instead of bash. Create PID in /tmp
	if /var/run does not exist.

	* README: Require GNU make.

	* README: Removed documentation about secure mode. Privilege
	dropping cannot be supported in java. Users should use java
	security instead.  In the future we'll use our bridge JVM as a
	relay to access beans deployed in WebSphere, WebLogic or 9iAS and
	these AS have their own policy anyway.

	* server/configure.in: Use links instead of modifying the include
	path. Require versions for automake and autoconf.

	* server/JavaBridge.java (now): New function to workaround a bug
	in GNU java (calendar not available).

	* server/JavaBridge.java (println): New function.

	* server/JavaBridge.java (select): enum is a keyword since 1.5
	
	
2004-12-12  Jost Boekemeier  <jostb@intern>

	* tests.m4/java_check_abstract_namespace.m4,
	tests.m4/java_check_struct_ucred.m4: New tests.
	
	* client.c, bind.c, server/natcJavaBridge.c, server/JavaBridge.java, server/acinclude.m4, server/configure.in, config.m4, java.c: 
	Use abstract namespace and struct ucred, if available.  This means
	that a) the communication channel is no longer visible and b) that
	only authorised users can connect to the server (checked by the
	kernel). 

	* server/JavaBridge.java (println): New procedure.
	(HandleRequests): Log the user ID and the group ID of the user
	that connects to the PHP/Java Bridge.  

	* tests.m4/function_checks.m4: Check for AF_LOCAL and PF_LOCAL.
	
	
2004-12-05  Jost Boekemeier  <jostb@intern>

	* php-java-bridge 1.0.7 released
	

2004-12-04  Jost Boekemeier  <jostb@intern>

	* java.c (function_entry): Set the arginfo for __call, __get, __set.

	* php5-crash-in-evaluator-shutdown_workaround.patch: New file.

2004-12-03  Jost Boekemeier  <jostb@intern>

	* server/natcJavaBridge.c (Java_JavaBridge_startNative): Do not
	catch SIGPWR, which is used by the Boehm GC.
	(post): Next kill should kill.

	* bind.c (wait_for_daemon): kill three times, if necessary.

	* client. (handle_request): Do not discard retval for PHP 4.

2004-12-01  Jost Boekemeier  <jostb@intern>

	* php_wrapper.h: New file 

	* java.c, bind.c, client.c, java.c, java_bridge.c, java_bridge.h,
	php_java.h, proxyenv.c: Do not use php.h directly but include
	php_wrapper.h to avoid problems with NDEBUG.

	* README: Replaced NDEBUG with JAVA_COMPILE_DEBUG

	* proxyenv.c, protocol.h
	(CallObjectMethod, CallVoidMethod, NewObject): Functions removed.
	(CallObjectMethodA, CallVoidMethodA, NewObjectA): New functions.
	
	* java.c, client.c, java.c, java_bridge.c: Use new functions in
	order to avoid varargs problems.

	* client.c (setResultFromException, setResultFromObject): Fix
	memory leak.

	* client.c (setException): correctly set the result, then throw
	and exception.

	* client.c (java_connect_to_server), java.c
	(PHP_RSHUTDOWN_FUNCTION): Global ref for the reflect_class.

	* php_java.h, java.c (php_java_class_class_entry): New global.
	
	* java.c (java__destruct): Issue a warning if PHP 5 calls the
	destructor after the module doesn't exist anymore.  -- PHP 5 first
	unmaps the module and then shuts down the evaluator which in turn
	calls the destructors for the objects it manages.  This is a bug
	because the classes and their handlers do not exist anymore.  If
	the module was loaded via dl(), PHP 5 will crash in shutdown.
	(java_instanceof): check for object class or class class.
	
	* java.c (create_object): Use ALLOC_HASHTABLE instead of
	ALLOC_HASHTABLE_REL.
	(iterator_current_key): PHP 5 wants the string length +1.

	* java_bridge.c (php_java_getset_property): Remove transaction
	(php_java_get_property_handler): Protect by transaction.
	(php_java_getset_property): Protect by transaction.

	* php-java-bridge.service: Changed description.

	* protocol.h (LOGFILE): New constant

	* server/natcJavaBridge.c, server/JavaBridge.java (trampoline):
	Return if communication is broken.
	(openLog): New function.

	* server/JavaBridge.java (coerce): Better error reporting.
	(argsToString): New function.
	(select): Identify component type.

	* tests.php/ArrayToString, tests.php5/ExcelTest.java,
	tests.php5/arrayToString.php, tests.php5/arrayToString.jar,
	tests.php5/bench.php, tests.php5/excel_antitest.php: New files.
	
2004-11-28  Jost Boekemeier  <jostb@intern>

	* test.php: use <br>
	
	* php-java-bridge.spec: test.php added
	
	* java_bridge.c (java_get_jobject_from_object): new function.
	
	* server/JavaBridge.java (handleRequest, HandleRequest,
	trampoline, Trampoline): New methods.
	(getPhpMap): Cast null to (Object)null in order to appease gnu
	java. Pass value, not this.
	(printStackTrace): Print trace if fatal or level >=2

	* client.c (java_instanceof): rewritten.
	(java__destruct): new function.


	Until now local variables were not deallocated until script
	termination.  A long running php script could provoke out of
	memory conditions on the server side. In order to allow long
	running scripts and in order to make client side programming
	easier and more robust, the server now maintains both, global
	_and_ local refs.  The JNI DeleteLocalRef should not be used
	anymore. To protect variables from beeing garbage collected, the
	new protocol requests BEGIN/END_TRANSACTION(env) must be used.  If
	the client does not call END_TRANSACTION, the server will
	automatically terminate all transactions at the end of the
	script. If the client does not call BEGIN_TRANSACTION and calls a
	method that creates and returns a new object, the object will be
	reclaimed immediately after the client has received it
	(i.e. the received object becomes invalid). Server replies
	(protocol #101..110) are an exception; the values they return
	remain valid until client acknowledges the reply (as usual).
	
	* protocol.h, proxyenv.c (DELETELOCALREF, DeleteLocalRef): Removed
	(BEGIN_TRANSACTION, END_TRANSACTION): New macros
	(TRANSACTION_BEGIN, TRANSACTION_END): New constants

	* server/natcJavaBridge.c (trampoline, handleRequest): New globals.
	(DELETEGLOBALREF): Removed.
	(TRANSACTION_BEGIN, TRANSACTION_END): New protocol requests.
	(handle_request_impl): Removed. (replaced by handleRequest)
	(handleRequest): New function
	(trampoline): New function
	(handleRequests): Rewritten (code moved to trampoline)
	(javabridge): Define handleRequest and trampoline
	
	* client.c (java_connect_to_server, java_set_library_path,
	java_instanceof, offsetExists, offsetGet, offsetSet, offsetUnset,
	cast, iterator_move_forward, get_iterator,
	php_java_call_function_handler, php_java_makeObject,
	php_java_getset_property): Use TRANSACTION_BEGIN/END instead of
	DeleteLocalRef. Use java_get_jobject_from_object.
	
	
2004-11-26  Jost Boekemeier  <jostb@intern>

	* php-java-bridge: use sh to start the sub-process so that only
	one "php-java-bridge" process appears in the process list.

	* java.c, php_java.h (php_java_handlers, create_object, cast): New
	functions/globals for PHP 5.
	* tests.php5/toString.php: New test

	* server/JavaBridge.java (getPhpMap): correct documentation.

	* server/natcJava.c, server/JavaBridge.java, client.c
	(nextElement, hashUpdate, hashIndexUpdate, setResultFromArray):
	Replaced by the new PHP 5 iterator and array interfaces. -- These
	functions should have never been written, they copied entire
	arrays or hash tables from java to PHP.  But we have to keep them
	for PHP 4 for backward compatibility with ext/java.  They even
	caused trouble in the past, see change log entries from 2004-09-09
	and 2004-09-19, where we had to correct a problem interited from
	the original PHP 4 ext/java extension.
	
2004-11-24  Jost Boekemeier  <jostb@timon.intern>

	* instanceof.php, iteratorInterface.php, arrayInterface.php,
	array.php, Array.java, array.jar: new files in tests.php5
	
	* client.c (handle_request): Do not discard null results for PHP 5

	
	PHP 5 Iterator interface:
	
	* php_java.h (clearEx, lastEx, setJarPath, getPhpMap, invoke, gsp,
	co, hasMore, getType, moveForward): New globals.
	
	* client.c (java_connect_to_server): Init globals
	
	* java_bridge.c, java_bridge.h (php_java_invoke): New function.
	
	* java_bridge.c (php_java_call_function_handler): Use globals
	
	* java.c (java_iterator, iterator_dtor, iterator_valid,
	iterator_current_key, init_current_data, iterator_move_forward,
	java_iterator_funcs, get_iterator): New functions/structures.
	(PHP_MINIT_FUNCTION): Rewritten.
	
	* server/JavaBridge.java (PhpMap): New abstract class.
	(getPhpMap): Factory.
	
	* protocol.h, proxyenv.c, server/handleRequest.c (IsInstanceOf):
	New protocol request.
	
	* php-java-bridge.spec, server/MakefileUnix.am: Fiddle with the
	new generated JavaBridge$$foo1,2,3xyz output classes. Fortunately
	they don't have slashes or backslashes in their names ...

	
	PHP 5 array interface:
	
	* java.c (offsetExists, offsetGet, offsetSet, offsetUnset,
	arginfo_array_offsetSet, arginfo_array_offsetGet): New
	functions/structures for PHP 5.
	(PHP_MINIT_FUNCTION): Rewritten.
	
	
	* server/natcJavaBridge.c (handle_request): Fixed typo.
	
2004-11-21  Jost Boekemeier  <jostb@intern>

	* README, server/natcJavaBridge.c, server/JavaBridge.java,
	INSTALL, client.c, java_bridge.c, java_bridge.h, java_bridge,
	protocol.h, proxyenv.c, java.c: New "java_class" constructor.
	
2004-11-20  Jost Boekemeier  <jostb@intern>

	* server/JavaBridge.c (findClass): Use String.valueOf instead of
	.toString so that we get the proper ClassNotFoundException instead
	of a null pointer exception.
	
2004-11-18  Jost Boekemeier  <jostb@intern>

	* README: Removed sections about Sun's JSR 223 and outdated notes
	from Sam Ruby.

	* VERSION, php-java-bridge.spec: Version

	True try/catch handling.
	* client.c, server/natcJavaBridge.c, server/JavaBridge.java: Pass
	jthrowable to client.
	* client.c (setResultFromException): New method
	(setException): Call setResultFromException with the jthrowable object

	New class: java_exception
	* java.c, php_java.h (php_java_exception_class_entry): New variable
	* java.c (PHP_MINIT_FUNCTION): New class
	
	Display java objects
	* java.c (java_class_functions): New entry
	(java__tostring): New function

	* java_bridge.c (checkError): Disable for PHP5

	* tests.php5/exception.php: Rewritten

	* tests.php5/printStackTrace.php: New file
	
2004-11-16  Jost Boekemeier  <jostb@intern>
	
	PHP 5 supported
	* java_bridge.h, java_bridge.c (php_java_call_function_handler,
	php_java_set_property_handler, php_java_get_property_handler),
	php_java.h (php_java_class_entry): rewritten to use PHP 5 style
	* java.c (javajava, java__call, java__set, java__get, make_lambda): New functions (PHP 5)
	(call_function_handler, get_property_handler, set_property_handler): New functions (PHP 4)
	(java_class_functions): New structure
	(PHP_MINIT_FUNCION): rewritten
	(PHP_MSHUTDOWN_FUNCTION): rewritten

	* java_bridge.c (wait_for_daemon, php_java_shutdown_library): removed
	* bind.c (wait_for_daemon, php_java_shutdown_library): new from java_bridge.c
	* client.c (swrite, sread, id): removed
	* proxyenv.c (java_swrite, java_sread, java_id): new from client.c

	* client.c (CFG_JAVA_SOCKET_INET): Fixed typo

	The PHP 5 object system revealed a bug in the core protocol: If
	someone managed to send a PHP array with an PHP OBJ type in it, the
	client stopped working immediately.
	* server/natcJavaBridge.c (handle_request NEWOBJECT): Accept a count
	(short), not a length (size_t).
	
	
2004-11-11  Boekemeier  <jost2345@intern>

	* server/natcJavaBridge.c, sio.c, sio.h, protocol.h, java.c, init_cfg.c.in, client.c: 
	Disable threads and use TCP sockets on windows.
	
2004-11-03  Boekemeier  <jost2345@intern>

	* init_cfg.c.in (java_destroy_cfg): Free the memory _we_ have
	allocated, not the memory that apache has allocated. Otherwise
	apache 2.0 will loop in malloc_consolidate.
	* java.c (PHP_MSHUTDOWN_FUNCTION): Code re-enabled.

	* server/JavaBridge.java (init): Log the log file name only if
	level >= logdebug

2004-11-02  Jost Boekemeier  <jostb@intern>

	* java.c (PHP_MSHUTDOWN_FUNCTION): Reverted last change (code
	disabled). This caused a loop in malloc_consolidate in apache 2.0.
	
	* php-java-bridge 1.0.6a released
	
	
2004-10-31  Jost Boekemeier  <jostb@intern>

	* bind.c (java_start_server): Protect guard; a dead guard isn't
	really useful.
	
	* server/natcJavaBridge.c 
	(Java_JavaBridge_startNative): Removed debug code.
	(Java_JavaBridge_handleRequests): Cleanup.

	* php-java-bridge 1.0.6 released.

2004-10-30  Boekemeier  <jost2345@intern>

	* server/natJavaBridge.c (java_bridge_main_gcj): Correct typo.
	
	* server/natcJavaBridge.java (readChunks, read): New functions
	(load): Use these to work around a bug in GNU java

	* server/java.c (usage): New function

2004-10-28  Boekemeier  <jost2345@intern>

	* README: Document java.log_level
	
	* server/natcJavaBridge.java: log jars as info, not debug.

	* server/Makefile.am: Removed
	* server/Makefile.in: New file

	* server/java.c: Print usage().
	
2004-10-26  Boekemeier  <jost2345@intern>

	Split the unix and windows functionality into two makefiles to
	work around a problem in autoconf
	* server/Makefile_unix.am, server/Makefile_windows.am: New files
	* server/Makefile.am: Rewritten
	* server/autogen.sh: return value from autoconf

2004-10-24  Jost Boekemeier  <jostb@diego.intern>

	* README: Document java_set_library_path
	* java.c, scheme_demo.php: Renamed java_set_jar_library_path to java_set_library_path
	
	* server/JavaBridge.java, server/natcJavaBridge.c, server/configure.in: Load libraries from /usr/share/java or from ext_dir/lib

	* ChangeLog: Changed order, latest at top

	* config.m4: Do not build DLLs for win98

	* server/acinclude.m4: rewritten.

	* server/configure.in: AC_PROG_LIBTOOL should recognize
	AM_PROG_GCJ
	
2004-10-23  Jost Boekemeier  <jostb@diego.intern>

	Added support for Solaris 64 and Solaris broken stdio.
	* protocol.h, proxyenv.c, client.c, natcJavaBridge.c: Use SFREAD ... instead of fread.
	* sio.c, sio.h: New files
	* tests.m4/function_checks.m4, tests.m4/java_check_broken_gcc_installation.m4, tests.m4/java_check_broken_stdio_buffering.m4, tets.m4/threads.m4: New files

	* LICENSE: Correct author.

	Correct classpath problem
	* natcJavaBridge.c, client.c: Client receives the bridge instance as first element.
	* JavaBridge.java: Start a new thread, set the context classloader on java level.
	* natcJavaBridge.c: Do not call attachCurrentThread, which is broken in gcj.

	Added support for static binaries.
	* natcJavaBridge.c, bind.c: Invoke jniRegisterNatives.

	Use GNU autoconf to configure the server part separately. Share the
	test macros from PHP and the java module with the server part.
	* Makefile.frag: rewritten
	* server/acinclude.m4, server/autogen.sh, server/configure.in: new files
	* config.m4: Include all tests in tests.m4.

	Win98 support.
	* sio.h: Do not depend on HAVE_CONFIG_H
	* natcJavaBridge: Win98 does not support sigwait

	* function_checks.m4 (lsocket): test rewritten

	* README: Solaris, 64 bit VM's and Win98 are supported
	
2004-09-27  Jost Boekemeier  <jost2345@mail.yahoo.de>

	* JavaBridge.java (findClass): Store the classes into a weak-value 
	hash so that classes don't get loaded multiple times (some JVM's
	don't have a class GC).

	* natcJavaBridge (handle_request, connection_cleanup): Count
	the # of handles the client has aquired.

	* java_bridge.c (wait_for_daemon): gcj uses the 2 internaly(!), we
	must send it twice to kill it. 
	
2004-09-26  Jost Boekemeier  <jost2345@mail.yahoo.de>

	* natcJavaBridge.c (Java_JavaBridge_startNative): do not restart
	when signal arrived, this caused problems on some OS.

	It is now possible to set the library path at run-time e.g.:
	java_set_jar_library_path(";file:c:/test.jar;http://foo.com/xy.jar");
	* Javabridge.java (setJarLibraryPath, load, findClass): New methods.
	(CreateObject): Load classes via our own classloader.
	* java.c (java_set_jar_library_path): New function.
	* client.c (java_connect_to_server): Call constructor.
	* sample.php: Use new function.

	* java.c (java_last_exception_clear, java_last_exception_get):
	Check if java is initialized.

	* client.c (abort_on_error): Renamed to check_error.

	* client.c (java_do_test_server): Check return value from close().

	* php-java-bridge 1.0.5 released.

2004-09-23  Jost Boekemeier  <jost2345@mail.yahoo.de>

	Use a guard thread instead of a async signal to shutdown the server.
	* natcJavaBridge.c (mutex, cond, count, block): New variables.
	(exit_sig): removed
	(block_sig, enter, leave, guard_requests): New functions.
	(initGlobals): initialization added
	(handle_requests): update thread count
	(Java_JavaBridge_startNative): terminate after guard has terminated.
	* README: Note about dynamic loading via dl() added.
		
        The bridge must do its own resource tracking because php4 calls 
	the php_java_destructor too late (*after* rshutdown!).
	* java_bridge.c (php_java_destructor): Code disabled.
	* natcJavaBridge.c (enumClass, hashKeys, enumMore, enumNext): New
	globals.
	(initGlobals): initialization
	(connection_startup, connection_cleanup): New functions.
	(handle_requests, handle_request_impl, handle_request): Trace global
	refs.
	
2004-09-21  Jost Boekemeier  <jost2345@mail.yahoo.de>

        * java.c (PHP_MINIT_FUNCTION): Fixed a typo that caused a massive
	memory leak on the java side of the bridge.  The DeleteGlobalRef
	was never called and since Java does not release the memory when
	a client detaches from the VM (thanks, Sun!) the memory remained
	locked until the VM ran out of memory.

	* natcJavaBridge.c (Java_JavaBridge_startNative): Linux handles
	accept different than the BSD variants.  Check errno.

	Starting java as a daemon should solve the sub-process problem.
	* bind.c (java_start_server): Start java as a daemon, if possible.
	(readpid): New function.
	* java_bridge.c (php_java_shutdown_library): Wait for daemon
	(wait_for_daemon): New function
	* README: Delete the note about Apache 1.3.
	
	Correctly shut down the connection in rshutdown
	* java.c (PHP_RSHUTDOWN_FUNCTION): Delete global refs and close
	file descriptors.
	
2004-09-19  Jost Boekemeier  <jostb@diego.intern>

        Allocate pval's correctly, part II -- the previous change for 1.0.2
	was incorrect: the php interpreter could not work reliable anymore if nextElement,
	hashIndexUpdate or hashUpdate was called.
	* client.c (nextElement, hashIndexUpdate, hashUpdate): Increment the refcount.

	* php-java-bridge.spec, php-java-bridge.service, php-java-bridge:
	New file.

	* php.ini: Removed (now in php-java-bridge.spec).

	* INSTALL, LICENSE: New file.
	
	Starting the JVM from the web-server caused several problems.  
	Apache 1.3 even killed the server-part of the bridge.
	* README: Recommend to start the JVM separately and to hardcode the 
	java.socketname.
	* bind.c (java_start_server): Do not start the server part of the
	bridge if the user has hardcoded the java.socketname in java.ini.
	(can_fork): New function.

	* natcJavaBridge.c (handle_request): If the JVM ran out of memory
	do nothing, send back null-pointer.
	(exit_sig): Workaround for a bug in the IBM JVM. This VM should
	not hang anymore when started as a sub-process from Apache --
	starting the VM as a sub-process of Apache is now deprecated
	anyway.

	* php-java-bridge 1.0.4 released.
	

2004-09-15  Jost Boekemeier  <jost2345@mail.yahoo.de>

	* JavaBridge.java: The bridge now catches errors and runtime
	exceptions such as "class not found" and reports them to the
	client.

2004-09-12  Jost Boekemeier  <jost2345@mail.yahoo.de>

	* README: GNU Java supported

	The SUN Java implementation may store objects on the stack.
	Objects on the heap may reference them. So in this JVM we cannot
	simply longjmp to clear the stack, because some heap objects may
	still refer to dead locations.  The result would be that the VM
	will barf when the GC tries to follow these phantom references.
	* natcJavaBridge.c: Longjmp to the last savepoint, then return
	back to java, throw an exception to return to one of the three
	native main methods and then jump back to the loop.  This fixes a
	crash in the SUN VM which occured after apache has aborted the
	connection.

	* php-java-bridge 1.0.3 released.
	
2004-09-10  Jost Boekemeier  <jost2345@mail.yahoo.de>

	* java.c: Display empty string as ''.

	REL3 or RH9 running a non-NPTL kernel require to set the
	environment variable LD_ASSUME_KERNEL=2.4.19 in order to run
	jdk1.4 correctly.
	* bind.c: Pass modified environment on to the child process.

2004-09-09  Jost Boekemeier  <jost2345@mail.yahoo.de>
	
	Initialize PVAL's so that they have a proper ref-count.  Otherwise 
	either the bridge or the JVM might crash (or both).
	* java.c: Allocate pval's correctly.

	* php-java-bridge 1.0.2 released.

2004-08-30  Jost Boekemeier  <jost2345@mail.yahoo.de>

	* bind.c: wait until the JVM is initialized

	Initialize the cfg vars correctly so that only one VM is started
	* java.c, init_cfg: set the defaults _after_ the cfg changes.

	* php-java-bridge 1.0.1 released.
	
2004-08-29  Jost Boekemeier  <jost2345@mail.yahoo.de>

	* php-java-bridge 1.0.0 released.
