From owner-freebsd-questions@freebsd.org Thu Oct 13 08:38:41 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30AE0C0FD93 for ; Thu, 13 Oct 2016 08:38:41 +0000 (UTC) (envelope-from stdin@niklaas.eu) Received: from mx.box-hlm-03.niklaas.eu (mx.box-hlm-03.niklaas.eu [IPv6:2a02:2770:15:0:21a:4aff:feaa:e902]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F2098FD for ; Thu, 13 Oct 2016 08:38:40 +0000 (UTC) (envelope-from stdin@niklaas.eu) Received: from box-hlm-03.niklaas.eu (unknown [10.77.5.3]) by mx.box-hlm-03.niklaas.eu (Postfix) with ESMTPSA id DECED4F99E7 for ; Thu, 13 Oct 2016 10:38:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=niklaas.eu; s=default; t=1476347918; bh=nuvnHlQIALLN59bEKKx9+xDdZ8cKTL4qoQw4ItOOEaM=; h=Date:From:To:Subject:Reply-To:References:In-Reply-To; b=ct62xpuKu+IefSk/bHESMcX35DLzoo8QmNf1j2nt5Puy0hk7A+k2lhF/freeEB+R7 atzbEAYTIWaJdfMNqxUoRoJrDOGtRjTJKJm9bq13+N25KjZ7z0Q3lCIRAH1D9HylWA B7Eg/xZXWn9DepCz5YbjKrU4ZO0whPUigUT+ye8U= Date: Thu, 13 Oct 2016 10:38:37 +0200 From: Niklaas Baudet von Gersdorff To: freebsd-questions@freebsd.org Subject: Re: Unable to load dynamic library memcached.so Message-ID: <20161013083837.e26egzseoohj3se6@box-hlm-03.niklaas.eu> Reply-To: stdin@niklaas.eu Mail-Followup-To: freebsd-questions@freebsd.org References: <20161012212705.sm7lvgs2jkn5zv3c@box-hlm-03.niklaas.eu> <80df56c7-23e6-41da-06b6-5dca05e6f282@blackboxconsortium.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <80df56c7-23e6-41da-06b6-5dca05e6f282@blackboxconsortium.com> User-Agent: NeoMutt/20161003 (1.7.0) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Oct 2016 08:38:41 -0000 Orion Tiller [2016-10-12 16:59 -0700] : > Not sure if this will help you here but I sometimes have an issue with > redis where if the line extension=session.so isn't loaded first before > the redis one in /usr/local/etc/php/extensions.ini I get a similar error > to the one you are seeing. The pecl-memcached port also lists these as > requirements php56-json-5.6.26, php56-session-5.6.26 This helped a lot. I think I'm on the track to solve this. I had the following folder structure: $ ls -l /usr/local/etc/php/ total 28 -rw-r--r-- 1 root wheel 18 Oct 4 05:16 ext-20-curl.ini -rw-r--r-- 1 root wheel 16 Oct 4 04:52 ext-20-gd.ini -rw-r--r-- 1 root wheel 18 Oct 4 06:37 ext-20-intl.ini -rw-r--r-- 1 root wheel 21 Oct 4 04:58 ext-20-sqlite3.ini -rw-r--r-- 1 root wheel 23 Oct 12 20:55 ext-30-memcached.ini -rw-r--r-- 1 root wheel 24 Oct 4 15:07 ext-30-pdo_sqlite.ini -rw-r--r-- 1 root wheel 505 Oct 12 21:54 extensions.ini I assumed that ext-* are loaded before extensions.ini. $ grep -e json -e session /usr/local/etc/php/extensions.ini extension=json.so extension=session.so Following json.so and session.so are loaded *after* memcached.so which causes the error. So, I created a symlink that loads the required *.so's first: $ ls -l /usr/local/etc/php/ total 28 ! lrwxr-xr-x 1 root wheel 14 Oct 13 10:20 ext-00-extensions.ini -> extensions.ini -rw-r--r-- 1 root wheel 18 Oct 4 05:16 ext-20-curl.ini -rw-r--r-- 1 root wheel 16 Oct 4 04:52 ext-20-gd.ini -rw-r--r-- 1 root wheel 18 Oct 4 06:37 ext-20-intl.ini -rw-r--r-- 1 root wheel 21 Oct 4 04:58 ext-20-sqlite3.ini -rw-r--r-- 1 root wheel 23 Oct 12 20:55 ext-30-memcached.ini -rw-r--r-- 1 root wheel 24 Oct 4 15:07 ext-30-pdo_sqlite.ini -rw-r--r-- 1 root wheel 505 Oct 12 21:54 extensions.ini Although now I get quite a lot of notices that extensions had already been loaded, memcached loads without problems. I suspect, this issue stems from the fact that I installed lang/php56-extensions plus additional extensions individually, such as curl, gd, intl, sqlite3, pdo-sqlite, and memcached. To get rid of the notices the following two options should work. 1. renaming (instead of symlinking) extensions.ini to ext-00-extensions.ini 2. deleting lang/php56-extensions and installing the required ports individually Niklaas