Friday, December 13, 2013

MySQL Stop PHP Script due to Column Not Exist


Few days ago I ported a php web application from a linux to a Windows based server. During testing, the script stop when a new item supposed to be added into the database.

I started to troubleshoot with the nginx and php, but no luck. I also tried replaced nginx with apache also no luck. After a series of testing, I noticed it is related to MySQL.

It is because, by default, on a linux MySQL, the SQL model is not set to "STRICT_TRANS_TABLES" which caused the process will stop when MySQL server cannot find the specified column in table.

Of course, the correct way to fix the issue permanently is to check the php script line-by-line to ensure no such error. However, the quick fix is to remove the "STRICT_TRANS_TABLES" in MySQL setting file: my.ini.

I searched all over google to with these keywords but no luck for 2 days: php script hang or stop, apache vs nginx php script hang or stop, php setting ignore error, apache setting ignore error, MySQL ignore error

:: aerobrainTech ::

Thursday, October 10, 2013

Windows 8 Black Screen Issue - Avast Setting

I notice that my Windows 8 often goes black screen after logon. I found out that it ties to the Avast! Antivirus trying to block some behavior.

Below are solutions that I tried and it works:

1. Add the following files as trusted application in the Behavior Shield Setting:
C:\Windows\explorer.exe
C:\Windows\ImmersiveControlPanel\SystemSettings.exe 

2. Go to Behavior Shield Setting and Uncheck "Monitor the system for unauthorized modifications"

It works for me.. maybe you can try and leave a comment.

:: aerobrainTech ::

Tuesday, July 30, 2013

Change MAC Address in Windows

MAC-Address is the hardware Network Address for the NIC which is unique for the system. However, there may be time when you need to change the MAC-Address for administrative purpose on a network. Some of the device drivers come with an option to change it from the device properties but not all (like my Broadcom Gigabit Ethernet Driver). For those who do not have the luxury of changing the MAC-Address from the device properties there is a way to do this by editing the Windows Registry.

To change MAC-Address for a Network card in Windows Registry:

1. Click Start – Run, type “regedit”

2. Navigate to

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318]

HKEY_LOCAL_MACHINE
\SYSTEM
\CurrentControlSet
\Control
\Class
\{4D36E972-E325-11CE-BFC1-08002BE10318}

3. Under this key, you shoud see numbers in sequence as “0000″, “0001″ and so on. Click on one at a time to check the description of the device to match it with that of your Network Card. In my case (0001)



4. Once found, in the right-pane, look for “NetworkAddress” key value. If you find it, right-click and select modify. Enter the desired MAC-Address as a 12 digit number (all in one, no “space” “.” or “-”)

5. If you don’t find the key, right-click in the rightpane, select “New” – “String Value”. Enter the name as “NetworkAddress”. Now modify and set the desired value.

6. Now, disable and enable the Network card from the ControlPanel – Network Connections.

This should reflect the new MAC-Address on your NIC. Should you choose to go back to the original manufacturer set MAC-Address simply delete the key you just created/modified in the Windows Registry.



You can also use a tool like Technitium MAC Address Changer to change the MAC-Address of your NIC

source: http://www.windowsreference.com/networking/how-to-change-mac-address-in-windows-registry/

:: aerobraintech ::

Friday, May 3, 2013

Get 20GB Dropbox Storage At Below $10

Do you know that the cheapest way to get more free storage at Dropbox is by paying Google (AdWords) some money and let Google do the job for you?

Before we begin, do you know that Dropbox give you extra 500MB of storage for every referral that you recommend to sign-up and install Dropbox Application? By taking advantage of this feature, we pay Google (through AdWords) to find some referrals for us.

Wednesday, May 1, 2013

Photoshop: Automate Save As JPEG


Since I was doing lots of photo editing these few weeks, I found out that Save As JPEG in Photoshop taking too much time. At first I was trying to use the Photoshop Action to automate the Save As process, but Photoshop Action does not support Save As with the current filename. Instead, it always save on a fixed filename that you use during the Action recording.

After a quick research, I remembered that a third party freeware called AutoHotkey that could help me to automate the Save As process. The problem with the Save As process is you need to select JPEG and there is another dialog box for the JPEG Quality Settings. By using AutoHotkey, I have been able with a single click to do all this selection.

Below is my AutoHotkey Script:

Sunday, March 31, 2013

Free Unlimited Web Hosting Comparison


Surprisingly there are web hosting providing unlimited (almost unlimited) resource. Here are 3 web hosting that provided you 100% free to build your own website. These are good enough if you want to experiment your new website or blog. Even if you want to run a full working non-profit/profitable website also possible with these web hosting.

HourB vs Powrhost vs freehost.im

Hope this helps!

:: aerobrainTech ::



Host
Resource | Package
Free
Hosting
Freemium
Unlimited
Hosting
No Text
Ad
Disk Space MB
Unlimited
Unlimited
10,000
10,000
Bandwidth MB
Unlimited
Unlimited
100,000
100,000
Max E-mail Accounts
Unlimited
Unlimited
5
5
Max Databases
Unlimited
Unlimited
5
5
MySQL Connection Hourly Limit
25,000
50,000
25,000
25,000
Max Daily Unique Visitors
2,000
10,000
10,000
10,000
Mailbox Size Limit
Unlimited
Unlimited
50
50
Max Subdomains
Unlimited
Unlimited
5
5
Max Parked Domains
Unlimited
Unlimited
5
5
Cost per Year
FREE!
FREE!
FREE!
 USD   12.00

















Host
Resource | Package
Starter
Premium
Super
Premium
Disk Space MB
Unlimited
Unlimited
Unlimited
Bandwidth MB
Unlimited
Unlimited
Unlimited
Max E-mail Accounts
Unlimited
Unlimited
Unlimited
Max Databases
Unlimited
Unlimited
Unlimited
MySQL Connection Hourly Limit
3,500
30,000
100,000
Max Daily Unique Visitors
2,000
10,000
30,000
Mailbox Size Limit



Max Subdomains



Max Parked Domains
Unlimited
Unlimited
Unlimited
Cost per Year
FREE!
 USD  1.99
 USD              4.99