Back to index

php5  5.3.10
fpm_conf.h
Go to the documentation of this file.
00001 
00002        /* $Id: fpm_conf.h,v 1.12.2.2 2008/12/13 03:46:49 anight Exp $ */
00003        /* (c) 2007,2008 Andrei Nigmatulin */
00004 
00005 #ifndef FPM_CONF_H
00006 #define FPM_CONF_H 1
00007 
00008 #include <stdint.h>
00009 #include "php.h"
00010 
00011 #define PM2STR(a) (a == PM_STYLE_STATIC ? "static" : (a == PM_STYLE_DYNAMIC ? "dynamic" : "ondemand"))
00012 
00013 #define FPM_CONF_MAX_PONG_LENGTH 64
00014 
00015 struct key_value_s;
00016 
00017 struct key_value_s {
00018        struct key_value_s *next;
00019        char *key;
00020        char *value;
00021 };
00022 
00023 /*
00024  * Please keep the same order as in fpm_conf.c and in php-fpm.conf.in
00025  */
00026 struct fpm_global_config_s {
00027        char *pid_file;
00028        char *error_log;
00029 #ifdef HAVE_SYSLOG_H
00030        char *syslog_ident;
00031        int syslog_facility;
00032 #endif
00033        int log_level;
00034        int emergency_restart_threshold;
00035        int emergency_restart_interval;
00036        int process_control_timeout;
00037        int process_max;
00038        int daemonize;
00039        int rlimit_files;
00040        int rlimit_core;
00041        char *events_mechanism;
00042 };
00043 
00044 extern struct fpm_global_config_s fpm_global_config;
00045 
00046 /*
00047  * Please keep the same order as in fpm_conf.c and in php-fpm.conf.in
00048  */
00049 struct fpm_worker_pool_config_s {
00050        char *name;
00051        char *prefix;
00052        char *user;
00053        char *group;
00054        char *listen_address;
00055        int listen_backlog;
00056        char *listen_owner;
00057        char *listen_group;
00058        char *listen_mode;
00059        char *listen_allowed_clients;
00060        int pm;
00061        int pm_max_children;
00062        int pm_start_servers;
00063        int pm_min_spare_servers;
00064        int pm_max_spare_servers;
00065        int pm_process_idle_timeout;
00066        int pm_max_requests;
00067        char *pm_status_path;
00068        char *ping_path;
00069        char *ping_response;
00070        char *access_log;
00071        char *access_format;
00072        char *slowlog;
00073        int request_slowlog_timeout;
00074        int request_terminate_timeout;
00075        int rlimit_files;
00076        int rlimit_core;
00077        char *chroot;
00078        char *chdir;
00079        int catch_workers_output;
00080        char *security_limit_extensions;
00081        struct key_value_s *env;
00082        struct key_value_s *php_admin_values;
00083        struct key_value_s *php_values;
00084 };
00085 
00086 struct ini_value_parser_s {
00087        char *name;
00088        char *(*parser)(zval *, void **, intptr_t);
00089        intptr_t offset;
00090 };
00091 
00092 enum {
00093        PM_STYLE_STATIC = 1,
00094        PM_STYLE_DYNAMIC = 2,
00095        PM_STYLE_ONDEMAND = 3
00096 };
00097 
00098 int fpm_conf_init_main(int test_conf);
00099 int fpm_worker_pool_config_free(struct fpm_worker_pool_config_s *wpc);
00100 int fpm_conf_write_pid();
00101 int fpm_conf_unlink_pid();
00102 
00103 #endif
00104