Yii Framework Forum: Starting Out - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Starting Out Rate Topic: -----

#1 User is offline   Daniel New To Yii 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 01-May 12

Posted 01 May 2012 - 01:06 PM

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:

Warning: require_once(/websites/123reg/LinuxPackage99/ol/iv/er/oliverinnovations.co.uk/public_html/haggle/demo/YiiRoot/framework/yii.php) [function.require-once]: failed to open stream: No such file or directory in /websites/123reg/LinuxPackage99/ol/iv/er/oliverinnovations.co.uk/public_html/haggle/demo/index.php on line 12

Fatal error: require_once() [function.require]: Failed opening required '/websites/123reg/LinuxPackage99/ol/iv/er/oliverinnovations.co.uk/public_html/haggle/demo/YiiRoot/framework/yii.php' (include_path='.:/usr/share/pear:/usr/share/php') in /websites/123reg/LinuxPackage99/ol/iv/er/oliverinnovations.co.uk/public_html/haggle/demo/index.php on line 12


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?
0

#2 User is offline   bennouna 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,180
  • Joined: 05-January 12
  • Location:Morocco

Posted 01 May 2012 - 01:21 PM

Hello

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?
0

#3 User is offline   Daniel New To Yii 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 01-May 12

Posted 01 May 2012 - 02:22 PM

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


<?php

// change the following paths if necessary
$yii=dirname(__FILE__).'/YiiRoot/framework/yii.php';
$config=dirname(__FILE__).'/protected/config/main.php';

// 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);

require_once($yii);
Yii::createWebApplication($config)->run();
0

#4 User is offline   bennouna 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,180
  • Joined: 05-January 12
  • Location:Morocco

Posted 01 May 2012 - 03:35 PM

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.
0

#5 User is offline   Daniel New To Yii 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 01-May 12

Posted 01 May 2012 - 03:36 PM

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

#6 User is offline   U4EA 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 165
  • Joined: 04-November 12

Posted 07 January 2013 - 04:31 PM

Hi,

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?

Thanks,

U4EA
0

#7 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,698
  • Joined: 10-October 10
  • Location:Denmark

Posted 07 January 2013 - 04:56 PM

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.
"Less noise - more signal"
0

#8 User is offline   U4EA 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 165
  • Joined: 04-November 12

Posted 07 January 2013 - 05:00 PM

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!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users