Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

# php_java.h File Reference

## Detailed Description

This is the main entry point for the java extension.

It contains the global structures and the callbacks required for zend engine 1 and 2.

`#include "php_wrapper.h"`
`#include "php_config.h"`
`#include "zend_compile.h"`
`#include "php_ini.h"`
`#include "php_globals.h"`
`#include "protocol.h"`
`#include <sys/types.h>`
`#include <sys/stat.h>`
`#include <fcntl.h>`
`#include <sys/socket.h>`
`#include <netinet/in.h>`
`#include <arpa/inet.h>`
`#include <netdb.h>`
`#include <setjmp.h>`

Go to the source code of this file.

## Defines
#define | U_LOGFILE (1<<1)
#define | U_LOGLEVEL (1<<2)
#define | U_JAVA_HOME (1<<3)
#define | U_JAVA (1<<4)
#define | U_LIBRARY_PATH (1<<5)
#define | U_CLASSPATH (1<<6)
#define | U_SOCKNAME (1<<7)
#define | U_HOSTS (1<<8)
#define | U_SERVLET (1<<9)
#define | U_WRAPPER (1<<10)
#define | U_EXT_JAVA_COMPATIBILITY (1<<11)
#define | phpext_java_ptr &EXT_GLOBAL(module_entry)
#define | JG(v) EXT_GLOBAL(globals).v
## Functions
| PHP_MINIT_FUNCTION (EXT)
| Called when the module is initialized.
| PHP_MSHUTDOWN_FUNCTION (EXT)
| Called when the module terminates.
| PHP_MINFO_FUNCTION (EXT)
| Displays the module info.
char * | get_server_string (TSRMLS_D)
proxyenv * | try_connect_to_server (TSRMLS_D)
proxyenv * | connect_to_server (TSRMLS_D)
void | start_server (TSRMLS_D)
char * | test_server (int *socket, short *is_local, struct sockaddr *saddr TSRMLS_DC)
char * | get_servlet_context (TSRMLS_D)
char * | get_sockname (TSRMLS_D)
## Variables
zend_module_entry | module_entry
zend_class_entry * | class_entry
| Represents the java class struct.
zend_class_entry * | array_entry
| Represents the java class array struct.
zend_class_entry * | class_class_entry
| Represents the java_class class struct.
zend_class_entry * | class_class_entry_jsr
| Represents the javaclass class struct.
zend_class_entry * | exception_class_entry
| Represents the javaexception class struct.
function_entry | class_functions []
zend_object_handlers | handlers
| The object handlers, see create_object.
const char *const | bridge_version
int | ini_updated
| Holds the flags set/unset for all java ini entries.
int | ini_user
| The options set by the user.
int | ini_set
| The options which carry a value.
cfg * | cfg
| Holds the global configuration.
proxyenv * | jenv
| The following structure contains per-request variables.
short | is_closed
char * | hosts
char * | servlet
char * | redirect_port
char * | channel
char * | channel_in
char * | channel_out
int | lockfile
zval * | exception
zval ** | object
zval * | func
zval ** | retval_ptr
zval * | func_params

## Function Documentation

PHP_MINIT_FUNCTION | ( | EXT |  | ) |

| Called when the module is initialized. Creates the Java and JavaClass structures and tries to start the backend if java.socketname, java.servlet or java.hosts are not set. The backend is not started if the environment variable X_JAVABRIDGE_OVERRIDE_HOSTS exists and contains either "/" or "host:port//context/servlet". When running as a Apache/IIS module or Fast CGI, this procedure is called only once. When running as a CGI binary, it is called whenever the CGI binary is called.

PHP_MSHUTDOWN_FUNCTION | ( | EXT |  | ) |

| Called when the module terminates. Stops the backend, if it is running. When running in Apache/IIS or as a FastCGI binary, this procedure is called only once. When running as a CGI binary this is called whenever the CGI binary terminates.

## Variable Documentation

struct cfg* cfg

| Holds the global configuration. This structure is shared by all php instances