Monthly Archives: July 2011

Find all .htaccess files with a particular php configuration setting

After some testing on a server with a strange setup I needed to find all of the .htaccess files that might contain a particular php configuration directive. The pattern was unique enough that I would have probably just done a … Continue reading

Posted in Command Line, find, grep, Linux, Server Administration, Web Servers Tagged , , , , , ,

List installed packages with yum

How do I find out which packages are already installed with yum. The command you’re looking for is ‘yum list installed’ but you might want to combine it with grep or less because it’s most likely going to be a … Continue reading

Posted in Linux, Server Administration, Web Servers Tagged , , , , ,

Case Sensitive Comparisons in MySQL Where Clause

How can I make MySQL treat my query as case sensitive? As with all good tools there’s more than one way to get the job done. Assuming you have access to change the structure of the table you have to … Continue reading

Posted in Code Snippets, Database, MySQL, SQL Tagged , ,

Cannot load Zend Extension Manager – it was built with configuration 1.2.0, whereas running engine is API220090626,NTS

After upgrading to PHP 5.3.x I’m receiving an error 12345$ php -v Cannot load Zend Extension Manager     – it was built with configuration 1.2.0,     whereas running engine is API220090626,NTS    … This is because you have … Continue reading

Posted in languages, PHP, Server Administration, Web Servers Tagged , , , , , ,

How do I Tell What Version of Linux I’m Running?

How do I tell which version of Linux is on my server? There are a number of ways, there is a command line tool `lsb_release` used to check the distribution, and version 123456$ lsb_release -a LSB Version:    :core-x.x-ia32:core-x.x-noarch:graphics-x.x-ia32 Distributor … Continue reading

Posted in Linux, Server Administration, Web Servers Tagged , , , , ,

How do I Fix a Corrupt MySQL Table?

mysqldump Can’t open file: ‘tablename.MYD’. (errno: 145) This usually means the table has become corrupt. Most commonly this happens when the partition that contains your MySQL files is full, but I have had it happen at other times. Especially on … Continue reading

Posted in Database, MySQL, Server Administration Tagged , , , , ,

How to Clean Up a Mac File in VI with ^M Line Endings

Replacing ^M with new line in VI Have you ever edited a file in VI that was created with a Mac text editor only to find you have one very long line with ^M characters where you are expecting line … Continue reading

Posted in Command Line, Linux Tagged , , , , , ,

How do I find out what my IP address is?

Or what does my browser look like to the outside world? One of the problems with various kinds of network configurations and security is it might be a little hard to judge how your surfing looks to computers on the … Continue reading

Posted in Debugging Tagged , , , ,