News Archive
PhpRiot Newsletter
Your Email Address:

More information

PHP 5.3 and PEAR available in WebMatrix Beta 3

Note: This article was originally published at Planet PHP on 11 November 2010.
Planet PHP

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 BetaA3 has much better support for PHP. Specifically:

  • It is now possible to enable PHP 5.3 (previous versions of WebMatrix and Web PI only supported PHP 5.2)
  • 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)
  • PEAR installation is now included when PHP is installed.

This post describes those improvements in more details.

Enabling PHP in WebMatrix

When you create a new web site in WebMatrix, by default PHP is not enabled. To enable it go to aoSitea - aoSettingsa and use the aoEnable PHPa check box:

You can choose whether to enable latest stable version of PHP 5.2 or PHP 5.3:

If a selected PHP versionAis not yetAinstalled then it will be downloaded and installed when you choose to enable it for a site:

(Note that Microsoft Visual C++ Redistributable Package is installed as aAdepenency for PHP 5.3. This is because WebMatrix and IIS use PHP 5.3 VC9 build, which requires VC9 runtime installed on a machine).

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 aoSitea - aoSettingsa section and use the aoChangea link:

PEAR installation

PEAR 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 Getting and installing the PEAR package manager. I will write a more detailed blog post with instructions on how to enable PEAR on Windows and how to install popular PEAR packages.