开发者

Setting up Yii on Shared Server

I wish to use a PHP Framework such as Yii, however, it seems to set this up I need access to a terminal or console. Unfortunately my only access to the 开发者_运维问答server is via an FTP client as it's shared hosting.

Does this rule Yii out as a framework?


all you need to do is

1 - have a copy of yii framework folder

2 - generate a new yiic webapp folder

3 - upload both folders, the framework folder can go to some hidden place yoursite.com/wawa/framework/yii, and you can just upload the files in your webapp folder to yoursite.com/

4 - edit the index.php in your generated web app, so it know where your framework/yii folder is. than you are set

5 - just make different copy of your webapp folder, so you don't need to generate them if you dont want to. just use different names, wont make a difference, as long as the webapp index.php knows where your framework folder is, than it will work


According to this post you can generated all files on your computer and then just upload the files to your shared hosting.


You only need a terminal for developing on your local server (it isn't a good idea to develop directly on a shared server). To use it on a shared server just upload it.

In the strict sense you don't need a terminal. You could write your files yourself. The yiic program only creates a couple of php files.


I am first in Yii. Installed the application locally. FTP-ing the application to the share server in directory /home/sloki/user/h11741/sites/example.com/www then create abcd directory within /www and put framework into it.

Edit your index.php line 4 to be: $yii=dirname(FILE).'/abcd/framework/yii.php';

You will get error message like this

Application runtime path "/home/sloki/user/h11741/sites/example.com/www/protected/runtime" is not valid. Please make sure it is a directory writable by the Web server process.

Change permission of directories /protected/runtime and /assets to 777. Test the web, when success change again permission both directories to 775.

Gut lak.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜