CodeIgniter Forums
CIG gallery version 0.3beta help needed - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: CIG gallery version 0.3beta help needed (/showthread.php?tid=18031)

Pages: 1 2


CIG gallery version 0.3beta help needed - El Forum - 04-23-2009

[eluser]learning_php[/eluser]
Hi,

i am trying to use CIG to create a simple gallery i have added teh config and lib files to my proect and usign the following controller:

Code:
class imagegallery extends Controller {
    
    
    function imagegallery()
    {
        parent::Controller();
        $this->load->library('CIG');
        $this->cig->cache_init();
    }
    
    function index()
    {
        $data['images']=$this->cig->get_dir_list();
        $this->load->view('test_view',$data);
        
    }
    
    function album()
    {
        $data['album']=$this->cig->get_image_list();
        $this->load->view('test_view',$data);
    }
    
    function images()
    {
        $data['']=$this->cig->get_image();    
        $this->load->view('test_view',$data);
    }
        
}

but when i view the page i get teh following error:

A PHP Error was encountered

Severity: Warning

Message: getimagesize(../wedding-site/assets/albums/./cache) [function.getimagesize]: failed to open stream: Permission denied

Filename: libraries/CIG.php

Line Number: 270
A PHP Error was encountered

Severity: Warning

Message: getimagesize(../wedding-site/assets/albums/./test) [function.getimagesize]: failed to open stream: Permission denied

Filename: libraries/CIG.php

Line Number: 270
A PHP Error was encountered

Severity: Warning

Message: getimagesize(../wedding-site/assets/albums/./cache) [function.getimagesize]: failed to open stream: Permission denied

Filename: libraries/CIG.php

Line Number: 270
A PHP Error was encountered

Severity: Warning

Message: getimagesize(../wedding-site/assets/albums/./test) [function.getimagesize]: failed to open stream: Permission denied

Filename: libraries/CIG.php

Line Number: 270
A PHP Error was encountered

Severity: Notice

Message: Undefined variable: fileList

Filename: libraries/CIG.php

Line Number: 360
A PHP Error was encountered

Severity: Notice

Message: Undefined variable: fileList

Filename: libraries/CIG.php

Line Number: 363


CIG gallery version 0.3beta help needed - El Forum - 04-23-2009

[eluser]Dam1an[/eluser]
What are the permissions on the photo's?


CIG gallery version 0.3beta help needed - El Forum - 04-23-2009

[eluser]TheFuzzy0ne[/eluser]
Check the permissions for the albums/test directory and the albums/cache directory. It looks like the permissions aren't set correctly.


CIG gallery version 0.3beta help needed - El Forum - 04-23-2009

[eluser]learning_php[/eluser]
sorry I am not sure what you mean or where to look?


CIG gallery version 0.3beta help needed - El Forum - 04-23-2009

[eluser]TheFuzzy0ne[/eluser]
Most FTP clients allow you to right-click and select something (usually "properties"), which will tell you what the permissions mask is. I'd suggest going with 700, 770 or 777, whichever works.

700 = user gets full permissions (rwx - Read, Write and Execute)
770 = user and group get full permissions (rwx - Read, Write and Execute)
777 = user, group and other get full permissions (rwx - Read, Write and Execute)

It depends on how PHP is set up on your server, and whether or not it runs under your user account or user "nobody".

If you can tell use what FTP client you're using, we might be able to give you specific instructions.


CIG gallery version 0.3beta help needed - El Forum - 04-23-2009

[eluser]learning_php[/eluser]
Hi,

I am not using a FTP as I am currently working my localhost?


CIG gallery version 0.3beta help needed - El Forum - 04-23-2009

[eluser]Phil Sturgeon[/eluser]
If you are 'nix or Mac then you can use the built in terminal to set the permissions.

Type 'pwd' to see which directory you are in then use the command 'chmod 777 -R /path/to/folders'.

If you are using windows just make sure the folder is writeable by right click -> properties.


CIG gallery version 0.3beta help needed - El Forum - 04-23-2009

[eluser]Dam1an[/eluser]
if you're using a UNIX based system, you can use chmod to change the permissions of a file/directory
In Windows, you don't seem to get the fine level of control you require (at least not natively, or have I missed something)


CIG gallery version 0.3beta help needed - El Forum - 04-23-2009

[eluser]learning_php[/eluser]
Hi,

I right click -> properties and see that the folder is set to read only. I unselect the box and apply but when I go back into the properties read only is selected again.

Thanks


CIG gallery version 0.3beta help needed - El Forum - 04-23-2009

[eluser]TheFuzzy0ne[/eluser]
You may need to ensure that you actually "own" the directory in order to apply permissions to it.