Magento Admin login problem


Problem:

I had a new installation of magento. But I was unable to login as an administrator. I went to the admin login page, entered correct username and password but was redirected to the same login page. I could not enter the dashboard page. Error message is displayed when I enter wrong username or password. But nothing is displayed and I am redirected to the same login page when I insert correct username and password.

Solution:

I googled and found these solutions:-

1) Use 127.0.0.1 instead of localhost in your url, i.e. using http://127.0.0.1/magento/index.php/admin instead of
http://localhost/magento/index.php/admin . But this didn’t solve my problem.

2) Since I am using Windows XP, I was suggested to open “host” file from
C:\WINDOWS\system32\drivers\etc and have 127.0.0.1 point to something like magento.localhost or even 127.0.0.1 point to http://www.localhost.com . But this also didn’t work either.

3) This solution finally helped me out of this problem. The solution was to modify the core Magento code. Open app/code/core/Mage/Core/Model/Session/Abstract/Varien.php. Comment out the lines 80 to 83. The line number may vary according to the Magento version. But these lines are present somewhere near line 80. You have to comment the comma (,) in line: $this->getCookie()->getPath()//,

// set session cookie params
session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath()//,
//$this->getCookie()->getDomain(),
//$this->getCookie()->isSecure(),
//$this->getCookie()->getHttponly()
);

Well, I am out of this problem. Hope, this solution you also help you.


Barcodes On your Web apps


The bar code is method of automatic identification and data collection.
Their use is widespread and the technology behind barcodes is constantly improving. Almost every item purchased from a grocery store, department store, and mass merchandiser has a UPC barcode on it. Now rarely will one come across any product that doesn’t have a barcode.

Varieties of barcodes
Barcodes bascially come in two main type: linear (1-dimensional) and Matrix (2-dimensional) with each offering a variety of formats, depending on your application purpose

(1) linear (1-dimensional) : The barcodes we usually see on books and other standard products are of the linear type. These only encode data in one dimension, from left to right. The following shows a typical UPC barcode.
(2) Matrix (2-dimensional) : They also come in patterns of squares, dots, hexagons and other geometric patterns within images termed 2D (2 dimensional) matrix codes or symbologies.

It is to use the PEAR::Image_Barcode class in PHP to dynamically create barcodes for Web applications. The backbone to the PEAR::Image_Barcode's ability to produce barcode images is in the GD library,If you haven't already installed PEAR, you will need to do so in order to get this application to work.


Installation
You can install Image_Barcode issuing the following command (as root):
# pear install Image_Barcode

You can get the latest code at the PEAR site:
http://pear.php.net/package/Image_Barcode/


Using Image_Barcode
Creating a barcode is as simple as calling the classes static draw() method.
The method has four parameters:

Text : string that shall be converted into barcode representation.
Type : this parameter determines which driver/type should be used; it is one of: Code39, code128, ean13, int25, postnet or upca.
Imgtype : determines the type of the image that is generated; one of jpg, png and gif.

By default, the image generated by the barcode driver is directly output to the browser. If you do not want this, pass false as fourth parameter and draw() will return the GD image resource object; allowing you to do further things with it.

Example code
A sample code for generating a CODE128 barcode is shown below.

/* Data that will be encoded in the bar code */
$bar_code_data = "TRSD5656";

/* The third parameter can accept any from the following,
* jpg, png and gif.
*/
Image_Barcode::draw($bar_code_data, 'code128', 'png');
?>

Supported Types
The ‘Image_Barcode’ library supports the following barcode types:
* Code 39
* Code 128
* EAN 13
* INT 25
* PostNet
* UPCA