Why Does Expression Web 4 Want to Modify My PHP.INI File?

As you may have seen in my previous blog posts, I tend to use several of Microsoft's various editors when I am working on web projects: Visual Studio, WebMatrix, and even FrontPage on occasion. But every once in a while I also use FrontPage's successor: Expression Web 4.

Expression Web 4 and PHP

One of the great features about Expression Web was that it contained support for local PHP development before WebMatrix and IIS Express had entered the picture, and it was pretty easy to configure; all that you needed to do was to enter the path to your PHP executable in the Expression Web's Application Options, which you will find under Expression Web's Tools menu:

All that being said, I was working on a PHP project in Expression Web 4 recently, and when I clicked the button to preview my page in a browser, the following error message appeared:

"The php.ini file is not configured correctly. Would you like Expression Web to configure this file?"

I had not seen this error before, and it was a little unnerving to me because I had spent a lot of time customizing my PHP.ini file and I didn't want Expression Web (or any other application) making a bunch of unknown changes to my PHP.ini file.

That being said, I was curious what would happen if I answered Yes to that question. With that in mind, I tested several scenarios, and I thought the results of my experiments would make a great blog.

Expression Web 4 and PHP.INI Scenario Testing

First of all, clicking the No button for the PHP configuration dialog box listed above will not break anything, and Expression Web 4 will still open your web page for testing with PHP in the Expression Development Server (which is basically the ASP.NET "Cassini" development server).

If you click the More Information link in the PHP configuration dialog box, that will take you to the following page in the Expression Web help file:

Previewing a PHP page
http://msdn.microsoft.com/library/cc294950(v=expression.40).aspx

When I clicked the Yes button in the PHP configuration dialog box, Expression Web 4 made a few changes to my INI file that it deemed necessary for local development, and I tested three different scenarios which I will document here:

Scenario #1:

Starting with a PHP.ini file that was created when I installed PHP 5.4 through the Web Platform Installer (WebPI), I only noticed one directive in the PHP.ini file that was changed by Expression Web 4:

display_errors=On

(Note: This directive was originally set to "Off".)

And I only noticed one directive in the PHP.ini file that was added:

cgi.force_redirect=0

Scenario #2:

I ran a script that crawled through my full PHP.ini file which reset every "On" value to "Off" (and vice-versa), and then it reset every "0" value to "1" (and vice-versa). After those changes were completed, Expression Web 4 added only modified the following two directives in the file:

display_errors=On

-and-

cgi.force_redirect=0

Scenario #3:

If I removed everything from my PHP.ini file and I restarted my testing with a completely blank PHP.ini file, Expression Web 4 only added the following lines to the file:

[php]
cgi.force_redirect=0

More Information

So in the end, Expression Web 4 made very few changes to my PHP.INI file despite the ominous-sounding dialog that I listed earlier; just the same, it's always a good idea to back up your PHP.INI file before you let any application make changes to it. (This way you can compare the resulting files after any changes have been made and restore settings if necessary.)

Additional information about the two directives which Expression Web 4 modified can be found on the PHP website at the following URLs:

By the way - as of the writing of this blog, Expression Web 4 with Service Pack 2 is available as free download from Microsoft at the following URL:

Microsoft Expression Web 4 (Free Version)
http://www.microsoft.com/downloads/details.aspx?FamilyID=00e6f791-6450-4894-9b3a-2f5b58617a38

Free stuff is always nice. ;-]

Note: This blog was originally posted at http://blogs.msdn.com/robert_mcmurray/

What's New in IIS 8.5?

Microsoft released the Windows 8.1 Preview on June 26, but some of the articles that the IIS team was working on for IIS 8.5 needed a little more work before we published them. That being said, those articles were published on IIS.net earlier today, and here is a quick preview of those articles and the new features in IIS 8.5 which they describe:

  • Dynamic Website Activation in IIS 8.5
    This feature allows IIS to scale to an even larger set of websites than before by only loading websites after an HTTP request has been received; this significantly reduces the startup time and initial resource allocation for IIS, and it prevents resources from being unnecessarily consumed for websites that are accessed infrequently.
  • Enhanced Logging for IIS 8.5
    IIS now provides built-in functionality for adding custom logging fields to your W3C log files that are populated with values that are from request headers, response headers, or server variables. This functionality allows you to log a great deal of custom information about each HTTP request; for example, you could include the information an HTTP header like X-Forwarded-For, which would allow you to decode the request path through all firewalls/proxies, or you could insert information from a custom module into a server variable and have IIS add that information directly to your logs.
  • Idle Worker Process Page-Out in IIS 8.5
    In previous versions of IIS, inactive worker processes were terminated when they reached their recycle interval, but IIS 8.5 allows you to configure your application pools so that inactive worker processes are swapped out to the page file; since IIS can restore a suspended worker process into service much faster than starting up a new worker process, this functionality significantly improves the user experience when a request is received for a suspended application.
  • Logging to Event Tracing for Windows in IIS 8.5
    IIS 8.5 expands the logging capabilities for HTTP events to include Event Tracing for Windows (ETW); this functionality allows you monitor your IIS events in real-time, which can be extremely useful for troubleshooting and debugging/developing applications.

For examples of these technologies in action, you can watch one of the following presentations:

Special thanks go to Gary Ericson for putting together and publishing these articles on IIS.net, and a big round of thanks to the IIS team for adding all of these new features!

(One quick note in closing: functionality similar to IIS 8.5's Enhanced Logging was available in the past by installing separate modules, but IIS 8.5 now makes this functionality available out-of-the-box.)

Note: This blog was originally posted at http://blogs.msdn.com/robert_mcmurray/

The Eye of the Beholder

I have a very easy measuring scale for determining what I consider art: "If I Can Do It, It's Not Art." This may not seem like a complex rule to live by; but when you consider it, it's rather profound. There are a lot of people who will pass off their work as art even though it is actually a bunch of junk.

I have been to a lot of art museums because - I actually like art. But I have witnessed a lot of pieces that are not art; they are elaborate hoaxes by conmen who rebrand their particular style of garbage construction as creative genius.

For example, when I went to the the Neue Pinakothek in Munich, Germany, one of the paintings hanging on the wall was a large canvas where the artist had painted a once-inch red dot in the center of the canvas. This was titled "Red Object #2," or maybe "Red Object #3..." I can't really remember. The point being that this painting was obviously part of a whole study the artist had done on... red objects. Of course I'm looking at this creation and I'm thinking, "I can do that; I could have done that with a crayon."

I've gone to the Seattle Art Museum several times, and I find it absolutely amazing what some people consider 'art'. Now don't get me wrong, there are some amazing pieces of artwork inside the Seattle Art Museum. But there was one canvas where the artist had simply painted an already white canvas with the color white. That's it - just white paint; nothing else. Once again I'm thinking, "I can do that."

At a different museum that I went to in Germany, the Lenbachhaus, it was very evident that an artist had stood at the end of several canvases that were lying on the ground and simply threw buckets of red paint at them. Once again, I can do that - it's not art.

I realize that the perception of art is subjective, and there is a lot of truth to the statement that "Beauty is in the Eye of the Beholder." But I always fall back on my personal standard that if it's something that I can do, it's not really art - it's just what people pass off as art. (For an example of how I think most modern artists come up with their ideas, you need to watch the movie The Wheeler Dealers with James Garner and see how the character Stanislas creates his artwork.)

Another perfect example of the ways in which we think about art can be typified by an experience that I had when I visited the Kimbell Art Museum in Fort Worth, Texas. The museum was presenting an exhibition on impressionism, and I'm a big fan for many of the classical French impressionists: Renoir, Monet, etc. During my visit I entered one of the rooms, and there was an enormous painting by Gauguin hanging on the wall. I'm not a big fan of his artwork; however, I at least consider it art because I can't do what he does.

But as I analyzed this particular painting, I was thinking to myself, "I just don't get it; he only used four colors." I started to think about this painting based on my personal scale; I could have done this, so it can't be art. I (embarrassingly) spent several minutes studying this piece, and I tried hard to determine what it was about this painting that other people can see and I must be missing.

It's like the story of The Emperor's New Clothes; at some point you begin to worry what's wrong with you. If everybody else can see it and you can't, perhaps it's a character flaw. Maybe you're just not cultured enough. And this was the mindset that I had while I was wasting away my afternoon studying that single piece of art.

After I had been standing there for 5 to 10 minutes, a ten-year-old boy entered the room with his mother in tow. He took one look at the painting, laughed, and exclaimed loudly, "That's crap!", and then he walked off.

At that point I realized that I had been duped. I learned that I needed to stick to my instincts and measure every piece by my personal standard that if I can do it, it's not art. This philosophy actually helped me enjoy the rest of the day at the museum. I could walk into a room, I could look at a Renoir and say, "Now that's a piece of art." Or I could look at another Gauguin and say, "That's crap."