m7dmh
(M7d Mh)
October 14, 2012, 9:34am
1
in my dedicated server i have so many project with different account
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.
reza.m
(Reza Mms)
October 14, 2012, 11:29am
2
in my dedicated server i have so many project with different account
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)
m7dmh
(M7d Mh)
October 14, 2012, 1:06pm
3
sorry, but you didn’t get me!!!
read it carefully please
kokomo
(Mwerlberger85)
October 15, 2012, 12:43pm
4
I think Reza’s answer is correct. See also this wiki for more informations.
Server[list]
yii (shouldn’t be accessible via web) => can/should be a symlink[list]
framework[list]
yii.php
[/list][*]user 1
public_html (e.g. DocumentRoot of user 1) => Yii App 1[list]
index.php with path to framework: ../../yii/framework/yii.php
protected
…
[/list][*]user 2
public_html (e.g. DocumentRoot of user 2) => Yii App 2[list]
index.php with path to framework: ../../yii/framework/yii.php
protected
…
[/list][*]…[/list][/list]If your system (server) looks different please describe…
m7dmh
(M7d Mh)
October 16, 2012, 9:31am
5
thank you for your explain , but where i should upload framework?
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
jacmoe
(Jacob Moena)
October 16, 2012, 5:01pm
6
You can upload the framework anywhere, as long as it’s accessible to the user accounts.
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.
Coksnuss
(Schanz15)
October 17, 2012, 10:42am
7
Check out http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard in order to find a suitable directory for your framework.
I’ve stored the framework in /usr/local/share/
m7dmh
(M7d Mh)
October 18, 2012, 10:49am
8
thank you Coksnuss ,
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
jacmoe
(Jacob Moena)
October 18, 2012, 8:40pm
9
Take a look at index.php:
// change the following paths if necessary
$yii=dirname(__FILE__).'/../yii/framework/yii.php';
What exactly is it that you don’t understand?
m7dmh
(M7d Mh)
October 18, 2012, 8:55pm
10
jacmoe , imagine you have 1 dedicated server and you have 100 project for different client , and all of them you use Yii framework,
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…
jacmoe
(Jacob Moena)
October 18, 2012, 9:22pm
11
That totally depends on how the server is set up.
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';
m7dmh
(M7d Mh)
October 18, 2012, 10:12pm
12
thanks a lot jacmoe,
great, i should put absolute path
again , thank you for your help,