Post by vimal » Thu Aug 27, 2009 10:31 pm

Hi all,

From playing around with other opensource shopping carts a bit or research on the internet and of course open cart, I have compiled the steps to configure a test e-shop on the local server with address http://www.example.com/shop.

Steps to install opencart on local server for testing!
Broad overview

1.Set up local server (with Apache, PHP, mail server and ftp using xampp)
2.Set up local domain (http://www.example.com/shop as the test shop website)
3.Create store database
4.Install open cart
5.Congratulation!

Step 1: Set up local server (with Apache, PHP, mail server and ftp using xampp)
Unless you want it in your resume, getting Apache, PHP and MYSQL to work properly is a pain. Hence we will use a prepackaged solution called xampp.

1.Download xampp from (http://www.apachefriends.org/en/xampp.html) for your operating system.
2.Install XAMPP
Before you begin installation:
 Make sure you do not have any previous copies of Apache, MySQL or Mercury Mail server installed on your machine. Uninstall them if they are present.
 The following ports in your computer's firewall may need to be enabled. Do not allow access to other
machines on the Internet unless you know what you are doing!

Port 80 - HTTP Apache Web Server
Port 3306 - MySQL-specific MySQL Database Server
Port 25 - SMTP Mercury Mail Server
Port 110 - POP Mercury Mail Server

3.To begin installing XAMPP:
1. Double-click on xampp-win32-1.4.16-installer.exe to start the installation process.
2. In the Destination Folder field, choose a directory without any spaces or periods in its path (e.g.
C: \server \xampp) to install XAMPP before clicking Install.
3. Click Yes if you are prompted to install XAMPP, Apache and MySQL as a Windows service.
4. Restart your computer. This step is optional but I usually do it to prevent any unexpected problems with different versions of Windows. To check

4.To check whether XAMPP has been installed successfully:
1.From your Windows menu, click on Start > All Programs > apachefriends > xampp > CONTROL XAMPP SERVER PANEL. This will bring up the XAMPP control panel with Apache, Mysql, filezilla and mercury.
2.Make sure all the services, except FileZilla, are running. If any of them are not running, click on the respective Start buttons.

If you are still unable to start the Apache service after several tries, make sure you shut down any other application (e.g. Skype, Microsoft IIS, Windows Firewall) on your computer that is currently using or blocking port 80.
3.Start your preferred web browser and type in the following URL - http://localhost. You should see a page with big XAMPP logo and languages below it if everything goes well.
4.Click on English and you should see a page that says "Welcome to XAMPP for windows version 1.7.11"



Step 2: Setup local domain
1. Edit the file C: \WINDOWS\system32\dr ivers\etc\hosts with a text editor. Change the drive letter (C:)
to match your own computer setup.
2. Add the following lines to the end of the file.

127.0.0.1 http://www.example.com # For browser access

3. Remember to save the contents of the file.
You should now be able to use “localhost” and “www.example.com” interchangeably when accessing your web
server via a web browser.

Setup Apache

We have to configure our local Apache to accept connections for any requests to the domain -
http://www.example.com, instead of allowing such connections to go through the Internet.
To configure Apache to use the new domain you created:
1. Edit the file <xampp-home>/apache/conf /ht tpd.conf with a text editor.
2. Delete and add the following line in the file.

ServerName localhost:80 ServerName http://www.example.com:80

To test whether Apache has been configured properly:
1. Start your Apache service via the XAMPP Control Panel.
2. Use your web browser to point to http://www.example.com and you should be presented with the XAMPP
welcome screen if your configuration is successful.

Note that you are still able to access your server via the old URL of http://localhost.


Step 3: Creating Your Store's Database

A database is used to store your configuration information during the installation process and also all your store's
settings, customer and product information, etc. The database will be created in the MySQL database server which we have installed when we installed XAMPP.
To create a database:
1. Start up your XAMPP Control Panel and make sure all services are running.
2. From your web browser, navigate to http://www.example.com/phpmyadmin.
3. Type the name of the database you want to use for your Opencart installation into the Create new database
field. For example, type opencart.
4. Leave the other settings at their default values and click on Create to create a new database.
5. After your installation completes, your newly created database is shown on the drop-down list box on the left panel.


Enabling cURL support in PHP

cURL is a set of functions that allow programs to communicate with many different types of servers using different types of protocols. We shall not go into the technical details of how cURL functions are used by PHP but you need to know that cURL is used by certain shipping and payment modules in opencat to connect to external sites to send or retrieve information. To enable cURL support in your PHP configuration for your local XAMPP server, edit the file <xampphome>/apache/bin/php. ini and remove the semicolon in front of the words “extension=php_curl.dll” as shown in the following code snippet. Restart the Apache service in your XAMPP Control Panel after making your changes.

;extension=php_curl.dll

extension=php_curl.dll


Step 4: Installing Opencart

1.Download opencart from the website. Unzip it.
2.In your C:\Server\xampp\htdocs folder create a new folder called shop.
3.Paste the contents of the upload file (from the unzipped opencart folder) in this folder.
4.Open http://www.example.com/shop in your browser
5.Follow the steps for installation.
6.Important values for installation as below:

database host: localhost
database username: root
database password: leave blank
database name: opencart
admin userid and password: as you like.

Step 5: Contratulations!

If everything went well you should be able to access your test shop with the following urls

Shop URL: http://www.example.com/shop
Admin url: http://www.example.com/shop/admin


Enjoy!
Last edited by i2Paq on Tue Jun 08, 2010 7:22 pm, edited 1 time in total.
Reason: Title fix

www.beeshop.se
Starta webbshop, Starta e-butik, Starta e-handel


Active Member

Posts

Joined
Wed Aug 26, 2009 8:54 am
Location - Sweden

Post by dpDesignz » Tue Jun 08, 2010 7:49 am

Step 2: Setup local domain
1. Edit the file C: \WINDOWS\system32\dr ivers\etc\hosts with a text editor. Change the drive letter (C:)
to match your own computer setup.
2. Add the following lines to the end of the file.

127.0.0.1 http://www.example.com # For browser access

3. Remember to save the contents of the file.
You should now be able to use “localhost” and “www.example.com” interchangeably when accessing your web
server via a web browser.
This is an very helpful guide, but I'm still a tad confused on this part. I edited the hosts file inserting the

Code: Select all

127.0.0.1 http://www.example.com # For browser access
but when I direct my web browser to www.example.com, it says there's no webpage there. Is there anything I may have done wrong?

Thanks
dpDesignz

http://dpDesignz.webs.com Web & Publication Designer


User avatar
New member

Posts

Joined
Thu Jun 03, 2010 1:45 pm
Location - Waikato, New Zealand

Post by Davex » Thu Jun 24, 2010 5:42 am

Hi vimal,
first of all thnx for this excellent guide.

All works fine but the same problem: to point the shopping site I must type
http://localhost/store
(I have change shop with store)

If I try to see the page from www.ilgaddastore.com (yes, I have change this one also) or example.com
I have Impossible to contact the server.

i want to clarify I have change the host in windows and the httpd in Apache as you wrote.
However I have changed ServerName localhost:80 ServerName http://www.example.com:80
with three lines as
ServerName localhost:80
ServerName http://www.example.com:80
ServerName http://www.ilgaddastore.com:80
because all in one line gave me error.

Have I make some mistake somewhere?

Thnx a lot for your reply
Davex

Newbie

Posts

Joined
Thu Jun 24, 2010 4:45 am

Post by fido-x » Fri Jun 25, 2010 11:18 am

The problem is you put an "http://" in front of everything:
vimal wrote:Step 2: Setup local domain
1. Edit the file C: \WINDOWS\system32\dr ivers\etc\hosts with a text editor. Change the drive letter (C:)
to match your own computer setup.
2. Add the following lines to the end of the file.

127.0.0.1 http://www.example.com # For browser access

3. Remember to save the contents of the file.
You should now be able to use “localhost” and “www.example.com” interchangeably when accessing your web
server via a web browser.
Wrong!
The line should read:

Code: Select all

127.0.0.1 www.example.com # For browser access
Davex wrote:However I have changed ServerName localhost:80 ServerName http://www.example.com:80
with three lines as
ServerName localhost:80
ServerName http://www.example.com:80
ServerName http://www.ilgaddastore.com:80
because all in one line gave me error.

Have I make some mistake somewhere?
Yes, you have made a mistake. You can only have ONE ServerName directive in your Apache config file. Others are accessed as "Virtual Hosts". Pick the one you want to use, and delete the others (or comment them by putting a # at the beginning of the line), and DON'T put "http://" in front of it. For example:

Code: Select all

ServerName www.example.com:80
NOTE: Do NOT put "http://" in front of it, otherwise your browser will be trying to find "http://http://www.domain.com".

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by Davex » Mon Jun 28, 2010 12:45 am

thnx for the reply!
Now it work fine.

Newbie

Posts

Joined
Thu Jun 24, 2010 4:45 am

Post by fido-x » Mon Jun 28, 2010 1:32 am

S'orright! ;D

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by Davex » Wed Jun 30, 2010 3:51 pm

;D

Newbie

Posts

Joined
Thu Jun 24, 2010 4:45 am

Post by webvet » Fri Jul 16, 2010 6:31 pm

Have followed this thread and successfully installed XAMPP on desktop!

It is working great through "localhost" and no problems at all. However, I am struggling to set up a local domain despite following the steps above (incl Fido-X additions).

I think I have missed something in:
Step 2: Setup local domain
1. Edit the file C: \WINDOWS\system32\dr ivers\etc\hosts with a text editor. Change the drive letter (C:)
to match your own computer setup.
I haven't found where to change the drive letter in this file? It is no doubt an obvious mistake, but I just can't see it!!! Can anyone put me out of my misery...

Genuine, Honest Opencart Support @ http://webvetservices.com


User avatar
Active Member

Posts

Joined
Thu May 14, 2009 2:04 am
Location - Shropshire, UK

Post by Davex » Sat Jul 17, 2010 6:32 am

don t change the letter C:/ if you have all installed on it.
Only to change if you have a second hard disk (e.g. D:/) and have installed O.C. on it

bye
DaveX

Newbie

Posts

Joined
Thu Jun 24, 2010 4:45 am

Post by mooki » Tue Jul 27, 2010 2:54 am

Davex wrote:don t change the letter C:/ if you have all installed on it.
Only to change if you have a second hard disk (e.g. D:/) and have installed O.C. on it

bye
DaveX
Hi, can you elaborate? I saved my xampp on D:/ and O.C on D:/. But I tried to edit it there isn't anything to change for the drives.

These are the only things on it;
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

Can you explain in details how to change the drive? I'm a newbie.. ???

Thanks!

Newbie

Posts

Joined
Tue Jul 27, 2010 12:31 am

Post by lubbegubben » Wed Jan 19, 2011 7:31 am

[quote][/quote]Enabling cURL support in PHP

cURL is a set of functions that allow programs to communicate with many different types of servers using different types of protocols. We shall not go into the technical details of how cURL functions are used by PHP but you need to know that cURL is used by certain shipping and payment modules in opencat to connect to external sites to send or retrieve information. To enable cURL support in your PHP configuration for your local XAMPP server, edit the file <xampphome>/apache/bin/php. ini and remove the semicolon in front of the words “extension=php_curl.dll” as shown in the following code snippet. Restart the Apache service in your XAMPP Control Panel after making your changes.

;extension=php_curl.dll

extension=php_curl.dll

Hi,

Thanx for a great guide, however I have a problem enabling cURL.
I tried to find the file mentioned below to change it but it isn´t there at all, how can that be?
Could it be somwhere else? I have a fresh install of XAMPP and as far as I know cURL should be included.

Oh, btw, I´ve installed opencart allready so I hope it´s possible to get that cURL going after installation.

Please help me out on this one!
I have opencart_v1.4.9.3 installed on Vista 64-bit.

Best regards
lubbegubben

Newbie

Posts

Joined
Wed Jan 19, 2011 7:18 am

Post by cckystar » Sat May 28, 2011 12:41 am

I have a same problem. Can not find a way to enable Curl after intall Xampp local server to test. The file is not there.
Can anyone help? I am very appreciate.

Thanks!

Newbie

Posts

Joined
Sat May 28, 2011 12:36 am

Post by SXGuy » Sat May 28, 2011 1:12 am

Curl runs fine for me on my XAMPP local server.

Can i make a suggestion to your guide.

You say that you should install FTP, but personally this is abit worthless, as all files are stored in a folder locally, there is no need to use ftp on a local host.

Just make a shortcut to the domain folder on your desktop and transfer files that way.

Other than that, good job.

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by Moggin » Sat May 28, 2011 1:21 am

cckystar wrote:I have a same problem. Can not find a way to enable Curl after intall Xampp local server to test. The file is not there.
Can anyone help? I am very appreciate.

Thanks!
On my Xampp installation, the php.ini file is located at xampp/php/php.ini.
You should be able to enable cURL there.

Active Member

Posts

Joined
Wed May 05, 2010 4:56 am

Post by cckystar » Sun May 29, 2011 12:26 pm

I only see php 69Kb ini-development and php 70Kb ini-production File. There no php.ini in my Wampp.

Newbie

Posts

Joined
Sat May 28, 2011 12:36 am

Post by Moggin » Sun Jun 05, 2011 3:04 am

ah OK. You said you had Xampp in your first post. I don't use Wamp, but maybe this will help
http://www.phpmind.com/blog/2011/02/how ... l-in-wamp/

Active Member

Posts

Joined
Wed May 05, 2010 4:56 am

Post by wangllam » Tue Dec 06, 2011 3:00 pm

leave name

Newbie

Posts

Joined
Mon Dec 05, 2011 9:16 pm

Post by sudheerphp » Wed Jan 30, 2013 3:23 pm

Step 2: Setup local domain
1. Edit the file C: \WINDOWS\system32\dr ivers\etc\hosts with a text editor. Change the drive letter (C:)
to match your own computer setup.

can you eloborate this..

Thanks in adv.

Newbie

Posts

Joined
Thu Jan 24, 2013 8:22 pm

Post by sudheerphp » Wed Jan 30, 2013 3:26 pm

Hi to all,
After installing opencart on ubantu i got this error msg on the screen
"dont forgot to delete the installed folder".
more over LOGIN as Admin
in that page also it showing the same arror message i.e;
"dont forgot to delete the installed folder".
can anyone help me out.

Thanks in adv.

Newbie

Posts

Joined
Thu Jan 24, 2013 8:22 pm

Post by butte » Mon Jun 03, 2013 3:03 am

By now, essentially 120 days afterward, that latter has undoubtedly been resolved, but for others' benefit it's still worth answering. The following basic idea is systematically noted in every version of the installers' instructions. On a local machine locally accessed the installer files are of minor consequence unless it's also made publically accessible, while on a production box which is publically accessible the installer files are a supreme security risk, because they give immediate access to database and administrative details.

(1) Delete the /install/ directory (and everything in it in the same stroke) as soon as you are done installing or upgrading OC. If you need it, again, it will still be in the OC .zip file's /upload/install/ where you got it the first time.

(2) The reminder to remove /install/ is a Warning reminder inside OC itself. It is not an "error" in the program.
Last edited by butte on Fri Dec 20, 2013 12:29 am, edited 1 time in total.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am
Who is online

Users browsing this forum: No registered users and 10 guests