Okay, here is the problem. I have cake set up in the following manner
(just as the instructions in the manual):

webroot/
     CakePHP/
          app
          cake
          vendors
          index.php
          .htaccess

I have other web base programs that are running out of this same
webroot

webroot/
     CakePHP/
     Joomla/
     etc......


When I setup the database I issue the following http://localhost/CakePHP

And I get the message that "The database configuration is present" and
"Cake is able to connect to the database" with all of the "pretty" CSS
styling and images. So I know that mod_rewrite is working correctly
(actually I already knew that). So when I when I am going through the
IBM tutorial for example I type in "http://localhost/CakePHP/users/
register" and I am taken to the correct view page. After I fill in the
form and hit submit though I get the following:

404 Not found
The requested URL /users/register was not found on this server

So cake is not prepending "CakePHP" into the URL but is looking for
the path that is in the controller that I listed on my initial
posting. So it seems to me that there should be some way of having the
app continue out of the relative path that it is in, without having to
hardcode the path into the controller.

It also seems pretty strange to me that the initial install
instructions in the Cake manual say that you can unzip the Cake file
into the webroot and rename the parent folder anything you want, (eg.
/wwwroot
    /cake
        /app
        /cake
        /vendors
        .htaccess
        index.php)

but then all of the tutorials (including the "Cake Blog Tutorial" that
is in the CakePHP manual) assume that you have placed all of those
files that are in the parent directory directly under the webroot.
(eg.
/path_to_document_root
    /app
    /cake
    /vendors
    .htaccess
    index.php
    VERSION.txt)

Maybe I am just to uneducated (read "dumb") to use CakePHP and need to
find another PHP framework to start out with.



On Apr 5, 3:18 pm, Adam Royle <[EMAIL PROTECTED]> wrote:
> Cake does this automatically with the use of .htaccess rewrite rules.
>
> In your previous example, the IBM url would behttp://localhost,
> whereas the cake manual url would behttp://localhost/cakePHP/
>
> Personally, I just setup a new vhost for each site and point it at the
> webroot directory. I do a similar thing on the live server but with
> symlinks.
>
> Cheers,
> Adam
>
> On Apr 5, 7:06 am, Scott Ackerman <[EMAIL PROTECTED]> wrote:
>
> > I can change the document root on my web server to serve directly out
> > of the "cake" directory, but I don't want to as I have other apps that
> > run on my server. What seems strange is that I went through the
> > initial setup as described in the manual and connected with the
> > database just fine. But when I follow the tutorial on IBM's web site
> > they are essentially recommending that it be set up like:
>
> > /document root
> >     /cake
> >     /app
> >     /vendors
> >     .htaccess
> >     index.php
>
> > but the cake manual says that this will work
>
> > /document root
> >     /cakePHP
> >         /cake
> >         /app
> >         /vendors
>
> > But if you look at the "blog" tutorial that is in the CakePHP manual,
> > it is recommending that the structure be set up the way IBM
> > recommends. So I guess I am trying to find out what configuration file
> > needs to be set to serve the cake app's out of their own directories,
> > without having to program absolute directory structure information
> > into the controller.
>
> > On Apr 4, 1:03 pm, Rusty <[EMAIL PROTECTED]> wrote:
>
> > > I believe that it is in your site setup that you would change it so
> > > that the root of your website was at /localhost/cake.
>
> > > I have mine on a shared hosting account, so setting the home page of
> > > the site to be the /cake_install/app/webroot worked for me.
>
> > > Hope that helps.
> > > Rusty
>
> > > On Apr 4, 9:57 am, Scott Ackerman <[EMAIL PROTECTED]> wrote:
>
> > > > I am "trying" to get through the "Cook up Web sites fast with CakePHP"
> > > > tutorial at IBM's website. I have created the initial database, the
> > > > model, the view and the controller. I am at the part where I am
> > > > testing it for the first time. I have the CakePHP install installed in
> > > > a directory called "cake" in my webroot. So in the case of the example
> > > > to test the registration I use 'localhost/cake/users/register' which
> > > > takes me to the registration form. I then fill out the form and click
> > > > the "register" button. But the controller returns me to 'localhost/
> > > > users/register' which of course gives me a "page not found" error. I
> > > > can see what the problem is but I am not sure what to do to fix it.
> > > > The controller  looks like this:
>
> > > > <?php
>
> > > > class UsersController extends AppController {
>
> > > >     function register() {
> > > >         if (!empty($this->params['form'])) {
> >> >             if ($this->User->save($this->params['form'])) {
> > > >                 $this->flash('Your registration information was
> > > > accepted.', '/users/register');
> > > >                 }
> > > >             else {
> > > >                 $this->flash('There was a problem with your
> > > > registration', '/users/register');
> > > >                 }
> > > >             }
> > > >         }
> > > >     }
>
> > > > ?>
>
> > > > Now I know that I could change the directories to '/cake/users/
> > > > register', but it seems that there should be a way for Cake to pickup
> > > > the directory that it is installed in and insert it (since it is
> > > > already inserting the URL just to get to the 'users' subdirectory. Or
> > > > is it assumed that you will always have everything that is in the
> > > > initial install folder directly in the document root? I didn't find a
> > > > config file that I could specify the initial directory for CakePHP. I
> > > > hope I am making sense. My understanding was that I could simply unzip
> > > > the CakePHP files into my web root and rename that initial directory
> > > > anything (which I renamed to simply 'cake' instead of 'cake1.00etc.').
> > > > Sorry for such a stupid beginner question.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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