pecl-memcache icon indicating copy to clipboard operation
pecl-memcache copied to clipboard

PHP 8

Open faca5 opened this issue 3 years ago • 7 comments

Hello.

I got errors:

Command: make

Errors:

NON_BLOCKING_IO_php80/php7/memcache.c:43:2: error: initializer element is not constant

...
te: expected 'struct zend_object *' but argument is of type 'stru
...

warning: passing argument 2 of 'zend_read_property' from incompatible pointer type [enabled by 

Thank you.

faca5 avatar Dec 03 '20 17:12 faca5

Used to build just released 8.0 version and getting

php8 --ri memcache

memcache

memcache support => enabled
Version => 4.0.5.2
Revision => $Revision$

Directive => Local Value => Master Value
memcache.allow_failover => 1 => 1
memcache.max_failover_attempts => 20 => 20
memcache.default_port => 11211 => 11211
memcache.chunk_size => 32768 => 32768
memcache.protocol => ascii => ascii
memcache.hash_strategy => consistent => consistent
memcache.hash_function => crc32 => crc32
memcache.redundancy => 1 => 1
memcache.session_redundancy => 2 => 2
memcache.compress_threshold => 20000 => 20000
memcache.lock_timeout => 15 => 15
memcache.session_prefix_host_key => Off => Off
memcache.session_prefix_host_key_remove_www => On => On
memcache.session_prefix_host_key_remove_subdomain => Off => Off
memcache.session_prefix_static_key => no value => no value
memcache.session_save_path => no value => no value
memcache.prefix_host_key => Off => Off
memcache.prefix_host_key_remove_www => On => On
memcache.prefix_host_key_remove_subdomain => Off => Off
memcache.prefix_static_key => no value => no value

andypost avatar Dec 06 '20 17:12 andypost

The issue is https://github.com/websupport-sk/pecl-memcache/blob/NON_BLOCKING_IO_php8/src/php_memcache.h#L70

#80 the related

andypost avatar Dec 06 '20 17:12 andypost

Hopefully resolved now, sorry about that

tomassrnka avatar Dec 06 '20 19:12 tomassrnka

FYI packaged to Alpinelinux testing repo https://pkgs.alpinelinux.org/packages?name=php8-pecl-memcache&branch=edge it skips few tests because it tricky to run enough services

andypost avatar Dec 06 '20 20:12 andypost

Thank you.

faca5 avatar Dec 07 '20 06:12 faca5

Perhaps this should be closed due to the unhelpful issue title as the module supporting PHP 8.0 is already released.

glensc avatar Dec 27 '21 19:12 glensc

Perhaps this should be closed due to the unhelpful issue title as the module supporting PHP 8.0 is already released.

https://github.com/nono303/PHP-memcache-dll for Windows binaries

nono303 avatar Dec 28 '21 13:12 nono303

i disagree that the PHP8 issue is completed, because win32/php_stdint.h is still there in the main branch. Of course you can patch it before building on Windows like @nono303 and I am doing, but that is not as it should be.

Jan-E avatar Apr 30 '23 11:04 Jan-E

@Jan-E is this the patch that makes the extension build & work on windows? https://github.com/nono303/PHP-memcache-dll/blob/master/php82.patch

Unfortunately I have no idea how to test it, but if there is PR I can merge it and tag it with win support

tomassrnka avatar Apr 30 '23 12:04 tomassrnka

I am not sure if that is complete. PHP 7.0 up until 7.4 still had win32/php_stdint,h on board, which worked fine. Better to use that than rely on a stdint.h provided by VC14 or VC15. I will test and supply a complete patch later. Might take some time, because I am now going to visit my mother in Rotterdam. Respectable age: she turms 96 on May 3rd.

Jan-E avatar Apr 30 '23 12:04 Jan-E

https://github.com/websupport-sk/pecl-memcache/pull/110 fixes building from at least PHP 7.2. I did not try PHP 7.0 and 7.1 yet.

Jan-E avatar May 02 '23 06:05 Jan-E