Hi Euromakr,

ok..problem solved. Next time i let me more time to understand your email ;)

When i use in my component:

App::uses('Component', 'Controller','Security', 'Utility');

i get the error in debug mode < 1

If i use

App::uses('Security', 'Utility');
App::uses('Component', 'Controller');

it works in all debug mode.

I cant understand why, but it works ;)

Best regards,
  Kai.



Am Mittwoch, 13. März 2013 16:09:22 UTC+1 schrieb euromark:
>
> 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 cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
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 via email to