Mysqli support for PHP

software development

#1

Dreamhost, would you please add support for the mysqli extension in php? It extends the mysql extension to support newer features present in MySQL 4 and 5; it would be nice to actually have easy use of the features supported by the database.

For example, the mysqli object supports prepared statements, a form of bindable query that significantly mitigates the threat of SQL injection in our hosted applications. At this point we can protect using carefully crafted whitelist validation (or blacklist validation when we have to), but having access to prepared statements would provide greater defense in depth.

I realize that there is already a suggestion in the web panel for this, but I figured additional avenues of inquiry wouldn’t hurt.

Thanks


#2

Are you using PHP5 (or PHP4)?

From phpinfo() output of the standard DH PHP5 :
PHP Version 5.2.3

System Linux genki 2.4.29-grsec+w+fhs6b+gr0501+nfs+a32+++p4+sata+c4+gr2b-v6.189 #1 SMP Mon Feb 7 13:23:30 PST 2005 i686
Build Date Aug 21 2007 17:23:41
Configure Command ‘./configure’ ‘–prefix=/usr/local/php5’ ‘–enable-fastcgi’ ‘–with-mysql=/usr’ ‘–enable-calendar’ ‘–enable-force-cgi-redirect’ ‘–with-config-file-path=/etc/php5/cgi’ ‘–enable-trans-sid’ ‘–with-gd’ ‘–with-xml’ ‘–with-xsl’ ‘–with-ttf=/usr’ ‘–with-freetype-dir=/usr’ ‘–enable-exif’ ‘–with-xslt’ ‘–with-xslt-sablot=/usr’ ‘–with-dom-xslt=/usr’ ‘–with-jpeg-dir=/usr’ ‘–with-png-dir=/usr’ ‘–with-zlib-dir=/usr’ ‘–with-pdo-mysql’ ‘–enable-ftp’ ‘–with-curl=/usr’ ‘–with-pspell=/usr’ ‘–enable-mbstring’ ‘–with-mcrypt’ [color=#CC0000]’–with-mysqli’[/color] ‘–with-openssl=/usr’ ‘–with-imap=/usr/local/imap-2000b’ ‘–with-imap-ssl’ ‘–with-gettext’

mysqli
MysqlI Support enabled
Client API library version 5.0.16
Client API header version 5.0.16
MYSQLI_SOCKET /var/run/mysqld/mysqld.sock

Directive Local Value Master Value
mysqli.default_host no value no value
mysqli.default_port 3306 3306
mysqli.default_pw no value no value
mysqli.default_socket no value no value
mysqli.default_user no value no value
mysqli.max_links Unlimited Unlimited
mysqli.reconnect Off Off

–rlparker


#3

You know, I probably didn’t switch PHP versions. Thanks.