I had to install a magento extension using FTP recently. These 2 blog posts helped me immensely regarding that.
http://www.aschroder.com/2010/05/installing-a-magento-extension-manually-via-ftp-or-ssh/
http://www.groovecommerce.com/ecommerce-blog/magento/developer-toolbox-a-guide-for-installing-magento-extensions/
If you refer these two blogs I am sure you would be able to manually install an extension manually even though you are not a hardcore magento guy.
Magento extensions are normally developed to install through magento connect. But sometimes you will have to install the extension manually using either FTP or SSH. It is said that it's not good to install too many extenions using Magento Connect. Your magento Site could crash.
Magento extensions come up with file structure. You have to upload to the correct location of your magento site installation.
Important things to consider when manually installing a magento extension.
1.) Don't install the extension without testing that in a testing site. Don't install the extension in a live site without testing. Results of the badly design extension could be catastrophic.
2.) Disable the cache prior to the installation.
(System->Cache Management), selecting all caches, clicking ‘disable’ from the drop-down menu, and submitting the change.
3.) Disable the compilation mode.
/* Everything from technical stuff, cricket, politics, traveling to general life. */
Sunday, November 25, 2012
Monday, August 27, 2012
Issues you might face when Setting Up Magento in GoDaddy Shared Hosting
Magento is a powerful open-source ecommerce web application. Recently I hosted magento in a Godaddy. While setting up magento in godaddy I ran into various issues. Here are some of the issues I faced and How I resolved them
1.) When site is installed you get the message "No input file specified"
To resolve that you should renam php.ini file in web directory to php5.ini. And you should put cgi.fix_pathinfo = 1 top of the php5.ini file. If you are still getting the error add this "Options -Multivies" to the top of .htaccess .
2.) Added products are not displayed in the front end of the site
Most possible cause can be when adding the product setting Stock availability option to "Out of Stock" in inventory section
3.) Added Images are not displayed in the front end
Image size should be around very lower(less than 40kb). You should remove .htaccess file
located in the media folder.
4.) When you try to access the site or admin panel you get the message "The Server is temporarily unable to service your request"
This happens when your store has been put to maintenance mode. To resolve this you have to delete maintenance.flag in the root directory.
5.) If you want to install Sample data from Magento run that script from phpmysql admin first of all. If you install sample data later you might end up with various errors.
Saturday, June 23, 2012
Date Selector - Silverlight Custom Control
I have created a silverlight custom control which can be used to select date in a user friendly way. It is similar to date selector control available to set birth date in facebook registration. Standard date picker control in silverlight and WPF is not user friendly and user has to perform several clicks to select a date. This control is skinable. I have open source it and hosted in codeplex. Hope to add localizations very soon. Contributions and ideas are Welcome :).
http://sldateselector.codeplex.com
Labels:
customcontrols,
datepicker,
dateselector,
silverlight
Wednesday, July 27, 2011
Encryption in Silverlight and .NET Applications
I wanted to encrypt some sensitive data in a Silverlight application and decry pt that in the server. Sergey Barskiy's has written a good post about that. Here is the code.
Encryption functionality
using System.Security.Cryptography;
using System.IO;
namespace Encryption
{
public static class EncryptionUtility
{
///
/// Encrypt the data
///
/// String to encrypt
/// Encrypted string
public static string Encrypt(string input, string password)
{
byte[] utfData = UTF8Encoding.UTF8.GetBytes(input);
byte[] saltBytes = Encoding.UTF8.GetBytes(password);
string encryptedString = string.Empty;
using (AesManaged aes = new AesManaged())
{
Rfc2898DeriveBytes rfc = new Rfc2898DeriveBytes(password, saltBytes);
aes.BlockSize = aes.LegalBlockSizes[0].MaxSize;
aes.KeySize = aes.LegalKeySizes[0].MaxSize;
aes.Key = rfc.GetBytes(aes.KeySize / 8);
aes.IV = rfc.GetBytes(aes.BlockSize / 8);
using (ICryptoTransform encryptTransform = aes.CreateEncryptor())
{
using (MemoryStream encryptedStream = new MemoryStream())
{
using (CryptoStream encryptor =
new CryptoStream(encryptedStream, encryptTransform,CryptoStreamMode.Write))
{
encryptor.Write(utfData, 0, utfData.Length);
encryptor.Flush();
encryptor.Close();
byte[] encryptBytes = encryptedStream.ToArray();
encryptedString = Convert.ToBase64String(encryptBytes);
}
}
}
}
return encryptedString;
using System;
using System.Text; using System.Security.Cryptography;
using System.IO;
namespace Encryption
{
public static class EncryptionUtility
{
///
/// Encrypt the data
///
/// String to encrypt
///
public static string Encrypt(string input, string password)
{
byte[] utfData = UTF8Encoding.UTF8.GetBytes(input);
byte[] saltBytes = Encoding.UTF8.GetBytes(password);
string encryptedString = string.Empty;
using (AesManaged aes = new AesManaged())
{
Rfc2898DeriveBytes rfc = new Rfc2898DeriveBytes(password, saltBytes);
aes.BlockSize = aes.LegalBlockSizes[0].MaxSize;
aes.KeySize = aes.LegalKeySizes[0].MaxSize;
aes.Key = rfc.GetBytes(aes.KeySize / 8);
aes.IV = rfc.GetBytes(aes.BlockSize / 8);
using (ICryptoTransform encryptTransform = aes.CreateEncryptor())
{
using (MemoryStream encryptedStream = new MemoryStream())
{
using (CryptoStream encryptor =
new CryptoStream(encryptedStream, encryptTransform,CryptoStreamMode.Write))
{
encryptor.Write(utfData, 0, utfData.Length);
encryptor.Flush();
encryptor.Close();
byte[] encryptBytes = encryptedStream.ToArray();
encryptedString = Convert.ToBase64String(encryptBytes);
}
}
}
}
return encryptedString;
}
Decryption functionality
///
/// Decrypt a string
///
/// Input string in base 64 format
/// Decrypted string
public static string Decrypt(string input, string password)
{
input = input.Replace(" ","+");
/// Decrypt a string
///
/// Input string in base 64 format
///
public static string Decrypt(string input, string password)
{
input = input.Replace(" ","+");
byte[] encryptedBytes = Convert.FromBase64String(input);
byte[] saltBytes = Encoding.UTF8.GetBytes(password);
string decryptedString = string.Empty;
using (var aes = new AesManaged())
{
Rfc2898DeriveBytes rfc = new Rfc2898DeriveBytes(password, saltBytes);
aes.BlockSize = aes.LegalBlockSizes[0].MaxSize;
aes.KeySize = aes.LegalKeySizes[0].MaxSize;
aes.Key = rfc.GetBytes(aes.KeySize / 8);
aes.IV = rfc.GetBytes(aes.BlockSize / 8);
using (ICryptoTransform decryptTransform = aes.CreateDecryptor())
{
using (MemoryStream decryptedStream = new MemoryStream())
{
CryptoStream decryptor =
new CryptoStream(decryptedStream, decryptTransform,CryptoStreamMode.Write);
decryptor.Write(encryptedBytes, 0, encryptedBytes.Length);
decryptor.Flush();
decryptor.Close();
byte[] decryptBytes = decryptedStream.ToArray();
decryptedString =
UTF8Encoding.UTF8.GetString(decryptBytes, 0, decryptBytes.Length);
}
}
}
return decryptedString;
}
}
}
byte[] saltBytes = Encoding.UTF8.GetBytes(password);
string decryptedString = string.Empty;
using (var aes = new AesManaged())
{
Rfc2898DeriveBytes rfc = new Rfc2898DeriveBytes(password, saltBytes);
aes.BlockSize = aes.LegalBlockSizes[0].MaxSize;
aes.KeySize = aes.LegalKeySizes[0].MaxSize;
aes.Key = rfc.GetBytes(aes.KeySize / 8);
aes.IV = rfc.GetBytes(aes.BlockSize / 8);
using (ICryptoTransform decryptTransform = aes.CreateDecryptor())
{
using (MemoryStream decryptedStream = new MemoryStream())
{
CryptoStream decryptor =
new CryptoStream(decryptedStream, decryptTransform,CryptoStreamMode.Write);
decryptor.Write(encryptedBytes, 0, encryptedBytes.Length);
decryptor.Flush();
decryptor.Close();
byte[] decryptBytes = decryptedStream.ToArray();
decryptedString =
UTF8Encoding.UTF8.GetString(decryptBytes, 0, decryptBytes.Length);
}
}
}
return decryptedString;
}
}
}
In the decrpting part I had to include the line input = input.Replace(" ","+");
It seems 64-bic encoding does not work with spaces. Plus sign will be interpreted as a space when you call the FromBase64String method.
Subscribe to:
Posts (Atom)