
aguskianto
Members-
Content Count
8 -
Joined
-
Last visited
Community Reputation
0 NeutralAbout aguskianto
-
Rank
Newbie
-
Hi everyone! I am trying to create a clean URL for yii_cms application. I install xampp (c:/xampp) and I delete # sign in httpd.conf (this line: LoadModule rewrite_module modules/mod_rewrite.so). Then, I create .htaccess in C:/xampp/htdocs/yii_cms folder. .htaccess file contains these lines: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)\?*$ index.php/$1 [L,QSA] </IfModule> Then..., I edit main.php at C:/xampp/htdocs/yii-cms/protected/config/main.php and add two lines in bold form
-
Well, I do understand that you create that user table. But, can I use that already in this chapter? Or, should I wait for later chapter for this things to work? One thing for sure, I try to login using those user in the user table but I got some: "Incorrect username or password" error. So, once again I ask: can this user in the table be used in this chapter already? or should I wait for another chapter.
-
I think I found something interesting. I don't find Username Admin Password Admin on my User table. This username is used to accress create page. But this username is not listed on the table: 1 Test 2 Someones 3 Some Author 4 Another Author 5 Administrator 6 Another Admin 7 Jane 8 John 9 Curly 10 Moe 11 Larry 12 Vlad 13 testing 14 Latest Test 15 Joe Public 16 Jane Public Is there any connection between those two?
-
Dear All, I've been following the book until I reach Chapter 5 Page 101: # protected/models/Page.phpprotected function beforeValidate(){ if(empty($this->user_id)) { $this->user_id = Yii::app()->user->id; } return parent::beforeValidate();} The problem that I found when I try to create Page: CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'user_id' at row 1. The SQL statement executed was: INSERT INTO `page` (`live`, `user_id`, `title`, `content`,
-
Dear all, What does "/i" means in this statement: array('pass', 'match', 'pattern'=>'/^[a-z0-9_-]{6,20}$/i') There is no error, just don't know what "/i" does. Thanks before.
-
ah..., yes. It works. Thank you so much Daniele.
-
Is there a way to attach image to this thread? It'll clearer that way.
-
Dear all, I follow the yii book until chapter 5. I got no problem until I reach page 94 and I add this code: # protected/models/Page.php::rules() array('date_published', 'date', 'format'=>'YYYY-MM-DD'), I got error while opening create Page: Please fix the following input errors: The format of Date Published is invalid. When I type 2013-04-05. Is there something wrong?