Articles

Devolio

Search

Articles I've written or found enjoyable.

Tuesday, May 20. 2008

How to install Apache, MySQL and PHP (LAMP) in Ubuntu 8.04

Just like our Ubuntu 7.10 LAMP how to, this guide will cover the installation of Apache, MySQL and PHP on Ubuntu 8.04. I assume you're already running Ubuntu 8.04 for this guide. If you're still running 7.10, you can use this guide.
Continue reading "How to install Apache, MySQL and PHP (LAMP) in Ubuntu 8.04"

Friday, February 29. 2008

Firefox 2 and 3 on Ubuntu - Night and day

I've been running Firefox 2 with Gutsy since it's release, and using it daily I've only been bothered by a handful of quirks.

1) First and foremost, Flash. Now, the system I do my day to day stuff on isn't exactly a powerhouse - A 3.2 GHz Celeron with 2GB of RAM - but (for me) more than enough. Nonetheless, a single instance of Flash can wreak havoc on my little celery, instantly pegging the CPU to 100% and bloating Firefox up like a balloon. I've tried Gnash as well, without much luck.

2) Occasionally sites with heavy JavaScript will do the same thing, grinding Firefox to a halt with one click. There's not many sites that do it, but a few specific cases perform a lot worse than others.

3) And of course, the glaring memory leaks. Even with zero plugins, opening a few tabs and leaving them open all night would leave me with a 400MB instance of Firefox running. Not good.


Finally fed up with the performance in Firefox 2, I installed the latest beta last night and...

I'm beyond impressed. The difference is like night and day. It opens quicker, and feels much more responsive (even after being left open all night.) Flash no longer constantly eats away at my CPU and RAM and pages don't hang up while loading. Heavy JavaScript and Ajax issues are completely alleviated. And best of all, Firefox's memory usage hasn't gone over 100MB at all - even with 25 tabs open.

So if you're running Ubuntu Gutsy and still haven't checked out Firefox 3, you're in for a real treat.

Thursday, February 28. 2008

Practical (and impractical) PHP Optimizations

I've been seeing a lot of articles popping up lately about PHP Optimizations, particularly within the code (rather than the configuration, server, caching, etc) that I have some nitpicks with.

My position remains the same: Unless your code is running incredibly slow, you've found every single bug you can possibly find without having nightmares about unit tests, or an optimization that makes more than a 10% improvement in speed (factoring in your margin of error,) don't bother. That said, let's down to brass tacks.
Continue reading "Practical (and impractical) PHP Optimizations"

Tuesday, February 12. 2008

(Almost) Spring Cleaning

I have a bad habit. I love to browse, I have tons of RSS feeds and sites that I check multiple times daily. But that's not my bad habit - invariably during my browsing, I find things I'd like to give mention to, or sometimes try, but with work it never seems to happen. So I've decided to do a short little 'spring cleaning' list to clean up some of the clutter.
Continue reading "(Almost) Spring Cleaning"

How to install PHP-GTK in Ubuntu 7.10

Just as described on their site,
"PHP-GTK is an extension for the PHP programming language that implements language bindings for GTK+. It provides an object-oriented interface to GTK+ classes and functions and greatly simplifies writing client-side cross-platform GUI applications."

Basically, it will allow you to use almost everything in the GTK+ API with PHP. If you don't already know what GTK+ is, GTK+ is an API for creating a graphical user interface, which also happens to be cross platform (Linux, Windows, and Mac.) Today we're going to cover installing PHP-GTK in Ubuntu 7.10 (Gutsy).
Continue reading "How to install PHP-GTK in Ubuntu 7.10"

Monday, January 28. 2008

A Simple RSS Reader with SimpleXML

SimpleXML is exactly that: a simple way to handle XML data (including RSS feeds) with PHP5. Today we'll look at using SimpleXML to read and display RSS 1.0 feeds. We'll start by breaking down what information exactly we want to get from our XML file.
Continue reading "A Simple RSS Reader with SimpleXML"

Monday, January 21. 2008

PCRE Tester and Cheat Sheet

Regular Expressions are an extremely powerful tool in any programmers array. Though not always the easiest nuts to crack, so to speak, they are great - when they work correctly. After a rather 'amusing' night of trying to get a complex regular expression to work, I devised a plan.

Why not have both a PCRE Tester and Cheat Sheet on the same page? A tool that allows you to input multiple test strings to make things easier, while being able to look at all of the modifiers and syntax at the same time. The PCRE Tester and Cheat Sheet.

In the near future, I'll also be adding the ability to run preg_replace() instead of preg_match(), and a way to load some of the Regular Expressions from my library, as well as save and add your favorites.

Wednesday, January 9. 2008

How to install APC in Ubuntu 7.10

APC, or Alternative PHP Cache, is a framework for PHP to cache opcodes. Opcodes are the actual instructions that are used when PHP executes scripts. By caching these, you can usually vastly improve performance across the board for PHP based applications. This guide covers installing APC in Ubuntu 7.10 with PHP5 and Apache2.
Continue reading "How to install APC in Ubuntu 7.10"

Tuesday, January 8. 2008

How to install Xdebug for PHP5 on Ubuntu 7.10

This guide will cover how to install Xdebug for PHP5 on Ubuntu 7.10. Xdebug is not only an excellent debugger for PHP, it also has one of my favorite tools for optimizing PHP - A profiler.

This profiler will break down your code and determine where your bottlenecks, or slow downs are to ease optimization. Combined with a program to handle cachegrind files, you can benchmark and optimize your scripts quickly and effectively.
Continue reading "How to install Xdebug for PHP5 on Ubuntu 7.10"

Monday, January 7. 2008

How to install Apache, MySQL and PHP (LAMP) in Ubuntu 7.10

This guide covers the installation of Apache, MySQL, and PHP on Ubuntu 7.10 (More commonly referred to as LAMP, or Linux Apache MySQL PHP). Optionally, you can also install phpMyAdmin as a front end for MySQL. We assume that you already have Ubuntu 7.10 running on the machine as well. That said, let's get right into it.
Continue reading "How to install Apache, MySQL and PHP (LAMP) in Ubuntu 7.10"