Yii Framework Forum: [SOLVED] Help with defining paths for fbgallery - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[SOLVED] Help with defining paths for fbgallery Rate Topic: -----

#1 User is offline   enfield 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 288
  • Joined: 12-January 11

Posted 28 August 2011 - 11:12 PM

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
0

#2 User is offline   PeRoChAk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 573
  • Joined: 26-November 10
  • Location:Lahore, Pakistan

Posted 29 August 2011 - 12:22 AM

Check your server permissions for the files . It should be 777.
Cheers
Perochak
Web Design - Logo Design - Application Development

My Blog | Forums Comparison
0

#3 User is offline   enfield 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 288
  • Joined: 12-January 11

Posted 29 August 2011 - 01:35 AM

View PostPeRoChAk, on 29 August 2011 - 12:22 AM, said:

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?
0

#4 User is offline   enfield 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 288
  • Joined: 12-January 11

Posted 02 September 2011 - 12:48 PM

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?
0

#5 User is offline   enfield 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 288
  • Joined: 12-January 11

Posted 02 September 2011 - 07:36 PM

Thanks to rawtaz in chat here is what fixed it...

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

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users