Posted
on March 2, 2016, 9:14 pm,
by admin,
under
git.
git remote set-url origin https://username@hostname:port/project.git |
Posted
on February 22, 2016, 10:49 pm,
by admin,
under
php,
yii.
<?php
echo $query->createCommand()->sql; |
Posted
on February 19, 2016, 7:12 am,
by admin,
under
beanstalk.
telnet localhost 11300
stats
peek-ready
FOUND 7 90
{"job":"Kleidoo\\Queue\\Job\\Shop\\Import\\ProductFeed","data":{"id":"303","revision":19}}
peek-delayed
FOUND 7 90
{"job":"Kleidoo\\Queue\\Job\\Shop\\Import\\ProductFeed","data":{"id":"303","revision":19}}
delete 7 |
Posted
on February 19, 2016, 7:11 am,
by admin,
under
beanstalk.
/etc/init.d/beanstalkd stop
cd /var/lib/beanstalkd
rm -r -f *
/etc/init.d/beanstalkd start |
Posted
on February 18, 2016, 12:23 pm,
by admin,
under
git.
Posted
on February 14, 2016, 12:35 pm,
by admin,
under
apache.
Posted
on February 11, 2016, 3:23 pm,
by admin,
under
php.
<?php
curl_setopt($f1, CURLOPT_VERBOSE, true); |
Posted
on February 10, 2016, 9:47 am,
by admin,
under
php,
yii.
<?php
return Yii::$app->response->sendFile($fileName); |
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 yii\log\FileTarget;
class MyFileTarget extends FileTarget
{
public function formatMessage($message)
{
list($text, $level, $category, $timestamp) = $message;
$level = Logger::getLevelName($level);
if ($level == 'trace') {
return date('Y-m-d H:i:s', $timestamp) . " [$level][$category] $text";
}
}
} |
Step 3:
cat /var/www/yii2-installed-dir/app/runtime/logs/my-category.log |
Posted
on January 11, 2016, 3:40 pm,
by admin,
under
apache.
Edit
export APACHE_RUN_USER=imran
export APACHE_RUN_GROUP=www-data |
Save and restart apache