Jump to content
X2Community Forums

YII code generator - module generator


Recommended Posts

PHP Error

 

file_put_contents(/var/www/vhosts/textwerkstatt.de/httpdocs/x2engine/protected/runtime/gii-1.1.7/ModuleCode.php) [<a href='function.file-put-contents'>function.file-put-contents</a>]: failed to open stream: Permission denied

 

/var/www/vhosts/textwerkstatt.de/httpdocs/x2engine/framework/gii/CCodeModel.php(305)

 

293 }

294 }

295 }

296 }

297

298 /**

299 * Saves sticky attributes into a file.

300 */

301 public function saveStickyAttributes()

302 {

303 $path=$this->getStickyFile();

304 @mkdir(dirname($path),0755,true);

305 file_put_contents($path,"<?php\nreturn ".var_export($this->_stickyAttributes,true).";\n");

306 }

307

308 /**

309 * @return string the file path that stores the sticky attribute values.

310 */

311 public function getStickyFile()

312 {

313 return Yii::app()->runtimePath.'/gii-'.Yii::getVersion().'/'.get_class($this).'.php';

314 }

315

316 /**

317 * Converts a word to its plural form.

 

 

Stack Trace

#0

 

+ /var/www/vhosts/textwerkstatt.de/httpdocs/x2engine/framework/gii/CCodeModel.php(305): file_put_contents("/var/www/vhosts/textwerkstatt.de/httpdocs/x2engine/protected/run...", "<?php return array ( 'template' => 'default', ); ") #1

 

+ /var/www/vhosts/textwerkstatt.de/httpdocs/x2engine/framework/gii/CCodeGenerator.php(157): CCodeModel->saveStickyAttributes() #2

 

+ /var/www/vhosts/textwerkstatt.de/httpdocs/x2engine/framework/gii/CCodeGenerator.php(61): CCodeGenerator->prepare() #3

 

+ /var/www/vhosts/textwerkstatt.de/httpdocs/x2engine/framework/web/actions/CInlineAction.php(50): CCodeGenerator->actionIndex() #4

 

+ /var/www/vhosts/textwerkstatt.de/httpdocs/x2engine/framework/web/CController.php(300): CInlineAction->runWithParams(array()) #5

 

+ /var/www/vhosts/textwerkstatt.de/httpdocs/x2engine/framework/web/CController.php(278): CController->runAction(CInlineAction) #6

 

+ /var/www/vhosts/textwerkstatt.de/httpdocs/x2engine/framework/web/CController.php(257): CController->runActionWithFilters(CInlineAction, array()) #7

 

+ /var/www/vhosts/textwerkstatt.de/httpdocs/x2engine/framework/web/CWebApplication.php(328): CController->run("") #8

 

+ /var/www/vhosts/textwerkstatt.de/httpdocs/x2engine/framework/web/CWebApplication.php(121): CWebApplication->runController("gii/module") #9

 

+ /var/www/vhosts/textwerkstatt.de/httpdocs/x2engine/framework/base/CApplication.php(155): CWebApplication->processRequest() #10

 

– /var/www/vhosts/textwerkstatt.de/httpdocs/x2engine/index.php(63): CApplication->run()

 

58 defined('YII_DEBUG') or define('YII_DEBUG',true);

59 // specify how many levels of call stack should be shown in each log message

60 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);

61

62 require_once($yii);

63 Yii::createWebApplication($config)->run();

 

2012-01-28 16:49:42 Apache/2.2.0 (Fedora) mod_jk/1.2.25 mod_python/3.3.1 Python/2.5.2 PHP/5.2.4-2ubuntu5.14 with Suhosin-Patch mod_perl/2.0.3 Perl/v5.8.8 Yii Framework/1.1.7

Link to post
Share on other sites

This appears to be an issue with the file permissions your server--check to make sure the server has permission to access/copy files to the directory you posted. This looks to be the same as on your other post about Custom Modules.

Link to post
Share on other sites
  • 7 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...