Feb 13

Making the move from WordPressMU 2.x to 3.x isn’t all seamless. If after you upgrade all your uploaded images are broken download a broken image (because the webserver is actually serving an image, just your browser can’t read it). Open this image in notepad and you should see something like:

If you followed the upgrade instructions exactly you deleted the file /wp-content/blogs.php. Well thats a problem, in WordPress 3.0 they decided to move the function of /wp-content/blogs.php to /wp-includes/ms-files.php. Now if you have broken images and you still have blogs.php–it’s still a problem with your rewrite rules anyway because the old 2.x version of blogs.php isn’t going to work now that you have upgraded everything else to 3.x.

To fix this we need to update your rewrite rules in the .htaccess file
Find the line:

And replace it with:

It’s that simple, now to see it take effect you will need to clear your browser cache, use another browser, or force reload (Ctrl+F5 typically)

May 23
Cool function you can use on your local network to lookup a devices MAC address, (assuming the device is on your network).
For a big company, either look in the remote locations router, or your core router.  If you use this leave me a comment, would love to know how your using it.
// =============================================
// getmac(Device IP, Router, SNMP Read Community)
//  Michael Requeny — http://michael.requeny.com
// – Looks up remote devices MAC
// – SNMP to routers ARP table
// – Converts MAC from HEX to ASCII
// – Inserts : seperators
// =============================================
function getmac($ip, $router, $snmpread) {
$oid = “.1.3.6.1.2.1.3.1.1.2”;
$mac = snmprealwalk($router, $snmpread, $oid, 1000000 ,10);
// load up array keys for lookups
$keys = array_keys($mac);
foreach ($keys as $key) {
// if needle contains IP && needle = IP
// this prevents srch for 10.254.254.1 returning
// multiple values (like .1, .11, .111, etc.
if (strstr($key,$ip) == $ip) {
$mackey = $key;
}
}
$mac = trim(str_replace(‘Hex-STRING: ‘, ”, $mac));
$mac = str_replace(‘ ‘, ‘:’, $mac);
return $mac;
}