Welcome! Log In Create A New Profile

Advanced

PHP-FPM Patch for 5.2.10 is available

Posted by mike 
PHP-FPM Patch for 5.2.10 is available
June 19, 2009 02:40AM
Note: this has not been really tested, but apparently compiles properly.

Thanks to "thirdwheel" on IRC.

http://php-fpm.org/downloads/php-5.2.10-fpm-0.5.10.diff.gz

I'm working on getting the website going too. Hopefully Andrei can
fill in the missing pieces of it tomorrow for me.
Re: PHP-FPM Patch for 5.2.10 is available
June 19, 2009 02:53AM
Good work Michael for making php 5.2.10 path available. I was not
using php-fpm as there is no official patch for v 5.2.9, i will try
this.
fei
Re: PHP-FPM Patch for 5.2.10 is available
June 19, 2009 03:18AM
Good Work---Thanks a lot!
fei
Re: PHP-FPM Patch for 5.2.10 is available
June 19, 2009 03:34AM
I haveTried.But Get
/root/php-5.2.10/sapi/cgi/cgi_main.c:1341:30: error: fpm/fpm_autoconf.h: No such file or directory
/root/php-5.2.10/sapi/cgi/cgi_main.c: In function 'zm_info_cgi':
/root/php-5.2.10/sapi/cgi/cgi_main.c:1345: error: 'PHP_FPM_VERSION' undeclared (first use in this function)
/root/php-5.2.10/sapi/cgi/cgi_main.c:1345: error: (Each undeclared identifier is reported only once
/root/php-5.2.10/sapi/cgi/cgi_main.c:1345: error: for each function it appears in.)
make: *** [sapi/cgi/cgi_main.lo] Error 1
OS Gentoo ~X86 And Debian Lenny.
fei
Re: PHP-FPM Patch for 5.2.10 is available
June 19, 2009 03:47AM
And I configure --help without --enable-fpm.
Usu
Re: PHP-FPM Patch for 5.2.10 is available
June 19, 2009 05:58AM
I got the same error, debian lenny x64

trying to compile with:

# ./configure --enable-fastcgi --enable-fpm --with-mcrypt --with-zlib
--enable-mbstring --with-openssl --with-mysql --with-mysql-sock --with-
gd --with-jpeg-dir=/usr/lib --enable-gd-native-ttf --without-sqlite --
disable-pdo --disable-reflection --with-curl=/usr/include/curl

# make all install

On 19 Giu, 09:34, "fei" <nginx-fo...@nginx.us> wrote:
> I haveTried.But Get
> /root/php-5.2.10/sapi/cgi/cgi_main.c:1341:30: error: fpm/fpm_autoconf.h: No such file or directory
> /root/php-5.2.10/sapi/cgi/cgi_main.c: In function 'zm_info_cgi':
> /root/php-5.2.10/sapi/cgi/cgi_main.c:1345: error: 'PHP_FPM_VERSION' undeclared (first use in this function)
> /root/php-5.2.10/sapi/cgi/cgi_main.c:1345: error: (Each undeclared identifier is reported only once
> /root/php-5.2.10/sapi/cgi/cgi_main.c:1345: error: for each function it appears in.)
> make: ***
Re: PHP-FPM Patch for 5.2.10 is available
June 19, 2009 07:50AM
Make failed with error

[quote]
/usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1341:30: error: fpm/fpm_autoconf.h: No such file or directory
/usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c: In function 'zm_info_cgi':
/usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1345: error: 'PHP_FPM_VERSION' undeclared (first use in this function)
/usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1345: error: (Each undeclared identifier is reported only once
/usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1345: error: for each function it appears in.)
make: *** [sapi/cgi/cgi_main.lo] Error 1
[/quote]

Waiting for fixed patch
Great! FreeBSD7 amd64 complied OK!
Re: PHP-FPM Patch for 5.2.10 is available
June 19, 2009 09:36AM
Failed to compile on CentOS 5.3 (tried on 32 and 64 bit test servers).

/usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1341:30: error: fpm/fpm_autoconf.h: No such file or directory
/usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c: In function 'zm_info_cgi':
/usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1345: error: 'PHP_FPM_VERSION' undeclared (first use in this function)
/usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1345: error: (Each undeclared identifier is reported only once
/usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1345: error: for each function it appears in.)
make: *** [sapi/cgi/cgi_main.lo] Error 1

Also, Mike, you have an error in the version on the download page [says Latest release (untested, please test!)
Latest 0.5.10 for php-5.2.8 (Jun 18 2009, 254482 bytes, md5sum 33c19e64dc90230d82ed37e7fcf83990)] - should say "php-5.2.10".

--
Jim Ohlstein
Re: PHP-FPM Patch for 5.2.10 is available
June 19, 2009 09:54AM
On Fri, Jun 19, 2009 at 8:36 PM, Jim Ohlstein<nginx-forum@nginx.us> wrote:
>
> Failed to compile on CentOS 5.3 (tried on 32 and 64 bit test servers).
>
> /usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1341:30: error: fpm/fpm_autoconf.h: No such file or directory
> /usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c: In function 'zm_info_cgi':
> /usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1345: error: 'PHP_FPM_VERSION' undeclared (first use in this function)
> /usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1345: error: (Each undeclared identifier is reported only once
> /usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1345: error: for each function it appears in.)
> make: ***  Error 1
>

same error on opensolaris (using gnu tools)


--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
Yorgo Sun
Re: PHP-FPM Patch for 5.2.10 is available
June 19, 2009 10:33AM
I've patched php-5.2.10 using php-5.2.8-fpm-0.5.10.diff. It only have two
point of confusions.One is php-5.2.10/configure.rej another
is php-5.2.10/sapi/cgi/fastcgi.c.rej. just move that diff codes into really
code files. than you can pass the compile.

2009/6/19 Edho P Arief

>
> On Fri, Jun 19, 2009 at 8:36 PM, Jim Ohlstein wrote:
> >
> > Failed to compile on CentOS 5.3 (tried on 32 and 64 bit test servers).
> >
> > /usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1341:30: error:
> fpm/fpm_autoconf.h: No such file or directory
> > /usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c: In function 'zm_info_cgi':
> > /usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1345: error:
> 'PHP_FPM_VERSION' undeclared (first use in this function)
> > /usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1345: error: (Each
> undeclared identifier is reported only once
> > /usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1345: error: for each
> function it appears in.)
> > make: *** Error 1
> >
>
> same error on opensolaris (using gnu tools)
>
>
> --
> O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
>



--
孙绍轩 Yorgo Sun
Re: PHP-FPM Patch for 5.2.10 is available
June 19, 2009 11:02AM
Sorry all -

I'll have to bug who did it on IRC, it compiled for him and I thought
one other person reported success. Welcome to a fresh start :)

I will personally validate it myself next time too, I did not have
time this time to try.

So for the moment I will comment the link out (thanks Jim) and say
"proper 5.2.10 patch coming"

Yorgo: there's two things

a) if it can compile
b) if it's really actually working properly / not a totally messed up hack

I want to make sure that it's functional, not just passing the "can it
compile" test :)

On Fri, Jun 19, 2009 at 7:33 AM, Yorgo Sun<yorgosun@gmail.com> wrote:
> I've patched php-5.2.10 using php-5.2.8-fpm-0.5.10.diff. It only have two
> point of confusions.
> One is php-5.2.10/configure.rej another
> is php-5.2.10/sapi/cgi/fastcgi.c.rej. just move that diff codes into really
> code files. than you can pass the compile.
> 2009/6/19 Edho P Arief <edhoprima@gmail.com>
>>
>> On Fri, Jun 19, 2009 at 8:36 PM, Jim Ohlstein<nginx-forum@nginx.us> wrote:
>> >
>> > Failed to compile on CentOS 5.3 (tried on 32 and 64 bit test servers).
>> >
>> > /usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1341:30: error:
>> > fpm/fpm_autoconf.h: No such file or directory
>> > /usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c: In function
>> > 'zm_info_cgi':
>> > /usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1345: error:
>> > 'PHP_FPM_VERSION' undeclared (first use in this function)
>> > /usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1345: error: (Each
>> > undeclared identifier is reported only once
>> > /usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1345: error: for each
>> > function it appears in.)
>> > make: ***  Error 1
>> >
>>
>> same error on opensolaris (using gnu tools)
>>
>>
>> --
>> O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
>
>
>
> --
> 孙绍轩 Yorgo Sun
>
>
Yorgo Sun
Re: PHP-FPM Patch for 5.2.10 is available
June 19, 2009 10:02PM
I've compiled one and testing. everything are fine currently.
I just tell all of you what I did. and we can test it together.

It's only two file can't patch 5.2.8's patch correct: ./configure and
./sapi/cgi/fastcgi.c
for the configure file, it can't patched correct because two of lines are
different with 5.2.8 and 5.2.10 original source code. these lines just want
to output some message, so it's safe to modify that code.

the patch file want to delete some code in fastcgi.c, but that code changed,
so patch can't work.
You can checkout ./sapi/cgi/fastcgi.c and find some code like these:

if (!tcp) {
chmod(path, 0777);
- } else {
- char *ip = getenv("FCGI_WEB_SERVER_ADDRS");
- char *cur, *end;
- int n;
-
- if (ip) {
- ip = strdup(ip);
- cur = ip;
- n = 0;
- while (*cur) {
- if (*cur == ',') n++;
- cur++;
- }
- allowed_clients = malloc(sizeof(in_addr_t) * (n+2));
- n = 0;
- cur = ip;
- while (cur) {
- end = strchr(cur, ',');
- if (end) {
- *end = 0;
- end++;
- }
- allowed_clients[n] = inet_addr(cur);
- if (allowed_clients[n] == INADDR_NONE) {
- fprintf(stderr, "Wrong IP address
'%s' in FCGI_WEB_SERVER_ADDRS\n", cur);
- }
- n++;
- cur = end;
- }
- allowed_clients[n] = INADDR_NONE;
- free(ip);
- }
}

Delete all the else segment's code.

That's all. you can try to compile it now.

the attachment is the patch I made. you can try it directly. every problems
can post on this mail and I'll try to check.

2009/6/19 Michael Shadle

>
> Sorry all -
>
> I'll have to bug who did it on IRC, it compiled for him and I thought
> one other person reported success. Welcome to a fresh start :)
>
> I will personally validate it myself next time too, I did not have
> time this time to try.
>
> So for the moment I will comment the link out (thanks Jim) and say
> "proper 5.2.10 patch coming"
>
> Yorgo: there's two things
>
> a) if it can compile
> b) if it's really actually working properly / not a totally messed up hack
>
> I want to make sure that it's functional, not just passing the "can it
> compile" test :)
>
> On Fri, Jun 19, 2009 at 7:33 AM, Yorgo Sun wrote:
> > I've patched php-5.2.10 using php-5.2.8-fpm-0.5.10.diff. It only have two
> > point of confusions.
> > One is php-5.2.10/configure.rej another
> > is php-5.2.10/sapi/cgi/fastcgi.c.rej. just move that diff codes into
> really
> > code files. than you can pass the compile.
> > 2009/6/19 Edho P Arief
> >>
> >> On Fri, Jun 19, 2009 at 8:36 PM, Jim Ohlstein
> wrote:
> >> >
> >> > Failed to compile on CentOS 5.3 (tried on 32 and 64 bit test servers).
> >> >
> >> > /usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1341:30: error:
> >> > fpm/fpm_autoconf.h: No such file or directory
> >> > /usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c: In function
> >> > 'zm_info_cgi':
> >> > /usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1345: error:
> >> > 'PHP_FPM_VERSION' undeclared (first use in this function)
> >> > /usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1345: error: (Each
> >> > undeclared identifier is reported only once
> >> > /usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1345: error: for each
> >> > function it appears in.)
> >> > make: *** Error 1
> >> >
> >>
> >> same error on opensolaris (using gnu tools)
> >>
> >>
> >> --
> >> O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
> >
> >
> >
> > --
> > 孙绍轩 Yorgo Sun
> >
> >
>



--
孙绍轩 Yorgo Sun
Yorgo Sun
Re: PHP-FPM Patch for 5.2.10 is available
June 20, 2009 01:45AM
my php-fpm's test result
====================================================================TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped : 52
Exts tested : 27
---------------------------------------------------------------------

Number of tests : 8282 6309
Tests skipped : 1973 ( 23.8%) --------
Tests warned : 3 ( 0.0%) ( 0.0%)
Tests failed : 14 ( 0.2%) ( 0.2%)
Expected fail : 3 ( 0.0%) ( 0.0%)
Tests passed : 6289 ( 75.9%) ( 99.7%)
---------------------------------------------------------------------
Time taken : 278 seconds
====================================================================
====================================================================FAILED TEST SUMMARY
---------------------------------------------------------------------
Bug #22592 (cascading assignments to strings with curly braces broken)
[tests/lang/bug22592.phpt]
Bug #48058 (Year formatter goes wrong with out-of-int range)
[ext/date/tests/bug48058.phpt]
date_create() with large relative offsets
[ext/date/tests/date_create-relative.phpt]
Bug #16069 (ICONV transliteration failure) [ext/iconv/tests/bug16069.phpt]
iconv stream filter [ext/iconv/tests/iconv_stream_filter_delimiter.phpt]
Bug #41125 (PDO mysql + quote() + prepare() can result in seg fault)
[ext/pdo_mysql/tests/bug41125.phpt]
Bug #44327 (PDORow::queryString property & numeric offsets / Crash)
[ext/pdo_mysql/tests/bug44327.phpt]
posix_initgroups(): Basic tests [ext/posix/tests/posix_initgroups.phpt]
posix_initgroups(): Basic tests
[ext/posix/tests/posix_initgroups_basic.phpt]
Test natcasesort() function : usage variations - different numeric types
[ext/standard/tests/array/natcasesort_variation3.phpt]
Test gethostbynamel() function : error conditions
[ext/standard/tests/network/gethostbynamel_error.phpt]
Bug #38770 (unpack() broken with longs on 64 bit machines)
[ext/standard/tests/strings/bug38770.phpt]
htmlentities() test 2 (setlocale / fr_FR.ISO-8859-15)
[ext/standard/tests/strings/htmlentities02.phpt] (warn: possibly braindead
libc)
htmlentities() test 4 (setlocale / ja_JP.EUC-JP)
[ext/standard/tests/strings/htmlentities04.phpt] (warn: possibly braindead
libc)
htmlentities() test 15 (setlocale / KOI8-R)
[ext/standard/tests/strings/htmlentities15.phpt] (warn: possibly braindead
libc)
xmlwriter_open_uri with PHP_MAXPATHLEN + 1
[ext/xmlwriter/tests/bug48204.phpt]
xmlwriter_write_attribute_ns with missing param
[ext/xmlwriter/tests/xmlwriter_write_attribute_ns_error_001.phpt]
====================================================================
====================================================================EXPECTED FAILED TEST SUMMARY
---------------------------------------------------------------------
ob_start(): Ensure unerasable buffer cannot be flushed by ob_flush().
[tests/output/ob_start_basic_unerasable_005.phpt]
Bug #42718 (unsafe_raw filter not applied when configured as default filter)
[ext/filter/tests/bug42718.phpt]
SPL: ArrayObject::exchangeArray() basic usage with object as underlying data
store. [ext/spl/tests/arrayObject_exchangeArray_basic3.phpt]
====================================================================
====================================================================WARNED TEST SUMMARY
---------------------------------------------------------------------
htmlentities() test 2 (setlocale / fr_FR.ISO-8859-15)
[ext/standard/tests/strings/htmlentities02.phpt] (warn: possibly braindead
libc)
htmlentities() test 4 (setlocale / ja_JP.EUC-JP)
[ext/standard/tests/strings/htmlentities04.phpt] (warn: possibly braindead
libc)
htmlentities() test 15 (setlocale / KOI8-R)
[ext/standard/tests/strings/htmlentities15.phpt] (warn: possibly braindead
libc)
====================================================================

2009/6/20 Yorgo Sun

> I've compiled one and testing. everything are fine currently.
> I just tell all of you what I did. and we can test it together.
>
> It's only two file can't patch 5.2.8's patch correct: ./configure and
> ./sapi/cgi/fastcgi.c
> for the configure file, it can't patched correct because two of lines are
> different with 5.2.8 and 5.2.10 original source code. these lines just want
> to output some message, so it's safe to modify that code.
>
> the patch file want to delete some code in fastcgi.c, but that code
> changed, so patch can't work.
> You can checkout ./sapi/cgi/fastcgi.c and find some code like these:
>
> if (!tcp) {
> chmod(path, 0777);
> - } else {
> - char *ip = getenv("FCGI_WEB_SERVER_ADDRS");
> - char *cur, *end;
> - int n;
> -
> - if (ip) {
> - ip = strdup(ip);
> - cur = ip;
> - n = 0;
> - while (*cur) {
> - if (*cur == ',') n++;
> - cur++;
> - }
> - allowed_clients = malloc(sizeof(in_addr_t) * (n+2));
> - n = 0;
> - cur = ip;
> - while (cur) {
> - end = strchr(cur, ',');
> - if (end) {
> - *end = 0;
> - end++;
> - }
> - allowed_clients[n] = inet_addr(cur);
> - if (allowed_clients[n] == INADDR_NONE) {
> - fprintf(stderr, "Wrong IP address
> '%s' in FCGI_WEB_SERVER_ADDRS\n", cur);
> - }
> - n++;
> - cur = end;
> - }
> - allowed_clients[n] = INADDR_NONE;
> - free(ip);
> - }
> }
>
> Delete all the else segment's code.
>
> That's all. you can try to compile it now.
>
> the attachment is the patch I made. you can try it directly. every problems
> can post on this mail and I'll try to check.
>
> 2009/6/19 Michael Shadle
>
>
>> Sorry all -
>>
>> I'll have to bug who did it on IRC, it compiled for him and I thought
>> one other person reported success. Welcome to a fresh start :)
>>
>> I will personally validate it myself next time too, I did not have
>> time this time to try.
>>
>> So for the moment I will comment the link out (thanks Jim) and say
>> "proper 5.2.10 patch coming"
>>
>> Yorgo: there's two things
>>
>> a) if it can compile
>> b) if it's really actually working properly / not a totally messed up hack
>>
>> I want to make sure that it's functional, not just passing the "can it
>> compile" test :)
>>
>> On Fri, Jun 19, 2009 at 7:33 AM, Yorgo Sun wrote:
>> > I've patched php-5.2.10 using php-5.2.8-fpm-0.5.10.diff. It only have
>> two
>> > point of confusions.
>> > One is php-5.2.10/configure.rej another
>> > is php-5.2.10/sapi/cgi/fastcgi.c.rej. just move that diff codes into
>> really
>> > code files. than you can pass the compile.
>> > 2009/6/19 Edho P Arief
>> >>
>> >> On Fri, Jun 19, 2009 at 8:36 PM, Jim Ohlstein
>> wrote:
>> >> >
>> >> > Failed to compile on CentOS 5.3 (tried on 32 and 64 bit test
>> servers).
>> >> >
>> >> > /usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1341:30: error:
>> >> > fpm/fpm_autoconf.h: No such file or directory
>> >> > /usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c: In function
>> >> > 'zm_info_cgi':
>> >> > /usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1345: error:
>> >> > 'PHP_FPM_VERSION' undeclared (first use in this function)
>> >> > /usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1345: error: (Each
>> >> > undeclared identifier is reported only once
>> >> > /usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1345: error: for each
>> >> > function it appears in.)
>> >> > make: *** Error 1
>> >> >
>> >>
>> >> same error on opensolaris (using gnu tools)
>> >>
>> >>
>> >> --
>> >> O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
>> >
>> >
>> >
>> > --
>> > 孙绍轩 Yorgo Sun
>> >
>> >
>>
>
>
>
> --
> 孙绍轩 Yorgo Sun
>
>


--
孙绍轩 Yorgo Sun
Momchil Ivanov
Re: PHP-FPM Patch for 5.2.10 is available
June 20, 2009 08:56AM
На Saturday 20 June 2009 04:02:22 Yorgo Sun написа:
> I've compiled one and testing. everything are fine currently.
> I just tell all of you what I did. and we can test it together.
>
> It's only two file can't patch 5.2.8's patch correct: ./configure and
> ./sapi/cgi/fastcgi.c
> for the configure file, it can't patched correct because two of lines are
> different with 5.2.8 and 5.2.10 original source code. these lines just want
> to output some message, so it's safe to modify that code.

You can ignore patching configure completely as long as you do the following
after patching all the other files:

# rm configure
# ./buildconf --force

Momchil

--
PGP KeyID: 0x3118168B
Keyserver: pgp.mit.edu
Key fingerprint BB50 2983 0714 36DC D02E  158A E03D 56DA 3118 168B
Re: PHP-FPM Patch for 5.2.10 is available
June 20, 2009 12:35PM
I had a bit more time to test this out today. Using the original patch for php-5.2.8 (php-5.2.8-fpm-0.5.10.diff) and manually editing php-5.2.10/sapi/cgi/fastcgi.c based on php-5.2.10/sapi/cgi/fastcgi.c.rej, and then rebuilding configure I got it to compile on CentOS 5.3 (both 32 and 64 bit versions) and it appears to be working. I've put it in production here at the nginx forum for now.

--
Jim Ohlstein
Re: PHP-FPM Patch for 5.2.10 is available
June 20, 2009 02:40PM
Oddly enough when trying this I keep getting a missing config.sub file.
Total failure when trying to buildconf --force because of it. Hrm.

On Fri, Jun 19, 2009 at 7:02 PM, Yorgo Sun wrote:

> I've compiled one and testing. everything are fine currently.
> I just tell all of you what I did. and we can test it together.
>
> It's only two file can't patch 5.2.8's patch correct: ./configure and
> ./sapi/cgi/fastcgi.c
> for the configure file, it can't patched correct because two of lines are
> different with 5.2.8 and 5.2.10 original source code. these lines just want
> to output some message, so it's safe to modify that code.
>
> the patch file want to delete some code in fastcgi.c, but that code
> changed, so patch can't work.
> You can checkout ./sapi/cgi/fastcgi.c and find some code like these:
>
> if (!tcp) {
> chmod(path, 0777);
> - } else {
> - char *ip = getenv("FCGI_WEB_SERVER_ADDRS");
> - char *cur, *end;
> - int n;
> -
> - if (ip) {
> - ip = strdup(ip);
> - cur = ip;
> - n = 0;
> - while (*cur) {
> - if (*cur == ',') n++;
> - cur++;
> - }
> - allowed_clients = malloc(sizeof(in_addr_t) * (n+2));
> - n = 0;
> - cur = ip;
> - while (cur) {
> - end = strchr(cur, ',');
> - if (end) {
> - *end = 0;
> - end++;
> - }
> - allowed_clients[n] = inet_addr(cur);
> - if (allowed_clients[n] == INADDR_NONE) {
> - fprintf(stderr, "Wrong IP address
> '%s' in FCGI_WEB_SERVER_ADDRS\n", cur);
> - }
> - n++;
> - cur = end;
> - }
> - allowed_clients[n] = INADDR_NONE;
> - free(ip);
> - }
> }
>
> Delete all the else segment's code.
>
> That's all. you can try to compile it now.
>
> the attachment is the patch I made. you can try it directly. every problems
> can post on this mail and I'll try to check.
>
> 2009/6/19 Michael Shadle
>
>
>> Sorry all -
>>
>> I'll have to bug who did it on IRC, it compiled for him and I thought
>> one other person reported success. Welcome to a fresh start :)
>>
>> I will personally validate it myself next time too, I did not have
>> time this time to try.
>>
>> So for the moment I will comment the link out (thanks Jim) and say
>> "proper 5.2.10 patch coming"
>>
>> Yorgo: there's two things
>>
>> a) if it can compile
>> b) if it's really actually working properly / not a totally messed up hack
>>
>> I want to make sure that it's functional, not just passing the "can it
>> compile" test :)
>>
>> On Fri, Jun 19, 2009 at 7:33 AM, Yorgo Sun wrote:
>> > I've patched php-5.2.10 using php-5.2.8-fpm-0.5.10.diff. It only have
>> two
>> > point of confusions.
>> > One is php-5.2.10/configure.rej another
>> > is php-5.2.10/sapi/cgi/fastcgi.c.rej. just move that diff codes into
>> really
>> > code files. than you can pass the compile.
>> > 2009/6/19 Edho P Arief
>> >>
>> >> On Fri, Jun 19, 2009 at 8:36 PM, Jim Ohlstein
>> wrote:
>> >> >
>> >> > Failed to compile on CentOS 5.3 (tried on 32 and 64 bit test
>> servers).
>> >> >
>> >> > /usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1341:30: error:
>> >> > fpm/fpm_autoconf.h: No such file or directory
>> >> > /usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c: In function
>> >> > 'zm_info_cgi':
>> >> > /usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1345: error:
>> >> > 'PHP_FPM_VERSION' undeclared (first use in this function)
>> >> > /usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1345: error: (Each
>> >> > undeclared identifier is reported only once
>> >> > /usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1345: error: for each
>> >> > function it appears in.)
>> >> > make: *** Error 1
>> >> >
>> >>
>> >> same error on opensolaris (using gnu tools)
>> >>
>> >>
>> >> --
>> >> O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
>> >
>> >
>> >
>> > --
>> > 孙绍轩 Yorgo Sun
>> >
>> >
>>
>
>
>
> --
> 孙绍轩 Yorgo Sun
>
>
Re: PHP-FPM Patch for 5.2.10 is available
June 20, 2009 04:08PM
Disregard this. For some reason it was missing when I tried a vanilla build too.
I think it was due to some extra spacing in my shell script, of all reasons.

On Sat, Jun 20, 2009 at 11:40 AM, Michael Shadle <mike503@gmail.com> wrote:
>
> Oddly enough when trying this I keep getting a missing config.sub file.
> Total failure when trying to buildconf --force because of it. Hrm.
>
> On Fri, Jun 19, 2009 at 7:02 PM, Yorgo Sun <yorgosun@gmail.com> wrote:
>>
>> I've compiled one and testing. everything are fine currently.
>> I just tell all of you what I did. and we can test it together.
>> It's only two file can't patch 5.2.8's patch correct: ./configure and ./sapi/cgi/fastcgi.c
>> for the configure file, it can't patched correct because two of lines are different with 5.2.8 and 5.2.10 original source code. these lines just want to output some message, so it's safe to modify that code.
>> the patch file want to delete some code in fastcgi.c, but that code changed, so patch can't work.
>> You can checkout ./sapi/cgi/fastcgi.c and find some code like these:
>>         if (!tcp) {
>>                 chmod(path, 0777);
>> -       } else {
>> -           char *ip = getenv("FCGI_WEB_SERVER_ADDRS");
>> -           char *cur, *end;
>> -           int n;
>> -
>> -           if (ip) {
>> -               ip = strdup(ip);
>> -               cur = ip;
>> -               n = 0;
>> -               while (*cur) {
>> -                       if (*cur == ',') n++;
>> -                       cur++;
>> -               }
>> -               allowed_clients = malloc(sizeof(in_addr_t) * (n+2));
>> -               n = 0;
>> -               cur = ip;
>> -               while (cur) {
>> -                       end = strchr(cur, ',');
>> -                       if (end) {
>> -                               *end = 0;
>> -                               end++;
>> -                       }
>> -                       allowed_clients[n] = inet_addr(cur);
>> -                       if (allowed_clients[n] == INADDR_NONE) {
>> -                                       fprintf(stderr, "Wrong IP address '%s' in FCGI_WEB_SERVER_ADDRS\n", cur);
>> -                       }
>> -                       n++;
>> -                       cur = end;
>> -               }
>> -               allowed_clients[n] = INADDR_NONE;
>> -                       free(ip);
>> -               }
>>         }
>> Delete all the else segment's code.
>> That's all. you can try to compile it now.
>> the attachment is the patch I made. you can try it directly. every problems can post on this mail and I'll try to check.
>> 2009/6/19 Michael Shadle <mike503@gmail.com>
>>>
>>> Sorry all -
>>>
>>> I'll have to bug who did it on IRC, it compiled for him and I thought
>>> one other person reported success. Welcome to a fresh start :)
>>>
>>> I will personally validate it myself next time too, I did not have
>>> time this time to try.
>>>
>>> So for the moment I will comment the link out (thanks Jim) and say
>>> "proper 5.2.10 patch coming"
>>>
>>> Yorgo: there's two things
>>>
>>> a) if it can compile
>>> b) if it's really actually working properly / not a totally messed up hack
>>>
>>> I want to make sure that it's functional, not just passing the "can it
>>> compile" test :)
>>>
>>> On Fri, Jun 19, 2009 at 7:33 AM, Yorgo Sun<yorgosun@gmail.com> wrote:
>>> > I've patched php-5.2.10 using php-5.2.8-fpm-0.5.10.diff. It only have two
>>> > point of confusions.
>>> > One is php-5.2.10/configure.rej another
>>> > is php-5.2.10/sapi/cgi/fastcgi.c.rej. just move that diff codes into really
>>> > code files. than you can pass the compile.
>>> > 2009/6/19 Edho P Arief <edhoprima@gmail.com>
>>> >>
>>> >> On Fri, Jun 19, 2009 at 8:36 PM, Jim Ohlstein<nginx-forum@nginx.us> wrote:
>>> >> >
>>> >> > Failed to compile on CentOS 5.3 (tried on 32 and 64 bit test servers).
>>> >> >
>>> >> > /usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1341:30: error:
>>> >> > fpm/fpm_autoconf.h: No such file or directory
>>> >> > /usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c: In function
>>> >> > 'zm_info_cgi':
>>> >> > /usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1345: error:
>>> >> > 'PHP_FPM_VERSION' undeclared (first use in this function)
>>> >> > /usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1345: error: (Each
>>> >> > undeclared identifier is reported only once
>>> >> > /usr/local/src/php-5.2.10/sapi/cgi/cgi_main.c:1345: error: for each
>>> >> > function it appears in.)
>>> >> > make: ***  Error 1
>>> >> >
>>> >>
>>> >> same error on opensolaris (using gnu tools)
>>> >>
>>> >>
>>> >> --
>>> >> O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
>>> >
>>> >
>>> >
>>> > --
>>> > 孙绍轩 Yorgo Sun
>>> >
>>> >
>>
>>
>>
>> --
>> 孙绍轩 Yorgo Sun
>>
>
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 141
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready