Can't send email through cakephp - email

I need a hand here.
I'm migrating a CakePHP app, and before this we can't send e-mails.
I've facing this log:
2017-09-06 11:28:19 Error: [SocketException] Connection refused
Request URL: /admin/settings/mail_test
Stack Trace:
#0 lib/Cake/Network/Email/SmtpTransport.php(154): CakeSocket->connect()
#1 lib/Cake/Network/Email/SmtpTransport.php(95): SmtpTransport->_connect()
#2 lib/Cake/Network/Email/CakeEmail.php(1161): SmtpTransport->send(Object(CakeEmail))
#3 app/Controller/SettingsController.php(38): CakeEmail->send()
#4 [internal function]: SettingsController->admin_mail_test()
#5 lib/Cake/Controller/Controller.php(490): ReflectionMethod->invokeArgs(Object(SettingsController), Array)
#6 lib/Cake/Routing/Dispatcher.php(193): Controller->invokeAction(Object(CakeRequest))
#7 lib/Cake/Routing/Dispatcher.php(167): Dispatcher->_invoke(Object(SettingsController), Object(CakeRequest))
#8 app/webroot/index.php(108): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
#9 {main}
Edit: I've found the gap and solve this issue. 1. My hosting don't allow to use 25 port to send e-mails. 2. After change to Office 365 on por 587, the Exchange only Works with TLS/STARTTLS, we need to configure this on "SmtpTransport.php" file.
Thanks for viewers.

Related

Client token not generated in AWS Server for Sandbox account

Client token is not generated for sandbox account in Braintree. Previously it was working fine.
When logged into Braintree Sandbox account, it shows the following message in the dashboard
"As part of PCI 3.1 requirements, we've recently deprecated support for TLS 1.0 and 1.1 in the Sandbox. You can find information on how to update your systems here - "
Is this the cause for the issue?
Below is the code we use to generate client token:
$config = Zend_Registry::get('config');
Braintree_Configuration::environment($config->payment->braintree->environment);
Braintree_Configuration::merchantId($config->payment->braintree->merchantId);
Braintree_Configuration::publicKey($config->payment->braintree->publicKey);
Braintree_Configuration::privateKey($config->payment->braintree->privateKey);
$clientToken = Braintree_ClientToken::generate();
We have a project developed in Zend Framework 1.12 version.
Any help is greatly appreciated.
Thanks in advance.
When I use getMessage option in catch block, it doesn't show any error messages. But when I use the TraceAsString I receive the following message:
/home/userName/projects/projectName/vendor/braintree/braintree_php/lib/Braintree/Http.php(101): Braintree\Http->_doUrlRequest('POST', 'https://api.san...', '_doRequest('POST', '/merchants/kyfn...', 'post('/merchants/kyfn...', Array) #3 /home/userName/projects/projectName/vendor/braintree/braintree_php/lib/Braintree/ClientTokenGateway.php(47): Braintree\ClientTokenGateway->_doGenerate('/client_token', Array) #4 /home/userName/projects/projectName/vendor/braintree/braintree_php/lib/Braintree/ClientToken.php(18): Braintree\ClientTokenGateway->generate(Array) #5 /home/userName/projects/projectName/application/util/BaseController.php(1336): Braintree\ClientToken::generate() #6 /home/userName/projects/projectName/application/controllers/OffersController.php(856): BaseController->getClientToken() #7 /home/userName/projects/projectName/vendor/zendframework/zendframework1/library/Zend/Controller/Action.php(516): OffersController->checkoutAction() #8 /home/userName/projects/projectName/application/util/BaseController.php(780): Zend_Controller_Action->dispatch('checkoutAction') #9 /home/userName/projects/projectName/vendor/zendframework/zendframework1/library/Zend/Controller/Dispatcher/Standard.php(308): BaseController->dispatch('checkoutAction') #10 /home/userName/projects/projectName/vendor/zendframework/zendframework1/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #11 /home/userName/projects/projectName/vendor/zendframework/zendframework1/library/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch() #12 /home/userName/projects/projectName/vendor/zendframework/zendframework1/library/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run() #13 /home/userName/projects/projectName/public/index.php(39): Zend_Application->run() #14 /home/userName/projects/projectName/public/dev-router.php(6): require('/home/userName/pr...') #15 {main}
The issue got fixed after I updated the CURL version of PHP as per the Braintree response.

Magento 2 webapi INR error While place order

I got an error while placing order in magento 2. But my order is placed in magento 2 backend. I got an error like this.
main.CRITICAL: Exception: Report ID: webapi-56b84c8611046; Message: Notice: Undefined index: INR in app/code/Webkul/Marketplace/Observer/SalesOrderPlaceAfterObserver.php on line 303 in vendor/magento/framework/Webapi/ErrorProcessor.php:194 Stack trace:
#0 vendor/magento/framework/Webapi/ErrorProcessor.php(139): Magento\Framework\Webapi\ErrorProcessor->_critical(Object(Exception))
#1 vendor/magento/module-webapi/Controller/Rest.php(163): Magento\Framework\Webapi\ErrorProcessor->maskException(Object(Exception))
#2 var/generation/Magento/Webapi/Controller/Rest/Interceptor.php(24): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
#3 vendor/magento/framework/App/Http.php(115): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#4 vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#5 index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
Kindly help me .
It is a bug in the Webkul Marketplace extension, you should contact the developer for support.

Failed to authenticate on SMTP server error using gmail

I'm trying to set up email for my first laravel project, and was thrilled that there's a laracast for it: https://laracasts.com/lessons/mailers
I've followed the simple steps, chose gmail in mail.php (x's added for anonymity):
'driver' => env('MAIL_DRIVER', 'smtp'),
'host' => env('MAIL_HOST', 'smtp.gmail.com'),
'port' => env('MAIL_PORT', 587),
'from' => ['address' => 'dianexxxxx#gmail.com', 'name' => 'Diane Kaplan'],
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'username' => 'dianexxxxx#gmail.com',
'password' => 'xxxxx',
'sendmail' => '/usr/sbin/sendmail -bs',
'pretend' => false,
.env has (x's added for anonymity)- the laracast doesn't have us use MAIL_USERNAME and MAIL_PASSWORD, but they're updated for good measure assuming I'll pull from there later:
MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=dianexxxxx#gmail.com
MAIL_PASSWORD=xxxxxx
MAIL_ENCRYPTION=null
But in the first little moment of truth trying to send a mail (3:30 mark), I get an authentication error:
Swift_TransportException in AuthHandler.php line 181:
Failed to authenticate on SMTP server with username "dianexxxxx#gmail.com" using 3 possible authenticators
Based on a little stackoverflow reading, I tried turning on 'access to less secure apps' in my gmail settings, but no change in the error. (And the other posts about this issue had other factors that made a fancier problem than mine).
Nothing jumps out at me from laravel.log (below)- any ideas?
[2015-11-26 12:25:55] local.ERROR: exception 'Swift_TransportException' with message 'Failed to authenticate on SMTP server with username "dianekaplan#gmail.com" using 3 possible authenticators' in /home/vagrant/Code/Family-laravel/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php:181
Stack trace:
#0 /home/vagrant/Code/Family-laravel/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php(307): Swift_Transport_Esmtp_AuthHandler->afterEhlo(Object(Swift_SmtpTransport))
#1 /home/vagrant/Code/Family-laravel/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(118): Swift_Transport_EsmtpTransport->_doHeloCommand()
#2 /home/vagrant/Code/Family-laravel/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php(79): Swift_Transport_AbstractSmtpTransport->start()
#3 /home/vagrant/Code/Family-laravel/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php(395): Swift_Mailer->send(Object(Swift_Message), Array)
#4 /home/vagrant/Code/Family-laravel/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php(181): Illuminate\Mail\Mailer->sendSwiftMessage(Object(Swift_Message))
#5 /home/vagrant/Code/Family-laravel/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(220): Illuminate\Mail\Mailer->send('emails.welcome', Array, Object(Closure))
#6 /home/vagrant/Code/Family-laravel/app/Http/routes.php(59): Illuminate\Support\Facades\Facade::__callStatic('send', Array)
#7 /home/vagrant/Code/Family-laravel/app/Http/routes.php(59): Illuminate\Support\Facades\Mail::send('emails.welcome', Array, Object(Closure))
#8 [internal function]: App\Providers\RouteServiceProvider->{closure}()
#9 /home/vagrant/Code/Family-laravel/vendor/laravel/framework/src/Illuminate/Routing/Route.php(155): call_user_func_array(Object(Closure), Array)
#10 /home/vagrant/Code/Family-laravel/vendor/laravel/framework/src/Illuminate/Routing/Route.php(130): Illuminate\Routing\Route->runCallable(Object(Illuminate\Http\Request))
#11 /home/vagrant/Code/Family-laravel/vendor/laravel/framework/src/Illuminate/Routing/Router.php(704): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#12 [internal function]: Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#13 /home/vagrant/Code/Family-laravel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#14 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#15 /home/vagrant/Code/Family-laravel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#16 /home/vagrant/Code/Family-laravel/vendor/laravel/framework/src/Illuminate/Routing/Router.php(706): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#17 /home/vagrant/Code/Family-laravel/vendor/laravel/framework/src/Illuminate/Routing/Router.php(671): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#18 /home/vagrant/Code/Family-laravel/vendor/laravel/framework/src/Illuminate/Routing/Router.php(631): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#19 /home/vagrant/Code/Family-laravel/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(236): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#20 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#21 /home/vagrant/Code/Family-laravel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#22 /home/vagrant/Code/Family-laravel/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#23 [internal function]: Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure))
#24 /home/vagrant/Code/Family-laravel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#25 /home/vagrant/Code/Family-laravel/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#26 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#27 /home/vagrant/Code/Family-laravel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#28 /home/vagrant/Code/Family-laravel/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(62): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#29 [internal function]: Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#30 /home/vagrant/Code/Family-laravel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#31 /home/vagrant/Code/Family-laravel/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#32 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#33 /home/vagrant/Code/Family-laravel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#34 /home/vagrant/Code/Family-laravel/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(59): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#35 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#36 /home/vagrant/Code/Family-laravel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#37 /home/vagrant/Code/Family-laravel/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(42): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#38 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#39 /home/vagrant/Code/Family-laravel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#40 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#41 /home/vagrant/Code/Family-laravel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#42 /home/vagrant/Code/Family-laravel/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(122): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#43 /home/vagrant/Code/Family-laravel/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(87): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#44 /home/vagrant/Code/Family-laravel/public/index.php(54): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#45 {main}
This will not work as of May 30, 2022 checkout here https://support.google.com/accounts/answer/6010255?hl=en&authuser=6 Thanks #sarout for pointing this out.
Did you turn on the "Allow less secure apps" on? go to this link
https://myaccount.google.com/security#connectedapps
Take a look at the Sign-in & security -> Apps with account access menu.
You must turn the option "Allow less secure apps" ON.
If is still doesn't work try one of these:
Go to https://accounts.google.com/UnlockCaptcha , and click continue
and unlock your account for access through other media/sites.
Use double quote in your password: "your password"
And change your .env file
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=dianexxxxx#gmail.com
MAIL_PASSWORD=xxxxxx
MAIL_ENCRYPTION=tls
because the one's you have specified in the mail.php will only be used if the value is not available in the .env file.
Nothing wrong with your method, it's a G-mail security issue.
Login g-mail account settings.
Enable 2-step verification.
Generate app-password.
Use new-generated password in place of your real g-mail password.
Don't forget to clear cache.
php artisan config:cache.
php artisan config:clear.
MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=587
MAIL_USERNAME=yourgmailid#gmail.com
MAIL_PASSWORD=generatedAppPassword
MAIL_ENCRYPTION=tls
If you still get this error when sending email: "Failed to authenticate on SMTP server with username "youremail#gmail.com" using 3 possible authenticators"
You may try one of these methods:
Go to https://accounts.google.com/UnlockCaptcha, click continue and unlock your account for access through other media/sites.
Using a double quote password: "your password" <-- this one also solved my problem.
I had the same issue, but when I ran the following command, it was ok:
php artisan config:cache
Change the .env file as follow
MAIL_DRIVER=smtp
MAIL_HOST=smtp.googlemail.com
MAIL_PORT=587
MAIL_USERNAME=email_address#gmail.com
MAIL_PASSWORD=password
MAIL_ENCRYPTION=tls
And the go to the gmail security section
->Allow Less secure app access
Then run
php artisan config:clear
Refresh the site
If you still get this error when sending email: "Failed to authenticate on SMTP server with username "example#gmail.com" using 3 possible authenticators"
You may try one of these methods:
Go to https://accounts.google.com/UnlockCaptcha, click continue and unlock your account for access through other media/sites.
Use double quote for your password: like - "Abc#%$67eSDu"
This is how I solved this issue:
Change the .env file as follow
Never forget to restart the server after you change the .env file
I had the same problem and I've already tried everything and nothing seemed to work until I just changed the 'host' value in config.php to:
'host' => env('smtp.mailtrap.io'),
When I changed that it worked nicely, somehow it was using the default host " smtp.mailtrap.org" and ignoring the .env variable I was setting.
After making some test I realize that if I placed the env variable in this order it would worked as it shoulded:
MAIL_HOST=smtp.mailtrap.io

MAIL_DRIVER=smtp

MAIL_PORT=2525
MAIL_USERNAME=xxxx

MAIL_PASSWORD=xxx

MAIL_ENCRYPTION=null
I also got the same error-
Make sure less secure app access is enabled in your gmail account
https://myaccount.google.com/security#connectedapps
Put double quotes to the password "password" in .env file
These solutions worked for me.
I know this is too late to answer, but I solved this issue by adding double quotes to the password like so:
MAIL_PASSWORD="yourpasswordgoeshere"

Controller not working in zend framework

I have run zend framework project which is downloaded from live site, in localhost. All are working fine. But in front page, The following errors are shown.
There was an error.
Exception information:
Message: Action Helper by name GetEnvPath not found
Stack trace:
#0 D:\xampp\htdocs\hyperspace_dev\library\Zend\Controller\Action\HelperBroker.php(293): Zend_Controller_Action_HelperBroker::_loadHelper('GetEnvPath')
#1 D:\xampp\htdocs\hyperspace_dev\library\Zend\Controller\Action\HelperBroker.php(323): Zend_Controller_Action_HelperBroker->getHelper('getEnvPath')
#2 D:\xampp\htdocs\hyperspace_dev\application\controllers\CustomerController.php(390): Zend_Controller_Action_HelperBroker->__call('getEnvPath', Array)
#3 D:\xampp\htdocs\hyperspace_dev\application\controllers\CustomerController.php(390): Zend_Controller_Action_HelperBroker->getEnvPath()
#4 D:\xampp\htdocs\hyperspace_dev\library\Zend\Controller\Action.php(516): CustomerController->accountAction()
#5 D:\xampp\htdocs\hyperspace_dev\library\Zend\Controller\Dispatcher\Standard.php(308): Zend_Controller_Action->dispatch('accountAction')
#6 D:\xampp\htdocs\hyperspace_dev\library\Zend\Controller\Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#7 D:\xampp\htdocs\hyperspace_dev\library\Zend\Application\Bootstrap\Bootstrap.php(97): Zend_Controller_Front->dispatch()
#8 D:\xampp\htdocs\hyperspace_dev\library\Zend\Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#9 D:\xampp\htdocs\hyperspace_dev\index.php(36): Zend_Application->run()
#10 {main}
Request Parameters:
array (
'controller' => 'customer',
'action' => 'account',
'module' => 'default',
)
Front page means After getting login the redirected page
And also controller are not called here
I have searched lot of things.But still now i can't resolved.
If anybody met this same problem, Please save me guys
The actionhelper GetEnvPath cannot be found. Your request and controller are probably right. I would suggest checking if it does exists and if so, if the filename and call have the right case (case sensitivity).
enable php.ini openssl
it will work ...
:)
Cheers
Neil

Magento & Memcached - HTTPS Errors

I've tried installing both fast cache using memcached and full page caching in magento enterprise. The first by editing the local.xml file, and the latter by editing the enterprise.xml file.
Each time I change one of them and commit it to the site, HTTP requests function as normal, and data is added to the memcached system (using memcache-top to check) however HTTPs some HTTPS functions dont' seem to work, such as logging into the admin. In particular the dashboard never seems to work.
Here is a dump from the magento/var/report:
a:5:{i:0;s:85:"Unknown number format type 'boolean'. Format '' must be a valid number format string.";i:1;s:3529:"#0 /var/www/magento/lib/Zend/Locale/Format.php(305): Zend_Locale_Format::_checkOptions(Array)
#1 /var/www/magento/lib/Zend/Currency.php(186): Zend_Locale_Format::toNumber('133.370000', Array)
#2 /var/www/magento/app/code/core/Mage/Directory/Model/Currency.php(233): Zend_Currency->toCurrency('133.370000', Array)
#3 /var/www/magento/app/code/core/Mage/Directory/Model/Currency.php(216): Mage_Directory_Model_Currency->formatTxt('133.37000000', Array)
#4 /var/www/magento/app/code/core/Mage/Directory/Model/Currency.php(197): Mage_Directory_Model_Currency->formatPrecision('133.37000000', 2, Array, true, false)
#5 /var/www/magento/app/code/core/Mage/Adminhtml/Block/Dashboard/Bar.php(82): Mage_Directory_Model_Currency->format('133.37000000')
#6 /var/www/magento/app/code/core/Mage/Adminhtml/Block/Dashboard/Bar.php(62): Mage_Adminhtml_Block_Dashboard_Bar->format('133.37000000')
#7 /var/www/magento/app/code/core/Mage/Adminhtml/Block/Dashboard/Totals.php(74): Mage_Adminhtml_Block_Dashboard_Bar->addTotal('Revenue', '133.37000000')
#8 /var/www/magento/app/code/core/Mage/Core/Block/Abstract.php(238): Mage_Adminhtml_Block_Dashboard_Totals->_prepareLayout()
#9 /var/www/magento/app/code/core/Mage/Core/Model/Layout.php(430): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#10 /var/www/magento/app/code/core/Mage/Adminhtml/Block/Dashboard.php(50): Mage_Core_Model_Layout->createBlock('adminhtml/dashb...')
#11 /var/www/magento/app/code/core/Mage/Core/Block/Abstract.php(238): Mage_Adminhtml_Block_Dashboard->_prepareLayout()
#12 /var/www/magento/app/code/core/Mage/Core/Model/Layout.php(430): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#13 /var/www/magento/app/code/core/Mage/Core/Model/Layout.php(446): Mage_Core_Model_Layout->createBlock('adminhtml/dashb...', 'dashboard')
#14 /var/www/magento/app/code/core/Mage/Core/Model/Layout.php(238): Mage_Core_Model_Layout->addBlock('adminhtml/dashb...', 'dashboard')
#15 /var/www/magento/app/code/core/Mage/Core/Model/Layout.php(204): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#16 /var/www/magento/app/code/core/Mage/Core/Model/Layout.php(209): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#17 /var/www/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(345): Mage_Core_Model_Layout->generateBlocks()
#18 /var/www/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(270): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#19 /var/www/magento/app/code/core/Mage/Adminhtml/Controller/Action.php(263): Mage_Core_Controller_Varien_Action->loadLayout(NULL, true, true)
#20 /var/www/magento/app/code/core/Mage/Adminhtml/controllers/DashboardController.php(40): Mage_Adminhtml_Controller_Action->loadLayout()
#21 /var/www/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(420): Mage_Adminhtml_DashboardController->indexAction()
#22 /var/www/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#23 /var/www/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#24 /var/www/magento/app/code/core/Mage/Core/Model/App.php(349): Mage_Core_Controller_Varien_Front->dispatch()
#25 /var/www/magento/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#26 /var/www/magento/index.php(80): Mage::run('', 'store')
#27 {main}";s:3:"url";s:102:"/index.php/admin/dashboard/index/key/<<author's_note:this_was_a_hash>>/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:5:"admin";}
Is there a special procedure for turning on memcached with magento?
The guides I've read don't mention anything special, but then I've seen a few things like here:
http://www.magentocommerce.com/boards/viewthread/230185/#t386967
Where they mention turning off all caches before hand etc. FWIW after I reinstated the current local.xml, nothing I did would get the site back up again. Dumping caches, restarting apache, etc. I had to make the code change in the above to get the site up, then revert it later.
Is this normal magento behaviour?
File app/etc/local.xml have to be edited
<config>
<global>
<cache>
<prefix>alphanumeric</prefix>
<backend>memcached</backend><!-- apc / memcached / empty=file -->
<memcached><!-- memcached cache backend related config -->
<servers><!-- any number of server nodes can be included -->
<server>
<host><![CDATA[127.0.0.1]]></host>
<port><![CDATA[11211]]></port>
<persistent><![CDATA[1]]></persistent>
</server>
</servers>
<compression><![CDATA[0]]></compression>
<cache_dir><![CDATA[]]></cache_dir>
<hashed_directory_level><![CDATA[]]></hashed_directory_level>
<hashed_directory_umask><![CDATA[]]></hashed_directory_umask>
<file_name_prefix><![CDATA[]]></file_name_prefix>
</memcached>
</cache>
...
<prefix>alphanumeric</prefix> fix this error
or use this
<backend><![CDATA[memcache]]></backend>