admin

Categories:

alt
Name: Facebook
Parent: Social
Posts: 2
alt
Name: Tumblr
Parent: Social
Posts: 1
alt
Name: Ubuntu
Parent: Linux
Posts: 13
alt
Name: Linux
Parent: No category
Posts: 1
alt
Name: Content
Parent: No category
Posts: 2
alt
Name: Google Chrome
Parent: Google
Posts: 1
alt
Name: YouTube
Parent: Social
Posts: 1
alt
Name: Composer
Parent: No category
Posts: 4
alt
Name: Codeigniter
Parent: Framework
Posts: 1
alt
Name: Laravel
Parent: Framework
Posts: 5
alt
Name: Notepad++
Parent: IDE
Posts: 1
alt
Name: XAMPP
Parent: Server
Posts: 2
alt
Name: NetBeans
Parent: IDE
Posts: 3
alt
Name: Google Maps API
Parent: Google
Posts: 1
alt
Name: iPage.com
Parent: Hosting
Posts: 1
alt
Name: DHTMLX
Parent: No category
Posts: 1
alt
Name: Git, Git Bash
Parent: No category
Posts: 1
alt
Name: Command line CMD
Parent: No category
Posts: 1
alt
Name: PhpStorm
Parent: IDE
Posts: 2
alt
Name: ApiOK
Parent: Social
Posts: 1

Posts:

Displaying 31-40 of 271 results.
Resolved: Yii2 Error Exception: Class 'Custom class' not found
posted by admin on February 15, 2017
I use in migration classes custom helper class Table, and in migration up process got an error like
Command:

./yii migrate

Result until error

Yii Migration Tool (based on Yii v2.0.11.2)

Total 2 new migrations to be applied:
m170213_124818_init
m170214_092410_domain

Apply the above migrations? (yes|no) [no]:yes
*** applying m170213_124818_init


Error Message:

Exception: Class 'yii\helpers\Table' not found (/var/www/html/basic/migrations/m170213_124818_init.php:10)


My class is in root directory in helpers directory

<?php
namespace yii\helpers;
class Table
{
public static $user = 'user';
public static $role = 'role';
public static $status = 'status';
public static $domain = 'domain';
}


In migration class

<?php
use yii\db\Migration;
use yii\helpers;

class m170213_124818_init extends Migration
{
public function safeUp()
{
/** User Create*/
$this->createTable('{{%'.helpers\Table::$user.'}}', [
'id' => $this->primaryKey(10)->notNull()->unsigned(),
. . .
], 'ENGINE=InnoDB');
}
}


How to resolve itRead more
Resolved: Yii2 Helper folder, helper namespace, helper class
posted by admin on February 14, 2017
In yii1 I created helpers folder in public and move all my helper classes and autoload them from main.php setting file

// autoloading model and component classes
'import'=>array(
...
'application.helper.*',
),

I have three questions

  1. Where create helpers classes folder
  2. How to create helpers classes
  3. How to autoload or use helpers classes
Read more
Resolved: Yii2 Console command error and warning with SetEnv APPLICATION_ENV usage
posted by admin on February 13, 2017
Yii2 Terminal Command

> ./yii

Command result errors ana warnings

PHP Warning: require(/var/www/html/myproject/config/env/prod/env.php): failed to open stream: No such file or directory in /var/www/html/myproject/config/env.php on line 1
PHP Fatal error: require(): Failed opening required '/var/www/html/vktracker2/config/env/prod/env.php' (include_path='.:/usr/share/php'myproject/www/html/myproject/config/env.php on line 1

In root my yii file

#!/usr/bin/env php
<?php
/**
* Yii console bootstrap file.
*/
// Define our application_env variable as provided by nginx/apache
if (!defined('APPLICATION_ENV'))
{
if (getenv('APPLICATION_ENV') != false)
define('APPLICATION_ENV', getenv('APPLICATION_ENV'));
else
define('APPLICATION_ENV', 'prod');
}
$env = require(__DIR__ . '/config/env.php');
defined('YII_DEBUG') or define('YII_DEBUG', $env['debug']);
// fcgi doesn't have STDIN and STDOUT defined by default
defined('STDIN') or define('STDIN', fopen('php://stdin', 'r'));
defined('STDOUT') or define('STDOUT', fopen('php://stdout', 'w'));
require(__DIR__ . '/vendor/autoload.php');
require(__DIR__ . '/vendor/yiisoft/yii2/Yii.php');
$config = require(__DIR__ . '/config/console.php');
$application = new yii\console\Application($config);
$exitCode = $application->run();
exit($exitCode);

In result yii don't recognize my SetEnv, which is in virtual hosts config file
/etc/apache2/apache2.config

# yii config
SetEnv APPLICATION_ENV dev


How to fix it?Read more
Resolved: Ubuntu How to remove config file from apache2 sites-available folder
posted by admin on February 10, 2017
I want to remove file from /etc/apache2/sites-available/,
For example this file, and I have no permission
/etc/apache2/sites-available/website.confRead more
Resolved: Ubuntu 16.04 The requested URL /phpmyadmin was not found on this server
posted by admin on February 9, 2017
After installation Ubuntu phpMyAdmin on ubuntu 16.04, I can't access to my
localhost/phpmyadmin
Error code

The requested URL /phpmyadmin was not found on this server
Read more
Resolved: Ubuntu Linux remove directory from root var/www directory problem
posted by admin on February 7, 2017
I try to remove folder but terminal gave error
Command and error

rm -rf /var/www/website.dev
rm: cannot remove '/var/www/website.dev': Permission denied

I try to did it before this command and the same situation

sudo chmod -R 777 /var/www/website.dev

I try to make my user superuser but still without result

sudo adduser <username> www-data
sudo chown -R www-data:www-data /var/www
sudo chmod -R g+rwX /var/www
Read more
Resolved: JetBrains PhpStorm run terminal command line cmd from IDE space
posted by admin on February 6, 2017
I want to run terminal from cmd terminal from JetBrains PhpStorm IDE space from menu, or by keys combination or from project right click.Read more
Resolved: How to cretae(make) .htaccess file in Net Beans
posted by admin on February 6, 2017
I want to create .htaccess file in NetBeans.
I want to relize it by short and easy way.
How to make it?Read more
Resolved: Yii2 slash 2f url problem
posted by admin on February 6, 2017
After installation Yii2, I try to navigate with pages of application, and in url I have problem with slashes

http://website.dev/index.php?r=site%2Fabout
http://website.dev/index.php?r=site%2Fcontact
http://website.dev/index.php?r=site%2Floginite%2Floginite%2Flogin

I want to slashes in url in place of %2FRead more
Resolved: Command Line mkdir p The syntax of the command is incorrect error
posted by admin on February 1, 2017
I try to run command in CMD

mkdir –p config/env/dev

And I got error

The syntax of the command is incorrect

Error in Russian

Ошибка в синтаксисе команды.
Read more