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 extension is used. This post explains how to install and use Xdebug extension with WebMatrix. Continue Reading »
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 install a PEAR package. An example PEAR package used in this post is phploc, which is a tool for measuring the size of PHP projects.
Start by installing PHP on Windows by using one of the following methods:
- Install PHP for by using Web PI 3.0. With that you can install PHP for either IIS or WebMatrix or both;
- Download and unpack the PHP 5.3 VC9 non-thread-safe zip package and then register it with IIS by using PHP Manager.
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: Continue Reading »
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 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. Continue Reading »
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 for IIS 7, which includes new features and fixes for the bugs reported in the beta release.
Both x86 and x64 builds of PHP Manager 1.0 for IIS 7 can be downloaded from the project’s page at codeplex.com:
Note: 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.
PHP Manager 1.0 can be used to:
- Register PHP with IIS;
- Validate and properly configure existing PHP installations;
- Run multiple PHP versions side by side on the same server and even within the same web site;
- Check PHP runtime configuration and environment (output of phpinfo() function);
- Configure various PHP settings;
- Enable or disable PHP extensions;
- Remotely manage PHP configuration in php.ini file.
The most important feature introduced in this release is the validation and optimization of existing PHP configurations on IIS. Continue Reading »
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 enabled. It is recommended to install the security update as soon as possible.
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.
If you plan to download the updates directly from Microsoft Download Center then follow the instructions in Scott Guthrie’s blog at:
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 are also subject to this vulnerability if ASP.NET is enabled in IIS.
IMPORTANT: Even if PHP application is not using any of the ASP.NET features the vulnerability still exists as long as ASP.NET is enabled.
More information about the vulnerability can be found at the following links:
- Microsoft Security Advisory
- Security Research and Defense Blog
- Scott Guthrie’s blog about ASP.NET security vulnerability
- FaQ about about security vulnerability on Scott Guthrie’s blog
This blog post describes how to protect you PHP applications on IIS from attacks that exploit this vulnerability. Continue Reading »
Today I am releasing PHP Manager for IIS 7 – beta, which is an IIS extension for setting up and managing multiple PHP installations on IIS 7 servers. It can be used to:
- Register PHP with IIS;
- Run multiple PHP versions side by side;
- Check PHP runtime configuration and environment (output of phpinfo() function)
- Configure various PHP settings
- Enable or disable PHP extensions
- Remotely manage PHP configuration in php.ini fille
The PHP Manager installation packages can be downloaded from these locations:
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 publishing PHP applications.
Here are the examples of how WebMatrix can be used to create and publish a PHP web site (using WordPress as a showcase). Continue Reading »
Today IIS team has published the final release of WinCache Extension 1.1 for PHP. This is the latest stable and production ready version of the extension. The v1.1 has all the features available in version 1.0 plus the following features.
- User Cache API’s can be used by PHP scripts to store PHP objects and variables in shared memory. This way PHP scripts may improve the execution speed by storing processed data in the cache and then using it in subsequent requests instead of re-creating the data on every request.
- WinCache Session Handler can be used to configure PHP to store the session data in shared memory cache. Using shared memory instead of the default file session storage helps improve performance of PHP applications that store large amount of data in session objects. The content of the WinCache session cache is persisted on disk so that it is not lost during IIS worker process recycling.
- File Change Notifications – the entries in the opcode and file caches are now updated as soon as the corresponding PHP files are modified on a file system. This is very useful for PHP applications that store its configuration in PHP files – for example Joomla!. Now the configuration changes for those applications take effect right away instead of a 30 seconds delay (default cache refresh interval).
- Lock/Unlock API’s – these API’s can be used to obtain/release an exclusive lock on a key in the cache.