Do not use classes in your files without properly App::uses() them at the
top of your classes
In your case
App::uses('Security', 'Utility')
right after the opening `<?php` tag
for all files where you use the core Security class.
Am Mittwoch, 13. März 2013 15:39:22 UTC+1 schrieb kaiszy:
>
> Hi!
>
> In my some views and one component i use a method from Security Class for
> encryption and decryption. On my dev-Server (debug > 0) everything works
> fine.
>
> Today i try to deploy to the Liveserver and set debug to 0. But then i get
> the error:
>
> 2013-03-13 15:21:04 Error: Fatal Error (1): Class 'Security' not found in
> [/myRootpath/app/View/Campaigns/select.ctp, line 32]
> 2013-03-13 15:21:04 Error: [InternalErrorException] Internal Server Error
> Request URL: /Campaigns/select
> Stack Trace:
> #0 /myRootpath/lib/Cake/Error/ErrorHandler.php(183):
> ErrorHandler::handleFatalError(1, 'Class 'Security...', '/myRootpath/...',
> 32)
> #1 [internal function]: ErrorHandler::handleError(1, 'Class 'Security...',
> '/myRootpath/...', 32, Array)
> #2 /myRootpath/lib/Cake/Core/App.php(926):
> call_user_func('ErrorHandler::h...', 1, 'Class 'Security...',
> '/myRootpath/...', 32, Array)
> #3 /myRootpath/lib/Cake/Core/App.php(899): App::_checkFatalError()
> #4 [internal function]: App::shutdown()
> #5 {main}
>
> Also when the Component is used i get:
>
> 2013-03-13 15:34:42 Error: Fatal Error (1): Class 'Security' not found in
> [/myRootpath/app/Controller/Component/cbUtilsComponent.php, line 80]
> 2013-03-13 15:34:42 Error: [InternalErrorException] Internal Server Error
> Request URL: /Hashimports/add
> Stack Trace:
> #0 /myRootpath/lib/Cake/Error/ErrorHandler.php(183):
> ErrorHandler::handleFatalError(1, 'Class 'Security...', '/myRootpath/...',
> 80)
> #1 [internal function]: ErrorHandler::handleError(1, 'Class 'Security...',
> '/myRootpath/...', 80, Array)
> #2 /myRootpath/lib/Cake/Core/App.php(926):
> call_user_func('ErrorHandler::h...', 1, 'Class 'Security...',
> '/myRootpath/...', 80, Array)
> #3 /myRootpath/lib/Cake/Core/App.php(899): App::_checkFatalError()
> #4 [internal function]: App::shutdown()
> #5 {main}
>
> When i set debug > 0 on Liveserver, everything works (but then i have the
> debugkit toolbar).
>
> I use cakephp 2.3.0
>
> Best regards,
> Kai.
>
>
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.