Archive for the 'Articles' Category
VMWare Workstation Install Fails on Windows 7
Are you having problems installing VMWare Workstation on a Windows 7 Host? If so, I found a very simple solution. I was getting the folloing error message during the installation process, ”The MSI fails … vmware-workstation.exe … “.
- 1) Double click on the installer, it will begin to copy some files to a directory called
vmware_******. Stop there, and don’t install or click on anything.
- 2) Go to the directory located at:
C:\Users\mylogin\AppData\Local\Temp\.
- 3) Make a duplicate or copy of the directory.
- 4) Cancel the instaler.
- 5) Return to the directory metioned in #2 and double click on “vmware workstation”.
- 6) Wait for the installation to complete.
VirtualBox (Linux): Change UUID or Copy a VDI image to obtain a new UUID
- Virtual Box UUID Error Message
- Change UUID: Copying a VDI file using your standard operating system copy commands will duplicate the internal UUID provided by the VirtualBox image. In order to solve this problem you must execute the command
setvdiuuid.
admin@server$ VBoxManage internalcommands setvdiuuid virtualdisk.vdi
- Copy VDI Image with a new UUID:
clonevdi makes sure that the new disk image will have its own unique UUID. admin@server$ VBoxManage clonevdi original.vdi new.vdi
WordPress’s Autosave feature is available for both Pages and Posts, and can be extreemly inconvenient when you are debugging your website. It can also create addtional loads on your server.
To disable this feature simply search your wordpress directory for: wp_enqueue_script('autosave')
Replace if with: // wp_enqueue_script('autosave')
Example: strposa ( string $haystack, array $needle [, int $offset = 0 ] )
This function searches a string for every element/value found in an array and returns the position of the first element/value found in the string. In technical terms, it searches for mutilple needles in a haystack and returns the position of the first occurance found in the string. Note: this function is case sensitive.
/**
* strposa ( string $haystack, array $needle [, int $offset = 0 ] )
*
* @param string $haystack
* @param mixed $needles - should be an array, but can be any
* string, int, or array
* @param integer $offset
* @return the position of the first items found in the array
*
* Original contibutions by:
* ==============================
* - Leonardo Martinez ( http://www.leonardomartinez.com/contact/ )
* - vbracco at gmail dot com
* - nathan at bitmesh dot com
* - dpharris at llu dot edu
*
* Description:
* ========================
* - searches for mutilple needles in a haystack and returns
* the position of the first occurance, case-sensitive.
* - finds the position of the first occurrence of array (needles)
* in the haystack string, case-sensitive.
* - if you are looking for more than one needle in the haystack,
* this function will replace php's strpos()
* - if you searching for the position of a single value, it is
* recommended that you use strpos().
*
*
* Notes:
* ====================================
* below are several functions that search for the position of a needle)
* ---------------------------------------------------------------------------
* strpos() - Returns the position of the first occurrence of a needle
* in the haystack string, case-sensitive.
* stripos() - Returns the position of the first occurrence of a needle
* in the haystack string, case-insensitive.
* strrpos() - Returns the position of the last occurrence of needle in
* the haystack string, case-sensitive. Note that the needle
* in this case can only be a single character in PHP 4. If a
* string is passed as the needle, then only the first character
* of that string will be used.
* strripos() - Returns the position of the last occurrence of needle in the
* haystack string, case-insensitive.
*
*/
function strposa( $haystack, $needles, $offset=0 ){
if (!is_array( $needles )) $needles = array( $needles );
$result = array();
foreach( $needles as $needle ){
if ( strpos( $haystack, $needle, $offset) !== false ) {
$result[] = strpos( $haystack, $needle, $offset);
}
}
if( empty( $result )) return false;
return min( $result );
}
$haystack = 'How much wood would a woodchuck chuck if a woodchuck could chuck wood';
$needles = array('woodchuck', 'wood', 'could', 'chuck');
$string = strposa( $haystack, $needles );
print_r($string);
/**
* the result will be 9,
* it found the word 'wood' first on the 9th element of the haystack.
* remember that it's really the 10th item on the list, but php starts with 0 (zero).
*/
This thumbnail gallery is provided to you for personal use. It was compiled for use with an API/Framework plugin I created called, Simple Wordpress Framework. It contains both 16 x 16 and 32 x 32 pixel images @ 32 bit colors. You can download a zip file with the complete collection, including the index.html, and php file that generates the webpage by clicking on the link below. I will try to add more icons every month.
Click here to download the zip file: Download
Tango Icon Theme 0.8.90
These icons were obtained by freedesktop.org an opensource solution for icons.
32, 16 Pixels (16bit Black/White)

Corporate, Operating System, Application and Other Misc. Icons
These icons were obtained from applications that reside on the desktop computer.
32, 16 Pixels (16bit Black/White)

If you want to test your sites in an environment that emulates the real thing then you need, what is called, Virtual Hosting. This article describes how to install and configure your Apache HTTP (web) server to work with more than one domain name. You’ll have to make changes to two different files: Apache’s httpd.conf and the Windows hosts file. This is very easy, but if you’ve never worked with Apache it can be a bit confusing.
Configuring the Windows XP hosts file:
In Windows XP you will find a directory called: C:\WINDOWS\system32\drivers\etc. In this directory is a file called hosts. You’ll need to edit hosts with notepad, or wordpad. Once inside it will look like this:
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
Add each domain name to the end of the hosts file, including localhost as demonstrated below
127.0.0.1 localhost
127.0.0.1 yourdomainname.com
127.0.0.1 www.yourdomainname.com
The IP Address 127.0.0.1. is a standard local IP address available in every computer, there’s no need for you to change it. Also in the first line you will notice that I added localhost. localhost was added because most WAMP (Windows Apache PHP MySQL) users use localhost to get to their WAMP administration files. Once we finsih making these changes, youre localhost connection will stop working if you don’t Add as many domain names as you would like.
Cofigure the Apache httpd.conf
You’ll have to locate your Apache http.conf file. It’s located inside your Apache folder under the conf directory. Mine is located at: C:\xampp\apache\conf. Edit this file and add the code below to the bottom of the file.
C:\xampp\apache\conf
# Use name-based virtual hosting.
NameVirtualHost *:80
<virtualhost *:80>
ServerName titanconcreteinc.com
DocumentRoot "C:\xampp\htdocs\titanconcreteinc.com\web\content"
</virtualhost>
<virtualhost *:80>
ServerName sophieandmollies.com
DocumentRoot "C:\xampp\htdocs\sophieandmollies.com\web\content"
</virtualhost>
<VirtualHost *:80>
DocumentRoot "C:\xampp\htdocs"
ServerName localhost
</VirtualHost>
You’ll have to modify both ServerName and DocumentRoot. ServerName will be the domain name of your website, and DocumentRoot will specify the location of your web files for that domain name. Make sure you change localhost to reflect the location of your default htdocs directory.