M
M
Maila2017-06-18 14:56:17
Yii
Maila, 2017-06-18 14:56:17

Why is Yii2 not installed on Win 10 via Composer and archive?

I tried to install in 2 ways:
In the first one, through the archive in XAMPP, following the instructions, I went to the directory ( D:\sites\yii\common\config.main.php) common -> main.php and in the request 'cookieValidationKey' => ' ', // specifying "false" https://i.stack.imgur.com/oFVoc.jpg
file php.init (batch file) '
0 0d55bada390d4b9a99ec28d6a48c9dd8.jpg'
Development 2 67b9e4f65a7246d7a26f28278bdbc0ef.jpgDIR C:/Windows/System32/drivers/etc/hosts
So that the fronted.loc and backend.loc pages open in the browser, as the author advises here tvoi-kulinarenko.ru/watch/qt9th33ViRk-ustanovka-yi... But only folders are opened ((
2 way through COMPOSER in Open Server I tried to update the plugin with the composer self-update command, disable the plugin - after the commands composer global require fxp/composer-asset-plugin --no-plugins and composer create-project yiisoft/yii-app-advanced./ 2.0.12 only 2 files 1 KB create-project and global or self-update are created in the folder and that's it. ( c40358d8d4024fd199f6793a5210b600.jpgScreenshot) Why is that?
522e685fa3954cd0be10ab3a461228d3.jpg

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2017-06-18
@Maila

Good evening.
We continue our communication.
I don't know what you've done, but I don't see much of a problem when installing from an archive.
To do this, I specifically put xampp in virtualbox on windows 7 (I just don’t have dozens, I don’t use it).
So how I did:
1) Installed xampp without any settings with the default installation path (C:\xampp)
2) Created the yii2 directory in the C:\xampp\htdocs directory
3) Copied the contents of the archive
to the yii2 directory 4) Moved to yii2 directory and opened the init.bat file in a text notepad
5) Edited the line of the file,
replaced it with the line
where in PHP_COMMAND you specified your php installation path, you, of course, will have a different one, you will find it in the xammp directory.
6) After editing the init.bat file, I clicked "save" and ran the file.
7) In the browser, I entered the address localhost/yii2/frontend/web and got a working site. Version framework 2.0.12
PS
In order for you to open the site at the address http://frontendyou need to do the following:
Open the file C:\xampp\apache\conf\extra\httpd-vhosts.conf and add virtual hosts

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "C:\xampp\htdocs\yii2\frontend\web"
    ServerName frontend
    ServerAlias www.frontend
    ErrorLog "logs/frontend-error.log"
    CustomLog "logs/frontend-access.log" common
</VirtualHost>

In the hosts file , write
Reboot the system, run xampp and in the address bar of the browser http://frontend.
Get a working site.
I have checked all of the above and it works.
PSS
Installing via composer should also not be buggy if everything is done correctly.
Download the file here , run and install composer without changing the default settings. The only thing you may need to do is specify the path to xampp.
Open the console, enter the command
Then go to xampp htdocs directory
and in the same console
The rest of the settings are the same as when installing from the archive (creating a virtual host, setting it in hosts) and nothing needs to be changed in the init.bat file.
PSSS
Checked on the tenth version, everything is fine through composer. Describe step by step how you installed composer, xampp and so on. Perhaps something was missed. The default installation path is best.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question