<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Tue, 21 May 2013 08:02:20 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Ruslan Yakushev: PHP Troubleshooting in Windows Azure Web Sites]]></title>
      <guid>http://www.phpdeveloper.org/news/19116</guid>
      <link>http://www.phpdeveloper.org/news/19116</link>
      <description><![CDATA[<p>
In the <a href="http://ruslany.net/2013/01/php-troubleshooting-in-windows-azure-web-sites/">latest post to his site</a>, <i>Ruslan Yakushev</i> looks at some simple ways you can debug your PHP-based applications running on a Windows Azure platform. 
</p>
<blockquote>
The need to diagnose and troubleshoot application's failures often comes up during deployment to a hosting environment. Some configuration settings in hosting server may differ from what application expects. Often it is not as easy to figure out the cause of the problem in a hosting environment as it is on a development machine.  I found the following techniques useful when troubleshooting errors in PHP applications hosted in Windows Azure Web Sites.
</blockquote>
<p>
He shares seven different tips, some pretty simple, others a bit more difficult requiring other software to be up and working:
</p>
<ul>
<li>Using <a href="http://php.net/phpinfo">phpinfo()</a>
<li>Checking the <a href="http://svn.php.net/viewvc/pecl/wincache/tags/1.1.0stable/wincache.php?view=co">wincache</a> settings
<li>Looking at your error logs
<li>Turning on the <a href="http://www.php.net/manual/en/errorfunc.configuration.php#ini.display-errors">display_errors</a> setting
<li>Turning on HTTP logging, detailed errors and failed request tracking in the control panel
<li>Using <a href="http://xdebug.org">XDebug</a>
<li>Getting the statistics for your ClearDB instance
</ul>]]></description>
      <pubDate>Thu, 31 Jan 2013 10:19:16 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Mattias Geniar's Blog: php_value vs php_admin_value and the use of php_flag explained]]></title>
      <guid>http://www.phpdeveloper.org/news/17573</guid>
      <link>http://www.phpdeveloper.org/news/17573</link>
      <description><![CDATA[<p>
In <a href="http://mattiasgeniar.be/2012/02/18/php-php_value-vs-php_admin_value-and-the-use-of-php_flag-explained/">this quick post</a> to his blog <i>Mattias Geniar</i> looks at three different Apache flags you can use in your configuration/.htaccess files to set various things in your PHP environment.
</p>
<blockquote>
Back <a href="http://mattiasgeniar.be/2009/03/07/overwrite-php-settings-through-apache-conf-or-htaccess-php_admin_value-bug/">in 2009 there was a bug in the php_admin_value</a> implementation before PHP 5.2.6. Since then, everything should run smoothly again. However, I find there's still a lot of confusion on when to use php_value, php_admin_value, php_flag and php_admin_flag. So I'll see if we can clear some of that.
</blockquote>
<p>
He compares the three php_* flags you can use to set different kinds of values - "php_flag" for boolean operations, "php_admin_flag" (similar, but only in the vhost config) and the "php_value" that can be used for everything else, including overriding some settings in your php.ini.
</p>]]></description>
      <pubDate>Wed, 22 Feb 2012 12:14:22 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Brian Swan's Blog: Updating PHP Settings in Windows Azure]]></title>
      <guid>http://www.phpdeveloper.org/news/16178</guid>
      <link>http://www.phpdeveloper.org/news/16178</link>
      <description><![CDATA[<p>
<i>Brian Swan</i> has a new post today looking at how you can <a href="http://blogs.msdn.com/b/brian_swan/archive/2011/04/11/updating-php-settings-in-windows-azure.aspx">update some PHP settings</a> in your  Windows Azure instance - an alternative to redeploying your every time your php.ini file might need an update.
</p>
<blockquote>
I came across this question on Twitter last week: "How can I turn display_errors on for an application that is running in Windows Azure?" I have to admit that I was stumped. The only thing I could think of was to re-deploy the application with an updated php.ini file. But, I happened to mention this question to <a href="http://twitter.com/#!/benlobaugh">Ben Lobaugh</a> who suggested a very simple idea: Store your PHP settings in some durable store external to your application as key-value pairs, then loop through the settings and update them with the <a href="http://us2.php.net/ini_set">ini_set</a> function when a page loads. 
</blockquote>
<p>
He puts a big disclaimer on his suggestion, noting that it's "a hack and only a hack" and can be useful for someone still learning how to work with Azure and deployment. He shows how to use a Table storage to save the values and make them easier for the application to grab at runtime. Using the tools from <a href="http://phpazure.codeplex.com/">their SDK</a>, fetching and setting those values is a simple process. An idea like this, while convenient, could potentially cause performance issues down the line, do be careful with this recommendation (and be sure to load test).
</p>]]></description>
      <pubDate>Tue, 12 Apr 2011 08:46:43 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPit.net: Creating a PHP Settings Class]]></title>
      <guid>http://www.phpdeveloper.org/news/5635</guid>
      <link>http://www.phpdeveloper.org/news/5635</link>
      <description><![CDATA[<p>
PHPit.net is back again today with yet another great tutorial. <a href="http://www.phpit.net/article/create-settings-class-php/">This time</a>, they help you create a class to manage the settings for your application that not only supports plain-text, but INI, XML, and YAML formats as well.
</p>
<blockquote>
<p>
A config.php or a settings.xml file is a very common thing for most PHP scripts, and it's usually where all the script settings (e.g. database information) are stored. The easiest way is to simply use a simple PHP script as a config file, but this may not be the best way, and it's certainly not the most user-friendly way.
</p>
<p>
In this tutorial we'll have a look at creating a Settings class which can handle any type of config format. I'll take you through the steps necessary to handle four different formats (PHP, INI, XML and YAML), but it's very easy to add more formats.
</p>
</blockquote>
<p>
To start, they <a href="http://www.phpit.net/article/create-settings-class-php/">build the base class</a> before quickly adding the get() and load() functions to pull in the external content. First on the list, they extend the base and make a pure PHP implementation holding the settings. Following that, they move on to the INI format, using PHP's parse_ini_file function to make it simple.
</p>
<p>
Last but not least, they venture into something a bit more complex - working with XML and the YAML formats to create this simple, handy tool.
</p>]]></description>
      <pubDate>Tue, 20 Jun 2006 09:35:03 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Zend Developer Zone: Trick-out Your Session Handler]]></title>
      <guid>http://www.phpdeveloper.org/news/5150</guid>
      <link>http://www.phpdeveloper.org/news/5150</link>
      <description><![CDATA[<p>
There's one thing that coders look for when they get past the most basic bits of PHP - a way to store information between the requests. Thankfully, PHP has that functionality build in (for quite a while now, actually) and it's very easy to use. Sessions make storing data simple and, according to <a href="http://devzone.zend.com/node/view/id/141">this new post</a> on the Zend Developer Zend</a>, there's even more fun things you can get them to do - with the right convincing.
</p>
<quote>
<i>
By default, session data is stored on the filesystem in individual files. This works fine for most people, but when it comes to storing session data, PHP has several options available. This article will discuss some of the built-in options for session storage and also show you how to write your own session handler.
</i>
</quote>
<p>
They <a href="http://devzone.zend.com/node/view/id/141">cover</a> some of the options that you can alter (in the php.ini) to change the defaults for your sessions, including where they're written to. With those basics out of the way, the real meat of the tutorial comes in - the creation of a custom session handler. They base theirs on a few simple functions like open, read, write, destroy, etc. There's no code for those functions, but they do provide good descriptions for what they should do. To wrap it all up, they give the "howto" on actually using this functionality in your application.
</p>]]></description>
      <pubDate>Tue, 11 Apr 2006 06:55:45 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Vidyut Luther's Blog: Where do you "define" your environment/global settings?]]></title>
      <guid>http://www.phpdeveloper.org/news/4693</guid>
      <link>http://www.phpdeveloper.org/news/4693</link>
      <description><![CDATA[From <i>Vidyut Luther</i> today, there's <a href="http://www.phpcult.com/archives/39-Where-do-you-define-your-environmentglobal-settings..html">this new post</a> that asks the question "Where do you 'define' your environment/global settings?"
<p>
<quote>
<i>
I was wondering how people handled this situation themselves. I'm personally trying to decide whether my constants be in the class files, or a global configuration file. Right now I have a global.conf.php which contains things like (MySQL login info, include paths, table names).
<p>
So, my question is: Is it better to have one big configuration file, or should some things be defined on top of the individual classes ? (CONTACTS_TABLE.. is a clear example). I see pros and cons for both approaches.
</i>
</quote>
<p>
He <a href="http://www.phpcult.com/archives/39-Where-do-you-define-your-environmentglobal-settings..html">lists out</a> pros and cons for the "one file approach" versus the "multiple specific definitions" method, for example:
<ul>
<li>simple editing vs. easier to manage
<li>a single large file vs. multiple small files
<li>high memory usage on every page vs. lower memory consumption from loading only what's needed
</ul>]]></description>
      <pubDate>Fri, 20 Jan 2006 06:44:36 -0600</pubDate>
    </item>
  </channel>
</rss>
