News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DZone.com:
MongoDB Driver Tips & Tricks PHP
June 04, 2014 @ 10:10:49

On DZone.com there's a new post from Chris Chang that's the third part of the series looking at using various language drivers for working with MongoDB. In this latest article he focuses in on the PHP driver, giving a brief introduction and a few handy tips.

This blog post is the third of a series where we are covering each of the major MongoDB drivers in depth. The driver we'll be covering here is the PHP driver, developed and maintained by the MongoDB, Inc. team (primarily @derickr, @bjori and @jmikola).

He includes a link to some basic examples and shares a "production-ready connect string" with some MongoLab recommended settings. The tips include topics ranging from working with index builds, the lowering of is_master_interval and configuring the connectionTimeoutMS setting for optimum connection handling.

0 comments voice your opinion now!
mongodb driver tips tricks mongolab index master interval connection timeout

Link: http://java.dzone.com/articles/mongodb-driver-tips-tricks-php

Derick Rethans:
Debugging Connections with the MongoDB PHP driver
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.

0 comments voice your opinion now!
mongodb driver connection debug mongolog


Derick Rethans:
Connection Handling with the MongoDB PHP driver
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.

0 comments voice your opinion now!
connection handling tutorial mongodb driver version


Derick Rethans:
Mongo is dead, long live MongoClient
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.

0 comments voice your opinion now!
mongo class driver release mongoclient class confirm write


DZone.com:
Setting Up MongoDB on a Mac
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.

0 comments voice your opinion now!
mongodb mac osx mamp driver binaries tutorial


Johannes Schlüter:
MySQL, Memcache, PHP revised
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.

0 comments voice your opinion now!
mysql mysqlnd memcache driver pecl extension


Ariz Jacinto's Blog:
Compiling PHP with MSSQL Server's Native ODBC Driver for Linux as a PDO Driver
January 10, 2012 @ 12:34:26

Ariz Jacinto has written up a new post with the commands you'll need to get PHP up and runnign with MSSQL Server's native ODBC driver working on linux (accessible through PDO).

Last month, MS announced the preview release of SQL Server ODBC Driver for Linux, a 64-bit binary driver for Red Hat Enterprise Linux 5. This is good news for companies using heterogenous platforms e.g. LAMP stack running a PHP application that connects to both MySQL and MSSQL Server. Meaning, these companies no longer have to use third-party drivers such as FreeTDS that MS doesn't support. Then a few days ago, MS released version 1 of the driver. I immediately downloaded the driver and recompiled PHP with it as a PDO (PHP Data Object) ODBC driver.

His process has five steps to it, including one for making a test script (code included) and another with a few gotchas/performance considerations to keep an eye out for when using the driver.

0 comments voice your opinion now!
compile sqlserver native driver odbc pdo tutorial


Brian Swan's Blog:
The SQL Server ODBC Driver for Linux is Available!
November 29, 2011 @ 08:39:35

As Brian Swan has mentioned in his latest blog post, the ODBC database driver for SQL Server on Linux has been released. This is a huge step forward for directly connecting linux-based systems (and programming languages) to this popular Microsoft product.

The first beta release of the SQL Server ODBC Driver for Linux is available for download! As announced in October, the "Multiplatform Team" (a.k.a. the "MPlat Team") has released a preview version of a driver that will provide first-class access to SQL Server from applications running on Linux operating systems. The team is looking for feedback on this release to incorporate into their production-ready release, so try it out and let us know what you think.

He links to a few resources about the release - more details, a link to download the driver and the official documentation.

0 comments voice your opinion now!
sqlserver odbc driver linux release microsoft database


Brian Swan's Blog:
Version 3.0 (beta) of the SQL Server Drivers for PHP Released!
September 29, 2011 @ 08:06:03

Brian Swan has a new post to his MSDN blog today about the release of the latest version (3.0 beta) of the SQL Server drivers for PHP. This new release includes three improvements - buffered queries, support for LocalDB and support for high availability/disaster recovery.

A Community Technology Preview (a beta release) of v3.0 of the SQL Server Drivers for PHP was released today (see the announcement on the team blog). You can download it here: Download v3.0 of the SQL Server Drivers for PHP. [...] It's important to note that the latter two features are dependent on the next version of SQL Server (code named "Denali"). A preview of Denali can be downloaded for free here (see notes later in this article about the installation process): Download SQL Server Denali CTP 3.

He gives brief summaries (some with example code) of what these three new features have to offer those using SQL Server in their applications. The "buffered queries" allows you to bring your entire result set into memory, making it simpler to interact with as rows/columns. The LocalDB support gives developers a quick way to have a database without the hassle of a server - just connect right to the SQL Server database file. The high availability feature has been included for a while but has a new name in the upcoming release - SQL Server Always On.

0 comments voice your opinion now!
sqlserver driver release beta buffered queries localdb highavailability


Brian Swan's Blog:
PHP Driver for SQL Server - Request for Feature Feedback
July 15, 2011 @ 10:22:49

Brian Swan is asking for user feedback about the future of the Microsoft's SQL Server driver for PHP based on a post in the team's blog.

I want to make sure that his request gets in front of lots of eyes, so I'm re-posting his request here (below). Jonathan included some links in his post so you can learn more about what the team is considering for the next release of the driver, but he didn't elaborate on "Buffered Queries".

They suggest a few features and ask for choices on which would be the most important to you as a developer - Always On support, SQL Server Serverless Express support, Buffered queries and LOB streaming support in PDO_SQLSRV. To give feedback, send an email to the address mentioned in the post or on twitter/their forums.

0 comments voice your opinion now!
sqlserver driver microsoft request feature feedback suggestion



Community Events





Don't see your event here?
Let us know!


api bugfix community list zendserver tips laravel podcast developer language release series introduction framework deployment conference symfony library voicesoftheelephpant interview

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework