Welcome! Log In Create A New Profile

Advanced

Unit 1.0 release

Posted by Valentin V. Bartenev 
Valentin V. Bartenev
Unit 1.0 release
April 12, 2018 08:40PM
Hello,

I'm happy to congratulate you on International Day of Human Space Flight
and glad to announce the release of NGINX Unit 1.0.

Changes with Unit 1.0 12 Apr 2018

*) Change: configuration object moved into "/config/" path.

*) Feature: basic access logging.

*) Bugfix: 503 error occurred if Go application did not write response
header or body.

*) Bugfix: Ruby applications that use encoding conversions might not
work.

*) Bugfix: various stability issues.


With this release Unit ends its beta period. If you wish to know more
about the project and our plans, please read the announcement blog post:

- https://www.nginx.com/blog/nginx-unit-1-0-released/

wbr, Valentin V. Bartenev

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Congratulations to the whole team for reaching the release 1.0 milestone!

I'm trying to build Unit on Gentoo Linux, and while module configs for
Python and Perl work as expected, I'm struggling with the PHP module:

$ ./configure php --config=/usr/lib64/php7.1/bin/php-config
configuring PHP module
checking for PHP ... found
+ PHP SAPI: [cli fpm apache2handler]
checking for PHP embed SAPI ... not found

Here is the content of build/autoconf.err:

configuring PHP module ...
checking for PHP ...
7.1.16
----------------------------------------
checking for PHP embed SAPI
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lphp7
collect2: error: ld returned 1 exit status
----------

#include <php.h>
#include <php_main.h>

int main() {
php_request_startup();
return 0;
}
----------
cc -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wmissing-prototypes
-Werror -g -I/usr/lib64/php7.1/include/php -I/usr/lib64/php7.1/include/php/main -I/usr/lib64/php7.1/include/php/TSRM
-I/usr/lib64/php7.1/include/php/Zend -I/usr/lib64/php7.1/include/php/ext -I/usr/lib64/php7.1/include/php/ext/date/lib -o
build/autotest build/autotest.c -lphp7
----------

A search turned up https://github.com/nginx/unit/issues/47 but I am not
sure if/how this applies to my issue and what to do next?

-Ralph
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
> On 13 Apr 2018, at 13:14, Ralph Seichter <[email protected]> wrote:
>
> Congratulations to the whole team for reaching the release 1.0 milestone!
>
> I'm trying to build Unit on Gentoo Linux, and while module configs for
> Python and Perl work as expected, I'm struggling with the PHP module:
>
> $ ./configure php --config=/usr/lib64/php7.1/bin/php-config
> configuring PHP module
> checking for PHP ... found
> + PHP SAPI: [cli fpm apache2handler]
> checking for PHP embed SAPI ... not found

PHP package was built without embed SAPI support.
Otherwise it shows something like this:
+ PHP SAPI: [cli fpm embed apache2handler]

> Here is the content of build/autoconf.err:
>
> configuring PHP module ...
> checking for PHP ...
> 7.1.16
> ----------------------------------------
> checking for PHP embed SAPI
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lphp7
> collect2: error: ld returned 1 exit status
> ----------
>
> #include <php.h>
> #include <php_main.h>
>
> int main() {
> php_request_startup();
> return 0;
> }
> ----------
> cc -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wmissing-prototypes
> -Werror -g -I/usr/lib64/php7.1/include/php -I/usr/lib64/php7.1/include/php/main -I/usr/lib64/php7.1/include/php/TSRM
> -I/usr/lib64/php7.1/include/php/Zend -I/usr/lib64/php7.1/include/php/ext -I/usr/lib64/php7.1/include/php/ext/date/lib -o
> build/autotest build/autotest.c -lphp7
> ----------
>
> A search turned up https://github.com/nginx/unit/issues/47 but I am not
> sure if/how this applies to my issue and what to do next?

This is different issue.


--
Igor Sysoev
http://nginx.com

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
On 13.04.18 12:52, Igor Sysoev wrote:

> PHP package was built without embed SAPI support.
> Otherwise it shows something like this:
> + PHP SAPI: [cli fpm embed apache2handler]

Thanks, Igor. I have rebuilt PHP 7.1 with the following USE flags:

# /etc/portage/package.use/php
dev-lang/php apache2 embed fpm curl gd intl ldap mysql mysqli \
pdo sockets xmlreader xmlwriter xslt zip

Although 'embed' is now listed, I still see the error when attempting
to configure the PHP module:

$ ./configure php --config=/usr/lib64/php7.1/bin/php-config
configuring PHP module
checking for PHP ... found
+ PHP SAPI: [embed cli fpm apache2handler]
checking for PHP embed SAPI ... not found

-Ralph

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
> On 13 Apr 2018, at 14:45, Ralph Seichter <[email protected]> wrote:
>
> On 13.04.18 12:52, Igor Sysoev wrote:
>
>> PHP package was built without embed SAPI support.
>> Otherwise it shows something like this:
>> + PHP SAPI: [cli fpm embed apache2handler]
>
> Thanks, Igor. I have rebuilt PHP 7.1 with the following USE flags:
>
> # /etc/portage/package.use/php
> dev-lang/php apache2 embed fpm curl gd intl ldap mysql mysqli \
> pdo sockets xmlreader xmlwriter xslt zip
>
> Although 'embed' is now listed, I still see the error when attempting
> to configure the PHP module:
>
> $ ./configure php --config=/usr/lib64/php7.1/bin/php-config
> configuring PHP module
> checking for PHP ... found
> + PHP SAPI: [embed cli fpm apache2handler]
> checking for PHP embed SAPI ... not found


Could you show the last lines from build/autoconf.err relevant to PHP?


--
Igor Sysoev
http://nginx.com

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
On 13.04.2018 14:49, Igor Sysoev wrote:

>> $ ./configure php --config=/usr/lib64/php7.1/bin/php-config
>> configuring PHP module
>> checking for PHP ... found
>> + PHP SAPI: [embed cli fpm apache2handler]
>> checking for PHP embed SAPI ... not found
>
> Could you show the last lines from build/autoconf.err relevant to PHP?

Sure, here you go again. I only added word-wrapping:

----------
configuring PHP module ...
checking for PHP ...
7.1.16
----------------------------------------
checking for PHP embed SAPI
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/../../../../x86_64-pc-linux-gnu/bin/ld:
cannot find -lphp7
collect2: error: ld returned 1 exit status
----------

#include <php.h>
#include <php_main.h>

int main() {
php_request_startup();
return 0;
}
----------

cc -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra
-Wno-unused-parameter -Wwrite-strings -Wmissing-prototypes -Werror -g
-I/usr/lib64/php7.1/include/php -I/usr/lib64/php7.1/include/php/main
-I/usr/lib64/php7.1/include/php/TSRM
-I/usr/lib64/php7.1/include/php/Zend -I/usr/lib64/php7.1/include/php/ext
-I/usr/lib64/php7.1/include/php/ext/date/lib -o build/autotest
build/autotest.c -lphp7
----------

I've placed a full console log of the steps I've taken and the results
displayed here: https://pastebin.com/ys2zWqnD (one week expiry).

-Ralph
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
> On 13 Apr 2018, at 17:23, Ralph Seichter <[email protected]> wrote:
>
> On 13.04.2018 14:49, Igor Sysoev wrote:
>
>>> $ ./configure php --config=/usr/lib64/php7.1/bin/php-config
>>> configuring PHP module
>>> checking for PHP ... found
>>> + PHP SAPI: [embed cli fpm apache2handler]
>>> checking for PHP embed SAPI ... not found
>>
>> Could you show the last lines from build/autoconf.err relevant to PHP?
>
> Sure, here you go again. I only added word-wrapping:
>
> ----------
> configuring PHP module ...
> checking for PHP ...
> 7.1.16
> ----------------------------------------
> checking for PHP embed SAPI
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/../../../../x86_64-pc-linux-gnu/bin/ld:
> cannot find -lphp7
> collect2: error: ld returned 1 exit status
> ----------
>
> #include <php.h>
> #include <php_main.h>
>
> int main() {
> php_request_startup();
> return 0;
> }
> ----------
>
> cc -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra
> -Wno-unused-parameter -Wwrite-strings -Wmissing-prototypes -Werror -g
> -I/usr/lib64/php7.1/include/php -I/usr/lib64/php7.1/include/php/main
> -I/usr/lib64/php7.1/include/php/TSRM
> -I/usr/lib64/php7.1/include/php/Zend -I/usr/lib64/php7.1/include/php/ext
> -I/usr/lib64/php7.1/include/php/ext/date/lib -o build/autotest
> build/autotest.c -lphp7
> ----------
>
> I've placed a full console log of the steps I've taken and the results
> displayed here: https://pastebin.com/ys2zWqnD (one week expiry).

On Gentoo you should also use --lib-path:

../configure php --config=/usr/lib64/php7.1/bin/php-config
--lib-path=/usr/lib64/php7.1/lib64


--
Igor Sysoev
http://nginx.com

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
On 13.04.2018 16:40, Igor Sysoev wrote:

> On Gentoo you should also use --lib-path

Thank you, Igor! The following works on my Gentoo test server:

./configure php --config=/usr/lib64/php7.1/bin/php-config --lib-path=/usr/lib64/php7.1/lib64

I think it would be worth mentioning this particular detail in
https://unit.nginx.org/installation/#configuring-sources .

-Ralph

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
> On 13 Apr 2018, at 18:07, Ralph Seichter <[email protected]> wrote:
>
> On 13.04.2018 16:40, Igor Sysoev wrote:
>
>> On Gentoo you should also use --lib-path
>
> Thank you, Igor! The following works on my Gentoo test server:
>
> ./configure php --config=/usr/lib64/php7.1/bin/php-config --lib-path=/usr/lib64/php7.1/lib64
>
> I think it would be worth mentioning this particular detail in
> https://unit.nginx.org/installation/#configuring-sources .

Almost the same example is here:
https://unit.nginx.org/installation/#configuring-php-modules


--
Igor Sysoev
http://nginx.com

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
On 13.04.18 17:12, Igor Sysoev wrote:

> > I think it would be worth mentioning this particular detail in
> > https://unit.nginx.org/installation/#configuring-sources .
>
> Almost the same example is here:
> https://unit.nginx.org/installation/#configuring-php-modules

I should probably have been more specific. ;-) What I meant with "this
particular detail" is that specifying --lib-path is apparently required
with Unit version 1.0 on Gentoo Linux, even though lib-path is optional
per se.

-Ralph

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Sorry, only registered users may post in this forum.

Click here to login