[SOLVED] Help with defining paths for fbgallery

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

Check your server permissions for the files . It should be 777.

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?

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?

Thanks to rawtaz in chat here is what fixed it…


$this->sitePathBase=Yii::getPathOfAlias('webroot').'/';