Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to test site in local mode


ihmt

Recommended Posts

Before publishing anything, I would like to adapt, modify and test osCommerce locally , so that I can get a good idea of it's capabilities (and my limitations!).

 

I can't find any way of doing this locally (on my PC). It's not like calling up HTML pages that were previously downloaded. I always end up in editing mode. I can't find any way to execute the PHP files on my PC.

 

I've heard about localhost, but I don't know how to set this up. Any clues anyone?

I thought you were going to do it. You thought I was going to do it. We all thought somebody else was going to do it. At the end of the day, nobody did it.

That's teamwork.

Link to comment
Share on other sites

You need to set up a web server on your computer - so that you can view your osCommerce site on an 'Intranet' using 'localhost'.

 

There is a very good all-in-one package called XAMPP, which will automatically install all you need in one go. You'll find it here:

http://www.apachefriends.org/en

Once you have it installed on your computer, go to http://localhost/phpmyadmin and set up a blank database.

 

Then copy the osCommerce 'catalog' folder to your webpages folder, may also be called htdocs.

 

Then go to http://localhost/catalog/install and begin the installation procedure.

 

Once that's complete you will need to apply the php5 fix to admin/includes/classes/upload.php for the osCommerce 'admin' control panel to work.

 

On line 31 of that file, where it says $this = null; change it to unset($this);

 

Vger

Link to comment
Share on other sites

  • 1 month later...
"Then copy the osCommerce 'catalog' folder to your webpages folder, may also be called htdocs.

 

Then go to http://localhost/catalog/install and begin the installation procedure. "

 

Anyone please explain  me further how to do the above ?

 

 

If you have already installed XAMMP you will see a XAMPP_Start and XAMPP Stop. To start the localhost you need to XAMPP_Start.

 

If you have downloaded OSC it should be unzipped to the htdocs directory. I've installed mine in c:\xampp\htdocs\mysite\

 

With XAMPP running (and if you have created the empty mysql database) you should be able to open your browser and type http://localhost/mysite/install

 

The OSC installation routine should start and install the data to the mysql file and change you config.php to the localhost settings.

 

My conifg.php has this line

 

define('HTTP_SERVER', 'http://localhost'); // eg, http://localhost - should not be empty for productive servers

 

To sum up :

 

Install XAMPP on C

Copy OSC to a directory in the htdocs

Run XAMPP and use phpmyadmin to create a blank mysql database

Run XAMPP and use the OSC install routine to populate the database and the config.php file(s)

 

Once you can run it on localhost it saves a lot of hassles when making changes

Citizen of US Minor Outlying Islands

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...