erichynds

Welcome to my online development portfolio and blog. I'm Eric Hynds, a 23 year old website developer living outside of Boston, Massachusetts, and I'm passionate about developing functional, standard-compliant, and user-friendly websites.

Archive for the ‘Ubuntu/Linux’ Category

Automatically crawl a website looking for errors

Thursday, October 8th, 2009

For all you Linux/Mac folks out there, one useful way to crawl your website looking for errors (web server or server-side; any kind of error that would appear in your log files) is to use the terminal. Start by ensuring your log levels are set correctly for whatever you want to catch; if you’re using Apache set the right LogLevel, if you want to catch PHP errors check your error_log and error_reporting variables, etc. You’ll also want to backup and clear your existing log files to keep this cleaner.

Next, open up your terminal and issue this command:

wget -r --level=10 --delete-after -nd http://www.mydomain.com/

wget will crawl through the site and retrieve just about everything 10 levels deep (change --level=10 to however many levels you want). -r searches recursively, --delete-after deletes the wget’d files right after downloading them, and -nd prevents wget from creating directories locally.

Once done, check your log files and see what it found. If you’re impatient like me, you can tail -f your log files on the server to stream new data.

Computer Janitor corrupting AIR installs on Ubuntu 8.04

Friday, September 18th, 2009

This is one of those things that took far too long to figure out so I figure I’d save some people the headache. Running computer janitor on Ubuntu 8.04 will remove AIR (v. 1.5 at the time of this writing) if you have it installed, but you cannot simply reinstall the AIR package. You might get something like “Error 1″ or “An error occurred while installing Adobe AIR. Installation may not be allowed by your administrator. Please contact your administrator.”

The reason is because computer janitor removes the adobeair package while corrupting the adobe-certs package. Run the commands below to fix, but as a disclaimer, my ~/.appdata and ~/.adobe directories had nothing important in them. I’m not sure if AIR holds application data in either, so you might want to back it up first.

  1. Open synaptic package manager and remove the adobeair and adobe-certs packages if they exist.
  2. Delete anything to do with AIR: sudo rm -rf /opt/Adobe\ AIR/ /var/opt/Adobe\ AIR/ ~/.adobe/ ~/.appdata/
  3. At this point you can do a sudo dpkg -l | grep "Adobe" and if you still see the adobe-certs package, run sudo dpkg --purge adobe-certs
  4. Close your browser and sudo ./AdobeAIRInstaller.bin to reinstall.