<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results matching tags 'SQL Server' and 'Wordpress'</title><link>http://sqlblog.com/search/SearchResults.aspx?o=DateDescending&amp;tag=SQL+Server,Wordpress&amp;orTags=0</link><description>Search results matching tags 'SQL Server' and 'Wordpress'</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Wordpress Installation (on IIS and SQL Server)</title><link>http://sqlblog.com/blogs/davide_mauri/archive/2012/05/27/wordpress-installation-on-iis-and-sql-server.aspx</link><pubDate>Sun, 27 May 2012 14:14:59 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:43603</guid><dc:creator>manowar</dc:creator><description>&lt;p&gt;To proceed with the installation of Wordpress on SQL Server and IIS, first of all, you need to do the following steps&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Create a database on SQL Server that will be used by Wordpress&lt;/li&gt;    &lt;li&gt;Create login that can access to the just created database and put the user into ddladmin, db_datareader, db_datawriter roles&lt;/li&gt;    &lt;li&gt;Download and unpack &lt;a href="http://wordpress.org/download/"&gt;Wordpress 3.3.2&lt;/a&gt; (latest version as of 27 May 2012) zip file into a directory of your choice&lt;/li&gt;    &lt;li&gt;Download the &lt;a href="http://wordpress.org/extend/plugins/wordpress-database-abstraction/"&gt;wp-db-abstraction 1.1.4&lt;/a&gt; (latest version as of 27 May 2012) plugin from wordpress.org website&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Now that the basic action has been done, you can start to setup and configure your Wordpress installation.&lt;/p&gt;  &lt;p&gt;Unpack and follow the instructions in the README.TXT file to install the Database Abstraction Layer. Mainly you have to:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Upload wp-db-abstraction.php and the wp-db-abstraction directory to wp-content/mu-plugins.&amp;#160; This should be parallel to your regular plugins directory.&amp;#160; If the mu-plugins directory does not exist, you must create it. &lt;/li&gt;    &lt;li&gt;Put the db.php file from inside the wp-db-abstraction.php directory to wp-content/db.php &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Now you can create an application pool in IIS like the following one&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/davide_mauri/image_331E25CD.png"&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://sqlblog.com/blogs/davide_mauri/image_thumb_1F90C62C.png" width="244" height="221" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Create a website, using the above Application Pool, that points to the folder where you unpacked Wordpress files.&lt;/p&gt;  &lt;p&gt;Be sure to give the “Write” permission to the IIS account, as pointed out in this (old, but still quite valid) installation manual:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://wordpress.visitmix.com/development/installing-wordpress-on-sql-server#iis" href="http://wordpress.visitmix.com/development/installing-wordpress-on-sql-server#iis"&gt;http://wordpress.visitmix.com/development/installing-wordpress-on-sql-server#iis&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now you’re ready to go. Point your browser to the configured website and the Wordpress installation screen will be there for you.&lt;/p&gt;  &lt;p&gt;When you’re requested to enter information to connect to MySQL database, simply skip that page, leaving the default values. If you have installed the Database Abstraction Layer, another database installation screen will appear after the one used by MySQL, and here you can enter the configuration information needed to connect to SQL Server.&lt;/p&gt;  &lt;p&gt;After having finished the installation steps, you should be able to access and navigate your wordpress site.&amp;#160; A final touch, and it’s done: just add the needed rewrite rules &lt;/p&gt;  &lt;p&gt;&lt;a title="http://wordpress.visitmix.com/development/installing-wordpress-on-sql-server#urlrewrite" href="http://wordpress.visitmix.com/development/installing-wordpress-on-sql-server#urlrewrite"&gt;http://wordpress.visitmix.com/development/installing-wordpress-on-sql-server#urlrewrite&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;and that’s it!&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom-style:none;border-left-style:none;border-top-style:none;border-right-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://sqlblog.com/blogs/davide_mauri/wlEmoticon-smile_44AE1098.png" /&gt;&lt;/p&gt;  &lt;p&gt;Well. Not really. Unfortunately the current (as of 27 May 2012) version of the Database Abstraction Layer (1.1.4) has some bugs. Luckily they can be quickly fixed:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Backslash Fix      &lt;br /&gt;&lt;/strong&gt;&lt;a href="http://wordpress.org/support/topic/plugin-wp-db-abstraction-fix-problems-with-backslash-usage"&gt;http://wordpress.org/support/topic/plugin-wp-db-abstraction-fix-problems-with-backslash-usage&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Select Top 0 Fix      &lt;br /&gt;&lt;/strong&gt;Make the change to the file “.\wp-content\mu-plugins\wp-db-abstraction\translations\sqlsrv\translations.php” suggested by “debettap” &lt;img style="border-bottom-style:none;border-left-style:none;border-top-style:none;border-right-style:none;" class="wlEmoticon wlEmoticon-winkingsmile" alt="Winking smile" src="http://sqlblog.com/blogs/davide_mauri/wlEmoticon-winkingsmile_040BC429.png" /&gt;&amp;#160; &lt;a title="http://sourceforge.net/tracker/?func=detail&amp;amp;aid=3485384&amp;amp;group_id=315685&amp;amp;atid=1328061" href="http://sourceforge.net/tracker/?func=detail&amp;amp;aid=3485384&amp;amp;group_id=315685&amp;amp;atid=1328061"&gt;http://sourceforge.net/tracker/?func=detail&amp;amp;aid=3485384&amp;amp;group_id=315685&amp;amp;atid=1328061&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;And now you have a 100% working Wordpress installation on SQL Server! &lt;/p&gt;  &lt;p&gt;Since I also wanted to take advantage of SQL Server Full Text Search, I’ve created a very simple wordpress plugin to setup full-text search and to use it as website search engine:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://wpfts.codeplex.com/"&gt;http://wpfts.codeplex.com/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Enjoy! &lt;/p&gt;</description></item><item><title>PHP Setup for IIS and SQL Server</title><link>http://sqlblog.com/blogs/davide_mauri/archive/2012/05/07/php-setup-for-iis-and-sql-server.aspx</link><pubDate>Mon, 07 May 2012 15:20:50 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:43244</guid><dc:creator>manowar</dc:creator><description>&lt;p&gt;Making PHP running on IIS and configuring it to be able to connect and query a SQL Server database is quite easy. If just need to get pointed to the correct direction, since information are spread all across the web but sometimes is not easy to understand to which version they apply.&lt;/p&gt;  &lt;p&gt;So, since our primary goal is to have &lt;strong&gt;Wordpress 3.3.2&lt;/strong&gt; (the latest version as of 07 May 2012) and &lt;strong&gt;PHPBB 3.0.12&lt;/strong&gt; (the latest version as of 07 May 2012) up and running, we’ll download the latest &lt;strong&gt;PHP 5.3&lt;/strong&gt; version (PHP 5.4 has been reported to have some problems with the current version of Wordpress so we won’t go for the latest one).&lt;/p&gt;  &lt;p&gt;So the first step is to&lt;em&gt; download PHP 5.3.12 version from PHP.NET web site&lt;/em&gt;:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://windows.php.net/download/" href="http://windows.php.net/download/"&gt;http://windows.php.net/download/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;As you may notice there are tow flavor of the PHP distribution: Thread Safe and Non Thread Safe (NTS).&lt;/p&gt;  &lt;p&gt;I’ve googled/binged a bit to understand what’s the advised flavor and as you can read here&lt;/p&gt;  &lt;p&gt;&lt;a title="http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis/" href="http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis/"&gt;http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis/&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;the best practice is to use the NTS flavor.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;I downloaded the Zip package, and unzipped the files in a newly created PHP directory under C: drive (C:\PHP)&lt;/p&gt;  &lt;p&gt;The above link also pointed me to a resource page very helpful for everyone trying to install PHP and configure on IIS:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://learn.iis.net/page.aspx/24/running-php-applications-on-iis/" href="http://learn.iis.net/page.aspx/24/running-php-applications-on-iis/"&gt;http://learn.iis.net/page.aspx/24/running-php-applications-on-iis/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The following link give also additional information&lt;/p&gt;  &lt;p&gt;&lt;a title="http://php.net/manual/en/install.windows.iis7.php" href="http://php.net/manual/en/install.windows.iis7.php"&gt;http://php.net/manual/en/install.windows.iis7.php&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I also found a very nice IIS Add-on that allows you to manage PHP directly from IIS:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://phpmanager.codeplex.com/" href="http://phpmanager.codeplex.com/"&gt;http://phpmanager.codeplex.com/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;One installed the PHP Manager, you can check that everything is working simply checking that PHPINFO() works:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/davide_mauri/image_2BA20BA0.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://sqlblog.com/blogs/davide_mauri/image_thumb_1814ABFF.png" width="244" height="224" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/davide_mauri/image_4FE6F022.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://sqlblog.com/blogs/davide_mauri/image_thumb_6D78CB21.png" width="244" height="199" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;To be able to use SQL Server from PHP you need the PHP SQL Server Drivers provided by Microsoft:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://blogs.iis.net/sqlphp/archive/2012/03/22/microsoft-drivers-3-0-1-for-php-for-sql-server-with-php-5-4-support-released.aspx" href="http://blogs.iis.net/sqlphp/archive/2012/03/22/microsoft-drivers-3-0-1-for-php-for-sql-server-with-php-5-4-support-released.aspx"&gt;http://blogs.iis.net/sqlphp/archive/2012/03/22/microsoft-drivers-3-0-1-for-php-for-sql-server-with-php-5-4-support-released.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="http://sqlsrvphp.codeplex.com/" href="http://sqlsrvphp.codeplex.com/"&gt;http://sqlsrvphp.codeplex.com/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Once the file has ben downloaded I extracted it to a C:\PHPSQLSRVfolder.&lt;/p&gt;  &lt;p&gt;Now you must acknowledge PHP that they exists and should be used. You can do it directly modifying your &amp;lt;php install folder&amp;gt;\php.ini file, adding the reference to the extension, &lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/davide_mauri/image_05300288.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://sqlblog.com/blogs/davide_mauri/image_thumb_597F388B.png" width="244" height="67" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;begin sure to have copied the correct .dll file into the &amp;lt;php install folder&amp;gt;\ext folder.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/davide_mauri/image_63D05CEB.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://sqlblog.com/blogs/davide_mauri/image_thumb_576239C2.png" width="244" height="122" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;if you have installed the PHP Manager, you can also enable/disable extension from here (.dll file must be manually copied into the /ext directory anyway)&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/davide_mauri/image_484B5AE8.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://sqlblog.com/blogs/davide_mauri/image_thumb_3BDD37BF.png" width="244" height="142" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;As you may have noticed, after having unzipped the PHP SQL Server Drivers&amp;#160; you have a bunch of files to choose from. Which is the one right for you? For the configuration we’ve chosen we have to go for the “standard” (which means not the “pdo” driver), non-thread safe PHP 5.3 driver. As you can guess the file we need is &lt;/p&gt;  &lt;p&gt;php_sqlsrv_53_nts.dll&lt;/p&gt;  &lt;p&gt;After having restarted your website, you can check in the phpinfo() page if the extension was loaded correcty:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/davide_mauri/image_73AF7BE2.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://sqlblog.com/blogs/davide_mauri/image_thumb_3DCA86C8.png" width="244" height="85" /&gt;&lt;/a&gt;&lt;/p&gt;              &lt;p&gt;I &lt;strong&gt;strongly &lt;/strong&gt;suggest to take a look at the help file that comes with the PHP SQL Server Drivers, so that you can start to get used to access SQL Server from PHP. In particular use the code shown in the &lt;/p&gt;  &lt;p&gt;“How to: Connect Using SQL Server Authentication”&lt;/p&gt;  &lt;p&gt;help article in order to create a .php page to test that your environment can correctly connect to SQL Server.&lt;/p&gt;  &lt;p&gt;Of course be sure to have at least the SQL Server Native Client installed on the web server, otherwise you won’t be able to connect to SQL Server from PHP.&lt;/p&gt;  &lt;p&gt;&lt;a title="http://www.microsoft.com/en-us/download/details.aspx?id=29065" href="http://www.microsoft.com/en-us/download/details.aspx?id=29065"&gt;http://www.microsoft.com/en-us/download/details.aspx?id=29065&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;That’s it! You now have a PHP environment on you IIS 7 / 7.5 capable of using SQL Server as RDBMS.&lt;/p&gt;</description></item><item><title>Wordpress and PHPBB on SQL Server</title><link>http://sqlblog.com/blogs/davide_mauri/archive/2012/05/07/wordpress-and-phpbb-on-sql-server.aspx</link><pubDate>Mon, 07 May 2012 14:12:18 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:43239</guid><dc:creator>manowar</dc:creator><description>&lt;p&gt;In the last months, in the spare time, I started to study PHP in order to use it on a Windows + SQL Server box. Why you would do such thing you may be wondering. The point is that Wordpress is actually, IMHO, the state of the art of a free CMS that must be used as the backend for a community site: it’s feature-rich, it has a *lot* of plugins and themes, it can be used to host blogs and to empower a “thematic” website. In my case I’d like to refresh the engine used to publish the Italian SQL Server User Group website.&lt;/p&gt;  &lt;p&gt;I’ve looked for a lot of alternatives in the .NET World, and I evaluated in the last year&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Umbraco &lt;/li&gt;    &lt;li&gt;DotNetNuke &lt;/li&gt;    &lt;li&gt;Community Server &lt;/li&gt;    &lt;li&gt;Orchard &lt;/li&gt;    &lt;li&gt;ScrewturnWiki &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;For one reason or another, none of the mentioned platforms, which are great platforms BTW, was the right for us. We needed something&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Capable of managing a community portal with news, articles, events, calendars and so on &lt;/li&gt;    &lt;li&gt;Capable of managing the blogs of members, allowing the generation of new blog sub site on the fly &lt;/li&gt;    &lt;li&gt;Fully customizable with a minimum effort for the end user &lt;/li&gt;    &lt;li&gt;Enabled to use HTML5 and CSS3 &lt;/li&gt;    &lt;li&gt;Stable and Mature, with a good documentation and/or forum support &lt;/li&gt;    &lt;li&gt;Easy to be extended/modified adapted to our needs &lt;/li&gt;    &lt;li&gt;Compatible with MSN Live Writer &lt;/li&gt;    &lt;li&gt;Compatible with SQL Server &lt;/li&gt;    &lt;li&gt;Capable of hosting forums or capable of be integrated with a 3rd party forum platform &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;And at the end the platform that suits all our need is…Wordpress!&lt;/p&gt;  &lt;p&gt;Of course this decision bring some challenges in the game:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;I need to be sure that Wordpress can work *well* with SQL Server &lt;/li&gt;    &lt;li&gt;I need to integrate Wordpress with a forum software. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Luckily Microsoft has written a cool abstraction layer for Wordpress, that make it compatible with SQL Server. And, even more luckily, there is a mainstream forum solution, PHPBB, natively compatible with SQL Server.&lt;/p&gt;  &lt;p&gt;Of course not everything is as smooth as one would like it to be, so there are some “attention point” that one need to take into account when going in this way. And since there isn’t a lot of&amp;#160; documentation available on running Wordpress together with PHPBB on SQL Server, I though that writing some post can be helpful to the community. After all Wordpress and PHPBB are two *great* solution and having them available on SQL Server is something desirable in my opinion.&lt;/p&gt;  &lt;p&gt;So, in the next months, I’ll write a series of four (maybe five) posts to describe how to have a Wordpress + PHPBB on IIS + SQL Server solution up and running.&lt;/p&gt;  &lt;p&gt;Here’s the agenda of the next posts:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://sqlblog.com/blogs/davide_mauri/archive/2012/05/07/php-setup-for-iis-and-sql-server.aspx"&gt;PHP Setup for IIS and SQL Server&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://sqlblog.com/blogs/davide_mauri/archive/2012/05/27/wordpress-installation-on-iis-and-sql-server.aspx"&gt;Wordpress Installation&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;PHPBB Installation &lt;/li&gt;    &lt;li&gt;Wordpress &amp;amp; PHPBB Login Integration &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;I’ll hope you’ll enjoy the topics!&lt;/p&gt;</description></item></channel></rss>