部署symfony应用程序后出现错误500

时间:2010-03-10 14:45:11

标签: symfony1 deployment

我使用“project:deploy --go”部署我的项目。现在我在“public_html”中有我的文件夹“apps”,“lib”,“web”等。当我尝试登录我的网络应用程序的用户会话时,我收到错误500.

这就是我在php错误日志中创建的内容:

  

[Tue Mar 09 05:47:02 2010] [错误]   [客户174.37.227.194]客户拒绝   按服务器配置:   /家庭/ mainhost /的public_html / WHM-服务器状态

     

[Tue Mar 09 05:47:02 2010] [错误]   [client 174.37.227.194]文件没有   存在:   /home/mainhost/public_html/403.shtml

我有一个共享服务器,所以我无法修改.httpd.conf。

这是我的网站/ .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错误时,下面的这一行也写在web / error_log中:

  

[2010年3月10日14:37:57] PDO连接   错误:SQLSTATE [HY000] [2002]不能   通过连接到本地MySQL服务器   插座   '/opt/lampp/var/mysql/mysql.sock'(2)

即使我在databases.yml中写了这个:

dev的:

试验:

all:
   doctrine:
     class: sfDoctrineDatabase
     param:
       dsn: mysql:host=localhost;dbname=tirengar_rs
       username: tirengar
       password: mypassword

有什么想法吗?

Javi

1 个答案:

答案 0 :(得分:0)

首先必须将httpd.conf文件更改为引用/ sites / dir / website / web目录作为DocumentRoot目录,所有其他文件(如lib和config)都不能通过Web访问。

通过使用frontend_dev.php加载网站(从您的计算机复制并添加您的IP地址),查看服务器所遇到的确切问题。

另一个可能的问题是您的网络应用无法访问数据库。

相关问题