Your problem is likely the cause of one of your .htaccess files not
set correctly. You probably need a rewrite base. If I get your setup
correctly (and I am not at all sure I do) you have the Apache document
root set to "var/www" and everything else if in sub-folders of that.

I can't really figure out what you are trying to achieve by this
setup.If it is just allowing you and a college to use the same cake
core on different development branches of the app on the same server I
think you are doing this too complicated for yourself. For example:
- Why define APP_DIR with a foldername in an index.php that is in the
app dir already? index in webroot will do that correctly for you.
Renaming it doesn't hurt this.
- The same question for ROOT

All you really should need to set is CAKE_CORE_INCLUDE_PATH since it
is the only folder you have "moved". (you still need working rewrite
rules, though.)


I never install in this way myself so I have not examples of rewrite
settings for you. I hope I could at least point you vaguely in the
right direction.

/Martin


On Sep 22, 1:20 am, The Roman <[email protected]> wrote:
> Hello, this is my first post so please accept my apologies if I break
> any conventions.  Searches of this site and google at large have not
> yeilded any results for me, so here goes.....
>
> I have created a cakePHP site which is to be a sub-system within a
> larger PHP based intranet.  It is hosted on a clients site, to which I
> have full access.  Now, my fellow developer and I use svn source
> control and so I have been going through the process of making the
> cake install svn friendly -- splitting of the cake core (cake_1.2.5)
> to /var/www, having svn ignore the app/tmp directory etc.
>
> This is how I have split cake: (from app/index.php) --
>
>         if (!defined('ROOT')) {
>                 define('ROOT',
> DS.'var'.DS.'www'.DS.'programmer1'.DS.'main_system'.DS.'cake_systems');
>         }
>         if (!defined('APP_DIR')) {
>                define('APP_DIR', 'statement_archive');
>         }
>         if (!defined('CAKE_CORE_INCLUDE_PATH')) {
>                 define('CAKE_CORE_INCLUDE_PATH', DS . 'var' . DS .
> 'www' . DS . 'cake_1.2.5');
>         }
>
> Note that this file is one of those excluded from svn, my coworker
> will have the same file but his ROOT will use his initials rather than
> 'programmer1' so that we each have our own development area.
>
> So from the above you can see (or hopefully you cannot see, and that
> is my problem!) that the cake 'app' directory has been renamed to
> 'statement_archive' and is a sub directory of 'cake_systems'.  The
> idea is that other modules of the php based system may also be done in
> cake, and that these would also be sub directories of 'cake_systems'
> and all would share /var/www/cake_1.2.5.
>
> Here is where the problem starts.  By setting the route for '/' I can
> get a correctly displayed (layout and all) screen via the 
> urlhttp://xxx.yyy.aaa.bbb/programmer1/main_system/cake_systems/statement....
> This screen provides other links such as 
> --http://xxx.yyy.aaa.bbb/programmer1/main_system/cake_systems/statement....
> Clicking on that link gives a 404 not found -- "The requested URL /
> programmer1/main_system/cake_systems/statement_archive/statements/
> generate/280060 was not found on this server".
>
> Of course, while under development, when the standard 'development
> style' cake setup (app directory was called 'app' etc) this all
> worked.  It is almost like cakePHP is getting its hands on the url to
> do its routing, something is beating it to the punch perhaps?  To try
> and get around this I set some routes manually in statement_archive/
> config/routes.php -
>
>         Router::connect('/statements/generate/*', array('controller'
> => 'statements', 'action' => 'generate'));
>         Router::connect('/statements/view/*', array('controller' =>
> 'statements', 'action' => 'view'));
>         Router::connect('/statements/edit/*', array('controller' =>
> 'statements', 'action' => 'edit'));
>         Router::connect('/statements/delete/*', array('controller' =>
> 'statements', 'action' => 'delete'));
>         Router::connect('/statements/add/*', array('controller' =>
> 'statements', 'action' => 'add'));
>         Router::connect('/logos', array('controller' => 'logos',
> 'action' => 'index'));
>         Router::connect('/logos/add/*', array('controller' => 'logos',
> 'action' => 'add'));
>         Router::connect('/statement_controls', array('controller' =>
> 'statement_controls', 'action' => 'index'));
>         Router::connect('/', array('controller' => 'statements',
> 'action' => 'index'));
>
> Any advice as to how and I can links working again?
>
> Many Thanks,
> The Roman.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to