Linux: When your Network Interfaces Fail to Start

I got into a bit of unplanned primary research last night when the network interfaces on my new CentOS server started not, ummm, starting.  So I thought, "no biggie", and got to the Googling.  I tried "network interfaces not starting" and found the "network start" command which was illuminating but not helpful.  I watched the command window as it started, first, the "Ampache" interface, then the "Main" interface.  I also observed CentOS' nifty little network interface configuration app as the Ampache interface went active, and then inactive after just a few seconds.  I had my first clue.

Tags: 

JavaScript: Masking eMail Addresses

Spammers are evil people with crafty tools. Their nefarious 'bots are constantly spidering the web, looking for injudiciously displayed email addresses. Post your email address on a board on one day, you can count on 200 offers for cut rate "\/!agra" the next. What is the conscientious web master to do?!?

Tags: 

PHP: Offline Downloads

It is not uncommon to want your site users to be able to download files, but only the specific ones you want them to. To make this possible, you need to store the files somewhere offline, where there isn't a direct URL to them, and you have to be able to insert security. There are, I've found, about a jillion ways to skin this cat, but this one worked for me.

Tags: 

JavaScript: Parsing URL parameters

Here's a nifty little JavaScript function that will read the URL of the the current page and return the value of a requested parameter:

Tags: 

PHP: Error Logging

Here's a little bit of code I put together to handle error logging in PHP.

First, I set a couple variables for global use. I put these at the top of a common include file, or some other page that will be included anywhere the function might be called:

Tags: 

Pages

Subscribe to ExcellentCruft RSS