hhvm icon indicating copy to clipboard operation
hhvm copied to clipboard

Memcached options e.g. Memcached::OPT_DISTRIBUTION don't work in hiphop (undeclared)

Open joelastpass opened this issue 15 years ago • 2 comments

/* SRC: php/Zend/Cache/Backend/Libmemcached.php line 97 */ void c_Zend_Cache_Backend_Libmemcached::tt___construct(

on this line:

m__options.set(NAMSTR(s_ss1b4eb778, "client"), (VarNR(Array(ArrayInit(3).set(q_Memcached___OPT_DISTRIBUTION, q_Memcached___DISTRIBUTION_CONSISTENT).set(q_Memcached___OPT_HASH, q_Memcached___HASH_MD5).set(q_Memcached___OPT_LIBKETAMA_COMPATIBLE, true).create()))), true);

Basically corresponds to this code:

   // override default client options
    $this->_options['client'] = array(
        Memcached::OPT_DISTRIBUTION         => Memcached::DISTRIBUTION_CONSISTENT,
        Memcached::OPT_HASH                 => Memcached::HASH_MD5,
        Memcached::OPT_LIBKETAMA_COMPATIBLE => true,
    );

/prod/lphiphop-build/cpp/021.cpp: In member function void HPHP::c_Zend_Cache_Backend_Libmemcached::tt___construct(HPHP::Array):\n

/prod/lphiphop-build/cpp/021.cpp:10609: error:q_Memcached___OPT_DISTRIBUTION was not declared in this scope\n

/prod/lphiphop-build/cpp/021.cpp:10609: error: q_Memcached___DISTRIBUTION_CONSISTENT was not declared in this scope\n

/prod/lphiphop-build/cpp/021.cpp:10609: error: q_Memcached___OPT_HASH was not declared in this scope\n

/prod/lphiphop-build/cpp/021.cpp:10609: error: q_Memcached___HASH_MD5 was not declared in this scope\n

/prod/lphiphop-build/cpp/021.cpp:10609: error: q_Memcached___OPT_LIBKETAMA_COMPATIBLE was not declared in this scope\nmake[2]: *** [CMakeFiles/program.dir/cpp/021.cpp.o] Error 1\nmake[2

joelastpass avatar Sep 28 '11 21:09 joelastpass

same bug as with PDO replace "q_Memcached___" (3 _ ) with "q_Memcached$$" (2 $) in .cpp/.h and run make again

karpa13a avatar Sep 29 '11 14:09 karpa13a

We're closing out all bugs older than 2 months. http://www.hiphop-php.com/wp/?p=575

If this is still an issue, please re-open it, and in order of goodness:

  1. Give detailed repro steps
  2. Write a test case in hphp/tests/quick (run it with hphp/tests/run) and send the pull request
  3. Fix it in a pull request

ptarjan avatar May 13 '13 21:05 ptarjan