PHP APIs

Brian Moon brianm at dealnews.com
Mon Jan 9 03:27:50 UTC 2006


Brian Moon wrote:
 > We use the PHP API currently.  The PECL version may be "faster" in
 > tests, but in the real world, you just don't notice.  I also like
 > being able to fiddle with the PHP code to make it work like I like
 > it rather than having to mess with C code and recompile, etc. etc.

Antony asked me to try the new PECL version and I did.  We did have a 
build issue on our Gentoo boxes though.  Antony has commited a change to 
the config.m4 file that solves the problem for us.  We build our own PHP 
so I am not sure if it is a problem for Gentoo boxes with emerged PHP or 
not.  Antony and Mikael want to wait a while for more bugs to pop up 
before releasing a new package with this fix in it.

We are now testing the 2.0 PECL client.  While I still claim it "feels" 
no faster (although I am sure it is), it is doing a good job and has 
shown no problems so far.

 > Lisa Seelye wrote:
 >> What API is used by list members here? In my tests it seems the
 >> PECL version is far faster than the PHP API, first posted Aug
 >> 2003 to this list.  This leads me to want to drop the PHP
 >> client from Portage, as the PECL version seems to be far better.

As for that PHP client, we had to make changes to it to get it to work 
well for us.  Out of the box, it favored one server over the others and 
incorrectly used rtrim on gzcompressed data to remove the trailing \r\n 
from the data.  rtrim removes \0, \t, vertical tab and a couple of 
others.  All of that can be found in gzcompressed data.  In both cases 
we opened up the Danga Perl client and copied what they had done.  After 
those changes were made, it does work well.  We were compiling a list of 
changes to send to the author when the 2.0 PECL client was released.  We 
have now switched to focusing on getting this client up and running.

FWIW, my recommendation at this time would be to remove the PHP version 
once the PECL version is marked stable.

Brian Moon
dealnews.com
--------------
How to go broke saving money.
http://dealnews.com/


More information about the memcached mailing list