Wiki articles tagged with "config"

Showing 1-18 of 18 items.

YII2: Create console commands inside a module or extension

Created 6 years ago by MetaCrawler, updated 3 years ago by Luis Armando.

Here is a small guide how to get console commands running inside modules & extensions. For this guide I used a fresh yii2 basic application template.

8 0
6 followers
Viewed: 49 544 times
Version: 2.0
Category: Tutorials

Moving the vendor directory for multiple projects

Created 6 years ago by mariosimaremare, updated 6 years ago by mariosimaremare.

This How-To is useful if you are planning to move the Yii vendor directory outside the default location.

5 0
5 followers
Viewed: 25 565 times
Version: 2.0
Category: How-tos

Yii configuration: Dynamic & User dependent

Created 7 years ago by le_top, updated 6 years ago by le_top.

It is difficult to perform user dependent theming through a general configuration in 'main.php'. This article proposes a method to do so through a Factory that dynamically generates classes to allow delayed resolution of actual user values. This means that you can refer to values that are stored in the database through the CActiveRecord before Yii is actually loaded. The values will be fetched...

1 0
1 follower
Viewed: 10 143 times
Version: 1.1
Category: How-tos

How to hide /frontend/web in url addresses on apache

Created 7 years ago by raminious, updated 6 years ago by jim..

There is an issue on Yii2 to redirecting / urls to /frontend/web.
In other words we need a way to hidden /frontend/web from addresses.
We will do this without changing Apache configuration and creating virtual host or setting document root (It's good for share hostings that we have not access to apache.conf)

9 0
20 followers
Viewed: 113 536 times
Version: 2.0
Category: How-tos

How to store array/widget configuration to the database with config validation rules

Created 7 years ago by Kartik V, updated 7 years ago by Kartik V.

Note the tag {{homeUrl}} will be dynamically replaced at runtime.

1 3
40 followers
Viewed: 17 925 times
Version: 2.0
Category: Tutorials

Configuring Yii to run on both Windows and OSX

Created 7 years ago by trond, updated 7 years ago by CeBe.

If you develop your Yii project on both Windows and Mac, there can be a problem setting up the configuration unless the configurations for both system are identical. On my machines I have the following configurations:

1 0
4 followers
Viewed: 10 436 times
Version: 1.1
Category: How-tos
Tags: config

How to use a component before every action of a controller

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

I guess this is a tip on how to execute some code before every action in a controller, because I will tell you how I did it and maybe you can use the idea in your project.

2 0
4 followers
Viewed: 47 336 times
Version: 1.1
Category: Tips

Setting static modules' properties in config

Created 9 years ago by Alexander Palamarchuk, updated 9 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: 12 723 times
Version: 1.1
Category: Tips
Tags: config, module

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

Created 9 years ago by Alexander Palamarchuk, updated 8 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: 14 251 times
Version: 1.1
Category: Tips
Tags: config

YiiBackboneBoilerplate - Project Setup for your Yii+BackboneJS applications

Created 9 years ago by Antonio Ramirez, updated 9 years ago by Antonio Ramirez.

YiiBackboneBoilerplate, aims to provide Yii Backbone developers with an application folder to ease the startup of their projects. It uses the flexibility of our YiiBoilerplate with a twist for BackboneJS applications.

9 0
22 followers
Viewed: 28 462 times
Version: 1.1
Category: Others

YiiBoilerplate - Setup a professional project structure in seconds

Created 9 years ago by Antonio Ramirez, updated 8 years ago by Antonio Ramirez.

Even though it looks complicated at the beginning, you will find that it is not that hard as it seems once you understand its structure. Yii's project structure wiki obviously inspired a lot of this setup, and you will find that some of the paragraphs here are taken from their wiki.

39 0
81 followers
Viewed: 69 716 times
Version: 1.1
Category: Others

Setting application parameters dynamically in the back-end

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

I was wondering how to set-up the application parameters in the back-end to use them all around the application without the need of using the database and I came up with this solution, I hope it helps somebody else.

12 0
16 followers
Viewed: 57 534 times
Version: 1.1
Category: Tutorials

Use application on production/development environment without making changes

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

I like programing on my localhost, however it really bugged me to make changes to index.php & config files on my production server. After combining all available wiki articles on this topic and some trial and error this is what I use for my applications so I could just upload it to production server and it will work without any changes.

8 1
11 followers
Viewed: 70 604 times
Version: 1.1
Category: Tips

The directory structure of the Yii project site

Created 10 years ago by qiang, updated 8 years ago by Yang He.

In this article, we describe the directory structure used by yiiframework.com - the official Yii framework website. While this structure may look overly complicated for small projects or may not be optimal in some sense, we believe it is appropriate for medium or large projects in a team development environment. In fact, we have successfully used the similar structure in some other big projects.

77 0
96 followers
Viewed: 227 499 times
Version: 1.1
Category: Others

Setting and getting systemwide static parameters

Created 10 years ago by Steve Friedl, updated 10 years ago by Steve Friedl.

Occasionally one wishes to set systemwide parameters for an application, such as a contact address for email, an application name, or setting an option that guides major behavior. Yii provides for setting of static parameters in the configuration file, and this article talks about how to do it conveniently.

11 0
12 followers
Viewed: 138 671 times
Version: 1.1
Category: How-tos
Tags: config

Moving project code outside of webroot (plus multiple project support)

Created 10 years ago by Steve Friedl, updated 10 years ago by Steve Friedl.

Yii's by-default directory organization works well enough, but there are several steps one can take that improve the security and serviceability of the system, especially in the context of multiple Yii projects on the same machine (including multiple versions of the same project).

21 1
19 followers
Viewed: 60 207 times
Version: 1.1
Category: How-tos

"Why do I get a 403 error when trying to use Gii?"

Created 10 years ago by Steve Friedl, updated 10 years ago by Steve Friedl.

After enabling the Gii module in your protected/config/main.php file and then try to use it with http://example.com/index.php?r=gii, you get an error: ~~~ Error 403 You are not allowed to access this page. ~~~ This is almost certainly caused by the IP filtering mechanism that Gii uses to protect your system from outsiders - by default it allows localhost only (both IPv4 and IPv6), and r...

6 0
5 followers
Viewed: 81 080 times
Version: 1.1
Category: FAQs
Tags: config, Gii

Manage application configuration in different modes

Created 12 years ago by qiang, updated 9 years ago by 张 迪.

Application configuration determines how an Yii application should behave, because it is the only parameter passed in the entry script. An application, on the other hand, needs to behave differently under different circumstances. For example, an application may need different configurations when running in production mode, development mode and testing mode; In a team development environment, each...

15 0
15 followers
Viewed: 47 525 times
Version: 1.1
Category: Tutorials