Wiki articles

Showing 121-140 of 650 items.

Logging to Heroku's logs from Yii

Created 6 years ago by aarondfrancis, updated 5 years ago by aarondfrancis.

In order to get your Yii logs into Heroku's logs, you have to work a little bit of magic. You'll need to modify the boot.sh script and add the following two lines: ~~~ touch /app/apache/logs/app_log tail -F /app/apache/logs/app_log & ~~~ This will set up the log and tail it so that when you request "heroku logs", this log is included.

1 0
1 follower
Viewed: 7 324 times
Version: 1.1
Category: How-tos

What SQL-Statement creates yii?

Created 11 months ago by Necip, updated 11 months ago by Necip.

The usual way to find out what Yii has created for an SQL query is to mutilate the SQL in the sourcecode and call the program again so that the SQL statement with errors is displayed. Or you can use the SQL logger, which must be switched on and off each time and logs all SQL statements, which leads to an enormous slowdown in program execution and decelerates your workflow.

0 0
1 follower
Viewed: 5 903 times
Version: 1.1
Category: Tips

Debugging CActiveRecord failed save() attempts

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

When you're filling up a form of a CActiveRecord (using CActiveForm for example), usually you'll construct your code so that in case of validation error you'll get back the form with the error displayed back to you, typically when CActiveForm.errorSummary() is used. This is how its done by Gii.

4 0
2 followers
Viewed: 29 552 times
Version: 1.1
Category: Tips

Using Nginx and Apache2 in separate distributed servers (ie, Amazon EC2 instances)

Created 6 years ago by Luis Lobo Borobia, updated 2 years ago by Luis Lobo Borobia.

We are running one frontend running NGINX and several app servers running Apache2. There are several issues we have come across but right now I'll be documenting one of them. I'll be completing this article when I get more time.

2 0
2 followers
Viewed: 8 672 times
Version: all
Category: Tips

free PHP IDE CodeLobster supports Yii framework

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

This page is created to supply short directions and general tips for managing a Yii application in Codelobster PHP Edition.

5 0
1 follower
Viewed: 16 946 times
Version: 1.1
Category: Tutorials

How to display images in CJuiAutoComplete without extenstions

Created 4 years ago by Asmaa, updated 5 months ago by samdark.

I wanted to customize the CJuiAutoComplete, so that it displays a thumb image before the label like the one shown in the following image:

0 0
2 followers
Viewed: 8 134 times
Version: 1.1
Category: Tutorials

Yii configuration: Dynamic & User dependent

Created 4 years ago by le_top, updated 4 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: 8 251 times
Version: 1.1
Category: How-tos

Checking for "expired" sessions/logins on the client side

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

Getting "Expired token" errors ? Here is a solution to avoid invalid CSRF on POST or ajax requests, or user identity changes.

4 0
12 followers
Viewed: 27 508 times
Version: 1.1
Category: How-tos

Using events with CAction classes

Created 7 years ago by Antonio Ramirez, updated 7 years ago by 张 迪.

As you know, events are used by:

9 0
9 followers
Viewed: 18 742 times
Version: 1.1
Category: Tips

Windows Web Development With AMPPS, NetBeans and XDebug

Created 7 years ago by morcen, updated 7 years ago by morcen.
  1. Operating system: Windows
4 0
6 followers
Viewed: 30 241 times
Version: 1.1
Category: Tutorials

TDD with PHPUnit_Story and Yii

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

Having said all of that, I want to add that the purpose of this article is not to convince anyone to write tests or design following TDD patterns. I'm not going to change the world to what I think is good. It's just about showing how to use some tools together with Yii Framework.

7 0
9 followers
Viewed: 19 709 times
Version: 1.1
Category: Tutorials

First Yii App: CTabView

Created 10 years ago by meanpenguin, updated 7 years ago by Yang He.

Once you are completed with the "Creating First Yii Application", the following can be done.

0 2
1 follower
Viewed: 22 869 times
Version: 1.1
Category: Tutorials
Tags:

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

Created 10 years ago by qiang, updated 10 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: 10 983 times
Version: 1.1
Category: Tutorials
Tags:

Advanced CTabView using CClipWidget

Created 10 years ago by krillzip, updated 7 years ago by Yang He.

Here is a way to dynamically extend tabs based on clips.
Probably even more complex things could be done.

2 0
2 followers
Viewed: 14 535 times
Version: 1.1
Category: Tutorials
Tags:

Autocomplete in console command

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

Missed of autocomplete in bash console commands yii make me sad.

3 0
4 followers
Viewed: 12 007 times
Version: 1.1
Category: Tutorials

Customizing the CMenu Widget

Created 6 years ago by mistryb, updated 4 years ago by mistryb.

The CMenu class provides some useful features for generating menus in your web application.

1 0
4 followers
Viewed: 59 246 times
Version: 1.1
Category: Tips

checkBox in CGridview

Created 4 years ago by n-r, updated 4 years ago by n-r.

some when you need to add checkbox in cgridview and change state of selected rows by additianal parameters. in view :

1 0
2 followers
Viewed: 24 322 times
Version: 1.1
Category: Others

AutoTimestampBehavior

Created 10 years ago by jonah, updated 7 years ago by Yang He.

This behavior will automatically set timestamp fields to the row creation and modification times.

2 2
3 followers
Viewed: 16 576 times
Version: 1.1
Category: Tutorials
Tags:

Building Page Specific Menus using CMenu

Created 6 years ago by mistryb, updated 4 years ago by mistryb.

The Yii Framework provides a sweet functionality that allows you to easily create page specific menus. What does this mean? This allows you to create one layout or CSS styling for your menu, and when each page is loaded, a new set of menu items is loaded in. This is useful for context specific sidebars within your application.

0 0
3 followers
Viewed: 14 226 times
Version: 1.1
Category: How-tos
Tags: CMenu

How to validate the uniqueness of multiple columns

Created 4 years ago by oligalma, updated 3 years ago by oligalma.

I am going to show you an effective way to validate the uniqueness of multiple columns.

1 0
2 followers
Viewed: 10 537 times
Version: 1.1
Category: How-tos