 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Derick Rethans: Debugging Connections with the MongoDB PHP driver
by Chris Cornutt December 11, 2012 @ 10:20:13
Derick Rethans has a new post that the developers out there using MongoDB in their applications will find useful - a look at debugging your connections with the PHP driver (and what kind of information it can provide).
In a previous article I already mentioned that the 1.3 version of the MongoDB driver has improved logging functionality to aid with debugging connection issues. I've already briefly introduced MongoClient::getConnections(), but it provides a bit more information than I have already shown. The other improvement are changes to the MongoLog class.
He includes details on the information that comes back from the MongoDB "getConnections" call including the hash of the connection, the "last ping" time, connection type and a set of tags. He also shows how to enable the Mongolog logging, the levels of logging it allows and what kind of log messages you can expect it to output.
voice your opinion now!
mongodb driver connection debug mongolog
Derick Rethans: Connection Handling with the MongoDB PHP driver
by Chris Cornutt December 04, 2012 @ 10:54:15
Continuing on with his look at the newly released version of the MongoDB driver for PHP Derick Rethans has posted more detail about the advanced connection handling options this new driver version provides.
The 1.3 release series of the PHP MongoDB driver features a rewritten connection handling library. This is quite a large change and changes how the PHP driver deals with persistent connections and connection pooling.
He starts with an example of a v1.2 driver connection, how the connection is requested from a pool and how, based on the integration of a worker into the connection process, v1.3 handles the connection requests. He includes a bit about replica set connections and authentication connections, complete with PHP code examples showing them in practice.
voice your opinion now!
connection handling tutorial mongodb driver version
Derick Rethans: Mongo is dead, long live MongoClient
by Chris Cornutt November 28, 2012 @ 09:13:51
In this recent post to his site Derick Rethans mentions the shiny new "MongoClient" class that the latest release of the Mongo PHP drivers provides.
This afternoon we published version 1.3.0 of the MongoDB PHP driver. Besides a number of bug fixes since RC2 and RC3, this new release also includes a new MongoClient class. This new MongoClient class serves as a replacement for the Mongo class. The old Mongo class is now deprecated and will be removed in a future release, although we are keeping it in place for now because of backwards compatibility reasons. We have already removed it mostly from the documentation, and are working to update all our other material as well.
The main change that comes with the MongoClient class is that it now has acknowledged writes on by default (a "safe mode"). This option determines wether or not the client waits for a confirmation from the server when a write has happened. He includes a bit of code showing how to: turn it off, keep it on or using replica set acknowledged writes. You can also set it on a per-query basis.
voice your opinion now!
mongo class driver release mongoclient class confirm write
DZone.com: Setting Up MongoDB on a Mac
by Chris Cornutt October 22, 2012 @ 11:31:32
In this new post to DZone.com Andy Hawthorne explains how to install MongoDB on OSX and get a local PHP working with it.
MongoDB is a document oriented, NoSQL database. It is gathering momentum and popularity amongst developers because it is flexible, and scalable at the same time. In this article I will describe how I got it set up and working on my Mac running OS X 10.8.2 and MAMP with PHP 5.2.17, and PHP 5.3.6.
They go a bit simpler route than trying to compile it yourself by using the binaries direct from the source. Instructions are included to test the installation, insert a record and how to install the MongoDB PHP driver for a MAMP installation. It's a shared object, though, so it's not specific to MAMP and could be installed even on the local OSX PHP functionality.
voice your opinion now!
mongodb mac osx mamp driver binaries tutorial
Johannes Schlüter: MySQL, Memcache, PHP revised
by Chris Cornutt October 02, 2012 @ 09:27:54
Johannes Schlüter has a recent post highlighting an interesting PHP extension that can connect memcache with your MySQL server via PHP, the PECL mysqlnd_memcache extension.
Now this blog entry is tagged a s PHP. Hs is that coming into play? - Well, on the one side we have this fast memcache interface, which allows to access almost arbitrarry data from the database. On the other side we have our PHP mysqlnd plugin interface where we can add special features, like query caching or load balancing, transparently to any PHP application. Why not combine those two things? - Good question. That's what we have done in the PECL mysqlnd_memcache PHP extension.
He includes some sample PHP code showing it in action - two examples: one using the "mysqlnd_memcache_set" method to set a memcache server on the MySQL connection and another showing two queries and how they're handled behind the scenes by this driver plugin.
voice your opinion now!
mysql mysqlnd memcache driver pecl extension
Brian Swan's Blog: SQL Server Driver for PHP Connection Options Encrypt & Failover_Partner
by Chris Cornutt March 11, 2011 @ 08:41:11
Brian Swan has posted two more in his "SQL Server Driver for PHP" series looking at some of the connection options that are available. In these two new articles he looks at the Failover_Partner and Encrypt options.
Database mirroring is primarily a software solution for increasing database availability. [...] When a PHP application connects to the primary server, the Failover_Partner connection option specifies the name of the server to which the application should connect if the primary server is not available.
[...] These two options, Encrypt and TrustServerCertificate, are often used together. The Encrypt option is used to specify whether or not the connection to the server is encrypted (the default is false). The TrustServerCertificate option is used to indicate whether the certificate on the SQL Server instance should be trusted (the default is false).
In both there's code examples showing the connection strings and what kinds of parameters you can pass to them. He also gives a few examples of scenarios when they might be useful.
voice your opinion now!
connect sqlserver driver option failoverpartner encyrpt trustservercertificate
|
Community Events
Don't see your event here? Let us know!
|