5

as I couldn't find any question regarding this subject and after getting in touch with Couchbase support I was finally able to setup couchbase PHP SDK on XAMPP on Windows (7 untimate in my case, but this should work on any version), so I went ahead and write this self-answered post so everyone with the same problem can fix this issue.

If you try to setup the couchbase PHP client SDK as explained on couchbase SDK page (http://www.couchbase.com/develop/php/current) it won't work as all they have at the time of this post are instructions for setting it up on linux and if you digg a little on the forums, you'll find the IIS explanation, it's not outlined how to make it work under XAMPP/apache.

If you uncompress the SDK files under the /php/ext folder and add the extension=php_couchbase.dll to the php.ini you will get an error when starting apache.

In order to make the couchbase PHP client SDK to work with XAMPP, you need to move the libcouchbase.dll file to the /apache/bin/ folder, move the the php_couchbase.dll file to the /php/ext/ folder and finally add the line

extension=php_couchbase.dll

to the /php/php.ini file (this is the default ini file).

BTW, as fas as I know, XAMPP deploys with the Thread Safe version of PHP, so you MUST download the library with the "TS" suffix (Windows PHP 5.3 TS, 32-bit or Windows PHP 5.4 TS, 32-bit, etc.) for your PHP version.

UPDATE: As trondn mentions in a comment below: If you need to run php from command line (CLI), you need to copy libcouchbase.dll to c:\xampp\php. Alternatively you may copy libcouchbase.dll to the system directory to make it available for all binaries.

maxidirienzo
  • 99
  • 1
  • 6

2 Answers2

3

Your post lack a an important detail I had in my post at http://trondn.blogspot.no/2013/04/couchbase-php-xampp-and-windows.html . You need to copy libcouchbase.dll to c:\xampp\php to be able to run php from the command line. Alternatively you may copy libcouchbase.dll to the system directory to make it available for all binaries.

trondn
  • 379
  • 1
  • 2
0

http://windows.php.net/downloads/pecl/releases/couchbase/1.1.5/ - download site for couchbase sdk PHP.

use php info to find info about your apache/php version (Compiler, Arhitecture, Thread safety) before download

libcouchbase.dll must be copied in the same directory with php.exe php_couchbase.dll must be copied in the extension directory of php.

cfv1000
  • 453
  • 3
  • 10
  • It didn't see it until I added the PHP folder to the paths Windows variable (Control Panel -> System -> Advanced System Settings -> Environment Variables -> Path) I had manually installed PHP so the path wasn't set. – GregInWI2 Feb 20 '14 at 18:23