安裝依賴當我產生「PHP composer.phar安裝」我得到以下錯誤的命令:問題由作曲家
{"error":{"type":"PDOException","message":"SQLSTATE[42000] [1044] Access denied for user ''@'localhost' to database 'database'","file":"/var/www/wingtech/wingadmin/public_html/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php","line":47}}Script php artisan optimize handling the post-install-cmd event returned with an error
http://oi42.tinypic.com/20uc2ma.jpg
奇怪的是,當我成立了應用程序數據庫/配置/database.php運行安裝作曲家之前這個錯誤不會出現
爲了緩解我的php版本是5.4.17
我的康波ser.json是:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"laravel/framework": "4.0.*",
"orchestra/asset": "2.0.*"
},
"autoload": {
"classmap": [
"app/commands",
"app/controllers",
"app/models",
"app/library",
"app/database/migrations",
"app/database/seeds",
"app/tests/TestCase.php"
]
},
"scripts": {
"post-install-cmd": [
"php artisan optimize"
],
"pre-update-cmd": [
"php artisan clear-compiled"
],
"post-update-cmd": [
"php artisan optimize"
],
"post-create-project-cmd": [
"php artisan key:generate"
]
},
"config": {
"preferred-install": "dist"
},
"minimum-stability": "dev"
}
有沒有人知道可能是什麼?
我的php版本是5.4.17,我編輯這個問題與我的composer.json –