Skip to content

Commit f01560c

Browse files
committed
fpplatform source code committed
1 parent 449b20f commit f01560c

File tree

3,076 files changed

+616174
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,076 files changed

+616174
-1
lines changed

README.md

Lines changed: 163 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,163 @@
1-
# fpplatform
1+
Installation Steps
2+
------------------
3+
4+
### Server Requirements
5+
6+
* PHP Version - 5.2.7+ (preferably 5.3.5)
7+
Extensions
8+
GD Version - 2.x+
9+
PCRE Version - 7.x+
10+
cURL version - 7.x+
11+
json version - 1.x+
12+
PDO
13+
Freetype
14+
mbstring
15+
PHP ionCube Loader
16+
php.ini settings
17+
max_execution_time - 180 (not mandatory)
18+
max_input_time - 6000 (not mandatory)
19+
memory_limit - 128M (at least 32M)
20+
safe_mode - off
21+
open_basedir - No Value
22+
display_error = On
23+
magic_quotes_gpc = Off
24+
* MySQL Version - 5.x
25+
* Apache - 1+ (preferably 2+)
26+
Modules
27+
mod_rewrite
28+
mod_deflate (not mandatory, but highly recommended for better performance–gzip)
29+
mod_expires (not mandatory, but highly recommended for better performance–browser caching)
30+
Recommended Linux distributions: Centos / Ubuntu / RedHat
31+
32+
### Initial Configurations
33+
34+
* Extract Files
35+
36+
Unzip the zip file
37+
38+
Upload the unzipped files in server.
39+
40+
* Need write permission for following folders
41+
42+
Note: The above folders need to be writable (Have to chmod to 655 or 755 or 775 depending upon the server configuration. Note: 777 is highly discouraged).
43+
44+
Make sure the permission as read,write and executable as recursively for the below directories
45+
46+
app/Config
47+
app/media
48+
app/tmp
49+
app/webroot (Should not set permission recursively)
50+
app/webroot/js
51+
app/webroot/img
52+
app/webroot/css
53+
app/Console/Command/cron.sh
54+
app/Console/Command/CronShell.php
55+
core/lib/Cake/Console/cake
56+
core/vendors/securimage
57+
58+
* Change following item in app/config/config.php
59+
60+
$config['site']['domain'] = 'fpplatform'; // change to your domain name (only name like "yourdomain"). also you need to set this only when site routing url is set as subdomain.
61+
62+
* Updating site logo
63+
64+
There are few places where site logo are located. To change those logo, you need to replace your logo with exact name and resolution in the following mentioned directories.
65+
* app/webroot/img/logo - logo.png - 131 x 46
66+
* app/webroot - favicon.ico - 16 x 16
67+
68+
### Configure Your Database
69+
70+
The sql file 'fpplatform_with_empty_data.sql' is also attached, which is located in 'app/config/sql'. import the database through phpmyadmin or any other tool.
71+
After importing the sql database, do not truncate any data directly from the database. All the data in the imported database are required. Removing unwanted cities can be done through administrator end which will be explained later in the following steps.
72+
In app/config/database.php, we need to change host, login, password, database. Update that in 4 places (For setting up master/slave setup, get professional help and it's not thoroughly tested)
73+
74+
(
75+
'host' => 'localhost',
76+
'login' => 'dbuser',
77+
'password' => 'dbpassword',
78+
'database' => 'fpplatform'
79+
)
80+
81+
### Configure Apache
82+
83+
If you can reset 'DocumentRoot'
84+
85+
Reset your Apache DocumentRoot to /public_html/app/webroot/ by following means:
86+
87+
If you're on dedicated host, reset DocumentRoot in httpd.conf with /public_html/app/webroot/
88+
If you're on shared host, reset your virtual directory to point to /public_html/app/webroot/
89+
90+
Note: This requirement is not mandatory, but highly preferred to skip the following tweaks in htaccess files.
91+
If you cannot reset 'DocumentRoot'
92+
93+
* Installing site directly in the root e.g., http://yourdomain.com/
94+
95+
Again, no need to tweak 'htaccess' files.
96+
Installing site as a sub-folder e.g., http://yourdomain.com/myfolder
97+
98+
app/.htaccess ensure the RewriteBase as below:
99+
100+
RewriteBase /myfolder/app/
101+
102+
app/webroot/.htaccess ensure the RewriteBase as below:
103+
104+
RewriteBase /myfolder/
105+
106+
### Setting up cron
107+
108+
* Setup the cron with anyone of the following command,
109+
110+
*/2 * * * * /home/public_html/app/Console/Command/cron.sh 1>> /home/public_html/app/tmp/error.log 2>> /home/public_html/app/tmp/error.log
111+
112+
Also you need to edit '/home/public_html/app/Console/Command/cron.sh' file to change the folder path of each command. Note: Please replace ”/home/public_html/” with your folder path.
113+
114+
(or)
115+
116+
php4 is enabled for shell command in some server, above command will not work. In that case, you can use anyone of the following commands,
117+
118+
* Command 1:
119+
120+
Check php installed path in server using ssh command. which php or which php5. It will give output like /usr/bin/php5.
121+
122+
vi /home/public_html/core/lib/Cake/Console/cake
123+
124+
exec php -q ${LIB}cake.php -working "${APP}" "$@"
125+
126+
In the above file, change the php path with your server php5 installed path,
127+
128+
exec /usr/bin/php5 -q ${LIB}cake.php -working "${APP}" "$@"
129+
130+
(or)
131+
132+
* Command 2:
133+
134+
*/2 * * * * wget http://yourdomain.com/cron/main
135+
0 0 * * * wget http://yourdomain.com/cron/daily
136+
137+
(or)
138+
139+
* Command 3:
140+
141+
*/2 * * * * lynx http://yourdomain.com/cron/main
142+
0 0 * * * lynx http://yourdomain.com/cron/daily
143+
144+
(or)
145+
146+
* Command 4:
147+
148+
*/2 * * * * curl http://yourdomain.com/cron/main
149+
0 0 * * * curl http://yourdomain.com/cron/daily
150+
151+
### Verify Your Configuration
152+
153+
* Running site for the first time
154+
155+
Now run the site with http://yourdomain.com/ or http://yourdomain.com/myfolder
156+
After successful running of the site, login as admin using the below details in login form.
157+
158+
username: admin
159+
password: agriya
160+
161+
To change administrator profile details, click 'My Account' in the top menu, then edit the profile information.
162+
To change administrator password, click 'Change Password' in the top menu, then change the password.
163+

app/.htaccess

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# In local: in httpd/conf/projects/dev1base.conf :
2+
# alias /dev1base F:/projects/dev1base/trunk/..../webroot/
3+
4+
######################################
5+
# Root .htaccess
6+
# Case 1: When installing in root but without setting DOCUMENT_ROOT, e.g, http://www.example.com/ :
7+
# In the root above /app (say, public_html)
8+
# -->
9+
# Options +FollowSymLinks # needed for some hosts, especially GoDaddy
10+
#<IfModule mod_rewrite.c>
11+
# RewriteEngine on
12+
# RewriteBase /app/
13+
# RewriteRule ^$ webroot/ [L]
14+
# RewriteRule (.*) webroot/$1 [L]
15+
# </IfModule>
16+
# <--
17+
# Case 2: When installing in folder next to root, e.g., http://www.example.com/dev1base/ :
18+
# In the root above /app (say, public_html/dev1base/)
19+
# -->
20+
#<IfModule mod_rewrite.c>
21+
# RewriteEngine on
22+
# RewriteBase /dev1base/app/
23+
# RewriteRule ^$ webroot/ [L]
24+
# RewriteRule (.*) webroot/$1 [L]
25+
# </IfModule>
26+
27+
########################################
28+
# This .htaccess
29+
# Case 1: When installing in root but without setting DOCUMENT_ROOT, e.g, http://www.example.com/ :
30+
#<IfModule mod_rewrite.c>
31+
# RewriteEngine on
32+
# RewriteBase /app/
33+
# RewriteRule ^$ webroot/ [L]
34+
# RewriteRule (.*) webroot/$1 [L]
35+
# </IfModule>
36+
# Case 2: When installing in folder next to root, e.g., http://www.example.com/dev1base/ :
37+
#<IfModule mod_rewrite.c>
38+
# RewriteEngine on
39+
# RewriteBase /dev1base/app/
40+
# RewriteRule ^$ webroot/ [L]
41+
# RewriteRule (.*) webroot/$1 [L]
42+
# </IfModule>
43+
44+
<IfModule mod_rewrite.c>
45+
RewriteEngine on
46+
RewriteRule ^$ webroot/ [L]
47+
RewriteRule (.*) webroot/$1 [L]
48+
</IfModule>

0 commit comments

Comments
 (0)