Contato, não aparece código da imagem
Enviado: 30 Nov 2014, 22:36
por RegisJr
Estou com um probleminha no meu site.
Quando acesso pag, Contato, em baixo deve carregar a imagem de um código, para a mensagem poder ser enviada. Porém essa imagem não carrega.
O que pode ser feito?
Re: Contato, não aparece código da imagem
Enviado: 01 Dez 2014, 07:27
por reds
Bom dia amigo,
Este é um erro de captcha, de uma olhada no log de erro do seu Opencart, e tambem uma olhada
Código: Selecionar todosEstá me aparecendo um log de erro com a linha 3 do captcha.php (./system/library/):
problema é este ==> $out = str_replace(array("\n", "\r", "\t", " "), "", $input);
TIRA ESTA LINHA FORA $out = str_replace(array("\n", "\r", "\t", " "), "", $input);
Note que este artigo esta aqui fiu discutido aqui no fórum
https://forum.opencartbrasil.com.br/ ... 9&start=20
causo seu problema seja outro coloque aqui um log com os erros.

Re: Contato, não aparece código da imagem
Enviado: 01 Dez 2014, 21:00
por RegisJr
Foi mal, mas não sabia que era este o problema.
Mas o erro que esta aparecendo no meu é na linha 40.
Este é o arquivo captcha:
<?php
class Captcha {
protected $code;
protected $width = 35;
protected $height = 150;
function __construct() {
$this->code = substr(sha1(mt_rand()), 17, 6);
}
function getCode(){
return $this->code;
}
function showImage() {
$image = imagecreatetruecolor($this->height, $this->width);
$width = imagesx($image);
$height = imagesy($image);
$black = imagecolorallocate($image, 0, 0, 0);
$white = imagecolorallocate($image, 255, 255, 255);
$red = imagecolorallocatealpha($image, 255, 0, 0, 75);
$green = imagecolorallocatealpha($image, 0, 255, 0, 75);
$blue = imagecolorallocatealpha($image, 0, 0, 255, 75);
imagefilledrectangle($image, 0, 0, $width, $height, $white);
imagefilledellipse($image, ceil(rand(5, 145)), ceil(rand(0, 35)), 30, 30, $red);
imagefilledellipse($image, ceil(rand(5, 145)), ceil(rand(0, 35)), 30, 30, $green);
imagefilledellipse($image, ceil(rand(5, 145)), ceil(rand(0, 35)), 30, 30, $blue);
imagefilledrectangle($image, 0, 0, $width, 0, $black);
imagefilledrectangle($image, $width - 1, 0, $width - 1, $height - 1, $black);
imagefilledrectangle($image, 0, 0, 0, $height - 1, $black);
imagefilledrectangle($image, 0, $height - 1, $width, $height - 1, $black);
imagestring($image, 10, intval(($width - (strlen($this->code) * 9)) / 2), intval(($height - 15) / 2), $this->code, $black);
header('Content-type: image/jpeg');
imagejpeg($image);
imagedestroy($image);
}
}
?>
Re: Contato, não aparece código da imagem
Enviado: 02 Dez 2014, 07:08
por reds
Amigo bom dia,
Teria o link do site para darmos uma olhada ?
Re: Contato, não aparece código da imagem
Enviado: 02 Dez 2014, 11:29
por RegisJr
Re: Contato, não aparece código da imagem
Enviado: 02 Dez 2014, 12:59
por reds
RegisJr escreveu:http://www.multyrelógios.com.br
Eu nem consegui abrir a loja
Código: Selecionar todosWarning: Cannot modify header information - headers already sent by (output started at /home/multy061/public_html/catalog/language/portuguese-br/portuguese-br.php:1) in /home/multy061/public_html/system/library/currency.php on line 45Warning: Cannot modify header information - headers already sent by (output started at /home/multy061/public_html/catalog/language/portuguese-br/portuguese-br.php:1) in /home/multy061/public_html/system/engine/controller.php on line 28Warning: Cannot modify header information - headers already sent by (output started at /home/multy061/public_html/catalog/language/portuguese-br/portuguese-br.php:1) in /home/multy061/public_html/system/engine/controller.php on line 29
Amigo verifica as suas configurações de idioma e moeda do site.
Re: Contato, não aparece código da imagem
Enviado: 02 Dez 2014, 21:11
por RegisJr
http://www.multyrelógios.com.br
A princípio é pra estar tudo certo. Se puder dar uma olhada agora... No meu pc abre normal...
Obrigado.
Re: Contato, não aparece código da imagem
Enviado: 03 Dez 2014, 07:45
por reds
Amigo bom dia,
Tenha olhado para sua loja, eu acredito que você tenha escrito algo de errado ou desmontado algum link, a muitos erros exibindo no console, eu poderia lhe ajudar em alguns pontos se quiser, por favor envie um email com acesso ao admin e ftp.
