Begginer's Lesson learned! [Solved] Authentication Tutorial

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Begginer's Lesson learned! [Solved] Authentication Tutorial

OxfordRob
Thank you to jsundquist , crush, sams and cricket over the last few days for helping me with my Authentication tutorial problems. I fixed it this morning.

My take-away from this is a very general 'lesson learned' and  I thought I would share the knowledge for any other beginner who comes through here.

The error message I started with was:

PHP Fatal error: Class 'AppController' not found in /var/www/lib/Cake/Controller/CakeErrorController.php on line 31

PHP Stack trace:

PHP 1. {main}() /var/www/app/webroot/index.php:0

PHP 2. Dispatcher->dispatch() /var/www/app/webroot/index.php:97


This sent me on a 2-day joy-ride looking for, moving and changing access permissions to the 'AppController' class definition file. In the process of course I screwed up my configuration and got in a hopeless mess.

So this morning I re-built everything very carefully, followed the instructions to the letter....and got exactly the same error!

I was about to say "Enough cake for me"...but then remembered that "too much cake" is one of the shortest self-contradictory statements in the English Language.

I decided to copy back the original, distribution AppController.php file  - and the error message went away.

My conclusion was...this is not the fact that the file is missing, but class is not compiling successfully. WIth this in mind I took a look at the Apache Error log.....and this is what I found...

PHP Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /var/www/app/Controller/AppController.php on line 41

PHP Stack trace:

PHP 1. {main}() /var/www/app/webroot/index.php:0

PHP 2. Dispatcher->dispatch() /var/www/app/webroot/index.php:97

PHP 3. Dispatcher->_getController() /var/www/lib/Cake/Routing/Dispatcher.php:152

PHP 4. Dispatcher->_loadController() /var/www/lib/Cake/Routing/Dispatcher.php:228

PHP 5. class_exists() /var/www/lib/Cake/Routing/Dispatcher.php:259

PHP 6. App::load() /var/www/lib/Cake/Core/App.php:0

PHP 7. include() /var/www/lib/Cake/Core/App.php:560

PHP 8. App::load() /var/www/lib/Cake/Core/App.php:0

PHP Fatal error: Class 'AppController' not found in /var/www/lib/Cake/Controller/CakeErrorController.php on line 31

PHP Stack trace:

PHP 1. {main}() /var/www/app/webroot/index.php:0

PHP 2. Dispatcher->dispatch() /var/www/app/webroot/index.php:97


(This is where I should "Arghhhhh!")

The error message shown on the screen is not the complete error string!

I guess that Cake / PHP is only displaying the Fatal Error, and casually loosing the real error here. I.e. it was not that the file was missing or in the wrong place - but that the class definition had a simple syntax error in it (too trivial and embarrassing to mention here)

So here is my beginners lesson learned: Keep an eye on the Apache error log (obvious really). The message on the screen is not only formatted in a way that makes it hard to read - it my not be displaying all of the useful information you need to sort out the problem.

Rob




--
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 [hidden email].
To unsubscribe from this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Begginer's Lesson learned! [Solved] Authentication Tutorial

lowpass
Thanks for posting that. It's always good to post resolutions for
others to find.

On Fri, Dec 21, 2012 at 7:36 AM, OxfordRob <[hidden email]> wrote:

> Thank you to jsundquist , crush, sams and cricket over the last few days for
> helping me with my Authentication tutorial problems. I fixed it this
> morning.
>
> My take-away from this is a very general 'lesson learned' and  I thought I
> would share the knowledge for any other beginner who comes through here.
>
> The error message I started with was:
>
> PHP Fatal error: Class 'AppController' not found in
> /var/www/lib/Cake/Controller/CakeErrorController.php on line 31
>
> PHP Stack trace:
>
> PHP 1. {main}() /var/www/app/webroot/index.php:0
>
> PHP 2. Dispatcher->dispatch() /var/www/app/webroot/index.php:97
>
>
> This sent me on a 2-day joy-ride looking for, moving and changing access
> permissions to the 'AppController' class definition file. In the process of
> course I screwed up my configuration and got in a hopeless mess.
>
> So this morning I re-built everything very carefully, followed the
> instructions to the letter....and got exactly the same error!
>
> I was about to say "Enough cake for me"...but then remembered that "too much
> cake" is one of the shortest self-contradictory statements in the English
> Language.
>
> I decided to copy back the original, distribution AppController.php file  -
> and the error message went away.
>
> My conclusion was...this is not the fact that the file is missing, but class
> is not compiling successfully. WIth this in mind I took a look at the Apache
> Error log.....and this is what I found...
>
> PHP Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING,
> expecting ')' in /var/www/app/Controller/AppController.php on line 41
>
> PHP Stack trace:
>
> PHP 1. {main}() /var/www/app/webroot/index.php:0
>
> PHP 2. Dispatcher->dispatch() /var/www/app/webroot/index.php:97
>
> PHP 3. Dispatcher->_getController()
> /var/www/lib/Cake/Routing/Dispatcher.php:152
>
> PHP 4. Dispatcher->_loadController()
> /var/www/lib/Cake/Routing/Dispatcher.php:228
>
> PHP 5. class_exists() /var/www/lib/Cake/Routing/Dispatcher.php:259
>
> PHP 6. App::load() /var/www/lib/Cake/Core/App.php:0
>
> PHP 7. include() /var/www/lib/Cake/Core/App.php:560
>
> PHP 8. App::load() /var/www/lib/Cake/Core/App.php:0
>
> PHP Fatal error: Class 'AppController' not found in
> /var/www/lib/Cake/Controller/CakeErrorController.php on line 31
>
> PHP Stack trace:
>
> PHP 1. {main}() /var/www/app/webroot/index.php:0
>
> PHP 2. Dispatcher->dispatch() /var/www/app/webroot/index.php:97
>
>
> (This is where I should "Arghhhhh!")
>
> The error message shown on the screen is not the complete error string!
>
> I guess that Cake / PHP is only displaying the Fatal Error, and casually
> loosing the real error here. I.e. it was not that the file was missing or in
> the wrong place - but that the class definition had a simple syntax error in
> it (too trivial and embarrassing to mention here)
>
> So here is my beginners lesson learned: Keep an eye on the Apache error log
> (obvious really). The message on the screen is not only formatted in a way
> that makes it hard to read - it my not be displaying all of the useful
> information you need to sort out the problem.
>
> Rob
>
>
>
>
> --
> 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 [hidden email].
> To unsubscribe from this group, send email to
> [hidden email].
> 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 [hidden email].
To unsubscribe from this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php?hl=en.


Reply | Threaded
Open this post in threaded view
|

Re: Begginer's Lesson learned! [Solved] Authentication Tutorial

Robrobin Hembram
In reply to this post by OxfordRob
Thanks a lot man!! The cakes now beginning to smell nice. And i totally agree with you on the php error messages.

--
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 unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Begginer's Lesson learned! [Solved] Authentication Tutorial

Shturm681
In reply to this post by OxfordRob
You just saved me my portion of "joy". A simple tail /var/www/apache2/error.log showed me I missed a semicolon... 

On Friday, December 21, 2012 2:36:21 PM UTC+2, OxfordRob wrote:
Thank you to jsundquist , crush, sams and cricket over the last few days for helping me with my Authentication tutorial problems. I fixed it this morning.

My take-away from this is a very general 'lesson learned' and  I thought I would share the knowledge for any other beginner who comes through here.

The error message I started with was:

PHP Fatal error: Class 'AppController' not found in /var/www/lib/Cake/Controller/CakeErrorController.php on line 31

PHP Stack trace:

PHP 1. {main}() /var/www/app/webroot/index.php:0

PHP 2. Dispatcher->dispatch() /var/www/app/webroot/index.php:97


This sent me on a 2-day joy-ride looking for, moving and changing access permissions to the 'AppController' class definition file. In the process of course I screwed up my configuration and got in a hopeless mess.

So this morning I re-built everything very carefully, followed the instructions to the letter....and got exactly the same error!

I was about to say "Enough cake for me"...but then remembered that "too much cake" is one of the shortest self-contradictory statements in the English Language.

I decided to copy back the original, distribution AppController.php file  - and the error message went away.

My conclusion was...this is not the fact that the file is missing, but class is not compiling successfully. WIth this in mind I took a look at the Apache Error log.....and this is what I found...

PHP Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /var/www/app/Controller/AppController.php on line 41

PHP Stack trace:

PHP 1. {main}() /var/www/app/webroot/index.php:0

PHP 2. Dispatcher->dispatch() /var/www/app/webroot/index.php:97

PHP 3. Dispatcher->_getController() /var/www/lib/Cake/Routing/Dispatcher.php:152

PHP 4. Dispatcher->_loadController() /var/www/lib/Cake/Routing/Dispatcher.php:228

PHP 5. class_exists() /var/www/lib/Cake/Routing/Dispatcher.php:259

PHP 6. App::load() /var/www/lib/Cake/Core/App.php:0

PHP 7. include() /var/www/lib/Cake/Core/App.php:560

PHP 8. App::load() /var/www/lib/Cake/Core/App.php:0

PHP Fatal error: Class 'AppController' not found in /var/www/lib/Cake/Controller/CakeErrorController.php on line 31

PHP Stack trace:

PHP 1. {main}() /var/www/app/webroot/index.php:0

PHP 2. Dispatcher->dispatch() /var/www/app/webroot/index.php:97


(This is where I should "Arghhhhh!")

The error message shown on the screen is not the complete error string!

I guess that Cake / PHP is only displaying the Fatal Error, and casually loosing the real error here. I.e. it was not that the file was missing or in the wrong place - but that the class definition had a simple syntax error in it (too trivial and embarrassing to mention here)

So here is my beginners lesson learned: Keep an eye on the Apache error log (obvious really). The message on the screen is not only formatted in a way that makes it hard to read - it my not be displaying all of the useful information you need to sort out the problem.

Rob




--
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 unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Begginer's Lesson learned! [Solved] Authentication Tutorial

Lorant Koszegi
In reply to this post by OxfordRob
Got the same problem, one ";" missing. The post was really helpful, i knew to look for a small mistake. Cheers, mate!

vineri, 21 decembrie 2012, 13:36:21 UTC+1, OxfordRob a scris:
Thank you to jsundquist , crush, sams and cricket over the last few days for helping me with my Authentication tutorial problems. I fixed it this morning.

My take-away from this is a very general 'lesson learned' and  I thought I would share the knowledge for any other beginner who comes through here.

The error message I started with was:

PHP Fatal error: Class 'AppController' not found in /var/www/lib/Cake/Controller/CakeErrorController.php on line 31

PHP Stack trace:

PHP 1. {main}() /var/www/app/webroot/index.php:0

PHP 2. Dispatcher->dispatch() /var/www/app/webroot/index.php:97


This sent me on a 2-day joy-ride looking for, moving and changing access permissions to the 'AppController' class definition file. In the process of course I screwed up my configuration and got in a hopeless mess.

So this morning I re-built everything very carefully, followed the instructions to the letter....and got exactly the same error!

I was about to say "Enough cake for me"...but then remembered that "too much cake" is one of the shortest self-contradictory statements in the English Language.

I decided to copy back the original, distribution AppController.php file  - and the error message went away.

My conclusion was...this is not the fact that the file is missing, but class is not compiling successfully. WIth this in mind I took a look at the Apache Error log.....and this is what I found...

PHP Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /var/www/app/Controller/AppController.php on line 41

PHP Stack trace:

PHP 1. {main}() /var/www/app/webroot/index.php:0

PHP 2. Dispatcher->dispatch() /var/www/app/webroot/index.php:97

PHP 3. Dispatcher->_getController() /var/www/lib/Cake/Routing/Dispatcher.php:152

PHP 4. Dispatcher->_loadController() /var/www/lib/Cake/Routing/Dispatcher.php:228

PHP 5. class_exists() /var/www/lib/Cake/Routing/Dispatcher.php:259

PHP 6. App::load() /var/www/lib/Cake/Core/App.php:0

PHP 7. include() /var/www/lib/Cake/Core/App.php:560

PHP 8. App::load() /var/www/lib/Cake/Core/App.php:0

PHP Fatal error: Class 'AppController' not found in /var/www/lib/Cake/Controller/CakeErrorController.php on line 31

PHP Stack trace:

PHP 1. {main}() /var/www/app/webroot/index.php:0

PHP 2. Dispatcher->dispatch() /var/www/app/webroot/index.php:97


(This is where I should "Arghhhhh!")

The error message shown on the screen is not the complete error string!

I guess that Cake / PHP is only displaying the Fatal Error, and casually loosing the real error here. I.e. it was not that the file was missing or in the wrong place - but that the class definition had a simple syntax error in it (too trivial and embarrassing to mention here)

So here is my beginners lesson learned: Keep an eye on the Apache error log (obvious really). The message on the screen is not only formatted in a way that makes it hard to read - it my not be displaying all of the useful information you need to sort out the problem.

Rob




--
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 unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Begginer's Lesson learned! [Solved] Authentication Tutorial

elimushi
In reply to this post by OxfordRob
Thanks man for this post. I too almost said "Enough cake for me"... but U've rescued me!!

--
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 unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.