To make .htaccess files work as expected, you need to edit this file: /etc/apache2/sites-available/default Look for a section that looks like this: Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all # Uncomment this directive is you want to see apache2’s # default start page (in /apache2-default) when you go to / #RedirectMatch
You may encounter a problem in Yii TbExtendedGridView: TypeError: url is undefined When you click the header or filter on the grid, the solution is simple just add the following to ExtendedGridView. $this->widget(‘bootstrap.widgets.TbExtendedGridView’, array( … ajaxUrl’=> Yii::app()->request->getUrl(), …
Yii model findBySql does not return related data but returns only its own fields. To get around it always use model like: $model = User::model()->with(‘posts’)->find …. Now model fetch related data from posts table as well. However this won’t work. $model = User::model()->findBySql(‘select * from user inner join posts on ….) ….
When using yii csqldataprovider with cgridview in Yii framework and csqldataprovider has sql from related tables you might get the error in the header (edit, delete, update) column. To solve this issue don’t use the default column : array( ‘header’ => Yii::t(‘ses’, ‘Edit’), ‘class’ => ‘bootstrap.widgets.TbButtonColumn’, ), instead use: array( ‘header’ => Yii::t(‘ses’, ‘Edit’), ‘class’
This error will occur when make the 2nd time filter in the TbGridView / TbExtendedGridView after the 1st time filter with ‘no result found’. Solution: Open jquery.ba-bbq.js and goto line 257 and add this coding: if ( url == undefined ) url = window.location.href;
While using Yii framework yiibooster TbJsonGridView we usually face the problem of “Parser error!” when deleting a row from admin view. The problem arises because, after deletion of a row the controller/admin action is called which sends the complete HTML page instead of Json of the table. The solution is very simple and you need
You can create your public and private keys on your desktop computer using putty and puttyGen and then login to your servers without entering username and password each time you login. To do so follow these easy steps. On Client side: 1. open PuttyGen and click Generate Button, to get your public key in the
download extension from http://www.yiiframework.com/extension/bootstrap/ paste all bootstrap extensions folders what you have download under extensions/bootstrap config/main.php Add before starting of array Yii::setPathOfAlias(‘bootstrap’, dirname(__FILE__).’/../extensions/bootstrap’); add under return array `’theme’=>’bootstrap’, ‘modules’=>array( ‘gii’=>array( ‘generatorPaths’=>array( ‘bootstrap.gii’, ), ), ), ` add in under componentes ‘bootstrap’=>array( ‘class’=>’bootstrap.components.Bootstrap’, extensions/boostrap/components/Bootstrap.php paste code in class public function init() { $this->registerAllCss(); $this->registerJs(); parent::init();
To find files in a directory and sub-directories containing certain text use the following linux command: sudo grep -r -i -n ‘text’ *
To mount a ftp share on Ubuntu use curlftpfs utility. To install it apply the famous command: sudo apt-get install curlftpfs Now create an empty folder where you want to mount the ftp share to. mkdir /home/ftpshare (change permission to 777 so everyone can access it) To enable everyone the mount the ftp share use: