GithubHelp home page GithubHelp logo

php7.3 error about pecl-memcache HOT 2 CLOSED

websupport-sk avatar websupport-sk commented on June 1, 2024
php7.3 error

from pecl-memcache.

Comments (2)

Joungkyun avatar Joungkyun commented on June 1, 2024

use follow patch and attache patch file with zip archive

diff -ruNp memcache.org/memcache.c memcache/memcache.c
--- memcache.org/memcache.c	2017-02-24 21:03:57.000000000 +0900
+++ memcache/memcache.c	2019-01-12 01:32:55.317420944 +0900
@@ -1943,7 +1943,11 @@ static void php_mmc_connect (INTERNAL_FU
 		object_init_ex(return_value, memcache_class_entry_ptr);
 		list_res = zend_register_resource(pool, le_memcache_pool);
 		add_property_resource(return_value, "connection", list_res);
+#if PHP_VERSION_ID < 70300
 		GC_REFCOUNT(list_res)++;
+#else
+		GC_ADDREF(list_res);
+#endif
 	}
 	else if ((zv=zend_hash_str_find(Z_OBJPROP_P(mmc_object), "connection", sizeof("connection")-1)) != NULL) {
 		pool = zend_fetch_resource_ex(zv, "connection", le_memcache_pool);
@@ -1962,7 +1966,11 @@ static void php_mmc_connect (INTERNAL_FU
 
 		list_res = zend_register_resource(pool, le_memcache_pool);
 		add_property_resource(mmc_object, "connection", list_res);
+#if PHP_VERSION_ID < 70300
 		GC_REFCOUNT(list_res)++;
+#else
+		GC_ADDREF(list_res);
+#endif
 
 		RETURN_TRUE;
 	}
@@ -2054,7 +2062,11 @@ PHP_FUNCTION(memcache_add_server)
 		pool = mmc_pool_new();
 		list_res = zend_register_resource(pool, le_memcache_pool);
 		add_property_resource(mmc_object, "connection", list_res);
+#if PHP_VERSION_ID < 70300
 		GC_REFCOUNT(list_res)++;
+#else
+		GC_ADDREF(list_res);
+#endif
 	}
 	else {
 		pool = zend_fetch_resource_ex(connection, "connection", le_memcache_pool);
@@ -2200,7 +2212,11 @@ mmc_t *mmc_find_persistent(zend_string *
 		mmc = mmc_server_new(host, port, 1, timeout, retry_interval);
 		le = zend_register_resource(mmc, le_pmemcache);
 
+#if PHP_VERSION_ID < 70300
 		GC_REFCOUNT(le) = 1;
+#else
+		GC_SET_REFCOUNT(le,1);
+#endif
 
 		/* register new persistent connection */
 		if (zend_hash_str_update_mem(&EG(persistent_list), hash_key, hash_key_len, le, sizeof(*le)) == NULL) {
@@ -2217,7 +2233,11 @@ mmc_t *mmc_find_persistent(zend_string *
 		mmc = mmc_server_new(host, port, 1, timeout, retry_interval);
 		le->type = le_pmemcache;
 		le->ptr  = mmc;
+#if PHP_VERSION_ID < 70300
 		GC_REFCOUNT(le) = 1;
+#else
+		GC_SET_REFCOUNT(le,1);
+#endif
 
 		/* register new persistent connection */
 		if (zend_hash_str_update_mem(&EG(persistent_list), hash_key, hash_key_len, le, sizeof(*le)) == NULL) {

memcache-2.2.7-annyung-php73.patch.zip

from pecl-memcache.

tomassrnka avatar tomassrnka commented on June 1, 2024

Current build works fine, all tests are passing on PHP 7.3

from pecl-memcache.

Related Issues (20)

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.