18 August, 2008

Thinking of switch to PHP w/Fast CGI?

If you're contemplating switching to running PHP5 under FastCGI, to take advantage of apache's threaded worker model and improve your server's performance, think again.  If you're used to setting and overriding php values via .htaccess files or using php_value/php_flag in your virtual host directory, this is not supported with FastCGI.  You'll have to figure out how to set those values via some other means.  Some PHP ini directives can be set in your script directly, with ini_set, but others have to be set outside of it (register_globals for example).

...click to continue reading.

13 August, 2008

Troubleshooting connection problems with memcached

I was noticing today many apache segfaults on this server, and pretty high traffic loads at times. I haven't pinpointed the exact cause of high traffic, there are a couple candidates, but the apache segfaults seem to accompanied by the following PHP errors:

...click to continue reading.

22 February, 2008

Using OpenId for Authentication

Cal Evans wrote a straightforward and excellent tutorial on how to to use Zend_Auth and its OpenID adapter to authenticate users today.

...click to continue reading.

16 November, 2007

A comprehensive look at PHP5 DateTime

Don't expect to find it here, but Laughine Meme posted the most comprehensive one I could find.  You would think that with the introduction in 5.

...click to continue reading.

28 August, 2007

Don't abuse PHP's header function for redirects

PHP's Header function can come in quite handy when you're building your next greate web application.  Its powerful, but as a result, its tempting to misuse it to do even the simplest things, like permanent redirects.  Usually, its done like this:

// redirect /publications (this page) to real page (/documents)
Header("Location: /documents/");

One line of code, time to move on to the next task in your queue, right?

...click to continue reading.

3 May, 2007

Familiar PHP session poll

Hmm, why does this poll  look so familiar?  Oh yeah, the options to vote on are word for word the same as my post on

...click to continue reading.

13 March, 2007

Avoiding frustration with PHP Sessions

PHP's support for sessions make adding "state" to your web application super easy.  Bus because the illusion of state is maintained by storing a Session ID via a user's cookies, you might find yourself losing potentially productive hours chasing down bizarre client side bugs or opening up a potential security hole.

...click to continue reading.

3 October, 2006

Anti-Comment Spam recommendation: Akismet

I installed to Akismet this weekend, to deal with a new flood of
comment spam that had been getting by mod_security and my other measures. It literally took me 15
minutes to install, thanks to the libraries already
available for it. ...click to continue reading.

22 September, 2006

Debian, PHP5, and session garbage collection

Poking around, like you do on your server, I noticed that php session files weren't being deleted, even after a few days. Turns out, PHP's automatic garbase collection is disabled on Debian. Instead, its replaced by a cron script that cleans out the /var/lib/php5 directory, which is where sessions are saved by default.

...click to continue reading.

9 August, 2006

Templates don't prevent mixing logic

So, if you're a leet php coder, you must have installed Smarty since it gives you a three-tier web application and separates your display logic from your business logic. Right? Maybe not. Just using a template system doesn't guarantee any of this, so don't let yourself be deceived in this way.

...click to continue reading.
 1  2  3  4  5     »

Stats

  • 42 posts

My Bookmarks

Mellow Morning Django vs Symfony

a good comparison of both frameworks - not too high level and includes code examples to illustrate points.

Thursday, Aug 28, 2008 at 05:35 PM

dompdf - The PHP 5 HTML to PDF Converter

recommended on DC-PHP

Friday, Aug 8, 2008 at 01:55 PM

Action Helpers in Zend Framework

decorators for zend controller?

Saturday, May 31, 2008 at 03:49 AM

Zend Framework: Documentation

more docs on OpenId in ZendFramework, specifically how to ask for lightweight profile information

Friday, Feb 22, 2008 at 05:37 PM

realm3: Getting Started With VIM and PHP

useful tips and linsk for getting the most out of vim when you're edittng at the command line

Thursday, Feb 21, 2008 at 03:53 PM

Lifting the Skirt on Zend Framework 1.5: Zend_Auth and the OpenId Adapter.

Since there have been numerous tutorials written regarding Zend_Auth, I won't attempt to make a full tutorial on it. If you are curious, google around, you'll find them. Today though, I'd like to show you a cool new piece that has been added to Auth in Ze

Thursday, Feb 21, 2008 at 03:32 PM

More links