Skip to content

The Code Cave

Menu
  • PHP
  • WordPress
  • MySQL
  • LINUX
    • Bash
  • Plugins
    • SCuD – The ShortCode Disabler
    • Smart Passworded Pages Plugin
    • Per Page Sidebars
    • Word Filter Plus
    • Spam Catharsis
    • Donate
  • Scripts
    • Google Talk Notifications
  • Random thoughts

HOW TO: In PHP the MySQL Client API version doesn’t match the MySQL Server version

By Brian February 21, 2012 LINUX, MySQL 4 Comments
This is a fairly common situation. The short answer is that you usually don’t need to fix anything. This is a non-issue.  As long as your MySQL and MySQL Client have the same major version, you can and probably should just...
[Continue reading...]

How to: Install MemCached on CentOS / Redhat using yum

By Brian February 2, 2012 Random thoughts 4 Comments
Installing memcached on a server for use with W3Total cache can seem daunting if you haven’t done it before.  Once you’ve done it enough to work out a method and know the speed bumps you can come across,  you can  ...
[Continue reading...]

How to: Refresh your WordPress page unless a comment is being typed

By Brian February 1, 2012 Random thoughts 4 Comments
A customer wanted a piece of code that allowed a page to be refreshed once the client has remained on the page after a certain amount of time. They’d used a refresh command previously, but the problem was that this interrupted...
[Continue reading...]

Fixing mysqldump: Got error: 1016: Can’t open file & mysqldump: Got error: 23

By Brian January 25, 2012 Random thoughts 6 Comments
When doing exports of large databases using mysqldump, it is common to get errors that are along the lines of: mysqldump: Got error: 1016: Can’t open file: ‘./databasename/tablename.frm’ (errno: 24) when using LOCK TABLES or maybe mysqldump: Got error: 23: Out...
[Continue reading...]

Notty Notty! re:”All my Server CPU is used by root@notty!! Have I been hacked?”

By Brian January 24, 2012 Random thoughts 2 Comments
First – Breathe.  “notty” stands for “no teletypewriter”. Programs that connect to the server but don’t want the output displayed any where use a “No TTY” connection. So if you see “ssh: *@notty” on a task list somewhere, it just means...
[Continue reading...]

How to Add a TXT record to your 1and1 domain & How to use external DNS for a 1and1 hosted site.

By Brian January 13, 2012 Random thoughts 9 Comments
Unfortunately there are lots of registrars that don’t allow you full access to your DNS settings.  1and1.com is one of these. If you host your site with 1and1.com and you want to add a TXT record to your domain for verification...
[Continue reading...]

Generating random names in MySQL

By Brian October 6, 2011 Random thoughts 19 Comments
I’ve improved my earlier random string generation procedures to better suit my needs. So I created a Random Name Generator for MySQL. I’ve created two new procedures. They pick from the 100 most popular first names (well actually the 50 most...
[Continue reading...]

How do I create a random string in MySQL?

By Brian October 5, 2011 Random thoughts 1 Comment
There are lots of quick and dirty ways to create a random strings in mysql. If you want letters and numbers, just do this: SELECT LOWER( SUBSTRING( md5( RAND( 4 ) ) , FLOOR ( 7 + ( RAND( ) *...
[Continue reading...]

How do you delete all tables in a database in MySQL?

By Brian June 8, 2011 MySQL 0 Comments
Sometimes you just have to start over.  I had a database that had a bunch of tables in it, almost 9000. The problem was that I didn’t know if they were the right tables.  I had a mysqldump files that did...
[Continue reading...]

Find what week of the month a date is in PHP

By Brian June 1, 2011 PHP 5 Comments
{EAV_BLOG_VER:cf05756ccfd5297d} The need for this routine comes up every now and then and it confuses people because they thing date(“W”) will do the trick. Once they realize that’s the week of the year, they start to get all elaborate in finding...
[Continue reading...]

Posts navigation

1 2 3 4 5 … 41

Recently added to the Cave

  • Helpful Gutenberg Articles
  • Count Down Closing Timer and dealing with DST in JavaScript
  • Every chmod permission converted from numeric & displayed in ls style
  • How to create a WordPress compatible slug in MySQL
  • Help Me with Discussing Banner Sizes for Responsive Sites
  • How do you split a text field/textarea by line breaks?
  • WordPress and NotePad++
  • How to find Joomla WordPress or Drupal version from Linux CLI
  • What does “Is this ok [y/d/N]:” mean?
  • Advanced Google Search Operators

Recent Posts

  • Helpful Gutenberg Articles
  • Count Down Closing Timer and dealing with DST in JavaScript
  • Every chmod permission converted from numeric & displayed in ls style
  • How to create a WordPress compatible slug in MySQL
  • Help Me with Discussing Banner Sizes for Responsive Sites
  • How do you split a text field/textarea by line breaks?
  • WordPress and NotePad++
  • How to find Joomla WordPress or Drupal version from Linux CLI
  • What does “Is this ok [y/d/N]:” mean?
  • Advanced Google Search Operators

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Archives

  • January 2019
  • December 2017
  • March 2016
  • December 2015
  • September 2015
  • June 2015
  • November 2014
  • September 2014
  • August 2014
  • January 2014
  • October 2013
  • February 2013
  • May 2012
  • April 2012
  • February 2012
  • January 2012
  • October 2011
  • June 2011
  • April 2011
  • March 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010
  • August 2010
  • June 2010
  • February 2010
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • March 2008
  • February 2008
  • January 2008
  • November 2007
  • October 2007
  • August 2007
  • July 2007
  • June 2007
  • May 2007
  • April 2007
  • March 2007
  • February 2007
  • January 2007
  • December 2006
  • November 2006
  • October 2006
  • September 2006
  • August 2006
  • July 2006
  • June 2006
  • May 2006
  • April 2006
  • March 2006
  • February 2006
The Code Cave Copyright © 2025.
Back to Top ↑