Yii Framework Forum: Plcae Of Framework - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Plcae Of Framework Rate Topic: -----

#1 User is offline   MaziTizeh 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 61
  • Joined: 12-June 12
  • Location:U.A.E

Posted 14 October 2012 - 04:34 AM

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.
0

#2 User is offline   Reza m 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 148
  • Joined: 07-March 12

Posted 14 October 2012 - 06:29 AM

View PostMaziar, on 14 October 2012 - 04:34 AM, said:

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)
0

#3 User is offline   MaziTizeh 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 61
  • Joined: 12-June 12
  • Location:U.A.E

Posted 14 October 2012 - 08:06 AM

sorry, but you didn't get me!!!
read it carefully please
0

#4 User is offline   kokomo 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 281
  • Joined: 23-July 10

Posted 15 October 2012 - 07:43 AM

I think Reza's answer is correct. See also this wiki for more informations.

  • Server
    • yii (shouldn't be accessible via web) => can/should be a symlink
      • framework
        • yii.php
    • user 1
      • public_html (e.g. DocumentRoot of user 1) => Yii App 1
        • index.php with path to framework: ../../yii/framework/yii.php
        • protected
        • ...
    • user 2
      • public_html (e.g. DocumentRoot of user 2) => Yii App 2
        • index.php with path to framework: ../../yii/framework/yii.php
        • protected
        • ...
    • ...
If your system (server) looks different please describe...
0

#5 User is offline   MaziTizeh 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 61
  • Joined: 12-June 12
  • Location:U.A.E

Posted 16 October 2012 - 04:31 AM

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

Attached File(s)


0

#6 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 16 October 2012 - 12:01 PM

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.
"Less noise - more signal"
0

#7 User is offline   Coksnuss 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 140
  • Joined: 14-May 09

Posted 17 October 2012 - 05:42 AM

Check out http://en.wikipedia....rarchy_Standard in order to find a suitable directory for your framework.
I've stored the framework in /usr/local/share/
0

#8 User is offline   MaziTizeh 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 61
  • Joined: 12-June 12
  • Location:U.A.E

Posted 18 October 2012 - 05:49 AM

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
0

#9 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 18 October 2012 - 03:40 PM

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?
"Less noise - more signal"
0

#10 User is offline   MaziTizeh 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 61
  • Joined: 12-June 12
  • Location:U.A.E

Posted 18 October 2012 - 03:55 PM

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...
0

#11 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 18 October 2012 - 04:22 PM

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';

"Less noise - more signal"
1

#12 User is offline   MaziTizeh 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 61
  • Joined: 12-June 12
  • Location:U.A.E

Posted 18 October 2012 - 05:12 PM

thanks a lot jacmoe,
great, i should put absolute path
again , thank you for your help,
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users