PHP

Coding Open – The Benefits of Free and Open-Source Software in Academia

Coding Open – The Benefits of Free and Open-Source Software in Academia

The term “open-source software” means many things to many people. To some, it’s a method of collaboration; an easy way for your work to benefit your peers. Others see it as a confusing business paradigm. After all, how can you make money by giving away your work? Still others see it as an affordable way to launch a business; or teach yourself a new skill. Clearly open-source software has many uses. But like anything, it’s important to understand both the benefits and the drawbacks to going open-source. Specifically in an academic setting.

Read more…

Learning Outcomes: Interacting with the Flickr API using PHP

Learning Outcomes: Interacting with the Flickr API using PHP

Many of the sites we build feature a small photo gallery as part of their design. Rather than roll our own photo management solution, we opted to integrate Flickr into our custom site framework.

Read more…

Reactive tree caching

Reactive tree caching

APC is an amazing tool for increasing the performance of PHP scripts. The framework we’re developing makes extensive use of caching to store complex data structures that would be too resource intensive to rebuild often. A lot of template engines produce static files to cache the output of resource intensive database driven systems. This works great but we wanted more flexibility.

Read more…

Learning Outcomes: jQuery and AJAX

Learning Outcomes: jQuery and AJAX

So this term I took CIT 381 Database Systems (part of the CIT minor). For our final project we had to design and implement a database that would store information for a fake K-12 tech conference. So that means information on speakers, topics and volunteers. We were then required to develop a web form that could be used to get information out of that database.

Read more…

FreeBSD, APC and File locking = Kernel Panic?

FreeBSD, APC and File locking = Kernel Panic?

The other day we had ourselves a little scare. The server crashed: twice in the span of 24 hours. This was after being rock-solid stable for over 60 days. Luckily, we happen to be rock stars and found a fix…

Quick Solution:
If you don’t care about the details simply recompile your APC extension from source with a different “File locking” type. That should fix the problem.

Otherwise read on!

Read more…

5 essential features for database abstraction layers

5 essential features for database abstraction layers

Computers are much better suited for repetitive tedious jobs like organizing data than programmers. We can avoid writing countless lines of code by making systems to do the work for us. Rather than building components from the ground up we like to write reusable systems that address basic feature requirements then combine them in different ways to solve similar tasks. By doing this we spend less time writing the same patterns over and over again.

Read more…

Easy PHP on Shell

Easy PHP on Shell

A question I see quite often around campus is how to get PHP working on shell. The easy way is to add a shebang to the top of your php file. Simply add one of these lines (for php4 and php5 respectively) to the very top of any php file that you’re going to be using. Make sure there are no spaces or empty lines above the shebang.

Read more…

Server Topology

Server Topology

Our web-cluster at EMU Marketing is slightly unique, so I thought I would go over it a bit. We’re currently running three physical servers: a G4 PPC Xserve, an Xserve Xeon and a commodity server running FreeBSD 7.0. The Xserve Xeon is being used as a secure apache server (running mod_ssl) to handle HTTPS requests.

Read more…

The new tag cloud…

The new tag cloud…

Pat’s design for the new Cultural Forum site included a tag cloud layout inspired by Wordle. Unfortunately Wordle was written on IBM time and because of this the author isn’t allowed to release the source code. Wordle also has no API so it wasn’t really an option. After a few weeks of avoiding the problem I got an idea and hammered out a working proof of concept. Since then the script has been revised and improved a bit. Now users can click and drag to reorganize tags and the system repositions the other tags on the fly in browser.

Read more…

Installing Apache/PHP/MySQL on Mac OS 10.4

Installing Apache/PHP/MySQL on Mac OS 10.4

This post will cover compiling and installing Apache 2, MySQL Community Server 5.1 and PHP 5 from source on Mac OS X Server 10.4.

There are a number of pre-compiled LAMP packages for Mac OS X (one of my favorite being MAMP), if you’re in a hurry or don’t need a lot of custom configuring then I suggest you give one of those a shot.

It should be noted that OS X Server 10.4 comes with old versions of Apache 1.3, MySQL and PHP already installed. If you choose to roll your own install from source, you won’t be able to use Apple’s built in management console for the new software you just installed.

Read more…