кодовое обозначение капчи не отображается в iis

У меня есть веб-сайт codeigniter, и я использую капчу, моя капча работала на последнем сервере, но на новом сервере не создается и не выдает капчу
Использую стандарт windows server 2016, IIS 10< PHP 7.0 и Codeigniter 3.1

function index()
{
if ($this->session->userdata('us_login') == TRUE)
{
redirect ('dashboard');
}
else
{
$data['captcha'] = $this->_create_captcha();
$this->load->view('login', $data);
}
}function _create_captcha()
{
$this->load->helper('captcha');
// numeric random number for captcha
$random_number = substr(number_format(time() * rand(),0,'',''),0,8);
// setting up captcha config
$vals = array(
'word' => $random_number,
'img_path' => './captcha/',
'img_url' => base_url().'captcha/',
'img_width' => 280,
'img_height' => 45,
'expiration' => 7200
);
$data['captcha'] = create_captcha($vals);
$this->session->set_userdata('captchaWord',$data['captcha']['word']);
return $data['captcha'];
}

1

Решение

в этот это ответ на ваш вопрос.

В пути Codeigniter system/helpers/captcha_helper.php

вы больше всего исправлены captcha_helper

-                   if (($rand_index = unpack('C', $bytes[$byte_index++])) > $rand_max)
+                   list(, $rand_index) = unpack('C', $bytes[$byte_index++]);
+                   if ($rand_index > $rand_max)
0

Другие решения

Других решений пока нет …

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector