Hi,
I properly run my MySQL database on Apache with PHP 7.1.16 on my macOS 10.13.6.
Today I properly installed couchbase-server-enterprise_6.0.0 the I run some queries on the console. Perfect. Then I tried to install the PHP SDK typing on the Terminal
WARNING: channel “pecl.php.net” has updated its protocols, use “pecl channel-update pecl.php.net” to update
Did not download optional dependencies: pecl/igbinary, use --alldeps to download automatically
pecl/couchbase can optionally use package “pecl/igbinary”
downloading couchbase-2.6.0.tgz …
Starting to download couchbase-2.6.0.tgz (174,067 bytes)
…done: 174,067 bytes
88 source files, building
running: phpize
Configuring for:
PHP Api Version: 20160303
Zend Module Api No: 20160303
Zend Extension Api No: 320160303
building in /private/tmp/pear/install/pear-build-lorenzopXmPnGA/couchbase-2.6.0
running: /private/tmp/pear/install/couchbase/configure --with-php-config=/usr/bin/php-config
checking for grep that handles long lines and -e… /usr/bin/grep
checking for egrep… /usr/bin/grep -E
checking for a sed that does not truncate output… /usr/bin/sed
checking for cc… cc
checking whether the C compiler works… yes
checking for C compiler default output file name… a.out
checking for suffix of executables…
checking whether we are cross compiling… no
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether cc accepts -g… yes
checking for cc option to accept ISO C89… none needed
checking how to run the C preprocessor… cc -E
checking for icc… no
checking for suncc… no
checking whether cc understands -c and -o together… yes
checking for system library directory… lib
checking if compiler supports -R… no
checking if compiler supports -Wl,-rpath,… yes
checking build system type… x86_64-apple-darwin17.7.0
checking host system type… x86_64-apple-darwin17.7.0
checking target system type… x86_64-apple-darwin17.7.0
checking for PHP prefix… /usr
checking for PHP includes… -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
checking for PHP extension directory… /usr/lib/php/extensions/no-debug-non-zts-20160303
checking for PHP installed headers prefix… /usr/include/php
checking if debug is enabled… no
checking if zts is enabled… no
checking for re2c… no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk… no
checking for nawk… no
checking for awk… awk
checking if awk is broken… no
checking whether to enable Couchbase support… yes, shared
checking wheter to use system FastLZ library… no
checking for libcouchbase in default path… not found
configure: error: Please reinstall the libcouchbase distribution -
libcouchbase.h should be <libcouchbase-dir>/include and
libcouchbase.a should be in <libcouchbase-dir>/lib
ERROR: `/private/tmp/pear/install/couchbase/configure --with-php-config=/usr/bin/php-config’ failed
The phpinfo(); still returns PHP 7.1.16
What should I do?
Hi @Leonardo, the build log includes hint for solution.
checking for libcouchbase in default path… not found
configure: error: Please reinstall the libcouchbase distribution -
libcouchbase.h should be <libcouchbase-dir>/include and
libcouchbase.a should be in <libcouchbase-dir>/lib
ERROR: `/private/tmp/pear/install/couchbase/configure --with-php-config=/usr/bin/php-config’ failed
Did you install libcouchbase? It is available in homebrew:
Thank you avsej, I did run
brew install libcouchbase
It seems that everything worked well, but I can’t get the php version 7.2 on the phpinfo()
and I can’t use the class CouchbaseCluster.
This is the last part of the log
Libraries have been installed in:
/private/tmp/pear/install/pear-build-leonardops7h7uP/couchbase-2.6.0/modules
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR’
flag during linking and do at least one of the following:
add LIBDIR to the `DYLD_LIBRARY_PATH’ environment variable
during execution
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
Build process completed successfully
Installing ‘/usr/lib/php/extensions/no-debug-non-zts-20160303/couchbase.so’
ERROR: failed to write /usr/lib/php/extensions/no-debug-non-zts-20160303/couchbase.so (copy(/usr/lib/php/extensions/no-debug-non-zts-20160303/couchbase.so): failed to open stream: Operation not permitted)
Magnifico:~ leonardop$ make test
make: *** No rule to make target `test’. Stop.
Magnifico:~ leonardop$ sudo apachectl stop
Password:
Magnifico:~ leonardop$ sudo apachectl start
Magnifico:~ leonardop$ curl -s https://php-osx.liip.ch/install.sh | bash -s 7.2
Detected macOS High Sierra 10.13. All ok.
Get packager.tgz
Unpack packager.tgz
Please type in your password, as we want to install this into /usr/local
Start packager (may take some time) using /usr/bin/python2.7
downloading https://s3-eu-west-1.amazonaws.com/php-osx.liip.ch/install/7.2-10.10-frontenddev-latest.dat
downloading https://s3-eu-west-1.amazonaws.com/php-osx.liip.ch/install/7.2-10.10/frontenddev/7.2-10.10-frontenddev-7.2.9-20180821-074958.tar.bz2
Installing package 7.2-10.10-frontenddev into root /
Package 7.2-10.10-frontenddev is already installed at version 7.2.9-20180821-074958. You wanted to install version 7.2.9-20180821-074958.
Finished.
Magnifico:~ leonardop$ sudo apachectl stop
Then I stopped and started Apache
sudo apachectl start
sudo apachectl stop
On my php, the phpinfo(); still returns PHP 7.1.16
Also the php line
$myCluster = new CouchbaseCluster(‘couchbase://10.4.4.1,10.4.4.2,10.4.4.3’);
still returns Fatal error : Uncaught Error: Class ‘CouchbaseCluster’ not found in /Users/leonardop/YouLudiWebSite/php/couchbase.php:7 Stack trace: #0 {main} thrown in
ERROR: failed to write /usr/lib/php/extensions/no-debug-non-zts-20160303/couchbase.so (copy(/usr/lib/php/extensions/no-debug-non-zts-20160303/couchbase.so): failed to open stream: Operation not permitted)
Maybe it is required to be root to write to /usr/lib/php on your system?
These are the privileges of the directory /usr/lib/php
Magnifico:~ leonardop$ cd /usr/lib/php
Magnifico:php leonardop$ ls -la
total 0
drwxr-xr-x 4 root wheel 128 Feb 8 2018 .
drwxr-xr-x 312 root wheel 9984 Dec 23 18:05 …
drwxr-xr-x 14 root wheel 448 Nov 3 10:25 build
drwxr-xr-x 3 root wheel 96 Feb 8 2018 extensions
Magnifico:php leonardop$
And I didn’t change these permissions. That’s the default on macOS.
The Couchbase engineers should know that.
I tried to run
sudo brew install libcouchbase
and I got this error message
Error: Running Homebrew as root is extremely dangerous and no longer supported.
As Homebrew does not drop privileges on installation you would be giving all
build scripts full access to your system.
So I did
Magnifico:~ leonardop$ brew reinstall libcouchbase
==> Reinstalling libcouchbase
==> Downloading https://homebrew.bintray.com/bottles/libcouchbase-2.10.3.high_sierra.bottle.tar.gz
Already downloaded: /Users/leonardop/Library/Caches/Homebrew/downloads/31fa86db7a0380371603961259687e8b042a7acf31d5f0c08707e9bb41013a3c–libcouchbase-2.10.3.high_sierra.bottle.tar.gz
==> Pouring libcouchbase-2.10.3.high_sierra.bottle.tar.gz
/usr/local/Cellar/libcouchbase/2.10.3: 117 files, 3.3MB
Magnifico:~ leonardop$
The error above comes from pecl install couchbase, so you have to be super-user to modify system paths and install package using sytem PHP interpreter
The quote above again from that log and displays paths where you are installing the extension. Are they correct?
Have you looked at script you were running from https://php-osx.liip.ch/install.sh? It installs PHP into /usr/local/, so I guess you wanted to use that PHP interpreter.
This only proves my point that you are not using interpreter you have installed from liip.ch. Please check FAQ section there: https://php-osx.liip.ch/#faq
.
To fix your problem, you have to be sure that:
you are installing couchbase PHP extension for interpreter you are going to use
apache httpd server also going to use the interpreter you have used to install extensions
when you update php.ini to load the extension, you are using correct file, which used my php module of apache httpd.
It’s not mentioned that you have to run the pecl command as super-user. Also, as we have seen earlier, running this command as root is not allowed. So I copied and pasted the commands, one by one, from the official couchbase.com web site support. And it doesn’t work as expected.
How can I remove everything and install from scratch again?
May you please show me the Terminal command strings one by one?
System Darwin Magnifico.homenet.telecomitalia.it 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64
Build Date Mar 31 2018 02:53:20
Configure Command ‘/BuildRoot/Library/Caches/com.apple.xbs/Binaries/apache_mod_php/install/TempContent/Objects/php/configure’ ‘–prefix=/usr’ ‘–mandir=/usr/share/man’ ‘–infodir=/usr/share/info’ ‘–disable-dependency-tracking’ ‘–sysconfdir=/private/etc’ ‘–with-libdir=lib’ ‘–enable-cli’ ‘–with-iconv=/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr’ ‘–with-config-file-path=/etc’ ‘–with-libxml-dir=/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr’ ‘–with-openssl=/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/libressl’ ‘–with-kerberos=/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr’ ‘–with-zlib=/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr’ ‘–enable-bcmath’ ‘–with-bz2=/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr’ ‘–enable-calendar’ ‘–disable-cgi’ ‘–with-curl=/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr’ ‘–enable-dba’ ‘–with-ndbm=/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr’ ‘–enable-exif’ ‘–enable-fpm’ ‘–enable-ftp’ ‘–with-gd’ ‘–with-png-dir=/BuildRoot/Library/Caches/com.apple.xbs/Binaries/apache_mod_php/install/TempContent/Root/usr/local’ ‘–with-jpeg-dir=/BuildRoot/Library/Caches/com.apple.xbs/Binaries/apache_mod_php/install/TempContent/Root/usr/local’ ‘–enable-gd-native-ttf’ ‘–with-icu-dir=/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr’ ‘–with-ldap=/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr’ ‘–with-ldap-sasl=/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr’ ‘–with-libedit=/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr’ ‘–enable-mbstring’ ‘–enable-mbregex’ ‘–with-mysqli=mysqlnd’ ‘–with-pcre-regex=/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr’ ‘–without-pcre-jit’ ‘–with-pdo-pgsql=/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.13.xctoolchain/usr/local/bin’ ‘–with-pgsql=/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.13.xctoolchain/local/bin’ ‘–without-pear’ ‘–with-pear=no’ ‘–with-pdo-mysql=mysqlnd’ ‘–with-mysql-sock=/var/mysql/mysql.sock’ ‘–disable-phpdbg’ ‘–with-readline=/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr’ ‘–enable-shmop’ ‘–with-snmp=/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr’ ‘–enable-soap’ ‘–enable-sockets’ ‘–enable-sysvmsg’ ‘–enable-sysvsem’ ‘–enable-sysvshm’ ‘–with-tidy=/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr’ ‘–enable-wddx’ ‘–with-xmlrpc’ ‘–with-iconv-dir=/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr’ ‘–with-xsl=/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr’ ‘–with-apxs2=/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.13.xctoolchain/usr/local/bin/apxs’ ‘–enable-zip’ ‘YACC=/BuildRoot/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bison’
Server API Apache 2.0 Handler
Virtual Directory Support disabled
Configuration File (php.ini) Path /etc
Loaded Configuration File (none)
Scan this dir for additional .ini files (none)
Additional .ini files parsed (none)
PHP API 20160303
PHP Extension 20160303
Zend Extension 320160303
Zend Extension Build API320160303,NTS
PHP Extension Build API20160303,NTS
Debug Build no
Thread Safety disabled
Zend Signal Handling enabled
Zend Memory Manager enabled
Zend Multibyte Support provided by mbstring
IPv6 Support enabled
DTrace Support disabled
Registered PHP Streams https, ftps, compress.zlib, compress.bzip2, php, file, glob, data, http, ftp, phar, zip
Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, tls, tlsv1.0, tlsv1.1, tlsv1.2
Registered Stream Filters zlib., bzip2., convert.iconv., string.rot13, string.toupper, string.tolower, string.strip_tags, convert., consumed, dechunk
Zend logo This program makes use of the Zend Scripting Language Engine:
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
Configuration
apache2handler
Apache Version Apache/2.4.33 (Unix) PHP/7.1.16
Apache API Version 20120211
Server Administrator you@example.com
Hostname:Port 127.0.0.1:0
User/Group _www(70)/70
Max Requests Per Child: 0 - Keep Alive: on - Max Per Connection: 100
Timeouts Connection: 60 - Keep-Alive: 5
Virtual Server No
Server Root /usr
Loaded Modules core mod_so http_core prefork mod_authn_file mod_authn_core mod_authz_host mod_authz_groupfile mod_authz_user mod_authz_core mod_access_compat mod_auth_basic mod_reqtimeout mod_filter mod_deflate mod_mime mod_log_config mod_env mod_expires mod_headers mod_setenvif mod_version mod_slotmem_shm mod_unixd mod_status mod_autoindex mod_negotiation mod_dir mod_alias mod_rewrite mod_php7 mod_hfs_apple2
Directive Local Value Master Value
engine 1 1
last_modified 0 0
xbithack 0 0
Apache Environment
Variable Value
HTTP_HOST localhost
HTTP_COOKIE kSQL_DB_Version=126; visitorLanguage=it; searchUsernameInUsersList=; PHPSESSID=5467cd09697813c6db3a8f7a4d5eafc7; visitorCountryCode=it
HTTP_CONNECTION keep-alive
HTTP_UPGRADE_INSECURE_REQUESTS 1
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
HTTP_USER_AGENT Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.2 Safari/605.1.15
HTTP_ACCEPT_LANGUAGE en-us
HTTP_DNT 1
HTTP_ACCEPT_ENCODING gzip, deflate
PATH /usr/bin:/bin:/usr/sbin:/sbin
SERVER_SIGNATURE no value
SERVER_SOFTWARE Apache/2.4.33 (Unix) PHP/7.1.16
SERVER_NAME localhost
SERVER_ADDR ::1
SERVER_PORT 80
REMOTE_ADDR ::1
DOCUMENT_ROOT /Users/leonardop/MyWebSite
REQUEST_SCHEME http
CONTEXT_PREFIX no value
CONTEXT_DOCUMENT_ROOT /Users/leonardop/MyWebSite
SERVER_ADMIN you@example.com
SCRIPT_FILENAME /Users/leonardop/MyWebSite/php/php_info.php
REMOTE_PORT 49461
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING no value
REQUEST_URI /php/php_info.php
SCRIPT_NAME /php/php_info.php
HTTP Headers Information
HTTP Request Headers
HTTP Request GET /php/php_info.php HTTP/1.1
Host localhost
Cookie kSQL_DB_Version=126; visitorLanguage=it; searchUsernameInUsersList=; PHPSESSID=5467cd09697813c6db3a8f7a4d5eafc7; visitorCountryCode=it
Connection keep-alive
Upgrade-Insecure-Requests 1
Accept text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.2 Safari/605.1.15
Accept-Language en-us
DNT 1
Accept-Encoding gzip, deflate
HTTP Response Headers
X-Powered-By PHP/7.1.16
bcmath
BCMath support enabled
Directive Local Value Master Value
bcmath.scale 0 0
bz2
BZip2 Support Enabled
Stream Wrapper support compress.bzip2://
Stream Filter support bzip2.decompress, bzip2.compress
BZip2 Version 1.0.6, 6-Sept-2010
calendar
Calendar support enabled
Core
PHP Version 7.1.16
Directive Local Value Master Value
allow_url_fopen On On
allow_url_include Off Off
arg_separator.input & &
arg_separator.output & &
auto_append_file no value no value
auto_globals_jit On On
auto_prepend_file no value no value
browscap no value no value
default_charset UTF-8 UTF-8
default_mimetype text/html text/html
disable_classes no value no value
disable_functions no value no value
display_errors On On
display_startup_errors Off Off
doc_root no value no value
docref_ext no value no value
docref_root no value no value
enable_dl On On
enable_post_data_reading On On
error_append_string no value no value
error_log no value no value
error_prepend_string no value no value
error_reporting no value no value
expose_php On On
extension_dir /usr/lib/php/extensions/no-debug-non-zts-20160303 /usr/lib/php/extensions/no-debug-non-zts-20160303
file_uploads On On
hard_timeout 2 2
highlight.comment #FF8000#FF8000
highlight.default #0000BB#0000BB
highlight.html #000000#000000
highlight.keyword #007700#007700
highlight.string #DD0000#DD0000
html_errors On On
ignore_repeated_errors Off Off
ignore_repeated_source Off Off
ignore_user_abort Off Off
implicit_flush Off Off
include_path .: .:
input_encoding no value no value
internal_encoding no value no value
log_errors Off Off
log_errors_max_len 1024 1024
mail.add_x_header Off Off
mail.force_extra_parameters no value no value
mail.log no value no value
max_execution_time 180 30
max_file_uploads 20 20
max_input_nesting_level 64 64
max_input_time 180 -1
max_input_vars 1000 1000
memory_limit 512M 128M
open_basedir no value no value
output_buffering 0 0
output_encoding no value no value
output_handler no value no value
post_max_size 64M 8M
precision 14 14
realpath_cache_size 4096K 4096K
realpath_cache_ttl 120 120
register_argc_argv On On
report_memleaks On On
report_zend_debug On On
request_order no value no value
sendmail_from no value no value
sendmail_path /usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i
serialize_precision -1 -1
short_open_tag On On
SMTP localhost localhost
smtp_port 25 25
sql.safe_mode Off Off
sys_temp_dir no value no value
track_errors Off Off
unserialize_callback_func no value no value
upload_max_filesize 256M 2M
upload_tmp_dir no value no value
user_dir no value no value
user_ini.cache_ttl 300 300
user_ini.filename .user.ini .user.ini
variables_order EGPCS EGPCS
xmlrpc_error_number 0 0
xmlrpc_errors Off Off
zend.assertions 1 1
zend.detect_unicode On On
zend.enable_gc On On
zend.multibyte Off Off
zend.script_encoding no value no value
zend.signal_check Off Off
ctype
ctype functions enabled
curl
cURL support enabled
cURL Information 7.54.0
Age 3
Features
AsynchDNS Yes
CharConv No
Debug No
GSS-Negotiate No
IDN No
IPv6 Yes
krb4 No
Largefile Yes
libz Yes
NTLM Yes
NTLMWB Yes
SPNEGO Yes
SSL Yes
SSPI No
TLS-SRP No
HTTP2 Yes
GSSAPI Yes
KERBEROS5 Yes
UNIX_SOCKETS Yes
PSL No
Protocols dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, ldaps, pop3, pop3s, rtsp, smb, smbs, smtp, smtps, telnet, tftp
Host x86_64-apple-darwin17.0
SSL Version LibreSSL/2.0.20
ZLib Version 1.2.11
date
date/time support enabled
timelib version 2016.05
“Olson” Timezone Database Version 2018.3
Timezone Database internal
Default timezone Europe/Paris
Directive Local Value Master Value
date.default_latitude 31.7667 31.7667
date.default_longitude 35.2333 35.2333
date.sunrise_zenith 90.583333 90.583333
date.sunset_zenith 90.583333 90.583333
date.timezone no value no value
dba
DBA support enabled
Supported handlers ndbm cdb cdb_make inifile flatfile
Directive Local Value Master Value
dba.default_handler flatfile flatfile
dom
DOM/XML enabled
DOM/XML API Version 20031129
libxml Version 2.9.4
HTML Support enabled
XPath Support enabled
XPointer Support enabled
Schema Support enabled
RelaxNG Support enabled
exif
EXIF Support enabled
EXIF Version 7.1.16
Supported EXIF Version 0220
Supported filetypes JPEG,TIFF
Directive Local Value Master Value
exif.decode_jis_intel JIS JIS
exif.decode_jis_motorola JIS JIS
exif.decode_unicode_intel UCS-2LE UCS-2LE
exif.decode_unicode_motorola UCS-2BE UCS-2BE
exif.encode_jis no value no value
exif.encode_unicode ISO-8859-15 ISO-8859-15
fileinfo
fileinfo support enabled
version 1.0.5
libmagic 522
filter
Input Validation and Filtering enabled
Revision $Id: a4ca1e0a99c260cb8a4cf5d7369d130f7b934185 $
Directive Local Value Master Value
filter.default unsafe_raw unsafe_raw
filter.default_flags no value no value
ftp
FTP support enabled
FTPS support enabled
gd
GD Support enabled
GD Version bundled (2.1.0 compatible)
GIF Read Support enabled
GIF Create Support enabled
JPEG Support enabled
libJPEG Version 9 compatible
PNG Support enabled
libPNG Version 1.6.32
WBMP Support enabled
XBM Support enabled
Directive Local Value Master Value
gd.jpeg_ignore_warning 1 1
hash
iconv support enabled
iconv implementation libiconv
iconv library version 1.11
Directive Local Value Master Value
iconv.input_encoding no value no value
iconv.internal_encoding no value no value
iconv.output_encoding no value no value
json
json support enabled
json version 1.5.0
ldap
LDAP Support enabled
RCS Version $Id: 8dbea0c3ba11210a36d586df44ad9e6af14809c4 $
Total Links 0/unlimited
API Version 3001
Vendor Name OpenLDAP
Vendor Version 20428
SASL Support Enabled
Directive Local Value Master Value
ldap.max_links Unlimited Unlimited
libxml
libXML support active
libXML Compiled Version 2.9.4
libXML Loaded Version 20904
libXML streams enabled
mbstring
Multibyte Support enabled
Multibyte string engine libmbfl
HTTP input encoding translation disabled
libmbfl version 1.3.2
oniguruma version 5.9.6
mbstring extension makes use of “streamable kanji code filter and converter”, which is distributed under the GNU Lesser General Public License version 2.1.
Multibyte (japanese) regex support enabled
Multibyte regex (oniguruma) backtrack check On
Multibyte regex (oniguruma) version 5.9.6
Directive Local Value Master Value
mbstring.detect_order no value no value
mbstring.encoding_translation Off Off
mbstring.func_overload 0 0
mbstring.http_input no value no value
mbstring.http_output no value no value
mbstring.http_output_conv_mimetypes ^(text/|application/xhtml+xml) ^(text/|application/xhtml+xml)
mbstring.internal_encoding no value no value
mbstring.language uni neutral
mbstring.strict_detection Off Off
mbstring.substitute_character no value no value
mysqli
MysqlI Support enabled
Client API library version mysqlnd 5.0.12-dev - 20150407 - $Id: 38fea24f2847fa7519001be390c98ae0acafe387 $
Active Persistent Links 0
Inactive Persistent Links 0
Active Links 0
Directive Local Value Master Value
mysqli.allow_local_infile On On
mysqli.allow_persistent On On
mysqli.default_host no value no value
mysqli.default_port 3306 3306
mysqli.default_pw no value no value
mysqli.default_socket /var/mysql/mysql.sock /var/mysql/mysql.sock
mysqli.default_user no value no value
mysqli.max_links Unlimited Unlimited
mysqli.max_persistent Unlimited Unlimited
mysqli.reconnect Off Off
mysqli.rollback_on_cached_plink Off Off
mysqlnd
OpenSSL support enabled
OpenSSL Library Version LibreSSL 2.2.7
OpenSSL Header Version LibreSSL 2.2.7
Openssl default config /private/etc/ssl/openssl.cnf
Directive Local Value Master Value
openssl.cafile no value no value
openssl.capath no value no value
pcre
PCRE (Perl Compatible Regular Expressions) Support enabled
PCRE Library Version 8.40 2017-01-11
PCRE JIT Support not compiled in
Directive Local Value Master Value
pcre.backtrack_limit 1000000 1000000
pcre.recursion_limit 100000 100000
PDO
PDO support enabled
PDO drivers mysql, pgsql, sqlite
pdo_mysql
PDO Driver for MySQL enabled
Client API version mysqlnd 5.0.12-dev - 20150407 - $Id: 38fea24f2847fa7519001be390c98ae0acafe387 $
Directive Local Value Master Value
pdo_mysql.default_socket /var/mysql/mysql.sock /var/mysql/mysql.sock
pdo_pgsql
PDO Driver for PostgreSQL enabled
PostgreSQL(libpq) Version 9.3.7
Module version 7.1.16
Revision $Id: 9c5f356c77143981d2e905e276e439501fe0f419 $
pdo_sqlite
PDO Driver for SQLite 3.x enabled
SQLite Library 3.15.1
pgsql
PostgreSQL Support enabled
PostgreSQL(libpq) Version 9.3.7
PostgreSQL(libpq) PostgreSQL 9.3.7 on x86_64-apple-darwin17.0, compiled by Apple LLVM version 9.0.0 (clang-900.0.31), 64-bit
Multibyte character support enabled
SSL support disabled
Active Persistent Links 0
Active Links 0
Directive Local Value Master Value
pgsql.allow_persistent On On
pgsql.auto_reset_persistent Off Off
pgsql.ignore_notice Off Off
pgsql.log_notice Off Off
pgsql.max_links Unlimited Unlimited
pgsql.max_persistent Unlimited Unlimited
Phar
Phar: PHP Archive support enabled
Phar EXT version 2.0.2
Phar API version 1.1.1
SVN revision $Id: 898d1dac303a2eedebae7b6c8fa859253b781100 $
Phar-based phar archives enabled
Tar-based phar archives enabled
ZIP-based phar archives enabled
gzip compression enabled
bzip2 compression enabled
OpenSSL support enabled
Phar based on pear/PHP_Archive, original concept by Davey Shafik.
Phar fully realized by Gregory Beaver and Marcus Boerger.
Portions of tar implementation Copyright (c) 2003-2009 Tim Kientzle.
Directive Local Value Master Value
phar.cache_list no value no value
phar.readonly On On
phar.require_hash On On
posix
Reflection enabled
Version $Id: 7c6e20c07e8435a5148263b349668853c0057575 $
session
Session Support enabled
Registered save handlers files user
Registered serializer handlers php_serialize php php_binary wddx
Directive Local Value Master Value
session.auto_start Off Off
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_httponly Off Off
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_secure Off Off
session.gc_divisor 100 100
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
session.lazy_write On On
session.name PHPSESSID PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path no value no value
session.serialize_handler php php
session.sid_bits_per_character 4 4
session.sid_length 32 32
session.upload_progress.cleanup On On
session.upload_progress.enabled On On
session.upload_progress.freq 1% 1%
session.upload_progress.min_freq 1 1
session.upload_progress.name PHP_SESSION_UPLOAD_PROGRESS PHP_SESSION_UPLOAD_PROGRESS
session.upload_progress.prefix upload_progress_ upload_progress_
session.use_cookies On On
session.use_only_cookies On On
session.use_strict_mode Off Off
session.use_trans_sid 0 0
shmop
shmop support enabled
SimpleXML
Simplexml support enabled
Revision $Id: ae067cdcddf424d6e762603905b98798bc924a00 $
Schema support enabled
snmp
NET-SNMP Support enabled
NET-SNMP Version 5.6.2.1
PHP SNMP Version 0.1
soap
Soap Client enabled
Soap Server enabled
Directive Local Value Master Value
soap.wsdl_cache 1 1
soap.wsdl_cache_dir /tmp /tmp
soap.wsdl_cache_enabled 1 1
soap.wsdl_cache_limit 5 5
soap.wsdl_cache_ttl 86400 86400
sockets
SQLite3 support enabled
SQLite3 module version 7.1.16
SQLite Library 3.15.1
Directive Local Value Master Value
sqlite3.extension_dir no value no value
standard
Dynamic Library Support enabled
Path to sendmail /usr/sbin/sendmail -t -i
Directive Local Value Master Value
assert.active 1 1
assert.bail 0 0
assert.callback no value no value
assert.exception 0 0
assert.quiet_eval 0 0
assert.warning 1 1
auto_detect_line_endings 0 0
default_socket_timeout 60 60
from no value no value
session.trans_sid_hosts no value no value
session.trans_sid_tags a=href,area=href,frame=src,form= a=href,area=href,frame=src,form=
url_rewriter.hosts no value no value
url_rewriter.tags form= form=
user_agent no value no value
sysvmsg
sysvmsg support enabled
Revision $Id: 483c70b5c54718693a4b95633a097e33d1120ba9 $
sysvsem
Version 7.1.16
sysvshm
Version 7.1.16
tidy
Tidy support enabled
libTidy Release 31 October 2006 - Apple Inc. build 15.18.1
Extension Version 7.1.16 ($Id: c6d6b80d55c5d351deaa745c3c540971e5583c24 $)
Directive Local Value Master Value
tidy.clean_output 0 0
tidy.default_config no value no value
tokenizer
Tokenizer Support enabled
wddx
WDDX Support enabled
WDDX Session Serializer enabled
xml
XML Support active
XML Namespace Support active
libxml2 Version 2.9.4
xmlreader
XSL enabled
libxslt Version 1.1.29
libxslt compiled against libxml Version 2.9.4
EXSLT enabled
libexslt Version 1.1.29
zip
Zip enabled
Zip version 1.13.5
Libzip version 1.1.2
zlib
ZLib Support enabled
Stream Wrapper compress.zlib://
Stream Filter zlib.inflate, zlib.deflate
Compiled Version 1.2.11
Linked Version 1.2.11
Directive Local Value Master Value
zlib.output_compression Off Off
zlib.output_compression_level -1 -1
zlib.output_handler no value no value
Additional Modules
It was homebrew, which did not allow you to run as root:
It seems like you are treating libcouchbase as PHP extension, but it is not. It is library which exposes C interfaces. We ship PHP module using PECL and it depends on libcouchbase.
We don’t maintain any of the PHP distributions on any of the existing platforms. So we cannot cover questions like whether or not the user need to be root during extension deployment, or where the proper pecl command installed. The FAQ I’ve pointed above (https://php-osx.liip.ch/#faq) have this question. Have you tried what the answer recommends?
I strongly recommend you to read through details on how their PHP distribution works, where the configs stored and how it works with your webserver. On my side, I can help you with any questions related the couchbase extension.
I could even use Couchbase with my current php 7.1.6 if allowed. But it won’t work. So the problem doesn’t come from pecl nor from the php 7.2 installation.
I’m a macOS client developer for 20 years, I’m not a system expert but usually I install and configure everything with Terminal. MySQL and php are working since the first easy and quick installation.
The Couchbase official support page say to just run these commands
brew install libcouchbase
curl -s https://php-osx.liip.ch/install.sh | bash -s 7.2
pecl install couchbase
Then you say toI should rather use
sudo pecl install couchbase
So the official support information are not correct. You are very kind but the Couchbase company organisation is not so professional.
On Mac you run an installer and everything works at the first try. Couchbase doesn’t belong to this philosophy. One year ago I attended to a Couchbase conference, then I tried to install Couchbase and I spent one week in pain and frustrations, unsuccessfully. This week I decided to dedicate a few hours more to install Couchbase and give it a chance, but again I’m here stuck for 3 days struggling myself.
Couchbase engineers/management should avoid this bottleneck to the new clients. If they cut potential customers at the entrance they lose business. There should be an installer, double click and go. No more. That’s the macOS philosophy.
A software company can’t say “If it doesn’t work on your system it’s up to you”. A software company should sell a product that always works on that system.
I stay with my SQL/PHP/JavaScript system. If this is the beginning I won’t imagine the future. Thank you. You are kind. It’s the product and the company philosophy that don’t work. Couchbase is probably made for top level system engineers only.
I didn’t say that. The documentation page now updated. You have to use the way you use to install other pecl extensions. We don’t do anything special for couchbase. The process exactly the same as for other pecl extensions.
But I see you don’t want to control the process. In this case you can run this in MacOS recovery mode:
Hi avsej
it’s not that I don’t want to control the process, simply I’m not able.
I had already run
csrutil disable
and rebooted. 5 minutes ago I did it again and rebooted the machine. Then I did as you say
curl -sSL https://pastebin.com/raw/gE5eur7f | sudo bash -s
and this is the result:
Last login: Wed Feb 6 18:04:50 on console
Magnifico:~ leonardop$ curl -sSL https://pastebin.com/raw/gE5eur7f | sudo bash -s
Password:
: No such file or directory
: ambiguous redirect
: ambiguous redirect
: ambiguous redirect
: No such file or directory-2.6.0
: ambiguous redirect
: ambiguous redirect
: ambiguous redirect
: ambiguous redirect
: ambiguous redirect
: command not found
Warning: PHP Startup: Unable to load dynamic library ‘json.so’ (tried: /usr/local/php5/lib/php/extensions/no-debug-non-zts-20170718/json.so (dlopen(/usr/local/php5/lib/php/extensions/no-debug-non-zts-20170718/json.so, 9): image not found), /usr/local/php5/lib/php/extensions/no-debug-non-zts-20170718/json.so.so (dlopen(/usr/local/php5/lib/php/extensions/no-debug-non-zts-20170718/json.so.so, 9): image not found)) in Unknown on line 0
Standard input code:1:
class Couchbase\Cluster#1 (2) {
public $connstr =>
string(21) “couchbase://localhost”
public $authenticator =>
NULL
}
Magnifico:~ leonardop$
I put this web address on my browser and I saw https://pastebin.com/raw/gE5eur7f
cd /tmp brew install libcouchbase autoconf >/dev/null 2>&1 curl -L -s -o couchbase-2.6.0.tar.gz https://pecl.php.net/get/couchbase-2.6.0.tgz >/dev/null 2>&1 tar xf couchbase-2.6.0.tar.gz >/dev/null 2>&1 cd couchbase-2.6.0 /usr/bin/phpize >/dev/null 2>&1 ./configure --with-couchbase >/dev/null 2>&1 make -j8 >/dev/null 2>&1 sudo make install 2>&1 echo “extension=couchbase.so” | sudo tee -a /etc/php.ini >/dev/null 2>&1 cd echo ‘<?php var_dump(new \Couchbase\Cluster(“couchbase://localhost”));’ | php
That is strange, when you strip all >/dev/null 2>&1 from the commands. Where does it stop?
set -xe
cd /tmp
brew install libcouchbase autoconf
curl -L -s -o couchbase-2.6.0.tar.gz https://pecl.php.net/get/couchbase-2.6.0.tgz
tar xf couchbase-2.6.0.tar.gz
cd couchbase-2.6.0
/usr/bin/phpize
./configure --with-couchbase
make -j8
sudo make install
echo "extension=couchbase.so" | sudo tee -a /etc/php.ini
echo '<?php var_dump(new \Couchbase\Cluster("couchbase://localhost"));' | php