Hi Daniel.

I had to rename php.ini to php5.ini.  I didn't see the 5 in that the
first time I read your post.  This got the index.php front controller
working.  As for everything else, it still doesn't work.

I modified config/ProjectConfiguration.class.php:

<?php

# FROZEN_SF_LIB_DIR: /usr/share/php/symfony
$_SERVER["REQUEST_URI"] = str_replace($_SERVER["SCRIPT_NAME"], "",
$_SERVER["REQUEST_URI"]);

require_once dirname(__FILE__).'/../lib/symfony/autoload/
sfCoreAutoload.class.php';
sfCoreAutoload::register();

class ProjectConfiguration extends sfProjectConfiguration
{
    public function setup() {
        $this->setWebDir($this->getRootDir().'/ldnr');

        // for compatibility / remove and enable only the plugins you
want
        $this->enableAllPluginsExcept(array('sfDoctrinePlugin',
'sfCompat10Plugin'));
    }
}

And apps/frontend/config/factories.yml

all:
  routing:
    class: sfPatternRouting
    param:
      generate_shortest_url:            true
      extra_parameters_as_query_string: true
      path_info_key: REQUEST_URI

The site only works for the index.php front controller.

404 | Not Found | sfError404Exception
Empty module and/or action after parsing the URL "/
frontend_dev.php/" (/).

On Mar 17, 12:16 pm, Richtermeister <[email protected]> wrote:
> Hi Benjamin,
>
> I'm the author of the codemassacre post, and things have changed for
> version 1.2.
> I need to write a newer post.
>
> For now, this is how I am able to do it (no worries, had the same
> problem).
> First, this goes into the factories.yml for the all environment
> all:
>   request:
>     param:
>       path_info_key: REQUEST_URI
>
> Now comes the bitch:
>
> Add this to the top of the /config/ProjectConfiguration.class.php
> file:
> $_SERVER["REQUEST_URI"] = str_replace($_SERVER["SCRIPT_NAME"], "",
> $_SERVER["REQUEST_URI"]);
>
> This is just a little hack, since godaddy keeps the script filename in
> the request uri.. this confuses symfony.
>
> That should be all. Let me know if / how that works. Maybe I'm
> forgetting something.
>
> Have a great day,
> Daniel
>
> On Mar 17, 8:08 am, Benjamin <[email protected]> wrote:
>
>
>
> > Thank you.  I've actually done everything outlined in those posts.
>
> > The one thing I'm not sure about is:
>
> > path_info_key:          REDIRECT_URL
>
> > Someone mentioned it should go into the factories.yml file for symfony
> > 1.2.  I don't know where to put it in that file however.
>
> > all:
> >   routing:
> >     class: sfPatternRouting
> >     param:
> >       generate_shortest_url:            true
> >       extra_parameters_as_query_string: true
>
> > I placed it in settings.yml
>
> > prod:
> >   .settings:
> >     no_script_name:         on
> >     logging_enabled:        off
> >     path_info_key:          REDIRECT_URL
>
> > On Mar 17, 10:02 am, Tom Haskins-Vaughan <[email protected]>
> > wrote:
>
> > > After a quick google:
>
> > >http://www.codemassacre.com/2008/07/24/problems-hosting-symfony-sites...
>
> > > See if either of those help.
>
> > > Tom
>
> > > Benjamin wrote:
> > > > Hi, sorry I should have posted that.  The default module is content
> > > > with the index action:
>
> > > > # default rules
> > > > homepage:
> > > >   url:   /
> > > >   param: { module: content, action: index }
>
> > > > content:
> > > >   url: /:action.html
> > > >   param: { module: content }
>
> > > > default_index:
> > > >   url:   /:module
> > > >   param: { action: index }
>
> > > > default:
> > > >   url:   /:module/:action/*
>
> > > > On Mar 17, 9:50 am, Tom Haskins-Vaughan <[email protected]>
> > > > wrote:
> > > >> What module/action is specified in your routing.yml file for the the
> > > >> root url (/)?
>
> > > >> Benjamin wrote:
> > > >>> Hi,
> > > >>> If someone can please help me figure out what to fix here that would
> > > >>> be great.  I'm getting 404 errors, No Input File Specified errors,
> > > >>> nothing works.  This is on a godaddy shared server.  Not mine.
> > > >>>http://ldnr.org/frontend_dev.php
> > > >>> php.ini file located in webroot
> > > >>> cgi.fix_pathinfo = on
> > > >>> register_globals = off
> > > >>> allow_url_fopen = on
> > > >>> expose_php = Off
> > > >>> max_input_time = 60
> > > >>> variables_order = "EGPCS"
> > > >>> extension_dir = ./
> > > >>> upload_tmp_dir = /tmp
> > > >>> precision = 12
> > > >>> url_rewriter.tags =
> > > >>> "a=href,area=href,frame=src,input=src,form=,fieldset="
> > > >>> memory_limit = 20000000
> > > >>> session.gc_maxlifetime = 72000
> > > >>> magic_quotes_gpc = Off
> > > >>> magic_quotes_runtime = Off
> > > >>> magic_quotes_sybase = Off
> > > >>> .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>
> > > >>> apps/frontend/config/settings.yml
> > > >>>     path_info_key:          REDIRECT_URL
> > > >> --
> > > >> Tom Haskins-Vaughan
> > > >> Temple Street Media: Design and Development for the Web
> > > >> [email protected] |www.templestreetmedia.com
>
> > > --
> > > Tom Haskins-Vaughan
> > > Temple Street Media: Design and Development for the Web
> > > [email protected] |www.templestreetmedia.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to