【发布时间】:2010-03-11 07:21:34
【问题描述】:
我已经使用“project:deploy --go”部署了我的项目。现在我在“public_html”中有我的文件夹“apps”、“lib”、“web”等。当我尝试登录我的网络应用程序的用户会话时,我收到错误 500。
这是我在 php 错误日志中发现的:
[2010 年 3 月 9 日星期二 05:47:02] [错误] [客户端 174.37.227.194] 客户端被拒绝 按服务器配置: /home/mainhost/public_html/whm-server-status
[2010 年 3 月 9 日星期二 05:47:02] [错误] [客户端 174.37.227.194] 文件没有 存在: /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 错误时,下面的这一行也写在 web/error_log 中:
[10-Mar-2010 14:37:57] PDO 连接 错误:SQLSTATE[HY000] [2002] 不能 通过连接到本地 MySQL 服务器 插座 '/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? -
几乎可以肯定是权限问题。 “php 错误日志”中的错误与您服务器上的 cPanel 软件有关,而不是 symfony。检查 symfony 日志/frontend_prod.log 文件是否有任何 500 错误或 Apache error.log。那里会报“PHP Fatal error”。
标签: symfony1 deployment