Monthly Archives: June 2014

Permission denied error dealing with Classic ASP loadpicture

To solve the following error, which is generated by the loadpicture object

Microsoft VBScript runtime error ‘800a0046’
Permission denied: ‘loadpicture’

set myImg = loadpicture(“C:\aaa\asdf.jpg”)

==

The solution is to simply add this permission as full control

servername\IUSR

to the directory in which this object is going to work…

Quick change of Hyper-V UID – for Register in place VM

If you want to quickly create copies of one Hyper-V Virtual Machine, here is an easy process:

1) change the XML UID by editing the XML file within the Exported VM directory.
2) change the name to the new machine name (this is the XXXXX tag)
3) change the global_id
4) change the logical_id (to the new global ID)
5) save the file
6) rename the XML file to match the global ID
7) import – register in place (use the existing unique ID)
8) adjust any settings on the VM
9) start the VM

Inconsistent ping / inconsistent network connectivity on Hyper-V virtual machine

I recently came across this issue on one of my virtual server machines, where I just setup a brand new Windows Server W2K12R2 Update 1 virtual machine. It is currently in DHCP status soon to be set as a static IP.

With the client VM machine running (and while multiple other VM’s are running w/o any problems), I was experiencing the following:
1) inconsistent ping of the VM
2) inability to remote desktop into the machine (sometimes I could connect, sometimes I would not be able to)
3) DNS resolution issues with that VM

Here is my setup:
Windows Server 2012 R2, Update 1. Hyper-V 6.3.9600.xxxxx
Client: Windows Server 2012, R2, Update 1. Standard Server. Virtual Machine version 5, generation 2.

Network: High quality CAT6/Gigabit setup.

Here is what it looks like when I do a continuous ping of the virtual machine:

pings

After doing a LOT of troubleshooting / testing / trial & error, here is the fix:

This new VM has a “DYNAMIC” MAC address.  All the other VM clients on that server have STATIC MAC addresses.

I shut down the VM, adjusted the network settings (under ADVANCED) to a STATIC MAC.

Start the VM.

Login (via remote desktop while sitting on the Hyper-V server itself)

Do a continuous ping, and the issue is fixed!

Next, via Remote desktop into the hyper-v server and controlling the machine that way (not remote desktop connecting into the VM itself…) I switched the machine to a static IP, which was different than the DHCP assigned one.

Reboot machine (for the heck of it)

on my desktop, IPCONFIG /FLUSHDNS

(at this point depending on how your network is configured you may need to wait a bit for the DNS changes (IP change) to catch up so that your ping works…)

then try pinging the IP address (not machine name):  Works

try pinging the machine name: Works  (see above, you may need to wait a bit for your network to catch the DNS changes)

=

The above fix (changing to Static IP) alleviates the need to fiddle with the VM’s Hardware Acceleration settings, such as VMQ (Virtual Machine Queue) or the Enable IPsec task offloading.  On my Hyper-V server both of these are “CHECKED/ON”.

 

MYSQL import fails with “ERROR 2006 (HY000) at line 44: MySQL server has gone away”

Recently I was attempting to import a large (136mb) SQL backup for a new client.

I first created a database and db user in PHPMYADMIN (most current version).

Then using my Windows workstation, I launched MySQL Workbench 6.1 (my favorite tool for importing/exporting) and tried to do a Server–>Data Import.

Pointed it to the 136mb file and first had a problem:

17:45:03 Restoring Z:\whateverdatabase.sql Running: mysql.exe --defaults-file="c:\users\aaa\appdata\local\temp\tmp8pbfwe.cnf"  --host=192.168.x.x --user=root --port=3306 --default-character-set=utf8 --comments --database=btb-old < "Z:\\whateverdatabase.sql" ERROR 2006 (HY000) at line 44: MySQL server has gone away
Operation failed with exitcode 1
17:45:04 Import of Z:\whateverdatabase.sql has finished with 1 errors

Want an easy solution for this?  It turns out there is a limit in the MySQL database for the size of imports…

Run this SQL statement against the MySQL database:

SET GLOBAL max_allowed_packet=250x1024x1024;

In my case, I picked a size (250mb) (above) that is larger than my SQL import.

Execute that script.

Re-run the import.  Works perfectly!

17:47:42 Restoring Z:\whateverdatabase.sql
Running: mysql.exe --defaults-file="c:\users\aaa\appdata\local\temp\tmpwpesfe.cnf"  --host=192.168.x.x --user=root --port=3306 --default-character-set=utf8 --comments --database=btb-old < "Z:\\whateverdatabase.sql"
17:50:18 Import of Z:\whateverdatabase.sql has finished

 

 

 

iPhone iPad Find My Friends ME photo picture is missing

Are you having an issue with the FIND MY FRIENDS app not showing your photo?

I am on IOS 7.x and have this problem on two phones.  This is how I solved this issue.

Here are several steps to remedy this:

  1. under Settings->Mail, Contacts, Calendars go to “My Info” (near the bottom) and select a contact you’ve created for yourself under CONTACTS.  If you don’t have a contact, create one.  Take a pic and assign it to the contact.  This probably won’t be the pic that will be used in the FIND MY FRIENDS, but put one there anyway
  2. Go to settings, then select General, select Siri, then click on “my info” and choose yourself from the contact’s list
  3. This should be the final fix.  Go to settings>Facebook and delete the account info (no need to delete app) then sign in again and verify and when you log in to find my friends your face book profile picture should be there. Make sure you’ve selected your info in settings so your own contact shows “me”.
  4. Quit out of all apps, launch FIND MY FRIENDS and see if your picture shows up.

The above solution fixed two of my iPhones which are on IOS 7.X