Back to index

php5  5.3.10
Functions
php_thttpd.h File Reference
#include <sys/types.h>
#include <sys/stat.h>
#include <libhttpd.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void thttpd_php_shutdown (void)
void thttpd_php_init (void)
off_t thttpd_php_request (httpd_conn *hc, int show_source)
void thttpd_register_on_close (void(*)(int))
void thttpd_closed_conn (int fd)
int thttpd_get_fd (void)
void thttpd_set_dont_close (void)

Function Documentation

void thttpd_closed_conn ( int  fd)

Definition at line 715 of file thttpd.c.

{
       TSRMLS_FETCH();
       if (TG(on_close)) TG(on_close)(fd);
}
int thttpd_get_fd ( void  )

Definition at line 721 of file thttpd.c.

{
       TSRMLS_FETCH();
       return TG(hc)->conn_fd;
}
void thttpd_php_init ( void  )

Definition at line 736 of file thttpd.c.

{
       char *ini;

#ifdef ZTS
       tsrm_startup(1, 1, 0, NULL);
       ts_allocate_id(&thttpd_globals_id, sizeof(php_thttpd_globals), NULL, NULL);
       qr_lock = tsrm_mutex_alloc();
       thttpd_register_on_close(remove_dead_conn);
#endif

       if ((ini = getenv("PHP_INI_PATH"))) {
              thttpd_sapi_module.php_ini_path_override = ini;
       }

       sapi_startup(&thttpd_sapi_module);
       thttpd_sapi_module.startup(&thttpd_sapi_module);
       
       {
              TSRMLS_FETCH();

              SG(server_context) = (void *) 1;
       }
}

Here is the call graph for this function:

off_t thttpd_php_request ( httpd_conn *  hc,
int  show_source 
)

Definition at line 699 of file thttpd.c.

{
#ifdef ZTS
       queue_request(hc);
#else
       TSRMLS_FETCH();
       return thttpd_real_php_request(hc, show_source TSRMLS_CC);
#endif
}

Here is the call graph for this function:

void thttpd_php_shutdown ( void  )

Definition at line 761 of file thttpd.c.

{
       TSRMLS_FETCH();

       if (SG(server_context) != NULL) {
              thttpd_sapi_module.shutdown(&thttpd_sapi_module);
              sapi_shutdown();
#ifdef ZTS
              tsrm_shutdown();
#endif
       }
}

Here is the call graph for this function:

void thttpd_register_on_close ( void(*)(int )

Definition at line 709 of file thttpd.c.

{
       TSRMLS_FETCH();
       TG(on_close) = arg;
}

Here is the caller graph for this function:

void thttpd_set_dont_close ( void  )

Definition at line 727 of file thttpd.c.

{
       TSRMLS_FETCH();
#ifndef PREMIUM_THTTPD
       TG(hc)->file_address = (char *) 1;
#endif
}