Comments (2)
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.
Current build works fine, all tests are passing on PHP 7.3
from pecl-memcache.
Related Issues (20)
- Memory Leak with 4.0.5.3 (PHP 7.4)
- get() can return invalid values after a PHP OOM HOT 1
- Using repcached for session slows down php module loading with version 8.2. (PHP 8.2)
- Creation of dynamic property Memcache::$connection is deprecated (in PHP 8.2)
- DLL available to download HOT 1
- Provide a getResultCode() to check if the most recent memcache operation had an error?
- Allow overriding the hardcoded retry timeout of 15 in php.ini for connect, as well as for connect/memcache_pconnect calls? HOT 5
- PHP 8 HOT 11
- php8 windows build HOT 4
- Session Redundancy with Failover doesn't work on PHP7 HOT 7
- Idea: Support alternate serializers such as igbinary, msgpack, etc for arrays/objects
- PECL install not receiving -D --with-zlib-dir=/path/ option
- Test 035 fails after update to PHP 8.1 HOT 1
- Why is 3.x beta?
- Tag 3.0.7
- 3.0.8 tests fail because connect.inc is missing
- Unable to compile on Freebsd / PHP 7.4
- v8.0 on php8.1 showing as 4.0.5.2 on phpinfo() HOT 2
- 4.0.5.3 and 8.0.1 missing on pecl HOT 3
- cpu high load with php8 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pecl-memcache.