Você pode habilitar short-tags também, talvez possa ser mais adequado no seu
caso.

[]s

2008/2/13 rodrigo aramburu <[EMAIL PROTECTED]>:

> obrigado, era isso mesmo.
>
> Em 13/02/08, Tulio Faria <[EMAIL PROTECTED]> escreveu:
>
> >
> > Short tags :)
> >
> > Troca <? por <?php no componente :)
> >
> > On 13 fev, 09:09, "rodrigo aramburu" <[EMAIL PROTECTED]>
> > wrote:
> > > estou chamando da seguinte forma:
> > >
> > >  var $components = array('Upload','obAuth');
> > >
> > > e tentei também com
> > >
> > > App:import('Components','Upload');
> > >
> > > o estranho não é só não reconhecer o component o que esta me chamando
> > a
> > > atenção é que esta mostrando o código do component na página, e em um
> > > servidor linux funciona bem, o problema é no windows.
> > >
> > > Em 12/02/08, Michael Mafort <[EMAIL PROTECTED]> escreveu:
> > >
> > >
> > >
> > >
> > >
> > > > como voce chama o component no controller, tente verificar
> > nomenclaturas.
> > > > Upper, lower.
> > >
> > > > Em 12/02/08, rodrigo aramburu <[EMAIL PROTECTED]> escreveu:
> > >
> > > > > Olá pessoal,
> > >
> > > > > Estou com um problema estranho. Estava desenvolvendo um pequeno
> > > > > gerenciador de conteúdo em um servidor linux, ai tive que mudar
> > para uma
> > > > > windows(wamp) e começou a dar um problema, eu estava utilizando um
> > component
> > > > > upload.php que estava funcionando bem no linux mas no windows ele
> > esta
> > > > > dando um echo no component antes do html da pagina e mostrando a
> > seguinte
> > > > > mensagem de erro:
> > >
> > > > > Missing Component Class
> > >
> > > > > *Error: * Component class *UploadComponent* in
> > *ProdutosController* was
> > > > > not found.
> > >
> > > > > *Error: * Create the class *UploadComponent* in file:
> > > > > app\controllers\components\upload.php
> > >
> > > > > <?php
> > > > > class UploadComponent extends Object {
> > >
> > > > > }
> > > > > ?>
> > >
> > > > >  *Notice: * If you want to customize this error message, create
> > > > > app\views\errors\missing_component_class.ctp
> > >
> > > > > arquivo upload.php
> > >
> > > > > <?
> > > > > class UploadComponent extends Object{
> > > > >     var $controller = true;
> > > > >     var $path = "";
> > > > >     var $maxSize;
> > > > >     var $allowedExtensions = array("jpg", "jpeg", "gif","png");
> > >
> > > > >     function startup(&$controller){
> > > > >         $this->path  = APP.WEBROOT_DIR.DS;
> > > > >         $this->maxSize = 2*1024*1024; // 2MB
> > > > >     }
> > >
> > > > >     function setPath($p){
> > > > >         if ($p!=NULL){
> > > > >             $this->path = $this->path.$p;
> > > > >             $this->path = eregi_replace("/", DS, $this->path);
> > > > >             $this->path = eregi_replace("\\\\", DS, $this->path);
> > > > >             return true;
> > > > >         }
> > > > >     }
> > >
> > > > >     function setMaxFileSize($size){
> > > > >         $this->maxSize = $size;
> > > > >     }
> > >
> > > > >     function addAllowedExt($ext){
> > > > >         if (is_array($ext)){
> > > > >             $this->allowedExtensions =
> > > > > array_merge($this->allowedExtensions, $ext);
> > >
> > > > >         }else{
> > > > >             array_push($this->allowedExtensions, $ext);
> > > > >         }
> > > > >     }
> > >
> > > > >     function getExt($file){
> > > > >         $p = explode(".", $file);
> > > > >         return $p[count($p)-1];
> > > > >     }
> > >
> > > > >     function copyUploadedFile($source, $destination){
> > > > >         $pass = false;
> > > > >         if (is_uploaded_file($_FILES[$source]["tmp_name"])){
> > > > >             if ($_FILES[$source]["size"] < $this->maxSize){
> > > > >                 if (count($this->allowedExtensions)==0){
> > > > >                     // dont  make validation
> > > > >                     $pass =  true;
> > > > >                 }else{
> > > > >                     // make validation
> > > > >                     $pass =  false;
> > >
> > > > >                     foreach($this->allowedExtensions as $ext){
> > >
> > > > >                         if
> > > > > (eregi(".*".$ext."$",$_FILES[$source]["name"])){
> > > > >                             $pass = true;
> > > > >                         }
> > > > >                     }
> > > > >                 }
> > > > >             }
> > > > >             if ($pass){
> > > > >                 // make upload
> > > > >                 $tmp =
> > move_uploaded_file($_FILES[$source]["tmp_name"],
> > > > > $this->path.$destination);
> > > > >             }else{
> > > > >                 // dont make the upload
> > > > >             }
> > > > >         }
> > > > >     }
> > >
> > > > > }
> > > > > ?>
> > >
> > > > > alguem já passou por isso?
> > >
> > > > > --
> > > > > Atenciosamente,
> > > > > Rodrigo Pletsch Aramburu
> > > > > MSN:[EMAIL PROTECTED]
> > >
> > > --
> > > Atenciosamente,
> > > Rodrigo Pletsch Aramburu
> > > MSN:[EMAIL PROTECTED]
> >
> >
>
>
> --
> Atenciosamente,
> Rodrigo Pletsch Aramburu
> MSN:[EMAIL PROTECTED]
>
> >
>


-- 
Marcelo Linhares
Pessoal -> marcelolinhares.com
Agência Detalhes -> http://www.agenciadetalhes.com.br
Procurando vagas em TI ?
http://www.vagasem.info

--~--~---------~--~----~------------~-------~--~----~
Você recebeu esta mensagem porque está inscrito no Grupo "Cake PHP Português" 
em Grupos do Google.
 Para postar neste grupo, envie um e-mail para cake-php-pt@googlegroups.com
 Para cancelar a sua inscrição neste grupo, envie um e-mail para [EMAIL 
PROTECTED]
 Para ver mais opções, visite este grupo em 
http://groups.google.com/group/cake-php-pt?hl=pt-BR
-~----------~----~----~----~------~----~------~--~---

Responder a