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

CodeFury.net:
CodeIgniter/PHP + IIS + MySQL + MSSQL It Works!
January 13, 2011 @ 11:09:50

Kenny Katzgrau has a recent post on the Code Fury blog talking about the combination of CodeIgniter, IIS, MySQL and MSSQL and how it all works in his installation (after a few small gotchas).

There are a lot of people out there who call themselves "LAMP" developers - short for Linux, Apache, MySQL, PHP. That's the standard configuration for production PHP applications. Recently, I ended up having to build a CodeIgniter application on Windows, IIS, Mysql+MS-SQL, and PHP. Sound like there are bound to be issues? You bet, and it especially hurts because now I'm a real-live WIMP developer. And what made it even more interesting was that due to constraints, I had to develop the application in Ubuntu and deploy to Windows for production.

He includes the list of the "gotchas" that he came across when doing the installation - six of them:

  • PHP and MSSQL on Ubuntu
  • PHP and MSSQL on Windows
  • mssql vs. sqlsrv
  • File Permissions and Logging
  • No .htaccess Fo' You!
  • 2 Databases, 1 Application
0 comments voice your opinion now!
codeigniter iis mysql mssql gotcha install


php|architect:
Got MSSQL? Check out our whitepaper!
November 16, 2010 @ 13:48:38

The folks over at php|architect have created a white paper detailing some of their experiences with using the SQL Server Driver (v2.0) with PHP and made it available for download.

A while back, our friends at Microsoft asked us to write a whitepaper on how to use Microsoft SQL Server from PHP through their brand-new SQL Server Driver 2.0, which you may have noticed tucked away in a corner of the download package for our September 2010 issue. Now that we've had a chance to collect feedback and fix a few bugs here and there, we thought it'd be good to make it available to anyone - you can find it here in PDF format.

Topics covered in the paper include installing and configuring the SQL Server driver, accessing the database with PHP, understanding joins, working with SQL Azure and a bit on migrating from a MySQL database.

0 comments voice your opinion now!
whitepaper mssql sqlserver download


Daniel Cousineau's Blog:
Doctrine 1.2 MSSQL Alternative LIMIT/Paging
September 17, 2010 @ 11:34:03

Daniel Cousineau has a new post to his blog today looking at an alternative that can be used for pagination in your MSSQL queries than the trick with TOP and reversing the ORDER BY in Doctrine.

As ugly as this technique is, it works. The problem is it requires an extreme amount of intelligence or an extreme amount of simplicity in the query in order for an automated system like Doctrine to be usable. The biggest caveat with this technique is good goddamned luck paging your query if it doesn't have an ORDER BY. And sometimes queries that are complex enough break the modified Zend_Db code. There exists an easier MSSQL paging technique. Using features first available in SQL Server 2005, with only 1 subquery you can mimic MySQL's LIMIT clause with ease.

He includes the query that will make it happen (the SQL for it) and then the implementation as an adapter you can use to get it to cooperate in your Doctrine queries.

0 comments voice your opinion now!
mssql doctrine limit paging adapter


Brian Swan's Blog:
MSSQL vs. SQLSRV What's the Difference? (Part 2)
March 12, 2010 @ 09:37:44

Brian Swan has posted the second part of his series looking at the difference between the MSSQL driver and the SQLSRV drivers for connecting to SQL Server databases from PHP (part one can be found here). He gets a bit more detailed in this second post.

I'm aiming to provide a high-level comparison that you might use if you were considering moving to the SQLSRV extension, but I think there is also some interesting information if you are just curious about the differences. [...] In cases where a short note wasn't enough (and there were several of these), I've provided relevant links to topics in the SQLSRV documentation.

He talks about things that one offers that the other doesn't, like prepared statements (sqlsrv) and working with stored procedures (mssql). He also mentions error handlng, persistent connections and scrollable cursors in sqlsrv. Finally he gets into a one-to-one function comparison of the two drivers with the sqlsrv function list coming up a bit short compared to the features of the more recend (and well-supported) mssql driver.

0 comments voice your opinion now!
mssql driver sqlsrv microsoft sqlserver compare


Brian Swan's Blog:
mssql vs. sqlsrv What's the Difference? (Part 1)
March 10, 2010 @ 09:09:55

In a new post to his blog Brian Swan compares the database drivers for MSSQL and SQLSRV by what they have to offer and what the real differences are to your applications.

In this post I want to begin looking at some of the differences between the two drivers and perhaps gain an understanding of why the mssql driver continues to be used (although I have some good guesses). There are lots of comparison points between the mssql and sqlsrv drivers. I'll break my comparison into two posts, focusing on high-level differences in this post and then dive into an API comparison in the next post.

This first of the two parts looks at some of the differences between the two - the Microsoft support for the sqlsrv driver vs community-driven mssql and the fact that they're very different "under the hood" (see this diagram).

0 comments voice your opinion now!
mssql sqlsrv microsoft driver comparison


Danne Lundqvist's Blog:
Adding support for MS SQL Server to PHP in Linux
January 06, 2010 @ 08:19:11

Danne Lundqvist has a new post showing how to get MS SQL Server support to work with your PHP installation on linux with the help of the FreeTDS tool.

Adding support for MS SQL Server in PHP is not very difficult. Searching (Google/Bing/whatever) reveals lots of information on how to do this with Windows - naturally - but very little on how to go about it using Linux. Most people use precompiled PHP installations and I will show how to add MS SQL Server support to a precompiled PHP installation here. Those of you compiling PHP yourselves will probably understand what to do and what not based on the information here as well.

You'll have to get and install (compile) the latest version of the FreeTDS software, install the mssql extension from the PECL repository and install the extension into your PHP instance. With it installed and working, you can change the configuration file to add in whatever server information you'd like.

0 comments voice your opinion now!
mssql server linux module freetds tutorial


Lukas Smith's Blog:
Persistent connections with MSSQL
December 11, 2008 @ 12:01:26

Lukas Smith is looking for a little help on a strange problem he's seeing connecting to a SQL Server with persistent connections:

We are connecting to SQL Server via mssql_pconnect(). MaxChilds is set to 256 and we are only establishing one connection per request. So as a result I am expecting a maximum of 256 established connections. A client went into production yesterday and due to a missing index the server ended up being insanely loaded, as the queries started to block each other. The sysadmin checked the state of things via netstat and found that there were close to 500 tcp connections to the SQL Server. What gives?

He checked FreeTDS and the MaxRequestsPerChild settings to ensure that nothing there could have caused the problem, but hasn't found any hints so far. If he can't solve it right away, he also wonders if there's a way to kill idle connections if they're not used in a certain amount of time.

There's already one connect that mentions a similar issue but with Oracle connections, also on RHEL, but no definitive answers so far.

1 comment voice your opinion now!
persistent connection mssql mssqlpconnect tcp problem freetds


HowTo Forge:
Installing The PHP-MSSQL Module On CentOS 5.0
August 29, 2007 @ 11:16:00

The HowTo Forge website has a new tutorial CentOS users out there might want to check out. It steps through the installation of a MSSQL database extension for PHP (it's not installed by default) from the yum repository.

As you might have noticed on Centos 5.0, there is no PHP-MSSQL module/extension available in the default yum repositories. So if you want to use it you can alter the PHP binary or you can compile an mssql module/extension. In this article I will explain how to compile the mssql module/extension.

It's a pretty simple process involving only a few downloads (RPM files) and altering the contents of some configuration files to make things work together happily. In the end, you'll have a dynamic extension you can load into your PHP installation whenever you want.

0 comments voice your opinion now!
centos rpm mssql database tutorial install module compile centos rpm mssql database tutorial install module compile


PHPBuilder.com:
Cross-Platform Database PHP Development
June 25, 2007 @ 11:44:00

On PHPBuilder.com today, there's a new tutorial focusing on the development of PHP applications that can be run on different database environments without many changes to the actual application.

There are several options available to interact with multiple database engines with PHP, such as Pear DB and MDB2. However, there may instances where you will be required to develop your own custom database interface that connects to many different database engines using a single unified syntax. This article will address the development of a class that will do exactly that. In addition, we will include the ability to replicate data among several databases in real time.

They create their own abstraction layer that has the ability to make the connection, replicate data between connections, handle some errors and work with database configuration data. The tutorial shows you how to use the script for three different database types - MySQL, Oracle, and MS SQL.

1 comment voice your opinion now!
crossplatform database development tutorial abstraction oracle mysql mssql crossplatform database development tutorial abstraction oracle mysql mssql



Community Events





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


api package community update podcast install bugfix release laravel tips series opinion framework interview deployment zendserver symfony introduction language library

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