Hi guys,
I facing a problem with Yii on server.
When I test in localhost, it work fine, but after uploaded to server, I get error:
any idea? Because it is the first time I up to server with Yii. I think I get problem with config in Yii
thanks
Hi guys,
I facing a problem with Yii on server.
When I test in localhost, it work fine, but after uploaded to server, I get error:
any idea? Because it is the first time I up to server with Yii. I think I get problem with config in Yii
thanks
Have you set your .htaccess accordingly? http://www.yiiframework.com/wiki/53/using-search-engine-and-user-friendly-urls#hh1
How are you rules set? what is the url requested? Please be more specific on the question logos, then more people will be able to help you more
Hi Antonio,
Here is my config file:
Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule . index.php
and here is my rules set:
'urlManager'=>array(
'showScriptName' => false,
'urlFormat'=>'path',
'rules'=>array(
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
),
In “urlManager” option, it almost not change, and in .htaccess file, I copied it from Yii website provide
But I still make a question in my request! Why it says "Unable to resolve the request"
I remember a hosting service producing the same error to me, then I realized that some servers require the rewrite rule slightly different:
Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#only last line changed
RewriteRule ^(.*) index.php [L]
Could that be the problem?
EDIT: by the way, what is your development machine? Is it windows? Linux based System? And your server? Is it Linux? I also remember having problems with Controllers Actions due to the case sensitive way of Linux… if you have an action named actionGetMyCocacola… you better call it actionGetmycocacola on Linux
Dear,
I think my .htaccess is not relations with my error. Finally, the problem is my host type, it is Linux host, but my local is Window. So, when I type my default controller: “lichchay” difference with “LichChay”. Well, it is really importance experience for careless people.
But I wonder about the “asset” folder and what is it use for. Because when in “asset” folder, there are many folders with not easy remember named. And my host alert one of there folder is not allow to accesses. But I’ve tried to change permission of these folders, it seem not works! So, currently my host still alert:
difficult to understand right ! Can every one explain to me about the “asset” user for? and how can I change folder “f8eae0e7” to writable in my host? (in host, the permission code of this folder is : 755, not like other folder have permission code is: 777)
Please help me
Dear,
I found the topic talk about the "assets" folder in Yii and it explains this in details, so, if you trouble with "assets" folder too, you can read here Understading "assets" folder