Giter VIP home page Giter VIP logo

Comments (2)

mhagstrand avatar mhagstrand commented on August 26, 2024

To add a UDP memcached server php-memcached uses the code below:

if (host[0] == '/') { /* unix domain socket */
status = memcached_server_add_unix_socket_with_weight(m_obj->memc, host, weight);
} else if (memcached_behavior_get(m_obj->memc, MEMCACHED_BEHAVIOR_USE_UDP)) {
status = memcached_server_add_udp_with_weight(m_obj->memc, host, port, weight);
} else {

The function memcached_server_add_udp_with_weight() has been deprecated and does not add the server since libmemcached 1.0.2. You can see that in this diff:

http://bazaar.launchpad.net/~tangent-trunk/libmemcached/1.0/revision/968#libmemcached/hosts.cc

If you use an older version of libmemcached like 0.54 that might be able to solve your problem until a code update is made to php-memcached.

You can see function is deprecated with this code:

setOption(Memcached::OPT_BINARY_PROTOCOL, 1); $b->setOption(Memcached::OPT_USE_UDP, 1); $b->addServer("localhost",11211); echo $b->getResultMessage(); ?>

OUTPUT:
DEPRECATED

If I get some time I might take a stab at fixing this problem.

from php-memcached.

utfqvfhpyygy avatar utfqvfhpyygy commented on August 26, 2024

why the function memcached_server_add_udp_with_weight() has been deprecated ? is it had some performance problem?

from php-memcached.

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.