Where Do I Unzip Yii To?!


(Jmail2) #1

Confused on step 1, LOL…

The Documentation contradicts itself right away:

"Unpack the Yii release file to a Web-accessible directory."

“Tip: Yii does not need to be installed under a Web-accessible directory.” :huh:

My WampServer installed to C:\wamp

so that’s C:\wamp\www as the root folder where a test php script runs fine.

Also in C:\wamp\ - long with "www" are other folders: logs,alias,lang,scripts,tmp,tools,bin and apps

I downloaded yii-1.1.12.b600af.zip and it contains 4 text files and 3 folders:

demo

framework

requirements

Where does it all go? And yes, I’ve Googled and found all sorts of different answers, but I’m still none the wiser!


(Jmail2) #2

After yet more searching, the docs, the wiki, Larry’s tutorial etc… still puzzled :blink:

Almost all of them say to put it in the webroot folder (C:\wamp\www in my case), against the tip

"Yii does not need to be installed under a Web-accessible directory."

Yet the requirements does need to be, and so I presume demos, like any project I create?

This wiki comment recommends folders away from webroot, one for each version of Yii, instead of replacing previous versions :

http://www.yiiframework.com/wiki/408/install-update-and-use-yii-with-wamp-server/#c10464

In the absence of any help, I’d be tempted to try :

  1. create a yii folder in C:\wamp so it’s at the same level as www, not under it

  2. unzip the zip’s single root folder (with the version number name) into the new C:\wamp\yii

  3. drill down into C:\wamp\yii\yii-1.1.12.b600af\ and move the demo and requirements folder into C:\wamp\www - i.e.

C:\wamp\www\requirements to run as http://localhost/requirements

leaving just the framework folder where it was : C:\wamp\yii\yii-1.1.12.b600af\framework

  1. attempt to configure everything to work :)

Am I anywhere near right?


(Andrei) #3

Hi,

That’s it ! Not “all folders” need to be under the root ;)


(Jmail2) #4

Thanks, I’ll try that on Monday when I’m back at the office.

Cheers


(Jmail2) #5

Thanks, all working well, I’ve added a comment to the docs


(Jmail2) #6

… which has been removed :blink:

My comment was as follows - in what world would this not be useful to someone as puzzled as I was…?

Example : Windows 7 and WampServer

I downloaded yii-1.1.12.b600af.zip and it contained a yii-1.1.12.b600af/ folder, containing:

  • demos/ (demos)

  • framework/ (framework source files)

  • requirements/ (requirement checker)

  • CHANGELOG (describing changes in every Yii release)

  • LICENSE (license of Yii)

  • README (instructions)

  • UPGRADE (upgrading instructions)

I created a folder yii/ in my Wamp folder ( C:\wamp\yii ) so that it was outside the ‘webroot’ ( C:\wamp\www ).

I unzipped the download here, ending up with C:\wamp\yii\yii-1.1.12.b600af\framework etc.

I moved the requirements/ and demos/ folders into ‘webroot’ - i.e. C:\wamp\www\requirements

The requirements test ran fine as [i]localhost/requirements/index.php

[/i]

For the demos Hangman game to work ( localhost/demos/hangman/index.php )

I had to edit index.php :


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


(Cbull80) #7

I also think it is a good idea to move your protected folder for each application outside the web directory and update your index.php to point to the new location.

i.e. the following might be in your index.php file:

$config=dirname(FILE).’/../data/live/protected/config/main.php’;

the live folder would be under /data/live/protected and not under /public_html/data/live/protected

etc

By default the yiic tool will put it all in the same location (I guess it makes it easier for an auto tool).


(Jmail2) #8

I had another go and added a more general comment to Getting Started: Installation.

So far it has remained in place :D

My more WAMPServer-specific comments ended up in the wiki at

http://www.yiiframework.com/wiki/408/install-update-and-use-yii-with-wamp-server/

  • at least it seems to be appreciated there!

(Gus Smith001) #9

Hi,

Want to install Yii today on bluehost.com

I just came across these 2 lines as well and confuses me also :rolleyes:

Thanks for the info, I will try to install it as per your instructions.

Cheers,

Gus Smith


(Gus Smith001) #10

Thanks to this I got it running in 5 minutes.

cheers,

Gus