| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| README.txt | 2011-12-08 | 1.8 kB | |
| shopping_portal_0.1.zip | 2011-12-08 | 199.1 kB | |
| shopping_portal.zip | 2011-12-01 | 212.7 kB | |
| Totals: 3 Items | 413.6 kB | 0 |
While writing these instructions, I think that LAMP server is properly installed on your machine, if it is not you can use any on-line documentation for installing LAMP server.
You should be logged in as root to configure the httpd or apache server.
Configuration of Mysql server:
1) Create a database "osp" in mysql server
mysql> create database "osp"
2) Restore the database
mysql -u root -p osp < shiping_portal.sql
3) Restore teh procedures
$ cd database-procedures
$ cat *.sql > all.txt
$ mysql -p -u root osp < all.txt
Configuration of apache server:
open /etc/httpd/conf/httpd.conf in some editor (vi prefered)
At the end of the file:
remove comment before
NameVirtualHost *:80
and add a virtual host with document root as your folder.
<VirtualHost *:80>
DocumentRoot /var/www/osp
ServerName xyz.com
ErrorLog logs/xyz.com-error_log
CustomLog logs/xyz.com-access_log common
</VirtualHost>
Configuration of application:
change the values of website name , database name , server, port , user and password accordingly.
edit conf/application.conf.php
<?php
$app['site_name']='Online Shopping Portal';
$app['site_url']='http://xyz.com'; // write 'http://localhost' it virtualhost not configured
$app['theme']='current';
?>
edit model/db.php
function connectDB(){
$db_dsn="mysql:dbname=shopping_portal;host=localhost;port=3306";
$db_user="username";
$db_passwd="password";
return new PDO($db_dsn,$db_user,$db_passwd);
}