Setting PHP error reporting from a vhost or .htaccess

Here on our dev servers we turn PHP error reporting full on so we get to know of any issues with our code well before it hits production (where errors are turned off).

This does however cause problems with older legacy sites that generate reams of warning errors because the developers were slack and – say – didn’t declare all their variables. So, the obvious solution is to set the error reporting at the VirtualHost or.htaccess level.

Or is it? At the recent PHPWM meeting I brought up my issue that whenever I set it to be:

php_value error_reporting E_ALL & ~E_NOTICES

which in php.ini will give you errors but not the notices, it was _definitely_ not working for me in the vhost. A possible solution offered was to use the integer value of the constant instead but we all couldn’t remember what that was.

A quick Google later and it seems that using the text constants doesn’t work in the vhost or .htaccess but the integer version DOES. So the definitive answer to “How do I turn on PHP errors but get it to ignore warnings in a vhost” is

php_value error_reporting 6135

Well, this works for me on php 5.2.3 anyway :)

Symfony’s most popular plugins

Francios a core member of the Symfony team recently blogged about the 20 most popular plugins of the Symfony project based upon page views.

That list is:

  1. sfSimpleCMSPlugin
  2. sfGuardPlugin
  3. sfPropelActAsNestedSetBehaviorPlugin
  4. sfMediaLibraryPlugin
  5. sfSimpleBlogPlugin
  6. sfSimpleForumPlugin
  7. sfFeed2Plugin
  8. sfgWidgetsPlugin
  9. sfThumbnailPlugin
  10. sfUJSPlugin
  11. sfControlPanelPlugin
  12. sfFormValidationPlugin
  13. sfMogileFSPlugin
  14. sfLightboxPlugin
  15. sfCaptchaPlugin
  16. sfNiftyPlugin
  17. sfPrototypeWindowPlugin
  18. sfPropelLoadbalancerPlugin
  19. sfSavvyPlugin
  20. sfYzClientSideValidationPlugin

I find it very interesting that the ‘simple’ ones are all in the top 6 with the CMS one – which is very new – already taking up top spot.

It proves that the interest is there for off-the-shelf solutions built upon this great framework and I feel that there’s going to be lots of exciting activity in this space over the coming months. For example  I’m sure I’m not the only one who is eagerly awaiting the impending release of Magento which is based upon the Zend Framework.

Workshops For Web People

I recently got wind of a new workshop on The Multipack’s forum called Transcending CSS being presented by CSS don Andy Clarke of Britpack, and this book fame. Not sure what bribes they used to get him doing this but it’s definitely happening and I’ve already booked my place before they sell out.

I also really like the general Workshops for web people philosophy:

Professional & Affordable Workshops For Web People

Learning from the web is one thing but being in a room with a leading light from the industry with other like minded people is infinitely better. Unfortunately this normally comes at a hefty price and requires you to travel and pay for accommodation.

Our Approach

We believe that it is time for a change and intend to start hosting professional workshops, given by experts, put on in modern venues around the UK for around a £100 – £125 depending on venue, considerably cheaper than most. We do not currently charge VAT although this may, unfortunately, change in the future.

Workshops

Starting in November 2007 in our home town of Leicester and using the Leicester Creative Business Depot’s Courtyard Room we hope to put a fresh spin on the workshop for a price we can all afford.

This all sounds perfectly splendid and at £100 with a top-drawer speaker and plenty of time for networking afterwards it’s a bargain.

Maybe I’ll see you there.