Plcae Of Framework
#1
Posted 14 October 2012 - 04:34 AM
now i want to use 1 frame work for all of them, where i should upload it and how can i assign Path?
now,what i did? i uploaded for each account 1 framework folder behind public_html folder.
#2
Posted 14 October 2012 - 06:29 AM
Maziar, on 14 October 2012 - 04:34 AM, said:
now i want to use 1 frame work for all of them, where i should upload it and how can i assign Path?
now,what i did? i uploaded for each account 1 framework folder behind public_html folder.
you can upload it anywhere in your server but it's better to don't upload it to a web accessible directory like your webroot
and you can assign framework path in Entry Script (index.php)
#4
Posted 15 October 2012 - 07:43 AM
- Server
- yii (shouldn't be accessible via web) => can/should be a symlink
- framework
- yii.php
- framework
- user 1
- public_html (e.g. DocumentRoot of user 1) => Yii App 1
- index.php with path to framework: ../../yii/framework/yii.php
- protected
- ...
- public_html (e.g. DocumentRoot of user 1) => Yii App 1
- user 2
- public_html (e.g. DocumentRoot of user 2) => Yii App 2
- index.php with path to framework: ../../yii/framework/yii.php
- protected
- ...
- public_html (e.g. DocumentRoot of user 2) => Yii App 2
- ...
- yii (shouldn't be accessible via web) => can/should be a symlink
#5
Posted 16 October 2012 - 04:31 AM
now i am uploading for each user in behind his public_html.
i made PS and attach it for you, this is my server root's capture
Attached File(s)
-
server root.jpg (168.1K)
Number of downloads: 10
#6
Posted 16 October 2012 - 12:01 PM
index.php in root of app, and yiic.php in protected needs to be changed:
// change the following paths if necessary $yii=dirname(__FILE__).'/../yii/framework/yii.php';
Of course, put the absolute path to Yii on your server.
No need to symlink anything.
#7
Posted 17 October 2012 - 05:42 AM
I've stored the framework in /usr/local/share/
#8
Posted 18 October 2012 - 05:49 AM
i stored the framework in /usr/local/share/ as you said,
now in index.php in root of app what should i say?
thanks for you responds
#9
Posted 18 October 2012 - 03:40 PM
// change the following paths if necessary $yii=dirname(__FILE__).'/../yii/framework/yii.php';
What exactly is it that you don't understand?
#10
Posted 18 October 2012 - 03:55 PM
now what you will do? for each account for each client you want to upload Framework
of course this is not a best way and standard way,
it should be one way to place framework somewhere and all those 100 project for different clients refer to that Framework where is placed.
i hope that you got it...
#11
Posted 18 October 2012 - 04:22 PM
For example, if the clients have their stuff in /home/username/stuff, then put Yii in /var/www/yii or any other directory on the server where the webserver has read rights.
Then users use the absolute path to where Yii is placed, like:
// change the following paths if necessary $yii = '/var/www/yii/framework/yii.php';
#12
Posted 18 October 2012 - 05:12 PM
great, i should put absolute path
again , thank you for your help,

Help













