php - Invalid Bootstrap path and CDN URL not set -


i receive message when try install yiistrap in yii. have followed steps getyiistrap.com 've got error:

invalid bootstrap path , cdn url not set. set vendor.twbs.bootstrap.dist alias or cdnurl parameter in configuration file

any suggestions? didn't use composer. downloaded zip file.

also, using yii 1.1.16

my file main.php

return array(     'basepath'=>dirname(__file__).directory_separator.'..',     'name'=>'my web application',      // preloading 'log' component     'preload'=>array('log'),       // path aliases     'aliases' => array(         'bootstrap' => realpath(__dir__ . '/../extensions/bootstrap'), // change if necessary         'vendor.twbs.bootstrap.dist' => realpath(__dir__ . '/../extensions/bootstrap'),     ),      // autoloading model , component classes     'import'=>array(         'application.models.*',         'application.components.*',         'bootstrap.helpers.*',         'bootstrap.widgets.*',         'bootstrap.behaviors.*',     ),      'modules'=>array(         // uncomment following enable gii tool         'gii'=>array(             'class'=>'system.gii.giimodule',             'password'=>'enter password here',             // if removed, gii defaults localhost only. edit taste.             'ipfilters'=>array('127.0.0.1','::1'),             'generatorpaths' => array('bootstrap.gii'),         ),      ),      // application components     'components'=>array(          'bootstrap' => array(             'class' => 'bootstrap.components.tbapi',            ),          'user'=>array(             // enable cookie-based authentication             'allowautologin'=>true,         ),          // uncomment following enable urls in path-format          'urlmanager'=>array(             'urlformat'=>'path',             'rules'=>array(                 '<controller:\w+>/<id:\d+>'=>'<controller>/view',                 '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',                 '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',             ),         ),           // database settings configured in database.php         'db'=>require(dirname(__file__).'/database.php'),          'errorhandler'=>array(             // use 'site/error' action display errors             'erroraction'=>'site/error',         ),          'log'=>array(             'class'=>'clogrouter',             'routes'=>array(                 array(                     'class'=>'cfilelogroute',                     'levels'=>'error, warning',                 ),                 // uncomment following show log messages on web pages                 /*                 array(                     'class'=>'cweblogroute',                 ),                 */             ),         ),      ),      // application-level parameters can accessed     // using yii::app()->params['paramname']     'params'=>array(         // used in contact page         'adminemail'=>'webmaster@example.com',     ), ); 

this old question, found solution https://github.com/crisu83/yiistrap/issues/263

@syntaxc say:

the problem me did not have bootstrap installed! found 2 solutions. 1) use bootstrap public cdn. ( eg https://maxcdn.bootstrapcdn.com ) set add single line in config/main.php

'components'=>array(           ...           'bootstrap'=>array(                          ...                          'cdnurl'=>"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/",           ),  ),  

2) can host bootstrap yourself. download bootstrap getbootstrap.com extract /protected/vendor/twbs/bootstrap/dist

and if choose second solution, should add alias config/main.php

'aliases' => array(     ...     'vendor.twbs.bootstrap.dist' => realpath(__dir__.'/../vendor/twbs/bootstrap/dist'), ), 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -