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 –enable-shared –enable-static make sudo make install sudo ranlib /usr/local/lib/libjpeg.
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 mysqldump –all-databases –single-transaction –master-data=1 > dumpfile.
'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 post. [edit: I only checked the page on our production box directly (not going through the load balancer) after I made this change, so it seemed to fix the problem, but the issue was really caused by the fact that I wasn’t defining the custom session handler when it was hit by the LB]
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 | 157193 | | Qcache_queries_in_cache | 16022 | | Qcache_total_blocks | 39912 | +————————-+———-+ You can see here that we have 24Megs of unused query cache.
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 apache, because anyone that’s actually trying to hack your machine is going to check that.
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 I saw on Google’s results they had part of the solution I was looking for.
'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 help you. **Step 1: Install XDebug.
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.
WE'RE HIRING
My company, Demand Media, has 10 spots for .NET web developers. If you’re good, and interested in a job in Santa Monica, hit me up. jon AT letsgetnuts dot com.