This page is written for reference to install Magento software in a system starting from the scratch.
System Requirements:
Apache 2.2 or higher server
PHP 5.2.5
MySql server.
Installing and configuring Apache 2.2 software. The installation file for Apache 2.2.8 version is provided at http://httpd.apache.org/download.cgi.
The Apache 2.2.8 server for windows is required for a virtual in-house server to be run on a system. This enables to test and experience the functionalities and features of the solution.
While installing, the setup will prompt for a Domain Name Server. Type localhost to ensure that your system only is acting as a server.
This will install Apache 2.2.8 server into the system.
To start the server, one needs to know of the location in which the server is installed. Go to the location of the server folder.
It is usually “C:\Program Files\Apache Software Foundation\Apache2.2\bin” in the command prompt. Type “httpd.exe” excluding the double quotes.
Now the server will look for a domain or the host which is set at the installation. If not found the server uses the present system itself as a default.
Uploading files onto the server: Locate the folder named htdocs in Apacha2.2 folder.
The folder displays all the documents that need to be there for display on the browser.
“Index.html “ is a test page given for testing the server’s action.
Go to internet browser and type: http://localhost:8080/index.html. The page shows that the server is working.
This completes the installation and configuration of Apache server 2.2
Installing and configuring PHP 5.2.5
Download site for PHP 5.2.5 is http://www.php.net/downloads.php Get the msi installation file for easy setup.
Magento needs support of PHP to execute certain scripts. Basic Apache server supports only html. Hence it needs to be enhanced with PHP to run certain modules and files in Magento.
The installer will ask for the type of server to be looking for to enable the inclusions. Select Apache 2.2 from the list. The setup will usually configure itself to be included in the server. Try to locate the download as “C:\PHP\” which makes life easier as the configuration file has the default location as that only.
Go to php.ini file in the php folder and open with Wordpad
Look for Short_open_tag and set it to On.
Look for magic_quotes_gpc and set it to On.
Look for display_errors and set to On.
Look for extension_dir and type as extension_dir=”c:\php\ext\”
Look for extension= statements in the file and remove the semicolon(;) for the following files:
Php_pdo_mysql.dll
Php_mcrypt.dll
Php_curl.dll
This specific requirement is for magento to run.
This finishes configuring PHP for apache server.
Apache server configuring.
Locate the file httpd.conf in Apache2.2/conf folder. Open it with Wordpad or any text editor.
Look for LoadModule statements and add
LoadModule php5_module “C:/php/php5apache2_2.dll” at the end of these statements.
Look for AddType statements in the file.
Type: AddType application/x-httpd-php .php
Don’t forget the space after the pre-final “php” and the “.” After that.
Ensure PHPIniDir “c:/php”. This will be the location of the folder php.
Look for DirectoryIndex in the file and update it to
DirectoryIndex index.php index.html
Restart the apache server and run the test php file.
All the files to be located in htdocs folder only.
Refer to http://www.thesitewizard.com/php/install-php-5-apache-windows.shtml for configuring both PHP and Apache to be linked.
This will complete the configuration and linking of both apache server and PHP.
MySql Server Installation and configuring:
Download Mysql 5.0.51b fromhttp://dev.mysql.com/downloads/mysql/5.0.html. Download the community server for windows.
Get the zip file for installation from any of the download sites. Unzip the file and installation will ask for the username and configuration setup. A standard setup will suffice the settings. The port number for the sql server is 3306. This will be required for further installation of magento. Remember the password of the sql for further usage.
Once the SQL is installed, go to Programs>Mysql> mysql. This will start a command prompt with my sql collan. The password given will be the password for the root.
Type CREATE DATABASE magento.
This will create the database with name magento.
4.Installing and setting Magento:
Download from http://www.magentocommerce.com/download and the file name is "magento-1.0.19700.zip"
Download the msi setup file for Magenta’s latest version. All the files and setup is to be shifted to htdocs folder of apache. Now run both apache and mysql server.
Type http://localhost:8080/install.php in the address bar. An installation guide will take you to the rest of the steps in Magento. Note that this works only once for the system
The last page of installation will ask the user to move to either frontend or the backend of the software. Please store the last page for any reference or if anything goes wrong. Frontend represents the usual look and feel of a customer on the site. All the items/articles/goods for sale and discount/offers/ carts/shopping lists etc will be visible in the front end.
The backend goes to the administrative part of the system where one can manage with the admin account all the access to change the way the front end looks.It involves adding catalogues, products, product types etc.
This completes the installation of Magento.
How to restart Magento:
Once the server is shutdown, the access to the frontend and the backend of Magento is not known.
Heres how:
Start apache server as well as mysql server.
Open the browser and type http://localhost:8080/magento/index.php
this will take you to the front end of the application
To open in admin's account, type http://localhost:8080/magento/index.php/admin
This will go to the admin's login page and further accessed.
Happy Developping.
Problems:
1. Not able to see index.php file (shows cannot find server)
This usual problem is mainly due to the change of parameters in mage.php which index.php refers to. The only solution being to replace the whole magento setup.
Delete all the files related to magento in the htdocs folder.
Go to sql server and type "drop database magento"
This will delete the database magento which was appended by magento. Again create another database by name magento which has no values.
Install all the files from magento setup to htdocs folder of apache server.
Redo the same steps for installation of magento (From step 4)
This will fix the problem
Monday, April 28, 2008
Friday, April 4, 2008
Pointers and Structures
This post discusses the basics of pointers and Structures.
POINTERS:
A pointer stores the address of a variable. It can also be used to store the address of an array, structure(which is a user defined variable), function and even a pointer.
Declaration:
A pointer for custom type variables is defined as:
int * p(where p is the pointer we are using)
float *p
char *p
A pointer for a structure:
Lets say the structure is named struct student {
int m_iinfo;
char m_pname;}
the pointer will be defined as struct student *p;
A pointer to a function:
A pointer to a function is defined and can be used only for the same TYPE of functions.
Same type functions are those who have the same return types and have same arguements.
Example:
int func(int x, int y) be the function.
pointer to the function will be : int (*p)(int x, int y);
Always remember the braces for the pointer p. If there are no braces, it will be treated as a function p whose return type is an integer pointer and arguements are integers. This type of notation is extensively used for interface with OS and registers to point to a particular function.
Pointers to pointers:
int *p is a pointer to an integer. We can also create q which is a pointer to an integer pointer.
int ** q defines a pointer q to an integer pointer.
it is equivalent to a two dimensional array. This type of declaration is called COMPLEX DECLARATION.
POINTERS:
A pointer stores the address of a variable. It can also be used to store the address of an array, structure(which is a user defined variable), function and even a pointer.
Declaration:
A pointer for custom type variables is defined as:
int * p(where p is the pointer we are using)
float *p
char *p
A pointer for a structure:
Lets say the structure is named struct student {
int m_iinfo;
char m_pname;}
the pointer will be defined as struct student *p;
A pointer to a function:
A pointer to a function is defined and can be used only for the same TYPE of functions.
Same type functions are those who have the same return types and have same arguements.
Example:
int func(int x, int y) be the function.
pointer to the function will be : int (*p)(int x, int y);
Always remember the braces for the pointer p. If there are no braces, it will be treated as a function p whose return type is an integer pointer and arguements are integers. This type of notation is extensively used for interface with OS and registers to point to a particular function.
Pointers to pointers:
int *p is a pointer to an integer. We can also create q which is a pointer to an integer pointer.
int ** q defines a pointer q to an integer pointer.
it is equivalent to a two dimensional array. This type of declaration is called COMPLEX DECLARATION.
Wednesday, April 2, 2008
ActiveSync Usage
Active Sync is a programme that acts as an interface between a mobile and a PC. Any file that needs to be downloaded to and from the mobile phone can be done using activesync.
Inorder to make this happen, both system and the mobile should have activesync installed.
Mobile Phone to PC:
Connect the mobile to PC using USB or any other ports whichever is applicable. Enable activesync on the system and the same on the mobile phone also. The phone automatically Synchronizes with the system once the active Sync is switched. The explore button in ActiveSync allows the user to explore through the files existing on the mobile phone. Similarly any file that needs to be copied on to the mobile phone can be done in the same way.
Emulator to PC:
Connecting the emulator to PC using Active sync is a tricky job. We have to cheat the system that there actually exists a mobile phone with activesync control and is trying to connect into the system. Lets go to the "First" source file that has been created already in the earlier session.
Build and start the emulator. Donot exit from the emulator. In the main VS screen,
Tools> Device Emulator Manager
If all the drop down menus are opened, there will be one simulator which actually is ready to get connected into the system. Right click on that and click on cradle. Active sync gives a setup for connecting onto the device.
Choose "standard partnership" and click next.
Choose "Synchronize with desktop" and click next.
Once the setup is completed, ActiveSync looks for the changes in the emulator since it was last used and updates them. Once it is completed, Click on Explore of Activesync. This gives access on to the files of the mobile phone.
This completes the process of Activesync for an Emulator.
Things to be remembered:
1. Emulator should be executed by VS before starting the Active Sync.
2. Please ensure the files transfer on the emulator/ mobile once the transfer has taken place.
3. Always close the emulator before debugging or writing other code in VS.
4. Both system and the device should have activesync installed.
Inorder to make this happen, both system and the mobile should have activesync installed.
Mobile Phone to PC:
Connect the mobile to PC using USB or any other ports whichever is applicable. Enable activesync on the system and the same on the mobile phone also. The phone automatically Synchronizes with the system once the active Sync is switched. The explore button in ActiveSync allows the user to explore through the files existing on the mobile phone. Similarly any file that needs to be copied on to the mobile phone can be done in the same way.
Emulator to PC:
Connecting the emulator to PC using Active sync is a tricky job. We have to cheat the system that there actually exists a mobile phone with activesync control and is trying to connect into the system. Lets go to the "First" source file that has been created already in the earlier session.
Build and start the emulator. Donot exit from the emulator. In the main VS screen,
Tools> Device Emulator Manager
If all the drop down menus are opened, there will be one simulator which actually is ready to get connected into the system. Right click on that and click on cradle. Active sync gives a setup for connecting onto the device.
Choose "standard partnership" and click next.
Choose "Synchronize with desktop" and click next.
Once the setup is completed, ActiveSync looks for the changes in the emulator since it was last used and updates them. Once it is completed, Click on Explore of Activesync. This gives access on to the files of the mobile phone.
This completes the process of Activesync for an Emulator.
Things to be remembered:
1. Emulator should be executed by VS before starting the Active Sync.
2. Please ensure the files transfer on the emulator/ mobile once the transfer has taken place.
3. Always close the emulator before debugging or writing other code in VS.
4. Both system and the device should have activesync installed.
starting and editing a smart phone application
This session will enable to start a smart phone application on Visual basic platform.
shortcut for getting visual basic environment:
Windows> Run> devenv
This is applicable only for the systems that are at the company and might differ for depending upon the VS package available in the systems.
Once the start page is displayed, go to:
File> New>Project. (short cut for the same Ctrl+Shift+N)
A subwindow appears on the screen which has "Project types" on the left and "Templates" on the right.
Project types:
click on the visual c++ button. This drags down ATL, CLR, General,MFC, Smart Devices.
Click on Smart Devices.
Choose the Win32 smart device project template on the right side.
Enter the location at which the project needs to be stored in the 2nd bottom line of the menu.
Give a name to the project prior to its editing and press OK. Lets put the name "First"
A creation Wizard will guide you for the rest of the process.
Choose the application in which the programme is to be executed. The present ones in the system are Smarphone and Pocket Pc both belonging to 2003 version.
Then the wizard asks for the application type. Be it a library,DLL,Windows application.
For our example we will take Windows application. Click Finish once it is selected.
The environment will be loaded with the source that has been created by us.
In order to run this dummy programme in an emulator, first the programme needs to be built.
Right click on " First" displayed at the left top side of the solution explorer. Click on Build.
Once there are no errors and the system shows success on the bottom running line, click on
Debug> start without debugging>
The emulator which exactly resembles the smart device appears on the screen. Since we have not entered or altered anything in the application, a blank screen appears on the phone with two options OK and HELP.
Clicking on OK will take the menu out of the blank screen. Click on the File shown on the emulator window.
Golden Rule: ALWAYS EXIT THE EMULATOR WITHOUT SAVING ANY CHANGES.
Any changes saved onto the emulator will remain on it the next time it is used which means any bugs on the code will be entered into the emulator.
The emulator needs to be closed inorder to again re run the code on it.
The files for the project will be given as source files, header files, resource files. Exploring into these files lets u change/ delete/edit anything that comes on the blank screen.
Exercise: try to change the About me that comes on the Help screen of emulator into your name or anything that suits u.
shortcut for getting visual basic environment:
Windows> Run> devenv
This is applicable only for the systems that are at the company and might differ for depending upon the VS package available in the systems.
Once the start page is displayed, go to:
File> New>Project. (short cut for the same Ctrl+Shift+N)
A subwindow appears on the screen which has "Project types" on the left and "Templates" on the right.
Project types:
click on the visual c++ button. This drags down ATL, CLR, General,MFC, Smart Devices.
Click on Smart Devices.
Choose the Win32 smart device project template on the right side.
Enter the location at which the project needs to be stored in the 2nd bottom line of the menu.
Give a name to the project prior to its editing and press OK. Lets put the name "First"
A creation Wizard will guide you for the rest of the process.
Choose the application in which the programme is to be executed. The present ones in the system are Smarphone and Pocket Pc both belonging to 2003 version.
Then the wizard asks for the application type. Be it a library,DLL,Windows application.
For our example we will take Windows application. Click Finish once it is selected.
The environment will be loaded with the source that has been created by us.
In order to run this dummy programme in an emulator, first the programme needs to be built.
Right click on " First" displayed at the left top side of the solution explorer. Click on Build.
Once there are no errors and the system shows success on the bottom running line, click on
Debug> start without debugging>
The emulator which exactly resembles the smart device appears on the screen. Since we have not entered or altered anything in the application, a blank screen appears on the phone with two options OK and HELP.
Clicking on OK will take the menu out of the blank screen. Click on the File shown on the emulator window.
Golden Rule: ALWAYS EXIT THE EMULATOR WITHOUT SAVING ANY CHANGES.
Any changes saved onto the emulator will remain on it the next time it is used which means any bugs on the code will be entered into the emulator.
The emulator needs to be closed inorder to again re run the code on it.
The files for the project will be given as source files, header files, resource files. Exploring into these files lets u change/ delete/edit anything that comes on the blank screen.
Exercise: try to change the About me that comes on the Help screen of emulator into your name or anything that suits u.
what and why of an Emulator

This post deals with the creation, building and deployment of a smart phone application on to an emulator.
An emulator is a virtual system almost equivalent to a smart mobile phone. Any program that needs to be deployed onto a mobile phone can be simulated with an emulator. Now about the mobile phone applications:
All the electronic devices have basic hardware which includes Processor, RAM, BIOS, data ports, Operating systems. A computer also has an application development environment where in programs regarding the OS can be done to suit our applications. A mobile phone on the contrary doesnt have an application development environment due to the constraints of memory and also the response. Hence applications pertaining to mobile phones have to be written and tested somewhere else and then deployed for usage on mobile.
The same is at the start of this post.
Emulator is a simulation program that resembles a mobile phone so that applications written for a Mobile phone can be tested over this. This reduces the risk of any damage caused due to malfunctioning of programme on the original phone. Once the program works on the Emulator, the same can be deployed on to the phone for usage.
Subscribe to:
Comments (Atom)