couchbase php windows client - php

I just fail to understand why couchbase does not provide a php extension for use on "windows" & IIS 7. Is there some efficient other ways of connecting & working with couchbase using php on windows?

I just set up the Couchbase client library today (PHP 5.4 NTS under IIS7). The directions posted at Couchbase's page for the PHP Client Library are accurate for the most part but I wanted to clarify where the dlls go.
Download the zip containing php_couchbase.dll and libcouchbase.dll. Generally you will want the NTS (non-thread safe) version under IIS.
Put php_couchbase.dll in the extensions directory.
Put libcouchbase.dll in the php directory (same directory as php.exe/php-cgi.exe).
If necessary, install the Visual C 9 runtime from Microsoft.
Enable the extension in php.ini
I initially put libcouchbase.dll in the extensions folder per the directions on the Couchbase site. That will not work. (Generates the PHP "the specified module could not be found" dll load error.)
The above only gives you the Couchbase client. You also need a server; that can be locally on the Windows machine or somewhere else.

The Couchbase client SDKs are quite important because they are "cluster aware".
The SDKs, including the PHP one will automatically use all the nodes of the cluster using vBuckets and they will be notified when the topology changes (add new nodes, failover, ...)
Also if you are using Couchbase 2.0 the SDK provides you API to call the views and do more advanced queries on documents.
So the best practice is to use the PHP SDK, that use internally the memcached protocol.
I am inviting you to read:
- http://www.couchbase.com/docs/couchbase-devguide-2.0/couchbase-clients.html
- http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-introduction-architecture-vbuckets.html vBuckets used to manage the auto-sharding.
- http://www.couchbase.com/develop/php/next the PHP SDK main page
A more advanced topic that explains how to developer a client SDK:
- http://www.couchbase.com/docs/couchbase-devguide-2.0/creating-client-library.html

I suppose you are referring to Couchbase 1 (and not the 2.0 version which is currently in Beta).
Couchbase is compatible with memcached. That means you can use any memcached-compatible client to access it, e.g. PHP's memcache or memcached functions.
Update:
If you want to get your hands dirty and compile the PHP extention for the Couchbase SDK yourself, here is a tutorial that guides you through the process.

Related

using socket.io with PHP server

I am implementing socket.io in an Open Source PHP application. But socket.io is not work directly on PHP server.
In their document they have proposed a PHP solution, and its look fine. but main problem is that their propesed solution: https://github.com/rase-/socket.io-php-emitter need two PHP extensions to be installed msgpack-php and phpredis. And this extension are generally not installed in PHP server.
As my application is Open Source and most of our user will use it on shared hosting, where they are not allowed to install any PHP extensions.
My question is
Is there any PHP client library for msgpack-php and phpredis with easy integartion.
OR
Is there any PHP REAL-TIME ENGINE for pusing content to client side ?
Thanks for being helpful.

Couchbase 2.0 and php5.4

Is anyone using couchbase 2.0 with PHP 5.4? I ask because the PECL libraries for PHP appear to not support PHP5.4's new interfaces. This is a real bummer as I'd really like to start taking advantage of 5.4's support for JsonSerializable which would appear to be a nice compliment to folks living in the JSON world of Couchbase.
I've used PHP 5.4.x, specifically I used the Bitnami MAPP stack, which comes with the couchbase.so already built for 5.4 (although you can do that yourself easily from the source). Then connected it to my local Couchbase instance (in my case I used the Laravel framework).
My Blog: http://blog.couchbase.com/easy-php-couchbase-setup-mac-bitnami
But now the couchbase.so is already in the Bitnami stack... so you can skip that part.
Bitnami MAPP: http://bitnami.com/stack/mapp
Bitnami MAMP: http://bitnami.com/stack/mamp (also can be installed via Mac App Store)

Install PECL on windows 7

can someone in this universe give me the step by step to install PECL for windows on php server, so then i can use the SpiderMonkey js engine to run js within php code?
Unfortunately the pecl4win site lacks due to limited resources. Pierre, our windows build master, creates extensions randomly on request and makes them available via http://downloads.php.net/pierre/ until the new PECL infrastructure is ready.
If you need an extension not available there you might ask on the pecl-dev at lists.php.net mailing list.
Also http://wiki.php.net/internals/windows/stepbystepbuild has some instructions. The build system on windows currentlydoesn't allow building extensions stand-alone, but you have to build from the PHP source tree. For adding oauth you either have to put the sources under php-src/ext/oauth before running buildconf.bat or use the --extra-ext-dir (or similar) option for buildconf.bat.

Can I use the PHP SOAP library in PHP 5.1.1?

I have developed a PHP site with PHP 5.3, and would like to deploy it to a server running PHP 5.1.1. My site depends heavily on the PHP SOAP library, since pretty much everything that isn't a presentation task is done by a Web Service. Does PHP 5.1.1 support the SOAP library? Apparently, it doesn't come with the default PHP installation, so, where could I download it?
Before answering your question, I want to mention that you really should upgrade (or convince whoever is in charge) to 5.3.
That said, soap is available, but you must compile with --enable-soap. If you're on a system that uses a package manager, you may try apt-get install php-soap, yum install php-soap, etc. If you're on windows, you may have to download php_soap.dll.
SOAP should be able to run on any version of PHP 5. However, it's important to note that prior to PHP 5.2.9 the SOAP extension is only capable of understanding WSDL 1.0 and 1.1 formats.
To enable SOAP support, configure PHP with --enable-soap.

Easy IIS install of php

Are there any "all-in-one" installers for php + mysql on iis? Preferably with a gui configuration interface.
The PHP part is easy with Web Platform Installer:
http://php.iis.net/
MySQL is a breeze to install on Windows:
http://dev.mysql.com/downloads/mysql/5.1.html#win32
I don't know of any all-in-one installers for both MySql and PHP, but PHP itself comes with an automated installer that will attach itself to IIS - but the preferred method is still manual (the automated procedure only uses CGI). There are plenty of how-to pages on the web that give you the step-by-step procedure required to get setup (and these differ based on your version of IIS) - I suggest you use one of those instead.
Some links to get you started:
PHP Documentation
Installing PHP 5 on IIS in 5 simple steps
I know this is not a direct answer, but a point of interest only. If you are looking for something that runs php/mysql that is quick to get setup for testing purposes you could try using a virtual appliance+vmware server/player
I don't know of any all in one installers, but you are probably better off just installing MySQL and PHP seperately. It's pretty straight forward.
MySQL has a GUI installation wizard in windows. I'm assume you know where to download this. You can download PHP for IIS from the Microsoft website here. It will have a GUI interface to some extent for installation:
http://www.microsoft.com/web/gallery/install.aspx?appid=PHP53
You will probably need to still reference MySQL by editing the php.ini file manually. This is a particually good FAQ:
http://learn.iis.net/page.aspx/353/install-and-configure-mysql-for-php-applications-on-iis-7-and-above/

Categories