B
B
Bamburillo2013-03-20 14:25:20
Plesk
Bamburillo, 2013-03-20 14:25:20

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>

it doesn't work, gives a 500 error

Answer the question

In order to leave comments, you need to log in

4 answer(s)
B
Borro, 2013-03-20
@Bamburillo

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"

restart apache, then connect yii like this:
$yii='yii-1.1.13/yii.php';

S
Sergey Cherepanov, 2013-03-20
@fear86

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

I
Igogo2012, 2013-03-20
@Igogo2012

error_reporting enable

P
Puma Thailand, 2013-03-20
@opium

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 question

Ask a Question

731 491 924 answers to any question