After I ran composer update to get new Yii2 framework version, I got this error
yii\web\Request::cookieValidationKey must be configured with a secret key
To overcome this error, I added this code below in
'components' => [
'request' => [
'enableCookieValidation' => true,
'cookieValidationKey' => 'your-validation-key',
Hope it helps.
I got MySQL error 2006: MySQL server has gone away when I was importing my big database. This error is caused by low default setting of max_allowed_packet. The solution is raising this value in mysql configuration file.
- If you use xampp in windows, the configuration file is
- If you use linux, the configuration file is
[mysqld] section and change max_allowed_packet to bigger value.
max_allowed_packet = 256M
After you change the value, restart your mysql. It must work now.
In this article, I will show you how to setup RESTful API in Yii2 framework. It is a little bit tricky because Yii2 is still in
beta release (when this article is written) so the documentation is not complete enough. But don’t worry, this article will give you insight how to setup API in Yii2. Continue reading
I got an error when deploying my Node.js app into AWS Elastic Beanstalk (EB). The error said
Error: connect ETIMEDOUT
at errnoException (net.js:901:11)
at Object.afterConnect [as oncomplete] (net.js:892:19)
at Protocol._enqueue (/var/app/current/node_modules/mysql/lib/protocol/Protocol.js:110:26)
at Protocol.handshake (/var/app/current/node_modules/mysql/lib/protocol/Protocol.js:42:41)
My Node.js app using node-mysql module to access database. You can see “mysql” in the error statement. Seeing from errors, this must be related with database. I use Amazon Relational Database Service (RDS) and my node.js app is configured to connect with it.