This is very strange, because php-fpm does not change a single byte in
main/streams/cast.c file.
Can you give me the output of
$ grep COOKIE main/php_config.h
just after error happened, please ?
--
Andrei Nigmatulin
GPG PUB KEY 6449830D
Now I lay me down to sleep(3)
Pray the OS my core to keep
If I die before I wake
Pray the Disk my core to take
$ cd /home/floren/redhat/el5/BUILD/php-5.2.5/build-cgi
$ grep COOKIE main/php_config.h
BTW, do you use any other patches besides php-fpm ?
$ cd /home/floren/redhat/el5/BUILD/php-5.2.5/build-cgi
$ grep COOKIE main/php_config.h
shows ?
--
The problem is with this patch:
php-5.2.4-gnusrc.patch
It removes _GNU_SOURCE macro from cast.c:
--- php-5.2.4/main/streams/cast.c.gnusrc
+++ php-5.2.4/main/streams/cast.c
@@ -18,7 +18,6 @@
/* $Id: cast.c,v 1.12.2.1.2.1 2007/01/01 09:36:11 sebastian Exp $ */
-#define _GNU_SOURCE
#include "php.h"
#include "php_globals.h"
#include "php_network.h"
And glibc fopencookie() code somehow depends on this macro. Try to ask CentOS
guys to fix it, because I absolutely have no idea why the patch exists.
.. as well as most of the other patches.
They should be either included into the mainstream or CentOS maintainers should stop calling it "PHP":
-----
3. The name "PHP" must not be used to endorse or promote products
derived from this software without prior written permission. For
written permission, please contact gr...@php.net.
-----
Including distribution specific patches is one thing, changing the behavior
and effectively breaking working code is another.
--
Wbr,
Antony Dovgal
> I dropped Andrei's init script and used my own. It uses the init.d/
> functions.
> However, I have a question for you Andrei. To what directory should I
> point the fcgipm user? Right now I set it as /var/log/fcgipm
You're talking about $HOME directory ? I believe it does matter only when you
run external commands from php. They sometimes want to have access to
dot-files in $HOME. In this case you should set up correct home directory
with appropriate permissions.
Setting the above only makes sense if you're
- running linux
- using unix socket between web server and php-fastcgi
- need to restrict access to socket in file system from any processes other
than web server.
The 'owner', 'group' and 'mode' must be set in order to allow connect(2)'s
from web server's process uid/gid.
> ...
> <value name="user">fcgipm</value>
> <value name="group">fcgipm</value>
--
It's up to you where to create user's home dir on your server. php-fpm itself
does not expect any specific path to be set. "/home/fcgipm" is just fine.