Heya,
Aside from what the other two posters suggest, I want to add a
few things here for you to get your mod_rewrite working because, the
Documentation is sort of lacking in this area.
In your httpd.conf (I assume you are using apache), make sure that the
AllowOverride is set to All, like so:
<Directory />
something here about symlinks
AllowOverride All
</Directory>
Secondly, make sure you are not running in virtual host mode, if you
are, there is another file in your apache config directory for the
"localhost". Set that AllowOverride to All as well.
Here is another tip:
When you get mod_rewrite working, check out the code here: http://
cakebaker.wordpress.com/2006/08/17/take-over-the-control-of-some-urls-
from-cakephp/
This will enable you to use directories like phpmyadmin. Setting
AllowOverride All on the main directory is sort of a must and very
nice to have. So, this will offset using it. Without this little
modification, when you go to the phpmyadmin folder, cake will tell you
that it cannot find that controller.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/stats/(.*)$
RewriteRule ^.*$ - [L]
</IfModule>
Put that code into your main root .htaccess file eg: http://
localhost/.htaccess <----
Then just change ^/stats/ to ^/phpmyadmin/ or whatever other folder
name that you use and doesn't need cake to control.
Hope this helps!
On Feb 7, 2:50 pm, "zafoeta" <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I hope someone can help me on this.
> I can not find a lot on the internet.
> I am doing a simple scaffolding tutorial, but I am not able to get it
> run.
> Connection to database works fine.
> I set up a user.php and a users_controller.php in the respective
> models and controllers directory.
> I first go tohttp://127.0.0.1/cake/usersand get the error
>
> The requested URL /cake/users was not found on this server.
>
> I than tryhttp://127.0.0.1/cake/app/controllers/users_controller.php
> and get the error
>
> Fatal error: Class 'AppController' not found in /var/www/cake/app/
> controllers/users_controller.php on line 2
>
> My code for user.php
> <?php
> class User extends AppModel
> {
> var $name = 'User';}
>
> ?>
>
> My code for users_controller.php
> <?php
> class UsersController extends AppController
> {
> var $name = 'Users';
> var $scaffolding;}
>
> ?>
>
> I really do not see anything wrong.
> But I am a newbie in php.
> Is there an include path to set to the AppModel.php and
> AppController.php files?
> I suppose this is set as default ...
>
> I really hope someone can help me on this.
> I am kinda lost.
> Walter.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---