October 23rd, 2007
I was trying to add PHP Zip support on my cPanel server today and when Apache went to restart, it failed with the folowing error:
Cannot load /usr/local/apache/libexec/mod_bwlimited.so into server: /usr/local/apache/libexec/mod_bwlimited.so: cannot open shared object file: No such file or directory
After a Google search, I found that I needed to run:
cd /usr/local/cpanel/apache
/usr/local/apache/bin/apxs -iac mod_auth_passthrough.c
/usr/local/apache/bin/apxs -iac mod_bwlimited.c
/usr/local/apache/bin/apxs -iac mod_log_bytes.c
I was able to start Apache afterwards and everything is back to normal…
October 19th, 2007
While developing a recent project at work, I had the need to display a modal dialog. I started using jQuery recently and so I started by looking for a jQuery modal dialog plugin.
I did find a couple of existing ones (jqModal and BlockUI), but neither did exactly what I was looking for. So…I decided to take a crack at writing my first jQuery plugin.
It has been a great learning experience and has caused me to become an even bigger fan of jQuery. I’ve used a few other JavaScript libraries (MooTools, Prototype, etc), but jQuery is something special.
So, if you have a need for a modal dialog…be sure to check out SimpleModal.
View Demo
October 9th, 2007
I’ve been playing with configuring WordPress (WP) for this site. After doing some research, I had a plan for how I wanted it to work. Basically, I wanted to use WP to manage my site (like a CMS) as well as for a blog.
After a lot of trial and error, I think I’ve achieved the effect I was looking for. I installed WordPress in the /blog directory. Copied the index.php and .htaccess file into / and edited index.php:
require('blog/wp-blog-header.php');
In wp-admin, under Options > General, I changed “WordPress address (URL)” to http://www.ericmmartin.com/blog and “Blog address (URL)” to http://www.ericmmartin.com. I then created 2 pages, one called Home and one called Blog. Lastly, under Options > Reading, I set the Front Page option to “A static page (select below)” and Home for the Front page and Blog for the Posts page.
Currently, I’ve installed the WP-Syntax, Akismet, Add Your Own Headers and Exec-PHP plugins.
The rest is still a work in progress, but so far, I’m happy with WordPress!
September 15th, 2007
Even with the volume turned off, if your PC has a system speaker, it can still emit a loud system beep. I was running some MySQL statements from the command line and every time there was an error…BEEP.
To fix this, I could simply run the MySQL commands with the -b, –no-beep option, which turns off the beep on errors.
But, I’m lazy and don’t want to type -b every time I run a MySQL command. Plus, there are other instances where the system beep can be triggered, and I just don’t want to hear it! So, I used this solution…and it didn’t require a reboot!
In summary:
1. Right-click on My Computer
2. On the Hardware tab, click on [Device Manager]
3. On the “View” menu, select “Show hidden devices”
4. Under “Non-Plug and Play Drivers”, right-click “Beep”
5. Click “Disable”
6. Answer [Yes] when asked if you really want to disable it
7. Answer [No] when asked if you want to reboot
8. Right-click “Beep” again.
9. Click “Properties”
10. On the “Driver” tab, set the Startup type to Disabled
11. Click [Stop]
12. Click [OK]
13. Answer [No] when asked if you want to reboot
September 9th, 2007
When I changed jobs, my commute changed from mostly surface streets to mostly highway. I-80 is notoriously congested and I wanted to strategically plan my commute to avoid as much traffic as possible.
I started by watching traffic online and then found Traffic.com, where I could create custom drives and receive alerts, etc. Pretty cool…but I wanted a way to SEE traffic trends, so I designed a way to get data from Traffic.com and to then display that data in a graph.
Traffic.com offers a RSS feed, so my plan was to use data from that feed to generate the graphs. So, I signed up at Traffic.com and created two custom drives; “Home to Work” and “Work to Home”. Next I created a database and tables to hold the data:
Read the rest of this entry »
September 2nd, 2007
I stumbled upon a PHP framework called Kohana, which is based on CodeIgniter. I’ve used CI a bit in the past and thought I’d give Kohana a whirl. I downloaded the latest code and tried to run it on a Windows XP machine.
Well, when I brought up the site, I got an error:
Fatal error: Unable to locate the requested file, log.php in <system_path>/system/core/Kohana.php on line 408
After a lot of digging, I found that there was a glob() call that was not behaving correctly. I narrowed it down to what I believe to be a bug in PHP with the glob() function, using the GLOB_BRACE flag, and using a pattern that includes a colon (as in {c:/firstFolderToCheck,c:/secondFolderToCheck}).
Assuming it turns out to be valid, I’m surprised that it hasn’t been found/reported before…
September 1st, 2007
I’ve decided to take another shot at updating my site and starting a blog…
I’ve chosen WordPress and while I’m trying to create/find a design, I’m just going to use this “default” theme.
This site will mostly be used as a place to store code I’m writing/testing, but I’ll also be adding various anecdotes about work, family, technology, etc…