Monthly Archives: March 2013

syntax error, unexpected T_CONST in GShoppingContent.php on line 54

The above error in Google Merchant Center API appear if you are using PHP 5.2 or less. The error is because PHP 5.2 or lower does not recognizes const variable outside the class. PHP 5.3 solves that problem.

To upgrade your PHP version, go to Control Panel and select PHP config. There you may have options to change or upgrade your PHP version. If not not contact your web host.

Const PHP Decumentation. Alternative you can change all Const by define(‘constant’,’value’).

Reset Trial for Parallels 8 for Mac

If trial has expired on Parallels desktop 8 and it ask for activation code, there is hack to reset the activation period by issuing the following command in Terminal Windows

sudo rm /Library/Preferences/Parallels/licenses.xml

After this, your trial period expiration dialog will disappear. In the dialog bottom left, there is a “GET Trail” button. Click that and you are all set for another 14 days.

If the above script does not work

If you have already used the above script, it may not work again. In that case use the following script. This will remove all traces of Parallels, including the association of Parallels Software to the installed Windows.

rm -rfd ~/library/preferences/com.parallels*
rm -rfd ~/library/preferences/parallels/*
rm -rfd ~/library/preferences/parallels
sudo -s rm -rfd /private/var/db/parallels/stats/*
sudo -s rm -rfd /private/var/db/parallels/stats
sudo -s rm -rfd /private/var/db/parallels
sudo -s rm -rfd /library/logs/parallels.log
sudo -s rm -rfd /library/preferences/parallels/*
sudo -s rm -rfd /library/preferences/parallels
sudo -s rm -rfd /private/var/db/parallels
sudo -s rm -rfd /private/var/.parallels_swap
sudo -s rm -rfd /private/var/db/receipts/'com.parallels*'
sudo -s rm -rfd /private/tmp/qtsingleapp-*-lockfile
sudo -s rm -rfd /private/tmp/com.apple.installer*/*
sudo -s rm -rfd /private/tmp/com.apple.installer*
sudo -s rm -rfd /private/var/root/library/preferences/com.parallels.desktop.plist
sudo rm -fr ~/Library/Logs/parallels.log
sudo rm -fr /Library/Preferences/Parallels/
sudo rm -fr ~/Library/Preferences/Parallels
sudo rm -fr /private/var/.Parallels_swap
sudo rm -fr /private/var/db/Parallels/Stats
sudo rm -fr /private/tmp/qtsingleapp-Parall-c0ce-0-lockfile
sudo rm -fr ~/Library/Preferences/com.parallels

After running this, it will ask in a popup window weather you want a new virtual Windows or use existing one. Select Windows from Bootcamp and you should be all set.

More help on this link

Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.

I got this error when migrating my application from Windows XP to Window 7. Moreever I get this error when I run the application on IIS 7.5 but strangely don’t get this error if you run the website from Visual Studio 2008 (on Win7 Machine).