<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Professional PHP &#187; php-deployment</title>
	<atom:link href="http://www.procata.com/blog/archives/tag/php-deployment/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.procata.com/blog</link>
	<description>PHP Programming, Web Development, PHP Advocacy and PHP Best Practices.</description>
	<lastBuildDate>Fri, 10 Dec 2010 17:23:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PHP as a Deployment Platform</title>
		<link>http://www.procata.com/blog/archives/2006/11/04/php-as-a-deployment-platform/</link>
		<comments>http://www.procata.com/blog/archives/2006/11/04/php-as-a-deployment-platform/#comments</comments>
		<pubDate>Sat, 04 Nov 2006 20:38:15 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software Design]]></category>
		<category><![CDATA[php-deployment]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/archives/2006/11/04/php-as-a-deployment-platform/</guid>
		<description><![CDATA[PHP has been incredibly successful as a deployment platform for web applications.  The WordPress blog brags that the WordPress 2.0 series has been downloaded 1.2 million times.  
However, PHP as a platform is far from homogenous.  With many different versions installed and the vast configurability of php.ini, there can be a great [...]]]></description>
			<content:encoded><![CDATA[<p>PHP has been incredibly successful as a deployment platform for web applications.  The WordPress blog <a href="http://wordpress.org/development/2006/10/205-ronan/">brags</a> that the WordPress 2.0 series has been downloaded 1.2 million times.  </p>
<p>However, PHP as a platform is far from homogenous.  With many different versions installed and the vast configurability of php.ini, there can be a great deal of variation from PHP installation to PHP installation.  PHP developers often ask what should I target?  The question is the same if you want to write the next WordPress, or if you want to make sure your code is reusable for the next client that knocks on your door.</p>
<p>Nexen has been publishing <a href="http://www.nexen.net/chiffres_cles/phpversion/php_statistics_for_september_2006.php">PHP version adoption statistics</a> for some time.  Damien Seguy has really gone the extra step now by collecting and publishing <a href="http://www.nexen.net/articles/dossier/php_configuration_statitstics.php">configuration statistics</a>.  These are generated from scanning publicly available phpinfo() output.</p>
<p>The stats range from useful to blog candy.</p>
<p>One thing to keep in mind is sample bias.  Damien compared the php version number of the sample against the version data collected from expose php and found they correlate well.  But, perhaps there is a bias toward certain configuration settings (or versions) among those who have public phpinfo() data and those who do not.  (The stats do have suitable disclaimers.)</p>
<p>Its hard to look at stats like this and decide what they represent.  <a href="http://blogs.zend.com/2006/10/25/platform-223-released/">According to the Zend blog</a>,  81% of their customers are using PHP 5, while the nexen monthly numbers report 11%.  I think its fair to say that all of Zend&#8217;s customers use PHP, while many servers that expose_php are domain parking or serving static pages.  What is the adoption rate for php 5?  Who knows.</p>
<p>It would be interesting to see the correlation between those installations with expose_php off and the monthly version data, collected from the broader set of servers with expose_php on.  I think it would also be interesting to see what functions are being disabled with disable_functions.  Which extensions are being loaded?  How many servers are running an opcode cache?</p>
<p>Which version of PHP to use?  PHP 5 versus PHP 4?  Unless you are constrained by legacy PHP 4, the answer is definitely PHP 5.  Targeting PHP 4 isn&#8217;t going to make you the next WordPress.  Its just going to put you as far behind the version adoption curve as they are.</p>
<p>PHP 5 is vastly easier to develop in than PHP 4.  Development is expensive.  Hosting is cheap.  Don&#8217;t let the tail wag your dog.  If your host doesn&#8217;t support 5, change hosts.  PHP 5 hosting is not rocket science.</p>
<p>I know the decision is that not simple, but the excuses for remaining with PHP 4 are dwindling.</p>
<p>Which configuration options to target?  There was some talk recently on the PHP internals list about creating a recommended .ini profile for development environments and one for production environments.  I think this is a great idea.  Hopefully, then folks installing PHP can choose a profile instead of setting individual .ini options.  Perhaps this would help reign in some variability and reduce some <a href="http://www.procata.com/blog/archives/2006/07/13/the-paradox-of-choice/">Paradox of choice</a> style unhappiness.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2006/11/04/php-as-a-deployment-platform/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
		<item>
		<title>Improving Web Application Installation as a Security Imperative</title>
		<link>http://www.procata.com/blog/archives/2005/12/07/improving-web-application-installation-as-a-security-imperative/</link>
		<comments>http://www.procata.com/blog/archives/2005/12/07/improving-web-application-installation-as-a-security-imperative/#comments</comments>
		<pubDate>Thu, 08 Dec 2005 05:18:13 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[pear]]></category>
		<category><![CDATA[pear-installer]]></category>
		<category><![CDATA[php-deployment]]></category>
		<category><![CDATA[php-security]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/?p=159</guid>
		<description><![CDATA[It looks there is a Mambo worm out now.  I read Hackers Hitting Popular Apps a couple of weeks ago and it mentioned that hackers are targeting PHP apps among other things.  Dog bites man for some.  More interesting was this quote:

&#8220;The bottom line is that security has been set back nearly [...]]]></description>
			<content:encoded><![CDATA[<p>It looks there is a <a href="http://www.christopher-kunz.de/serendipity/archives/76-Mambo-worm-in-the-wild.html">Mambo worm</a> out now.  I read <a href="http://news.yahoo.com/s/cmp/20051122/tc_cmp/174400852">Hackers Hitting Popular Apps</a> a couple of weeks ago and it mentioned that hackers are targeting PHP apps among other things.  Dog bites man for some.  More interesting was this quote:</p>
<blockquote><p>
&#8220;The bottom line is that security has been set back nearly six years in the past 18 months,&#8221; Alan Paller, director of research for the SANS Institute, wrote in an E-mail. &#8220;Six years ago, attackers targeted operating systems and the operating system vendors didn&#8217;t do automated patching. In the intervening years, automated patching protected everyone from government to grandma. Now the attackers are targeting popular applications, and the vendors of those applications do not do automated patching.&#8221;
</p></blockquote>
<p>I&#8217;ve advocated <a href="http://www.procata.com/blog/archives/2004/11/24/installing-web-applications/">better web application installation</a> for a while, but as a usability issue.  Increasingly, it is also a security issue.   Just another example of why I think the PEAR installer is  important.  (and why I hope <a href="http://www.procata.com/blog/archives/2005/12/05/zend-framework-webcast/">Zend PHP Framework is released on a PEAR channel</a>.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2005/12/07/improving-web-application-installation-as-a-security-imperative/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Installing PEAR Based Applications</title>
		<link>http://www.procata.com/blog/archives/2005/04/19/installing-pear-based-applications/</link>
		<comments>http://www.procata.com/blog/archives/2005/04/19/installing-pear-based-applications/#comments</comments>
		<pubDate>Wed, 20 Apr 2005 05:05:40 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[pear-installer]]></category>
		<category><![CDATA[php-deployment]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/archives/2005/04/19/installing-pear-based-applications/</guid>
		<description><![CDATA[Ok, Greg Beaver&#8217;s work on channels has resurrected my interest in PEAR.  I am interested in providing WACT on a PEAR channel and I&#8217;d like to better integrate WACT with some PEAR packages.  My primary concern is over the installation implications.
I didn&#8217;t find a &#8220;powered by PEAR&#8221; section on the PEAR website.  [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, Greg Beaver&#8217;s work on <a href="http://greg.chiaraquartet.net/archives/38-doing-the-PEAR-thing.html">channels</a> has resurrected my interest in PEAR.  I am interested in providing WACT on a PEAR channel and I&#8217;d like to better integrate WACT with some PEAR packages.  My primary concern is over the <a href="http://www.procata.com/blog/archives/2004/11/24/installing-web-applications/">installation implications</a>.</p>
<p>I didn&#8217;t find a &#8220;powered by PEAR&#8221; section on the PEAR website.  Can anyone recommend some large, widely deployed end user oriented applications based on PEAR? I want to try going through the installation process in some challenging environments.  I&#8217;m just trying to get a feel for best practices and potential problems with installing PEAR and applications that depend on PEAR.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2005/04/19/installing-pear-based-applications/feed/</wfw:commentRss>
		<slash:comments>34</slash:comments>
		</item>
		<item>
		<title>Shipping Software is fun</title>
		<link>http://www.procata.com/blog/archives/2005/03/03/shipping-software/</link>
		<comments>http://www.procata.com/blog/archives/2005/03/03/shipping-software/#comments</comments>
		<pubDate>Thu, 03 Mar 2005 19:40:42 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Agile Methods]]></category>
		<category><![CDATA[php-deployment]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/archives/2005/03/03/shipping-software/</guid>
		<description><![CDATA[Mark Lucovsky blogs about why he left Microsoft for Google (via John Lim).  He talks about how code at Microsoft has to rot in a CVS repository for years before shipping, while web based companies such as Google and Amazon can deploy almost instantly.
I have to agree with the sentiment.  I quit my [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://mark-lucovsky.blogspot.com/">Mark Lucovsky</a> blogs about why he left Microsoft for Google (via <a href="http://phplens.com/phpeverywhere/?q=node/view/174">John Lim</a>).  He talks about how code at Microsoft has to rot in a CVS repository for years before shipping, while web based companies such as Google and Amazon can deploy almost instantly.</p>
<p>I have to agree with the sentiment.  I quit my last job (in 2000) to work in web development largely for this reason.  I worked on a custom ERP package that was deployed in a few dozen manufacturing plants.  Deployment for developed code was a nightmare.  It wouldn&#8217;t surprise me if the effort involved with deploying a change was an order of magnitude greater than making it.  Testing, writing installation scripts, testing the installation scripts, sending a person to the plant to perform the installation and train the users, repeating for every plant.  Pray that there were no database changes.</p>
<p>The thing that attracted me to web development was that it felt much more &#8216;light weight,&#8217; and frankly, just more fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2005/03/03/shipping-software/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Installing Web Applications</title>
		<link>http://www.procata.com/blog/archives/2004/11/24/installing-web-applications/</link>
		<comments>http://www.procata.com/blog/archives/2004/11/24/installing-web-applications/#comments</comments>
		<pubDate>Thu, 25 Nov 2004 00:19:08 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Usability]]></category>
		<category><![CDATA[php-deployment]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/archives/2004/11/24/installing-web-applications/</guid>
		<description><![CDATA[Mac OS X has made an art of the process of installing an application on the desktop.  For a properly packaged application, the process is:

Download.
Locate the application icon in your download directory and optionally move it to another location.
Double click on the application icon to run.

This is the essence of what apple calls Drag [...]]]></description>
			<content:encoded><![CDATA[<p>Mac OS X has made an art of the process of installing an application on the desktop.  For a <a href="http://developer.apple.com/documentation/DeveloperTools/Conceptual/SoftwareDistribution/Concepts/sd_disk_images.html">properly packaged</a> application, the process is:</p>
<ol>
<li>Download.</li>
<li>Locate the application icon in your download directory and optionally move it to another location.</li>
<li>Double click on the application icon to run.</li>
</ol>
<p>This is the essence of what apple calls <a href="http://developer.apple.com/documentation/DeveloperTools/Conceptual/SoftwareDistribution/Concepts/sd_on_mac_os_x.html#//apple_ref/doc/uid/20001758/BABGBEDG">Drag and Drop installation</a>.</p>
<p>Unfortunately, installing web applications has not reached this level of ease of use refinement.  An end user oriented web application might require that you:</p>
<ol>
<li>Download to your local machine (Using browser)</li>
<li>Unpack (using 3rd party archive tool)</li>
<li>Locate and edit configuration files, potentially requiring a knowledge of file system paths on the server, database names, etc.</li>
<li>Upload (Using yet another tool, such as ftp)</li>
<li>Change file permissions to allow files to be written to some directories on the server</li>
<li>Install external components, such as pear modules</li>
<li>Compile PHP to include required modules</li>
<li>Edit .htaccess to setup include_path&#8217;s and mod_rewrite</li>
</ol>
<p>Hardly &#8220;Drag and Drop.&#8221;  It would be nice to have something like a drag and drop capability for end users.  In this case, the applications could just be moved to the desired location in DOCUMENT_ROOT and run by pointing the browser to it.</p>
<p>Apple has several supporting technologies that facilitate drag and drop install:</p>
<p><strong>Grouping</strong></p>
<p>&#8220;<a href="http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFBundles/index.html#//apple_ref/doc/uid/10000123i">Bundles</a> provide an elegant solution to the problem of grouping related code and resources together.&#8221;  PHP has the tarball or the zip file, but this requires an unpacking stage.  If the user lacks shell access, then the unpacking stage must occur offline.  Where is the PHP equivelent of the .JAR or the .WAR?  How can the unpack stage be eliminated?</p>
<p><strong>Hiding</strong></p>
<p>One of the advantages of the bundle is the ability to hide internal resources from the end user.  Web applications have the need to hide internal resources.  Typically, this can be done with PHP by moving files outside of your DOCUMENT_ROOT (adding another installation stage), hiding resources with .htaccess, or giving them .php extensions when possible (typically for config files).  Hardly end user friendly techniques.</p>
<p><strong>Sharing</strong></p>
<p><a href="http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/index.html#//apple_ref/doc/uid/10000183i">Frameworks</a> are a special type of bundle designed for distributing shared code and resources.</p>
<p>Frameworks have a version capability that helps manage DLL Hell situations, where installing or upgrading one application breaks another via shared dependencies.  A Framework bundle may contain multiple versions of the same code, and the OS will link to the correct one.  Additionally, framework bundles can be embedded into Application Bundles, so that application will always have a usable version available.  Embedding helps facilitate drag and drop install because an additional step is not needed to install shared resources.</p>
<p>I think embedding shared resources (libraries like adodb and wact) is the best way to go for application deployment.</p>
<p>Unfortunately, I think PEAR takes a shared commons attitude and resists embedding because of its desire to be in the include_path.</p>
<p><strong>Preferences</strong></p>
<p>User configuration in OS X is stored in preference files, which are independent files named by application.  Well behaved OS X application operate even with their preferences files missing.  deleting an applications preference file causes the application to recreate it with the default preferences.  (Try deleting an application&#8217;s registry keys under windows and see how things go.)</p>
<p><strong>Drag and Drop Web Applications</strong><br />
I think a drag and drop PHP web application should meet the following criteria:</p>
<ul>
<li>Make no requirements for PHP_INI_SYSTEM or PHP_INI_PERDIR configuration.</li>
<li>Make no requirements for .htaccess configuration</li>
<li>Work with default application level configuration</li>
<li>Not require writable filesystem permissions</li>
<li>Not require installing external software</li>
<li>Not require unarchiving  (a wish, i know)</li>
<li>Not require obscure PHP modules</li>
</ul>
<p>A wish list, i am sure.</p>
<p>What are best practices for deploying PHP web applications?  What applications do this well?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2004/11/24/installing-web-applications/feed/</wfw:commentRss>
		<slash:comments>45</slash:comments>
		</item>
		<item>
		<title>Difficult deployments</title>
		<link>http://www.procata.com/blog/archives/2004/11/02/difficult-deployments/</link>
		<comments>http://www.procata.com/blog/archives/2004/11/02/difficult-deployments/#comments</comments>
		<pubDate>Tue, 02 Nov 2004 19:34:08 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Agile Methods]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[php-deployment]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/archives/2004/11/02/difficult-deployments/</guid>
		<description><![CDATA[Difficult deployment prevents good software from being used.  Dependencies are best avoided and minimized rather than managed.  
more on PHP deployment.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://revjim.net/item/10165/">Difficult deployment</a> prevents good software from being used.  <a href="http://c2.com/cgi/wiki?TypesOfDependency">Dependencies</a> are best avoided and minimized rather than <a href="http://phing.info/wiki/index.php">managed</a>.  </p>
<p><a href="http://www.procata.com/blog/archives/2004/10/12/enterprise-php/">more on PHP deployment</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2004/11/02/difficult-deployments/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

