Answer the question
In order to leave comments, you need to log in
Yii on a dedicated server with PLESK installed?
Given: There is a server with plesk, there is access via SSH and all other Dedik goodies. There are many sites written in Yii, and each had its own directory with the framework copied.
Question: How to make it so that there is only one directory ( /var/www/vhosts/framework/yii-1.1.13 ) where to place the framework files. And what should be done in order for all sites to work with this directory.
If you write in index.php, which is in /var/www/vhosts/site.com/httpdocs , the path is like
// change the following paths if necessary<br>
$yii=dirname(__FILE__).'/../../framework/yii-1.1.13/yii.php';<br>
$config=dirname(__FILE__).'/protected/config/main.php';<br>
Answer the question
In order to leave comments, you need to log in
it is correct to write in include_path to the directory where the framework will be located, for example:
include_path = ".:/var/www/vhosts/framework"
$yii='yii-1.1.13/yii.php';
There are several options:
1 - connect the framework in applications from one place
2 - configure the include_path in php
3 - make symlinks to the folder with the framework
4 - use unionfs (this is if you want to be able to edit files independently for each site)
I would probably choose the 2nd or 3rd option
Error 500 is no access to the framework, give the folder and files normal permissions.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question