За последние 24 часа нас посетили 18080 программистов и 1653 робота. Сейчас ищут 1539 программистов ...

php-fpm

Тема в разделе "Установка PHP", создана пользователем S1asH123, 12 ноя 2010.

  1. S1asH123

    S1asH123 Активный пользователь

    С нами с:
    12 ноя 2010
    Сообщения:
    1
    Симпатии:
    0
    помогите пожалуйста. Поставил php5.3.3 из исходников на ubuntu с поддержкой php-fpm все настроил но при запуске php-fpm выдает следущую ошибку
    Код (Text):
    1. Nov 12 17:14:42.055565 [ERROR] pid 5502, fpm_unix_resolve_socket_premissions(), line 61: [pool www] cannot get gid for group 'www ': Success (0)
    листинг php-fpm
    Код (Text):
    1.  
    2. ;;;;;;;;;;;;;;;;;;
    3.  
    4. [global]
    5. ; Pid file
    6. ; Default Value: none
    7. pid = /var/run/php-fpm.pid
    8.  
    9. ; Error log file
    10. ; Default Value: /usr/local/var/log/php-fpm.log
    11. error_log = /var/log/php-fpm.log
    12.  
    13. ; Log level
    14. ; Possible Values: alert, error, warning, notice, debug
    15. ; Default Value: notice
    16. log_level =debug
    17.  
    18. ;If this number of child processes exit with SIGSEGV or SIGBUS within the time
    19. ; interval set by emergency_restart_interval then FPM will restart. A value
    20. ; of '0' means 'Off'.
    21. ; Default Value: 0
    22. ;emergency_restart_threshold = 0
    23.  
    24. ; Interval of time used by emergency_restart_interval to determine when
    25. ; a graceful restart will be initiated.  This can be useful to work around
    26. ; accidental corruptions in an accelerator's shared memory.
    27. ; Available Units: s(econds), m(inutes), h(ours), or d(ays)
    28. ; Default Unit: seconds
    29. ; Default Value: 0
    30. ;emergency_restart_interval = 0
    31.  
    32. ; Time limit for child processes to wait for a reaction on signals from master.
    33. ; Available units: s(econds), m(inutes), h(ours), or d(ays)
    34. ; Default Unit: seconds
    35. ; Default Value: 0
    36. ;process_control_timeout = 0
    37.  
    38. ; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
    39. ; Default Value: yes
    40. daemonize =no
    41.  
    42. ;;;;;;;;;;;;;;;;;;;;
    43. ; Pool Definitions ;
    44. ;;;;;;;;;;;;;;;;;;;;
    45.  
    46. ; Multiple pools of child processes may be started with different listening
    47. ; ports and different management options.  The name of the pool will be
    48. ; used in logs and stats. There is no limitation on the number of pools which
    49. ; FPM can handle. Your system will tell you anyway :)
    50.  
    51. ; Start a new pool named 'www'.
    52. [www]
    53.  
    54. ; The address on which to accept FastCGI requests.
    55. ; Valid syntaxes are:
    56. ;   'ip.add.re.ss:port'    - to listen on a TCP socket to a specific address on
    57. ;                            a specific port;
    58. ;   'port'                 - to listen on a TCP socket to all addresses on a
    59. ;                            specific port;
    60. ;   '/path/to/unix/socket' - to listen on a unix socket.
    61. ; Note: This value is mandatory.
    62. listen = /var/run/php-fpm.sock
    63. ;listen = 127.0.0.1:9000
    64. ; Set listen(2) backlog. A value of '-1' means unlimited.
    65. ; Default Value: -1
    66. ;listen.backlog = -1
    67.  
    68. ; List of ipv4 addresses of FastCGI clients which are allowed to connect.
    69. ; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
    70. ; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
    71. ; must be separated by a comma. If this value is left blank, connections will be
    72. ; accepted from any ip address.
    73. ; Default Value: any
    74. ;listen.allowed_clients = 127.0.0.1
    75.  
    76. ; Set permissions for unix socket, if one is used. In Linux, read/write
    77. ; permissions must be set in order to allow connections from a web server. Many
    78. ; BSD-derived systems allow connections regardless of permissions.
    79. ; Default Values: user and group are set as the running user
    80. ;                 mode is set to 0666
    81. listen.owner = www
    82. listen.group = www
    83. listen.mode = 0666
    84.  
    85. ; Unix user/group of processes
    86. ; Note: The user is mandatory. If the group is not set, the default user's group
    87. ;       will be used.
    88. user = www
    89. group = www
    90.  
    91. ; Choose how the process manager will control the number of child processes.
    92. ; Possible Values:
    93. ;   static  - a fixed number (pm.max_children) of child processes;
    94. ;   dynamic - the number of child processes are set dynamically based on the
    95. ;             following directives:
    96. ;             pm.max_children      - the maximum number of children that can
    97. ;                                    be alive at the same time.
    98. ;             pm.start_servers     - the number of children created on startup.
    99. ;             pm.min_spare_servers - the minimum number of children in 'idle'
    100. ;                                    state (waiting to process). If the number
    101. ;                                    of 'idle' processes is less than this
    102. ;                                    number then some children will be created.
    103. ;             pm.max_spare_servers - the maximum number of children in 'idle'
    104. ;                                    state (waiting to process). If the number
    105. ;                                    of 'idle' processes is greater than this
    106. ;                                    number then some children will be killed.
    107. ; Note: This value is mandatory.
    108. pm = dynamic
    109.  
    110. ; The number of child processes to be created when pm is set to 'static' and the
    111. ; maximum number of child processes to be created when pm is set to 'dynamic'.
    112. ; This value sets the limit on the number of simultaneous requests that will be
    113. ; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
    114. ; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
    115. ; CGI.
    116. ; Note: Used when pm is set to either 'static' or 'dynamic'
    117. ; Note: This value is mandatory.
    118. pm.max_children = 50
    119.  
    120. ; The number of child processes created on startup.
    121. ; Note: Used only when pm is set to 'dynamic'
    122. ; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
    123. pm.start_servers = 20
    124.  
    125. ; The desired minimum number of idle server processes.
    126. ; Note: Used only when pm is set to 'dynamic'
    127. ; Note: Mandatory when pm is set to 'dynamic'
    128. pm.min_spare_servers = 5
    129.  
    130. ; The desired maximum number of idle server processes.
    131. ; Note: Used only when pm is set to 'dynamic'
    132. ; Note: Mandatory when pm is set to 'dynamic'
    133. pm.max_spare_servers = 35
    134.  
    135. ; The number of requests each child process should execute before respawning.
    136. ; This can be useful to work around memory leaks in 3rd party libraries. For
    137. ; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
    138. ; Default Value: 0
    139. pm.max_requests = 500
    140.  
    141. ; The URI to view the FPM status page. If this value is not set, no URI will be
    142. ; recognized as a status page. By default, the status page shows the following
    143. ; information:
    144. ;   accepted conn    - the number of request accepted by the pool;
    145. ;   pool             - the name of the pool;
    146. ;   process manager  - static or dynamic;
    147. ;   idle processes   - the number of idle processes;
    148. ;   active processes - the number of active processes;
    149. ;   total processes  - the number of idle + active processes.
    150. ; The values of 'idle processes', 'active processes' and 'total processes' are
    151. ; updated each second. The value of 'accepted conn' is updated in real time.
    152. ; Example output:
    153. ;   accepted conn:   12073
    154. ;   pool:             www
    155. ;   process manager:  static
    156. ;   idle processes:   35
    157. ;   active processes: 65
    158. ;   total processes:  100
    159. ; By default the status page output is formatted as text/plain. Passing either
    160. ; 'html' or 'json' as a query string will return the corresponding output
    161. ; syntax. Example:
    162. ;   http://www.foo.bar/status
    163. ;   http://www.foo.bar/status?json
    164. ;   http://www.foo.bar/status?html
    165. ; Note: The value must start with a leading slash (/). The value can be
    166. ;       anything, but it may not be a good idea to use the .php extension or it
    167. ;       may conflict with a real PHP file.
    168. ; Default Value: not set
    169. pm.status_path = /status
    170.  
    171. ; The ping URI to call the monitoring page of FPM. If this value is not set, no
    172. ; URI will be recognized as a ping page. This could be used to test from outside
    173. ; that FPM is alive and responding, or to
    174. ; - create a graph of FPM availability (rrd or such);
    175. ; - remove a server from a group if it is not responding (load balancing);
    176. ; - trigger alerts for the operating team (24/7).
    177. ; Note: The value must start with a leading slash (/). The value can be
    178. ;       anything, but it may not be a good idea to use the .php extension or it
    179. ;       may conflict with a real PHP file.
    180. ; Default Value: not set
    181. ;ping.path = /ping
    182.  
    183. ; This directive may be used to customize the response of a ping request. The
    184. ; response is formatted as text/plain with a 200 response code.
    185. ; Default Value: pong
    186. ;ping.response = pong
    187.  
    188. ; The timeout for serving a single request after which the worker process will
    189. ; be killed. This option should be used when the 'max_execution_time' ini option
    190. ; does not stop script execution for some reason. A value of '0' means 'off'.
    191. ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
    192. ; Default Value: 0
    193. ;request_terminate_timeout = 0
    194.  
    195. ; The timeout for serving a single request after which a PHP backtrace will be
    196. ; dumped to the 'slowlog' file. A value of '0s' means 'off'.
    197. ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
    198. ; Default Value: 0
    199. ;request_slowlog_timeout = 0
    200.  
    201. ; The log file for slow requests
    202. ; Default Value: /usr/local/var/log/php-fpm.log.slow
    203. slowlog = /var/log/php-fpm.log.slow
    204.  
    205. ; Set open file descriptor rlimit.
    206. ; Default Value: system defined value
    207. ;rlimit_files = 1024
    208.  
    209. ; Set max core size rlimit.
    210. ; Possible Values: 'unlimited' or an integer greater or equal to 0
    211. ; Default Value: system defined value
    212. ;rlimit_core = 0
    213.  
    214. ; Chroot to this directory at the start. This value must be defined as an
    215. ; absolute path. When this value is not set, chroot is not used.
    216. ; Note: chrooting is a great security feature and should be used whenever
    217. ;       possible. However, all PHP paths will be relative to the chroot
    218. ;       (error_log, sessions.save_path, ...).
    219. ; Default Value: not set
    220. ;chroot =
    221.  
    222. ; Chdir to this directory at the start. This value must be an absolute path.
    223. ; Default Value: current directory or / when chroot
    224. ;chdir = /var/www
    225.  
    226. ; Redirect worker stdout and stderr into main error log. If not set, stdout and
    227. ; stderr will be redirected to /dev/null according to FastCGI specs.
    228. ; Default Value: no
    229. ;catch_workers_output = yes
    230.  
    231. ; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
    232. ; the current environment.
    233. ; Default Value: clean env
    234. ;env[HOSTNAME] = $HOSTNAME
    235. ;env[PATH] = /usr/local/bin:/usr/bin:/bin
    236. ;env[TMP] = /tmp
    237. ;env[TMPDIR] = /tmp
    238. ;env[TEMP] = /tmp
    239.  
    240. ; Additional php.ini defines, specific to this pool of workers. These settings
    241. ; overwrite the values previously defined in the php.ini. The directives are the
    242. ; same as the PHP SAPI:
    243. ;   php_value/php_flag             - you can set classic ini defines which can
    244. ;                                    be overwritten from PHP call 'ini_set'.
    245. ;   php_admin_value/php_admin_flag - these directives won't be overwritten by
    246. ;                                     PHP call 'ini_set'
    247. ; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
    248.  
    249. ; Defining 'extension' will load the corresponding shared extension from
    250. ; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
    251. ; overwrite previously defined php.ini values, but will append the new value
    252. ; instead.
    253.  
    254. ; Default Value: nothing is defined by default except the values in php.ini and
    255. ;                specified at startup with the -d argument
    256. ;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
    257. php_flag[display_errors] = on
    258. php_admin_value[error_log] = /var/log/fpm-php.www.log
    259. php_admin_flag[log_errors] = on
    260. php_admin_value[memory_limit] = 32M
    если использовать вместо listen = /var/run/php-fpm.sock listen = 127.0.0.1:9000 то все прекрасно запускается[/code]