Category: PHP

  • Case-insensitive string comparison in PHP

    This is a common situation: I needed to compare two strings with unknown capitalization - “country” versus “Country”. Since these words should be considered equal even though the second “Country” has a capital “C”, we can’t do a straight comparison on the two - we need to do a case-insensitive comparison.

  • log4php Performance

    We can take for granted that whenever we introduce a library or framework to our application, we incur an overhead cost. The cost varies depending on what we’re trying to do, but we generally accept that the lost performance is worth it for the increased maintainability, functionality or ease of use.

  • Setting up Wordpress with nginx and FastCGI

    All web site owners should feel a burning need to speed. Studies have shown that viewers waiting more than 2 or 3 seconds for content to load online are likely to leave without allowing the page to fully load. This is particularly bad if you’re trying to run a web site that relies on visitors to generate some kind of income - content is king but speed keeps the king’s coffers flowing.

  • Memcached as Session Handler

    By default PHP loads and saves sessions to disk. Disk storage has a few problems:

  • Use a PHP Accelerator to Speed Up Your Website

    I like PHP because it makes it really easy to quickly build a website and add functionality, and is generally lightning fast when executed without needing to wait for compilation as with ASP.NET or Java (Yes, we always pre-compile those languages prior to putting our applications into production, but with PHP we don’t even have to do that).

  • Wamp Server Crashes Installing X-Cart

    When running a default installation, WAMP Server’s Apache crashes when installing X-Cart. The error happens immediately after setting up the MySQL tables and is caused by the curl extension in PHP.

  • "Connection to Server Reset" when Installing Drupal

    Has anyone else had this issue?

  • Apache: Enabling mod_rewrite on Windows 2003 Server

    Recently I had to set up a Wordpress blog on a Windows 2003 server, which involved installing Apache, PHP and MySQL.  Everything went pretty well - except for the typical PHP.ini problems I shall write about later.

  • Maintaining SQL Connections in ASP.NET

    There is a lot of conflicting advice with regard to the proper way of using SQL connections in web work.  The two main schools of thought are:

All categories