In Yii 1.1.project Images In Uploaded Are Not Shown On Remote Server

Hi all,

I uploaded my Yii 1.1.14 project on remote server and found that images in upload dir are not shown

Image in "images" directory like is shown ok Image in "uploads/" directory like are not shown and copied to browser it showes error

Unable to resolve the request "uploads/cms_items/-cms_item-43/44c9cc2b1edd.jpg".

Is it access error or what? On local server it worked ok. As for access I tried to set access 0755 to all dirs and files or 0755 to all dirs and 0644 to all files - with the same result.

Can it be that I have to edit my .htaccess for skipping images from yii pages routings ? If yes in which way ?


Assume your .htaccess in the applications webroot is similar to below.

The file “uploads/cms_items/-cms_item-43/44c9cc2b1edd.jpg” must exists, otherwise the Yii app will be initialized that looks for a module or controller ‘uploads’ and cannot resolve the request if no such controller/module exists.

RewriteEngine on

# Set RewriteBase if you app documentroot is an alias

# RewriteBase /tybapp 

# 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

Actually, that is how I try to do.

Please, open page

Below of RichText Editor there is list of images and delete.png image is shown but images of gallery are not shown.

Copying urls from source and putting into brwoser I see that gallary image

calls error

"Internal Server Error"

Service image delete.png works ok :

At bottom left there are 2 links to .htaccess files and phpinfo of server.

Seems, .htaccess is how you wrote.

File .htaccess was above tybapp/ directory and I moved it into tybapp/ directory and I changed it from

RewriteRule . tybapp/index.php


RewriteRule . index.php

So now I get error "Internal Server Error" and I can not understand why?

And when you set the rewriteBase in .htaccess?

RewriteBase /tybapp


Do you mean .htaccess :

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteBase /tybapp

RewriteRule . index.php


Then Editors page again shows page without images

But Images link


Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

In error_log file I found rows like:

[01-Jul-2014 23:37:46 America/Chicago] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/ cannot open shared object file: No such file or directory in Unknown on line 0

Can it be reason of my problems ?

Of course this can be the reason.

You have to disable the no-debug-non-zts module in php.

I have no access to php.ini file of my server, can you give me a hint which command have I to enter in .htaccess

to get rid of this error?