<?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>dotvoid.com &#187; PHP</title>
	<atom:link href="http://www.dotvoid.com/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dotvoid.com</link>
	<description>Experiments and thoughts in PHP and javascript</description>
	<lastBuildDate>Tue, 11 Oct 2011 12:49:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PHP development on Mac &#8211; my experience</title>
		<link>http://www.dotvoid.com/2011/07/php-development-on-mac-my-experience/</link>
		<comments>http://www.dotvoid.com/2011/07/php-development-on-mac-my-experience/#comments</comments>
		<pubDate>Mon, 04 Jul 2011 12:13:34 +0000</pubDate>
		<dc:creator>Danne</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[gimp]]></category>
		<category><![CDATA[inkscape]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[omnigraffle]]></category>
		<category><![CDATA[virtualbox]]></category>

		<guid isPermaLink="false">http://www.dotvoid.com/?p=466</guid>
		<description><![CDATA[A while ago I saw a lot of people writing about their PHP development environment and tools. I didn&#8217;t get around to it at the time but yesterday I found me some time to write down my experiences of moving from Linux to MacOS X as primary OS for PHP  and web development
Me and my [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago I saw a lot of people writing about their PHP development environment and tools. I didn&#8217;t get around to it at the time but yesterday I found me some time to write down my experiences of moving from Linux to MacOS X as primary OS for PHP  and web development</p>
<p>Me and my partner in <a href="http://www.dotvoid.se/index.en.html">Dotvoid, a small web development and integration company,</a> have used linux as a client OS for more than a decade. All the tools I needed for developing are there already; emacs, apache, php, MySQL, xdebug, other scripting languages, various compilers, OpenOffice and so much more. For my partner, <a href="http://www.gimp.org/">Gimp</a> and <a href="http://inkscape.org/">Inkscape</a> have provided all the functionality for producing both designs and graphics. And all for free. Fantastic. Even so, a few months ago I suddenly decided it was time to abandon our ugly plastic laptops from Dell and Sony. I ordered two Macbook Pro. I haven&#8217;t used or even touched a Macintosh since 1995. But hey, they look good.</p>
<p>We soon discovered that some things aren&#8217;t as user friendly as we exptected. The multitouch trackpad with it&#8217;s gestures is wonderful. My partner still use Inkscape and <a href="http://www.gimp.org/macintosh/">Gimp under MacOS</a>. Still excellent tools. But she needs more precision and bought the Magic mouse which she&#8217;s not very satisfied with. You can change the acceleration but not the speed. Annoying. OpenOffice also works like a charm on MacOS.</p>
<p>As for me I really &#8211; really &#8211; miss a decent keyboard with keys as delete, home, end, page up and page down. I didn&#8217;t expect them to be missing from the Macbook keyboard. In time I guess I&#8217;ll get use to the weird key combinations that is needed to replace them. I might even get used to the weird combinations needed to write backspace, brackets and curly braces. But the keyboard is not really designed for programmers. On the other hand the multitouch trackpad is great. Virtual desktops in MacOS is also a bit limited but it&#8217;s not a big issue. All in all I&#8217;m slowly getting used to the hardware and the way things work under MacOS.</p>
<p>However, MacOS is not enough. There are PHP distributions for Mac. But as I use Ubuntu in production I use Virtualbox to run a 32-bit Ubuntu in a virtual machine. After disabling the Intel VT-x CPU optimization the 32-bit Ubuntu runs as smooth as ever. For some reason Virtualbox refuse to disable VT-x for Ubuntu 64-bit which is the reason I have to use 32-bit. With the VT-x (optimization) enabled the virtual machine with Ubuntu freeze for a couple of seconds every five seconds or so. I work in many different places, in different wireless networks and often using 3G. To make it work in any network I&#8217;m connected to I needed to setup two network adapters for the guest OS. One network adapter to allow the guest OS reach the outside world and another for communication between the host OS and the guest. I also have Virtualbox running a windows installation to allow me easy testing in a windows environment without hassle.</p>
<p>When buying Macbooks I also decided to buy Zend Studio for MacOS. I haven&#8217;t looked back once to either PDT or emacs. It is a great feeling being able to use subversion, debug, refactor, run tests and much more in the same editor without setting things up and tweaking PDT. It just works. I&#8217;m happy with it. Let&#8217;s me focus on development. And it is not as slow as for example SpringSource Tool Suite for java development. The workspace with the projects I work on I have in a shared directory accessible to both MacOS and the Ubuntu virtual machine.</p>
<p>In addition I use <a href="http://wb.mysql.com/">MySQL Workbench</a> a lot. It is also available for MacOS. It is a great tool for designing and working with MySQL databases. I still use the command line a lot as I&#8217;ve done since 1997 when I first started working with MySQL. But with just a few clicks the Workbench let me see changes between a database and the schema, export all the changes to a database in development, staging and finally production. (I always use an ssh tunnel to push schema changes to staging and production databases as I never allow ftp or anything else.) I still run the MySQL development databases on the virtual machine though.</p>
<p><a href="http://www.omnigroup.com/products/omnigraffle/">OmniGraffle</a> is another application I decided to buy. I use it to create diagrams and flowcharts but also to build graphical user interfaces. Especially when designing iPhone apps. Great tool and well worth the money. You can find stencils for most purposes at <a href="http://graffletopia.com/">Graffletopia</a>.</p>
<p>Even though we still use mostly open source software, compared to a linux environment, the move to Macbook cost a lot. Especially for a small company as ours. But after a few months I still think it&#8217;s worth the money. The actual hardware is great. Looks good. Silent although it does get a bit too hot underneath. The high resolution anti-glare screen is fantastic. I can even work in direct sunlight outdoors. I never want to see another crappy Sony Vaio. If only my Macbook could stop crashing every now and then I&#8217;d be really satisfied.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.dotvoid.com/2011/07/php-development-on-mac-my-experience/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.dotvoid.com/2011/07/php-development-on-mac-my-experience/&amp;title=PHP+development+on+Mac+-+my+experience" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.dotvoid.com/2011/07/php-development-on-mac-my-experience/&amp;t=PHP+development+on+Mac+-+my+experience" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.dotvoid.com/2011/07/php-development-on-mac-my-experience/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.dotvoid.com/2011/07/php-development-on-mac-my-experience/&amp;title=PHP+development+on+Mac+-+my+experience&amp;summary=A%20while%20ago%20I%20saw%20a%20lot%20of%20people%20writing%20about%20their%20PHP%20development%20environment%20and%20tools.%20I%20didn%27t%20get%20around%20to%20it%20at%20the%20time%20but%20yesterday%20I%20found%20me%20some%20time%20to%20write%20down%20my%20experiences%20of%20moving%20from%20Linux%20to%20MacOS%20X%20as%20primary%20OS%20for%20PHP%20%C2%A0and%20web%20development%0D%0A%0D%0AMe%20and%20my%20partner%20in%20Dotvo&amp;source=dotvoid.com" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-plaxo">
			<a href="http://www.plaxo.com/?share_link=http://www.dotvoid.com/2011/07/php-development-on-mac-my-experience/" rel="nofollow" class="external" title="Share this on Plaxo">Share this on Plaxo</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.dotvoid.com/2011/07/php-development-on-mac-my-experience/&amp;title=PHP+development+on+Mac+-+my+experience" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=PHP+development+on+Mac+-+my+experience+-+http://bit.ly/j4A2iK&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.dotvoid.com/2011/07/php-development-on-mac-my-experience/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Moving on to php 5.3 and Zend Server CE</title>
		<link>http://www.dotvoid.com/2010/01/moving-on-to-php-53-and-zend-server-ce/</link>
		<comments>http://www.dotvoid.com/2010/01/moving-on-to-php-53-and-zend-server-ce/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 00:21:53 +0000</pubDate>
		<dc:creator>Danne</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[zend server]]></category>

		<guid isPermaLink="false">http://www.dotvoid.com/?p=437</guid>
		<description><![CDATA[I have had some serious issues with one of my servers these last days. But finally things are starting to get back to normal. It seems /var was full due to mysql wreaking havoc for no particular reason. This lead &#8211; curiously enough &#8211; to network problems. If one of the discs failed because of [...]]]></description>
			<content:encoded><![CDATA[<p>I have had some serious issues with one of my servers these last days. But finally things are starting to get back to normal. It seems /var was full due to mysql wreaking havoc for no particular reason. This lead &#8211; curiously enough &#8211; to network problems. If one of the discs failed because of these events or if it is somehow the original problem causing all this I really can&#8217;t tell&#8230;</p>
<p>Anyway, instead of quickly fixing the problem, I took the time to set up a new <a href="http://www.webhostingsearch.com/virtual-private-server.php">virtual private server</a> running <a href="http://www.zend.com/en/community/zend-server-ce">Zend Server CE</a> with PHP 5.3. It feels good to finally move to 5.3 as well as trying out Zend Server in a production environment.</p>
<p>Now if I only had time to try out the new Zend Server 5.0. I&#8217;m especially curious about the job queue management. As I&#8217;ve more or less lost two days and two nights I guess that&#8217;ll have to wait.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.dotvoid.com/2010/01/moving-on-to-php-53-and-zend-server-ce/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.dotvoid.com/2010/01/moving-on-to-php-53-and-zend-server-ce/&amp;title=Moving+on+to+php+5.3+and+Zend+Server+CE" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.dotvoid.com/2010/01/moving-on-to-php-53-and-zend-server-ce/&amp;t=Moving+on+to+php+5.3+and+Zend+Server+CE" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.dotvoid.com/2010/01/moving-on-to-php-53-and-zend-server-ce/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.dotvoid.com/2010/01/moving-on-to-php-53-and-zend-server-ce/&amp;title=Moving+on+to+php+5.3+and+Zend+Server+CE&amp;summary=I%20have%20had%20some%20serious%20issues%20with%20one%20of%20my%20servers%20these%20last%20days.%20But%20finally%20things%20are%20starting%20to%20get%20back%20to%20normal.%20It%20seems%20%2Fvar%20was%20full%20due%20to%20mysql%20wreaking%20havoc%20for%20no%20particular%20reason.%20This%20lead%20-%20curiously%20enough%20-%20to%20network%20problems.%20If%20one%20of%20the%20discs%20failed%20because%20of%20these%20e&amp;source=dotvoid.com" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-plaxo">
			<a href="http://www.plaxo.com/?share_link=http://www.dotvoid.com/2010/01/moving-on-to-php-53-and-zend-server-ce/" rel="nofollow" class="external" title="Share this on Plaxo">Share this on Plaxo</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.dotvoid.com/2010/01/moving-on-to-php-53-and-zend-server-ce/&amp;title=Moving+on+to+php+5.3+and+Zend+Server+CE" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Moving+on+to+php+5.3+and+Zend+Server+CE+-+http://b2l.me/wt4yv&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.dotvoid.com/2010/01/moving-on-to-php-53-and-zend-server-ce/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Gartner report on PHP</title>
		<link>http://www.dotvoid.com/2010/01/gartner-report-on-php/</link>
		<comments>http://www.dotvoid.com/2010/01/gartner-report-on-php/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 08:23:54 +0000</pubDate>
		<dc:creator>Danne</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[integration]]></category>

		<guid isPermaLink="false">http://www.dotvoid.com/?p=435</guid>
		<description><![CDATA[A new Gartner report about PHP &#8211; PHP: Past, present and Future is mentioned in the last Zend newsletter. Even though I remain somewhat sceptical towards similar reports it is good to see that even Gartner is catching up. What they say actually do have an impact.
"PHP has been a cornerstone technology on the Web [...]]]></description>
			<content:encoded><![CDATA[<p>A new Gartner report about PHP &#8211; <a href="http://blogs.gartner.com/mark_driver/2009/12/03/php-past-present-and-future/">PHP: Past, present and Future</a> is mentioned in the last Zend newsletter. Even though I remain somewhat sceptical towards similar reports it is good to see that even Gartner is catching up. What they say actually do have an impact.</p>
<pre>"PHP has been a cornerstone technology on the Web for more than a
decade. While its adoption among mainstream IT organizations has been
limited in the past, many corporate application development (AD)
projects are discovering the unique benefits of PHP."</pre>
<p>One particular advice is especially interesting for large companies.</p>
<pre>"Consider PHP as a supporting technology in a broader portfolio of AD
technologies, where it can provide a specialized toolset for building
Web graphical user interface (GUI) front ends to service-oriented
architecture (SOA) back-end services."</pre>
<p>PHP is a fantastic tool for building rich web applications. It&#8217;s extensibility makes it versatile and extremely easy to integrate with modern integration solutions as Web Methods, legacy systems or just about any database technology.</p>
<p>To me &#8211; this has always been where PHP really shines.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.dotvoid.com/2010/01/gartner-report-on-php/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.dotvoid.com/2010/01/gartner-report-on-php/&amp;title=Gartner+report+on+PHP" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.dotvoid.com/2010/01/gartner-report-on-php/&amp;t=Gartner+report+on+PHP" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.dotvoid.com/2010/01/gartner-report-on-php/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.dotvoid.com/2010/01/gartner-report-on-php/&amp;title=Gartner+report+on+PHP&amp;summary=A%20new%20Gartner%20report%20about%20PHP%20-%20PHP%3A%20Past%2C%20present%20and%20Future%20is%20mentioned%20in%20the%20last%20Zend%20newsletter.%20Even%20though%20I%20remain%20somewhat%20sceptical%20towards%20similar%20reports%20it%20is%20good%20to%20see%20that%20even%20Gartner%20is%20catching%20up.%20What%20they%20say%20actually%20do%20have%20an%20impact.%0D%0A%22PHP%20has%20been%20a%20cornerstone%20technolo&amp;source=dotvoid.com" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-plaxo">
			<a href="http://www.plaxo.com/?share_link=http://www.dotvoid.com/2010/01/gartner-report-on-php/" rel="nofollow" class="external" title="Share this on Plaxo">Share this on Plaxo</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.dotvoid.com/2010/01/gartner-report-on-php/&amp;title=Gartner+report+on+PHP" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Gartner+report+on+PHP+-+http://b2l.me/wt2ya&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.dotvoid.com/2010/01/gartner-report-on-php/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Adding support for MS SQL Server to PHP in Linux</title>
		<link>http://www.dotvoid.com/2010/01/adding-support-for-ms-sql-server-to-php-in-linux/</link>
		<comments>http://www.dotvoid.com/2010/01/adding-support-for-ms-sql-server-to-php-in-linux/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 14:47:17 +0000</pubDate>
		<dc:creator>Danne</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[freetds]]></category>
		<category><![CDATA[mssql]]></category>

		<guid isPermaLink="false">http://www.dotvoid.com/?p=431</guid>
		<description><![CDATA[Adding support for MS SQL Server in PHP is not very difficult. Searching (Google/Bing/whatever) reveals lots of information on how to do this with Windows &#8211; naturally &#8211; but very little on how to go about it using Linux. Most people use precompiled PHP installations and I will show how to add MS SQL Server [...]]]></description>
			<content:encoded><![CDATA[<p>Adding support for MS SQL Server in PHP is not very difficult. Searching (Google/Bing/whatever) reveals lots of information on how to do this with Windows &#8211; naturally &#8211; but very little on how to go about it using Linux. Most people use precompiled PHP installations and I will show how to add MS SQL Server support to a precompiled PHP installation here. Those of you compiling PHP yourselves will probably understand what to do and what not based on the information here as well.</p>
<h2>1. Install FreeTDS</h2>
<p>First download and install FreeTDS from <a href="http://www.freetds.org">freetds.org</a>. Use the following build commands to enable support for MS SQL Server (as root or using sudo).</p>
<pre>./configure --enable-msdblib --prefix=/usr/local/freetds
make &amp;&amp; make install</pre>
<p>Unfortunately you need to tweak the installation somewhat as PHP still checks for files in FreeTDS that is no longer part of the installation. Just make sure these files exist (empty) by issuing the below commmands. (If you use another <em>&#8211;prefix</em> path above you will need to change the path accordingly)</p>
<pre>touch /usr/local/freetds/include/tds.h
touch /usr/local/freetds/lib/libtds.a</pre>
<h2>2. Get the PHP source and compile the mssql extension</h2>
<p>Yes &#8211; you need the <a href="http://www.php.net/downloads.php">complete PHP source</a> even though you already have a precompiled PHP installed. You will not touch your PHP installation and we are not going to compile all of PHP. We need the source to be able to compile the mssql extension.</p>
<p><strong>It is advised to always use the source of the same PHP version you have installed!</strong></p>
<p>Unpack the source and compile the mssql extension. Remember again to change the path accordingly if you installed freeTDS in another location.</p>
<pre>cd php*/ext/mssql
phpize
./configure --with-mssql=/usr/local/freetds
make</pre>
<p>The extension should now be compiled and ready to install. You will find the binary in the immediate sub directory <em>modules</em>.</p>
<h2>3. Install the extension</h2>
<p>Find out where PHP expects to find extension libraries. The simplest way to check this is through the command line.</p>
<pre>php -i | grep extension_dir</pre>
<p>Some distributions use different php.ini files for command line PHP and the PHP web server module. So it might be good to double check using the function <a href="http://www.php.net/phpinfo">phpinfo()</a> in a php script loaded through the web server (using your browser is easiest).</p>
<pre>&lt;?php phpinfo();</pre>
<p>Then search for <em>extension_dir</em> in the configuration information displayed. For example, on my laptop running Ubuntu, the path is <em>/usr/lib/php5/20060613+lfs</em>.</p>
<p>Continuing from above without having moved away from the directory where you compiled your mssql extension.</p>
<pre>cp modules/mssql.so /usr/lib/php5/20060613+lfs/</pre>
<p>The extension is in the right place and all you have to do now is to make sure PHP actually loads it. To do this add the extension somewhere in the php.ini file. For example in the section Dynamic Extensions to keep it somewhere logical.</p>
<pre>extension=mssql.so</pre>
<p>3. Restart the web server</p>
<p>If using the Apache 2 web server you would normally issue</p>
<pre>/etc/init.d/apache2 restart</pre>
<h2>4. Post installation</h2>
<p>Well that&#8217;s about it. You should have a workable mssql extension added to your PHP installation. You should be able to continue using your platforms chosen way of upgrading PHP without affecting the MS SQL Server support.</p>
<p>However, you might need to dig into the <em>freetds.conf</em> file. If you have followed my steps without altering the installation path you will find the freetds.conf file in <em>/usr/local/freetds/etc/freetds.conf</em>.</p>
<p>Sometimes it is difficult getting the connection work without adding it to the the freetds.conf. Especially since you may have to use different values for the tds version directive depending on the MS SQL Server version. Examples:</p>
<pre>[logisticsServer]
host = ntmachine.localdomain
port = 1433
tds version = 7.0

[intranetServer]
host = 192.168.1.145
port = 1433
tds version = 4.2</pre>
<p>Again. Check that you are using the correct freetds.conf file and that you are using the correct tds version! More information on this at <a href="http://www.freetds.org">freetds.org</a>. This and the above mentioned &#8220;missing files&#8221; that PHP is looking for are the two most common pitfalls.</p>
<p>Good luck!</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.dotvoid.com/2010/01/adding-support-for-ms-sql-server-to-php-in-linux/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.dotvoid.com/2010/01/adding-support-for-ms-sql-server-to-php-in-linux/&amp;title=Adding+support+for+MS+SQL+Server+to+PHP+in+Linux" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.dotvoid.com/2010/01/adding-support-for-ms-sql-server-to-php-in-linux/&amp;t=Adding+support+for+MS+SQL+Server+to+PHP+in+Linux" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.dotvoid.com/2010/01/adding-support-for-ms-sql-server-to-php-in-linux/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.dotvoid.com/2010/01/adding-support-for-ms-sql-server-to-php-in-linux/&amp;title=Adding+support+for+MS+SQL+Server+to+PHP+in+Linux&amp;summary=Adding%20support%20for%20MS%20SQL%20Server%20in%20PHP%20is%20not%20very%20difficult.%20Searching%20%28Google%2FBing%2Fwhatever%29%20reveals%20lots%20of%20information%20on%20how%20to%20do%20this%20with%20Windows%20-%20naturally%20-%20but%20very%20little%20on%20how%20to%20go%20about%20it%20using%20Linux.%20Most%20people%20use%20precompiled%20PHP%20installations%20and%20I%20will%20show%20how%20to%20add%20MS%20SQL%20&amp;source=dotvoid.com" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-plaxo">
			<a href="http://www.plaxo.com/?share_link=http://www.dotvoid.com/2010/01/adding-support-for-ms-sql-server-to-php-in-linux/" rel="nofollow" class="external" title="Share this on Plaxo">Share this on Plaxo</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.dotvoid.com/2010/01/adding-support-for-ms-sql-server-to-php-in-linux/&amp;title=Adding+support+for+MS+SQL+Server+to+PHP+in+Linux" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Adding+support+for+MS+SQL+Server+to+PHP+in+Linux+-+http://b2l.me/wt3t2&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.dotvoid.com/2010/01/adding-support-for-ms-sql-server-to-php-in-linux/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>Zend Framework 1.8 Web Application Development review</title>
		<link>http://www.dotvoid.com/2009/12/zend-framework-18-web-application-development-review/</link>
		<comments>http://www.dotvoid.com/2009/12/zend-framework-18-web-application-development-review/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 23:33:32 +0000</pubDate>
		<dc:creator>Danne</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://www.dotvoid.com/?p=425</guid>
		<description><![CDATA[Packt Publishing sent me a copy of Keith Pope&#8217;s Zend Framework 1.8 Web Application Development a while ago. In return they asked me to write what I thought about it. I have had it lying on my desk for a while but haven&#8217;t had time to read it more carefully. Nevertheless I have actually used [...]]]></description>
			<content:encoded><![CDATA[<p>Packt Publishing sent me a copy of Keith Pope&#8217;s <a href="http://www.packtpub.com/zend-framework-1-8-web-application-development/book">Zend Framework 1.8 Web Application Development</a> a while ago. In return they asked me to write what I thought about it. I have had it lying on my desk for a while but haven&#8217;t had time to read it more carefully. Nevertheless I have actually used it every now and then. Now, after reading a bit more the last few days, I can finally give my opinion on the book.</p>
<h2>Programming books in general</h2>
<p>I&#8217;d better start off with telling you that I haven&#8217;t read many &#8220;pure&#8221; programming books since the mid 1990&#8217;s when I was studying at the university. I tend to stick to books on concepts and methodologies and then read online tutorials and articles when it comes to programming. Programming books are rarely worth the money as they are either reference books which gets out of date quickly (I&#8217;ve thrown away quite a few Java books over the years&#8230;) or learning by example books which you painstakingly slowly must follow line by line to build something thousands open source projects alrady built.</p>
<p>My thought was that this book was probably both outdated (as ZF 1.9 has been around for awhile) and probably boring in that building a web shop isn&#8217;t that interesting. I was wrong in all ends.</p>
<h2>The book</h2>
<p>I especially like the way Pope introduce the MVC concept in Zend Framework. In the first chapter you get a good overview on configuration, the bootstrap process, controllers, action helpers, views and error handling. Chapter two goes deeper into the specifics of the request and routing. He also briefly delves into more advanced topics as plugins and component customization. The reader quickly gets a very good grasp on how to work with MVC applications in Zend Framework.</p>
<p>Another thing I like is how Pope reasons about various strategies; both pros and cons as well as how and how not to do things. Good examples are chapter four where Pope gives a good explanation on the Fat Model Skinny Controller strategy and chapter five with it&#8217;s best practices regarding accessing models from views with the help of view helpers. Reasoning and explanations like this is good, especially for unexperienced developers. This &#8211; and giving optimization and testing their own chapters &#8211; makes the book better. As Pope is thowing in both Zend Tool as well as Ant into the book makes it even better still.</p>
<h2>Summary</h2>
<p>To sum up my opinions the structure of the book makes it easy to read at leisure as well as using it as reference later. The MVC concept and how it is used in ZF is way better explained than in the ZF documentation. (Truth be told the documentation is hopeless here.) I&#8217;ve been working with ZF a &#8220;long&#8221; time now and whether the book is better for complete beginners or programmers at least a little bit familiar with Zend Framework I really can&#8217;t tell. Remembering how I struggled to find a good introduction to various topics found in the book I belive this book is a better introduction to Zend Framework than can be found in online tutorials and articles &#8211; or even the online documentation.</p>
<p>However, a beginner will get more out of this book than just learning Zend Framework. He, or she, will also learn about unit tests, build procedures and best practices.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.dotvoid.com/2009/12/zend-framework-18-web-application-development-review/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.dotvoid.com/2009/12/zend-framework-18-web-application-development-review/&amp;title=Zend+Framework+1.8+Web+Application+Development+review" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.dotvoid.com/2009/12/zend-framework-18-web-application-development-review/&amp;t=Zend+Framework+1.8+Web+Application+Development+review" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.dotvoid.com/2009/12/zend-framework-18-web-application-development-review/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.dotvoid.com/2009/12/zend-framework-18-web-application-development-review/&amp;title=Zend+Framework+1.8+Web+Application+Development+review&amp;summary=Packt%20Publishing%20sent%20me%20a%20copy%20of%20Keith%20Pope%27s%20Zend%20Framework%201.8%20Web%20Application%20Development%20a%20while%20ago.%20In%20return%20they%20asked%20me%20to%20write%20what%20I%20thought%20about%20it.%20I%20have%20had%20it%20lying%20on%20my%20desk%20for%20a%20while%20but%20haven%27t%20had%20time%20to%20read%20it%20more%20carefully.%20Nevertheless%20I%20have%20actually%20used%20it%20every%20&amp;source=dotvoid.com" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-plaxo">
			<a href="http://www.plaxo.com/?share_link=http://www.dotvoid.com/2009/12/zend-framework-18-web-application-development-review/" rel="nofollow" class="external" title="Share this on Plaxo">Share this on Plaxo</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.dotvoid.com/2009/12/zend-framework-18-web-application-development-review/&amp;title=Zend+Framework+1.8+Web+Application+Development+review" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Zend+Framework+1.8+Web+Application+Development+review+-+http://b2l.me/wt3tm&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.dotvoid.com/2009/12/zend-framework-18-web-application-development-review/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>PHP, SOAP and operation signatures</title>
		<link>http://www.dotvoid.com/2009/12/php-soap-and-operation-signatures/</link>
		<comments>http://www.dotvoid.com/2009/12/php-soap-and-operation-signatures/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 09:22:50 +0000</pubDate>
		<dc:creator>Danne</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[web services]]></category>
		<category><![CDATA[wsdl]]></category>

		<guid isPermaLink="false">http://www.dotvoid.com/?p=407</guid>
		<description><![CDATA[After investigating SOAP further there seems to be a common confusion regarding the difference between rpc/literal and document/literal and how it is handled in PHP. There is even a bug 49169 reported because PHP ext/soap maps all operations defined in the web service with the same signature to the first defined function or method in [...]]]></description>
			<content:encoded><![CDATA[<p>After investigating SOAP further there seems to be a common confusion regarding the difference between rpc/literal and document/literal and how it is handled in PHP. There is even a <a href="http://bugs.php.net/49169">bug 49169</a> reported because PHP ext/soap maps all operations defined in the web service with the same signature to the first defined function or method in PHP when using document/literal style.</p>
<p>It is not a bug. The style document/literal is for sending messages with document data. It is not a remote procedure call. For that we have rpc/literal. So if you look at it that way it is completely understandable that only one method should be around to handle one specific type of message (document).</p>
<p>It is also completely correct behaviour according to the <a href="http://www.ws-i.org/Profiles/BasicProfile-1.1.html#Operation_Signatures">specification WS-I Basic Profile</a>.</p>
<p><em>&#8220;In the case of rpc-literal binding, the operation name is used as a wrapper for the part accessors. In the  					document-literal case, since a wrapper with the operation name is not present, the message signatures must be  					correctly designed so that they meet this requirement.</em><em>&#8220;</em></p>
<p>As document/literal is the preferred style, and some implementations obviously have a tendency to dislike rpc/literal, a lot of people is going down the document/literal route without understanding the implications and what the real difference really is.</p>
<p>I don&#8217;t think this should stop ext/soap in PHP to use the soapAction header for routing when necessary. According to WSDL 1.1 the <a href="http://www.w3.org/TR/wsdl#_soap:operation">soapAction attribute is mandatory</a> when HTTP protocol binding is used. Whether rpc/literal or dcoument/literal style is used is of no difference. So is this information just garbage for document style messages?</p>
<p>Anyways, PHP bug 46169 is to my understanding not really a bug. But it is a reasonable feature request.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.dotvoid.com/2009/12/php-soap-and-operation-signatures/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.dotvoid.com/2009/12/php-soap-and-operation-signatures/&amp;title=PHP%2C+SOAP+and+operation+signatures" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.dotvoid.com/2009/12/php-soap-and-operation-signatures/&amp;t=PHP%2C+SOAP+and+operation+signatures" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.dotvoid.com/2009/12/php-soap-and-operation-signatures/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.dotvoid.com/2009/12/php-soap-and-operation-signatures/&amp;title=PHP%2C+SOAP+and+operation+signatures&amp;summary=After%20investigating%20SOAP%20further%20there%20seems%20to%20be%20a%20common%20confusion%20regarding%20the%20difference%20between%20rpc%2Fliteral%20and%20document%2Fliteral%20and%20how%20it%20is%20handled%20in%20PHP.%20There%20is%20even%20a%20bug%2049169%20reported%20because%20PHP%20ext%2Fsoap%20maps%20all%20operations%20defined%20in%20the%20web%20service%20with%20the%20same%20signature%20to%20the%20&amp;source=dotvoid.com" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-plaxo">
			<a href="http://www.plaxo.com/?share_link=http://www.dotvoid.com/2009/12/php-soap-and-operation-signatures/" rel="nofollow" class="external" title="Share this on Plaxo">Share this on Plaxo</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.dotvoid.com/2009/12/php-soap-and-operation-signatures/&amp;title=PHP%2C+SOAP+and+operation+signatures" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=PHP%2C+SOAP+and+operation+signatures+-+http://b2l.me/wt44d&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.dotvoid.com/2009/12/php-soap-and-operation-signatures/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>PHP and Web Services &#8211; essential reading</title>
		<link>http://www.dotvoid.com/2009/12/php-and-web-services-essential-reading/</link>
		<comments>http://www.dotvoid.com/2009/12/php-and-web-services-essential-reading/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 09:56:45 +0000</pubDate>
		<dc:creator>Danne</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[web services]]></category>

		<guid isPermaLink="false">http://www.dotvoid.com/?p=403</guid>
		<description><![CDATA[An old web service implemented in PHP have been giving me some headache the last couple of days. Especially interoperability with clients implemented in other languages (like .NET) are troublesome. It seems to me that PHP is very forgiving. Which is good &#8211; sometimes &#8211; but not always. PHP let you get away with a [...]]]></description>
			<content:encoded><![CDATA[<p>An old web service implemented in PHP have been giving me some headache the last couple of days. Especially interoperability with clients implemented in other languages (like .NET) are troublesome. It seems to me that PHP is very forgiving. Which is good &#8211; sometimes &#8211; but not always. PHP let you get away with a lot when creating your web services. So just because <em>your PHP client</em> play along nicely doesn&#8217;t mean other clients will work. Far from it.</p>
<p>So after loads of googling I came to realise that even though 2010 is just around the corner there are still very few quality articles on PHP and web services/SOAP available. Most of the stuff I find is rubbish where people who don&#8217;t know nothing explain things they don&#8217;t understand.</p>
<p>So even though these articles below are old, they will give most people a very good grasp on how, and why, to create a SOAP web service using PHP that will work. (And a very short advice; use document/literal style for better interoperability with for example .NET and don&#8217;t use preserved words like &#8220;ref&#8221; as parameter (message parts) names for better interoperability with for example .NET).</p>
<ol>
<li><a href="http://www.ibm.com/developerworks/webservices/library/ws-whichwsdl/">Which style of WSDL should I use?</a></li>
<li><a href="http://wso2.org/library/1060">PHP SOAP Extension</a></li>
</ol>
<p>A comment about the second article is in place though. I generally tend to favour mapping WSDL defined operations to methods in a class. So instead of using PHP methods like $server-&gt;addFunction(), use $server-&gt;setClass(). <a href="http://www.php.net/manual/en/soapserver.setclass.php">More on setClass() in the manual</a>.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.dotvoid.com/2009/12/php-and-web-services-essential-reading/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.dotvoid.com/2009/12/php-and-web-services-essential-reading/&amp;title=PHP+and+Web+Services+-+essential+reading" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.dotvoid.com/2009/12/php-and-web-services-essential-reading/&amp;t=PHP+and+Web+Services+-+essential+reading" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.dotvoid.com/2009/12/php-and-web-services-essential-reading/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.dotvoid.com/2009/12/php-and-web-services-essential-reading/&amp;title=PHP+and+Web+Services+-+essential+reading&amp;summary=An%20old%20web%20service%20implemented%20in%20PHP%20have%20been%20giving%20me%20some%20headache%20the%20last%20couple%20of%20days.%20Especially%20interoperability%20with%20clients%20implemented%20in%20other%20languages%20%28like%20.NET%29%20are%20troublesome.%20It%20seems%20to%20me%20that%20PHP%20is%20very%20forgiving.%20Which%20is%20good%20-%20sometimes%20-%20but%20not%20always.%20PHP%20let%20you%20get&amp;source=dotvoid.com" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-plaxo">
			<a href="http://www.plaxo.com/?share_link=http://www.dotvoid.com/2009/12/php-and-web-services-essential-reading/" rel="nofollow" class="external" title="Share this on Plaxo">Share this on Plaxo</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.dotvoid.com/2009/12/php-and-web-services-essential-reading/&amp;title=PHP+and+Web+Services+-+essential+reading" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=PHP+and+Web+Services+-+essential+reading+-+http://b2l.me/wtuq7&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.dotvoid.com/2009/12/php-and-web-services-essential-reading/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Inspiration time</title>
		<link>http://www.dotvoid.com/2009/10/inspiration-time/</link>
		<comments>http://www.dotvoid.com/2009/10/inspiration-time/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 11:52:30 +0000</pubDate>
		<dc:creator>Danne</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://www.dotvoid.com/?p=400</guid>
		<description><![CDATA[I stopped working as an employee to work both on my own projects and as a freelancing consultant almost two years ago. This last year has been more like a roller coaster than anything else before. From spending very little time on my own projects while working as an independent contractor on debt collection systems [...]]]></description>
			<content:encoded><![CDATA[<p>I stopped working as an employee to work both on my own projects and as a freelancing consultant almost two years ago. This last year has been more like a roller coaster than anything else before. From spending very little time on my own projects while working as an independent contractor on debt collection systems with lots of integration to working on large scale public websites in a fast paced startup and then slowing down to work mostly on my own small projects again. During this time I have moved with my family from Karlskrona in Sweden to the south of Spain and then back to Sweden. This time we moved to Kalmar.</p>
<p>Even though free time has been somewhat scarce I have tried improving my routines when it comes to development and coding. But as the workload has been going up and down a lot I&#8217;ve mostly used the few slow periods to relax. I haven&#8217;t been to a PHP conference since 2007 and a more general software development conference since 2006. I feel I&#8217;ve been, work aside, somewhat lazy the last two years.</p>
<p>So I decided it is time to read a bit more on agile methologies, <a href="http://framework.zend.com">Zend Framework</a>, setup a completely new laptop development environment using Ubuntu 9.10, <a href="http://www.zend.com">Zend Studio 7.1 and Zend Server</a>. I will also try out <a href="http://studios.thoughtworks.com/mingle-agile-project-management">Mingle from Thoughtworks</a> for project management. Ok the last thing can be a bit weird having only one additional team member besides myself on current projects. But I&#8217;ve been interested in trying it out ever since hearing about it by Dan North from Thoughtworks in an software development conference a couple of years back. Expensive but interesting to see if it can be used in teams trying to stay agile even though they are spread out geographically.</p>
<p>At the moment I&#8217;m rereading the excellent book <a href="http://www.pragprog.com/titles/pad/practices-of-an-agile-developer">Practices of an Agile Developer</a>. It is a brilliant book packed with inspiration that can help you develop and improve your habits for an agile approach to software development. It is good to browse through it every once in a while to remind yourself on how you should work <img src='http://www.dotvoid.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Conveniently enough I was also just recently shipped a copy of <a href="http://www.packtpub.com/zend-framework-1-8-web-application-development/book">Zend Framework 1.8 Web Application Development</a> which I hope will be an interesting read as well. I also feel it is about time I read a more in depth book on XP or Scrum. I&#8217;ll see what good books I can find on that topic.</p>
<p>So the next few weeks, when I&#8217;m not working or trying to be a good dad to my daughters, I will try not to shut down my brain in front of the TV and instead study for a bit.</p>
<p>In my experience, trying out new things and reading a few good books, can do wonders to your inspiration and also give you more energy to face both challenging as well as more mundane, even boring, tasks.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.dotvoid.com/2009/10/inspiration-time/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.dotvoid.com/2009/10/inspiration-time/&amp;title=Inspiration+time" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.dotvoid.com/2009/10/inspiration-time/&amp;t=Inspiration+time" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.dotvoid.com/2009/10/inspiration-time/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.dotvoid.com/2009/10/inspiration-time/&amp;title=Inspiration+time&amp;summary=I%20stopped%20working%20as%20an%20employee%20to%20work%20both%20on%20my%20own%20projects%20and%20as%20a%20freelancing%20consultant%20almost%20two%20years%20ago.%20This%20last%20year%20has%20been%20more%20like%20a%20roller%20coaster%20than%20anything%20else%20before.%20From%20spending%20very%20little%20time%20on%20my%20own%20projects%20while%20working%20as%20an%20independent%20contractor%20on%20debt%20co&amp;source=dotvoid.com" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-plaxo">
			<a href="http://www.plaxo.com/?share_link=http://www.dotvoid.com/2009/10/inspiration-time/" rel="nofollow" class="external" title="Share this on Plaxo">Share this on Plaxo</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.dotvoid.com/2009/10/inspiration-time/&amp;title=Inspiration+time" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Inspiration+time+-+http://b2l.me/wtxht&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.dotvoid.com/2009/10/inspiration-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Site architecture based on Zend Framework</title>
		<link>http://www.dotvoid.com/2009/10/site-architecture-based-on-zend-framework/</link>
		<comments>http://www.dotvoid.com/2009/10/site-architecture-based-on-zend-framework/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 11:48:54 +0000</pubDate>
		<dc:creator>Danne</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://www.dotvoid.com/?p=394</guid>
		<description><![CDATA[After working on the Swedish weather site klart.se for awhile I now work on my own projects again. So I have switched Codeigniter to Zend Framework again.
After a trip to Dublin I finally launched the beginning of a new social tourist Dublin guide. It is exactly the same site as both the Swedish Fuengirola guide [...]]]></description>
			<content:encoded><![CDATA[<p>After working on the Swedish weather site klart.se for awhile I now work on my own projects again. So I have switched Codeigniter to <a href="http://framework.zend.com">Zend Framework</a> again.</p>
<p>After a trip to Dublin I finally launched the beginning of a new <a href="http://www.dublincitymap.com/">social tourist Dublin guide</a>. It is exactly the same site as both the <a href="http://www.fuengirolaguide.com">Swedish Fuengirola guide</a> as well as the <a href="http://www.fuengirolamap.com">English Fuengirola guide</a> I launched after living there for five months. The functionality is somewhat basic as of yet but every now and then I&#8217;ll add something more.</p>
<p>Basing three different sites, even though they are very similar, using two different languages gives me the possibility to try out several parts of Zend Framework. It also requires a good design both in the backend and frontend to keep it maintainable. I thought maybe some people would be interested in a basic overview of the different parts needed to put everything together.</p>
<h2>Backend</h2>
<p>The sites aren&#8217;t really that complicated. On a basic level there is a MySQL database and a database layer using Zend_Db/Zend_Db_Table, there is a Zend Framework MVC architecture using models, controllers, views, layouts with Zend_Layout as well as a few view helpers and some HTML, CSS as well as Javascript. All commonly needed. There is more needed to make it a sitethough.</p>
<p>I want as little configuration per site as possible but I naturally still use Zend_Config_Ini for settings. Zend_Registry is needed to keep the global scope clean and is used to store instantiated objects that need to be available throughtout the website logic.</p>
<p>I have been a bit particular on using ZF as often as possible on these sites. With few exceptions. Thus I also use Zend_Form, Zend_Locale, Zend_Translate, Zend_Cache and more. Zend_Cache is really a no brainer and mainly used to speed up translations. This is extremely easy as Zend_Translate and Zend_Locale both are connected to the cache with one simple method call each. It is not complete but how simple this is to setup is illustrated by the below code.</p>
<pre>$configuration = new Zend_Config_Ini(
    APPLICATION_PATH .'/config/app.ini',
    APPLICATION_ENVIRONMENT
);
$frontendOptions = array(
    'lifetime' =&gt; $config-&gt;cache-&gt;lifetime,
    'automatic_serialization' =&gt; true
);
$backendOptions = array('cache_dir' =&gt; $config-&gt;cache-&gt;dir);
$cache = Zend_Cache::factory(
    'Core',
    'File',
    $frontendOptions,
    $backendOptions
);

$conf_locale = $configuration-&gt;locale;
$locale = new Zend_Locale($conf_locale);
$locale-&gt;setCache($cache);

Zend_Translate::setCache($cache);
$translate = new Zend_Translate(
    'array',
    APPLICATION_PATH .'/config/translation-' . $conf_locale . '.php',
    $conf_locale
);
$translate-&gt;setLocale($conf_locale);</pre>
<p>Zend_Form have had a few problems in many versions of ZF. In my opinion it is also a bit bloated and limiting to be used all the way. (Even though I like the automatic connection to the translation functionality in Zend_Translate and the validation through Zend_Validate) So I have settled for a simpler way where I use Zend_Form fully for validation (with Zend_Validate) and then give the view access to the form through a Zend_Form subclass to be able to print the fields individually. I think this is easier to handle than all the overloading and coding needed to fully make Zend_Form create forms as I want them. Another good thing with the form classes is that they too are locale aware and are translated automatically by connecting them to Zend_Translate through the simple line <em>Zend_Form::setDefaultTranslator($translate);</em>. The sub classed Form utility class looks like below. The generated elements are translated automatically. Very convenient.</p>
<pre>class Custom_Form extends Zend_Form  {
    /**
     * Render a field
     * @param string $name The name of the form element
     */
    public function _e($name) {
        $e = $this-&gt;getElement($name);
        return ($e) ? $e-&gt;render() : "&lt;dt&gt;Error&lt;/dt&gt;&lt;dd&gt;Missing &lt;$name&gt; field element&lt;/dd&gt;";
    }
}</pre>
<p>Another thing needed for these sites are to keep the urls understandable and thus translated into the language used on the site. For this the routes, or paths, are kept in the translation file as well. The translated paths are then registered to the router through the use of Zend_Controller_Router_Route and Zend_Controller_Router_Route_Regex objects.</p>
<pre>$frontController = Zend_Controller_Front::getInstance();
$router = $frontController-&gt;getRouter();
$router-&gt;addRoute(
    'route_review',
    new Zend_Controller_Router_Route(
        $translate-&gt;translate('route_review'),
        array('controller' =&gt; 'review', 'action' =&gt; 'index')
    )
);</pre>
<p>For image manipulation I haven&#8217;t looked further than ImageMagick. After a bit of tweaking you get very good quality when producing different image sizes.</p>
<h2>Search</h2>
<p>Last but not least, on the backend that is, there&#8217;s the search engine. ZF have an implementation of Lucene through Zend_Search_Lucene (derived from the Apache Lucene project). This is the one time I haven&#8217;t gone with ZF as I very much like the <a href="http://www.sphinxsearch.com/">open source Sphinx search engine</a> as it is so easy to integrate with MySQL. So Sphinx get to power the search.</p>
<p>This is convenient for several reasons. MySQL is not a great full text search engine, Sphinx give you better weighted results. The main reason though is the performance. Sphinx is very fast in itself but for a site with heavier traffic it is as simple as moving the search backend to it&#8217;s own machine to get a performance increase.</p>
<h2>Frontend</h2>
<p>On the frontend there is as clean html as possible to make it easy to change the design with only CSS as well as manipulate the client side with JQuery. If it wouldn&#8217;t be for the Google map the site would actually be pretty useful even without no css style at all.</p>
<p>A good practice I learned just recently (remember I&#8217;m mostly a backend developer) is to base all javascript functionality on modules that are instantiated depending on element ids present in the html. This makes it a lot simpler to split the javascript functionality into manageble pieces and also makes it a lot easier to maintain.</p>
<p>There are functionality in the client side javascript used to display error messages and information. This makes it necessary to create one javascript file with translation stirngs for each language. The correct javascript translation file is chosen in the layout (template/view file) depending on the current locale.</p>
<p>The map used is (are there any alternatives) <a href="http://code.google.com/apis/maps/">Google Maps API</a>. I chose to completely initiate the map by scanning the actual data displayed on the page. This is possible through clean html markup and also means that if I choose to list ten reviews on a page instead of five nothing need to be changed at all in the frontend. Only a loop limit on the backend.</p>
<h2>Conclusion</h2>
<p>Well. No conclusion. This was just a very basic walkthrough of most of the different pieces needed to create a fairly simple Zend Framework based website. Mostly it was a walkthrough of the bootstrap&#8230; I still hope it is useful or at least interesting.</p>
<p>I know I find it interesting to read about other sites and the architecture and design behind them.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.dotvoid.com/2009/10/site-architecture-based-on-zend-framework/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.dotvoid.com/2009/10/site-architecture-based-on-zend-framework/&amp;title=Site+architecture+based+on+Zend+Framework" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.dotvoid.com/2009/10/site-architecture-based-on-zend-framework/&amp;t=Site+architecture+based+on+Zend+Framework" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.dotvoid.com/2009/10/site-architecture-based-on-zend-framework/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.dotvoid.com/2009/10/site-architecture-based-on-zend-framework/&amp;title=Site+architecture+based+on+Zend+Framework&amp;summary=After%20working%20on%20the%20Swedish%20weather%20site%20klart.se%20for%20awhile%20I%20now%20work%20on%20my%20own%20projects%20again.%20So%20I%20have%20switched%20Codeigniter%20to%20Zend%20Framework%20again.%0D%0A%0D%0AAfter%20a%20trip%20to%20Dublin%20I%20finally%20launched%20the%20beginning%20of%20a%20new%20social%20tourist%20Dublin%20guide.%20It%20is%20exactly%20the%20same%20site%20as%20both%20the%20Swedish%20&amp;source=dotvoid.com" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-plaxo">
			<a href="http://www.plaxo.com/?share_link=http://www.dotvoid.com/2009/10/site-architecture-based-on-zend-framework/" rel="nofollow" class="external" title="Share this on Plaxo">Share this on Plaxo</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.dotvoid.com/2009/10/site-architecture-based-on-zend-framework/&amp;title=Site+architecture+based+on+Zend+Framework" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Site+architecture+based+on+Zend+Framework+-+http://b2l.me/wtxg5&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.dotvoid.com/2009/10/site-architecture-based-on-zend-framework/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Problem with downloading files with Internet Explorer over HTTPS</title>
		<link>http://www.dotvoid.com/2009/10/problem-with-downloading-files-with-internet-explorer-over-https/</link>
		<comments>http://www.dotvoid.com/2009/10/problem-with-downloading-files-with-internet-explorer-over-https/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 08:44:44 +0000</pubDate>
		<dc:creator>Danne</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[ie]]></category>

		<guid isPermaLink="false">http://www.dotvoid.com/?p=388</guid>
		<description><![CDATA[This behaviour has bitten me before. Yesterday I was asked to resolve the issue again. And as my memory is short I was again forced to search the web for a solution. The solution is simple &#8211; but also stupid.
The problem is that Internet Explorer does not handle file dowloads without caching over https very [...]]]></description>
			<content:encoded><![CDATA[<p>This behaviour has bitten me before. Yesterday I was asked to resolve the issue again. And as my memory is short I was again forced to search the web for a solution. The solution is simple &#8211; but also stupid.</p>
<p>The problem is that Internet Explorer does not handle file dowloads without caching over https very well. Or at all. According to knowledge articles on Microsofts website the problem occurs when having one or two of the http headers:</p>
<pre>Pragma: no-cache
Cache-control: no-cache,max-age=0,must-revalidate</pre>
<p>Previously I have have just omitted the http header &#8220;Pragma: nocache&#8221; for IE but it seems it does not always help.</p>
<p>So, whether you want it or not, the solution to the <em>IE https download cache problem</em> is to tell IE to cache the file.</p>
<pre>if ((isset($_SERVER["HTTPS"]) &amp;&amp; strtolower($_SERVER["HTTPS"] == "on")) &amp;&amp;
    preg_match("/MSIE/", $_SERVER["HTTP_USER_AGENT"])) {
	header('Pragma: cache');
} else {
	header('Pragma: no-cache');
}</pre>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.dotvoid.com/2009/10/problem-with-downloading-files-with-internet-explorer-over-https/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.dotvoid.com/2009/10/problem-with-downloading-files-with-internet-explorer-over-https/&amp;title=Problem+with+downloading+files+with+Internet+Explorer+over+HTTPS" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.dotvoid.com/2009/10/problem-with-downloading-files-with-internet-explorer-over-https/&amp;t=Problem+with+downloading+files+with+Internet+Explorer+over+HTTPS" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.dotvoid.com/2009/10/problem-with-downloading-files-with-internet-explorer-over-https/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.dotvoid.com/2009/10/problem-with-downloading-files-with-internet-explorer-over-https/&amp;title=Problem+with+downloading+files+with+Internet+Explorer+over+HTTPS&amp;summary=This%20behaviour%20has%20bitten%20me%20before.%20Yesterday%20I%20was%20asked%20to%20resolve%20the%20issue%20again.%20And%20as%20my%20memory%20is%20short%20I%20was%20again%20forced%20to%20search%20the%20web%20for%20a%20solution.%20The%20solution%20is%20simple%20-%20but%20also%20stupid.%0D%0A%0D%0AThe%20problem%20is%20that%20Internet%20Explorer%20does%20not%20handle%20file%20dowloads%20without%20caching%20over%20&amp;source=dotvoid.com" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-plaxo">
			<a href="http://www.plaxo.com/?share_link=http://www.dotvoid.com/2009/10/problem-with-downloading-files-with-internet-explorer-over-https/" rel="nofollow" class="external" title="Share this on Plaxo">Share this on Plaxo</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.dotvoid.com/2009/10/problem-with-downloading-files-with-internet-explorer-over-https/&amp;title=Problem+with+downloading+files+with+Internet+Explorer+over+HTTPS" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Problem+with+downloading+files+with+Internet+Explorer+over+HTTPS+-+File: /data/app/webapp/functions.php<br />Line: 7<br />Message: Too many connections&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.dotvoid.com/2009/10/problem-with-downloading-files-with-internet-explorer-over-https/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

