Thursday, December 20, 2012

Re: Help / Source code for Simple Authentication tutorial

@OxfordRob where are the Controller Classes currently they (Users & App controllers) should be in

app/Controller/

 - S


On 20 December 2012 20:03, OxfordRob <pestleweb@gmail.com> wrote:
@cricket - thank you for that explanation of a several points. I made the changes as you suggested but still no joy.

Here is the Apache log from when I finished last night...

[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP Fatal error:  Class 'AppController' not found in /var/www/cakephp-2.3.0-RC1/lib/Cake/Controller/CakeErrorController.php on line 31
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP Stack trace:
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   1. {main}() /var/www/cakephp-2.3.0-RC1/app/webroot/index.php:0
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   2. Dispatcher->dispatch() /var/www/cakephp-2.3.0-RC1/app/webroot/index.php:97
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   3. Dispatcher->_getController() /var/www/cakephp-2.3.0-RC1/lib/Cake/Routing/Dispatcher.php:152
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   4. Dispatcher->_loadController() /var/www/cakephp-2.3.0-RC1/lib/Cake/Routing/Dispatcher.php:228
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   5. class_exists() /var/www/cakephp-2.3.0-RC1/lib/Cake/Routing/Dispatcher.php:259
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   6. App::load() /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:0
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   7. include() /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:540
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   8. App::load() /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:0
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   9. App::shutdown() /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:0
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  10. App::_checkFatalError() /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:899
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  11. call_user_func() /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:926
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  12. ErrorHandler::handleError() /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:0
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  13. ErrorHandler::handleFatalError() /var/www/cakephp-2.3.0-RC1/lib/Cake/Error/ErrorHandler.php:161
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  14. call_user_func() /var/www/cakephp-2.3.0-RC1/lib/Cake/Error/ErrorHandler.php:211
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  15. ErrorHandler::handleException() /var/www/cakephp-2.3.0-RC1/lib/Cake/Error/ErrorHandler.php:0
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  16. ExceptionRenderer->__construct() /var/www/cakephp-2.3.0-RC1/lib/Cake/Error/ErrorHandler.php:125
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  17. ExceptionRenderer->_getController() /var/www/cakephp-2.3.0-RC1/lib/Cake/Error/ExceptionRenderer.php:94
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  18. App::load() /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:0
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  19. include() /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:560


On Wednesday, 19 December 2012 21:57:26 UTC, cricket wrote:
On Wed, Dec 19, 2012 at 3:13 PM, OxfordRob <pest...@gmail.com> wrote:
> I have a clue... The line:
>
> App::uses('AuthComponent', 'Controller/Component');

The error msg you posted has nothing to do with AuthComponent.

> looks as if it is referring to a library component within the folder
> 'Controller/Component'...
>
> But I only have one file in that folder called 'empty'

That's for your application Components. The 'empty' file is there
because the Cake devs use Git, which, among other sucky things, can't
deal with empty folders.

> Does that suggest something is missing? Do components have to be downloaded
> and installed separately?

The components that come with Cake, including Auth, are under the lib
directory. Store any other components you wish to use under
app/Controller/Components.

As for you AppController iussues, try setting these in app/Config/core.php:

Configure::write('debug', 2);
Configure::write('Cache.disable', true);

Then delete all the files in the app/tmp/cache/persistent directory.

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
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+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
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+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

No comments: