Uploading Application To Host

I created a simple web app for my wife’s aunt using yii. She had a site on Dot5hosting so I didn’t have a choice of hosts. I got errors saying the yii files could not be found and that php extensions could not be found. I tried moving things and editing files to no avail. I didn’t have a lot of time to figure it out. Since the site is mostly static pages, I uploaded html to get the thing up and running, just without the admin features that would allow her to edit content.

Since I now have time to work on this, I would like to know starting from scratch what I need to upload and where to get a yii site working, as well as any edits I need to make. I don’t know the first thing about webhosts, so bear with me. What I do know is that php and mysql work. I was able to access the db, select data and display it in a simple test script. The file manager allows me to create folders inside and outside of “public_html”, all under “root”. I can also edit php.ini.

There’s a file README in Yii archive.

Guess why it has such a name :P

Also read this:


First you must learn yii read the blog tutorial

Thanks. I admit I may not be cut out for this. I’ve read the documentation and talked to some people about this and I’m clueless. It would seem that if I uploaded yii to a directory and my scripts point to that directory, I wouldn’t get file not found errors. I was hoping that someone would have a list of steps of what to upload and where, and what changes would be need to make something that works on localhost work on the web.

Ok, here’s my current layout:

All the files that need to be accessible via web (js, css, images), "protected" folder and index.php are placed under DocumentRoot.

"Framework" folder is placed one or two levels higher.

Here’s the content of yii’s index.php


// change the following paths if necessary

$yii = dirname(__FILE__).'/../framework/yii.php';

$config = dirname(__FILE__).'/protected/config/main.php';


You can place framefork to whatever you like, just make sure that index.php is accessible from the web and can load yii lib.

Yii can do it for you if you use run yiic.php webapp /path/to/your/webroot.


Thanks, that helped and I have it working now.