Posted on January 25, 2016, 7:03 am, by admin, under
yii.
Step 1: app/config/console.php ‘log’ => [ ‘traceLevel’ => YII_DEBUG ? 3 : 0, ‘targets’ => [ [ ‘class’ => ‘app\helpers\MyFileTarget’, ‘exportInterval’ => 1, ‘categories’ => [’my-category’], ‘except’ => [’application’], ‘levels’ => [’trace’], ‘logFile’ => ‘@app/runtime/logs/my-category.log’, ], ], ], Step 2: Create file app/helpers/MyFileTarget.php <?php namespace app\helpers; use Yii; use yii\log\Logger; use […]
Posted on January 11, 2016, 3:40 pm, by admin, under
apache.
vi /etc/apache2/envvars Edit export APACHE_RUN_USER=imran export APACHE_RUN_GROUP=www-data Save and restart apache
Posted on January 8, 2016, 12:07 pm, by admin, under
linux.
If you forgot root’s password follow these steps to reset it: 1. Reboot, press ESC to get to GRUB boot loader menu 2. Choose from the list kernel with (recovery mode) 3. From the menu screen choose "Drop to root shell prompt" 4. By default it gives you read-only filesystem Run this for read/write: mount […]
Posted on January 7, 2016, 7:10 am, by admin, under
mysql.
Run the following statement for bulk UPDATE UPDATE table1 SET column2 = CASE WHEN column1 = ‘A’ THEN ‘AB’ WHEN column1 = ‘B’ THEN ‘BC’ WHEN column1 = ‘C’ THEN ‘CD’ ELSE column2 END; Make sure you included ELSE statement, if you skip it then it will NULL rest of the column2 fields. So, if […]