php-fpm extension listed in phpinfo() fails with "Class not found" - memcached

nginx + php-fpm on CentOS, all compiled from sources.
Adding memcached support, I compiled libmemcached and php "memcached" extension, added a line `php_admin_value[extension]=memcached.so' in the php-fpm config and restarted php-fpm.
Opening a test php with phpinfo() via web server started showing a section about "memcached" extension (screenshot). However attempts to instantiate the class fail with Fatal error: Class 'Memcached' not found.
I also tried installing the php "memcache" (without 'd') extension in the same way: downloading sources, phpize, configure, make, make install. All the same: listed in phpinfo();, "Class not found" fatal error.
What am I doing wrong, and how can I add a compiled extension to the php-fpm?
yum / pecl package managers are not an option currently, as specific versions are required.

You set up seems fine. I have the same set up, except my memcache/memcached are installed by yum. So maybe your memcache/memcached not installed properly. The following link mentions a dependency on zlib-devel.
Fatal error: Class 'Memcache' not found (installed with pecl)

Related

Problem installing Event::Lib with libevent on Mac OSX

I am trying to perform a cpan install of Event::Lib on a Mac OSX 10.15.4. When I first tried to run cpan I found it needed the libevent library. I downloaded, built, and installed that. Now I am getting a number of errors with ev_arg not being defined:
Lib.xs:692:33: error: no member named 'ev_arg' in 'struct event'
SvREFCNT_dec((SV*)args->ev.ev_arg);
~~~~~~~~ ^
ev_arg is defined in one of the internal header files which are not installed. There isn't an error for a missing header so moving that header won't help. What should I do to get this module to install?
thanks

gdcmanon - Requested cryptoraphic library not configured

I am using gdcmanon to anonimize dicom files like the following:
LD_LIBRARY_PATH=../lib ./gdcmanon --certificate CA_cert.cer -e ./dump ./dump/anon
But it gives the following error:
Error: In /home/travis/build/malaterre/GDCM/Source/Common/gdcmCryptoFactory.cxx, line 61, function static gdcm::CryptoFactory* gdcm::CryptoFactory::GetFactoryInstance(gdcm::CryptoFactory::CryptoLib)
No crypto factory registered with id 1
Requested cryptoraphic library not configured.
How can I solve this?
The error is because of binaries you use, it looks like SSL dependencies are not satisfied.
As a solution (workaround?), you can get the binaries via apt system. For Ubuntu 16.04 Xenial distribution, there is version 2.6.3 of libgdcm-tools package.
Another possibility is to compile gdcm from scratch, but you need development files of OpenSSL (apt install libssl-dev). Moreover, to use anonymisation with certificates, in CMake system set GDCM_USE_SYSTEM_OPENSSL=YES.

raco: docs failure query-exec: unable to open the database file

After a system update (Arch Linux), some package was not found anymore (megaparsack). I installed it with raco pkg install megaparsack but got this message during installation:
raco setup: docs failure: query-exec: unable to open the database file
error code: 14
SQL: "ATTACH $1 AS other"
database: #<path:/home/ploppz/.racket/6.12/doc/docindex.sqlite>
mode: 'read-only
file permissions: (write read)
Why? Should I have used sudo?
Despite this failure, code that uses megaparsack now runs fine.
This issue is caused by docindex.sqlite missing from your system-scope documentation directory. You can check what directory this is via: (require setup/dirs) (find-user-doc-dir). On Archlinux this is /usr/share/doc/racket/. If it's missing, chances are you need to install another package. edit: Archlinux fixed this in 7.1-1 - see this Archlinux bug report.
Without the aforementioned file, raco pkg install <pkgname> will not be able to finalize the installation of documentation to your user-scope, but the packages should be usable otherwise.
I encountered this issue in a slightly different manner - on Gentoo /usr/share/doc is compressed by default, and the dev-scheme/racket package was installed with a docindex.sqlite.bz2 while the code still looks for the original path (and sqlite3 probably cannot read bzip2 files). edit: I got this fixed in official portage.

Class 'MongoDB\Driver\Manager' not found, with proper extension installed

I have installed recent MongoDB extension using PECL. My PHP version is 5.6, I am sure that the extension is running. I've also installed the Composer package running composer require "mongodb/mongodb=^1.0.0" in my project. The error message says: in Client.php line 56: Class 'MongoDB\Driver\Manager' not found, the Client.php file is one of the classes, supllied by the package. I am wondering, do I need to install any additional packages?

Error: Please specify the prefix where libmemcached headers are located

I am trying to install memcached with Pecl and Pear. When I run this command
Abrams-MacBook-Air-3:recurly abramhandler$ sudo pecl install memcached --with-libememcached-dir=/usr/lib/libmemcached-1.0.17/libmemcached
I get the following error
checking for libmemcached location... configure: error: memcached support requires libmemcached 1.0.x. Use --with-libmemcached-dir=<DIR> to specify the prefix where libmemcached headers and library are located
ERROR: `/private/tmp/pear/install/memcached/configure' failed
This dir contains a lot of header files, but seems to maybe be the wrong one?
/usr/lib/libmemcached-1.0.17/libmemcached
What headers is memcached looking for? What directory should I include in the install command?
pecl does not allow passing configuration arguments when compiling extensions.
You have to extract the archive yourself and do the installation yourself, too. Instructions can be found on http://cweiske.de/tagebuch/phpfarm-install-extensions.htm