Yii Framework Forum: error 500 mkdir() file exists GII 1.1.17 - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

error 500 mkdir() file exists GII 1.1.17 Problem while creating models Rate Topic: -----

#1 User is offline   coriolan 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 22
  • Joined: 26-November 14

Posted 07 August 2015 - 02:11 AM

Hi All,

GII kept failing on me while attempting to create models.
I checked the folder permissions, but all seemed fine. After some trial and error, I had a look at the source code and finally changed yii/framework/gii/CCodeModel.php:387
from
@mkdir(dirname($path),0755,true);

to
		if( ! is_dir(dirname($path))){
			@mkdir(dirname($path),0755,true);
		}


And it works again

(by the way, deleting the created folder manually didn't make the problem go away. It was re-creating it and then re-attempting to create it again)

update: this bug can also be avoided by disabling php_warnings in error_reporting.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users