• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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

#2
We need to see what your session configuration is set to

./application/config/config.php
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply

#3
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.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.