<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>RuslanY Blog &#187; WebMatrix</title>
	<atom:link href="http://ruslany.net/tag/webmatrix/feed/" rel="self" type="application/rss+xml" />
	<link>http://ruslany.net</link>
	<description>IIS, FastCGI, PHP and other interesting stuff</description>
	<lastBuildDate>Fri, 26 Aug 2011 06:36:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to enable Xdebug in WebMatrix</title>
		<link>http://ruslany.net/2011/02/how-to-enable-xdebug-in-webmatrix/</link>
		<comments>http://ruslany.net/2011/02/how-to-enable-xdebug-in-webmatrix/#comments</comments>
		<pubDate>Fri, 18 Feb 2011 19:07:58 +0000</pubDate>
		<dc:creator>ruslany</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[WebMatrix]]></category>
		<category><![CDATA[Xdebug]]></category>

		<guid isPermaLink="false">http://ruslany.net/?p=977</guid>
		<description><![CDATA[Xdebug is a very popular PHP extension that helps with debugging and profiling of PHP scripts by providing a lot of valuable debug information. Microsoft WebMatrix is a development tool for building web applications. When WebMatrix is used to build or modify a PHP-based web application the debugging tasks can be greatly simplified if Xdebug [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://xdebug.org/">Xdebug</a> is a very popular PHP extension that helps with debugging and profiling of PHP scripts by providing a lot of valuable debug information. <a href="http://www.microsoft.com/web/webmatrix/">Microsoft WebMatrix </a>is a development tool for building web applications. When WebMatrix is used to build or modify a PHP-based web application the debugging tasks can be greatly simplified if Xdebug extension is used. This post explains how to install and use Xdebug extension with WebMatrix.<span id="more-977"></span></p>
<p><strong>Step 1</strong>: Enable PHP in WebMatrix from the site “Settings” page:</p>
<p><a href="http://ruslany.net/wp-content/uploads/2011/02/EnablePHP.png"><img class="alignnone size-medium wp-image-978 screenshot" title="Enable PHP in WebMatrix" src="http://ruslany.net/wp-content/uploads/2011/02/EnablePHP-500x326.png" alt="" width="500" height="326" /></a></p>
<p>Note that if you installed any of the PHP applications from the Application Gallery then PHP will be automatically enabled.</p>
<p><strong>Step 2</strong>: Download the appropriate build of Xdebug extension from <a href="http://xdebug.org/download.php">downloads page</a>. If your site uses PHP 5.2 then download “<em>5.2 VC6 Non-thread safe (32 bit)</em>”. If your site uses PHP 5.3 then download “<em>5.3 VC9 Non-thread safe (32 bit)</em>”. <strong>Use 32 bit build even if your Windows OS is 64 bit</strong>.</p>
<p><strong>Step 3</strong>: Install the extension by copying the downloaded file to the following locations:</p>
<ul>
<li>For PHP 5.2 on Windows 64 bit:<br />
C:\Program Files (x86)\IIS Express\PHP\v5.2\ext\</li>
<li>For PHP 5.2 on Windows 32 bit:<br />
C:\Program Files\IIS Express\PHP\v5.2\ext\</li>
<li>For PHP 5.3 on Windows 64 bit:<br />
C:\Program Files (x86)\IIS Express\PHP\v5.3\ext\</li>
<li>For PHP 5.3 on Windows 32 bit:<br />
C:\Program Files\IIS Express\PHP\v5.3\ext\</li>
</ul>
<p><strong>Step 4</strong>: Open the php.ini file located in the PHP installation folder, e.g.<br />
C:\Program Files\IIS Express\PHP\v5.2\php.ini and append the following at the end (make sure that the absolute path is correct for your version of PHP and Windows.):</p>
<pre name="code" class="dos">
[xdebug]
zend_extension = C:\Program Files\iis express\PHP\v5.2\ext\php_xdebug-2.1.0-5.2-vc6-nts.dll
</pre>
<p><strong>Step 5</strong>: Configure PHP to display errors by changing these PHP settings in php.ini file:</p>
<pre name="code" class="dos">
display_errors = On
error_reporting = E_ALL &amp; ~E_NOTICE
</pre>
<p><strong>Step 6</strong>: Test that extension is enabled and works by either calling a phpinfo() function from a script or by running a buggy script:</p>
<p><a href="http://ruslany.net/wp-content/uploads/2011/02/DivideByZero.png"><img class="alignnone size-medium wp-image-981 screenshot" title="Xdebug output" src="http://ruslany.net/wp-content/uploads/2011/02/DivideByZero-500x246.png" alt="" width="500" height="246" /></a></p>
<p>The Xdebug extension provides a lot of useful features that help with debugging of PHP applications. You can learn more about them from the <a href="http://xdebug.org/docs/">Xdebug documentation</a>. For example you can use it to profile a PHP application. Just change the php.ini file as shown below and then make a request to a PHP script:</p>
<pre name="code" class="dos">
[xdebug]
zend_extension = C:\Program Files\iis express\PHP\v5.2\ext\php_xdebug-2.1.0-5.2-vc6-nts.dll
xdebug.profiler_enable = On
xdebug.profiler_output_dir = C:\Windows\temp
</pre>
<p>The profile log will be saved into the specified directory and will have a name cachegrind.out.* Use <a href="http://sourceforge.net/projects/wincachegrind/">WinCacheGrind</a> to open and analyze it:</p>
<p><a href="http://ruslany.net/wp-content/uploads/2011/02/Wincachegrind.png"><img class="alignnone size-medium wp-image-982 screenshot" title="WinCacheGrind output" src="http://ruslany.net/wp-content/uploads/2011/02/Wincachegrind-500x355.png" alt="" width="500" height="355" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://ruslany.net/2011/02/how-to-enable-xdebug-in-webmatrix/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>PHP 5.3 and PEAR available in WebMatrix Beta 3</title>
		<link>http://ruslany.net/2010/11/php-5-3-and-pear-available-in-webmatrix-beta-3/</link>
		<comments>http://ruslany.net/2010/11/php-5-3-and-pear-available-in-webmatrix-beta-3/#comments</comments>
		<pubDate>Wed, 10 Nov 2010 20:50:14 +0000</pubDate>
		<dc:creator>ruslany</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[WebMatrix]]></category>

		<guid isPermaLink="false">http://ruslany.net/?p=918</guid>
		<description><![CDATA[WebMatrix Beta 3 release has been announced recently. This release includes many new cool features that are described in release announcement and in the Web Deploy team blog. In addition to all those improvements, WebMatrix Beta 3 has much better support for PHP. Specifically: It is now possible to enable PHP 5.3 (previous versions of WebMatrix [...]]]></description>
			<content:encoded><![CDATA[<p>WebMatrix Beta 3 release has been <a href="http://blogs.iis.net/bills/archive/2010/11/09/final-webmatrix-and-mvc-3-beta-now-available.aspx">announced recently</a>. This release includes many new cool features that are described in release announcement and in the <a href="http://blogs.iis.net/msdeploy/archive/2010/11/09/webmatrix-beta-3-download-published-site.aspx">Web Deploy team blog</a>. In addition to all those improvements, <a href="http://www.microsoft.com/web/webmatrix/">WebMatrix Beta 3</a> has much better support for PHP. Specifically:</p>
<ul>
<li>It is now possible to enable PHP 5.3 (previous versions of WebMatrix and Web PI only supported PHP 5.2)</li>
<li>PHP can now be enabled on an empty new site in WebMatrix (previously it was required to install a PHP application in order to enable PHP on a site)</li>
<li>PEAR installation is now included when PHP is installed.</li>
</ul>
<p>This post describes those improvements in more details.<span id="more-918"></span></p>
<h3>Enabling PHP in WebMatrix</h3>
<p>When you create a new web site in WebMatrix, by default PHP is not enabled. To enable it go to “Site” –&gt; “Settings” and use the “Enable PHP” check box:</p>
<p><a href="http://ruslany.net/wp-content/uploads/2010/11/WebMatrixPHP1.png"><img class="alignnone size-medium wp-image-919 screenshot" title="Enable PHP in WebMatrix" src="http://ruslany.net/wp-content/uploads/2010/11/WebMatrixPHP1-500x366.png" alt="" width="500" height="366" /></a></p>
<p>You can choose whether to enable latest stable version of PHP 5.2 or PHP 5.3:</p>
<p><a href="http://ruslany.net/wp-content/uploads/2010/11/WebMatrixPHP2.png"><img class="alignnone size-medium wp-image-920 screenshot" title="Select PHP version" src="http://ruslany.net/wp-content/uploads/2010/11/WebMatrixPHP2-500x366.png" alt="" width="500" height="366" /></a></p>
<p>If a selected PHP version is not yet installed then it will be downloaded and installed when you choose to enable it for a site:</p>
<p><a href="http://ruslany.net/wp-content/uploads/2010/11/WebMatrixPHP3.png"><img class="alignnone size-medium wp-image-921 screenshot" title="Install PHP" src="http://ruslany.net/wp-content/uploads/2010/11/WebMatrixPHP3-500x365.png" alt="" width="500" height="365" /></a></p>
<p>(Note that Microsoft Visual C++ Redistributable Package is installed as a depenency for PHP 5.3. This is because WebMatrix and IIS use PHP 5.3 VC9 build, which requires VC9 runtime installed on a machine).</p>
<p>In addition to making it easy to enable PHP for a site, WebMatrix also allows you to easily change major PHP version for a particular site. This is useful when you develop a PHP application and want to test that it works correctly across PHP 5.2 and PHP 5.3. To change the PHP version go back to “Site” –&gt; “Settings” section and use the “Change” link:</p>
<p><a href="http://ruslany.net/wp-content/uploads/2010/11/WebMatrixPHP8.png"><img class="alignnone size-full wp-image-922 screenshot" title="Change PHP version" src="http://ruslany.net/wp-content/uploads/2010/11/WebMatrixPHP8.png" alt="" width="347" height="305" /></a></p>
<h3>PEAR installation</h3>
<p><a href="http://pear.php.net/">PEAR</a> is a framework and distribution system for reusable PHP components. Until recently PEAR was not installed with PHP if installation was performed by Web Platform Installer. With WebMatrix Beta 3 (and with Web Platform Installer 3.0 Beta 3), the PEAR installation scripts are installed when PHP is installed. This means that after you use Web Platform Installer 3.0 to install PHP either for IIS or for WebMatrix, you can enable PEAR by following the instructions described at <a href="http://pear.php.net/manual/en/installation.getting.php">Getting and installing the PEAR package manager</a>. I will write a more detailed blog post with instructions on how to enable PEAR on Windows and how to install popular PEAR packages.</p>
]]></content:encoded>
			<wfw:commentRss>http://ruslany.net/2010/11/php-5-3-and-pear-available-in-webmatrix-beta-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Install PHP applications with WebMatrix</title>
		<link>http://ruslany.net/2010/07/install-php-applications-with-webmatrix/</link>
		<comments>http://ruslany.net/2010/07/install-php-applications-with-webmatrix/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 20:45:10 +0000</pubDate>
		<dc:creator>ruslany</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WebMatrix]]></category>

		<guid isPermaLink="false">http://ruslany.net/?p=791</guid>
		<description><![CDATA[Microsoft has recently launched a beta release of a new project called WebMatrix. This is a complete web development stack that can be used to start developing and deploying web sites. One thing that may be not so obvious from all the existing announcements is the fact that WebMatrix has full support for installing, running and [...]]]></description>
			<content:encoded><![CDATA[<p>Microsoft has recently launched a beta release of a new project called <a href="http://www.microsoft.com/web/webmatrix/">WebMatrix</a>. This is a complete web development stack that can be used to start developing and deploying web sites. One thing that may be not so obvious from all the existing announcements is the fact that WebMatrix has full support for installing, running and publishing PHP applications.</p>
<p>Here are the examples of how WebMatrix can be used to create and publish a PHP web site (using WordPress as a showcase).<span id="more-791"></span></p>
<h3>Installing a PHP application</h3>
<p>After installing and launching WebMatrix select “Site from Web Gallery” option and then pick WordPress:</p>
<p><a href="http://ruslany.net/wp-content/uploads/2010/07/WebMatrix3.png"><img class="alignnone size-medium wp-image-796 screenshot" title="Select a PHP application in Web Gallery" src="http://ruslany.net/wp-content/uploads/2010/07/WebMatrix3-400x285.png" alt="" width="400" height="285" /></a></p>
<p>Follow the installation steps as described in <a href="http://learn.iis.net/page.aspx/863/download-and-install-a-php-application/">Download and Install a PHP application</a>. As you proceed you will notice that WebMatrix downloads and installs the necessary components for running WordPress – the latest version of PHP 5.2 and MySQL. At the end of the installation process you will get a working instance of WordPress, that you can configure and customize further:</p>
<p><a href="http://ruslany.net/wp-content/uploads/2010/07/WebMatrix9.png"><img class="alignnone size-medium wp-image-797 screenshot" title="WordPress in Web Browser" src="http://ruslany.net/wp-content/uploads/2010/07/WebMatrix9-400x316.png" alt="" width="400" height="316" /></a></p>
<p>Notice the port number used in the URL. This is not the standard port 80 used by default in IIS. The site is not running on IIS that is included with operating system. Instead WebMatrix installs and uses <a href="http://blogs.iis.net/vaidyg/archive/2010/07/06/introducing-iis-developer-express.aspx">IIS Developer Express</a>, which is a developer-focused version of IIS that runs on all versions of Windows, starting from Windows XP. This is actually very cool because now it is possible to get the latest and greatest IIS features on Windows XP instead of using the good old IIS 5.1 as development web server <img src='http://ruslany.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . But even if you already have Windows 7, you may still want to use IIS Developer Express, because with that you do not need to enable real IIS Web Server included with OS on your development machine.</p>
<p>Even though IIS Developer Express is a lightweight development server it comes with everything needed to run PHP applications, including the latest version of FastCGI module and URL Rewrite 2.0. This means that after you install WordPress with WebMatrix you can enable WordPress’ pretty permalinks by following the instructions at <a href="http://ruslany.net/2009/05/iis-7-url-rewrite-module-support-in-wordpress-28/">IIS URL Rewrite Module support in WordPress</a>.</p>
<blockquote><p><strong>Note</strong>: By default WebMatrix and IIS Developer Express are not configured to run PHP even if PHP is already installed on the machine. To work this around  install any PHP application via WebMatrix UI. This way WebMatrix will configure IIS Developer Express to handle PHP requests. This is something that will be fixed in future releases of WebMatrix.</p></blockquote>
<h3>Modifying a PHP application</h3>
<p>After the WordPress is installed there are several things you can do with it from within WebMatrix. For example you can edit the theme files by using the built-in editor:</p>
<p><a href="http://ruslany.net/wp-content/uploads/2010/07/WebMatrix12.png"><img class="alignnone size-medium wp-image-798 screenshot" title="Modify the WordPress theme file" src="http://ruslany.net/wp-content/uploads/2010/07/WebMatrix12-400x344.png" alt="" width="400" height="344" /></a></p>
<p>You can check what kind of HTTP requests are made by Web Browser to load a typical WordPress page:</p>
<p><a href="http://ruslany.net/wp-content/uploads/2010/07/WebMatrix13.png"><img class="alignnone size-medium wp-image-799 screenshot" title="Check HTTP Requests" src="http://ruslany.net/wp-content/uploads/2010/07/WebMatrix13-400x260.png" alt="" width="400" height="260" /></a></p>
<p>(Learn more about this feature at <a href="http://learn.iis.net/page.aspx/867/analyze-your-website/">Using WebMatrix Beta: Analyze Your WebSite</a>)</p>
<p>Also, you can check the WordPress database content by using the WebMatrix Database Manager:</p>
<p><a href="http://ruslany.net/wp-content/uploads/2010/07/WebMatrix15.png"><img class="alignnone size-medium wp-image-803 screenshot" title="Check WordPress Database Content" src="http://ruslany.net/wp-content/uploads/2010/07/WebMatrix15-400x262.png" alt="" width="400" height="262" /></a></p>
<p>And, finally, you can run the search engine optimization analysis and fix any SEO violations found within the application:</p>
<p><a href="http://ruslany.net/wp-content/uploads/2010/07/WebMatrix14.png"><img class="alignnone size-medium wp-image-800 screenshot" title="Search Engine Optimization" src="http://ruslany.net/wp-content/uploads/2010/07/WebMatrix14-400x242.png" alt="" width="400" height="242" /></a></p>
<p>(Learn more about this feature at <a href="http://learn.iis.net/page.aspx/866/make-your-website-seo-friendly/">Using WebMatrix Beta: Make your Website SEO Friendly</a>)</p>
<h3>Publishing a PHP application</h3>
<p>The last step is the publishing of the web application on a live web server. WebMatrix can publish the content to a web server by using various protocols: FTP, FTP/SSL and WebDeploy (note that FTP protocols cannot be used to publish MySQL database). You can pick a hosting provider from the list offered by WebMatrix or you if you know the publishing settings from your hosting provider you can manually enter them in WebMatrix.</p>
<p><a href="http://ruslany.net/wp-content/uploads/2010/07/WebMatrix17.png"><img class="alignnone size-medium wp-image-807 screenshot" title="Publish to a hosting web site" src="http://ruslany.net/wp-content/uploads/2010/07/WebMatrix17-400x307.png" alt="" width="400" height="307" /></a></p>
<p>When you publish the content the WebMatrix will show you the list of files and the database that will be uploaded to the server. Note also that during publishing the WebMatrix will replace the current database connection settings in <strong>wp-config.php</strong>file with the connection settings used on a hosting web server. WebMatrix will extract that information from the connection string that you specify in publishing settings:</p>
<p><a href="http://ruslany.net/wp-content/uploads/2010/07/WebMatrix18.png"><img class="alignnone size-medium wp-image-808 screenshot" title="WebMatrix18" src="http://ruslany.net/wp-content/uploads/2010/07/WebMatrix18-400x307.png" alt="" width="400" height="307" /></a></p>
<p>(Learn more about publishng web sites at <a href="http://learn.iis.net/page.aspx/871/publish-your-website/">Using WebMatrix Beta: Publish Your WebSite</a>)</p>
<h3>Feedback and suggestions</h3>
<p>The WebMatrix is a beta release and the WebMatrix team is open to any constructive feedback on how to improve the product. Do you have any suggestions or have you run into any problems when using WebMatrix? What PHP related features would you like to see in this product? Please let the team know by starting the thread on <a href="http://forums.iis.net/1166.aspx">WebMatrix forum</a> or by leaving a comment here.</p>
]]></content:encoded>
			<wfw:commentRss>http://ruslany.net/2010/07/install-php-applications-with-webmatrix/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
	</channel>
</rss>

