Safe and Sound is an osCommerce website I built for a car audio supplier using the PHP Language and MySQL database.
Here are some screenshots of the website:
These are the instructions to setup the website running locally using WAMP Server.
Download the required software here:
- Install wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b.exe
- Change WAMP port number to stop conflicts with IIS:
- Open: C:\wamp\bin\apache\apache2.4.9\conf\httpd.conf
- Search for: #Listen
- Change both ports to: 7080
- Restart Wamp
This project requires you use PHP Version 5.3.28 for deprecated functions and register_globals.
- Extract contents of php-5.3.28-Win32-VC9-x86.zip to C:\wamp\bin\php\php5.3.28\
- Create a copy of C:\wamp\bin\php\php5.3.28\php.ini-development.ini and rename it php.ini
- Make the following changes to php.ini
error_log = "c:/wamp/logs/php_error.log"
extension_dir = "c:/wamp/bin/php/php5.3.28/ext/"
upload_tmp_dir = "c:/wamp/tmp"
date.timezone = 'Europe/London'
session.save_path = "c:/wamp/tmp"
register_globals = On
register_long_arrays = On
display_errors = Off
extension=php_mbstring.dll
extension=php_mysql.dll
extension=php_mysqli.dll
For convenience you can download the edited file here
- Save a copy of php.ini as phpForApache.ini in the same directory. WampServer copies this file to the Apache server when you select the version from the menu.
- Copy the C:\wamp\bin\php\php5.5.12\wampserver.conf file from the existing PHP version into the newly installed version
- Make the following changes to c:\wamp\wampmanager.ini
Search for [phpVersion] and add the following:
Type: item; Caption: "5.3.28"; Action: multi; Actions:switchPhp5.3.28
At the end of the section (before ;WAMPPHPVERSIONEND), add the following code:
[switchPhp5.3.28]
Action: service; Service: wampapache; ServiceAction: stop; Flags: ignoreerrors waituntilterminated
Action: run; FileName: "c:/wamp/bin/php/php5.3.28/php-win.exe";Parameters: "switchPhpVersion.php php5.3.28";WorkingDir: "c:/wamp/scripts"; Flags: waituntilterminated
Action: run; FileName: "c:/wamp/bin/php/php5.3.28/php-win.exe";Parameters: "-c . refresh.php";WorkingDir: "c:/wamp/scripts"; Flags: waituntilterminated
Action: run; FileName: "net"; Parameters: "start wampapache"; ShowCmd: hidden; Flags: waituntilterminated
Action: resetservices
Action: readconfig;
For convenience you can download the edited file here
Enable mod_rewrite in Apache configuration.
- Edit C:\wamp\bin\apache\apache2.4.9\conf\httpd.conf
- Search for LoadModule rewrite_module modules/mod_rewrite.so
- Remove the comment symbol '#' to activate the mod_rewrite.so module
- Click the Wamp server icon in the task bar and Apache -> Service -> Restart Service
- Open phpMyAdmin (http://localhost:7080/phpmyadmin), select the SQL tab and enter the following commands and click Go to create the database and user account:
CREATE DATABASE `web13-sns`
CREATE USER 'web13-sns'@'localhost' IDENTIFIED BY 'admin';
USE `web13-sns`;
GRANT ALL PRIVILEGES ON `web13-sns`.* TO 'web13-sns'@'localhost';
FLUSH PRIVILEGES;`
- Select the web13-sns database in the left column tree view, click the Import tab and choose the web13-sns.sql file from the source code folder and press Go
- Copy the contents of the safensound folder to the C:\wamp\www\ folder
- Open http://localhost:7080/safensound in a browser and you should see the homepage
- The osCommerce website admin page can be accessed at http://localhost:7080/safensound/admin