-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQL exceptions when send requests. #1
Comments
Можешь сейчас проверить? Я подмержил новый код из yiisoft/yii2-app-advanced. |
проблема актуальна |
Bringing machine 'universal-backend' up with 'virtualbox' provider... |
При запуске
vagrant up
выполнение прерывается. Далее при последующих запросах к методам API возвращаются SQLExceptions.Привожу логи из консоли:
==> universal-backend: Clearing any previously set forwarded ports...
==> universal-backend: Clearing any previously set network interfaces...
==> universal-backend: Preparing network interfaces based on configuration...
universal-backend: Adapter 1: nat
universal-backend: Adapter 2: hostonly
==> universal-backend: Forwarding ports...
universal-backend: 22 (guest) => 2222 (host) (adapter 1)
==> universal-backend: Running 'pre-boot' VM customizations...
==> universal-backend: Booting VM...
==> universal-backend: Waiting for machine to boot. This may take a few minutes...
universal-backend: SSH address: 127.0.0.1:2222
universal-backend: SSH username: vagrant
universal-backend: SSH auth method: private key
universal-backend: Warning: Remote connection disconnect. Retrying...
==> universal-backend: Machine booted and ready!
==> universal-backend: Checking for guest additions in VM...
universal-backend: The guest additions on this VM do not match the installed version of
universal-backend: VirtualBox! In most cases this is fine, but in rare cases it can
universal-backend: prevent things such as shared folders from working properly. If you see
universal-backend: shared folder errors, please make sure the guest additions within the
universal-backend: virtual machine match the version of VirtualBox you have installed on
universal-backend: your host and reload your VM.
universal-backend:
universal-backend: Guest Additions Version: 4.3.36
universal-backend: VirtualBox Version: 5.1
==> universal-backend: Setting hostname...
==> universal-backend: Configuring and enabling network interfaces...
==> universal-backend: Mounting shared folders...
universal-backend: /app => C:/Users/user/Desktop/Projects/NewU-editor/backend-app
==> universal-backend: Updating /etc/hosts file on active guest machines...
==> universal-backend: Updating /etc/hosts file on host machine (password may be required)...
==> universal-backend: Machine already provisioned. Run
vagrant provision
or use the--provision
==> universal-backend: flag to force provisioning. Provisioners marked to run always will still run.
==> universal-backend: Running provisioner: shell...
universal-backend: Running: C:/Users/user/AppData/Local/Temp/vagrant-shell20170214-18292-kofrwx.sh
==> universal-backend: stdin: is not a tty
==> universal-backend:
==> universal-backend: --> Provision-script user: root
==> universal-backend:
==> universal-backend:
==> universal-backend: --> Restart web-stack
==> universal-backend:
==> universal-backend: php5-fpm stop/waiting
==> universal-backend: * Restarting nginx nginx
==> universal-backend: ...done.
==> universal-backend: mysql stop/waiting
==> universal-backend: mysql start/running, process 1960
==> universal-backend: Running provisioner: shell...
universal-backend: Running: C:/Users/user/AppData/Local/Temp/vagrant-shell20170214-18292-z2gizu.sh
==> universal-backend:
==> universal-backend: --> Install project dependencies
==> universal-backend:
==> universal-backend: Loading composer repositories with package information
==> universal-backend: Installing dependencies (including require-dev) from lock file
==> universal-backend: Nothing to install or update
==> universal-backend: Generating autoload files
==> universal-backend: > php init --env=Development --overwrite=n
==> universal-backend: Yii Application Initialization Tool v1.0
==> universal-backend:
==> universal-backend:
==> universal-backend: Start initialization ...
==> universal-backend: exist backend/config/main-local.php
==> universal-backend: ...overwrite? [Yes|No|All|Quit]
==> universal-backend: skip backend/config/main-local.php
==> universal-backend: unchanged backend/config/params-local.php
==> universal-backend: unchanged backend/web/index-test.php
==> universal-backend: unchanged backend/web/index.php
==> universal-backend: unchanged common/config/main-local.php
==> universal-backend: unchanged common/config/params-local.php
==> universal-backend: unchanged console/config/main-local.php
==> universal-backend: unchanged console/config/params-local.php
==> universal-backend: unchanged tests/codeception/config/config-local.php
==> universal-backend: unchanged yii
==> universal-backend: generate cookie validation key in backend/config/main-local.php
==> universal-backend: chmod 0777 backend/runtime
==> universal-backend: chmod 0777 backend/web/assets
==> universal-backend: chmod 0755 yii
==> universal-backend: chmod 0755 tests/codeception/bin/yii
==> universal-backend:
==> universal-backend: ... initialization completed.
==> universal-backend:
==> universal-backend: --> Init project
==> universal-backend:
==> universal-backend: /usr/bin/env:
==> universal-backend: php
==> universal-backend: : No such file or directory
==> universal-backend:
==> universal-backend: --> Apply migrations
==> universal-backend:
==> universal-backend: /usr/bin/env:
==> universal-backend: php
==> universal-backend: : No such file or directory
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
`
Как решилась проблема
Выполнить по очереди в консоли из корня проекта:
vagrant ssh
;cd /app
;php init
;php yii migrate
.После выполнения этих команд запросы к серверу идут успешно и ответы приходят без ошибок.
The text was updated successfully, but these errors were encountered: