 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Brian Swan's Blog: Using SQL Azure to Store PHP Session Data
by Chris Cornutt October 21, 2011 @ 08:32:46
In a recent post to his blog Brian Swan takes a look at working with sessions in PHP and, specifically, how to save them to Azure along with all of their data.
In my last post, I looked at the session handling functionality that is built into the Windows Azure SDK for PHP, which uses Azure Tables or Azure Blobs for storing session data. As I wrote that post, I wondered how easy it would be to use SQL Azure to store session data, especially since using a database to store session data is a common and familiar practice when building distributed PHP applications. As I found out, using SQL Azure to store session data was relatively easy (as I'll show in this post), but I did run into a couple of small hurdles that might be worth taking note of.
He uses PHP's own session_set_save_handler to point to his custom Azure handling class with the needed methods (like write, close and destroy). He breaks it out into three simple steps, some with a bit of code attached:
- Create the database, table, and stored procedure
- Add the SqlAzureSessionHandler class to your project
- Instantiate SqlAzureSessionHandler before calling session functions as you normally would
The code for the Azure handling class can be downloaded here.
voice your opinion now!
sql azure session data cache sqlserver windows
Brian Swan's Blog: SQL Server JumpIn! Camp Wrap Up
by Chris Cornutt June 27, 2011 @ 12:28:18
Brian Swan (of Microsoft) has posted his wrapup of the recent Jump In! Camp they held around integration of SQL Server functionality into several popular PHP projects like the Zend Framework and PEAR.
During each day of the camp, PHP developers worked side-by-side with Microsoft developers to add SQL Server and SQL Azure support to their projects, but nearly everyone put in many extra hours late at night (and even early morning!) to add support for other Microsoft technologies (such as IIS, Web Platform Installer, and Windows Azure).
He includes some pictures taken of the progress board for the various projects and the wishlist that developers in attendance requested of the Microsoft team.
I can't say thanks enough to all the participants for being 100% invested in the camp and for going the extra mile to investigate how their projects might be able to integrate Microsoft technologies beyond SQL Server and SQL Azure. I know that the entire SQL Server team echoes my thanks.
voice your opinion now!
sqlserver jumpincamp wraup progress request project
Zend Developer Zone: Jump In Camp - Who is here and what are they doing?
by Chris Cornutt June 22, 2011 @ 11:14:15
On the Zend Developer Zone Cal Evans has a new post looking at an event Microsoft is holding this week, the SQL Server Jump In! Camp, and who's there and what's going on:
This is a different kind of Camp, the focus is on writing code, not necessarily learning new techniques. That is not to say that there isn't learning, showcasing and demoing going on, but it is obviously not the focus of the week.
Projects that are represented at the camp include PEAR, Frapi, CakePHP, Zend Framework, VoceComm and Agavi. One of the main focuses of the week-long event is to get SQL server support introduced into each of the projects and to have it ready to ship by the end of the week. Some projects have already released their SQL server support.
voice your opinion now!
jumpincamp sqlserver project development
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
Brian Swan's Blog: SQL Server Driver for PHP Connection Options CharacterSet
by Chris Cornutt February 28, 2011 @ 12:15:33
Brian Swan has posted another in his series looking at connection options for the SQL Server driver for PHP. In his latest he looks at the "CharacterSet" setting, an easy way to define which encoding the remote database is using.
One thing that helped me understand the CharacterSet option was to realize that its name is a bit misleading (although it seems to be inline with other uses of CharacterSet or charset). It is used to specify the encoding of data that is being sent to the server, not the character set. With that in mind, the possible values for the option begin to make sense: SQLSRV_ENC_CHAR, SQLSRV_ENC_BINARY, and UTF-8.
He looks at each of these three options in more detail - SQLSRV_ENC_CHAR being the default, SQLSRV_ENC_BINARY when binary data is needed and UTF-8 when, obviously, you need UTF-8 data transfer between the client and server.
voice your opinion now!
sqlserver connection option characterset encoding
|
Community Events
Don't see your event here? Let us know!
|