Back to index

php5  5.3.10
Defines | Functions
fpm_php.h File Reference
#include <TSRM.h>
#include "php.h"
#include "build-defs.h"
#include "fpm/fpm_conf.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define FPM_PHP_INI_TO_EXPAND

Functions

int fpm_php_init_child (struct fpm_worker_pool_s *wp)
char * fpm_php_script_filename (TSRMLS_D)
char * fpm_php_request_uri (TSRMLS_D)
char * fpm_php_request_method (TSRMLS_D)
char * fpm_php_query_string (TSRMLS_D)
char * fpm_php_auth_user (TSRMLS_D)
size_t fpm_php_content_length (TSRMLS_D)
void fpm_php_soft_quit ()
int fpm_php_init_main ()
int fpm_php_apply_defines_ex (struct key_value_s *kv, int mode)
int fpm_php_limit_extensions (char *path)

Define Documentation

Value:
{ \
              "error_log", \
              "extension_dir", \
              "mime_magic.magicfile", \
              "sendmail_path", \
              "session.cookie_path", \
              "session_pgsql.sem_file_name", \
              "soap.wsdl_cache_dir", \
              "uploadprogress.file.filename_template", \
              "xdebug.output_dir", \
              "xdebug.profiler_output_dir", \
              "xdebug.trace_output_dir", \
              "xmms.path", \
              "axis2.client_home", \
              "blenc.key_file", \
              "coin_acceptor.device", \
              NULL \
       }

Definition at line 14 of file fpm_php.h.


Function Documentation

int fpm_php_apply_defines_ex ( struct key_value_s kv,
int  mode 
)

Definition at line 80 of file fpm_php.c.

{
       TSRMLS_FETCH();

       char *name = kv->key;
       char *value = kv->value;
       int name_len = strlen(name);
       int value_len = strlen(value);

       if (!strcmp(name, "extension") && *value) {
              zval zv;
              php_dl(value, MODULE_PERSISTENT, &zv, 1 TSRMLS_CC);
              return Z_BVAL(zv) ? 1 : -1;
       }

       if (fpm_php_zend_ini_alter_master(name, name_len+1, value, value_len, mode, PHP_INI_STAGE_ACTIVATE TSRMLS_CC) == FAILURE) {
              return -1;
       }

       if (!strcmp(name, "disable_functions") && *value) {
              char *v = strdup(value);
              PG(disable_functions) = v;
              fpm_php_disable(v, zend_disable_function TSRMLS_CC);
              return 1;
       }

       if (!strcmp(name, "disable_classes") && *value) {
              char *v = strdup(value);
              PG(disable_classes) = v;
              fpm_php_disable(v, zend_disable_class TSRMLS_CC);
              return 1;
       }

       return 1;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 184 of file fpm_php.c.

{
       return SG(request_info).auth_user;
}

Here is the caller graph for this function:

Definition at line 190 of file fpm_php.c.

{
       return SG(request_info).content_length;
}

Here is the caller graph for this function:

Definition at line 219 of file fpm_php.c.

{
       if (0 > fpm_php_apply_defines(wp) ||
              0 > fpm_php_set_allowed_clients(wp)) {
              return -1;
       }

       if (wp->limit_extensions) {
              limit_extensions = wp->limit_extensions;
       }
       return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 210 of file fpm_php.c.

{
       if (0 > fpm_cleanup_add(FPM_CLEANUP_PARENT, fpm_php_cleanup, 0)) {
              return -1;
       }
       return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int fpm_php_limit_extensions ( char *  path)

Definition at line 233 of file fpm_php.c.

{
       char **p;
       size_t path_len;

       if (!path || !limit_extensions) {
              return 0; /* allowed by default */
       }

       p = limit_extensions;
       path_len = strlen(path);
       while (p && *p) {
              size_t ext_len = strlen(*p);
              if (path_len > ext_len) {
                     char *path_ext = path + path_len - ext_len;
                     if (strcmp(*p, path_ext) == 0) {
                            return 0; /* allow as the extension has been found */
                     }
              }
              p++;
       }


       zlog(ZLOG_NOTICE, "Access to the script '%s' has been denied (see security.limit_extensions)", path);
       return 1; /* extension not found: not allowed  */
}

Here is the caller graph for this function:

Definition at line 178 of file fpm_php.c.

{
       return SG(request_info).query_string;
}

Here is the caller graph for this function:

Definition at line 172 of file fpm_php.c.

{
       return (char *) SG(request_info).request_method;
}

Here is the caller graph for this function:

Definition at line 166 of file fpm_php.c.

{
       return (char *) SG(request_info).request_uri;
}

Here is the caller graph for this function:

Definition at line 160 of file fpm_php.c.

{
       return SG(request_info).path_translated;
}

Here is the caller graph for this function:

Definition at line 204 of file fpm_php.c.

Here is the call graph for this function:

Here is the caller graph for this function: