PHP 7 (PHPNG) Couchbase driver

Hi @brett19

This is Ubuntu 14.0.4, with PHP 7.0.5-2+deb.sury.org~trusty+1

Steps run:

This led to the error mentioned above.

After this, I fired up a clean Ubuntu 14.0 virtual machine, installed php5, cloned the php-couchbase repo, checked out the v2.1.0 tag, configured and built. This was a sanity check to make sure I could build the current GA release with the older php5, and this worked successfully.

Hi @brett19,

I pulled the new patch 8, and can confirm this does indeed build for me with php7.0 under Ubuntu 14.0.
I’ve done some basic gets/sets with Couchbase and at least that much is working well for me.

Thanks for looking into this, and I look forward to seeing it merged into master and published into an official release in the future.

Once you have a times cale for that in place, please do drop back to the forums and let us know, it would be appreciated.

On Archlinux PHP 7.0.5
With master from github and last commit id 48cd3264b0776129f49e72853cd1df532fbdd82f

I can’t compile :
/bin/sh /usr/local/src/php-couchbase/libtool --mode=compile cc -I. -I/usr/local/src/php-couchbase -DPHP_ATOM_INC -I/usr/local/src/php-couchbase/include -I/usr/local/src/php-couchbase/main -I/usr/local/src/php-couchbase -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 -DHAVE_CONFIG_H -g -O2 -c /usr/local/src/php-couchbase/bucket.c -o bucket.lo
cc -I. -I/usr/local/src/php-couchbase -DPHP_ATOM_INC -I/usr/local/src/php-couchbase/include -I/usr/local/src/php-couchbase/main -I/usr/local/src/php-couchbase -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 -DHAVE_CONFIG_H -g -O2 -c /usr/local/src/php-couchbase/bucket.c -fPIC -DPIC -o .libs/bucket.o
In file included from /usr/local/src/php-couchbase/bucket.c:5:0:
/usr/local/src/php-couchbase/paramparser.h: Dans la fonction ‘pcbc_pp_begin’:
/usr/local/src/php-couchbase/paramparser.h:37:52: attention : passing argument 2 of ‘_zend_get_parameters_array_ex’ from incompatible pointer type [-Wincompatible-pointer-types]
if (_zend_get_parameters_array_ex(param_count, args TSRMLS_CC) != SUCCESS) {
^
In file included from /usr/include/php/main/php.h:39:0,
from /usr/local/src/php-couchbase/couchbase.h:11,
from /usr/local/src/php-couchbase/bucket.c:1:
/usr/include/php/Zend/zend_API.h:250:14: note : expected ‘zval * {alias struct _zval_struct *}’ but argument is of type ‘zval *** {alias struct _zval_struct ***}’
ZEND_API int _zend_get_parameters_array_ex(int param_count, zval *argument_array);
^
In file included from /usr/local/src/php-couchbase/bucket.c:5:0:
/usr/local/src/php-couchbase/paramparser.h:115:43: attention : passing argument 2 of ‘zend_hash_find’ from incompatible pointer type [-Wincompatible-pointer-types]
if (zend_hash_find(htoptions, arg->name, strlen(arg->name)+1,

etc…

Hey,

I tried testing it again and everything I’ve tested worked.
My setup was similar to @gmot’s except I pulled a newer ref.

git clone https://github.com/couchbase/php-couchbase.git
git fetch http://review.couchbase.org/php-couchbase refs/heads/master
git checkout FETCH_HEAD
phpize7.0
./configure --with-couchbase --with-config=/usr/bin/php-config7.0
make
make install

The configure script had a warning configure: WARNING: unrecognized options: --with-config, but it worked.
I had to manually set up the ini file, I don’t know if the makefile was supposed to that for me or not.

These are the tests that I ran. Everything worked ok.
My PHP version was PHP 7.0.5-2+deb.sury.org~trusty+1 (cli) ( NTS ), running on a ubuntu VM.

I also ran our platform on it and everything seemed to work just fine.

I’d like to try it out on one of our test servers next week, if you consider the lib ready.

Finally !
Thank you !
sudo pecl install couchbase-2.2.0beta2

1 Like

Sorry Any Idea when this is going to be available for window platform?

I see that there is beta3 now and some people are actually using it. Is there ETA at this point? I feel like the new version is going to be released with 4.5 EE as 4.5 features are being added to the SDK.

We plan to release 2.2.0 as GA on 20th of June

1 Like

Hello,

Thank you for the ETA!

Are there any known issues with the latest beta version?

Hi @avsej,

Is this happening today?

2 Likes

Are there any known issues left? I saw it was not released at the 20th of June …

I have to shift release a bit. It will be ready by the end of this week

1 Like

Hi @avsej,

Now that it’s over the week, can we get at least ETA?

3 Likes

Thank you!

v.2.2.0 is finally out!!!

sudo pecl install couchbase
1 Like

Thanks for the release :slight_smile:

PECL builds do not include a PHP7 release:

http://windows.php.net/downloads/pecl/releases/couchbase/2.2.0/

I do not have direct access to pecl builders. I notified people there.

The recommended way to obtain windows builds described here
http://developer.couchbase.com/server/other-products/release-notes-archives/php-sdk

@avsej All the links to binaries in the link you posted are broken.

@davidbcn sorry I’ve specified wrong bucket there. Now they should work

Great, works like a charm. Only minor issues when switching to PHP7 (queries returning objects instead of arrays) but easy to overcome.

Thanks!