0
我正在嘗試運行後端進程,並且遇到了讓新貴運行yiic命令的問題。Upstart Yii控制檯給我錯誤
我使用的XAMPP服務器
這裏是我的新貴腳本:
#description "Sample upstart"
#start on stopped
start on startup
stop on shutdown
respawn
chdir /opt/lampp/htdocs/my_project/protected
setuid mad
setgid www-data
script
exec /opt/lampp/htdocs/my_project/protected/yiic project test
end script
所以,當我這樣做
須藤開始測試顯示器
暴發戶是開始,它似乎是向yii項目發出一個命令,作爲錯誤i s被捕獲在yii日誌文件中。在警予日誌文件中的錯誤是:
2014/10/31 15:06:44 [error] [worker.*] CDbConnection failed to open the DB connection: could not find driver
2014/10/31 15:06:44 [error] [worker.*] CDbConnection failed to open the DB connection: could not find driver
2014/10/31 15:06:44 [error] [worker.*] CDbConnection failed to open the DB connection: could not find driver
2014/10/31 15:06:44 [error] [worker.*] CDbConnection failed to open the DB connection: could not find driver
但是如果我做手工的命令:
./yiic項目測試
這是工作的罰款。有人可以幫幫我嗎。
下面是警予控制檯命令代碼:
public function actionTest(){
try{
while(1){
TestManager::_MonitorTest();
usleep(1000000);
}
}catch(Exception $e){
Yii::log($e->getMessage(), 'error', 'worker.*');
}
}
這裏是暴發戶的日誌文件(這是並非如此,因爲我已經採取了須藤出):
sudo: no tty present and no askpass program specified
sudo: no tty present and no askpass program specified
sudo: no tty present and no askpass program specified
sudo: no tty present and no askpass program specified
sudo: no tty present and no askpass program specified
sudo: no tty present and no askpass program specified
sudo: no tty present and no askpass program specified
sudo: no tty present and no askpass program specified
sudo: no tty present and no askpass program specified
sudo: no tty present and no askpass program specified
Mysql連接工作正常,我測試了它
顯示在下面的目錄中的文件'保護\ CONFIG \控制檯。 php''。在此之前,檢查'componets'數組索引'db'是否具有適當值的所有必需值。 – gvgvgvijayan 2014-10-31 07:22:10
給我2分鐘,我可以得到更多信息 – madi 2014-10-31 07:24:17
根據您的要求編輯 – madi 2014-10-31 07:28:36