Closed mindaugasvcs closed 2 years ago
You need to install the extension for PHP 8 as well, you can't simply use the same .so
file. The extension is running fine on PHP 8.1.
Can you shed some light on installing this almost non-existent php extension on CentOS 8? I tried to compile it from source with no success. git clone https://github.com/bwoebi/php-uv.git cd php-uv phpize ./configure -> this step fails, version conflict. make make install
checking for libuv... checking for uv_version in -luv... no configure: error: wrong uv library version or library not found
Installed Packages Name : libuv Epoch : 1 Version : 1.41.1 Release : 1.el8_4 Architecture : x86_64 Size : 396 k Source : libuv-1.41.1-1.el8_4.src.rpm Repository : @System From repo : appstream Summary : libuv is a multi-platform support library with a focus on asynchronous I/O. URL : http://libuv.org/ License : MIT and BSD and ISC Description : libuv is a multi-platform support library with a focus on asynchronous I/O
Well, I managed to install this extension for PHP 8, but something is still not quite right..
At least in README.md file you could mention that libuv-devel needs to be installed on target OS to compile and install this extension. On CentOS 8 in /etc/yum.repos.d/CentOS-Linux-PowerTools.repo config file enabled must be 1.
Feel free to open a PR with instructions. The package name will be different for different distributions, e.g. Ubuntu uses libuv-dev
IIRC.
Could you shed some more light on what doesn't seem right?
In this version I get error: PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function x{closure}(), 2 passed and exactly 3 expected in x.php:577
It says uv_read_start function's second parameter is a callback/closure but the callback/closure only gets 2 args, when 3 args expected when called :/
Did not have any problems before.
In original libuv documentation this callback is described as: typedef void (uv_read_cb)(uv_stream_t stream, ssize_t nread, const uv_buf_t *buf)
buf is a pointer, sometimes invalid so in PHP it should be set to NULL but not skipped entirely.
I guess you've used 0.2.x before, and you're using the master
branch now, which contains some BC breaks.
Very nice to find this out. Only a minor version change in this extension have already introduced breaking changes. May I know the reasons of such changes? Maybe you are planning to release your own documentation?
Something tells me I should have migrated to node.js long time ago, as before, PHP is meant just for Wordpress style web pages. Nothing has really changed :/
The master
branch is an unreleased version which is planned to be released as 0.3.0
eventually. For 0.x
releases, x
is usually considered the major version instead of a minor version.
I'm not sure why this has been changed or what changed. You're free to research that yourself if you want to use an unreleased version. We usually provide changelogs for releases only.
That said, we're actively using the unreleased version, too, but only what's necessary to build libraries in the @amphp organization. I can only recommend to use amphp/byte-stream
instead of using ext-uv
directly.
We might even consider removing parts of ext-uv
that aren't necessary for our purposes in the future, so maintenance becomes easier, as the scope is reduced.
Hi, After upgrade from PHP 7.4 to PHP 8.0 I get this error: PHP Warning: PHP Startup: Unable to load dynamic library 'uv.so' (tried: /usr/lib64/php/modules/uv.so (/usr/lib64/php/modules/uv.so: undefined symbol: zend_internal_type_error), /usr/lib64/php/modules/uv.so.so (/usr/lib64/php/modules/uv.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
ATTENTION! uv.so library file is in the /usr/lib64/php/modules directory!