<?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; PHP</title>
	<atom:link href="http://ruslany.net/category/php/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>Command line tools for managing PHP in IIS</title>
		<link>http://ruslany.net/2011/06/command-line-tools-for-managing-php-in-iis/</link>
		<comments>http://ruslany.net/2011/06/command-line-tools-for-managing-php-in-iis/#comments</comments>
		<pubDate>Tue, 28 Jun 2011 17:30:46 +0000</pubDate>
		<dc:creator>ruslany</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP Manager]]></category>

		<guid isPermaLink="false">http://ruslany.net/?p=1096</guid>
		<description><![CDATA[The latest release of PHP Manager 1.2 for IIS now includes Windows PowerShell commands that can be used to install, configure and manage PHP on IIS 7 from command line. In addition those commands can be used to automate the configuration and management tasks. Here are examples of what can be done with PHP Manager [...]]]></description>
			<content:encoded><![CDATA[<p>The latest release of <a href="http://phpmanager.codeplex.com/releases/">PHP Manager 1.2 for IIS </a>now includes Windows PowerShell commands that can be used to install, configure and manage PHP on IIS 7 from command line. In addition those commands can be used to automate the configuration and management tasks.</p>
<p>Here are examples of what can be done with PHP Manager command line tools:<span id="more-1096"></span></p>
<ul>
<li>Register a new PHP version:</li>
</ul>
<pre name="code" class="dos">
PS C:\Users\Administrator&gt;New-PHPVersion -ScriptProcessor &quot;C:\PHP\536\php-cgi.exe&quot;
</pre>
<ul>
<li>Get information about current PHP configuration:</li>
</ul>
<pre name="code" class="dos">
PS C:\Users\Administrator&gt; Get-PHPConfiguration

HandlerName              : php-5.3.6
Version                  : 5.3.6
ScriptProcessor          : C:\php\536\php-cgi.exe
HandlerType              : Local
ErrorLog                 : C:\Windows\Temp\php-5.3.6_errors.log
PHPIniFilePath           : C:\php\536\php.ini
InstalledExtensionsCount : 35
EnabledExtensionsCount   : 9
</pre>
<ul>
<li>Change PHP version for a particular web site or a folder:</li>
</ul>
<pre name="code" class="dos">
PS C:\Users\Administrator&gt; Set-PHPVersion -HandlerName php-5.3.6 -SiteName &quot;Default Web Site&quot;
PS C:\Users\Administrator&gt; Get-PHPVersion -SiteName &quot;Default Web Site&quot;

HandlerName      Version      ScriptProcessor             Active
------------     -------      ---------------             ------
php-5.3.6        5.3.6        C:\php\536\php-cgi.exe      True
php-5.2.17       5.2.17       C:\php\5217\php-cgi.exe     False
</pre>
<ul>
<li>Change PHP settings:</li>
</ul>
<pre name="code" class="dos">
PS C:\Users\Administrator&gt; Set-PHPSetting -Name display_errors -Value On
PS C:\Users\Administrator&gt; Get-PHPSetting -Name *error*

Name                         Value                               Section
----                         -----                               -------
error_reporting              E_ALL                               PHP
display_errors               On                                  PHP
display_startup_errors       Off                                 PHP
log_errors                   On                                  PHP
log_errors_max_len           1024                                PHP
ignore_repeated_errors       Off                                 PHP
track_errors                 Off                                 PHP
html_errors                  Off                                 PHP
mssql.min_error_severity     10                                  MSSQL
error_log                    C:\Windows\temp\php53_errors.log    WebPIChanges
</pre>
<ul>
<li>Enable PHP extensions:</li>
</ul>
<pre name="code" class="dos">

PS C:\Users\Administrator&gt; Get-PHPExtension -Name *pdo*sql* | Set-PHPExtension -Status enabled
PS C:\Users\Administrator&gt; Get-PHPExtension -Name *pdo*sql*

Name                                 Status
----                                 ------
php_pdo_mysql.dll                    Enabled
php_pdo_sqlite.dll                   Enabled
php_pdo_sqlsrv.dll                   Enabled
php_pdo_pgsql.dll                    Enabled
</pre>
<p>Note that the example above demonstrates that it is possible to pipe several commands together. In this particular example the commands are used to enable all PHP extensions that contain &#8220;pdo&#8221; and &#8220;sql&#8221; in their names.</p>
<ul>
<li>Get detailed help for commands and their usage examples:</li>
</ul>
<pre name="code" class="dos">

PS C:\Users\Administrator&gt; get-help Get-PHPExtension

NAME
Get-PHPExtension

SYNOPSIS
Gets the list of PHP extensions available in the currently active PHP version.

SYNTAX
Get-PHPExtension [[-Name] &lt;String&gt;] [[-Status] &lt;PHPExtensionStatus&gt;]
[-SiteName &lt;String&gt;] [-VirtualPath &lt;String&gt;] [&lt;CommonParameters&gt;]

DESCRIPTION
The Get-PHPExtension cmdlet outputs the list of all PHP extensions available
in the currently active PHP version. The list can be filtered by extension
name and by the status (enabled or disabled).

RELATED LINKS
Set-PHPExtension

REMARKS
To see the examples, type: &quot;get-help Get-PHPExtension -examples&quot;.
For more information, type: &quot;get-help Get-PHPExtension -detailed&quot;.
For technical information, type: &quot;get-help Get-PHPExtension -full&quot;.
</pre>
<p>Also, refer to the <a href="http://phpmanager.codeplex.com/wikipage?title=Managing%20PHP%20installations%20with%20PHP%20Manager%20command%20line">PHP Manager Documentation </a>to get more information and usage examples.</p>
<p>Other improvements in the v1.2 include French translation (thanks to Emmanuel Boersma and Sylvain Lecerf) and several bug fixes.</p>
<p>Use <a href="http://www.microsoft.com/web/downloads/default.aspx">Web Platform Installer</a> to get the latest release of PHP Manager for IIS.</p>
<p><a href="http://www.microsoft.com/web/gallery/install.aspx?appid=PHPManager"><img class="alignnone size-full wp-image-329 screenshot" title="Install PHP Manager 1.1 for IIS 7" src="http://ruslany.net/wp-content/uploads/2009/04/wpibadgesilver1.png" alt="" width="176" height="51" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://ruslany.net/2011/06/command-line-tools-for-managing-php-in-iis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WinCache and WordPress plugin upgrade problem</title>
		<link>http://ruslany.net/2011/04/wincache-and-wordpress-plugin-upgrade-problem/</link>
		<comments>http://ruslany.net/2011/04/wincache-and-wordpress-plugin-upgrade-problem/#comments</comments>
		<pubDate>Thu, 14 Apr 2011 18:47:43 +0000</pubDate>
		<dc:creator>ruslany</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[WinCache]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://ruslany.net/?p=1009</guid>
		<description><![CDATA[The WinCache extension 1.1 for PHP has been released last year. Since then several customers reported a bug in the extension that prevents WordPress and other PHP applications from performing automatic upgrades of their plugins. This was reported on WordPress forum as well as on WinCache forum. The new build of WinCache with the fix [...]]]></description>
			<content:encoded><![CDATA[<p>The WinCache extension 1.1 for PHP has been released last year. Since then several customers reported <a href="http://pecl.php.net/bugs/bug.php?id=18010">a bug</a> in the extension that prevents WordPress and other PHP applications from performing automatic upgrades of their plugins. This was reported on <a href="http://wordpress.org/support/topic/wordpress-on-iis-7-plugin-update-problem?replies=33">WordPress forum</a> as well as on <a href="http://forums.iis.net/t/1169832.aspx">WinCache forum</a>.</p>
<p>The new build of WinCache with the fix for this problem is available now at the following location:</p>
<p><a title="https://sourceforge.net/projects/wincache/files/development/" href="https://sourceforge.net/projects/wincache/files/development/">https://sourceforge.net/projects/wincache/files/development/</a></p>
<p>The latest dev build at that location is a release candidate build. Several customers have already verified that this build fixes the problem and is running stable in their environments. Please try it out and let me know if it works or does not work for you. The things to try and to look for are:</p>
<ol>
<li>Try to auto-upgrade any of the WordPress plugins;</li>
<li>After installing this build check the Windows Application event log from time to time looking for errors caused by module “php_wincache.dll”.</li>
</ol>
<p>If you see any errors while using this build please let me know by leaving a comment here or in <a href="http://forums.iis.net/1164.aspx">WinCache forum</a> or by opening a bug in <a href="http://pecl.php.net/bugs/search.php?cmd=display&amp;status=Open&amp;package_name[]=WinCache">PECL bug database</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ruslany.net/2011/04/wincache-and-wordpress-plugin-upgrade-problem/feed/</wfw:commentRss>
		<slash:comments>40</slash:comments>
		</item>
		<item>
		<title>PHP Manager for IIS is available in 5 languages</title>
		<link>http://ruslany.net/2011/03/php-manager-for-iis-is-available-in-5-languages/</link>
		<comments>http://ruslany.net/2011/03/php-manager-for-iis-is-available-in-5-languages/#comments</comments>
		<pubDate>Thu, 10 Mar 2011 21:00:18 +0000</pubDate>
		<dc:creator>ruslany</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP Manager]]></category>

		<guid isPermaLink="false">http://ruslany.net/?p=990</guid>
		<description><![CDATA[A new release of PHP Manager for IIS (version 1.1.2) is available for download. This release includes translations into 5 languages: German &#8211; the translation is provided by Christian Graefe Dutch &#8211; the translation is provided by Harrie Verveer Turkish &#8211; the translation is provided by Yusuf Oztürk Japanese &#8211; the translation is provided by [...]]]></description>
			<content:encoded><![CDATA[<p>A new release of <a href="http://phpmanager.codeplex.com/releases/">PHP Manager for IIS (version 1.1.2)</a> is available for download. This release includes translations into 5 languages:</p>
<ul>
<li><strong>German</strong> &#8211; the translation is provided by <a href="http://www.codeplex.com/site/users/view/Volleyknaller">Christian Graefe</a></li>
<li><strong>Dutch</strong> &#8211; the translation is provided by <a href="http://www.harrieverveer.com/">Harrie Verveer</a></li>
<li><strong>Turkish</strong> &#8211; the translation is provided by <a href="http://www.yusufozturk.info/">Yusuf Oztürk</a></li>
<li><strong>Japanese</strong> &#8211; the translation is provided by <a href="http://www.codeplex.com/site/users/view/z3zenzai">Kenichi Wakasa</a></li>
<li><strong>Russian</strong> &#8211; the translation is provided by <a href="http://ruslany.net/">Ruslan Yakushev</a></li>
</ul>
<p>Thanks to above mentioned people for providing these high quality translations! The <a href="http://phpmanager.codeplex.com/team/view">PHP Manager Project</a> is still looking for volunteers who can help with Spanish, French and Chinese translations.</p>
<p>Note that this release still includes English and it is recommended to upgrade even if you do not need these translations.</p>
<p>Use <a href="http://www.microsoft.com/web/downloads/default.aspx">Web Platform Installer</a> to get the latest release of PHP Manager for IIS (make sure to upgrade to the latest build of Web Platform Installer to get this release of PHP Manager).</p>
<p><a href="http://www.microsoft.com/web/gallery/install.aspx?appid=PHPManager"><img title="Install PHP Manager 1.1 for IIS 7" class="alignnone size-full wp-image-329 screenshot" src="http://ruslany.net/wp-content/uploads/2009/04/wpibadgesilver1.png" alt="" width="176" height="51" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://ruslany.net/2011/03/php-manager-for-iis-is-available-in-5-languages/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<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 Manager 1.1 available in Web PI</title>
		<link>http://ruslany.net/2010/12/php-manager-1-1-available-in-web-pi/</link>
		<comments>http://ruslany.net/2010/12/php-manager-1-1-available-in-web-pi/#comments</comments>
		<pubDate>Fri, 10 Dec 2010 06:15:04 +0000</pubDate>
		<dc:creator>ruslany</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP Manager]]></category>
		<category><![CDATA[WebPI]]></category>

		<guid isPermaLink="false">http://ruslany.net/?p=960</guid>
		<description><![CDATA[PHP Manager 1.1 for IIS 7 has been released today. This is an incremental release that contains all the functionality available in PHP Manager 1.0 for IIS 7 plus additional features listed below: Improved detection logic for existing PHP installations. Now PHP Manager detects the location to php.ini file in accordance to the PHP specifications. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://phpmanager.codeplex.com/">PHP Manager 1.1 for IIS 7</a> has been released today. This is an incremental release that contains all the functionality available in <a href="http://phpmanager.codeplex.com/releases/view/53121">PHP Manager 1.0 for IIS 7</a> plus additional features listed below:</p>
<ul>
<li><strong>Improved detection logic for existing PHP installations</strong>. Now PHP Manager detects the location to php.ini file in accordance to the <a href="http://www.php.net/manual/en/configuration.file.php">PHP specifications</a>.</li>
<li><strong>Configuring date.timezone</strong>. PHP Manager can automatically set the date.timezone directive which is required to be set starting from PHP 5.3.</li>
<li><strong>Ability to add new PHP extensions</strong>. When pointed to a PHP extension file, the PHP Manager will copy it to the right location and will enable the extension in php.ini file.</li>
</ul>
<p>In addition, several bugs were fixed in this release. The complete list of changes can be found in the <a href="http://phpmanager.codeplex.com/SourceControl/list/changesets">change list</a>.</p>
<p>PHP Manager can now be installed with <a href="http://www.microsoft.com/web/downloads/default.aspx">Web Platform Installer</a>. Use the link below to install it:</p>
<p><a href="http://www.microsoft.com/web/gallery/install.aspx?appid=PHPManager"><img class="alignnone size-full wp-image-329 screenshot" title="Install PHP Manager 1.1 for IIS 7" src="http://ruslany.net/wp-content/uploads/2009/04/wpibadgesilver1.png" alt="" width="176" height="51" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://ruslany.net/2010/12/php-manager-1-1-available-in-web-pi/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>How to install PHP PEAR and phploc on Windows</title>
		<link>http://ruslany.net/2010/11/how-to-install-php-pear-and-phploc-on-windows/</link>
		<comments>http://ruslany.net/2010/11/how-to-install-php-pear-and-phploc-on-windows/#comments</comments>
		<pubDate>Mon, 22 Nov 2010 19:00:03 +0000</pubDate>
		<dc:creator>ruslany</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://ruslany.net/?p=942</guid>
		<description><![CDATA[PEAR (short for PHP Extension and Application Repository) is a framework and distribution system for reusable PHP components. In includes many useful tools and components that can be easily downloaded and installed by using PEAR package manager. This post describes how to install and configure PEAR package manager and then how to use it to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://pear.php.net/">PEAR </a>(short for PHP Extension and Application Repository) is a framework and distribution system for reusable PHP components. In includes many useful tools and components that can be easily downloaded and installed by using PEAR package manager. This post describes how to install and configure PEAR package manager and then how to use it to install a PEAR package. An example PEAR package used in this post is <a href="https://github.com/sebastianbergmann/phploc">phploc</a>, which is a tool for measuring the size of PHP projects.</p>
<p>Start by installing PHP on Windows by using one of the following methods:</p>
<ul>
<li>Install PHP for by using <a href="http://www.microsoft.com/web/webmatrix/">Web PI 3.0</a>. With that you can install PHP for either IIS or WebMatrix or both;</li>
<li>Download and unpack the <a href="http://windows.php.net/download/">PHP 5.3 VC9 non-thread-safe zip package </a>and then register it with IIS by using <a href="http://phpmanager.codeplex.com/">PHP Manager</a>.</li>
</ul>
<p>Now open an elevated command line prompt and go to the directory where PHP was installed. For example if PHP 5.3 was installed with Web PI 3.0 then the directory path will be:<span id="more-942"></span></p>
<ul>
<li>%ProgramFiles%\PHP\v53\ – when PHP is installed for IIS</li>
<li>%ProgramFiles%\IIS Express\PHP\v53 – when PHP is installed for IIS Express</li>
</ul>
<p>While in that directory run the go-pear.bat command. If you intend on having multiple versions of PHP installed on the same machine then make sure to answer “local” on the first question asked by go-pear.bat:</p>
<pre name="code" class="dos">
C:\Program Files\PHP\v5.3&gt;go-pear.bat

Are you installing a system-wide PEAR or a local copy?
(system|local) [system] : local
Please confirm local copy by typing &#039;yes&#039; : yes

Below is a suggested file layout for your new PEAR installation.  To
change individual locations, type the number in front of the
directory.  Type &#039;all&#039; to change all of them or simply press Enter to
accept these locations.

1. Installation base ($prefix)                   : C:\Program Files\PHP\v5.3
2. Temporary directory for processing            : C:\Program Files\PHP\v5.3\tmp
3. Temporary directory for downloads             : C:\Program Files\PHP\v5.3\tmp
4. Binaries directory                            : C:\Program Files\PHP\v5.3
5. PHP code directory ($php_dir)                 : C:\Program Files\PHP\v5.3\pear
6. Documentation directory                       : C:\Program Files\PHP\v5.3\docs
7. Data directory                                : C:\Program Files\PHP\v5.3\data
8. User-modifiable configuration files directory : C:\Program Files\PHP\v5.3\cfg
9. Public Web Files directory                    : C:\Program Files\PHP\v5.3\www
10. Tests directory                               : C:\Program Files\PHP\v5.3\tests
11. Name of configuration file                    : C:\Program Files\PHP\v5.3\pear.ini
12. Path to CLI php.exe                           : .

1-12, &#039;all&#039; or Enter to continue:
</pre>
<p>Continue following the prompts to complete the installation process. During the installation you may see a warning similar to the one shown below:</p>
<pre name="code" class="dos">
******************************************************************************
WARNING!  The include_path defined in the currently used php.ini does not
contain the PEAR PHP directory you just specified:
&lt;C:\Program Files\PHP\v5.3\pear&gt;
If the specified directory is also not in the include_path used by
your scripts, you will have problems getting any PEAR packages working.

Would you like to alter php.ini &lt;C:\Program Files\PHP\v5.3\php.ini&gt;? [Y/n] : y
</pre>
<p>Make sure to say <strong>yes</strong> [y] to the question about altering php.ini so that <strong>include_path</strong> directive is updated to the correct PEAR PHP directorty</p>
<p>After that you may also get a warning about out-of-date version of PEAR package manager:</p>
<pre name="code" class="dos">
** WARNING! Old version found at C:\Program Files\PHP\v5.3, please remove it or
be sure to use the new c:\program files\php\v5.3\pear.bat command
</pre>
<p>If you see that then after the go-pear.bat has finished its work, run the following command to upgrade the PEAR package manager:</p>
<pre name="code" class="dos">
C:\Program Files\PHP\v5.3&gt;pear upgrade pear
downloading PEAR-1.9.1.tgz ...
Starting to download PEAR-1.9.1.tgz (293,587 bytes)
.................done: 293,587 bytes
downloading Archive_Tar-1.3.7.tgz ...
Starting to download Archive_Tar-1.3.7.tgz (17,610 bytes)
...done: 17,610 bytes
downloading Structures_Graph-1.0.4.tgz ...
Starting to download Structures_Graph-1.0.4.tgz (30,318 bytes)
...done: 30,318 bytes
upgrade ok: channel://pear.php.net/Archive_Tar-1.3.7
upgrade ok: channel://pear.php.net/Structures_Graph-1.0.4
upgrade ok: channel://pear.php.net/PEAR-1.9.1
PEAR: Optional feature webinstaller available (PEAR&#039;s web-based installer)
PEAR: Optional feature gtkinstaller available (PEAR&#039;s PHP-GTK-based installer)
PEAR: Optional feature gtk2installer available (PEAR&#039;s PHP-GTK2-based installer)

PEAR: To install optional features use &quot;pear install pear/PEAR#featurename&quot;
</pre>
<p>At this point PEAR package manager is installed and you can start using it to download and install PEAR packages. For example to install phploc package, follow these steps:</p>
<p>Step 1: Register the appropriate PEAR channels:</p>
<pre name="code" class="dos">
C:\Program Files\PHP\v5.3&gt;pear channel-discover pear.phpunit.de
Adding Channel &quot;pear.phpunit.de&quot; succeeded
Discovery of channel &quot;pear.phpunit.de&quot; succeeded

C:\Program Files\PHP\v5.3&gt;pear channel-discover components.ez.no
Adding Channel &quot;components.ez.no&quot; succeeded
Discovery of channel &quot;components.ez.no&quot; succeeded
</pre>
<p>Step 2: Install the phploc package:</p>
<pre name="code" class="dos">
C:\Program Files\PHP\v5.3&gt;pear install phpunit/phploc
phpunit/phploc can optionally use PHP extension &quot;bytekit&quot;
downloading phploc-1.5.1.tgz ...
Starting to download phploc-1.5.1.tgz (7,893 bytes)
.....done: 7,893 bytes
downloading File_Iterator-1.2.3.tgz ...
Starting to download File_Iterator-1.2.3.tgz (3,406 bytes)
...done: 3,406 bytes
downloading ConsoleTools-1.6.1.tgz ...
Starting to download ConsoleTools-1.6.1.tgz (869,994 bytes)
...done: 869,994 bytes
downloading Base-1.8.tgz ...
Starting to download Base-1.8.tgz (236,357 bytes)
...done: 236,357 bytes
install ok: channel://pear.phpunit.de/File_Iterator-1.2.3
install ok: channel://components.ez.no/Base-1.8
install ok: channel://components.ez.no/ConsoleTools-1.6.1
install ok: channel://pear.phpunit.de/phploc-1.5.1
</pre>
<p>Finally run the phploc to ensure that it works correctly:</p>
<pre name="code" class="dos">
C:\Program Files\PHP\v5.3&gt;phploc
phploc 1.5.1 by Sebastian Bergmann.

Usage: phploc [switches] &lt;directory|file&gt; ...

  --count-tests            Count PHPUnit test case classes and test methods.

  --log-xml &lt;file&gt;         Write result in XML format to file.

  --exclude &lt;directory&gt;    Exclude &lt;directory&gt; from code analysis.
  --suffixes &lt;suffix,...&gt;  A comma-separated list of file suffixes to check.

  --help                   Prints this usage information.
  --version                Prints the version and exits.

  --verbose                Print progress bar.
</pre>
]]></content:encoded>
			<wfw:commentRss>http://ruslany.net/2010/11/how-to-install-php-pear-and-phploc-on-windows/feed/</wfw:commentRss>
		<slash:comments>4</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>PHP Manager 1.0 for IIS 7 &#8211; stable release</title>
		<link>http://ruslany.net/2010/09/php-manager-1-0-for-iis-7-stable-release/</link>
		<comments>http://ruslany.net/2010/09/php-manager-1-0-for-iis-7-stable-release/#comments</comments>
		<pubDate>Wed, 29 Sep 2010 17:09:21 +0000</pubDate>
		<dc:creator>ruslany</dc:creator>
				<category><![CDATA[FastCGI]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP Manager]]></category>

		<guid isPermaLink="false">http://ruslany.net/?p=902</guid>
		<description><![CDATA[PHP Manager is a tool for IIS 7 that greatly simplifies installation, configuration, management and troubleshooting of PHP in IIS. A beta release of the tool has been published a month ago and since then it has been downloaded nearly five thousand times. Today I am releasing the final stable build of PHP Manager 1.0 [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://phpmanager.codeplex.com/">PHP Manager</a> is a tool for IIS 7 that greatly simplifies installation, configuration, management and troubleshooting of PHP in IIS. A <a href="http://ruslany.net/2010/08/php-manager-for-iis-7-beta-release/">beta release</a> of the tool has been published a month ago and since then it has been downloaded nearly five thousand times. Today I am releasing the final stable build of PHP Manager 1.0 for IIS 7, which includes new features and fixes for the bugs reported in the beta release.</p>
<p>Both x86 and x64 builds of PHP Manager 1.0 for IIS 7 can be downloaded from the project’s page at codeplex.com:</p>
<p><a href="http://phpmanager.codeplex.com/releases/">http://phpmanager.codeplex.com/releases/</a></p>
<p><strong>Note</strong>: if you already have the beta release installed then it will be upgraded when you install the final build of PHP Manager 1.0 for IIS 7.</p>
<p>PHP Manager 1.0 can be used to:</p>
<ul>
<li>Register PHP with IIS;</li>
<li>Validate and properly configure existing PHP installations;</li>
<li>Run multiple PHP versions side by side on the same server and even within the same web site;</li>
<li>Check PHP runtime configuration and environment (output of phpinfo() function);</li>
<li>Configure various PHP settings;</li>
<li>Enable or disable PHP extensions;</li>
<li>Remotely manage PHP configuration in php.ini file.</li>
</ul>
<p>The most important feature introduced in this release is the validation and optimization of existing PHP configurations on IIS.<span id="more-902"></span> When you install PHP Manager 1.0 on IIS server that already has PHP installed and configured, the PHP Manager will analyze the IIS and PHP configuration settings and will inform you if any of those are not set to recommended values:</p>
<p><a href="http://ruslany.net/wp-content/uploads/2010/09/PHPManagerRC1.png"><img class="alignnone size-medium wp-image-903 screenshot" title="PHP Manager Home Page" src="http://ruslany.net/wp-content/uploads/2010/09/PHPManagerRC1-500x431.png" alt="" width="500" height="431" /></a></p>
<p>Once you click on “View Recommendations” link you will see the list of settings with the description of what’s wrong and what a recommended corrective action should be. You can choose to apply some or all of the recommendations:</p>
<p><a href="http://ruslany.net/wp-content/uploads/2010/09/PHPManagerRC2.png"><img class="alignnone size-medium wp-image-904 screenshot" title="Configuration Recommendaitons" src="http://ruslany.net/wp-content/uploads/2010/09/PHPManagerRC2.png" alt="" /></a></p>
<p>Other significant changes and bug fixes included in this release are:</p>
<ul>
<li>Support for running different PHP versions within the same web site;</li>
<li>Functionality to set IIS default document to index.php;</li>
<li>Links to quickly open php.ini file and PHP error log file;</li>
<li>Detection of PHP registered via CGI or ISAPI;</li>
<li>Detection of PHP that is registered by using command line arguments in IIS handler mapping.</li>
</ul>
<p>Thanks to all who have tried the beta release and provided <a href="http://phpmanager.codeplex.com/workitem/list/basic">feedback and bug reports</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://ruslany.net/2010/09/php-manager-1-0-for-iis-7-stable-release/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>PHP on IIS: get the latest security updates now</title>
		<link>http://ruslany.net/2010/09/php-on-iis-get-the-latest-security-updates-now/</link>
		<comments>http://ruslany.net/2010/09/php-on-iis-get-the-latest-security-updates-now/#comments</comments>
		<pubDate>Tue, 28 Sep 2010 20:40:10 +0000</pubDate>
		<dc:creator>ruslany</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[IIS News Item]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://ruslany.net/?p=893</guid>
		<description><![CDATA[This morning Microsoft has released a security update that addresses the ASP.NET Security Vulnerability. The PHP applications running on IIS are subject to this vulnerability if ASP.NET is enabled in IIS. IMPORTANT: Even if PHP applications on IIS do not use any of the ASP.NET features the vulnerability still exists as long as ASP.NET is [...]]]></description>
			<content:encoded><![CDATA[<p>This morning Microsoft has released a <a href="http://www.microsoft.com/technet/security/bulletin/ms10-070.mspx">security update </a>that addresses the <a href="http://ruslany.net/2010/09/asp-net-vulnerability-affecting-php-sites-on-iis/">ASP.NET Security Vulnerability</a>. The PHP applications running on IIS are subject to this vulnerability if ASP.NET is enabled in IIS.</p>
<blockquote><p><strong>IMPORTANT</strong>: Even if PHP applications on IIS do not use any of the ASP.NET features the vulnerability still exists as long as ASP.NET is enabled. It is recommended to install the security update as soon as possible.</p></blockquote>
<p>The security update is available today via the Microsoft Download Center. In a next few days it will also be distributed via Windows Update channels. Once the update is on Windows Update, you can run the Windows Update on your servers to automatically apply the security patch.</p>
<p>If you plan to download the updates directly from Microsoft Download Center then follow the instructions in Scott Guthrie’s blog at:</p>
<p><a title="http://weblogs.asp.net/scottgu/archive/2010/09/28/asp-net-security-update-now-available.aspx" href="http://weblogs.asp.net/scottgu/archive/2010/09/28/asp-net-security-update-now-available.aspx">http://weblogs.asp.net/scottgu/archive/2010/09/28/asp-net-security-update-now-available.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ruslany.net/2010/09/php-on-iis-get-the-latest-security-updates-now/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ASP.NET vulnerability affecting PHP sites on IIS</title>
		<link>http://ruslany.net/2010/09/asp-net-vulnerability-affecting-php-sites-on-iis/</link>
		<comments>http://ruslany.net/2010/09/asp-net-vulnerability-affecting-php-sites-on-iis/#comments</comments>
		<pubDate>Wed, 22 Sep 2010 23:20:24 +0000</pubDate>
		<dc:creator>ruslany</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[ASPNET]]></category>
		<category><![CDATA[IIS News Item]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://ruslany.net/?p=882</guid>
		<description><![CDATA[Update on Sep 28th, 2010: The security update for the vulnerability is available. More details can be found at PHP on IIS: get the latest security updates now. Microsoft has recently released a Security Advisory about a security vulnerability in ASP.NET. This vulnerability exists in all versions of ASP.NET. The PHP applications running on IIS [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p><strong>Update on Sep 28th, 2010</strong>: The security update for the vulnerability is available. More details can be found at <a href="http://ruslany.net/2010/09/php-on-iis-get-the-latest-security-updates-now/">PHP on IIS: get the latest security updates now</a>.</p></blockquote>
<p>Microsoft has recently released a Security Advisory about a security vulnerability in ASP.NET. This vulnerability exists in all versions of ASP.NET. The PHP applications running on IIS are also subject to this vulnerability if ASP.NET is enabled in IIS.</p>
<blockquote><p><strong>IMPORTANT</strong>: Even if PHP application is not using any of the ASP.NET features the vulnerability still exists as long as ASP.NET is enabled.</p></blockquote>
<p>More information about the vulnerability can be found at the following links:</p>
<ul>
<li><a href="http://www.microsoft.com/technet/security/advisory/2416728.mspx">Microsoft Security Advisory</a></li>
<li><a href="http://blogs.technet.com/b/srd/archive/2010/09/20/additional-information-about-the-asp-net-vulnerability.aspx">Security Research and Defense Blog</a></li>
<li><a href="http://weblogs.asp.net/scottgu/archive/2010/09/18/important-asp-net-security-vulnerability.aspx">Scott Guthrie’s blog about ASP.NET security vulnerability</a></li>
<li><a href="http://weblogs.asp.net/scottgu/archive/2010/09/20/frequently-asked-questions-about-the-asp-net-security-vulnerability.aspx">FaQ about about security vulnerability on Scott Guthrie’s blog</a></li>
</ul>
<p>This blog post describes how to protect you PHP applications on IIS from attacks that exploit this vulnerability.<span id="more-882"></span></p>
<h3>How to protect your PHP sites on IIS?</h3>
<p>Microsoft is working on releasing a patch that fixes this security vulnerability. Until the patch is released there are two options that exist today for protecting your PHP applications on IIS.</p>
<ol>
<li>If you do not need ASP.NET then disable it on the server</li>
<li>If you need ASP.NET then apply the workaround described in <a href="http://weblogs.asp.net/scottgu/archive/2010/09/18/important-asp-net-security-vulnerability.aspx">Scott Guthrie’s blog</a>.</li>
</ol>
<h3>How to disable ASP.NET on IIS 6?</h3>
<p>To disable ASP.NET on IIS 6 run the aspnet_regiis tool for <strong>every .NET version</strong> as shown below:</p>
<pre name="code" class="dos">
%WINDIR%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis /u
Start uninstalling ASP.NET (2.0.50727).
......................................................
Finished uninstalling ASP.NET (2.0.50727).

%WINDIR%\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis /u
Start uninstalling ASP.NET (1.1.4322.0).
Finished uninstalling ASP.NET (1.1.4322.0).
</pre>
<h3>How to disable ASP.NET on IIS 7?</h3>
<p>To disable ASP.NET on IIS 7 follow these steps:</p>
<ol>
<li>In the Windows Start Menu choose &#8220;Run:&#8221;, type &#8220;CompMgmtLauncher&#8221; and click &#8220;Ok&#8221;;</li>
<li>Select the &#8220;Web Server (IIS)&#8221; role, then click &#8220;Remove Role Services&#8221; and then disable the &#8220;ASP.NET&#8221; and “.NET Extensibility” checkbox under &#8220;Application Development&#8221; group:</li>
</ol>
<p><a href="http://ruslany.net/wp-content/uploads/2010/09/DisableASPNET.png"><img class="alignnone size-medium wp-image-886 screenshot" title="Disable ASP.NET on IIS 7" src="http://ruslany.net/wp-content/uploads/2010/09/DisableASPNET-400x293.png" alt="" width="400" height="293" /></a></p>
<h3>How to apply the workaround?</h3>
<p>If your IIS server is used to host both ASP.NET and PHP or if your PHP web site uses any ASP.NET features, then disabling the ASP.NET on the server is not an option for you. Instead you will need to apply the workaround that is described in details in Scott Guthrie’s blog:</p>
<p><a href="http://weblogs.asp.net/scottgu/archive/2010/09/18/important-asp-net-security-vulnerability.aspx">http://weblogs.asp.net/scottgu/archive/2010/09/18/important-asp-net-security-vulnerability.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ruslany.net/2010/09/asp-net-vulnerability-affecting-php-sites-on-iis/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

