views:

183

answers:

1

Hi,

I have deploy my project using "project:deploy --go". Now i have my folders "apps", "lib", "web", etc, inside "public_html". When i try to login to a user session of my web app, i get an error 500.

This is what i'm founding in the php error log:

[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

I have a shared server so i can not modify .httpd.conf.

This is my web/.htaccess file:

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

And this is 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');


  }
}

I dont have any problem when i use my own rsync/ssh command.

More news:

when i get that 500 error this line below is written also in web/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)

Even if i have written this in databases.yml:

dev:

test:

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

Any idea?

Javi

A: 

First the httpd.conf file MUST be changed to reference /sites/dir/website/web directory as the DocumentRoot directory, all other files such as lib and config must not be accessible over the web.

See the exact problem the server is having by using frontend_dev.php to load the site (copy from your computer and add your IP address).

Another likely issue is that your web app cannot access the database.

deepwell
Thanks! Yes it's true, locally i have my "web" directory in /opt/lammp/htdocs/rs/web. Before your answer my path was /public_html/web, and now is /public_html/rs/web.