[PCBC-139] PHP client needs fastlz compression to be compatible with legacy memcached clients Created: 01/Nov/12  Updated: 11/Dec/12  Resolved: 16/Nov/12

Status: Resolved
Project: Couchbase PHP client library
Component/s: library
Affects Version/s: 1.0.4
Fix Version/s: 1.0.6, 1.1.0
Security Level: Public

Type: Bug Priority: Blocker
Reporter: Tim Smith Assignee: Trond Norbye
Resolution: Fixed Votes: 0
Labels: customer
Remaining Estimate: 16h
Time Spent: Not Specified
Original Estimate: 16h
Environment: With both php-ext-couchbase-1.0.5-centos55-x86_64.tar.gz and php-ext-couchbase-1.0.6b23_centos-5.5-x64.tar.gz. I will attach php -i output as a separate comment. Using php-pecl-memcached extension 1.0.0. libmemcached 1.0.4.

Attachments: GZip Archive couchbase.so.gz    
Issue Links:
Dependency

 Description   
The existing memcached clients for PHP (pecl-memcached and memcache) both default to using fastlz compression for values >= 2000 bytes.

The couchbase client library doesn't have fastlz compression included. It doesn't provide a useful error message when it runs into this problem. Instead, it misinterprets the stored value, tries to allocate a huge block of memory and fails. The error it gives (look, e.g., in the PHP-FPM web-access.log) is:

[01-Nov-2012 20:45:49 UTC] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 8460104323416721361 bytes) in /usr/share/nginx/html/cb.php on line 32

To reproduce, just set a value >= 2000 bytes with pecl-memcached client, and try to read it with Couchbase client. Here's a sample:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Couchbase Server PHP Test</title>
</head>
<body>

<p>
<?php

$host = "10.4.2.15";
$user = "Administrator";
$password = "password";
$bucketName = "default";
$persistConnection = false;
$cb = new Couchbase($host . ":8091",
        $user, $password, $bucketName, $persistConnection);

$mc = new Memcached('Pool-1');
if (count($mc->getServerList()) == 0) {
    // No servers, this pool needs to be configured
    $mc->addServer($host, 11211);
    //$mc->addServer("other host", 11211);
}

// Change this to 1999 and it will work
$valLength = 2000;
date_default_timezone_set('UTC');
$val = date(DateTime::RFC2822) . ' ';
$val .= str_repeat('X', $valLength - strlen($val));

$mc->set("a", $val);
echo("The value for 'a' is: ");
var_dump($cb->get("a"));

?>
</p>
</body>
</html>


The correct behavior is for the Couchbase client to ship, out of the box, compatible with existing Memcached client implementations. It should include fastlz support directly, or else clearly document how to add such support without requiring any unusual compilations or other hoops. The fastlz code is very small and portable, and hasn't changed since 2007, so it should present a minimal maintenance issue.

In addition, the PHP client documentation should clearly indicate what changes are needed in order for the client to be compatible with the other Couchbase clients (Java, .NET, etc.). Again, without requiring recompilation or extra hoops to jump through.



 Comments   
Comment by Tim Smith [ 01/Nov/12 ]
phpinfo()
PHP Version => 5.3.15

System => Linux localhost.localdomain 2.6.18-308.16.1.el5 #1 SMP Tue Oct 2 22:01:43 EDT 2012 x86_64
Build Date => Jul 20 2012 13:07:19
Configure Command => './configure' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib64' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--enable-gd-native-ttf' '--with-t1lib=/usr' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--with-kerberos' '--enable-ucd-snmp-hack' '--enable-shmop' '--enable-calendar' '--with-libxml-dir=/usr' '--enable-xml' '--with-system-tzdata' '--with-mhash' '--enable-force-cgi-redirect' '--libdir=/usr/lib64/php' '--enable-pcntl' '--with-imap=shared' '--with-imap-ssl' '--enable-mbstring=shared' '--enable-mbregex' '--with-gd=shared' '--enable-bcmath=shared' '--enable-dba=shared' '--with-db4=/usr' '--with-xmlrpc=shared' '--with-ldap=shared' '--with-ldap-sasl' '--enable-mysqlnd=shared' '--with-mysql=shared,mysqlnd' '--with-mysqli=shared,mysqlnd' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-oci8=shared,instantclient,/usr/lib64/oracle/11.2/client64/lib,11.2' '--with-pdo-oci=shared,instantclient,/usr,11.2' '--with-interbase=shared,/usr/lib64/firebird' '--with-pdo-firebird=shared,/usr/lib64/firebird' '--enable-dom=shared' '--with-pgsql=shared' '--enable-wddx=shared' '--with-snmp=shared,/usr' '--enable-soap=shared' '--with-xsl=shared,/usr' '--enable-xmlreader=shared' '--enable-xmlwriter=shared' '--with-curl=shared,/usr' '--enable-fastcgi' '--enable-pdo=shared' '--with-pdo-odbc=shared,unixODBC,/usr' '--with-pdo-mysql=shared,mysqlnd' '--with-pdo-pgsql=shared,/usr' '--with-pdo-sqlite=shared,/usr' '--with-pdo-dblib=shared,/usr' '--without-sqlite3' '--with-sqlite=shared,/usr' '--enable-json=shared' '--enable-zip=shared' '--without-readline' '--with-libedit' '--with-pspell=shared' '--enable-phar=shared' '--with-mcrypt=shared,/usr' '--with-tidy=shared,/usr' '--with-mssql=shared,/usr' '--enable-sysvmsg=shared' '--enable-sysvshm=shared' '--enable-sysvsem=shared' '--enable-posix=shared' '--with-unixODBC=shared,/usr' '--enable-fileinfo=shared' '--enable-intl=shared' '--with-icu-dir=/usr' '--with-enchant=shared,/usr' '--with-recode=shared,/usr'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc
Loaded Configuration File => /etc/php.ini
Scan this dir for additional .ini files => /etc/php.d
Additional .ini files parsed => /etc/php.d/curl.ini,
/etc/php.d/fileinfo.ini,
/etc/php.d/igbinary.ini,
/etc/php.d/json.ini,
/etc/php.d/memcached.ini,
/etc/php.d/phar.ini,
/etc/php.d/zip.ini,
/etc/php.d/zzz-couchbase.ini

PHP API => 20090626
PHP Extension => 20090626
Zend Extension => 220090626
Zend Extension Build => API220090626,NTS
PHP Extension Build => API20090626,NTS
Debug Build => no
Thread Safety => disabled
Zend Memory Manager => enabled
Zend Multibyte Support => disabled
IPv6 Support => enabled
Registered PHP Streams => https, ftps, compress.zlib, compress.bzip2, php, file, glob, data, http, ftp, phar, zip
Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, sslv3, sslv2, tls
Registered Stream Filters => zlib.*, bzip2.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk


This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies


 _______________________________________________________________________


Configuration

bz2

BZip2 Support => Enabled
Stream Wrapper support => compress.bzip2://
Stream Filter support => bzip2.decompress, bzip2.compress
BZip2 Version => 1.0.3, 15-Feb-2005

calendar

Calendar support => enabled

Core

PHP Version => 5.3.15

Directive => Local Value => Master Value
allow_call_time_pass_reference => Off => Off
allow_url_fopen => On => On
allow_url_include => Off => Off
always_populate_raw_post_data => Off => Off
arg_separator.input => & => &
arg_separator.output => & => &
asp_tags => Off => Off
auto_append_file => no value => no value
auto_globals_jit => On => On
auto_prepend_file => no value => no value
browscap => no value => no value
default_charset => no value => no value
default_mimetype => text/html => text/html
define_syslog_variables => Off => Off
disable_classes => no value => no value
disable_functions => no value => no value
display_errors => Off => Off
display_startup_errors => Off => Off
doc_root => no value => no value
docref_ext => no value => no value
docref_root => no value => no value
enable_dl => Off => Off
error_append_string => no value => no value
error_log => no value => no value
error_prepend_string => no value => no value
error_reporting => 22527 => 22527
exit_on_timeout => Off => Off
expose_php => On => On
extension_dir => /usr/lib64/php/modules => /usr/lib64/php/modules
file_uploads => On => On
highlight.bg => <font style="color: #FFFFFF">#FFFFFF</font> => <font style="color: #FFFFFF">#FFFFFF</font>
highlight.comment => <font style="color: #FF8000">#FF8000</font> => <font style="color: #FF8000">#FF8000</font>
highlight.default => <font style="color: #0000BB">#0000BB</font> => <font style="color: #0000BB">#0000BB</font>
highlight.html => <font style="color: #000000">#000000</font> => <font style="color: #000000">#000000</font>
highlight.keyword => <font style="color: #007700">#007700</font> => <font style="color: #007700">#007700</font>
highlight.string => <font style="color: #DD0000">#DD0000</font> => <font style="color: #DD0000">#DD0000</font>
html_errors => Off => Off
ignore_repeated_errors => Off => Off
ignore_repeated_source => Off => Off
ignore_user_abort => Off => Off
implicit_flush => On => On
include_path => .:/usr/share/pear:/usr/share/php => .:/usr/share/pear:/usr/share/php
log_errors => On => On
log_errors_max_len => 1024 => 1024
magic_quotes_gpc => Off => Off
magic_quotes_runtime => Off => Off
magic_quotes_sybase => Off => Off
mail.add_x_header => On => On
mail.force_extra_parameters => no value => no value
mail.log => no value => no value
max_execution_time => 0 => 0
max_file_uploads => 20 => 20
max_input_nesting_level => 64 => 64
max_input_time => -1 => -1
max_input_vars => 1000 => 1000
memory_limit => 128M => 128M
open_basedir => no value => no value
output_buffering => 0 => 0
output_handler => no value => no value
post_max_size => 8M => 8M
precision => 14 => 14
realpath_cache_size => 16K => 16K
realpath_cache_ttl => 120 => 120
register_argc_argv => On => On
register_globals => Off => Off
register_long_arrays => Off => Off
report_memleaks => On => On
report_zend_debug => Off => Off
request_order => GP => GP
safe_mode => Off => Off
safe_mode_exec_dir => no value => no value
safe_mode_gid => Off => Off
safe_mode_include_dir => no value => no value
sendmail_from => no value => no value
sendmail_path => /usr/sbin/sendmail -t -i => /usr/sbin/sendmail -t -i
serialize_precision => 100 => 100
short_open_tag => Off => Off
SMTP => localhost => localhost
smtp_port => 25 => 25
sql.safe_mode => Off => Off
track_errors => Off => Off
unserialize_callback_func => no value => no value
upload_max_filesize => 2M => 2M
upload_tmp_dir => no value => no value
user_dir => no value => no value
user_ini.cache_ttl => 300 => 300
user_ini.filename => .user.ini => .user.ini
variables_order => GPCS => GPCS
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
y2k_compliance => On => On
zend.enable_gc => On => On

couchbase

couchbase support => enabled
version => 1.0.5
json support => yes
fastlz support => no
zlib support => yes

Directive => Local Value => Master Value
couchbase.compression_factor => 1.3 => 1.3
couchbase.compression_threshold => 2000 => 2000
couchbase.compressor => none => none
couchbase.serializer => php => php

ctype

ctype functions => enabled

curl

cURL support => enabled
cURL Information => 7.15.5
Age => 2
Features
AsynchDNS => No
Debug => No
GSS-Negotiate => Yes
IDN => Yes
IPv6 => Yes
Largefile => Yes
NTLM => Yes
SPNEGO => No
SSL => Yes
SSPI => No
krb4 => No
libz => Yes
CharConv => No
Protocols => tftp, ftp, telnet, dict, ldap, http, file, https, ftps
Host => x86_64-redhat-linux-gnu
SSL Version => OpenSSL/0.9.8b
ZLib Version => 1.2.3

date

date/time support => enabled
"Olson" Timezone Database Version => 0.system
Timezone Database => internal
PHP Warning: Unknown: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in Unknown on line 0
Default timezone => America/Los_Angeles

Directive => Local Value => Master Value
date.default_latitude => 31.7667 => 31.7667
date.default_longitude => 35.2333 => 35.2333
date.sunrise_zenith => 90.583333 => 90.583333
date.sunset_zenith => 90.583333 => 90.583333
date.timezone => no value => no value

ereg

Regex Library => Bundled library enabled

exif

EXIF Support => enabled
EXIF Version => 1.4 $Id$
Supported EXIF Version => 0220
Supported filetypes => JPEG,TIFF

Directive => Local Value => Master Value
exif.decode_jis_intel => JIS => JIS
exif.decode_jis_motorola => JIS => JIS
exif.decode_unicode_intel => UCS-2LE => UCS-2LE
exif.decode_unicode_motorola => UCS-2BE => UCS-2BE
exif.encode_jis => no value => no value
exif.encode_unicode => ISO-8859-15 => ISO-8859-15

fileinfo

fileinfo support => enabled
version => 1.0.5-dev

filter

Input Validation and Filtering => enabled
Revision => $Id: 2b8c730d7dfaa8485d07cd792f0c82852ffe4113 $

Directive => Local Value => Master Value
filter.default => unsafe_raw => unsafe_raw
filter.default_flags => no value => no value

ftp

FTP support => enabled

gettext

GetText Support => enabled

gmp

gmp support => enabled
GMP version => 4.1.4

hash

hash support => enabled
Hashing Engines => md2 md4 md5 sha1 sha224 sha256 sha384 sha512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru snefru256 gost adler32 crc32 crc32b salsa10 salsa20 haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5

iconv

iconv support => enabled
iconv implementation => glibc
iconv library version => 2.5

Directive => Local Value => Master Value
iconv.input_encoding => ISO-8859-1 => ISO-8859-1
iconv.internal_encoding => ISO-8859-1 => ISO-8859-1
iconv.output_encoding => ISO-8859-1 => ISO-8859-1

igbinary

igbinary support => enabled
igbinary version => 1.1.1
igbinary APC serializer ABI => 0

Directive => Local Value => Master Value
igbinary.compact_strings => On => On

json

json support => enabled
json version => 1.2.1

libxml

libXML support => active
libXML Compiled Version => 2.6.26
libXML Loaded Version => 20626
libXML streams => enabled

memcached

memcached support => enabled
Version => 2.1.0
libmemcached version => 1.0.4
Session support => yes
igbinary support => yes
json support => yes

Directive => Local Value => Master Value
memcached.compression_factor => 1.3 => 1.3
memcached.compression_threshold => 2000 => 2000
memcached.compression_type => fastlz => fastlz
memcached.serializer => igbinary => igbinary
memcached.sess_binary => 0 => 0
memcached.sess_lock_wait => 150000 => 150000
memcached.sess_locking => 1 => 1
memcached.sess_prefix => memc.sess.key. => memc.sess.key.

mhash

MHASH support => Enabled
MHASH API Version => Emulated Support

openssl

OpenSSL support => enabled
OpenSSL Library Version => OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
OpenSSL Header Version => OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008

pcntl

pcntl support => enabled

pcre

PCRE (Perl Compatible Regular Expressions) Support => enabled
PCRE Library Version => 8.12 2011-01-15

Directive => Local Value => Master Value
pcre.backtrack_limit => 1000000 => 1000000
pcre.recursion_limit => 100000 => 100000

Phar

Phar: PHP Archive support => enabled
Phar EXT version => 2.0.1
Phar API version => 1.1.1
SVN revision => $Id: f7d08da4ab9e515975840c28b830edc9437c3026 $
Phar-based phar archives => enabled
Tar-based phar archives => enabled
ZIP-based phar archives => enabled
gzip compression => enabled
bzip2 compression => enabled
Native OpenSSL support => enabled


Phar based on pear/PHP_Archive, original concept by Davey Shafik.
Phar fully realized by Gregory Beaver and Marcus Boerger.
Portions of tar implementation Copyright (c) 2003-2009 Tim Kientzle.
Directive => Local Value => Master Value
phar.cache_list => no value => no value
phar.readonly => On => On
phar.require_hash => On => On

Reflection

Reflection => enabled
Version => $Id: e98652ba2326bd9391b730afdaf96c017d9fab48 $

session

Session Support => enabled
Registered save handlers => files user memcached
Registered serializer handlers => php php_binary igbinary

Directive => Local Value => Master Value
session.auto_start => Off => Off
session.bug_compat_42 => Off => Off
session.bug_compat_warn => Off => Off
session.cache_expire => 180 => 180
session.cache_limiter => nocache => nocache
session.cookie_domain => no value => no value
session.cookie_httponly => Off => Off
session.cookie_lifetime => 0 => 0
session.cookie_path => / => /
session.cookie_secure => Off => Off
session.entropy_file => no value => no value
session.entropy_length => 0 => 0
session.gc_divisor => 1000 => 1000
session.gc_maxlifetime => 1440 => 1440
session.gc_probability => 1 => 1
session.hash_bits_per_character => 5 => 5
session.hash_function => 0 => 0
session.name => PHPSESSID => PHPSESSID
session.referer_check => no value => no value
session.save_handler => files => files
session.save_path => /var/lib/php/session => /var/lib/php/session
session.serialize_handler => php => php
session.use_cookies => On => On
session.use_only_cookies => On => On
session.use_trans_sid => 0 => 0

shmop

shmop support => enabled

SimpleXML

Simplexml support => enabled
Revision => $Id: a379111021e24ef020a2eefd8ca830cb1ab5b280 $
Schema support => enabled

sockets

Sockets Support => enabled

SPL

SPL support => enabled
Interfaces => Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject
Classes => AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException

standard

Dynamic Library Support => enabled
Path to sendmail => /usr/sbin/sendmail -t -i

Directive => Local Value => Master Value
assert.active => 1 => 1
assert.bail => 0 => 0
assert.callback => no value => no value
assert.quiet_eval => 0 => 0
assert.warning => 1 => 1
auto_detect_line_endings => 0 => 0
default_socket_timeout => 60 => 60
from => no value => no value
safe_mode_allowed_env_vars => PHP_ => PHP_
safe_mode_protected_env_vars => LD_LIBRARY_PATH => LD_LIBRARY_PATH
url_rewriter.tags => a=href,area=href,frame=src,input=src,form=fakeentry => a=href,area=href,frame=src,input=src,form=fakeentry
user_agent => no value => no value

tokenizer

Tokenizer Support => enabled

xml

XML Support => active
XML Namespace Support => active
libxml2 Version => 2.6.26

zip

Zip => enabled
Extension Version => $Id$
Zip version => 1.11.0
Libzip version => 0.10.1

zlib

ZLib Support => enabled
Stream Wrapper support => compress.zlib://
Stream Filter support => zlib.inflate, zlib.deflate
Compiled Version => 1.2.3
Linked Version => 1.2.3

Directive => Local Value => Master Value
zlib.output_compression => Off => Off
zlib.output_compression_level => -1 => -1
zlib.output_handler => no value => no value

Additional Modules

Module Name
readline

Environment

Variable => Value
HOSTNAME => localhost.localdomain
TERM => xterm-256color
SHELL => /bin/bash
HISTSIZE => 1000
SSH_CLIENT => 10.32.16.37 62308 22
SSH_TTY => /dev/pts/1
USER => root
LS_COLORS =>
SSH_AUTH_SOCK => /tmp/ssh-RpQDiY3683/agent.3683
MAIL => /var/spool/mail/root
PATH => /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
PWD => /usr/share/nginx/html
LANG => en_US.UTF-8
SSH_ASKPASS => /usr/libexec/openssh/gnome-ssh-askpass
SHLVL => 1
HOME => /root
LOGNAME => root
SSH_CONNECTION => 10.32.16.37 62308 10.4.2.14 22
LESSOPEN => |/usr/bin/lesspipe.sh %s
G_BROKEN_FILENAMES => 1
_ => /usr/bin/php
OLDPWD => /root/php-lib

PHP Variables

Variable => Value
_SERVER["HOSTNAME"] => localhost.localdomain
_SERVER["TERM"] => xterm-256color
_SERVER["SHELL"] => /bin/bash
_SERVER["HISTSIZE"] => 1000
_SERVER["SSH_CLIENT"] => 10.32.16.37 62308 22
_SERVER["SSH_TTY"] => /dev/pts/1
_SERVER["USER"] => root
_SERVER["LS_COLORS"] =>
_SERVER["SSH_AUTH_SOCK"] => /tmp/ssh-RpQDiY3683/agent.3683
_SERVER["MAIL"] => /var/spool/mail/root
_SERVER["PATH"] => /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
_SERVER["PWD"] => /usr/share/nginx/html
_SERVER["LANG"] => en_US.UTF-8
_SERVER["SSH_ASKPASS"] => /usr/libexec/openssh/gnome-ssh-askpass
_SERVER["SHLVL"] => 1
_SERVER["HOME"] => /root
_SERVER["LOGNAME"] => root
_SERVER["SSH_CONNECTION"] => 10.32.16.37 62308 10.4.2.14 22
_SERVER["LESSOPEN"] => |/usr/bin/lesspipe.sh %s
_SERVER["G_BROKEN_FILENAMES"] => 1
_SERVER["_"] => /usr/bin/php
_SERVER["OLDPWD"] => /root/php-lib
_SERVER["PHP_SELF"] =>
_SERVER["SCRIPT_NAME"] =>
_SERVER["SCRIPT_FILENAME"] =>
_SERVER["PATH_TRANSLATED"] =>
_SERVER["DOCUMENT_ROOT"] =>
_SERVER["REQUEST_TIME"] => 1351803847
_SERVER["argv"] => Array
(
)

_SERVER["argc"] => 0

PHP License
This program is free software; you can redistribute it and/or modify
it under the terms of the PHP License as published by the PHP Group
and included in the distribution in the file: LICENSE

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

If you did not receive a copy of the PHP license, or have any
questions about PHP licensing, please contact license@php.net.
Comment by Tim Smith [ 02/Nov/12 ]
It doesn't work even when the extension is compiled to use fastlz compression.

I recompiled php-ext-couchbase from git with current libcouchbase code, and configured to include fastlz support. I set couchbase.compressor=fastlz in php.ini. And the couchbase.compression_threshold is at 2000, same as the memcached extension setting.

Excerpt of phpinfo() for the couchbase extension:

couchbase support enabled
version 1.1.0-dp5
json support yes
fastlz support yes
zlib support yes

Directive Local Value Master Value
couchbase.compression_factor 1.3 1.3
couchbase.compression_threshold 2000 2000
couchbase.compressor fastlz fastlz
couchbase.serializer php php

The same test case fails in the same way:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 7598212603105511377 bytes) in /usr/share/nginx/html/cb.php on line 35

Comment by Tim Smith [ 02/Nov/12 ]
By the way, in order to compile with fastlz support, the following patch is needed:

diff --git a/couchbase.c b/couchbase.c
index 240ba3e..f4c14e5 100644
--- a/couchbase.c
+++ b/couchbase.c
@@ -41,6 +41,8 @@
 #include <libcouchbase/couchbase.h>
 #include "php_couchbase.h"
 #ifdef HAVE_COMPRESSION_FASTLZ
+# include "fastlz.h"
+/* Any other code that uses fastlz_* should only include the header */
 # include "fastlz.c"
 #endif
 #ifdef HAVE_COMPRESSION_ZLIB
diff --git a/views.c b/views.c
index 395cc2b..e818473 100644
--- a/views.c
+++ b/views.c
@@ -19,7 +19,7 @@
 #include <libcouchbase/couchbase.h>
 #include "php_couchbase.h"
 #ifdef HAVE_COMPRESSION_FASTLZ
-# include "fastlz.c"
+# include "fastlz.h"
 #endif
 #ifdef HAVE_COMPRESSION_ZLIB
 # include "zlib.h"

Otherwise linking couchbase.so fails because the fastlz functions are defined in more than one place.
Comment by Mark Nunberg [ 02/Nov/12 ]
Fixes for this are in progress.

http://review.couchbase.org/#/c/20604/ (in progress) fixes some of the crazy allocation attempts you've seen.

As for fastlz support, it shouldn't be too difficult to add it on.
Comment by Mark Nunberg [ 06/Nov/12 ]
A binary is attached. It's not compiled against the exact same version of php, but the zend api versions remain the same.

If the binary release doesn't work, I'd be happy to walk someone through building it from source (it's a very simple process -- much simpler than getting this binary built).
Comment by Mark Nunberg [ 06/Nov/12 ]
Note this is for the 1.1-dp php-ext branch. I've yet to backport this to the 1.0 branch
Comment by Matt Ingenthron [ 07/Nov/12 ]
Mark: Please determine if this issue is still valid and help me triage it into the appropriate release. I've assigned it to you for triage, not necessarily to fix it.
Comment by Mark Nunberg [ 07/Nov/12 ]
Awaiting approval on http://review.couchbase.com/22340

The is fixed in the code. Still needs backport to 1.0.x

Assigning back to you
Comment by Mark Nunberg [ 07/Nov/12 ]
http://review.couchbase.org/#/c/22340/ (1.1)
Comment by Matt Ingenthron [ 12/Nov/12 ]
Awaiting verification fix from customer.
Comment by Matt Ingenthron [ 14/Nov/12 ]
Trond: can you take care of backporting this to 1.0.x please?
Comment by Tim Smith [ 15/Nov/12 ]
More detail. I was personally unable to get the build of the latest PHP code to work with the beta2 release. I was hitting the error that is reported on http://www.couchbase.com/issues/browse/CCBC-126 :

Warning: Couchbase::__construct() [couchbase.--construct]: failed to create IO instance in /usr/share/nginx/html/cb.php on line 18

Building from sources let me get past that and actually test the build that the customer was trying. And following from that was a need to deal with LD_LIBRARY_PATH and symlink hacks.


A backport of the fastlz compression fix to 1.0.x, with an official release of that, would be best for this particular user's needs. Can we get an ETA on when that will be available?

Thanks,

Tim
Comment by Trond Norbye [ 16/Nov/12 ]
For 1.0.x: http://review.couchbase.org/#/c/22590/
Comment by Tim Smith [ 16/Nov/12 ]
I've confirmed it to work (using the current 1.0.x branch from github.com/couchbase/php-ext-couchbase).

I had to create a fake /usr/lib64/libvbucket.la to get it to compile: http://www.couchbase.com/issues/browse/CCBC-127

I noticed that compress.c has this redundant (unused) definition:

 92 /* headers which claim an uncompressed size above this figure are bad */
 93 #define DECOMP_SANITY_LIMIT 0x40000000

And this inaccurate comment:

172 /**
173 * sanity check, don't allocate over a GB, we should make this number
174 * smaller though
175 */

Obviously minor cleanup stuff, nothing significant that I can spot.

Would be great to get a 1.0.x package built and available for download with this (and other critical fixes, like PCBC-75) available to customers. Is there an ETA on when that can be done?

Tim
Comment by Matt Ingenthron [ 16/Nov/12 ]
Packages are being uploaded to the site right now. Web page update to follow. Release notes will go up on Monday.




[PCBC-134] Provide more information on connection failure Created: 08/Oct/12  Updated: 11/Feb/13  Resolved: 26/Oct/12

Status: Resolved
Project: Couchbase PHP client library
Component/s: library
Affects Version/s: 1.0.5, 1.1.0-dp4
Fix Version/s: 1.0.6, 1.1.0
Security Level: Public

Type: Bug Priority: Major
Reporter: Dan Andersen Assignee: Michael Jackson
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates PCBC-58 Couchbase.so - constructing Couchbase... Resolved

 Description   
When you connect via the new Couchbase(...) is not a direct way to check for whether the connection failed.

It is not possible to check getResultCode()/getResultMessage() since this provides a unintilized couchbase

 Comments   
Comment by Mark Nunberg [ 08/Oct/12 ]
For this we'd probably need to change the ext code to return a valid couchbase object so that getResultCode can be called on it (to check for connection failures).

For the non-oo variant (couchbase_connect) behavior should remain the same (?)

Additionally, all the code which now checks for the couchbase object to simply exist should be changed to check that the couchbase object is indeed connected (I believe lcb has a function for that, but if not we can set our own little flag in our php_couchbase_ctx structure).

One workaround is to call set_error_handler and make it throw an ErrorException right before instantiation. Then the connection can be done in a try/catch block, with any message being found in $ex->getMessage().

I believe there may be ther workarounds as well
Comment by Michael Jackson [ 09/Oct/12 ]
patch set in progress: http://review.couchbase.org/#/c/21433/
Comment by Michael Jackson [ 09/Oct/12 ]
As a side note, I have a 1.0.x backport of the changes above ready to roll once the master branch changes are approved/merged.
Comment by Michael Jackson [ 10/Oct/12 ]
master branch changeset is merged in. 1.0.x changeset is here: http://review.couchbase.org/#/c/21487/
Comment by Michael Jackson [ 19/Oct/12 ]
(I believe all this needs for resolution is the 1.0.x changeset mentioned above to be merged into 1.0.x branch.)
Comment by Michael Jackson [ 26/Oct/12 ]
1.0.x merged in just now, 1.1 has been in for a bit. Should be present in next released versions.




[PCBC-117] Negative expiry values should throw an error Created: 24/Sep/12  Updated: 26/Sep/12  Resolved: 26/Sep/12

Status: Resolved
Project: Couchbase PHP client library
Component/s: library
Affects Version/s: 1.0.5, 1.1.0-dp4
Fix Version/s: 1.0.6, 1.1.0-dp5
Security Level: Public

Type: Bug Priority: Critical
Reporter: Mark Nunberg Assignee: Michael Jackson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Negative expiry values should throw an error. It is impossible to determine if the user means to disable expiry, or has accidentally make the expiry value too low (which in C-land will cause a wrap-around).

Currently it just wraps around to a time_t (or doesn't throw an error at least).

 Comments   
Comment by Michael Jackson [ 25/Sep/12 ]
1.0.x branch fix and tests for same: http://review.couchbase.org/#/c/21079/
Comment by Michael Jackson [ 26/Sep/12 ]
1.1.x/ master fix for same: http://review.couchbase.org/#/c/21090/

(These may need refactored tests, those will come in a separate issue.)




[PCBC-115] getStats() returns malformed array Created: 14/Sep/12  Updated: 18/Sep/12  Resolved: 17/Sep/12

Status: Resolved
Project: Couchbase PHP client library
Component/s: library
Affects Version/s: 1.0.4
Fix Version/s: 1.0.6, 1.1.0-dp4
Security Level: Public

Type: Bug Priority: Major
Reporter: Michael Jackson Assignee: Michael Jackson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: debian stable x86 32bit


 Description   
The associative array returned by getStats (OO version) / couchbase_get_stats ("ordinary" function version) has malformed array keys similar to the issue observed in PCBC-66. For example, using array_key_exists on "ep_version" returns false, and attempting to reference that array key directly raises and error, even though the key name is visible in the output of a var_dump or similar.

 Comments   
Comment by Michael Jackson [ 14/Sep/12 ]
Fix in http://review.couchbase.org/20864
Comment by Michael Jackson [ 14/Sep/12 ]
(This may need to be ported to master for 1.1 release as well, will examine that shortly.)
Comment by Michael Jackson [ 17/Sep/12 ]
1.1.x fix in http://review.couchbase.org/#/c/20875/
Comment by Michael Jackson [ 17/Sep/12 ]
Fixes merged to 1.0.x and 1.1.x branches.




[PCBC-114] getStats() documentation states incorrect parameter options Created: 12/Sep/12  Updated: 04/Oct/12  Resolved: 04/Oct/12

Status: Resolved
Project: Couchbase PHP client library
Component/s: docs
Affects Version/s: 1.0.4
Fix Version/s: 1.0.6
Security Level: Public

Type: Bug Priority: Minor
Reporter: Michael Jackson Assignee: MC Brown
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
The documentation for the getStats() function states that parameters may be passed to the function to filter the list of returned statistics (e.g. by statistic name). The functions as implemented however ignore any such parameters, and this is in line with the behavior of the pecl-memcached extension as desired (c.f. http://www.php.net/manual/en/memcached.getstats.php). In other words, the parameters information given in the docs should be removed as the implied filtering capabilities do not exist.

 Comments   
Comment by Michael Jackson [ 12/Sep/12 ]
Sorry, the pecl-memcache URL is slightly malformed above, it should be: http://www.php.net/manual/en/memcached.getstats.php
Comment by Matt Ingenthron [ 12/Sep/12 ]
Karen: can you correct this in the API documentation?
Comment by Mark Nunberg [ 12/Sep/12 ]
Currently the only functioning key is 'tap'.. all others will fail.

We should also file a bug for this on libcouchbase which has the same issue
Comment by Karen Zeller [ 12/Sep/12 ]
I don't have permission for here: http://www.php.net/manual/en/memcached.getstats.php

I can fix sample code/explaination in the page for our docs. Where is this?

For the table, I need info once again from MC on the XML tags and IDs for the method signature....
Comment by Matt Ingenthron [ 12/Sep/12 ]
The thing that needs correcting is here:
http://www.couchbase.com/docs/couchbase-sdk-php-1.0/api-reference-stats.html

There is no filtering capability, and there are no parameters.

Please track things down that you need with MC as required.
Comment by Karen Zeller [ 12/Sep/12 ]
I already have a long list of tags in this area where I need explanation for the method signature. Will let him know we need it for this correction.

Comment by Karen Zeller [ 12/Sep/12 ]
I'd like to go over the XML tags in the for SDK method signatures in the next weeks so I can fix this. We went over this quite a while ago for the Ruby....
Comment by Karen Zeller [ 12/Sep/12 ]
I just assigned this to MC to set aside some time to explain how to do the method signature with the XML tags using this as an example.
Comment by MC Brown [ 13/Sep/12 ]
Change the entry for the PHP <dcall> from 'inherit="all"' to 'inherit="none"'; that will stop it inheriting the argument list of the top level protocol interface so that the PHP function has no arguments.
Comment by MC Brown [ 04/Oct/12 ]
I've changed this in the docs.




[PCBC-113] getMulti() returns "broken" array Created: 10/Sep/12  Updated: 10/Sep/12  Resolved: 10/Sep/12

Status: Resolved
Project: Couchbase PHP client library
Component/s: library
Affects Version/s: 1.0.5
Fix Version/s: 1.0.6
Security Level: Public

Type: Bug Priority: Blocker
Reporter: Benjamin Young Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
The array's returned by getMulti() are not correctly keyed or are in some other way broken. When one tries to reference the key via it's name, an "undefined index" error is returned. array_key_exists() also returns false.

This paste has some sample code:
https://friendpaste.com/MJS2O8G5b7kRqslp2pMBo

Both the top and bottom cases should end in bool(true).


avsej mentioned in IRC that these two portions of code should be compared:
https://github.com/couchbase/php-ext-couchbase/blob/master/couchbase.c#L940
https://github.com/php-memcached-dev/php-memcached/blob/master/php_memcached.c#L828

Thanks for digging into this issue.

 Comments   
Comment by Mark Nunberg [ 10/Sep/12 ]
PCBC-66 fixed only for getMulti but not setMulti which suffers from the same bug.




[PCBC-108] version() returns the library version, not server version Created: 02/Sep/12  Updated: 18/Sep/12  Resolved: 17/Sep/12

Status: Resolved
Project: Couchbase PHP client library
Component/s: docs
Affects Version/s: 1.1.0-dp2
Fix Version/s: 1.0.6, 1.1.0-dp4, 1.1.0
Security Level: Public

Type: Bug Priority: Major
Reporter: Mark Nunberg Assignee: Michael Jackson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Documentation wrongly states that version returns the version of the server; this in fact returns the version of the library

 Comments   
Comment by Michael Jackson [ 14/Sep/12 ]
Fix in http://review.couchbase.org/#/c/20862/
Comment by Michael Jackson [ 14/Sep/12 ]
(Note: the above is for 1.0.x, a port to 1.1 is forthcoming.)
Comment by Michael Jackson [ 17/Sep/12 ]
1.1 branch fix in http://review.couchbase.org/#/c/20875/
Comment by Michael Jackson [ 17/Sep/12 ]
Change merged into 1.0.x and 1.1 branches.




[PCBC-97] tests 006.phpt and 007.phpt fail on multiple nodes owing to how they compare multi results Created: 10/Aug/12  Updated: 05/Sep/12  Resolved: 05/Sep/12

Status: Resolved
Project: Couchbase PHP client library
Component/s: library
Affects Version/s: 1.0.5
Fix Version/s: 1.0.6
Security Level: Public

Type: Bug Priority: Minor
Reporter: Matt Ingenthron Assignee: Mark Nunberg
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Currently, in tests 006 and 007, we rely on serialize of multiget responses to make a comparison. Since the results can be in a different order, this will frequently make tests fail.

For example, here's some dump output of v and keys in 006:

v is
string(414) "a:6:{s:23:"couchbase_5025a95b7b7dd";s:29:"couchbase_value_5025a95b7b7e5";s:23:"couchbase_5025a95b7b7bc";s:29:"couchbase_value_5025a95b7b7c8";s:23:"couchbase_5025a95b7b7f2";s:29:"couchbase_value_5025a95b7b7f9";s:23:"couchbase_5025a95b7b801";s:29:"couchbase_value_5025a95b7b807";s:23:"couchbase_5025a95b7b81c";s:29:"couchbase_value_5025a95b7b823";s:23:"couchbase_5025a95b7b80f";s:29:"couchbase_value_5025a95b7b815";}"
keys is
string(414) "a:6:{s:23:"couchbase_5025a95b7b7bc";s:29:"couchbase_value_5025a95b7b7c8";s:23:"couchbase_5025a95b7b7dd";s:29:"couchbase_value_5025a95b7b7e5";s:23:"couchbase_5025a95b7b7f2";s:29:"couchbase_value_5025a95b7b7f9";s:23:"couchbase_5025a95b7b801";s:29:"couchbase_value_5025a95b7b807";s:23:"couchbase_5025a95b7b80f";s:29:"couchbase_value_5025a95b7b815";s:23:"couchbase_5025a95b7b81c";s:29:"couchbase_value_5025a95b7b823";}"


Note that the same stuff is there, it's just not in the same order. In a single node cluster, it comes back in the same order but the results race for position in a multi-node cluster.

 Comments   
Comment by Michael Nitschinger [ 25/Aug/12 ]
See http://review.couchbase.com/#/c/20162/
Comment by Mark Nunberg [ 05/Sep/12 ]
Moving to the phpunit based test suite, where all this stuff is fixed.




[PCBC-75] segfault when using persistent connections Created: 17/Jun/12  Updated: 18/Sep/12  Resolved: 10/Sep/12

Status: Resolved
Project: Couchbase PHP client library
Component/s: library
Affects Version/s: 1.0.4, 1.0.5
Fix Version/s: 1.0.6, 1.1.0-dp4
Security Level: Public

Type: Bug Priority: Major
Reporter: Matt Ingenthron Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: CentOS 5.8 w/ php 5.3.3; Mac OS 10.6 w/ php 5.3.8

Issue Links:
Duplicate

 Description   
When configuring the PHP client for persistent connections, a segmentation fault is seen upon the second request for a connection within an Apache MPM environment.

The test script is as follows:

<?php

$iterations = 1;
$time_start = microtime(true);
//$cb = new Couchbase("192.168.1.200:8091"); // uses the default bucket
$cb = new Couchbase("192.168.1.200:8091", "newcachebucket", "password", "newcachebucket", true); // uses the default bucket

for ($i = 1; $i <=$iterations; $i++) {
  $cb->set("a" . $i, 1);
  //var_dump($cb->get("a" . $i));
  $cb->get("a" . $i);
}

$time_end = microtime(true);
$time = $time_end - $time_start;

echo "Did $iterations iterations in $time seconds\n";


If making a request of this script with curl, I see the following:
[root@centosb httpd]# for i in {1..16}; do curl http://localhost/;done
Did 1 iterations in 0.009458065032959 seconds

Did 1 iterations in 0.0088930130004883 seconds

Did 1 iterations in 0.0089321136474609 seconds

Did 1 iterations in 0.0089690685272217 seconds

Did 1 iterations in 0.0090639591217041 seconds

Did 1 iterations in 0.0095789432525635 seconds

Did 1 iterations in 0.0090429782867432 seconds

Did 1 iterations in 0.0094709396362305 seconds

curl: (52) Empty reply from server
curl: (52) Empty reply from server
curl: (52) Empty reply from server
curl: (52) Empty reply from server
curl: (52) Empty reply from server
curl: (52) Empty reply from server
curl: (52) Empty reply from server
curl: (52) Empty reply from server

The error_log shows lots of:
[Sun Jun 17 19:22:32 2012] [notice] child pid 2031 exit signal Segmentation fault (11)


 Comments   
Comment by Matt Ingenthron [ 17/Jun/12 ]
I have been able to reproduce this with a simple script that just tries to create the connection twice with persistent connections to two variables. It will crash after printing out the first message about iterations. I gathered a bit of info under gdb. This is CentOS 5.8, 64-bit.

The script:
<?php

$iterations = 1;
//$cb = new Couchbase("192.168.1.200:8091"); // uses the default bucket
//$cb = new Couchbase("192.168.1.200:8091", "newcachebucket", "password", "newcachebucket", true); // uses the default bucket
$cb = new Couchbase("192.168.1.200:8091", "default", "", "default", true); // uses the default bucket


$time_start = microtime(true);

for ($i = 1; $i <=$iterations; $i++) {
  $cb->set("a" . $i, 1);
  //var_dump($cb->get("a" . $i));
  $cb->get("a" . $i);
}


$time_end = microtime(true);
$time = $time_end - $time_start;

echo "Did $iterations iterations in $time seconds\n";

$cb2 = new Couchbase("192.168.1.200:8091", "default", "", "default", true); // uses the default bucket
$result = $cb->get("a1");

echo "Got a $result";


A gdb session:
(gdb) run rebuildconn.php
Starting program: /usr/bin/php rebuildconn.php
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x2aaaaaaab000
[Thread debugging using libthread_db enabled]
Did 1 iterations in 0.0008080005645752 seconds

Program received signal SIGSEGV, Segmentation fault.
0x000000000057bb57 in ?? ()
(gdb) bt
#0 0x000000000057bb57 in ?? ()
#1 0x00002aaaae90c588 in php_couchbase_create_impl (ht=<value optimized out>,
    return_value=0xaa3fc8, return_value_ptr=<value optimized out>,
    this_ptr=0xaa39e0, return_value_used=<value optimized out>, oo=1)
    at /home/sdkbuild/workspace/php-ext-couchbase-1.0/label/sdk_centos55_64/couchbase.c:1301
#2 0x00000000005e7889 in ?? ()
#3 0x00000000005bd94b in execute ()
#4 0x0000000000599ef5 in zend_execute_scripts ()
#5 0x000000000054ad18 in php_execute_script ()
#6 0x0000000000622c7e in ?? ()
#7 0x0000003fcfe1d994 in __libc_start_main () from /lib64/libc.so.6
#8 0x0000000000421789 in _start ()
Comment by Matt Ingenthron [ 17/Jun/12 ]
gdb on Mac OS had more symbols and thus was more helpful in pointing out the error:

Reading symbols for shared libraries warning: Could not find object file "/private/tmp/homebrew-libcouchbase-2-iCQa/libcouchbase-1.1.0dp2/src/.libs/libcouchbase_libevent_la-plugin-libevent.o" - no debug information available for "src/plugin-libevent.c".

.. done
Did 1 iterations in 0.0047118663787842 seconds

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x00000002028e2370
0x000000010031ef3a in _zend_mm_free_int ()
(gdb) bt
#0 0x000000010031ef3a in _zend_mm_free_int ()
#1 0x0000000100d54357 in php_couchbase_create_impl ()
#2 0x000000010035fcf3 in zend_do_fcall_common_helper_SPEC ()
#3 0x000000010035f301 in execute ()
#4 0x000000010033a50c in zend_execute_scripts ()
#5 0x00000001002ebbdd in php_execute_script ()
#6 0x00000001003b7a30 in main ()

Looks like we're trying to free something already null?
Comment by Xinchen Hui [ 18/Jun/12 ]
I am so sorry for this mistake.

since I have lost a lot behind the gerrit, I give the fix here.

change the couchbase.c

 if (LIBCOUCHBASE_SUCCESS != (retval = libcouchbase_get_last_error(handle))) {
                                if (url) {
                                        php_url_free(url);
                                }
                                php_error_docref(NULL TSRMLS_CC, E_WARNING,
                                                "Failed to connect libcouchbase to server: %s", libcouchbase_strerror(handle, retval));
                                libcouchbase_destroy(handle);
                                pefree(couchbase_res, persistent); //<- notice here, change the efree to this (pefree)
                                RETURN_FALSE;
                        }


thanks
Comment by Brian Gruber [ 02/Jul/12 ]
I still get a segfault if I use the modified code, so currently, I can't use the php library in production because it is SOOO much slower than memcached module.
Comment by Matt Ingenthron [ 02/Jul/12 ]
Brian: I have a tested fix which has excellent performance in my testing. Any chance I can pass you some bits and you can verify them for me? We'll be spinning this into a release here soon, and I'd appreciate your feedback on it as well.

Just comment here and let me know which OS/Architecture, and I'll email some bits to you.
Comment by Sergey Avseyev [ 10/Aug/12 ]
http://review.couchbase.org/17386
Comment by Matt Ingenthron [ 12/Aug/12 ]
Fixed by Xinchen, integrated by me.
Comment by Tim Smith [ 06/Sep/12 ]
This bug is still present in version 1.0.5. When creating a connection as follows:

$user = "default";
$password = "";
$bucketName = "default";
$persistConnection = true;
$cb = new Couchbase("127.0.0.1:8091", $user, $password, $bucketName, $persistConnection);

Here is a stack trace from GDB attached to the php-fpm process:

[root@localhost html]# ps auxww|grep php
root 24805 0.0 0.0 97000 3988 pts/1 T 07:41 0:00 vim cb.php
root 25189 0.0 0.0 97012 4024 pts/2 T 09:27 0:00 vim /usr/share/nginx/html/cb.php
root 25254 0.0 0.0 139460 3160 ? Ss 09:34 0:00 php-fpm: master process (/etc/php-fpm.conf)
apache 25256 0.0 0.0 143932 4452 ? S 09:34 0:00 php-fpm: pool www
apache 25257 0.0 0.0 143932 4452 ? S 09:34 0:00 php-fpm: pool www
apache 25259 0.0 0.0 143932 4452 ? S 09:34 0:00 php-fpm: pool www
apache 25260 0.0 0.0 143932 4452 ? S 09:34 0:00 php-fpm: pool www
apache 25261 0.0 0.0 139460 2852 ? S 09:34 0:00 php-fpm: pool www
apache 25262 0.0 0.0 139460 2852 ? S 09:34 0:00 php-fpm: pool www
root 25264 0.0 0.0 61192 768 pts/1 S+ 09:34 0:00 grep php
[root@localhost html]# gdb -p 25257
GNU gdb (GDB) CentOS (7.0.1-42.el5.centos)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Attaching to process 25257
Reading symbols from /usr/sbin/php-fpm...(no debugging symbols found)...done.
Reading symbols from /lib64/libcrypt.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/libcrypt.so.1
Reading symbols from /usr/lib64/libgmp.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libgmp.so.3
Reading symbols from /usr/lib64/libbz2.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libbz2.so.1
Reading symbols from /lib64/libz.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/libz.so.1
Reading symbols from /lib64/librt.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/librt.so.1
Reading symbols from /lib64/libm.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib64/libm.so.6
Reading symbols from /lib64/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/libdl.so.2
Reading symbols from /lib64/libnsl.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/libnsl.so.1
Reading symbols from /usr/lib64/libxml2.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libxml2.so.2
Reading symbols from /usr/lib64/libgssapi_krb5.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libgssapi_krb5.so.2
Reading symbols from /usr/lib64/libkrb5.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libkrb5.so.3
Reading symbols from /usr/lib64/libk5crypto.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libk5crypto.so.3
Reading symbols from /lib64/libcom_err.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/libcom_err.so.2
Reading symbols from /lib64/libssl.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib64/libssl.so.6
Reading symbols from /lib64/libcrypto.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib64/libcrypto.so.6
Reading symbols from /lib64/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib64/libc.so.6
Reading symbols from /lib64/libresolv.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/libresolv.so.2
Reading symbols from /lib64/libpthread.so.0...(no debugging symbols found)...done.
[Thread debugging using libthread_db enabled]
Loaded symbols for /lib64/libpthread.so.0
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /usr/lib64/libkrb5support.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libkrb5support.so.0
Reading symbols from /lib64/libkeyutils.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/libkeyutils.so.1
Reading symbols from /lib64/libselinux.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/libselinux.so.1
Reading symbols from /lib64/libsepol.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/libsepol.so.1
Reading symbols from /usr/lib64/php/modules/curl.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/php/modules/curl.so
Reading symbols from /usr/lib64/libcurl.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libcurl.so.3
Reading symbols from /usr/lib64/libidn.so.11...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libidn.so.11
Reading symbols from /usr/lib64/php/modules/fileinfo.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/php/modules/fileinfo.so
Reading symbols from /usr/lib64/php/modules/json.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/php/modules/json.so
Reading symbols from /usr/lib64/php/modules/phar.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/php/modules/phar.so
Reading symbols from /usr/lib64/php/modules/zip.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/php/modules/zip.so
Reading symbols from /root/php-lib/php-ext-couchbase/couchbase.so...done.
Loaded symbols for /root/php-lib/php-ext-couchbase/couchbase.so
Reading symbols from /usr/lib64/libcouchbase.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libcouchbase.so.1
Reading symbols from /usr/lib64/libvbucket.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libvbucket.so.1
Reading symbols from /lib64/libnss_files.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/libnss_files.so.2
Reading symbols from /usr/lib64/libcouchbase_libevent.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libcouchbase_libevent.so.1
Reading symbols from /usr/lib64/libevent-1.4.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libevent-1.4.so.2

warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7fff63eaf000
0x0000003407cd3a70 in __accept_nocancel () from /lib64/libc.so.6
(gdb) c
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x00000000005a064b in ?? ()
(gdb) thread apply all bt full

Thread 1 (Thread 0x2b050e0dfff0 (LWP 25257)):
#0 0x00000000005a064b in ?? ()
No symbol table info available.
#1 0x00002b05123fab17 in php_couchbase_create_impl (
    ht=<value optimized out>, return_value=0x2f23a30,
    return_value_ptr=<value optimized out>, this_ptr=0x2f237c8,
    return_value_used=<value optimized out>, oo=1)
    at /home/sdkbuild/workspace/php-ext-couchbase-1.0/label/sdk_centos55_64/couchbase.c:1539
        handle = <value optimized out>
        retval = 49429160
        ctx = 0x5
        iops = <value optimized out>
        couchbase_res = 0x2f4f5a0
        hashed_key = 0x2f23b08 ""
        hashed_key_len = 41
        user = 0x2f24c70 "default"
        passwd = 0x2f23650 ""
        bucket = 0x2f23708 "default"
        user_len = 7
        passwd_len = 0
        bucket_len = 7
        persistent = 1 '\001'
        zvhosts = 0x2f239e0
        cparams = {nodes = 0x2f23a60, tail = 0x2f23a60,
          host_string = 0x2f23aa8 "\370:\362\002",
          bucket = 0x2f23708 "default", username = 0x2f24c70 "default",
          password = 0x0}
#2 0x00000000005e6829 in ?? ()
No symbol table info available.
#3 0x00000000005e592b in execute ()
No symbol table info available.
#4 0x00000000005bed65 in zend_execute_scripts ()
No symbol table info available.
#5 0x000000000056e3b8 in php_execute_script ()
No symbol table info available.
#6 0x0000000000650db4 in ?? ()
No symbol table info available.
#7 0x0000003407c1d994 in __libc_start_main () from /lib64/libc.so.6
No symbol table info available.
---Type <return> to continue, or q <return> to quit---
#8 0x00000000004220b9 in _start ()
No symbol table info available.
(gdb)
Comment by Tim Smith [ 06/Sep/12 ]
In case it's helpful, here is phpinfo():


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<style type="text/css">
body {background-color: #ffffff; color: #000000;}
body, td, th, h1, h2 {font-family: sans-serif;}
pre {margin: 0px; font-family: monospace;}
a:link {color: #000099; text-decoration: none; background-color: #ffffff;}
a:hover {text-decoration: underline;}
table {border-collapse: collapse;}
.center {text-align: center;}
.center table { margin-left: auto; margin-right: auto; text-align: left;}
.center th { text-align: center !important; }
td, th { border: 1px solid #000000; font-size: 75%; vertical-align: baseline;}
h1 {font-size: 150%;}
h2 {font-size: 125%;}
.p {text-align: left;}
.e {background-color: #ccccff; font-weight: bold; color: #000000;}
.h {background-color: #9999cc; font-weight: bold; color: #000000;}
.v {background-color: #cccccc; color: #000000;}
.vr {background-color: #cccccc; text-align: right; color: #000000;}
img {float: right; border: 0px;}
hr {width: 600px; background-color: #cccccc; border: 0px; height: 1px; color: #000000;}
</style>
<title>phpinfo()</title><meta name="ROBOTS" content="NOINDEX,NOFOLLOW,NOARCHIVE" /></head>
<body><div class="center">
<table border="0" cellpadding="3" width="600">
<tr class="h"><td>
<a href="http://www.php.net/"><img border="0" src="/info.php?=PHPE9568F34-D428-11d2-A769-00AA001ACF42" alt="PHP Logo" /></a><h1 class="p">PHP Version 5.3.15</h1>
</td></tr>
</table><br />
<table border="0" cellpadding="3" width="600">
<tr><td class="e">System </td><td class="v">Linux localhost.localdomain 2.6.18-308.4.1.el5 #1 SMP Tue Apr 17 17:08:00 EDT 2012 x86_64 </td></tr>
<tr><td class="e">Build Date </td><td class="v">Jul 20 2012 13:12:10 </td></tr>
<tr><td class="e">Configure Command </td><td class="v"> &#039;./configure&#039; &#039;--build=x86_64-redhat-linux-gnu&#039; &#039;--host=x86_64-redhat-linux-gnu&#039; &#039;--target=x86_64-redhat-linux-gnu&#039; &#039;--program-prefix=&#039; &#039;--prefix=/usr&#039; &#039;--exec-prefix=/usr&#039; &#039;--bindir=/usr/bin&#039; &#039;--sbindir=/usr/sbin&#039; &#039;--sysconfdir=/etc&#039; &#039;--datadir=/usr/share&#039; &#039;--includedir=/usr/include&#039; &#039;--libdir=/usr/lib64&#039; &#039;--libexecdir=/usr/libexec&#039; &#039;--localstatedir=/var&#039; &#039;--sharedstatedir=/usr/com&#039; &#039;--mandir=/usr/share/man&#039; &#039;--infodir=/usr/share/info&#039; &#039;--cache-file=../config.cache&#039; &#039;--with-libdir=lib64&#039; &#039;--with-config-file-path=/etc&#039; &#039;--with-config-file-scan-dir=/etc/php.d&#039; &#039;--disable-debug&#039; &#039;--with-pic&#039; &#039;--disable-rpath&#039; &#039;--without-pear&#039; &#039;--with-bz2&#039; &#039;--with-exec-dir=/usr/bin&#039; &#039;--with-freetype-dir=/usr&#039; &#039;--with-png-dir=/usr&#039; &#039;--with-xpm-dir=/usr&#039; &#039;--enable-gd-native-ttf&#039; &#039;--with-t1lib=/usr&#039; &#039;--without-gdbm&#039; &#039;--with-gettext&#039; &#039;--with-gmp&#039; &#039;--with-iconv&#039; &#039;--with-jpeg-dir=/usr&#039; &#039;--with-openssl&#039; &#039;--with-zlib&#039; &#039;--with-layout=GNU&#039; &#039;--enable-exif&#039; &#039;--enable-ftp&#039; &#039;--enable-magic-quotes&#039; &#039;--enable-sockets&#039; &#039;--with-kerberos&#039; &#039;--enable-ucd-snmp-hack&#039; &#039;--enable-shmop&#039; &#039;--enable-calendar&#039; &#039;--with-libxml-dir=/usr&#039; &#039;--enable-xml&#039; &#039;--with-system-tzdata&#039; &#039;--with-mhash&#039; &#039;--enable-fpm&#039; &#039;--libdir=/usr/lib64/php&#039; &#039;--without-mysql&#039; &#039;--disable-pdo&#039; &#039;--without-gd&#039; &#039;--disable-dom&#039; &#039;--disable-dba&#039; &#039;--without-unixODBC&#039; &#039;--disable-xmlreader&#039; &#039;--disable-xmlwriter&#039; &#039;--without-sqlite&#039; &#039;--without-sqlite3&#039; &#039;--disable-phar&#039; &#039;--disable-fileinfo&#039; &#039;--disable-json&#039; &#039;--without-pspell&#039; &#039;--disable-wddx&#039; &#039;--without-curl&#039; &#039;--disable-posix&#039; &#039;--disable-sysvmsg&#039; &#039;--disable-sysvshm&#039; &#039;--disable-sysvsem&#039; </td></tr>
<tr><td class="e">Server API </td><td class="v">FPM/FastCGI </td></tr>
<tr><td class="e">Virtual Directory Support </td><td class="v">disabled </td></tr>
<tr><td class="e">Configuration File (php.ini) Path </td><td class="v">/etc </td></tr>
<tr><td class="e">Loaded Configuration File </td><td class="v">/etc/php.ini </td></tr>
<tr><td class="e">Scan this dir for additional .ini files </td><td class="v">/etc/php.d </td></tr>
<tr><td class="e">Additional .ini files parsed </td><td class="v">/etc/php.d/curl.ini,
/etc/php.d/fileinfo.ini,
/etc/php.d/json.ini,
/etc/php.d/phar.ini,
/etc/php.d/zip.ini,
/etc/php.d/zzz-couchbase.ini
 </td></tr>
<tr><td class="e">PHP API </td><td class="v">20090626 </td></tr>
<tr><td class="e">PHP Extension </td><td class="v">20090626 </td></tr>
<tr><td class="e">Zend Extension </td><td class="v">220090626 </td></tr>
<tr><td class="e">Zend Extension Build </td><td class="v">API220090626,NTS </td></tr>
<tr><td class="e">PHP Extension Build </td><td class="v">API20090626,NTS </td></tr>
<tr><td class="e">Debug Build </td><td class="v">no </td></tr>
<tr><td class="e">Thread Safety </td><td class="v">disabled </td></tr>
<tr><td class="e">Zend Memory Manager </td><td class="v">enabled </td></tr>
<tr><td class="e">Zend Multibyte Support </td><td class="v">disabled </td></tr>
<tr><td class="e">IPv6 Support </td><td class="v">enabled </td></tr>
<tr><td class="e">Registered PHP Streams </td><td class="v">https, ftps, compress.zlib, compress.bzip2, php, file, glob, data, http, ftp, phar, zip </td></tr>
<tr><td class="e">Registered Stream Socket Transports </td><td class="v">tcp, udp, unix, udg, ssl, sslv3, sslv2, tls </td></tr>
<tr><td class="e">Registered Stream Filters </td><td class="v">zlib.*, bzip2.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk </td></tr>
</table><br />
<table border="0" cellpadding="3" width="600">
<tr class="v"><td>
<a href="http://www.zend.com/"><img border="0" src="/info.php?=PHPE9568F35-D428-11d2-A769-00AA001ACF42" alt="Zend logo" /></a>
This program makes use of the Zend Scripting Language Engine:<br />Zend&nbsp;Engine&nbsp;v2.3.0,&nbsp;Copyright&nbsp;(c)&nbsp;1998-2012&nbsp;Zend&nbsp;Technologies<br /></td></tr>
</table><br />
<hr />
<h1><a href="/info.php?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000">PHP Credits</a></h1>
<hr />
<h1>Configuration</h1>
<h2><a name="module_bz2">bz2</a></h2>
<table border="0" cellpadding="3" width="600">
<tr><td class="e">BZip2 Support </td><td class="v">Enabled </td></tr>
<tr><td class="e">Stream Wrapper support </td><td class="v">compress.bzip2:// </td></tr>
<tr><td class="e">Stream Filter support </td><td class="v">bzip2.decompress, bzip2.compress </td></tr>
<tr><td class="e">BZip2 Version </td><td class="v">1.0.3, 15-Feb-2005 </td></tr>
</table><br />
<h2><a name="module_calendar">calendar</a></h2>
<table border="0" cellpadding="3" width="600">
<tr><td class="e">Calendar support </td><td class="v">enabled </td></tr>
</table><br />
<h2><a name="module_cgi-fcgi">cgi-fcgi</a></h2>
<table border="0" cellpadding="3" width="600">
<tr><td class="e">php-fpm </td><td class="v">active </td></tr>
</table><br />
<table border="0" cellpadding="3" width="600">
<tr class="h"><th>Directive</th><th>Local Value</th><th>Master Value</th></tr>
<tr><td class="e">cgi.discard_path</td><td class="v">0</td><td class="v">0</td></tr>
<tr><td class="e">cgi.fix_pathinfo</td><td class="v">1</td><td class="v">1</td></tr>
<tr><td class="e">cgi.force_redirect</td><td class="v">1</td><td class="v">1</td></tr>
<tr><td class="e">cgi.nph</td><td class="v">0</td><td class="v">0</td></tr>
<tr><td class="e">cgi.redirect_status_env</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">cgi.rfc2616_headers</td><td class="v">0</td><td class="v">0</td></tr>
<tr><td class="e">fastcgi.error_header</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">fastcgi.logging</td><td class="v">1</td><td class="v">1</td></tr>
<tr><td class="e">fpm.config</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
</table><br />
<h2><a name="module_Core">Core</a></h2>
<table border="0" cellpadding="3" width="600">
<tr><td class="e">PHP Version </td><td class="v">5.3.15 </td></tr>
</table><br />
<table border="0" cellpadding="3" width="600">
<tr class="h"><th>Directive</th><th>Local Value</th><th>Master Value</th></tr>
<tr><td class="e">allow_call_time_pass_reference</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">allow_url_fopen</td><td class="v">On</td><td class="v">On</td></tr>
<tr><td class="e">allow_url_include</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">always_populate_raw_post_data</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">arg_separator.input</td><td class="v">&amp;</td><td class="v">&amp;</td></tr>
<tr><td class="e">arg_separator.output</td><td class="v">&amp;</td><td class="v">&amp;</td></tr>
<tr><td class="e">asp_tags</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">auto_append_file</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">auto_globals_jit</td><td class="v">On</td><td class="v">On</td></tr>
<tr><td class="e">auto_prepend_file</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">browscap</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">default_charset</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">default_mimetype</td><td class="v">text/html</td><td class="v">text/html</td></tr>
<tr><td class="e">define_syslog_variables</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">disable_classes</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">disable_functions</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">display_errors</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">display_startup_errors</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">doc_root</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">docref_ext</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">docref_root</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">enable_dl</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">error_append_string</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">error_log</td><td class="v">/var/log/php-fpm/www-error.log</td><td class="v">/var/log/php-fpm/www-error.log</td></tr>
<tr><td class="e">error_prepend_string</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">error_reporting</td><td class="v">22527</td><td class="v">22527</td></tr>
<tr><td class="e">exit_on_timeout</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">expose_php</td><td class="v">On</td><td class="v">On</td></tr>
<tr><td class="e">extension_dir</td><td class="v">/usr/lib64/php/modules</td><td class="v">/usr/lib64/php/modules</td></tr>
<tr><td class="e">file_uploads</td><td class="v">On</td><td class="v">On</td></tr>
<tr><td class="e">highlight.bg</td><td class="v"><font style="color: #FFFFFF">#FFFFFF</font></td><td class="v"><font style="color: #FFFFFF">#FFFFFF</font></td></tr>
<tr><td class="e">highlight.comment</td><td class="v"><font style="color: #FF8000">#FF8000</font></td><td class="v"><font style="color: #FF8000">#FF8000</font></td></tr>
<tr><td class="e">highlight.default</td><td class="v"><font style="color: #0000BB">#0000BB</font></td><td class="v"><font style="color: #0000BB">#0000BB</font></td></tr>
<tr><td class="e">highlight.html</td><td class="v"><font style="color: #000000">#000000</font></td><td class="v"><font style="color: #000000">#000000</font></td></tr>
<tr><td class="e">highlight.keyword</td><td class="v"><font style="color: #007700">#007700</font></td><td class="v"><font style="color: #007700">#007700</font></td></tr>
<tr><td class="e">highlight.string</td><td class="v"><font style="color: #DD0000">#DD0000</font></td><td class="v"><font style="color: #DD0000">#DD0000</font></td></tr>
<tr><td class="e">html_errors</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">ignore_repeated_errors</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">ignore_repeated_source</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">ignore_user_abort</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">implicit_flush</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">include_path</td><td class="v">.:/usr/share/pear:/usr/share/php</td><td class="v">.:/usr/share/pear:/usr/share/php</td></tr>
<tr><td class="e">log_errors</td><td class="v">On</td><td class="v">On</td></tr>
<tr><td class="e">log_errors_max_len</td><td class="v">1024</td><td class="v">1024</td></tr>
<tr><td class="e">magic_quotes_gpc</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">magic_quotes_runtime</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">magic_quotes_sybase</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">mail.add_x_header</td><td class="v">On</td><td class="v">On</td></tr>
<tr><td class="e">mail.force_extra_parameters</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">mail.log</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">max_execution_time</td><td class="v">30</td><td class="v">30</td></tr>
<tr><td class="e">max_file_uploads</td><td class="v">20</td><td class="v">20</td></tr>
<tr><td class="e">max_input_nesting_level</td><td class="v">64</td><td class="v">64</td></tr>
<tr><td class="e">max_input_time</td><td class="v">60</td><td class="v">60</td></tr>
<tr><td class="e">max_input_vars</td><td class="v">1000</td><td class="v">1000</td></tr>
<tr><td class="e">memory_limit</td><td class="v">128M</td><td class="v">128M</td></tr>
<tr><td class="e">open_basedir</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">output_buffering</td><td class="v">4096</td><td class="v">4096</td></tr>
<tr><td class="e">output_handler</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">post_max_size</td><td class="v">8M</td><td class="v">8M</td></tr>
<tr><td class="e">precision</td><td class="v">14</td><td class="v">14</td></tr>
<tr><td class="e">realpath_cache_size</td><td class="v">16K</td><td class="v">16K</td></tr>
<tr><td class="e">realpath_cache_ttl</td><td class="v">120</td><td class="v">120</td></tr>
<tr><td class="e">register_argc_argv</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">register_globals</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">register_long_arrays</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">report_memleaks</td><td class="v">On</td><td class="v">On</td></tr>
<tr><td class="e">report_zend_debug</td><td class="v">On</td><td class="v">On</td></tr>
<tr><td class="e">request_order</td><td class="v">GP</td><td class="v">GP</td></tr>
<tr><td class="e">safe_mode</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">safe_mode_exec_dir</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">safe_mode_gid</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">safe_mode_include_dir</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">sendmail_from</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">sendmail_path</td><td class="v">/usr/sbin/sendmail&nbsp;-t&nbsp;-i</td><td class="v">/usr/sbin/sendmail&nbsp;-t&nbsp;-i</td></tr>
<tr><td class="e">serialize_precision</td><td class="v">100</td><td class="v">100</td></tr>
<tr><td class="e">short_open_tag</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">SMTP</td><td class="v">localhost</td><td class="v">localhost</td></tr>
<tr><td class="e">smtp_port</td><td class="v">25</td><td class="v">25</td></tr>
<tr><td class="e">sql.safe_mode</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">track_errors</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">unserialize_callback_func</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">upload_max_filesize</td><td class="v">2M</td><td class="v">2M</td></tr>
<tr><td class="e">upload_tmp_dir</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">user_dir</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">user_ini.cache_ttl</td><td class="v">300</td><td class="v">300</td></tr>
<tr><td class="e">user_ini.filename</td><td class="v">.user.ini</td><td class="v">.user.ini</td></tr>
<tr><td class="e">variables_order</td><td class="v">GPCS</td><td class="v">GPCS</td></tr>
<tr><td class="e">xmlrpc_error_number</td><td class="v">0</td><td class="v">0</td></tr>
<tr><td class="e">xmlrpc_errors</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">y2k_compliance</td><td class="v">On</td><td class="v">On</td></tr>
<tr><td class="e">zend.enable_gc</td><td class="v">On</td><td class="v">On</td></tr>
</table><br />
<h2><a name="module_couchbase">couchbase</a></h2>
<table border="0" cellpadding="3" width="600">
<tr class="h"><th>couchbase support</th><th>enabled</th></tr>
<tr><td class="e">version </td><td class="v">1.0.5 </td></tr>
<tr><td class="e">json support </td><td class="v">yes </td></tr>
<tr><td class="e">fastlz support </td><td class="v">no </td></tr>
<tr><td class="e">zlib support </td><td class="v">yes </td></tr>
</table><br />
<table border="0" cellpadding="3" width="600">
<tr class="h"><th>Directive</th><th>Local Value</th><th>Master Value</th></tr>
<tr><td class="e">couchbase.compression_factor</td><td class="v">1.3</td><td class="v">1.3</td></tr>
<tr><td class="e">couchbase.compression_threshold</td><td class="v">2000</td><td class="v">2000</td></tr>
<tr><td class="e">couchbase.compressor</td><td class="v">none</td><td class="v">none</td></tr>
<tr><td class="e">couchbase.serializer</td><td class="v">php</td><td class="v">php</td></tr>
</table><br />
<h2><a name="module_ctype">ctype</a></h2>
<table border="0" cellpadding="3" width="600">
<tr><td class="e">ctype functions </td><td class="v">enabled </td></tr>
</table><br />
<h2><a name="module_curl">curl</a></h2>
<table border="0" cellpadding="3" width="600">
<tr><td class="e">cURL support </td><td class="v">enabled </td></tr>
<tr><td class="e">cURL Information </td><td class="v">7.15.5 </td></tr>
<tr><td class="e">Age </td><td class="v">2 </td></tr>
<tr><td class="e">Features </td></tr>
<tr><td class="e">AsynchDNS </td><td class="v">No </td></tr>
<tr><td class="e">Debug </td><td class="v">No </td></tr>
<tr><td class="e">GSS-Negotiate </td><td class="v">Yes </td></tr>
<tr><td class="e">IDN </td><td class="v">Yes </td></tr>
<tr><td class="e">IPv6 </td><td class="v">Yes </td></tr>
<tr><td class="e">Largefile </td><td class="v">Yes </td></tr>
<tr><td class="e">NTLM </td><td class="v">Yes </td></tr>
<tr><td class="e">SPNEGO </td><td class="v">No </td></tr>
<tr><td class="e">SSL </td><td class="v">Yes </td></tr>
<tr><td class="e">SSPI </td><td class="v">No </td></tr>
<tr><td class="e">krb4 </td><td class="v">No </td></tr>
<tr><td class="e">libz </td><td class="v">Yes </td></tr>
<tr><td class="e">CharConv </td><td class="v">No </td></tr>
<tr><td class="e">Protocols </td><td class="v">tftp, ftp, telnet, dict, ldap, http, file, https, ftps </td></tr>
<tr><td class="e">Host </td><td class="v">x86_64-redhat-linux-gnu </td></tr>
<tr><td class="e">SSL Version </td><td class="v"> OpenSSL/0.9.8b </td></tr>
<tr><td class="e">ZLib Version </td><td class="v">1.2.3 </td></tr>
</table><br />
<h2><a name="module_date">date</a></h2>
<table border="0" cellpadding="3" width="600">
<tr><td class="e">date/time support </td><td class="v">enabled </td></tr>
<tr><td class="e">&quot;Olson&quot; Timezone Database Version </td><td class="v">0.system </td></tr>
<tr><td class="e">Timezone Database </td><td class="v">internal </td></tr>
<tr><td class="e">Default timezone </td><td class="v">America/Los_Angeles </td></tr>
</table><br />
<table border="0" cellpadding="3" width="600">
<tr class="h"><th>Directive</th><th>Local Value</th><th>Master Value</th></tr>
<tr><td class="e">date.default_latitude</td><td class="v">31.7667</td><td class="v">31.7667</td></tr>
<tr><td class="e">date.default_longitude</td><td class="v">35.2333</td><td class="v">35.2333</td></tr>
<tr><td class="e">date.sunrise_zenith</td><td class="v">90.583333</td><td class="v">90.583333</td></tr>
<tr><td class="e">date.sunset_zenith</td><td class="v">90.583333</td><td class="v">90.583333</td></tr>
<tr><td class="e">date.timezone</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
</table><br />
<h2><a name="module_ereg">ereg</a></h2>
<table border="0" cellpadding="3" width="600">
<tr><td class="e">Regex Library </td><td class="v">Bundled library enabled </td></tr>
</table><br />
<h2><a name="module_exif">exif</a></h2>
<table border="0" cellpadding="3" width="600">
<tr><td class="e">EXIF Support </td><td class="v">enabled </td></tr>
<tr><td class="e">EXIF Version </td><td class="v">1.4 $Id$ </td></tr>
<tr><td class="e">Supported EXIF Version </td><td class="v">0220 </td></tr>
<tr><td class="e">Supported filetypes </td><td class="v">JPEG,TIFF </td></tr>
</table><br />
<table border="0" cellpadding="3" width="600">
<tr class="h"><th>Directive</th><th>Local Value</th><th>Master Value</th></tr>
<tr><td class="e">exif.decode_jis_intel</td><td class="v">JIS</td><td class="v">JIS</td></tr>
<tr><td class="e">exif.decode_jis_motorola</td><td class="v">JIS</td><td class="v">JIS</td></tr>
<tr><td class="e">exif.decode_unicode_intel</td><td class="v">UCS-2LE</td><td class="v">UCS-2LE</td></tr>
<tr><td class="e">exif.decode_unicode_motorola</td><td class="v">UCS-2BE</td><td class="v">UCS-2BE</td></tr>
<tr><td class="e">exif.encode_jis</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">exif.encode_unicode</td><td class="v">ISO-8859-15</td><td class="v">ISO-8859-15</td></tr>
</table><br />
<h2><a name="module_fileinfo">fileinfo</a></h2>
<table border="0" cellpadding="3" width="600">
<tr class="h"><th>fileinfo support</th><th>enabled</th></tr>
<tr><td class="e">version </td><td class="v">1.0.5-dev </td></tr>
</table><br />
<h2><a name="module_filter">filter</a></h2>
<table border="0" cellpadding="3" width="600">
<tr><td class="e">Input Validation and Filtering </td><td class="v">enabled </td></tr>
<tr><td class="e">Revision </td><td class="v">$Id: 2b8c730d7dfaa8485d07cd792f0c82852ffe4113 $ </td></tr>
</table><br />
<table border="0" cellpadding="3" width="600">
<tr class="h"><th>Directive</th><th>Local Value</th><th>Master Value</th></tr>
<tr><td class="e">filter.default</td><td class="v">unsafe_raw</td><td class="v">unsafe_raw</td></tr>
<tr><td class="e">filter.default_flags</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
</table><br />
<h2><a name="module_ftp">ftp</a></h2>
<table border="0" cellpadding="3" width="600">
<tr><td class="e">FTP support </td><td class="v">enabled </td></tr>
</table><br />
<h2><a name="module_gettext">gettext</a></h2>
<table border="0" cellpadding="3" width="600">
<tr><td class="e">GetText Support </td><td class="v">enabled </td></tr>
</table><br />
<h2><a name="module_gmp">gmp</a></h2>
<table border="0" cellpadding="3" width="600">
<tr><td class="e">gmp support </td><td class="v">enabled </td></tr>
<tr><td class="e">GMP version </td><td class="v">4.1.4 </td></tr>
</table><br />
<h2><a name="module_hash">hash</a></h2>
<table border="0" cellpadding="3" width="600">
<tr><td class="e">hash support </td><td class="v">enabled </td></tr>
<tr><td class="e">Hashing Engines </td><td class="v">md2 md4 md5 sha1 sha224 sha256 sha384 sha512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru snefru256 gost adler32 crc32 crc32b salsa10 salsa20 haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5 </td></tr>
</table><br />
<h2><a name="module_iconv">iconv</a></h2>
<table border="0" cellpadding="3" width="600">
<tr><td class="e">iconv support </td><td class="v">enabled </td></tr>
<tr><td class="e">iconv implementation </td><td class="v">glibc </td></tr>
<tr><td class="e">iconv library version </td><td class="v">2.5 </td></tr>
</table><br />
<table border="0" cellpadding="3" width="600">
<tr class="h"><th>Directive</th><th>Local Value</th><th>Master Value</th></tr>
<tr><td class="e">iconv.input_encoding</td><td class="v">ISO-8859-1</td><td class="v">ISO-8859-1</td></tr>
<tr><td class="e">iconv.internal_encoding</td><td class="v">ISO-8859-1</td><td class="v">ISO-8859-1</td></tr>
<tr><td class="e">iconv.output_encoding</td><td class="v">ISO-8859-1</td><td class="v">ISO-8859-1</td></tr>
</table><br />
<h2><a name="module_json">json</a></h2>
<table border="0" cellpadding="3" width="600">
<tr><td class="e">json support </td><td class="v">enabled </td></tr>
<tr><td class="e">json version </td><td class="v">1.2.1 </td></tr>
</table><br />
<h2><a name="module_libxml">libxml</a></h2>
<table border="0" cellpadding="3" width="600">
<tr><td class="e">libXML support </td><td class="v">active </td></tr>
<tr><td class="e">libXML Compiled Version </td><td class="v">2.6.26 </td></tr>
<tr><td class="e">libXML Loaded Version </td><td class="v">20626 </td></tr>
<tr><td class="e">libXML streams </td><td class="v">enabled </td></tr>
</table><br />
<h2><a name="module_mhash">mhash</a></h2>
<table border="0" cellpadding="3" width="600">
<tr><td class="e">MHASH support </td><td class="v">Enabled </td></tr>
<tr><td class="e">MHASH API Version </td><td class="v">Emulated Support </td></tr>
</table><br />
<h2><a name="module_openssl">openssl</a></h2>
<table border="0" cellpadding="3" width="600">
<tr><td class="e">OpenSSL support </td><td class="v">enabled </td></tr>
<tr><td class="e">OpenSSL Library Version </td><td class="v">OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008 </td></tr>
<tr><td class="e">OpenSSL Header Version </td><td class="v">OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008 </td></tr>
</table><br />
<h2><a name="module_pcre">pcre</a></h2>
<table border="0" cellpadding="3" width="600">
<tr><td class="e">PCRE (Perl Compatible Regular Expressions) Support </td><td class="v">enabled </td></tr>
<tr><td class="e">PCRE Library Version </td><td class="v">8.12 2011-01-15 </td></tr>
</table><br />
<table border="0" cellpadding="3" width="600">
<tr class="h"><th>Directive</th><th>Local Value</th><th>Master Value</th></tr>
<tr><td class="e">pcre.backtrack_limit</td><td class="v">1000000</td><td class="v">1000000</td></tr>
<tr><td class="e">pcre.recursion_limit</td><td class="v">100000</td><td class="v">100000</td></tr>
</table><br />
<h2><a name="module_Phar">Phar</a></h2>
<table border="0" cellpadding="3" width="600">
<tr class="h"><th>Phar: PHP Archive support</th><th>enabled</th></tr>
<tr><td class="e">Phar EXT version </td><td class="v">2.0.1 </td></tr>
<tr><td class="e">Phar API version </td><td class="v">1.1.1 </td></tr>
<tr><td class="e">SVN revision </td><td class="v">$Id: f7d08da4ab9e515975840c28b830edc9437c3026 $ </td></tr>
<tr><td class="e">Phar-based phar archives </td><td class="v">enabled </td></tr>
<tr><td class="e">Tar-based phar archives </td><td class="v">enabled </td></tr>
<tr><td class="e">ZIP-based phar archives </td><td class="v">enabled </td></tr>
<tr><td class="e">gzip compression </td><td class="v">enabled </td></tr>
<tr><td class="e">bzip2 compression </td><td class="v">enabled </td></tr>
<tr><td class="e">Native OpenSSL support </td><td class="v">enabled </td></tr>
</table><br />
<table border="0" cellpadding="3" width="600">
<tr class="v"><td>
Phar based on pear/PHP_Archive, original concept by Davey Shafik.<br />Phar fully realized by Gregory Beaver and Marcus Boerger.<br />Portions of tar implementation Copyright (c) 2003-2009 Tim Kientzle.</td></tr>
</table><br />
<table border="0" cellpadding="3" width="600">
<tr class="h"><th>Directive</th><th>Local Value</th><th>Master Value</th></tr>
<tr><td class="e">phar.cache_list</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">phar.readonly</td><td class="v">On</td><td class="v">On</td></tr>
<tr><td class="e">phar.require_hash</td><td class="v">On</td><td class="v">On</td></tr>
</table><br />
<h2><a name="module_Reflection">Reflection</a></h2>
<table border="0" cellpadding="3" width="600">
<tr class="h"><th>Reflection</th><th>enabled</th></tr>
<tr><td class="e">Version </td><td class="v">$Id: e98652ba2326bd9391b730afdaf96c017d9fab48 $ </td></tr>
</table><br />
<h2><a name="module_session">session</a></h2>
<table border="0" cellpadding="3" width="600">
<tr><td class="e">Session Support </td><td class="v">enabled </td></tr>
<tr><td class="e">Registered save handlers </td><td class="v">files user </td></tr>
<tr><td class="e">Registered serializer handlers </td><td class="v">php php_binary </td></tr>
</table><br />
<table border="0" cellpadding="3" width="600">
<tr class="h"><th>Directive</th><th>Local Value</th><th>Master Value</th></tr>
<tr><td class="e">session.auto_start</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">session.bug_compat_42</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">session.bug_compat_warn</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">session.cache_expire</td><td class="v">180</td><td class="v">180</td></tr>
<tr><td class="e">session.cache_limiter</td><td class="v">nocache</td><td class="v">nocache</td></tr>
<tr><td class="e">session.cookie_domain</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">session.cookie_httponly</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">session.cookie_lifetime</td><td class="v">0</td><td class="v">0</td></tr>
<tr><td class="e">session.cookie_path</td><td class="v">/</td><td class="v">/</td></tr>
<tr><td class="e">session.cookie_secure</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">session.entropy_file</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">session.entropy_length</td><td class="v">0</td><td class="v">0</td></tr>
<tr><td class="e">session.gc_divisor</td><td class="v">1000</td><td class="v">1000</td></tr>
<tr><td class="e">session.gc_maxlifetime</td><td class="v">1440</td><td class="v">1440</td></tr>
<tr><td class="e">session.gc_probability</td><td class="v">1</td><td class="v">1</td></tr>
<tr><td class="e">session.hash_bits_per_character</td><td class="v">5</td><td class="v">5</td></tr>
<tr><td class="e">session.hash_function</td><td class="v">0</td><td class="v">0</td></tr>
<tr><td class="e">session.name</td><td class="v">PHPSESSID</td><td class="v">PHPSESSID</td></tr>
<tr><td class="e">session.referer_check</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">session.save_handler</td><td class="v">files</td><td class="v">files</td></tr>
<tr><td class="e">session.save_path</td><td class="v">/var/lib/php/session</td><td class="v">/var/lib/php/session</td></tr>
<tr><td class="e">session.serialize_handler</td><td class="v">php</td><td class="v">php</td></tr>
<tr><td class="e">session.use_cookies</td><td class="v">On</td><td class="v">On</td></tr>
<tr><td class="e">session.use_only_cookies</td><td class="v">On</td><td class="v">On</td></tr>
<tr><td class="e">session.use_trans_sid</td><td class="v">0</td><td class="v">0</td></tr>
</table><br />
<h2><a name="module_shmop">shmop</a></h2>
<table border="0" cellpadding="3" width="600">
<tr><td class="e">shmop support </td><td class="v">enabled </td></tr>
</table><br />
<h2><a name="module_SimpleXML">SimpleXML</a></h2>
<table border="0" cellpadding="3" width="600">
<tr class="h"><th>Simplexml support</th><th>enabled</th></tr>
<tr><td class="e">Revision </td><td class="v">$Id: a379111021e24ef020a2eefd8ca830cb1ab5b280 $ </td></tr>
<tr><td class="e">Schema support </td><td class="v">enabled </td></tr>
</table><br />
<h2><a name="module_sockets">sockets</a></h2>
<table border="0" cellpadding="3" width="600">
<tr><td class="e">Sockets Support </td><td class="v">enabled </td></tr>
</table><br />
<h2><a name="module_SPL">SPL</a></h2>
<table border="0" cellpadding="3" width="600">
<tr class="h"><th>SPL support</th><th>enabled</th></tr>
<tr><td class="e">Interfaces </td><td class="v">Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject </td></tr>
<tr><td class="e">Classes </td><td class="v">AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException </td></tr>
</table><br />
<h2><a name="module_standard">standard</a></h2>
<table border="0" cellpadding="3" width="600">
<tr><td class="e">Dynamic Library Support </td><td class="v">enabled </td></tr>
<tr><td class="e">Path to sendmail </td><td class="v">/usr/sbin/sendmail -t -i </td></tr>
</table><br />
<table border="0" cellpadding="3" width="600">
<tr class="h"><th>Directive</th><th>Local Value</th><th>Master Value</th></tr>
<tr><td class="e">assert.active</td><td class="v">1</td><td class="v">1</td></tr>
<tr><td class="e">assert.bail</td><td class="v">0</td><td class="v">0</td></tr>
<tr><td class="e">assert.callback</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">assert.quiet_eval</td><td class="v">0</td><td class="v">0</td></tr>
<tr><td class="e">assert.warning</td><td class="v">1</td><td class="v">1</td></tr>
<tr><td class="e">auto_detect_line_endings</td><td class="v">0</td><td class="v">0</td></tr>
<tr><td class="e">default_socket_timeout</td><td class="v">60</td><td class="v">60</td></tr>
<tr><td class="e">from</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">safe_mode_allowed_env_vars</td><td class="v">PHP_</td><td class="v">PHP_</td></tr>
<tr><td class="e">safe_mode_protected_env_vars</td><td class="v">LD_LIBRARY_PATH</td><td class="v">LD_LIBRARY_PATH</td></tr>
<tr><td class="e">url_rewriter.tags</td><td class="v">a=href,area=href,frame=src,input=src,form=fakeentry</td><td class="v">a=href,area=href,frame=src,input=src,form=fakeentry</td></tr>
<tr><td class="e">user_agent</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
</table><br />
<h2><a name="module_tokenizer">tokenizer</a></h2>
<table border="0" cellpadding="3" width="600">
<tr><td class="e">Tokenizer Support </td><td class="v">enabled </td></tr>
</table><br />
<h2><a name="module_xml">xml</a></h2>
<table border="0" cellpadding="3" width="600">
<tr><td class="e">XML Support </td><td class="v">active </td></tr>
<tr><td class="e">XML Namespace Support </td><td class="v">active </td></tr>
<tr><td class="e">libxml2 Version </td><td class="v">2.6.26 </td></tr>
</table><br />
<h2><a name="module_zip">zip</a></h2>
<table border="0" cellpadding="3" width="600">
<tr><td class="e">Zip </td><td class="v">enabled </td></tr>
<tr><td class="e">Extension Version </td><td class="v">$Id$ </td></tr>
<tr><td class="e">Zip version </td><td class="v">1.11.0 </td></tr>
<tr><td class="e">Libzip version </td><td class="v">0.10.1 </td></tr>
</table><br />
<h2><a name="module_zlib">zlib</a></h2>
<table border="0" cellpadding="3" width="600">
<tr><td class="e">ZLib Support </td><td class="v">enabled </td></tr>
<tr><td class="e">Stream Wrapper support </td><td class="v">compress.zlib:// </td></tr>
<tr><td class="e">Stream Filter support </td><td class="v">zlib.inflate, zlib.deflate </td></tr>
<tr><td class="e">Compiled Version </td><td class="v">1.2.3 </td></tr>
<tr><td class="e">Linked Version </td><td class="v">1.2.3 </td></tr>
</table><br />
<table border="0" cellpadding="3" width="600">
<tr class="h"><th>Directive</th><th>Local Value</th><th>Master Value</th></tr>
<tr><td class="e">zlib.output_compression</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">zlib.output_compression_level</td><td class="v">-1</td><td class="v">-1</td></tr>
<tr><td class="e">zlib.output_handler</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
</table><br />
<h2>Additional Modules</h2>
<table border="0" cellpadding="3" width="600">
<tr class="h"><th>Module Name</th></tr>
</table><br />
<h2>Environment</h2>
<table border="0" cellpadding="3" width="600">
<tr class="h"><th>Variable</th><th>Value</th></tr>
<tr><td class="e">USER </td><td class="v">apache </td></tr>
<tr><td class="e">HOME </td><td class="v">/var/www </td></tr>
</table><br />
<h2>PHP Variables</h2>
<table border="0" cellpadding="3" width="600">
<tr class="h"><th>Variable</th><th>Value</th></tr>
<tr><td class="e">_SERVER["USER"]</td><td class="v">apache</td></tr>
<tr><td class="e">_SERVER["HOME"]</td><td class="v">/var/www</td></tr>
<tr><td class="e">_SERVER["FCGI_ROLE"]</td><td class="v">RESPONDER</td></tr>
<tr><td class="e">_SERVER["QUERY_STRING"]</td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">_SERVER["REQUEST_METHOD"]</td><td class="v">GET</td></tr>
<tr><td class="e">_SERVER["CONTENT_TYPE"]</td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">_SERVER["CONTENT_LENGTH"]</td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">_SERVER["SCRIPT_NAME"]</td><td class="v">/info.php</td></tr>
<tr><td class="e">_SERVER["REQUEST_URI"]</td><td class="v">/info.php</td></tr>
<tr><td class="e">_SERVER["DOCUMENT_URI"]</td><td class="v">/info.php</td></tr>
<tr><td class="e">_SERVER["DOCUMENT_ROOT"]</td><td class="v">/usr/share/nginx/html</td></tr>
<tr><td class="e">_SERVER["SERVER_PROTOCOL"]</td><td class="v">HTTP/1.1</td></tr>
<tr><td class="e">_SERVER["GATEWAY_INTERFACE"]</td><td class="v">CGI/1.1</td></tr>
<tr><td class="e">_SERVER["SERVER_SOFTWARE"]</td><td class="v">nginx/1.0.0</td></tr>
<tr><td class="e">_SERVER["REMOTE_ADDR"]</td><td class="v">10.32.11.142</td></tr>
<tr><td class="e">_SERVER["REMOTE_PORT"]</td><td class="v">52482</td></tr>
<tr><td class="e">_SERVER["SERVER_ADDR"]</td><td class="v">10.4.2.14</td></tr>
<tr><td class="e">_SERVER["SERVER_PORT"]</td><td class="v">80</td></tr>
<tr><td class="e">_SERVER["SERVER_NAME"]</td><td class="v">_</td></tr>
<tr><td class="e">_SERVER["REDIRECT_STATUS"]</td><td class="v">200</td></tr>
<tr><td class="e">_SERVER["SCRIPT_FILENAME"]</td><td class="v">/usr/share/nginx/html/info.php</td></tr>
<tr><td class="e">_SERVER["HTTP_HOST"]</td><td class="v">10.4.2.14</td></tr>
<tr><td class="e">_SERVER["HTTP_CONNECTION"]</td><td class="v">keep-alive</td></tr>
<tr><td class="e">_SERVER["HTTP_USER_AGENT"]</td><td class="v">Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1</td></tr>
<tr><td class="e">_SERVER["HTTP_ACCEPT"]</td><td class="v">text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8</td></tr>
<tr><td class="e">_SERVER["HTTP_ACCEPT_ENCODING"]</td><td class="v">gzip,deflate,sdch</td></tr>
<tr><td class="e">_SERVER["HTTP_ACCEPT_LANGUAGE"]</td><td class="v">en-US,en;q=0.8</td></tr>
<tr><td class="e">_SERVER["HTTP_ACCEPT_CHARSET"]</td><td class="v">ISO-8859-1,utf-8;q=0.7,*;q=0.3</td></tr>
<tr><td class="e">_SERVER["PHP_SELF"]</td><td class="v">/info.php</td></tr>
<tr><td class="e">_SERVER["REQUEST_TIME"]</td><td class="v">1346950138</td></tr>
</table><br />
<h2>PHP License</h2>
<table border="0" cellpadding="3" width="600">
<tr class="v"><td>
<p>
This program is free software; you can redistribute it and/or modify it under the terms of the PHP License as published by the PHP Group and included in the distribution in the file: LICENSE
</p>
<p>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
</p>
<p>If you did not receive a copy of the PHP license, or have any questions about PHP licensing, please contact license@php.net.
</p>
</td></tr>
</table><br />
</div></body></html>
Comment by Matt Ingenthron [ 06/Sep/12 ]
This seems to be affecting 1.0.5 as well.
Comment by Mark Nunberg [ 06/Sep/12 ]
I have some guesses as to what might be wrong.. but I'll do some reasearch now..
Comment by Mark Nunberg [ 06/Sep/12 ]
Problem fixed. I'll be putting a patch to gerrit shortly.
Comment by Mark Nunberg [ 06/Sep/12 ]
http://review.couchbase.org/20591
Comment by Mark Nunberg [ 10/Sep/12 ]
still need to forward-port this into the master branch




[PCBC-74] Constructor segfaults when http:// is used in URL Created: 14/Jun/12  Updated: 24/Sep/12  Resolved: 07/Sep/12

Status: Resolved
Project: Couchbase PHP client library
Component/s: library
Affects Version/s: 1.0.4, 1.0.5
Fix Version/s: 1.0.6, 1.1.0-dp4
Security Level: Public

Type: Bug Priority: Major
Reporter: Perry Krug Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
This works:

$cb = new Couchbase("184.72.2.230:8091"); // uses the default bucket


This segfaults:

$cb = new Couchbase("http://184.72.2.230:8091"); // uses the default bucket

At least some better message to the user would be nice.

Can we also check this for all of our other libraries? The standard way of doing things used to be to put the full URL on there...and still is for .NET at least.

 Comments   
Comment by Mark Nunberg [ 07/Sep/12 ]
Passes tests on pending 1.0.6, assuming fixed




[PCBC-27] getting started screencast is available Created: 12/Jan/12  Updated: 07/Nov/12  Resolved: 07/Nov/12

Status: Closed
Project: Couchbase PHP client library
Component/s: docs
Affects Version/s: None
Fix Version/s: 1.0.6
Security Level: Public

Type: New Feature Priority: Major
Reporter: Matt Ingenthron Assignee: Matt Ingenthron
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified





Generated at Tue Jun 18 19:29:34 CDT 2013 using JIRA 5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9.