-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathINSTALL
More file actions
63 lines (42 loc) · 2.03 KB
/
Copy pathINSTALL
File metadata and controls
63 lines (42 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
=========== SHOP - advanced example of Limb3 based application ===========
Shop example includes:
1) Admin control panel
2) User authentication
3) Customer registration
4) Basic shop functionality including orders processing and tracking
To install shop example follow the steps below:
1) Unpack the archive in some directory that can be reached by your web-server, for example in /var/www/shop.
(here we're assuming that /var/www directory can be accessed by your web-server as http://localhost)
2) Make /var/www/shop/var directory writable for the web server:
$ chmod 777 /var/www/shop/var
3) Configure application database.
Using SQLite database
------------------------------
shop application uses SQLite database by default. Make sure:
a) You have enabled SQLite support in php.ini.
b) Database itself and database directory are writable for web server:
$ chmod 777 -R /var/www/shop/db
Using MySQL database
------------------------------
If you want to use MySQL as database then you need to create some database on MySQL server, e.g. "shop".
Fill this database with a dump file shipped with shop application in init directory, e.g.:
(assuming you have some valid database user 'user' with password 'secret')
$mysql -u user -p secret shop < /var/www/shop/init/db.mysql
To configure database settings for application you need to change /var/www/shop/settings/db.conf.php file , e.g.:
<?php
$conf = array('dsn' => 'mysql://user:secret@localhost/shop?charset=utf8');
?>
That is all.
Type in your favourite browser - http://localhost/shop/www
But you can also setup virtual host for this shop application:
1) Create shop VirtualHost in Apache config file(httpd.conf), something like this:
<VirtualHost *>
DocumentRoot /var/www/shop/www/
ServerName shop
ErrorLog logs/shop-error_log
CustomLog logs/shop-access_log common
</VirtualHost>
2) Put "shop" host name into /etc/hosts file(%WINDOWS%/system32/drivers/etc/hosts under Windows):
127.0.0.1 shop
3) Restart Apache
4) Open http://shop/ in your browser