各位大神好:
在下使用Laravel佈署到GAE後,一直無法連線到自己的SQL SERVER,也確定資料庫可以正常連線,也沒有使用防火牆,想知道是否設定錯誤,請大大們協助,謝謝。
app.yaml
runtime: php72
env_variables:
APP_KEY: base64:xxxxxxxxxxxxxxxxxxxx
APP_STORAGE: /tmp
VIEW_COMPILED_PATH: /tmp
SESSION_DRIVER: cookie
DB_CONNECTION: xxxx
DB_HOST: xxxx
DB_DATABASE: xxxx
DB_USERNAME: xx
DB_PASSWORD:
handlers:
- url: /(.*\.(css|js|jpg|png|ico|eot|svg|ttf|woff|woff2))$
static_files: public/\1
upload: public/.*\.(css|js|jpg|png|ico|eot|svg|ttf|woff|woff2)$
config/database.php
'connections' => [
'sqlsrv' => [
'driver' => 'sqlsrv',
'host' => 'xxxx',
'username' => 'xxxx',
'password' => '',
'database' => 'xxxx',
'prefix' => '',
],
],
.env
APP_NAME=XXX
APP_ENV=local
APP_KEY=base64:XXXXX
APP_DEBUG=true
APP_URL=http://localhost
LOG_CHANNEL=stack
DB_CONNECTION=sqlsrv