This file is indexed.

/usr/share/php/tests/Horde_Feed/Horde/Feed/fixtures/lexicon/http-www.procata.com-blog-feed- is in php-horde-feed 2.0.1-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
<?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"
	>

<channel>
	<title>Professional PHP</title>
	<atom:link href="http://www.procata.com/blog/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>
	<pubDate>Tue, 27 May 2008 05:57:30 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>php &#124; tek Wrapup</title>
		<link>http://www.procata.com/blog/archives/2008/05/26/php-tek-wrapup/</link>
		<comments>http://www.procata.com/blog/archives/2008/05/26/php-tek-wrapup/#comments</comments>
		<pubDate>Tue, 27 May 2008 05:57:30 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Software Design]]></category>

		<category><![CDATA[books]]></category>

		<category><![CDATA[phptek]]></category>

		<category><![CDATA[talks]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/?p=290</guid>
		<description><![CDATA[I really enjoyed myself at this year&#8217;s php &#124; tek.  The conference seemed even better than last year.  Here are the slides from my talks&#8230;

Exceptional PHP
Coding for Success: Writing Software You’ll Be Able To Understand Next Month

Here are some of the books I mentioned&#8230;

Refactoring: Improving the Design of Existing Code
php&#124;architect&#8217;s Guide to PHP [...]]]></description>
			<content:encoded><![CDATA[<p>I really enjoyed myself at this year&#8217;s php | tek.  The conference seemed even better than last year.  Here are the slides from my talks&#8230;</p>
<ul>
<li><a href="http://www.procata.com/talks/phptek-may2008-exceptional.pdf">Exceptional PHP</a></li>
<li><a href="http://www.procata.com/talks/phptek-may2008-maintainable.pdf">Coding for Success: Writing Software You’ll Be Able To Understand Next Month</a></li>
</ul>
<p>Here are some of the books I mentioned&#8230;</p>
<ul>
<li><a href="http://www.amazon.com/Refactoring-Improving-Existing-Addison-Wesley-Technology/dp/0201485672/ref=pd_bbs_sr_1?ie=UTF8&#038;s=books&#038;qid=1211867585&#038;sr=1-1">Refactoring: Improving the Design of Existing Code</a></li>
<li><a href="http://www.phparch.com/c/books/id/0973589825">php|architect&#8217;s Guide to PHP Design Patterns</a></li>
<li><a href="http://www.amazon.com/PHP-Action-Objects-Design-Agility/dp/1932394753/ref=pd_bbs_sr_1?ie=UTF8&#038;s=books&#038;qid=1211867300&#038;sr=1-1">PHP in Action: Objects, Design, Agility</a></li>
<li><a href="http://www.amazon.com/Design-Patterns-Object-Oriented-Addison-Wesley-Professional/dp/0201633612/ref=pd_bbs_sr_1?ie=UTF8&#038;s=books&#038;qid=1211867382&#038;sr=1-1">Design Patterns: Elements of Reusable Object-Oriented Software</a></li>
<li><a href="http://www.amazon.com/Implementation-Patterns-Addison-Wesley-Signature-Kent/dp/0321413091/ref=pd_bbs_sr_1?ie=UTF8&#038;s=books&#038;qid=1211867430&#038;sr=1-1">Implementation Patterns</a></li>
<li><a href="http://www.amazon.com/Fundamentals-Object-Oriented-Design-Addison-Wesley-Technology/dp/020169946X/ref=sr_1_1?ie=UTF8&#038;s=books&#038;qid=1211867490&#038;sr=1-1">Fundamentals of Object-Oriented Design in UML</a></li>
</ul>
<p>I&#8217;m already looking forward to next year.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2008/05/26/php-tek-wrapup/feed/</wfw:commentRss>
		</item>
		<item>
		<title>php &#124; tek 2008</title>
		<link>http://www.procata.com/blog/archives/2008/05/20/php-tek-2008/</link>
		<comments>http://www.procata.com/blog/archives/2008/05/20/php-tek-2008/#comments</comments>
		<pubDate>Tue, 20 May 2008 16:17:31 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/archives/2008/05/20/php-tek-2008/</guid>
		<description><![CDATA[Well, I&#8217;ve made it to PHP&#124;tek in Chicago.  I flew in last night, had a beer with Jason and then used the WiFi in the lobby to spin up an extra large EC2 instance (via RightScale) to do some benchmarks for one of my talks.  I&#8217;m using the the XL instance because it [...]]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.procata.com/blog/wp-content/uploads/2008/05/elephant.jpg' alt='PHP Elephant' align='right' hspace='20' />Well, I&#8217;ve made it to PHP|tek in Chicago.  I flew in last night, had a beer with <a href="http://blog.casey-sweat.us/">Jason</a> and then used the WiFi in the lobby to spin up an extra large EC2 instance (via <a href="http://www.rightscale.com/m/">RightScale</a>) to do some benchmarks for one of my talks.  I&#8217;m using the the XL instance because it it is <a href="http://oren.blogs.com/praxis/2008/04/the-amazon-ec2.html">not shared</a> with other users.</p>
<p>I&#8217;m still putting the final touches on my slides.</p>
<ul>
<li><a href="http://tek.phparch.com/c/schedule/talk/d1s6/1">Exceptional PHP</a></li>
<li><a href="http://tek.phparch.com/c/schedule/talk/d2s5/0">Coding for Success: Writing Software You&#8217;ll Be Able To Understand Next Month</a></li>
</ul>
<p>I&#8217;m blogging this from <a href="http://www.cdatazone.org/">Rob Richards&#8217;</a> Working With Web Services presentation.  Oh yeah, I work with Rob.  Oh yeah, since, I haven&#8217;t posted anything in six months &#8230;  In January, I moved to San Francisco and started work at <a href="http://www.mashery.com/">Mashery</a>.  I realized from talking with Jason last night that I really haven&#8217;t mentioned that here.  They&#8217;ve been keeping me pretty busy, hence the lack of blogging.</p>
<p>php|tek is <a href="https://twitter.com/phptek">on twitter</a>.  So, I&#8217;ve finally signed up <a href="http://twitter.com/Selkirk">there</a>.  I don&#8217;t get it.  <img src='http://www.procata.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>One last thing, Mashery is <a href="http://www.mashery.com/jobs">Hiring</a> good PHP and Javascript programmers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2008/05/20/php-tek-2008/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Sarah Snow Stever</title>
		<link>http://www.procata.com/blog/archives/2007/11/23/sarah-snow-stever/</link>
		<comments>http://www.procata.com/blog/archives/2007/11/23/sarah-snow-stever/#comments</comments>
		<pubDate>Sat, 24 Nov 2007 06:36:04 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
		
		<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/archives/2007/11/23/sarah-snow-stever/</guid>
		<description><![CDATA[
I am very sad.  Two weeks ago, my cousin Sarah had a stroke and died.  She was 35, two years younger than me.
As kids, Sarah and I, (along with her sister Rachel) would spend weeks in the summer staying at my grandparents house, playing and doing the things that ten year olds do [...]]]></description>
			<content:encoded><![CDATA[<p><a href='http://www.procata.com/blog/wp-content/uploads/2007/11/sarah-sm.jpg' title='Sarah'><img src='http://www.procata.com/blog/wp-content/uploads/2007/11/sarah-sm.jpg' alt='Sarah' /></a></p>
<p>I am very sad.  Two weeks ago, my cousin Sarah had a stroke and died.  She was 35, two years younger than me.</p>
<p>As kids, Sarah and I, (along with her sister Rachel) would spend weeks in the summer staying at my grandparents house, playing and doing the things that ten year olds do on a farm.  We sat around the campfire at family reunions.  We played cards and games, talked and argued.  I always looked forward to seeing all my cousins at holidays and family gatherings, but Sarah and Rachel were special then because they were closer to my age.</p>
<p>As adults, Sarah and I also did stuff together on occasion.  We still sat around the campfire at the family reunions and visited during the holidays.  But, we also went to bars and restaurants, Sarah always knew the best bars.  We went to Cedar Point and shared an automobile accident.  She would cut my hair and I would fix her computer. But mostly, we just talked.  Sarah was just plain easy to talk to and always interesting.</p>
<p>In recent years Sarah moved to Atlanta to build a life for herself there.  She opened a salon there and infused it with her character and personality.  It was a place where she was at home and happy.  I&#8217;m sure her clients felt happy and at home there as well. (<a href="http://ashleywebb.blogspot.com/2007/11/sarah-snow-stever.html">A client  remarks on Sarah&#8217;s passing</a>)</p>
<p>But, the most important thing about her move to Atlanta was meeting her husband, Kevin there.  I&#8217;ve only met Kevin a few times, but the one thing that I know about him is that he made Sarah happy.</p>
<p>I haven&#8217;t seen Sarah as much in the last few years.  Atlanta is far from Michigan and she disliked flying.  She came to fewer and fewer holiday functions.  Despite her many invitations to visit Atlanta, I didn&#8217;t go.</p>
<p>That is until September, when I went to the php|works conference in Atlanta.  One of the reasons I wanted to go to the conference was to be able to see Sarah.  After the conference, I stayed with her for a couple days.</p>
<p>Sarah showed me her Salon and I could see how much she loved it.  She introduced me to the dogs that she saved.  We went out to eat and visited the local Atlanta attractions.  But mostly, we talked.  We talked about family, dating, kids and careers.  We talked about her writing, the gym she liked, the church she had joined and the things she wanted to do.</p>
<p>Sarah tried very hard to convince me to move to Atlanta.  I think she felt that all I needed to do was to move there and I would meet the love of my life and l could live there happily to the end of my days.  After all, she did.</p>
<p>There is so much that I still want to do with Sarah.  I feel like I&#8217;ve always taken it for granted that that she would be around for us to &#8220;do that later.&#8221;  I guess not.  I&#8217;ll miss Sarah.</p>
<p><a href="http://obits.mlive.com/AnnArbor/DeathNotices.asp?Page=Lifestory&#038;PersonId=97964436">Sarah&#8217;s obituary</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2007/11/23/sarah-snow-stever/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Benchmarking PHP&#8217;s Magic Methods</title>
		<link>http://www.procata.com/blog/archives/2007/11/04/benchmarking-phps-magic-methods/</link>
		<comments>http://www.procata.com/blog/archives/2007/11/04/benchmarking-phps-magic-methods/#comments</comments>
		<pubDate>Mon, 05 Nov 2007 00:01:02 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Software Design]]></category>

		<category><![CDATA[benchmarks]]></category>

		<category><![CDATA[performance-optimization]]></category>

		<category><![CDATA[profiling]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/archives/2007/11/04/benchmarking-phps-magic-methods/</guid>
		<description><![CDATA[Larry Garfield has an interesting set of benchmarks covering many of PHP&#8217;s magic methods.  His results correspond pretty well to my own benchmarks in the area.  The thing to take away is that its not necessarily the overhead of the magic methods, but rather what you do inside them.  Its hard to [...]]]></description>
			<content:encoded><![CDATA[<p>Larry Garfield has an interesting <a href="http://www.garfieldtech.com/blog/magic-benchmarks">set of benchmarks</a> covering many of PHP&#8217;s <a href="http://php.net/oop5.magic">magic methods</a>.  His results correspond pretty well to my own benchmarks in the area.  The thing to take away is that its not necessarily the overhead of the magic methods, but rather what you do inside them.  Its hard to do anything useful inside a magic method, such as __get or __call that isn&#8217;t <b>10 to 20 times slower</b> than the &#8220;non-magic&#8221; solution.</p>
<p>There are probably more than a few naive programmers who would read results like this and start to avoid these constructs in their own code for performance reasons.  These are the same kinds of people obsessing over a few single or double quotes, who eschew &#8220;slow&#8221; objects in favor of switch statements that are many times slower than the polymorphic method calls they are trying to avoid.</p>
<p>But, that&#8217;s not the end of the story.  Larry ran his benchmarks using 2,000,000 iterations.  The <b>N</b> really matters here.  Sure, iterators are slower than arrays, but you aren&#8217;t going to be iterating over two million things.  I tend to fetch my database records in lots of 25 or 50.  You aren&#8217;t going to be making two million invocations of __call.  But how many will you make?  Under what value of N does the performance of these techniques cease to matter?  Is it ten, one hundred, one thousand, or ten thousand?  You may be surprised at how few calls your program actually does and how little impact it has on performance.</p>
<p>As <a href="http://netevil.org/">Wez</a> and <a href="http://www.travisswicegood.com/">Travis</a> point out in their comments, profiling is the way to find out the potential impact and to discover your true N.</p>
<p>Paul M. Jones has a <a href="http://paul-m-jones.com/blog/?p=182">good example</a> of what I&#8217;m talking about.  There, call_user_func_array appears to be a bottleneck, but it turns out that its the function being called, htmlspecialchars, not the calling process that consumes the balance of the time.  In that case, the function was &#8220;only&#8221; called 300 times.  I find that order of magnitude to be fairly typical.  Something to be aware of, perhaps, but not something to obsess over.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2007/11/04/benchmarking-phps-magic-methods/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The Endpoints of the Scale of Stupidity on Video</title>
		<link>http://www.procata.com/blog/archives/2007/11/02/the-endpoints-of-the-scale-of-stupidity-on-video/</link>
		<comments>http://www.procata.com/blog/archives/2007/11/02/the-endpoints-of-the-scale-of-stupidity-on-video/#comments</comments>
		<pubDate>Fri, 02 Nov 2007 20:55:22 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Software Design]]></category>

		<category><![CDATA[oop]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/archives/2007/11/02/the-endpoints-of-the-scale-of-stupidity-on-video/</guid>
		<description><![CDATA[A quote from Cal Henderson (via simonwillison) presents a &#8220;Web Application Scale of Stupidity:&#8221;

&#124; OGF (One Giant Function) ---- Sanity ---- OOP (Object Oriented Programming) &#124;

The scale that Cal is talking about is actually better known as modularity:

&#124; Few large modules ----  Sanity? ---- Many Small Modules &#124;

If you haven&#8217;t listened to Alan Kay [...]]]></description>
			<content:encoded><![CDATA[<p>A quote from Cal Henderson (via <a href="http://simonwillison.net/2007/Nov/2/cal/">simonwillison</a>) presents a &#8220;Web Application Scale of Stupidity:&#8221;<br />
<code><br />
| OGF (One Giant Function) ---- Sanity ---- OOP (Object Oriented Programming) |<br />
</code></p>
<p>The scale that Cal is talking about is actually better known as <a href="http://sunnyday.mit.edu/16.355/parnas-criteria.html">modularity</a>:</p>
<p><code><br />
| Few large modules ----  Sanity? ---- Many Small Modules |<br />
</code></p>
<p>If you haven&#8217;t listened to Alan Kay talk about the benefits of many small modules, you should do so now.  Alan Kay coined the term Object Oriented.  Love OO or hate OO, if you have an opinion on it, you should know what he was thinking.  Hint, it wasn&#8217;t C++.</p>
<p><embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=-2950949730059754521&#038;hl=en" flashvars=""> </embed></p>
<p>On the other end of the scale, One Giant Function is generally known as <a href="http://www.laputan.org/pub/foote/mud.pdf">Big ball of Mud</a>(PDF)  Here is Brian Foote&#8217;s presentation on the paper (read the paper first).</p>
<p><embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=8693679271218408739&#038;hl=en" flashvars=""> </embed></p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2007/11/02/the-endpoints-of-the-scale-of-stupidity-on-video/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Working with PHP 5 in Mac OS X 10.5 (Leopard)</title>
		<link>http://www.procata.com/blog/archives/2007/10/28/working-with-php-5-in-mac-os-x-105/</link>
		<comments>http://www.procata.com/blog/archives/2007/10/28/working-with-php-5-in-mac-os-x-105/#comments</comments>
		<pubDate>Mon, 29 Oct 2007 00:48:44 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
		
		<category><![CDATA[Mac]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[apache]]></category>

		<category><![CDATA[mysql]]></category>

		<category><![CDATA[php-5]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/archives/2007/10/28/working-with-php-5-in-mac-os-x-105/</guid>
		<description><![CDATA[Mac OS X is a great development platform for working with PHP.  Leopard comes with Apache, PHP and many other development tools, such as subversion already installed.  Leopard brings a much needed upgrade from Tiger&#8217;s tired PHP 4 to a very modern version of PHP 5.2.4.  This is a guide for setting [...]]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.procata.com/blog/wp-content/uploads/2007/10/php-med-trans-light.gif' alt='PHP' align="right" />Mac OS X is a great development platform for working with PHP.  Leopard comes with Apache, PHP and many other development tools, such as subversion already installed.  Leopard brings a much needed upgrade from Tiger&#8217;s tired PHP 4 to a very modern version of PHP 5.2.4.  This is a guide for setting up a PHP development environment under 10.5 using the version of PHP that ships with leopard.</p>
<p>You may prefer to use one of the 3rd party distributions of PHP, such as <a href="http://www.mamp.info/en/index.php">MAMP</a>, <a href="http://www.apachefriends.org/en/xampp-macosx.html">XAMPP</a> or <a href="http://www.entropy.ch/software/macosx/php/">Marc Liyanage</a>.  This is a guide to using the version of PHP that comes with 10.5.</p>
<h3>Enable Developer Tools</h3>
<p>These steps may not be strictly necessary for this process, but I find it useful to do them.<br />
First, <a href="http://docs.info.apple.com/article.html?artnum=106290">enable your root password</a>.<br />
You may also want to install XCode Tools from your Leopard disk (or grab the latest from <a href="http://developer.apple.com/tools/">Apple developer tools</a>).  The tools are required is you are going to compile any extensions for PHP.</p>
<h3>Editing Configuration Files</h3>
<p>We will have to edit several configuration files that exist as part of the unixy underpinnings of OS X.  I&#8217;m going to recommend the free text editor, <a href="http://www.barebones.com/products/textwrangler/">TextWrangler</a> for this purpose.  Normally, the finder hides the configuration files from view.  However, in the finder, you can use the &#8220;Goto Folder&#8230;&#8221; option under the &#8220;Go&#8221; menu to view these files.  This option if available via command-shift-G.  Actually, this option is available in any file open dialog in OS X via command-shift-G.  In addition, Text Wrangler will allow you to browse these files with its &#8220;open hidden&#8230;&#8221; option.  But, the much easier option is selecting &#8220;Open file by name&#8230;&#8221; (command-D) and just typing the full path and filename.  To save many of these files, you will need to enter your root password.  Be Careful.</p>
<h3>Enabling PHP</h3>
<p>PHP is installed in Mac OS X by default, but not enabled.  To enable it, we must edit the apache 2 configuration file, which is located at <samp>/etc/apache2/httpd.conf</samp>.  Find the line which loads the PHP 5 module, which looks like this:<br />
<code><br />
#LoadModule php5_module        libexec/apache2/libphp5.so<br />
</code><br />
The line is currently commented out.  All we have to do is remove the comment symbol, <samp>#</samp>, so the line looks like this:<br />
<code><br />
LoadModule php5_module        libexec/apache2/libphp5.so<br />
</code><br />
Save.</p>
<h3>Starting Apache</h3>
<p>Go to the sharing panel in system preferences and enable &#8220;Web Sharing.&#8221;  This will start the apache server.<br />
<a href='http://www.procata.com/blog/wp-content/uploads/2007/10/web-sharing.png' title='Sharing Panel'><img src='http://www.procata.com/blog/wp-content/uploads/2007/10/web-sharing.png' alt='Sharing Panel' /></a><br />
Another way to do this is to type the following in the Terminal application:<br />
<code><br />
sudo apachectl start<br />
</code><br />
You will be prompted to enter your root password.  After that, your apache server should now be running.  If you need to restart the server from the terminal, you can type this:<br />
<code><br />
sudo apachectl restart<br />
</code><br />
If you find this tedious to type, there is a script that you can download to do this later in this post.</p>
<h3>Visiting our Web Site</h3>
<p>Now, lets check our work.  In the sharing panel, you can click on the URL under &#8220;Your computer&#8217;s website.&#8221;  Alternatively, in the web browser, go to the url <a href="http://localhost/">http://localhost/</a>.  localhost is a special name that means &#8220;My computer.&#8221;  If your web server is working, you should see a page titled &#8220;Test Page for Apache Installation.&#8221;  If you go to <a href="http://localhost/manual/">http://localhost/manual/</a>, you can read an Apache 2.2 manual, hosted from your own server.  But, this don&#8217;t tell you that PHP is working.<br />
For that, we&#8217;ll have to create a very simple php program.  Create a new file in TextWrangler and type the following:<br />
<pre class="php">&nbsp;
&lt; ?php <a href="http://www.php.net/phpinfo"><span style="color: #000066;">phpinfo</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;</pre><br />
(Don&#8217;t just copy and paste this.  Note that there should be no space between the <samp>&lt;</samp> and the <samp>?php</samp>.  The WordPress software I use for this blog inserts an extra space.)<br />
Save this using the file name <samp>info.php</samp> in the <samp>/Library/WebServer/Documents/</samp> directory.  (start from the top level directory of your hard drive, not the library directory in your home directory.  Now you should be able to visit the PHP page you just created by visiting <a href="http://localhost/info.php">http://localhost/info.php</a>.  You should see the PHP logo and a big table of configuration information.</p>
<h3>Showing the World</h3>
<p>For security purposes, you should consider that anything you put in your <samp>WebServer/Documents</samp> folder will be available across the web.  If you have information that you want to keep private, think twice about putting it there, unless you know how to protect it.<br />
But, if you want people to see the pages that you are sharing, there can be a few obstacles.  You can give out the URL that is listed in the sharing control panel under &#8220;Your computer&#8217;s website.&#8221;  However, if you are behind a <a href="http://en.wikipedia.org/wiki/Network_address_translation">NAT</a> router, such as I am, this IP address based url will only work for other computers on your network and not for the internet as a whole.  You may have to configure network router or firewall in order to discover your true ip address and to route web server requests to that IP to your computer.  Doing this is beyond the scope of this tutorial.<br />
Additionally, IP address based urls don&#8217;t make good urls to share.  IP addresses can change.  If you plan to host a permanent web site, you may want to purchase a domain name and point it to your Mac.  This also, is beyond the scope of this tutorial.<br />
Perhaps the best option is to purchase both a domain name and professional hosting.  Apache based PHP Hosting is widely available and cheap.  You can get support from a good host on uploading your files to the remote server.  I&#8217;m going to presume that you will use one of the many excellent PHP hosting options and are only configuring PHP on your own machine for education, testing or development purposes.</p>
<h3>Enabling a Personal Website</h3>
<p>If you clicked on the URL under &#8220;Your Personal Website,&#8221; you might have gotten a page that says forbidden.  This is because in the default configuration in Leopard, unlike in Tiger, does not allow Apache to serve documents from home directories.  If you want to enable this feature, you have to create a new Configuration file.<br />
Create a new file with the following contents and save it to <samp>/etc/apache2/users/jeff.conf</samp>.<br />
<pre class="xml">&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;directory</span> <span style="color: #ff0000;">&quot;/Users/jeff/Sites&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
    Options Indexes MultiViews FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/directory<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;</pre><br />
Replace &#8220;jeff&#8221; with your user name, which is also the name of your home directory.  Exact capitalization is imporant.  This tells the Apache server that it is ok to serve web content out of the <samp>~jeff</samp> directory.  You will have to restart Apache for this to take effect.<br />
You may also have to create a <samp>Sites</samp> folder in your home directory to hold the files you want to serve.  Leopard will automatically bless this folder with a special Icon.</p>
<h3>Virtual Hosting</h3>
<p>If you want to experiment with or work on more than one site at a time, the single directory in WebServer Documents and the Personal Websites configuration don&#8217;t work well.  Projects collide and files outside of your home directory can be harder to work with.  The answer to this is to setup virtual hosting.  Lets turn our Personal Website sharing solution into a virtual hosting solution that allows us to work with multiple websites as subdirectories of our Sites folder.<br />
So, lets create a sample site, called mysite.  We&#8217;ll create a folder called &#8220;mysite&#8221; as a sub folder of our Sites folder.  Capitalization is important.<br />
Now, we are going to want to access our site with an easy to use domain name, so that our url is <samp>http://mysite/</samp>.  There is an easy way to create new domain names that are only for personal use.  To do this, we can add it to our <samp>/etc/hosts</samp> file.  Add the following lines at the end of this file:<br />
<code><br />
# My local aliases<br />
127.0.0.1	mysite<br />
</code><br />
127.0.0.1 is a special IP address designation that never changes and corresponds to localhost to mean this computer.  We are telling our Mac that the name mysite is hosted on the local computer.  This rule is only in effect on the same machine.  If you go to a different machine, you cannot use the <samp>http://mysite/</samp> url.<br />
Now we need to configure apache for virtual hosting.  We are going to have to edit our <samp>/etc/apache2/users/jeff.conf</samp> file.  Change the contents of this file to the following:<br />
<pre class="xml">&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;directory</span> <span style="color: #ff0000;">&quot;/Users/jeff/Sites/*/&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
    Options Indexes MultiViews FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/directory<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
NameVirtualHost *:80
&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;virtualhost</span> *:<span style="color: #cc66cc;">80</span><span style="font-weight: bold; color: black;">&gt;</span></span>
    DocumentRoot /Users/jeff/Sites/mysite
    ServerName mysite
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/virtualhost<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;</pre><br />
Remember to replace &#8220;jeff&#8221; with your user name.  Place your <samp>info.php</samp> test file into the mysite directory and rename it to <samp>index.php</samp>.  Now, restart your apache server.  When you visit <samp>http://mysite/</samp>, you should now see the familiar php logo and information page.<br />
If you want to add another site, just add a second line in your hosts file, another subdirectory of Sites and append the following to your apache configuration file:<br />
<pre class="xml">&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;virtualhost</span> *:<span style="color: #cc66cc;">80</span><span style="font-weight: bold; color: black;">&gt;</span></span>
    DocumentRoot /Users/jeff/Sites/myothersite
    ServerName myothersite
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/virtualhost<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;</pre></p>
<h3>Sharing with the World, Part II</h3>
<p>Sharing your virtual hosted sites with the world is more complicated if you don&#8217;t have a domain name setup.  You can, however, add your hosts files entries to other computers that you want to share with.  However, you have to change the 127.0.0.1 IP address to the IP address of your computer, taking into account any NAT.<br />
There is a special case of this.  If you are using parallels, perhaps for test viewing your pages in internet explorer, you may want your virtual hosted sites to be available.  The good news is that Windows also supports a <a href="http://en.wikipedia.org/wiki/Hosts_file">hosts</a> file. Here is how to <a href="http://www.mvps.org/winhelp2002/hostsfaq.htm">edit your windows hosts file</a>.  The big problem is knowing what IP address to use.  You can&#8217;t use 127.0.0.1 on the windows side because that is the virtual windows machine, not your Mac&#8217;s address.   You can use the IP address shown on your network system preferences panel, 192.168.1.100 for me.  But, this number is subject to change and you will have to re-edit your hosts file on the windows side.<br />
If you are using Parellels, be sure to upgrade to the new <a href="http://www.parallels.com/en/products/desktop/beta/">beta version</a> for Leopard, build 5540.  Once you&#8217;ve done that, if you visit the network panel in system preferences and select the &#8220;Parallels Host-Guest&#8221; network, you will see the IP address that parallels assigns to your host machine.  (assuming you are using Shared Networking.)  You can then use this IP address in your windows hosts file.  You may also be able to change &#8220;Using DHCP&#8221; to &#8220;Using DHCP with Manual address&#8221; and re-entering this number if you have a problem with the number changing.  Here, my number is 10.37.129.3:</p>
<p><img src='http://www.procata.com/blog/wp-content/uploads/2007/10/parallels.png' alt='Network Preferences panel' /></p>
<h3>Installing MySQL</h3>
<p>MySQL has a binary distribution for Mac OS X.  They also have reasonably good documentation on <a href="http://dev.mysql.com/doc/refman/5.0/en/mac-os-x-installation.html">installing MySQL on Mac OS X</a> for their distribution.  Note that Leopard specific packages for MySQL have not been created yet.</p>
<h3>Starting MySQL</h3>
<p>So far, the MySQL preferences panel from the Tiger release is broken and does not correctly start and stop MySQL (<a href="http://bugs.mysql.com/bug.php?id=31889">bug report</a>.  You can do this from the terminal window with<br />
<code><br />
sudo /usr/local/mysql/support-files/mysql.server start<br />
</code><br />
To shutdown the server type:<br />
<code><br />
sudo /usr/local/mysql/support-files/mysql.server stop<br />
</code><br />
If you find this tedious to type, you can download <a href="http://www.procata.com/software/WebDevCP.dmg">WebDevCP</a>, which is a small AppleScript application that I made. Launching WebDevCP launches both Apache and MySQL.  Quitting the application shuts them both down.  usually.  Launching and quitting requires a password.  No warranty on this thing.  It was just something I was using personally and figured others might find useful.</p>
<h3>Bring the mysql.sock to PHP</h3>
<p>One problem that has come about with MySQL and Leopard is the location of the <samp>mysql.sock</samp> file.  Previously, the default location for this file was in the <samp>/tmp</samp> directory.  That location has now moved to the <samp>/var/mysql</samp> directory.  PHP will look for it there.  Unfortunately, the default location from the MySQL will still place it in the old location.  We can fix this by creating a <samp>my.cnf</samp> configuration file in the /etc directory.  Save a file with the following contents to <samp>/etc/my.cnf</samp>:<br />
<code><br />
[client]<br />
socket = /var/mysql/mysql.sock</p>
<p>[mysqld]<br />
socket = /var/mysql/mysql.sock<br />
</code><br />
In the terminal window, type the following commands to create the directory for the sock file:<br />
<code><br />
sudo mkdir /var/mysql<br />
sudo chown _mysql /var/mysql<br />
</code><br />
One drawback to this is that if you have installed the MySQL GUI tools, they will look for the <samp>mysql.sock</samp> file at the old location.  You can enter the new socket in the connection dialog under More Options, there is a box labeled &#8220;connect using socket.&#8221;  Just enter <samp>/var/mysql/mysql.sock</samp>.<br />
Another solution is to change the <samp>php.ini</samp> file to expect the socket in a different location.  I&#8217;m going with the <samp>my.cnf</samp> option because I expect the MySQL will have a Leopard version out in a few days that changes the default location.</p>
<h3>Where is PEAR?</h3>
<p>OS X has traditionally had problems with <a href="http://pear.php.net/">PEAR</a>.  Many point updates would overwrite the included version of PEAR with an older, and perhaps insecure version.  Sadly, Apple has fixed this by not including PEAR at all in their OS.  This is a big inconvenience for people wanting to use Apple&#8217;s default version of PHP, versus a third party distribution.  So, lets get PEAR installed.  Type the following in the terminal window to download the PEAR installer:<br />
<code><br />
curl http://pear.php.net/go-pear > go-pear.php<br />
</code><br />
after that, type<br />
<code><br />
sudo php -q go-pear.php<br />
</code><br />
To run it.  Hit enter to select the default locations.  PEAR will be installed, but it won&#8217;t be ready to use until we modify our <samp>php.ini</samp> file.</p>
<h3>PHP .ini configuration</h3>
<p>Now we need to make some changes to our php configuration file.  Leopard has an empty configuration file by default, but provides a file which you can use as a template.  From the terminal window, type:<br />
<code><br />
sudo cp /etc/php.ini.default /etc/php.ini<br />
</code><br />
Now, edit the <samp>/etc/php.ini</samp> file.  Find the <samp>include_path</samp> setting:<br />
<code><br />
;include_path = ".:/php/includes"<br />
</code><br />
And change it to<br />
<code><br />
include_path = ".:/usr/share/pear"<br />
</code><br />
This enables our PEAR installation.  You may also want to make some changes which will improve your ability to debug PHP.  FInd the line that says<br />
<code><br />
log_errors = Off<br />
</code><br />
and change it to<br />
<code><br />
log_errors = On<br />
</code><br />
You have to then restart Apache for these PHP changes to go into effect.</p>
<h3>Errors and Omissions</h3>
<p>Thats all there is to using the version of PHP delivered with OS X.  If you find this confusing, you are probably better off with something like XAMPP or MAMP.  I&#8217;ll probably end up compiling my own versions of PHP, but that is a different blog post.  I&#8217;ve already had problems with this configuration when I tried to install XDebug via PECL.  One last thing, if you run into problems, you can check the apache2 error_log file using the Console application.</p>
<p>For support, try the <a href="http://www.sitepoint.com/forums/">Sitepoint forums</a> or Apple&#8217;s <a href="http://discussions.apple.com/">Discussion Forums</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2007/10/28/working-with-php-5-in-mac-os-x-105/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Keywords and Language Simplicity</title>
		<link>http://www.procata.com/blog/archives/2007/10/11/keywords-and-language-simplicity/</link>
		<comments>http://www.procata.com/blog/archives/2007/10/11/keywords-and-language-simplicity/#comments</comments>
		<pubDate>Thu, 11 Oct 2007 18:38:26 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[language-comparison]]></category>

		<category><![CDATA[perl]]></category>

		<category><![CDATA[programming-language]]></category>

		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/archives/2007/10/11/keywords-and-language-simplicity/</guid>
		<description><![CDATA[Well, I like programming language comparisons, so how could I resist this chart (via) promoting the simplicity of the io language by pointing out how few keywords it has.  The interesting thing about this is that Java and PHP are tied on this measure of simplicity with 53 keywords.  Perhaps that reflects Java&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Well, I like programming language comparisons, so how could I resist <a href="http://iolanguage.com/about/simplicity/">this chart</a> (<a href="http://programming.reddit.com/info/2z11k/comments">via</a>) promoting the simplicity of the io language by pointing out how few keywords it has.  The interesting thing about this is that Java and PHP are tied on this measure of simplicity with 53 keywords.  Perhaps that reflects Java&#8217;s heritage as a simplification of C++ (63 keywords) and PHP&#8217;s heritage as an amplification of C (37 keywords) toward a specific purpose?  As usual, Perl is the poster child for language complexity.  Ruby does well with 40 keywords. But, before the Ruby fans get too uppity about the simplicity of their language, they should contemplate the <a href="http://www.zenspider.com/Languages/Ruby/QuickRef.html#18">cat walked across the keyboard while I was holding down the shift key</a> predefined variables that they inherited from Perl.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2007/10/11/keywords-and-language-simplicity/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Improved Error Messages in PHP 5</title>
		<link>http://www.procata.com/blog/archives/2007/10/07/improved-error-messages-in-php-5/</link>
		<comments>http://www.procata.com/blog/archives/2007/10/07/improved-error-messages-in-php-5/#comments</comments>
		<pubDate>Sun, 07 Oct 2007 22:13:04 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[php-5]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/archives/2007/10/07/improved-error-messages-in-php-5/</guid>
		<description><![CDATA[Sometimes its the little things that make a difference.  If you run the this test program in PHP 4 (tested on 4.4.7):
&#60; ?php
function test&#40;$arg&#41; &#123; echo &#34;talk like a pirate.&#34;; &#125;
test&#40;&#41;;
?&#62;
You get the following message:
Warning: Missing argument 1 for test() in /usr/bin/- on line 2
The error message here is reported at the position of [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes its the little things that make a difference.  If you run the this test program in PHP 4 (tested on 4.4.7):<br />
<pre class="php">&lt; ?php
<span style="color: #000000; font-weight: bold;">function</span> test<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$arg</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> <a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">&quot;talk like a pirate.&quot;</span>; <span style="color: #66cc66;">&#125;</span>
test<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre><br />
You get the following message:</p>
<p><code>Warning: Missing argument 1 for test() in /usr/bin/- on line 2</code></p>
<p>The error message here is reported at the position of the definition of the function, but really the error was in how the function was called.  The required parameter to test was not passed.  This error can be annoying, forcing you to consult a stack trace to find the actual error location.  Something some beginners may not know how to do.</p>
<p>However, if you run the same message in PHP 5 (tested on 5.2.2):</p>
<p><code>Warning: Missing argument 1 for test(), called in /Users/jeff/- on line 3 and defined in /Users/jeff/- on line 2</code></p>
<p>Sweet improvement!</p>
<p>One more reason to ditch PHP 4 and go php 5.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2007/10/07/improved-error-messages-in-php-5/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Michigan Taxes Graphic Design Services</title>
		<link>http://www.procata.com/blog/archives/2007/10/01/michigan-taxes-graphic-design-services/</link>
		<comments>http://www.procata.com/blog/archives/2007/10/01/michigan-taxes-graphic-design-services/#comments</comments>
		<pubDate>Mon, 01 Oct 2007 21:23:57 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
		
		<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/archives/2007/10/01/michigan-taxes-graphic-design-services/</guid>
		<description><![CDATA[The state of Michigan, in a bid to become the most confusing state to operate a business in, has passed a sales tax on a bizarrely  random selection of services.  These services include such illustrious professions as astrology services, social escort services, and graphic design services.
The enumerated list of taxable services (sec 3d) [...]]]></description>
			<content:encoded><![CDATA[<p>The state of Michigan, in a bid to become the most confusing state to operate a business in, has passed a sales tax on a bizarrely  random selection of services.  These services include such illustrious professions as astrology services, social escort services, and graphic design services.</p>
<p>The <a href="http://www.legislature.mi.gov/documents/2007-2008/billenrolled/House/pdf/2007-HNB-5198.pdf">enumerated list of taxable services</a> (sec 3d) (PDF) lists &#8220;Specialized design services, as described in NAICS industry group code 5414.&#8221;  The <a href="http://www.census.gov/epcd/naics02/def/NDEF541.HTM#N54143">5414 designation</a> includes &#8220;planning, designing, and managing the production of visual communication in order to convey specific messages or concepts, clarify complex information, or project visual identities. These services can include the design of printed materials, packaging, advertising, signage systems, and corporate identification (logos).&#8221;</p>
<p>Custom programming, web design and hosting services are not taxed (they have NCAIS codes outside of the enumerated ranges).  However, a service such as <a href="http://contests.sitepoint.com/categories/logo-design">logo design</a> would be taxable.</p>
<p>To do the right thing, as I understand it, and I am SO NOT A LAWYER&#8230;</p>
<p>A Michigan business offering a mix of services must collect the tax on the graphic design component of their services.</p>
<p>A graphic designer in Michigan must have a sales tax license and collect the tax as appropriate.</p>
<p>A Michigan based consumer of out of state graphic design services must report their graphic design purchases and pay the tax.</p>
<p>Meanwhile, <a href="http://www.wzzm13.com/news/news_article.aspx?storyid=79823">Michigan has the worst unemployment rate</a> in the nation and <a href="http://www.kauffman.org/kauffmanindex/">is the worst state for creating new businesses</a>.</p>
<p>I&#8217;m glad <a href="http://www.census.gov/epcd/naics02/def/ND541511.HTM">541511: Custom Programming Services</a> was spared from the tax.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2007/10/01/michigan-taxes-graphic-design-services/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Ruby versus PHP or There and Back Again</title>
		<link>http://www.procata.com/blog/archives/2007/09/23/ruby-versus-php-or-there-and-back-again/</link>
		<comments>http://www.procata.com/blog/archives/2007/09/23/ruby-versus-php-or-there-and-back-again/#comments</comments>
		<pubDate>Sun, 23 Sep 2007 16:37:03 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
		
		<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/archives/2007/09/23/ruby-versus-php-or-there-and-back-again/</guid>
		<description><![CDATA[Well, I imagine that this opinion piece by Derick Silvers will cause some conversations: 7 reasons I switched back to PHP after 2 years on Rails.  The gist being that a big bang rewrite of an existing code base is always a risk and that Rails is optimized more for the greenfield case.  [...]]]></description>
			<content:encoded><![CDATA[<p>Well, I imagine that this opinion piece by Derick Silvers will cause some conversations: <a href="http://www.oreillynet.com/ruby/blog/2007/09/7_reasons_i_switched_back_to_p_1.html">7 reasons I switched back to PHP after 2 years on Rails</a>.  The gist being that a big bang rewrite of an existing code base is always a risk and that Rails is optimized more for the greenfield case.  He talks about the beauty and power of coding in native SQL instead of database abstraction layers.  I am sympathetic to that idea.  He mentions hosting in that PHP is small and fast.  To which I would add widely available and well known.  He asks</p>
<blockquote><p>IS THERE ANYTHING RAILS/RUBY CAN DO THAT PHP CAN&#8217;T DO?</p></blockquote>
<p>And answers No with the comment</p>
<blockquote><p>&#8230;when I took a real emotionless non-prejudiced look at it, I realized the language didn&#8217;t matter that much.</p></blockquote>
<p>Now I disagree a bit here.  It just happens that Ruby and PHP are equivalent in many of the ways that are important.  See my post on <a href="http://www.procata.com/blog/archives/2006/02/09/comparing-php-with-other-languages/">comparing languages</a>.  PHP has some advantages with maturity, while ruby has some constructs, such as closures, that can do wonders in the hands of a skilled programmer.  Yet, Ruby also has some disadvantages.  I&#8217;d summarize that by saying it has all of the maintainability of perl with the commercial attitude of smalltalk.</p>
<p>One of the biggest themes of the 7 reasons piece is that he was able to bring much of what he learned from his 2 year failed rewrite in Ruby back to his PHP version.  But, PHP is a different world today than it was two years ago when he made the decision to leave it for Ruby.  PHP 5 is a more viable option.  Additionally, the PHP community has learned from Rails.  Some of the things that made the Rails framework a step ahead, for example routing and url helpers, are now widely available in the PHP world for those who want to use them.</p>
<p>Welcome back, we kept the light on.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2007/09/23/ruby-versus-php-or-there-and-back-again/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.627 seconds -->
<!-- Cached page served by WP-Cache -->