How to fix ? Error patching PHP 5.3 with "fpm-quota-chown.patch"

mean

Verified User
Joined
Feb 14, 2007
Messages
108
Problem patching file not work. with custombuild install php 5.3 ,

How to fix ?
./build php_expert 5.3 php-fpm

ERROR

Patching php-fpm to not fail on startup if User quota maxed out on socket chown
patching file sapi/fpm/fpm/fpm_unix.c
Hunk #1 FAILED at 235.
1 out of 1 hunk FAILED -- saving rejects to file sapi/fpm/fpm/fpm_unix.c.rej
cat: confdefs.h: No such file or directory

/usr/local/directadmin/custombuild/build
Code:
        if [ -s sapi/fpm/fpm/fpm_unix.c ]; then
                #Ticket 21336: [pool user] failed to chown() the socket '/usr/local/php56/sockets/user.sock': Disk quota exceeded (122)
                echo "Patching php-fpm to not fail on startup if User quota maxed out on socket chown"
                patch -p0 < ${WORKDIR}/patches/fpm-quota-chown.patch
        fi

/usr/local/directadmin/patches/fpm-quota-chown.patch
Code:
--- sapi/fpm/fpm/fpm_unix.c.orig        2019-12-05 17:02:37.818844398 -0700
+++ sapi/fpm/fpm/fpm_unix.c     2019-12-05 17:20:39.578769107 -0700
@@ -235,7 +235,8 @@
        if (wp->socket_uid != -1 || wp->socket_gid != -1) {
                if (0 > chown(path, wp->socket_uid, wp->socket_gid)) {
                        zlog(ZLOG_SYSERROR, "[pool %s] failed to chown() the socket '%s'", wp->config->name, wp->config->listen_address);
-                       return -1;
+                       chown(path, 0, wp->socket_gid);
+                       return 0;
                }
        }
        return 0;

cat fpm/fpm/fpm_unix.c.rej
Code:
--- sapi/fpm/fpm/fpm_unix.c.orig        2019-12-05 17:02:37.818844398 -0700
+++ sapi/fpm/fpm/fpm_unix.c     2019-12-05 17:20:39.578769107 -0700
@@ -235,7 +235,8 @@
        if (wp->socket_uid != -1 || wp->socket_gid != -1) {
                if (0 > chown(path, wp->socket_uid, wp->socket_gid)) {
                        zlog(ZLOG_SYSERROR, "[pool %s] failed to chown() the socket '%s'", wp->config->name, wp->config->listen_address);
-                       return -1;
+                       chown(path, 0, wp->socket_gid);
+                       return 0;
                }
        }
        return 0;
 
Last edited:
You system not have enough space or exceeded number of inodes.

Check that first.
 
@Kurogane Thank you for your reply,

This "Disk quota exceeded" is not error message

patch file fpm-quota-chown.patch not working
Patching php-fpm to not fail on startup if User quota maxed out on socket chown
patching file sapi/fpm/fpm/fpm_unix.c
Hunk #1 FAILED at 235.
1 out of 1 hunk FAILED -- saving rejects to file sapi/fpm/fpm/fpm_unix.c.rej
cat: confdefs.h: No such file or directory
 
Back
Top