Welcome Guest, Not a member yet? Register   Sign In
Zip Encoding download problem
#1

[eluser]meigwilym[/eluser]
I can't get the read_dir() method to work. The zip file downloads, but is empty.

The files being downloaded are ones that have been uploaded by the user. I have tried different configurations af permissions (777, 664). The directories to be zipped are owned by apache and are 777. I have root access to the server, and is_dir() returns true on the path.

Here's my code:

Code:
$this->load->library('zip');

        $proj = $this->project_mod->get($proj_id);
        
        $dir = FCPATH.'projectfiles/project-'.$proj->id.'/';

        $this->zip->read_dir($dir);

        $this->zip->download('zip_download_all');

I've searched the forums and google and can't find anything (in fact, the dearth of zip encoding class problems seems to imply that it works all the time!)

Cheers,

Mei
#2

[eluser]steelaz[/eluser]
Try running code below and see if gets you anywhere. If it fails, then it must be something server related, I suggest opening up Zip.php and start debugging.

Code:
$this->load->library('zip');
$this->zip->read_dir(APPPATH);
$this->zip->download();




Theme © iAndrew 2016 - Forum software by © MyBB