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 url
http://xxx.yyy.aaa.bbb/programmer1/main_system/cake_systems/statement_archive/.
This screen provides other links such as --
http://xxx.yyy.aaa.bbb/programmer1/main_system/cake_systems/statement_archive/statements/generate/280060.
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 cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to