Welcome Guest, Not a member yet? Register   Sign In
Upload fails after upgrading to 1.6.2
#1

[eluser]yusufdestina[/eluser]
After upgrading to 1.6.2 ci complains that the upload dir is not writable.
I've tested the app on windows and linux, doing a chmod on the upload dir doesn't help.
Can this be related to the constants.php file inside the config dir?
With version 1.6.1 everything went well.
#2

[eluser]Derek Jones[/eluser]
Code please.
#3

[eluser]yusufdestina[/eluser]
Code:
...
function do_upload(){
        
        $gdir = "testdir";
        $config['upload_path'] = './upload/'.$gdir.'/zp_full/';
        $config['allowed_types'] = 'jpg';
        $config['max_size']    = '2300';
        $config['max_width']  = '4000';
        $config['max_height']  = '3500';
            
        $this->load->library('upload', $config);
    
        if (!$this->upload->do_upload())
        {
            $data['error'] = array('error' => $this->upload->display_errors());
            $data['isForm'] = true;    
        }    
        else
        {    
            $d = array('upload_data' => $this->upload->data());
            $data["upload_data"] = $d;
            $filename = 'testfile';
            $description = $this->input->post('description');
            $tags = trim($this->input->post('tags'));
            $type = 'jpg';
            $this->Gallery_model->addFile($gallery, $filename, $description, $tags, $type, $d['upload_data']['file_name'], $d['upload_data']['file_size']);

            $source = 'upload/'.$gdir.'/zp_full/'.$d['upload_data']['file_name'];
            $dest     = 'upload/'.$gdir.'/zp_thumb/'.$d['upload_data']['file_name'];
                
            if(!$this->img->crop($source, $dest, 100, 85))
            {
                $this->session->set_flashdata('status', $this->upload->displayErrors());
            }else{
                $this->session->set_flashdata('status', "Thumbs created");
            }
            $data['isform'] = false;
        }
        $data['content'] =  $this->load->view('pages/add', $data, true);
        $this->load->view('layout/classic', $data);      
    }
...
#4

[eluser]Derek Jones[/eluser]
And you do have the new constants.php file in place, and have not modified the FOPEN_ constants? And error reporting enabled in your PHP environment? That's the only change to the is_really_writable() method in Common.php between 1.6.1 and 1.6.2.

http://dev.ellislab.com/svn/CodeIgniter/...Common.php

Might do a var_dump(FOPEN_WRITE_CREATE) as well to be sure.
#5

[eluser]yusufdestina[/eluser]
ok I'll check this.
This also appears.. unexpected $end in C:\server\www\...\system\language\english\unit_test_lang.php on line 24
missing semicolon
Code:
$lang['ut_null']            = 'Null'

Problem with uploading fixed, I did a complete fresh install of ci and all works well now.
tnx for ur time and help.
#6

[eluser]Derek Jones[/eluser]
Wow that's been there since 2006 and no one's noticed... thanks for reporting that, I'll make sure it gets fixed in the svn.




Theme © iAndrew 2016 - Forum software by © MyBB