Wiki

Articles in category "how-tos", sorted by ratingX
Displaying 51-60 of 353 result(s).

Using Yii with Nginx and PHP-FPM

Created 5 years ago by LericHow-tos10 comments – viewed 56,579 times – ( +18 ) – version 1.1
This config is built on an Ubuntu 11.04 server. Software is nginx, php-fpm (php5-fpm). For performance, it's recommended to run php-fpm in SOCKET mode, instead of accessing via IP:PORT. That is the method shown below.

Using International Dates

Created 5 years ago by Russell EnglandHow-tos4 comments – viewed 36,863 times – ( +18 ) – version 1.1
I needed British (dd/mm/yyyy) formatted dates throughout my application but found it very difficult to find examples of how to do this - until I found this excellent forum post http://www.yiiframework.com/forum/index.php?/topic/3649-dealing-with-i18n-date-formats/

Run Yiic directly from your app without a shell

Created 5 years ago by jacmoeHow-tos6 comments – viewed 32,155 times – ( +18 ) – version 1.1
Sometimes it would be nice if we could run yiic from an action, for example a migrate database button in our admin panel. Or because you are on a host which doesn't have shell access. Or maybe you are not allowed run popen or exec.

Getting the Most out of APC for Yii

Created 4 years ago by Da:SourcererHow-tos10 comments – viewed 36,258 times – ( +17 ) – version 1.1
The Advanced PHP Cache is a PHP extension which primarily serves as an opcode cache for PHP. The basic idea is to save PHP from re-evaluating the PHP code to intermediate bytecode on each request. Installing and enabling APC already yields a significant performance benefit. However, APC is not a black box that will magically change all for the better. More over it is important to understand that APC needs memory to operate.
tags: caching, apc

Using standard filters in CGridView custom fields

Created 5 years ago by GOshaHow-tos4 comments – viewed 60,681 times – ( +17 ) – version 1.1
In this article I'll try to explain how to use standard quick search fields in CGridView with customized columns.For example: We have a record in a database with field switch having 0 or 1 values. After that we want a user to see on or off instead 1 or 0. So we do the usual thing:

Write & use a custom Component in Yii2.0

Created 2 years ago by sirin kHow-tos4 comments – viewed 47,465 times – ( +17 ) – version 2.0
This is a simple example in Yii2.0 to understand how you can write a custom component and use it inside your app.(basic template)

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

Created 2 years ago by raminiousHow-tos14 comments – viewed 69,201 times – ( +17 ) – version 2.0
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)

Implementing cron jobs with Yii

Created 5 years ago by samdarkHow-tos6 comments – viewed 75,198 times – ( +32 / -2 ) – version 1.1
There are two ways to run a cron job:
tags: cron, cli

Simple authorization system

Created 4 years ago by GustavoHow-tos1 comment – viewed 33,324 times – ( +16 ) – version 1.1
How to create a simple (non-RBAC) authorization system

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

Created 5 years ago by Steve FriedlHow-tos8 comments – viewed 48,123 times – ( +22 / -1 ) – version 1.1
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).
tags: config, security