Magento Integrity Constraint Violation: 1062 Duplicate entry Error Fix

I received this error when I moved magneto installation from one server to another. After applying migration steps below I received this error.

  • Copy all root folders files.
  • Backup/Restore database.
  • Updated database credentials in local.xml file.
  • Updated new domain base urls in core_config_data table.

If website show above error or redirect to old domain run the following query in phpmyadmin. Be careful. Make sure you are running query in correct database.

TRUNCATE dataflow_batch_export;
TRUNCATE dataflow_batch_import;
TRUNCATE log_customer;
TRUNCATE log_quote;
TRUNCATE log_summary;
TRUNCATE log_summary_type;
TRUNCATE log_url;
TRUNCATE log_url_info;
TRUNCATE log_visitor;
TRUNCATE log_visitor_info;
TRUNCATE log_visitor_online;
TRUNCATE report_event;

Windows 8 Adobe Reader Crash Issue Fix

Since I bought new windows 8 laptop I am fighting with adobe reader crash issue. However windows 8 adobe reader metro application works fine but most of time it is worthless as you won’t like to switch from desktop to metro application mode every time. Desktop adobe reader version is more useful. Uninstalling and installing adobe reader could not fix issue. It was quite frustrating. Here is simple working solution to fix this issue.

Following below steps:

1. Go to adobe reader installation folder. Default location is C:\Program Files (x86)\Adobe\Reader 11.0\Reader. If installation folder is different in your case please open that folder.

2. Run Eula.exe file. Use double click or select and press enter key to run file.

3. In the next window Accept the license agreement. It will close window automatically and issue should resolve post this point.

4. Now open adobe reader by clicking on desktop icon.

How to Change PHP Setting Using PHP.INI in GoDaddy Shared Hosting

At some point of time you may want to change PHP Settings in GoDaddy shared hosting account. Most of time we need to increase memory limit, max upload size and max input size limit because by default these settings are extremely low. GoDaddy keeps master PHP.INI file in /web/conf/ folder which we are not allow to edit. But there is an alternative way to override Godaddy default php settings per account. GoDaddy allow to place our own PHP.INI settings file on per account basis which is effective to that account only.

How To Change

1. Download PHP.INI file from your godaddy account root folder. If file does not exist create your own file.

2. Create PHP.INI for php 4 and PHP5.INI file for PHP5. Default Godaddy PHP.INI file contain following content.

register_globals = off
allow_url_fopen = off
memory_limit = 128M
max_execution_time = 120

expose_php = Off
max_input_time = 120
variables_order = "EGPCS"
extension_dir = ./
upload_tmp_dir = /tmp
precision = 12
SMTP = relay-hosting.secureserver.net
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="

; Only uncomment zend optimizer lines if your application requires Zend Optimizer support

;[Zend]
;zend_optimizer.optimization_level=15
;zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3
;zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3
;zend_extension=/usr/local/Zend/lib/Optimizer-3.3.3/ZendExtensionManager.so
;zend_extension_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3/ZendExtensionManager_TS.so

; -- Be very careful to not to disable a function which might be needed!
; -- Uncomment the following lines to increase the security of your PHP site.

;disable_functions = "highlight_file,ini_alter,ini_restore,openlog,passthru,
;		      phpinfo, exec, system, dl, fsockopen, set_time_limit,
;                     popen, proc_open, proc_nice,shell_exec,show_source,symlink"

3. You can add following setting as well.

display_errors = Off ; -- php display error on/off
log_errors = On ; -- log php error on/off
error_log = [path to your error log file] ;-- change error log file path.

4. Upload changed PHP ini file to your root folder.

5. Now it is time to reload Apache to take change effect. Login to your GoDaddy account. Launch web hosting control panel. Go to Options & Settings -> Stats & Monitors -> System Processes ->

godaddy-apache-web-services

6. You will see list of web services running under your account. Select all web services and click End Web button. This step will terminate apache web service and will reload automatically when you browse your website in browser.

7. Run Phpinfo to see changes taken effect.

Apache Service Terminated With Service-Specific Error 1 (0×1)

After a long run Apache on my machine suddenly stopped working. I tried everything including removing recently added virtual hosts but nothing worked. I also restored original http conf file but there was no luck. It was hard to guess what is actual issue because service log message was not very much clear enough. I did following steps to figure out exact cause and resolution. I hope this will help readers.

1. Open command prompt and go to Apache bin directory. In my case it was D:\www\Apache22\bin\

2. Run httpd.exe by typing in the command prompt.

run-apache-from-command-prompt

3. Here you will see exact error message. See screenshot above.

4. According to error message It is clear that some application captured port 80 on which Apache is running.

5. Now it is time to find out which application it is. Run following command  netstat -ano in the command prompt to see list of application running on port 80.

netstat-ano-command

6. As you can see one service running with PID 4 on port 80. This could be different for different people. Skype also run on port 80 sometimes depend on configuration. So for some people it can be resolve just by configuring Skype on different port. But for me this was not the case.

7. Process ID 4 belongs to IIS Web Deployment Agent Service usually only start if web matrix installed on system. So for my case I disabled this service as i rarely use web matrix.

8.  To disable this service Go to Control Panel -> Administrative Tools -> Services -> Web Deployment Agent Service  and disable the service. Exit then Start Apache.

web-deployment-agent-service

Apache should start now. You may try the following trick if Apache still fails to start and port 80 not captured by PID 4.

1. Exit from skype and try restarting Apache. If it works then configure Skype on different port. Go to Tools -> Options -> Advanced -> Connection. then un-check “Use port 80 and 443 as alternatives for incoming connections”.

2. Check virtual host defined in virtual host file. Log folder defined in the virtual host must be exist. If not Apache will throw this error.

 

 

 

 

Digsby Yahoo Messanger Authentication Error Fix

If you are facing same issue then you might came to right place. After applying several method including password change, server name and connection method i finally got right fix for the issue.

digsby

 

Yahoo has changed server name. It seems Digsby people not maintaining updates regularly. Digsby default Yahoo server no longer working. My problem was solved by just changing Yahoo server.  To fix the issue simple replace default Yahoo server with new Yahoo server.

Default Digsby Yahoo IM Server:  scs.msg.yahoo.com
New Yahoo IM Server:  cs213p3.msg.ac4.yahoo.com

Hope this help!

 

 

How to Debug Web Page in Opera Browser

Latest version of Opera browser comes with inbuilt developer tools called Dragonfly similar to Internet Explorer. Dragonfly is fully featured tool equipped with all necessary tool require to debug a web page. Web page debugging was nightmare in the earlier version of Opera. It is an alternative of FireBug for Firefox and Chrome. More is that it is built-in tool so you don’t need to install it separately.

opera-dragonflyIt load DOM and you can change element values if needed. Other features are network traffic monitor, searching and ability, java script debugging, error logging, profiler, console, utility and remote debugging. Remote debugging feature allow developers to connect with dragonfly from remote devices. Utility tools allow you to take screenshot of web page.

Dragonfly Shortcut

  • Menu Option: Opera -> Page -> Developer Tools -> Opera Dragonfly
  • Windows: Ctrl + Shift + I
  • Linux: Ctrl + Shift + I
  • Mac: ? + ? + I

 

How to Find Fonts Used in PSD File

This is the common problem with developer who usually convert PSD file to HTML. Photoshop display an ugly warning message about the font missing every time I open PSD design file. Sometimes large number of fonts missing in PSD file and sometime few only. It is hard to click on each text layer and note down all missing fonts. Here I am sharing list of possible ways to find out missing fonts in PSD a file.

Some text layers contain fonts that are missing. These layers will need to have the missing fonts replaced before they can be used for vector based output.

 

Method 1 – Quick and Easy Way To Find Missing Fonts by Character Box

  • Open PSD file in Adobe Photoshop
  • Go to Windows -> Character
  • A small character box will display with fonts information.
  • Select font name dropdown and scroll down till end.
  • You will notice list of missing fonts in light grey color at the end of font list.
  • Note down missing fonts name.
  • See image below for clear picture.

missing-fonts-list-by-character-box

Method 2 – Get Fonts List from PDF

  • Open PSD file in Adobe Photoshop
  • Save as or export psd image as a PDF
  • Open New PDF File in Adobe Reader
  • Open File Menu -> Properties -> Fonts
  • See the image below

pdf-font-list

Method 3 – PhotoShop Script

If you want to have detailed information about all fonts used in PSD file then this script is for you. It will give you detailed information about all fonts. Usage is fairly easy. Just follow simple steps below.

  • Download Photoshop Script
  • Go To File -> Scripts ->Browse
  • Locate and Select font.jsx Photoshop Javascript File
  • Choose folder where PSD file is located.
  • Make sure selected folder do not have sub-folder and more then one psd file. The Script scan psd files in all sub-folder and search fonts for each psd file found. It may take lot of time and Photoshop may stopped responding.
  • Wait for some time until Photoshop process file. Then look into same folder for fonts.txt file. Open this file to view font information
  • How it looks like: View image below

font-txt-file-from-jsx-script

Online Tools

Apart from offline methods some online tools available to find fonts information from image or psd file.

What The Font Service

WhatTheFont service is free tool that takes image as source and deliver closet matched font from their database.  Follow WhatTheFont guideline for accurate result.

  • Keep text in the image as horizontal as possible.
  • Characters in the image should be around 100 pixels height or higher and should not be touch each other
  • Keep as much character as possible
  • If possible use Tiff file format

Go to What The Font website

IdentiFont Service

IdentiFont is similar service but have more options. You can find fonts with different properties of font. You can find fonts by appearance, fonts by name, fonts by similarity, fonts by picture or fonts by publisher/designer. Try It.

Go to Identifont Website

 

Get Electricity Bill Now on Mobile and Email

Madhya Pradesh Madhya Kshetra Vidyut Vitaran Electricity Board announced registration facility to get electricity bill via sms and email. All you have to register with your electricity connection service number. Make sure to enter service number same as in electricity bill with three dashes otherwise system will not accept number and invalid service number error will be displayed. On successful submission “Registration done successfully.” message will appear. After successful registration you will be ready to get your next electricity bill on your mobile via sms.

electricity-bill-via-sms-email

How to Register

Open following url in browser and fill the form: http://madhyavitaran.org/ltsms.asp

Here is little description about the form.

Service Number: Enter service number in the same format(xxxxxx-xx-x-xxxxxx) it appear in bill. You can find it in between Sambhag name and bill number.
Name: Enter your name.
Address: Enter your billing address.
City: Enter your city.
Mobile Number: Enter your mobile number on which you want to receive bill information.
Email: Enter your working email address where you want to receive your bill.
Do you wish to receive SMS alert: Select yes or no as desired.
Do you wish to receive email alert: Select yes or no as desired.
Security Code: Enter security code display in image to proceed.

Hit register button to proceed. A successful registration message will appear on success.

 

How To Retrieve GET/POST Variable In Joomla

Joomla uses getVar method of JRequest class to retrieve GET/POST variable value. In Joomla 1.7 and above version JRequest class has been deprecated and JInput class used instead.

See following syntex to use with Joomla 1.0, 1.5 and above.

Joomla 1.0

$cid = mosGetParam($_REQUEST, ‘cid’, array());

Joomla 1.5

$cid = JRequest::getVar(‘cid’, array());

Get Single Variable Value

$var_value = JRequest::getVar(‘var_name’);

Full Syntex

$var_value = JRequest::getVar(‘var_name’, ‘default value goes here’, ‘post’,’variable type’);

Joomla 1.7 and higher

$jinput = JFactory::getApplication()->input;

To retrieve single value you can use below syntax.

Example1: $var_value = $jinput->get(‘varname’, ‘default_value’, ‘filter’);

To retrieve multiple values in array you can use below syntex.

Example2: $varValuesArray = $jinput->getArray(array(‘var1′ => ”, ‘var2′ => ”, ‘var3′ => ”));