Welcome Guest, Not a member yet? Register   Sign In
Help- Session on Ajax
#1

Hello,

I use the session on Ajax but I receive error message.

I received the error message.
A PHP Error was encountered
Severity: Warning
Message: session_write_close(): Failed to write session data (user). Please verify that the current setting of session.save_path is correct (localhost:11211)
Filename: Unknown
Line Number: 0
Backtrace:

I used the code bellow.
    public function captcha()
    {
        header ("Content-Type:text/html");
        session_write_close();
        $this->load->helper('captcha');
        $vals = array(
         'img_path'   => './captcha/',
         'img_url'    => base_url().'captcha/',
         'font_path'  => './sistemk/fonts/texb.ttf',
         'img_width'  => '150',
         'img_height' => 43,
         'expiration' => 7200,
         'word_length'   => 4,
         'font_size'     => 18,
         'pool'          => '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',
         'img_name'     => 'img_captcha',
         // White background and border, black text and red grid
         'colors'        => array(
                'background' => array(255, 255, 255),
                'border' => array(255, 255, 255),
                'text' => array(0, 0, 0),
                'grid' => array(255, 40, 40)
         )
        );
        $tmp = create_captcha($vals);
        $this->session->set_userdata('captchaWord',$tmp['word']);
        echo $tmp['image'];
    }
Reply


Messages In This Thread
Help- Session on Ajax - by husonet - 07-02-2019, 11:00 AM
RE: Help- Session on Ajax - by InsiteFX - 07-02-2019, 02:28 PM
RE: Help- Session on Ajax - by neuron - 07-02-2019, 11:12 PM



Theme © iAndrew 2016 - Forum software by © MyBB