osCommerce Online Merchant System
Introduction
You will find that open
source systems are usually written in PHP and systems such as content
management systems and shopping carts tend to use MySQL as their back-end
database for the simple reason that MySQL is also open source as oppose to
other DBMSs that maybe proprietary such as MS-Access and Oracle. MySQL is a database management system and so
it serves the same purpose as other DBMSs such as MS-Access, Oracle, SQL Server, FileMaker, dBASE, Clipper, and FoxPro.
A typical architecture
for hosting a shopping cart is as depicted in the diagram above. What the
diagram intends to emphasis are:
Note that you have a
folder on your F-Drive called the "public_html". This folder is actually on a server called
"homepages.shu.ac.uk". So any
files that you place in this folder could be a server-side php file. Note that MySQL server also runs on
"homepages.shu.ac.uk".
Setup
Note: Once the zip file is extracted, a directory called 'oscommerce'
followed by some version reference is created.
Not that all downloaded files are placed in this directory and a file
structure is also created
Note: Extraction of the files into 'public_html' is a convenient FTP transfer
of files on the server. This has been made possible because your 'public_html'
folder resides on the server (see diagram and notes above). Under normal circumstances, in absence of
student setup, you would have had to take the extra step of FTP transfer of
files to your root folder on Web server
Note: In the root folder of the installation (in 'shop' folder) you will
find a file named 'documentation. pdf'.
This file contains information that you will find useful in developing
your shop. You must keep and regularly
refer to this file. There is also
information for installing osCommerce in this file but for conciseness we have
included the required information in this file
Note: A back-end database details such as name of the MySQL server, username,
and password need to be written into two files within your shop installation.
These two files are '/shop/catalog/includes/configure.php' and
'/shop/catalog/admin/includes/configure.php'.
To begin with, these two files are not writeable. For the installation process to work, we need
to make the two files writeable. Also
note that after the installation process the access to the two files must again
be restricted if we are to ensure that 3rd parties will not be able to write to
them.
Crash course in
Unix:
ls |
list contents of a directory (folder) |
ls -l |
list contents of a directory (folder) with
details |
cd |
change directory |
cd .. |
change directory upwards (parent directory) |
chmod |
change permissions (more below) |
pwd |
get 'Web server
Root Directory' |
Navigate to
'/public_html/shop/catalog/' folder and change permission level for 'includes'
folder to '777'
At the prompt
type: chmod 777 includes
At the prompt
type: chmod 777 images
Navigate to
'/public_html/shop/catalog/includes/' folder and change permission level for
'configure.php' to '777'
At the prompt
type: chmod 777 configure.php
Navigate to
'/public_html/shop/catalog/admin/' folder and change permission level for
'includes' folder to '777'
At the prompt
type: chmod 777 includes
At the prompt
type: chmod 777 backups
Navigate to
'/public_html/shop/catalog/admin/includes/' folder and change permission level
for 'configure.php' to '777'
At the prompt
type: chmod 777 configure.php
Note: A back-end database structure and initial content will be downloaded
into your MySQL database. Note the 'WWW
Address' and Web server root directory, leave them as they are.
Note: Make sure to memorise your administrator username and password for future use. You will not be able to configure and manage the shop without them.
Note: We now need to do some checking to make sure that all the correct
details are written into the two 'configure.php' files.
Repeat this
process for 'configure.php' within the 'includes' folder in 'catalog/admin'
Note: There are warning messages at the top of
the page. This means that in order to
protect your installation you need to alter access levels to directories and
files back to their default values.
chmod 755 includes
chmod 644 includes/configure.php
chmod 755 admin/includes
chmod 644 admin/includes/configure.php