swisscheese
(Swisscheese2122)
August 29, 2011, 4:12am
1
I am trying to use fbgallery for the first time. I have yet to be able to upload a file yet though.
I have a folder with write permissions set up and and changed ‘gFolder’=>‘galleries’, in Cfg.php to my path.
Same path and permissions that I am using in another controller to create a directory and upload files. The path is very specific…
'gFolder'=>Yii::app()->basePath.'/../www/propertyImages/',
Everytime I try to load a file I get mkdir(): Permission denied
Anyone have any ideas?
Thanks
perochak
(Amjad Mughal)
August 29, 2011, 5:22am
2
Check your server permissions for the files . It should be 777.
swisscheese
(Swisscheese2122)
August 29, 2011, 6:35am
3
Thanks I have already done this, just to make sure I just did chmod 777… again and still doesn’t work. Like I said it is writable through other ways in this same app…CMultifileUpload, Xupload, CUploadedFile
That is what is confusing here. Not sure if I am declaring the path properly in this extension? Or if there is something else within it that is not working here.
I am not sure how to verify that I am trying to create a folder within the path I designated so t/s this is not getting to far. Maybe someone else knows how to verify that?
swisscheese
(Swisscheese2122)
September 2, 2011, 5:48pm
4
Ok I turned off all folder/file security to test and see if it was trying to create a directory in an area where I was not expecting it to.
In this project I am using a structure that looks like…
protected
runtime
www
yii
fbgallery uses this
$this->sitePathBase = dirname(__FILE__).'/../../../';
$this->siteUrlBase = Yii::app()->request->hostInfo.Yii::app()->baseUrl.'/';
$this->gUrl = $this->siteUrlBase.$this->galleryConfig['gFolder'].'/'.$this->pid;
$this->gPath = $this->sitePathBase.$this->galleryConfig['gFolder'].DIRECTORY_SEPARATOR.$this->pid;
and
'gFolder'=>'galleries',
to set the path. This however creates a galleries folder here…
galleries
protected
runtime
www
yii
If I use something like
'gFolder'=>'www/galleries',
nothing happens.
I am having a hard time getting my attempts at getting any file paths to work. How can I get it to create the galleries folder inside of www?
swisscheese
(Swisscheese2122)
September 3, 2011, 12:36am
5
Thanks to rawtaz in chat here is what fixed it…
$this->sitePathBase=Yii::getPathOfAlias('webroot').'/';