Wiki articles

Showing 121-140 of 804 items.

Simple Multiple Environment Setup with Default Yii Installation

Created 6 years ago by Ibrar Turi, updated 6 years ago by CeBe.

After installing Yii basic application on our systems, most of the time we want to have multiple environment such as local, dev and live setup. Most of the times when we want to make changes to configuration file, we have to over-write configurations file for each environment.

2 0
8 followers
Viewed: 11 694 times
Version: 1.1
Category: How-tos

Define general array and variable and call it to anywhere in application

Created 7 years ago by bhavesh vaghela, updated 7 years ago by Maurizio Domba Cerin.

Create param.php file in protected/config

Yii::app()->params['TEXT_ACTIVE'] = 'Active'; //1 for active

1 4
3 followers
Viewed: 11 696 times
Version: 1.1
Category: Tutorials
Tags:

Q: My yiic tool cannot run model and crud commands. Why?

Created 11 years ago by qiang, updated 11 years ago by mishhh.

Some PHP installations may use a different php.ini file for CLI PHP (command line PHP parser). As a result, when running the model or crud command in yiic shell, you may encounter errors like "YiiBase::include(PDO.php): failed to open stream..." or "...could not find driver", even though the requirement checker confirms you have PDO and the corresponding database driver.

0 0
1 follower
Viewed: 11 698 times
Version: 1.1
Category: Tutorials
Tags:

Attaching multiple event handlers to onBeginRequest

Created 6 years ago by Boaz, updated 6 years ago by CeBe.

There came the need to perform two operations, always, on 'application boot' time. Example? My real world example involved some geo-location logic (that's the first operation) and syncing of some session details so KcFinder can be in sync with the user in context - each user with his own session container (the second).

1 0
2 followers
Viewed: 11 756 times
Version: 1.1
Category: How-tos

TimeZone dropDown

Created 7 years ago by Tibor Katelbach, updated 7 years ago by Maurizio Domba Cerin.

I spend a bit of time looking for the this piece of code while building time feature on a site this tutorial also helped Local time zones and locales

3 0
4 followers
Viewed: 11 766 times
Version: 1.1
Category: How-tos

UUID instead of an auto-increment integer for ID with Active Record

Created 6 months ago by grigori, updated a month ago by samdark.

I have an API. It's built with a RESTful extension over Active Record, and some endpoints provide PUT methods to upload files. By a REST design we create an entity with POST /video first, and then upload a video file with PUT /video/{id}/data.

4 0
3 followers
Viewed: 11 773 times
Version: 2.0
Category: How-tos

Use phing to make Yii application "installable"

Created 8 years ago by sensorario, updated 8 years ago by Maurizio Domba Cerin.

To use this "how-to", you need to install phing in your machine.

7 0
10 followers
Viewed: 11 808 times
Version: 1.1
Category: How-tos
Tags: phing

Setting static modules' properties in config

Created 7 years ago by Alexander Palamarchuk, updated 7 years ago by Alexander Palamarchuk.

You may face a situation when you need to access to a configurable module's property from everywhere and you don't have an instance of this module's class.

1 1
2 followers
Viewed: 11 823 times
Version: 1.1
Category: Tips
Tags: config, module

Prevent asset publishing for CListView

Created 9 years ago by Mike, updated 9 years ago by Mike.

If you don't want to use any of the AJAX features of CListView and thus want to prevent that it publishes any of its asset files, you can extend it and create a sub class like this:

2 0
6 followers
Viewed: 11 850 times
Version: 1.1
Category: How-tos

Adding Bash Command Completion for Yii Commands

Created 8 years ago by Dustin Oprea, updated 8 years ago by Dustin Oprea.

This article discusses the installation/configuration of the YiiBash project (https://github.com/dsoprea/YiiBash).

3 0
5 followers
Viewed: 11 952 times
Version: 1.1
Category: How-tos

Our WebApp that will run without downtime during update/upgrade

Created 8 years ago by Pinoy Coderz, updated 7 years ago by Maurizio Domba Cerin.

How many of us wonder how we can upgrade the website without hurting the operation of our WebApp?

8 2
7 followers
Viewed: 11 984 times
Version: 1.1
Category: Tutorials
Tags: tutorial

BaseModuleAR class with MultiActiveRecord

Created 8 years ago by dinhtrung, updated 8 years ago by Gustavo.

MultiActiveRecord is an extension that add support for multiple database connection for your application.

2 0
0 follower
Viewed: 11 999 times
Version: 1.1
Category: Tips

Yii2 - Upgrading to Bootstrap 4

Created 3 months ago by Richard Pillay, updated 2 months ago by Richard Pillay.

Yii2 - Converting from Bootstrap3 to Bootstrap4

8 0
5 followers
Viewed: 12 042 times
Version: 2.0
Category: How-tos

Shrink Yii, help your IDE and speed up copying

Created 8 years ago by dckurushin, updated 8 years ago by dckurushin.

yii-1.1.8.r3324 framework directory is 10.4 mb size.

9 8
17 followers
Viewed: 12 103 times
Version: 1.1
Category: Tips

Making friends' configs, DB credentials and paths with version control

Created 7 years ago by Alexander Palamarchuk, updated 7 years ago by ajsharma.

In many cases developers of one project use their own local environments for coding. There may be a common test platform and, of course, production. All these environments usually have different DB credentials and directory structures (first of all, path to YII framework directory). Another feature is debugging. It's convenient to turn it on for local environments, eventually - on the test s...

1 1
4 followers
Viewed: 12 124 times
Version: 1.1
Category: Tips
Tags: config

Tunneling using SSH in a limited enviroment

Created 6 years ago by nineinchnick, updated 6 years ago by CeBe.

This tutorial describes how to connect to a remote service via tunnel when only most basic software is available on the remote server. It is not directly related to Yii. It could be hovewer useful for web developers working with shared hosting sites with limited access.

1 0
3 followers
Viewed: 12 145 times
Version: all
Category: Others

Getting information from the current locale

Created a year ago by CeBe, updated a year ago by CeBe.

Yii 2.0 comes with a formatter component to format dates, numbers, and other values for international users according to their locale. This is very useful for displaying data. When working with incoming data or when using enhanced input methods like the [MaskedInput widget](https://www.yiiframework.com/doc/api/2.0/yii-widgets-maskedinp...

5 0
2 followers
Viewed: 12 158 times
Version: 2.0
Category: How-tos

Safely checking if a model class exists (without exploding)

Created 6 years ago by Boaz, updated 6 years ago by CeBe.

While rewriting the PcReportContent extension I'm maintaining I've bumped to a challenge. This wiki was born out of it.

1 0
2 followers
Viewed: 12 201 times
Version: 1.1
Category: How-tos

Yii behind a reverse proxy, SSL support and correct IP logging

Created 7 years ago by mrkmg, updated 7 years ago by mrkmg.

If you are hosting Yii behind a reverse proxy, for example nginx, and you are having issues with your logs showing the proxies IP, or the urls being created arn't being created for SSL because your SSL certs are located on your reverse proxy instead of the Yii server, this code may be able to help you. I placed them in the very top of Yii's entry script, index.php

0 0
2 followers
Viewed: 12 221 times
Version: 1.1
Category: Tips

Yii CDBHttpSession数据库存储session性能优化实战

Created 8 years ago by Darwin Wen, updated 8 years ago by Darwin Wen.

上一篇 关于 Yii CHttpSession性能优化篇之源码流程分析 有详细分析CHttpSession执行流程,在了解CHttpSession的详细执行流程之后,我们就可以非常轻松的扩展Yii Session,来优化和符合自己的业务流程。

1 1
1 follower
Viewed: 12 248 times
Version: 1.1
Category: Tips