CodeIgniter Forums
Upload de arquivos na locaweb - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Upload de arquivos na locaweb (/showthread.php?tid=50980)

Pages: 1 2 3


Upload de arquivos na locaweb - El Forum - 04-16-2012

[eluser]cebalzer[/eluser]
Ola pessoa, estou com problemas de upload de arquivos na locaweb, ja tentei varios caminhos no $config['upload_path'], mas ainda estou sem sucesso.
Alguem ja lidou com esse upload na locaweb por gentileza me de uma ajuda.
Fico grato.

Desculpem, mas postei no lugar errado, se o moderador puder mover o topico agradeço.

Obrigado


Upload de arquivos na locaweb - El Forum - 04-16-2012

[eluser]mestresan[/eluser]
ja colocou a permissao nas pastas? 777 ???
aqui rola normal


Upload de arquivos na locaweb - El Forum - 04-16-2012

[eluser]cebalzer[/eluser]
Ja esta com permissao total, 777.
Como vc esta usando a configuracao do path?
Voce configurou no arquivo upload.php da pasta system alguma coisa tambem?
Obrigado pela resposta


Upload de arquivos na locaweb - El Forum - 04-17-2012

[eluser]cebalzer[/eluser]
Ontem o pessoal da locaweb entrou em contato comigo atraves de email, eles colocaram um upload sem codeigniter no site pra testar o porque do caminho não estar certo, o codigo deles e bem simples, para envio de upload de arquivos. Esta funcionando, me pediram pra colocar o caminho como eles me passaram pelo email.
Segue as configurações que estou utilizando:
1-Tentativa:

Code:
$config['upload_path'] = '/home/MEULOGINFTP/public_html/uploads/';
2-Tentativa:
Code:
$config['upload_path'] = './home/MEULOGINFTP/public_html/uploads/';
O restante da configuração:
Code:
//$this->upload->initialize($config);

            $config['allowed_types'] = 'gif|jpg|png';
            $config['max_size'] = '900';
            $config['max_width'] = '3000';
            $config['max_height'] = '2500';

            $this->load->library('upload', $config);
            if (!$this->upload->do_upload()) {
                $error =  $this->upload->display_errors();
                $this->session->set_flashdata('erro_upload', $error);
                redirect('error_controller/index');

            } else {
                $data = $this->upload->data();
            }
Pra esclarecer que localmente funciona assim'
Code:
$config['upload_path'] = './uploads';
Entao nao sei exatamente se precisaria de mais alguma configuração para poder funcionar.
Agradeço a aqueles que ja tiveram esse tipo de problema ou que gostaria de ajudar, estou em prazo de entrega deste trabalho, mas assim não vou conseguir entregar no prazo

Obrigado.


Upload de arquivos na locaweb - El Forum - 04-17-2012

[eluser]mestresan[/eluser]
uso sempre o path completo: $config['upload_path'] = '/home/MEULOGINFTP/public_html/uploads/';

usando o CI,vc pode testar e pegar o "erro". Se o path estiver errado irá retornar a msg informando isso ou se for outra coisa...

No seu codigo vc trata isso, mas redireciona. As vezes o redirect nao permite tempo suficiente para gravar na sessao... use ali um echo pra ver direto...
Ative tbm o debug completo, no arquivo de config do CI


Upload de arquivos na locaweb - El Forum - 04-17-2012

[eluser]cebalzer[/eluser]
Desculpe minha ignorancia meu amigo, mas nunca ativei o debug, como faria isso por gentileza?

Bem como vc disse pra dar um echo, o erro do path ainda persiste

The upload path does not appear to be valid.

Se fosse tamanho ou tipo de imagem ele dava outros erros, como pode ver e o path mesmo.

Obrigado



Upload de arquivos na locaweb - El Forum - 04-17-2012

[eluser]mestresan[/eluser]
arquivo application/config/config.php
$config['log_threshold'] = 4;

vai gerar arquivos por data na pasta application/log
tente ver oque ocorre


Upload de arquivos na locaweb - El Forum - 04-17-2012

[eluser]cebalzer[/eluser]
Entao rodei o debug, mas nao vi nada estranho, se puder dar uma olhada pra confirmar estou anexando o arquivo.
Desculpe, nao foi possivel anexar o arquivo.
Sera que colo aki o debug?


Upload de arquivos na locaweb - El Forum - 04-17-2012

[eluser]cebalzer[/eluser]
DEBUG - 2012-04-17 08:46:23 --> Config Class Initialized
DEBUG - 2012-04-17 08:46:23 --> Hooks Class Initialized
DEBUG - 2012-04-17 08:46:23 --> Utf8 Class Initialized
DEBUG - 2012-04-17 08:46:23 --> UTF-8 Support Enabled
DEBUG - 2012-04-17 08:46:23 --> URI Class Initialized
DEBUG - 2012-04-17 08:46:23 --> Router Class Initialized
DEBUG - 2012-04-17 08:46:23 --> Output Class Initialized
DEBUG - 2012-04-17 08:46:23 --> Security Class Initialized
DEBUG - 2012-04-17 08:46:23 --> Input Class Initialized
DEBUG - 2012-04-17 08:46:23 --> Global POST and COOKIE data sanitized
DEBUG - 2012-04-17 08:46:23 --> Language Class Initialized
DEBUG - 2012-04-17 08:46:23 --> Loader Class Initialized
DEBUG - 2012-04-17 08:46:23 --> Helper loaded: url_helper
DEBUG - 2012-04-17 08:46:23 --> Helper loaded: file_helper
DEBUG - 2012-04-17 08:46:23 --> Database Driver Class Initialized
DEBUG - 2012-04-17 08:46:23 --> Session Class Initialized
DEBUG - 2012-04-17 08:46:23 --> Helper loaded: string_helper
DEBUG - 2012-04-17 08:46:23 --> Session routines successfully run
DEBUG - 2012-04-17 08:46:23 --> Helper loaded: form_helper
DEBUG - 2012-04-17 08:46:23 --> Form Validation Class Initialized
DEBUG - 2012-04-17 08:46:23 --> Email Class Initialized
DEBUG - 2012-04-17 08:46:23 --> Upload Class Initialized
DEBUG - 2012-04-17 08:46:23 --> Controller Class Initialized
DEBUG - 2012-04-17 08:46:23 --> Model Class Initialized
DEBUG - 2012-04-17 08:46:23 --> Model Class Initialized
DEBUG - 2012-04-17 08:46:23 --> File loaded: application/views/header.php
ERROR - 2012-04-17 08:46:23 --> Severity: Notice --> Undefined variable: listaF /home/storage/c/1c/4a/MEULOGINFTP/public_html/application/views/foto/foto_form.php 33
ERROR - 2012-04-17 08:46:23 --> Severity: Notice --> Trying to get property of non-object /home/storage/c/1c/4a/MEULOGINFTP/public_html/application/views/foto/foto_form.php 33
ERROR - 2012-04-17 08:46:23 --> Severity: Notice --> Undefined variable: listaF /home/storage/c/1c/4a/MEULOGINFTP/public_html/application/views/foto/foto_form.php 40
ERROR - 2012-04-17 08:46:23 --> Severity: Notice --> Trying to get property of non-object /home/storage/c/1c/4a/MEULOGINFTP/public_html/application/views/foto/foto_form.php 40
ERROR - 2012-04-17 08:46:23 --> Severity: Notice --> Undefined variable: listaF /home/storage/c/1c/4a/MEULOGINFTP/public_html/application/views/foto/foto_form.php 46
ERROR - 2012-04-17 08:46:23 --> Severity: Notice --> Trying to get property of non-object /home/storage/c/1c/4a/MEULOGINFTP/public_html/application/views/foto/foto_form.php 46
ERROR - 2012-04-17 08:46:23 --> Severity: Notice --> Undefined variable: listaF /home/storage/c/1c/4a/MEULOGINFTP/public_html/application/views/foto/foto_form.php 51
ERROR - 2012-04-17 08:46:23 --> Severity: Notice --> Trying to get property of non-object /home/storage/c/1c/4a/MEULOGINFTP/public_html/application/views/foto/foto_form.php 51
DEBUG - 2012-04-17 08:46:23 --> File loaded: application/views/foto/foto_form.php
DEBUG - 2012-04-17 08:46:23 --> File loaded: application/views/footer.php



Upload de arquivos na locaweb - El Forum - 04-17-2012

[eluser]cebalzer[/eluser]
DEBUG - 2012-04-17 08:46:23 --> Final output sent to browser
DEBUG - 2012-04-17 08:46:23 --> Total execution time: 0.2120
DEBUG - 2012-04-17 08:46:24 --> Config Class Initialized
DEBUG - 2012-04-17 08:46:24 --> Hooks Class Initialized
DEBUG - 2012-04-17 08:46:24 --> Utf8 Class Initialized
DEBUG - 2012-04-17 08:46:24 --> UTF-8 Support Enabled
DEBUG - 2012-04-17 08:46:24 --> URI Class Initialized
DEBUG - 2012-04-17 08:46:24 --> Router Class Initialized
DEBUG - 2012-04-17 08:46:24 --> Output Class Initialized
DEBUG - 2012-04-17 08:46:24 --> Security Class Initialized
DEBUG - 2012-04-17 08:46:24 --> Input Class Initialized
DEBUG - 2012-04-17 08:46:24 --> Global POST and COOKIE data sanitized
DEBUG - 2012-04-17 08:46:24 --> Language Class Initialized
DEBUG - 2012-04-17 08:46:24 --> Loader Class Initialized
DEBUG - 2012-04-17 08:46:24 --> Helper loaded: url_helper
DEBUG - 2012-04-17 08:46:24 --> Helper loaded: file_helper
DEBUG - 2012-04-17 08:46:24 --> Database Driver Class Initialized
DEBUG - 2012-04-17 08:46:24 --> Session Class Initialized
DEBUG - 2012-04-17 08:46:24 --> Helper loaded: string_helper
DEBUG - 2012-04-17 08:46:24 --> Session routines successfully run
DEBUG - 2012-04-17 08:46:24 --> Helper loaded: form_helper
DEBUG - 2012-04-17 08:46:24 --> Form Validation Class Initialized
DEBUG - 2012-04-17 08:46:24 --> Email Class Initialized
DEBUG - 2012-04-17 08:46:24 --> Upload Class Initialized
DEBUG - 2012-04-17 08:46:24 --> Controller Class Initialized
DEBUG - 2012-04-17 08:46:24 --> Model Class Initialized
DEBUG - 2012-04-17 08:46:24 --> Model Class Initialized
DEBUG - 2012-04-17 08:46:24 --> File loaded: application/views/header.php
ERROR - 2012-04-17 08:46:24 --> Severity: Notice --> Undefined variable: listaF /home/storage/c/1c/4a/MEULOGINFTP/public_html/application/views/foto/foto_form.php 33
ERROR - 2012-04-17 08:46:24 --> Severity: Notice --> Trying to get property of non-object /home/storage/c/1c/4a/MEULOGINFTP/public_html/application/views/foto/foto_form.php 33
ERROR - 2012-04-17 08:46:24 --> Severity: Notice --> Undefined variable: listaF /home/storage/c/1c/4a/MEULOGINFTP/public_html/application/views/foto/foto_form.php 40
ERROR - 2012-04-17 08:46:24 --> Severity: Notice --> Trying to get property of non-object /home/storage/c/1c/4a/MEULOGINFTP/public_html/application/views/foto/foto_form.php 40
ERROR - 2012-04-17 08:46:24 --> Severity: Notice --> Undefined variable: listaF /home/storage/c/1c/4a/MEULOGINFTP/public_html/application/views/foto/foto_form.php 46
ERROR - 2012-04-17 08:46:24 --> Severity: Notice --> Trying to get property of non-object /home/storage/c/1c/4a/MEULOGINFTP/public_html/application/views/foto/foto_form.php 46
ERROR - 2012-04-17 08:46:24 --> Severity: Notice --> Undefined variable: listaF /home/storage/c/1c/4a/MEULOGINFTP/public_html/application/views/foto/foto_form.php 51
ERROR - 2012-04-17 08:46:24 --> Severity: Notice --> Trying to get property of non-object /home/storage/c/1c/4a/MEULOGINFTP/public_html/application/views/foto/foto_form.php 51
DEBUG - 2012-04-17 08:46:24 --> File loaded: application/views/foto/foto_form.php
DEBUG - 2012-04-17 08:46:24 --> File loaded: application/views/footer.php