Help- Session on Ajax - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Help- Session on Ajax (/showthread.php?tid=73982) |
Help- Session on Ajax - husonet - 07-02-2019 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']; } RE: Help- Session on Ajax - InsiteFX - 07-02-2019 We need to see what your session configuration is set to ./application/config/config.php RE: Help- Session on Ajax - neuron - 07-02-2019 Once I was given a cheap shared hosting, where customer asked me to deploy website. I got session errors in this hosting. I created ticket, then they solved it. I mean that this error might me from server configuration. |