MOTOROLA RAZR AND 406 NOT ACCEPTABLE
In trying to get a site working on cell phones, I got a “406 Not acceptable” only on the Motorola RAZR. The site loaded fine on my Treo 755 and every Blackberry I’ve tried. It seems that the RAZR doesn’t handle Multiviews very well, or at all for that matter. If you’re using Multiviews and Apache, you’ll have to specify the full URL: so /login.php rather just...
COMPILING IMAGEMAGICK ON MACOS X - NOT FINDING LIBJPEG
I ran into an issue trying to get Imagemagick (convert) working on OSX last night. I had compiled libjpeg and installed it, but when I would compile convert, it would not have jpeg support. I found this post on dzone, which I followed and was able to use libjpeg just fine. tar zxvf jpegsrc.v6b.tar.gz cd jpeg-6b cp /usr/share/libtool/config.sub . cp /usr/share/libtool/config.guess . ./configure...
REPLICATION ISSUES - DUPLICATE KEY ERRORS (1062)
We were using replication to deal with certain queries that were producing table scans. I realize this is not a great long term solution but we were migrating a web site that was set up this way, so it wasn’t really a choice. We had a database that was a mix of InnoDB and a few MyISAM tables. The MyISAM tables were used for fulltext searches. To get a database dump, we were using the command...
'PHP 4: SESSION_START(): FAILED TO INITIALIZE STORAGE MODULE'
I’m migrating a PHP 4 site right now. It makes me realize how far PHP has come in the last few years. I ran across a weird bug where code was working on our dev server, but not production. I was getting the error: session_start(): Failed to initialize storage module We’re using memcache to store our sessions, so it’s a user storage module. Luckily, I stumbled across this helpful...
CHECKING MYSQL QUERY CACHE
MySQL query cache can be useful, if it works. Here’s how to check it’s effectiveness. show status like 'qc%'; +-------------------------+----------+ | Variable_name | Value | +-------------------------+----------+ | Qcache_free_blocks | 6407 | | Qcache_free_memory | 24176544 | | Qcache_hits | 3075026 | | Qcache_inserts | 2435740 | | Qcache_lowmem_prunes | 363018 | | Qcache_not_cached |...
STOP TRYING TO BE CLEVER
I’ll keep this short. Please, stop trying to be clever. I’m talking to you, mediocre developer. I realized you think it’s awesome to use a different file extension, like .awesome. It’s not. You’re really not accomplishing anything. If your excuse if that you don’t want people to realize you’re using PHP, have the sense to disable the server signature in...
GOOGLE ADS ARE STILL RIDICULOUS
I love Google ads. They always entertain me. I found this one on my friend’s MySpace profile.
EXPERTS EXCHANGE SHOULD BE REMOVED FROM GOOGLE SEARCH RESULTS
I was trying to figure out how to extend my wireless network down a few floors a few days ago, and one of my queries brought me to experts exchange. The question looked useful: Using Linksys WAP54G as Wireless Repeater. This is exactly what I wanted to do. However, once I actually scrolled down to view the answers, I saw this I thought this was pretty weird, since I was pretty sure in the snippet...
'PHP: SETTING UP XDEBUG WITH KCACHEGRIND'
KCacheGrind is a very useful tool to identify bottlenecks in your applications. This will explain the steps to using it to find issues with your PHP scripts. For me, the scripts are all web pages. I’m already assuming you’re running a current version of PHP. I did this using PHP 5.2.1. These instructions are based on a Unix/Linux server, if you’re running Windows I can’t...
APACHE COMPILE ERROR
I got this while recompiling apache (2.2.4). configure: error: Cannot use an external APR-util with the bundled APR After searching around for a while, I found a tip here to include this in my configure: --with-included-apr Built on MacOS X 10.4.