Showing posts with label Magento. Show all posts
Showing posts with label Magento. Show all posts

Monday, January 18, 2010

Magento Add Product fails with failed to open stream: No such file or directory

Problem Description
In the Magento Admin Panel under Catalog menu you click Manage Products. And now you try to Add a new product after clicking Add Product button. After giving product information whenever you try to save the product it fails with following errors.

Warning: include(Mage\Catalog\Model\Resource\Eav\Mysql4\Product\Attribute\Backend\Tierprice.php) [function.include]: failed to open stream: No such file or directory in E:\xampp\htdocs\magento\lib\Varien\Autoload.php on line 93

Cause of the Problem
As the error says the system could not find file Tierprice.php in the location Mage\Catalog\Model\Resource\Eav\Mysql4\Product\Attribute\Backend and hence it throws error.

Solution of the Problem
Go to the directory and you will see the file named as Tierprice.php0000664. You need to rename that file to Tierprice.php and then try to add product in magento.
Here from windows XP machine I used xampp and from command line I renamed the file. Following is the copy paste information from the command line windows command prompt.
E:\Documents and Settings\Arju>cd E:\xampp\htdocs\magento\app\code\core\Mage\Catalog\Model\Resource\Eav\Mysql4\Product\Attribute\Backend

E:\xampp\htdocs\magento\app\code\core\Mage\Catalog\Model\Resource\Eav\Mysql4\Product\Attribute\Backend>dir
Volume in drive E is New Volume
Volume Serial Number is 889B-18A3

Directory of E:\xampp\htdocs\magento\app\code\core\Mage\Catalog\Model\Resource\Eav\Mysql4\Product\Attribute\Backend

12/06/2009 04:09 PM <DIR> .
12/06/2009 04:09 PM <DIR> ..
09/24/2009 12:52 AM 1,635 Gallery.php
09/24/2009 12:52 AM 2,405 Image.php
09/24/2009 12:52 AM 7,430 Media.php
09/24/2009 12:52 AM 3,168 Tierprice.php0000664
09/24/2009 12:52 AM 1,862 Urlkey.php
5 File(s) 16,500 bytes
2 Dir(s) 3,835,740,160 bytes free

E:\xampp\htdocs\magento\app\code\core\Mage\Catalog\Model\Resource\Eav\Mysql4\Product\Attribute\Backend>ren Tierprice.php0000664 Tierprice.php

E:\xampp\htdocs\magento\app\code\core\Mage\Catalog\Model\Resource\Eav\Mysql4\Product\Attribute\Backend>dir
Volume in drive E is New Volume
Volume Serial Number is 889B-18A3

Directory of E:\xampp\htdocs\magento\app\code\core\Mage\Catalog\Model\Resource\Eav\Mysql4\Product\Attribute\Backend

01/18/2010 03:00 PM <DIR> .
01/18/2010 03:00 PM <DIR> ..
09/24/2009 12:52 AM 1,635 Gallery.php
09/24/2009 12:52 AM 2,405 Image.php
09/24/2009 12:52 AM 7,430 Media.php
09/24/2009 12:52 AM 3,168 Tierprice.php
09/24/2009 12:52 AM 1,862 Urlkey.php
5 File(s) 16,500 bytes
2 Dir(s) 3,833,298,944 bytes free

Tuesday, December 15, 2009

System Requirements for running Magento

In order to run magento open source e-commerce software you need the following server requirements.

1)Operating System: Linux servers are only supported servers for magento software.

2)Web Servers: Apache 1.3.x or Apache 2.x or higher version of Apache are only supported versions of web servers for magento.

3)Development Language: Magento only supports PHP and version of PHP must be at least 5.2.0 or above.

4)Database: Mysql is only database language that is supported for magento and version must be 4.1.20 or above.

So your hosting server must support these specification. Before you hosting company check out their specifications. Also you need to enable following extensions.

- curl,
- dom,
- gd,
- hash,
- iconv,
- mcrypt,
- pcre,
- pdo,
- pdo_mysql,
- simplexml.

You can also check your hosting server requirements by following below steps.

1) Download magento-check.zip from http://www.magentocommerce.com/_media/magento-check.zip.

2) After unzipping the file and upload the php file to your Magento directory on the server.

3) In your browser navigate to this page. http://......../magento-check.php
It will say which requirements you are missing.

Related Documents
http://arjudba.blogspot.com/2009/12/magento-installation-does-not-proceed.html

Sunday, December 6, 2009

Magento Installation does not proceed from Configuration window

Problem Description
While installing magento the first window is License Agreement which says
"

Welcome to Magento's Installation Wizard!

"
After accepting term and clicking continue

Localization

window appears. Clicking continue button brings the window

Configuration

In the configuration window you will see Database Connection, Web access options and Session storage options. After filling forms you may face problem that clicking continue button will not proceed further and also it does  not display any error messages. 

Cause of the Problem
The installation does not proceed because either host, database name, user name or password field value is wrong. If you pass any wrong information to those fields then installation will not proceed. 

Solution of the Problem 
Before proceed installation be sure that host, database name, user name and password field are correct. You can test those from your command line. In mysql database using mysql command line interface try to login using the information that you provided in the magento configuration. If you are successful then be sure that your database name is correct and you can connect that database using your user name and password. 

Also make sure before installation database you must create a database. On your mysql prompt you can do it by simply,

mysql> create database magento;
Query OK, 1 row affected (0.06 sec)

If you want a dedicated user for magento then be sure to create that user too and give permission to that user to access the database.

After you put all right information click continue button and you will see installation proceed. 

Related Documents

Monday, April 27, 2009

How to install and configure magento on windows.

Pre-installation Tasks
Before installing magento make sure that you have the following software installed on your system.
-Apache Web Server.
-PHP 5.2.0 or newer version (You need extension of PDO/MySQL, MySQLi, mcrypt, mhash, simplexml, DOM, curl, gd, soap).
-MySQL 4.1.20 or newer.

I, myself have installed XAMPP software(which contains PHP + MySQL + Apache) and then enable extension of necessary addons by uncommenting php.ini file under apache/bin directory. If you don't do it you might have http://arjudba.blogspot.com/2009/04/installing-magneto-fails-with-php.html

Installing Magento
1)Download magento software from magentocommerce.com/download. You can download.zip or .tar.gz installer package and decompress it with any compression utility.

2)Rename the decompressed folder to magento and place this (magento) folder into your web server directory.

3)Create a mysql database For example name the database magento. Also create username and password for the database.

D:\xampp\mysql\bin>mysql.exe -h localhost -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 5.1.30-community MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create database magento;
Query OK, 1 row affected (0.00 sec)

mysql> create user 'magento' identified by 'magento';
Query OK, 0 rows affected (0.05 sec)

mysql> grant all privileges on *.* to 'magento'@'localhost' identified by 'magento';
Query OK, 0 rows affected (0.06 sec)

mysql> commit;
Query OK, 0 rows affected (0.00 sec)

mysql> Bye

Ensure that you can log in to database using newly created user.

D:\xampp\mysql\bin>mysql.exe -h localhost -u magento -p
Enter password: *******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 18
Server version: 5.1.30-community MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

4)You must have the correct permission onto magento directory in order to proceed. On windows if you have NTFS file system then make sure you have read, write and execute permission on the folder. On unix change the permission to 755 by chmod.

5)Already mentioned that before installing magento you need php 5. However if your server runs on php 4 then you need PHP5 CGI Binary.

6)From your browser write http://localhost/magento. You will get http://localhost/magento/index.php/install/ on the browser and the word "Welcome to Magento's Installation Wizard!"

7)Click on the checkbox if you are agree and proceed to install. And then press Continue.

8)In the localization tab select Locale, Time Zone and Default Currency and then press Continue.

9)In the configuration window fill up the field as indicated. In this step you may face a problem defined here http://arjudba.blogspot.com/2009/04/magneto-installation-crashes-apache.html. So care about that and note that this step may take few minutes to continue next step.

10)Create Admin Account window will appear. Fill up the necessary information. And press Continue.

11)You have done installation task. A window will appear cotaining word "You're All Set!". Now you can login to admin panel. You can Go to backend or frontend as your wish.
Related Documents
http://arjudba.blogspot.com/2009/04/after-installing-magento-cant-log-in-to.html
http://arjudba.blogspot.com/2009/04/magneto-installation-crashes-apache.html
http://arjudba.blogspot.com/2009/04/after-installing-magento-cant-log-in-to.html

Sunday, April 19, 2009

After installing magento can't log in to admin panel

Problem Description
While installing magento on xampp version 2.5 you have provided admin username and password. After installation finished you no longer login with your admin account. In fact in the "Log in to Admin Panel" window whenever you provide wrong password/username combination it displays "Invalid Username or Password." But whenever you provide correct password it does not show anything. Though a new url like
http://127.0.0.1/magento/index.php/admin/index/index/key/d135be4de664ab83db829120740e058a/

is displayed on the address bar.
Everytime you do this you can't log in to admin panel.

Cause of the problem
The problem occurs because magneto could not store cookies. We run it as localhost and localhost is not true domain but to store cookies we need a domain. That's why login stops without saying any word.

Solution of the problem
Way 1:
In different forums I saw they mentioned connecting as http://localhost/magento/index.php/admin will fail but if you connect as http://127.0.0.1/magento/index.php/admin it will work. But in my case IP address in the URL did not work too.
I made it work into whenever I changed my browser. Suppose I installed magento using google chrome browser and I open admin url into my firefox window and it worked. Though in the firefox the url http://localhost/magento/index.php/admin did not work, but url http://127.0.0.1/magento/index.php/admin worked fine.

Way 2:
-Go to app/code/core/Mage/Core/Model/Session/Abstract/Varien.php file within your magento directory.

-Find the code,

session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath(),
$this->getCookie()->getDomain(),
$this->getCookie()->isSecure(),
$this->getCookie()->getHttponly()
);

-Replace above code by,

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

-Save it and try to login to your magento admin panel.
It would work. :)

Related Documents
http://arjudba.blogspot.com/2009/04/magneto-installation-crashes-apache.html