Details
-
Bug
-
Resolution: User Error
-
Major
-
None
-
2.4.0
-
Ubuntu 14.04, Ubuntu 16.04, CentOS 7, possibly others
Description
If you follow our PHP SDK installation instructions for PHP 5.6.x, you will not end up with a working configuration. I'm talking about the following doc pages:
https://developer.couchbase.com/documentation/server/current/sdk/php/start-using-sdk.html (current for 4.x)
https://developer.couchbase.com/documentation/server/5.0/sdk/php/start-using-sdk.html (current for 5.0 beta)
We state on those doc pages that our PHP SDK is compatible with both PHP 5.6 and 7.0. I've been working with several prospects that have PHP 5.6.x in production, and they struggled to install our PHP SDK in their environments. So I set up several linux VMs to test it out, and below are the results.
I attached the file describing the steps I followed to set up Unbuntu 14.04, Ubuntu 16.04, and CentOS 7 Parallels Desktop VMs. I can share the VMs, if need be, or show the steps in GoToMeeting/Skype session. I summed up the issues below:
- despite PHP 5.6 installed and working correctly, the following line installs PHP 7.x bits for the corresponding packages:
sudo apt-get install libcouchbase-dev build-essential php-dev zlib1g-dev
check under /usr/lib/php : you will see two directories – 20131226 (with PHP 5.6 extensions) and 20160303 (with PHP 7.x extensions, including couchbase.so). There is also 7.1 directory that wasn't there before. See the attached image (Screen Shot 2017-09-14 at 23.05.04.png) not found.
We need to have the instruction that makes sure the bits installed correspond to the current PHP version installed.
- Our further instructions assume PECL is installed. It's not always the case.
The command sudo apt install php-pear doesn't always install the correct version of PECL, so we may end up with the following issues (see Screen Shot 2017-09-14 at 23.22.48.png).
We need to provide the instructions on installing the correct version of PECL.
I haven't tested how PHP 7.x works in the similar scenario, will add to this ticket once I do.