M
M
muk-crew2015-08-23 00:53:34
Yii
muk-crew, 2015-08-23 00:53:34

Error when generating CRUD code with Gii?

I'm starting to learn Yii2.
Can't generate CRUD code in Gii.
Error keeps popping up

PHP Warning – yii\base\ErrorException
mkdir(): File exists
1. in /var/www/html/yii/basic/vendor/yiisoft/yii2-gii/Generator.php at line 226
   public function saveStickyAttributes()
    {
        $stickyAttributes = $this->stickyAttributes();
        $stickyAttributes[] = 'template';
        $values = [];
        foreach ($stickyAttributes as $name) {
            $values[$name] = $this->$name;
        }
        $path = $this->getStickyDataFile();
        @mkdir(dirname($path), 0755, true);  <------- 226 
        file_put_contents($path, json_encode($values));
    }

b25bc900dd6a4538b4e7b954eff08d7c.png
With what it can be connected ? permissions are set correctly...
Environment:
Vagrant
precise64
PHP 5.5.26
Apache/2.4.12 (Ubuntu)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Pavel Volintsev, 2015-08-24
@copist

Well, for some reason, there is a file whose name matches the name of the directory, which should be created where using mkdir

M
muks-crew, 2015-08-25
@muks-crew

In general, nothing helps so far (((, here is the full error page https://www.dropbox.com/s/6x723z5cb21b3vc/yii_base...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question