我已經使用「project:deploy --go」部署我的項目。現在我在「public_html」裏有我的文件夾「apps」,「lib」,「web」等。當我嘗試登錄到我的web應用程序的用戶會話,我得到一個錯誤500部署symfony應用程序後出現錯誤500
這是我在PHP錯誤日誌正在創始:
[Tue Mar 09 05:47:02 2010] [error] [client 174.37.227.194] client denied by server configuration: /home/mainhost/public_html/whm-server-status
[Tue Mar 09 05:47:02 2010] [error] [client 174.37.227.194] File does not exist: /home/mainhost/public_html/403.shtml
我有一個共享的服務器,以便我無法修改.httpd.conf。
這是我的web/.htaccess文件:
Options +FollowSymLinks +ExecCGI
<IfModule mod_rewrite.c>
RewriteEngine On
# uncomment the following line, if you are having trouble
# getting no_script_name to work
#RewriteBase/
# we skip all files with .something
#RewriteCond %{REQUEST_URI} \..+$
#RewriteCond %{REQUEST_URI} !\.html$
#RewriteRule .* - [L]
# we check if the .html version is here (caching)
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
# no, so we redirect to our front web controller
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule
這是ProjectConfiguration.class.php:
<?php
# FROZEN_SF_LIB_DIR: /opt/lampp/htdocs/rs/lib/vendor/symfony/lib
require_once dirname(__FILE__).'/../lib/symfony/autoload/sfCoreAutoload.class.php';
sfCoreAutoload::register();
class ProjectConfiguration extends sfProjectConfiguration
{
public function setup()
{
// for compatibility/remove and enable only the plugins you want
$this->enableAllPluginsExcept(array('sfPropelPlugin', 'sfCompat10Plugin'));
$this->setWebDir($this->getRootDir().'/public_html/web');
}
}
我不,當我用我自己的rsync/SSH命令有任何問題。
更多新聞:
當我得到的是500錯誤下面這條線也寫在網頁/ error_log中:
[10-Mar-2010 14:37:57] PDO Connection Error: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/opt/lampp/var/mysql/mysql.sock' (2)
即使我已經在databases.yml裏這樣寫:
開發:
測試:
all:
doctrine:
class: sfDoctrineDatabase
param:
dsn: mysql:host=localhost;dbname=tirengar_rs
username: tirengar
password: mypassword
有什麼想法?
哈維
您是否嘗試過在部署後在遠程側調用'symfony project:permissions'? – develop7 2010-03-10 16:32:59
這幾乎肯定是一個權限問題。 「php錯誤日誌」中的錯誤與服務器上的cPanel軟件有關,而不是symfony。檢查symfony log/frontend_prod.log文件是否有任何500錯誤或Apache error.log。那裏會報告「PHP致命錯誤」。 – Raise 2010-03-10 19:04:44