noumo / easyii

Easy yii2 cms powered by Yii framework 2
http://easyiicms.com
593 stars 272 forks source link

Images not displaying #133

Closed markzsanantonio closed 8 years ago

markzsanantonio commented 8 years ago

On my local server (xampp localhost), everything seems to work fine except for the images, it shows a broken image icon. I made them show by concatenating it with the Yii::getAlias('@web') to the pages which have images in it (e.g. Yii::getAlias('@web') . $this->image). I went back to the online demo and checked the image src, they're using the /uploads/thumbs/ path and it works, it displays the images. When I am using the local server it doesn't. Do I need to upload it online to make it work?

Any help on this matter would be greatly appreciated. Thank you :)

mkrvevgn commented 8 years ago

This problem because of your project must be in webroot folder (see reqiurements on site) like so: C:\xampp\htdocs\index.php not like so: C:\xampp\htdocs\easyii\index.php

Although, i prefer second variant.If you want images are displayed even project installed at C:\xampp\htdocs\easyii\index.php you just need correct one row in "httpd.conf" file (opened through XAMPP Control Panel - Config - httpd.conf)

old row: #DocumentRoot "C:/xampp/htdocs" new row: DocumentRoot "C:/xampp/htdocs/easyii"

Stop and Start again Apache through XAMPP Control Panel. That's all.

markzsanantonio commented 8 years ago

It worked, thank you so much :) On Apr 23, 2016 6:31 PM, "mkrvevgn" notifications@github.com wrote:

This problem because of your project must be in webroot folder (see reqiurements on site) like so: C:\xampp\htdocs\index.php not like so: C:\xampp\htdocs\easyii\index.php

Although, i prefer second variant.If you want images are displayed even project installed at C:\xampp\htdocs\easyii\index.php you just need correct one row in "httpd.conf" file (opened through XAMPP Control Panel - Config - httpd.conf)

old row: #DocumentRoot "C:/xampp/htdocs" new row: DocumentRoot "C:/xampp/htdocs/easyii"

Stop and Start again Apache through XAMPP Control Panel. That's all.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/noumo/easyii/issues/133#issuecomment-213714154