Starting Out

Hi Guys,

I need a bit of help here…

I am just getting started with Yii. I am trying to upload it onto a shared server (I have a hosting package with 123-reg).

I know that I have to create the web app on my computer and then upload it in ftp, as I do not have the required access on to the server to create the web app online.

I have created the demo web app and tried to upload it to root but I get the error:

[i]Warning: require_once(/websites/123reg/LinuxPackage99/ol/iv/er/ [function.require-once]: failed to open stream: No such file or directory in /websites/123reg/LinuxPackage99/ol/iv/er/ on line 12

Fatal error: require_once() [function.require]: Failed opening required ‘/websites/123reg/LinuxPackage99/ol/iv/er/’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /websites/123reg/LinuxPackage99/ol/iv/er/ on line 12[/i]

I think this is something to do with it trying to locate the yii.php in framework, but I cant make it work…

Am I making any sense? Anyone have any ideas?


Have you checked that your host meets Yii requirements?

Anyway, it seems like a relative path problem in index.php. Can you check and/or post its contents?

Thanks for getting back to me… it meets yii requirements… the index.php is as follows…


// change the following paths if necessary



// remove the following lines when in production mode

defined(‘YII_DEBUG’) or define(‘YII_DEBUG’,true);

// specify how many levels of call stack should be shown in each log message

defined(‘YII_TRACE_LEVEL’) or define(‘YII_TRACE_LEVEL’,3);



And you are sure demo/YiiRoot/framework/yii.php exists, of course?

Pay also attention to the path and filenames case, especially if your develop on Windows.

Have you also checked YiiRoot permissions and demo folder permissions? I think there have been some discussions about permissions problems on this forum.

I’m sorry I can’t give an exact answer. But I think it’s good to eliminate some trivial possibilities.

Thank you for your help… I am new to Yii… so will just keep plugging away, hopefully find the answer :)


Rather than starting a new thread, I thought I would bump this.

I bought shared hosting with 213reg. I am attempting to upload a Yii site to the account but it seems to me that 123reg only allows the creation of new folders within /public i.e. I cannot create a non web-accessible folder to hold the framework in.

Can anyone confirm is this is correct? If so, how risky is it to have the yiiroot folder in the /public directory?



Not risky when using Apache because the htaccess file in yii/framework has a deny from all statement in it. :)

However, it’s better practice to move it out, but if you can’t, you should be fine.

Thank you!

I have seen an article somewhere showing some way to bypass the htaccess protection but it seemed to be a very unlikely scenario so, given you are a mod, I will take your word for it!