Fixes for new PHP API

Russell Garrett
Mon, 8 Dec 2003 16:36:59 -0000

After hitting upon another obscure bug in the old PHP API, I finally took
the plunge and switched over to using the new API. It took quite a
while, as I found a few bugs in the new API too.

This PHP API now runs the submission system stably, as
well as the live site.

Here's a (mostly from memory) summary, if you want full details, read the
diff file.

- Fixed spelling of "persistent" and "integer". Because I'm picky like that.
Note: this breaks compatability with the "persistant" parameter in the old
- Fixed notices with error_reporting(E_ALL) (mainly uninitialised
variables). I strongly suggest you develop using this - it catches a lot of
bugs, such as this one:
- Fixed differences in spelling between COMPRESSION_SAVINGS and
- Fixed bug in _set() where if memcached sends two newlines as opposed to
one (as seems to happen sometimes), _set fails, and "STORED" is left in the
buffer to foul up a subsequent get().
- Changed one instance of print() to trigger_error().

The 341-line patch is available here:

Russ Garrett