GithubHelp home page GithubHelp logo

pmjones / ext-request Goto Github PK

View Code? Open in Web Editor NEW
42.0 42.0 5.0 737 KB

Server-side request and response objects for PHP.

Home Page: https://pecl.php.net/request/

License: MIT License

Makefile 0.06% Shell 1.97% M4 0.25% JavaScript 0.14% C 54.39% C++ 6.06% PHP 36.45% Dockerfile 0.67%

ext-request's People

Contributors

jan-e avatar jbboehr avatar pmjones avatar remicollet avatar sergeyklay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ext-request's Issues

Não consigo fazer funcionar a extensão

Consegui instalar a extensão, mas quando executo :
$request = new SapiRequest($_POST); var_dump($request);
para testar, diz que não existe essa classe.

A versão do meu PHP é a 7.2 .

Captura de tela de 2020-04-16 10-37-03

ServerResponseSender is tightly coupled to ServerResponse

Sorry this slipped my mind. I almost made a barebones user-land implementation of ServerResponseInterface for the test suite but I figured "what could possibly go wrong."

Well... ServerResponseSender sends the response by reading the properties (not using the methods) of the ServerResponse class, so ServerResponseSender needs to be refactored.

Update php-request to match

First off, kudos for trying again to get this added into the core. I have my doubts if it will be accepted but hope springs eternal.

I would suggest updating your userland php-request project to match as closely as possible. The idea is that it would be easier to install and test than an actual C extension. Might help with the acceptance process.

I know that not everything can transfer easily especially immutability but as long as it is close then it would be okay. Seeing exactly what it would take to, for example, have the Symfony Request object extend from this would be interesting.

Add ServerResponseInterface fluency

I have been told that adding fluency to these ServerResponseInterface methods may ease adoption by existing vendors and consumers:

  • setVersion(string $version) : void
  • setHeader(string $label, string $value) : void
  • addHeader(string $label, string $value) : void
  • unsetHeader(string $label) : void
  • unsetHeaders() : void
  • unsetCookie(string $name) : void
  • unsetCookies() : void
  • setHeaderCallbacks(array $callbacks) : void
  • addHeaderCallback(callable $callback) : void
  • setContent(mixed $content) : void
  • setCookie(...) : bool
  • setRawCookie(...) : bool

The methods should have a return typehint of ServerResponseInterface; the ServerResponse implementation should return $this.

ServerResponseSender: add support for generators/iterable

I noticed ServerResponseSender doesn't seem to support generators as content.

$content = new class () {
    public function __invoke(): iterable
    {
        yield 'Hello ';
        yield 'world!';
    }
};

$response = new ServerResponse();
$response->setContent($content);

$sender = new ServerResponseSender();
$sender->send($response); // error: Object of class Generator could not be converted to string

My expectation would be no error in this case and "Hello world!" as the content. Is this a deliberate omission in the specification?

make warnings and test fails php 7.2

here my compile log :

/bin/bash /tmp/request-1.0.0b2/libtool --mode=compile cc  -I. -I/tmp/request-1.0.0b2 -DPHP_ATOM_INC -I/tmp/request-1.0.0b2/include -I/tmp/request-1.0.0b2/main -I/tmp/request-1.0.0b2 -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/request-1.0.0b2/php_request.c -o php_request.lo 
libtool: compile:  cc -I. -I/tmp/request-1.0.0b2 -DPHP_ATOM_INC -I/tmp/request-1.0.0b2/include -I/tmp/request-1.0.0b2/main -I/tmp/request-1.0.0b2 -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/request-1.0.0b2/php_request.c  -fPIC -DPIC -o .libs/php_request.o
/bin/bash /tmp/request-1.0.0b2/libtool --mode=compile cc  -I. -I/tmp/request-1.0.0b2 -DPHP_ATOM_INC -I/tmp/request-1.0.0b2/include -I/tmp/request-1.0.0b2/main -I/tmp/request-1.0.0b2 -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/request-1.0.0b2/parsers.c -o parsers.lo 
libtool: compile:  cc -I. -I/tmp/request-1.0.0b2 -DPHP_ATOM_INC -I/tmp/request-1.0.0b2/include -I/tmp/request-1.0.0b2/main -I/tmp/request-1.0.0b2 -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/request-1.0.0b2/parsers.c  -fPIC -DPIC -o .libs/parsers.o
parsers.re: In function 'server_request_parser_forwarded_assignment':
parsers.re:508:24: warning: passing argument 1 of 'php_strtolower' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
         php_strtolower(left.yytext, left.yyleng);
                        ^~~~
In file included from parsers.re:10:0:
/usr/include/php/20170718/ext/standard/php_string.h:124:14: note: expected 'char *' but argument is of type 'const YYCTYPE * {aka const unsigned char *}'
 PHPAPI char *php_strtolower(char *s, size_t len);
              ^~~~~~~~~~~~~~
/bin/bash /tmp/request-1.0.0b2/libtool --mode=compile cc  -I. -I/tmp/request-1.0.0b2 -DPHP_ATOM_INC -I/tmp/request-1.0.0b2/include -I/tmp/request-1.0.0b2/main -I/tmp/request-1.0.0b2 -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/request-1.0.0b2/serverresponse.c -o serverresponse.lo 
libtool: compile:  cc -I. -I/tmp/request-1.0.0b2 -DPHP_ATOM_INC -I/tmp/request-1.0.0b2/include -I/tmp/request-1.0.0b2/main -I/tmp/request-1.0.0b2 -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/request-1.0.0b2/serverresponse.c  -fPIC -DPIC -o .libs/serverresponse.o
/tmp/request-1.0.0b2/serverresponse.c: In function 'zim_ServerResponse_runHeaderCallbacks':
/tmp/request-1.0.0b2/serverresponse.c:882:24: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
             fci.params = &params;
                        ^
In file included from /usr/include/php/20170718/main/php.h:40:0,
                 from /tmp/request-1.0.0b2/serverresponse.c:6:
/tmp/request-1.0.0b2/serverresponse.c: In function 'zim_ServerResponse_sendContent':
/tmp/request-1.0.0b2/serverresponse.c:1086:86: warning: passing argument 5 of '_call_user_function_ex' from incompatible pointer type [-Wincompatible-pointer-types]
         call_user_function(&Z_OBJCE_P(tmp)->function_table, tmp, &func_name, &rv, 1, &params);
                                                                                      ^
/usr/include/php/20170718/Zend/zend_API.h:492:73: note: in definition of macro 'call_user_function'
  _call_user_function_ex(object, function_name, retval_ptr, param_count, params, 1)
                                                                         ^~~~~~
/usr/include/php/20170718/Zend/zend_API.h:489:14: note: expected 'zval * {aka struct _zval_struct *}' but argument is of type 'zval (*)[1] {aka struct _zval_struct (*)[1]}'
 ZEND_API int _call_user_function_ex(zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[], int no_separation);
              ^~~~~~~~~~~~~~~~~~~~~~
/bin/bash /tmp/request-1.0.0b2/libtool --mode=compile cc  -I. -I/tmp/request-1.0.0b2 -DPHP_ATOM_INC -I/tmp/request-1.0.0b2/include -I/tmp/request-1.0.0b2/main -I/tmp/request-1.0.0b2 -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/request-1.0.0b2/serverrequest.c -o serverrequest.lo 
libtool: compile:  cc -I. -I/tmp/request-1.0.0b2 -DPHP_ATOM_INC -I/tmp/request-1.0.0b2/include -I/tmp/request-1.0.0b2/main -I/tmp/request-1.0.0b2 -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/request-1.0.0b2/serverrequest.c  -fPIC -DPIC -o .libs/serverrequest.o
/tmp/request-1.0.0b2/serverrequest.c: In function 'server_request_copy_global':
/tmp/request-1.0.0b2/serverrequest.c:595:37: warning: passing argument 1 of 'zend_is_auto_global_str' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
             zend_is_auto_global_str(glob_key, glob_key_length);
                                     ^~~~~~~~
In file included from /usr/include/php/20170718/Zend/zend_modules.h:26:0,
                 from /usr/include/php/20170718/Zend/zend_API.h:27,
                 from /usr/include/php/20170718/main/php.h:40,
                 from /tmp/request-1.0.0b2/serverrequest.c:8:
/usr/include/php/20170718/Zend/zend_compile.h:821:20: note: expected 'char *' but argument is of type 'const char *'
 ZEND_API zend_bool zend_is_auto_global_str(char *name, size_t len);
                    ^~~~~~~~~~~~~~~~~~~~~~~
/tmp/request-1.0.0b2/serverrequest.c: In function 'server_request_set_forwarded':
/tmp/request-1.0.0b2/serverrequest.c:643:9: warning: implicit declaration of function 'server_request_parse_forwarded'; did you mean 'server_request_parse_x_forwarded'? [-Wimplicit-function-declaration]
         server_request_parse_forwarded(&forwarded, Z_STRVAL_P(tmp), Z_STRLEN_P(tmp));
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         server_request_parse_x_forwarded
/bin/bash /tmp/request-1.0.0b2/libtool --mode=link cc -DPHP_ATOM_INC -I/tmp/request-1.0.0b2/include -I/tmp/request-1.0.0b2/main -I/tmp/request-1.0.0b2 -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -o request.la -export-dynamic -avoid-version -prefer-pic -module -rpath /tmp/request-1.0.0b2/modules  php_request.lo parsers.lo serverresponse.lo serverrequest.lo 
libtool: link: cc -shared  -fPIC -DPIC  .libs/php_request.o .libs/parsers.o .libs/serverresponse.o .libs/serverrequest.o    -g -O2   -Wl,-soname -Wl,request.so -o .libs/request.so
libtool: link: ( cd ".libs" && rm -f "request.la" && ln -s "../request.la" "request.la" )
/bin/bash /tmp/request-1.0.0b2/libtool --mode=install cp ./request.la /tmp/request-1.0.0b2/modules
libtool: install: cp ./.libs/request.so /tmp/request-1.0.0b2/modules/request.so
libtool: install: cp ./.libs/request.lai /tmp/request-1.0.0b2/modules/request.la
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /tmp/request-1.0.0b2/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /tmp/request-1.0.0b2/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

Build complete.
Don't forget to run 'make test'.

Installing shared extensions:     /usr/lib/php/20170718/
root@746209f08f68:/tmp/request-1.0.0b2# make test
/bin/bash /tmp/request-1.0.0b2/libtool --mode=install cp ./request.la /tmp/request-1.0.0b2/modules
libtool: install: cp ./.libs/request.so /tmp/request-1.0.0b2/modules/request.so
libtool: install: cp ./.libs/request.lai /tmp/request-1.0.0b2/modules/request.la
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /tmp/request-1.0.0b2/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /tmp/request-1.0.0b2/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

Build complete.
Don't forget to run 'make test'.


=====================================================================
PHP         : /usr/bin/php7.2 
PHP_SAPI    : cli
PHP_VERSION : 7.2.3-1ubuntu1
ZEND_VERSION: 3.2.0
PHP_OS      : Linux - Linux 746209f08f68 4.15.0-13-generic #14-Ubuntu SMP Sat Mar 17 13:44:27 UTC 2018 x86_64
INI actual  : /tmp/request-1.0.0b2/tmp-php.ini
More .INIs  :   
---------------------------------------------------------------------
PHP         : /usr/bin/phpdbg7.2 
PHP_SAPI    : phpdbg
PHP_VERSION : 7.2.3-1ubuntu1
ZEND_VERSION: 3.2.0
PHP_OS      : Linux - Linux 746209f08f68 4.15.0-13-generic #14-Ubuntu SMP Sat Mar 17 13:44:27 UTC 2018 x86_64
INI actual  : /tmp/request-1.0.0b2/tmp-php.ini
More .INIs  : 
---------------------------------------------------------------------
CWD         : /tmp/request-1.0.0b2
Extra dirs  : 
VALGRIND    : Not used
=====================================================================
TIME START 2018-04-07 09:30:51
=====================================================================
PASS request phpinfo [tests/phpinfo.phpt] 
PASS ServerRequest::__clone [tests/request/__clone.phpt] 
PASS ServerRequest::__construct [tests/request/__construct.phpt] 
PASS ServerRequest::__get extension indirect modification [tests/request/__get-extension.phpt] 
SKIP ServerRequest::__get userland indirect modification [tests/request/__get-userland.phpt] reason:  
PASS ServerRequest::__get [tests/request/__get.phpt] 
PASS ServerRequest::__isset [tests/request/__isset.phpt] 
PASS ServerRequest::__set [tests/request/__set.phpt] 
PASS ServerRequest::__unset [tests/request/__unset.phpt] 
PASS ServerRequest::$accept [tests/request/accept.phpt] 
PASS ServerRequest::$acceptCharset [tests/request/acceptCharset.phpt] 
PASS ServerRequest::$acceptEncoding [tests/request/acceptEncoding.phpt] 
PASS ServerRequest::$acceptLanguage [tests/request/acceptLanguage.phpt] 
PASS ServerRequest - basic auth [tests/request/auth_basic.phpt] 
PASS ServerRequest - digest auth [tests/request/auth_digest.phpt] 
PASS ServerRequest - auto_globals_jit [tests/request/auto_globals_jit.phpt] 
PASS ServerRequest::$content (cgi) [tests/request/content1.phpt] 
PASS ServerRequest::$content (cli) [tests/request/content2.phpt] 
PASS ServerRequest::$contentLength [tests/request/contentLength.phpt] 
PASS ServerRequest::$contentMd5 [tests/request/contentMd5.phpt] 
PASS ServerRequest::$contentType [tests/request/contentType.phpt] 
PASS ServerRequest::$cookie [tests/request/cookie.phpt] 
PASS ServerRequest::$env [tests/request/env.phpt] 
PASS ServerRequest::$files [tests/request/files.phpt] 
PASS ServerRequest::$forwarded (etc.) [tests/request/forward.phpt] 
PASS ServerRequest::$get [tests/request/get.phpt] 
PASS ServerRequest::$headers [tests/request/headers.phpt] 
PASS ServerRequest - inheritance [tests/request/inheritance.phpt] 
PASS ServerRequest::$method [tests/request/method.phpt] 
PASS ServerRequest::parseAccept [tests/request/parseAccept.phpt] 
PASS ServerRequest::parseContentType [tests/request/parseContentType.phpt] 
PASS ServerRequest::parseDigestAuth [tests/request/parseDigestAuth.phpt] 
PASS ServerRequest::$post [tests/request/post.phpt] 
PASS ServerRequest - superglobals are copied [tests/request/superglobals-are-copied.phpt] 
PASS ServerRequest::$uploads (complex) [tests/request/uploads-complex.phpt] 
PASS ServerRequest::$uploads (real) [tests/request/uploads-real.phpt] 
PASS ServerRequest::$uploads (trivial) [tests/request/uploads-trivial.phpt] 
PASS ServerRequest::$url [tests/request/url.phpt] 
PASS ServerRequest - variables_order [tests/request/variables_order.phpt] 
PASS ServerRequest::withInput [tests/request/withInput.phpt] 
PASS ServerRequest::withParam [tests/request/withParam.phpt] 
PASS ServerRequest::withParams [tests/request/withParams.phpt] 
PASS ServerRequest::withUrl [tests/request/withUrl.phpt] 
PASS ServerRequest::withoutParam [tests/request/withoutParam.phpt] 
PASS ServerRequest::withoutParams [tests/request/withoutParams.phpt] 
PASS ServerRequest::$xhr [tests/request/xhr.phpt] 
PASS ServerResponse::addHeader [tests/response/addHeader.phpt] 
PASS ServerResponse::addHeaderCallback [tests/response/addHeaderCallback.phpt] 
PASS ServerResponse::addHeader (array) [tests/response/addHeader_array.phpt] 
PASS ServerResponse::date [tests/response/date.phpt] 
PASS ServerResponse::date (invalid) [tests/response/date_invalid.phpt] 
PASS ServerResponse::getHeaderCallbacks [tests/response/getHeaderCallbacks.phpt] 
PASS ServerResponse::getStatus [tests/response/getStatus.phpt] 
PASS ServerResponse::getVersion [tests/response/getVersion.phpt] 
PASS ServerResponse::runHeaderCallback [tests/response/runHeaderCallbacks.phpt] 
PASS ServerResponse::sendContent (callable) [tests/response/sendContent_callable.phpt] 
PASS ServerResponse::sendContent (callable return value) [tests/response/sendContent_callableRV.phpt] 
PASS ServerResponse::sendContent (resource) [tests/response/sendContent_resource.phpt] 
PASS ServerResponse::sendContent (string) [tests/response/sendContent_string.phpt] 
PASS ServerResponse::sendCookies [tests/response/sendCookies.phpt] 
PASS ServerResponse::sendHeaders [tests/response/sendHeaders.phpt] 
PASS ServerResponse::sendStatus [tests/response/sendStatus.phpt] 
PASS ServerResponse::setContent [tests/response/setContent.phpt] 
FAIL ServerResponse::setContentDownload [tests/response/setContentDownload.phpt] 
FAIL ServerResponse::setContentResource (not resource) [tests/response/setContentDownload_notResource.phpt] 
FAIL ServerResponse::setContentJson [tests/response/setContentJson.phpt] 
FAIL ServerResponse::setContentJson (failed) [tests/response/setContentJson_failed.phpt] 
PASS ServerResponse::setCookie [tests/response/setCookie.phpt] 
PASS ServerResponse::setHeader [tests/response/setHeader.phpt] 
PASS ServerResponse::setHeader (array) [tests/response/setHeader_array.phpt] 
PASS ServerResponse::setStatus [tests/response/setStatus.phpt] 
PASS ServerResponse::setVersion [tests/response/setVersion.phpt] 
=====================================================================
TIME END 2018-04-07 09:30:52

=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped    :    0
Exts tested     :   15
---------------------------------------------------------------------

Number of tests :   72                71
Tests skipped   :    1 (  1.4%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :    4 (  5.6%) (  5.6%)
Expected fail   :    0 (  0.0%) (  0.0%)
Tests passed    :   67 ( 93.1%) ( 94.4%)
---------------------------------------------------------------------
Time taken      :    1 seconds
=====================================================================

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
ServerResponse::setContentDownload [tests/response/setContentDownload.phpt]
ServerResponse::setContentResource (not resource) [tests/response/setContentDownload_notResource.phpt]
ServerResponse::setContentJson [tests/response/setContentJson.phpt]
ServerResponse::setContentJson (failed) [tests/response/setContentJson_failed.phpt]
=====================================================================

Introduce SapiUpload class

The idea would be to replace each element of SapiRequest::$uploads that uses an array descriptor, with a SapiUpload instance.

The class should look something like this:

class SapiUpload
{
    public /* readonly ?string */ $name;

    public /* readonly ?string */ $name;

    public /* readonly ?int */ $size;

    public /* readonly ?string */ $tmpName;

    public /* readonly ?int */ $error;

    public function __construct(
        ?string $name,
        ?string $type,
        ?int $size,
        ?string $tmpName,
        ?int $error
    ) {
        $this->name = $name;
        $this->type = $type;
        $this->size = $size;
        $this->tmpName = $tmpName;
        $this->error = $error;
    }

    public function move(string $destination) : bool
    {
        return move_uploaded_file($this->tmpName, $destination);
    }
}

And SapiRequest, on building the $uploads array, should retain a new instance of SapiUpload instead of the file array descriptor.

PHP8 Compatibility?

@pmjones I'm not able to install this with PHP 8 via Pecl or manually. Is this a known issue or possibly a bug in the distro I'm using (Alpine 3.13).

Output from Pecl install:

creating libtool
appending configuration tag "CXX" to libtool
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /tmp/pear/temp/pear-build-defaultuserpaiPPL/request-2.0.0/libtool --mode=compile cc -I. -I/tmp/pear/temp/request -I/tmp/pear/temp/pear-build-defaultuserpaiPPL/request-2.0.0/include -I/tmp/pear/temp/pear-build-defaultuserpaiPPL/request-2.0.0/main -I/tmp/pear/temp/request -I/usr/include/php8 -I/usr/include/php8/main -I/usr/include/php8/TSRM -I/usr/include/php8/Zend -I/usr/include/php8/ext -I/usr/include/php8/ext/date/lib  -DHAVE_CONFIG_H  -g -O2    -c /tmp/pear/temp/request/php_request.c -o php_request.lo
mkdir .libs
 cc -I. -I/tmp/pear/temp/request -I/tmp/pear/temp/pear-build-defaultuserpaiPPL/request-2.0.0/include -I/tmp/pear/temp/pear-build-defaultuserpaiPPL/request-2.0.0/main -I/tmp/pear/temp/request -I/usr/include/php8 -I/usr/include/php8/main -I/usr/include/php8/TSRM -I/usr/include/php8/Zend -I/usr/include/php8/ext -I/usr/include/php8/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/request/php_request.c  -fPIC -DPIC -o .libs/php_request.o
(cd /tmp/pear/temp/request;  --no-generation-date -o request_parsers.c request_parsers.re)
/bin/sh: --no-generation-date: not found
make: *** [Makefile:209: /tmp/pear/temp/request/request_parsers.c] Error 127
ERROR: `make' failed

Full install on Alpine:

apk add autoconf automake gcc g++ libstdc++ linux-headers make musl php8 php8-dev php8-pear
pecl8 install request

Let me know if any more info will help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.