2010-03-10 115 views
0

我已經使用「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 

有什麼想法?

哈維

+1

您是否嘗試過在部署後在遠程側調用'symfony project:permissions'? – develop7 2010-03-10 16:32:59

+0

這幾乎肯定是一個權限問題。 「php錯誤日誌」中的錯誤與服務器上的cPanel軟件有關,而不是symfony。檢查symfony log/frontend_prod.log文件是否有任何500錯誤或Apache error.log。那裏會報告「PHP致命錯誤」。 – Raise 2010-03-10 19:04:44

回答

0

首先httpd.conf文件必須改爲引用/網站/ DIR /網站/ web目錄作爲DocumentRoot的目錄,所有其他文件,如lib和配置決不能在Web上訪問。

通過使用frontend_dev.php加載站點(從您的計算機複製並添加您的IP地址)來查看服務器的確切問題。

另一個可能的問題是您的Web應用程序無法訪問數據庫。

+0

謝謝!是的,在本地我有我的「web」目錄在/ opt/lammp/htdocs/rs/web中。在你回答之前,我的路徑是/ public_html/web,現在是/ public_html/rs/web。 – ziiweb 2010-03-11 09:10:31

相關問題